@antv/g2 5.0.0-beta.4 → 5.0.0-beta.5
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.
- package/dist/g2-lite.min.js +5 -2
- package/dist/g2.min.js +5 -2
- package/esm/api/mark/mark.js +0 -2
- package/esm/api/mark/mark.js.map +1 -1
- package/esm/api/mark/types.d.ts +0 -2
- package/esm/component/axis.js +5 -4
- package/esm/component/axis.js.map +1 -1
- package/esm/component/slider.js +2 -4
- package/esm/component/slider.js.map +1 -1
- package/esm/composition/mark.js +2 -1
- package/esm/composition/mark.js.map +1 -1
- package/esm/interaction/builtin/brushHighlight.d.ts +1 -1
- package/esm/interaction/index.d.ts +3 -0
- package/esm/interaction/index.js +3 -0
- package/esm/interaction/index.js.map +1 -1
- package/esm/interaction/native/brushHighlight.d.ts +15 -0
- package/esm/interaction/native/brushHighlight.js +283 -0
- package/esm/interaction/native/brushHighlight.js.map +1 -0
- package/esm/interaction/native/brushXHighlight.d.ts +1 -0
- package/esm/interaction/native/brushXHighlight.js +8 -0
- package/esm/interaction/native/brushXHighlight.js.map +1 -0
- package/esm/interaction/native/brushYHighlight.d.ts +1 -0
- package/esm/interaction/native/brushYHighlight.js +8 -0
- package/esm/interaction/native/brushYHighlight.js.map +1 -0
- package/esm/interaction/native/legendFilter.js +3 -12
- package/esm/interaction/native/legendFilter.js.map +1 -1
- package/esm/interaction/native/tooltip.js +96 -28
- package/esm/interaction/native/tooltip.js.map +1 -1
- package/esm/interaction/native/utils.d.ts +4 -0
- package/esm/interaction/native/utils.js +23 -0
- package/esm/interaction/native/utils.js.map +1 -1
- package/esm/label-transform/contrastReverse.d.ts +9 -0
- package/esm/label-transform/contrastReverse.js +48 -0
- package/esm/label-transform/contrastReverse.js.map +1 -0
- package/esm/label-transform/index.d.ts +8 -8
- package/esm/label-transform/index.js +4 -4
- package/esm/label-transform/index.js.map +1 -1
- package/esm/label-transform/overflowHide.d.ts +7 -0
- package/esm/label-transform/overflowHide.js +18 -0
- package/esm/label-transform/overflowHide.js.map +1 -0
- package/esm/label-transform/overlapDodgeY.d.ts +7 -0
- package/esm/label-transform/{dodgeY.js → overlapDodgeY.js} +4 -4
- package/esm/label-transform/overlapDodgeY.js.map +1 -0
- package/esm/label-transform/overlapHide.d.ts +7 -0
- package/esm/label-transform/overlapHide.js +24 -0
- package/esm/label-transform/overlapHide.js.map +1 -0
- package/esm/runtime/plot.js +24 -6
- package/esm/runtime/plot.js.map +1 -1
- package/esm/runtime/scale.js +17 -5
- package/esm/runtime/scale.js.map +1 -1
- package/esm/runtime/transform.js +10 -4
- package/esm/runtime/transform.js.map +1 -1
- package/esm/runtime/types/common.d.ts +1 -0
- package/esm/runtime/types/options.d.ts +1 -0
- package/esm/shape/label/label.js +3 -3
- package/esm/shape/label/label.js.map +1 -1
- package/esm/shape/label/position/area.d.ts +13 -0
- package/esm/shape/label/position/area.js +28 -0
- package/esm/shape/label/position/area.js.map +1 -0
- package/esm/shape/label/position/bottom.d.ts +1 -0
- package/esm/shape/label/position/bottom.js +2 -0
- package/esm/shape/label/position/bottom.js.map +1 -0
- package/esm/shape/label/position/bottomLeft.d.ts +1 -0
- package/esm/shape/label/position/bottomLeft.js +2 -0
- package/esm/shape/label/position/bottomLeft.js.map +1 -0
- package/esm/shape/label/position/bottomRight.d.ts +1 -0
- package/esm/shape/label/position/bottomRight.js +2 -0
- package/esm/shape/label/position/bottomRight.js.map +1 -0
- package/esm/shape/label/position/default.d.ts +20 -0
- package/esm/shape/label/{position.js → position/default.js} +9 -45
- package/esm/shape/label/position/default.js.map +1 -0
- package/esm/shape/label/position/index.d.ts +13 -0
- package/esm/shape/label/position/index.js +14 -0
- package/esm/shape/label/position/index.js.map +1 -0
- package/esm/shape/label/position/inside.d.ts +1 -0
- package/esm/shape/label/position/inside.js +2 -0
- package/esm/shape/label/position/inside.js.map +1 -0
- package/esm/shape/label/position/left.d.ts +1 -0
- package/esm/shape/label/position/left.js +2 -0
- package/esm/shape/label/position/left.js.map +1 -0
- package/esm/shape/label/position/outside.d.ts +1 -0
- package/esm/shape/label/position/outside.js +2 -0
- package/esm/shape/label/position/outside.js.map +1 -0
- package/esm/shape/label/position/right.d.ts +1 -0
- package/esm/shape/label/position/right.js +2 -0
- package/esm/shape/label/position/right.js.map +1 -0
- package/esm/shape/label/position/spider.d.ts +7 -0
- package/esm/shape/label/position/spider.js +40 -0
- package/esm/shape/label/position/spider.js.map +1 -0
- package/esm/shape/label/position/surround.d.ts +7 -0
- package/esm/shape/label/position/surround.js +37 -0
- package/esm/shape/label/position/surround.js.map +1 -0
- package/esm/shape/label/position/top.d.ts +1 -0
- package/esm/shape/label/position/top.js +2 -0
- package/esm/shape/label/position/top.js.map +1 -0
- package/esm/shape/label/position/topLeft.d.ts +1 -0
- package/esm/shape/label/position/topLeft.js +2 -0
- package/esm/shape/label/position/topLeft.js.map +1 -0
- package/esm/shape/label/position/topRight.d.ts +1 -0
- package/esm/shape/label/position/topRight.js +2 -0
- package/esm/shape/label/position/topRight.js.map +1 -0
- package/esm/spec/composition.d.ts +2 -0
- package/esm/spec/geometry.d.ts +1 -1
- package/esm/spec/interaction.d.ts +21 -5
- package/esm/spec/labelTransform.d.ts +24 -11
- package/esm/spec/theme.d.ts +5 -2
- package/esm/stdlib/index.js +5 -6
- package/esm/stdlib/index.js.map +1 -1
- package/esm/theme/academy.d.ts +3 -0
- package/esm/theme/academy.js +402 -0
- package/esm/theme/academy.js.map +1 -0
- package/esm/theme/dark.js +3 -2
- package/esm/theme/dark.js.map +1 -1
- package/esm/theme/index.d.ts +1 -0
- package/esm/theme/index.js +1 -0
- package/esm/theme/index.js.map +1 -1
- package/esm/theme/light.js +4 -3
- package/esm/theme/light.js.map +1 -1
- package/esm/transform/maybeTooltip.js +3 -1
- package/esm/transform/maybeTooltip.js.map +1 -1
- package/esm/utils/bounds.d.ts +26 -0
- package/esm/utils/bounds.js +41 -0
- package/esm/utils/bounds.js.map +1 -0
- package/esm/utils/color.d.ts +6 -0
- package/esm/utils/color.js +7 -0
- package/esm/utils/color.js.map +1 -0
- package/esm/utils/coordinate.d.ts +1 -0
- package/esm/utils/coordinate.js +12 -0
- package/esm/utils/coordinate.js.map +1 -1
- package/esm/utils/helper.d.ts +1 -0
- package/esm/utils/helper.js +3 -0
- package/esm/utils/helper.js.map +1 -1
- package/lib/api/mark/mark.js +0 -2
- package/lib/api/mark/mark.js.map +1 -1
- package/lib/api/mark/types.d.ts +0 -2
- package/lib/component/axis.js +5 -4
- package/lib/component/axis.js.map +1 -1
- package/lib/component/slider.js +2 -4
- package/lib/component/slider.js.map +1 -1
- package/lib/composition/mark.js +2 -1
- package/lib/composition/mark.js.map +1 -1
- package/lib/interaction/builtin/brushHighlight.d.ts +1 -1
- package/lib/interaction/index.d.ts +3 -0
- package/lib/interaction/index.js +7 -1
- package/lib/interaction/index.js.map +1 -1
- package/lib/interaction/native/brushHighlight.d.ts +15 -0
- package/lib/interaction/native/brushHighlight.js +289 -0
- package/lib/interaction/native/brushHighlight.js.map +1 -0
- package/lib/interaction/native/brushXHighlight.d.ts +1 -0
- package/lib/interaction/native/brushXHighlight.js +12 -0
- package/lib/interaction/native/brushXHighlight.js.map +1 -0
- package/lib/interaction/native/brushYHighlight.d.ts +1 -0
- package/lib/interaction/native/brushYHighlight.js +12 -0
- package/lib/interaction/native/brushYHighlight.js.map +1 -0
- package/lib/interaction/native/legendFilter.js +4 -13
- package/lib/interaction/native/legendFilter.js.map +1 -1
- package/lib/interaction/native/tooltip.js +93 -25
- package/lib/interaction/native/tooltip.js.map +1 -1
- package/lib/interaction/native/utils.d.ts +4 -0
- package/lib/interaction/native/utils.js +28 -1
- package/lib/interaction/native/utils.js.map +1 -1
- package/lib/label-transform/contrastReverse.d.ts +9 -0
- package/lib/label-transform/contrastReverse.js +52 -0
- package/lib/label-transform/contrastReverse.js.map +1 -0
- package/lib/label-transform/index.d.ts +8 -8
- package/lib/label-transform/index.js +9 -9
- package/lib/label-transform/index.js.map +1 -1
- package/lib/label-transform/overflowHide.d.ts +7 -0
- package/lib/label-transform/overflowHide.js +22 -0
- package/lib/label-transform/overflowHide.js.map +1 -0
- package/lib/label-transform/overlapDodgeY.d.ts +7 -0
- package/lib/label-transform/{dodgeY.js → overlapDodgeY.js} +6 -6
- package/lib/label-transform/overlapDodgeY.js.map +1 -0
- package/lib/label-transform/overlapHide.d.ts +7 -0
- package/lib/label-transform/overlapHide.js +28 -0
- package/lib/label-transform/overlapHide.js.map +1 -0
- package/lib/runtime/plot.js +24 -6
- package/lib/runtime/plot.js.map +1 -1
- package/lib/runtime/scale.js +16 -4
- package/lib/runtime/scale.js.map +1 -1
- package/lib/runtime/transform.js +10 -4
- package/lib/runtime/transform.js.map +1 -1
- package/lib/runtime/types/common.d.ts +1 -0
- package/lib/runtime/types/options.d.ts +1 -0
- package/lib/shape/label/label.js +3 -3
- package/lib/shape/label/label.js.map +1 -1
- package/lib/shape/label/position/area.d.ts +13 -0
- package/lib/shape/label/position/area.js +32 -0
- package/lib/shape/label/position/area.js.map +1 -0
- package/lib/shape/label/position/bottom.d.ts +1 -0
- package/lib/shape/label/position/bottom.js +6 -0
- package/lib/shape/label/position/bottom.js.map +1 -0
- package/lib/shape/label/position/bottomLeft.d.ts +1 -0
- package/lib/shape/label/position/bottomLeft.js +6 -0
- package/lib/shape/label/position/bottomLeft.js.map +1 -0
- package/lib/shape/label/position/bottomRight.d.ts +1 -0
- package/lib/shape/label/position/bottomRight.js +6 -0
- package/lib/shape/label/position/bottomRight.js.map +1 -0
- package/lib/shape/label/position/default.d.ts +20 -0
- package/lib/shape/label/{position.js → position/default.js} +10 -43
- package/lib/shape/label/position/default.js.map +1 -0
- package/lib/shape/label/position/index.d.ts +13 -0
- package/lib/shape/label/position/index.js +30 -0
- package/lib/shape/label/position/index.js.map +1 -0
- package/lib/shape/label/position/inside.d.ts +1 -0
- package/lib/shape/label/position/inside.js +6 -0
- package/lib/shape/label/position/inside.js.map +1 -0
- package/lib/shape/label/position/left.d.ts +1 -0
- package/lib/shape/label/position/left.js +6 -0
- package/lib/shape/label/position/left.js.map +1 -0
- package/lib/shape/label/position/outside.d.ts +1 -0
- package/lib/shape/label/position/outside.js +6 -0
- package/lib/shape/label/position/outside.js.map +1 -0
- package/lib/shape/label/position/right.d.ts +1 -0
- package/lib/shape/label/position/right.js +6 -0
- package/lib/shape/label/position/right.js.map +1 -0
- package/lib/shape/label/position/spider.d.ts +7 -0
- package/lib/shape/label/position/spider.js +44 -0
- package/lib/shape/label/position/spider.js.map +1 -0
- package/lib/shape/label/position/surround.d.ts +7 -0
- package/lib/shape/label/position/surround.js +41 -0
- package/lib/shape/label/position/surround.js.map +1 -0
- package/lib/shape/label/position/top.d.ts +1 -0
- package/lib/shape/label/position/top.js +6 -0
- package/lib/shape/label/position/top.js.map +1 -0
- package/lib/shape/label/position/topLeft.d.ts +1 -0
- package/lib/shape/label/position/topLeft.js +6 -0
- package/lib/shape/label/position/topLeft.js.map +1 -0
- package/lib/shape/label/position/topRight.d.ts +1 -0
- package/lib/shape/label/position/topRight.js +6 -0
- package/lib/shape/label/position/topRight.js.map +1 -0
- package/lib/spec/composition.d.ts +2 -0
- package/lib/spec/geometry.d.ts +1 -1
- package/lib/spec/interaction.d.ts +21 -5
- package/lib/spec/labelTransform.d.ts +24 -11
- package/lib/spec/theme.d.ts +5 -2
- package/lib/stdlib/index.js +2 -3
- package/lib/stdlib/index.js.map +1 -1
- package/lib/theme/academy.d.ts +3 -0
- package/lib/theme/academy.js +406 -0
- package/lib/theme/academy.js.map +1 -0
- package/lib/theme/dark.js +3 -2
- package/lib/theme/dark.js.map +1 -1
- package/lib/theme/index.d.ts +1 -0
- package/lib/theme/index.js +3 -1
- package/lib/theme/index.js.map +1 -1
- package/lib/theme/light.js +4 -3
- package/lib/theme/light.js.map +1 -1
- package/lib/transform/maybeTooltip.js +3 -1
- package/lib/transform/maybeTooltip.js.map +1 -1
- package/lib/utils/bounds.d.ts +26 -0
- package/lib/utils/bounds.js +48 -0
- package/lib/utils/bounds.js.map +1 -0
- package/lib/utils/color.d.ts +6 -0
- package/lib/utils/color.js +11 -0
- package/lib/utils/color.js.map +1 -0
- package/lib/utils/coordinate.d.ts +1 -0
- package/lib/utils/coordinate.js +14 -1
- package/lib/utils/coordinate.js.map +1 -1
- package/lib/utils/helper.d.ts +1 -0
- package/lib/utils/helper.js +5 -1
- package/lib/utils/helper.js.map +1 -1
- package/package.json +2 -2
- package/src/.DS_Store +0 -0
- package/src/api/mark/mark.ts +0 -2
- package/src/api/mark/types.ts +0 -2
- package/src/component/axis.ts +16 -11
- package/src/component/slider.ts +1 -3
- package/src/composition/mark.ts +2 -0
- package/src/data/.DS_Store +0 -0
- package/src/interaction/index.ts +3 -0
- package/src/interaction/native/brushHighlight.ts +346 -0
- package/src/interaction/native/brushXHighlight.ts +11 -0
- package/src/interaction/native/brushYHighlight.ts +11 -0
- package/src/interaction/native/legendFilter.ts +3 -14
- package/src/interaction/native/tooltip.ts +119 -32
- package/src/interaction/native/utils.ts +31 -0
- package/src/label-transform/contrastReverse.ts +56 -0
- package/src/label-transform/index.ts +8 -8
- package/src/label-transform/overflowHide.ts +23 -0
- package/src/label-transform/{dodgeY.ts → overlapDodgeY.ts} +6 -6
- package/src/label-transform/overlapHide.ts +32 -0
- package/src/runtime/plot.ts +35 -6
- package/src/runtime/scale.ts +15 -7
- package/src/runtime/transform.ts +13 -4
- package/src/runtime/types/common.ts +1 -0
- package/src/runtime/types/options.ts +1 -0
- package/src/shape/.DS_Store +0 -0
- package/src/shape/label/label.ts +4 -3
- package/src/shape/label/position/area.ts +39 -0
- package/src/shape/label/position/bottom.ts +1 -0
- package/src/shape/label/position/bottomLeft.ts +1 -0
- package/src/shape/label/position/bottomRight.ts +1 -0
- package/src/shape/label/{position.ts → position/default.ts} +12 -56
- package/src/shape/label/position/index.ts +13 -0
- package/src/shape/label/position/inside.ts +1 -0
- package/src/shape/label/position/left.ts +1 -0
- package/src/shape/label/position/outside.ts +1 -0
- package/src/shape/label/position/right.ts +1 -0
- package/src/shape/label/position/spider.ts +46 -0
- package/src/shape/label/position/surround.ts +42 -0
- package/src/shape/label/position/top.ts +1 -0
- package/src/shape/label/position/topLeft.ts +1 -0
- package/src/shape/label/position/topRight.ts +1 -0
- package/src/spec/composition.ts +2 -0
- package/src/spec/geometry.ts +2 -1
- package/src/spec/interaction.ts +28 -4
- package/src/spec/labelTransform.ts +29 -11
- package/src/spec/theme.ts +6 -2
- package/src/stdlib/index.ts +19 -7
- package/src/theme/academy.ts +408 -0
- package/src/theme/dark.ts +3 -2
- package/src/theme/index.ts +1 -0
- package/src/theme/light.ts +4 -3
- package/src/transform/maybeTooltip.ts +3 -1
- package/src/utils/bounds.ts +52 -0
- package/src/utils/color.ts +12 -0
- package/src/utils/coordinate.ts +12 -0
- package/src/utils/helper.ts +4 -0
- package/esm/label-transform/dodgeY.d.ts +0 -7
- package/esm/label-transform/dodgeY.js.map +0 -1
- package/esm/label-transform/hideOverlap.d.ts +0 -4
- package/esm/label-transform/hideOverlap.js +0 -48
- package/esm/label-transform/hideOverlap.js.map +0 -1
- package/esm/label-transform/spider.d.ts +0 -7
- package/esm/label-transform/spider.js +0 -30
- package/esm/label-transform/spider.js.map +0 -1
- package/esm/label-transform/surround.d.ts +0 -7
- package/esm/label-transform/surround.js +0 -30
- package/esm/label-transform/surround.js.map +0 -1
- package/esm/shape/label/position.d.ts +0 -25
- package/esm/shape/label/position.js.map +0 -1
- package/lib/label-transform/dodgeY.d.ts +0 -7
- package/lib/label-transform/dodgeY.js.map +0 -1
- package/lib/label-transform/hideOverlap.d.ts +0 -4
- package/lib/label-transform/hideOverlap.js +0 -52
- package/lib/label-transform/hideOverlap.js.map +0 -1
- package/lib/label-transform/spider.d.ts +0 -7
- package/lib/label-transform/spider.js +0 -34
- package/lib/label-transform/spider.js.map +0 -1
- package/lib/label-transform/surround.d.ts +0 -7
- package/lib/label-transform/surround.js +0 -34
- package/lib/label-transform/surround.js.map +0 -1
- package/lib/shape/label/position.d.ts +0 -25
- package/lib/shape/label/position.js.map +0 -1
- package/src/label-transform/hideOverlap.ts +0 -62
- package/src/label-transform/spider.ts +0 -37
- package/src/label-transform/surround.ts +0 -37
package/dist/g2.min.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).G2={})}(this,function(c){"use strict";const u="main-layer",tt="label-layer",et="element",F="view",nt="plot",rt="component",it="label",at="area";var p="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function v(t,e,n,r,i){!function t(e,n,r,i,a){for(;r<i;){600<i-r&&(o=i-r+1,u=n-r+1,l=Math.log(o),s=.5*Math.exp(2*l/3),l=.5*Math.sqrt(l*s*(o-s)/o)*(u-o/2<0?-1:1),c=Math.max(r,Math.floor(n-u*s/o+l)),u=Math.min(i,Math.floor(n+(o-u)*s/o+l)),t(e,n,c,u,a));var o,s,l,c,u,f=e[n],h=r,d=i;for(B(e,r,n),0<a(e[i],f)&&B(e,r,i);h<d;){for(B(e,h,d),h++,d--;a(e[h],f)<0;)h++;for(;0<a(e[d],f);)d--}0===a(e[r],f)?B(e,r,d):B(e,++d,i),d<=n&&(r=d+1),n<=d&&(i=d-1)}}(t,e,n||0,r||t.length-1,i||D)}function B(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function D(t,e){return t<e?-1:e<t?1:0}function z(t,e){G(t,0,t.children.length,e,t)}function G(t,e,n,r,i){(i=i||K(null)).minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var a=e;a<n;a++){var o=t.children[a];W(i,t.leaf?r(o):o)}return i}function W(t,e){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)}function V(t,e){return t.minX-e.minX}function Y(t,e){return t.minY-e.minY}function H(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function q(t){return t.maxX-t.minX+(t.maxY-t.minY)}function U(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function X(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function K(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function $(t,e,n,r,i){for(var a,o=[e,n];o.length;)(n=o.pop())-(e=o.pop())<=r||(v(t,a=e+Math.ceil((n-e)/r/2)*r,e,n,i),o.push(e,a,a,n))}(e=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()}).prototype.all=function(){return this._all(this.data,[])},e.prototype.search=function(t){var e=this.data,n=[];if(X(t,e))for(var r=this.toBBox,i=[];e;){for(var a=0;a<e.children.length;a++){var o=e.children[a],s=e.leaf?r(o):o;X(t,s)&&(e.leaf?n.push(o):U(t,s)?this._all(o,n):i.push(o))}e=i.pop()}return n},e.prototype.collides=function(t){var e=this.data;if(X(t,e))for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],a=e.leaf?this.toBBox(i):i;if(X(t,a)){if(e.leaf||U(t,a))return!0;n.push(i)}}e=n.pop()}return!1},e.prototype.load=function(t){if(t&&t.length)if(t.length<this._minEntries)for(var e=0;e<t.length;e++)this.insert(t[e]);else{var n,r=this._build(t.slice(),0,t.length-1,0);this.data.children.length?this.data.height===r.height?this._splitRoot(this.data,r):(this.data.height<r.height&&(n=this.data,this.data=r,r=n),this._insert(r,this.data.height-r.height-1,!0)):this.data=r}return this},e.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},e.prototype.clear=function(){return this.data=K([]),this},e.prototype.remove=function(t,e){if(t)for(var n,r,i,a=this.data,o=this.toBBox(t),s=[],l=[];a||s.length;){if(a||(a=s.pop(),r=s[s.length-1],n=l.pop(),i=!0),a.leaf){var c=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,a.children,e);if(-1!==c)return a.children.splice(c,1),s.push(a),this._condense(s),this}i||a.leaf||!U(a,o)?r?(n++,a=r.children[n],i=!1):a=null:(s.push(a),l.push(n),a=(r=a).children[n=0])}return this},e.prototype.toBBox=function(t){return t},e.prototype.compareMinX=function(t,e){return t.minX-e.minX},e.prototype.compareMinY=function(t,e){return t.minY-e.minY},e.prototype.toJSON=function(){return this.data},e.prototype.fromJSON=function(t){return this.data=t,this},e.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},e.prototype._build=function(t,e,n,r){var i,a=n-e+1,o=this._maxEntries;if(a<=o)z(i=K(t.slice(e,n+1)),this.toBBox);else{r||(r=Math.ceil(Math.log(a)/Math.log(o)),o=Math.ceil(a/Math.pow(o,r-1))),(i=K([])).leaf=!1,i.height=r;var s=Math.ceil(a/o),l=s*Math.ceil(Math.sqrt(o));$(t,e,n,l,this.compareMinX);for(var c=e;c<=n;c+=l){var u=Math.min(c+l-1,n);$(t,c,u,s,this.compareMinY);for(var f=c;f<=u;f+=s){var h=Math.min(f+s-1,u);i.children.push(this._build(t,f,h,r-1))}}z(i,this.toBBox)}return i},e.prototype._chooseSubtree=function(t,e,n,r){for(;;){if(r.push(e),e.leaf||r.length-1===n)break;for(var i=1/0,a=1/0,o=void 0,s=0;s<e.children.length;s++){var l=e.children[s],c=H(l),u=(f=t,u=l,(Math.max(u.maxX,f.maxX)-Math.min(u.minX,f.minX))*(Math.max(u.maxY,f.maxY)-Math.min(u.minY,f.minY))-c);u<a?(a=u,i=c<i?c:i,o=l):u===a&&c<i&&(i=c,o=l)}e=o||e.children[0]}var f,u;return e},e.prototype._insert=function(t,e,n){var n=n?t:this.toBBox(t),r=[],i=this._chooseSubtree(n,this.data,e,r);for(i.children.push(t),W(i,n);0<=e&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},e.prototype._split=function(t,e){var n=t[e],r=n.children.length,i=this._minEntries,i=(this._chooseSplitAxis(n,i,r),this._chooseSplitIndex(n,i,r)),r=K(n.children.splice(i,n.children.length-i));r.height=n.height,r.leaf=n.leaf,z(n,this.toBBox),z(r,this.toBBox),e?t[e-1].children.push(r):this._splitRoot(n,r)},e.prototype._splitRoot=function(t,e){this.data=K([t,e]),this.data.height=t.height+1,this.data.leaf=!1,z(this.data,this.toBBox)},e.prototype._chooseSplitIndex=function(t,e,n){for(var r,i,a,o,s=1/0,l=1/0,c=e;c<=n-e;c++){var u=G(t,0,c,this.toBBox),f=G(t,c,n,this.toBBox),h=(i=u,h=f,d=o=a=void 0,a=Math.max(i.minX,h.minX),o=Math.max(i.minY,h.minY),d=Math.min(i.maxX,h.maxX),i=Math.min(i.maxY,h.maxY),Math.max(0,d-a)*Math.max(0,i-o)),d=H(u)+H(f);h<s?(s=h,r=c,l=d<l?d:l):h===s&&d<l&&(l=d,r=c)}return r||n-e},e.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:V,i=t.leaf?this.compareMinY:Y;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},e.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var i=this.toBBox,a=G(t,0,e,i),o=G(t,n-e,n,i),s=q(a)+q(o),l=e;l<n-e;l++){var c=t.children[l];W(a,t.leaf?i(c):c),s+=q(a)}for(var u=n-e-1;e<=u;u--){var f=t.children[u];W(o,t.leaf?i(f):f),s+=q(o)}return s},e.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;0<=r;r--)W(e[r],t)},e.prototype._condense=function(t){for(var e=t.length-1,n=void 0;0<=e;e--)0===t[e].children.length?0<e?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():z(t[e],this.toBBox)};var ot=e,st=1e-6,lt="undefined"!=typeof Float32Array?Float32Array:Array;function ct(){var t=new lt(9);return lt!=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}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var ut=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],e=e[8],f=n[0],h=n[1],d=n[2],p=n[3],y=n[4],v=n[5],g=n[6],m=n[7],n=n[8];return t[0]=f*r+h*o+d*c,t[1]=f*i+h*s+d*u,t[2]=f*a+h*l+d*e,t[3]=p*r+y*o+v*c,t[4]=p*i+y*s+v*u,t[5]=p*a+y*l+v*e,t[6]=g*r+m*o+n*c,t[7]=g*i+m*s+n*u,t[8]=g*a+m*l+n*e,t};function ft(){var t=new lt(16);return lt!=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 ht(t){var e=new lt(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 dt(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 pt(t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,y,v){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=l,t[8]=c,t[9]=u,t[10]=f,t[11]=h,t[12]=d,t[13]=p,t[14]=y,t[15]=v,t}function yt(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 vt(t,e){var n,r,i,a,o,s;return t===e?(n=e[1],r=e[2],i=e[3],a=e[6],o=e[7],s=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]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s):(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]),t}function gt(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],y=e[13],v=e[14],e=e[15],g=n*s-r*o,m=n*l-i*o,b=n*c-a*o,x=r*l-i*s,w=r*c-a*s,k=i*c-a*l,E=u*y-f*p,M=u*v-h*p,O=u*e-d*p,S=f*v-h*y,_=f*e-d*y,A=h*e-d*v,P=g*A-m*_+b*S+x*O-w*M+k*E;return P?(t[0]=(s*A-l*_+c*S)*(P=1/P),t[1]=(i*_-r*A-a*S)*P,t[2]=(y*k-v*w+e*x)*P,t[3]=(h*w-f*k-d*x)*P,t[4]=(l*O-o*A-c*M)*P,t[5]=(n*A-i*O+a*M)*P,t[6]=(v*b-p*k-e*m)*P,t[7]=(u*k-h*b+d*m)*P,t[8]=(o*_-s*O+c*E)*P,t[9]=(r*O-n*_-a*E)*P,t[10]=(p*w-y*b+e*g)*P,t[11]=(f*b-u*w-d*g)*P,t[12]=(s*M-o*S-l*E)*P,t[13]=(n*S-r*M+i*E)*P,t[14]=(y*m-p*x-v*g)*P,t[15]=(u*x-f*m+h*g)*P,t):null}function mt(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],d=t[12],p=t[13],y=t[14],t=t[15];return(e*o-n*a)*(f*t-h*y)-(e*s-r*a)*(u*t-h*p)+(e*l-i*a)*(u*y-f*p)+(n*s-r*o)*(c*t-h*d)-(n*l-i*o)*(c*y-f*d)+(r*l-i*s)*(c*p-u*d)}function bt(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],y=e[12],v=e[13],g=e[14],e=e[15],m=n[0],b=n[1],x=n[2],w=n[3];return t[0]=m*r+b*s+x*f+w*y,t[1]=m*i+b*l+x*h+w*v,t[2]=m*a+b*c+x*d+w*g,t[3]=m*o+b*u+x*p+w*e,m=n[4],b=n[5],x=n[6],w=n[7],t[4]=m*r+b*s+x*f+w*y,t[5]=m*i+b*l+x*h+w*v,t[6]=m*a+b*c+x*d+w*g,t[7]=m*o+b*u+x*p+w*e,m=n[8],b=n[9],x=n[10],w=n[11],t[8]=m*r+b*s+x*f+w*y,t[9]=m*i+b*l+x*h+w*v,t[10]=m*a+b*c+x*d+w*g,t[11]=m*o+b*u+x*p+w*e,m=n[12],b=n[13],x=n[14],w=n[15],t[12]=m*r+b*s+x*f+w*y,t[13]=m*i+b*l+x*h+w*v,t[14]=m*a+b*c+x*d+w*g,t[15]=m*o+b*u+x*p+w*e,t}function xt(t,e,n){var r,i,a,o,s,l,c,u,f,h,d,p,y=n[0],v=n[1],n=n[2];return e===t?(t[12]=e[0]*y+e[4]*v+e[8]*n+e[12],t[13]=e[1]*y+e[5]*v+e[9]*n+e[13],t[14]=e[2]*y+e[6]*v+e[10]*n+e[14],t[15]=e[3]*y+e[7]*v+e[11]*n+e[15]):(r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=f,t[9]=h,t[10]=d,t[11]=p,t[12]=r*y+s*v+f*n+e[12],t[13]=i*y+l*v+h*n+e[13],t[14]=a*y+c*v+d*n+e[14],t[15]=o*y+u*v+p*n+e[15]),t}function wt(t,e,n){var r=n[0],i=n[1],n=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]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function kt(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[4],a=e[5],o=e[6],s=e[7],l=e[8],c=e[9],u=e[10],f=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]=i*n+l*r,t[5]=a*n+c*r,t[6]=o*n+u*r,t[7]=s*n+f*r,t[8]=l*n-i*r,t[9]=c*n-a*r,t[10]=u*n-o*r,t[11]=f*n-s*r,t}function Et(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[8],c=e[9],u=e[10],f=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]=i*n-l*r,t[1]=a*n-c*r,t[2]=o*n-u*r,t[3]=s*n-f*r,t[8]=i*r+l*n,t[9]=a*r+c*n,t[10]=o*r+u*n,t[11]=s*r+f*n,t}function Mt(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 Ot(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 St(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=r+r,s=i+i,l=a+a,c=r*o,u=r*s,r=r*l,f=i*s,i=i*l,a=a*l,o=e*o,s=e*s,e=e*l;return t[0]=1-(f+a),t[1]=u+e,t[2]=r-s,t[3]=0,t[4]=u-e,t[5]=1-(c+a),t[6]=i+o,t[7]=0,t[8]=r+s,t[9]=i-o,t[10]=1-(c+f),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function _t(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function At(t,e){var n=e[0],r=e[1],i=e[2],a=e[4],o=e[5],s=e[6],l=e[8],c=e[9],e=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(a,o,s),t[2]=Math.hypot(l,c,e),t}function Pt(t,e){var n=new lt(3),r=(At(n,e),1/n[0]),i=1/n[1],n=1/n[2],a=e[0]*r,o=e[1]*i,s=e[2]*n,l=e[4]*r,c=e[5]*i,u=e[6]*n,r=e[8]*r,i=e[9]*i,e=e[10]*n,n=a+c+e,f=0;return 0<n?(f=2*Math.sqrt(1+n),t[3]=.25*f,t[0]=(u-i)/f,t[1]=(r-s)/f,t[2]=(o-l)/f):c<a&&e<a?(f=2*Math.sqrt(1+a-c-e),t[3]=(u-i)/f,t[0]=.25*f,t[1]=(o+l)/f,t[2]=(r+s)/f):e<c?(f=2*Math.sqrt(1+c-a-e),t[3]=(r-s)/f,t[0]=(o+l)/f,t[1]=.25*f,t[2]=(u+i)/f):(f=2*Math.sqrt(1+e-a-c),t[3]=(o-l)/f,t[0]=(r+s)/f,t[1]=(u+i)/f,t[2]=.25*f),t}function Tt(t,e,n,r,i){var a=e[0],o=e[1],s=e[2],e=e[3],l=a+a,c=o+o,u=s+s,f=a*l,h=a*c,a=a*u,d=o*c,o=o*u,s=s*u,l=e*l,c=e*c,e=e*u,u=r[0],p=r[1],r=r[2],y=i[0],v=i[1],i=i[2],g=(1-(d+s))*u,m=(h+e)*u,u=(a-c)*u,h=(h-e)*p,e=(1-(f+s))*p,s=(o+l)*p,p=(a+c)*r,a=(o-l)*r,c=(1-(f+d))*r;return t[0]=g,t[1]=m,t[2]=u,t[3]=0,t[4]=h,t[5]=e,t[6]=s,t[7]=0,t[8]=p,t[9]=a,t[10]=c,t[11]=0,t[12]=n[0]+y-(g*y+h*v+p*i),t[13]=n[1]+v-(m*y+e*v+a*i),t[14]=n[2]+i-(u*y+s*v+c*i),t[15]=1,t}function Lt(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n+n,o=r+r,s=i+i,n=n*a,l=r*a,r=r*o,c=i*a,u=i*o,i=i*s,a=e*a,o=e*o,e=e*s;return t[0]=1-r-i,t[1]=l+e,t[2]=c-o,t[3]=0,t[4]=l-e,t[5]=1-n-i,t[6]=u+a,t[7]=0,t[8]=c+o,t[9]=u-a,t[10]=1-n-r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Nt(t,e,n,r,i){e=1/Math.tan(e/2);return t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,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?(t[10]=(i+r)*(n=1/(r-i)),t[14]=2*i*r*n):(t[10]=-1,t[14]=-2*r),t}function Ct(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),c=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=(o+a)*c,t[15]=1,t}var jt=Ct;function Rt(t,e,n,r){var i,a,o,s,l=e[0],c=e[1],e=e[2],u=r[0],f=r[1],r=r[2],h=n[0],d=n[1],n=n[2];return Math.abs(l-h)<st&&Math.abs(c-d)<st&&Math.abs(e-n)<st?yt(t):(h=l-h,d=c-d,n=e-n,i=f*(n*=s=1/Math.hypot(h,d,n))-r*(d*=s),r=r*(h*=s)-u*n,u=u*d-f*h,(s=Math.hypot(i,r,u))?(i*=s=1/s,r*=s,u*=s):u=r=i=0,f=d*u-n*r,a=n*i-h*u,o=h*r-d*i,(s=Math.hypot(f,a,o))?(f*=s=1/s,a*=s,o*=s):o=a=f=0,t[0]=i,t[1]=f,t[2]=h,t[3]=0,t[4]=r,t[5]=a,t[6]=d,t[7]=0,t[8]=u,t[9]=o,t[10]=n,t[11]=0,t[12]=-(i*l+r*c+u*e),t[13]=-(f*l+a*c+o*e),t[14]=-(h*l+d*c+n*e),t[15]=1,t)}function It(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}var Ft=Object.freeze({__proto__:null,create:ft,clone:ht,copy:dt,fromValues:function(t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,y){var v=new lt(16);return v[0]=t,v[1]=e,v[2]=n,v[3]=r,v[4]=i,v[5]=a,v[6]=o,v[7]=s,v[8]=l,v[9]=c,v[10]=u,v[11]=f,v[12]=h,v[13]=d,v[14]=p,v[15]=y,v},set:pt,identity:yt,transpose:vt,invert:gt,adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],y=e[13],v=e[14],e=e[15];return t[0]=s*(h*e-d*v)-f*(l*e-c*v)+y*(l*d-c*h),t[1]=-(r*(h*e-d*v)-f*(i*e-a*v)+y*(i*d-a*h)),t[2]=r*(l*e-c*v)-s*(i*e-a*v)+y*(i*c-a*l),t[3]=-(r*(l*d-c*h)-s*(i*d-a*h)+f*(i*c-a*l)),t[4]=-(o*(h*e-d*v)-u*(l*e-c*v)+p*(l*d-c*h)),t[5]=n*(h*e-d*v)-u*(i*e-a*v)+p*(i*d-a*h),t[6]=-(n*(l*e-c*v)-o*(i*e-a*v)+p*(i*c-a*l)),t[7]=n*(l*d-c*h)-o*(i*d-a*h)+u*(i*c-a*l),t[8]=o*(f*e-d*y)-u*(s*e-c*y)+p*(s*d-c*f),t[9]=-(n*(f*e-d*y)-u*(r*e-a*y)+p*(r*d-a*f)),t[10]=n*(s*e-c*y)-o*(r*e-a*y)+p*(r*c-a*s),t[11]=-(n*(s*d-c*f)-o*(r*d-a*f)+u*(r*c-a*s)),t[12]=-(o*(f*v-h*y)-u*(s*v-l*y)+p*(s*h-l*f)),t[13]=n*(f*v-h*y)-u*(r*v-i*y)+p*(r*h-i*f),t[14]=-(n*(s*v-l*y)-o*(r*v-i*y)+p*(r*l-i*s)),t[15]=n*(s*h-l*f)-o*(r*h-i*f)+u*(r*l-i*s),t},determinant:mt,multiply:bt,translate:xt,scale:wt,rotate:function(t,e,n,r){var i,a,o,s,l,c,u,f,h,d,p,y,v,g,m,b,x,w,k,E,M=r[0],O=r[1],r=r[2],S=Math.hypot(M,O,r);return S<st?null:(M*=S=1/S,O*=S,r*=S,S=Math.sin(n),n=Math.cos(n),a=e[0],o=e[1],s=e[2],l=e[3],c=e[4],u=e[5],f=e[6],h=e[7],d=e[8],p=e[9],y=e[10],v=e[11],m=M*O*(i=1-n)-r*S,b=O*O*i+n,x=r*O*i+M*S,w=M*r*i+O*S,k=O*r*i-M*S,E=r*r*i+n,t[0]=a*(n=M*M*i+n)+c*(g=O*M*i+r*S)+d*(r=r*M*i-O*S),t[1]=o*n+u*g+p*r,t[2]=s*n+f*g+y*r,t[3]=l*n+h*g+v*r,t[4]=a*m+c*b+d*x,t[5]=o*m+u*b+p*x,t[6]=s*m+f*b+y*x,t[7]=l*m+h*b+v*x,t[8]=a*w+c*k+d*E,t[9]=o*w+u*k+p*E,t[10]=s*w+f*k+y*E,t[11]=l*w+h*k+v*E,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:kt,rotateY:Et,rotateZ:function(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[4],c=e[5],u=e[6],f=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]=i*n+l*r,t[1]=a*n+c*r,t[2]=o*n+u*r,t[3]=s*n+f*r,t[4]=l*n-i*r,t[5]=c*n-a*r,t[6]=u*n-o*r,t[7]=f*n-s*r,t},fromTranslation:Mt,fromScaling:Ot,fromRotation:function(t,e,n){var r,i=n[0],a=n[1],n=n[2],o=Math.hypot(i,a,n);return o<st?null:(i*=o=1/o,a*=o,n*=o,o=Math.sin(e),e=Math.cos(e),t[0]=i*i*(r=1-e)+e,t[1]=a*i*r+n*o,t[2]=n*i*r-a*o,t[3]=0,t[4]=i*a*r-n*o,t[5]=a*a*r+e,t[6]=n*a*r+i*o,t[7]=0,t[8]=i*n*r+a*o,t[9]=a*n*r-i*o,t[10]=n*n*r+e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},fromXRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromYRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,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]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=e,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},fromRotationTranslation:St,fromQuat2:function(t,e){var n=new lt(3),r=-e[0],i=-e[1],a=-e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=r*r+i*i+a*a+o*o;return 0<f?(n[0]=2*(s*o+u*r+l*a-c*i)/f,n[1]=2*(l*o+u*i+c*r-s*a)/f,n[2]=2*(c*o+u*a+s*i-l*r)/f):(n[0]=2*(s*o+u*r+l*a-c*i),n[1]=2*(l*o+u*i+c*r-s*a),n[2]=2*(c*o+u*a+s*i-l*r)),St(t,e,n),t},getTranslation:_t,getScaling:At,getRotation:Pt,fromRotationTranslationScale:function(t,e,n,r){var i=e[0],a=e[1],o=e[2],e=e[3],s=i*(u=i+i),l=i*(f=a+a),i=i*(h=o+o),c=a*f,a=a*h,o=o*h,u=e*u,f=e*f,e=e*h,h=r[0],d=r[1],r=r[2];return t[0]=(1-(c+o))*h,t[1]=(l+e)*h,t[2]=(i-f)*h,t[3]=0,t[4]=(l-e)*d,t[5]=(1-(s+o))*d,t[6]=(a+u)*d,t[7]=0,t[8]=(i+f)*r,t[9]=(a-u)*r,t[10]=(1-(s+c))*r,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:Tt,fromQuat:Lt,frustum:function(t,e,n,r,i,a,o){var s=1/(n-e),l=1/(i-r),c=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*l,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*l,t[10]=(o+a)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*c,t[15]=0,t},perspectiveNO:Nt,perspective:Nt,perspectiveZO:function(t,e,n,r,i){return e=1/Math.tan(e/2),t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,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?(t[10]=i*(n=1/(r-i)),t[14]=i*r*n):(t[10]=-1,t[14]=-r),t},perspectiveFromFieldOfView:function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),e=Math.tan(e.rightDegrees*Math.PI/180),s=2/(o+e),l=2/(i+a);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(o-e)*s*.5,t[9]=(i-a)*l*.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},orthoNO:Ct,ortho:jt,orthoZO:function(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),o=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=o,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=a*o,t[15]=1,t},lookAt:Rt,targetTo:function(t,e,n,r){var i=e[0],a=e[1],e=e[2],o=r[0],s=r[1],r=r[2],l=i-n[0],c=a-n[1],n=e-n[2],u=l*l+c*c+n*n,f=(0<u&&(l*=u=1/Math.sqrt(u),c*=u,n*=u),s*n-r*c);return 0<(u=f*f+(r=r*l-o*n)*r+(o=o*c-s*l)*o)&&(f*=u=1/Math.sqrt(u),r*=u,o*=u),t[0]=f,t[1]=r,t[2]=o,t[3]=0,t[4]=c*o-n*r,t[5]=n*f-l*o,t[6]=l*r-c*f,t[7]=0,t[8]=l,t[9]=c,t[10]=n,t[11]=0,t[12]=i,t[13]=a,t[14]=e,t[15]=1,t},str:function(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]+")"},frob:function(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])},add:function(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},subtract:It,multiplyScalar:function(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},multiplyScalarAndAdd:function(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},exactEquals:function(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]},equals:function(t,e){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],f=t[9],h=t[10],d=t[11],p=t[12],y=t[13],v=t[14],t=t[15],g=e[0],m=e[1],b=e[2],x=e[3],w=e[4],k=e[5],E=e[6],M=e[7],O=e[8],S=e[9],_=e[10],A=e[11],P=e[12],T=e[13],L=e[14],e=e[15];return Math.abs(n-g)<=st*Math.max(1,Math.abs(n),Math.abs(g))&&Math.abs(r-m)<=st*Math.max(1,Math.abs(r),Math.abs(m))&&Math.abs(i-b)<=st*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(a-x)<=st*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(o-w)<=st*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(s-k)<=st*Math.max(1,Math.abs(s),Math.abs(k))&&Math.abs(l-E)<=st*Math.max(1,Math.abs(l),Math.abs(E))&&Math.abs(c-M)<=st*Math.max(1,Math.abs(c),Math.abs(M))&&Math.abs(u-O)<=st*Math.max(1,Math.abs(u),Math.abs(O))&&Math.abs(f-S)<=st*Math.max(1,Math.abs(f),Math.abs(S))&&Math.abs(h-_)<=st*Math.max(1,Math.abs(h),Math.abs(_))&&Math.abs(d-A)<=st*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(p-P)<=st*Math.max(1,Math.abs(p),Math.abs(P))&&Math.abs(y-T)<=st*Math.max(1,Math.abs(y),Math.abs(T))&&Math.abs(v-L)<=st*Math.max(1,Math.abs(v),Math.abs(L))&&Math.abs(t-e)<=st*Math.max(1,Math.abs(t),Math.abs(e))},mul:bt,sub:It});function g(){var t=new lt(3);return lt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Bt(t){var e=new lt(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function Dt(t){var e=t[0],n=t[1],t=t[2];return Math.hypot(e,n,t)}function k(t,e,n){var r=new lt(3);return r[0]=t,r[1]=e,r[2]=n,r}function zt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Gt(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Wt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Vt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function Yt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Ht(t,e){var n=e[0],r=e[1],i=e[2],n=n*n+r*r+i*i;0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function qt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Ut(t,e,n){var r=e[0],i=e[1],e=e[2],a=n[0],o=n[1],n=n[2];t[0]=i*n-e*o,t[1]=e*a-r*n,t[2]=r*o-i*a}function Xt(t,e,n,r){var i=e[0],a=e[1],e=e[2];t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t[2]=e+r*(n[2]-e)}function Kt(t,e,n){var r=e[0],i=e[1],e=e[2],a=n[3]*r+n[7]*i+n[11]*e+n[15];return t[0]=(n[0]*r+n[4]*i+n[8]*e+n[12])/(a=a||1),t[1]=(n[1]*r+n[5]*i+n[9]*e+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*e+n[14])/a,t}function $t(t,e,n){var r=e[0],i=e[1],e=e[2];t[0]=r*n[0]+i*n[3]+e*n[6],t[1]=r*n[1]+i*n[4]+e*n[7],t[2]=r*n[2]+i*n[5]+e*n[8]}function Zt(t,e){var n=t[0],r=t[1],t=t[2],i=e[0],a=e[1],e=e[2];return Math.abs(n-i)<=st*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-a)<=st*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(t-e)<=st*Math.max(1,Math.abs(t),Math.abs(e))}var Jt=Vt,Qt=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],e=e[2]-t[2];return Math.hypot(n,r,e)},te=Dt;function ee(){var t=new lt(4);return lt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function ne(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*a+n[12]*e,t[1]=n[1]*r+n[5]*i+n[9]*a+n[13]*e,t[2]=n[2]*r+n[6]*i+n[10]*a+n[14]*e,t[3]=n[3]*r+n[7]*i+n[11]*a+n[15]*e,t}function re(){var t=new lt(4);return lt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function ie(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function ae(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=n[0],s=n[1],l=n[2],n=n[3];return t[0]=r*n+e*o+i*l-a*s,t[1]=i*n+e*s+a*o-r*l,t[2]=a*n+e*l+r*s-i*o,t[3]=e*n-r*o-i*s-a*l,t}function oe(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n*n+r*r+i*i+e*e,a=a?1/a:0;return t[0]=-n*a,t[1]=-r*a,t[2]=-i*a,t[3]=e*a,t}function se(t,e,n,r){var i=.5*Math.PI/180,i=(e*=i,n*=i,r*=i,Math.sin(e)),e=Math.cos(e),a=Math.sin(n),n=Math.cos(n),o=Math.sin(r),r=Math.cos(r);t[0]=i*n*r-e*a*o,t[1]=e*a*r+i*n*o,t[2]=e*n*o-i*a*r,t[3]=e*n*r+i*a*o}g(),ee();var le=function(t,e,n,r){var i=new lt(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},ce=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},ue=ae,fe=function(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n*n+r*r+i*i+e*e;return 0<a&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=e*a,t};function he(t,e){var n=new lt(2);return n[0]=t,n[1]=e,n}function de(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function pe(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function ye(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function ve(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function ge(t,e){var n=e[0]-t[0],e=e[1]-t[1];return Math.hypot(n,e)}function me(t,e){var n=e[0],r=e[1],n=n*n+r*r;return 0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t}function be(t,e){return t[0]*e[0]+t[1]*e[1]}function xe(t,e){return t[0]===e[0]&&t[1]===e[1]}g(),k(1,0,0),k(0,1,0),re(),re(),ct();var we=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t};function ke(t){return t.map(function(t){return Array.isArray(t)?[].concat(t):t})}e=new lt(2),lt!=Float32Array&&(e[0]=0,e[1]=0);var Ee=function(t,e){return(Ee=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 Me(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Ee(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var m=function(){return(m=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function Z(t,e){var n={};for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n}function t(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}function Oe(t,o,s,l){return new(s=s||Promise)(function(n,e){function r(t){try{a(l.next(t))}catch(t){e(t)}}function i(t){try{a(l.throw(t))}catch(t){e(t)}}function a(t){var e;t.done?n(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(r,i)}a((l=l.apply(t,o||[])).next())})}function Se(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{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||0<e--)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function b(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function _e(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t===e&&r:e.has(t))return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t);throw new TypeError("Cannot read private member from an object whose class did not declare it")}var Ae={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};var Pe={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function Te(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return Pe[e]===t.length-1&&"achlmqstvz".includes(e)})}function Le(t){return Te(t)&&t.every(function(t){t=t[0];return t===t.toUpperCase()})}function Ne(t){return Le(t)&&t.every(function(t){t=t[0];return"ACLMQZ".includes(t)})}function Ce(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=Pe[n]&&("m"===n&&2<r.length?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,Pe[n]))),Pe[n]););}function je(t){return 48<=t&&t<=57}function Re(t){for(var e,n=t.pathValue,r=t.max;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||5760<=e&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}function Ie(t){var e,n,r,i,a,o=t.max,s=t.pathValue,l=t.index,c=s.charCodeAt(l),u=Pe[s[l].toLowerCase()];if(t.segmentStart=l,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 1;default:return}}(c)){if(t.index+=1,Re(t),t.data=[],u)for(;;){for(var f=u;0<f;--f){if(97!=(32|c)||3!==f&&4!==f?function(t){var e,n,r=t.max,i=t.pathValue,a=t.index,o=a,s=!1,l=!1,c=!1;if(r<=o)t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param';else if(je(n=43!==(n=i.charCodeAt(o))&&45!==n?n:i.charCodeAt(o+=1))||46===n){if(46!==n){if(e=48===n,n=i.charCodeAt(o+=1),e&&o<r&&n&&je(n))return t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" illegal number';for(;o<r&&je(i.charCodeAt(o));)o+=1,s=!0;n=i.charCodeAt(o)}if(46===n){for(c=!0,o+=1;je(i.charCodeAt(o));)o+=1,l=!0;n=i.charCodeAt(o)}if(101===n||69===n){if(c&&!s&&!l)return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid float exponent';if(43!==(n=i.charCodeAt(o+=1))&&45!==n||(o+=1),!(o<r&&je(i.charCodeAt(o))))return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid integer exponent';for(;o<r&&je(i.charCodeAt(o));)o+=1}t.index=o,t.param=+t.pathValue.slice(a,o)}else t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" is not a number'}(t):(a=i=r=void 0,r=(n=t).index,i=n.pathValue,48===(a=i.charCodeAt(r))?(n.param=0,n.index+=1):49===a?(n.param=1,n.index+=1):n.err='[path-util]: invalid Arc flag "'+i[r]+'", expecting 0 or 1 at index '+r),t.err.length)return;t.data.push(t.param),Re(t),t.index<o&&44===s.charCodeAt(t.index)&&(t.index+=1,Re(t))}if(t.index>=t.max)break;if(!(48<=(e=s.charCodeAt(t.index))&&e<=57||43===e||45===e||46===e))break}Ce(t)}else t.err='[path-util]: Invalid path value "'+s[l]+'" is not a path command'}var Fe=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 Be(t){var o,s,l,c;return Le(t)?ke(t):(t=function(t){if(Te(t))return ke(t);var e=new Fe(t);for(Re(e);e.index<e.max&&!e.err.length;)Ie(e);return e.err||e.segments}(t),c=l=s=o=0,t.map(function(t){var e=t.slice(1).map(Number),t=t[0],n=t.toUpperCase();if("M"===t)return o=e[0],s=e[1],["M",l=o,c=s];if(t!==n)switch(n){case"A":i=[n,e[0],e[1],e[2],e[3],e[4],e[5]+o,e[6]+s];break;case"V":i=[n,e[0]+s];break;case"H":i=[n,e[0]+o];break;default:var r=e.map(function(t,e){return t+(e%2?s:o)}),i=[n].concat(r)}else i=[n].concat(e);var a=i.length;switch(n){case"Z":o=l,s=c;break;case"H":o=i[1];break;case"V":s=i[1];break;default:o=i[a-2],s=i[a-1],"M"===n&&(l=o,c=s)}return i}))}function De(t){if(Ne(t))return ke(t);for(var e,n,r,i,a,o,s,l=Be(t),c=m({},Ae),u=0;u<l.length;u+=1){l[u]=(e=l[u],n=c,s=o=h=a=f=i=r=void 0,r=e[0],i=n.x1,f=n.y1,a=n.x2,h=n.y2,o=e.slice(1).map(Number),s=e,"TQ".includes(r)||(n.qx=null,n.qy=null),"H"===r?s=["L",e[1],f]:"V"===r?s=["L",i,e[1]]:"S"===r?(e=2*f-h,s=["C",n.x1=2*i-a,n.y1=e].concat(o)):"T"===r?(h=2*i-n.qx,a=2*f-n.qy,s=["Q",n.qx=h,n.qy=a].concat(o)):"Q"===r&&(e=o[0],i=o[1],n.qx=e,n.qy=i),s);var f=l[u],h=f.length;c.x1=+f[h-2],c.y1=+f[h-1],c.x2=+f[h-4]||c.x1,c.y2=+f[h-3]||c.y1}return l}function ze(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function Ge(t,e,n,r,i,a,o,s,l,c){var u=120*Math.PI/180,f=Math.PI/180*(+i||0),h=[],d=(c?(b=c[0],x=c[1],g=c[2],m=c[3]):(t=(y=ze(t,e,-f)).x,e=y.y,1<(d=(p=(t-(s=(y=ze(s,l,-f)).x))/2)*p/(n*n)+(y=(e-(l=y.y))/2)*y/(r*r))&&(n*=d=Math.sqrt(d),r*=d),d=n*n,v=r*r,g=(a=(a===o?-1:1)*Math.sqrt(Math.abs((d*v-d*y*y-v*p*p)/(d*y*y+v*p*p))))*n*y/r+(t+s)/2,m=a*-r*p/n+(e+l)/2,b=Math.asin(((e-m)/r*Math.pow(10,9)>>0)/Math.pow(10,9)),x=Math.asin(((l-m)/r*Math.pow(10,9)>>0)/Math.pow(10,9)),b=t<g?Math.PI-b:b,x=s<g?Math.PI-x:x,b<0&&(b=2*Math.PI+b),x<0&&(x=2*Math.PI+x),o&&x<b&&(b-=2*Math.PI),!o&&b<x&&(x-=2*Math.PI)),x-b),p=(Math.abs(d)>u&&(v=x,y=s,a=l,x=b+u*(o&&b<x?1:-1),h=Ge(s=g+n*Math.cos(x),l=m+r*Math.sin(x),n,r,i,0,o,y,a,[x,v,g,m])),d=x-b,Math.cos(b)),u=Math.sin(b),i=Math.cos(x),o=Math.sin(x),y=Math.tan(d/4),a=4/3*n*y,v=4/3*r*y,g=[t,e],m=[t+a*u,e-v*p],b=[s+a*o,l-v*i],x=[s,l];if(m[0]=2*g[0]-m[0],m[1]=2*g[1]-m[1],c)return m.concat(b,x,h);for(var w=[],k=0,E=(h=m.concat(b,x,h)).length;k<E;k+=1)w[k]=k%2?ze(h[k-1],h[k],f).y:ze(h[k],h[k+1],f).x;return w}function We(t,e,n){var r=t[0],t=t[1];return[r+(e[0]-r)*n,t+(e[1]-t)*n]}function Ve(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function Ye(t,e,n,r,i){var a=Ve([t,e],[n,r]),o={x:0,y:0};return{length:a,point:o="number"==typeof i?i<=0?{x:t,y:e}:a<=i?{x:n,y:r}:{x:(i=We([t,e],[n,r],i/a))[0],y:i[1]}:o,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function He(t,e,n,r){var t=[t,e],e=[n,r],i=We(t,e,.5),e=We(e,i,.5),a=We(i,e,.5),o=We(e,a,.5),s=We(a,o,.5),t=Ye(t[0],t[1],i[0],i[1],a[0]).point,i=Ye(s[0],s[1],o[0],o[1],e[0]).point;return[t.x,t.y,i.x,i.y,n,r]}function qe(t,e){var n;if(void 0===e&&(e=!1),Ne(n=t)&&n.every(function(t){t=t[0];return"MC".includes(t)}))return n=ke(t),e?[n,[]]:n;for(var r,i=De(t),a=m({},Ae),o=[],s="",l=i.length,c=[],u=0;u<l;u+=1){i[u]&&(s=i[u][0]),o[u]=s;var f=function(t,e){var n,r,i,a,o,s,l=t[0],c=t.slice(1).map(Number),u=c[0],f=c[1],h=e.x1,d=e.y1,p=e.x,y=e.y;switch("TQ".includes(l)||(e.qx=null,e.qy=null),l){case"M":return e.x=u,e.y=f,t;case"A":return s=[h,d].concat(c),["C"].concat(Ge(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9]));case"Q":return e.qx=u,e.qy=f,s=[h,d].concat(c),["C"].concat((n=s[0],r=s[1],i=s[2],a=s[3],o=s[4],s=s[5],[1/3*n+2/3*i,1/3*r+2/3*a,1/3*o+2/3*i,1/3*s+2/3*a,o,s]));case"L":return["C"].concat(He(h,d,u,f));case"Z":return h===p&&d===y?["C",h,d,p,y,p,y]:["C"].concat(He(h,d,p,y))}return t}(i[u],a),h=(i[u]=f,v=y=p=d=h=void 0,i),d=o,p=u;if(7<h[p].length){h[p].shift();for(var y=h[p],v=p;y.length;)d[p]="A",h.splice(v+=1,0,["C"].concat(y.splice(0,6)));h.splice(p,1)}l=i.length,"Z"===s&&c.push(u),r=(f=i[u]).length,a.x1=+f[r-2],a.y1=+f[r-1],a.x2=+f[r-4]||a.x1,a.y2=+f[r-3]||a.y1}return e?[i,c]:i}function Ue(t,e){var n=t.x,t=t.y,r=e.x,e=e.y,i=n*r+t*e,a=Math.sqrt((Math.pow(n,2)+Math.pow(t,2))*(Math.pow(r,2)+Math.pow(e,2)));return(n*e-t*r<0?-1:1)*Math.acos(i/a)}function Xe(t,e,n,r,i,I,F,a,o,s,l){var c=l.bbox,B=void 0===c||c,c=l.length,D=void 0===c||c,c=l.sampleSize,u=void 0===c?30:c,f="number"==typeof s,h=t,d=e,p=0,y=[h,d,p],v=[h,d],g={x:0,y:0},m=[{x:h,y:d}];f&&s<=0&&(g={x:h,y:d});for(var b,x,w,k,E,M,O,S,_,A,P,T,L,N,C,j,R=0;R<=u;R+=1)b=t,x=e,w=n,k=r,E=i,M=I,O=F,S=a,_=o,A=R/u,T=j=C=N=L=T=P=void 0,T=Math.abs,L=Math.sin,N=Math.cos,C=Math.sqrt,j=Math.PI,w=T(w),T=T(k),k=j/180*((E%360+360)%360),h=(P=b===S&&x===_?{x:b,y:x}:0===w||0===T?Ye(b,x,S,_,A).point:(E=(b-S)/2,P=(x-_)/2,E={x:N(k)*E+L(k)*P,y:-L(k)*E+N(k)*P},1<(P=Math.pow(E.x,2)/Math.pow(w,2)+Math.pow(E.y,2)/Math.pow(T,2))&&(w*=C(P),T*=C(P)),P=(Math.pow(w,2)*Math.pow(T,2)-Math.pow(w,2)*Math.pow(E.y,2)-Math.pow(T,2)*Math.pow(E.x,2))/(Math.pow(w,2)*Math.pow(E.y,2)+Math.pow(T,2)*Math.pow(E.x,2)),M=(M!==O?1:-1)*C(P<0?0:P),C=w*E.y/T*M,P=-T*E.x/w*M,M=N(k)*C-L(k)*P+(b+S)/2,b=L(k)*C+N(k)*P+(x+_)/2,x=Ue({x:1,y:0},S={x:(E.x-C)/w,y:(E.y-P)/T}),_=Ue(S,{x:(-E.x-C)/w,y:(-E.y-P)/T}),!O&&0<_?_-=2*j:O&&_<0&&(_+=2*j),S=x+(_%=2*j)*A,C=w*N(S),E=T*L(S),{x:N(k)*C-L(k)*E+M,y:L(k)*C+N(k)*E+b})).x,d=P.y,B&&m.push({x:h,y:d}),D&&(p+=Ve(v,[h,d])),v=[h,d],f&&s<=p&&s>y[2]&&(O=(p-s)/(p-y[2]),g={x:v[0]*(1-O)+y[0]*O,y:v[1]*(1-O)+y[1]*O}),y=[h,d,p];return{length:p,point:g=f&&p<=s?{x:a,y:o}:g,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 Ke(t,e,n,r,i,a,o,s,l,c){var u=c.bbox,f=void 0===u||u,u=c.length,h=void 0===u||u,u=c.sampleSize,d=void 0===u?10:u,p="number"==typeof l,y=t,v=e,g=0,m=[y,v,g],b=[y,v],x={x:0,y:0},w=[{x:y,y:v}];p&&l<=0&&(x={x:y,y:v});for(var k,E,M,O,S,_,A,P,T,L,N=0;N<=d;N+=1)k=t,E=e,M=n,O=r,S=i,_=a,A=o,P=s,L=void 0,L=1-(T=N/d),y=(k={x:Math.pow(L,3)*k+3*Math.pow(L,2)*T*M+3*L*Math.pow(T,2)*S+Math.pow(T,3)*A,y:Math.pow(L,3)*E+3*Math.pow(L,2)*T*O+3*L*Math.pow(T,2)*_+Math.pow(T,3)*P}).x,v=k.y,f&&w.push({x:y,y:v}),h&&(g+=Ve(b,[y,v])),b=[y,v],p&&l<=g&&l>m[2]&&(M=(g-l)/(g-m[2]),x={x:b[0]*(1-M)+m[0]*M,y:b[1]*(1-M)+m[1]*M}),m=[y,v,g];return{length:g,point:x=p&&g<=l?{x:o,y:s}:x,min:{x:Math.min.apply(null,w.map(function(t){return t.x})),y:Math.min.apply(null,w.map(function(t){return t.y}))},max:{x:Math.max.apply(null,w.map(function(t){return t.x})),y:Math.max.apply(null,w.map(function(t){return t.y}))}}}function $e(t,e,n,r,i,a,o,s){var l=s.bbox,c=void 0===l||l,l=s.length,u=void 0===l||l,l=s.sampleSize,f=void 0===l?10:l,h="number"==typeof o,d=t,p=e,y=0,v=[d,p,y],g=[d,p],m={x:0,y:0},b=[{x:d,y:p}];h&&o<=0&&(m={x:d,y:p});for(var x,w,k,E,M,O,S,_,A=0;A<=f;A+=1)x=t,w=e,k=n,E=r,M=i,O=a,_=void 0,_=1-(S=A/f),d=(x={x:Math.pow(_,2)*x+2*_*S*k+Math.pow(S,2)*M,y:Math.pow(_,2)*w+2*_*S*E+Math.pow(S,2)*O}).x,p=x.y,c&&b.push({x:d,y:p}),u&&(y+=Ve(g,[d,p])),g=[d,p],h&&o<=y&&o>v[2]&&(k=(y-o)/(y-v[2]),m={x:g[0]*(1-k)+v[0]*k,y:g[1]*(1-k)+v[1]*k}),v=[d,p,y];return{length:y,point:m=h&&y<=o?{x:i,y:a}: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,b.map(function(t){return t.x})),y:Math.max.apply(null,b.map(function(t){return t.y}))}}}function Ze(t,e,n){for(var r,i,a,o=De(t),s="number"==typeof e,l=[],c=0,u=0,f=0,h=0,d=[],p=[],y=0,v={x:0,y:0},g=v,m=v,b=v,x=0,w=0,k=o.length;w<k;w+=1)l=(r="M"===(i=(a=o[w])[0]))?l:[c,u].concat(a.slice(1)),r?(g=v={x:f=a[1],y:h=a[2]},y=0,s&&e<.001&&(b=v)):"L"===i?(y=(r=Ye(l[0],l[1],l[2],l[3],(e||0)-x)).length,v=r.min,g=r.max,m=r.point):"A"===i?(y=(r=Xe(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8],(e||0)-x,n||{})).length,v=r.min,g=r.max,m=r.point):"C"===i?(y=(r=Ke(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],(e||0)-x,n||{})).length,v=r.min,g=r.max,m=r.point):"Q"===i?(y=(r=$e(l[0],l[1],l[2],l[3],l[4],l[5],(e||0)-x,n||{})).length,v=r.min,g=r.max,m=r.point):"Z"===i&&(y=(r=Ye((l=[c,u,f,h])[0],l[1],l[2],l[3],(e||0)-x)).length,v=r.min,g=r.max,m=r.point),s&&x<e&&e<=x+y&&(b=m),p.push(g),d.push(v),x+=y,c=(r="Z"!==i?a.slice(-2):[f,h])[0],u=r[1];return{length:x,point:b=s&&x<=e?{x:c,y:u}:b,min:{x:Math.min.apply(null,d.map(function(t){return t.x})),y:Math.min.apply(null,d.map(function(t){return t.y}))},max:{x:Math.max.apply(null,p.map(function(t){return t.x})),y:Math.max.apply(null,p.map(function(t){return t.y}))}}}function Je(t){return(c=l=s=0)<=qe(t).map(function(t){var e,n,r,i,a,o;return"M"===t[0]?(s=t[1],l=t[2],0):(o=t.slice(1),e=o[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],c=3*((o-l)*(e+r)-(a-s)*(n+i)+n*(s-r)-e*(l-i)+o*(r+s/3)-a*(i+l/3))/20,n=t.slice(-2),s=n[0],l=n[1],c)}).reduce(function(t,e){return t+e},0);var s,l,c}function Qe(t){return t.map(function(t,e,n){var r,i,a,o,n=e&&n[e-1].slice(-2).concat(t.slice(1)),s=e?Ke(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],{bbox:!1}).length:0,n=e?s?(void 0===r&&(r=.5),n=(e=n).slice(0,2),i=e.slice(2,4),a=e.slice(4,6),e=e.slice(6,8),n=We(n,i,r),i=We(i,a,r),a=We(a,e,r),o=We(n,i,r),i=We(i,a,r),r=We(o,i,r),[["C"].concat(n,o,r),["C"].concat(i,a,e)]):[t,t]:[t];return{s:t,ss:n,l:s}})}var tn=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},en=function(t){return"function"==typeof t},_=function(t){return null==t},nn={}.toString,rn=function(t,e){return nn.call(t)==="[object "+e+"]"},an=function(t){return Array.isArray?Array.isArray(t):rn(t,"Array")},on=function(t){var e=typeof t;return null!==t&&"object"==e||"function"==e};function sn(t,e){if(t)if(an(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(on(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}var ln=function(t){return"object"==typeof t&&null!==t},cn=function(t){if(!ln(t)||!rn(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},un=function(t){if(an(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},fn=function(t){if(an(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},hn=function(t){return rn(t,"String")},dn=function(t,e,n){return t<e?e:n<t?n:t},pn=function(t){return rn(t,"Number")};var yn=function(t,e){return(t%e+e)%e},vn=Object.values?function(t){return Object.values(t)}:function(n){var r=[];return sn(n,function(t,e){en(n)&&"prototype"===e||r.push(t)}),r};var gn=function(t){return rn(t,"Boolean")},mn=function(t){return void 0===t},bn=function(t){return t instanceof Element||t instanceof HTMLDocument};function xn(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function wn(t,e,n,r){return e&&xn(t,e),n&&xn(t,n),r&&xn(t,r),t}function kn(t){if("object"!=typeof t||null===t)return t;if(an(t))for(var e=[],n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=kn(t[n]):e[n]=t[n];else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=kn(t[i]):e[i]=t[i];return e}function En(a,o){var s;if(en(a))return(s=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=o?o.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=a.apply(this,t),i.set(r,n),n)}).cache=new Map,s;throw new TypeError("Expected a function")}var Mn=kn,On=5;function Sn(t,e){if(t===e)return!0;if(t&&e&&!hn(t)&&!hn(e)){if(tn(t)||tn(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=Sn(t[r],e[r]));r++);return n}if(ln(t)||ln(e)){var i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(n=!0,r=0;r<i.length&&(n=Sn(t[i[r]],e[i[r]]));r++);return n}}return!1}function _n(t,e,n){for(var r=0,i=hn(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t}function An(e,t){var n;return null!==e&&cn(e)?(n={},sn(t,function(t){Cn.call(e,t)&&(n[t]=e[t])}),n):{}}function Pn(n,r,i){function a(){u=!1===i.leading?0:Date.now(),o=null,c=n.apply(s,l),o||(s=l=null)}function t(){var t=Date.now(),e=(u||!1!==i.leading||(u=t),r-(t-u));return s=this,l=arguments,e<=0||r<e?(o&&(clearTimeout(o),o=null),u=t,c=n.apply(s,l),o||(s=l=null)):o||!1===i.trailing||(o=setTimeout(a,e)),c}var o,s,l,c,u=0;return i=i||{},t.cancel=function(){clearTimeout(o),u=0,o=s=l=null},t}function Tn(){}var Ln=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 a in r=r||0,i=i||On,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&cn(o)?(cn(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):an(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},Nn=Sn,Cn=Object.prototype.hasOwnProperty;function jn(t,e,n){(t.prototype=e.prototype=n).constructor=t}function Rn(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function In(){}var e="\\s*([+-]?\\d+)\\s*",n="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",r="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Fn=/^#([0-9a-f]{3,8})$/,Bn=new RegExp("^rgb\\("+[e,e,e]+"\\)$"),Dn=new RegExp("^rgb\\("+[r,r,r]+"\\)$"),zn=new RegExp("^rgba\\("+[e,e,e,n]+"\\)$"),Gn=new RegExp("^rgba\\("+[r,r,r,n]+"\\)$"),Wn=new RegExp("^hsl\\("+[n,r,r]+"\\)$"),Vn=new RegExp("^hsla\\("+[n,r,r,n]+"\\)$"),Yn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Hn(){return this.rgb().formatHex()}function qn(){return this.rgb().formatRgb()}function Un(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Fn.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Xn(e):3===n?new $n(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Kn(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Kn(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=Bn.exec(t))?new $n(e[1],e[2],e[3],1):(e=Dn.exec(t))?new $n(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=zn.exec(t))?Kn(e[1],e[2],e[3],e[4]):(e=Gn.exec(t))?Kn(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Wn.exec(t))?tr(e[1],e[2]/100,e[3]/100,1):(e=Vn.exec(t))?tr(e[1],e[2]/100,e[3]/100,e[4]):Yn.hasOwnProperty(t)?Xn(Yn[t]):"transparent"===t?new $n(NaN,NaN,NaN,0):null}function Xn(t){return new $n(t>>16&255,t>>8&255,255&t,1)}function Kn(t,e,n,r){return new $n(t=r<=0?e=n=NaN:t,e,n,r)}function $n(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Zn(){return"#"+Qn(this.r)+Qn(this.g)+Qn(this.b)}function Jn(){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 Qn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function tr(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new nr(t,e,n,r)}function er(t){var e,n,r,i,a,o,s,l;return t instanceof nr?new nr(t.h,t.s,t.l,t.opacity):(t=t instanceof In?t:Un(t))?t instanceof nr?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new nr(o,s,l,t.opacity)):new nr}function nr(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function rr(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function ir(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||or(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ar(t){return function(t){if(Array.isArray(t))return sr(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||or(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function or(t,e){var n;if(t)return"string"==typeof t?sr(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sr(t,e):void 0}function sr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function lr(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function cr(t,e){return Math.abs(t-e)<.001}function ur(t,e){var n=Math.min.apply(Math,ar(t)),r=Math.min.apply(Math,ar(e));return{x:n,y:r,width:Math.max.apply(Math,ar(t))-n,height:Math.max.apply(Math,ar(e))-r}}function fr(t){return(t+2*Math.PI)%(2*Math.PI)}jn(In,Un,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Hn,formatHex:Hn,formatHsl:function(){return er(this).formatHsl()},formatRgb:qn,toString:qn}),jn($n,function(t,e,n,r){return 1===arguments.length?(i=(i=t)instanceof In?i:Un(i))?new $n((i=i.rgb()).r,i.g,i.b,i.opacity):new $n:new $n(t,e,n,null==r?1:r);var i},Rn(In,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new $n(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new $n(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:Zn,formatHex:Zn,formatRgb:Jn,toString:Jn})),jn(nr,function(t,e,n,r){return 1===arguments.length?er(t):new nr(t,e,n,null==r?1:r)},Rn(In,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new nr(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new nr(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new $n(rr(240<=t?t-240:120+t,n,e),rr(t,n,e),rr(t<120?240+t:t-120,n,e),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+")")}}));var hr={box:function(t,e,n,r){return ur([t,n],[e,r])},length:lr,pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,a){var o=(n-t)*(i-t)+(r-e)*(a-e);return o<0?lr(t,e,i,a):(n-t)*(n-t)+(r-e)*(r-e)<o?lr(n,r,i,a):this.pointToLine(t,e,n,r,i,a)},pointToLine:function(t,e,n,r,i,a){n=[n-t,r-e];return xe(n,[0,0])?Math.sqrt((i-t)*(i-t)+(a-e)*(a-e)):(me(r=[-n[1],n[0]],r),Math.abs(be([i-t,a-e],r)))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function dr(t,e,n,r,i,a){for(var o=-1,s=1/0,l=[n,r],c=20,u=1/(c=a&&200<a?a/10:c),f=u/10,h=0;h<=c;h++){var d=h*u,p=[i.apply(void 0,ar(t.concat([d]))),i.apply(void 0,ar(e.concat([d])))],p=lr(l[0],l[1],p[0],p[1]);p<s&&(o=d,s=p)}if(0===o)return{x:t[0],y:e[0]};if(1===o)return{x:t[(n=t.length)-1],y:e[n-1]};for(var s=1/0,y=0;y<32&&!(f<1e-4);y++){var v=o-f,g=o+f,m=[i.apply(void 0,ar(t.concat([v]))),i.apply(void 0,ar(e.concat([v])))],m=lr(l[0],l[1],m[0],m[1]);0<=v&&m<s?(o=v,s=m):(v=[i.apply(void 0,ar(t.concat([g]))),i.apply(void 0,ar(e.concat([g])))],m=lr(l[0],l[1],v[0],v[1]),g<=1&&m<s?(o=g,s=m):f*=.5)}return{x:i.apply(void 0,ar(t.concat([o]))),y:i.apply(void 0,ar(e.concat([o])))}}function pr(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function yr(t,e,n){n=t+n-2*e;return cr(n,0)?[.5]:(t=(t-e)/n)<=1&&0<=t?[t]:[]}function vr(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function gr(t,e,n,r,i,a,o){var s=pr(t,n,i,o),l=pr(e,r,a,o),c=hr.pointAt(t,e,n,r,o),n=hr.pointAt(n,r,i,a,o);return[[t,e,c.x,c.y,s,l],[s,l,n.x,n.y,i,a]]}function mr(t,e,n,r,i,a,o){return 0===o?(lr(t,e,n,r)+lr(n,r,i,a)+lr(t,e,i,a))/2:(e=(t=gr(t,e,n,r,i,a,.5))[0],n=t[1],e.push(o-1),n.push(o-1),mr.apply(void 0,ar(e))+mr.apply(void 0,ar(n)))}var br={box:function(t,e,n,r,i,a){var o=yr(t,n,i)[0],s=yr(e,r,a)[0],l=[t,i],c=[e,a];return void 0!==o&&l.push(pr(t,n,i,o)),void 0!==s&&c.push(pr(e,r,a,s)),ur(l,c)},length:function(t,e,n,r,i,a){return mr(t,e,n,r,i,a,3)},nearestPoint:function(t,e,n,r,i,a,o,s){return dr([t,n,i],[e,r,a],o,s,pr)},pointDistance:function(t,e,n,r,i,a,o,s){t=this.nearestPoint(t,e,n,r,i,a,o,s);return lr(t.x,t.y,o,s)},interpolationAt:pr,pointAt:function(t,e,n,r,i,a,o){return{x:pr(t,n,i,o),y:pr(e,r,a,o)}},divide:gr,tangentAngle:function(t,e,n,r,i,a,o){t=vr(t,n,i,o),n=vr(e,r,a,o);return fr(Math.atan2(n,t))}};function xr(t,e,n,r,i){var a=1-i;return a*a*a*t+3*e*i*a*a+3*n*i*i*a+r*i*i*i}function wr(t,e,n,r,i){var a=1-i;return 3*(a*a*(e-t)+2*a*i*(n-e)+i*i*(r-n))}function kr(t,e,n,r){var i,a,r=-3*t+9*e-9*n+3*r,n=6*t-12*e+6*n,e=3*e-3*t,t=[];return cr(r,0)?cr(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):cr(e=n*n-4*r*e,0)?t.push(-n/(2*r)):0<e&&(a=(-n-(e=Math.sqrt(e)))/(2*r),0<=(i=(-n+e)/(2*r))&&i<=1&&t.push(i),0<=a)&&a<=1&&t.push(a),t}function Er(t,e,n,r,i,a,o,s,l){var c=xr(t,n,i,o,l),u=xr(e,r,a,s,l),f=hr.pointAt(t,e,n,r,l),n=hr.pointAt(n,r,i,a,l),r=hr.pointAt(i,a,o,s,l),i=hr.pointAt(f.x,f.y,n.x,n.y,l),a=hr.pointAt(n.x,n.y,r.x,r.y,l);return[[t,e,f.x,f.y,i.x,i.y,c,u],[c,u,a.x,a.y,r.x,r.y,o,s]]}function Mr(t,e,n,r,i,a,o,s,l){if(0===l){for(var c=[t,n,i,o],u=[e,r,a,s],f=0,h=c.length,d=0;d<h;d++)f+=lr(c[d],u[d],c[(d+1)%h],u[(d+1)%h]);return f/2}t=Er(t,e,n,r,i,a,o,s,.5),e=[].concat(ar(t[0]),[l-1]),n=[].concat(ar(t[1]),[l-1]);return Mr.apply(void 0,ar(e))+Mr.apply(void 0,ar(n))}var Or={extrema:kr,box:function(t,e,n,r,i,a,o,s){for(var l=[t,o],c=[e,s],u=kr(t,n,i,o),f=kr(e,r,a,s),h=0;h<u.length;h++)l.push(xr(t,n,i,o,u[h]));for(var d=0;d<f.length;d++)c.push(xr(e,r,a,s,f[d]));return ur(l,c)},length:function(t,e,n,r,i,a,o,s){return Mr(t,e,n,r,i,a,o,s,3)},nearestPoint:function(t,e,n,r,i,a,o,s,l,c,u){return dr([t,n,i,o],[e,r,a,s],l,c,xr,u)},pointDistance:function(t,e,n,r,i,a,o,s,l,c,u){t=this.nearestPoint(t,e,n,r,i,a,o,s,l,c,u);return lr(t.x,t.y,l,c)},interpolationAt:xr,pointAt:function(t,e,n,r,i,a,o,s,l){return{x:xr(t,n,i,o,l),y:xr(e,r,a,s,l)}},divide:Er,tangentAngle:function(t,e,n,r,i,a,o,s,l){t=wr(t,n,i,o,l),n=wr(e,r,a,s,l);return fr(Math.atan2(n,t))}};function Sr(t,e){t=Math.abs(t);return 0<e?t:-1*t}var _r=function(t,e,n,r,i,a){var o=n,s=r;if(0===o||0===s)return{x:t,y:e};for(var n=i-t,r=a-e,l=Math.abs(n),c=Math.abs(r),u=o*o,f=s*s,h=Math.PI/4,d=0,p=0,y=0;y<4;y++){var d=o*Math.cos(h),p=s*Math.sin(h),v=(u-f)*Math.pow(Math.cos(h),3)/o,g=(f-u)*Math.pow(Math.sin(h),3)/s,m=d-v,b=p-g,v=l-v,g=c-g,x=Math.hypot(b,m),w=Math.hypot(g,v);h+=x*Math.asin((m*g-b*v)/(x*w))/Math.sqrt(u+f-d*d-p*p),h=Math.min(Math.PI/2,Math.max(0,h))}return{x:t+Sr(d,n),y:e+Sr(p,r)}};function Ar(t,e,n,r,i,a){return n*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+t}function Pr(t,e,n,r,i,a){return n*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+e}function Tr(t,e,n){return{x:t*Math.cos(n),y:e*Math.sin(n)}}function Lr(t,e,n){var r=Math.cos(n),n=Math.sin(n);return[t*r-e*n,t*n+e*r]}var Nr={box:function(t,e,n,r,i,a,o){for(var s=Math.atan(-r/n*Math.tan(i)),l=1/0,c=-1/0,u=[a,o],f=2*-Math.PI;f<=2*Math.PI;f+=Math.PI){var h=s+f;a<o?a<h&&h<o&&u.push(h):o<h&&h<a&&u.push(h)}for(var d=0;d<u.length;d++){var p=Ar(t,0,n,r,i,u[d]);p<l&&(l=p),c<p&&(c=p)}for(var y=Math.atan(r/(n*Math.tan(i))),v=1/0,g=-1/0,m=[a,o],b=2*-Math.PI;b<=2*Math.PI;b+=Math.PI){var x=y+b;a<o?a<x&&x<o&&m.push(x):o<x&&x<a&&m.push(x)}for(var w=0;w<m.length;w++){var k=Pr(0,e,n,r,i,m[w]);k<v&&(v=k),g<k&&(g=k)}return{x:l,y:v,width:c-l,height:g-v}},length:function(t,e,n,r,i,a,o){},nearestPoint:function(t,e,n,r,i,a,o,s,l){var s=ir(Lr(s-t,l-e,-i),2),l=s[0],s=s[1],l=_r(0,0,n,r,l,s),c=(s=l.x,c=l.y,(Math.atan2(c*n,s*r)+2*Math.PI)%(2*Math.PI)),s=(c<a?l=Tr(n,r,a):o<c&&(l=Tr(n,r,o)),Lr(l.x,l.y,i));return{x:s[0]+t,y:s[1]+e}},pointDistance:function(t,e,n,r,i,a,o,s,l){t=this.nearestPoint(t,e,n,r,i,a,o,s,l);return lr(t.x,t.y,s,l)},pointAt:function(t,e,n,r,i,a,o,s){o=(o-a)*s+a;return{x:Ar(t,0,n,r,i,o),y:Pr(0,e,n,r,i,o)}},tangentAngle:function(t,e,n,r,i,a,o,s){var l,o=(o-a)*s+a,s=(s=r,a=i,l=o,-1*n*Math.cos(a)*Math.sin(l)-s*Math.sin(a)*Math.cos(l)),i=(a=r,l=i,r=o,-1*n*Math.sin(l)*Math.sin(r)+a*Math.cos(l)*Math.cos(r));return fr(Math.atan2(i,s))}};function Cr(t){for(var e=0,n=[],r=0;r<t.length-1;r++){var i=t[r],a=t[r+1],o=lr(i[0],i[1],a[0],a[1]);n.push({from:i,to:a,length:o}),e+=o}return{segments:n,totalLength:e}}var jr,Rr,Ir={box:function(t){for(var e=[],n=[],r=0;r<t.length;r++){var i=t[r];e.push(i[0]),n.push(i[1])}return ur(e,n)},length:function(t){var e=t;if(e.length<2)return 0;for(var n=0,r=0;r<e.length-1;r++){var i=e[r],a=e[r+1];n+=lr(i[0],i[1],a[0],a[1])}return n},pointAt:function(t,e){var n=e;if(1<n||n<0||t.length<2)return null;var e=Cr(t),r=e.segments,i=e.totalLength;if(0===i)return{x:t[0][0],y:t[0][1]};for(var a=0,o=null,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=hr.pointAt(c[0],c[1],u[0],u[1],(n-a)/l);break}a+=l}return o},pointDistance:function(t,e,n){for(var r=t,i=e,a=n,o=1/0,s=0;s<r.length-1;s++){var l=r[s],c=r[s+1],l=hr.pointDistance(l[0],l[1],c[0],c[1],i,a);l<o&&(o=l)}return o},tangentAngle:function(t,e){var n=e;if(1<n||n<0||t.length<2)return 0;for(var r=(t=Cr(t)).segments,i=t.totalLength,a=0,o=0,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=Math.atan2(u[1]-c[1],u[0]-c[0]);break}a+=l}return o}},e={exports:{}};function Fr(){}function Br(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function Dr(t,e,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");n=new Br(n,r||t,i),r=Rr?Rr+e:e;return t._events[r]?t._events[r].fn?t._events[r]=[t._events[r],n]:t._events[r].push(n):(t._events[r]=n,t._eventsCount++),t}function zr(t,e){0==--t._eventsCount?t._events=new Fr:delete t._events[e]}function Gr(){this._events=new Fr,this._eventsCount=0}r=e,jr=Object.prototype.hasOwnProperty,Rr="~",Object.create&&(Fr.prototype=Object.create(null),(new Fr).__proto__||(Rr=!1)),Gr.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)jr.call(t,e)&&n.push(Rr?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},Gr.prototype.listeners=function(t){var t=Rr?Rr+t:t,e=this._events[t];if(!e)return[];if(e.fn)return[e.fn];for(var n=0,r=e.length,i=new Array(r);n<r;n++)i[n]=e[n].fn;return i},Gr.prototype.listenerCount=function(t){t=Rr?Rr+t:t,t=this._events[t];return t?t.fn?1:t.length:0},Gr.prototype.emit=function(t,e,n,r,i,a){var o=Rr?Rr+t:t;if(!this._events[o])return!1;var s,l=this._events[o],c=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,r),!0;case 5:return l.fn.call(l.context,e,n,r,i),!0;case 6:return l.fn.call(l.context,e,n,r,i,a),!0}for(h=1,s=new Array(c-1);h<c;h++)s[h-1]=arguments[h];l.fn.apply(l.context,s)}else for(var u,f=l.length,h=0;h<f;h++)switch(l[h].once&&this.removeListener(t,l[h].fn,void 0,!0),c){case 1:l[h].fn.call(l[h].context);break;case 2:l[h].fn.call(l[h].context,e);break;case 3:l[h].fn.call(l[h].context,e,n);break;case 4:l[h].fn.call(l[h].context,e,n,r);break;default:if(!s)for(u=1,s=new Array(c-1);u<c;u++)s[u-1]=arguments[u];l[h].fn.apply(l[h].context,s)}return!0},Gr.prototype.on=function(t,e,n){return Dr(this,t,e,n,!1)},Gr.prototype.once=function(t,e,n){return Dr(this,t,e,n,!0)},Gr.prototype.removeListener=function(t,e,n,r){t=Rr?Rr+t:t;if(this._events[t])if(e){var i=this._events[t];if(i.fn)i.fn!==e||r&&!i.once||n&&i.context!==n||zr(this,t);else{for(var a=0,o=[],s=i.length;a<s;a++)(i[a].fn!==e||r&&!i[a].once||n&&i[a].context!==n)&&o.push(i[a]);o.length?this._events[t]=1===o.length?o[0]:o:zr(this,t)}}else zr(this,t);return this},Gr.prototype.removeAllListeners=function(t){return t?(t=Rr?Rr+t:t,this._events[t]&&zr(this,t)):(this._events=new Fr,this._eventsCount=0),this},Gr.prototype.off=Gr.prototype.removeListener,Gr.prototype.addListener=Gr.prototype.on,Gr.prefixed=Rr,r.exports=Gr.EventEmitter=Gr;var i,Wr=e.exports;function Vr(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)),r}function Yr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vr(Object(n),!0).forEach(function(t){Kr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function M(){M=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return E()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,f;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,f):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}(n,o);if(n){if(n===f)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===f)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var f={};function h(){}function d(){}function p(){}var e={},y=(a(e,r,function(){return this}),Object.getPrototypeOf),y=y&&y(y(k([]))),v=(y&&y!==t&&l.call(y,r)&&(e=y),p.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function m(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:E}}function E(){return{value:void 0,done:!0}}return c(v,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(v),t},o.awrap=function(t){return{__await:t}},g(m.prototype),a(m.prototype,n,function(){return this}),o.AsyncIterator=m,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new m(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},g(v),a(v,i,"Generator"),a(v,r,function(){return this}),a(v,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},o}function Hr(t){return(Hr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function qr(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Ur(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){qr(r,e,n,i,a,"next",t)}function a(t){qr(r,e,n,i,a,"throw",t)}i(void 0)})}}function O(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,oi(r.key),r)}}function l(t,e,n){return e&&Xr(t.prototype,e),n&&Xr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Kr(t,e,n){return(e=oi(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zr(t,e)}function $r(t){return($r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Zr(t,e){return(Zr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Jr(t,e){if(null==t)return{};var n,r=function(t,e){if(null==t)return{};for(var n,r={},i=Object.keys(t),a=0;a<i.length;a++)n=i[a],0<=e.indexOf(n)||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(t),a=0;a<i.length;a++)n=i[a],0<=e.indexOf(n)||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n]);return r}function Qr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function h(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=$r(n),e=(t=r?(t=$r(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),this);if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Qr(e)}}function ti(){return(ti="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=$r(t)););return t}(t,e);if(r)return(r=Object.getOwnPropertyDescriptor(r,e)).get?r.get.call(arguments.length<3?t:n):r.value}).apply(this,arguments)}function ei(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||ri(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ni(t){return function(t){if(Array.isArray(t))return ii(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ri(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ri(t,e){var n;if(t)return"string"==typeof t?ii(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ii(t,e):void 0}function ii(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ai(t,e){var n,r,i,a,o="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(o)return r=!(n=!0),{s:function(){o=o.call(t)},n:function(){var t=o.next();return n=t.done,t},e:function(t){r=!0,i=t},f:function(){try{n||null==o.return||o.return()}finally{if(r)throw i}}};if(Array.isArray(t)||(o=ri(t))||e&&t&&"number"==typeof t.length)return o&&(t=o),a=0,{s:e=function(){},n:function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(t){throw t},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function oi(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);if("object"!=typeof(n=n.call(t,e||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}(n=i=i||{}).COORDINATE="<coordinate>",n.COLOR="<color>",n.PAINT="<paint>",n.NUMBER="<number>",n.ANGLE="<angle>",n.OPACITY_VALUE="<opacity-value>",n.SHADOW_BLUR="<shadow-blur>",n.LENGTH="<length>",n.PERCENTAGE="<percentage>",n.LENGTH_PERCENTAGE="<length> | <percentage>",n.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",n.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",n.LIST_OF_POINTS="<list-of-points>",n.PATH="<path>",n.FILTER="<filter>",n.Z_INDEX="<z-index>",n.OFFSET_DISTANCE="<offset-distance>",n.DEFINED_PATH="<defined-path>",n.MARKER="<marker>",n.TRANSFORM="<transform>",n.TRANSFORM_ORIGIN="<transform-origin>",n.TEXT="<text>",n.TEXT_TRANSFORM="<text-transform>";var si,E,li=function(){function v(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[0,0,0],e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[0,0,0];O(this,v),this.center=g(),this.halfExtents=g(),this.min=g(),this.max=g(),this.update(t,e)}return l(v,[{key:"update",value:function(t,e){zt(this.center,t),zt(this.halfExtents,e),Jt(this.min,this.center,this.halfExtents),Wt(this.max,this.center,this.halfExtents)}},{key:"setMinMax",value:function(t,e){Wt(this.center,e,t),Yt(this.center,this.center,.5),Jt(this.halfExtents,e,t),Yt(this.halfExtents,this.halfExtents,.5),zt(this.min,t),zt(this.max,e)}},{key:"getMin",value:function(){return this.min}},{key:"getMax",value:function(){return this.max}},{key:"add",value:function(t){var e,n,r,i,a,o,s,l,c,u,f,h,d,p,y;v.isEmpty(t)||(v.isEmpty(this)?this.setMinMax(t.getMin(),t.getMax()):(n=(e=this.center)[0],p=e[1],a=e[2],i=(r=this.halfExtents)[0],f=r[1],o=r[2],l=(h=t.center)[0],y=h[1],h=h[2],c=(t=t.halfExtents)[0],(d=y-(u=t[1]))<(s=p-f)&&(s=d),(d=p+f)<(p=y+u)&&(d=p),(y=h-(f=t[2]))<(u=a-o)&&(u=y),(p=a+o)<(t=h+f)&&(p=t),e[0]=.5*((a=(y=l-c)<(a=n-i)?y:a)+(o=(o=n+i)<(h=l+c)?h:o)),e[1]=.5*(s+d),e[2]=.5*(u+p),r[0]=.5*(o-a),r[1]=.5*(d-s),r[2]=.5*(p-u),this.min[0]=a,this.min[1]=s,this.min[2]=u,this.max[0]=o,this.max[1]=d,this.max[2]=p))}},{key:"setFromTransformedAABB",value:function(t,e){var n=this.center,r=this.halfExtents,i=t.center,t=t.halfExtents,a=e[0],o=e[4],s=e[8],l=e[1],c=e[5],u=e[9],f=e[2],h=e[6],d=e[10],p=Math.abs(a),y=Math.abs(o),v=Math.abs(s),g=Math.abs(l),m=Math.abs(c),b=Math.abs(u),x=Math.abs(f),w=Math.abs(h),k=Math.abs(d);Gt(n,e[12]+a*i[0]+o*i[1]+s*i[2],e[13]+l*i[0]+c*i[1]+u*i[2],e[14]+f*i[0]+h*i[1]+d*i[2]),Gt(r,p*t[0]+y*t[1]+v*t[2],g*t[0]+m*t[1]+b*t[2],x*t[0]+w*t[1]+k*t[2]),this.min=Jt(this.min,n,r),this.max=Wt(this.max,n,r)}},{key:"intersects",value:function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),t=t.getMin();return n[0]<=r[0]&&e[0]>=t[0]&&n[1]<=r[1]&&e[1]>=t[1]&&n[2]<=r[2]&&e[2]>=t[2]}},{key:"intersection",value:function(t){var e,n,r,i;return this.intersects(t)?(e=new v,i=g(),n=this.getMin(),r=t.getMin(),i[0]=Math.max(n[0],r[0]),i[1]=Math.max(n[1],r[1]),i[2]=Math.max(n[2],r[2]),n=i,r=g(),i=this.getMax(),t=t.getMax(),r[0]=Math.min(i[0],t[0]),r[1]=Math.min(i[1],t[1]),r[2]=Math.min(i[2],t[2]),e.setMinMax(n,r),e):null}},{key:"containsPoint",value:function(t){var e=this.getMin(),n=this.getMax();return!(t[0]<e[0]||t[0]>n[0]||t[1]<e[1]||t[1]>n[1]||t[2]<e[2]||t[2]>n[2])}},{key:"getNegativeFarPoint",value:function(t){return 273===t.pnVertexFlag?zt(g(),this.min):272===t.pnVertexFlag?k(this.min[0],this.min[1],this.max[2]):257===t.pnVertexFlag?k(this.min[0],this.max[1],this.min[2]):256===t.pnVertexFlag?k(this.min[0],this.max[1],this.max[2]):17===t.pnVertexFlag?k(this.max[0],this.min[1],this.min[2]):16===t.pnVertexFlag?k(this.max[0],this.min[1],this.max[2]):1===t.pnVertexFlag?k(this.max[0],this.max[1],this.min[2]):k(this.max[0],this.max[1],this.max[2])}},{key:"getPositiveFarPoint",value:function(t){return 273===t.pnVertexFlag?zt(g(),this.max):272===t.pnVertexFlag?k(this.max[0],this.max[1],this.min[2]):257===t.pnVertexFlag?k(this.max[0],this.min[1],this.max[2]):256===t.pnVertexFlag?k(this.max[0],this.min[1],this.min[2]):17===t.pnVertexFlag?k(this.min[0],this.max[1],this.max[2]):16===t.pnVertexFlag?k(this.min[0],this.max[1],this.min[2]):1===t.pnVertexFlag?k(this.min[0],this.min[1],this.max[2]):k(this.min[0],this.min[1],this.min[2])}}],[{key:"isEmpty",value:function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]}}]),v}(),ci=function(){function n(t,e){O(this,n),this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||k(0,1,0),this.updatePNVertexFlag()}return l(n,[{key:"updatePNVertexFlag",value:function(){this.pnVertexFlag=(Number(0<=this.normal[0])<<8)+(Number(0<=this.normal[1])<<4)+Number(0<=this.normal[2])}},{key:"distanceToPoint",value:function(t){return qt(t,this.normal)-this.distance}},{key:"normalize",value:function(){var t=1/te(this.normal);Yt(this.normal,this.normal,t),this.distance*=t}},{key:"intersectsLine",value:function(t,e,n){var r=this.distanceToPoint(t),r=r/(r-this.distanceToPoint(e)),i=0<=r&&r<=1;return i&&n&&Xt(n,t,e,r),i}}]),n}(),ui=((r=si=si||{})[r.OUTSIDE=4294967295]="OUTSIDE",r[r.INSIDE=0]="INSIDE",r[r.INDETERMINATE=2147483647]="INDETERMINATE",function(){function n(t){if(O(this,n),this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new ci)}return l(n,[{key:"extractFromVPMatrix",value:function(t){var t=ei(t,16),e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],d=t[12],p=t[13],y=t[14],t=t[15];Gt(this.planes[0].normal,i-e,l-a,h-c),this.planes[0].distance=t-d,Gt(this.planes[1].normal,i+e,l+a,h+c),this.planes[1].distance=t+d,Gt(this.planes[2].normal,i+n,l+o,h+u),this.planes[2].distance=t+p,Gt(this.planes[3].normal,i-n,l-o,h-u),this.planes[3].distance=t-p,Gt(this.planes[4].normal,i-r,l-s,h-f),this.planes[4].distance=t-y,Gt(this.planes[5].normal,i+r,l+s,h+f),this.planes[5].distance=t+y,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})}}]),n}()),fi=function(){function n(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;O(this,n),this.x=0,this.y=0,this.x=t,this.y=e}return l(n,[{key:"clone",value:function(){return new n(this.x,this.y)}},{key:"copyFrom",value:function(t){this.x=t.x,this.y=t.y}}]),n}(),hi=function(){function i(t,e,n,r){O(this,i),this.x=void 0,this.y=void 0,this.width=void 0,this.height=void 0,this.left=void 0,this.right=void 0,this.top=void 0,this.bottom=void 0,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 l(i,[{key:"toJSON",value:function(){}}]),i}(),di=((e=E=E||{}).GROUP="g",e.CIRCLE="circle",e.ELLIPSE="ellipse",e.IMAGE="image",e.RECT="rect",e.LINE="line",e.POLYLINE="polyline",e.POLYGON="polygon",e.TEXT="text",e.PATH="path",e.HTML="html",e.MESH="mesh",En(function(){return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"").replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}));function pi(t){if(!t)throw new Error}function yi(t,e){if(t===e)throw new Error}function vi(t){return"function"==typeof t}var gi={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},mi=En(function(t){var t=di(t),e=gi[t];return(null==e?void 0:e.alias)||t}),bi={},xi=0;var wi="undefined"!=typeof window&&void 0!==window.document;function ki(t,e){var n=Number(t.style.zIndex),r=Number(e.style.zIndex);if(n===r){var i=t.parentNode;if(i)return(i=i.childNodes||[]).indexOf(t)-i.indexOf(e)}return n-r}function Ei(t){var e,n=t;do{if(null==(e=n.style)?void 0:e.clipPath)return n}while(null!==(n=n.parentElement));return null}function Mi(t,e){if(wi)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}function Oi(t){return t?"number"===t?y.kNumber:"percent"===t||"%"===t?y.kPercentage:(e=t,Bi.find(function(t){return t.name===e}).unit_type):y.kUnknown;var e}function Si(t){var e=1;switch(t){case y.kPixels:case y.kDegrees:case y.kSeconds:break;case y.kMilliseconds:e=.001;break;case y.kRadians:e=180/Math.PI;break;case y.kGradians:e=.9;break;case y.kTurns:e=360}return e}function _i(t){switch(t){case y.kNumber:case y.kInteger:return"";case y.kPercentage:return"%";case y.kEms:return"em";case y.kRems:return"rem";case y.kPixels:return"px";case y.kDegrees:return"deg";case y.kRadians:return"rad";case y.kGradians:return"grad";case y.kMilliseconds:return"ms";case y.kSeconds:return"s";case y.kTurns:return"turn"}return""}var y,Ai,Pi,Ti,Li,Ni,Ci,ji,Ri="Method not implemented.",Ii="Use document.documentElement instead.",Fi={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},Bi=((n=y=y||{})[n.kUnknown=0]="kUnknown",n[n.kNumber=1]="kNumber",n[n.kPercentage=2]="kPercentage",n[n.kEms=3]="kEms",n[n.kPixels=4]="kPixels",n[n.kRems=5]="kRems",n[n.kDegrees=6]="kDegrees",n[n.kRadians=7]="kRadians",n[n.kGradians=8]="kGradians",n[n.kTurns=9]="kTurns",n[n.kMilliseconds=10]="kMilliseconds",n[n.kSeconds=11]="kSeconds",n[n.kInteger=12]="kInteger",(r=Ai=Ai||{})[r.kUNumber=0]="kUNumber",r[r.kUPercent=1]="kUPercent",r[r.kULength=2]="kULength",r[r.kUAngle=3]="kUAngle",r[r.kUTime=4]="kUTime",r[r.kUOther=5]="kUOther",0,(e=Pi=Pi||{})[e.kYes=0]="kYes",e[e.kNo=1]="kNo",(n=Ti=Ti||{})[n.kYes=0]="kYes",n[n.kNo=1]="kNo",[{name:"em",unit_type:y.kEms},{name:"px",unit_type:y.kPixels},{name:"deg",unit_type:y.kDegrees},{name:"rad",unit_type:y.kRadians},{name:"grad",unit_type:y.kGradians},{name:"ms",unit_type:y.kMilliseconds},{name:"s",unit_type:y.kSeconds},{name:"rem",unit_type:y.kRems},{name:"turn",unit_type:y.kTurns}]),Di=((r=Li=Li||{})[r.kUnknownType=0]="kUnknownType",r[r.kUnparsedType=1]="kUnparsedType",r[r.kKeywordType=2]="kKeywordType",r[r.kUnitType=3]="kUnitType",r[r.kSumType=4]="kSumType",r[r.kProductType=5]="kProductType",r[r.kNegateType=6]="kNegateType",r[r.kInvertType=7]="kInvertType",r[r.kMinType=8]="kMinType",r[r.kMaxType=9]="kMaxType",r[r.kClampType=10]="kClampType",r[r.kTransformType=11]="kTransformType",r[r.kPositionType=12]="kPositionType",r[r.kURLImageType=13]="kURLImageType",r[r.kColorType=14]="kColorType",r[r.kUnsupportedColorType=15]="kUnsupportedColorType",function(){function t(){O(this,t)}return l(t,[{key:"toString",value:function(){return this.buildCSSText(Pi.kNo,Ti.kNo,"")}},{key:"isNumericValue",value:function(){return this.getType()>=Li.kUnitType&&this.getType()<=Li.kClampType}}],[{key:"isAngle",value:function(t){return t===y.kDegrees||t===y.kRadians||t===y.kGradians||t===y.kTurns}},{key:"isLength",value:function(t){return t>=y.kEms&&t<y.kDegrees}},{key:"isRelativeUnit",value:function(t){return t===y.kPercentage||t===y.kEms||t===y.kRems}},{key:"isTime",value:function(t){return t===y.kSeconds||t===y.kMilliseconds}}]),t}()),zi=function(){f(r,Di);var n=h(r);function r(t){var e;return O(this,r),(e=n.call(this)).colorSpace=void 0,e.colorSpace=t,e}return l(r,[{key:"getType",value:function(){return Li.kColorType}},{key:"to",value:function(t){return this}}]),r}(),Gi=((e=Ni=Ni||{})[e.Constant=0]="Constant",e[e.LinearGradient=1]="LinearGradient",e[e.RadialGradient=2]="RadialGradient",function(){f(i,Di);var r=h(i);function i(t,e){var n;return O(this,i),(n=r.call(this)).type=void 0,n.value=void 0,n.type=t,n.value=e,n}return l(i,[{key:"clone",value:function(){return new i(this.type,this.value)}},{key:"buildCSSText",value:function(t,e,n){return n}},{key:"getType",value:function(){return Li.kColorType}}]),i}()),Wi=function(){f(r,Di);var n=h(r);function r(t){var e;return O(this,r),(e=n.call(this)).value=void 0,e.value=t,e}return l(r,[{key:"clone",value:function(){return new r(this.value)}},{key:"getType",value:function(){return Li.kKeywordType}},{key:"buildCSSText",value:function(t,e,n){return n+this.value}}]),r}();(n=Ci=Ci||{}).kAdd="+",n.kSubtract="-",n.kMultiply="*",n.kDivide="/",n.kMin="min",n.kMax="max",n.kClamp="clamp",n.kInvalid="",(r=ji=ji||{})[r.kLength=0]="kLength",r[r.kAngle=1]="kAngle",r[r.kTime=2]="kTime",r[r.kFrequency=3]="kFrequency",r[r.kResolution=4]="kResolution",r[r.kFlex=5]="kFlex",r[r.kPercent=6]="kPercent",r[r.kNumBaseTypes=7]="kNumBaseTypes";function Vi(t){return"number"==typeof t?new Ji(t,y.kNumber):t}var Yi=function(){function n(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:y.kNumber,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;O(this,n),this.exponents=[],this.numNonZeroEntries=0,this.percentHint=ji.kPercent,this.hasPercentHint=!1,this.exponents=new Array(ji.kNumBaseTypes).fill(0),t!==y.kNumber&&this.setExponent(function(t){switch(yi(t,y.kNumber),t){case y.kEms:case y.kPixels:case y.kRems:return ji.kLength;case y.kMilliseconds:case y.kSeconds:return ji.kTime;case y.kDegrees:case y.kRadians:case y.kGradians:case y.kTurns:return ji.kAngle;case y.kPercentage:return ji.kPercent;default:return ji.kLength}}(t),e)}return l(n,[{key:"applyPercentHint",value:function(t){yi(t,ji.kPercent),this.setExponent(t,this.exponent(t)+this.exponent(ji.kPercent)),this.setExponent(ji.kPercent,0),this.percentHint=t,this.hasPercentHint=!0}},{key:"hasNonZeroEntries",value:function(){return 0<this.numNonZeroEntries}},{key:"isOnlyNonZeroEntry",value:function(t,e){return yi(e,0),1===this.numNonZeroEntries&&this.exponent(t)===e}},{key:"exponent",value:function(t){return this.exponents[t]}},{key:"setExponent",value:function(t,e){var n=this.exponents[t];0==n&&0!==e?this.numNonZeroEntries++:0!==n&&0==e&&this.numNonZeroEntries--,this.exponents[t]=e}},{key:"matchesBaseType",value:function(t){return yi(t,ji.kPercent),this.isOnlyNonZeroEntry(t,1)&&!this.hasPercentHint}},{key:"matchesPercentage",value:function(){return this.isOnlyNonZeroEntry(ji.kPercent,1)}},{key:"matchesBaseTypePercentage",value:function(t){return yi(t,ji.kPercent),this.isOnlyNonZeroEntry(t,1)||this.isOnlyNonZeroEntry(ji.kPercent,1)}},{key:"matchesNumber",value:function(){return!this.hasNonZeroEntries()&&!this.hasPercentHint}},{key:"matchesNumberPercentage",value:function(){return!this.hasNonZeroEntries()||this.isOnlyNonZeroEntry(ji.kPercent,1)}}],[{key:"negateExponents",value:function(t){return t.exponents.forEach(function(t){return-1*t}),t}},{key:"add",value:function(t,e,n){if(!t.hasPercentHint||!e.hasPercentHint||t.percentHint==e.percentHint){t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint);var r=t.percentHint,i=e.percentHint;if(r!==i)throw new Error;for(var a=0;a<ji.kNumBaseTypes;++a){var o=a;if(t.exponents[a]!==e.exponents[a]&&(o!==ji.kPercent&&(t.applyPercentHint(o),e.applyPercentHint(o)),t.exponents[a]!==e.exponents[a]))return t}}return t}},{key:"multiply",value:function(t,e,n){if(!t.hasPercentHint||!e.hasPercentHint||t.percentHint==e.percentHint){t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint);for(var r=0;r<ji.kNumBaseTypes;++r){var i=r;t.setExponent(i,t.exponent(i)+e.exponent(i))}}return t}}]),n}(),Hi=function(){f(p,Di);var n=h(p);function p(t){var e;return O(this,p),(e=n.call(this)).type_=void 0,e.type_=t,e}return l(p,[{key:"getType",value:function(){return Li.kUnknownType}},{key:"equals",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return qi(n).every(function(t){return e.equals(t)})}},{key:"add",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=qi(e),i=(Ui(Li.kSumType,r,this),Ki(r,Ci.kAdd));return i||sa.create(r)}},{key:"sub",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=(r=qi(e)).map(function(t){return t.negate()}),i=(Ui(Li.kSumType,r,this),Ki(r,Ci.kAdd));return i||sa.create(r)}},{key:"mul",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=qi(e),i=(Ui(Li.kProductType,r,this),$i(r));return i||la.create(r)}},{key:"div",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=(r=qi(e)).map(function(t){return t.invert()}),i=(Ui(Li.kProductType,r,this),$i(r));return i||la.create(r)}},{key:"min",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=qi(e),i=(Ui(Li.kMinType,r,this),Ki(r,Ci.kMin));return i||aa.create(r)}},{key:"max",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=qi(e),i=(Ui(Li.kMaxType,r,this),Ki(r,Ci.kMax));return i||oa.create(r)}},{key:"to",value:function(t){var e=this.sumValue();return 0!==e.length&&1===e.length&&(e=Xi(e[0]))?(t="string"==typeof t?Oi(t):t,e.convertTo(t)):null}},{key:"toSum",value:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=0,i=e;r<i.length;r++){var a=i[r];if(!p.isValidUnit(Oi(a)))return null}var o=this.sumValue();if(!o.length)return null;var s,l=[],c=ai(o);try{for(c.s();!(s=c.n()).done;){var u=Xi(s.value);if(!u)return null;l.push(u)}}catch(t){c.e(t)}finally{c.f()}if(0===e.length)return l.sort(function(t,e){return t.unit-e.unit}),pi(!!(o=sa.create(l))),o;for(var f=[],h=0,d=e;h<d.length;h++)!function(){var t=d[h],r=Oi(t),t=(pi(p.isValidUnit(r)),l.reduce(function(t,e,n){return e&&(e=e.convertTo(r))&&(t+=e.value,l[n]=null),t},0));f.push(new Ji(t,r))}();if(l.some(function(t){return!!t}))throw new Error("There were leftover terms that were not converted");return sa.create(f)}},{key:"type",value:function(){var t={length:0,angle:0,time:0,frequency:0,resolution:0,flex:0,percent:0,percentHint:"length"},e=this.type_.exponent(ji.kLength);return e&&(t.length=e),(e=this.type_.exponent(ji.kAngle))&&(t.angle=e),(e=this.type_.exponent(ji.kTime))&&(t.time=e),(e=this.type_.exponent(ji.kFrequency))&&(t.frequency=e),(e=this.type_.exponent(ji.kResolution))&&(t.resolution=e),(e=this.type_.exponent(ji.kFlex))&&(t.flex=e),(e=this.type_.exponent(ji.kPercent))&&(t.percent=e),this.type_.hasPercentHint&&(t.percentHint=function(t){switch(t){case ji.kLength:return"length";case ji.kAngle:return"angle";case ji.kTime:return"time";case ji.kFrequency:return"frequency";case ji.kResolution:return"resolution";case ji.kFlex:return"flex";case ji.kPercent:return"percent"}return""}(this.type_.percentHint)),t}},{key:"negate",value:function(){return ea.create(this)}},{key:"invert",value:function(){return ta.create(this)}}],[{key:"isValidUnit",value:function(t){return!!(t===y.kNumber||t==y.kPercentage||this.isLength(t)||this.isAngle(t)||this.isTime(t))}}]),p}();function qi(t){return t.map(Vi)}function Ui(t,e,n){pi(!!n),n.getType()===t?e.unshift.apply(e,ni(n.numericValues())):e.unshift(n)}function Xi(t){return 0===Object.keys(t.units).length?new Ji(t.value):1===Object.keys(t.units).length&&1===t.units[Object.keys(t.units)[0]]?new Ji(t.value,Number(Object.keys(t.units)[0])):null}function Ki(t,e){pi(!!t.length);var n=t[0]instanceof Ji?t[0]:null;if(!n)return null;for(var r=n.value,i=1;i<t.length;i++){var a=t[i]instanceof Ji?t[i]:null;if(!a||a.unit!==n.unit)return null;e===Ci.kAdd?r+=a.value:e===Ci.kMax?r=Math.max(r,a.value):e===Ci.kMin&&(r=Math.min(r,a.value))}return new Ji(r,n.unit)}function $i(t){pi(!!t.length);for(var e=y.kNumber,n=1,r=0;r<t.length;r++){var i=t[r]instanceof Ji?t[r]:null;if(!i)return null;if(i.unit!==y.kNumber){if(e!==y.kNumber)return null;e=i.unit}n*=i.value}return new Ji(n,e)}function Zi(t){switch(function(t){switch(t){case y.kNumber:case y.kInteger:return Ai.kUNumber;case y.kPercentage:return Ai.kUPercent;case y.kPixels:return Ai.kULength;case y.kMilliseconds:case y.kSeconds:return Ai.kUTime;case y.kDegrees:case y.kRadians:case y.kGradians:case y.kTurns:return Ai.kUAngle;default:return Ai.kUOther}}(t)){case Ai.kUNumber:return y.kNumber;case Ai.kULength:return y.kPixels;case Ai.kUPercent:return y.kPercentage;case Ai.kUTime:return y.kSeconds;case Ai.kUAngle:return y.kDegrees;default:return y.kUnknown}}var Ji=function(){f(i,Hi);var r=h(i);function i(t){var e,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:y.kNumber;return O(this,i),n="string"==typeof n?Oi(n):n,(e=r.call(this,new Yi(n))).unit=void 0,e.value=void 0,e.unit=n,e.value=t,e}return l(i,[{key:"clone",value:function(){return new i(this.value,this.unit)}},{key:"convertTo",value:function(t){var e;return this.unit===t?new i(this.value,this.unit):(e=Zi(this.unit))!==Zi(t)||e===y.kUnknown?null:(e=Si(this.unit)/Si(t),new i(this.value*e,t))}},{key:"equals",value:function(t){return this.value===t.value&&this.unit===t.unit}},{key:"getType",value:function(){return Li.kUnitType}},{key:"sumValue",value:function(){var t,e,n=[],r={};return this.unit!==y.kNumber&&(r[t=this.unit,(e=Zi(t))===y.kUnknown?t:e]=1),n.push({value:this.value*Si(this.unit),units:r}),n}},{key:"negate",value:function(){return new i(-this.value,this.unit)}},{key:"invert",value:function(){return this.unit===y.kNumber?0===this.value?null:new i(1/this.value,this.unit):ta.create(this)}},{key:"buildCSSText",value:function(t,e,n){switch(this.unit){case y.kUnknown:break;case y.kInteger:i=Number(this.value).toFixed(0);break;case y.kNumber:case y.kPercentage:case y.kEms:case y.kRems:case y.kPixels:case y.kDegrees:case y.kRadians:case y.kGradians:case y.kMilliseconds:case y.kSeconds:case y.kTurns:var r,i,a=this.value,o=_i(this.unit);i=a<-999999||999999<a?(r=_i(this.unit),!Number.isFinite(a)||Number.isNaN(a)?function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";return(Number.isFinite(t)?(pi(Number.isNaN(t)),"NaN"):0<t?"infinity":"-infinity")+e}(a,r):a+(r||"")):"".concat(a).concat(o)}return n+=i}}]),i}(),Qi=function(){f(e,Hi);var t=h(e);function e(){return O(this,e),t.apply(this,arguments)}return l(e,[{key:"isUnitValue",value:function(){return!1}}]),e}(),ta=function(){f(r,Qi);var n=h(r);function r(t,e){return O(this,r),(e=n.call(this,e)).value=void 0,e.operator="invert",e.value=t,e}return l(r,[{key:"clone",value:function(){return new r(this.value,this.type_)}},{key:"getType",value:function(){return Li.kInvertType}},{key:"equals",value:function(t){return t.getType()===Li.kInvertType&&this.value.equals(t.value)}},{key:"sumValue",value:function(){var e=this.value.sumValue();return 0===e.length||1!==e.length||0===e[0].value?null:(Object.keys(e[0].units).forEach(function(t){e[0].units[t]*=-1}),e[0].value=1/e[0].value,e)}},{key:"buildCSSText",value:function(t,e,n){return e==Ti.kNo&&(n+=t===Pi.kYes?"(":"calc("),n=this.value.buildCSSText(Pi.kYes,Ti.kNo,n+="1 / "),e===Ti.kNo&&(n+=")"),n}}],[{key:"create",value:function(t){return new r(t,Yi.negateExponents(t.type_))}}]),r}(),ea=function(){f(r,Qi);var n=h(r);function r(t,e){return O(this,r),(e=n.call(this,e)).value=void 0,e.operator="negate",e.value=t,e}return l(r,[{key:"clone",value:function(){return new r(this.value,this.type_)}},{key:"getType",value:function(){return Li.kNegateType}},{key:"equals",value:function(t){return t.getType()===Li.kNegateType&&this.value.equals(t.value)}},{key:"sumValue",value:function(){var t=this.value.sumValue();return 0===t.length?null:(t.forEach(function(t){t.value*=-1}),t)}},{key:"buildCSSText",value:function(t,e,n){return e==Ti.kNo&&(n+=t===Pi.kYes?"(":"calc("),n=this.value.buildCSSText(Pi.kYes,Ti.kNo,n+="-"),e===Ti.kNo&&(n+=")"),n}}],[{key:"create",value:function(t){return new r(t,t.type_)}}]),r}();function na(t,e){for(var n=t[0].type_,r=1;r<t.length;r++)n=e(n,t[r].type_,!1);return n}function ra(t){return pa[t]||(pa[t]=new Wi(t)),pa[t]}var ia=function(){f(r,Qi);var n=h(r);function r(t,e){return O(this,r),(e=n.call(this,e)).values=void 0,e.values=t,e}return l(r,[{key:"numericValues",value:function(){return this.values}},{key:"equals",value:function(n){return this.getType()===n.getType()&&this.values.every(function(t,e){return t.equals(n.values[e])})}}]),r}(),aa=function(){f(a,ia);var i=h(a);function a(){var t;O(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).operator="min",t}return l(a,[{key:"clone",value:function(){return new a(this.values,this.type_)}},{key:"getType",value:function(){return Li.kMinType}},{key:"sumValue",value:function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;var e,n=ai(this.numericValues());try{for(n.s();!(e=n.n()).done;){var r=e.value.sumValue();if(!r.length||JSON.stringify(r[0].units)!==JSON.stringify(t[0].units))return null;r[0].value<t[0].value&&(t=r)}}catch(t){n.e(t)}finally{n.f()}return t}},{key:"buildCSSText",value:function(t,e,n){n+="min(";var r,i=!0,a=ai(this.numericValues());try{for(a.s();!(r=a.n()).done;){var o=r.value;i||(n+=", "),i=!1,n=o.buildCSSText(Pi.kYes,Ti.kYes,n)}}catch(t){a.e(t)}finally{a.f()}return n+=")"}}],[{key:"create",value:function(t){return new a(t,na(t,Yi.add))}}]),a}(),oa=function(){f(a,ia);var i=h(a);function a(){var t;O(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).operator="max",t}return l(a,[{key:"clone",value:function(){return new a(this.values,this.type_)}},{key:"getType",value:function(){return Li.kMaxType}},{key:"sumValue",value:function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;var e,n=ai(this.numericValues());try{for(n.s();!(e=n.n()).done;){var r=e.value.sumValue();if(!r.length||JSON.stringify(r[0].units)!==JSON.stringify(t[0].units))return null;r[0].value<t[0].value&&(t=r)}}catch(t){n.e(t)}finally{n.f()}return t}},{key:"buildCSSText",value:function(t,e,n){n+="max(";var r,i=!0,a=ai(this.numericValues());try{for(a.s();!(r=a.n()).done;){var o=r.value;i||(n+=", "),i=!1,n=o.buildCSSText(Pi.kYes,Ti.kYes,n)}}catch(t){a.e(t)}finally{a.f()}return n+=")"}}],[{key:"create",value:function(t){return new a(t,na(t,Yi.add))}}]),a}(),sa=function(){f(a,ia);var i=h(a);function a(){var t;O(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).operator="sum",t}return l(a,[{key:"clone",value:function(){return new a(this.values,this.type_)}},{key:"getType",value:function(){return Li.kSumType}},{key:"sumValue",value:function(){var n=[];return this.numericValues().forEach(function(t){t=t.sumValue();if(!t.length)return null;t.forEach(function(e){var t=n.findIndex(function(t){return JSON.stringify(t.units)===JSON.stringify(e.units)});-1===t?n.push(Yr({},e)):n[t].value+=e.value})}),a.canCreateNumericTypeFromSumValue(n)?n:null}},{key:"buildCSSText",value:function(t,e,n){e==Ti.kNo&&(n+=t===Pi.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(Pi.kYes,Ti.kNo,n);for(var i=1;i<r.length;i++){var a=r[i];n=(a.getType()===Li.kNegateType?(n+=" - ",a.value):(n+=" + ",a)).buildCSSText(Pi.kYes,Ti.kNo,n)}return e===Ti.kNo&&(n+=")"),n}}],[{key:"create",value:function(t){return new a(t,na(t,Yi.add))}},{key:"numericTypeFromUnitMap",value:function(n){var r=new Yi;return Object.keys(n).forEach(function(t){var e=n[t];r=Yi.multiply(r,new Yi(Number(t),e),!1),pi(!0)}),r}},{key:"canCreateNumericTypeFromSumValue",value:function(t){var e=this,n=(pi(!!t.length),this.numericTypeFromUnitMap(t[0].units));return t.every(function(t){return Yi.add(n,e.numericTypeFromUnitMap(t.units),!1),!0})}}]),a}(),la=function(){f(a,ia);var i=h(a);function a(){var t;O(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).operator="product",t}return l(a,[{key:"clone",value:function(){return new a(this.values,this.type_)}},{key:"getType",value:function(){return Li.kProductType}},{key:"sumValue",value:function(){var e=[{value:1,units:{}}];return this.numericValues().forEach(function(t){var n=t.sumValue();if(!n.length)return null;var r=[];e.forEach(function(e){n.forEach(function(t){r.push({value:e.value*t.value,units:a.multiplyUnitMaps(e.units,t.units)})})}),e=r}),e}},{key:"buildCSSText",value:function(t,e,n){e==Ti.kNo&&(n+=t===Pi.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(Pi.kYes,Ti.kNo,n);for(var i=1;i<r.length;i++){var a=r[i];n=(a.getType()===Li.kInvertType?(n+=" / ",a.value):(n+=" * ",a)).buildCSSText(Pi.kYes,Ti.kNo,n)}return e===Ti.kNo&&(n+=")"),n}}],[{key:"create",value:function(t){return new a(t,na(t,Yi.multiply))}},{key:"multiplyUnitMaps",value:function(n,r){return Object.keys(r).forEach(function(t){yi(r[t].value,0);var e=t in n?n[t].value:0;e+r[t].value===0?delete n[t]:n[t]=e+r[t].value}),n}}]),a}(),ca=new Ji(0,"px"),ua=(new Ji(1,"px"),new Ji(0,"deg")),fa=function(){f(s,zi);var o=h(s);function s(t,e,n){var r,i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1,a=4<arguments.length&&void 0!==arguments[4]&&arguments[4];return O(this,s),(r=o.call(this,"rgb")).r=void 0,r.g=void 0,r.b=void 0,r.alpha=void 0,r.isNone=void 0,r.r=t,r.g=e,r.b=n,r.alpha=i,r.isNone=a,r}return l(s,[{key:"clone",value:function(){return new s(this.r,this.g,this.b,this.alpha)}},{key:"buildCSSText",value:function(t,e,n){return n+"rgba(".concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")}}]),s}(),ha=function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,t=t.syntax;w.styleValueRegistry.registerMetadata({n:e,inh:n,int:r,d:i,syntax:t})},da=new Wi("unset"),e=new Wi("initial"),n=new Wi("inherit"),pa={"":da,unset:da,initial:e,inherit:n},ya=new fa(0,0,0,0,!0),va=new fa(0,0,0,0),ga=En(function(t,e,n,r){return new fa(t,e,n,r)},function(t,e,n,r){return"rgba(".concat(t,",").concat(e,",").concat(n,",").concat(r,")")}),ma=En(function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:y.kNumber;return new Ji(t,e)},function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:y.kNumber;return"".concat(t).concat(e)}),ba=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,xa=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,wa=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,ka=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var Ea={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},Ma=En(function(t){t="angular"===t.type?Number(t.value):Ea[t.value]||0;return ma(t,"deg")}),Oa=En(function(t){var e,n=50,r=50,i="%",a="%";return"position"===(null==t?void 0:t.type)&&(e=(t=t.value).x,t=t.y,"position-keyword"===(null==e?void 0:e.type)&&("left"===e.value?n=0:"center"===e.value?n=50:"right"===e.value?n=100:"top"===e.value?r=0:"bottom"===e.value&&(r=100)),"position-keyword"===(null==t?void 0:t.type)&&("left"===t.value?n=0:"center"===t.value?r=50:"right"===t.value?n=100:"top"===t.value?r=0:"bottom"===t.value&&(r=100)),"px"!==(null==e?void 0:e.type)&&"%"!==(null==e?void 0:e.type)&&"em"!==(null==e?void 0:e.type)||(i=null==e?void 0:e.type,n=Number(e.value)),"px"!==(null==t?void 0:t.type)&&"%"!==(null==t?void 0:t.type)&&"em"!==(null==t?void 0:t.type)||(a=null==t?void 0:t.type,r=Number(t.value))),{cx:ma(n,i),cy:ma(r,a)}}),Sa=En(function(t){if(-1<t.indexOf("linear")||-1<t.indexOf("radial"))return Gs(t).map(function(t){for(var e=t.type,n=t.orientation,t=t.colorStops,r=t,i=r.length,a=(r[i-1].length=null!=(h=r[i-1].length)?h:{type:"%",value:"100"},1<i&&(r[0].length=null!=(h=r[0].length)?h:{type:"%",value:"0"}),0),o=Number(r[0].length.value),s=1;s<i;s++){var l,c=null==(l=r[s].length)?void 0:l.value;if(!_(c)&&!_(o)){for(var u=1;u<s-a;u++)r[a+u].length={type:"%",value:"".concat(o+(Number(c)-o)*u/(s-a))};a=s,o=Number(c)}}var f,h=t.map(function(t){return{offset:ma(t.length.value,"%"),color:(e=(t=t).type,t=t.value,"hex"===e?"#".concat(t):"literal"===e?t:("rgb"===e?"rgb(":"rgba(").concat(t.join(","),")"))};var e});return"linear-gradient"===e?new Gi(Ni.LinearGradient,{angle:n?Ma(n):ua,steps:h}):"radial-gradient"===e&&"shape"===(n=n||[{type:"shape",value:"circle"}])[0].type&&"circle"===n[0].value?(e=(t=Oa(n[0].at)).cx,t=t.cy,n[0].style&&(f=(n=n[0].style).type,n=n.value,f="extent-keyword"===f?ra(n):ma(n,f)),new Gi(Ni.RadialGradient,{cx:e,cy:t,size:f,steps:h})):void 0});var e=t[0];if("("===t[1]||"("===t[2])if("l"===e){var n=ba.exec(t);if(n)return r=(null==(r=n[2].match(ka))?void 0:r.map(function(t){return t.split(":")}))||[],[new Gi(Ni.LinearGradient,{angle:ma(parseFloat(n[1]),"deg"),steps:r.map(function(t){var t=ei(t,2),e=t[0],t=t[1];return{offset:ma(100*Number(e),"%"),color:t}})})]}else if("r"===e){n=function(t){var t=xa.exec(t);if(t)return t=(null==(t=t[4].match(ka))?void 0:t.map(function(t){return t.split(":")}))||[],{cx:ma(50,"%"),cy:ma(50,"%"),steps:t.map(function(t){var t=ei(t,2),e=t[0],t=t[1];return{offset:ma(100*Number(e),"%"),color:t}})};return null}(t);if(n&&!hn(n))return[new Gi(Ni.RadialGradient,n)]}else if("p"===e){var r=t;if(r=wa.exec(r)){var i=r[1],r=r[2];switch(i){case"a":i="repeat";break;case"x":i="repeat-x";break;case"y":i="repeat-y";break;default:i="no-repeat"}return{image:r,repetition:i}}return null}});function _a(t){return on(t)&&t.image}var Aa=En(function(t){var e;return _a(t)?Yr({repetition:"repeat"},t):"transparent"===(t=_(t)?"":t)?va:Sa(t="currentColor"===t?"black":t)||(e=[0,0,0,0],null!==(t=Un(t))&&(e[0]=t.r||0,e[1]=t.g||0,e[2]=t.b||0,e[3]=t.opacity),ga.apply(void 0,e))});function Pa(t,e){if(t instanceof fa&&e instanceof fa)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(dn(e[n],0,255));return e[3]=dn(e[3],0,1),"rgba(".concat(e.join(","),")")}]}function Ta(t,e){if(_(e))return ma(0,"px");if(e="".concat(e).trim().toLowerCase(),isFinite(Number(e))){if(0<="px".search(t))return ma(Number(e),"px");if(0<="deg".search(t))return ma(Number(e),"deg")}var n=[],r=(e=e.replace(t,function(t){return n.push(t),"U"+t}),"U("+t.source+")");return n.map(function(t){return ma(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)})[0]}var La=En(function(t){return Ta(new RegExp("px","g"),t)}),Na=(En(function(t){return Ta(new RegExp("%","g"),t)}),En(function(t){return pn(t)||isFinite(Number(t))?ma(Number(t),"px"):Ta(new RegExp("px|%|em|rem","g"),t)})),Ca=En(function(t){return Ta(new RegExp("deg|rad|grad|turn","g"),t)});function ja(t){var e=0;return t.unit===y.kDegrees?e=t.value:t.unit===y.kRadians?e=Ps(Number(t.value)):t.unit===y.kTurns&&(e=360*Number(t.value)),e}function Ra(t){return hn(t)?t.split(" ").map(function(t){return Na(t)}):t.map(function(t){return Na(t.toString())})}function Ia(t,e,n){var r;return t.unit===y.kPixels?Number(t.value):t.unit===y.kPercentage&&n?(n=n.nodeName===E.GROUP?n.getLocalBounds():n.getGeometryBounds(),r=0,li.isEmpty(n)||(r=2*n.halfExtents[e]),Number(t.value)/100*r):0}var Fa=function(t){return Ta(/deg|rad|grad|turn|px|%/g,t)},Ba=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function Da(){var t=(t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"").toLowerCase().trim();if("none"!==t)for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];if(i=e.index+e[0].length,-1<Ba.indexOf(e[1])&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return Fa(t)||Aa(t)})}),n.lastIndex===t.length)return r}return[]}function za(t){return t.toString()}var Ga=En(function(t){return"number"==typeof t?ma(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?ma(Number(t)):ma(0)});function Wa(t,e){return[t,e,za]}function Va(n,r){return function(t,e){return[t,e,function(t){return za(dn(t,n,r))}]}}function Ya(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}En(function(t){return(hn(t)?t.split(" "):t).map(Ga)});var Ha=function(e){if(""===e||Array.isArray(e)&&0===e.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var n;try{n=De(e)}catch(t){n=De(""),console.error("[g]: Invalid SVG Path definition: ".concat(e))}var e=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}(n),t=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var a=t[i],o=a[0];"M"===o?(r.length&&(n.push(r),r=[]),r.push([a[1],a[2]])):"Z"===o?r.length&&(e.push(r),r=[]):r.push([a[1],a[2]])}0<r.length&&n.push(r);return{polygons:e,polylines:n}}(n),r=t.polygons,t=t.polylines,i=function(t){for(var e=[],n=null,r=null,i=null,a=0,o=t.length,s=0;s<o;s++){var l=t[s],c=(r=t[s+1],l[0]),u={command:c,prePoint:n,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(c){case"M":i=[l[1],l[2]],a=s;break;case"A":var f=function(t,e){var n=e[1],r=e[2],i=yn(As(e[3]),2*Math.PI),a=e[4],o=e[5],s=t[0],l=t[1],c=e[6],e=e[7],u=Math.cos(i)*(s-c)/2+Math.sin(i)*(l-e)/2,f=-1*Math.sin(i)*(s-c)/2+Math.cos(i)*(l-e)/2,h=u*u/(n*n)+f*f/(r*r);1<h&&(n*=Math.sqrt(h),r*=Math.sqrt(h));h=n*n*(f*f)+r*r*(u*u),h=h?Math.sqrt((n*n*(r*r)-h)/h):1;a===o&&(h*=-1);isNaN(h)&&(h=0);var d=r?h*n*f/r:0,h=n?h*-r*u/n:0,s=(s+c)/2+Math.cos(i)*d-Math.sin(i)*h,l=(l+e)/2+Math.sin(i)*d+Math.cos(i)*h,p=[(u-d)/n,(f-h)/r],u=[(-1*u-d)/n,(-1*f-h)/r],d=gl([1,0],p),f=gl(p,u);vl(p,u)<=-1&&(f=Math.PI);1<=vl(p,u)&&(f=0);0===o&&0<f&&(f-=2*Math.PI);1===o&&f<0&&(f+=2*Math.PI);return{cx:s,cy:l,rx:cl(t,[c,e])?0:n,ry:cl(t,[c,e])?0:r,startAngle:d,endAngle:d+f,xRotation:i,arcFlag:a,sweepFlag:o}}(n,l);u.arcParams=f}"Z"===c?(n=i,r=t[a+1]):(m=l.length,n=[l[m-2],l[m-1]]),r&&"Z"===r[0]&&(r=t[a],e[a])&&(e[a].prePoint=n),u.currentPoint=n,e[a]&&cl(n,e[a].currentPoint)&&(e[a].prePoint=u.prePoint);var h,d,p,y,v,g,m=r?[r[r.length-2],r[r.length-1]]:null,b=(u.nextPoint=m,u.prePoint);["L","H","V"].includes(c)?(u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]]):"Q"===c?(h=[l[1],l[2]],u.startTangent=[b[0]-h[0],b[1]-h[1]],u.endTangent=[n[0]-h[0],n[1]-h[1]]):"T"===c?(d=fl((h=e[s-1]).currentPoint,b),"Q"===h.command?(u.command="Q",u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-d[0],n[1]-d[1]]):(u.command="TL",u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]])):"C"===c?(d=[l[1],l[2]],p=[l[3],l[4]],u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-p[0],n[1]-p[1]],0===u.startTangent[0]&&0===u.startTangent[1]&&(u.startTangent=[d[0]-p[0],d[1]-p[1]]),0===u.endTangent[0]&&0===u.endTangent[1]&&(u.endTangent=[p[0]-d[0],p[1]-d[1]])):"S"===c?(y=fl((p=e[s-1]).currentPoint,b),v=[l[1],l[2]],"C"===p.command?(u.command="C",u.startTangent=[b[0]-y[0],b[1]-y[1]]):(u.command="SQ",u.startTangent=[b[0]-v[0],b[1]-v[1]]),u.endTangent=[n[0]-v[0],n[1]-v[1]]):"A"===c&&(y=pl(u,0),b=y.x,v=y.y,c=pl(u,1,!1),g=c.x,c=c.y,u.startTangent=[b,v],u.endTangent=[g,c]),e.push(u)}return e}(n),a=function(t,e){for(var n=[],r=[],i=[],a=0;a<t.length;a++){var o=t[a],s=o.currentPoint,l=o.params,c=o.prePoint,u=void 0;switch(o.command){case"Q":u=br.box(c[0],c[1],l[1],l[2],l[3],l[4]);break;case"C":u=Or.box(c[0],c[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var f=o.arcParams;u=Nr.box(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.endAngle);break;default:n.push(s[0]),r.push(s[1])}u&&(o.box=u,n.push(u.x,u.x+u.width),r.push(u.y,u.y+u.height)),e&&("L"===o.command||"M"===o.command)&&o.prePoint&&o.nextPoint&&i.push(o)}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 h=fn(n),d=fn(r),p=un(n),y=un(r);if(0!==i.length)for(var v=0;v<i.length;v++){var g=i[v],m=g.currentPoint,b=void 0;m[0]===h?(b=ul(g,e),h-=b.xExtra):m[0]===p&&(b=ul(g,e),p+=b.xExtra),m[1]===d?(b=ul(g,e),d-=b.yExtra):m[1]===y&&(b=ul(g,e),y+=b.yExtra)}return{x:h,y:d,width:p-h,height:y-d}}(i,0),o=a.x,s=a.y,l=a.width,a=a.height;return{absolutePath:n,hasArc:e,segments:i,polygons:r,polylines:t,totalLength:0,rect:{x:Number.isFinite(o)?o:0,y:Number.isFinite(s)?s:0,width:Number.isFinite(l)?l:0,height:Number.isFinite(a)?a:0}}},qa=En(Ha);function Ua(t,e){t=(hn(t)?qa:Ha)(t);return e&&(e.parsedStyle.defX=t.rect.x,e.parsedStyle.defY=t.rect.y),t}function Xa(t,e,n){var r,i,a,o,s,l,c,u,f,h=t.curve,d=e.curve,t=(h&&0!==h.length||(h=qe(t.absolutePath,!1),t.curve=h),d&&0!==d.length||(d=qe(e.absolutePath,!1),e.curve=d),[h,d]),h=Je((t=h.length!==d.length?function t(e,n,r){var i,e=Qe(e),n=Qe(n),a=e.length,o=n.length,s=e.filter(function(t){return t.l}).length,l=n.filter(function(t){return t.l}).length,s=e.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/s||0,l=n.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/l||0,c=r||Math.max(a,o),u=[s,l],f=[c-a,c-o],r=[e,n].map(function(t,n){return t.l===c?t.map(function(t){return t.s}):t.map(function(t,e){return i=e&&f[n]&&t.l>=u[n],f[n]-=i?1:0,i?t.ss:[t.s]}).flat()});return r[0].length===r[1].length?r:t(r[0],r[1],c)}(h,d):t)[0])!==Je(t[1])?(r=t[0],e=r.slice(1).map(function(t,e,n){return(e?n[e-1].slice(-2):r[0].slice(1)).concat(t.slice(1))}).map(function(n){return n.map(function(t,e){return n[n.length-e-2*(1-e%2)]})}).reverse(),[["M"].concat(e[0].slice(0,2))].concat(e.map(function(t){return["C"].concat(t.slice(2))}))):ke(t[0]);return[h,(i=t[1],a=h,c=i.length-1,u=[],f=0,s=(o=i).length,l=s-1,(d=o.map(function(t,r){return o.map(function(t,e){var n=r+e;return 0===e||o[n]&&"M"===o[n][0]?(e=o[n],["M"].concat(e.slice(-2))):(s<=n&&(n-=l),o[n])})})).forEach(function(t,n){i.slice(1).forEach(function(t,e){f+=Ve(i[(n+e)%c].slice(-2),a[e%c].slice(-2))}),u[n]=f,f=0}),d[u.indexOf(Math.min.apply(null,u))]),function(t){return t}]}function Ka(t,e){var n,r,i=hn(t)?t.split(" ").map(function(t){var t=ei(t.split(","),2),e=t[0],t=t[1];return[Number(e),Number(t)]}):t,a=[],o=0,s=Ir.length(i),t=(i.forEach(function(t,e){i[e+1]&&((n=[0,0])[0]=o/s,r=hr.length(t[0],t[1],i[e+1][0],i[e+1][1]),o+=r,n[1]=o/s,a.push(n))}),Math.min.apply(Math,ni(i.map(function(t){return t[0]})))),l=Math.min.apply(Math,ni(i.map(function(t){return t[1]})));return e&&(e.parsedStyle.defX=t,e.parsedStyle.defY=l),{points:i,totalLength:s,segments:a}}var $a=null;function Za(t){return function(e){var n=0;return t.map(function(t){return t===$a?e[n++]:t})}}function Ja(t){return t}var Qa={matrix:["NNNNNN",[$a,$a,0,0,$a,$a,0,0,0,0,1,0,$a,$a,0,1],Ja],matrix3d:["NNNNNNNNNNNNNNNN",Ja],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",Za([$a,$a,new Ji(1)]),Ja],scalex:["N",Za([$a,new Ji(1),new Ji(1)]),Za([$a,new Ji(1)])],scaley:["N",Za([new Ji(1),$a,new Ji(1)]),Za([new Ji(1),$a])],scalez:["N",Za([new Ji(1),new Ji(1),$a])],scale3d:["NNN",Ja],skew:["Aa",null,Ja],skewx:["A",null,Za([$a,ua])],skewy:["A",null,Za([ua,$a])],translate:["Tt",Za([$a,$a,ca]),Ja],translatex:["T",Za([$a,ca,ca]),Za([$a,ca])],translatey:["T",Za([ca,$a,ca]),Za([ca,$a])],translatez:["L",Za([ca,ca,$a])],translate3d:["TTL",Ja]};function to(t){if("none"!==(t=(t||"none").toLowerCase().trim()))for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];var i=e.index+e[0].length,a=e[1],o=Qa[a];if(!o)return[];var s=e[2].split(","),l=o[0];if(l.length<s.length)return[];for(var c=[],u=0;u<l.length;u++){var f=s[u],h=l[u],d=void 0;if(void 0===(d=f?{A:function(t){return"0"===t.trim()?ua:Ca(t)},N:Ga,T:Na,L:La}[h.toUpperCase()](f):{a:ua,n:c[0],t:ca}[h]))return[];c.push(d)}if(r.push({t:a,d:c}),n.lastIndex===t.length)return r}return[]}function eo(t){switch(t.t){case"rotatex":return i=As(ja(t.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return i=As(ja(t.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotatez":return i=As(ja(t.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":var e=t.d[0].value,n=t.d[1].value,r=t.d[2].value,i=As(ja(t.d[3])),a=e*e+n*n+r*r,a=(0==a?(e=1,r=n=0):1!=a&&(e/=a=Math.sqrt(a),n/=a,r/=a),Math.sin(i/2)),o=a*Math.cos(i/2),a=a*a;return[1-2*(n*n+r*r)*a,2*(e*n*a+r*o),2*(e*r*a-n*o),0,2*(e*n*a-r*o),1-2*(e*e+r*r)*a,2*(n*r*a+e*o),0,2*(e*r*a+n*o),2*(n*r*a-e*o),1-2*(e*e+n*n)*a,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":o=As(ja(t.d[0])),a=As(ja(t.d[1]));return[1,Math.tan(a),0,0,Math.tan(o),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return i=As(ja(t.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return i=As(ja(t.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Ia(t.d[0],0,null)||0,n=Ia(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Ia(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=Ia(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=Ia(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Ia(t.d[0],0,null)||0,n=Ia(t.d[1],0,null)||0,r=Ia(t.d[2],0,null)||0,1];case"perspective":a=Ia(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,a?-1/a: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 no(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 ro(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return function(t,e,n,r,i,a){if(!function(t,e){var n=e[15];if(0===n)return;for(var r=1/n,i=0;i<16;i++)t[i]=e[i]*r;return 1}(Ns,t))return;if(dt(Cs,Ns),Cs[3]=0,Cs[7]=0,Cs[11]=0,Cs[15]=1,Math.abs(mt(Cs))<1e-8)return;var t=Ns[3],o=Ns[7],s=Ns[11],l=Ns[12],c=Ns[13],u=Ns[14],f=Ns[15];if(0!==t||0!==o||0!==s){if(js[0]=t,js[1]=o,js[2]=s,js[3]=f,!gt(Cs,Cs))return;vt(Cs,Cs),ne(i,js,Cs)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=l,e[1]=c,e[2]=u,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]}(d,Ns),n[0]=Dt(d[0]),Ht(d[0],d[0]),r[0]=qt(d[0],d[1]),Is(d[1],d[1],d[0],1,-r[0]),n[1]=Dt(d[1]),Ht(d[1],d[1]),r[0]/=n[1],r[1]=qt(d[0],d[2]),Is(d[2],d[2],d[0],1,-r[1]),r[2]=qt(d[1],d[2]),Is(d[2],d[2],d[1],1,-r[2]),n[2]=Dt(d[2]),Ht(d[2],d[2]),r[1]/=n[2],r[2]/=n[2],Ut(Rs,d[1],d[2]),qt(d[0],Rs)<0)for(var h=0;h<3;h++)n[h]*=-1,d[h][0]*=-1,d[h][1]*=-1,d[h][2]*=-1;a[0]=.5*Math.sqrt(Math.max(1+d[0][0]-d[1][1]-d[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-d[0][0]+d[1][1]-d[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-d[0][0]-d[1][1]+d[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+d[0][0]+d[1][1]+d[2][2],0)),d[2][1]>d[1][2]&&(a[0]=-a[0]);d[0][2]>d[2][0]&&(a[1]=-a[1]);d[1][0]>d[0][1]&&(a[2]=-a[2])}(0===(t=t).length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(eo).reduce(no),e,n,r,i,a),[[e,n,r,a,i]]}var io=function(t,e,n,r,i){for(var a=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],o=0;o<4;o++)a[o][3]=i[o];for(var s=0;s<3;s++)for(var l=0;l<3;l++)a[3][s]+=t[l]*a[l][s];var c=r[0],u=r[1],f=r[2],r=r[3],h=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],f=(h[0][0]=1-2*(u*u+f*f),h[0][1]=2*(c*u-f*r),h[0][2]=2*(c*f+u*r),h[1][0]=2*(c*u+f*r),h[1][1]=1-2*(c*c+f*f),h[1][2]=2*(u*f-c*r),h[2][0]=2*(c*f-u*r),h[2][1]=2*(u*f+c*r),h[2][2]=1-2*(c*c+u*u),a=ao(a,h),[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]);n[2]&&(f[2][1]=n[2],a=ao(a,f)),n[1]&&(f[2][1]=0,f[2][0]=n[0],a=ao(a,f)),n[0]&&(f[2][0]=0,f[1][0]=n[0],a=ao(a,f));for(var d=0;d<3;d++)for(var p=0;p<3;p++)a[d][p]*=e[d];return 0==(r=a)[0][2]&&0==r[0][3]&&0==r[1][2]&&0==r[1][3]&&0==r[2][0]&&0==r[2][1]&&1==r[2][2]&&0==r[2][3]&&0==r[3][2]&&1==r[3][3]?[a[0][0],a[0][1],a[1][0],a[1][1],a[3][0],a[3][1]]:a[0].concat(a[1],a[2],a[3])};function ao(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 a=0;a<4;a++)n[r][i]+=e[r][a]*t[a][i];return n}function oo(t){return t.toFixed(6).replace(".000000","")}function so(e,n){var r,i;return e.decompositionPair!==n&&(e.decompositionPair=n,r=ro(e)),n.decompositionPair!==e&&(n.decompositionPair=e,i=ro(n)),null===r[0]||null===i[0]?[[!1],[!0],function(t){return(t?n:e)[0].d}]:(r[0].push(0),i[0].push(1),[r,i,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),i=(r=dn(r,-1,1),[]);if(1===r)i=t;else for(var a=Math.acos(r),o=+Math.sin(n*a)/Math.sqrt(1-r*r),s=0;s<4;s++)i.push(t[s]*(Math.cos(n*a)-r*o)+e[s]*o);return i}(r[0][3],i[0][3],t[5]);return io(t[0],t[1],t[2],e,t[4]).map(oo).join(",")}])}function lo(t){return t.replace(/[xy]/,"")}function co(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var uo=function(t,e){return"perspective"===t&&"perspective"===e||("matrix"===t||"matrix3d"===t)&&("matrix"===e||"matrix3d"===e)};function fo(r,i,t){var e=!1;if(!r.length||!i.length){r.length||(e=!0,r=i,i=[]);for(var n=0;n<r.length;n++)!function(t){var t=r[t],e=t.t,t=t.d,n="scale"===e.substring(0,5)?1:0;i.push({t:e,d:t.map(function(t){return"number"==typeof t?ma(n):ma(n,t.unit)})})}(n)}var a=[],o=[],s=[];if(r.length!==i.length)var l=so(r,i),a=[l[0]],o=[l[1]],s=[["matrix",[l[2]]]];else for(var c=0;c<r.length;c++){var u=r[c].t,f=i[c].t,h=r[c].d,d=i[c].d,p=Qa[u],y=Qa[f],v=void 0;if(uo(u,f)){var g=so([r[c]],[i[c]]);a.push(g[0]),o.push(g[1]),s.push(["matrix",[g[2]]])}else{if(u===f)v=u;else if(p[2]&&y[2]&&lo(u)===lo(f))v=lo(u),h=p[2](h),d=y[2](d);else{if(!p[1]||!y[1]||co(u)!==co(f)){g=so(r,i);a=[g[0]],o=[g[1]],s=[["matrix",[g[2]]]];break}v=co(u),h=p[1](h),d=y[1](d)}for(var m=[],b=[],x=[],w=0;w<h.length;w++){var k=function(t,e,n,r,i){var i=4<arguments.length&&void 0!==i?i:0,a="",o=t.value||0,s=e.value||0,l=Zi(t.unit),c=t.convertTo(l),l=e.convertTo(l);return c&&l?(o=c.value,s=l.value,a=_i(t.unit)):(Ji.isLength(t.unit)||Ji.isLength(e.unit))&&(o=Ia(t,i,n),s=Ia(e,i,n),a="px"),[o,s,function(t){return(t=r?Math.max(t,0):t)+a}]}(h[w],d[w],t,!1,w);m[w]=k[0],b[w]=k[1],x.push(k[2])}a.push(m),o.push(b),s.push([v,x])}}return e&&(l=a,a=o,o=l),[a,o,function(t){return t.map(function(t,n){t=t.map(function(t,e){return s[n][1][e](t)}).join(",");return"matrix"===s[n][0]&&16===t.split(",").length&&(s[n][0]="matrix3d"),"matrix3d"===s[n][0]&&6===t.split(",").length&&(s[n][0]="matrix"),s[n][0]+"("+t+")"}).join(" ")}]}var ho=En(function(t){var e;return hn(t)?"text-anchor"===t?[ma(0,"px"),ma(0,"px")]:(1===(e=t.split(" ")).length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length?null:[Na(po(e[0])),Na(po(e[1]))]):[ma(t[0]||0,"px"),ma(t[1]||0,"px")]});function po(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var r=function(){function t(){O(this,t),this.parser=Ca,this.mixer=Wa}return l(t,[{key:"calculator",value:function(t,e,n,r){return ja(n)}}]),t}(),e=function(){function t(){O(this,t)}return l(t,[{key:"calculator",value:function(t,e,n,r){return n instanceof Wi&&(n=null),w.sceneGraphService.updateDisplayObjectDependency(t,e,n,r),"clipPath"===t&&r.forEach(function(t){0===t.childNodes.length&&w.sceneGraphService.dirtifyToRoot(t)}),n}}]),t}(),n=function(){function t(){O(this,t),this.parser=Aa,this.mixer=Pa}return l(t,[{key:"calculator",value:function(t,e,n,r){return n instanceof Wi?"none"===n.value?ya:va:n}}]),t}(),yo=function(){function t(){O(this,t),this.parser=Da}return l(t,[{key:"calculator",value:function(t,e,n){return n instanceof Wi?[]:n}}]),t}();function vo(t){t=t.parsedStyle.fontSize;return _(t)?null:t}var go,mo,bo=function(){function t(){O(this,t),this.parser=Na,this.mixer=Wa}return l(t,[{key:"calculator",value:function(t,e,n,r,i){if(!Ji.isRelativeUnit(n.unit))return n.value;if(n.unit===y.kPercentage)return 0;if(n.unit===y.kEms){if(r.parentNode){var a=vo(r.parentNode);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}if(n.unit===y.kRems){if(null!=r&&null!=(a=r.ownerDocument)&&a.documentElement){a=vo(r.ownerDocument.documentElement);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}}}]),t}(),xo=function(){function t(){O(this,t),this.mixer=Ya}return l(t,[{key:"parser",value:function(t){t=Ra(pn(t)?[t]:t),t=1===t.length?[t[0],t[0]]:[t[0],t[1]];return t}},{key:"calculator",value:function(t,e,n){return n.map(function(t){return t.value})}}]),t}(),wo=function(){function t(){O(this,t),this.mixer=Ya}return l(t,[{key:"parser",value:function(t){t=Ra(pn(t)?[t]:t),t=1===t.length?[t[0],t[0],t[0],t[0]]:2===t.length?[t[0],t[1],t[0],t[1]]:3===t.length?[t[0],t[1],t[2],t[1]]:[t[0],t[1],t[2],t[3]];return t}},{key:"calculator",value:function(t,e,n){return n.map(function(t){return t.value})}}]),t}(),ko=function(){f(e,bo);var t=h(e);function e(){return O(this,e),t.apply(this,arguments)}return l(e,[{key:"postProcessor",value:function(t){var e,n,r;switch(t.nodeName){case E.CIRCLE:case E.ELLIPSE:var i=t.parsedStyle,a=i.cx,i=i.cy;_(a)||(l=a),_(i)||(c=i);break;case E.LINE:var a=t.parsedStyle,i=a.x1,o=a.x2,s=a.y1,a=a.y2,l=Math.min(i,o),c=Math.min(s,a),u=0;break;case E.RECT:case E.IMAGE:case E.GROUP:case E.HTML:case E.TEXT:case E.MESH:_(t.parsedStyle.x)||(l=t.parsedStyle.x),_(t.parsedStyle.y)||(c=t.parsedStyle.y)}t.nodeName!==E.PATH&&t.nodeName!==E.POLYLINE&&t.nodeName!==E.POLYGON&&(t.parsedStyle.defX=l||0,t.parsedStyle.defY=c||0),_(l)&&_(c)&&_(u)||(e=(r=ei(t.getLocalPosition(),3))[0],n=r[1],r=r[2],t.setLocalPosition(_(l)?e:l,_(c)?n:c,_(u)?r:u))}}]),e}(),Eo=function(){function t(){O(this,t)}return l(t,[{key:"calculator",value:function(t,e,n,r){n=null==(n=n=n instanceof Wi?null:n)?void 0:n.cloneNode(!0);return n&&(n.style.isMarker=!0),n}}]),t}(),Mo=function(){function t(){O(this,t),this.mixer=Wa,this.parser=Ga}return l(t,[{key:"calculator",value:function(t,e,n){return n.value}}]),t}(),Oo=function(){function t(){O(this,t),this.parser=Ga,this.mixer=Va(0,1)}return l(t,[{key:"calculator",value:function(t,e,n){return n.value}},{key:"postProcessor",value:function(t){var e,n=t.parsedStyle,r=n.offsetPath,n=n.offsetDistance;!r||(e=r.nodeName)!==E.LINE&&e!==E.PATH&&e!==E.POLYLINE||(e=r.getPoint(n))&&(t.parsedStyle.defX=e.x,t.parsedStyle.defY=e.y,t.setLocalPosition(e.x,e.y))}}]),t}(),So=function(){function t(){O(this,t),this.parser=Ga,this.mixer=Va(0,1)}return l(t,[{key:"calculator",value:function(t,e,n){return n.value}}]),t}(),_o=function(){function t(){O(this,t),this.parser=Ua,this.mixer=Xa}return l(t,[{key:"calculator",value:function(t,e,n){return n instanceof Wi&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new hi(0,0,0,0)}:n}},{key:"postProcessor",value:function(t){var e,n;t.nodeName===E.PATH&&(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(void 0===e?0:e,void 0===n?0:n))}}]),t}(),Ao=function(){function t(){O(this,t),this.parser=Ka}return l(t,[{key:"postProcessor",value:function(t){var e,n;t.nodeName!==E.POLYGON&&t.nodeName!==E.POLYLINE||(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(e,n))}}]),t}(),Po=function(){f(a,bo);var i=h(a);function a(){var t;O(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).mixer=Va(0,1/0),t}return l(a)}(),To=function(){function t(){O(this,t)}return l(t,[{key:"calculator",value:function(t,e,n,r){return n instanceof Wi?"unset"===n.value?"":n.value:"".concat(n)}},{key:"postProcessor",value:function(t){t.nodeValue="".concat(t.parsedStyle.text)||""}}]),t}(),Lo=function(){function t(){O(this,t)}return l(t,[{key:"calculator",value:function(t,e,n,r){var i,a=r.getAttribute("text");return a&&(i=a,"capitalize"===n.value?i=a.charAt(0).toUpperCase()+a.slice(1):"lowercase"===n.value?i=a.toLowerCase():"uppercase"===n.value&&(i=a.toUpperCase()),r.parsedStyle.text=i),n.value}}]),t}(),No=function(){function t(){O(this,t),this.parser=to,this.mixer=fo}return l(t,[{key:"calculator",value:function(t,e,n,r){return n instanceof Wi?[]:n}},{key:"postProcessor",value:function(t){Bs(t.parsedStyle.transform,t)}}]),t}(),a=l(function t(){O(this,t),this.parser=ho}),Co=function(){function t(){O(this,t),this.parser=Ga}return l(t,[{key:"calculator",value:function(t,e,n,r){return n.value}},{key:"postProcessor",value:function(t){var e;t.parentNode&&(e=(t=t.parentNode).renderable,t=t.sortable,e&&(e.dirty=!0),t)&&(t.dirty=!0)}}]),t}(),jo=function(){function t(){O(this,t),this.registry={},this.define(E.CIRCLE,ts),this.define(E.ELLIPSE,ss),this.define(E.RECT,Es),this.define(E.IMAGE,ds),this.define(E.LINE,ys),this.define(E.GROUP,cs),this.define(E.PATH,gs),this.define(E.POLYGON,bs),this.define(E.POLYLINE,ws),this.define(E.TEXT,Os),this.define(E.HTML,fs)}return l(t,[{key:"define",value:function(t,e){this.registry[t]=e}},{key:"get",value:function(t){return this.registry[t]}}]),t}(),Ro=function(){function e(t){O(this,e),this.type=void 0,this.eventPhase=e.prototype.NONE,this.target=void 0,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.currentTarget=void 0,this.defaultPrevented=!1,this.timeStamp=void 0,this.nativeEvent=void 0,this.originalEvent=void 0,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.manager=void 0,this.detail=void 0,this.layer=new fi,this.page=new fi,this.canvas=new fi,this.viewport=new fi,this.path=void 0,this.view=void 0,this.which=void 0,this.returnValue=void 0,this.srcElement=void 0,this.composed=!1,this.isTrusted=void 0,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}return l(e,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"composedPath",value:function(){return!this.manager||this.path&&this.path[0]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}},{key:"propagationPath",get:function(){return this.composedPath()}},{key:"preventDefault",value:function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}},{key:"stopImmediatePropagation",value:function(){this.propagationImmediatelyStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"initEvent",value:function(){}},{key:"initUIEvent",value:function(){}},{key:"clone",value:function(){throw new Error(Ri)}}]),e}(),Io=function(){f(i,Ro);var r=h(i);function i(t,e){var n;return O(this,i),(n=r.call(this,null)).type=t,n.detail=e,Object.assign(Qr(n),e),n}return l(i)}(),Fo=function(){function t(){O(this,t),this.emitter=new Wr}return l(t,[{key:"on",value:function(t,e,n){return this.addEventListener(t,e,n),this}},{key:"addEventListener",value:function(t,e,n){var r,i,a,o=gn(n)&&n||on(n)&&n.capture,n=on(n)&&n.once,s=vi(e)?void 0:e,l=!1,c="";return-1<t.indexOf(":")&&(i=(r=ei(t.split(":"),2))[0],t=r[1],c=i,l=!0),t=o?"".concat(t,"capture"):t,e=vi(e)?e:e.handleEvent,l&&(a=e,e=function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];(null==(t=n[0].target)?void 0:t.name)===c&&a.apply(void 0,n)}),n?this.emitter.once(t,e,s):this.emitter.on(t,e,s),this}},{key:"off",value:function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this}},{key:"removeAllEventListeners",value:function(){this.emitter.removeAllListeners()}},{key:"removeEventListener",value:function(t,e,n){var n=gn(n)&&n||on(n)&&n.capture,r=vi(e)?void 0:e;return t=n?"".concat(t,"capture"):t,e=vi(e)?e:null==(n=e)?void 0:n.handleEvent,this.emitter.off(t,e,r),this}},{key:"emit",value:function(t,e){this.dispatchEvent(new Io(t,e))}},{key:"dispatchEvent",value:function(t){var e,n=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(!(t instanceof Ro))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");if(e=this.document?this:this.defaultView||(null==(e=this.ownerDocument)?void 0:e.defaultView)){if(t.manager=e.getEventService()||null,!t.manager)return!1;t.defaultPrevented=!1,t.path=[],n||(t.target=this),null!=(e=t.manager)&&e.dispatchEvent(t,t.type,n)}return!t.defaultPrevented}}]),t}(),Bo=function(){f(d,Fo);var i=h(d);function d(){var t;O(this,d);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).shadow=!1,t.ownerDocument=null,t.isConnected=!1,t.baseURI="",t.childNodes=[],t.nodeType=0,t.nodeName="",t.nodeValue=null,t.parentNode=null,t}return l(d,[{key:"textContent",get:function(){var t,e="",n=(this.nodeName===E.TEXT&&(e+=this.style.text),ai(this.childNodes));try{for(n.s();!(t=n.n()).done;){var r=t.value;r.nodeName===E.TEXT?e+=r.nodeValue:e+=r.textContent}}catch(t){n.e(t)}finally{n.f()}return e},set:function(t){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)}),this.nodeName===E.TEXT&&(this.style.text="".concat(t))}},{key:"getRootNode",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this}},{key:"hasChildNodes",value:function(){return 0<this.childNodes.length}},{key:"isDefaultNamespace",value:function(t){throw new Error(Ri)}},{key:"lookupNamespaceURI",value:function(t){throw new Error(Ri)}},{key:"lookupPrefix",value:function(t){throw new Error(Ri)}},{key:"normalize",value:function(){throw new Error(Ri)}},{key:"isEqualNode",value:function(t){return this===t}},{key:"isSameNode",value:function(t){return this.isEqualNode(t)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return 0<this.childNodes.length?this.childNodes[0]:null}},{key:"lastChild",get:function(){return 0<this.childNodes.length?this.childNodes[this.childNodes.length-1]:null}},{key:"compareDocumentPosition",value:function(t){if(t===this)return 0;if(!(t instanceof d))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");for(var e=[i=t],n=[a=this];null!=(r=i.parentNode)?r:a.parentNode;)var r,i=i.parentNode?(e.push(i.parentNode),i.parentNode):i,a=a.parentNode?(n.push(a.parentNode),a.parentNode):a;if(i!==a)return d.DOCUMENT_POSITION_DISCONNECTED|d.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|d.DOCUMENT_POSITION_PRECEDING;var o=n.length<e.length?e:n,s=o===e?n:e;if(o[o.length-s.length]===s[0])return o===e?d.DOCUMENT_POSITION_CONTAINED_BY|d.DOCUMENT_POSITION_FOLLOWING:d.DOCUMENT_POSITION_CONTAINS|d.DOCUMENT_POSITION_PRECEDING;for(var l=o.length-s.length,c=s.length-1;0<=c;c--){var u,f=s[c],h=o[l+c];if(h!==f)return(u=f.parentNode.childNodes).indexOf(f)<u.indexOf(h)?s===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING:o===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING}return d.DOCUMENT_POSITION_FOLLOWING}},{key:"contain",value:function(t){return this.contains(t)}},{key:"contains",value:function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e}},{key:"getAncestor",value:function(t){for(var e=this;0<t&&e;)e=e.parentNode,t--;return e}},{key:"forEach",value:function(e){e(this)||this.childNodes.forEach(function(t){t.forEach(e)})}}],[{key:"isNode",value:function(t){return!!t.childNodes}}]),d}(),Do=(Bo.DOCUMENT_POSITION_DISCONNECTED=1,Bo.DOCUMENT_POSITION_PRECEDING=2,Bo.DOCUMENT_POSITION_FOLLOWING=4,Bo.DOCUMENT_POSITION_CONTAINS=8,Bo.DOCUMENT_POSITION_CONTAINED_BY=16,Bo.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,function(){f(i,Bo);var n,r,e=h(i);function i(){var t;O(this,i),(t=e.call(this)).defaultView=null,t.documentElement=void 0,t.timeline=void 0,t.ownerDocument=null,t.nodeName="document";try{t.timeline=new w.AnimationTimeline(Qr(t))}catch(t){}var r={};return oc.forEach(function(t){var e=t.n,n=t.inh,t=t.d;n&&t&&(r[e]=vi(t)?t(E.GROUP):t)}),t.documentElement=new cs({id:"g-root",style:r}),t.documentElement.ownerDocument=Qr(t),t.documentElement.parentNode=Qr(t),t.childNodes=[t.documentElement],t}return l(i,[{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"createElement",value:function(t,e){var n;return"svg"===t?this.documentElement:((n=this.defaultView.customElements.get(t))||(console.warn("Unsupported tagName: ",t),n="tspan"===t?Os:cs),(t=new n(e)).ownerDocument=this,t)}},{key:"createElementNS",value:function(t,e,n){return this.createElement(e,n)}},{key:"cloneNode",value:function(t){throw new Error(Ri)}},{key:"destroy",value:function(){try{this.documentElement.destroy(),this.timeline.destroy()}catch(t){}}},{key:"elementsFromBBox",value:function(t,e,n,r){var t=this.defaultView.context.rBushRoot.search({minX:t,minY:e,maxX:n,maxY:r}),i=[];return t.forEach(function(t){var t=t.id,t=w.displayObjectPool.getByEntity(t),e=t.parsedStyle.pointerEvents,e=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(e);e&&!t.isVisible()||t.isCulled()||!t.isInteractive()||i.push(t)}),i.sort(function(t,e){return e.sortable.renderOrder-t.sortable.renderOrder}),i}},{key:"elementFromPointSync",value:function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,n=n.y,i=this.defaultView.getConfig(),a=i.width,i=i.height;return r<0||n<0||a<r||i<n?null:(i=(a=this.defaultView.viewport2Client({x:r,y:n})).x,a=a.y,(t=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:t,y:e,viewportX:r,viewportY:n,clientX:i,clientY:a},picked:[]}).picked)&&t[0]||this.documentElement)}},{key:"elementFromPoint",value:(r=Ur(M().mark(function t(e,n){var r,i,a,o,s,l;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.defaultView.canvas2Viewport({x:e,y:n}),r=i.x,i=i.y,o=this.defaultView.getConfig(),a=o.width,o=o.height,r<0||i<0||a<r||o<i)return t.abrupt("return",null);t.next=4;break;case 4:return a=this.defaultView.viewport2Client({x:r,y:i}),o=a.x,s=a.y,t.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:e,y:n,viewportX:r,viewportY:i,clientX:o,clientY:s},picked:[]});case 7:return s=t.sent,l=s.picked,t.abrupt("return",l&&l[0]||this.documentElement);case 10:case"end":return t.stop()}},t,this)})),function(t,e){return r.apply(this,arguments)})},{key:"elementsFromPointSync",value:function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,n=n.y,i=this.defaultView.getConfig(),a=i.width,i=i.height;return r<0||n<0||a<r||i<n?[]:(i=(a=this.defaultView.viewport2Client({x:r,y:n})).x,a=a.y,(t=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:t,y:e,viewportX:r,viewportY:n,clientX:i,clientY:a},picked:[]}).picked)[t.length-1]!==this.documentElement&&t.push(this.documentElement),t)}},{key:"elementsFromPoint",value:(n=Ur(M().mark(function t(e,n){var r,i,a,o,s,l;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.defaultView.canvas2Viewport({x:e,y:n}),r=i.x,i=i.y,o=this.defaultView.getConfig(),a=o.width,o=o.height,r<0||i<0||a<r||o<i)return t.abrupt("return",[]);t.next=4;break;case 4:return a=this.defaultView.viewport2Client({x:r,y:i}),o=a.x,s=a.y,t.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:e,y:n,viewportX:r,viewportY:i,clientX:o,clientY:s},picked:[]});case 7:return s=t.sent,(l=s.picked)[l.length-1]!==this.documentElement&&l.push(this.documentElement),t.abrupt("return",l);case 11:case"end":return t.stop()}},t,this)})),function(t,e){return n.apply(this,arguments)})},{key:"appendChild",value:function(t,e){throw new Error(Ii)}},{key:"insertBefore",value:function(t,e){throw new Error(Ii)}},{key:"removeChild",value:function(t,e){throw new Error(Ii)}},{key:"replaceChild",value:function(t,e,n){throw new Error(Ii)}},{key:"append",value:function(){throw new Error(Ii)}},{key:"prepend",value:function(){throw new Error(Ii)}},{key:"getElementById",value:function(t){return this.documentElement.getElementById(t)}},{key:"getElementsByName",value:function(t){return this.documentElement.getElementsByName(t)}},{key:"getElementsByTagName",value:function(t){return this.documentElement.getElementsByTagName(t)}},{key:"getElementsByClassName",value:function(t){return this.documentElement.getElementsByClassName(t)}},{key:"querySelector",value:function(t){return this.documentElement.querySelector(t)}},{key:"querySelectorAll",value:function(t){return this.documentElement.querySelectorAll(t)}},{key:"find",value:function(t){return this.documentElement.find(t)}},{key:"findAll",value:function(t){return this.documentElement.findAll(t)}}]),i}()),zo=(go=go||{},go[go.Standard=0]="Standard",(as=mo=mo||{}).DESTROY="destroy",as.ATTR_MODIFIED="DOMAttrModified",as.INSERTED="DOMNodeInserted",as.REMOVED="removed",as.MOUNTED="DOMNodeInsertedIntoDocument",as.UNMOUNTED="DOMNodeRemovedFromDocument",as.BOUNDS_CHANGED="bounds-changed",as.RENDER_ORDER_CHANGED="render-order-changed",as.CULLED="culled",function(){f(u,Ro);var c=h(u);function u(t,e,n,r,i,a,o,s){var l;return O(this,u),(l=c.call(this,null)).relatedNode=void 0,l.prevValue=void 0,l.newValue=void 0,l.attrName=void 0,l.attrChange=void 0,l.prevParsedValue=void 0,l.newParsedValue=void 0,l.relatedNode=e,l.prevValue=n,l.newValue=r,l.attrName=i,l.attrChange=a,l.prevParsedValue=o,l.newParsedValue=s,l.type=t,l}return l(u)}()),Go=(zo.ADDITION=2,zo.MODIFICATION=1,zo.REMOVAL=3,0),Wo=new zo(mo.INSERTED,null,"","","",0,"",""),Vo=new zo(mo.REMOVED,null,"","","",0,"",""),Yo=new Io(mo.DESTROY),Ho=function(){f(a,Bo);var i=h(a);function a(){var t;O(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).entity=Go++,t.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1,proxyNodeName:void 0},t.cullable={strategy:go.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},t.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:k(0,0,0),localRotation:le(0,0,0,1),localScale:k(1,1,1),localTransform:ft(),localSkew:he(0,0),position:k(0,0,0),rotation:le(0,0,0,1),scaling:k(1,1,1),worldTransform:ft(),origin:k(0,0,0)},t.sortable={dirty:!1,sorted:void 0,lastSortedIndex:void 0,renderOrder:0},t.geometry={contentBounds:void 0,renderBounds:void 0},t.rBushNode={aabb:void 0},t.id=void 0,t.name=void 0,t.namespaceURI="g",t.scrollLeft=0,t.scrollTop=0,t.clientTop=0,t.clientLeft=0,t.destroyed=!1,t.style={},t.computedStyle={anchor:da,opacity:da,fillOpacity:da,strokeOpacity:da,fill:da,stroke:da,transform:da,transformOrigin:da,visibility:da,pointerEvents:da,lineWidth:da,lineCap:da,lineJoin:da,increasedLineWidthForHitTesting:da,fontSize:da,fontFamily:da,fontStyle:da,fontWeight:da,fontVariant:da,textAlign:da,textBaseline:da,textTransform:da,zIndex:da,filter:da,shadowType:da},t.parsedStyle={},t.attributes={},t}return l(a,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(t){return""!==t})}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){var t;return this.parentNode&&(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t+1])||null}},{key:"previousSibling",get:function(){var t;return this.parentNode&&(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t-1])||null}},{key:"cloneNode",value:function(t){throw new Error(Ri)}},{key:"appendChild",value:function(t,e){if(t.destroyed)throw new Error("Cannot append a destroyed element.");return w.sceneGraphService.attach(t,this,e),null!=(e=this.ownerDocument)&&e.defaultView&&this.ownerDocument.defaultView.mountChildren(t),Wo.relatedNode=this,t.dispatchEvent(Wo),t}},{key:"insertBefore",value:function(t,e){return e?(e=this.childNodes.indexOf(e),this.appendChild(t,e-1)):this.appendChild(t),t}},{key:"replaceChild",value:function(t,e){var n=this.childNodes.indexOf(e);return this.removeChild(e),this.appendChild(t,n),e}},{key:"removeChild",value:function(t){var e;return Vo.relatedNode=this,t.dispatchEvent(Vo),null!=(e=t.ownerDocument)&&e.defaultView&&t.ownerDocument.defaultView.unmountChildren(t),w.sceneGraphService.detach(t),t}},{key:"removeChildren",value:function(){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)})}},{key:"destroyChildren",value:function(){this.childNodes.slice().forEach(function(t){t.destroyChildren(),t.destroy()})}},{key:"matches",value:function(t){return w.sceneGraphService.matches(t,this)}},{key:"getElementById",value:function(t){return w.sceneGraphService.querySelector("#".concat(t),this)}},{key:"getElementsByName",value:function(t){return w.sceneGraphService.querySelectorAll('[name="'.concat(t,'"]'),this)}},{key:"getElementsByClassName",value:function(t){return w.sceneGraphService.querySelectorAll(".".concat(t),this)}},{key:"getElementsByTagName",value:function(t){return w.sceneGraphService.querySelectorAll(t,this)}},{key:"querySelector",value:function(t){return w.sceneGraphService.querySelector(t,this)}},{key:"querySelectorAll",value:function(t){return w.sceneGraphService.querySelectorAll(t,this)}},{key:"closest",value:function(t){var e=this;do{if(w.sceneGraphService.matches(t,e))return e}while(null!==(e=e.parentElement));return null}},{key:"find",value:function(e){var n=this,r=null;return this.forEach(function(t){return!(t===n||!e(t)||(r=t,0))}),r}},{key:"findAll",value:function(e){var n=this,r=[];return this.forEach(function(t){t!==n&&e(t)&&r.push(t)}),r}},{key:"after",value:function(){var r=this;if(this.parentNode){for(var i=this.parentNode.childNodes.indexOf(this),t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach(function(t,e){var n;return null==(n=r.parentNode)?void 0:n.appendChild(t,i+e+1)})}}},{key:"before",value:function(){if(this.parentNode){for(var t=this.parentNode.childNodes.indexOf(this),e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0],a=n.slice(1);this.parentNode.appendChild(i,t),i.after.apply(i,ni(a))}}},{key:"replaceWith",value:function(){this.after.apply(this,arguments),this.remove()}},{key:"append",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach(function(t){return e.appendChild(t)})}},{key:"prepend",value:function(){for(var n=this,t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(function(t,e){return n.appendChild(t,e)})}},{key:"replaceChildren",value:function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)}},{key:"remove",value:function(){return this.parentNode?this.parentNode.removeChild(this):this}},{key:"destroy",value:function(){this.dispatchEvent(Yo),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0}},{key:"getGeometryBounds",value:function(){return w.sceneGraphService.getGeometryBounds(this)}},{key:"getRenderBounds",value:function(){return w.sceneGraphService.getBounds(this,!0)}},{key:"getBounds",value:function(){return w.sceneGraphService.getBounds(this)}},{key:"getLocalBounds",value:function(){return w.sceneGraphService.getLocalBounds(this)}},{key:"getBoundingClientRect",value:function(){return w.sceneGraphService.getBoundingClientRect(this)}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"computedStyleMap",value:function(){return new Map(Object.entries(this.computedStyle))}},{key:"getAttributeNames",value:function(){return Object.keys(this.attributes)}},{key:"getAttribute",value:function(t){var e=this.attributes[t];return void 0===e&&(t=mi(t),e=this.attributes[t],_(e))?null:e}},{key:"hasAttribute",value:function(t){return this.getAttributeNames().includes(t)}},{key:"hasAttributes",value:function(){return!!this.getAttributeNames().length}},{key:"removeAttribute",value:function(t){this.setAttribute(t,null),delete this.attributes[t]}},{key:"setAttribute",value:function(t,e){this.attributes[t]=e}},{key:"getAttributeNS",value:function(t,e){throw new Error(Ri)}},{key:"getAttributeNode",value:function(t){throw new Error(Ri)}},{key:"getAttributeNodeNS",value:function(t,e){throw new Error(Ri)}},{key:"hasAttributeNS",value:function(t,e){throw new Error(Ri)}},{key:"removeAttributeNS",value:function(t,e){throw new Error(Ri)}},{key:"removeAttributeNode",value:function(t){throw new Error(Ri)}},{key:"setAttributeNS",value:function(t,e,n){throw new Error(Ri)}},{key:"setAttributeNode",value:function(t){throw new Error(Ri)}},{key:"setAttributeNodeNS",value:function(t){throw new Error(Ri)}},{key:"toggleAttribute",value:function(t,e){throw new Error(Ri)}}],[{key:"isElement",value:function(t){return!!t.getAttribute}}]),a}(),qo=function(){f(a,Ro);var i=h(a);function a(){var t;O(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).altKey=void 0,t.button=void 0,t.buttons=void 0,t.ctrlKey=void 0,t.metaKey=void 0,t.relatedTarget=void 0,t.shiftKey=void 0,t.client=new fi,t.movement=new fi,t.offset=new fi,t.global=new fi,t.screen=new fi,t}return l(a,[{key:"clientX",get:function(){return this.client.x}},{key:"clientY",get:function(){return this.client.y}},{key:"movementX",get:function(){return this.movement.x}},{key:"movementY",get:function(){return this.movement.y}},{key:"offsetX",get:function(){return this.offset.x}},{key:"offsetY",get:function(){return this.offset.y}},{key:"globalX",get:function(){return this.global.x}},{key:"globalY",get:function(){return this.global.y}},{key:"screenX",get:function(){return this.screen.x}},{key:"screenY",get:function(){return this.screen.y}},{key:"getModifierState",value:function(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)}},{key:"initMouseEvent",value:function(){throw new Error(Ri)}}]),a}(),Uo=function(){f(a,qo);var i=h(a);function a(){var t;O(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).pointerId=void 0,t.width=0,t.height=0,t.isPrimary=!1,t.pointerType=void 0,t.pressure=void 0,t.tangentialPressure=void 0,t.tiltX=void 0,t.tiltY=void 0,t.twist=void 0,t}return l(a,[{key:"getCoalescedEvents",value:function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]}},{key:"getPredictedEvents",value:function(){throw new Error("getPredictedEvents is not supported!")}},{key:"clone",value:function(){return this.manager.clonePointerEvent(this)}}]),a}(),Xo=function(){f(a,qo);var i=h(a);function a(){var t;O(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).deltaMode=void 0,t.deltaX=void 0,t.deltaY=void 0,t.deltaZ=void 0,t.DOM_DELTA_LINE=0,t.DOM_DELTA_PAGE=1,t.DOM_DELTA_PIXEL=2,t}return l(a,[{key:"clone",value:function(){return this.manager.cloneWheelEvent(this)}}]),a}(),Ko=new zo(mo.ATTR_MODIFIED,null,null,null,null,zo.MODIFICATION,null,null),$o={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:""},Zo={anchor:[0,0],fill:ya,stroke:ya,transform:[],zIndex:0,filter:[],shadowType:"outer"},Jo=["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting","fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"],N=function(){f(o,Ho);var e=h(o);function o(t){var r;return O(this,o),(r=e.call(this)).config=void 0,r.isCustomElement=!1,r.isMutationObserved=!1,r.activeAnimations=[],r.getClip=function(){return this.style.clipPath||null},r.config=t,r.config.interactive=null!=(t=r.config.capture)?t: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||E.GROUP,r.config.style=Yr(Yr({},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,Zo,r.config.initialParsedStyle),Object.assign(r.attributes,$o),r.initAttributes(r.config.style),r.style=new Proxy({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}}),w.displayObjectPool.add(r.entity,Qr(r)),r}return l(o,[{key:"destroy",value:function(){ti($r(o.prototype),"destroy",this).call(this),w.displayObjectPool.remove(this.entity),this.getAnimations().forEach(function(t){t.cancel()})}},{key:"cloneNode",value:function(e,t){var n,r=Yr({},this.attributes);for(n in r){var i=r[n];i instanceof o&&"clipPath"!==n&&"offsetPath"!==n&&"textPath"!==n&&(r[n]=i.cloneNode(e)),t&&(r[n]=t(n,i))}var a=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:r});return a.setLocalTransform(this.getLocalTransform()),e&&this.children.forEach(function(t){t.style.isMarker||(t=t.cloneNode(e),a.appendChild(t))}),a}},{key:"initAttributes",value:function(){var t=this.renderable;w.styleValueRegistry.processProperties(this,0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},{forceUpdateGeometry:!0,usedAttributes:Jo}),t.dirty=!0}},{key:"setAttribute",value:function(t,e){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],t=mi(t);mn(e)||!n&&e===this.attributes[t]||(this.internalSetAttribute(t,e),ti($r(o.prototype),"setAttribute",this).call(this,t,e))}},{key:"internalSetAttribute",value:function(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},r=this.renderable,i=this.attributes[t],a=this.parsedStyle[t],n=(w.styleValueRegistry.processProperties(this,Kr({},t,e),n),r.dirty=!0,this.parsedStyle[t]);this.isConnected&&(Ko.relatedNode=this,Ko.prevValue=i,Ko.newValue=e,Ko.attrName=t,Ko.prevParsedValue=a,Ko.newParsedValue=n,this.isMutationObserved?this.dispatchEvent(Ko):(Ko.target=this).ownerDocument.defaultView.dispatchEvent(Ko,!0)),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(t,i,e,a,n)}},{key:"getBBox",value:function(){var t=this.getBounds(),e=ei(t.getMin(),2),n=e[0],e=e[1],t=ei(t.getMax(),2),r=t[0],t=t[1];return new hi(n,e,r-n,t-e)}},{key:"setOrigin",value:function(t){return w.sceneGraphService.setOrigin(this,_s(t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0)),this}},{key:"getOrigin",value:function(){return w.sceneGraphService.getOrigin(this)}},{key:"setPosition",value:function(t){return w.sceneGraphService.setPosition(this,_s(t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0)),this}},{key:"setLocalPosition",value:function(t){return w.sceneGraphService.setLocalPosition(this,_s(t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0)),this}},{key:"translate",value:function(t){return w.sceneGraphService.translate(this,_s(t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0)),this}},{key:"translateLocal",value:function(t){return w.sceneGraphService.translateLocal(this,_s(t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0)),this}},{key:"getPosition",value:function(){return w.sceneGraphService.getPosition(this)}},{key:"getLocalPosition",value:function(){return w.sceneGraphService.getLocalPosition(this)}},{key:"scale",value:function(t,e,n){return this.scaleLocal(t,e,n)}},{key:"scaleLocal",value:function(t,e,n){return"number"==typeof t&&(t=_s(t,e=e||t,n=n||t)),w.sceneGraphService.scaleLocal(this,t),this}},{key:"setLocalScale",value:function(t,e,n){return"number"==typeof t&&(t=_s(t,e=e||t,n=n||t)),w.sceneGraphService.setLocalScale(this,t),this}},{key:"getLocalScale",value:function(){return w.sceneGraphService.getLocalScale(this)}},{key:"getScale",value:function(){return w.sceneGraphService.getScale(this)}},{key:"getEulerAngles",value:function(){return Ps(ei(Ts(g(),w.sceneGraphService.getWorldTransform(this)),3)[2])}},{key:"getLocalEulerAngles",value:function(){return Ps(ei(Ts(g(),w.sceneGraphService.getLocalRotation(this)),3)[2])}},{key:"setEulerAngles",value:function(t){return w.sceneGraphService.setEulerAngles(this,0,0,t),this}},{key:"setLocalEulerAngles",value:function(t){return w.sceneGraphService.setLocalEulerAngles(this,0,0,t),this}},{key:"rotateLocal",value:function(t,e,n){return _(e)&&_(n)?w.sceneGraphService.rotateLocal(this,0,0,t):w.sceneGraphService.rotateLocal(this,t,e,n),this}},{key:"rotate",value:function(t,e,n){return _(e)&&_(n)?w.sceneGraphService.rotate(this,0,0,t):w.sceneGraphService.rotate(this,t,e,n),this}},{key:"setRotation",value:function(t,e,n,r){return w.sceneGraphService.setRotation(this,t,e,n,r),this}},{key:"setLocalRotation",value:function(t,e,n,r){return w.sceneGraphService.setLocalRotation(this,t,e,n,r),this}},{key:"setLocalSkew",value:function(t,e){return w.sceneGraphService.setLocalSkew(this,t,e),this}},{key:"getRotation",value:function(){return w.sceneGraphService.getRotation(this)}},{key:"getLocalRotation",value:function(){return w.sceneGraphService.getLocalRotation(this)}},{key:"getLocalSkew",value:function(){return w.sceneGraphService.getLocalSkew(this)}},{key:"getLocalTransform",value:function(){return w.sceneGraphService.getLocalTransform(this)}},{key:"getWorldTransform",value:function(){return w.sceneGraphService.getWorldTransform(this)}},{key:"setLocalTransform",value:function(t){return w.sceneGraphService.setLocalTransform(this,t),this}},{key:"resetLocalTransform",value:function(){w.sceneGraphService.resetLocalTransform(this)}},{key:"getAnimations",value:function(){return this.activeAnimations}},{key:"animate",value:function(t,e){var n=null==(n=this.ownerDocument)?void 0:n.timeline;return n?n.play(this,t,e):null}},{key:"isVisible",value:function(){var t;return"visible"===(null==(t=this.parsedStyle)?void 0:t.visibility)}},{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}},{key:"isInteractive",value:function(){var t;return"none"!==(null==(t=this.parsedStyle)?void 0:t.pointerEvents)}},{key:"isCulled",value:function(){return!(!this.cullable||!this.cullable.enable||this.cullable.visible)}},{key:"toFront",value:function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,ni(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})))+1),this}},{key:"toBack",value:function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,ni(this.parentNode.children.map(function(t){return Number(t.style.zIndex)})))-1),this}},{key:"getConfig",value:function(){return this.config}},{key:"attr",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],a=n[1];return i?on(i)?(Object.keys(i).forEach(function(t){e.setAttribute(t,i[t])}),this):2===n.length?(this.setAttribute(i,a),this):this.attributes[i]:this.attributes}},{key:"getMatrix",value:function(t){var t=t||this.getWorldTransform(),e=ei(_t(g(),t),2),n=e[0],e=e[1],r=ei(At(g(),t),2),i=r[0],r=r[1],t=Pt(re(),t),t=ei(Ts(g(),t),3),a=t[0],t=t[2],o=(a=a||t,t=n,n=e,e=i,i=r,r=Math.cos(a),a=Math.sin(a),e*r),s=i*a,l=0,e=-e*a,a=i*r,i=0,r=t,t=n,n=1,c=new lt(9);return c[0]=o,c[1]=s,c[2]=l,c[3]=e,c[4]=a,c[5]=i,c[6]=r,c[7]=t,c[8]=n,c}},{key:"getLocalMatrix",value:function(){return this.getMatrix(this.getLocalTransform())}},{key:"setMatrix",value:function(t){var t=ei(Ls(t),5),e=t[0],n=t[1],r=t[2],i=t[3],t=t[4];this.setEulerAngles(t).setPosition(e,n).setLocalScale(r,i)}},{key:"setLocalMatrix",value:function(t){var t=ei(Ls(t),5),e=t[0],n=t[1],r=t[2],i=t[3],t=t[4];this.setLocalEulerAngles(t).setLocalPosition(e,n).setLocalScale(r,i)}},{key:"show",value:function(){this.style.visibility="visible"}},{key:"hide",value:function(){this.style.visibility="hidden"}},{key:"getCount",value:function(){return this.childElementCount}},{key:"getParent",value:function(){return this.parentElement}},{key:"getChildren",value:function(){return this.children}},{key:"getFirst",value:function(){return this.firstElementChild}},{key:"getLast",value:function(){return this.lastElementChild}},{key:"getChildByIndex",value:function(t){return this.children[t]||null}},{key:"add",value:function(t,e){return this.appendChild(t,e)}},{key:"setClip",value:function(t){this.style.clipPath=t}},{key:"set",value:function(t,e){this.config[t]=e}},{key:"get",value:function(t){return this.config[t]}},{key:"moveTo",value:function(t){return this.setPosition(t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0),this}},{key:"move",value:function(t){return this.setPosition(t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0),this}},{key:"setZIndex",value:function(t){return this.style.zIndex=t,this}}]),o}(),Qo=["style"],ts=function(){f(r,N);var n=h(r);function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.style,t=Jr(t,Qo);return O(this,r),n.call(this,Yr({type:E.CIRCLE,style:Yr({cx:"",cy:"",r:""},e),initialParsedStyle:{anchor:[.5,.5]}},t))}return l(r)}(),es=["style"],ns=function(){f(r,N);var n=h(r);function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.style,t=Jr(t,es);return O(this,r),(e=n.call(this,Yr({style:Yr({x:"",y:""},e)},t))).isCustomElement=!0,e}return l(r)}(),rs={},is=[],as=function(){function t(){O(this,t)}return l(t,[{key:"getByEntity",value:function(t){return rs[t]}},{key:"getAll",value:function(){return Object.keys(rs).map(function(t){return rs[t]})}},{key:"add",value:function(t,e){(rs[t]=e).nodeName===E.HTML&&is.push(e)}},{key:"remove",value:function(t){var e=rs[t];e&&(delete rs[t],e.nodeName===E.HTML)&&(t=is.indexOf(e),is.splice(t,1))}},{key:"getHTMLs",value:function(){return is}}]),t}(),os=["style"],ss=function(){f(r,N);var n=h(r);function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.style,t=Jr(t,os);return O(this,r),n.call(this,Yr({type:E.ELLIPSE,style:Yr({cx:"",cy:"",rx:"",ry:""},e),initialParsedStyle:{anchor:[.5,.5]}},t))}return l(r)}(),ls=["style"],cs=function(){f(r,N);var n=h(r);function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.style,t=Jr(t,ls);return O(this,r),n.call(this,Yr({type:E.GROUP,style:Yr({x:"",y:"",width:"",height:""},e)},t))}return l(r)}(),us=["style"],fs=function(){f(r,N);var n=h(r);function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.style,t=Jr(t,us);return O(this,r),(e=n.call(this,Yr({type:E.HTML,style:Yr({x:"",y:"",width:"auto",height:"auto",innerHTML:""},e)},t))).cullable.enable=!1,e}return l(r,[{key:"getDomElement",value:function(){return this.parsedStyle.$el}},{key:"getBoundingClientRect",value:function(){return this.parsedStyle.$el.getBoundingClientRect()}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"getBounds",value:function(){var t,e,n=this.getBoundingClientRect(),r=null==(r=this.ownerDocument)||null==(r=r.defaultView)?void 0:r.getContextService().getBoundingClientRect();return r?(t=n.left-r.left,r=n.top-r.top,(e=new li).setMinMax(k(t,r,0),k(t+n.width,r+n.height,0)),e):null}},{key:"getLocalBounds",value:function(){if(this.parentNode){var t,e=gt(ft(),this.parentNode.getWorldTransform()),n=this.getBounds();if(!li.isEmpty(n))return(t=new li).setFromTransformedAABB(n,e),t}return this.getBounds()}}]),r}(),hs=["style"],ds=function(){f(r,N);var n=h(r);function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.style,t=Jr(t,hs);return O(this,r),n.call(this,Yr({type:E.IMAGE,style:Yr({x:"",y:"",img:"",width:"",height:""},e)},t))}return l(r)}(),ps=["style"],ys=function(){f(i,N);var r=h(i);function i(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.style,t=Jr(t,ps),t=(O(this,i),(e=r.call(this,Yr({type:E.LINE,style:Yr({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0,isBillboard:!1},e)},t))).markerStartAngle=0,e.markerEndAngle=0,e.parsedStyle),n=t.markerStart,t=t.markerEnd;return n&&n instanceof N&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&t instanceof N&&(e.markerEndAngle=t.getLocalEulerAngles(),e.appendChild(t)),e.transformMarker(!0),e.transformMarker(!1),e}return l(i,[{key:"attributeChangedCallback",value: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&&r instanceof N&&(this.markerStartAngle=0,r.remove()),i&&i instanceof N&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&r instanceof N&&(this.markerEndAngle=0,r.remove()),i)&&i instanceof N&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))}},{key:"transformMarker",value:function(t){var e,n,r,i,a,o=this.parsedStyle,s=o.markerStart,l=o.markerEnd,c=o.markerStartOffset,u=o.markerEndOffset,f=o.x1,h=o.x2,d=o.y1,p=o.y2,y=o.defX,o=o.defY,s=t?s:l;s&&s instanceof N&&(l=0,t=t?(r=f-y,i=d-o,e=h-f,n=p-d,a=c||0,this.markerStartAngle):(r=h-y,i=p-o,e=f-h,n=d-p,a=u||0,this.markerEndAngle),l=Math.atan2(n,e),s.setLocalEulerAngles(180*l/Math.PI+t),s.setLocalPosition(r+Math.cos(l)*a,i+Math.sin(l)*a))}},{key:"getPoint",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=this.parsedStyle,r=n.x1,i=n.y1,a=n.x2,o=n.y2,s=n.defX,n=n.defY,r=hr.pointAt(r,i,a,o,t),i=r.x,a=r.y,o=Kt(g(),k(i-s,a-n,0),e?this.getWorldTransform():this.getLocalTransform());return new fi(o[0],o[1])}},{key:"getPointAtLength",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return this.getPoint(t/this.getTotalLength(),e)}},{key:"getTotalLength",value:function(){var t=this.parsedStyle,e=t.x1,n=t.y1,r=t.x2,t=t.y2;return hr.length(e,n,r,t)}}]),i}(),vs=["style"],gs=function(){f(a,N);var i=h(a);function a(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.style,t=Jr(t,vs),t=(O(this,a),(e=i.call(this,Yr({type:E.PATH,style:Yr({path:"",miterLimit:""},e)},t))).markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[],e.parsedStyle),n=t.markerStart,r=t.markerEnd,t=t.markerMid;return n&&n instanceof N&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&t instanceof N&&e.placeMarkerMid(t),r&&r instanceof N&&(e.markerEndAngle=r.getLocalEulerAngles(),e.appendChild(r)),e.transformMarker(!0),e.transformMarker(!1),e}return l(a,[{key:"attributeChangedCallback",value: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&&r instanceof N&&(this.markerStartAngle=0,r.remove()),i&&i instanceof N&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&r instanceof N&&(this.markerEndAngle=0,r.remove()),i&&i instanceof N&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)}},{key:"transformMarker",value:function(t){var e,n,r,i,a,o=this.parsedStyle,s=o.markerStart,l=o.markerEnd,c=o.markerStartOffset,u=o.markerEndOffset,f=o.defX,o=o.defY,s=t?s:l;s&&s instanceof N&&(l=0,f=t?(i=(t=ei(this.getStartTangent(),2))[0],e=(t=t[1])[0]-f,n=t[1]-o,r=i[0]-t[0],i=i[1]-t[1],a=c||0,this.markerStartAngle):(c=(t=ei(this.getEndTangent(),2))[0],e=(t=t[1])[0]-f,n=t[1]-o,r=c[0]-t[0],i=c[1]-t[1],a=u||0,this.markerEndAngle),l=Math.atan2(i,r),s.setLocalEulerAngles(180*l/Math.PI+f),s.setLocalPosition(e+Math.cos(l)*a,n+Math.sin(l)*a))}},{key:"placeMarkerMid",value: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&&t instanceof N)for(var a=1;a<n.length-1;a++){var o=ei(n[a].currentPoint,2),s=o[0],o=o[1],l=1===a?t:t.cloneNode(!0);this.markerMidList.push(l),this.appendChild(l),l.setLocalPosition(s-r,o-i)}}},{key:"getTotalLength",value:function(){return ll(this)}},{key:"getPointAtLength",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=this.parsedStyle,r=n.defX,i=n.defY,n=n.path.absolutePath,n=Ze(n,t,m(m({},a),{bbox:!1,length:!0})).point,t=n.x,a=n.y,n=Kt(g(),k(t-r,a-i,0),e?this.getWorldTransform():this.getLocalTransform());return new fi(n[0],n[1])}},{key:"getPoint",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return this.getPointAtLength(t*ll(this),e)}},{key:"getStartTangent",value:function(){var t,e,n=this.parsedStyle.path.segments,r=[];return 1<n.length&&(t=n[0].currentPoint,e=n[1].currentPoint,r=[],(n=n[1].startTangent)?r.push([t[0]-n[0],t[1]-n[1]]):r.push([e[0],e[1]]),r.push([t[0],t[1]])),r}},{key:"getEndTangent",value:function(){var t,e,n=this.parsedStyle.path.segments,r=n.length,i=[];return 1<r&&(t=n[r-2].currentPoint,e=n[r-1].currentPoint,i=[],(n=n[r-1].endTangent)?i.push([e[0]-n[0],e[1]-n[1]]):i.push([t[0],t[1]]),i.push([e[0],e[1]])),i}}]),a}(),ms=["style"],bs=function(){f(a,N);var i=h(a);function a(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.style,t=Jr(t,ms),t=(O(this,a),(e=i.call(this,Yr({type:E.POLYGON,style:Yr({points:"",miterLimit:"",isClosed:!0},e)},t))).markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[],e.parsedStyle),n=t.markerStart,r=t.markerEnd,t=t.markerMid;return n&&n instanceof N&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&t instanceof N&&e.placeMarkerMid(t),r&&r instanceof N&&(e.markerEndAngle=r.getLocalEulerAngles(),e.appendChild(r)),e.transformMarker(!0),e.transformMarker(!1),e}return l(a,[{key:"attributeChangedCallback",value: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&&r instanceof N&&(this.markerStartAngle=0,r.remove()),i&&i instanceof N&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&r instanceof N&&(this.markerEndAngle=0,r.remove()),i&&i instanceof N&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)}},{key:"transformMarker",value:function(t){var e,n,r,i,a,o=this.parsedStyle,s=o.markerStart,l=o.markerEnd,c=o.markerStartOffset,u=o.markerEndOffset,f=o.points.points,h=o.defX,o=o.defY,s=t?s:l;s&&s instanceof N&&(i=f[l=0][0]-h,a=f[0][1]-o,c=t?(e=f[1][0]-f[0][0],n=f[1][1]-f[0][1],r=c||0,this.markerStartAngle):(t=f.length,n=this.style.isClosed?(e=f[t-1][0]-f[0][0],f[t-1][1]-f[0][1]):(i=f[t-1][0]-h,a=f[t-1][1]-o,e=f[t-2][0]-f[t-1][0],f[t-2][1]-f[t-1][1]),r=u||0,this.markerEndAngle),l=Math.atan2(n,e),s.setLocalEulerAngles(180*l/Math.PI+c),s.setLocalPosition(i+Math.cos(l)*r,a+Math.sin(l)*r))}},{key:"placeMarkerMid",value:function(t){var e=this.parsedStyle,n=e.points.points,r=e.defX,i=e.defY;if(this.markerMidList.forEach(function(t){t.remove()}),this.markerMidList=[],t&&t instanceof N)for(var a=1;a<(this.style.isClosed?n.length:n.length-1);a++){var o=n[a][0]-r,s=n[a][1]-i,l=1===a?t:t.cloneNode(!0);this.markerMidList.push(l),this.appendChild(l),l.setLocalPosition(o,s)}}}]),a}(),xs=["style"],ws=function(){f(r,bs);var n=h(r);function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.style,t=Jr(t,xs);return O(this,r),n.call(this,Yr({type:E.POLYLINE,style:Yr({points:"",miterLimit:"",isClosed:!1},e)},t))}return l(r,[{key:"getTotalLength",value:function(){return this.parsedStyle.points.totalLength}},{key:"getPointAtLength",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return this.getPoint(t/this.getTotalLength(),e)}},{key:"getPoint",value:function(n){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],e=this.parsedStyle,r=e.defX,i=e.defY,e=e.points,a=e.points,e=e.segments,o=0,s=0,e=(e.forEach(function(t,e){n>=t[0]&&n<=t[1]&&(o=(n-t[0])/(t[1]-t[0]),s=e)}),hr.pointAt(a[s][0],a[s][1],a[s+1][0],a[s+1][1],o)),a=e.x,e=e.y,a=Kt(g(),k(a-r,e-i,0),t?this.getWorldTransform():this.getLocalTransform());return new fi(a[0],a[1])}},{key:"getStartTangent",value: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}},{key:"getEndTangent",value: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}}]),r}(),ks=["style"],Es=function(){f(r,N);var n=h(r);function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.style,t=Jr(t,ks);return O(this,r),n.call(this,Yr({type:E.RECT,style:Yr({x:"",y:"",width:"",height:"",radius:""},e)},t))}return l(r)}(),Ms=["style"],Os=function(){f(r,N);var n=h(r);function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.style,t=Jr(t,Ms);return O(this,r),n.call(this,Yr({type:E.TEXT,style:Yr({x:"",y:"",text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",letterSpacing:"",lineHeight:"",miterLimit:"",wordWrap:!1,wordWrapWidth:0,leading:0,dx:"",dy:""},e)},t))}return l(r,[{key:"getComputedTextLength",value:function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.maxLineWidth)||0}},{key:"getLineBoundingRects",value:function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.lineMetrics)||[]}},{key:"isOverflowing",value:function(){return!!this.parsedStyle.isOverflowing}}]),r}();function Ss(t){return void 0===t?0:360<t||t<-360?t%360:t}function _s(t,e,n){e=1<arguments.length&&void 0!==e?e:0,n=2<arguments.length&&void 0!==n?n:0;return pn(t)?k(t,e,n):Array.isArray(t)&&3===t.length?Bt(t):k(t[0],t[1]||e,t[2]||n)}function As(t){return t*(Math.PI/180)}function Ps(t){return t*(180/Math.PI)}function Ts(t,e){return 16===e.length?(n=t,r=e,o=.5*Math.PI,s=(c=ei(At(g(),r),3))[0],l=c[1],c=c[2],(u=Math.asin(-r[2]/s))<o?-o<u?(i=Math.atan2(r[6]/l,r[10]/c),a=Math.atan2(r[1]/s,r[0]/s)):(a=0,i=-Math.atan2(r[4]/l,r[5]/l)):(a=0,i=Math.atan2(r[4]/l,r[5]/l)),n[0]=i,n[1]=u,n[2]=a,n):(o=t,s=(c=e)[0],r=c[1],l=c[2],c=c[3],.499995*(n=s*s+(i=r*r)+(u=l*l)+(a=c*c))<(t=s*c-r*l)?(o[0]=Math.PI/2,o[1]=2*Math.atan2(r,s),o[2]=0):t<-.499995*n?(o[0]=-Math.PI/2,o[1]=2*Math.atan2(r,s),o[2]=0):(o[0]=Math.asin(2*(s*l-c*r)),o[1]=Math.atan2(2*(s*c+r*l),1-2*(u+a)),o[2]=Math.atan2(2*(s*r+l*c),1-2*(i+u))),o);var n,r,i,a,o,s,l,c,u}function Ls(t){var e=t[0],n=t[1],r=t[3],i=t[4],a=Math.sqrt(e*e+n*n),o=Math.sqrt(r*r+i*i);e*i-n*r<0&&(e<i?a=-a:o=-o),a&&(e*=1/a,n*=1/a);r=Ps(Math.atan2(n,e));return[t[6],t[7],a,o,r]}var Ns=ft(),Cs=ft(),js=ee(),d=[g(),g(),g()],Rs=g();function Is(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 Fs=ft();function Bs(t,l){var c,u;return t&&t.length&&(u=c=0,l?(c=l.parsedStyle.defX||0,u=l.parsedStyle.defY||0,l.resetLocalTransform(),l.setLocalPosition(c,u)):l=new N({}),t.forEach(function(t){var e,n,r,i,a,o,s=t.t,t=t.d;"scale"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1],l.scaleLocal(o[0],o[1],1)):"scalex"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(o[0],1,1)):"scaley"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,o[0],1)):"scalez"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,1,o[0])):"scale3d"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1,1],l.scaleLocal(o[0],o[1],o[2])):"translate"===s?(o=t||[ca,ca],l.translateLocal(o[0].value,o[1].value,0)):"translatex"===s?(o=t||[ca],l.translateLocal(o[0].value,0,0)):"translatey"===s?(o=t||[ca],l.translateLocal(0,o[0].value,0)):"translatez"===s?(o=t||[ca],l.translateLocal(0,0,o[0].value)):"translate3d"===s?(o=t||[ca,ca,ca],l.translateLocal(o[0].value,o[1].value,o[2].value)):"rotate"===s?(o=t||[ua],l.rotateLocal(0,0,o[0].value)):"rotatex"===s?(o=t||[ua],l.rotateLocal(o[0].value,0,0)):"rotatey"===s?(o=t||[ua],l.rotateLocal(0,o[0].value,0)):"rotatez"===s?(o=t||[ua],l.rotateLocal(0,0,o[0].value)):"rotate3d"!==s&&("skew"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0,0],l.setLocalSkew(As(o[0]),As(o[1]))):"skewx"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(As(o[0]),l.getLocalSkew()[1])):"skewy"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(l.getLocalSkew()[0],As(o[0]))):"matrix"===s?(e=(o=ei(t.map(function(t){return t.value}),6))[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],l.setLocalTransform(pt(Fs,e,n,0,0,r,i,0,0,0,0,1,0,a+c,o+u,0,1))):"matrix3d"===s&&(pt.apply(Ft,[Fs].concat(ni(t.map(function(t){return t.value})))),Fs[12]+=c,Fs[13]+=u,l.setLocalTransform(Fs)))})),l.getLocalTransform()}Ds={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]+\.?))/},zs="";var Ds,zs,Gs=function(t){return zs=t,Vs()};function Ws(t){throw new Error(zs+": "+t)}function Vs(){var t=Qs(Ys);return 0<zs.length&&Ws("Invalid input not EOF"),t}function Ys(){return Hs("linear-gradient",Ds.linearGradient,Us)||Hs("repeating-linear-gradient",Ds.repeatingLinearGradient,Us)||Hs("radial-gradient",Ds.radialGradient,Xs)||Hs("repeating-radial-gradient",Ds.repeatingRadialGradient,Xs)||Hs("conic-gradient",Ds.conicGradient,Xs)}function Hs(n,t,r){return qs(t,function(t){var e=r();return e&&!ol(Ds.comma)&&Ws("Missing comma before color stops"),{type:n,orientation:e,colorStops:Qs(tl)}})}function qs(t,e){t=ol(t);if(t)return ol(Ds.startCall)||Ws("Missing ("),e=e(t),ol(Ds.endCall)||Ws("Missing )"),e}function Us(){return al("directional",Ds.sideOrCorner,1)||al("angular",Ds.angleValue,1)}function Xs(){var t,e,n=Ks();return n&&((t=[]).push(n),e=zs,ol(Ds.comma))&&((n=Ks())?t.push(n):zs=e),t}function Ks(){var t,e=function(){var t=al("shape",/^(circle)/i,0);t&&(t.style=il()||$s());return t}()||function(){var t=al("shape",/^(ellipse)/i,0);t&&(t.style=nl()||$s());return t}();return e?e.at=Zs():(t=$s())?(e=t,(t=Zs())&&(e.at=t)):(t=Js())&&(e={type:"default-radial",at:t}),e}function $s(){return al("extent-keyword",Ds.extentKeywords,1)}function Zs(){var t;if(al("position",/^at/,0))return(t=Js())||Ws("Missing positioning value"),t}function Js(){var t={x:nl(),y:nl()};if(t.x||t.y)return{type:"position",value:t}}function Qs(t){var e=t(),n=[];if(e)for(n.push(e);ol(Ds.comma);)(e=t())?n.push(e):Ws("One extra comma");return n}function tl(){var t=al("hex",Ds.hexColor,1)||qs(Ds.rgbaColor,function(){return{type:"rgba",value:Qs(el)}})||qs(Ds.rgbColor,function(){return{type:"rgb",value:Qs(el)}})||al("literal",Ds.literalColor,0);return t||Ws("Expected color definition"),t.length=nl(),t}function el(){return ol(Ds.number)[1]}function nl(){return al("%",Ds.percentageValue,1)||rl()||il()}function rl(){return al("position-keyword",Ds.positionKeywords,1)}function il(){return al("px",Ds.pixelValue,1)||al("em",Ds.emValue,1)}function al(t,e,n){e=ol(e);if(e)return{type:t,value:e[n]}}function ol(t){var e=/^[\n\r\t\s]+/.exec(zs),e=(e&&sl(e[0].length),t.exec(zs));return e&&sl(e[0].length),e}function sl(t){zs=zs.substring(t)}function ll(t){var e;return 0===t.parsedStyle.path.totalLength&&(t.parsedStyle.path.totalLength=Ze(t.parsedStyle.path.absolutePath,void 0,m(m({},e),{bbox:!1,length:!0})).length),t.parsedStyle.path.totalLength}function cl(t,e){return t[0]===e[0]&&t[1]===e[1]}function ul(t,e){var n,r=t.prePoint,i=t.currentPoint,t=t.nextPoint,a=Math.pow(i[0]-r[0],2)+Math.pow(i[1]-r[1],2),o=Math.pow(i[0]-t[0],2)+Math.pow(i[1]-t[1],2),r=Math.pow(r[0]-t[0],2)+Math.pow(r[1]-t[1],2),r=Math.acos((a+o-r)/(2*Math.sqrt(a)*Math.sqrt(o)));return!r||0===Math.sin(r)||(void(a=0)===n&&(n=1e-5),Math.abs(r-a)<n)?{xExtra:0,yExtra:0}:(o=Math.abs(Math.atan2(t[1]-i[1],t[0]-i[0])),a=Math.abs(Math.atan2(t[0]-i[0],t[1]-i[1])),o=o>Math.PI/2?Math.PI-o:o,a=a>Math.PI/2?Math.PI-a:a,{xExtra:Math.cos(r/2-o)*(e/2*(1/Math.sin(r/2)))-e/2||0,yExtra:Math.cos(a-r/2)*(e/2*(1/Math.sin(r/2)))-e/2||0})}function fl(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function hl(t,e,n,r,i,a,o,s){var l,c,u;return e=Math.abs(e),n=Math.abs(n),r=As(r=yn(r,360)),t.x===o.x&&t.y===o.y?{x:t.x,y:t.y,ellipticalArcAngle:0}:0===e||0===n?{x:0,y:0,ellipticalArcAngle:0}:(u=(t.x-o.x)/2,c=(t.y-o.y)/2,u={x:Math.cos(r)*u+Math.sin(r)*c,y:-Math.sin(r)*u+Math.cos(r)*c},1<(c=Math.pow(u.x,2)/Math.pow(e,2)+Math.pow(u.y,2)/Math.pow(n,2))&&(e=Math.sqrt(c)*e,n=Math.sqrt(c)*n),c=(c=(Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(u.y,2)-Math.pow(n,2)*Math.pow(u.x,2))/(Math.pow(e,2)*Math.pow(u.y,2)+Math.pow(n,2)*Math.pow(u.x,2)))<0?0:c,i=(i!==a?1:-1)*Math.sqrt(c),c=e*u.y/n*i,i*=-n*u.x/e,t={x:Math.cos(r)*c-Math.sin(r)*i+(t.x+o.x)/2,y:Math.sin(r)*c+Math.cos(r)*i+(t.y+o.y)/2},l=dl({x:1,y:0},o={x:(u.x-c)/e,y:(u.y-i)/n}),o=dl(o,{x:(-u.x-c)/e,y:(-u.y-i)/n}),!a&&0<o?o-=2*Math.PI:a&&o<0&&(o+=2*Math.PI),c=l+(o%=2*Math.PI)*s,u=e*Math.cos(c),i=n*Math.sin(c),{x:Math.cos(r)*u-Math.sin(r)*i+t.x,y:Math.sin(r)*u+Math.cos(r)*i+t.y,ellipticalArcStartAngle:l,ellipticalArcEndAngle:l+o,ellipticalArcAngle:c,ellipticalArcCenter:t,resultantRx:e,resultantRy:n})}var dl=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)};function pl(t,e,n){var n=!(2<arguments.length&&void 0!==n)||n,r=t.arcParams,i=r.rx,i=void 0===i?0:i,a=r.ry,a=void 0===a?0:a,o=r.xRotation,s=r.arcFlag,r=r.sweepFlag,l=hl({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},e),i=hl({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},n?e+.005:e-.005),a=i.x-l.x,o=i.y-l.y,s=Math.sqrt(a*a+o*o);return{x:-a/s,y:-o/s}}function yl(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function vl(t,e){return yl(t)*yl(e)?(t[0]*e[0]+t[1]*e[1])/(yl(t)*yl(e)):1}function gl(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(vl(t,e))}function ml(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,a=t*i,i=e*i,o=n-t,t=n+t,s=r-e,e=r+e;return[["M",o,r],["C",o,r-i,n-a,s,n,s],["C",n+a,s,t,r-i,t,r],["C",t,r+i,n+a,e,n,e],["C",n-a,e,o,r+i,o,r],["Z"]]}function bl(t,e){var n,r,i,a,o,s,l,c,u,f,h,e=1<arguments.length&&void 0!==e?e:t.getLocalTransform(),d=[];switch(t.nodeName){case E.LINE:var p=t.parsedStyle,d=[["M",p.x1,p.y1],["L",p.x2,p.y2]];break;case E.CIRCLE:var p=t.parsedStyle,y=p.r;d=ml(y,y,p.cx,p.cy);break;case E.ELLIPSE:var y=t.parsedStyle;d=ml(y.rx,y.ry,y.cx,y.cy);break;case E.POLYLINE:case E.POLYGON:p=t.parsedStyle.points;y=p.points,p=t.nodeName===E.POLYGON,y=y.map(function(t,e){return[0===e?"M":"L",t[0],t[1]]}),p&&y.push(["Z"]),d=y;break;case E.RECT:var v=t.parsedStyle,g=v.width,m=v.height,b=v.x,x=v.y,v=v.radius,w=v&&v.some(function(t){return 0!==t});n=g,r=m,b=b,x=x,d=(w=w&&v.map(function(t){return dn(t,0,Math.min(Math.abs(g)/2,Math.abs(m)/2))}))?(s=(v=0<n?1:-1)+(o=0<r?1:-1)!=0?1:0,[["M",v*(i=(w=ei(w,4))[0])+b,x],["L",n-v*(a=w[1])+b,x],a?["A",a,a,0,0,s,n+b,o*a+x]:null,["L",n+b,r-o*(a=w[2])+x],a?["A",a,a,0,0,s,n+b-v*a,r+x]:null,["L",b+v*(a=w[3]),r+x],a?["A",a,a,0,0,s,b,r+x-o*a]:null,["L",b,o*i+x],i?["A",i,i,0,0,s,v*i+b,x]:null,["Z"]].filter(function(t){return t})):[["M",b,x],["L",b+n,x],["L",b+n,x+r],["L",b,x+r],["Z"]];break;case E.PATH:d=ni(t.parsedStyle.path.absolutePath)}if(d.length)return l=d,c=e,u=(e=(e=t).parsedStyle).defX,f=void 0===u?0:u,h=void 0===(u=e.defY)?0:u,l.reduce(function(t,e){var n,r,i,a="";return"M"===e[0]||"L"===e[0]?(n=k(e[1]-f,e[2]-h,0),c&&Kt(n,n,c),a="".concat(e[0]).concat(n[0],",").concat(n[1])):"Z"===e[0]?a=e[0]:"C"===e[0]?(n=k(e[1]-f,e[2]-h,0),r=k(e[3]-f,e[4]-h,0),i=k(e[5]-f,e[6]-h,0),c&&(Kt(n,n,c),Kt(r,r,c),Kt(i,i,c)),a="".concat(e[0]).concat(n[0],",").concat(n[1],",").concat(r[0],",").concat(r[1],",").concat(i[0],",").concat(i[1])):"A"===e[0]?(n=k(e[6]-f,e[7]-h,0),c&&Kt(n,n,c),a="".concat(e[0]).concat(e[1],",").concat(e[2],",").concat(e[3],",").concat(e[4],",").concat(e[5],",").concat(n[0],",").concat(n[1])):"Q"===e[0]&&(r=k(e[1]-f,e[2]-h,0),i=k(e[3]-f,e[4]-h,0),c&&(Kt(r,r,c),Kt(i,i,c)),a="".concat(e[0]).concat(e[1],",").concat(e[2],",").concat(e[3],",").concat(e[4],"}")),t+a},"")}function xl(t,e,n){var r=!1,i=!1,e=!!e&&!e.isNone,n=!!n&&!n.isNone;return"visiblepainted"===t||"painted"===t||"auto"===t?(r=e,i=n):"visiblefill"===t||"fill"===t?r=!0:"visiblestroke"===t||"stroke"===t?i=!0:"visible"!==t&&"all"!==t||(i=r=!0),[r,i]}function wl(){return this.call=this._createCall("sync"),this.call.apply(this,arguments)}function kl(){return this.callAsync=this._createCall("async"),this.callAsync.apply(this,arguments)}function El(){return this.promise=this._createCall("promise"),this.promise.apply(this,arguments)}function Ml(t){return jl.setup(this,t),jl.create(t)}function Ol(t){return Il.setup(this,t),Il.create(t)}function Sl(){throw new Error("tapAsync is not supported on a SyncHook")}function _l(){throw new Error("tapPromise is not supported on a SyncHook")}function Al(t){return Bl.setup(this,t),Bl.create(t)}function Pl(){throw new Error("tapAsync is not supported on a SyncWaterfallHook")}function Tl(){throw new Error("tapPromise is not supported on a SyncWaterfallHook")}function Ll(t){return zl.setup(this,t),zl.create(t)}var Nl=function(){function n(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:void 0;O(this,n),this.name=void 0,this.taps=void 0,this.promise=void 0,this._promise=void 0,this._args=t,this.name=e,this.taps=[],this.interceptors=[],this._call=wl,this.call=wl,this._callAsync=kl,this.callAsync=kl,this._promise=El,this.promise=El,this._x=void 0}return l(n,[{key:"compile",value:function(t){throw new Error("Abstract: should be overridden")}},{key:"_createCall",value:function(t){return this.compile({taps:this.taps,interceptors:this.interceptors,args:this._args,type:t})}},{key:"_tap",value:function(t,e,n){if("string"==typeof e)e={name:e.trim()};else if("object"!==Hr(e)||null===e)throw new Error("Invalid tap options");if("string"!=typeof e.name||""===e.name)throw new Error("Missing name for tap");e=Object.assign({type:t,fn:n},e),e=this._runRegisterInterceptors(e),this._insert(e)}},{key:"tap",value:function(t,e){this._tap("sync",t,e)}},{key:"tapAsync",value:function(t,e){this._tap("async",t,e)}},{key:"tapPromise",value:function(t,e){this._tap("promise",t,e)}},{key:"_runRegisterInterceptors",value:function(t){var e,n=ai(this.interceptors);try{for(n.s();!(e=n.n()).done;){var r,i=e.value;i.register&&void 0!==(r=i.register(t))&&(t=r)}}catch(t){n.e(t)}finally{n.f()}return t}},{key:"withOptions",value:function(e){function n(t){return Object.assign({},e,"string"==typeof t?{name:t}:t)}var r=this;return{name:this.name,tap:function(t,e){return r.tap(n(t),e)},tapAsync:function(t,e){return r.tapAsync(n(t),e)},tapPromise:function(t,e){return r.tapPromise(n(t),e)},isUsed:function(){return r.isUsed()},withOptions:function(t){return r.withOptions(n(t))}}}},{key:"isUsed",value:function(){return 0<this.taps.length||0<this.interceptors.length}},{key:"_resetCompilation",value:function(){this.call=this._call,this.callAsync=this._callAsync,this.promise=this._promise}},{key:"_insert",value:function(t){this._resetCompilation(),"string"==typeof t.before?e=new Set([t.before]):Array.isArray(t.before)&&(e=new Set(t.before));for(var e,n=0,r=("number"==typeof t.stage&&(n=t.stage),this.taps.length);0<r;){r--;var i=this.taps[r],a=(this.taps[r+1]=i).stage||0;if(e){if(e.has(i.name)){e.delete(i.name);continue}if(0<e.size)continue}if(!(n<a)){r++;break}}this.taps[r]=t}}]),n}(),Cl=function(){function e(t){O(this,e),this.config=t,this.options=void 0,this._args=void 0}return l(e,[{key:"create",value:function(t){var e;switch(this.init(t),this.options.type){case"sync":e=new Function(this.args(),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"throw ".concat(t,";\n")},onResult:function(t){return"return ".concat(t,";\n")},resultReturns:!0,onDone:function(){return""},rethrowIfPossible:!0}));break;case"async":e=new Function(this.args({after:"_callback"}),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"_callback(".concat(t,");\n")},onResult:function(t){return"_callback(null, ".concat(t,");\n")},onDone:function(){return"_callback();\n"}}));break;case"promise":var n=!1,r=this.contentWithInterceptors({onError:function(t){return n=!0,"_error(".concat(t,");\n")},onResult:function(t){return"_resolve(".concat(t,");\n")},onDone:function(){return"_resolve();\n"}}),i="",i=(i+='"use strict";\n')+this.header()+"return new Promise((function(_resolve, _reject) {\n";n&&(i+="var _sync = true;\nfunction _error(_err) {\nif(_sync)\n_resolve(Promise.resolve().then((function() { throw _err; })));\nelse\n_reject(_err);\n};\n"),i+=r,n&&(i+="_sync = false;\n"),i+="}));\n",e=new Function(this.args(),i)}return this.deinit(),e}},{key:"setup",value:function(t,e){t._x=e.taps.map(function(t){return t.fn})}},{key:"init",value:function(t){this.options=t,this._args=t.args.slice()}},{key:"deinit",value:function(){this.options=void 0,this._args=void 0}},{key:"contentWithInterceptors",value:function(t){var r=this;if(0<this.options.interceptors.length){for(var i=t.onError,a=t.onResult,n=t.onDone,e="",o=0;o<this.options.interceptors.length;o++){var s=this.options.interceptors[o];s.call&&(e+="".concat(this.getInterceptor(o),".call(").concat(this.args({before:s.context?"_context":void 0}),");\n"))}return e+=this.content(Object.assign(t,{onError:i&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].error&&(e+="".concat(r.getInterceptor(n),".error(").concat(t,");\n"));return e+=i(t)},onResult:a&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].result&&(e+="".concat(r.getInterceptor(n),".result(").concat(t,");\n"));return e+=a(t)},onDone:n&&function(){for(var t="",e=0;e<r.options.interceptors.length;e++)r.options.interceptors[e].done&&(t+="".concat(r.getInterceptor(e),".done();\n"));return t+=n()}}))}return this.content(t)}},{key:"header",value:function(){var t="";return this.needContext()?t+="var _context = {};\n":t+="var _context;\n",t+="var _x = this._x;\n",0<this.options.interceptors.length&&(t+="var _taps = this.taps;\nvar _interceptors = this.interceptors;\n"),t}},{key:"needContext",value:function(){var t,e=ai(this.options.taps);try{for(e.s();!(t=e.n()).done;)if(t.value.context)return!0}catch(t){e.e(t)}finally{e.f()}return!1}},{key:"callTap",value:function(t,e){for(var n=e.onError,r=e.onResult,i=e.onDone,a=e.rethrowIfPossible,o="",s=!1,l=0;l<this.options.interceptors.length;l++){var c=this.options.interceptors[l];c.tap&&(s||(o+="var _tap".concat(t," = ").concat(this.getTap(t),";\n"),s=!0),o+="".concat(this.getInterceptor(l),".tap(").concat(c.context?"_context, ":"","_tap").concat(t,");\n"))}o+="var _fn".concat(t," = ").concat(this.getTapFn(t),";\n");var u=this.options.taps[t];switch(u.type){case"sync":a||(o=o+"var _hasError".concat(t," = false;\n")+"try {\n"),o+=(r?"var _result".concat(t," = _fn"):"_fn").concat(t,"(").concat(this.args({before:u.context?"_context":void 0}),");\n"),a||(o=(o=(o=(o+="} catch(_err) {\n")+"_hasError".concat(t," = true;\n"))+n("_err")+"}\n")+"if(!_hasError".concat(t,") {\n")),r&&(o+=r("_result".concat(t))),i&&(o+=i()),a||(o+="}\n");break;case"async":var f="",f=(f=(f+=(r?"(function(_err".concat(t,", _result"):"(function(_err").concat(t,") {\n"))+"if(_err".concat(t,") {\n"))+n("_err".concat(t))+"} else {\n";r&&(f+=r("_result".concat(t))),i&&(f+=i()),f=f+"}\n"+"})",o+="_fn".concat(t,"(").concat(this.args({before:u.context?"_context":void 0,after:f}),");\n");break;case"promise":o=(o=(o=(o=(o=(o+="var _hasResult".concat(t," = false;\n"))+"var _promise".concat(t," = _fn").concat(t,"(").concat(this.args({before:u.context?"_context":void 0}),");\n"))+"if (!_promise".concat(t," || !_promise").concat(t,".then)\n"))+" throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise".concat(t," + ')');\n"))+"_promise".concat(t,".then((function(_result").concat(t,") {\n"))+"_hasResult".concat(t," = true;\n"),r&&(o+=r("_result".concat(t))),i&&(o+=i()),o=(o=(o+="}), function(_err".concat(t,") {\n"))+"if(_hasResult".concat(t,") throw _err").concat(t,";\n"))+n("_err".concat(t))+"});\n"}return o}},{key:"callTapsSeries",value:function(t){var a=this,o=t.onError,s=t.onResult,e=t.resultReturns,l=t.onDone,n=t.doneReturns,c=t.rethrowIfPossible;if(0===this.options.taps.length)return l();for(var u=this.options.taps.findIndex(function(t){return"sync"!==t.type}),f=e||n,h="",d=l,p=0,r=function(t){function e(t){return t?"":l()}var n=t,r=(d!==l&&("sync"!==a.options.taps[n].type||20<p++)&&(p=0,h=(h+="function _next".concat(n,"() {\n"))+d()+"}\n",d=function(){return"".concat(f?"return ":"","_next").concat(n,"();\n")}),d),i=a.callTap(n,{onError:function(t){return o(n,t,r,e)},onResult:s&&function(t){return s(n,t,r,e)},onDone:!s&&r,rethrowIfPossible:c&&(u<0||n<u)});d=function(){return i}},i=this.options.taps.length-1;0<=i;i--)r(i);return h+=d()}},{key:"callTapsLooping",value:function(t){var e=t.onError,n=t.onDone,t=t.rethrowIfPossible;if(0===this.options.taps.length)return n();var a=this.options.taps.every(function(t){return"sync"===t.type}),r="";a||(r+="var _looper = (function() {\nvar _loopAsync = false;\n");for(var r=(r+="var _loop;\n")+"do {\n"+"_loop = false;\n",i=0;i<this.options.interceptors.length;i++){var o=this.options.interceptors[i];o.loop&&(r+="".concat(this.getInterceptor(i),".loop(").concat(this.args({before:o.context?"_context":void 0}),");\n"))}return r=r+this.callTapsSeries({onError:e,onResult:function(t,e,n,r){var i=(i="")+"if(".concat(e," !== undefined) {\n")+"_loop = true;\n";return a||(i+="if(_loopAsync) _looper();\n"),i=(i=i+r(!0)+"} else {\n")+n()+"}\n"},onDone:n&&function(){var t="";return(t+="if(!_loop) {\n")+n()+"}\n"},rethrowIfPossible:t&&a})+"} while(_loop);\n",a||(r+="_loopAsync = true;\n});\n_looper();\n"),r}},{key:"callTapsParallel",value:function(t){var e=this,a=t.onError,o=t.onResult,s=t.onDone,l=t.rethrowIfPossible,t=t.onTap,c=void 0===t?function(t,e){return e()}:t;if(this.options.taps.length<=1)return this.callTapsSeries({onError:a,onResult:o,onDone:s,rethrowIfPossible:l});for(var u="",n=(u=(u+="do {\n")+"var _counter = ".concat(this.options.taps.length,";\n"),s&&(u=(u+="var _done = (function() {\n")+s()+"});\n"),function(n){function r(){return s?"if(--_counter === 0) _done();\n":"--_counter;"}function i(t){return t||!s?"_counter = 0;\n":"_counter = 0;\n_done();\n"}u=(u+="if(_counter <= 0) break;\n")+c(n,function(){return e.callTap(n,{onError:function(t){var e="";return(e+="if(_counter > 0) {\n")+a(n,t,r,i)+"}\n"},onResult:o&&function(t){var e="";return(e+="if(_counter > 0) {\n")+o(n,t,r,i)+"}\n"},onDone:!o&&r,rethrowIfPossible:l})},r,i)}),r=0;r<this.options.taps.length;r++)n(r);return u+="} while(false);\n"}},{key:"args",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.before,t=t.after,n=this._args;return e&&(n=[e].concat(n)),0===(n=t?n.concat(t):n).length?"":n.join(", ")}},{key:"getTapFn",value:function(t){return"_x[".concat(t,"]")}},{key:"getTap",value:function(t){return"_taps[".concat(t,"]")}},{key:"getInterceptor",value:function(t){return"_interceptors[".concat(t,"]")}}]),e}(),jl=new(function(){f(e,Cl);var t=h(e);function e(){return O(this,e),t.apply(this,arguments)}return l(e,[{key:"content",value:function(t){var i=t.onError,t=t.onDone;return this.callTapsParallel({onError:function(t,e,n,r){return i(e)+r(!0)},onDone:t})}}]),e}()),Rl=function(){f(r,Nl);var n=h(r);function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:void 0;return O(this,r),(t=n.call(this,t,e)).compile=Ml,t._call=void 0,t.call=void 0,t}return l(r)}(),Il=new(function(){f(e,Cl);var t=h(e);function e(){return O(this,e),t.apply(this,arguments)}return l(e,[{key:"content",value:function(t){var i=this,a=t.onError,e=t.onResult;return t.onDone,this.callTapsSeries({onError:function(t,e,n,r){return a(e)+r(!0)},onResult:function(t,e,n){var r="";return(r+="if(".concat(e," !== undefined) {\n"))+"".concat(i._args[0]," = ").concat(e,";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])}})}}]),e}()),Fl=function(){f(r,Nl);var n=h(r);function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:void 0;return O(this,r),(t=n.call(this,t,e)).compile=Ol,t._call=void 0,t.call=void 0,t}return l(r)}(),Bl=new(function(){f(e,Cl);var t=h(e);function e(){return O(this,e),t.apply(this,arguments)}return l(e,[{key:"content",value:function(t){var n=t.onError,e=t.onDone,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onDone:e,rethrowIfPossible:t})}}]),e}()),Dl=function(){f(r,Nl);var n=h(r);function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:void 0;return O(this,r),(t=n.call(this,t,e)).tapAsync=Sl,t.tapPromise=_l,t.compile=Al,t}return l(r)}(),zl=new(function(){f(e,Cl);var t=h(e);function e(){return O(this,e),t.apply(this,arguments)}return l(e,[{key:"content",value:function(t){var i=this,n=t.onError,e=t.onResult,r=t.resultReturns,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onResult:function(t,e,n){var r="";return(r+="if(".concat(e," !== undefined) {\n"))+"".concat(i._args[0]," = ").concat(e,";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])},doneReturns:r,rethrowIfPossible:t})}}]),e}()),Gl=function(){f(r,Dl);var n=h(r);function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:void 0;return O(this,r),(t=n.call(this,t,e)).tapAsync=Pl,t.tapPromise=Tl,t.compile=Ll,t}return l(r)}(),Wl=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Vl=/([\"\'])[^\'\"]+\1/;function Yl(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");var n=Date.now(),e=16<(e=n-nc)?0:16-e,r=Zl();return ec[r]=t,1<Object.keys(ec).length||setTimeout(function(){nc=n;var e=ec;ec={},Object.keys(e).forEach(function(t){return e[t](tc())})},e),r}function Hl(t){delete ec[t]}function ql(t){return"string"!=typeof t?Yl:""===t?Jl.requestAnimationFrame:Jl[t+"RequestAnimationFrame"]}var Ul,Xl,Kl,$l=1,Zl=function(){return $l++},Jl="object"===("undefined"==typeof self?"undefined":Hr(self))&&self.self==self?self:"object"===(void 0===p?"undefined":Hr(p))&&p.global==p?p:{},Ql=Date.now(),tc=function(){return Jl.performance&&"function"==typeof Jl.performance.now?Jl.performance.now():Date.now()-Ql},ec={},nc=Date.now(),rc=function(t,e){for(var n=0;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}}(["","webkit","moz","ms","o"],ql),ic=ql(rc),ac="string"!=typeof(rc=rc)?Hl:""===rc?Jl.cancelAnimationFrame:Jl[rc+"CancelAnimationFrame"]||Jl[rc+"CancelRequestAnimationFrame"],oc=(Jl.requestAnimationFrame=ic,Jl.cancelAnimationFrame=ac,[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:i.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:i.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:i.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:i.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:i.PAINT},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:i.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:i.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:i.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:i.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:i.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:i.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:i.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:i.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:i.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:i.FILTER},{n:"clipPath",syntax:i.DEFINED_PATH},{n:"textPath",syntax:i.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:i.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===E.CIRCLE||t===E.ELLIPSE?"center":t===E.TEXT?"text-anchor":"left top"},l:!0,syntax:i.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===E.CIRCLE||t===E.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:i.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:i.COORDINATE},{n:"cy",int:!0,d:"0",syntax:i.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:i.COORDINATE},{n:"y",int:!0,d:"0",syntax:i.COORDINATE},{n:"z",int:!0,d:"0",syntax:i.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:i.COORDINATE},{n:"y1",int:!0,l:!0,syntax:i.COORDINATE},{n:"z1",int:!0,l:!0,syntax:i.COORDINATE},{n:"x2",int:!0,l:!0,syntax:i.COORDINATE},{n:"y2",int:!0,l:!0,syntax:i.COORDINATE},{n:"z2",int:!0,l:!0,syntax:i.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:i.PATH,p:50},{n:"points",l:!0,syntax:i.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:i.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:i.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:i.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:i.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:i.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:i.NUMBER,d:function(t){return t===E.PATH||t===E.POLYGON||t===E.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:i.MARKER},{n:"markerEnd",syntax:i.MARKER},{n:"markerMid",syntax:i.MARKER},{n:"markerStartOffset",syntax:i.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:i.LENGTH,l:!0,int:!0,d:"0"}]),sc={},lc=new WeakMap,cc={},uc=En(function(t){return t.sort(function(t,e){return cc[t]-cc[e]})}),fc=g(),hc=g(),dc=g(),rc=function(){function t(){var e=this;O(this,t),oc.forEach(function(t){e.registerMetadata(t)})}return l(t,[{key:"registerMetadata",value:function(e){[e.n].concat(ni(e.a||[])).forEach(function(t){sc[t]=e,cc[t]=e.p||0})}},{key:"unregisterMetadata",value:function(t){delete sc[t]}},{key:"getPropertySyntax",value:function(t){return w.CSSPropertySyntaxFactory[t]}},{key:"processProperties",value:function(n,r){var i=this,t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[]},a=t.skipUpdateAttribute,e=t.skipParse,o=t.forceUpdateGeometry,t=t.usedAttributes,s=o,o=Object.keys(r);o.forEach(function(t){var e=mi(t);a||(n.attributes[e]=r[t]),!s&&null!=(t=sc[e])&&t.l&&(s=!0)}),e||o.forEach(function(t){n.computedStyle[t]=i.parseProperty(t,n.attributes[t],n)}),(o=uc(null!=t&&t.length?Array.from(new Set(o.concat(t))):o)).forEach(function(t){t in n.computedStyle&&(n.parsedStyle[t]=i.computeProperty(t,n.computedStyle[t],n))}),s&&this.updateGeometry(n),o.forEach(function(t){t in n.parsedStyle&&i.postProcessProperty(t,n)}),n.children.length&&o.forEach(function(e){e in n.parsedStyle&&i.isPropertyInheritable(e)&&n.children.forEach(function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})})})}},{key:"parseProperty",value:function(t,e,n){var r,t=sc[t],i=e;return"unset"===(e=""!==e&&!_(e)?e:"unset")||"initial"===e||"inherit"===e?i=ra(e):t&&(r=t.k,t=(t=t.syntax)&&this.getPropertySyntax(t),r&&-1<r.indexOf(e)?i=ra(e):t&&t.parser&&(i=t.parser(e,n))),i}},{key:"computeProperty",value:function(t,e,n){var r=sc[t],i="g-root"===n.id,a=e;if(r){var o=r.syntax,s=r.inh,r=r.d;if(e instanceof Wi){var l=e.value;if("initial"===(l="unset"===l?s&&!i?"inherit":"initial":l))_(r)||(e=this.parseProperty(t,vi(r)?r(n.nodeName):r,n));else if("inherit"===l)return s=this.tryToResolveProperty(n,t,{inherited:!0}),_(s)?void this.addUnresolveProperty(n,t):s}i=o&&this.getPropertySyntax(o);a=i&&i.calculator?(r=n.parsedStyle[t],i.calculator(t,r,e,n,this)):e instanceof Wi?e.value:e}return a}},{key:"postProcessProperty",value:function(t,e){var t=sc[t];t&&t.syntax&&(t=t.syntax&&this.getPropertySyntax(t.syntax))&&t.postProcessor&&t.postProcessor(e)}},{key:"addUnresolveProperty",value:function(t,e){var n=lc.get(t);n||(lc.set(t,[]),n=lc.get(t)),-1===n.indexOf(e)&&n.push(e)}},{key:"tryToResolveProperty",value:function(t,e){var n=(2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).inherited;if(n&&(t.parentElement&&function(t,e){t=lc.get(t);return!t||0===t.length||t.includes(e)}(t.parentElement,e)))return"unset"===(n=t.parentElement.parsedStyle[e])||"initial"===n||"inherit"===n?void 0:n}},{key:"recalc",value:function(e){var n,t=lc.get(e);t&&t.length&&(n={},t.forEach(function(t){n[t]=e.attributes[t]}),this.processProperties(e,n),lc.delete(e))}},{key:"updateGeometry",value:function(t){var s,e,n,r,i,a,o,l,c,u,f,h,d,p,y,v,g,m=w.geometryUpdaterFactory[t.nodeName];m&&((s=t.geometry).contentBounds||(s.contentBounds=new li),s.renderBounds||(s.renderBounds=new li),e=t.parsedStyle,d=(m=m.update(e,t)).width,h=m.height,p=void 0===(p=m.depth)?0:p,f=void 0===(f=m.offsetX)?0:f,g=void 0===(g=m.offsetY)?0:g,m=void 0===(m=m.offsetZ)?0:m,n=d<0,r=h<0,p=Gt(fc,Math.abs(d)/2,Math.abs(h)/2,p/2),l=e.stroke,c=e.lineWidth,u=e.increasedLineWidthForHitTesting,v=e.shadowType,y=e.shadowColor,i=void 0===(i=e.filter)?[]:i,a=e.transformOrigin,o=e.anchor,t.nodeName===E.TEXT&&delete e.anchor,d=Gt(hc,(1-2*(o&&o[0]||0))*d/2+f,(1-2*(o&&o[1]||0))*h/2+g,(1-2*(o&&o[2]||0))*p[2]+m),s.contentBounds.update(d,p),f=t.nodeName===E.POLYLINE||t.nodeName===E.POLYGON||t.nodeName===E.PATH?Math.SQRT2:.5,l&&!l.isNone&&Wt(p,p,Gt(dc,h=((c||0)+(u||0))*f,h,0)),s.renderBounds.update(d,p),y&&v&&"inner"!==v&&(m=(g=s.renderBounds).min,l=g.max,c=e.shadowBlur||0,u=e.shadowOffsetX||0,f=e.shadowOffsetY||0,h=m[0]-c+u,d=l[0]+c+u,p=m[1]-c+f,y=l[1]+c+f,m[0]=Math.min(m[0],h),l[0]=Math.max(l[0],d),m[1]=Math.min(m[1],p),l[1]=Math.max(l[1],y),s.renderBounds.setMinMax(m,l)),i.forEach(function(t){var e,n,r,i,a,o=t.name,t=t.params;"blur"===o?(i=t[0].value,s.renderBounds.update(s.renderBounds.center,Wt(s.renderBounds.halfExtents,s.renderBounds.halfExtents,k(i,i,0)))):"drop-shadow"===o&&(i=t[0].value,o=t[1].value,t=t[2].value,e=(n=s.renderBounds).min,n=n.max,r=e[0]-t+i,i=n[0]+t+i,a=e[1]-t+o,t=n[1]+t+o,e[0]=Math.min(e[0],r),n[0]=Math.max(n[0],i),e[1]=Math.min(e[1],a),n[1]=Math.max(n[1],t),s.renderBounds.setMinMax(e,n))}),o=e.anchor,v=(n?-1:1)*Ia(a[0],0,t),g=(r?-1:1)*Ia(a[1],1,t),v-=(n?-1:1)*(o&&o[0]||0)*s.contentBounds.halfExtents[0]*2,g-=(r?-1:1)*(o&&o[1]||0)*s.contentBounds.halfExtents[1]*2,t.setOrigin(v,g),w.sceneGraphService.dirtifyToRoot(t))}},{key:"isPropertyInheritable",value:function(t){t=sc[t];return!!t&&t.inh}}]),t}();(mc=Ul=Ul||{})[mc.ORBITING=0]="ORBITING",mc[mc.EXPLORING=1]="EXPLORING",mc[mc.TRACKING=2]="TRACKING",(mc=Xl=Xl||{})[mc.DEFAULT=0]="DEFAULT",mc[mc.ROTATIONAL=1]="ROTATIONAL",mc[mc.TRANSLATIONAL=2]="TRANSLATIONAL",mc[mc.CINEMATIC=3]="CINEMATIC",(mc=Kl=Kl||{})[mc.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",mc[mc.PERSPECTIVE=1]="PERSPECTIVE";var pc,yc,vc="updated",gc=function(){function t(){O(this,t),this.canvas=void 0,this.eventEmitter=new Wr,this.matrix=ft(),this.right=k(1,0,0),this.up=k(0,1,0),this.forward=k(0,0,1),this.position=k(0,0,1),this.focalPoint=k(0,0,0),this.distanceVector=k(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.left=void 0,this.rright=void 0,this.top=void 0,this.bottom=void 0,this.projectionMatrix=ft(),this.projectionMatrixInverse=ft(),this.jitteredProjectionMatrix=void 0,this.view=void 0,this.enableUpdate=!0,this.type=Ul.EXPLORING,this.trackingMode=Xl.DEFAULT,this.projectionMode=Kl.PERSPECTIVE,this.frustum=new ui,this.orthoMatrix=ft()}return l(t,[{key:"isOrtho",value:function(){return this.projectionMode===Kl.ORTHOGRAPHIC}},{key:"getProjectionMode",value:function(){return this.projectionMode}},{key:"getPerspective",value:function(){return this.jitteredProjectionMatrix||this.projectionMatrix}},{key:"getPerspectiveInverse",value:function(){return this.projectionMatrixInverse}},{key:"getFrustum",value:function(){return this.frustum}},{key:"getPosition",value:function(){return this.position}},{key:"getFocalPoint",value:function(){return this.focalPoint}},{key:"getDollyingStep",value:function(){return this.dollyingStep}},{key:"getNear",value:function(){return this.near}},{key:"getFar",value:function(){return this.far}},{key:"getZoom",value:function(){return this.zoom}},{key:"getOrthoMatrix",value:function(){return this.orthoMatrix}},{key:"getView",value:function(){return this.view}},{key:"setEnableUpdate",value:function(t){this.enableUpdate=t}},{key:"setType",value:function(t,e){return this.type=t,this.type===Ul.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===Ul.TRACKING&&void 0!==e&&this.setTrackingMode(e),this}},{key:"setProjectionMode",value:function(t){return this.projectionMode=t,this}},{key:"setTrackingMode",value:function(t){if(this.type!==Ul.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this}},{key:"setWorldRotation",value:function(t){return this.rotateWorld=t,this._getAngles(),this}},{key:"getViewTransform",value:function(){return gt(ft(),this.matrix)}},{key:"getWorldTransform",value:function(){return this.matrix}},{key:"jitterProjectionMatrix",value:function(t,e){t=Mt(ft(),[t,e,0]);this.jitteredProjectionMatrix=bt(ft(),t,this.projectionMatrix)}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0}},{key:"setMatrix",value:function(t){return this.matrix=t,this._update(),this}},{key:"setFov",value:function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this}},{key:"setAspect",value:function(t){return this.setPerspective(this.near,this.far,this.fov,t),this}},{key:"setNear",value:function(t){return this.projectionMode===Kl.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this}},{key:"setFar",value:function(t){return this.projectionMode===Kl.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this}},{key:"setViewOffset",value:function(t,e,n,r,i,a){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=a,this.projectionMode===Kl.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"clearViewOffset",value:function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===Kl.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"setZoom",value:function(t){return this.zoom=t,this.projectionMode===Kl.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===Kl.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this}},{key:"setZoomByViewportPoint",value:function(t,e){var n=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),r=n.x,n=n.y,i=this.roll,t=(this.rotate(0,0,-i),this.setPosition(r,n),this.setFocalPoint(r,n),this.setZoom(t),this.rotate(0,0,i),this.canvas.viewport2Canvas({x:e[0],y:e[1]})),i=k(t.x-r,t.y-n,0),e=qt(i,this.right)/Dt(this.right),r=qt(i,this.up)/Dt(this.up);return this.pan(-e,-r),this}},{key:"setPerspective",value:function(t,e,n,r){this.projectionMode=Kl.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,a,o,s,n=this.near*Math.tan(As(.5*this.fov))/this.zoom,e=2*n,r=this.aspect*e,l=-.5*r;return null!=(i=this.view)&&i.enabled&&(i=this.view.fullWidth,a=this.view.fullHeight,l+=this.view.offsetX*r/i,n-=this.view.offsetY*e/a,r*=this.view.width/i,e*=this.view.height/a),i=this.projectionMatrix,l=(a=l)+r,n=(r=n)-e,e=this.far,o=2*t/(r-n),s=(l+a)/(l-a),r=(r+n)/(r-n),n=-(e+t)/(e-t),e=-2*e*t/(e-t),i[0]=2*t/(l-a),i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=o,i[6]=0,i[7]=0,i[8]=s,i[9]=r,i[10]=n,i[11]=-1,i[12]=0,i[13]=0,i[14]=e,i[15]=0,wt(this.projectionMatrix,this.projectionMatrix,k(1,-1,1)),gt(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this}},{key:"setOrthographic",value:function(t,e,n,r,i,a){this.projectionMode=Kl.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=a;var o,e=(this.rright-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.rright+this.left)/2,r=(this.top+this.bottom)/2,s=n-e,n=n+e,e=r+t,r=r-t;return null!=(t=this.view)&&t.enabled&&(t=(this.rright-this.left)/this.view.fullWidth/this.zoom,o=(this.top-this.bottom)/this.view.fullHeight/this.zoom,n=(s+=t*this.view.offsetX)+t*this.view.width,r=(e-=o*this.view.offsetY)-o*this.view.height),jt(this.projectionMatrix,s,n,r,e,i,a),wt(this.projectionMatrix,this.projectionMatrix,k(1,-1,1)),gt(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this}},{key:"setPosition",value:function(t){t=_s(t,(1<arguments.length&&void 0!==arguments[1]?arguments:this.position)[1],(2<arguments.length&&void 0!==arguments[2]?arguments:this.position)[2]);return this._setPosition(t),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this}},{key:"setFocalPoint",value:function(t){var e,n=(1<arguments.length&&void 0!==arguments[1]?arguments:this.focalPoint)[1],r=(2<arguments.length&&void 0!==arguments[2]?arguments:this.focalPoint)[2],i=k(0,1,0);return this.focalPoint=_s(t,n,r),this.trackingMode===Xl.CINEMATIC&&(t=(e=Vt(g(),this.focalPoint,this.position))[0],n=e[1],r=e[2],e=Dt(e),n=Ps(Math.asin(n/e)),e=90+Ps(Math.atan2(r,t)),Et(r=ft(),r,As(e)),kt(r,r,As(n)),i=Kt(g(),[0,1,0],r)),gt(this.matrix,Rt(ft(),this.position,this.focalPoint,i)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this}},{key:"getDistance",value:function(){return this.distance}},{key:"getDistanceVector",value:function(){return this.distanceVector}},{key:"setDistance",value:function(t){var e,n,r;return this.distance===t||t<0||(this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100,e=g(),t=this.distance,n=this.forward,r=this.focalPoint,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}},{key:"setMaxDistance",value:function(t){return this.maxDistance=t,this}},{key:"setMinDistance",value:function(t){return this.minDistance=t,this}},{key:"setAzimuth",value:function(t){return this.azimuth=Ss(t),this.computeMatrix(),this._getAxes(),this.type===Ul.ORBITING||this.type===Ul.EXPLORING?this._getPosition():this.type===Ul.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getAzimuth",value:function(){return this.azimuth}},{key:"setElevation",value:function(t){return this.elevation=Ss(t),this.computeMatrix(),this._getAxes(),this.type===Ul.ORBITING||this.type===Ul.EXPLORING?this._getPosition():this.type===Ul.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getElevation",value:function(){return this.elevation}},{key:"setRoll",value:function(t){return this.roll=Ss(t),this.computeMatrix(),this._getAxes(),this.type===Ul.ORBITING||this.type===Ul.EXPLORING?this._getPosition():this.type===Ul.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getRoll",value:function(){return this.roll}},{key:"_update",value:function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()}},{key:"computeMatrix",value:function(){var t=ie(re(),[0,0,1],As(this.roll)),e=(yt(this.matrix),ie(re(),[1,0,0],As((this.rotateWorld&&this.type!==Ul.TRACKING||this.type===Ul.TRACKING?1:-1)*this.elevation))),n=ie(re(),[0,1,0],As((this.rotateWorld&&this.type!==Ul.TRACKING||this.type===Ul.TRACKING?1:-1)*this.azimuth)),n=ae(re(),n,e),n=ae(re(),n,t),e=Lt(ft(),n);this.type===Ul.ORBITING||this.type===Ul.EXPLORING?(xt(this.matrix,this.matrix,this.focalPoint),bt(this.matrix,this.matrix,e),xt(this.matrix,this.matrix,[0,0,this.distance])):this.type===Ul.TRACKING&&(xt(this.matrix,this.matrix,this.position),bt(this.matrix,this.matrix,e))}},{key:"_setPosition",value:function(t,e,n){this.position=_s(t,e,n);t=this.matrix;t[12]=this.position[0],t[13]=this.position[1],t[14]=this.position[2],t[15]=1,this._getOrthoMatrix()}},{key:"_getAxes",value:function(){zt(this.right,_s(ne(ee(),[1,0,0,0],this.matrix))),zt(this.up,_s(ne(ee(),[0,1,0,0],this.matrix))),zt(this.forward,_s(ne(ee(),[0,0,1,0],this.matrix))),Ht(this.right,this.right),Ht(this.up,this.up),Ht(this.forward,this.forward)}},{key:"_getAngles",value:function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=Dt(this.distanceVector);0===r?(this.elevation=0,this.azimuth=0):this.type===Ul.TRACKING||this.rotateWorld?(this.elevation=Ps(Math.asin(e/r)),this.azimuth=Ps(Math.atan2(-t,-n))):(this.elevation=-Ps(Math.asin(e/r)),this.azimuth=-Ps(Math.atan2(-t,-n)))}},{key:"_getPosition",value:function(){zt(this.position,_s(ne(ee(),[0,0,0,1],this.matrix))),this._getDistance()}},{key:"_getFocalPoint",value:function(){var t,e;$t(this.distanceVector,[0,0,-this.distance],(t=ct(),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)),Wt(this.focalPoint,this.position,this.distanceVector),this._getDistance()}},{key:"_getDistance",value:function(){this.distanceVector=Vt(g(),this.focalPoint,this.position),this.distance=Dt(this.distanceVector),this.dollyingStep=this.distance/100}},{key:"_getOrthoMatrix",value:function(){var t,e;this.projectionMode===Kl.ORTHOGRAPHIC&&(t=this.position,e=ie(re(),[0,0,1],-this.roll*Math.PI/180),Tt(this.orthoMatrix,e,k((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),k(this.zoom,this.zoom,1),t))}},{key:"triggerUpdate",value:function(){var t;this.enableUpdate&&(t=this.getViewTransform(),t=bt(ft(),this.getPerspective(),t),this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(vc))}},{key:"rotate",value:function(t,e,n){throw new Error(Ri)}},{key:"pan",value:function(t,e){throw new Error(Ri)}},{key:"dolly",value:function(t){throw new Error(Ri)}},{key:"createLandmark",value:function(t,e){throw new Error(Ri)}},{key:"gotoLandmark",value:function(t,e){throw new Error(Ri)}}]),t}(),mc=function(){function t(){O(this,t)}return l(t,[{key:"update",value:function(t,e){t=t.r;return{width:2*t,height:2*t}}}]),t}(),bc=function(){function t(){O(this,t)}return l(t,[{key:"update",value:function(t,e){return{width:2*t.rx,height:2*t.ry}}}]),t}(),xc=function(){function t(){O(this,t)}return l(t,[{key:"update",value:function(t){var e=t.x1,n=t.y1,r=t.x2,t=t.y2,i=Math.min(e,r),e=Math.max(e,r),r=Math.min(n,t);return{width:e-i,height:Math.max(n,t)-r}}}]),t}(),wc=function(){function t(){O(this,t)}return l(t,[{key:"update",value:function(t){t=t.path.rect;return{width:t.width,height:t.height}}}]),t}(),kc=function(){function t(){O(this,t)}return l(t,[{key:"update",value:function(t){var t=t.points.points,e=Math.min.apply(Math,ni(t.map(function(t){return t[0]}))),n=Math.max.apply(Math,ni(t.map(function(t){return t[0]}))),r=Math.min.apply(Math,ni(t.map(function(t){return t[1]})));return{width:n-e,height:Math.max.apply(Math,ni(t.map(function(t){return t[1]})))-r}}}]),t}(),Ec=function(){function t(){O(this,t)}return l(t,[{key:"update",value:function(t,e){var n=t.img,r=t.width,i=t.height,r=void 0===r?0:r,i=void 0===i?0:i;return n&&!hn(n)&&(r||(r=n.width,t.width=r),i||(i=n.height,t.height=i)),{width:r,height:i}}}]),t}(),Mc=function(){function e(t){O(this,e),this.globalRuntime=void 0,this.globalRuntime=t}return l(e,[{key:"isReadyToMeasure",value:function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,a=t.fontSize,o=t.fontStyle,s=t.fontWeight,l=t.fontVariant,t=t.lineWidth;return n&&a&&o&&s&&l&&r&&i&&!_(t)}},{key:"update",value:function(t,e){var n,r,i=t.text,a=t.textAlign,o=t.lineWidth,s=t.textBaseline,l=t.dx,c=t.dy,u=((null==e||null==(u=e.ownerDocument)||null==(u=u.defaultView)?void 0:u.getConfig())||{}).offscreenCanvas;return this.isReadyToMeasure(t,e)?(e=this.globalRuntime.textService.measureText(i,t,u),i=(t.metrics=e).width,u=e.height,n=e.lineHeight,e=e.fontProperties,i=[i/2,u/2,0],u=[0,1],r=0,"center"===a||"middle"===a?(r=o/2,u=[.5,1]):"right"!==a&&"end"!==a||(r=o,u=[1,1]),a=0,"middle"===s?a=i[1]:"top"===s||"hanging"===s?a=2*i[1]:"alphabetic"===s?a=n-e.ascent:"bottom"!==s&&"ideographic"!==s||(a=0),l&&(r+=l),c&&(a+=c),t.anchor=[u[0],u[1],0],{width:2*i[0],height:2*i[1],offsetX:r,offsetY:a}):(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})}}]),e}(),Oc=function(){function n(t,e){var h=this;O(this,n),this.globalRuntime=void 0,this.context=void 0,this.rootTarget=void 0,this.emitter=new Wr,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.pickHandler=void 0,this.tmpMatrix=ft(),this.tmpVec3=g(),this.onPointerDown=function(){var e=Ur(M().mark(function t(e){var n,r;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Uo){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,h.createPointerEvent(e);case 4:n=t.sent,h.dispatchEvent(n,"pointerdown"),"touch"===n.pointerType?h.dispatchEvent(n,"touchstart"):"mouse"!==n.pointerType&&"pen"!==n.pointerType||(r=2===n.button,h.dispatchEvent(n,r?"rightdown":"mousedown")),h.trackingData(e.pointerId).pressTargetsByButton[e.button]=n.composedPath(),h.freeEvent(n);case 10:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerUp=function(){var e=Ur(M().mark(function t(e){var n,r,i,a,o,s,l;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Uo){t.next=2;break}return t.abrupt("return");case 2:return n=performance.now(),t.next=5,h.createPointerEvent(e);case 5:if(r=t.sent,h.dispatchEvent(r,"pointerup"),"touch"===r.pointerType?h.dispatchEvent(r,"touchend"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||(i=2===r.button,h.dispatchEvent(r,i?"rightup":"mouseup")),i=h.trackingData(e.pointerId),s=h.findMountedTarget(i.pressTargetsByButton[e.button]),(l=s)&&!r.composedPath().includes(s)){for(a=s;a&&!r.composedPath().includes(a);)r.currentTarget=a,h.notifyTarget(r,"pointerupoutside"),"touch"===r.pointerType?h.notifyTarget(r,"touchendoutside"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||(o=2===r.button,h.notifyTarget(r,o?"rightupoutside":"mouseupoutside")),Bo.isNode(a)&&(a=a.parentNode);delete i.pressTargetsByButton[e.button],l=a}l&&((s=h.clonePointerEvent(r,"click")).target=l,s.path=[],i.clicksByButton[e.button]||(i.clicksByButton[e.button]={clickCount:0,target:s.target,timeStamp:n}),(l=i.clicksByButton[e.button]).target===s.target&&n-l.timeStamp<200?++l.clickCount:l.clickCount=1,l.target=s.target,l.timeStamp=n,s.detail=l.clickCount,null!=(l=r.detail)&&l.preventClick||("mouse"!==s.pointerType&&"touch"!==s.pointerType||h.dispatchEvent(s,"click"),h.dispatchEvent(s,"pointertap")),h.freeEvent(s)),h.freeEvent(r);case 14:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerMove=function(){var e=Ur(M().mark(function t(e){var n,r,i,a,o,s,l,c,u,f;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Uo){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,h.createPointerEvent(e);case 4:if(n=t.sent,r="mouse"===n.pointerType||"pen"===n.pointerType,i=h.trackingData(e.pointerId),a=h.findMountedTarget(i.overTargets),i.overTargets&&a!==n.target)return l="mousemove"===e.type?"mouseout":"pointerout",t.next=12,h.createPointerEvent(e,l,a||void 0);t.next=23;break;case 12:if(o=t.sent,h.dispatchEvent(o,"pointerout"),r&&h.dispatchEvent(o,"mouseout"),n.composedPath().includes(a)){t.next=22;break}return t.next=18,h.createPointerEvent(e,"pointerleave",a||void 0);case 18:for((s=t.sent).eventPhase=s.AT_TARGET;s.target&&!n.composedPath().includes(s.target);)s.currentTarget=s.target,h.notifyTarget(s),r&&h.notifyTarget(s,"mouseleave"),Bo.isNode(s.target)&&(s.target=s.target.parentNode);h.freeEvent(s);case 22:h.freeEvent(o);case 23:if(a===n.target){t.next=38;break}l="mousemove"===e.type?"mouseover":"pointerover",c=h.clonePointerEvent(n,l),h.dispatchEvent(c,"pointerover"),r&&h.dispatchEvent(c,"mouseover"),u=a&&Bo.isNode(a)&&a.parentNode;case 29:if(u&&u!==(Bo.isNode(h.rootTarget)&&h.rootTarget.parentNode)){if(u===n.target)return t.abrupt("break",35);t.next=32}else t.next=35;break;case 32:u=u.parentNode,t.next=29;break;case 35:if(!u||u===(Bo.isNode(h.rootTarget)&&h.rootTarget.parentNode)){for((f=h.clonePointerEvent(n,"pointerenter")).eventPhase=f.AT_TARGET;f.target&&f.target!==a&&f.target!==(Bo.isNode(h.rootTarget)&&h.rootTarget.parentNode);)f.currentTarget=f.target,h.notifyTarget(f),r&&h.notifyTarget(f,"mouseenter"),Bo.isNode(f.target)&&(f.target=f.target.parentNode);h.freeEvent(f)}h.freeEvent(c);case 38:h.dispatchEvent(n,"pointermove"),"touch"===n.pointerType&&h.dispatchEvent(n,"touchmove"),r&&(h.dispatchEvent(n,"mousemove"),h.cursor=h.getCursor(n.target)),i.overTargets=n.composedPath(),h.freeEvent(n);case 43:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerOut=function(){var e=Ur(M().mark(function t(e){var n,r,i,a,o;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Uo){t.next=2;break}return t.abrupt("return");case 2:if((n=h.trackingData(e.pointerId)).overTargets)return r="mouse"===e.pointerType||"pen"===e.pointerType,i=h.findMountedTarget(n.overTargets),t.next=8,h.createPointerEvent(e,"pointerout",i||void 0);t.next=19;break;case 8:return a=t.sent,h.dispatchEvent(a),r&&h.dispatchEvent(a,"mouseout"),t.next=13,h.createPointerEvent(e,"pointerleave",i||void 0);case 13:for((o=t.sent).eventPhase=o.AT_TARGET;o.target&&o.target!==(Bo.isNode(h.rootTarget)&&h.rootTarget.parentNode);)o.currentTarget=o.target,h.notifyTarget(o),r&&h.notifyTarget(o,"mouseleave"),Bo.isNode(o.target)&&(o.target=o.target.parentNode);n.overTargets=null,h.freeEvent(a),h.freeEvent(o);case 19:h.cursor=null;case 20:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerOver=function(){var e=Ur(M().mark(function t(e){var n,r,i,a;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Uo){t.next=2;break}return t.abrupt("return");case 2:return n=h.trackingData(e.pointerId),t.next=5,h.createPointerEvent(e);case 5:for(r=t.sent,i="mouse"===r.pointerType||"pen"===r.pointerType,h.dispatchEvent(r,"pointerover"),i&&h.dispatchEvent(r,"mouseover"),"mouse"===r.pointerType&&(h.cursor=h.getCursor(r.target)),(a=h.clonePointerEvent(r,"pointerenter")).eventPhase=a.AT_TARGET;a.target&&a.target!==(Bo.isNode(h.rootTarget)&&h.rootTarget.parentNode);)a.currentTarget=a.target,h.notifyTarget(a),i&&h.notifyTarget(a,"mouseenter"),Bo.isNode(a.target)&&(a.target=a.target.parentNode);n.overTargets=r.composedPath(),h.freeEvent(r),h.freeEvent(a);case 16:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerUpOutside=function(){var e=Ur(M().mark(function t(e){var n,r,i,a;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Uo){t.next=2;break}return t.abrupt("return");case 2:return n=h.trackingData(e.pointerId),r=h.findMountedTarget(n.pressTargetsByButton[e.button]),t.next=6,h.createPointerEvent(e);case 6:if(i=t.sent,r){for(a=r;a;)i.currentTarget=a,h.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType||"mouse"!==i.pointerType&&"pen"!==i.pointerType||h.notifyTarget(i,2===i.button?"rightupoutside":"mouseupoutside"),Bo.isNode(a)&&(a=a.parentNode);delete n.pressTargetsByButton[e.button]}h.freeEvent(i);case 9:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onWheel=function(){var e=Ur(M().mark(function t(e){var n;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Xo){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,h.createWheelEvent(e);case 4:n=t.sent,h.dispatchEvent(n),h.freeEvent(n);case 7:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.globalRuntime=t,this.context=e}var e,r,i,a;return l(n,[{key:"init",value:function(){this.rootTarget=this.context.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel)}},{key:"client2Viewport",value:function(t){var e=this.context.contextService.getBoundingClientRect();return new fi(t.x-((null==e?void 0:e.left)||0),t.y-((null==e?void 0:e.top)||0))}},{key:"viewport2Client",value:function(t){var e=this.context.contextService.getBoundingClientRect();return new fi(t.x+((null==e?void 0:e.left)||0),t.y+((null==e?void 0:e.top)||0))}},{key:"viewport2Canvas",value:function(t){var e=t.x,t=t.y,n=this.rootTarget.defaultView.getCamera(),r=this.context.config,i=r.width,r=r.height,a=n.getPerspectiveInverse(),n=n.getWorldTransform(),n=bt(this.tmpMatrix,n,a),a=Gt(this.tmpVec3,e/i*2-1,2*(1-t/r)-1,0);return Kt(a,a,n),new fi(a[0],a[1])}},{key:"canvas2Viewport",value:function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),e=e.getViewTransform(),n=bt(this.tmpMatrix,n,e),e=Gt(this.tmpVec3,t.x,t.y,0),t=(Kt(this.tmpVec3,this.tmpVec3,n),this.context.config),n=t.width,t=t.height;return new fi((e[0]+1)/2*n,(1-(e[1]+1)/2)*t)}},{key:"setPickHandler",value:function(t){this.pickHandler=t}},{key:"addEventMapping",value: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})}},{key:"mapEvent",value: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))}}},{key:"dispatchEvent",value:function(t,e,n){n?(t.eventPhase=t.AT_TARGET,n=this.rootTarget.defaultView||null,t.currentTarget=n,this.notifyListeners(t,e)):(t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e)),this.emitter.emit(e||t.type,t)}},{key:"propagate",value:function(t,e){if(t.target){var n=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var r=n.length-1;1<=r;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 a=i+1;a<n.length;a++)if(t.currentTarget=n[a],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}}},{key:"propagationPath",value:function(t){var e=[t],n=this.rootTarget.defaultView||null;if(n&&n===t)e.unshift(n.document);else{for(var r=0;r<2048&&t!==this.rootTarget;r++)Bo.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);n&&e.push(n)}return e}},{key:"hitTest",value:(a=Ur(M().mark(function t(e){var n,r,i,a;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.viewportX,r=e.viewportY,a=this.context.config,i=a.width,a=a.height,n<0||r<0||i<n||a<r)return t.abrupt("return",null);t.next=4;break;case 4:return t.next=6,this.pickHandler(e);case 6:if(t.t1=t.sent,t.t1){t.next=9;break}t.t1=this.rootTarget;case 9:if(t.t0=t.t1,t.t0){t.next=12;break}t.t0=null;case 12:return t.abrupt("return",t.t0);case 13:case"end":return t.stop()}},t,this)})),function(t){return a.apply(this,arguments)})},{key:"isNativeEventFromCanvas",value:function(t){var e=this.context.contextService.getDomElement(),n=null==(n=t.nativeEvent)?void 0:n.target;if(n){if(n===e)return!0;if(e&&e.contains)return e.contains(n)}return!!t.nativeEvent.composedPath&&-1<t.nativeEvent.composedPath().indexOf(e)}},{key:"getExistedHTML",value:function(t){if(t.nativeEvent.composedPath){var e,n=ai(this.globalRuntime.displayObjectPool.getHTMLs());try{for(n.s();!(e=n.n()).done;){var r=e.value;if(-1<t.nativeEvent.composedPath().indexOf(r))return r}}catch(t){n.e(t)}finally{n.f()}}return null}},{key:"pickTarget",value:(i=Ur(M().mark(function t(e){return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.hitTest({clientX:e.clientX,clientY:e.clientY,viewportX:e.viewportX,viewportY:e.viewportY,x:e.canvasX,y:e.canvasY}));case 1:case"end":return t.stop()}},t,this)})),function(t){return i.apply(this,arguments)})},{key:"createPointerEvent",value:(r=Ur(M().mark(function t(e,n,r){var i,a;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:i=this.allocateEvent(Uo),this.copyPointerData(e,i),this.copyMouseData(e,i),this.copyData(e,i),i.nativeEvent=e.nativeEvent,i.originalEvent=e,a=this.getExistedHTML(i),null==r?t.next=11:(t.t0=r,t.next=20);break;case 11:if(t.t1=a,t.t1)t.next=19;else{if(t.t2=this.isNativeEventFromCanvas(i),t.t2)return t.next=17,this.pickTarget(i);t.next=18}break;case 17:t.t2=t.sent;case 18:t.t1=t.t2;case 19:t.t0=t.t1;case 20:return i.target=t.t0,"string"==typeof n&&(i.type=n),t.abrupt("return",i);case 23:case"end":return t.stop()}},t,this)})),function(t,e,n){return r.apply(this,arguments)})},{key:"createWheelEvent",value:(e=Ur(M().mark(function t(e){var n,r;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.allocateEvent(Xo),this.copyWheelData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.nativeEvent=e.nativeEvent,n.originalEvent=e,r=this.getExistedHTML(n),t.t0=r,t.t0)t.next=15;else{if(t.t1=this.isNativeEventFromCanvas(n),t.t1)return t.next=13,this.pickTarget(n);t.next=14}break;case 13:t.t1=t.sent;case 14:t.t0=t.t1;case 15:return n.target=t.t0,t.abrupt("return",n);case 17:case"end":return t.stop()}},t,this)})),function(t){return e.apply(this,arguments)})},{key:"trackingData",value:function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]}},{key:"cloneWheelEvent",value:function(t){var e=this.allocateEvent(Xo);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}},{key:"clonePointerEvent",value:function(t,e){var n=this.allocateEvent(Uo);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}},{key:"copyPointerData",value:function(t,e){t instanceof Uo&&e instanceof Uo&&(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)}},{key:"copyMouseData",value:function(t,e){t instanceof qo&&e instanceof qo&&(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))}},{key:"copyWheelData",value:function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ}},{key:"copyData",value:function(t,e){e.isTrusted=t.isTrusted,e.timeStamp=performance.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.page.copyFrom(t.page),e.viewport.copyFrom(t.viewport)}},{key:"allocateEvent",value:function(t){this.eventPool.has(t)||this.eventPool.set(t,[]);t=this.eventPool.get(t).pop()||new t(this);return t.eventPhase=t.NONE,t.currentTarget=null,t.path=[],t.target=null,t}},{key:"freeEvent",value:function(t){if(t.manager!==this)throw new 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)}},{key:"notifyTarget",value:function(t,e){e=null!=(n=e)?n: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)}},{key:"notifyListeners",value: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)}},{key:"findMountedTarget",value:function(t){if(!t)return null;for(var e=t[t.length-1],n=t.length-2;0<=n;n--){var r=t[n];if(!(r===this.rootTarget||Bo.isNode(r)&&r.parentNode===e))break;e=t[n]}return e}},{key:"getCursor",value:function(t){for(var e=t;e;){var n=Ho.isElement(e)&&e.getAttribute("cursor");if(n)return n;e=Bo.isNode(e)&&e.parentNode}}}]),n}(),Sc=function(){function t(){O(this,t),this.canvas=void 0,this.context=void 0}return l(t,[{key:"getOrCreateCanvas",value:function(t){if(!this.canvas){if(t)this.canvas=t,this.context=this.canvas.getContext("2d");else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d"),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")}this.canvas.width=10,this.canvas.height=10}return this.canvas}},{key:"getOrCreateContext",value:function(t){return this.context||this.getOrCreateCanvas(t),this.context}}]),t}(),_c=((Pc=pc=pc||{})[Pc.CAMERA_CHANGED=0]="CAMERA_CHANGED",Pc[Pc.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",Pc[Pc.NONE=2]="NONE",function(){function n(t,e){O(this,n),this.globalRuntime=void 0,this.context=void 0,this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.renderOrderChangedEvent=new Io(mo.RENDER_ORDER_CHANGED),this.hooks={init:new Rl,dirtycheck:new Gl(["object"]),cull:new Gl(["object","camera"]),beginFrame:new Dl([]),beforeRender:new Dl(["objectToRender"]),render:new Dl(["objectToRender"]),afterRender:new Dl(["objectToRender"]),endFrame:new Dl([]),destroy:new Dl([]),pick:new Fl(["result"]),pickSync:new Gl(["result"]),pointerDown:new Dl(["event"]),pointerUp:new Dl(["event"]),pointerMove:new Dl(["event"]),pointerOut:new Dl(["event"]),pointerOver:new Dl(["event"]),pointerWheel:new Dl(["event"]),pointerCancel:new Dl(["event"])},this.globalRuntime=t,this.context=e}var t;return l(n,[{key:"init",value:(t=Ur(M().mark(function t(){var e;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=Yr(Yr({},this.globalRuntime),this.context),this.context.renderingPlugins.forEach(function(t){t.apply(e)}),t.next=4,this.hooks.init.promise();case 4:this.inited=!0;case 5:case"end":return t.stop()}},t,this)})),function(){return t.apply(this,arguments)})},{key:"getStats",value:function(){return this.stats}},{key:"disableDirtyRectangleRendering",value:function(){return!this.context.config.renderer.getConfig().enableDirtyRectangleRendering||this.context.renderingContext.renderReasons.has(pc.CAMERA_CHANGED)}},{key:"render",value:function(t){var e=this,n=(this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0,this.context.renderingContext);this.globalRuntime.sceneGraphService.syncHierarchy(n.root),this.globalRuntime.sceneGraphService.triggerPendingEvents(),n.renderReasons.size&&this.inited&&(this.renderDisplayObject(n.root,t,n),this.hooks.beginFrame.call(),n.renderListCurrentFrame.forEach(function(t){e.hooks.beforeRender.call(t),e.hooks.render.call(t),e.hooks.afterRender.call(t)}),this.hooks.endFrame.call(),n.renderListCurrentFrame=[],n.renderReasons.clear())}},{key:"renderDisplayObject",value:function(t,e,n){var r=this,i=e.renderer.getConfig(),a=i.enableDirtyCheck,i=i.enableCulling,a=(this.globalRuntime.styleValueRegistry.recalc(t),a?this.hooks.dirtycheck.call(t):t),a=(a&&(i=i?this.hooks.cull.call(a,this.context.camera):a)&&(this.stats.rendered++,n.renderListCurrentFrame.push(i)),t.renderable.dirty=!1,t.sortable.renderOrder=this.zIndexCounter++,this.stats.total++,t.sortable),i=!1;a.dirty&&(a.sorted=t.childNodes.slice().sort(ki),a.dirty=!(i=!0)),(a.sorted||t.childNodes).forEach(function(t){r.renderDisplayObject(t,e,n)}),i&&t.forEach(function(t){r.renderOrderChangedEvent.target=t,r.renderOrderChangedEvent.detail={renderOrder:t.sortable.renderOrder},t.ownerDocument.defaultView.dispatchEvent(r.renderOrderChangedEvent,!0)})}},{key:"destroy",value:function(){this.inited=!1,this.hooks.destroy.call()}},{key:"dirtify",value:function(){this.context.renderingContext.renderReasons.add(pc.DISPLAY_OBJECT_CHANGED)}}]),n}()),Ac=/\[\s*(.*)=(.*)\s*\]/,Pc=function(){function t(){O(this,t)}return l(t,[{key:"selectOne",value:function(e,n){var t,r,i,a=this;return e.startsWith(".")?n.find(function(t){return-1<((null==t?void 0:t.classList)||[]).indexOf(a.getIdOrClassname(e))}):e.startsWith("#")?n.find(function(t){return t.id===a.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.find(function(t){return n!==t&&("name"===r?t.name===i:a.attributeToString(t,r)===i)}):null):n.find(function(t){return n!==t&&t.nodeName===e})}},{key:"selectAll",value:function(e,n){var t,r,i,a=this;return e.startsWith(".")?n.findAll(function(t){return n!==t&&-1<((null==t?void 0:t.classList)||[]).indexOf(a.getIdOrClassname(e))}):e.startsWith("#")?n.findAll(function(t){return n!==t&&t.id===a.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.findAll(function(t){return n!==t&&("name"===r?t.name===i:a.attributeToString(t,r)===i)}):[]):n.findAll(function(t){return n!==t&&t.nodeName===e})}},{key:"is",value:function(t,e){var n,r;return t.startsWith(".")?e.className===this.getIdOrClassname(t):t.startsWith("#")?e.id===this.getIdOrClassname(t):t.startsWith("[")?(n=(r=this.getAttribute(t)).name,r=r.value,"name"===n?e.name===r:this.attributeToString(e,n)===r):e.nodeName===t}},{key:"getIdOrClassname",value:function(t){return t.substring(1)}},{key:"getAttribute",value:function(t){var t=t.match(Ac),e="",n="";return t&&2<t.length&&(e=t[1].replace(/"/g,""),n=t[2].replace(/"/g,"")),{name:e,value:n}}},{key:"attributeToString",value:function(t,e){return t.getAttribute&&(t=t.getAttribute(e),!_(t))&&t.toString?t.toString():""}}]),t}(),Tc=function(){function e(t){var o,r,i,a,s,l,n,c,u,f,h,d,y=this;O(this,e),this.runtime=void 0,this.pendingEvents=[],this.boundsChangedEvent=new Io(mo.BOUNDS_CHANGED),this.rotate=(o=re(),function(t,e){"number"==typeof e&&(e=k(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,3<arguments.length&&void 0!==arguments[3]?arguments[3]:0));var n,r,i,a=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(se(n=re(),e[0],e[1],e[2]),r=y.getRotation(t),i=y.getRotation(t.parentNode),ce(o,i),oe(o,o),ae(n,o,n),ae(a.localRotation,n,r),fe(a.localRotation,a.localRotation),y.dirtifyLocal(t,a)):y.rotateLocal(t,e)}),this.rotateLocal=(r=re(),function(t,e){"number"==typeof e&&(e=k(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,3<arguments.length&&void 0!==arguments[3]?arguments[3]:0));var n=t.transformable;se(r,e[0],e[1],e[2]),ue(n.localRotation,n.localRotation,r),y.dirtifyLocal(t,n)}),this.setEulerAngles=(i=re(),function(t,e){"number"==typeof e&&(e=k(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,3<arguments.length&&void 0!==arguments[3]?arguments[3]:0));var n,r=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(se(r.localRotation,e[0],e[1],e[2]),n=y.getRotation(t.parentNode),ce(i,oe(re(),n)),ue(r.localRotation,r.localRotation,i),y.dirtifyLocal(t,r)):y.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e){"number"==typeof e&&(e=k(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,3<arguments.length&&void 0!==arguments[3]?arguments[3]:0));var n,r,i,a,o,s,l,c,u,f,h,d,p=t.transformable;Zt(e,g())||(r=n=e,i=p.localRotation,a=i[0],o=i[1],s=i[2],i=i[3],l=r[0],c=r[1],r=r[2],d=o*(h=a*c-o*l)-s*(f=s*l-a*r),s=s*(u=o*r-s*c)-a*h,a=a*f-o*u,f*=o=2*i,h*=o,s*=2,a*=2,n[0]=l+(u*=o)+(d*=2),n[1]=c+f+s,n[2]=r+h+a,Wt(p.localPosition,p.localPosition,e),y.dirtifyLocal(t,p))},this.setPosition=(a=ft(),s=g(),function(t,e){var n=t.transformable;s[0]=e[0],s[1]=e[1],s[2]=e[2]||0,Zt(y.getPosition(t),s)||(zt(n.position,s),null!==t.parentNode&&t.parentNode.transformable?(e=t.parentNode.transformable,dt(a,e.worldTransform),gt(a,a),Kt(n.localPosition,s,a)):zt(n.localPosition,s),y.dirtifyLocal(t,n))}),this.setLocalPosition=(l=g(),function(t,e){var n=t.transformable;l[0]=e[0],l[1]=e[1],l[2]=e[2]||0,Zt(n.localPosition,l)||(zt(n.localPosition,l),y.dirtifyLocal(t,n))}),this.translate=(n=g(),c=g(),u=g(),function(t,e){Zt(e="number"==typeof e?Gt(c,e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,3<arguments.length&&void 0!==arguments[3]?arguments[3]:0):e,n)||(Wt(u,y.getPosition(t),e),y.setPosition(t,u))}),this.setRotation=function(){var o=re();return function(t,e,n,r,i){var a=t.transformable;"number"==typeof e&&(e=le(e,n,r,i)),null!==t.parentNode&&t.parentNode.transformable?(n=y.getRotation(t.parentNode),ce(o,n),oe(o,o),ae(a.localRotation,o,e),fe(a.localRotation,a.localRotation),y.dirtifyLocal(t,a)):y.setLocalRotation(t,e)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(f=ft(),h=g(),d=le(0,0,0,1),function(t){var e;0!==t.localSkew[0]||0!==t.localSkew[1]?(Tt(t.localTransform,t.localRotation,t.localPosition,k(1,1,1),t.origin),0===t.localSkew[0]&&0===t.localSkew[1]||((e=yt(f))[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),bt(t.localTransform,t.localTransform,e)),e=Tt(f,d,h,t.localScale,t.origin),bt(t.localTransform,t.localTransform,e)):Tt(t.localTransform,t.localRotation,t.localPosition,t.localScale,t.origin)}),this.runtime=t}return l(e,[{key:"matches",value:function(t,e){return this.runtime.sceneGraphSelector.is(t,e)}},{key:"querySelector",value:function(t,e){return this.runtime.sceneGraphSelector.selectOne(t,e)}},{key:"querySelectorAll",value:function(t,e){return this.runtime.sceneGraphSelector.selectAll(t,e)}},{key:"attach",value:function(t,e,n){t.parentNode&&this.detach(t),t.parentNode=e,_(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);n=e.sortable,(null!=n&&null!=(e=n.sorted)&&e.length||null!=(e=t.style)&&e.zIndex)&&(n.dirty=!0),e=t.transformable;e&&this.dirtifyWorld(t,e),e.frozen&&this.unfreezeParentToRoot(t)}},{key:"detach",value:function(t){var e,n,r;t.parentNode&&(e=t.transformable,(null!=(n=t.parentNode.sortable)&&null!=(r=n.sorted)&&r.length||null!=(r=t.style)&&r.zIndex)&&(n.dirty=!0),-1<(r=t.parentNode.childNodes.indexOf(t))&&t.parentNode.childNodes.splice(r,1),e&&this.dirtifyWorld(t,e),t.parentNode=null)}},{key:"getOrigin",value:function(t){return t.transformable.origin}},{key:"setOrigin",value:function(t,e){"number"==typeof e&&(e=k(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,3<arguments.length&&void 0!==arguments[3]?arguments[3]:0));var n,r=t.transformable;Zt(e,r.origin)||((n=r.origin)[0]=e[0],n[1]=e[1],n[2]=e[2]||0,this.dirtifyLocal(t,r))}},{key:"setLocalEulerAngles",value:function(t,e){"number"==typeof e&&(e=k(e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,3<arguments.length&&void 0!==arguments[3]?arguments[3]:0));var n=t.transformable;se(n.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,n)}},{key:"scaleLocal",value:function(t,e){var n,r,i=t.transformable;n=i.localScale,r=i.localScale,e=k(e[0],e[1],e[2]||1),n[0]=r[0]*e[0],n[1]=r[1]*e[1],n[2]=r[2]*e[2],this.dirtifyLocal(t,i)}},{key:"setLocalScale",value:function(t,e){var n=t.transformable,e=k(e[0],e[1],e[2]||n.localScale[2]);Zt(e,n.localScale)||(zt(n.localScale,e),this.dirtifyLocal(t,n))}},{key:"setLocalRotation",value:function(t,e,n,r,i){"number"==typeof e&&(e=le(e,n,r,i));n=t.transformable;ce(n.localRotation,e),this.dirtifyLocal(t,n)}},{key:"setLocalSkew",value:function(t,e,n){"number"==typeof e&&(e=he(e,n));var r,n=t.transformable;r=n.localSkew,e=e,r[0]=e[0],r[1]=e[1],this.dirtifyLocal(t,n)}},{key:"dirtifyLocal",value:function(t,e){e.localDirtyFlag||(e.localDirtyFlag=!0,e.dirtyFlag)||this.dirtifyWorld(t,e)}},{key:"dirtifyWorld",value:function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),this.dirtifyToRoot(t,!0)}},{key:"triggerPendingEvents",value:function(){function r(t,e){t.isConnected&&!i.has(t.entity)&&(n.boundsChangedEvent.detail=e,(n.boundsChangedEvent.target=t).ownerDocument.defaultView.dispatchEvent(n.boundsChangedEvent,!0),i.add(t.entity))}var n=this,i=new Set;this.pendingEvents.forEach(function(t){var t=ei(t,2),e=t[0],n=t[1];n.affectChildren?e.forEach(function(t){r(t,n)}):r(e,n)}),this.pendingEvents=[],i.clear()}},{key:"dirtifyToRoot",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=t;for(n.renderable&&(n.renderable.dirty=!0);n;){var r=n.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0),n=n.parentNode}this.informDependentDisplayObjects(t),this.pendingEvents.push([t,{affectChildren:e}])}},{key:"updateDisplayObjectDependency",value:function(t,e,n,r){var i;e&&e!==n&&(e=this.displayObjectDependencyMap.get(e))&&e[t]&&(i=e[t].indexOf(r),e[t].splice(i,1)),n&&((e=this.displayObjectDependencyMap.get(n))||(this.displayObjectDependencyMap.set(n,{}),e=this.displayObjectDependencyMap.get(n)),e[t]||(e[t]=[]),e[t].push(r))}},{key:"informDependentDisplayObjects",value:function(t){var n=this,r=this.displayObjectDependencyMap.get(t);r&&Object.keys(r).forEach(function(e){r[e].forEach(function(t){n.dirtifyToRoot(t),t.dispatchEvent(new zo(mo.ATTR_MODIFIED,t,n,n,e,zo.MODIFICATION,n,n)),t.isCustomElement&&t.isConnected&&t.attributeChangedCallback&&t.attributeChangedCallback(e,n,n)})})}},{key:"getPosition",value:function(t){var e=t.transformable;return _t(e.position,this.getWorldTransform(t,e))}},{key:"getRotation",value:function(t){var e=t.transformable;return Pt(e.rotation,this.getWorldTransform(t,e))}},{key:"getScale",value:function(t){var e=t.transformable;return At(e.scaling,this.getWorldTransform(t,e))}},{key:"getWorldTransform",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t.transformable;return(e.localDirtyFlag||e.dirtyFlag)&&(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e)),e.worldTransform}},{key:"getLocalPosition",value:function(t){return t.transformable.localPosition}},{key:"getLocalRotation",value:function(t){return t.transformable.localRotation}},{key:"getLocalScale",value:function(t){return t.transformable.localScale}},{key:"getLocalSkew",value:function(t){return t.transformable.localSkew}},{key:"getLocalTransform",value:function(t){t=t.transformable;return t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.localTransform}},{key:"setLocalTransform",value:function(t,e){var n=_t(g(),e),r=Pt(re(),e),e=At(g(),e);this.setLocalScale(t,e),this.setLocalPosition(t,n),this.setLocalRotation(t,r)}},{key:"resetLocalTransform",value: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])}},{key:"getTransformedGeometryBounds",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=2<arguments.length?arguments[2]:void 0,e=this.getGeometryBounds(t,e);return li.isEmpty(e)?null:((n=n||new li).setFromTransformedAABB(e,this.getWorldTransform(t)),n)}},{key:"getGeometryBounds",value:function(t){t=t.geometry;return(1<arguments.length&&void 0!==arguments[1]&&arguments[1]?t.renderBounds:t.contentBounds||null)||new li}},{key:"getBounds",value:function(t){var e,n,r=this,i=1<arguments.length&&void 0!==arguments[1]&&arguments[1],a=t.renderable;return a.boundsDirty||i||!a.bounds?!a.renderBoundsDirty&&i&&a.renderBounds?a.renderBounds:(e=i?a.renderBounds:a.bounds,n=this.getTransformedGeometryBounds(t,i,e),t.childNodes.forEach(function(t){t=r.getBounds(t,i);t&&(n?n.add(t):(n=e||new li).update(t.center,t.halfExtents))}),i&&(t=Ei(t))&&(t=t.style.clipPath.getBounds(i),n?t&&(n=t.intersection(n)):n=t),(n=n||new li)&&(i?a.renderBounds=n:a.bounds=n),i?a.renderBoundsDirty=!1:a.boundsDirty=!1,n):a.bounds}},{key:"getLocalBounds",value:function(t){if(t.parentNode){var e,n=ft(),r=(t.parentNode.transformable&&(n=gt(ft(),this.getWorldTransform(t.parentNode))),this.getBounds(t));if(!li.isEmpty(r))return(e=new li).setFromTransformedAABB(r,n),e}return this.getBounds(t)}},{key:"getBoundingClientRect",value:function(t){var e,n,r,i=this.getGeometryBounds(t),i=(li.isEmpty(i)||(r=new li).setFromTransformedAABB(i,this.getWorldTransform(t)),null==(i=t.ownerDocument)||null==(t=i.defaultView)?void 0:t.getContextService().getBoundingClientRect());return r?(e=(t=ei(r.getMin(),2))[0],t=t[1],n=(r=ei(r.getMax(),2))[0],r=r[1],new hi(e+((null==i?void 0:i.left)||0),t+((null==i?void 0:i.top)||0),n-e,r-t)):new hi((null==i?void 0:i.left)||0,(null==i?void 0:i.top)||0,0,0)}},{key:"dirtifyWorldInternal",value:function(t,e){var n=this;!e.dirtyFlag&&(e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach(function(t){var e=t.transformable;e.dirtyFlag||n.dirtifyWorldInternal(t,e)}),e=t.renderable)&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)}},{key:"syncHierarchy",value: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])}}},{key:"sync",value:function(t,e){var n;e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.dirtyFlag&&(n=(t=t.parentNode)&&t.transformable,null!==t&&n?bt(e.worldTransform,n.worldTransform,e.localTransform):dt(e.worldTransform,e.localTransform),e.dirtyFlag=!1)}},{key:"unfreezeParentToRoot",value:function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}}}]),e}(),Lc={MetricsString:"|ÉqÅ",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},Nc=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,Cc=new RegExp("".concat(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source,"|").concat(/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source,"|").concat(/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source,"|").concat(/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source)),jc=new RegExp("".concat(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source,"|").concat(/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source,"|").concat(/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source,"|").concat(/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source)),Rc=function(){function e(t){var n=this;O(this,e),this.runtime=void 0,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,e){return!n.isBreakingSpace(e)&&!(!t||!jc.exec(e)&&!Cc.exec(t))},this.trimByKinsokuShorui=function(t){var e,n=ni(t),r=n[n.length-2];return r?(e=r[r.length-1],n[n.length-2]=r.slice(0,-1),n[n.length-1]=e+n[n.length-1],n):t},this.runtime=t}return l(e,[{key:"measureFont",value:function(t,e){if(this.fontMetricsCache[t])return this.fontMetricsCache[t];for(var n={ascent:0,descent:0,fontSize:0},r=this.runtime.offscreenCanvas.getOrCreateCanvas(e),e=this.runtime.offscreenCanvas.getOrCreateContext(e),i=(e.font=t,Lc.MetricsString+Lc.BaselineSymbol),a=Math.ceil(e.measureText(i).width),o=Math.ceil(e.measureText(Lc.BaselineSymbol).width),s=Lc.HeightMultiplier*o,o=o*Lc.BaselineMultiplier|0,l=(r.width=a,r.height=s,e.fillStyle="#f00",e.fillRect(0,0,a,s),e.font=t,e.textBaseline="alphabetic",e.fillStyle="#000",e.fillText(i,0,o),e.getImageData(0,0,a||1,s||1).data),r=l.length,c=4*a,u=0,f=0,h=!1,u=0;u<o;++u){for(var d=0;d<c;d+=4)if(255!==l[f+d]){h=!0;break}if(h)break;f+=c}for(n.ascent=o-u,f=r-c,h=!1,u=s;o<u;--u){for(var p=0;p<c;p+=4)if(255!==l[f+p]){h=!0;break}if(h)break;f-=c}return n.descent=u-o,n.fontSize=n.ascent+n.descent,this.fontMetricsCache[t]=n}},{key:"measureText",value:function(t,e,n){var r=e.fontSize,i=e.wordWrap,a=e.lineHeight,o=e.lineWidth,s=e.textBaseline,l=e.textAlign,c=e.letterSpacing,u=e.textPath,f=(e.textPathSide,e.textPathStartOffset,e.leading),f=void 0===f?0:f,h=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,t=t.fontWeight,e=pn(e)&&"".concat(e,"px")||"16px",a=hn(n)?n.split(","):[n],o=a.length-1;0<=o;o--){var s=a[o].trim();!Vl.test(s)&&Wl.indexOf(s)<0&&(s='"'.concat(s,'"')),a[o]=s}return"".concat(r," ").concat(i," ").concat(t," ").concat(e," ").concat(a.join(","))}(e),d=this.measureFont(h,n),p=(0===d.fontSize&&(d.fontSize=r,d.ascent=r),this.runtime.offscreenCanvas.getOrCreateContext(n));p.font=h,e.isOverflowing=!1;var y=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),v=new Array(y.length),g=0;if(!u){for(var m=0;m<y.length;m++){var b=p.measureText(y[m]).width+(y[m].length-1)*c;v[m]=b,g=Math.max(g,b)}var r=g+o,x=a||d.fontSize+o,i=Math.max(x,d.fontSize+o)+(y.length-1)*(x+f),w=0;return"middle"===s?w=-i/2:"bottom"===s||"alphabetic"===s||"ideographic"===s?w=-i:"top"!==s&&"hanging"!==s||(w=0),{font:h,width:r,height:i,lines:y,lineWidths:v,lineHeight:x+=f,maxLineWidth:g,fontProperties:d,lineMetrics:v.map(function(t,e){var n=0;return"center"===l||"middle"===l?n-=t/2:"right"!==l&&"end"!==l||(n-=t),new hi(n-o/2,w+e*x,t+o,x)})}}u.getTotalLength(),u.getPoint(0);for(var k=0;k<y.length;k++)p.measureText(y[k]).width,y[k].length}},{key:"setGraphemeOnPath",value:function(){}},{key:"wordWrap",value:function(t,e,n){for(var r=this,i=e.wordWrapWidth,i=void 0===i?0:i,a=e.letterSpacing,o=e.maxLines,s=void 0===o?1/0:o,o=e.textOverflow,l=this.runtime.offscreenCanvas.getOrCreateContext(n),c=i+a,u="",f=("ellipsis"===o?u="...":o&&"clip"!==o&&(u=o),[]),h=0,d=0,p={},y=function(t){return r.getFromCache(t,a,p,l)},v=Array.from(u).reduce(function(t,e){return t+y(e)},0),g=Array.from(t),m=0;m<g.length;m++){var b=g[m],x=t[m-1],w=t[m+1],k=y(b);if(this.isNewline(b)){if(s<=++h){e.isOverflowing=!0;break}d=0,f[h]=""}else{if(0<d&&c<d+k){if(s<=h+1){if(e.isOverflowing=!0,0<v&&v<=c){for(var E=f[h].length,M=0,O=E,S=0;S<E;S++){var _=y(f[h][S]);if(c<M+_+v){O=S;break}M+=_}f[h]=(f[h]||"").slice(0,O)+u}break}if(d=0,f[++h]="",this.isBreakingSpace(b))continue;this.canBreakInLastChar(b)||(f=this.trimToBreakable(f),d=this.sumTextWidthByCache(f[h]||"",p)),this.shouldBreakByKinsokuShorui(b,w)&&(f=this.trimByKinsokuShorui(f),d+=y(x||""))}d+=k,f[h]=(f[h]||"")+b}}return f.join("\n")}},{key:"isBreakingSpace",value:function(t){return"string"==typeof t&&0<=Lc.BreakingSpaces.indexOf(t.charCodeAt(0))}},{key:"isNewline",value:function(t){return"string"==typeof t&&0<=Lc.Newlines.indexOf(t.charCodeAt(0))}},{key:"trimToBreakable",value:function(t){var e,t=ni(t),n=t[t.length-2],r=this.findBreakableIndex(n);return-1!==r&&n&&(e=n.slice(r,r+1),e=r+(this.isBreakingSpace(e)?0:1),t[t.length-1]+=n.slice(r+1,n.length),t[t.length-2]=n.slice(0,e)),t}},{key:"canBreakInLastChar",value:function(t){return!t||!Nc.test(t)}},{key:"sumTextWidthByCache",value:function(t,n){return t.split("").reduce(function(t,e){if(n[e])return t+n[e];throw Error("cannot count the word without cache")},0)}},{key:"findBreakableIndex",value:function(t){for(var e=t.length-1;0<=e;e--)if(!Nc.test(t[e]))return e;return-1}},{key:"getFromCache",value:function(t,e,n,r){var i=n[t];return"number"!=typeof i&&(e=t.length*e,i=r.measureText(t).width+e,n[t]=i),i}}]),e}(),w={},mc=(Ec=new Ec,kc=new kc,Kr(nu={},E.CIRCLE,new mc),Kr(nu,E.ELLIPSE,new bc),Kr(nu,E.RECT,Ec),Kr(nu,E.IMAGE,Ec),Kr(nu,E.GROUP,Ec),Kr(nu,E.LINE,new xc),Kr(nu,E.TEXT,new Mc(w)),Kr(nu,E.POLYLINE,kc),Kr(nu,E.POLYGON,kc),Kr(nu,E.PATH,new wc),Kr(nu,E.HTML,null),Kr(nu,E.MESH,null),nu),Mc=(bc=new n,Ec=new bo,Kr(xc={},i.PERCENTAGE,null),Kr(xc,i.NUMBER,new Mo),Kr(xc,i.ANGLE,new r),Kr(xc,i.DEFINED_PATH,new e),Kr(xc,i.PAINT,bc),Kr(xc,i.COLOR,bc),Kr(xc,i.FILTER,new yo),Kr(xc,i.LENGTH,Ec),Kr(xc,i.LENGTH_PERCENTAGE,Ec),Kr(xc,i.LENGTH_PERCENTAGE_12,new xo),Kr(xc,i.LENGTH_PERCENTAGE_14,new wo),Kr(xc,i.COORDINATE,new ko),Kr(xc,i.OFFSET_DISTANCE,new Oo),Kr(xc,i.OPACITY_VALUE,new So),Kr(xc,i.PATH,new _o),Kr(xc,i.LIST_OF_POINTS,new Ao),Kr(xc,i.SHADOW_BLUR,new Po),Kr(xc,i.TEXT,new To),Kr(xc,i.TEXT_TRANSFORM,new Lo),Kr(xc,i.TRANSFORM,new No),Kr(xc,i.TRANSFORM_ORIGIN,new a),Kr(xc,i.Z_INDEX,new Co),Kr(xc,i.MARKER,new Eo),xc),Ic=(w.CameraContribution=gc,w.AnimationTimeline=null,w.EasingFunction=null,w.offscreenCanvas=new Sc,w.displayObjectPool=new as,w.sceneGraphSelector=new Pc,w.sceneGraphService=new Tc(w),w.textService=new Rc(w),w.geometryUpdaterFactory=mc,w.CSSPropertySyntaxFactory=Mc,w.styleValueRegistry=new rc,w.layoutRegistry=null,function(){function t(){O(this,t),this.context=void 0,this.plugins=[]}return l(t,[{key:"addRenderingPlugin",value:function(t){this.plugins.push(t),this.context.renderingPlugins.push(t)}},{key:"removeAllRenderingPlugins",value:function(){var e=this;this.plugins.forEach(function(t){t=e.context.renderingPlugins.indexOf(t);0<=t&&e.context.renderingPlugins.splice(t,1)})}}]),t}()),Fc=function(){function e(t){O(this,e),this.plugins=[],this.config=void 0,this.config=Yr({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1},t)}return l(e,[{key:"registerPlugin",value:function(e){-1===this.plugins.findIndex(function(t){return t===e})&&this.plugins.push(e)}},{key:"unregisterPlugin",value:function(e){var t=this.plugins.findIndex(function(t){return t===e});-1<t&&this.plugins.splice(t,1)}},{key:"getPlugins",value:function(){return this.plugins}},{key:"getPlugin",value:function(e){return this.plugins.find(function(t){return t.name===e})}},{key:"getConfig",value:function(){return this.config}},{key:"setConfig",value:function(t){Object.assign(this.config,t)}}]),e}(),Bc=function(){function a(t){O(this,a),this.strategies=void 0,this.strategies=t}return l(a,[{key:"apply",value:function(t){var n=t.camera,e=t.renderingService,r=t.renderingContext,i=this.strategies;e.hooks.cull.tap(a.tag,function(e){var t;return e&&(t=e.cullable,0===i.length?t.visible=-1<r.unculledEntities.indexOf(e.entity):t.visible=i.every(function(t){return t.isVisible(n,e)}),!e.isCulled()&&e.isVisible()?e:(e.dispatchEvent(new Io(mo.CULLED)),null))}),e.hooks.afterRender.tap(a.tag,function(t){t.cullable.visibilityPlaneMask=-1})}}]),a}(),Dc=(Bc.tag="Culling",function(){function n(){O(this,n)}return l(n,[{key:"apply",value:function(t){var e=t.renderingService;e.hooks.dirtycheck.tap(n.tag,function(t){return t&&(t.renderable.dirty||e.disableDirtyRectangleRendering()?t:null)})}}]),n}()),zc=(Dc.tag="DirtyCheck",function(){function e(){var s=this;O(this,e),this.autoPreventDefault=!1,this.rootPointerEvent=new Uo(null),this.rootWheelEvent=new Xo(null),this.context=void 0,this.onPointerMove=function(t){var e,n=null==(e=s.context.renderingContext.root)||null==(e=e.ownerDocument)?void 0:e.defaultView;if(!n.supportsTouchEvents||"touch"!==t.pointerType){var r,i=ai(s.normalizeToPointerEvent(t,n));try{for(i.s();!(r=i.n()).done;){var a=r.value,o=s.bootstrapEvent(s.rootPointerEvent,a,n);s.context.eventService.mapEvent(o)}}catch(t){i.e(t)}finally{i.f()}s.setCursor(s.context.eventService.cursor)}}}return l(e,[{key:"apply",value:function(t){var s=this,t=(this.context=t).renderingService,l=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(){var e=Ur(M().mark(function t(e){var n;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s.context.renderingService.hooks.pick.promise({position:e,picked:[],topmost:!0});case 2:return n=t.sent,n=n.picked,t.abrupt("return",n[0]||null);case 5:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}()),t.hooks.pointerWheel.tap(e.tag,function(t){t=s.normalizeWheelEvent(t);s.context.eventService.mapEvent(t)}),t.hooks.pointerDown.tap(e.tag,function(t){if(!l.supportsTouchEvents||"touch"!==t.pointerType){var e,n=s.normalizeToPointerEvent(t,l),r=(!s.autoPreventDefault||!n[0].isNormalized||!t.cancelable&&"cancelable"in t||t.preventDefault(),ai(n));try{for(r.s();!(e=r.n()).done;){var i=e.value,a=s.bootstrapEvent(s.rootPointerEvent,i,l);s.context.eventService.mapEvent(a)}}catch(t){r.e(t)}finally{r.f()}s.setCursor(s.context.eventService.cursor)}}),t.hooks.pointerUp.tap(e.tag,function(t){if(!l.supportsTouchEvents||"touch"!==t.pointerType){var e=s.context.contextService.getDomElement(),n="outside";try{n=e&&t.target&&t.target!==e&&e.contains&&!e.contains(t.target)?"outside":""}catch(t){}var r,i=ai(s.normalizeToPointerEvent(t,l));try{for(i.s();!(r=i.n()).done;){var a=r.value,o=s.bootstrapEvent(s.rootPointerEvent,a,l);o.type+=n,s.context.eventService.mapEvent(o)}}catch(t){i.e(t)}finally{i.f()}s.setCursor(s.context.eventService.cursor)}}),t.hooks.pointerMove.tap(e.tag,this.onPointerMove),t.hooks.pointerOver.tap(e.tag,this.onPointerMove),t.hooks.pointerOut.tap(e.tag,this.onPointerMove)}},{key:"getViewportXY",value:function(t){var e,n=t.offsetX,r=t.offsetY,i=t.clientX,t=t.clientY;return t=!this.context.config.supportsCSSTransform||_(n)||_(r)?(e=(i=this.context.eventService.client2Viewport(new fi(i,t))).x,i.y):(e=n,r),{x:e,y:t}}},{key:"bootstrapEvent",value:function(t,e,n){t.view=n,t.originalEvent=null,t.nativeEvent=e,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 n=this.getViewportXY(e),r=n.x,n=n.y,r=(t.viewport.x=r,t.viewport.y=n,this.context.eventService.viewport2Canvas(t.viewport)),n=r.x,r=r.y;return t.canvas.x=n,t.canvas.y=r,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=e.isTrusted,"pointerleave"===t.type&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=Fi[t.type]||t.type),t}},{key:"normalizeWheelEvent",value:function(t){var e=this.rootWheelEvent,n=(this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ,this.getViewportXY(t)),r=n.x,n=n.y,r=(e.viewport.x=r,e.viewport.y=n,this.context.eventService.viewport2Canvas(e.viewport)),n=r.x,r=r.y;return e.canvas.x=n,e.canvas.y=r,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.nativeEvent=t,e.type=t.type,e}},{key:"transferMouseData",value:function(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.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}},{key:"setCursor",value:function(t){this.context.contextService.applyCursorStyle(t||this.context.config.cursor||"default")}},{key:"normalizeToPointerEvent",value:function(t,e){var n=[];if(e.isTouchEvent(t))for(var r=0;r<t.changedTouches.length;r++){var i=t.changedTouches[r];mn(i.button)&&(i.button=0),mn(i.buttons)&&(i.buttons=1),mn(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),mn(i.width)&&(i.width=i.radiusX||1),mn(i.height)&&(i.height=i.radiusY||1),mn(i.tiltX)&&(i.tiltX=0),mn(i.tiltY)&&(i.tiltY=0),mn(i.pointerType)&&(i.pointerType="touch"),mn(i.pointerId)&&(i.pointerId=i.identifier||0),mn(i.pressure)&&(i.pressure=i.force||.5),mn(i.twist)&&(i.twist=0),mn(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else e.isMouseEvent(t)?(mn((e=t).isPrimary)&&(e.isPrimary=!0),mn(e.width)&&(e.width=1),mn(e.height)&&(e.height=1),mn(e.tiltX)&&(e.tiltX=0),mn(e.tiltY)&&(e.tiltY=0),mn(e.pointerType)&&(e.pointerType="mouse"),mn(e.pointerId)&&(e.pointerId=1),mn(e.pressure)&&(e.pressure=.5),mn(e.twist)&&(e.twist=0),mn(e.tangentialPressure)&&(e.tangentialPressure=0),e.isNormalized=!0,n.push(e)):n.push(t);return n}}]),e}()),Gc=(zc.tag="Event",[E.CIRCLE,E.ELLIPSE,E.IMAGE,E.RECT,E.LINE,E.POLYLINE,E.POLYGON,E.TEXT,E.PATH,E.HTML]),Wc=function(){function t(){O(this,t)}return l(t,[{key:"isVisible",value:function(t,e){var n,r,i=e.cullable;return!i.enable||(n=e.getRenderBounds(),!li.isEmpty(n)&&(t=t.getFrustum(),r=null==(r=e.parentNode)||null==(r=r.cullable)?void 0:r.visibilityPlaneMask,i.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(e,n,r||si.INDETERMINATE,t.planes),i.visible=i.visibilityPlaneMask!==si.OUTSIDE,i.visible))}},{key:"computeVisibilityWithPlaneMask",value:function(t,e,n,r){if(n===si.OUTSIDE||n===si.INSIDE)return n;for(var i=si.INSIDE,a=-1<Gc.indexOf(t.nodeName),o=0,s=r.length;o<s;++o){var l=1<<o;if(0!=(n&l)&&(!a||4!==o&&5!==o)){var c=r[o],u=c.normal,c=c.distance;if(qt(u,e.getPositiveFarPoint(r[o]))+c<0)return si.OUTSIDE;qt(u,e.getNegativeFarPoint(r[o]))+c<0&&(i|=l)}}return i}}]),t}(),Vc=function(){function c(){O(this,c),this.rBush=void 0,this.toSync=new Set}return l(c,[{key:"apply",value:function(t){function e(t){t.target.renderable.dirty=!0,o.dirtify()}function n(t){for(var e=t.detail.affectChildren,t=t.target,n=(e&&t.forEach(function(t){a.toSync.add(t)}),t);n;)n.renderable&&a.toSync.add(n),n=n.parentElement;o.dirtify()}function r(t){t=t.target,w.styleValueRegistry.recalc(t),w.sceneGraphService.dirtifyToRoot(t),o.dirtify()}function i(t){var e=(t=t.target).rBushNode;e.aabb&&a.rBush.remove(e.aabb),a.toSync.delete(t),w.sceneGraphService.dirtifyToRoot(t),o.dirtify()}var a=this,o=t.renderingService,s=t.renderingContext,t=t.rBushRoot,l=s.root.ownerDocument.defaultView;this.rBush=t;o.hooks.init.tapPromise(c.tag,Ur(M().mark(function t(){return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:l.addEventListener(mo.MOUNTED,r),l.addEventListener(mo.UNMOUNTED,i),l.addEventListener(mo.ATTR_MODIFIED,e),l.addEventListener(mo.BOUNDS_CHANGED,n);case 4:case"end":return t.stop()}},t)}))),o.hooks.destroy.tap(c.tag,function(){l.removeEventListener(mo.MOUNTED,r),l.removeEventListener(mo.UNMOUNTED,i),l.removeEventListener(mo.ATTR_MODIFIED,e),l.removeEventListener(mo.BOUNDS_CHANGED,n)}),o.hooks.endFrame.tap(c.tag,function(){a.syncRTree()})}},{key:"syncRTree",value:function(){var o=this,s=[];Array.from(this.toSync).filter(function(t){return t.isConnected}).forEach(function(t){var e,n,r,i=t.rBushNode,a=(i&&i.aabb&&o.rBush.remove(i.aabb),t.getRenderBounds());a&&(e=(n=ei(a.getMin(),2))[0],n=n[1],r=(a=ei(a.getMax(),2))[0],a=a[1],i.aabb||(i.aabb={}),i.aabb.id=t.entity,i.aabb.minX=e,i.aabb.minY=n,i.aabb.maxX=r,i.aabb.maxY=a),!i.aabb||isNaN(i.aabb.maxX)||isNaN(i.aabb.maxX)||isNaN(i.aabb.minX)||isNaN(i.aabb.minY)||s.push(i.aabb)}),this.rBush.load(s),s.length=0,this.toSync.clear()}}]),c}(),Yc=(Vc.tag="Prepare",(kc=yc=yc||{}).READY="ready",kc.BEFORE_RENDER="beforerender",kc.AFTER_RENDER="afterrender",kc.BEFORE_DESTROY="beforedestroy",kc.AFTER_DESTROY="afterdestroy",kc.RESIZE="resize",kc.DIRTY_RECTANGLE="dirtyrectangle",new Io(mo.MOUNTED)),Hc=new Io(mo.UNMOUNTED),qc=new Io(yc.BEFORE_RENDER),Uc=new Io(yc.AFTER_RENDER),Xc=function(){f(E,Fo);var e,n,k=h(E);function E(t){O(this,E),(e=k.call(this)).document=void 0,e.customElements=void 0,e.requestAnimationFrame=void 0,e.cancelAnimationFrame=void 0,e.devicePixelRatio=void 0,e.supportsPointerEvents=void 0,e.supportsTouchEvents=void 0,e.isTouchEvent=void 0,e.isMouseEvent=void 0,e.Element=N,e.frameId=void 0,e.inited=!1,e.readyPromise=void 0,e.resolveReadyPromise=void 0,e.context={},e.document=new Do,e.document.defaultView=Qr(e),e.customElements=new jo;var e,n=t.container,r=t.canvas,i=t.offscreenCanvas,a=t.width,o=t.height,s=t.devicePixelRatio,l=t.renderer,c=t.background,u=t.cursor,f=t.document,h=t.requestAnimationFrame,d=t.cancelAnimationFrame,p=t.createImage,y=t.supportsPointerEvents,v=t.supportsTouchEvents,g=t.supportsCSSTransform,m=t.isTouchEvent,t=t.isMouseEvent,b=(b=n,x=Qr(e),b&&(b="string"==typeof b?b:b.id||xi++,bi[b]&&bi[b].destroy(),bi[b]=x),a),x=o,w=s;return r&&(w=1<=(w=s||wi&&window.devicePixelRatio||1)?Math.ceil(w):1,b=a||("auto"===(a=Mi(s=r,"width"))?s.offsetWidth:parseFloat(a))||r.width/w,x=o||("auto"===(a=Mi(s=r,"height"))?s.offsetHeight:parseFloat(a))||r.height/w),e.devicePixelRatio=w,e.requestAnimationFrame=null!=h?h:ic.bind(globalThis),e.cancelAnimationFrame=null!=d?d:ac.bind(globalThis),e.supportsTouchEvents=null!=v?v:"ontouchstart"in globalThis,e.supportsPointerEvents=null!=y?y:!!globalThis.PointerEvent,e.isTouchEvent=null!=m?m:function(t){return e.supportsTouchEvents&&t instanceof globalThis.TouchEvent},e.isMouseEvent=null!=t?t:function(t){return!globalThis.MouseEvent||t instanceof globalThis.MouseEvent&&(!e.supportsPointerEvents||!(t instanceof globalThis.PointerEvent))},e.initRenderingContext({container:n,canvas:r,width:b,height:x,renderer:l,offscreenCanvas:i,devicePixelRatio:w,cursor:u||"default",background:c||"transparent",createImage:p,document:f,supportsCSSTransform:g}),e.initDefaultCamera(b,x),Ur(M().mark(function t(){return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.initRenderer(l);case 2:e.dispatchEvent(new Io(yc.READY)),e.readyPromise&&e.resolveReadyPromise();case 4:case"end":return t.stop()}},t)}))(),e}return l(E,[{key:"initRenderingContext",value:function(t){this.context.config=t,this.context.renderingContext={root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}}},{key:"initDefaultCamera",value:function(t,e){var n=this,r=new w.CameraContribution;r.setType(Ul.EXPLORING,Xl.DEFAULT).setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0).setOrthographic(t/-2,t/2,e/2,e/-2,.1,1e3),r.canvas=this,r.eventEmitter.on(vc,function(){n.context.renderingContext.renderReasons.add(pc.CAMERA_CHANGED)}),this.context.camera=r}},{key:"getConfig",value:function(){return this.context.config}},{key:"getRoot",value:function(){return this.document.documentElement}},{key:"getCamera",value:function(){return this.context.camera}},{key:"getContextService",value:function(){return this.context.contextService}},{key:"getEventService",value:function(){return this.context.eventService}},{key:"getRenderingService",value:function(){return this.context.renderingService}},{key:"getRenderingContext",value:function(){return this.context.renderingContext}},{key:"getStats",value:function(){return this.getRenderingService().getStats()}},{key:"ready",get:function(){var e=this;return this.readyPromise||(this.readyPromise=new Promise(function(t){e.resolveReadyPromise=function(){t(e)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise}},{key:"destroy",value:function(){var t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=(e||this.dispatchEvent(new Io(yc.BEFORE_DESTROY)),this.frameId&&(this.getConfig().cancelAnimationFrame||cancelAnimationFrame)(this.frameId),this.getRoot());this.unmountChildren(n),t&&this.document.destroy(),this.getRenderingService().destroy(),this.getContextService().destroy(),e||this.dispatchEvent(new Io(yc.AFTER_DESTROY))}},{key:"changeSize",value:function(t,e){this.resize(t,e)}},{key:"resize",value:function(t,e){var n=this.context.config,n=(n.width=t,n.height=e,this.getContextService().resize(t,e),this.context.camera),r=n.getProjectionMode();n.setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0),r===Kl.ORTHOGRAPHIC?n.setOrthographic(t/-2,t/2,e/2,e/-2,n.getNear(),n.getFar()):n.setAspect(t/e),this.dispatchEvent(new Io(yc.RESIZE,{width:t,height:e}))}},{key:"appendChild",value:function(t,e){return this.document.documentElement.appendChild(t,e)}},{key:"insertBefore",value:function(t,e){return this.document.documentElement.insertBefore(t,e)}},{key:"removeChild",value:function(t){return this.document.documentElement.removeChild(t)}},{key:"removeChildren",value:function(){this.document.documentElement.removeChildren()}},{key:"destroyChildren",value:function(){this.document.documentElement.destroyChildren()}},{key:"render",value:function(){this.dispatchEvent(qc),this.getRenderingService().render(this.getConfig()),this.dispatchEvent(Uc)}},{key:"run",value:function(){var e=this;(function t(){e.render(),e.frameId=requestAnimationFrame(t)})()}},{key:"initRenderer",value:(n=Ur(M().mark(function t(e){return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}throw new Error("Renderer is required.");case 2:return this.inited=!1,this.readyPromise=void 0,this.context.rBushRoot=new ot,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new zc,new Vc,new Dc,new Bc([new Wc])),this.loadRendererContainerModule(e),this.context.contextService=new this.context.ContextService(Yr(Yr({},w),this.context)),this.context.renderingService=new _c(w,this.context),this.context.eventService=new Oc(w,this.context),this.context.eventService.init(),t.next=14,this.context.contextService.init();case 14:return t.next=16,this.context.renderingService.init();case 16:this.inited=!0,this.getRoot().forEach(function(t){t=t.renderable;t&&(t.renderBoundsDirty=!0,t.boundsDirty=!0,t.dirty=!0)}),this.mountChildren(this.getRoot()),e.getConfig().enableAutoRendering&&this.run();case 20:case"end":return t.stop()}},t,this)})),function(t){return n.apply(this,arguments)})},{key:"loadRendererContainerModule",value:function(t){var e=this;t.getPlugins().forEach(function(t){t.context=e.context,t.init()})}},{key:"setRenderer",value:(e=Ur(M().mark(function t(e){var n,r;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((n=this.getConfig()).renderer===e)return t.abrupt("return");t.next=3;break;case 3:return r=n.renderer,n.renderer=e,this.destroy(!1,!0),ni(null==r?void 0:r.getPlugins()).reverse().forEach(function(t){t.destroy()}),t.next=9,this.initRenderer(e);case 9:case"end":return t.stop()}},t,this)})),function(t){return e.apply(this,arguments)})},{key:"setCursor",value:function(t){this.getConfig().cursor=t,this.getContextService().applyCursorStyle(t)}},{key:"unmountChildren",value:function(t){var e=this;t.childNodes.forEach(function(t){e.unmountChildren(t)}),this.inited&&(t.isMutationObserved?t.dispatchEvent(Hc):(Hc.target=t,this.dispatchEvent(Hc,!0)),t!==this.document.documentElement&&(t.ownerDocument=null),t.isConnected=!1),t.isCustomElement&&t.disconnectedCallback&&t.disconnectedCallback()}},{key:"mountChildren",value:function(t){var e=this;this.inited?t.isConnected||(t.ownerDocument=this.document,t.isConnected=!0,t.isMutationObserved?t.dispatchEvent(Yc):(Yc.target=t,this.dispatchEvent(Yc,!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()}},{key:"client2Viewport",value:function(t){return this.getEventService().client2Viewport(t)}},{key:"viewport2Client",value:function(t){return this.getEventService().viewport2Client(t)}},{key:"viewport2Canvas",value:function(t){return this.getEventService().viewport2Canvas(t)}},{key:"canvas2Viewport",value:function(t){return this.getEventService().canvas2Viewport(t)}},{key:"getPointByClient",value:function(t,e){return this.client2Viewport({x:t,y:e})}},{key:"getClientByPoint",value:function(t,e){return this.viewport2Client({x:t,y:e})}}]),E}();function Kc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,function(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);n=n.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}(r.key),r)}}function $c(t){return($c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Zc(t,e){return(Zc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Jc(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");e=t;if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qc(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=$c(n);return Jc(this,r?(t=$c(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}wc=function(){var t=o,e=gc;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zc(t,e);var n,a=Qc(o);function o(){var t=this,e=o;if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=a.call.apply(a,[this].concat(r))).landmarks=[],t.landmarkAnimationID=void 0,t}return t=o,(e=[{key:"rotate",value:function(t,e,n){if(this.relElevation=Ss(e),this.relAzimuth=Ss(t),this.relRoll=Ss(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===Ul.EXPLORING){e=ie(re(),[1,0,0],As((this.rotateWorld?1:-1)*this.relElevation)),t=ie(re(),[0,1,0],As((this.rotateWorld?1:-1)*this.relAzimuth)),n=ie(re(),[0,0,1],As(this.relRoll)),t=ae(re(),t,e),t=ae(re(),t,n),e=Lt(ft(),t);xt(this.matrix,this.matrix,[0,0,-this.distance]),bt(this.matrix,this.matrix,e),xt(this.matrix,this.matrix,[0,0,this.distance])}else{if(90<Math.abs(this.elevation))return this;this.computeMatrix()}return this._getAxes(),this.type===Ul.ORBITING||this.type===Ul.EXPLORING?this._getPosition():this.type===Ul.TRACKING&&this._getFocalPoint(),this._update(),this}},{key:"pan",value:function(t,e){t=_s(t,e,0),e=Bt(this.position);return Wt(e,e,Yt(g(),this.right,t[0])),Wt(e,e,Yt(g(),this.up,t[1])),this._setPosition(e),this.triggerUpdate(),this}},{key:"dolly",value:function(t){var e=this.forward,n=Bt(this.position),t=(this.dollyingStep,this.distance+t*this.dollyingStep),t=Math.max(Math.min(t,this.maxDistance),this.minDistance)-this.distance;return n[0]+=t*e[0],n[1]+=t*e[1],n[2]+=t*e[2],this._setPosition(n),this.type===Ul.ORBITING||this.type===Ul.EXPLORING?this._getDistance():this.type===Ul.TRACKING&&Wt(this.focalPoint,n,this.distanceVector),this.triggerUpdate(),this}},{key:"createLandmark",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=e.position,n=void 0===n?this.position:n,r=e.focalPoint,r=void 0===r?this.focalPoint:r,i=e.roll,e=e.zoom,a=new w.CameraContribution,n=(a.setType(this.type,void 0),a.setPosition(n[0],n[1]||this.position[1],n[2]||this.position[2]),a.setFocalPoint(r[0],r[1]||this.focalPoint[1],r[2]||this.focalPoint[2]),a.setRoll(i||this.roll),a.setZoom(e||this.zoom),{name:t,matrix:ht(a.getWorldTransform()),right:Bt(a.right),up:Bt(a.up),forward:Bt(a.forward),position:Bt(a.getPosition()),focalPoint:Bt(a.getFocalPoint()),distanceVector:Bt(a.getDistanceVector()),distance:a.getDistance(),dollyingStep:a.getDollyingStep(),azimuth:a.getAzimuth(),elevation:a.getElevation(),roll:a.getRoll(),relAzimuth:a.relAzimuth,relElevation:a.relElevation,relRoll:a.relRoll,zoom:a.getZoom()});return this.landmarks.push(n),n}},{key:"gotoLandmark",value:function(e){var t,s,n,r,l,c,u,f,h,d,p,y,v=this,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},a=hn(e)?this.landmarks.find(function(t){return t.name===e}):e;a&&(t=void 0===(t=(i=pn(i)?{duration:i}:i).easing)?"linear":t,n=i.duration,s=void 0===n?100:n,n=void 0===(n=i.easingFunction)?void 0:n,i=i.onfinish,r=void 0===i?void 0:i,l=.01,0===s?(this.syncFromLandmark(a),r&&r()):(void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID),c=a.position,u=a.focalPoint,f=a.zoom,h=a.roll,d=n||w.EasingFunction(t),y=function(){v.setFocalPoint(u),v.setPosition(c),v.setRoll(h),v.setZoom(f),v.computeMatrix(),v.triggerUpdate(),r&&r()},this.canvas.requestAnimationFrame(function t(e){var n,r,i,a,o,e=e-(p=void 0===p?e:p);s<e||(n=d(e/s),r=g(),i=g(),a=1,o=0,Xt(r,v.focalPoint,u,n),Xt(i,v.position,c,n),o=v.roll*(1-n)+h*n,a=v.zoom*(1-n)+f*n,v.setFocalPoint(r),v.setPosition(i),v.setRoll(o),v.setZoom(a),Qt(r,u)+Qt(i,c)<=l)?y():(v.computeMatrix(),v.triggerUpdate(),e<s&&(v.landmarkAnimationID=v.canvas.requestAnimationFrame(t)))})))}},{key:"syncFromLandmark",value:function(t){this.matrix=dt(this.matrix,t.matrix),this.right=zt(this.right,t.right),this.up=zt(this.up,t.up),this.forward=zt(this.forward,t.forward),this.position=zt(this.position,t.position),this.focalPoint=zt(this.focalPoint,t.focalPoint),this.distanceVector=zt(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}}])&&Kc(t.prototype,e),n&&Kc(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}();function tu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,function(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);n=n.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}(r.key),r)}}function eu(t,e,n){return e&&tu(t.prototype,e),n&&tu(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}w.CameraContribution=wc;var nu=eu(function t(){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function")});function ru(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function iu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,function(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);n=n.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}(r.key),r)}}function au(t,e,n){return e&&iu(t.prototype,e),n&&iu(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function ou(t){return(ou=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function su(t,e){return(su=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function lu(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");e=t;if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cu(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=ou(n);return lu(this,r?(t=ou(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function uu(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||hu(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fu(t){return function(t){if(Array.isArray(t))return du(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||hu(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hu(t,e){var n;if(t)return"string"==typeof t?du(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?du(t,e):void 0}function du(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}nu.inputProperties=void 0,nu.childrenInputProperties=void 0,nu.layoutOptions=void 0;function pu(b,e,x,n){if(!(0<=b&&b<=1&&0<=x&&x<=1))throw new Error("bezier x values must be in [0, 1] range");if(b===e&&x===n)return function(t){return t};for(var w=new(Bu?Float32Array:Array)(11),t=0;t<11;++t)w[t]=Wu(.1*t,b,x);function r(t){for(var e=0,n=1;10!==n&&w[n]<=t;++n)e+=.1;var r=e+.1*((t-w[--n])/(w[n+1]-w[n])),i=Vu(r,b,x);if(.001<=i){for(var a=t,o=r,s=b,l=x,c=0;c<Ru;++c){var u=Vu(o,s,l);if(0===u)return o;o-=(Wu(o,s,l)-a)/u}return o}if(0===i)return r;for(var f,h,d=t,p=e,y=e+.1,v=b,g=x,m=0;0<(f=Wu(h=p+(y-p)/2,v,g)-d)?y=h:p=h,Math.abs(f)>Iu&&++m<Fu;);return h}return function(t){return 0===t||1===t?t:Wu(r(t),e,n)}}function yu(t){return Math.pow(t,2)}function vu(t){return Math.pow(t,3)}function gu(t){return Math.pow(t,4)}function mu(t){return Math.pow(t,5)}function bu(t){return Math.pow(t,6)}function xu(t){return 1-Math.cos(t*Math.PI/2)}function wu(t){return 1-Math.sqrt(1-t*t)}function ku(t){return t*t*(3*t-2)}function Eu(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)}function Mu(t){var e=(n=uu(1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],2))[0],n=void 0===(n=n[1])?.5:n,e=dn(Number(void 0===e?1:e),1,10),n=dn(Number(n),.1,2);return 0===t||1===t?t:-e*Math.pow(2,10*(t-1))*Math.sin((t-1-n/(2*Math.PI)*Math.asin(1/e))*(2*Math.PI)/n)}function Ou(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],n=2<arguments.length?arguments[2]:void 0,r=(e=uu(e,4))[0],i=void 0===(i=e[1])?100:i,a=void 0===(a=e[2])?10:a,e=void 0===(e=e[3])?0:e,r=dn(void 0===r?1:r,.1,1e3),i=dn(i,.1,1e3),a=dn(a,.1,1e3),e=dn(e,.1,1e3),o=Math.sqrt(i/r),i=(a=a/(2*Math.sqrt(i*r)))<1?o*Math.sqrt(1-a*a):0,r=a<1?(a*o-e)/i:-e+o,e=n?n*t/1e3:t,e=a<1?Math.exp(-e*a*o)*(+Math.cos(i*e)+r*Math.sin(i*e)):(1+r*e)*Math.exp(-e*o);return 0===t||1===t?t:1-e}function Su(t){var e=uu(1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],2),n=void 0===(n=e[0])?10:n;return("start"==e[1]?Math.ceil:Math.floor)(dn(t,0,1)*n)/n}function _u(t){var e=(i=uu(1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],4))[0],n=i[1],r=i[2],i=i[3];return pu(e,n,r,i)(t)}function Au(e){return function(t){return 1-e(1-t,1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],2<arguments.length?arguments[2]:void 0)}}function Pu(r){return function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],n=2<arguments.length?arguments[2]:void 0;return t<.5?r(2*t,e,n)/2:1-r(-2*t+2,e,n)/2}}function Tu(r){return function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],n=2<arguments.length?arguments[2]:void 0;return t<.5?(1-r(1-2*t,e,n))/2:(r(2*t-1,e,n)+1)/2}}function Lu(t){return t}var Nu=function(){var t=a,e=Ro;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&su(t,e);var i=cu(a);function a(t,e,n,r){return ru(this,a),(t=i.call(this,t)).currentTime=void 0,t.timelineTime=void 0,t.currentTime=n,t.timelineTime=r,t.target=e,t.type="finish",t.bubbles=!1,t.currentTarget=e,t.defaultPrevented=!1,t.eventPhase=t.AT_TARGET,t.timeStamp=Date.now(),t.currentTime=n,t.timelineTime=r,t}return au(a)}(),Cu=0,ju=function(){function n(t,e){ru(this,n),this.effect=void 0,this.timeline=void 0,this.id=void 0,this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this.oldPlayState=void 0,this._holdTime=void 0,this.readyPromise=void 0,this.finishedPromise=void 0,this.resolveReadyPromise=void 0,this.rejectReadyPromise=void 0,this.resolveFinishedPromise=void 0,this.rejectFinishedPromise=void 0,this.onfinish=void 0,this.oncancel=void 0,this.onframe=void 0,this._currentTime=0,this._startTime=void 0,this._playbackRate=1,this._totalDuration=void 0,this._inEffect=void 0,this._inTimeline=!0,this.onremove=void 0,((this.effect=t).animation=this).timeline=e,this.id="".concat(Cu++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number(null==(t=this.effect)?void 0:t.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return au(n,[{key:"pending",get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"ready",get:function(){var n=this;return this.readyPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(t,e){n.resolveReadyPromise=function(){t(n)},n.rejectReadyPromise=function(){e(new Error)}}),this.pending)||this.resolveReadyPromise(),this.readyPromise}},{key:"finished",get:function(){var n=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(t,e){n.resolveFinishedPromise=function(){t(n)},n.rejectFinishedPromise=function(){e(new Error)}}),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){var e;t=Number(t),isNaN(t)||(this.timeline.restart(),this._paused||null===this._startTime||(this._startTime=Number(null==(e=this.timeline)?void 0:e.currentTime)-t/this.playbackRate),this.currentTimePending=!1,this._currentTime!==t&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this)))}},{key:"startTime",get:function(){return this._startTime},set:function(t){null!==t&&(this.updatePromises(),t=Number(t),isNaN(t)||this._paused||this._idle||(this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()))}},{key:"playbackRate",get:function(){return this._playbackRate},set:function(t){var e;t!==this._playbackRate&&(this.updatePromises(),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())}},{key:"_isFinished",get:function(){return!this._idle&&(0<this._playbackRate&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)}},{key:"totalDuration",get:function(){return this._totalDuration}},{key:"_needsTick",get:function(){return this.pending||"running"===this.playState||!this._finishedFlag}},{key:"updatePromises",value: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}},{key:"play",value:function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),-1===this.timeline.animations.indexOf(this)&&this.timeline.animations.push(this),this.updatePromises()}},{key:"pause",value:function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._isFinished||this._paused||this._idle?this._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,this._startTime=null,this._paused=!0,this.updatePromises()}},{key:"finish",value:function(){this.updatePromises(),this._idle||(this.currentTime=0<this._playbackRate?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())}},{key:"cancel",value:function(){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())}},{key:"reverse",value:function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()}},{key:"updatePlaybackRate",value:function(t){this.playbackRate=t}},{key:"targetAnimations",value:function(){var t;return(null==(t=this.effect)?void 0:t.target).getAnimations()}},{key:"markTarget",value:function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)}},{key:"unmarkTarget",value:function(){var t=this.targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)}},{key:"tick",value: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))}},{key:"rewind",value:function(){if(0<=this.playbackRate)this.currentTime=0;else{if(!(this._totalDuration<1/0))throw new Error("Unable to rewind negative playback rate animation with infinite duration");this.currentTime=this._totalDuration}}},{key:"persist",value:function(){throw new Error(Ri)}},{key:"addEventListener",value:function(t,e,n){throw new Error(Ri)}},{key:"removeEventListener",value:function(t,e,n){throw new Error(Ri)}},{key:"dispatchEvent",value:function(t){throw new Error(Ri)}},{key:"commitStyles",value:function(){throw new Error(Ri)}},{key:"ensureAlive",value:function(){var t;this.playbackRate<0&&0===this.currentTime?this._inEffect=!(null==(t=this.effect)||!t.update(-1)):this._inEffect=!(null==(t=this.effect)||!t.update(this.currentTime)),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))}},{key:"tickCurrentTime",value:function(t,e){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=0<this._playbackRate?this._totalDuration:0),this.ensureAlive())}},{key:"fireEvents",value:function(t){var e,n=this;this._isFinished?this._finishedFlag||(this.onfinish&&(e=new Nu(null,this,this.currentTime,t),setTimeout(function(){n.onfinish&&n.onfinish(e)})),this._finishedFlag=!0):(this.onframe&&"running"===this.playState&&(t=new Nu(null,this,this.currentTime,t),this.onframe(t)),this._finishedFlag=!1)}}]),n}(),Ru=4,Iu=1e-7,Fu=10,Bu="function"==typeof Float32Array,Du=function(t,e){return 1-3*e+3*t},zu=function(t,e){return 3*e-6*t},Gu=function(t){return 3*t},Wu=function(t,e,n){return((Du(e,n)*t+zu(e,n))*t+Gu(e))*t},Vu=function(t,e,n){return 3*Du(e,n)*t*t+2*zu(e,n)*t+Gu(e)},n=pu(.42,0,1,1),Yu={steps:Su,"step-start":function(t){return Su(t,[1,"start"])},"step-end":function(t){return Su(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":_u,ease:function(t){return _u(t,[.25,.1,.25,1])},in:n,out:Au(n),"in-out":Pu(n),"out-in":Tu(n),"in-quad":yu,"out-quad":Au(yu),"in-out-quad":Pu(yu),"out-in-quad":Tu(yu),"in-cubic":vu,"out-cubic":Au(vu),"in-out-cubic":Pu(vu),"out-in-cubic":Tu(vu),"in-quart":gu,"out-quart":Au(gu),"in-out-quart":Pu(gu),"out-in-quart":Tu(gu),"in-quint":mu,"out-quint":Au(mu),"in-out-quint":Pu(mu),"out-in-quint":Tu(mu),"in-expo":bu,"out-expo":Au(bu),"in-out-expo":Pu(bu),"out-in-expo":Tu(bu),"in-sine":xu,"out-sine":Au(xu),"in-out-sine":Pu(xu),"out-in-sine":Tu(xu),"in-circ":wu,"out-circ":Au(wu),"in-out-circ":Pu(wu),"out-in-circ":Tu(wu),"in-back":ku,"out-back":Au(ku),"in-out-back":Pu(ku),"out-in-back":Tu(ku),"in-bounce":Eu,"out-bounce":Au(Eu),"in-out-bounce":Pu(Eu),"out-in-bounce":Tu(Eu),"in-elastic":Mu,"out-elastic":Au(Mu),"in-out-elastic":Pu(Mu),"out-in-elastic":Tu(Mu),spring:Ou,"spring-in":Ou,"spring-out":Au(Ou),"spring-in-out":Pu(Ou),"spring-out-in":Tu(Ou)},Hu=function(t){return("-"===(t=(t=t).replace(/([A-Z])/g,function(t){return"-".concat(t.toLowerCase())})).charAt(0)?t.substring(1):t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()};function qu(n,r){return function(t){var e;return 1<=t?1:(t+=r*(e=1/n))-t%e}}var Mo="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",Uu=new RegExp("cubic-bezier\\("+Mo+","+Mo+","+Mo+","+Mo+"\\)"),Xu=/steps\(\s*(\d+)\s*\)/,Ku=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function $u(t){var e=Uu.exec(t);return e?pu.apply(void 0,fu(e.slice(1).map(Number))):(e=Xu.exec(t))?qu(Number(e[1]),0):(e=Ku.exec(t))?qu(Number(e[1]),{start:1,middle:.5,end:0}[e[2]]):Yu[Hu(t)]||Yu.linear}function Zu(t){return Math.abs((0!==(e=t).duration&&0!==e.iterations?("auto"===e.duration?0:Number(e.duration))*(null!=(e=e.iterations)?e:1):0)/(t.playbackRate||1));var e}var Ju=0,Qu=1,tf=2,ef=3;function nf(t,e,n){c=t,i=n;var r,i,a,o,s,l=null===(l=e)?Ju:(r=i.endTime,l<Math.min(i.delay,r)?Qu:l>=Math.min(i.delay+c+i.endDelay,r)?tf:ef),c=function(t,e,n,r,i){switch(r){case Qu:return"backwards"===e||"both"===e?0:null;case ef:return n-i;case tf:return"forwards"===e||"both"===e?t:null;case Ju:return null}}(t,n.fill,e,l,n.delay);return null===c?null:(i="auto"===n.duration?0:n.duration,r=i,t=l,e=n.iterations,o=c,s=n.iterationStart,0===r?t!==Qu&&(s+=e):s+=o/r,e=t=s,o=n.iterationStart,s=l,a=n.iterations,c=c,i=i,e=o=0!==(o=e===1/0?o%1:e%1)||s!==tf||0===a||0===c&&0!==i?o:1,s=n.iterations,a=e,c=t,i=l===tf&&s===1/0?1/0:1===a?Math.floor(c)-1:Math.floor(c),o=n.direction,t=i,l=e,a="normal"===(s="normal"!==(s=o)&&"reverse"!==o&&(t=t,"alternate-reverse"===o&&(t+=1),s="normal",t!==1/0)&&t%2!=0?"reverse":s)?l:1-l,n.currentIteration=i,n.progress=a,n.easingFunction(a))}function rf(t,e,n){var a=function(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r]){var a;af(i)&&(a={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:$u(t[r].easing)||e.easingFunction,value:t[r][i]},n[i]=n[i]||[],n[i].push(a))}return n}(t,e),o=function(t,e){var n,r=[];for(n in t)for(var i=t[n],a=0;a<i.length-1;a++){var o=a,s=a+1,l=i[o].computedOffset,c=i[s].computedOffset,u=l,f=c;0===a&&(u=-1/0,0===c)&&(s=o),a===i.length-2&&(f=1/0,1===l)&&(o=s),r.push({applyFrom:u,applyTo:f,startOffset:i[o].computedOffset,endOffset:i[s].computedOffset,easingFunction:i[o].easingFunction,property:n,interpolation:function(t,e,n,r){var i=sc[t];if(i&&i.syntax&&i.int){i=w.styleValueRegistry.getPropertySyntax(i.syntax);if(i){var a,o=w.styleValueRegistry.parseProperty(t,e,r),s=w.styleValueRegistry.parseProperty(t,n,r),o=w.styleValueRegistry.computeProperty(t,o,r),t=w.styleValueRegistry.computeProperty(t,s,r),s=i.mixer(o,t,r);if(s)return a=of.apply(void 0,fu(s)),function(t){return 0===t?e:1===t?n:a(t)}}}return of(!1,!0,function(t){return t?n:e})}(n,i[o].value,i[s].value,e)})}return r.sort(function(t,e){return t.startOffset-e.startOffset}),r}(a,n);return function(r,i){if(null!==i)o.filter(function(t){return i>=t.applyFrom&&i<t.applyTo}).forEach(function(t){var e=i-t.startOffset,n=t.endOffset-t.startOffset,e=0==n?0:t.easingFunction(e/n);r.style[t.property]=t.interpolation(e)});else for(var t in a)af(t)&&(r.style[t]=null)}}function af(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var of=function(e,n,r){return function(t){return r(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)&&e.length===n.length){for(var i=[],a=0;a<e.length;a++)i.push(t(e[a],n[a],r));return i}throw new Error("Mismatched interpolation arguments "+e+":"+n)}(e,n,t))}};var sf=function(){function t(){ru(this,t),this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=Lu,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.playbackRate=void 0,this.effect=void 0,this.composite=void 0,this.activeDuration=void 0,this.endTime=void 0,this.currentIteration=null,this.progress=null}return au(t,[{key:"easing",get:function(){return this._easing},set:function(t){this.easingFunction=$u(t),this._easing=t}}]),t}();function lf(t,i){if(null===t)return[];for(var e=(t=Array.isArray(t)?t:function(t){var e,n=[];for(e in t)if(!(e in["easing","offset","composite"]))for(var r,i=t[e],a=(i=Array.isArray(i)?i:[i]).length,o=0;o<a;o++)n[o]||(r={},"offset"in t&&(r.offset=Number(t.offset)),"easing"in t&&(r.easing=t.easing),"composite"in t&&(r.composite=t.composite),n[o]=r),void 0!==i[o]&&null!==i[o]&&(n[o][e]=i[o]);return n.sort(function(t,e){return(t.computedOffset||0)-(e.computedOffset||0)}),n}(t)).map(function(t){var e,n={};for(e in null!=i&&i.composite&&(n.composite="auto"),t){var r=t[e];if("offset"===e){if(null!==r){if(r=Number(r),!isFinite(r))throw new Error("Keyframe offsets must be numbers.");if(r<0||1<r)throw new Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=r}}else if("composite"===e&&-1===["replace","add","accumulate","auto"].indexOf(r))throw new Error("".concat(r," compositing is not supported"));n[e]=r}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==i?void 0:i.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n}),n=!0,r=-1/0,a=0;a<e.length;a++){var o=e[a].offset;if(_(o))n=!1;else{if(o<r)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");r=o}}if(e=e.filter(function(t){return 0<=Number(t.offset)&&Number(t.offset)<=1}),!n)for(var s=e.length,l=(e[s-1].computedOffset=Number(null!=(t=e[s-1].offset)?t:1),1<s&&(e[0].computedOffset=Number(null!=(t=e[0].offset)?t:0)),0),c=Number(e[0].computedOffset),u=1;u<s;u++){var f=e[u].computedOffset;if(!_(f)&&!_(c)){for(var h=1;h<u-l;h++)e[l+h].computedOffset=c+(Number(f)-c)*h/(u-l);l=u,c=Number(f)}}return e}var cf="backwards|forwards|both|none".split("|"),uf="reverse|alternate|alternate-reverse".split("|");function ff(t,e){var n,r,i;return t=function(t){"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t});return t}(null!=(r=t)?r:{duration:"auto"}),n=t,r=e,i=new sf,r&&(i.fill="both",i.duration="auto"),"number"!=typeof n||isNaN(n)?void 0!==n&&Object.keys(n).forEach(function(t){void 0===n[t]||null===n[t]||"auto"===n[t]||!("number"!=typeof i[t]&&"duration"!==t||"number"==typeof n[t]&&!isNaN(n[t]))||"fill"===t&&-1===cf.indexOf(n[t])||"direction"===t&&-1===uf.indexOf(n[t])||(i[t]=n[t])}):i.duration=n,i}var hf=function(){function i(t,e,n){var r=this;ru(this,i),this.composite="replace",this.iterationComposite="replace",this.target=void 0,this.animation=void 0,this.timing=void 0,this.computedTiming=void 0,this.normalizedKeyframes=void 0,this.timeFraction=void 0,this.interpolations=void 0,this.target=t,this.timing=ff(n,!1),(this.timing.effect=this).timing.activeDuration=Zu(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=lf(e,this.timing),this.interpolations=rf(this.normalizedKeyframes,this.timing,this.target),this.computedTiming=new Proxy(this.timing,{get:function(t,e){return"duration"===e?"auto"===t.duration?0:t.duration:"fill"===e?"auto"===t.fill?"none":t.fill:"localTime"===e?r.animation&&r.animation.currentTime||null:"currentIteration"===e?r.animation&&"running"===r.animation.playState?t.currentIteration||0:null:"progress"===e?r.animation&&"running"===r.animation.playState?t.progress||0:null:t[e]},set:function(){return!0}})}return au(i,[{key:"applyInterpolations",value:function(){this.interpolations(this.target,Number(this.timeFraction))}},{key:"update",value:function(t){return null!==t&&(this.timeFraction=nf(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)}},{key:"getKeyframes",value:function(){return this.normalizedKeyframes}},{key:"setKeyframes",value:function(t){this.normalizedKeyframes=lf(t)}},{key:"getComputedTiming",value:function(){return this.computedTiming}},{key:"getTiming",value:function(){return this.timing}},{key:"updateTiming",value:function(e){var n=this;Object.keys(e||{}).forEach(function(t){n.timing=e[t]})}}]),i}();function df(t,e){return Number(t.id)-Number(e.id)}r=function(){function e(t){var n=this;ru(this,e),this.document=void 0,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.frameId=void 0,this.webAnimationsNextTick=function(t){n.currentTime=t,n.discardAnimations(),0===n.animations.length?n.timelineTicking=!1:n.requestAnimationFrame(n.webAnimationsNextTick)},this.processRafCallbacks=function(e){var t=n.rafCallbacks;n.rafCallbacks=[],e<Number(n.currentTime)&&(e=Number(n.currentTime)),n.animations.sort(df),n.animations=n.tick(e,!0,n.animations)[0],t.forEach(function(t){t[1](e)}),n.applyPendingEffects()},this.document=t}return au(e,[{key:"getAnimations",value:function(){return this.discardAnimations(),this.animations.slice()}},{key:"isTicking",value:function(){return this.inTick}},{key:"play",value:function(t,e,n){t=new hf(t,e,n),e=new ju(t,this);return this.animations.push(e),this.restartWebAnimationsNextTick(),e.updatePromises(),e.play(),e.updatePromises(),e}},{key:"applyDirtiedAnimation",value:function(t){var e=this;this.inTick||(t.markTarget(),(t=t.targetAnimations()).sort(df),this.tick(Number(this.currentTime),!1,t.slice())[1].forEach(function(t){t=e.animations.indexOf(t);-1!==t&&e.animations.splice(t,1)}),this.applyPendingEffects())}},{key:"restart",value:function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame(function(){}),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame}},{key:"destroy",value:function(){this.document.defaultView.cancelAnimationFrame(this.frameId)}},{key:"applyPendingEffects",value:function(){this.pendingEffects.forEach(function(t){null!=t&&t.applyInterpolations()}),this.pendingEffects=[]}},{key:"updateAnimationsPromises",value:function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(t){return t.updatePromises()})}},{key:"discardAnimations",value:function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(t){return"finished"!==t.playState&&"idle"!==t.playState})}},{key:"restartWebAnimationsNextTick",value:function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))}},{key:"rAF",value: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}},{key:"requestAnimationFrame",value:function(e){var n=this;return this.rAF(function(t){n.updateAnimationsPromises(),e(t),n.updateAnimationsPromises()})}},{key:"tick",value:function(n,r,t){var i=this,a=(this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=n,this.ticking=!1,[]),o=[],s=[],l=[];return t.forEach(function(t){t.tick(n,r),t._inEffect?(o.push(t.effect),t.markTarget()):(a.push(t.effect),t.unmarkTarget()),t._needsTick&&(i.ticking=!0);var e=t._inEffect||t._needsTick;((t._inTimeline=e)?s:l).push(t)}),(t=this.pendingEffects).push.apply(t,a),(t=this.pendingEffects).push.apply(t,o),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[s,l]}}]),e}();function pf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,kf(r.key),r)}}function yf(t,e,n){(e=kf(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}function vf(t){return(vf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function gf(t,e){return(gf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function mf(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");e=t;if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bf(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=vf(n);return mf(this,r?(t=vf(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function xf(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){var n;if(t)return"string"==typeof t?wf(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wf(t,e):void 0}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wf(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function kf(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);if("object"!=typeof(n=n.call(t,e||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}function Ef(t,e){e=e.r;t.arc(e,e,e,0,2*Math.PI,!1)}function Mf(t,e){var n,r,i=e.rx,e=e.ry;t.ellipse?t.ellipse(i,e,i,e,0,0,2*Math.PI,!1):(n=e<i?i:e,r=e<i?1:i/e,e=e<i?e/i:1,t.save(),t.scale(r,e),t.arc(0,0,n,0,2*Math.PI))}function Of(t,e){var n,r,i=e.x1,a=e.y1,o=e.x2,s=e.y2,l=e.defX,l=void 0===l?0:l,c=e.defY,c=void 0===c?0:c,u=e.markerStart,f=e.markerEnd,h=e.markerStartOffset,e=e.markerEndOffset,d=0,p=0,y=0,v=0,g=0;u&&u instanceof N&&h&&(n=o-i,r=s-a,g=Math.atan2(r,n),d=Math.cos(g)*(h||0),p=Math.sin(g)*(h||0)),f&&f instanceof N&&e&&(n=i-o,r=a-s,g=Math.atan2(r,n),y=Math.cos(g)*(e||0),v=Math.sin(g)*(e||0)),t.moveTo(i-l+d,a-c+p),t.lineTo(o-l+y,s-c+v)}function Sf(t,e){var n,r,i=e.defX,a=void 0===i?0:i,i=e.defY,o=void 0===i?0:i,i=e.markerStart,s=e.markerEnd,l=e.markerStartOffset,c=e.markerEndOffset,e=e.path,u=e.absolutePath,f=e.segments,h=0,d=0,p=0,y=0,e=0;i&&i instanceof N&&l&&(r=(i=xf(i.parentNode.getStartTangent(),2))[0],i=i[1],n=r[0]-i[0],r=r[1]-i[1],e=Math.atan2(r,n),h=Math.cos(e)*(l||0),d=Math.sin(e)*(l||0)),s&&s instanceof N&&c&&(l=(i=xf(s.parentNode.getEndTangent(),2))[0],s=i[1],n=l[0]-s[0],r=l[1]-s[1],e=Math.atan2(r,n),p=Math.cos(e)*(c||0),y=Math.sin(e)*(c||0));for(var v=0;v<u.length;v++){var g=u[v],m=g[0],b=u[v+1],x=0===v&&(0!==h||0!==d),w=(v===u.length-1||b&&("M"===b[0]||"Z"===b[0]))&&0!==p&&0!==y;switch(m){case"M":x?(t.moveTo(g[1]-a+h,g[2]-o+d),t.lineTo(g[1]-a,g[2]-o)):t.moveTo(g[1]-a,g[2]-o);break;case"L":w?t.lineTo(g[1]-a+p,g[2]-o+y):t.lineTo(g[1]-a,g[2]-o);break;case"Q":t.quadraticCurveTo(g[1]-a,g[2]-o,g[3]-a,g[4]-o),w&&t.lineTo(g[3]-a+p,g[4]-o+y);break;case"C":t.bezierCurveTo(g[1]-a,g[2]-o,g[3]-a,g[4]-o,g[5]-a,g[6]-o),w&&t.lineTo(g[5]-a+p,g[6]-o+y);break;case"A":var k,E,M=f[v].arcParams,O=M.cx,S=M.cy,_=M.rx,A=M.ry,P=M.startAngle,T=M.endAngle,L=M.xRotation,M=M.sweepFlag;t.ellipse?t.ellipse(O-a,S-o,_,A,L,P,T,!!(1-M)):(k=A<_?_:A,E=A<_?1:_/A,A=A<_?A/_:1,t.translate(O-a,S-o),t.rotate(L),t.scale(E,A),t.arc(0,0,k,P,T,!!(1-M)),t.scale(1/E,1/A),t.rotate(-L),t.translate(-(O-a),-(S-o))),w&&t.lineTo(g[6]-a+p,g[7]-o+y);break;case"Z":t.closePath()}}}function _f(t,e){var n,r,i=e.defX,a=void 0===i?0:i,i=e.defY,o=void 0===i?0:i,i=e.markerStart,s=e.markerEnd,l=e.markerStartOffset,c=e.markerEndOffset,u=e.points.points,f=u.length,e=u[0][0]-a,h=u[0][1]-o,d=u[f-1][0]-a,p=u[f-1][1]-o,y=0,v=0,g=0,m=0,b=0;i&&i instanceof N&&l&&(n=u[1][0]-u[0][0],r=u[1][1]-u[0][1],b=Math.atan2(r,n),y=Math.cos(b)*(l||0),v=Math.sin(b)*(l||0)),s&&s instanceof N&&c&&(n=u[f-1][0]-u[0][0],r=u[f-1][1]-u[0][1],b=Math.atan2(r,n),g=Math.cos(b)*(c||0),m=Math.sin(b)*(c||0)),t.moveTo(e+(y||g),h+(v||m));for(var x=1;x<f-1;x++){var w=u[x];t.lineTo(w[0]-a,w[1]-o)}t.lineTo(d,p)}function Af(t,e){var n,r,i=e.defX,a=void 0===i?0:i,i=e.defY,o=void 0===i?0:i,i=e.markerStart,s=e.markerEnd,l=e.markerStartOffset,c=e.markerEndOffset,u=e.points.points,f=u.length,e=u[0][0]-a,h=u[0][1]-o,d=u[f-1][0]-a,p=u[f-1][1]-o,y=0,v=0,g=0,m=0,b=0;i&&i instanceof N&&l&&(n=u[1][0]-u[0][0],r=u[1][1]-u[0][1],b=Math.atan2(r,n),y=Math.cos(b)*(l||0),v=Math.sin(b)*(l||0)),s&&s instanceof N&&c&&(n=u[f-2][0]-u[f-1][0],r=u[f-2][1]-u[f-1][1],b=Math.atan2(r,n),g=Math.cos(b)*(c||0),m=Math.sin(b)*(c||0)),t.moveTo(e+y,h+v);for(var x=1;x<f-1;x++){var w=u[x];t.lineTo(w[0]-a,w[1]-o)}t.lineTo(d+g,p+m)}function Pf(t,e){var n,r,i,a,o=e.radius,s=e.width,e=e.height,l=s,c=e;o&&o.some(function(t){return 0!==t})?(n=(s=0<s?1:-1)+(e=0<e?1:-1)==0,r=(o=xf(o.map(function(t){return dn(t,0,Math.min(Math.abs(l)/2,Math.abs(c)/2))}),4))[0],i=o[1],a=o[2],o=o[3],t.moveTo(s*r,0),t.lineTo(l-s*i,0),0!==i&&t.arc(l-s*i,e*i,i,-e*Math.PI/2,0<s?0:Math.PI,n),t.lineTo(l,c-e*a),0!==a&&t.arc(l-s*a,c-e*a,a,0<s?0:Math.PI,0<e?Math.PI/2:1.5*Math.PI,n),t.lineTo(s*o,c),0!==o&&t.arc(s*o,c-e*o,o,0<e?Math.PI/2:-Math.PI/2,0<s?Math.PI:0,n),t.lineTo(0,e*r),0!==r&&t.arc(s*r,e*r,r,0<s?Math.PI:0,0<e?1.5*Math.PI:Math.PI/2,n)):t.rect(0,0,l,c)}w.EasingFunction=$u,w.AnimationTimeline=r;var Tf=function(){var t=o,e=Ic;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&gf(t,e);var n,a=bf(o);function o(){var t=this,e=o;if(!(t instanceof e))throw new TypeError("Cannot call a class as a function");for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=a.call.apply(a,[this].concat(r))).name="canvas-path-generator",t}return t=o,(e=[{key:"init",value:function(){yf(t={},E.CIRCLE,Ef),yf(t,E.ELLIPSE,Mf),yf(t,E.RECT,Pf),yf(t,E.LINE,Of),yf(t,E.POLYLINE,Af),yf(t,E.POLYGON,_f),yf(t,E.PATH,Sf),yf(t,E.TEXT,void 0),yf(t,E.GROUP,void 0),yf(t,E.IMAGE,void 0),yf(t,E.HTML,void 0),yf(t,E.MESH,void 0);var t;this.context.pathGeneratorFactory=t}},{key:"destroy",value:function(){delete this.context.pathGeneratorFactory}}])&&pf(t.prototype,e),n&&pf(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}();function Lf(){Lf=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return E()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,f;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,f):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}(n,o);if(n){if(n===f)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===f)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var f={};function h(){}function d(){}function p(){}var e={},y=(a(e,r,function(){return this}),Object.getPrototypeOf),y=y&&y(y(k([]))),v=(y&&y!==t&&l.call(y,r)&&(e=y),p.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function m(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:E}}function E(){return{value:void 0,done:!0}}return c(v,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(v),t},o.awrap=function(t){return{__await:t}},g(m.prototype),a(m.prototype,n,function(){return this}),o.AsyncIterator=m,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new m(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},g(v),a(v,i,"Generator"),a(v,r,function(){return this}),a(v,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},o}function Nf(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Cf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Yf(r.key),r)}}function Rf(t,e,n){e&&jf(t.prototype,e),n&&jf(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function If(t,e,n){(e=Yf(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}function Ff(t){return(Ff=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Bf(t,e){return(Bf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Df(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");e=t;if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zf(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=Ff(n);return Df(this,r?(t=Ff(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function Gf(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||Wf(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wf(t,e){var n;if(t)return"string"==typeof t?Vf(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vf(t,e):void 0}function Vf(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Yf(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);if("object"!=typeof(n=n.call(t,e||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}var Hf=g(),qf=g(),Uf=g(),Xf=ft(),Kf=function(){function s(){var o=this;Cf(this,s),this.canvasConfig=void 0,this.pathGeneratorFactory=void 0,this.pointInPathPickerFactory=void 0,this.isHit=function(t,e,n,r){var i=o.pointInPathPickerFactory[t.nodeName];if(i){var n=gt(Xf,n),e=Kt(qf,Gt(Uf,e[0],e[1],0),n),n=t.getGeometryBounds().halfExtents,a=t.parsedStyle.anchor;if(e[0]+=(a&&a[0]||0)*n[0]*2,e[1]+=(a&&a[1]||0)*n[1]*2,i(t,new fi(e[0],e[1]),r,o.isPointInPath))return!0}return!1},this.isPointInPath=function(t,e){var n=w.offscreenCanvas.getOrCreateContext(o.canvasConfig.offscreenCanvas),r=o.pathGeneratorFactory[t.nodeName];return r&&(n.beginPath(),r(n,t.parsedStyle),n.closePath()),n.isPointInPath(e.x,e.y)}}return Rf(s,[{key:"apply",value:function(t){var n=this,e=t.config,r=t.renderingService,i=t.renderingContext,a=t.pathGeneratorFactory,t=t.pointInPathPickerFactory,o=(this.canvasConfig=e,this.pathGeneratorFactory=a,this.pointInPathPickerFactory=t,null==(e=i.root)?void 0:e.ownerDocument);r.hooks.pick.tapPromise(s.tag,function(){s=Lf().mark(function t(e){return Lf().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",n.pick(o,e));case 1:case"end":return t.stop()}},t)});var s,e=function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Nf(r,e,n,i,a,"next",t)}function a(t){Nf(r,e,n,i,a,"throw",t)}i(void 0)})};return function(t){return e.apply(this,arguments)}}()),r.hooks.pickSync.tap(s.tag,function(t){return n.pick(o,t)})}},{key:"pick",value:function(t,e){var n,r=e.topmost,i=e.position,a=i.x,i=i.y,o=Gt(Hf,a,i,0),s=[],l=function(t,e){var n,r,i,a,o="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(o)return r=!(n=!0),{s:function(){o=o.call(t)},n:function(){var t=o.next();return n=t.done,t},e:function(t){r=!0,i=t},f:function(){try{n||null==o.return||o.return()}finally{if(r)throw i}}};if(Array.isArray(t)||(o=Wf(t))||e&&t&&"number"==typeof t.length)return o&&(t=o),a=0,{s:e=function(){},n:function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(t){throw t},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(t.elementsFromBBox(o[0],o[1],o[0],o[1]));try{for(l.s();!(n=l.n()).done;){var c=n.value,u=c.getWorldTransform();if(this.isHit(c,o,u,!1)){var f=Ei(c);if(f){var h=f.parsedStyle.clipPath;if(this.isHit(h,o,h.getWorldTransform(),!0)){if(r)return e.picked=[c],e;s.push(c)}}else{if(r)return e.picked=[c],e;s.push(c)}}}}catch(t){l.e(t)}finally{l.f()}return e.picked=s,e}}]),s}();function $f(t){return function(t){if(Array.isArray(t))return Zf(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){var n;if(t)return"string"==typeof t?Zf(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zf(t,e):void 0}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zf(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Jf(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function Qf(t,e){return Math.abs(t-e)<.001}function th(t,e){var n=Math.min.apply(Math,$f(t)),r=Math.min.apply(Math,$f(e));return{x:n,y:r,width:Math.max.apply(Math,$f(t))-n,height:Math.max.apply(Math,$f(e))-r}}function eh(t){return(t+2*Math.PI)%(2*Math.PI)}Kf.tag="CanvasPicker";var nh={box:function(t,e,n,r){return th([t,n],[e,r])},length:Jf,pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,a){var o=(n-t)*(i-t)+(r-e)*(a-e);return o<0?Jf(t,e,i,a):(n-t)*(n-t)+(r-e)*(r-e)<o?Jf(n,r,i,a):this.pointToLine(t,e,n,r,i,a)},pointToLine:function(t,e,n,r,i,a){n=[n-t,r-e];return xe(n,[0,0])?Math.sqrt((i-t)*(i-t)+(a-e)*(a-e)):(me(r=[-n[1],n[0]],r),Math.abs(be([i-t,a-e],r)))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function rh(t,e,n,r,i,a){for(var o=-1,s=1/0,l=[n,r],c=20,u=1/(c=a&&200<a?a/10:c),f=u/10,h=0;h<=c;h++){var d=h*u,p=[i.apply(void 0,$f(t.concat([d]))),i.apply(void 0,$f(e.concat([d])))],p=Jf(l[0],l[1],p[0],p[1]);p<s&&(o=d,s=p)}if(0===o)return{x:t[0],y:e[0]};if(1===o)return{x:t[(n=t.length)-1],y:e[n-1]};for(var s=1/0,y=0;y<32&&!(f<1e-4);y++){var v=o-f,g=o+f,m=[i.apply(void 0,$f(t.concat([v]))),i.apply(void 0,$f(e.concat([v])))],m=Jf(l[0],l[1],m[0],m[1]);0<=v&&m<s?(o=v,s=m):(v=[i.apply(void 0,$f(t.concat([g]))),i.apply(void 0,$f(e.concat([g])))],m=Jf(l[0],l[1],v[0],v[1]),g<=1&&m<s?(o=g,s=m):f*=.5)}return{x:i.apply(void 0,$f(t.concat([o]))),y:i.apply(void 0,$f(e.concat([o])))}}function ih(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function ah(t,e,n){n=t+n-2*e;return Qf(n,0)?[.5]:(t=(t-e)/n)<=1&&0<=t?[t]:[]}function oh(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function sh(t,e,n,r,i,a,o){var s=ih(t,n,i,o),l=ih(e,r,a,o),c=nh.pointAt(t,e,n,r,o),n=nh.pointAt(n,r,i,a,o);return[[t,e,c.x,c.y,s,l],[s,l,n.x,n.y,i,a]]}function lh(t,e,n,r,i,a,o){return 0===o?(Jf(t,e,n,r)+Jf(n,r,i,a)+Jf(t,e,i,a))/2:(e=(t=sh(t,e,n,r,i,a,.5))[0],n=t[1],e.push(o-1),n.push(o-1),lh.apply(void 0,$f(e))+lh.apply(void 0,$f(n)))}var ch={box:function(t,e,n,r,i,a){var o=ah(t,n,i)[0],s=ah(e,r,a)[0],l=[t,i],c=[e,a];return void 0!==o&&l.push(ih(t,n,i,o)),void 0!==s&&c.push(ih(e,r,a,s)),th(l,c)},length:function(t,e,n,r,i,a){return lh(t,e,n,r,i,a,3)},nearestPoint:function(t,e,n,r,i,a,o,s){return rh([t,n,i],[e,r,a],o,s,ih)},pointDistance:function(t,e,n,r,i,a,o,s){t=this.nearestPoint(t,e,n,r,i,a,o,s);return Jf(t.x,t.y,o,s)},interpolationAt:ih,pointAt:function(t,e,n,r,i,a,o){return{x:ih(t,n,i,o),y:ih(e,r,a,o)}},divide:sh,tangentAngle:function(t,e,n,r,i,a,o){t=oh(t,n,i,o),n=oh(e,r,a,o);return eh(Math.atan2(n,t))}};function uh(t,e,n,r,i){var a=1-i;return a*a*a*t+3*e*i*a*a+3*n*i*i*a+r*i*i*i}function fh(t,e,n,r,i){var a=1-i;return 3*(a*a*(e-t)+2*a*i*(n-e)+i*i*(r-n))}function hh(t,e,n,r){var i,a,r=-3*t+9*e-9*n+3*r,n=6*t-12*e+6*n,e=3*e-3*t,t=[];return Qf(r,0)?Qf(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):Qf(e=n*n-4*r*e,0)?t.push(-n/(2*r)):0<e&&(a=(-n-(e=Math.sqrt(e)))/(2*r),0<=(i=(-n+e)/(2*r))&&i<=1&&t.push(i),0<=a)&&a<=1&&t.push(a),t}function dh(t,e,n,r,i,a,o,s,l){var c=uh(t,n,i,o,l),u=uh(e,r,a,s,l),f=nh.pointAt(t,e,n,r,l),n=nh.pointAt(n,r,i,a,l),r=nh.pointAt(i,a,o,s,l),i=nh.pointAt(f.x,f.y,n.x,n.y,l),a=nh.pointAt(n.x,n.y,r.x,r.y,l);return[[t,e,f.x,f.y,i.x,i.y,c,u],[c,u,a.x,a.y,r.x,r.y,o,s]]}function ph(t,e,n,r,i,a,o,s,l){if(0===l){for(var c=[t,n,i,o],u=[e,r,a,s],f=0,h=c.length,d=0;d<h;d++)f+=Jf(c[d],u[d],c[(d+1)%h],u[(d+1)%h]);return f/2}t=dh(t,e,n,r,i,a,o,s,.5),e=[].concat($f(t[0]),[l-1]),n=[].concat($f(t[1]),[l-1]);return ph.apply(void 0,$f(e))+ph.apply(void 0,$f(n))}var yh={extrema:hh,box:function(t,e,n,r,i,a,o,s){for(var l=[t,o],c=[e,s],u=hh(t,n,i,o),f=hh(e,r,a,s),h=0;h<u.length;h++)l.push(uh(t,n,i,o,u[h]));for(var d=0;d<f.length;d++)c.push(uh(e,r,a,s,f[d]));return th(l,c)},length:function(t,e,n,r,i,a,o,s){return ph(t,e,n,r,i,a,o,s,3)},nearestPoint:function(t,e,n,r,i,a,o,s,l,c,u){return rh([t,n,i,o],[e,r,a,s],l,c,uh,u)},pointDistance:function(t,e,n,r,i,a,o,s,l,c,u){t=this.nearestPoint(t,e,n,r,i,a,o,s,l,c,u);return Jf(t.x,t.y,l,c)},interpolationAt:uh,pointAt:function(t,e,n,r,i,a,o,s,l){return{x:uh(t,n,i,o,l),y:uh(e,r,a,s,l)}},divide:dh,tangentAngle:function(t,e,n,r,i,a,o,s,l){t=fh(t,n,i,o,l),n=fh(e,r,a,s,l);return eh(Math.atan2(n,t))}};function vh(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function gh(t,e,n,r,i,a){return t<=i&&i<=t+n&&e<=a&&a<=e+r}function mh(t,e,n,r,i,a,o,s){var l=(Math.atan2(s-e,o-t)+2*Math.PI)%(2*Math.PI),t={x:t+n*Math.cos(l),y:e+n*Math.sin(l)};return vh(t.x,t.y,o,s)<=a/2}function bh(t,e,n,r,i,a,o){var s=Math.min(t,n),l=Math.max(t,n),c=Math.min(e,r),u=Math.max(e,r),f=i/2;return s-f<=a&&a<=l+f&&c-f<=o&&o<=u+f&&nh.pointToLine(t,e,n,r,a,o)<=i/2}function xh(t,e,n,r,i){var a=t.length;if(!(a<2)){for(var o=0;o<a-1;o++)if(bh(t[o][0],t[o][1],t[o+1][0],t[o+1][1],e,n,r))return!0;if(i){var i=t[0],s=t[a-1];if(bh(i[0],i[1],s[0],s[1],e,n,r))return!0}}return!1}var wh=1e-6;function kh(t){return Math.abs(t)<wh?0:t<0?-1:1}function Eh(t,e,n){var r=!1,i=t.length;if(i<=2)return!1;for(var a,o,s,l=0;l<i;l++){var c=t[l],u=t[(l+1)%i];if(o=u,((s=[e,n])[0]-(a=c)[0])*(o[1]-a[1])==(o[0]-a[0])*(s[1]-a[1])&&Math.min(a[0],o[0])<=s[0]&&s[0]<=Math.max(a[0],o[0])&&Math.min(a[1],o[1])<=s[1]&&s[1]<=Math.max(a[1],o[1]))return!0;0<kh(c[1]-n)!=0<kh(u[1]-n)&&kh(e-(n-c[1])*(c[0]-u[0])/(c[1]-u[1])-c[0])<0&&(r=!r)}return r}function Mh(t,e,n){for(var r=!1,i=0;i<t.length&&!(r=Eh(t[i],e,n));i++);return r}function Oh(t,e,n){var t=t.parsedStyle,r=t.r,i=t.fill,a=t.stroke,o=t.lineWidth,s=t.increasedLineWidthForHitTesting,t=t.pointerEvents,o=((o||0)+(s||0))/2,s=vh(r,r,e.x,e.y),e=Gf(xl(t,i,a),2),t=e[0],i=e[1];return t&&i||n?s<=r+o:t?s<=r:!!i&&r-o<=s&&s<=r+o}function Sh(t,e,n,r){return t/(n*n)+e/(r*r)}function _h(t,e,n){var t=t.parsedStyle,r=t.rx,i=t.ry,a=t.fill,o=t.stroke,s=t.lineWidth,l=t.increasedLineWidthForHitTesting,t=t.pointerEvents,c=e.x,e=e.y,t=Gf(xl(t,a,o),2),a=t[0],o=t[1],t=((s||0)+(l||0))/2,s=(c-r)*(c-r),l=(e-i)*(e-i);return a&&o||n?Sh(s,l,r+t,i+t)<=1:a?Sh(s,l,r,i)<=1:!!o&&1<=Sh(s,l,r-t,i-t)&&Sh(s,l,r+t,i+t)<=1}function Ah(t,e,n){var t=t.parsedStyle,r=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.lineWidth,l=t.increasedLineWidthForHitTesting,c=t.defX,c=void 0===c?0:c,u=t.defY,u=void 0===u?0:u,t=Gf(xl(t.pointerEvents,t.fill,t.stroke),2);return t[0],!(!t[1]&&!n||!s)&&bh(r,i,a,o,(s||0)+(l||0),e.x+c,e.y+u)}function Ph(t,e,n,r){var i=t.parsedStyle,a=i.lineWidth,o=i.increasedLineWidthForHitTesting,s=i.stroke,l=i.fill,c=i.defX,c=void 0===c?0:c,u=i.defY,u=void 0===u?0:u,f=i.path,i=Gf(xl(i.pointerEvents,l,s),2),l=i[0],s=i[1],i=f.segments,h=f.hasArc,d=f.polylines,f=f.polygons,p=ll(t),y=!1;return l||n?h?r(t,e):Mh(f,e.x+c,e.y+u)||Mh(d,e.x+c,e.y+u):s||n?function(t,e,n,r,i){for(var a=!1,o=e/2,s=0;s<t.length;s++){var l=t[s],c=l.currentPoint,u=l.params,f=l.prePoint,h=l.box;if(!h||gh(h.x-o,h.y-o,h.width+e,h.height+e,n,r))switch(l.command){case"L":case"Z":if(a=bh(f[0],f[1],c[0],c[1],e,n,r))return!0;break;case"Q":if(a=ch.pointDistance(f[0],f[1],u[1],u[2],u[3],u[4],n,r)<=e/2)return!0;break;case"C":if(a=yh.pointDistance(f[0],f[1],u[1],u[2],u[3],u[4],u[5],u[6],n,r,i)<=e/2)return!0;break;case"A":l.cubicParams||(l.cubicParams=Ge(f[0],f[1],u[1],u[2],u[3],u[4],u[5],u[6],u[7],void 0));for(var d=l.cubicParams,p=f,y=0;y<d.length;y+=6){var v=yh.pointDistance(p[0],p[1],d[y],d[y+1],d[y+2],d[y+3],d[y+4],d[y+5],n,r,i),p=[d[y+4],d[y+5]];if(a=v<=e/2)return!0}}}return a}(i,(a||0)+(o||0),e.x+c,e.y+u,p):y}function Th(t,e,n){var t=t.parsedStyle,r=t.stroke,i=t.fill,a=t.lineWidth,o=t.increasedLineWidthForHitTesting,s=t.points,l=t.defX,l=void 0===l?0:l,c=t.defY,c=void 0===c?0:c,t=Gf(xl(t.pointerEvents,i,r),2),i=t[0],r=!1;return r=(r=t[1]||n?xh(s.points,(a||0)+(o||0),e.x+l,e.y+c,!0):r)||!i&&!n?r:Eh(s.points,e.x+l,e.y+c)}function Lh(t,e,n){var t=t.parsedStyle,r=t.lineWidth,i=t.increasedLineWidthForHitTesting,a=t.points,o=t.defX,o=void 0===o?0:o,s=t.defY,s=void 0===s?0:s;return!(!Gf(xl(t.pointerEvents,t.fill,t.stroke),2)[1]&&!n||!r)&&xh(a.points,(r||0)+(i||0),e.x+o,e.y+s,!1)}function Nh(t,e,n,r){var i,a,o,s,l,c,u,f,h,d=t.parsedStyle,p=d.radius,y=d.fill,v=d.stroke,g=d.lineWidth,m=d.increasedLineWidthForHitTesting,b=d.width,x=d.height,d=Gf(xl(d.pointerEvents,y,v),2),y=d[0],v=d[1],d=(g||0)+(m||0);return p&&p.some(function(t){return 0!==t})?(g=!1,(v||n)&&(u=m=0,s=b,c=x,p=p.map(function(t){return dn(t,0,Math.min(Math.abs(b)/2,Math.abs(x)/2))}),h=d,i=e.x,a=e.y,p=Gf(p,4),f=p[0],o=p[1],l=p[2],p=p[3],g=bh(m+f,u,m+s-o,u,h,i,a)||bh(m+s,u+o,m+s,u+c-l,h,i,a)||bh(m+s-l,u+c,m+p,u+c,h,i,a)||bh(m,u+c-p,m,u+f,h,i,a)||mh(m+s-o,u+o,o,Math.PI,Math.PI,h,i,a)||mh(m+s-l,u+c-l,l,0,Math.PI,h,i,a)||mh(m+p,u+c-p,p,Math.PI,Math.PI,h,i,a)||mh(m+f,u+f,f,Math.PI,Math.PI,h,i,a)),g||!y&&!n?g:r(t,e)):(o=d/2,y&&v||n?gh(0-o,0-o,b+o,x+o,e.x,e.y):y?gh(0,0,b,x,e.x,e.y):!!v&&(l=s=0,c=b,p=x,m=d,u=e.x,f=e.y,gh(s-(h=m/2),l-h,c,m,u,f)||gh(s+c-h,l-h,m,p,u,f)||gh(s+h,l+p-h,c,m,u,f)||gh(s-h,l+h,m,p,u,f)))}var Ch=function(){var t=a,e=Ic;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bf(t,e);var i=zf(a);function a(){var t;Cf(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).name="canvas-picker",t}return Rf(a,[{key:"init",value:function(){function t(){return!0}If(e={},E.CIRCLE,Oh),If(e,E.ELLIPSE,_h),If(e,E.RECT,Nh),If(e,E.LINE,Ah),If(e,E.POLYLINE,Lh),If(e,E.POLYGON,Th),If(e,E.PATH,Ph),If(e,E.TEXT,t),If(e,E.GROUP,null),If(e,E.IMAGE,t),If(e,E.HTML,null),If(e,E.MESH,null);var e;this.context.pointInPathPickerFactory=e,this.addRenderingPlugin(new Kf)}},{key:"destroy",value:function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()}}]),a}();function jh(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)),r}function Rh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jh(Object(n),!0).forEach(function(t){Wh(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ih(){Ih=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return E()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,f;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,f):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}(n,o);if(n){if(n===f)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===f)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var f={};function h(){}function d(){}function p(){}var e={},y=(a(e,r,function(){return this}),Object.getPrototypeOf),y=y&&y(y(k([]))),v=(y&&y!==t&&l.call(y,r)&&(e=y),p.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function m(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:E}}function E(){return{value:void 0,done:!0}}return c(v,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(v),t},o.awrap=function(t){return{__await:t}},g(m.prototype),a(m.prototype,n,function(){return this}),o.AsyncIterator=m,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new m(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},g(v),a(v,i,"Generator"),a(v,r,function(){return this}),a(v,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},o}function Fh(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Bh(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Fh(r,e,n,i,a,"next",t)}function a(t){Fh(r,e,n,i,a,"throw",t)}i(void 0)})}}function Dh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zh(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Zh(r.key),r)}}function Gh(t,e,n){e&&zh(t.prototype,e),n&&zh(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function Wh(t,e,n){(e=Zh(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}function Vh(t){return(Vh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Yh(t,e){return(Yh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Hh(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");e=t;if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qh(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=Vh(n);return Hh(this,r?(t=Vh(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function Uh(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||Kh(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xh(t){return function(t){if(Array.isArray(t))return $h(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Kh(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Kh(t,e){var n;if(t)return"string"==typeof t?$h(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$h(t,e):void 0}function $h(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Zh(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);if("object"!=typeof(n=n.call(t,e||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}var Jh=function(){function r(t){Dh(this,r),this.canvasRendererPluginOptions=void 0,this.context=void 0,this.pathGeneratorFactory=void 0,this.rBush=void 0,this.removedRBushNodeAABBs=[],this.renderQueue=[],this.restoreStack=[],this.clearFullScreen=!1,this.vpMatrix=ft(),this.dprMatrix=ft(),this.tmpMat4=ft(),this.vec3a=g(),this.vec3b=g(),this.vec3c=g(),this.vec3d=g(),this.canvasRendererPluginOptions=t}return Gh(r,[{key:"apply",value:function(t){function a(t){(t=t.target.rBushNode).aabb&&u.removedRBushNodeAABBs.push(t.aabb)}function o(t){(t=t.target.rBushNode).aabb&&u.removedRBushNodeAABBs.push(t.aabb)}function c(t,e){t.isVisible()&&!t.isCulled()&&(u.renderDisplayObject(t,e,u.context,u.restoreStack),u.saveDirtyAABB(t)),(t.sortable.sorted||t.childNodes).forEach(function(t){c(t,e)})}var u=this,f=(this.context=t).config,h=t.camera,l=t.renderingService,d=t.renderingContext,e=t.rBushRoot,n=t.pathGeneratorFactory,p=(this.rBush=e,this.pathGeneratorFactory=n,t.contextService),y=d.root.ownerDocument.defaultView;l.hooks.init.tapPromise(r.tag,Bh(Ih().mark(function t(){var e,n,r,i;return Ih().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:y.addEventListener(mo.UNMOUNTED,a),y.addEventListener(mo.CULLED,o),e=p.getDPR(),n=f.width,r=f.height,i=p.getContext(),u.clearRect(i,0,0,n*e,r*e,f.background);case 6:case"end":return t.stop()}},t)}))),l.hooks.destroy.tap(r.tag,function(){y.removeEventListener(mo.UNMOUNTED,a),y.removeEventListener(mo.CULLED,o)}),l.hooks.beginFrame.tap(r.tag,function(){var t=p.getContext(),e=p.getDPR(),n=f.width,r=f.height,i=u.canvasRendererPluginOptions,a=i.dirtyObjectNumThreshold,i=i.dirtyObjectRatioThreshold,o=l.getStats(),s=o.total,o=o.rendered,s=o/s;u.clearFullScreen=l.disableDirtyRectangleRendering()||a<o&&i<s,t&&(t.resetTransform(),u.clearFullScreen)&&u.clearRect(t,0,0,n*e,r*e,f.background)});l.hooks.endFrame.tap(r.tag,function(){var e=p.getContext(),t=p.getDPR();if(Ot(u.dprMatrix,k(t,t,1)),bt(u.vpMatrix,u.dprMatrix,h.getOrthoMatrix()),u.clearFullScreen)c(d.root,e);else{t=u.safeMergeAABB.apply(u,[u.mergeDirtyAABBs(u.renderQueue)].concat(Xh(u.removedRBushNodeAABBs.map(function(t){var e=t.minX,n=t.minY,r=t.maxX,t=t.maxY,i=new li;return i.setMinMax(k(e,n,0),k(r,t,0)),i}))));if(u.removedRBushNodeAABBs=[],li.isEmpty(t))return void(u.renderQueue=[]);var n=u.convertAABB2Rect(t),r=n.x,i=n.y,a=n.width,n=n.height,o=Kt(u.vec3a,k(r,i,0),u.vpMatrix),s=Kt(u.vec3b,k(r+a,i,0),u.vpMatrix),l=Kt(u.vec3c,k(r,i+n,0),u.vpMatrix),r=Kt(u.vec3d,k(r+a,i+n,0),u.vpMatrix),a=Math.min(o[0],s[0],r[0],l[0]),i=Math.min(o[1],s[1],r[1],l[1]),n=Math.max(o[0],s[0],r[0],l[0]),o=Math.max(o[1],s[1],r[1],l[1]),s=Math.floor(a),r=Math.floor(i),l=Math.ceil(n-a),n=Math.ceil(o-i);e.save(),u.clearRect(e,s,r,l,n,f.background),e.beginPath(),e.rect(s,r,l,n),e.clip(),e.setTransform(u.vpMatrix[0],u.vpMatrix[1],u.vpMatrix[4],u.vpMatrix[5],u.vpMatrix[12],u.vpMatrix[13]),f.renderer.getConfig().enableDirtyRectangleRenderingDebug&&y.dispatchEvent(new Io(yc.DIRTY_RECTANGLE,{dirtyRect:{x:s,y:r,width:l,height:n}})),u.searchDirtyObjects(t).sort(function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder}).forEach(function(t){t&&t.isVisible()&&!t.isCulled()&&u.renderDisplayObject(t,e,u.context,u.restoreStack)}),e.restore(),u.renderQueue.forEach(function(t){u.saveDirtyAABB(t)}),u.renderQueue=[]}u.restoreStack.forEach(function(){e.restore()}),u.restoreStack=[]}),l.hooks.render.tap(r.tag,function(t){u.clearFullScreen||u.renderQueue.push(t)})}},{key:"clearRect",value:function(t,e,n,r,i,a){t.clearRect(e,n,r,i),a&&(t.fillStyle=a,t.fillRect(e,n,r,i))}},{key:"renderDisplayObject",value:function(t,e,n,r){var i,a=t.nodeName,o=r[r.length-1],o=(!o||t.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINS||(e.restore(),r.pop()),this.context.styleRendererFactory[a]),a=this.pathGeneratorFactory[a],s=t.parsedStyle.clipPath;s&&(this.applyWorldTransform(e,s),i=this.pathGeneratorFactory[s.nodeName])&&(e.save(),r.push(t),e.beginPath(),i(e,s.parsedStyle),e.closePath(),e.clip()),o&&(this.applyWorldTransform(e,t),e.save(),this.applyAttributesToContext(e,t)),a&&(e.beginPath(),a(e,t.parsedStyle),t.nodeName!==E.LINE)&&t.nodeName!==E.PATH&&t.nodeName!==E.POLYLINE&&e.closePath(),o&&(o.render(e,t.parsedStyle,t,n,this),e.restore()),t.renderable.dirty=!1}},{key:"convertAABB2Rect",value:function(t){var e=t.getMin(),t=t.getMax(),n=Math.floor(e[0]),e=Math.floor(e[1]);return{x:n,y:e,width:Math.ceil(t[0])-n,height:Math.ceil(t[1])-e}}},{key:"mergeDirtyAABBs",value:function(t){var n=new li;return t.forEach(function(t){var e=t.getRenderBounds(),e=(n.add(e),t.renderable.dirtyRenderBounds);e&&n.add(e)}),n}},{key:"searchDirtyObjects",value:function(t){var e=Uh(t.getMin(),2),n=e[0],e=e[1],t=Uh(t.getMax(),2),r=t[0],t=t[1];return this.rBush.search({minX:n,minY:e,maxX:r,maxY:t}).map(function(t){t=t.id;return w.displayObjectPool.getByEntity(t)})}},{key:"saveDirtyAABB",value:function(t){var e=t.renderable,t=(e.dirtyRenderBounds||(e.dirtyRenderBounds=new li),t.getRenderBounds());t&&e.dirtyRenderBounds.update(t.center,t.halfExtents)}},{key:"applyAttributesToContext",value:function(t,e){var n=e.parsedStyle,r=n.stroke,i=n.fill,a=n.opacity,o=n.lineDash,n=n.lineDashOffset;o&&t.setLineDash(o),_(n)||(t.lineDashOffset=n),_(a)||(t.globalAlpha*=a),_(r)||Array.isArray(r)||r.isNone||(t.strokeStyle=e.attributes.stroke),_(i)||Array.isArray(i)||i.isNone||(t.fillStyle=e.attributes.fill)}},{key:"applyWorldTransform",value:function(t,e,n){var r=0,i=0,a=(e.parsedStyle||{}).anchor,o=a&&a[0]||0,a=a&&a[1]||0;0===o&&0===a||(r=-o*((o=e.getGeometryBounds())&&2*o.halfExtents[0]||0),i=-a*(o&&2*o.halfExtents[1]||0)),n?(dt(this.tmpMat4,e.getLocalTransform()),this.vec3a[0]=r,this.vec3a[1]=i,this.vec3a[2]=0,xt(this.tmpMat4,this.tmpMat4,this.vec3a),bt(this.tmpMat4,n,this.tmpMat4)):(dt(this.tmpMat4,e.getWorldTransform()),this.vec3a[0]=r,this.vec3a[1]=i,this.vec3a[2]=0,xt(this.tmpMat4,this.tmpMat4,this.vec3a)),bt(this.tmpMat4,this.vpMatrix,this.tmpMat4),t.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])}},{key:"safeMergeAABB",value:function(){for(var e=new li,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(t){e.add(t)}),e}}]),r}(),Qh=(Jh.tag="CanvasRenderer",function(){function e(t){Dh(this,e),this.imagePool=void 0,this.imagePool=t}return Gh(e,[{key:"render",value:function(t,e,n,r,i){var a=e.fill,o=e.fillRule,s=e.opacity,l=e.fillOpacity,c=e.stroke,u=e.strokeOpacity,f=e.lineWidth,h=e.lineCap,d=e.lineJoin,p=e.shadowType,y=e.shadowColor,v=e.shadowBlur,g=e.filter,e=e.miterLimit,m=!_(a)&&!a.isNone,b=!_(c)&&!c.isNone&&0<f,x=0===a.alpha,g=!(!g||!g.length),y=!_(y)&&0<v,v=n.nodeName,p="inner"===p,v=b&&y&&(v===E.PATH||v===E.LINE||v===E.POLYLINE||x||p);m&&(t.globalAlpha=s*l,v||td(n,t,y),this.fill(t,n,a,o,r,i),v||this.clearShadowAndFilter(t,g,y)),b&&(t.globalAlpha=s*u,t.lineWidth=f,_(e)||(t.miterLimit=e),_(h)||(t.lineCap=h),_(d)||(t.lineJoin=d),v&&(p&&(t.globalCompositeOperation="source-atop"),td(n,t,!0),p)&&(this.stroke(t,n,c,r,i),t.globalCompositeOperation="source-over",this.clearShadowAndFilter(t,g,!0)),this.stroke(t,n,c,r,i))}},{key:"clearShadowAndFilter",value:function(t,e,n){n&&(t.shadowColor="transparent",t.shadowBlur=0),e&&(n=t.filter,!_(n))&&-1<n.indexOf("drop-shadow")&&(t.filter=n.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")}},{key:"fill",value:function(e,n,t,r,i,a){var o=this;Array.isArray(t)?t.forEach(function(t){e.fillStyle=o.getColor(t,n,e),e.fill(r)}):(_a(t)&&(e.fillStyle=this.getPattern(t,n,e,i,a)),e.fill(r))}},{key:"stroke",value:function(e,n,t,r,i){var a=this;Array.isArray(t)?t.forEach(function(t){e.strokeStyle=a.getColor(t,n,e),e.stroke()}):(_a(t)&&(e.strokeStyle=this.getPattern(t,n,e,r,i)),e.stroke())}},{key:"getPattern",value:function(t,e,n,r,i){var a,o,s,l,c,u,f;return t.image instanceof Es&&(a=(o=t.image.parsedStyle).width,o=o.height,s=r.contextService.getDPR(),l=r.config.offscreenCanvas,(c=w.offscreenCanvas.getOrCreateCanvas(l)).width=a*s,c.height=o*s,u=w.offscreenCanvas.getOrCreateContext(l),f=[],t.image.forEach(function(t){i.renderDisplayObject(t,u,r,f)}),f.forEach(function(){u.restore()})),this.imagePool.getOrCreatePatternSync(t,n,c,s,function(){e.renderable.dirty=!0,r.renderingService.dirtify()})}},{key:"getColor",value:function(t,e,n){var r;return t.type!==Ni.LinearGradient&&t.type!==Ni.RadialGradient||(r=(e=e.getGeometryBounds())&&2*e.halfExtents[0]||1,e=e&&2*e.halfExtents[1]||1,r=this.imagePool.getOrCreateGradient(Rh(Rh({type:t.type},t.value),{},{width:r,height:e}),n)),r}}]),e}());function td(t,e,n){var r=t.parsedStyle,i=r.filter,a=r.shadowColor,o=r.shadowBlur,s=r.shadowOffsetX,r=r.shadowOffsetY;i&&i.length&&(e.filter=t.style.filter),n&&(e.shadowColor=a.toString(),e.shadowBlur=o||0,e.shadowOffsetX=s||0,e.shadowOffsetY=r||0)}var ed=function(){function e(t){Dh(this,e),this.imagePool=void 0,this.imagePool=t}return Gh(e,[{key:"render",value:function(t,e,n){var r=e.width,i=e.height,a=e.img,o=e.shadowColor,e=e.shadowBlur,a=hn(a)?this.imagePool.getImageSync(a):(r=r||a.width,i=i||a.height,a);if(a){td(n,t,!_(o)&&0<e);try{t.drawImage(a,0,0,r,i)}catch(t){}}}}]),e}(),nd=function(){function t(){Dh(this,t)}return Gh(t,[{key:"render",value:function(t,e,n){var r=e.lineWidth,i=e.textAlign,a=e.textBaseline,o=e.lineJoin,s=e.miterLimit,l=e.letterSpacing,c=e.stroke,u=e.fill,f=e.fillOpacity,h=e.strokeOpacity,d=e.opacity,p=e.metrics,y=e.dx,v=e.dy,g=e.shadowColor,e=e.shadowBlur,m=p.font,b=p.lines,x=p.height,w=p.lineHeight,k=p.lineMetrics,E=(t.font=m,t.lineWidth=r,t.textAlign="middle"===i?"center":i,t.textBaseline=a,t.lineJoin=o,_(s)||(t.miterLimit=s),0),M=("middle"===a?E=-x/2-w/2:"bottom"===a||"alphabetic"===a||"ideographic"===a?E=-x:"top"!==a&&"hanging"!==a||(E=-w),y||0);E+=v||0,td(n,t,!_(g)&&0<e);for(var O=0;O<b.length;O++){var S=r/2+M;E+=w,_(c)||c.isNone||!r||this.drawLetterSpacing(t,b[O],k[O],i,S,E,l,f,h,d,!0),_(u)||this.drawLetterSpacing(t,b[O],k[O],i,S,E,l,f,h,d)}}},{key:"drawLetterSpacing",value:function(t,e,n,r,i,a,o,s,l,c){var u=10<arguments.length&&void 0!==arguments[10]&&arguments[10];if(0===o)u?this.strokeText(t,e,i,a,l):this.fillText(t,e,i,a,s,c);else{for(var f=t.textAlign,h=(t.textAlign="left",i),d=("center"===r||"middle"===r?h=i-n.width/2:"right"!==r&&"end"!==r||(h=i-n.width),Array.from(e)),p=t.measureText(e).width,y=0;y<d.length;++y){var v=d[y];u?this.strokeText(t,v,h,a,l):this.fillText(t,v,h,a,s,c),h+=p-(v=t.measureText(e.substring(y+1)).width)+o,p=v}t.textAlign=f}}},{key:"fillText",value:function(t,e,n,r,i,a){var o,s=!_(i)&&1!==i;s&&(o=t.globalAlpha,t.globalAlpha=i*a),t.fillText(e,n,r),s&&(t.globalAlpha=o)}},{key:"strokeText",value:function(t,e,n,r,i){var a,o=!_(i)&&1!==i;o&&(a=t.globalAlpha,t.globalAlpha=i),t.strokeText(e,n,r),o&&(t.globalAlpha=a)}}]),t}(),rd=function(){var t=r,e=Ic;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yh(t,e);var n=qh(r);function r(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return Dh(this,r),(t=n.call(this)).options=void 0,t.name="canvas-renderer",t.options=e,t}return Gh(r,[{key:"init",value:function(){var t,e=Rh({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),n=this.context.imagePool,r=new Qh(n),n=(Wh(t={},E.CIRCLE,r),Wh(t,E.ELLIPSE,r),Wh(t,E.RECT,r),Wh(t,E.IMAGE,new ed(n)),Wh(t,E.TEXT,new nd),Wh(t,E.LINE,r),Wh(t,E.POLYLINE,r),Wh(t,E.POLYGON,r),Wh(t,E.PATH,r),Wh(t,E.GROUP,void 0),Wh(t,E.HTML,void 0),Wh(t,E.MESH,void 0),t);this.context.defaultStyleRendererFactory=n,this.context.styleRendererFactory=n,this.addRenderingPlugin(new Jh(e))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory}}]),r}();function id(){id=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return E()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,f;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,f):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}(n,o);if(n){if(n===f)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===f)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var f={};function h(){}function d(){}function p(){}var e={},y=(a(e,r,function(){return this}),Object.getPrototypeOf),y=y&&y(y(k([]))),v=(y&&y!==t&&l.call(y,r)&&(e=y),p.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function m(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:E}}function E(){return{value:void 0,done:!0}}return c(v,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(v),t},o.awrap=function(t){return{__await:t}},g(m.prototype),a(m.prototype,n,function(){return this}),o.AsyncIterator=m,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new m(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},g(v),a(v,i,"Generator"),a(v,r,function(){return this}),a(v,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},o}function ad(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function od(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){ad(r,e,n,i,a,"next",t)}function a(t){ad(r,e,n,i,a,"throw",t)}i(void 0)})}}function sd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ld(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,function(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);n=n.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}(r.key),r)}}function cd(t,e,n){e&&ld(t.prototype,e),n&&ld(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function ud(t){return(ud=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function fd(t,e){return(fd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function hd(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");e=t;if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dd(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=ud(n);return hd(this,r?(t=ud(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}var pd=function(){function r(){sd(this,r),this.context=void 0}return cd(r,[{key:"apply",value:function(t){function i(t){e.hooks.pointerWheel.call(t)}var a=this,e=t.renderingService,n=t.renderingContext,o=(this.context=t,n.root.ownerDocument.defaultView),s=function(t){e.hooks.pointerMove.call(t)},l=function(t){e.hooks.pointerUp.call(t)},c=function(t){e.hooks.pointerDown.call(t)},u=function(t){e.hooks.pointerOver.call(t)},f=function(t){e.hooks.pointerOut.call(t)},h=function(t){e.hooks.pointerCancel.call(t)};e.hooks.init.tapPromise(r.tag,od(id().mark(function t(){var r;return id().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r=a.context.contextService.getDomElement(),globalThis.navigator.msPointerEnabled?(r.style.msContentZooming="none",r.style.msTouchAction="none"):o.supportsPointerEvents&&(r.style.touchAction="none"),o.supportsPointerEvents?(n=r,globalThis.document.addEventListener("pointermove",s,!0),n.addEventListener("pointerdown",c,!0),n.addEventListener("pointerleave",f,!0),n.addEventListener("pointerover",u,!0),globalThis.addEventListener("pointerup",l,!0)):(n=r,globalThis.document.addEventListener("mousemove",s,!0),n.addEventListener("mousedown",c,!0),n.addEventListener("mouseout",f,!0),n.addEventListener("mouseover",u,!0),globalThis.addEventListener("mouseup",l,!0)),o.supportsTouchEvents&&((e=r).addEventListener("touchstart",c,!0),e.addEventListener("touchend",l,!0),e.addEventListener("touchmove",s,!0),e.addEventListener("touchcancel",h,!0)),r.addEventListener("wheel",i,{passive:!0,capture:!0});case 5:case"end":return t.stop()}var e,n},t)}))),e.hooks.destroy.tap(r.tag,function(){var t,e,n=a.context.contextService.getDomElement();globalThis.navigator.msPointerEnabled?(n.style.msContentZooming="",n.style.msTouchAction=""):o.supportsPointerEvents&&(n.style.touchAction=""),o.supportsPointerEvents?(t=n,globalThis.document.removeEventListener("pointermove",s,!0),t.removeEventListener("pointerdown",c,!0),t.removeEventListener("pointerleave",f,!0),t.removeEventListener("pointerover",u,!0),globalThis.removeEventListener("pointerup",l,!0)):(t=n,globalThis.document.removeEventListener("mousemove",s,!0),t.removeEventListener("mousedown",c,!0),t.removeEventListener("mouseout",f,!0),t.removeEventListener("mouseover",u,!0),globalThis.removeEventListener("mouseup",l,!0)),o.supportsTouchEvents&&((e=n).removeEventListener("touchstart",c,!0),e.removeEventListener("touchend",l,!0),e.removeEventListener("touchmove",s,!0),e.removeEventListener("touchcancel",h,!0)),n.removeEventListener("wheel",i,!0)})}}]),r}(),yd=(pd.tag="DOMInteraction",function(){var t=a,e=Ic;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fd(t,e);var i=dd(a);function a(){var t;sd(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).name="dom-interaction",t}return cd(a,[{key:"init",value:function(){this.addRenderingPlugin(new pd)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}]),a}());function vd(){vd=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return E()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,f;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,f):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}(n,o);if(n){if(n===f)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===f)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var f={};function h(){}function d(){}function p(){}var e={},y=(a(e,r,function(){return this}),Object.getPrototypeOf),y=y&&y(y(k([]))),v=(y&&y!==t&&l.call(y,r)&&(e=y),p.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function m(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:E}}function E(){return{value:void 0,done:!0}}return c(v,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(v),t},o.awrap=function(t){return{__await:t}},g(m.prototype),a(m.prototype,n,function(){return this}),o.AsyncIterator=m,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new m(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},g(v),a(v,i,"Generator"),a(v,r,function(){return this}),a(v,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},o}function gd(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function md(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){gd(r,e,n,i,a,"next",t)}function a(t){gd(r,e,n,i,a,"throw",t)}i(void 0)})}}function bd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xd(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,function(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);n=n.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}(r.key),r)}}function wd(t,e,n){e&&xd(t.prototype,e),n&&xd(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function kd(t){return(kd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Ed(t,e){return(Ed=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Md(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");e=t;if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Od(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=kd(n);return Md(this,r?(t=kd(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}var Sd=function(){function d(){bd(this,d),this.context=void 0,this.$camera=void 0}return wd(d,[{key:"joinTransformMatrix",value:function(t){return"matrix(".concat([t[0],t[1],t[4],t[5],t[12],t[13]].join(","),")")}},{key:"apply",value:function(t){function i(t,e){e.style.transform=s.joinTransformMatrix(t.getWorldTransform())}function e(t){var e,n,r=t.target;r.nodeName===E.HTML&&(s.$camera||(s.$camera=s.createCamera(l)),e=s.getOrCreateEl(r),s.$camera.appendChild(e),n=r.ownerDocument.documentElement.attributes,Object.keys(n).forEach(function(t){e.style[t]=n[t]}),Object.keys(r.attributes).forEach(function(t){s.updateAttribute(t,r)}),i(r,e))}function n(t){(t=t.target).nodeName===E.HTML&&s.$camera&&(t=s.getOrCreateEl(t))&&t.remove()}function r(t){var e=t.target;e.nodeName===E.HTML&&(t=t.attrName,s.updateAttribute(t,e))}function a(t){var e;(t=t.target).nodeName===E.HTML&&(e=s.getOrCreateEl(t),i(t,e))}function o(){var t,e;s.$camera&&(t=(e=s.context.config).width,e=e.height,s.$camera.style.width="".concat(t||0,"px"),s.$camera.style.height="".concat(e||0,"px"))}var s=this,l=t.camera,c=t.renderingContext,u=t.renderingService,f=t.displayObjectPool,h=(this.context=t,c.root.ownerDocument.defaultView);u.hooks.init.tapPromise(d.tag,md(vd().mark(function t(){return vd().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:f.getHTMLs().length&&(s.$camera=s.createCamera(l)),h.addEventListener(yc.RESIZE,o),h.addEventListener(mo.MOUNTED,e),h.addEventListener(mo.UNMOUNTED,n),h.addEventListener(mo.ATTR_MODIFIED,r),h.addEventListener(mo.BOUNDS_CHANGED,a);case 6:case"end":return t.stop()}},t)}))),u.hooks.endFrame.tap(d.tag,function(){s.$camera&&c.renderReasons.has(pc.CAMERA_CHANGED)&&(s.$camera.style.transform=s.joinTransformMatrix(l.getOrthoMatrix()))}),u.hooks.destroy.tap(d.tag,function(){s.$camera&&s.$camera.remove(),h.removeEventListener(yc.RESIZE,o),h.removeEventListener(mo.MOUNTED,e),h.removeEventListener(mo.UNMOUNTED,n),h.removeEventListener(mo.ATTR_MODIFIED,r),h.removeEventListener(mo.BOUNDS_CHANGED,a)})}},{key:"getId",value:function(t){return t.id||"g-html-"+t.entity}},{key:"createCamera",value:function(t){var e,n,r=this.context.config,i=r.document,a=r.width,r=r.height,o=this.context.contextService.getDomElement(),s=o.parentNode;return s?((n=s.querySelector("#"+(e="g-canvas-camera")))||((n=i=(i||document).createElement("div")).id=e,i.style.position="absolute",i.style.left="".concat(o.offsetLeft||0,"px"),i.style.top="".concat(o.offsetTop||0,"px"),i.style.transformOrigin="left top",i.style.transform=this.joinTransformMatrix(t.getOrthoMatrix()),i.style.overflow="hidden",i.style.pointerEvents="none",i.style.width="".concat(a||0,"px"),i.style.height="".concat(r||0,"px"),s.appendChild(i)),n):null}},{key:"getOrCreateEl",value:function(t){var e=this.context.config.document,n=this.getId(t),r=this.$camera.querySelector("#"+n);return r||(r=(e||document).createElement("div"),(t.parsedStyle.$el=r).id=n,t.name&&r.setAttribute("name",t.name),t.className&&(r.className=t.className),r.style.position="absolute",r.style.left="0px",r.style.top="0px",r.style["will-change"]="transform",r.style.transform=this.joinTransformMatrix(t.getWorldTransform())),r}},{key:"updateAttribute",value:function(t,e){var n=this.getOrCreateEl(e);switch(t){case"innerHTML":var r=e.parsedStyle.innerHTML;hn(r)?n.innerHTML=r:(n.innerHTML="",n.appendChild(r));break;case"transformOrigin":r=e.parsedStyle.transformOrigin;n.style["transform-origin"]="".concat(r[0].value," ").concat(r[1].value);break;case"width":r=e.computedStyleMap().get("width");n.style.width=r.toString();break;case"height":r=e.computedStyleMap().get("height");n.style.height=r.toString();break;case"zIndex":r=e.parsedStyle.zIndex;n.style["z-index"]="".concat(r);break;case"visibility":r=e.parsedStyle.visibility;n.style.visibility=r;break;case"pointerEvents":r=e.parsedStyle.pointerEvents;n.style.pointerEvents=r;break;case"opacity":r=e.parsedStyle.opacity;n.style.opacity="".concat(r);break;case"fill":var r=e.parsedStyle.fill,i="";r instanceof fa?i=r.isNone?"transparent":e.getAttribute("fill"):Array.isArray(r)?i=e.getAttribute("fill"):_a(r),n.style.background=i;break;case"stroke":r=e.parsedStyle.stroke,i="";r instanceof fa?i=r.isNone?"transparent":e.getAttribute("stroke"):Array.isArray(r)?i=e.getAttribute("stroke"):_a(r),n.style["border-color"]=i,n.style["border-style"]="solid";break;case"lineWidth":r=e.parsedStyle.lineWidth;n.style["border-width"]="".concat(r||0,"px");break;case"lineDash":n.style["border-style"]="dashed";break;case"filter":i=e.style.filter;n.style.filter=i}}}]),d}(),_d=(Sd.tag="HTMLRendering",function(){var t=a,e=Ic;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ed(t,e);var i=Od(a);function a(){var t;bd(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).name="html-renderer",t}return wd(a,[{key:"init",value:function(){this.addRenderingPlugin(new Sd)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}]),a}());function Ad(){Ad=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return E()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,f;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,f):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}(n,o);if(n){if(n===f)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===f)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var f={};function h(){}function d(){}function p(){}var e={},y=(a(e,r,function(){return this}),Object.getPrototypeOf),y=y&&y(y(k([]))),v=(y&&y!==t&&l.call(y,r)&&(e=y),p.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function m(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:E}}function E(){return{value:void 0,done:!0}}return c(v,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(v),t},o.awrap=function(t){return{__await:t}},g(m.prototype),a(m.prototype,n,function(){return this}),o.AsyncIterator=m,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new m(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},g(v),a(v,i,"Generator"),a(v,r,function(){return this}),a(v,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},o}function Pd(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Td(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Pd(r,e,n,i,a,"next",t)}function a(t){Pd(r,e,n,i,a,"throw",t)}i(void 0)})}}function Ld(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Nd(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,function(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);n=n.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}(r.key),r)}}function Cd(t,e,n){e&&Nd(t.prototype,e),n&&Nd(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function jd(t){return(jd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Rd(t,e){return(Rd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Id(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");e=t;if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fd(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=jd(n);return Id(this,r?(t=jd(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}var Bd="undefined"!=typeof Float32Array?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var Dd=function(){function e(t){Ld(this,e),this.canvasConfig=void 0,this.imageCache={},this.gradientCache={},this.patternCache={},this.canvasConfig=t}return Cd(e,[{key:"getImageSync",value:function(t,e){return this.imageCache[t]?e&&e():this.getOrCreateImage(t).then(function(){e&&e()}),this.imageCache[t]}},{key:"getOrCreateImage",value:function(r){var i,a=this;return this.imageCache[r]?Promise.resolve(this.imageCache[r]):(i=this.canvasConfig.createImage,new Promise(function(t,e){var n;i?n=i(r):wi&&(n=new window.Image),n&&(n.onload=function(){t(n)},n.onerror=function(t){e(t)},n.crossOrigin="Anonymous",n.src=r,a.imageCache[r]=n)}))}},{key:"getOrCreatePatternSync",value:function(t,e,n,r,i){var a,o,s,l,c=this.generatePatternKey(t);return c&&this.patternCache[c]?this.patternCache[c]:(l=t.image,s=t.repetition,t=t.transform,a=!1,hn(l)?o=this.getImageSync(l,i):n?(o=n,a=!0):o=l,(i=o&&e.createPattern(o,s))&&(e=t?Bs(to(t)):(n=new Bd(16),Bd!=Float32Array&&(n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0),n[0]=1,n[5]=1,n[10]=1,n[15]=1,(l=n)[0]=1,l[1]=0,l[2]=0,l[3]=0,l[4]=0,l[5]=1,l[6]=0,l[7]=0,l[8]=0,l[9]=0,l[10]=1,l[11]=0,l[12]=0,l[13]=0,l[14]=0,l[15]=1,l),a&&(s=o=e,n=(t=[1/r,1/r,1])[0],l=t[1],t=t[2],o[0]=s[0]*n,o[1]=s[1]*n,o[2]=s[2]*n,o[3]=s[3]*n,o[4]=s[4]*l,o[5]=s[5]*l,o[6]=s[6]*l,o[7]=s[7]*l,o[8]=s[8]*t,o[9]=s[9]*t,o[10]=s[10]*t,o[11]=s[11]*t,o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15]),i.setTransform({a:e[0],b:e[1],c:e[4],d:e[5],e:e[12],f:e[13]})),c&&i&&(this.patternCache[c]=i),i)}},{key:"getOrCreateGradient",value:function(t,e){var r,n,i,a,o,s=this.generateGradientKey(t),l=t.type,c=t.steps,u=t.width,f=t.height,h=t.angle,d=t.cx,p=t.cy,t=t.size;return this.gradientCache[s]||(r=null,l===Ni.LinearGradient?(n=u,i=f,h=As((h=h).value),a=0+n/2,o=0+i/2,n=Math.abs(n*Math.cos(h))+Math.abs(i*Math.sin(h)),i={x1:a-Math.cos(h)*n/2,y1:o-Math.sin(h)*n/2,x2:a+Math.cos(h)*n/2,y2:o+Math.sin(h)*n/2},r=e.createLinearGradient(i.x1,i.y1,i.x2,i.y2)):l===Ni.RadialGradient&&(a=u,o=f,h=p,n=t,l=(i=d).value,u=h.value,i.unit===y.kPercentage&&(l=i.value/100*a),h.unit===y.kPercentage&&(u=h.value/100*o),i=Math.max(Ve([0,0],[l,u]),Ve([0,o],[l,u]),Ve([a,o],[l,u]),Ve([a,0],[l,u])),n&&(n instanceof Ji?i=n.value:n instanceof Wi&&("closest-side"===n.value?i=Math.min(l,a-l,u,o-u):"farthest-side"===n.value?i=Math.max(l,a-l,u,o-u):"closest-corner"===n.value&&(i=Math.min(Ve([0,0],[l,u]),Ve([0,o],[l,u]),Ve([a,o],[l,u]),Ve([a,0],[l,u]))))),r=e.createRadialGradient(p=(f={x:l,y:u,r:i}).x,t=f.y,0,p,t,f.r)),r&&(c.forEach(function(t){var e,n=t.offset,t=t.color;n.unit===y.kPercentage&&null!=(e=r)&&e.addColorStop(n.value/100,t.toString())}),this.gradientCache[s]=r)),this.gradientCache[s]}},{key:"generateGradientKey",value:function(t){var e=t.type,n=t.width,r=t.height,i=t.steps,a=t.angle,o=t.cx,s=t.cy,t=t.size;return"gradient-".concat(e,"-").concat((null==a?void 0:a.toString())||0,"-").concat((null==o?void 0:o.toString())||0,"-").concat((null==s?void 0:s.toString())||0,"-").concat((null==t?void 0:t.toString())||0,"-").concat(n,"-").concat(r,"-").concat(i.map(function(t){var e=t.offset,t=t.color;return"".concat(e).concat(t)}).join("-"))}},{key:"generatePatternKey",value:function(t){var e=t.image,t=t.repetition;return hn(e)?"pattern-".concat(e,"-").concat(t):e instanceof Es?"pattern-".concat(e.entity,"-").concat(t):void 0}}]),e}(),zd=function(){function s(){Ld(this,s)}return Cd(s,[{key:"apply",value:function(t){function e(t){var e=t.target,t=e.nodeName,n=e.attributes;t===E.IMAGE&&(t=n.img,hn(t))&&a.getImageSync(t,function(){e.renderable.dirty=!0,r.dirtify()})}function n(t){var e=t.target,n=t.attrName,t=t.newValue;e.nodeName===E.IMAGE&&"img"===n&&hn(t)&&a.getOrCreateImage(t).then(function(){e.renderable.dirty=!0,r.dirtify()})}var r=t.renderingService,i=t.renderingContext,a=t.imagePool,o=i.root.ownerDocument.defaultView;r.hooks.init.tapPromise(s.tag,Td(Ad().mark(function t(){return Ad().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:o.addEventListener(mo.MOUNTED,e),o.addEventListener(mo.ATTR_MODIFIED,n);case 2:case"end":return t.stop()}},t)}))),r.hooks.destroy.tap(s.tag,function(){o.removeEventListener(mo.MOUNTED,e),o.removeEventListener(mo.ATTR_MODIFIED,n)})}}]),s}(),Gd=(zd.tag="LoadImage",function(){var t=a,e=Ic;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Rd(t,e);var i=Fd(a);function a(){var t;Ld(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).name="image-loader",t}return Cd(a,[{key:"init",value:function(){this.context.imagePool=new Dd(this.context.config),this.addRenderingPlugin(new zd)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}]),a}());function Wd(){Wd=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return E()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,f;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,f):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}(n,o);if(n){if(n===f)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===f)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var f={};function h(){}function d(){}function p(){}var e={},y=(a(e,r,function(){return this}),Object.getPrototypeOf),y=y&&y(y(k([]))),v=(y&&y!==t&&l.call(y,r)&&(e=y),p.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function m(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:E}}function E(){return{value:void 0,done:!0}}return c(v,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(v),t},o.awrap=function(t){return{__await:t}},g(m.prototype),a(m.prototype,n,function(){return this}),o.AsyncIterator=m,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new m(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},g(v),a(v,i,"Generator"),a(v,r,function(){return this}),a(v,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},o}function Vd(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Yd(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Vd(r,e,n,i,a,"next",t)}function a(t){Vd(r,e,n,i,a,"throw",t)}i(void 0)})}}function Hd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qd(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,function(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);n=n.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}(r.key),r)}}function Ud(t,e,n){return e&&qd(t.prototype,e),n&&qd(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Xd(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$d(t,e)}function Kd(t){return(Kd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function $d(t,e){return($d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Zd(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");e=t;if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Jd(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=Kd(n);return Zd(this,r?(t=Kd(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}var Qd=function(){function e(t){Hd(this,e),this.$container=void 0,this.$canvas=void 0,this.dpr=void 0,this.context=void 0,this.canvasConfig=void 0,this.renderingContext=void 0,this.renderingContext=t.renderingContext,this.canvasConfig=t.config}var t,n;return Ud(e,[{key:"init",value:(n=Yd(Wd().mark(function t(){var e,n;return Wd().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:n=this.canvasConfig,e=n.container,(n=n.canvas)?(this.$canvas=n,e&&n.parentElement!==e&&e.appendChild(n),this.$container=n.parentElement,this.canvasConfig.container=this.$container):e&&(this.$container=hn(e)?document.getElementById(e):e,this.$container)&&(n=document.createElement("canvas"),this.$container.appendChild(n),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=n),this.context=this.$canvas.getContext("2d"),this.resize(this.canvasConfig.width,this.canvasConfig.height);case 4:case"end":return t.stop()}},t,this)})),function(){return n.apply(this,arguments)})},{key:"getContext",value:function(){return this.context}},{key:"getDomElement",value:function(){return this.$canvas}},{key:"getDPR",value:function(){return this.dpr}},{key:"getBoundingClientRect",value:function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()}},{key:"destroy",value:function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)}},{key:"resize",value:function(t,e){var n=1<=(n=this.canvasConfig.devicePixelRatio||wi&&window.devicePixelRatio||1)?Math.ceil(n):1;this.dpr=n,this.$canvas&&(this.$canvas.width=this.dpr*t,this.$canvas.height=this.dpr*e,n=this.$canvas,t=t,e=e,wi)&&n.style&&(n.style.width=t+"px",n.style.height=e+"px"),this.renderingContext.renderReasons.add(pc.CAMERA_CHANGED)}},{key:"applyCursorStyle",value:function(t){this.$container&&this.$container.style&&(this.$container.style.cursor=t)}},{key:"toDataURL",value:(t=Yd(Wd().mark(function t(){var e,n,r=arguments;return Wd().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=(n=0<r.length&&void 0!==r[0]?r[0]:{}).type,n=n.encoderOptions,t.abrupt("return",this.context.canvas.toDataURL(e,n));case 3:case"end":return t.stop()}},t,this)})),function(){return t.apply(this,arguments)})}]),e}(),tp=function(){Xd(a,Ic);var i=Jd(a);function a(){var t;Hd(this,a);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).name="canvas-context-register",t}return Ud(a,[{key:"init",value:function(){this.context.ContextService=Qd}},{key:"destroy",value:function(){delete this.context.ContextService}}]),a}(),ep=function(){Xd(n,Fc);var e=Jd(n);function n(t){return Hd(this,n),(t=e.call(this,t)).registerPlugin(new tp),t.registerPlugin(new Gd),t.registerPlugin(new Tf),t.registerPlugin(new rd),t.registerPlugin(new yd),t.registerPlugin(new Ch),t.registerPlugin(new _d),t}return Ud(n)}();function np(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)),r}function rp(r){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?np(Object(i),!0).forEach(function(t){var e,n;e=r,n=i[t=t],(t=pp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):np(Object(i)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(i,t))})}return r}function ip(){ip=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return E()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,f;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,f):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}(n,o);if(n){if(n===f)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===f)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var f={};function h(){}function d(){}function p(){}var e={},y=(a(e,r,function(){return this}),Object.getPrototypeOf),y=y&&y(y(k([]))),v=(y&&y!==t&&l.call(y,r)&&(e=y),p.prototype=h.prototype=Object.create(e));function g(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function m(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:E}}function E(){return{value:void 0,done:!0}}return c(v,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(v),t},o.awrap=function(t){return{__await:t}},g(m.prototype),a(m.prototype,n,function(){return this}),o.AsyncIterator=m,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new m(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},g(v),a(v,i,"Generator"),a(v,r,function(){return this}),a(v,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},o}function ap(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function op(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){ap(r,e,n,i,a,"next",t)}function a(t){ap(r,e,n,i,a,"throw",t)}i(void 0)})}}function sp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lp(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,pp(r.key),r)}}function cp(t,e,n){e&&lp(t.prototype,e),n&&lp(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function up(t){return(up=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function fp(t,e){return(fp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function hp(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");e=t;if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dp(n){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=up(n);return hp(this,r?(t=up(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments))}}function pp(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);if("object"!=typeof(n=n.call(t,e||"default")))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}function yp(t){return xp(t,"Function")}var vp=function(){function a(t){sp(this,a),this.dragndropPluginOptions=void 0,this.dragndropPluginOptions=t}return cp(a,[{key:"apply",value:function(t){function e(t){var e,a,o,s,l,c,u=t.target,f=u===d,h=f&&i?d:u.closest&&u.closest("[draggable=true]");h&&(e=function(){var e=op(ip().mark(function t(e){var n,r,i;return ip().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a)t.next=8;else{if(n=e.timeStamp-o,r=Ve([e.clientX,e.clientY],s),n<=g||r<=v)return t.abrupt("return");t.next=5}break;case 5:e.type="dragstart",h.dispatchEvent(e),a=!0;case 8:if(e.type="drag",e.dx=e.clientX-c[0],e.dy=e.clientY-c[1],h.dispatchEvent(e),c=[e.clientX,e.clientY],f){t.next=21;break}return n="pointer"===p?[e.canvasX,e.canvasY]:u.getBounds().center,t.next=17,d.elementsFromPoint(n[0],n[1]);case 17:r=t.sent,i=r[r.indexOf(u)+1],i=(null==i?void 0:i.closest("[droppable=true]"))||(y?d:null),l!==i&&(l&&(e.type="dragleave",(e.target=l).dispatchEvent(e)),i&&(e.type="dragenter",(e.target=i).dispatchEvent(e)),l=i)&&(e.type="dragover",(e.target=l).dispatchEvent(e));case 21:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),a=!1,o=t.timeStamp,s=[t.clientX,t.clientY],l=null,c=[t.clientX,t.clientY],r.addEventListener("pointermove",e),u.addEventListener("pointerup",t=function(t){a&&(t.detail={preventClick:!0},t=t.clone(),l&&(t.type="drop",(t.target=l).dispatchEvent(t)),t.type="dragend",h.dispatchEvent(t),a=!1),r.removeEventListener("pointermove",e)},{once:!0}),u.addEventListener("pointerupoutside",t,{once:!0}))}var n=t.renderingService,d=t.renderingContext.root.ownerDocument,r=d.defaultView,t=this.dragndropPluginOptions,p=t.overlap,i=t.isDocumentDraggable,y=t.isDocumentDroppable,v=t.dragstartDistanceThreshold,g=t.dragstartTimeThreshold;n.hooks.init.tapPromise(a.tag,op(ip().mark(function t(){return ip().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r.addEventListener("pointerdown",e);case 1:case"end":return t.stop()}},t)}))),n.hooks.destroy.tap(a.tag,function(){r.removeEventListener("pointerdown",e)})}}]),a}(),gp=(vp.tag="Dragndrop",function(){var t=r,e=Ic;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fp(t,e);var n=dp(r);function r(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return sp(this,r),(t=n.call(this)).options=void 0,t.name="dragndrop",t.options=e,t}return cp(r,[{key:"init",value:function(){this.addRenderingPlugin(new vp(rp({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}]),r}()),mp=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},bp={}.toString,xp=function(t,e){return bp.call(t)==="[object "+e+"]"},wp=function(t){return null==t},kp=function(t){return Array.isArray?Array.isArray(t):xp(t,"Array")};function Ep(t){if(!Op(t)||!xp(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}function Mp(t){return(t=Ap(t)).charAt(0).toLowerCase()+t.substring(1)}var Op=function(t){return"object"==typeof t&&null!==t},Sp=function(t){return xp(t,"Number")},_p=Object.values?function(t){return Object.values(t)}:function(n){var t,r=[],e=n,i=function(t,e){yp(n)&&"prototype"===e||r.push(t)};if(e)if(kp(e))for(var a=0,o=e.length;a<o&&!1!==i(e[a],a);a++);else if(t=typeof e,null!==e&&"object"==t||"function"==t)for(var s in e)if(e.hasOwnProperty(s)&&!1===i(e[s],s))break;return r},Ap=function(t){return wp(t)?"":t.toString()},Pp=function(t){t=Ap(t);return t.charAt(0).toUpperCase()+t.substring(1)},Tp={}.toString,Lp=function(t){return Tp.call(t).replace(/^\[object /,"").replace(/]$/,"")},Np=Object.prototype,Cp=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Np)};var jp=5;var R=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 a in r=r||0,i=i||jp,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&Ep(o)?(Ep(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):kp(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},Rp=function(t,e){if(!mp(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},Ip=Object.prototype.hasOwnProperty;function Fp(t){return t}var Bp,Dp=function(n,r,i){function a(){u=!1===i.leading?0:Date.now(),o=null,c=n.apply(s,l),o||(s=l=null)}function t(){var t=Date.now(),e=(u||!1!==i.leading||(u=t),r-(t-u));return s=this,l=arguments,e<=0||r<e?(o&&(clearTimeout(o),o=null),u=t,c=n.apply(s,l),o||(s=l=null)):o||!1===i.trailing||(o=setTimeout(a,e)),c}var o,s,l,c,u=0;i=i||{};return t.cancel=function(){clearTimeout(o),u=0,o=s=l=null},t};function zp(t){return wp(t)?0:(mp(t)?t:Object.keys(t)).length}!function(a,o){var s;if(yp(a))return(s=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=o?o.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=a.apply(this,t),i.set(r,n),n)}).cache=new Map;throw new TypeError("Expected a function")}(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(Bp=Bp||document.createElement("canvas").getContext("2d")).font=[a,e,i,n+"px",r].join(" "),Bp.measureText(xp(t,"String")?t:"").width},function(t,e){return function(){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 a=arguments[e],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}([t],_p(e=void 0===e?{}:e)).join("")});const Gp=()=>[["cartesian"]],Wp=(Gp.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",t,e,n,r]]),Vp=(Wp.props={},({startAngle:t=0,endAngle:e=6*Math.PI,innerRadius:n=0,outerRadius:r=1})=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5],["helix",t,e,n,r]]),Yp=(Vp.props={},()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),Hp=(Yp.props={},()=>[["translate",.5,.5],["reflect"],["translate",-.5,-.5]]),qp=(Hp.props={},()=>[["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),Up=(qp.props={},()=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5]]),Xp=(Up.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[...Yp(),...Wp({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]),Kp=(Xp.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[["transpose"],...Hp(),...Wp({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]),$p=(Kp.props={},()=>[["parallel",0,1,0,1]]),Zp=($p.props={},({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,isVisual:i=!1})=>[["fisheye",t,e,n,r,i]]),Jp=(Zp.props={},({focusX:t=0,distortionX:e=2,isVisual:n=!1})=>[["fisheye.x",t,e,n]]),Qp=(Jp.props={},({focusY:t=0,distortionY:e=2,isVisual:n=!1})=>[["fisheye.x",t,e,n]]),t0=(Qp.props={},({value:e})=>t=>t.map(()=>e)),e0=(t0.props={},({value:e})=>t=>t.map(e)),n0=(e0.props={},({value:e})=>t=>t.map(t=>t[e])),r0=(n0.props={},({value:t})=>()=>t);function i0(t,e){return t.parent===e.parent?1:2}function a0(t,e){return t+e.x}function o0(t,e){return Math.max(t,e.y)}function s0(){var s=i0,l=1,c=1,u=!1;function e(e){var r,i=0,t=(e.eachAfter(function(t){var e,n=t.children;n?(t.x=(e=n).reduce(a0,0)/e.length,t.y=1+n.reduce(o0,0)):(t.x=r?i+=s(t,r):0,t.y=0,r=t)}),function(t){for(var e;e=t.children;)t=e[0];return t}(e)),n=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),a=t.x-s(t,n)/2,o=n.x+s(n,t)/2;return e.eachAfter(u?function(t){t.x=(t.x-e.x)*l,t.y=(e.y-t.y)*c}:function(t){t.x=(t.x-a)/(o-a)*l,t.y=(1-(e.y?t.y/e.y:1))*c})}return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function l0(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;0<=--r;)e+=n[r].value;else e=1;t.value=e}function c0(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=f0)):void 0===e&&(e=u0);for(var n,r,i,a,o,t=new p0(t),s=[t];n=s.pop();)if((i=e(n.data))&&(o=(i=Array.from(i)).length))for(n.children=i,a=o-1;0<=a;--a)s.push(r=i[a]=new p0(i[a])),r.parent=n,r.depth=n.depth+1;return t.eachBefore(d0)}function u0(t){return t.children}function f0(t){return Array.isArray(t)?t[1]:null}function h0(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function d0(t){for(var e=0;t.height=e,(t=t.parent)&&t.height<++e;);}function p0(t){this.data=t,this.depth=this.height=0,this.parent=null}function y0(t){return null==t?null:v0(t)}function v0(t){if("function"!=typeof t)throw new Error;return t}function g0(){return 0}function m0(t){return function(){return t}}r0.props={},p0.prototype=c0.prototype={constructor:p0,count:function(){return this.eachAfter(l0)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,a=this,o=[a],s=[],l=-1;a=o.pop();)if(s.push(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r]);for(;a=s.pop();)t.call(e,a,++l,this);return this},eachBefore:function(t,e){for(var n,r,i,a=[this],o=-1;n=a.pop();)if(t.call(e,n,++o,this),r=n.children)for(i=r.length-1;0<=i;--i)a.push(r[i]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(i){return this.eachAfter(function(t){for(var e=+i(t.data)||0,n=t.children,r=n&&n.length;0<=--r;)e+=n[r].value;t.value=e})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,n=[];return e.each(function(t){t!==e&&n.push({source:t.parent,target:t})}),n},copy:function(){return c0(this).eachBefore(h0)},[Symbol.iterator]:function*(){var t,e,n,r,i,a=[this];do{for(e=a.reverse(),a=[];t=e.pop();)if(yield t,n=t.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length)}};const b0=4294967296;function x0(t,e){for(var n,r,i=0,a=(t=function(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}(Array.from(t),e)).length,o=[];i<a;)n=t[i],r&&k0(r,n)?++i:(r=function(t){switch(t.length){case 1:return function(t){return{x:t.x,y:t.y,r:t.r}}(t[0]);case 2:return M0(t[0],t[1]);case 3:return O0(t[0],t[1],t[2])}}(o=function(t,e){var n,r;if(E0(e,t))return[e];for(n=0;n<t.length;++n)if(w0(e,t[n])&&E0(M0(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(w0(M0(t[n],t[r]),e)&&w0(M0(t[n],e),t[r])&&w0(M0(t[r],e),t[n])&&E0(O0(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}(o,n)),i=0);return r}function w0(t,e){var n=t.r-e.r,r=e.x-t.x,e=e.y-t.y;return n<0||n*n<r*r+e*e}function k0(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,e=e.y-t.y;return 0<n&&r*r+e*e<n*n}function E0(t,e){for(var n=0;n<e.length;++n)if(!k0(t,e[n]))return;return 1}function M0(t,e){var n=t.x,r=t.y,t=t.r,i=e.x,a=e.y,e=e.r,o=i-n,s=a-r,l=e-t,c=Math.sqrt(o*o+s*s);return{x:(n+i+o/c*l)/2,y:(r+a+s/c*l)/2,r:(c+t+e)/2}}function O0(t,e,n){var r=t.x,i=t.y,t=t.r,a=e.x,o=e.y,e=e.r,s=n.x,l=n.y,n=n.r,c=r-a,u=r-s,f=i-o,h=i-l,d=e-t,p=n-t,y=r*r+i*i-t*t,a=y-a*a-o*o+e*e,o=y-s*s-l*l+n*n,e=u*f-c*h,y=(f*o-h*a)/(2*e)-r,s=(h*d-f*p)/e,l=(u*a-c*o)/(2*e)-i,n=(c*p-u*d)/e,h=s*s+n*n-1,f=2*(t+y*s+l*n),a=y*y+l*l-t*t,o=-(1e-6<Math.abs(h)?(f+Math.sqrt(f*f-4*h*a))/(2*h):a/f);return{x:r+y+s*o,y:i+l+n*o,r:o}}function S0(t,e,n){var r,i,a,o,s=t.x-e.x,l=t.y-e.y,c=s*s+l*l;c?(i=e.r+n.r,o=t.r+n.r,(o*=o)<(i*=i)?(r=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-r*r)),n.x=t.x-r*s-a*l,n.y=t.y-r*l+a*s):(r=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*s-a*l,n.y=e.y+r*l+a*s)):(n.x=e.x+n.r,n.y=e.y)}function _0(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,e=e.y-t.y;return 0<n&&r*r+e*e<n*n}function A0(t){var e=t._,t=t.next._,n=e.r+t.r,r=(e.x*t.r+t.x*e.r)/n,t=(e.y*t.r+t.y*e.r)/n;return r*r+t*t}function P0(t){this._=t,this.next=null,this.previous=null}function T0(t,e){if(!(a=(t="object"==typeof(n=t)&&"length"in n?n:Array.from(n)).length))return 0;var n,r,i,a,o,s,l,c,u,f,h,d=t[0];if(d.x=0,d.y=0,!(1<a))return d.r;if(r=t[1],d.x=-r.r,r.x=d.r,r.y=0,!(2<a))return d.r+r.r;S0(r,d,i=t[2]),d=new P0(d),r=new P0(r),i=new P0(i),((d.next=i.previous=r).next=d.previous=i).next=r.previous=d;t:for(l=3;l<a;++l){S0(d._,r._,i=t[l]),i=new P0(i),c=r.next,u=d.previous,f=r._.r,h=d._.r;do{if(f<=h){if(_0(c._,i._)){r=c,(d.next=r).previous=d,--l;continue t}f+=c._.r,c=c.next}else{if(_0(u._,i._)){((d=u).next=r).previous=d,--l;continue t}h+=u._.r,u=u.previous}}while(c!==u.next);for(i.previous=d,i.next=r,d.next=r.previous=r=i,o=A0(d);(i=i.next)!==r;)(s=A0(i))<o&&(d=i,o=s);r=d.next}for(d=[r._],i=r;(i=i.next)!==r;)d.push(i._);for(i=x0(d,e),l=0;l<a;++l)(d=t[l]).x-=i.x,d.y-=i.y;return i.r}function L0(t){return Math.sqrt(t.value)}function N0(){var n=null,r=1,i=1,a=g0;function e(t){var e=function(){let t=1;return()=>(t=(1664525*t+1013904223)%b0)/b0}();return t.x=r/2,t.y=i/2,n?t.eachBefore(C0(n)).eachAfter(j0(a,.5,e)).eachBefore(R0(1)):t.eachBefore(C0(L0)).eachAfter(j0(g0,1,e)).eachAfter(j0(a,t.r/Math.min(r,i),e)).eachBefore(R0(Math.min(r,i)/(2*t.r))),t}return e.radius=function(t){return arguments.length?(n=y0(t),e):n},e.size=function(t){return arguments.length?(r=+t[0],i=+t[1],e):[r,i]},e.padding=function(t){return arguments.length?(a="function"==typeof t?t:m0(+t),e):a},e}function C0(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function j0(o,s,l){return function(t){if(e=t.children){var e,n,r,i=e.length,a=o(t)*s||0;if(a)for(n=0;n<i;++n)e[n].r+=a;if(r=T0(e,l),a)for(n=0;n<i;++n)e[n].r-=a;t.r=r+a}}}function R0(n){return function(t){var e=t.parent;t.r*=n,e&&(t.x=e.x+n*t.x,t.y=e.y+n*t.y)}}function I0(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function F0(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(r-e)/t.value;++s<l;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}var B0={depth:-1},D0={},z0={};function G0(t){return t.id}function W0(t){return t.parentId}function V0(){var v,g=G0,m=W0;function e(n){var e,t,r,i,a,o,s,l,c=Array.from(n),u=g,f=m,h=new Map;if(null!=v){const p=c.map((t,e)=>{t=v(t,e,n),e=(t=""+t).length;return"/"===(t=H0(t,e-1)&&!H0(t,e-2)?t.slice(0,-1):t)[0]?t:"/"+t}),y=p.map(Y0);var d=new Set(p).add("");for(const r of y)d.has(r)||(d.add(r),p.push(r),y.push(Y0(r)),c.push(z0));u=(t,e)=>p[e],f=(t,e)=>y[e]}for(r=0,e=c.length;r<e;++r)t=c[r],o=c[r]=new p0(t),null!=(s=u(t,r,n))&&(s+="")&&(l=o.id=s,h.set(l,h.has(l)?D0:o)),null!=(s=f(t,r,n))&&(s+="")&&(o.parent=s);for(r=0;r<e;++r)if(s=(o=c[r]).parent){if(!(a=h.get(s)))throw new Error("missing: "+s);if(a===D0)throw new Error("ambiguous: "+s);a.children?a.children.push(o):a.children=[o],o.parent=a}else{if(i)throw new Error("multiple roots");i=o}if(!i)throw new Error("no root");if(null!=v){for(;i.data===z0&&1===i.children.length;)i=i.children[0],--e;for(let t=c.length-1;0<=t&&(o=c[t]).data===z0;--t)o.data=null}if(i.parent=B0,i.eachBefore(function(t){t.depth=t.parent.depth+1,--e}).eachBefore(d0),i.parent=null,0<e)throw new Error("cycle");return i}return e.id=function(t){return arguments.length?(g=y0(t),e):g},e.parentId=function(t){return arguments.length?(m=y0(t),e):m},e.path=function(t){return arguments.length?(v=y0(t),e):v},e}function Y0(t){let e=t.length;if(e<2)return"";for(;1<--e&&!H0(t,e););return t.slice(0,e)}function H0(e,n){if("/"===e[n]){let t=0;for(;0<n&&"\\"===e[--n];)++t;if(0==(1&t))return 1}}function q0(t,e){return t.parent===e.parent?1:2}function U0(t){var e=t.children;return e?e[0]:t.t}function X0(t){var e=t.children;return e?e[e.length-1]:t.t}function K0(t,e){this._=t,this.parent=null,this.children=null,this.A=null,(this.a=this).z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function $0(){var h=q0,l=1,c=1,u=null;function e(t){var e,n,r,i,a,o,s=function(t){for(var e,n,r,i,a,o=[t=new K0(t,0)];e=o.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;0<=i;--i)o.push(n=e.children[i]=new K0(r[i],i)),n.parent=e;return(t.parent=new K0(null,0)).children=[t],t}(t);return s.eachAfter(f),s.parent.m=-s.z,s.eachBefore(d),u?t.eachBefore(p):((r=n=e=t).eachBefore(function(t){t.x<e.x&&(e=t),t.x>n.x&&(n=t),t.depth>r.depth&&(r=t)}),s=e===n?1:h(e,n)/2,i=s-e.x,a=l/(n.x+s+i),o=c/(r.depth||1),t.eachBefore(function(t){t.x=(t.x+i)*a,t.y=t.depth*o})),t}function f(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e){for(var i,a=0,o=0,s=t.children,l=s.length;0<=--l;)(i=s[l]).z+=a,i.m+=a,a+=i.s+(o+=i.c);e=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+h(t._,r._),t.m=t.z-e):t.z=e}else r&&(t.z=r.z+h(t._,r._));t.parent.A=function(t,e,n){if(e){for(var r,i=t,a=t,o=e,s=i.parent.children[0],l=i.m,c=a.m,u=o.m,f=s.m;o=X0(o),i=U0(i),o&&i;)s=U0(s),(a=X0(a)).a=t,0<(r=o.z+u-i.z-l+h(o._,i._))&&(function(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}(function(t,e,n){return t.a.parent===e.parent?t.a:n}(o,t,n),t,r),l+=r,c+=r),u+=o.m,l+=i.m,f+=s.m,c+=a.m;o&&!X0(a)&&(a.t=o,a.m+=u-c),i&&!U0(s)&&(s.t=i,s.m+=l-f,n=t)}return n}(t,r,t.parent.A||n[0])}function d(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function p(t){t.x*=l,t.y=t.depth*c}return e.separation=function(t){return arguments.length?(h=t,e):h},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function Z0(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(i-n)/t.value;++s<l;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}K0.prototype=Object.create(p0.prototype);e=(1+Math.sqrt(5))/2;function J0(t,e,n,r,i,a){for(var o,s,l,c,u,f,h,d,p,y,v,g=[],m=e.children,b=0,x=0,w=m.length,k=e.value;b<w;){for(l=i-n,c=a-r;!(u=m[x++].value)&&x<w;);for(v=(f=h=u)*u*(y=Math.max(c/l,l/c)/(k*t)),p=Math.max(h/v,v/f);x<w;++x){if(u+=s=m[x].value,s<f&&(f=s),h<s&&(h=s),v=u*u*y,p<(d=Math.max(h/v,v/f))){u-=s;break}p=d}g.push(o={value:u,dice:l<c,children:m.slice(b,x)}),o.dice?F0(o,n,r,i,k?r+=c*u/k:a):Z0(o,n,r,k?n+=l*u/k:i,a),k-=u,b=x}return g}var Q0=function e(a){function t(t,e,n,r,i){J0(a,t,e,n,r,i)}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(e);function ty(t,e,n,r,i){var a,o,y=t.children,s=y.length,v=new Array(s+1);for(v[0]=o=a=0;a<s;++a)v[a+1]=o+=y[a].value;!function t(e,n,r,i,a,o,s){if(n-1<=e)return(l=y[e]).x0=i,l.y0=a,l.x1=o,void(l.y1=s);var l=v[e],c=r/2+l,u=e+1,f=n-1;for(;u<f;){var h=u+f>>>1;v[h]<c?u=1+h:f=h}c-v[u-1]<v[u]-c&&e+1<u&&--u;var l=v[u]-l,d=r-l;{var p;s-a<o-i?(t(e,u,l,i,a,p=r?(i*d+o*l)/r:o,s),t(u,n,d,p,a,o,s)):(t(e,u,l,i,a,o,p=r?(a*d+s*l)/r:s),t(u,n,d,i,p,o,s))}}(0,s,t.value,e,n,r,i)}function ey(t,e,n,r,i){(1&t.depth?Z0:F0)(t,e,n,r,i)}var ny=function e(d){function t(t,e,n,r,i){if((a=t._squarify)&&a.ratio===d)for(var a,o,s,l,c,u=-1,f=a.length,h=t.value;++u<f;){for(s=(o=a[u]).children,l=o.value=0,c=s.length;l<c;++l)o.value+=s[l].value;o.dice?F0(o,e,n,r,h?n+=(i-n)*o.value/h:i):Z0(o,e,n,h?e+=(r-e)*o.value/h:r,i),h-=o.value}else t._squarify=a=J0(d,t,e,n,r,i),a.ratio=d}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(e);function ry(t={}){t=t.shapes;return[{name:"color"},{name:"opacity"},{name:"shape",range:t},{name:"enterType"},{name:"enterDelay",scaleKey:"enter"},{name:"enterDuration",scaleKey:"enter"},{name:"enterEasing"},{name:"key",scale:"identity"},{name:"groupKey",scale:"identity"},{name:"label",scale:"identity"}]}function iy(t={}){return[...ry(t),{name:"title",scale:"identity"},{name:"tooltip",scale:"identity",independent:!0}]}function ay(){return[{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["x","y"]}]}function oy(){return[{type:"maybeTitle",channel:"x"},{type:"maybeTooltip",channel:["y"]}]}function sy(t={}){return ry(t)}function ly(){return[{type:"maybeKey"}]}function cy(t,e){return t.getBandWidth(t.invert(e))}function uy(t,e,n={}){const{x:a,y:o,series:s}=e,{x:l,y:c,series:u}=t,{style:{bandOffset:r=u?0:.5,bandOffsetX:f=r,bandOffsetY:h=r}={}}=n,d=!(null===l||void 0===l||!l.getBandWidth),p=!(null===c||void 0===c||!c.getBandWidth),y=!(null===u||void 0===u||!u.getBandWidth);return d||p?(t,e)=>{const n=d?cy(l,a[e]):0;var r=p?cy(c,o[e]):0,e=y&&s?(cy(u,s[e])/2+ +s[e])*n:0,[t,i]=t;return[t+f*n+e,i+h*r]}:t=>t}function fy(t){return parseFloat(t)/100}function hy(t,e,n,r){const{x:i,y:a}=n,{width:o,height:s}=r.getOptions();return[t,Array.from(t,t=>{var e=i[t],t=a[t];return[["string"==typeof e?fy(e)*o:+e,"string"==typeof t?fy(t)*s:+t]]})]}function dy(e){return"function"==typeof e?e:t=>t[e]}function py(t,e){return Array.from(t,dy(e))}function yy(t,e){var{source:e=t=>t.source,target:n=t=>t.target,value:r=t=>t.value}=e,{links:t,nodes:i}=t;const a=py(t,e),o=py(t,n),s=py(t,r);return{links:t.map((t,e)=>({target:o[e],source:a[e],value:s[e]})),nodes:i||Array.from(new Set([...a,...o]),t=>({key:t}))}}function vy(t,e){return t.getBandWidth(t.invert(e))}const gy=()=>(t,e,n,i)=>{const{x:a,y:o,y1:s,series:l,size:r}=n,c=e.x,u=e.series,[f]=i.getSize(),h=r?r.map(t=>+t/f):null,d=r?(t,e,n)=>{t+=e/2,e=h[n];return[t-e/2,t+e/2]}:(t,e,n)=>[t,t+e];return[t,Array.from(t,t=>{var e=vy(c,a[t]),n=e*(u?vy(u,null===l||void 0===l?void 0:l[t]):1),e=(+(null===l||void 0===l?void 0:l[t])||0)*e,e=+a[t]+e,[e,n]=d(e,n,t),r=+o[t],t=+s[t];return[[e,r],[n,r],[n,t],[e,t]].map(t=>i.map(t))})]};gy.props={defaultShape:"rect",defaultLabelShape:"label",channels:[...iy({shapes:["rect","hollow","funnel","pyramid"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[{type:"maybeZeroY1"},{type:"maybeZeroX"}],postInference:[...ly(),...oy()],interaction:{shareTooltip:!0}};const my=()=>(t,e,n,r)=>{const{x:i,x1:a,y:o,y1:s}=n;return[t,Array.from(t,t=>{return[[+i[t],+o[t]],[+a[t],+o[t]],[+a[t],+s[t]],[+i[t],+s[t]]].map(t=>r.map(t))})]};function by(t,e){return null==t||null==e?NaN:t<e?-1:e<t?1:e<=t?0:NaN}function xy(n){let a,o,i;function s(t,e,n=0,r=t.length){if(n<r){if(0!==a(e,e))return r;do{var i=n+r>>>1;o(t[i],e)<0?n=1+i:r=i}while(n<r)}return n}return i=2!==n.length?(a=by,o=(t,e)=>by(n(t),e),(t,e)=>n(t)-e):(a=n===by||n===function(t,e){return null==t||null==e?NaN:e<t?-1:t<e?1:t<=e?0:NaN}?n:wy,o=n),{left:s,center:function(t,e,n=0,r=t.length){return r=s(t,e,n,r-1),n<r&&i(t[r-1],e)>-i(t[r],e)?r-1:r},right:function(t,e,n=0,r=t.length){if(n<r){if(0!==a(e,e))return r;do{var i=n+r>>>1;o(t[i],e)<=0?n=1+i:r=i}while(n<r)}return n}}}function wy(){return 0}my.props={defaultShape:"rect",defaultLabelShape:"label",channels:[...iy({shapes:["rect","hollow"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeZeroY1"}],postInference:[...ly(),...oy()],interaction:{shareTooltip:!0}};bc=xy(by).right;const ky=xy(function(t){return null===t?NaN:+t}).center;var Ey=bc;function My(e,n){let r=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&++r;else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(i=+i)>=i&&++r}return r}function Oy(t,e){t=function(e,n){let r=0,i,a=0,o=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(i=t-a,a+=i/++r,o+=i*(t-a));else{let t=-1;for(var s of e)null!=(s=n(s,++t,e))&&(s=+s)>=s&&(i=s-a,a+=i/++r,o+=i*(s-a))}if(1<r)return o/(r-1)}(t,e);return t&&Math.sqrt(t)}function Sy(e,n){let r,i;if(void 0===n)for(const t of e)null!=t&&(void 0===r?t>=t&&(r=i=t):(r>t&&(r=t),i<t&&(i=t)));else{let t=-1;for(var a of e)null!=(a=n(a,++t,e))&&(void 0===r?a>=a&&(r=i=a):(r>a&&(r=a),i<a&&(i=a)))}return[r,i]}class _y{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){var n=this._partials;let r=0;for(let t=0;t<this._n&&t<32;t++){var i=n[t],a=e+i,i=Math.abs(e)<Math.abs(i)?e-(a-i):i-(a-e);i&&(n[r++]=i),e=a}return n[r]=e,this._n=r+1,this}valueOf(){var t=this._partials;let e=this._n,n,r,i,a=0;if(0<e){for(a=t[--e];0<e&&(n=a,r=t[--e],a=n+r,!(i=r-(a-n))););0<e&&(i<0&&t[e-1]<0||0<i&&0<t[e-1])&&(r=2*i,n=a+r,r==n-a)&&(a=n)}return a}}class Ay extends Map{constructor(t,e=function(t){return null!==t&&"object"==typeof t?t.valueOf():t}){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(Py(this,t))}has(t){return super.has(Py(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):(t.set(e,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){e=e(n);t.has(e)&&(n=t.get(e),t.delete(e));return n}(this,t))}}function Py({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):n}function Ty(t){return t}function Ly(t,...e){return jy(t,Ty,Ty,e)}function Ny(t,e,...n){return jy(t,Ty,e,n)}function Cy(t,e,...n){return jy(t,Array.from,e,n)}function jy(t,u,f,h){return function t(e,n){if(n>=h.length)return f(e);var r=new Ay,i=h[n++];let a=-1;for(const l of e){var o=i(l,++a,e),s=r.get(o);s?s.push(l):r.set(o,[l])}for(const[c,e]of r)r.set(c,t(e,n));return u(r)}(t,0)}function Ry(e,...i){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");e=Array.from(e);let[n]=i;var t,r;return n&&2!==n.length||1<i.length?(t=Uint32Array.from(e,(t,e)=>e),1<i.length?(i=i.map(t=>e.map(t)),t.sort((t,e)=>{for(const r of i){var n=Fy(r[t],r[e]);if(n)return n}})):(n=e.map(n),t.sort((t,e)=>Fy(n[t],n[e]))),r=e,Array.from(t,t=>r[t])):e.sort(Iy(n))}function Iy(r=by){if(r===by)return Fy;if("function"!=typeof r)throw new TypeError("compare is not a function");return(t,e)=>{var n=r(t,e);return n||0===n?n:(0===r(e,e))-(0===r(t,t))}}function Fy(t,e){return(null==t||!(t<=t))-(null==e||!(e<=e))||(t<e?-1:e<t?1:0)}var By=Array.prototype.slice;function Dy(t){return()=>t}var zy=Math.sqrt(50),Gy=Math.sqrt(10),Wy=Math.sqrt(2);function Vy(t,e,n){e=(e-t)/Math.max(0,n),t=Math.floor(Math.log(e)/Math.LN10),n=e/Math.pow(10,t);return 0<=t?(zy<=n?10:Gy<=n?5:Wy<=n?2:1)*Math.pow(10,t):-Math.pow(10,-t)/(zy<=n?10:Gy<=n?5:Wy<=n?2:1)}function Yy(t){return Math.ceil(Math.log(My(t))/Math.LN2)+1}function Hy(){var g=Ty,m=Sy,b=Yy;function e(t){for(var e,n,r=(t=Array.isArray(t)?t:Array.from(t)).length,i=new Array(r),a=0;a<r;++a)i[a]=g(t[a],a,t);var o=m(i),s=o[0],l=o[1],c=b(i,s,l);if(!Array.isArray(c)){var o=l,u=+c;if(m===Sy&&([s,l]=function(t,e,n){let r;for(;;){var i=Vy(t,e,n);if(i===r||0===i||!isFinite(i))return[t,e];0<i?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}(s,l,u)),(c=function(n,r,t){var e,i,a,o,s=-1;if(t=+t,(n=+n)===(r=+r)&&0<t)return[n];if((e=r<n)&&(i=n,n=r,r=i),0===(o=Vy(n,r,t))||!isFinite(o))return[];if(0<o){let t=Math.round(n/o),e=Math.round(r/o);for(t*o<n&&++t,e*o>r&&--e,a=new Array(i=e-t+1);++s<i;)a[s]=(t+s)*o}else{o=-o;let t=Math.round(n*o),e=Math.round(r*o);for(t/o<n&&++t,e/o>r&&--e,a=new Array(i=e-t+1);++s<i;)a[s]=(t+s)/o}return e&&a.reverse(),a}(s,l,u))[0]<=s&&(n=Vy(s,l,u)),c[c.length-1]>=l)if(l<=o&&m===Sy){const n=Vy(s,l,u);isFinite(n)&&(0<n?l=(Math.floor(l/n)+1)*n:n<0&&(l=(Math.ceil(l*-n)+1)/-n))}else c.pop()}for(var f=c.length,h=0,d=f;c[h]<=s;)++h;for(;c[d-1]>l;)--d;(h||d<f)&&(c=c.slice(h,d),f=d-h);var p,y,v=new Array(f+1);for(a=0;a<=f;++a)(p=v[a]=[]).x0=0<a?c[a-1]:s,p.x1=a<f?c[a]:l;if(isFinite(n)){if(0<n)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&v[Math.min(f,Math.floor((e-s)/n))].push(t[a]);else if(n<0)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&(y=Math.floor((s-e)*n),v[Math.min(f,y+(c[y]<=e))].push(t[a]))}else for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&v[Ey(c,e,0,f)].push(t[a]);return v}return e.value=function(t){return arguments.length?(g="function"==typeof t?t:Dy(t),e):g},e.domain=function(t){return arguments.length?(m="function"==typeof t?t:Dy([t[0],t[1]]),e):m},e.thresholds=function(t){return arguments.length?(b="function"==typeof t?t:Dy(Array.isArray(t)?By.call(t):t),e):b},e}function qy(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r<t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r<i||void 0===r&&i>=i)&&(r=i)}return r}function Uy(t,e){let n,r=-1,i=-1;if(void 0===e)for(const o of t)++i,null!=o&&(n<o||void 0===n&&o>=o)&&(n=o,r=i);else for(var a of t)null!=(a=e(a,++i,t))&&(n<a||void 0===n&&a>=a)&&(n=a,r=i);return r}function Xy(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r>t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function Ky(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function $y(t,e,n){var r;if((n=(t=Float64Array.from(function*(e,n){if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(yield t);else{let t=-1;for(var r of e)null!=(r=n(r,++t,e))&&(r=+r)>=r&&(yield r)}}(t,n))).length)&&!isNaN(e=+e))return e<=0||n<2?Xy(t):1<=e?qy(t):(n=(n-1)*e,(r=qy(function n(r,i,a=0,o=1/0,s){if(i=Math.floor(i),a=Math.floor(Math.max(0,a)),o=Math.floor(Math.min(r.length-1,o)),a<=i&&i<=o)for(s=void 0===s?Fy:Iy(s);a<o;){600<o-a&&(l=o-a+1,c=i-a+1,f=Math.log(l),u=.5*Math.exp(2*f/3),f=.5*Math.sqrt(f*u*(l-u)/l)*(c-l/2<0?-1:1),n(r,i,Math.max(a,Math.floor(i-c*u/l+f)),Math.min(o,Math.floor(i+(l-c)*u/l+f)),s));var l,c,u,f,h=r[i];let t=a,e=o;for(Ky(r,a,i),0<s(r[o],h)&&Ky(r,a,o);t<e;){for(Ky(r,t,e),++t,--e;s(r[t],h)<0;)++t;for(;0<s(r[e],h);)--e}0===s(r[a],h)?Ky(r,a,e):Ky(r,++e,o),e<=i&&(a=e+1),i<=e&&(o=e-1)}return r}(t,e=Math.floor(n)).subarray(0,e+1)))+(Xy(t.subarray(e+1))-r)*(n-e))}function Zy(e,n){let r=0,i=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(++r,i+=t);else{let t=-1;for(var a of e)null!=(a=n(a,++t,e))&&(a=+a)>=a&&(++r,i+=a)}if(r)return i/r}function Jy(t,e){return $y(t,.5,e)}function Qy(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function tv(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)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}function ev(e,n){let r=0;if(void 0===n)for(var t of e)(t=+t)&&(r+=t);else{let t=-1;for(var i of e)(i=+n(i,++t,e))&&(r+=i)}return r}function nv(t){t=t.getOptions().transformations;return t.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function rv(t){t=t.getOptions().transformations;return t.some(([t])=>"polar"===t)}function iv(t){t=t.getOptions().transformations;return t.some(([t])=>"reflect"===t)&&t.some(([t])=>t.startsWith("transpose"))}function av(t){t=t.getOptions().transformations;return t.some(([t])=>"helix"===t)}function ov(t){t=t.getOptions().transformations;return t.some(([t])=>"parallel"===t)}function sv(t){t=t.getOptions().transformations;return t.some(([t])=>"fisheye"===t)}function lv(t){return av(t)||rv(t)}const cv=(t,e,n,r)=>{var i;const{series:a,x:o,y:s}=n;var{x:n,y:e}=e;if(void 0===o||void 0===s)throw new Error("Missing encode for x or y channel.");var t=a?Array.from(Ly(t,t=>a[t]).values()):[t],l=t.map(t=>t[0]);const c=((null==(i=null==n?void 0:n.getBandWidth)?void 0:i.call(n))||0)/2,u=((null==(i=null==e?void 0:e.getBandWidth)?void 0:i.call(e))||0)/2;return[l,Array.from(t,t=>t.map(t=>r.map([+o[t]+c,+s[t]+u]))),t]},uv=(t,e,n,i)=>{const a=Object.entries(n).filter(([t])=>t.startsWith("position")).map(([,t])=>t);if(0===a.length)throw new Error("Missing encode for position channel.");return[t,Array.from(t,e=>{var t=a.map(t=>+t[e]),n=i.map(t),r=[];for(let t=0;t<n.length;t+=2)r.push([n[t],n[t+1]]);return r})]},fv=()=>(t,e,n,r)=>{return(ov(r)?uv:cv)(t,e,n,r)};fv.props={defaultShape:"line",defaultLabelShape:"label",channels:[...iy({shapes:["line","smooth"]}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"},{type:"maybeGradient"}],postInference:[...ly(),...oy(),{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const hv=y=>(t,e,n,o)=>{const{x:r,y:i,x1:a,y1:s,size:l,dx:c,dy:u}=n,[f,h]=o.getSize(),d=uy(e,n,y),p=t=>{var e=+((null===c||void 0===c?void 0:c[t])||0),n=+((null===u||void 0===u?void 0:u[t])||0);return[(a?(+r[t]+ +a[t])/2:+r[t])+e,(s?(+i[t]+ +s[t])/2:+i[t])+n]};return[t,l?Array.from(t,t=>{var[e,n]=p(t),r=+l[t],i=r/f,r=r/h,a=[e-i,n-r],e=[e+i,n+r];return[o.map(d(a,t)),o.map(d(e,t))]}):Array.from(t,t=>[o.map(d(p(t),t))])]};hv.props={defaultShape:"hollow",defaultLabelShape:"label",channels:[...iy({shapes:["hollow","hollowDiamond","hollowHexagon","hollowSquare","hollowTriangleDown","hollowTriangle","hollowBowtie","point","plus","diamond","square","triangle","hexagon","cross","bowtie","hyphen","line","tick","triangleDown"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",scale:"sqrt"},{name:"dx",scale:"identity"},{name:"dy",scale:"identity"}],preInference:[{type:"maybeZeroY"},{type:"maybeZeroX"}],postInference:[...ly(),{type:"maybeSize"},...ay()]};const dv=s=>{const{cartesian:l=!1}=s;return l?hy:(t,e,n,r)=>{if(l)return hy(t,0,n,r);const{x:i,y:a}=n,o=uy(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};dv.props={defaultShape:"text",defaultLabelShape:"label",channels:[...iy({shapes:["text","badge"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...ly(),...ay()]};const pv=()=>(t,e,n,i)=>{const{x:a,y:o}=n,s=e.x,l=e.y;return[t,Array.from(t,t=>{var e=s.getBandWidth(s.invert(+a[t])),n=l.getBandWidth(l.invert(+o[t])),r=+a[t],t=+o[t];return[[r,t],[r+e,t],[r+e,t+n],[r,t+n]].map(t=>i.map(t))})]};pv.props={defaultShape:"cell",defaultLabelShape:"label",channels:[...iy({shapes:["cell","hollow"]}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[{type:"maybeZeroX"},{type:"maybeZeroY"},{type:"maybeZeroPadding"}],postInference:[...ly(),...ay()]};const yv=()=>(t,e,n,a)=>{const{x:o,y:s,y1:l,series:r}=n;n=r?Array.from(Ly(t,t=>r[t]).values()):[t];return[n.map(t=>t[0]),Array.from(n,e=>{var n=e.length,r=new Array(2*n);for(let t=0;t<e.length;t++){var i=e[t];r[t]=a.map([+o[i],+s[i]]),r[n+t]=a.map([+o[i],+l[i]])}return r}),n]};yv.props={defaultShape:"area",defaultLabelShape:"label",channels:[...iy({shapes:["area","smooth"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"},{type:"maybeZeroY1"},{type:"maybeZeroPadding"}],postInference:[...ly(),...oy()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const vv=c=>(t,e,n,r)=>{const{x:i,y:a,x1:o=i,y1:s=a}=n,l=uy(e,n,c);e=t.map(t=>[r.map(l([+i[t],+a[t]],t)),r.map(l([+o[t],+s[t]],t))]);return[t,e]};vv.props={defaultShape:"link",defaultLabelShape:"label",channels:[...iy({shapes:["link","arc","vhv","smooth"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeIdentityY"},{type:"maybeIdentityX"}],postInference:[...ly(),...ay()]};const gv=s=>{var t=s["cartesian"];return t?hy:(t,e,n,r)=>{const{x:i,y:a}=n,o=uy(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};gv.props={defaultShape:"image",defaultLabelShape:"label",channels:[...iy({shapes:["image"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...ly(),...ay()]};const mv=()=>(t,e,n,a)=>{const o=Object.entries(n).filter(([t])=>t.startsWith("x")).map(([,t])=>t),s=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t);n=t.map(e=>{var n=[];for(let t=0;t<o.length;t++){var r=o[t][e];if(void 0===r)break;var i=s[t][e];n.push(a.map([+r,+i]))}return n});return[t,n]};mv.props={defaultShape:"polygon",defaultLabelShape:"label",channels:[...iy({shapes:["polygon","ribbon"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...ly(),...ay()]};const bv=()=>(t,e,n,s)=>{const{x:l,y:c,y1:u,y2:f,y3:h,y4:d,series:p}=n,y=e.x,v=e.series;return[t,Array.from(t,t=>{var e=y.getBandWidth(y.invert(+l[t])),n=e*(v?v.getBandWidth(v.invert(+(null===p||void 0===p?void 0:p[t]))):1),e=(+(null===p||void 0===p?void 0:p[t])||0)*e,e=+l[t]+e+n/2,[t,r,i,a,o]=[+c[t],+u[t],+f[t],+h[t],+d[t]];return[[e-n/2,o],[e+n/2,o],[e,o],[e,a],[e-n/2,a],[e+n/2,a],[e+n/2,r],[e-n/2,r],[e-n/2,i],[e+n/2,i],[e,r],[e,t],[e-n/2,t],[e+n/2,t]].map(t=>s.map(t))})]},xv=(bv.props={defaultShape:"box",defaultLabelShape:"label",channels:[...iy({shapes:["box"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[{type:"maybeZeroX"}],postInference:[...ly(),...oy()],interaction:{shareTooltip:!0}},()=>(t,e,n,i)=>{const{x:a,y:o,size:s,rotate:l}=n,[c,u]=i.getSize();n=t.map(t=>{var e=+l[t]/180*Math.PI,n=+s[t],r=n/c,n=n/u,r=r*Math.cos(e),n=-n*Math.sin(e);return[i.map([+a[t]-r/2,+o[t]-n/2]),i.map([+a[t]+r/2,+o[t]+n/2])]});return[t,n]});xv.props={defaultShape:"vector",defaultLabelShape:"label",channels:[...iy({shapes:["vector"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[],postInference:[...ly(),...ay()]};const wv=()=>(t,e,n,r)=>{const i=n["y"];return[t,Array.from(t,t=>{return[[0,i[t]],[1,i[t]]].map(t=>r.map(t))})]};wv.props={defaultShape:"line",defaultLabelShape:"label",channels:[...sy({shapes:["line"]}),{name:"y",required:!0}],preInference:[{type:"maybeTupleY"}],postInference:[...ly()]};const kv=()=>(t,e,n,r)=>{const i=n["x"];return[t,Array.from(t,t=>{return[[i[t],1],[i[t],0]].map(t=>r.map(t))})]};kv.props={defaultShape:"line",defaultLabelShape:"label",channels:[...sy({shapes:["line"]}),{name:"x",required:!0}],preInference:[{type:"maybeTupleX"}],postInference:[...ly()]};const Ev=(...t)=>vv(...t);function Mv(t,e,n,r){if(e)return()=>[0,1];const{[t]:i,[t+"1"]:a}=n;return t=>{var e=(null==(e=r.getBandWidth)?void 0:e.call(r,r.invert(+a[t])))||0;return[i[t],a[t]+e]}}function Ov(t={}){const{extendX:r=!1,extendY:s=!1}=t;return(t,e,n,i)=>{const a=Mv("x",r,n,e.x),o=Mv("y",s,n,e.y);return[t,Array.from(t,t=>{var[e,n]=a(t),[t,r]=o(t);return[[e,t],[n,t],[n,r],[e,r]].map(t=>i.map(t))})]}}Ev.props={defaultShape:"connector",defaultLabelShape:"label",channels:[...sy({shapes:["connector"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...ly()]};const Sv=()=>Ov();Sv.props={defaultShape:"range",defaultLabelShape:"label",channels:[...sy({shapes:["range"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...ly()]};const _v=()=>Ov({extendY:!0});_v.props={defaultShape:"range",defaultLabelShape:"label",channels:[...sy({shapes:["range"]}),{name:"x",required:!0}],preInference:[],postInference:[...ly()]};const Av=()=>Ov({extendX:!0});function Pv(t){return t.target.depth}function Tv(t,e){return t.sourceLinks.length?t.depth:e-1}function Lv(t){return function(){return t}}function Nv(t,e){return jv(t.source,e.source)||t.index-e.index}function Cv(t,e){return jv(t.target,e.target)||t.index-e.index}function jv(t,e){return t.y0-e.y0}function Rv(t){return t.value}function Iv(t){return t.index}function Fv(t){return t.nodes}function Bv(t){return t.links}function Dv(t,e){t=t.get(e);if(t)return t;throw new Error("missing: "+e)}function zv({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const r of n.sourceLinks)r.y0=t+r.width/2,t+=r.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function Gv(){let x=0,w=0,k=1,E=1,M=24,O=8,S,_=Iv,A=Tv,P,T,L,N=Fv,C=Bv,j=6;function e(e){e={nodes:N(e),links:C(e)};{var{nodes:i,links:t}=e;i.forEach((t,e)=>{t.index=e,t.sourceLinks=[],t.targetLinks=[]});const y=new Map(i.map(t=>[_(t),t]));if(t.forEach((t,e)=>{t.index=e;let{source:n,target:r}=t;"object"!=typeof n&&(n=t.source=Dv(y,n)),"object"!=typeof r&&(r=t.target=Dv(y,r)),n.sourceLinks.push(t),r.targetLinks.push(t)}),null!=L)for(var{sourceLinks:n,targetLinks:r}of i)n.sort(L),r.sort(L)}t=e.nodes;for(const v of t)v.value=void 0===v.fixedValue?Math.max(ev(v.sourceLinks,Rv),ev(v.targetLinks,Rv)):v.fixedValue;{var a=e.nodes,o=a.length;let t=new Set(a),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.depth=r;for(var{target:e}of t.sourceLinks)n.add(e)}),++r>o)throw new Error("circular link");t=n,n=new Set}if(P){var s,l=Math.max(qy(a,t=>t.depth)+1,0);for(let t=0;t<a.length;t++)(s=a[t]).depth=P.call(null,s,l)}}{var c=(i=e.nodes).length;let t=new Set(i),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.height=r;for(var{source:e}of t.targetLinks)n.add(e)}),++r>c)throw new Error("circular link");t=n,n=new Set}}var u=function({nodes:t}){var e=Math.max(qy(t,t=>t.depth)+1,0),n=(k-x-M)/(e-1),r=new Array(e).fill(0).map(()=>[]);for(const a of t){var i=Math.max(0,Math.min(e-1,Math.floor(A.call(null,a,e))));a.layer=i,a.x0=x+i*n,a.x1=a.x0+M,r[i]?r[i].push(a):r[i]=[a]}if(T)for(const o of r)o.sort(T);return r}(e),t=(S=Math.min(O,(E-w)/(qy(u,t=>t.length)-1)),u),f=Xy(t,t=>(E-w-(t.length-1)*S)/ev(t,Rv));for(const g of t){let e=w;for(const m of g){m.y0=e,m.y1=e+m.value*f,e=m.y1+S;for(const b of m.sourceLinks)b.width=b.value*f}e=(E-e+S)/(g.length+1);for(let t=0;t<g.length;++t){var h=g[t];h.y0+=e*(t+1),h.y1+=e*(t+1)}!function(t){if(void 0===L)for(var{sourceLinks:e,targetLinks:n}of t)e.sort(Cv),n.sort(Nv)}(g)}for(let t=0;t<j;++t){var d=Math.pow(.99,t),p=Math.max(1-d,(t+1)/j);!function(n,r,i){for(let t=n.length,e=t-2;0<=e;--e){var a,o=n[e];for(const c of o){let t=0,e=0;for(var{target:s,value:l}of c.sourceLinks){l=l*(s.layer-c.layer);t+=function(t,e){let n=e.y0-(e.targetLinks.length-1)*S/2;for(var{source:r,width:i}of e.targetLinks){if(r===t)break;n+=i+S}for(var{target:a,width:o}of t.sourceLinks){if(a===e)break;n-=o}return n}(c,s)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,I(c))}void 0===T&&o.sort(jv),o.length&&R(o,i)}}(u,d,p),!function(n,r,i){for(let t=1,e=n.length;t<e;++t){var a,o=n[t];for(const c of o){let t=0,e=0;for(var{source:s,value:l}of c.targetLinks){l=l*(c.layer-s.layer);t+=function(t,e){let n=t.y0-(t.sourceLinks.length-1)*S/2;for(var{target:r,width:i}of t.sourceLinks){if(r===e)break;n+=i+S}for(var{source:a,width:o}of e.targetLinks){if(a===t)break;n-=o}return n}(s,c)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,I(c))}void 0===T&&o.sort(jv),o.length&&R(o,i)}}(u,d,p)}return zv(e),e}function R(t,e){var n=t.length>>1,r=t[n];a(t,r.y0-S,n-1,e),i(t,r.y1+S,1+n,e),a(t,E,t.length-1,e),i(t,w,0,e)}function i(t,e,n,r){for(;n<t.length;++n){var i=t[n],a=(e-i.y0)*r;1e-6<a&&(i.y0+=a,i.y1+=a),e=i.y1+S}}function a(t,e,n,r){for(;0<=n;--n){var i=t[n],a=(i.y1-e)*r;1e-6<a&&(i.y0-=a,i.y1-=a),e=i.y0-S}}function I({sourceLinks:t,targetLinks:e}){if(void 0===L){for(const{source:{sourceLinks:t}}of e)t.sort(Cv);for(const{target:{targetLinks:e}}of t)e.sort(Nv)}}return e.update=function(t){return zv(t),t},e.nodeId=function(t){return arguments.length?(_="function"==typeof t?t:Lv(t),e):_},e.nodeAlign=function(t){return arguments.length?(A="function"==typeof t?t:Lv(t),e):A},e.nodeDepth=function(t){return arguments.length?(P=t,e):P},e.nodeSort=function(t){return arguments.length?(T=t,e):T},e.nodeWidth=function(t){return arguments.length?(M=+t,e):M},e.nodePadding=function(t){return arguments.length?(O=S=+t,e):O},e.nodes=function(t){return arguments.length?(N="function"==typeof t?t:Lv(t),e):N},e.links=function(t){return arguments.length?(C="function"==typeof t?t:Lv(t),e):C},e.linkSort=function(t){return arguments.length?(L=t,e):L},e.size=function(t){return arguments.length?(x=w=0,k=+t[0],E=+t[1],e):[k-x,E-w]},e.extent=function(t){return arguments.length?(x=+t[0][0],k=+t[1][0],w=+t[0][1],E=+t[1][1],e):[[x,w],[k,E]]},e.iterations=function(t){return arguments.length?(j=+t,e):j},e}Av.props={defaultShape:"range",defaultLabelShape:"label",channels:[...sy({shapes:["range"]}),{name:"y",required:!0}],preInference:[],postInference:[...ly()]};const Wv={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},Vv={left:function(t){return t.depth},right:function(t,e){return e-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?Xy(t.sourceLinks,Pv)-1:0},justify:Tv};const Yv=f=>t=>{var{nodeId:e,nodeSort:n,nodeAlign:r,nodeWidth:i,nodePadding:a,nodeDepth:o,nodes:s,links:l,linkSort:c,iterations:u}=Object.assign({},Wv,f),l=Gv().nodeSort(n).linkSort(c).links(l).nodes(s).nodeWidth(i).nodePadding(a).nodeDepth(o).nodeAlign("string"==(c=typeof(n=r))?Vv[n]||Tv:"function"==c?n:Tv).iterations(u).extent([[0,0],[1,1]]),s=("function"==typeof e&&l.nodeId(e),l(t)),{nodes:i,links:a}=s;return{nodes:i.map(t=>{var{x0:e,x1:n,y0:r,y1:i}=t;return Object.assign(Object.assign({},t),{x:[e,n,n,e],y:[r,r,i,i]})}),links:a.map(t=>{var{source:e,target:n}=t,e=e.x1,n=n.x0,r=t.width/2;return Object.assign(Object.assign({},t),{x:[e,e,n,n],y:[t.y0+r,t.y0-r,t.y1+r,t.y1-r]})})}};function Hv(t){return t}function qv(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function Uv(t=""){throw new Error(t)}function Xv(t,e){var n,r,e=e["attributes"],i=new Set(["id","className"]);for([n,r]of Object.entries(e))i.has(n)||t.attr(n,r)}function Kv(t){return null!=t&&!Number.isNaN(t)}function J(t,e){return $v(t,e)||{}}function $v(t,n){t=Object.entries(t).filter(([t])=>t.startsWith(n)).map(([t,e])=>[Mp(t.replace(n,"").trim()),e]).filter(([t])=>!!t);return 0===t.length?null:Object.fromEntries(t)}function Zv(t,e){return void 0===t?null:"number"==typeof t?t:(t=+t.replace("%",""),Number.isNaN(t)?null:t/100*e)}Yv.props={};const Jv=v=>{const g={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},m={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},b={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:null}},x={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10};return()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=v,{links:t,nodes:l}=yy(t,e),c=J(e,"node"),e=J(e,"link"),{key:u=t=>t.key,color:f=u}=c,{links:i,nodes:t}=Yv(Object.assign(Object.assign(Object.assign({},g),{nodeId:dy(u)}),i))({links:t,nodes:l});const h=J(r,"label"),{text:d=u,spacing:p=5}=h,y=Z(h,["text","spacing"]);return[R({},m,{data:t,encode:Object.assign(Object.assign({},c),{color:f}),scale:n,style:J(r,"node"),labels:[Object.assign(Object.assign(Object.assign({},x),{text:d,dx:t=>t.x[0]<.5?p:-p}),y),...a],animate:"object"==typeof s?J(s,"node"):s,axis:!1}),R({},b,{data:i,encode:e,labels:o,style:Object.assign({fill:e.color?void 0:"#aaa"},J(r,"link")),animate:"object"==typeof s?J(s,"link"):s})]}},Qv=(Jv.props={composite:!0},t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])]);Qv.props={defaultShape:"path",defaultLabelShape:"label",channels:[...iy({shapes:["path","hollow"]}),{name:"d",scale:"identity"}],preInference:[],postInference:[...ly()]};const tg=t=>t?parseInt(t):0;function eg(t,e,n,r){var i;return e?(e=t,t=getComputedStyle(e),i=e.clientWidth||tg(t.width),e=e.clientHeight||tg(t.height),{width:(i={width:i-(tg(t.paddingLeft)+tg(t.paddingRight)),height:e-(tg(t.paddingTop)+tg(t.paddingBottom))}).width,height:i.height}):{width:n,height:r}}function ng(t){var{height:t,width:e,padding:n=0,paddingLeft:r=n,paddingRight:i=n,paddingTop:a=n,paddingBottom:n=n,margin:o=0,marginLeft:s=o,marginRight:l=o,marginTop:c=o,marginBottom:o=o,inset:u=0,insetLeft:f=u,insetRight:h=u,insetTop:d=u,insetBottom:u=u}=t;return{width:e-r-i-s-l-f-h,height:t-a-n-c-o-d-u}}function rg(t,e,n){const r=n["value"];var o,i,a,s,l,c,u,f,h,d,n=function(t,e){var n={treemapBinary:ty,treemapDice:F0,treemapSlice:Z0,treemapSliceDice:ey,treemapSquarify:Q0,treemapResquarify:ny};if(e="treemapSquarify"===t?n[t].ratio(e):n[t])return e;throw new TypeError("Invalid tile method!")}(e.tile,e.ratio),p=(t=t,p=e.path,(Array.isArray(t)?"function"==typeof p?V0().path(p):V0():c0)(t));function y(t){return t.x0=t.y0=0,t.x1=a,t.y1=s,t.eachBefore(v),l=[0],i&&t.eachBefore(I0),t}function v(t){var e=l[t.depth],n=t.x0+e,r=t.y0+e,i=t.x1-e,a=t.y1-e;i<n&&(n=i=(n+i)/2),a<r&&(r=a=(r+a)/2),t.x0=n,t.y0=r,t.x1=i,t.y1=a,t.children&&(e=l[t.depth+1]=c(t)/2,n+=d(t)-e,r+=u(t)-e,(i-=f(t)-e)<n&&(n=i=(n+i)/2),(a-=h(t)-e)<r&&(r=a=(r+a)/2),o(t,n,r,i,a))}return r?p.sum(t=>e.ignoreParentValue&&t.children?0:t[r]).sort(e.sort):p.count(),o=Q0,i=!1,s=a=1,l=[0],d=h=f=u=c=g0,y.round=function(t){return arguments.length?(i=!!t,y):i},y.size=function(t){return arguments.length?(a=+t[0],s=+t[1],y):[a,s]},y.tile=function(t){return arguments.length?(o=v0(t),y):o},y.padding=function(t){return arguments.length?y.paddingInner(t).paddingOuter(t):y.paddingInner()},y.paddingInner=function(t){return arguments.length?(c="function"==typeof t?t:m0(+t),y):c},y.paddingOuter=function(t){return arguments.length?y.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):y.paddingTop()},y.paddingTop=function(t){return arguments.length?(u="function"==typeof t?t:m0(+t),y):u},y.paddingRight=function(t){return arguments.length?(f="function"==typeof t?t:m0(+t),y):f},y.paddingBottom=function(t){return arguments.length?(h="function"==typeof t?t:m0(+t),y):h},y.paddingLeft=function(t){return arguments.length?(d="function"==typeof t?t:m0(+t),y):d},y.tile(n).size(e.size).round(e.round).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(p),p.descendants().map(t=>Object.assign(t,{x:[t.x0,t.x1],y:[t.y0,t.y1]})).filter("function"==typeof e.layer?e.layer:t=>t.height===e.layer)}const ig=u=>t=>{var{width:t,height:e}=ng(t),{data:n,encode:r={},scale:i,style:a={},layout:o={},labels:s=[]}=u,l=Z(u,["data","encode","scale","style","layout","labels"]),c={tile:"treemapSquarify",ratio:.5*(1+Math.sqrt(5)),size:[t,e],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,sort:(t,e)=>e.value-t.value,layer:0},t={type:"rect",axis:!1,encode:{x:"x",y:"y",color:t=>t.data.parent.name},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]}},style:{stroke:"#fff"}},e=rg(n,R({},c,o),r),n=J(a,"label");return[R({},t,Object.assign(Object.assign({data:e,encode:r,scale:i,style:a,labels:[Object.assign(Object.assign({},{fontSize:10,text:t=>t.data.name,position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0,lineHeight:t=>t.y1-t.y0}),n),...s]},l),{axis:!1}))]},ag=(ig.props={composite:!0},u=>t=>{var{width:t,height:e}=ng(t),{data:n,encode:r={},scale:i={},style:a={},layout:o={},labels:s=[]}=u,l=Z(u,["data","encode","scale","style","layout","labels"]),c={type:"point",axis:!1,legend:!1,scale:{x:{domain:[0,t]},y:{domain:[0,e]},size:{type:"identity"}},encode:{x:"x",y:"y",size:"r",shape:"point"},style:{fill:r.color?void 0:t=>0===t.height?"#ddd":"#fff",stroke:r.color?void 0:t=>0===t.height?"":"#000"}},n=((t,e,n)=>{const r=n["value"];n=(kp(t)?V0().path(e.path):c0)(t);return r?n.sum(t=>t[r]).sort(e.sort):n.count(),N0().size(e.size).padding(e.padding)(n),n.descendants()})(n,R({},{size:[t,e],padding:0,sort:(t,e)=>e.value-t.value},o),R({},c.encode,r)),t=J(a,"label");return[R({},c,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a,labels:[Object.assign(Object.assign({},{text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>2*t.r,lineHeight:t=>2*t.r}),t),...s]},l),{axis:!1}))]});function og(t,e){return Xy(t,t=>e[t])}function sg(t,e){return qy(t,t=>e[t])}function lg(t,e){const n=2.5*cg(t,e)-1.5*fg(t,e);return Xy(t,t=>e[t]>=n?e[t]:NaN)}function cg(t,e){return $y(t,.25,t=>e[t])}function ug(t,e){return $y(t,.5,t=>e[t])}function fg(t,e){return $y(t,.75,t=>e[t])}function hg(t,e){const n=2.5*fg(t,e)-1.5*cg(t,e);return qy(t,t=>e[t]<=n?e[t]:NaN)}function dg(){return(t,e)=>{var n=e["encode"],{y:n,x:r}=n;const i=n["value"],a=r["value"];return[Array.from(Ly(t,t=>a[+t]).values()).flatMap(t=>{const e=lg(t,i),n=hg(t,i);return t.filter(t=>i[t]<e||i[t]>n)}),e]}}ag.props={composite:!0};const pg=o=>()=>{var{data:t,encode:e,style:n={}}=o,{extend:r=!1}=n,n=Z(n,["extend"]),i=e["y"],i={y:i,y1:i,y2:i,y3:i,y4:i},a={y1:cg,y2:ug,y3:fg};return r?[{type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:og},a),{y4:sg})],encode:Object.assign(Object.assign({},e),i),style:n}]:(r=J(n,"box"),n=J(n,"point"),[{type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:lg},a),{y4:hg})],encode:Object.assign(Object.assign({},e),i),style:r},{type:"point",data:t,transform:[{type:dg}],encode:e,style:Object.assign({},n)}])},yg=(pg.props={composite:!0},s=>{var t=s["cartesian"];return t?hy:(t,e,n,r)=>{const{x:i,y:a}=n,o=uy(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}});function vg(t,e,n,r){if(!isNaN(e)&&!isNaN(n)){var i,a,o,s,l,c,u,f,h,d=t._root,p={data:r},y=t._x0,v=t._y0,g=t._x1,m=t._y1;if(d){for(;d.length;)if((c=e>=(a=(y+g)/2))?y=a:g=a,(u=n>=(o=(v+m)/2))?v=o:m=o,!(d=(i=d)[f=u<<1|c]))return i[f]=p,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&n===l)p.next=d,i?i[f]=p:t._root=p;else{for(;i=i?i[f]=new Array(4):t._root=new Array(4),(c=e>=(a=(y+g)/2))?y=a:g=a,(u=n>=(o=(v+m)/2))?v=o:m=o,(f=u<<1|c)==(h=(o<=l)<<1|a<=s););i[h]=d,i[f]=p}}else t._root=p}return t}function gg(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function mg(t){return t[0]}function bg(t){return t[1]}function xg(t,e,n){e=new wg(null==e?mg:e,null==n?bg:n,NaN,NaN,NaN,NaN);return null==t?e:e.addAll(t)}function wg(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function kg(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}yg.props={defaultShape:"shape",defaultLabelShape:"label",channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"},{type:"maybeFunctionAttribute"}]};yo=xg.prototype=wg.prototype;function Eg(t){return function(){return t}}function Mg(t){return 1e-6*(t()-.5)}function Og(t){return t.index}function Sg(t,e){t=t.get(e);if(t)return t;throw new Error("node not found: "+e)}function _g(c){var u,f,a,o,h,d,s=Og,n=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},r=Eg(30),p=1;function e(t){for(var e=0,n=c.length;e<p;++e)for(var r,i,a,o,s,l=0;l<n;++l)r=(i=c[l]).source,a=(i=i.target).x+i.vx-r.x-r.vx||Mg(d),o=i.y+i.vy-r.y-r.vy||Mg(d),a*=s=((s=Math.sqrt(a*a+o*o))-f[l])/s*t*u[l],o*=s,i.vx-=a*(s=h[l]),i.vy-=o*s,r.vx+=a*(s=1-s),r.vy+=o*s}function i(){if(a){var t,e=a.length,n=c.length,r=new Map(a.map((t,e)=>[s(t,e,a),t])),i=0;for(o=new Array(e);i<n;++i)(t=c[i]).index=i,"object"!=typeof t.source&&(t.source=Sg(r,t.source)),"object"!=typeof t.target&&(t.target=Sg(r,t.target)),o[t.source.index]=(o[t.source.index]||0)+1,o[t.target.index]=(o[t.target.index]||0)+1;for(i=0,h=new Array(n);i<n;++i)t=c[i],h[i]=o[t.source.index]/(o[t.source.index]+o[t.target.index]);u=new Array(n),l(),f=new Array(n),y()}}function l(){if(a)for(var t=0,e=c.length;t<e;++t)u[t]=+n(c[t],t,c)}function y(){if(a)for(var t=0,e=c.length;t<e;++t)f[t]=+r(c[t],t,c)}return null==c&&(c=[]),e.initialize=function(t,e){a=t,d=e,i()},e.links=function(t){return arguments.length?(c=t,i(),e):c},e.id=function(t){return arguments.length?(s=t,e):s},e.iterations=function(t){return arguments.length?(p=+t,e):p},e.strength=function(t){return arguments.length?(n="function"==typeof t?t:Eg(+t),l(),e):n},e.distance=function(t){return arguments.length?(r="function"==typeof t?t:Eg(+t),y(),e):r},e}yo.copy=function(){var t,e,n=new wg(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(r)if(r.length)for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=kg(e));else n._root=kg(r);return n},yo.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return vg(this.cover(e,n),e,n,t)},yo.addAll=function(t){for(var e,n,r=t.length,i=new Array(r),a=new Array(r),o=1/0,s=1/0,l=-1/0,c=-1/0,u=0;u<r;++u)isNaN(e=+this._x.call(null,n=t[u]))||isNaN(n=+this._y.call(null,n))||((i[u]=e)<o&&(o=e),l<e&&(l=e),(a[u]=n)<s&&(s=n),c<n&&(c=n));if(!(l<o||c<s))for(this.cover(o,s).cover(l,c),u=0;u<r;++u)vg(this,i[u],a[u],t[u]);return this},yo.cover=function(t,e){if(!isNaN(t=+t)&&!isNaN(e=+e)){var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,s,l=i-n||1,c=this._root;t<n||i<=t||e<r||a<=e;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=c,c=o,l*=2,s){case 0:i=n+l,a=r+l;break;case 1:n=i-l,a=r+l;break;case 2:i=n+l,r=a-l;break;case 3:n=i-l,r=a-l}this._root&&this._root.length&&(this._root=c)}this._x0=n,this._y0=r,this._x1=i,this._y1=a}return this},yo.data=function(){var e=[];return this.visit(function(t){if(!t.length)for(;e.push(t.data),t=t.next;);}),e},yo.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},yo.find=function(t,e,n){var r,i,a,o,s,l,c,u,f=this._x0,h=this._y0,d=this._x1,p=this._y1,y=[],v=this._root;for(v&&y.push(new gg(v,f,h,d,p)),null==n?n=1/0:(f=t-n,h=e-n,d=t+n,p=e+n,n*=n);r=y.pop();)!(v=r.node)||(s=r.x0)>d||(l=r.y0)>p||(o=r.x1)<f||(i=r.y1)<h||(v.length?(y.push(new gg(v[3],a=(s+o)/2,c=(l+i)/2,o,i),new gg(v[2],s,c,a,i),new gg(v[1],a,l,o,c),new gg(v[0],s,l,a,c)),(i=(c<=e)<<1|a<=t)&&(r=y[y.length-1],y[y.length-1]=y[y.length-1-i],y[y.length-1-i]=r)):(l=(o=t-+this._x.call(null,v.data))*o+(s=e-+this._y.call(null,v.data))*s)<n&&(f=t-(c=Math.sqrt(n=l)),h=e-c,d=t+c,p=e+c,u=v.data));return u},yo.remove=function(t){if(!isNaN(a=+this._x.call(null,t))&&!isNaN(o=+this._y.call(null,t))){var e,n,r,i,a,o,s,l,c,u,f,h=this._root,d=this._x0,p=this._y0,y=this._x1,v=this._y1;if(h){if(h.length)for(;;){if((l=a>=(s=(d+y)/2))?d=s:y=s,(c=o>=(s=(p+v)/2))?p=s:v=s,!(h=(e=h)[u=c<<1|l]))return this;if(!h.length)break;(e[u+1&3]||e[u+2&3]||e[u+3&3])&&(n=e,f=u)}for(;h.data!==t;)if(!(h=(r=h).next))return this;(i=h.next)&&delete h.next,r?i?r.next=i:delete r.next:e?(i?e[u]=i:delete e[u],(h=e[0]||e[1]||e[2]||e[3])&&h===(e[3]||e[2]||e[1]||e[0])&&!h.length&&(n?n[f]=h:this._root=h)):this._root=i}}return this},yo.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},yo.root=function(){return this._root},yo.size=function(){var e=0;return this.visit(function(t){if(!t.length)for(;++e,t=t.next;);}),e},yo.visit=function(t){var e,n,r,i,a,o,s,l=[],c=this._root;for(c&&l.push(new gg(c,this._x0,this._y0,this._x1,this._y1));a=l.pop();)!t(c=a.node,n=a.x0,r=a.y0,i=a.x1,a=a.y1)&&c.length&&(o=(n+i)/2,s=(r+a)/2,(e=c[3])&&l.push(new gg(e,o,s,i,a)),(e=c[2])&&l.push(new gg(e,n,s,o,a)),(e=c[1])&&l.push(new gg(e,o,r,i,s)),e=c[0])&&l.push(new gg(e,n,r,o,s));return this},yo.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new gg(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i,a,o,s,l,c,u,f=e.node;f.length&&(a=e.x0,o=e.y0,c=(a+(s=e.x1))/2,u=(o+(l=e.y1))/2,(i=f[0])&&n.push(new gg(i,a,o,c,u)),(i=f[1])&&n.push(new gg(i,c,o,s,u)),(i=f[2])&&n.push(new gg(i,a,u,c,l)),i=f[3])&&n.push(new gg(i,c,u,s,l)),r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},yo.x=function(t){return arguments.length?(this._x=t,this):this._x},yo.y=function(t){return arguments.length?(this._y=t,this):this._y};var Ag={value:()=>{}};function Pg(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Tg(r)}function Tg(t){this._=t}function Lg(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Ag,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Tg.prototype=Pg.prototype={constructor:Tg,on:function(t,e){var n,r,i=this._,a=(r=i,(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(0<=n&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(n=(t=a[o]).type)i[n]=Lg(i[n],t.name,e);else if(null==e)for(n in i)i[n]=Lg(i[n],t.name,null);return this}for(;++o<s;)if(n=(n=(t=a[o]).type)&&function(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}(i[n],t.name))return n},copy:function(){var t,e={},n=this._;for(t in n)e[t]=n[t].slice();return new Tg(e)},call:function(t,e){if(0<(n=arguments.length-2))for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var Ng,Cg,jg=0,Rg=0,Ig=0,Fg=1e3,Bg=0,Dg=0,zg=0,Gg="object"==typeof performance&&performance.now?performance:Date,Wg="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Vg(){return Dg||(Wg(Yg),Dg=Gg.now()+zg)}function Yg(){Dg=0}function Hg(){this._call=this._time=this._next=null}function qg(t,e,n){var r=new Hg;return r.restart(t,e,n),r}function Ug(){Dg=(Bg=Gg.now())+zg,jg=Rg=0;try{Vg(),++jg;for(var t,e=Ng;e;)0<=(t=Dg-e._time)&&e._call.call(void 0,t),e=e._next;--jg}finally{for(var n,r,i=Ng,a=1/(jg=0);i;)i=i._call?(a>i._time&&(a=i._time),(n=i)._next):(r=i._next,i._next=null,n?n._next=r:Ng=r);Cg=n,Kg(a),Dg=0}}function Xg(){var t=Gg.now(),e=t-Bg;Fg<e&&(zg-=e,Bg=t)}function Kg(t){jg||(Rg=Rg&&clearTimeout(Rg),24<t-Dg?(t<1/0&&(Rg=setTimeout(Ug,t-Gg.now()-zg)),Ig=Ig&&clearInterval(Ig)):(Ig||(Bg=Gg.now(),Ig=setInterval(Xg,Fg)),jg=1,Wg(Ug)))}Hg.prototype=qg.prototype={constructor:Hg,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Vg():+n)+(null==e?0:+e),this._next||Cg===this||(Cg?Cg._next=this:Ng=this,Cg=this),this._call=t,this._time=n,Kg()},stop:function(){this._call&&(this._call=null,this._time=1/0,Kg())}};const $g=4294967296;function Zg(t){return t.x}function Jg(t){return t.y}var Qg=10,t1=Math.PI*(3-Math.sqrt(5));function e1(l){var a,o=1,e=.001,s=1-Math.pow(e,1/300),c=0,u=.6,f=new Map,t=qg(i),n=Pg("tick","end"),r=function(){let t=1;return()=>(t=(1664525*t+1013904223)%$g)/$g}();function i(){h(),n.call("tick",a),o<e&&(t.stop(),n.call("end",a))}function h(t){var e,n,r=l.length;void 0===t&&(t=1);for(var i=0;i<t;++i)for(o+=(c-o)*s,f.forEach(function(t){t(o)}),e=0;e<r;++e)null==(n=l[e]).fx?n.x+=n.vx*=u:(n.x=n.fx,n.vx=0),null==n.fy?n.y+=n.vy*=u:(n.y=n.fy,n.vy=0);return a}function d(){for(var t,e,n,r=0,i=l.length;r<i;++r)(n=l[r]).index=r,null!=n.fx&&(n.x=n.fx),null!=n.fy&&(n.y=n.fy),(isNaN(n.x)||isNaN(n.y))&&(t=Qg*Math.sqrt(.5+r),e=r*t1,n.x=t*Math.cos(e),n.y=t*Math.sin(e)),(isNaN(n.vx)||isNaN(n.vy))&&(n.vx=n.vy=0)}function p(t){return t.initialize&&t.initialize(l,r),t}return null==l&&(l=[]),d(),a={tick:h,restart:function(){return t.restart(i),a},stop:function(){return t.stop(),a},nodes:function(t){return arguments.length?(l=t,d(),f.forEach(p),a):l},alpha:function(t){return arguments.length?(o=+t,a):o},alphaMin:function(t){return arguments.length?(e=+t,a):e},alphaDecay:function(t){return arguments.length?(s=+t,a):+s},alphaTarget:function(t){return arguments.length?(c=+t,a):c},velocityDecay:function(t){return arguments.length?(u=1-t,a):1-u},randomSource:function(t){return arguments.length?(r=t,f.forEach(p),a):r},force:function(t,e){return 1<arguments.length?(null==e?f.delete(t):f.set(t,p(e)),a):f.get(t)},find:function(t,e,n){var r,i,a,o=0,s=l.length;for(null==n?n=1/0:n*=n,o=0;o<s;++o)(r=(r=t-(i=l[o]).x)*r+(r=e-i.y)*r)<n&&(a=i,n=r);return a},on:function(t,e){return 1<arguments.length?(n.on(t,e),a):n.on(t)}}}function n1(t,e,n){var i,l,c,u,f,r,h,d,p,{nodes:t,links:a}=t,{joint:e,nodeStrength:o,linkStrength:s}=e,{linkKey:n=t=>t.id}=n,I=(r=Eg(-30),d=(h=1)/0,p=.81,y.initialize=function(t,e){i=t,c=e,F()},y.strength=function(t){return arguments.length?(r="function"==typeof t?t:Eg(+t),F(),y):r},y.distanceMin=function(t){return arguments.length?(h=t*t,y):Math.sqrt(h)},y.distanceMax=function(t){return arguments.length?(d=t*t,y):Math.sqrt(d)},y.theta=function(t){return arguments.length?(p=t*t,y):Math.sqrt(p)},y);function y(t){var e,n=i.length,r=xg(i,Zg,Jg).visitAfter(B);for(u=t,e=0;e<n;++e)l=i[e],r.visit(D)}function F(){if(i){var t,e,n=i.length;for(f=new Array(n),t=0;t<n;++t)e=i[t],f[e.index]=+r(e,t,i)}}function B(t){var e,n,r,i,a,o=0,s=0;if(t.length){for(r=i=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(o+=e.value,s+=n,r+=n*e.x,i+=n*e.y);t.x=r/s,t.y=i/s}else for((e=t).x=e.data.x,e.y=e.data.y;o+=f[e.data.index],e=e.next;);t.value=o}function D(t,e,n,r){if(!t.value)return!0;var i=t.x-l.x,a=t.y-l.y,o=r-e,s=i*i+a*a;if(o*o/p<s)return s<d&&(0===i&&(s+=(i=Mg(c))*i),0===a&&(s+=(a=Mg(c))*a),s<h&&(s=Math.sqrt(h*s)),l.vx+=i*t.value*u/s,l.vy+=a*t.value*u/s),!0;if(!(t.length||d<=s))for((t.data!==l||t.next)&&(0===i&&(s+=(i=Mg(c))*i),0===a&&(s+=(a=Mg(c))*a),s<h)&&(s=Math.sqrt(h*s));t.data!==l&&(o=f[t.data.index]*u/s,l.vx+=i*o,l.vy+=a*o),t=t.next;);}var v,g,m,b,x,w,k,E,M,O,S,_,A,P,n=_g(a).id(dy(n)),T=("function"==typeof o&&I.strength(o),"function"==typeof s&&n.strength(s),e1(t).force("link",n).force("charge",I));function L(t){for(var e,n=0,r=g.length;n<r;++n)(e=g[n]).vy+=(b[n]-e.y)*m[n]*t}function N(){if(g){var t,e=g.length;for(m=new Array(e),b=new Array(e),t=0;t<e;++t)m[t]=isNaN(b[t]=+v(g[t],t,g))?0:+x(g[t],t,g)}}function C(t){for(var e,n=0,r=k.length;n<r;++n)(e=k[n]).vx+=(M[n]-e.x)*E[n]*t}function j(){if(k){var t,e=k.length;for(E=new Array(e),M=new Array(e),t=0;t<e;++t)E[t]=isNaN(M[t]=+w(k[t],t,k))?0:+O(k[t],t,k)}}function R(){for(var t,e=A.length,n=0,r=0,i=0;i<e;++i)n+=(t=A[i]).x,r+=t.y;for(n=(n/e-S)*P,r=(r/e-_)*P,i=0;i<e;++i)(t=A[i]).x-=n,t.y-=r}e?T.force("center",(P=1,null==S&&(S=0),null==_&&(_=0),R.initialize=function(t){A=t},R.x=function(t){return arguments.length?(S=+t,R):S},R.y=function(t){return arguments.length?(_=+t,R):_},R.strength=function(t){return arguments.length?(P=+t,R):P},R)):T.force("x",(O=Eg(.1),"function"!=typeof w&&(w=Eg(null==w?0:+w)),C.initialize=function(t){k=t,j()},C.strength=function(t){return arguments.length?(O="function"==typeof t?t:Eg(+t),j(),C):O},C.x=function(t){return arguments.length?(w="function"==typeof t?t:Eg(+t),j(),C):w},C)).force("y",(x=Eg(.1),"function"!=typeof v&&(v=Eg(null==v?0:+v)),L.initialize=function(t){g=t,N()},L.strength=function(t){return arguments.length?(x="function"==typeof t?t:Eg(+t),N(),L):x},L.y=function(t){return arguments.length?(v="function"==typeof t?t:Eg(+t),N(),L):v},L)),T.stop();var z=Math.ceil(Math.log(T.alphaMin())/Math.log(1-T.alphaDecay()));for(let t=0;t<z;t++)T.tick();return{nodesData:t,linksData:a}}const r1=f=>()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=f,l=J(e,"node"),c=J(e,"link"),{links:t,nodes:u}=yy(t,e),{nodesData:t,linksData:u}=n1({links:t,nodes:u},R({},{joint:!0},i),e);return[R({},{type:"link",axis:!1,legend:!1,encode:{x:[t=>t.source.x,t=>t.target.x],y:[t=>t.source.y,t=>t.target.y]},style:{stroke:"#999",strokeOpacity:.6}},{data:u,encode:c,labels:o,style:J(r,"link"),animate:"object"==typeof s?J(s,"link"):s}),R({},{type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},scale:{color:{type:"ordinal"}},style:{stroke:"#fff"}},{data:t,encode:Object.assign({},l),scale:n,style:J(r,"node"),labels:[Object.assign(Object.assign({},{text:""}),J(r,"label")),...a],animate:"object"==typeof s?J(s,"node"):s})]},i1=(r1.props={composite:!0},f=>u=>t=>{const{field:e="value",nodeSize:n,separation:r,sortBy:i,as:a=["x","y"]}=u,[o,s]=a;var t=c0(t,t=>t.children).sum(t=>t[e]).sort(i),l=f();l.size([1,1]),n&&l.nodeSize(n),r&&l.separation(r),l(t);const c=[];t.each(t=>{t[o]=t.x,t[s]=t.y,t.name=t.data.name,c.push(t)});l=t.links();return l.forEach(t=>{t[o]=[t.source[o],t.target[o]],t[s]=[t.source[s],t.target[s]]}),{nodes:c,edges:l}}),a1=t=>i1(s0)(t),o1=(a1.props={},t=>i1($0)(t)),s1=(o1.props={},c=>{const u={sortBy:(t,e)=>e.value-t.value},f={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},h={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},d={text:"",fontSize:10};return()=>{var{data:t,encode:e={},scale:n={},style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=c,l=null==e?void 0:e.value,{nodes:i,edges:l}=o1(Object.assign(Object.assign(Object.assign({},u),i),{field:l}))(t);return[R({},h,{data:l,encode:J(e,"link"),scale:J(n,"link"),labels:o,style:Object.assign({stroke:"#999"},J(r,"link")),animate:"object"==typeof s?J(s,"link"):s}),R({},f,{data:i,scale:J(n,"node"),encode:J(e,"node"),labels:[Object.assign(Object.assign({},d),J(r,"label")),...a],style:Object.assign({},J(r,"node")),animate:"object"==typeof s?J(s,"node"):s})]}});s1.props={composite:!0};var l1={},c1={},u1=34,f1=10,h1=13;function d1(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function p1(t){var n=Object.create(null),r=[];return t.forEach(function(t){for(var e in t)e in n||r.push(n[e]=e)}),r}function y1(t,e){var t=t+"",n=t.length;return n<e?new Array(e-n+1).join(0)+t:t}function v1(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+y1(-e,6):9999<e?"+"+y1(e,6):y1(e,4))+"-"+y1(t.getUTCMonth()+1,2)+"-"+y1(t.getUTCDate(),2)+(a?"T"+y1(n,2)+":"+y1(r,2)+":"+y1(i,2)+"."+y1(a,3)+"Z":i?"T"+y1(n,2)+":"+y1(r,2)+":"+y1(i,2)+"Z":r||n?"T"+y1(n,2)+":"+y1(r,2)+"Z":"")}function g1(r){var e=new RegExp('["'+r+"\n\r]"),f=r.charCodeAt(0);function n(r,t){var e,n=[],i=r.length,a=0,o=0,s=i<=0,l=!1;function c(){if(s)return c1;if(l)return l=!1,l1;var t,e,n=a;if(r.charCodeAt(n)===u1){for(;a++<i&&r.charCodeAt(a)!==u1||r.charCodeAt(++a)===u1;);return(t=a)>=i?s=!0:(e=r.charCodeAt(a++))===f1?l=!0:e===h1&&(l=!0,r.charCodeAt(a)===f1)&&++a,r.slice(n+1,t-1).replace(/""/g,'"')}for(;a<i;){if((e=r.charCodeAt(t=a++))===f1)l=!0;else if(e===h1)l=!0,r.charCodeAt(a)===f1&&++a;else if(e!==f)continue;return r.slice(n,t)}return s=!0,r.slice(n,i)}for(r.charCodeAt(i-1)===f1&&--i,r.charCodeAt(i-1)===h1&&--i;(e=c())!==c1;){for(var u=[];e!==l1&&e!==c1;)u.push(e),e=c();t&&null==(u=t(u,o++))||n.push(u)}return n}function i(t,n){return t.map(function(e){return n.map(function(t){return o(e[t])}).join(r)})}function a(t){return t.map(o).join(r)}function o(t){return null==t?"":t instanceof Date?v1(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,a){var o,s;return(t=n(t,function(t,e){if(o)return o(t,e-1);var n,r,i;s=t,o=a?(r=a,i=d1(n=t),function(t,e){return r(i(t),e,n)}):d1(t)})).columns=s||[],t},parseRows:n,format:function(t,e){return[(e=null==e?p1(t):e).map(o).join(r)].concat(i(t,e)).join("\n")},formatBody:function(t,e){return i(t,e=null==e?p1(t):e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}function m1(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;b1&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}const b1=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),x1=t=>{const{value:n,format:r=n.split(".").pop(),delimiter:i=",",autoType:a=!0}=t;return()=>Oe(void 0,void 0,void 0,function*(){var t,e=yield fetch(n);if("csv"===r)return t=yield e.text(),g1(i).parse(t,a?m1:Hv);if("json"===r)return yield e.json();throw new Error(`Unknown format: ${r}.`)})};x1.props={};const w1=t=>{const{fields:a,as:n=[]}=t;return t=>{if(!a||(e=a,0===Object.keys(e).length))return t;var e;const[r="key",i="value"]=n;return t.reduce((e,n)=>{for(let t=0;t<a.length;t++)e.push(Object.assign(Object.assign({},n),{[r]:a[t],[i]:n[a[t]]}));return e},[])}};w1.props={};const k1=t=>{const{callback:e=function(t){return null!=t&&!Number.isNaN(t)}}=t;return t=>t.filter(e)},E1=(k1.props={},t=>{const e=t["callback"];return t=>Array.isArray(t)?[...t].sort(e):t});function M1(t,e,n){return Math.min(n,Math.max(e,t))}E1.props={};const O1=i=>t=>{const{fields:e=[]}=i;let{start:n=0,end:r=t.length}=i;n=M1(n,0,t.length-1),r=M1(r,1,t.length),n>r&&([n,r]=[r,n]);return t.filter((t,e)=>e>=n&&e<r).map(n=>e.reduce((t,e)=>(e in n&&(t[e]=n[e]),t),{}))},S1=(O1.props={},t=>{t=t.fields;return O1({fields:t})});S1.props={};const _1=r=>t=>{return r&&0!==Object.keys(r).length?t.map(t=>Object.entries(t).reduce((t,[e,n])=>(t[r[e]||e]=n,t),{})):t};_1.props={};const A1=t=>{var r,{fields:t=[]}=t;r=!0;const e=t.map(t=>{var e,n;return Array.isArray(t)?([e,n=r]=t,[e,n]):[t,r]});return t=>{return[...t].sort((r,i)=>e.reduce((t,[e,n=!0])=>0!==t?t:n?r[e]<i[e]?-1:+(r[e]!==i[e]):r[e]>i[e]?-1:+(r[e]!==i[e]),0))}},P1=(A1.props={},t=>{const e=t["value"];return()=>e}),T1=(P1.props={},t=>{const{callback:e=Hv}=t;return t=>e(t)}),L1=(T1.props={},t=>{const{callback:e=Hv}=t;return t=>Array.isArray(t)?t.map(e):t});L1.props={};var N1=Object.freeze({__proto__:null,weight:function(t,e){return e.value-t.value},frequency:function(t,e){return e.frequency-t.frequency},id:function(t,e){return(""+t.id).localeCompare(""+e.id)},name:function(t,e){return(""+t.name).localeCompare(""+e.name)}});const C1={y:0,thickness:.05,weight:!1,marginRatio:.1,id:t=>t.id,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null};function j1(t){const{y:c,thickness:u,weight:f,marginRatio:h,id:d,source:p,target:y,sourceWeight:v,targetWeight:g,sortBy:m}=Object.assign(Object.assign({},C1),t);return function(t){var e=t.nodes.map(t=>Object.assign({},t)),t=t.edges.map(t=>Object.assign({},t));{var n=e,r=t;r.forEach(t=>{t.source=p(t),t.target=y(t),t.sourceWeight=v(t),t.targetWeight=g(t)});const i=Ly(r,t=>t.source),a=Ly(r,t=>t.target);n.forEach(t=>{t.id=d(t);var e=i.has(t.id)?i.get(t.id):[],n=a.has(t.id)?a.get(t.id):[];t.frequency=e.length+n.length,t.value=ev(e,t=>t.sourceWeight)+ev(n,t=>t.targetWeight)})}if(r=e,(n="function"==typeof m?m:N1[m])&&r.sort(n),!(n=(r=e).length))throw Uv("Invalid nodes: it's empty!");if(f){const o=h/(2*n),s=r.reduce((t,e)=>t+e.value,0);r.reduce((t,e)=>{e.weight=e.value/s,e.width=e.weight*(1-h),e.height=u;var n=o+t,r=n+e.width,i=c-u/2,a=i+u;return e.x=[n,r,r,n],e.y=[i,i,a,a],t+e.width+2*o},0)}else{const l=1/n;r.forEach((t,e)=>{t.x=(e+.5)*l,t.y=c})}return function(t,e){const r=new Map(t.map(t=>[t.id,t]));if(!f)return e.forEach(t=>{var e=p(t),n=y(t),e=r.get(e),n=r.get(n);e&&n&&(t.x=[e.x,n.x],t.y=[e.y,n.y])});e.forEach(t=>{t.x=[0,0,0,0],t.y=[c,c,c,c]});const s=Ly(e,t=>t.source),l=Ly(e,t=>t.target);t.forEach(n=>{const{width:r,value:i,id:t}=n;var e=s.get(t)||[],a=l.get(t)||[];let o=0;e.map(t=>{var e=t.sourceWeight/i*r;t.x[0]=n.x[0]+o,t.x[1]=n.x[0]+o+e,o+=e}),a.forEach(t=>{var e=t.targetWeight/i*r;t.x[3]=n.x[0]+o,t.x[2]=n.x[0]+o+e,o+=e})})}(e,t),{nodes:e,edges:t}}}const R1=e=>t=>j1(e)(t),I1=(R1.props={},Math.PI/180),F1=64,B1=2048;function D1(t){return t.text}function z1(){return"serif"}function G1(){return"normal"}function W1(t){return t.value}function V1(){return 90*~~(2*Math.random())}function Y1(){return 1}function H1(){}function q1(t,o,r,s){if(!o.sprite){var l=t.context,c=t.ratio;l.clearRect(0,0,(F1<<5)/c,B1/c);let i=0,a=0,n=0;var u,f,h,d,e=r.length;for(--s;++s<e;){o=r[s],l.save(),l.font=o.style+" "+o.weight+" "+~~((o.size+1)/c)+"px "+o.font;let t=l.measureText(o.text+"m").width*c,e=o.size<<1;if(o.rotate?(d=Math.sin(o.rotate*I1),h=Math.cos(o.rotate*I1),u=t*h,f=t*d,h=e*h,d=e*d,t=Math.max(Math.abs(u+d),Math.abs(u-d))+31>>5<<5,e=~~Math.max(Math.abs(f+h),Math.abs(f-h))):t=t+31>>5<<5,e>n&&(n=e),i+t>=F1<<5&&(i=0,a+=n,n=0),a+e>=B1)break;l.translate((i+(t>>1))/c,(a+(e>>1))/c),o.rotate&&l.rotate(o.rotate*I1),l.fillText(o.text,0,0),o.padding&&(l.lineWidth=2*o.padding,l.strokeText(o.text,0,0)),l.restore(),o.width=t,o.height=e,o.xoff=i,o.yoff=a,o.x1=t>>1,o.y1=e>>1,o.x0=-o.x1,o.y0=-o.y1,o.hasText=!0,i+=t}for(var p=l.getImageData(0,0,(F1<<5)/c,B1/c).data,y=[];0<=--s;)if((o=r[s]).hasText){var v=o.width,g=v>>5;let n=o.y1-o.y0;for(let t=0;t<n*g;t++)y[t]=0;if(null==(i=o.xoff))return;a=o.yoff;let r=0,t=-1;for(let e=0;e<n;e++){for(let t=0;t<v;t++){var m=g*e+(t>>5),b=p[(a+e)*(F1<<5)+(i+t)<<2]?1<<31-t%32:0;y[m]|=b,r|=b}r?t=e:(o.y0++,n--,e--,a++)}o.y1=o.y0+t,o.sprite=y.slice(0,(o.y1-o.y0)*g)}}}function U1(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function X1(t){var e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function K1(){return document.createElement("canvas")}function $1(t){return"function"==typeof t?t:function(){return t}}const Z1={archimedean:U1,rectangular:function(t){const n=4*t[0]/t[1];let r=0,i=0;return function(t){var e=t<0?-1:1;switch(Math.sqrt(1+4*e*t)-e&3){case 0:r+=n;break;case 1:i+=4;break;case 2:r-=n;break;default:i-=4}return[r,i]}}};function J1(){let b=[256,256],r=D1,i=z1,p=W1,y=G1,v=V1,g=Y1,x=U1,w=Math.random,m=H1,k=[],E=null,M=1/0;const O=G1,S=K1,_={};return _.start=function(){const[a,o]=b,s=((t=S()).width=t.height=1,e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2),t.width=(F1<<5)/e,t.height=B1/e,(t=t.getContext("2d")).fillStyle=t.strokeStyle="red",t.textAlign="center",{context:t,ratio:e}),l=_.board||X1((b[0]>>5)*b[1]),c=k.length,u=[],f=k.map(function(t,e,n){return t.text=r.call(this,t,e,n),t.font=i.call(this,t,e,n),t.style=O.call(this,t,e,n),t.weight=y.call(this,t,e,n),t.rotate=v.call(this,t,e,n),t.size=~~p.call(this,t,e,n),t.padding=g.call(this,t,e,n),t}).sort(function(t,e){return e.size-t.size});var t,e;let h=-1,d=_.board?[{x:0,y:0},{x:a,y:o}]:void 0;function n(){for(var t,e,n,r=Date.now();Date.now()-r<M&&++h<c;){var i=f[h];i.x=a*(w()+.5)>>1,i.y=o*(w()+.5)>>1,q1(s,i,f,h),i.hasText&&function(i,t,e){var n=t.x,r=t.y,a=Math.sqrt(b[0]*b[0]+b[1]*b[1]),o=x(b),s=w()<.5?1:-1;let l,c=-s,u,f;for(;(l=o(c+=s))&&(u=~~l[0],f=~~l[1],!(Math.min(Math.abs(u),Math.abs(f))>=a));)if(t.x=n+u,t.y=r+f,!(t.x+t.x0<0||t.y+t.y0<0||t.x+t.x1>b[0]||t.y+t.y1>b[1])&&(!e||!function(t,n,r){var i=t.sprite,a=t.width>>5,e=t.x-(a<<4),o=127&e,s=32-o,l=t.y1-t.y0;let c=(t.y+t.y0)*(r>>=5)+(e>>5),u;for(let e=0;e<l;e++){for(let t=u=0;t<=a;t++)if((u<<s|(t<a?(u=i[e*a+t])>>>o:0))&n[c+t])return 1;c+=r}}(t,i,b[0]))&&(!e||function(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0<e[1].x&&t.y+t.y1>e[0].y&&t.y+t.y0<e[1].y}(t,e))){var h=t.sprite,d=t.width>>5,p=b[0]>>5,y=t.x-(d<<4),v=127&y,g=32-v,m=t.y1-t.y0;let n,r=(t.y+t.y0)*p+(y>>5);for(let e=0;e<m;e++){for(let t=n=0;t<=d;t++)i[r+t]|=n<<g|(t<d?(n=h[e*d+t])>>>v:0);r+=p}return delete t.sprite,1}return}(l,i,d)&&(m.call(null,"word",{cloud:_,word:i}),u.push(i),d?_.hasImage||(t=d,e=i,n=void 0,n=t[0],t=t[1],e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>t.x&&(t.x=e.x+e.x1),e.y+e.y1>t.y&&(t.y=e.y+e.y1)):d=[{x:i.x+i.x0,y:i.y+i.y0},{x:i.x+i.x1,y:i.y+i.y1}],i.x-=b[0]>>1,i.y-=b[1]>>1)}_._tags=u,_._bounds=d,h>=c&&(_.stop(),m.call(null,"end",{cloud:_,words:u,bounds:d}))}return E&&clearInterval(E),E=setInterval(n,0),n(),_},_.stop=function(){return E&&(clearInterval(E),E=null),_},_.createMask=t=>{var e=document.createElement("canvas"),[n,r]=b;if(n&&r){var i=n>>5,a=X1((n>>5)*r),e=(e.width=n,e.height=r,e.getContext("2d")),o=(e.drawImage(t,0,0,t.width,t.height,0,0,n,r),e.getImageData(0,0,n,r).data);for(let e=0;e<r;e++)for(let t=0;t<n;t++){var s=i*e+(t>>5),l=e*n+t<<2,l=250<=o[l]&&250<=o[1+l]&&250<=o[2+l]?1<<31-t%32:0;a[s]|=l}_.board=a,_.hasImage=!0}},_.timeInterval=function(t){M=null==t?1/0:t},_.words=function(t){k=t},_.size=function(t=[]){b=[+t[0],+t[1]]},_.text=function(t){r=$1(t)},_.font=function(t){i=$1(t)},_.fontWeight=function(t){y=$1(t)},_.rotate=function(t){v=$1(t)},_.spiral=function(t){x=Z1[t]||t},_.fontSize=function(t){p=$1(t)},_.padding=function(t){g=$1(t)},_.random=function(t){w=$1(t)},_.on=function(t){m=$1(t)},_}const Q1={size:[500,500],fontSize:[14,28]};function tm(r){return new Promise((t,e)=>{if(r instanceof HTMLImageElement)t(r);else if("string"==typeof r){const n=new Image;n.crossOrigin="anonymous",n.src=r,n.onload=()=>t(n),void(n.onerror=()=>{console.error(`'image ${r} load failed !!!'`),e()})}else e()})}const em=h=>f=>Oe(void 0,void 0,void 0,function*(){var i,a,t=Object.assign({},Q1,h),e=J1(),e=(i=e,a=t,yield{set(t,e,n){return void 0!==a[t]&&(e=e?e.call(null,a[t]):a[t],n?n.call(null,e):"function"==typeof i[t]?i[t](e):i[t]=e),this},setAsync(e,n,r){return Oe(this,void 0,void 0,function*(){var t;return void 0!==a[e]&&(t=n?yield n.call(null,a[e]):a[e],r?r.call(null,t):"function"==typeof i[e]?i[e](t):i[e]=t),this})}}.set("fontSize",t=>{var e=f.map(t=>t.value),n=t,t=[Xy(e),qy(e)];if("function"==typeof n)return n;if(Array.isArray(n)){const[r,i]=n;if(!t)return()=>(i+r)/2;const[a,o]=t;return o===a?()=>(i+r)/2:({value:t})=>(i-r)/(o-a)*(t-a)+r}return()=>n}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").setAsync("imageMask",tm,e.createMask),e.words([...f]),e.start());const[r,o]=t.size;var t=[{x:0,y:0},{x:r,y:o}],{_bounds:e=t,_tags:t,hasImage:n}=e,t=t.map(t=>{var{x:e,y:n}=t,t=Z(t,["x","y"]);return Object.assign(Object.assign({},t),{x:e+r/2,y:n+o/2})}),[{x:e,y:s},{x:l,y:c}]=e,u={text:"",value:0,opacity:0,fontSize:0};return t.push(Object.assign(Object.assign({},u),{x:n?0:e,y:n?0:s}),Object.assign(Object.assign({},u),{x:n?r:l,y:n?o:c})),t});function nm(e){return"string"==typeof e?t=>t[e]:e}em.props={};const rm=t=>{const{join:e,on:n,select:i=[],as:a=i,unknown:o=NaN}=t;var[t,r]=n;const s=nm(r),l=nm(t),c=Ny(e,([t])=>t,t=>s(t));return t=>t.map(t=>{const r=c.get(l(t));return Object.assign(Object.assign({},t),i.reduce((t,e,n)=>(t[a[n]]=r?r[e]:o,t),{}))})};rm.props={};const im=u=>c=>Oe(void 0,void 0,void 0,function*(){var{width:t,height:e}=ng(c),{data:n,encode:r={},scale:i,style:a={},layout:o={}}=u,s=Z(u,["data","encode","scale","style","layout"]),l={size:[t,e]},t={axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size"},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]},fontSize:{type:"identity"},rotate:{type:"identity"}},style:{textAlign:"center"}},e=function(t,e){const{text:n="text",value:r="value"}=e;return t.map(t=>Object.assign(Object.assign({},t),{text:t[n],value:t[r]}))}(n,r),n=yield em(Object.assign(Object.assign({},l),o))(e);return[R({},t,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a},s),{axis:!1}))]}),am=(im.props={composite:!0},()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"]),om=(am.props={},()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"]),sm=(om.props={},()=>["#95F0FF","#78D3F8","#5AB8DB","#3A9DBF","#0A82A4","#00698A","#005170","#003958","#002440"]),lm=(sm.props={},()=>["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"]),cm=(lm.props={},()=>["#9DF5CA","#61DDAA","#42C090","#19A576","#008A5D","#006F45","#00562F","#003E19","#002800"]),um=(cm.props={},()=>["#8CF4F2","#6FD8D6","#52BCBA","#31A09F","#008685","#006C6C","#005354","#003B3D","#002627"]),fm=(um.props={},()=>["#D0E4FF","#B4C8ED","#99ADD1","#7E92B5","#65789B","#4C6080","#334867","#1B324F","#021D38"]),hm=(fm.props={},()=>["#FFC771","#FFAB57","#F6903D","#D77622","#B85C00","#9B4300","#7D2A00","#601000","#450000"]),dm=(hm.props={},()=>["#FFC2EC","#FFA6D0","#F08BB4","#D37099","#B65680","#9A3C67","#7E214F","#630038","#490022"]),pm=(dm.props={},()=>["#FFBB95","#FF9E7B","#FF8362","#E8684A","#C84D32","#AA311C","#8C1104","#6F0000","#510000"]),ym=(pm.props={},()=>["#FFD83B","#F6BD16","#D7A100","#B98700","#9C6E00","#7F5600","#633F00","#482900","#2F1400"]),vm=(ym.props={},()=>["#FFCCFF","#EBB0FF","#CE95F5","#B27AD8","#9661BC","#7B48A1","#613086","#48186C","#2E0054"]),gm=(vm.props={},()=>["#FDEDBE","#FFDF80","#FFCB33","#FFB200","#FF8C00","#FF6500","#E6450F","#B22C00","#661900"]),mm=(gm.props={},()=>["#FFEBB0","#FFDF80","#FACA3E","#E6B80B","#B5AC23","#6A9A48","#20876B","#06746B","#044E48"]),bm=(mm.props={},()=>["#FFEBB0","#FFDF80","#FACA3E","#E6B80B","#B5AC23","#6A9A48","#20876B","#06746B","#044E48"]),xm=(bm.props={},()=>["#D2EDC8","#A9DACC","#75C6D1","#42B3D5","#3993C2","#3073AE","#27539B","#1E3388","#171E6D"]),wm=(xm.props={},()=>["#003F7F","#004C99","#0059B2","#0072E5","#1A8CFF","#4DA6FF","#80BFFF","#B3D9FF","#EAE9EB","#FFD5B1","#FFC08C","#FFAB66","#FF963E","#F17F0B","#D16A0C","#A45411","#794012"]),km=(wm.props={},()=>["#661900","#B22C00","#E6450F","#FF6500","#FF8C00","#FFB200","#FFCB33","#FFDF80","#E0F2EB","#66D8FF","#1AC5FF","#007FFF","#0059FF","#0040FF","#002CB2","#FFDF80","#001F7F"]),Em=(km.props={},()=>["#014c63","#10686c","#168575","#16a37e","#0bc286","#65cf9b","#96dcb0","#c1e8c5","#F2EAEA","#FFC5AC","#FFA884","#FF895D","#FF6836","#F3470D","#D13808","#A4300C","#7A270E"]),Mm=(Em.props={},()=>["#661900","#B22C00","#E6450F","#FF6500","#FF8C00","#FFB200","#FFCB33","#FFDF80","#FFE2DC","#EAACFF","#DD78FF","#C53FFF","#A700FF","#8500FF","#620BE1","#3607C2","#27029A"]);function Om(t,...e){return e.reduce((e,n)=>t=>e(n(t)),t)}function Sm(e,n){return n-e?t=>(t-e)/(n-e):t=>.5}function _m(t,e,n,r,i){let a=n||0,o=r||t.length;for(var s=i||(t=>t);a<o;){var l=Math.floor((a+o)/2);s(t[l])>e?o=l:a=l+1}return a}Mm.props={};const Am=Math.sqrt(50),Pm=Math.sqrt(10),Tm=Math.sqrt(2);function Lm(t,e,n){e=(e-t)/Math.max(0,n),t=Math.floor(Math.log(e)/Math.LN10),n=e/10**t;return 0<=t?(n>=Am?10:n>=Pm?5:n>=Tm?2:1)*10**t:-(10**-t)/(n>=Am?10:n>=Pm?5:n>=Tm?2:1)}function Nm(t,e,n){n=Math.abs(e-t)/Math.max(0,n);let r=10**Math.floor(Math.log(n)/Math.LN10);n/=r;return n>=Am?r*=10:n>=Pm?r*=5:n>=Tm&&(r*=2),e<t?-r:r}const Cm=(t,e,n=5)=>{t=[t,e];let r=0,i=t.length-1,a=t[r],o=t[i],s;return o<a&&([a,o]=[o,a],[r,i]=[i,r]),0<(s=Lm(a,o,n))?(a=Math.floor(a/s)*s,o=Math.ceil(o/s)*s,s=Lm(a,o,n)):s<0&&(a=Math.ceil(a*s)/s,o=Math.floor(o*s)/s,s=Lm(a,o,n)),0<s?(t[r]=Math.floor(a/s)*s,t[i]=Math.ceil(o/s)*s):s<0&&(t[r]=Math.ceil(a*s)/s,t[i]=Math.floor(o*s)/s),t},jm=36e5,Rm=864e5,Im=7*Rm;Rm,Rm;function Fm(t,n,s,r){const i=(t,e)=>{let n=e;for(;n&&r(t)%e!=0;)s(t,-1),--n;return t},l=(t,e)=>{e&&i(t,e),n(t)};const c=(t,e)=>{t=new Date(+t-1);return l(t,e),s(t,e),l(t),t};return{ceil:c,floor:(t,e)=>{t=new Date(+t);return l(t,e),t},range:(t,e,n,r)=>{for(var i=[],a=Math.floor(n),o=r?c(t,n):c(t);+o<+e;s(o,a),l(o))i.push(new Date(+o));return i},duration:t}}Ec=Fm(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),xo=Fm(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),wo=Fm(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),ko=Fm(jm,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+jm*e)},t=>t.getHours()),Oo=Fm(Rm,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Rm*e)},t=>t.getDate()-1);const Bm=Fm(2592e6,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth());So=Fm(Im,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Im*e)},t=>{var e=Bm.floor(t),t=new Date(+t);return Math.floor((+t-+e)/Im)}),_o=Fm(31536e6,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getFullYear();t.setFullYear(n+e)},t=>t.getFullYear());const Dm={millisecond:Ec,second:xo,minute:wo,hour:ko,day:Oo,week:So,month:Bm,year:_o};Ao=Fm(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),Po=Fm(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),To=Fm(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),Lo=Fm(jm,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+jm*e)},t=>t.getUTCHours()),No=Fm(Rm,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Rm*e)},t=>t.getUTCDate()-1);const zm=Fm(2592e6,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth());a=Fm(Im,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Im*e)},t=>{var e=zm.floor(t),t=new Date(+t);return Math.floor((+t-+e)/Im)}),Co=Fm(31536e6,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCFullYear();t.setUTCFullYear(n+e)},t=>t.getUTCFullYear());const Gm={millisecond:Ao,second:Po,minute:To,hour:Lo,day:No,week:a,month:zm,year:Co};function Wm(t,e,n,r,i){var t=+t,e=+e,{tickIntervals:i,year:a,millisecond:o}=function(t){var{year:t,month:e,week:n,day:r,hour:i,minute:a,second:o,millisecond:s}=t?Gm:Dm;return{tickIntervals:[[o,1],[o,5],[o,15],[o,30],[a,1],[a,5],[a,15],[a,30],[i,1],[i,3],[i,6],[i,12],[r,1],[r,2],[n,1],[e,1],[e,3],[t,1]],year:t,millisecond:s}}(i),s=([t,e])=>t.duration*e,n=r?(e-t)/r:n||5,l=r||(e-t)/n,c=i.length,u=_m(i,l,0,c,s);let f;return f=u===c?[a,Nm(t/a.duration,e/a.duration,n)]:u?([c,a]=l/s(i[u-1])<s(i[u])/l?i[u-1]:i[u],[c,r?Math.ceil(r/c.duration):a]):[o,Math.max(Nm(t,e,n),1)]}const Vm=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=Wm(o,t,n,r,i),r=[e.floor(o,n),e.ceil(t,n)];return a?r.reverse():r};function Ym(t){return null!=t&&!Number.isNaN(t)}const Hm=e=>t=>-e(-t),qm=(t,e)=>{const n=Math.log(t);t=t===Math.E?Math.log:t=>Math.log(t)/n;return e?Hm(t):t},Um=(e,t)=>{var n=e===Math.E?Math.exp:t=>e**t;return t?Hm(n):n},Xm=(t,e,n,r)=>{var i=t<0,a=qm(r,i),r=Um(r,i),i=e<t,o=i?t:e,e=[r(Math.floor(a(i?e:t))),r(Math.ceil(a(o)))];return i?e.reverse():e};function Km(e,o){return t=>{t.prototype.rescale=function(){this.initRange(),this.nice();var[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},t.prototype.initRange=function(){var t=this.options["interpolator"];this.options.range=e(t)},t.prototype.composeOutput=function(t,e){var n,{domain:r,interpolator:i,round:a}=this.getOptions(),r=o(r.map(t)),a=a?(n=i,t=>{t=n(t);return Sp(t)?Math.round(t):t}):i;this.output=Om(a,r,e,t)},t.prototype.invert=void 0}}var $m,Eo={exports:{}},xc={exports:{}},Zm=function(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||0<=t.length&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))},Jm=Array.prototype.concat,Qm=Array.prototype.slice,tb=xc.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];Zm(i)?e=Jm.call(e,Qm.call(i)):e.push(i)}return e},eb=(tb.wrap=function(t){return function(){return t(tb(arguments))}},{aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),nb=xc.exports,rb=Object.hasOwnProperty,ib=Object.create(null);for($m in eb)rb.call(eb,$m)&&(ib[eb[$m]]=$m);var ab=Eo.exports={to:{},get:{}};function ob(t,e,n){return Math.min(Math.max(e,t),n)}function sb(t){t=Math.round(t).toString(16).toUpperCase();return t.length<2?"0"+t:t}ab.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=ab.get.hsl(t),n="hsl";break;case"hwb":e=ab.get.hwb(t),n="hwb";break;default:e=ab.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},ab.get.rgb=function(t){if(!t)return null;var e,n,r,i=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(r=e[2],e=e[1],n=0;n<3;n++){var a=2*n;i[n]=parseInt(e.slice(a,2+a),16)}r&&(i[3]=parseInt(r,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(r=(e=e[1])[3],n=0;n<3;n++)i[n]=parseInt(e[n]+e[n],16);r&&(i[3]=parseInt(r+r,16)/255)}else{if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/))for(n=0;n<3;n++)i[n]=parseInt(e[n+1],0);else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:rb.call(eb,e[1])?((i=eb[e[1]])[3]=1,i):null:null;for(n=0;n<3;n++)i[n]=Math.round(2.55*parseFloat(e[n+1]))}e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}for(n=0;n<3;n++)i[n]=ob(i[n],0,255);return i[3]=ob(i[3],0,1),i},ab.get.hsl=function(t){var e;return(t=t&&t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,ob(parseFloat(t[2]),0,100),ob(parseFloat(t[3]),0,100),ob(isNaN(e)?1:e,0,1)]):null},ab.get.hwb=function(t){var e;return(t=t&&t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,ob(parseFloat(t[2]),0,100),ob(parseFloat(t[3]),0,100),ob(isNaN(e)?1:e,0,1)]):null},ab.to.hex=function(){var t=nb(arguments);return"#"+sb(t[0])+sb(t[1])+sb(t[2])+(t[3]<1?sb(Math.round(255*t[3])):"")},ab.to.rgb=function(){var t=nb(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},ab.to.rgb.percent=function(){var t=nb(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"},ab.to.hsl=function(){var t=nb(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},ab.to.hwb=function(){var t=nb(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},ab.to.keyword=function(t){return ib[t.slice(0,3)]};var lb=Eo.exports;function cb(t,e,n){let r=n;return r<0&&(r+=1),1<r&&--r,r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function ub(t){var e,n,r,t=lb.get(t);return t?({model:t,value:e}=t,"rgb"===t?e:"hsl"===t?(e=(t=e)[0]/360,n=t[1]/100,r=t[2]/100,t=t[3],0==n?[255*r,255*r,255*r,t]:[255*cb(n=2*r-(r=r<.5?r*(1+n):r+n-r*n),r,e+1/3),255*cb(n,r,e),255*cb(n,r,e-1/3),t]):null):null}const fb=(e,n)=>t=>e*(1-t)+n*t,hb=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return fb(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{var n=t,r=e;const l=ub(n),c=ub(r);return null===l||null===c?l?()=>n:()=>r:e=>{var n=new Array(4);for(let t=0;t<4;t+=1){var r=l[t],i=c[t];n[t]=r*(1-e)+i*e}var[t,a,o,s]=n;return`rgba(${Math.round(t)}, ${Math.round(a)}, ${Math.round(o)}, ${s})`}}},db=(t,e)=>{const n=fb(t,e);return t=>Math.round(n(t))};function pb({map:t,initKey:e},n){e=e(n);return t.has(e)?t.get(e):n}function yb(t){return"object"==typeof t?t.valueOf():t}class vb extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=yb,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(pb({map:this.map,initKey:this.initKey},t))}has(t){return super.has(pb({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(([{map:t,initKey:n},r]=[{map:this.map,initKey:this.initKey},t],n=n(r),t.has(n)?t.get(n):(t.set(n,r),r)),e);var n,r}delete(t){return super.delete(([{map:t,initKey:e},n]=[{map:this.map,initKey:this.initKey},t],e=e(n),t.has(e)&&(n=t.get(e),t.delete(e)),n));var e,n}}class gb{constructor(t){this.options=R({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=R({},this.options,t),this.rescale(t)}rescale(t){}}const mb=Symbol("defaultUnknown");function bb(e,n,r){for(let t=0;t<n.length;t+=1)e.has(n[t])||e.set(r(n[t]),t)}function xb(t){var{value:t,from:e,to:n,mapper:r,notFoundReturn:i}=t;let a=r.get(t);if(void 0===a){if(i!==mb)return i;a=e.push(t)-1,r.set(t,a)}return n[a%n.length]}function wb(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class kb extends gb{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[],unknown:mb}}map(t){return 0===this.domainIndexMap.size&&bb(this.domainIndexMap,this.getDomain(),this.domainKey),xb({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&bb(this.rangeIndexMap,this.getRange(),this.rangeKey),xb({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){var[e]=this.options.domain,[n]=this.options.range;this.domainKey=wb(e),this.rangeKey=wb(n),this.rangeIndexMap?(t&&!t.range||this.rangeIndexMap.clear(),t&&!t.domain&&!t.compare||(this.domainIndexMap.clear(),this.sortedDomain=void 0)):(this.rangeIndexMap=new Map,this.domainIndexMap=new Map)}clone(){return new kb(this.options)}getRange(){return this.options.range}getDomain(){var t,e;return this.sortedDomain||({domain:t,compare:e}=this.options,this.sortedDomain=e?[...t].sort(e):t),this.sortedDomain}}function Eb(t){const{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=t;var l=e.length,c=0<(c=(t=l)-(u=a).length)?[...u,...new Array(c).fill(1)]:c<0?u.slice(0,t):u,[t,u]=n,u=u-t,f=u/(2/l*r+1-1/l*i);const h=f*i/l;f-=l*h;const d=function(t){const e=Math.min(...t);return t.map(t=>t/e)}(c),p=f/d.reduce((t,e)=>t+e);var c=new vb(e.map((t,e)=>{e=d[e]*p;return[t,o?Math.floor(e):e]})),y=new vb(e.map((t,e)=>{e=d[e]*p+h;return[t,o?Math.floor(e):e]})),f=Array.from(y.values()).reduce((t,e)=>t+e),t=t+(u-(f-f/l*i))*s;let v=o?Math.round(t):t;var g=new Array(l);for(let t=0;t<l;t+=1){g[t]=(m=v,Math.round(1e12*m)/1e12);var m=e[t];v+=y.get(m)}return{valueBandWidth:c,valueStep:y,adjustedRange:g}}class Mb extends kb{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:mb,flex:[]}}clone(){return new Mb(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(){var{padding:t,paddingInner:e}=this.options;return 0<t?t:e}getPaddingOuter(){var{padding:t,paddingOuter:e}=this.options;return 0<t?t:e}rescale(){super.rescale();var{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:t,valueBandWidth:n,valueStep:r}=function(t){var e=t["domain"];if(0===(e=e.length))return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!(null==(n=t.flex)||!n.length))return Eb(t);var{range:n,paddingOuter:t,paddingInner:r,round:i,align:a}=t;let o,s,l=n[0];return n=n[1]-l,o=n/Math.max(1,2*t+(e-r)),i&&(o=Math.floor(o)),l+=(n-o*(e-r))*a,s=o*(1-r),i&&(l=Math.round(l),s=Math.round(s)),t=new Array(e).fill(0).map((t,e)=>l+e*o),{valueStep:o,valueBandWidth:s,adjustedRange:t}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=r,this.valueBandWidth=n,this.adjustedRange=t}}const Ob=(t,e,n)=>{let r,i,a=t,o=e;if(a===o&&0<n)return[a];let s=Lm(a,o,n);if(0===s||!Number.isFinite(s))return[];if(0<s){a=Math.ceil(a/s),o=Math.floor(o/s),i=new Array(r=Math.ceil(o-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)*s}else{s=-s,a=Math.ceil(a*s),o=Math.floor(o*s),i=new Array(r=Math.ceil(o-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)/s}return i};function Sb(t){return Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}const _b=[1,5,2,2.5,4,3],Ab=100*Number.EPSILON;const Pb=(n,r,t=5,i=!0,a=_b,o=[.25,.2,.5,.05])=>{var s=t<0?0:Math.round(t);if(Number.isNaN(n)||Number.isNaN(r)||"number"!=typeof n||"number"!=typeof r||!s)return[];if(r-n<1e-15||1===s)return[n];var l,c,u,f,h,d,p,y={score:-2,lmin:0,lmax:0,lstep:0};let v=1;for(;v<1/0;){for(let t=0;t<a.length;t+=1){var g=a[t],m=(f=g,h=a,d=v,p=void 0,p=zp(h),1-Rp(h,f)/(p-1)-d+1);if(o[0]*m+o[1]+o[2]+o[3]<y.score){v=1/0;break}let e=2;for(;e<1/0;){x=e;var b=(u=s)<=x?2-(x-1)/(u-1):1;if(o[0]*m+o[1]+o[2]*b+o[3]<y.score)break;var x=(r-n)/(e+1)/v/g;let t=Math.ceil(Math.log10(x));for(;t<1/0;){var w=v*g*10**t,k=(M=r,k=w*(e-1),(M-=n)<k?1-((k-M)/2)**2/(.1*M)**2:1);if(o[0]*m+o[1]*k+o[2]*b+o[3]<y.score)break;var E=Math.floor(r/w)*v-(e-1)*v,M=Math.ceil(n/w)*v;if(E<=M){var O=M-E;for(let t=0;t<=O;t+=1){var S=(E+t)*(w/v),_=S+w*(e-1),A=w,P=function(t,e,n,r,i,a){var o=zp(e),e=Rp(e,t);let s=0;return t=(r%a+a)%a,1-e/(o-1)-n+(s=(t<Ab||a-t<Ab)&&r<=0&&0<=i?1:s)}(g,a,v,S,_,A),T=1-.5*((r-_)**2+(n-S)**2)/(.1*(r-n))**2,L=(l=e,L=n,l=(l-1)/(_-(N=S)),c=((c=s)-1)/(Math.max(_,r)-Math.min(L,N)),2-Math.max(l/c,c/l)),N=o[0]*P+o[1]*T+o[2]*L+ +o[3];y.score<N&&(!i||S<=n&&r<=_)&&(y.lmin=S,y.lmax=_,y.lstep=A,y.score=N)}}t+=1}e+=1}}v+=1}var t=Sb(y.lmax),e=Sb(y.lmin),C=Sb(y.lstep),j=Math.floor((t=(t-e)/C,Math.round(1e12*t)/1e12))+1,R=new Array(j);R[0]=Sb(e);for(let t=1;t<j;t+=1)R[t]=Sb(R[t-1]+C);return R};class Tb extends gb{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:Pb}}map(t){return Ym(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new Tb(this.options)}getTicks(){var{domain:t,tickCount:e,tickMethod:n}=this.options,[t,r]=t;return Sp(t)&&Sp(r)?n(t,r,e):[]}}const Lb=(t,e,n)=>{var[t,r]=t,[e,i]=e;let a,o;return Om(o=t<r?(a=Sm(t,r),n(e,i)):(a=Sm(r,t),n(i,e)),a)},Nb=(r,t,e)=>{const i=Math.min(r.length,t.length)-1,a=new Array(i),o=new Array(i);var n=r[0]>r[i],s=n?[...r].reverse():r,l=n?[...t].reverse():t;for(let t=0;t<i;t+=1)a[t]=Sm(s[t],s[t+1]),o[t]=e(l[t],l[t+1]);return t=>{var e=_m(r,t,1,i)-1,n=a[e];return Om(o[e],n)(t)}},Cb=(t,e,n,r)=>{return(2<Math.min(t.length,e.length)?Nb:Lb)(t,e,r?db:n)};class jb extends gb{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:fb,tickCount:5}}map(t){return Ym(t)?this.output(t):this.options.unknown}invert(t){return Ym(t)?this.input(t):this.options.unknown}nice(){var t,e,n,r;this.options.nice&&([t,e,n,...r]=this.getTickMethodOptions(),this.options.domain=this.chooseNice()(t,e,n,...r))}getTicks(){var t=this.options["tickMethod"],[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return Cm}rescale(){this.nice();var[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){var{clamp:e,range:n}=this.options,t=this.options.domain.map(t),n=Math.min(t.length,n.length);if(e){e=t[0],t=t[n-1];const r=t<e?t:e,i=t<e?e:t;return t=>Math.min(Math.max(r,t),i)}return Fp}composeOutput(t,e){var{domain:n,range:r,round:i,interpolate:a}=this.options,n=Cb(n.map(t),r,a,i);this.output=Om(n,e,t)}composeInput(t,e,n){var{domain:r,range:i}=this.options,i=Cb(i,r.map(t),fb);this.input=Om(e,n,i)}}class Rb extends jb{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:hb,tickMethod:Ob,tickCount:5}}chooseTransforms(){return[Fp,Fp]}clone(){return new Rb(this.options)}}class Ib extends Mb{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:mb,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new Ib(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}const Fb=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class Bb extends jb{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:hb,tickMethod:Ob,tickCount:5}}constructor(t){super(t)}chooseTransforms(){var t,e,n,r=this.options["exponent"];return 1===r?[Fp,Fp]:(t=.5===r?Fb:(e=r,t=>t<0?-((-t)**e):t**e),n=r,[t,t=>t<0?-((-t)**(1/n)):t**(1/n)])}clone(){return new Bb(this.options)}}class Db extends Bb{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:hb,tickMethod:Ob,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new Db(this.options)}}class zb extends gb{constructor(t){super(t)}getDefaultOptions(){return{domain:[.5],range:[0,1]}}map(t){return Ym(t)?(t=_m(this.thresholds,t,0,this.n),this.options.range[t]):this.options.unknown}invert(t){var e=this.options["range"],e=e.indexOf(t),t=this.thresholds;return[t[e-1],t[e]]}clone(){return new zb(this.options)}rescale(){var{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}const Gb=(t,e,n,r=10)=>{var i=t<0,a=Um(r,i),o=qm(r,i),s=e<t,l=s?e:t,c=s?t:e;let u=o(l),f=o(c),h=[];if(!(r%1)&&f-u<n){if(u=Math.floor(u),f=Math.ceil(f),i)for(;u<=f;u+=1){var d=a(u);for(let t=r-1;1<=t;--t){var p=d*t;if(c<p)break;l<=p&&h.push(p)}}else for(;u<=f;u+=1){var y=a(u);for(let t=1;t<r;t+=1){var v=y*t;if(c<v)break;l<=v&&h.push(v)}}2*h.length<n&&(h=Ob(l,c,n))}else h=Ob(u,f,Math.min(f-u,n)).map(a);return s?h.reverse():h};class Wb extends jb{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:hb,tickMethod:Gb,tickCount:5}}chooseNice(){return Xm}getTickMethodOptions(){var{domain:t,tickCount:e,base:n}=this.options;return[t[0],t[t.length-1],e,n]}chooseTransforms(){var{base:t,domain:e}=this.options,e=e[0]<0;return[qm(t,e),Um(t,e)]}clone(){return new Wb(this.options)}}class Vb extends zb{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:Pb}}constructor(t){super(t)}nice(){var t,e,n=this.options["nice"];n&&([n,t,e]=this.getTickMethodOptions(),this.options.domain=Cm(n,t,e))}getTicks(){var t=this.options["tickMethod"],[e,n,r]=this.getTickMethodOptions();return t(e,n,r)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}rescale(){this.nice();var{range:t,domain:e}=this.options,[n,r]=e;this.n=t.length-1,this.thresholds=new 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){var[t,e]=super.invert(t),[n,r]=this.options.domain;return void 0===t&&void 0===e?[t,e]:[t||n,e||r]}getThresholds(){return this.thresholds}clone(){return new Vb(this.options)}}function Yb(t,e,n=!1){var r=t,i=(n||r.sort((t,e)=>t-e),[]);for(let t=1;t<e;t+=1)i.push(function(t,e){var n,r=t.length;if(r)return r<2?t[r-1]:(r=(r-1)*e,(n=t[e=Math.floor(r)])+(t[e+1]-n)*(r-e))}(r,t/e));return i}class Hb extends zb{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:Pb}}constructor(t){super(t)}rescale(){var{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=Yb(t,this.n+1,!1)}invert(t){var[t,e]=super.invert(t),n=this.options["domain"],r=n[0],n=n[n.length-1];return void 0===t&&void 0===e?[t,e]:[t||r,e||n]}getThresholds(){return this.thresholds}clone(){return new Hb(this.options)}getTicks(){var{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1;return n(e[0],e[r],t)}}var qb=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Ub=/\[([^]*?)\]/gm;function Xb(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}function Kb(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,i=e;r<i.length;r++){var a,o=i[r];for(a in o)t[a]=o[a]}return t}function $b(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t}var Zb,Sc=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],as=["January","February","March","April","May","June","July","August","September","October","November","December"],Pc=Xb(as,3),Jb=Kb({},{dayNamesShort:Xb(Sc,3),dayNames:Sc,monthNamesShort:Pc,monthNames:as,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10?1:0)*t%10]}}),Qb={D:function(t){return String(t.getDate())},DD:function(t){return $b(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return $b(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 $b(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 $b(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return $b(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return $b(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return $b(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return $b(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return $b(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return $b(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return $b(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return(t.getHours()<12?e.amPm[0]:e.amPm[1]).toUpperCase()},ZZ:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+$b(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+$b(Math.floor(Math.abs(t)/60),2)+":"+$b(Math.abs(t)%60,2)}},t2={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"};const e2=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=Wm(o,t,n,r,i),r=e.range(o,new Date(+t+1),n,!0);return a?r.reverse():r};function n2(t){var e=t.getTimezoneOffset(),t=new Date(t);return t.setMinutes(t.getMinutes()+e,t.getSeconds(),t.getMilliseconds()),t}class r2 extends jb{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:e2,interpolate:fb,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return Vm}getTickMethodOptions(){var{domain:t,tickCount:e,tickInterval:n,utc:r}=this.options;return[t[0],t[t.length-1],e,n,r]}getFormatter(){const{mask:a,utc:t}=this.options,o=t?Gm:Dm,s=t?n2:Fp;return t=>{var e=s(t),t=a||function(t,e){var{second:e,minute:n,hour:r,day:i,week:a,month:o,year:s}=e;return e.floor(t)<t?".SSS":n.floor(t)<t?":ss":r.floor(t)<t?"hh:mm":i.floor(t)<t?"hh A":o.floor(t)<t?a.floor(t)<t?"MMM DD":"ddd DD":s.floor(t)<t?"MMMM":"YYYY"}(t,o),n=void 0;if(void 0===t&&(t=t2.default),void 0===n&&(n={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");var r=[],i=(t=(t=t2[t]||t).replace(Ub,function(t,e){return r.push(e),"@@@"}),Kb(Kb({},Jb),n));return(t=t.replace(qb,function(t){return Qb[t](e,i)})).replace(/@@@/g,function(){return r.shift()})}}clone(){return new r2(this.options)}}var i2;let a2=Zb=class extends Rb{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:Fp,tickMethod:Ob,tickCount:5}}constructor(t){super(t)}clone(){return new Zb(this.options)}};a2=Zb=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}([Km(function(t){return[t(0),t(1)]},t=>{var[t,e]=t;return Om(fb(0,1),Sm(t,e))})],a2);let o2=i2=class extends Rb{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:Fp,tickMethod:Ob,tickCount:5}}constructor(t){super(t)}clone(){return new i2(this.options)}};o2=i2=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}([Km(function(t){return[t(0),t(.5),t(1)]},t=>{const[e,n,r]=t,i=Om(fb(0,.5),Sm(e,n)),a=Om(fb(.5,1),Sm(n,r));return t=>(e>r?t<n?a:i:t<n?i:a)(t)})],o2);const s2=t=>new Mb(t),l2=(s2.props={},t=>new Rb(t)),c2=(l2.props={},t=>new kb(t)),u2=(c2.props={},t=>new Tb(t)),f2=(u2.props={},t=>new Ib(t)),h2=(f2.props={},t=>new r2(t)),d2=(h2.props={},t=>new Wb(t)),p2=(d2.props={},t=>new Bb(t)),y2=(p2.props={},t=>new zb(t)),v2=(y2.props={},t=>new Hb(t)),g2=(v2.props={},t=>new Vb(t)),m2=(g2.props={},t=>new Db(t)),b2=(m2.props={},t=>new a2(t)),x2=(b2.props={},Math.PI),w2=2*x2,k2=1e-6,E2=w2-k2;function M2(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function O2(){return new M2}function S2(t){return function(){return t}}M2.prototype=O2.prototype={constructor:M2,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){var a,o,s=this._x1,l=this._y1,c=(n=+n)-(t=+t),u=(r=+r)-(e=+e),f=s-t,h=l-e,d=f*f+h*h;if((i=+i)<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+(this._x1=t)+","+(this._y1=e):d>k2&&(Math.abs(h*c-u*f)>k2&&i?(o=c*c+u*u,r=(n=n-s)*n+(s=r-l)*s,l=Math.sqrt(o),a=Math.sqrt(d),d=(o=i*Math.tan((x2-Math.acos((o+d-r)/(2*l*a)))/2))/a,r=o/l,Math.abs(d-1)>k2&&(this._+="L"+(t+d*f)+","+(e+d*h)),this._+="A"+i+","+i+",0,0,"+ +(f*s<h*n)+","+(this._x1=t+r*c)+","+(this._y1=e+r*u)):this._+="L"+(this._x1=t)+","+(this._y1=e))},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=t+o,c=e+s,u=1^a,a=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>k2||Math.abs(this._y1-c)>k2)&&(this._+="L"+l+","+c),n&&((a=a<0?a%w2+w2:a)>E2?this._+="A"+n+","+n+",0,1,"+u+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):a>k2&&(this._+="A"+n+","+n+",0,"+ +(a>=x2)+","+u+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const _2=Math.abs,A2=Math.atan2,P2=Math.cos,T2=Math.max,L2=Math.min,N2=Math.sin,C2=Math.sqrt,j2=1e-12,R2=Math.PI,I2=R2/2,F2=2*R2;function B2(t){return 1<=t?I2:t<=-1?-I2:Math.asin(t)}function D2(t){return t.innerRadius}function z2(t){return t.outerRadius}function G2(t){return t.startAngle}function W2(t){return t.endAngle}function V2(t){return t&&t.padAngle}function Y2(t,e,n,r,i,a,o){var s=t-n,l=e-r,o=(o?a:-a)/C2(s*s+l*l),l=o*l,o=-o*s,s=t+l,t=e+o,e=n+l,n=r+o,r=(s+e)/2,c=(t+n)/2,u=e-s,f=n-t,h=u*u+f*f,a=i-a,s=s*n-e*t,n=(f<0?-1:1)*C2(T2(0,a*a*h-s*s)),e=(s*f-u*n)/h,t=(-s*u-f*n)/h,d=(s*f+u*n)/h,s=(-s*u+f*n)/h,u=e-r,f=t-c,n=d-r,h=s-c;return n*n+h*h<u*u+f*f&&(e=d,t=s),{cx:e,cy:t,x01:-l,y01:-o,x11:e*(i/a-1),y11:t*(i/a-1)}}function H2(){var A=D2,P=z2,T=S2(0),L=null,N=G2,C=W2,j=V2,R=null;function e(){var t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,y,v,g,m,b,x,w,k=+A.apply(this,arguments),E=+P.apply(this,arguments),M=N.apply(this,arguments)-I2,O=C.apply(this,arguments)-I2,S=_2(O-M),_=M<O;if(R=R||(t=O2()),E<k&&(e=E,E=k,k=e),E>j2?S>F2-j2?(R.moveTo(E*P2(M),E*N2(M)),R.arc(0,0,E,M,O,!_),k>j2&&(R.moveTo(k*P2(O),k*N2(O)),R.arc(0,0,k,O,M,_))):(r=e=M,i=n=O,o=a=S,h=(u=j.apply(this,arguments)/2)>j2&&(L?+L.apply(this,arguments):C2(k*k+E*E)),w=x=s=L2(_2(E-k)/2,+T.apply(this,arguments)),h>j2&&(f=B2(h/k*N2(u)),h=B2(h/E*N2(u)),(a-=2*f)>j2?(r+=f*=_?1:-1,i-=f):(a=0,r=i=(M+O)/2),(o-=2*h)>j2?(e+=h*=_?1:-1,n-=h):(o=0,e=n=(M+O)/2)),u=E*P2(e),f=E*N2(e),h=k*P2(i),M=k*N2(i),s>j2&&(d=E*P2(n),p=E*N2(n),y=k*P2(r),v=k*N2(r),S<R2)&&(O=function(t,e,n,r,i,a,o,s){var l=(s=s-a)*(n=n-t)-(o=o-i)*(r=r-e);if(!(l*l<j2))return[t+(l=(o*(e-a)-s*(t-i))/l)*n,e+l*r]}(u,f,y,v,d,p,h,M))&&(S=u-O[0],m=f-O[1],b=d-O[0],g=p-O[1],m=1/N2((1<(S=(S*b+m*g)/(C2(S*S+m*m)*C2(b*b+g*g)))?0:S<-1?R2:Math.acos(S))/2),b=C2(O[0]*O[0]+O[1]*O[1]),x=L2(s,(k-b)/(m-1)),w=L2(s,(E-b)/(1+m))),o>j2?w>j2?(l=Y2(y,v,u,f,E,w,_),c=Y2(d,p,h,M,E,w,_),R.moveTo(l.cx+l.x01,l.cy+l.y01),w<s?R.arc(l.cx,l.cy,w,A2(l.y01,l.x01),A2(c.y01,c.x01),!_):(R.arc(l.cx,l.cy,w,A2(l.y01,l.x01),A2(l.y11,l.x11),!_),R.arc(0,0,E,A2(l.cy+l.y11,l.cx+l.x11),A2(c.cy+c.y11,c.cx+c.x11),!_),R.arc(c.cx,c.cy,w,A2(c.y11,c.x11),A2(c.y01,c.x01),!_))):(R.moveTo(u,f),R.arc(0,0,E,e,n,!_)):R.moveTo(u,f),k>j2&&a>j2?x>j2?(l=Y2(h,M,d,p,k,-x,_),c=Y2(u,f,y,v,k,-x,_),R.lineTo(l.cx+l.x01,l.cy+l.y01),x<s?R.arc(l.cx,l.cy,x,A2(l.y01,l.x01),A2(c.y01,c.x01),!_):(R.arc(l.cx,l.cy,x,A2(l.y01,l.x01),A2(l.y11,l.x11),!_),R.arc(0,0,k,A2(l.cy+l.y11,l.cx+l.x11),A2(c.cy+c.y11,c.cx+c.x11),_),R.arc(c.cx,c.cy,x,A2(c.y11,c.x11),A2(c.y01,c.x01),!_))):R.arc(0,0,k,i,r,_):R.lineTo(h,M)):R.moveTo(0,0),R.closePath(),t)return R=null,t+""||null}return e.centroid=function(){var t=(+A.apply(this,arguments)+ +P.apply(this,arguments))/2,e=(+N.apply(this,arguments)+ +C.apply(this,arguments))/2-R2/2;return[P2(e)*t,N2(e)*t]},e.innerRadius=function(t){return arguments.length?(A="function"==typeof t?t:S2(+t),e):A},e.outerRadius=function(t){return arguments.length?(P="function"==typeof t?t:S2(+t),e):P},e.cornerRadius=function(t){return arguments.length?(T="function"==typeof t?t:S2(+t),e):T},e.padRadius=function(t){return arguments.length?(L=null==t?null:"function"==typeof t?t:S2(+t),e):L},e.startAngle=function(t){return arguments.length?(N="function"==typeof t?t:S2(+t),e):N},e.endAngle=function(t){return arguments.length?(C="function"==typeof t?t:S2(+t),e):C},e.padAngle=function(t){return arguments.length?(j="function"==typeof t?t:S2(+t),e):j},e.context=function(t){return arguments.length?(R=null==t?null:t,e):R},e}function q2(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function U2(t){this._context=t}function X2(t){return new U2(t)}function K2(t){return t[0]}function $2(t){return t[1]}function Z2(o,s){var l=S2(!0),c=null,u=X2,f=null;function e(t){var e,n,r,i=(t=q2(t)).length,a=!1;for(null==c&&(f=u(r=O2())),e=0;e<=i;++e)!(e<i&&l(n=t[e],e,t))===a&&((a=!a)?f.lineStart():f.lineEnd()),a&&f.point(+o(n,e,t),+s(n,e,t));if(r)return f=null,r+""||null}return o="function"==typeof o?o:void 0===o?K2:S2(o),s="function"==typeof s?s:void 0===s?$2:S2(s),e.x=function(t){return arguments.length?(o="function"==typeof t?t:S2(+t),e):o},e.y=function(t){return arguments.length?(s="function"==typeof t?t:S2(+t),e):s},e.defined=function(t){return arguments.length?(l="function"==typeof t?t:S2(!!t),e):l},e.curve=function(t){return arguments.length?(u=t,null!=c&&(f=u(c)),e):u},e.context=function(t){return arguments.length?(null==t?c=f=null:f=u(c=t),e):c},e}function J2(u,f,h){var d=null,p=S2(!0),y=null,v=X2,g=null;function e(t){var e,n,r,i,a,o=(t=q2(t)).length,s=!1,l=new Array(o),c=new Array(o);for(null==y&&(g=v(a=O2())),e=0;e<=o;++e){if(!(e<o&&p(i=t[e],e,t))===s)if(s=!s)n=e,g.areaStart(),g.lineStart();else{for(g.lineEnd(),g.lineStart(),r=e-1;n<=r;--r)g.point(l[r],c[r]);g.lineEnd(),g.areaEnd()}s&&(l[e]=+u(i,e,t),c[e]=+f(i,e,t),g.point(d?+d(i,e,t):l[e],h?+h(i,e,t):c[e]))}if(a)return g=null,a+""||null}function t(){return Z2().defined(p).curve(v).context(y)}return u="function"==typeof u?u:void 0===u?K2:S2(+u),f="function"==typeof f?f:S2(void 0===f?0:+f),h="function"==typeof h?h:void 0===h?$2:S2(+h),e.x=function(t){return arguments.length?(u="function"==typeof t?t:S2(+t),d=null,e):u},e.x0=function(t){return arguments.length?(u="function"==typeof t?t:S2(+t),e):u},e.x1=function(t){return arguments.length?(d=null==t?null:"function"==typeof t?t:S2(+t),e):d},e.y=function(t){return arguments.length?(f="function"==typeof t?t:S2(+t),h=null,e):f},e.y0=function(t){return arguments.length?(f="function"==typeof t?t:S2(+t),e):f},e.y1=function(t){return arguments.length?(h=null==t?null:"function"==typeof t?t:S2(+t),e):h},e.lineX0=e.lineY0=function(){return t().x(u).y(f)},e.lineY1=function(){return t().x(u).y(h)},e.lineX1=function(){return t().x(d).y(f)},e.defined=function(t){return arguments.length?(p="function"==typeof t?t:S2(!!t),e):p},e.curve=function(t){return arguments.length?(v=t,null!=y&&(g=v(y)),e):v},e.context=function(t){return arguments.length?(null==t?y=g=null:g=v(y=t),e):y},e}U2.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)}}};var Q2=ex(X2);function tx(t){this._curve=t}function ex(e){function t(t){return new tx(e(t))}return t._curve=e,t}function nx(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(ex(t)):e()._curve},t}function rx(){}function ix(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 ax(t,e){this._context=t,this._k=(1-e)/6}function ox(t,e){this._context=t,this._k=(1-e)/6}function sx(t,e,n){var r,i,a=t._x1,o=t._y1,s=t._x2,l=t._y2;t._l01_a>j2&&(r=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,i=3*t._l01_a*(t._l01_a+t._l12_a),a=(a*r-t._x0*t._l12_2a+t._x2*t._l01_2a)/i,o=(o*r-t._y0*t._l12_2a+t._y2*t._l01_2a)/i),t._l23_a>j2&&(r=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,i=3*t._l23_a*(t._l23_a+t._l12_a),s=(s*r+t._x1*t._l23_2a-e*t._l12_2a)/i,l=(l*r+t._y1*t._l23_2a-n*t._l12_2a)/i),t._context.bezierCurveTo(a,o,s,l,t._x2,t._y2)}function lx(t,e){this._context=t,this._alpha=e}tx.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))}},ax.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:ix(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:ix(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 e(n){function t(t){return new ax(t,n)}return t.tension=function(t){return e(+t)},t}(0),ox.prototype={areaStart:rx,areaEnd:rx,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:ix(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 e(n){function t(t){return new ox(t,n)}return t.tension=function(t){return e(+t)},t}(0),lx.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){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),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:sx(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 cx=function e(n){function t(t){return n?new lx(t,n):new ax(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function ux(t,e){this._context=t,this._alpha=e}ux.prototype={areaStart:rx,areaEnd:rx,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){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),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:sx(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 fx=function e(n){function t(t){return n?new ux(t,n):new ox(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function hx(t){this._context=t}function dx(t){return new hx(t)}function px(t,e){this._context=t,this._t=e}function yx(t){return new px(t,.5)}function vx(t){return new px(t,0)}function gx(t){return new px(t,1)}function Q(t){return new mx([t],null,t,t.ownerDocument)}hx.prototype={areaStart:rx,areaEnd:rx,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))}},px.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(),0<=this._line&&(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:var n;this._t<=0?(this._context.lineTo(this._x,e),this._context.lineTo(t,e)):(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}};class mx{constructor(t=null,e=null,n=null,r=null,i=[null,null,null,null,null],a=[],o=[]){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=a,this._facetElements=o}selectAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new mx(t,null,this._elements[0],this._document)}selectFacetAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new mx(this._elements,null,this._parent,this._document,void 0,void 0,t)}select(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new mx([t],null,t,this._document)}append(t){var e="function"==typeof t?t:()=>this.createElement(t),n=[];if(null!==this._data){for(let t=0;t<this._data.length;t++){var r=this._data[t],[r,i]=Array.isArray(r)?r:[r,null],a=e(r,t);a.__data__=r,null!==i&&(a.__fromElements__=i),this._parent.appendChild(a),n.push(a)}return new mx(n,null,this._parent,this._document)}for(let t=0;t<this._elements.length;t++){var o=this._elements[t],s=e(o.__data__,t);o.appendChild(s),n.push(s)}return new mx(n,null,n[0],this._document)}maybeAppend(t,e){var n=this._elements[0],r=n.getElementById(t);return r||((r="string"==typeof e?this.createElement(e):e()).id=t,n.appendChild(r)),new mx([r],null,this._parent,this._document)}data(e,n=t=>t,r=()=>null){var i=[],a=[],o=new Set(this._elements),s=[],l=new Set,c=new Map(this._elements.map((t,e)=>[n(t.__data__,e),t])),u=new Map(this._facetElements.map((t,e)=>[n(t.__data__,e),t])),f=Ly(this._elements,t=>r(t.__data__));for(let t=0;t<e.length;t++){var h=e[t],d=n(h,t),p=r(h,t);if(c.has(d)){var y=c.get(d);y.__data__=h,y.__facet__=!1,a.push(y),o.delete(y),c.delete(d)}else if(u.has(d)){y=u.get(d);y.__data__=h,y.__facet__=!0,a.push(y),u.delete(d)}else if(f.has(d)){const Ly=f.get(d);s.push([h,Ly]);for(const v of Ly)o.delete(v);f.delete(d)}else c.has(p)?((d=c.get(p)).__toData__?d.__toData__.push(h):d.__toData__=[h],l.add(d),o.delete(d)):i.push(h)}var t=[new mx([],i,this._parent,this._document),new mx(a,null,this._parent,this._document),new mx(o,null,this._parent,this._document),new mx([],s,this._parent,this._document),new mx(l,null,this._parent,this._document)];return new mx(this._elements,null,this._parent,this._document,t)}merge(t){var e=[...this._elements,...t._elements],t=[...this._transitions,...t._transitions];return new mx(e,null,this._parent,this._document,void 0,t)}createElement(t){var e;return this._document?this._document.createElement(t,{}):(e=mx.registry[t])?new e:Uv("Unknown node type: "+t)}join(t=t=>t,e=t=>t,n=t=>t.remove(),r=t=>t,i=t=>t.remove()){t=t(this._enter),e=e(this._update),n=n(this._exit),r=r(this._merge),i=i(this._split);return e.merge(t).merge(n).merge(r).merge(i)}remove(){for(let t=0;t<this._elements.length;t++){const n=this._elements[t];var e=this._transitions[t];e?(Array.isArray(e)?e:[e]).map(t=>t.finished.then(()=>n.remove())):n.remove()}return new mx([],null,this._parent,this._document,void 0,this._transitions)}each(e){for(let t=0;t<this._elements.length;t++){var n=this._elements[t],r=n.__data__;e.call(n,r,t)}return this}attr(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))})}style(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))})}transition(t){const n="function"!=typeof t?()=>t:t,r=this["_transitions"];return this.each(function(t,e){r[e]=n.call(this,t,e)})}on(t,e){return this.each(function(){this.addEventListener(t,e)}),this}call(t,...e){return t.call(this._parent,this,...e),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}function bx([t,e],[n,r]){return[t-n,e-r]}function xx([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function wx([t,e]){return Math.atan2(e,t)}function kx([t,e]){return wx([t,e])+Math.PI/2}function Ex(t){let e=1/0,n=-1/0,r=1/0,i=-1/0;for(var[a,o]of t)e=Math.min(a,e),n=Math.max(a,n),r=Math.min(o,r),i=Math.max(o,i);var t=n-e,s=i-r;return[e,r,t,s]}function Mx([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function Ox(r,i){return Object.entries(r).reduce((t,[e,n])=>(t[e]=i(n,e,r),t),{})}function Sx(t){return t.map((t,e)=>e)}function I(t,e){for(var[n,r]of Object.entries(e))t.style(n,r)}function _x(t,e,n){var n=n["arrowSize"],n="string"==typeof n?+parseFloat(n)/100*xx(t,e):n,r=Math.PI/6,t=Math.atan2(e[1]-t[1],e[0]-t[0]),i=Math.PI/2-t-r,t=t-r;return[[e[0]-n*Math.sin(i),e[1]-n*Math.cos(i)],[e[0]-n*Math.cos(t),e[1]-n*Math.sin(t)]]}function Ax(t,e,n,r,i){e=wx(bx(r,e))+Math.PI,n=wx(bx(r,n))+Math.PI;t.arc(r[0],r[1],i,e,n,n-e<0)}function Px(e,t,n,r="y",i="between"){const a="y"===r||!0===r?n:t;var n="y"===r||!0===r?90:0,t=Sx(a),[r,o]=Sy(t,t=>a[t]);const s=new Rb({domain:[r,o],range:[0,100]}),l=t=>s.map(a[t]);r={between:t=>`${e[t]} ${l(t)}%`,start:t=>0===t?`${e[t]} ${l(t)}%`:`${e[t-1]} ${l(t)}%, ${e[t]} ${l(t)}%`,end:t=>t===e.length-1?`${e[t]} ${l(t)}%`:`${e[t]} ${l(t)}%, ${e[t+1]} ${l(t)}%`};return`linear-gradient(${n}deg, ${t.sort((t,e)=>l(t)-l(e)).map(r[i]||r.between).join(",")})`}function Tx(t){var[t,e,n,r]=t;return[r,t,e,n]}function Lx(t,e,n){var[e,r,,i]=nv(t)?Tx(e):e,[n,a]=n,t=t.getCenter(),o=kx(bx(e,t)),r=kx(bx(r,t)),n=r===o&&n!==a?r+2*Math.PI:r;return{startAngle:o,endAngle:0<=n-o?n:2*Math.PI+n,innerRadius:xx(i,t),outerRadius:xx(e,t)}}function Nx(t,e,n,r){var i=t["defaultColor"],t=t[e]||{};return Object.assign({},{fill:i,stroke:i},t[n]||t[r])}function Cx(t){var{opacityAttribute:t="fill"}=t;return t+"Opacity"}function jx(t,e){return rv(t)?(e=e["transform"],`translate(${(t=t.getCenter())[0]}, ${t[1]}) `+(e||"")):""}mx.registry={g:cs,rect:Es,circle:ts,path:gs,text:Os,ellipse:ss,image:ds,line:ys,polygon:bs,polyline:ws,html:fs};const Rx=T=>{const{colorAttribute:L,first:N=!0,last:C=!0}=T,j=Z(T,["colorAttribute","opacityAttribute","first","last"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Nx(r,i,a,o),i=L,a=r[i],{radius:o=0}=r,r=Z(r,["symbol"==typeof i?i:i+"","radius"]),i=r.lineWidth||1,{stroke:s,radius:o=o,radiusTopLeft:l=o,radiusTopRight:c=o,radiusBottomRight:u=o,radiusBottomLeft:f=o,innerRadius:h=0,innerRadiusTopLeft:d=h,innerRadiusTopRight:p=h,innerRadiusBottomRight:y=h,innerRadiusBottomLeft:h=h,inset:v=0,insetLeft:g=v,insetRight:m=v,insetBottom:b=v,insetTop:x=v,lineWidth:i="stroke"===L||s?i:0}=j,w=Z(j,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","inset","insetLeft","insetRight","insetBottom","insetTop","lineWidth"]),{color:a=a,opacity:k}=e;if(!rv(n)&&!av(n)){var[E,,M]=!!nv(n)?Tx(t):t;const[P,_]=E;var[M,E]=bx(M,E),O=(0<M?P:P+M)+g,S=(0<E?_:_+E)+x,M=Math.abs(M)-(g+m),g=Math.abs(E)-(x+b);return Q(new Es({})).call(I,r).style("lineWidth",i).style("x",O).style("y",S).style("width",M).style("height",g).style("stroke",void 0===s?a:s).style(Cx(T),k).style(L,a).style("radius",[N?l:d,N?c:p,C?u:y,C?f:h]).call(I,w).node()}const{y:_,y1:A}=e;m=n.getCenter(),E=Lx(n,t,[_,A]),x=H2().cornerRadius(o).padAngle(v*Math.PI/180);return Q(new gs({})).call(I,r).style("path",x(E)).style("transform",`translate(${m[0]}, ${m[1]})`).style("stroke",a||s).style("lineWidth",i).style(L,a).style(Cx(T),k).call(I,j).node()}},Ix=(Rx.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>Rx(Object.assign({colorAttribute:"fill"},t))),Fx=(Ix.props=Object.assign({},Rx.props),t=>Rx(Object.assign({colorAttribute:"stroke"},t)));Fx.props=Object.assign({},Rx.props);const Bx=t=>{const{adjustPoints:s=function(t,e,n){var[t,r,i,a]=t;if(nv(n)){const o=[(e?e[0]:r)[0],r[1]],s=[(e?e[3]:i)[0],i[1]];return[t,o,s,a]}const o=[r[0],(e?e[0]:r)[1]],s=[i[0],(e?e[3]:i)[1]];return[t,o,s,a]}}=t,l=Z(t,["adjustPoints"]);return(t,e,n,r,i,...a)=>{var o=e["index"],o=i[o+1],t=s(t,o,n);return Rx(Object.assign({colorAttribute:"fill"},l))(t,e,n,r,i,...a)}};function Dx(t,e,n){var[t,r,i,a]=t;if(nv(n)){const o=[e?e[0][0]:(r[0]+i[0])/2,r[1]],s=[e?e[3][0]:(r[0]+i[0])/2,i[1]];return[t,o,s,a]}const o=[r[0],e?e[0][1]:(r[1]+i[1])/2],s=[i[0],e?e[3][1]:(r[1]+i[1])/2];return[t,o,s,a]}Bx.props=Object.assign({},Rx.props);const zx=t=>Bx(Object.assign({adjustPoints:Dx},t));function Gx(t){const e="function"==typeof t?t:t.render;return class extends ns{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}zx.props=Object.assign({},Rx.props);const Wx=Gx(t=>{var{d1:e,d2:n,style1:r,style2:i}=t.attributes;Q(t).maybeAppend("line",()=>new gs({})).style("d",e).call(I,r),Q(t).maybeAppend("line1",()=>new gs({})).style("d",n).call(I,i)});const Vx=t=>{const{curve:f,gradient:h=!1,gradientColor:d="between",defined:p=t=>!Number.isNaN(t)&&null!=t,connectNulls:y=!1}=t,v=Z(t,["curve","gradient","gradientColor","defined","connectNulls"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Nx(r,i,a,o),{stroke:i,lineWidth:a}=r,o=Z(r,["stroke","lineWidth"]),{color:r=i,size:i=a,seriesColor:a,seriesX:s,seriesY:l}=e,a=h&&a?Px(a,s,l,h,d):r,s=jx(n,e),l=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o),a&&{stroke:a}),i&&{lineWidth:i}),s&&{transform:s}),v);let c;if(rv(n)){const u=n.getCenter();c=n=>nx(Z2().curve(Q2)).angle((t,e)=>kx(bx(n[e],u))).radius((t,e)=>xx(n[e],u)).defined(([t,e])=>p(t)&&p(e)).curve(f)(n)}else c=Z2().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>p(t)&&p(e)).curve(f);var[r,e]=function(t,e){var n=[],r=[];let i=!1,a=null;for(const o of t)e(o[0])&&e(o[1])?(n.push(o),i&&(i=!1,r.push([a,o])),a=o):i=!0;return[n,r]}(t,p),o=J(l,"connect"),a=!!e.length;return(!a||y&&!Object.keys(o).length?Q(new gs({})).style("d",c(r)).call(I,l):a&&!y?Q(new gs({})).style("d",c(t)).call(I,l):Q(new Wx).style("style1",Object.assign(Object.assign({},l),o)).style("style2",l).style("d1",e.map(c).join(",")).style("d2",c(t))).node()}},Yx=(Vx.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=rv(n)?dx:X2;return Vx(Object.assign({curve:i},a))(t,e,n,r)}),Hx=(Yx.props=Object.assign({},Vx.props),t=>{const{alpha:a=.5}=t,o=Z(t,["alpha"]);return(t,e,n,r)=>{var i=rv(n)?fx:cx;return Vx(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),qx=(Hx.props=Object.assign({},Vx.props),t=>Vx(Object.assign({curve:gx},t))),Ux=(qx.props=Object.assign({},Vx.props),t=>Vx(Object.assign({curve:vx},t))),Xx=(Ux.props=Object.assign({},Vx.props),t=>Vx(Object.assign({curve:yx},t)));function Kx(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"]]}Xx.props=Object.assign({},Vx.props);var $x,Zx=Object.freeze({__proto__:null,point:Kx,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"]]},diamond:function(t,e,n){var r=.618*n;return[["M",t-r,e],["L",t,e-n],["L",t+r,e],["L",t,e+n],["Z"]]},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"]]},triangleDown: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"]]},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"]]},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"]]},line:function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},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]]},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]]},plus:function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]},hyphen:function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}});const o=h=>{const{colorAttribute:d,symbol:t,mode:p="auto"}=h,y=Z(h,["colorAttribute","symbol","mode"]),v=Zx[t]||Kx;return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=Nx(r,a,o,s),a=d,o=r[a],s=r["lineWidth"],r=Z(r,["symbol"==typeof a?a:a+"","lineWidth"]),a=y.stroke?s||1:s,{color:s=o,transform:o,opacity:l}=e,[c,u]=1===(c=t).length?c[0]:([[c,f],[u,i]]=c,[(c+u)/2,(f+i)/2]),f=function(t,e,n,r){var i;if(1!==e.length)return n=n["size"],"fixed"!==t&&("normal"===t||sv(r))?([[t,r],[e,i]]=e,e=Math.abs((e-t)/2),t=Math.abs((i-r)/2),Math.max(0,(e+t)/2)):n}(p,t,e,n)||y.r||r.r;return Q(new gs).call(I,r).style("d",v(c,u,f)).style("lineWidth",a).style("transform",o).style("stroke",s).style(Cx(h),l).style(d,s).call(I,y).node()}},Jx=(o.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>o(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t))),Qx=(Jx.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"cross"},t))),tw=(Qx.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"diamond"},t))),ew=(tw.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t))),nw=(ew.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t))),rw=(nw.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t))),iw=(rw.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t))),aw=(iw.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"point"},t))),ow=(aw.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"square"},t))),sw=(ow.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t))),lw=(sw.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t))),cw=(lw.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t))),uw=(cw.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"line"},t))),fw=(uw.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"plus"},t))),hw=(fw.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"point"},t))),dw=(hw.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"square"},t))),pw=(dw.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"tick"},t))),yw=(pw.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"triangle"},t))),vw=(yw.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t))),gw=(vw.props=Object.assign({},o.props),t=>{const{arrowSize:f="40%"}=t,h=Z(t,["arrowSize"]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=Nx(r,e,i,a),{fill:e,stroke:i}=r,a=Z(r,["fill","stroke"]),[r,t]=t,[l,c]=_x(r,t,{arrowSize:f}),u=O2();return u.moveTo(...r),u.lineTo(...t),u.moveTo(...t),u.lineTo(...l),u.moveTo(...t),u.lineTo(...c),Q(new gs).call(I,a).style("d",u.toString()).style("stroke",o||i).style("fill",o||e).style("transform",s).call(I,h).node()}});function mw(t,e,n,r){this.message=t,this.expected=e,this.found=n,this.location=r,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,mw)}function bw(){this.constructor=$x}gw.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},$x=mw,Tc=Error,bw.prototype=Tc.prototype,$x.prototype=new bw,mw.buildMessage=function(t,e){var a={literal:function(t){return'"'+r(t.text)+'"'},class:function(t){for(var e="",n=0;n<t.parts.length;n++)e+=t.parts[n]instanceof Array?i(t.parts[n][0])+"-"+i(t.parts[n][1]):i(t.parts[n]);return"["+(t.inverted?"^":"")+e+"]"},any:function(t){return"any character"},end:function(t){return"end of input"},other:function(t){return t.description}};function n(t){return t.charCodeAt(0).toString(16).toUpperCase()}function r(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}function i(t){return t.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}return"Expected "+function(t){for(var e,n,r=new Array(t.length),i=0;i<t.length;i++)r[i]=(n=t[i],a[n.type](n));if(r.sort(),0<r.length){for(e=i=1;i<r.length;i++)r[i-1]!==r[i]&&(r[e]=r[i],e++);r.length=e}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(t)+" but "+((t=e)?'"'+r(t)+'"':"end of input")+" found."};var xw;function ww(t,e,n,r){var i,a,o,s=kw(r=void 0===r?"...":r,n),l=hn(t)?t:_(i=t)?"":i.toString(),c=e,u=[];if(kw(t,n)<=e)return t;for(;;){if(a=l.substr(0,16),c<(o=kw(a,n))+s)break;if(u.push(a),c-=o,!(l=l.substr(16)))return u.join("")}for(;;){if(a=l.substr(0,1),c<(o=kw(a,n))+s)break;if(u.push(a),c-=o,!(l=l.substr(1)))return u.join("")}return"".concat(u.join("")).concat(r)}var kw=En(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(xw=xw||document.createElement("canvas").getContext("2d")).font=[a,e,i,"".concat(n,"px"),r].join(" "),xw.measureText(hn(t)?t:"").width},function(t,e){return b([t],x(vn(e=void 0===e?{}:e)),!1).join("")});function Ew(t,e){return"string"==typeof t?kw(t,e):t}function Mw(t,e){return"capitalize"===e?t.toLowerCase().replace(/( |^)[a-z]/g,function(t){return t.toUpperCase()}):"lowercase"===e?t.toLowerCase():"uppercase"===e?t.toUpperCase():t}function Ow(t,e){e=Math.pow(10,e);return~~(t*e)/e}function Sw(t){if(pn(t))return[t,t,t,t];if(an(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 _w=["default","active","selected","disabled","inactive"],Aw={fontSize:"16px",fontFamily:"sans-serif",fontWeight:"normal",fontVariant:"normal",fontStyle:"normal",textAlign:"start",textBaseline:"alphabetic"};function Pw(t){var e;return t?null==t?void 0:t.default:(e=Mn(t)||{},_w.forEach(function(t){t in e&&delete e[t]}),e)}function Tw(t,e,n){return void 0===n&&(n=!1),e?(e=_n(t,e),n?Ln({},Pw(t),e):e):Pw(t)||{}}function Lw(r,i,a){void 0===a&&(a=!1);return Object.keys(r).reduce(function(t,e){var n;return n=e,new RegExp("^".concat(i,"[A-Z].*")).test(n)!==a&&(a?t[e]=r[e]:t[(n=e.slice(i.length)).charAt(0).toLowerCase()+n.slice(1)]=r[e]),t},{})}function Nw(t,r){var i=t,t=Object.keys(t).reduce(function(t,e,n){return n>=r.length||(n=r[n],t.push(Lw(i,n)),i=Lw(i,n,!0)),t},[]);return t.push(i),t}function Cw(r,i){return Object.keys(r).reduce(function(t,e){var n;return t["".concat(i).concat((n=e).charAt(0).toUpperCase()+n.slice(1))]=r[e],t},{})}function jw(t){var n=["x","y"],r=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],i={},a={};return Object.entries(t).forEach(function(t){var t=x(t,2),e=t[0],t=t[1];n.includes(e)||(-1!==r.indexOf(e)?a[e]=t:i[e]=t)}),[i,a]}function Rw(t){var e=t.canvas,n=t.touches,r=t.offsetX,t=t.offsetY;return e?[e.x,e.y]:n?[(e=n[0]).clientX,e.clientY]:r&&t?[r,t]:[0,0]}S.prototype.selectAll=function(t){return new S("string"==typeof t?this._parent.querySelectorAll(t):t,null,this._elements[0],this._document)},S.prototype.selectFacetAll=function(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new S(this._elements,null,this._parent,this._document,void 0,void 0,t)},S.prototype.select=function(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new S([t],null,t,this._document)},S.prototype.append=function(t){var e=this,n="function"==typeof t?t:function(){return e.createElement(t)},r=[];if(null!==this._data){for(var i=0;i<this._data.length;i++){var a=this._data[i],a=x(Array.isArray(a)?a:[a,null],2),o=a[0],a=a[1];(l=n(o,i)).__data__=o,null!==a&&(l.__fromElements__=a),this._parent.appendChild(l),r.push(l)}return new S(r,null,this._parent,this._document)}for(i=0;i<this._elements.length;i++){var s=this._elements[i],l=n(o=s.__data__,i);s.appendChild(l),r.push(l)}return new S(r,null,r[0],this._document)},S.prototype.maybeAppend=function(t,e){e=_e(this,Iw,"m",Fw).call(this,t.startsWith("#")?t:"#".concat(t),e);return e.attr("id",t),e},S.prototype.maybeAppendByClassName=function(t,e){t=t.toString(),e=_e(this,Iw,"m",Fw).call(this,t.startsWith(".")?t:".".concat(t),e);return e.attr("className",t),e},S.prototype.maybeAppendByName=function(t,e){e=_e(this,Iw,"m",Fw).call(this,'[name="'.concat(t,'"]'),e);return e.attr("name",t),e},S.prototype.data=function(t,n,e){void 0===n&&(n=function(t){return t}),void 0===e&&(e=function(){return null});for(var r,i,a=[],o=[],s=new Set(this._elements),l=[],c=new Set,u=new Map(this._elements.map(function(t,e){return[n(t.__data__,e),t]})),f=new Map(this._facetElements.map(function(t,e){return[n(t.__data__,e),t]})),h=Ly(this._elements,function(t){return e(t.__data__)}),d=0;d<t.length;d++){var p=t[d],y=n(p,d),v=e(p,d);if(u.has(y))(x=u.get(y)).__data__=p,x.__facet__=!1,o.push(x),s.delete(x),u.delete(y);else if(f.has(y))(x=f.get(y)).__data__=p,x.__facet__=!0,o.push(x),f.delete(y);else if(h.has(y)){var g=h.get(y);l.push([p,g]);try{r=void 0;for(var m=Se(g),b=m.next();!b.done;b=m.next()){var x=b.value;s.delete(x)}}catch(t){r={error:t}}finally{try{b&&!b.done&&(i=m.return)&&i.call(m)}finally{if(r)throw r.error}}h.delete(y)}else u.has(v)?((x=u.get(v)).__toData__?x.__toData__.push(p):x.__toData__=[p],c.add(x),s.delete(x)):a.push(p)}var w=[new S([],a,this._parent,this._document),new S(o,null,this._parent,this._document),new S(s,null,this._parent,this._document),new S([],l,this._parent,this._document),new S(c,null,this._parent,this._document)];return new S(this._elements,null,this._parent,this._document,w)},S.prototype.merge=function(t){var e=b(b([],x(this._elements),!1),x(t._elements),!1),t=b(b([],x(this._transitions),!1),x(t._transitions),!1);return new S(e,null,this._parent,this._document,void 0,t)},S.prototype.createElement=function(t){if(this._document)return this._document.createElement(t,{});var e=S.registry[t];if(e)return new e;throw e="Unknown node type: ".concat(t),new Error(e)},S.prototype.join=function(t,e,n,r,i){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()});t=(t=void 0===t?function(t){return t}:t)(this._enter),e=e(this._update),n=n(this._exit),r=r(this._merge),i=i(this._split);return e.merge(t).merge(n).merge(r).merge(i)},S.prototype.remove=function(){for(var n=this,t=0;t<this._elements.length;t++)!function(t){var e=n._elements[t],t=n._transitions[t];t?t.then(function(){return e.remove()}):e.remove()}(t);return new S([],null,this._parent,this._document,void 0,this._transitions)},S.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},S.prototype.attr=function(n,r){var i="function"!=typeof r?function(){return r}:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))})},S.prototype.style=function(n,r){var i="function"!=typeof r?function(){return r}:r;return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))})},S.prototype.update=function(n){var r="function"!=typeof n?function(){return n}:n;return this.each(function(t,e){n&&this.update(r.call(this,t,e))})},S.prototype.transition=function(t){var n="function"!=typeof t?function(){return t}:t,r=this._transitions;return this.each(function(t,e){r[e]=n.call(this,t,e)})},S.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},S.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,b([this._parent,this],x(e),!1)),this},S.prototype.node=function(){return this._elements[0]},S.prototype.nodes=function(){return this._elements},S.prototype.transitions=function(){return this._transitions},S.prototype.parent=function(){return this._parent},Iw=new WeakSet,Fw=function(t,e){var n=this._elements[0],t=n.querySelector(t);return t||(t="string"==typeof e?this.createElement(e):e(),n.appendChild(t)),new S([t],null,this._parent,this._document)},S.registry={g:cs,rect:Es,circle:ts,path:gs,text:Os,ellipse:ss,image:ds,line:ys,polygon:bs,polyline:ws,html:fs};var Iw,Fw,Bw=S;function S(t,e,n,r,i,a,o){void 0===t&&(t=null),void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=[null,null,null,null,null]),void 0===a&&(a=[]),void 0===o&&(o=[]),Iw.add(this),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=a,this._facetElements=o}function A(t,e){var n,r;if(e)try{for(var i=Se(Object.entries(e)),a=i.next();!a.done;a=i.next()){var o=x(a.value,2),s=o[0],l=o[1];t.style(s,l)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function P(t){return new Bw([t],null,t,t.ownerDocument)}function Dw(t,e,n){return t.querySelector(e)?P(t).select(e):P(t).append(n)}function zw(t){var e,t=t&&t.getRenderBounds();return t?(e=t.getMax(),t=t.getMin(),{width:e[0]-t[0],height:e[1]-t[1]}):{width:0,height:0}}function Gw(t){var t=t.getLocalBounds(),t=x([t.min,t.max],2),e=x(t[0],2),n=e[0],e=e[1],t=x(t[1],2),r=t[0],t=t[1];return{x:n,y:e,width:r-n,height:t-e,left:n,bottom:t,top:e,right:r}}function Ww(t,e){var t=x(t,2),n=t[0],t=t[1],e=x(e,2),n=e[0]-n,e=e[1]-t;return Math.sqrt(n*n+e*e)}function Vw(t){var e,n;return"string"==typeof t?(e=t,(n=document.createElement("div")).innerHTML=e,n.firstChild):t}function Yw(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)qw(t,e[r]);return t}var Hw=5,qw=function(r,i,a,o){void 0===a&&(a=0),void 0===o&&(o=Hw),Object.entries(i).forEach(function(t){var t=x(t,2),e=t[0],t=t[1],n=r;Object.prototype.hasOwnProperty.call(i,e)&&(t?cn(t)?(cn(r[e])||(n[e]={}),a<o?qw(r[e],t,a+1,o):n[e]=i[e]):an(t)?(n[e]=[],n[e]=n[e].concat(t)):n[e]=t:n[e]=t)})};function Uw(t,e,n,r,i,a){return(t===e||Math.min(t,e)<=i&&i<=Math.max(t,e))&&(n===r||Math.min(n,r)<=a&&a<=Math.max(n,r))}function Xw(t,e,n){var r=t;(!t.length||e<t[0]||e===t[0]&&n<t[1])&&(r[0]=e,r[1]=n)}function Kw(t,e){var t=x(t,2),n=t[0],t=t[1],e=x(e,2),r=e[0],e=e[1];return Math.pow(Math.pow(n-r,2)+Math.pow(t-e,2),.5)}function $w(a){return void 0===a&&(a=0),function(t,e,n){var r,i=n.value;"function"==typeof i&&(n.value=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];r||(t=this,r=window.setTimeout(function(){i.apply(t,e),r=null},a))})}}var Zw,Jw=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function Qw(t){return hn(t)||pn(t)?new Os({style:{text:String(t)}}):t}function tk(t){return t*Math.PI/180}function ek(t){return Number((180*t/Math.PI).toPrecision(5))}function nk(t,e){var t=(t instanceof N?t:t.node()).computedStyleMap().get("transform");return!t||"unset"===t.value||null==(t=null==t?void 0:t.find(function(t){return t.t===e}))?void 0:t.d.map(function(t){return t.value})}function rk(t,e){if(e)try{var o=t instanceof N?t:t.node(),n=e.replace(/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,function(t,e,n){return"translate(".concat((e=e,n=n,i=(r=((r=o)instanceof N?r:r.node()).getBBox()).width,a=r.height,[(r=x([e,n].map(function(t,e){var n;return t.includes("%")?parseFloat((null==(n=t.match(/[+-]?([0-9]*[.])?[0-9]+/))?void 0:n[0])||"0")/100*(0===e?i:a):t}),2))[0],r[1]]),")");var r,i,a});o.attr("transform",n)}catch(t){}}function ik(t,e,n,r,i){return(r=void 0===r?!0:r)&&t===e||i&&t===n||e<t&&t<n}function ak(t,e){return en(t)?t.apply(void 0,b([],x(e),!1)):t}function ok(t,e,n,r){void 0===r&&(r=!0),t?n(e):r&&e.node().removeChildren()}function sk(){return null!==Zw&&Zw.apply(this,arguments)||this}function lk(e,n){return Me(t,r=ns),t.prototype.connectedCallback=function(){var t,e;null!=(t=(e=this.descriptor).render)&&t.call(e,this.attributes,this),null!=(e=(t=this.descriptor).bindEvents)&&e.call(t,this.attributes,this)},t.prototype.update=function(t){var e;this.attr(Ln({},this.attributes,t=void 0===t?{}:t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)},t.prototype.attributeChangedCallback=function(){var t,e;null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)},t;function t(t){t=r.call(this,Yw({},{style:n},t))||this;return t.descriptor=e,t}var r}Me(sk,Zw=ns);function ck(t,e){function r(t){return"".concat(e,"-").concat(t)}return t=Object.fromEntries(Object.entries(t).map(function(t){var t=x(t,2),e=t[0],t=t[1],n=r(t);return[e,{name:n,class:".".concat(n),id:"#".concat(n),toString:function(){return n}}]})),Object.assign(t,{prefix:r}),t}function uk(t){var r=m({},t),i=new RegExp(/^(f|[\S]+F)(ilter|iltrate)$/),a={},o={iltrate:"ilter",ilter:"iltrate"};return Object.entries(t).forEach(function(t){var t=x(t,2),e=t[0],t=t[1];i.test(e)&&(a[e]=t)}),Object.keys(a).forEach(function(t){delete r[t]}),Object.keys(a).forEach(function(t){var e,n;(t.endsWith("iltrate")&&"function"!=typeof a[t]||t.endsWith("ilter")&&"function"==typeof a[t])&&(n=t.replace(i,function(t,e,n){return"".concat(e).concat(o[n])}),Object.assign(r,((e={})[n]=a[t],e)))}),r}function fk(t,e){"text"===t.node().nodeName&&t.call(A,{wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:"..."})}function hk(t,e,n){void 0===n&&(n=!1);var r=t.getBBox(),i=r.width,r=r.height,e=e/Math.max(i,r);n&&t.scale(e)}Me(pk,dk=ns),pk.prototype.connectedCallback=function(){var t=this.style,e=t.x,t=t.y;this.setLocalPosition([+(void 0===e?0:e),+(void 0===t?0:t)]),this.render(this.attributes,this),this.bindEvents(this.attributes,this)},pk.prototype.update=function(t){this.attr(Yw({},this.attributes,t=void 0===t?{}:t)),null!=(t=this.render)&&t.call(this,this.attributes,this)},pk.prototype.clear=function(){this.removeChildren()},pk.prototype.destroy=function(){this.removeAllEventListeners(),this.removeChildren(),this.remove()},pk.prototype.attributeChangedCallback=function(){},pk.prototype.bindEvents=function(t,e){};var dk,Rc=pk;function pk(t){return dk.call(this,t)||this}function yk(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"]]}function vk(t,e,n){return[["M",t,e+n],["L",t,e-n]]}function gk(t,e,n){return[["M",t-n,e],["L",t+n,e]]}mc=yk,Mc=gk;function mk(t){n="default",on(e=t)&&e instanceof Image?n="image":en(e)?n="symbol":hn(e)&&(r=new RegExp("data:(image|text)"),n=e.match(r)?"base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(e)?"url":"symbol");var e,n,r=n;return["base64","url","image"].includes(r)?"image":t&&"symbol"===r?"path":null}Me(wk,bk=Rc),wk.prototype.render=function(t,e){var r=t.x,i=t.y,a=t.symbol,n=t.size,o=void 0===n?16:n,s=Z(t,["x","y","symbol","size"]),l=mk(a);l?Dw(e,".".concat(l,"-marker"),l).attr("className","marker ".concat(l,"-marker")).call(function(t){var e,n;"image"===l?(e=2*o,t.style("img",a).style("width",e).style("height",e).style("x",-o).style("y",-o)):(e=o/2,n=en(a)?a:wk.getSymbol(a),t.style("path",null==n?void 0:n(r,i,e)).call(A,s))}):(null!=(n=this.querySelector(".marker"))&&n.remove(),this.removeChildren())},wk.MARKER_SYMBOL_MAP=new Map,wk.registerSymbol=function(t,e){wk.MARKER_SYMBOL_MAP.set(t,e)},wk.getSymbol=function(t){return wk.MARKER_SYMBOL_MAP.get(t)};var bk,xk=wk;function wk(){return null!==bk&&bk.apply(this,arguments)||this}xk.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]]}),xk.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),xk.registerSymbol("line",vk),xk.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),xk.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]]}),xk.registerSymbol("circle",yk),xk.registerSymbol("point",mc),xk.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"]]}),xk.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"]]}),xk.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"]]}),xk.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),xk.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"]]}),xk.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"]]}),xk.registerSymbol("line",vk),xk.registerSymbol("dot",gk),xk.registerSymbol("dash",Mc),xk.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]]}),xk.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]]}),xk.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]]}),xk.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]]}),xk.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]]});Me(Mk,kk=Rc),Mk.prototype.render=function(t,e){var n,r,i=t.padding,a=t.marker,o=t.text,s=t.textStyle,l=t.radius,c=t.backgroundStyle,u=t.spacing,f=t.align,t=t.verticalAlign,i=x(Sw(void 0===i?0:i),4),h=i[0],d=i[1],p=i[2],i=i[3],y=Dw(e,".tag-content","g").attr("className","tag-content").node(),v=Dw(y,".tag-marker",function(){return new xk({})}).attr("className","tag-marker").call(function(t){t.node().clear(),t.node().update(a||{symbol:"triangle",size:0,x:0})}).node(),u=(u=u,{x:(g=(v=v).getLocalBounds()).halfExtents[0]?g.max[0]+(u||0):v.style.x,y:g.halfExtents[1]?(g.min[1]+g.max[1])/2:v.style.y}),g=u.x,v=u.y,v=(Dw(y,".tag-text","text").attr("className","tag-text").style("fontFamily","sans-serif").style("fontSize",12).style("x",g).style("y",v).style("text",_(o)?"":"".concat(o)).call(A,s).style("textBaseline","middle").call(function(t){o||t.remove()}),u=i,g=h,v=f||"start",s=t||"top",t=(f=y).getLocalBounds(),r=n=0,"start"===v&&(n=u),"center"===v&&(n=-t.halfExtents[0]),"end"===v&&(n=-u-2*t.halfExtents[0]),"top"===s&&(r=g+t.halfExtents[1]),"middle"===s&&(r=0),"bottom"===s&&(r=g-2*t.halfExtents[1]),f.setLocalPosition([n,r]),y.getLocalBounds());Dw(e,".tag-background","rect").attr("className","tag-background").style("zIndex",(y.style.zIndex||0)-1).style("x",v.min[0]-i).style("y",v.min[1]-h).style("width",null!==c?i+d+2*v.halfExtents[0]:0).style("height",null!==c?h+p+2*v.halfExtents[1]:0).style("radius",null!=l?l:2).style("fill","#fafafa").style("stroke","#d9d9d9").style("lineWidth",1).call(A,c)},Mk.defaultOptions={type:Mk.tag="tag",style:{padding:4,spacing:4}};var kk,Ek=Mk;function Mk(t){return kk.call(this,Ln({},Mk.defaultOptions,t))||this}var Ok,Sk,_k={small:{textStyle:{fontSize:10},buttonStyle:{width:40,height:20},markerStyle:{size:8}},middle:{textStyle:{fontSize:12},buttonStyle:{width:60,height:30},markerStyle:{size:12}},large:{textStyle:{fontSize:16},buttonStyle:{width:80,height:40},markerStyle:{size:16}}},Ak={primary:{textStyle:{default:{fill:"#fff"},active:{}},buttonStyle:{default:{fill:"#1890ff",lineWidth:0},active:{fill:"#40a9ff"}},markerStyle:{default:{fill:"#1890ff"},active:{fill:"#40a9ff"}}},dashed:{textStyle:{default:{},active:{}},buttonStyle:{default:{fill:"transparent",stroke:"#bbb",lineDash:[5,5]},active:{}},markerStyle:{}},link:{textStyle:{default:{fill:"#1890ff"},active:{}},buttonStyle:{default:{fill:"transparent",lineWidth:0},active:{}},markerStyle:{default:{fill:"#1890ff"}}},text:{textStyle:{default:{fill:"#000"},active:{}},buttonStyle:{default:{fill:"transparent",lineWidth:0},active:{}},markerStyle:{default:{stroke:"#000"}}},default:{textStyle:{default:{fill:"#000"},active:{fill:"#1890ff"}},buttonStyle:{default:{fill:"transparent",stroke:"#bbb"},active:{stroke:"#1890ff"}},markerStyle:{default:{stroke:"#bbb",lineWidth:1},active:{stroke:"#1890ff"}}}},Pk={strict:{textStyle:{fill:"#b8b8b8"},buttonStyle:{},markerStyle:{}},textStyle:{},buttonStyle:{stroke:"#d9d9d9",fill:"#f5f5f5"},markerStyle:{stroke:"#d9d9d9"}};function Tk(t){var n=Ok.call(this,Yw({},Tk.defaultOptions,t))||this;return n.state="default",n.clickEvents=function(){var t=n.attributes,e=t.onClick;"disabled"!==t.state&&null!=e&&e.call(n,n)},n.mouseenterEvent=function(){"disabled"!==n.attributes.state&&(n.state="active",n.render(n.attributes,n))},n.mouseleaveEvent=function(){var t=n.attributes.state;n.state=void 0===t?"default":t,n.render(n.attributes,n)},n}function Lk(t){return Sk.call(this,Ln({},Lk.defaultOptions,t))||this}Me(Tk,Ok=Rc),Object.defineProperty(Tk.prototype,"markerSize",{get:function(){var t=this.attributes.marker,e=this.getStyle("markerStyle");return t?(null==e?void 0:e.size)||2:0},enumerable:!1,configurable:!0}),Object.defineProperty(Tk.prototype,"text",{get:function(){var t,e=this.attributes.text;return""===e?e:(t=this.textAvailableWidth,ww(e,t))},enumerable:!1,configurable:!0}),Object.defineProperty(Tk.prototype,"textAvailableWidth",{get:function(){var t=this.attributes,e=t.marker,n=t.padding,r=t.ellipsis,i=t.width,t=t.markerSpacing;return r?(r=mn(i)?this.getStyle("buttonStyle").width:i,e?r-2*n-t-this.markerSize:r-2*n):1/0},enumerable:!1,configurable:!0}),Object.defineProperty(Tk.prototype,"buttonHeight",{get:function(){var t=this.attributes.height;return t||this.getStyle("buttonStyle").height},enumerable:!1,configurable:!0}),Tk.prototype.getStyle=function(e){var t=this.attributes,n=t.size,t=t.type,r=this.state,i=Ln({},_n(_k,[n,e]),Tw(_n(Ak,[t,e]),r),Tw(_n(this.attributes,e),r,!0));return"disabled"===r&&(Object.keys(i).forEach(function(t){t in Pk[e]&&(i[t]=_n(Pk,[e,t]))}),Object.keys(Pk.strict[e]).forEach(function(t){i[t]=_n(Pk,["strict",e,t])}),Ln(i,Tw(_n(this.attributes,e),"disabled"))),i},Tk.prototype.render=function(t,e){var n=t.padding,n=void 0===n?0:n,r=t.marker,t=t.markerSpacing,t=void 0===t?0:t,n=(e.attr("cursor","disabled"===this.state?"not-allowed":"pointer"),x(Sw(n),4)),i=(n[0],n[1]),a=(n[2],n[3]),o=this.buttonHeight,s=this.getStyle("markerStyle"),l=this.markerSize,n=Dw(e,".marker",function(){return new xk({className:"marker",style:{symbol:"circle"}})}).call(function(t){t.node().update(m(m({},s),{symbol:r,x:a+l/2,y:o/2,size:l}))}).node().getLocalBounds(),c=this.text,c=void 0===c?"":c,u=this.getStyle("textStyle"),n=(this.textShape=Dw(e,".text","text").attr("className","text").style("x",l?n.max[0]+t:a).style("y",o/2).style("text",c).style("textAlign","left").style("textBaseline","middle").call(A,u).node(),this.textShape.getLocalBounds()),c=this.getStyle("buttonStyle");Dw(e,".background","rect").attr("className","background").style("zIndex",-1).call(A,c).style("height",o).style("width",a+(l?l+t:0)+2*n.halfExtents[0]+i).node()},Tk.prototype.update=function(t){this.attr(Ln({},this.attributes,t=void 0===t?{}:t));t=this.attributes.state;this.state=void 0===t?"default":t,this.render(this.attributes,this)},Tk.prototype.setState=function(t){this.update({state:t})},Tk.prototype.hide=function(){this.style.visibility="hidden"},Tk.prototype.show=function(){this.style.visibility="visible"},Tk.prototype.bindEvents=function(){this.addEventListener("click",this.clickEvents),this.addEventListener("mouseenter",this.mouseenterEvent),this.addEventListener("mouseleave",this.mouseleaveEvent)},Tk.defaultOptions={type:Tk.tag="button",style:{cursor:"pointer",padding:10,size:"middle",type:"default",text:"",markerAlign:"left",markerSpacing:5,textStyle:{default:{},active:{}},buttonStyle:{default:{lineWidth:1,radius:5},active:{}},markerStyle:{default:{}}}},Me(Lk,Sk=Rc),Lk.prototype.render=function(t,e){for(var n=t.x,r=t.y,s=t.items,l=t.textStyle,i=t.padding,c=t.width,u=t.separator,t=x(Sw(void 0===i?0:i),3),i=t[0],f=t[1],t=t[2],h=Dw(e,".container","g").attr("className","container").style("x",n+t).style("y",r+i),d=0,p=0,y=(h.node().removeChildren(),this),a=0;a<s.length;a++)!function(t){var e,n=s[t],r=new Ek({className:"breadcrumb-item",style:m(m({x:d,y:p,text:_(n.text)?n.id:n.text,textStyle:l},An(n,["marker"])),{padding:0,backgroundStyle:null})}),i=(h.append(function(){return r}),r.getLocalBounds()),a=2*i.halfExtents[0],i=2*i.halfExtents[1],a=(d+=a,_(c)||c-f<d&&(r.attr({x:0,y:p+i}),d=a,p+=i),y.bindInnerEvents(r,n),u||{}),n=a.spacing,n=void 0===n?0:n,o=a.text,o=void 0===o?"/":o,a=a.style;t!==s.length-1&&(e=new Os({className:"".concat(Lk.tag,"-separator"),id:"".concat(Lk.tag,"-separator-").concat(t),style:m(m(m(m({},Aw),{x:d+n,y:p+i/2}),a),{text:o,textAlign:"end",textBaseline:"middle"})}),h.append(function(){return e}),t=e.getLocalBounds(),d+=2*t.halfExtents[0]+n)}(a)},Lk.prototype.update=function(t){this.attr(Ln({},this.attributes,t)),this.render(this.attributes,this)},Lk.prototype.bindInnerEvents=function(t,e){var n=this.attributes,r=n.items,i=n.onClick;i&&t.addEventListener("click",function(){i.call(t,e.id,e,r)})},Lk.defaultOptions={type:Lk.tag="breadcrumb",style:{separator:{text:"/",style:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},spacing:8},textStyle:{default:m(m({},Aw),{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"}),active:{fill:"#5468ff",cursor:"pointer"}},padding:[8,8,8,8]}};Me(jk,Nk=N),jk.prototype.render=function(){var t=this.attributes,e=t.lines,t=t.areas;e&&this.createLines(e),t&&this.createAreas(t)},jk.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},jk.prototype.update=function(t){var e=t.lines,t=t.areas;this.clear(),e&&this.setAttribute("lines",e),t&&this.setAttribute("areas",t),this.render()},jk.prototype.createLines=function(t){P(this.linesGroup).selectAll("line").data(t).join(function(t){return t.append("path").each(function(t){P(this).call(A,t)})},function(t){return t.each(function(t){P(this).call(A,t)})},function(t){return t.remove()})},jk.prototype.createAreas=function(t){P(this.linesGroup).selectAll("area").data(t).join(function(t){return t.append("path").each(function(t){P(this).call(A,t)})},function(t){return t.each(function(t){P(this).call(A,t)})},function(t){return t.remove()})};var Nk,Ck=jk;function jk(t){var e=this,n=t.style,t=Z(t,["style"]);return(e=Nk.call(this,Ln({},{type:"lines",style:{width:0,height:0}},m({style:n},t)))||this).linesGroup=e.appendChild(new cs({name:"lines"})),e.areasGroup=e.appendChild(new cs({name:"areas"})),e.render(),e}Me(Fk,Rk=N),Fk.prototype.render=function(){var t=this.attributes.columns;P(this.columnsGroup).selectAll("column-group").data(t.flat()).join(function(t){return t.append("rect").each(function(t){P(this).call(A,t)})},function(t){return t.each(function(t){P(this).call(A,t)})},function(t){return t.remove()})},Fk.prototype.update=function(t){this.attr(Ln({},this.attributes,t)),t.columns&&(this.clear(),this.render())},Fk.prototype.clear=function(){this.removeChildren()};var Rk,Ik=Fk;function Fk(t){var e=this,n=t.style,t=Z(t,["style"]);return(e=Rk.call(this,Ln({},{type:"column",style:{width:0,height:0}},m({style:n},t)))||this).columnsGroup=new cs({name:"columns"}),e.appendChild(e.columnsGroup),e.render(),e}function Bk(t){return 0===t.length?[0,0]:[fn(function(t,e){if(an(t)){for(var n,r=1/0,i=0;i<t.length;i++){var a=t[i],o=en(e)?e(a):a[e];o<r&&(n=a,r=o)}return n}}(t,function(t){return fn(t)||0})),un(function(t,e){if(an(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=en(e)?e(a):a[e];r<o&&(n=a,r=o)}return n}}(t,function(t){return un(t)||0}))]}function Dk(t){for(var e=Mn(t),n=e[0].length,t=x([Array(n).fill(0),Array(n).fill(0)],2),r=t[0],i=t[1],a=0;a<e.length;a+=1)for(var o=e[a],s=0;s<n;s+=1)0<=o[s]?(o[s]+=r[s],r[s]=o[s]):(o[s]+=i[s],i[s]=o[s]);return e}function zk(t,e,n){void 0===n&&(n=[[0,0],[1,1]]);for(var e=!!(e=void 0===e?!1:e),r=[],i=0,a=t.length;i<a;i+=2)r.push([t[i],t[i+1]]);for(var o,s,l,c=function(t,e,n,r){var i,a=[],o=!!r;if(o){c=r[0],u=r[1];for(var s=0,l=t.length;s<l;s+=1)var c=pe([0,0],c,x=t[s]),u=ye([0,0],u,x)}for(var s=0,f=t.length;s<f;s+=1){var h,d,p,y,v,g,m,b,x=t[s];0!==s||n?s!==f-1||n?(h=t[[s?s-1:f-1,s-1][n?0:1]],d=t[n?(s+1)%f:s+1],g=ve(g=we([0,0],d,h),g,e),0!==(v=(p=ge(x,h))+(y=ge(x,d)))&&(p/=v,y/=v),v=ve([0,0],g,-p),g=ve([0,0],g,y),m=de([0,0],x,v),b=pe([0,0],b=de([0,0],x,g),ye([0,0],d,x)),b=ye([0,0],b,pe([0,0],d,x)),m=pe([0,0],m=de([0,0],x,v=ve([0,0],v=we([0,0],b,x),-p/y)),ye([0,0],h,x)),m=ye([0,0],m,pe([0,0],h,x)),b=de([0,0],x,g=ve([0,0],g=we([0,0],x,m),y/p)),o&&(m=pe([0,0],m=ye([0,0],m,c),u),b=pe([0,0],b=ye([0,0],b,c),u)),a.push(i),a.push(m),i=b):(m=x,a.push(i),a.push(m)):i=x}return n&&a.push(a.shift()),a}(r,.4,e,n),u=r.length,f=[],i=0;i<u-1;i+=1)o=c[2*i],s=c[2*i+1],f.push(["C",o[0],o[1],s[0],s[1],(l=r[i+1])[0],l[1]]);return e&&(o=c[u],s=c[u+1],f.push(["C",o[0],o[1],s[0],s[1],(l=r[0])[0],l[1]])),f}function Gk(t,e){var n=(e=void 0===e?!1:e)?t.length-1:0,t=t.map(function(t,e){return b([e===n?"M":"L"],x(t),!1)});return e?t.reverse():t}function Wk(t,e){if(void 0===e&&(e=!1),t.length<=2)return Gk(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var a=e?t[r-i-1]:t[i];Nn(a,n.slice(-2))||n.push.apply(n,b([],x(a),!1))}var o=zk(n,!1);return e?o.unshift(b(["M"],x(t[r-1]),!1)):o.unshift(b(["M"],x(t[0]),!1)),o}function Vk(t,e,n){t=Mn(t);return t.push(["L",e,n],["L",0,n],["Z"]),t}Me(qk,Yk=Rc),Object.defineProperty(qk.prototype,"rawData",{get:function(){var t=this.attributes.data;return t&&0!==(null==t?void 0:t.length)?(t=Mn(t),pn(t[0])?[t]:t):[[]]},enumerable:!1,configurable:!0}),Object.defineProperty(qk.prototype,"data",{get:function(){return this.attributes.isStack?Dk(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(qk.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(qk.prototype,"baseline",{get:function(){var t=this.scales.y,e=x(t.getOptions().domain||[0,0],2),n=e[0],e=e[1];return e<0?t.map(e):t.map(n<0?0:n)},enumerable:!1,configurable:!0}),Object.defineProperty(qk.prototype,"containerCfg",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(qk.prototype,"linesCfg",{get:function(){var n=this;if("line"!==this.attributes.type)throw new Error("linesCfg can only be used in line type");var t,r,i,a,o,e,s,l,c,u=this.attributes,f=u.isStack,h=u.smooth,d=Lw(this.attributes,"area"),p=Lw(this.attributes,"line"),u=this.containerCfg.width,y=this.data;return 0===y[0].length?{lines:[],areas:[]}:(t=this.scales,e=t.x,t=t.y,y=y,r=(e={type:"line",x:e,y:t}).x,i=e.y,a=(e=x(i.getOptions().range||[0,0],2))[0],o=e[1],a<o&&(e=x([a,o],2),o=e[0],a=e[1]),t=y.map(function(t){return t.map(function(t,e){return[r.map(e),dn(i.map(t),o,a)]})}),e=[],d&&(y=this.baseline,e=f?(h?function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=t[i],s=Wk(o),l=void 0,l=0===i?Vk(s,e,n):(a=Wk(t[i-1],!0),o=o[0],a[0][0]="L",b(b(b([],x(s),!1),x(a),!1),[b(["M"],x(o),!1),["Z"]],!1));r.push(l)}return r}:function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=Gk(t[i]),s=void 0,s=0===i?Vk(o,e,n):((a=Gk(t[i-1],!0))[0][0]="L",b(b(b([],x(o),!1),x(a),!1),[["Z"]],!1));r.push(s)}return r})(t,u,y):(s=h,l=u,c=y,t.map(function(t){return Vk((s?Wk:Gk)(t),l,c)}))),{lines:t.map(function(t,e){return m({stroke:n.getColor(e),path:(h?Wk:Gk)(t)},p)}),areas:e.map(function(t,e){return m({path:t,fill:n.getColor(e)},d)})})},enumerable:!1,configurable:!0}),Object.defineProperty(qk.prototype,"columnsCfg",{get:function(){var i=this;if("column"!==this.attributes.type)throw new Error("columnsCfg can only be used in column type");var a=Lw(this.attributes,"column"),o=this.attributes.isStack,t=this.containerCfg.height,s=this.rawData;if(!s)return{columns:[]};o&&(s=Dk(s));var e=this.createScales(s),l=e.x,c=e.y,e=x(Bk(s),2),n=e[0],e=e[1],u=new Rb({domain:[0,e-(0<n?0:n)],range:[0,t]}),f=l.getBandWidth(),h=this.rawData;return{columns:s.map(function(t,r){return t.map(function(t,e){var n=f/s.length;return m(m({fill:i.getColor(r)},a),o?{x:l.map(e),y:c.map(t),width:f,height:u.map(h[r][e])}:{x:l.map(e)+n*r,y:0<=t?c.map(t):c.map(0),width:n,height:u.map(Math.abs(t))})})})}},enumerable:!1,configurable:!0}),qk.prototype.render=function(t,e){this.containerShape=Dw(e,".container","rect").attr("className","container").node();var n=t.type,r="spark".concat(n),i="line"===n?this.linesCfg:this.columnsCfg;this.sparkShape=Dw(e,".".concat(r),function(){return new("line"===n?Ck:Ik)({className:r,style:i})}).call(A,i).node()},qk.prototype.update=function(t){this.attr(Ln({},this.attributes,t)),this.render(this.attributes,this)},qk.prototype.clear=function(){this.removeChild(this.sparkShape),this.sparkShape.clear(),this.sparkShape.destroy()},qk.prototype.getColor=function(t){var e=this.attributes.color;return an(e)?e[t%e.length]:en(e)?e.call(null,t):e},qk.prototype.createScales=function(t){var e,n=this.attributes,r=n.type,n=n.range,n=void 0===n?[]:n,i=this.containerCfg,a=i.width,i=i.height,o=x(Bk(t),2),s=o[0],o=o[1],s=new Rb({domain:[null!=(e=n[0])?e:s,null!=(e=n[1])?e:o],range:[i,0]});return"line"===r?{type:r,x:new Rb({domain:[0,t[0].length-1],range:[0,a]}),y:s}:(e=(n=this.attributes).isGroup,o=n.spacing,{type:r,x:new Mb({domain:t[0].map(function(t,e){return e}),range:[0,a],paddingInner:e?o:0}),y:s})},qk.tag="sparkline",qk.defaultOptions={style:{type:"line",width:200,height:20,isStack:!1,nice:!0,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineLineWidth:1,areaOpacity:0,isGroup:!1,columnLineWidth:1,columnStroke:"#fff",columnPadding:.1}};var Yk,Hk=qk;function qk(t){return Yk.call(this,Ln({},qk.defaultOptions,t))||this}var Uk,Xk={fill:"#fff",stroke:"#bfbfbf",lineWidth:1,size:10,radius:2,strokeOpacity:1},Kk={fontSize:12,fill:"#000",fillOpacity:.45,textAlign:"center",textBaseline:"middle"},$k={orient:"horizontal",type:"start"},Zk=ck({label:"label",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),Jk=lk({render:function(t,e){var n=t.size,n=void 0===n?10:n,r=t.radius,r=void 0===r?n/4:r,i=t.orient,t=(t.class,Z(t,["size","radius","orient","class"])),a=2.4*n,r=P(e).maybeAppendByClassName(Zk.iconRect,"rect").call(A,m(m({},t),{width:n,height:a,radius:r,x:-n/2,y:-a/2})),o=1/3*n,s=2/3*n,l=.25*a,c=.75*a;r.maybeAppendByClassName("".concat(Zk.iconLine,"-1"),"line").call(A,{x1:o,x2:o,y1:l,y2:c}).call(A,t),r.maybeAppendByClassName("".concat(Zk.iconLine,"-2"),"line").call(A,{x1:s,x2:s,y1:l,y2:c}).call(A,t),r.node().setOrigin(n/2,a/2),"vertical"===i?e.setLocalEulerAngles(90):e.setLocalEulerAngles(0)}}),Qk=(Me(tE,Uk=Rc),tE.prototype.renderLabel=function(t){var e=Lw(this.attributes,"label");P(t).maybeAppendByClassName(Zk.label,"text").call(A,m(m({},Kk),e))},tE.prototype.renderIcon=function(t){var e=this.attributes.orient,n=m(m({orient:e},Xk),Lw(this.attributes,"icon"));P(t).maybeAppendByClassName(Zk.icon,function(){return new Jk({style:n})}).update(n)},tE.prototype.render=function(t,e){this.renderIcon(e),this.renderLabel(e)},tE);function tE(t){return Uk.call(this,Yw({},{style:$k},t))||this}Me(iE,eE=Rc),Object.defineProperty(iE.prototype,"values",{get:function(){return this.getAttribute("values")},set:function(t){this.setAttribute("values",this.clampValues(t))},enumerable:!1,configurable:!0}),Object.defineProperty(iE.prototype,"sparklineShapeCfg",{get:function(){var t,e,n,r,i,a,o,s;return"horizontal"!==this.attributes.orient?null:(i=(t=Lw(this.attributes,"sparkline")).padding,t=Z(t,["padding"]),e=(i=x(Sw(i),4))[0],n=i[1],r=i[2],i=i[3],a=(o=this.availableSpace).width,o=o.height,s=this.attributes.backgroundLineWidth,m(m({x:(s=+(void 0===s?0:s))/2+i,y:s/2+e},t),{zIndex:0,width:a-s-i-n,height:o-s-e-r}))},enumerable:!1,configurable:!0}),Object.defineProperty(iE.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.padding,n=t.length,t=t.size,e=x(Sw(e),4),r=e[0],i=e[1],a=e[2],e=e[3],t=x(this.getOrientVal([[n,t],[t,n]]),2);return{x:e,y:r,width:t[0]-(e+i),height:t[1]-(r+a)}},enumerable:!1,configurable:!0}),iE.prototype.getValues=function(){return this.values},iE.prototype.setValues=function(t){this.values=t,this.update({values:t})},iE.prototype.render=function(t,e){var o=this,n=t.orient,t=x(Nw(t,["selection","background"]),2),r=t[0],t=t[1];this.backgroundShape=P(e).maybeAppendByClassName("slider-background","rect").call(A,this.availableSpace).call(A,t);function i(t){var e="".concat(t,"-handle"),n=o.getHandleShapeCfg(t),r=n.x,i=n.y,a=Z(n,["x","y"]);return(n=o.foregroundGroup.maybeAppendByClassName(e,function(){return new Qk({style:a})}).style("type",t).update(a)).node().setLocalPosition(+r,+i),n}ok("horizontal"===n,P(e).maybeAppendByClassName("slider-sparkline-group","group"),function(t){var e=o.sparklineShapeCfg;t.maybeAppendByClassName("slider-sparkline",function(){return new Hk({style:e})}).call(function(t){t.node().update(e)})}),this.foregroundGroup=P(e).maybeAppendByClassName("slider-foreground","group"),this.selectionShape=this.foregroundGroup.maybeAppendByClassName("slider-selection","rect").call(A,this.calcMask()).call(A,r);this.startHandle=i("start"),this.endHandle=i("end")},iE.prototype.clampValues=function(t,e){void 0===t&&(t=this.getValues()),void 0===e&&(e=4);var n,r=x(this.range,2),i=r[0],r=r[1],a=x(this.getValues(),2),o=a[0],a=a[1],t=x(t||[o,a],2),s=t[0],t=t[1],l=t-s;return t<s&&(s=(n=x([t,s],2))[0],t=n[1]),r-i<l?[i,r]:s<i?o===i&&a===t?[i,t]:[i,l+i]:r<t?a===r&&o===s?[s,r]:[r-l,r]:[Ow(s,e),Ow(t,e)]},iE.prototype.calcMask=function(t){var t=x(this.clampValues(t),2),e=t[0],t=t[1],n=this.availableSpace,r=n.width,n=n.height;return this.getOrientVal([{y:0,height:n,x:e*r,width:(t-e)*r},{x:0,width:r,y:e*n,height:(t-e)*n}])},iE.prototype.calcHandlePosition=function(t){var e=this.availableSpace,n=e.width,e=e.height,r=x(this.clampValues(),2),i=r[0],r=r[1],t=("start"===t?i:r)*this.getOrientVal([n,e]);return{x:this.getOrientVal([t,n/2]),y:this.getOrientVal([e/2,t])}},iE.prototype.calcHandleText=function(t){var e,n=this.attributes,r=n.orient,n=n.formatter,i=Lw(this.attributes,"handle"),a=Lw(i,"label"),i=i.spacing,o=this.getHandleSize(),s=this.clampValues(),l=this.availableSpace,c=l.width,l=l.height,u=this.calcMask(),f=u.x,h=u.y,d=u.width,u=u.height,n=n("start"===t?s[0]:s[1]),s=this.appendChild(new Os({style:m(m(m({visibility:"hidden"},Aw),a),{text:n})})),a=s.getBBox(),p=a.width,a=a.height,s=(s.destroy(),0),y=0;return"horizontal"===r?(e=(r=i+o)+p/2,s="start"===t?0<f-r-p?-e:e:p<c-f-d-r?e:-e):(e=i+o,y="start"===t?a<h-o?-e:e:a<l-h-u-o?e:-e),{x:s,y:y,text:n}},iE.prototype.getHandleLabelShapeCfg=function(t){var e=Lw(this.attributes,"handleLabel");return m(m({},e),this.calcHandleText(t))},iE.prototype.getHandleIconShapeCfg=function(){var t=this.attributes.orient,e=Lw(this.attributes,"handleIcon"),n=this.getOrientVal(["ew-resize","ns-resize"]),r=this.getHandleSize();return m(m({},e),{orient:t,cursor:n,size:r})},iE.prototype.getHandleShapeCfg=function(t){var e=this.attributes.showHandle,n=this.calcHandlePosition(t),r=n.x,n=n.y,i=this.calcHandleText(t);return m(m(m({zIndex:3,visibility:e?"visible":"hidden"},Cw(this.getHandleIconShapeCfg(),"icon")),Cw(m(m({},this.getHandleLabelShapeCfg(t)),i),"label")),{x:r,y:n})},iE.prototype.getHandleSize=function(){var t,e=this.attributes.handleIconSize;return e||(t=(e=this.attributes).width,e=e.height,Math.floor((this.getOrientVal([+e,+t])+4)/2.4))},iE.prototype.getOrientVal=function(t){var t=x(t,2),e=t[0],t=t[1];return"horizontal"===this.attributes.orient?e:t},iE.prototype.setValuesOffset=function(t,e){void 0===e&&(e=0);var n=x(this.getValues(),2),r=n[0],n=n[1],t=[r+t,n+e].sort();this.setValues(t),this.onValueChange([r,n])},iE.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,e=e.height;return t/this.getOrientVal([n,e])},iE.prototype.bindEvents=function(){function n(t){return t&&".handle-text"!==t.className}var r=this,t=this.attributes,e=t.onBackgroundMouseenter,i=void 0===e?Tn:e,e=t.onBackgroundMouseleave,a=void 0===e?Tn:e,e=t.onSelectionMouseenter,o=void 0===e?Tn:e,e=t.onSelectionMouseleave,s=void 0===e?Tn:e,l=this.selectionShape,c=(l.on("mousedown",this.onDragStart("selection")),l.on("touchstart",this.onDragStart("selection")),this.dispatchEvent(new Io("selectionMouseenter")),l.on("mouseenter",function(){o(l),r.dispatchEvent(new Io("selectionMouseenter"))}),l.on("mouseleave",function(){s(l),r.dispatchEvent(new Io("selectionMouseleave"))}),[this.startHandle,this.endHandle].forEach(function(t){var e=t.node().attr("type");t.on("mousedown",function(t){n(t.target)&&r.onDragStart(e)(t)}),t.on("touchstart",function(t){n(t.target)&&r.onDragStart(e)(t)})}),this.backgroundShape);c.on("mousedown",this.onDragStart("background")),c.on("touchstart",this.onDragStart("background")),c.on("mouseenter",function(){i(c),r.dispatchEvent(new Io("backgroundMouseenter"))}),c.on("mouseleave",function(){a(c),r.dispatchEvent(new Io("backgroundMouseleave"))})},iE.defaultOptions={type:iE.tag="slider",style:m(m(m({values:[0,1],length:200,size:20,orient:"horizontal",backgroundZIndex:-1,backgroundCursor:"crosshair",backgroundFill:"#416180",backgroundOpacity:.05,selectionCursor:"move",selectionZIndex:2,selectionFill:"#5B8FF9",selectionFillOpacity:.45,sparklinePadding:1,padding:0,showHandle:!0,handleSpacing:2,formatter:function(t){return t}},Cw($k,"handle")),Cw(Xk,"handleIcon")),Cw(Kk,"handleLabel"))};var eE,nE,rE=iE;function iE(t){var a=eE.call(this,Ln({},iE.defaultOptions,t))||this;return a.range=[0,1],a.onDragStart=function(i){return function(t){t.stopPropagation(),a.target=i,a.prevPos=a.getOrientVal(Rw(t));var t=a.availableSpace,e=t.x,t=t.y,n=a.attributes,r=n.x,n=n.y;a.selectionStartPos=a.getRatio(a.prevPos-a.getOrientVal([e,t])-a.getOrientVal([+r,+n])),a.selectionWidth=0,a.addEventListener("mousemove",a.onDragging),a.addEventListener("touchmove",a.onDragging),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchend",a.onDragEnd)}},a.onDragging=function(t){t.stopPropagation();var t=a.getOrientVal(Rw(t)),e=t-a.prevPos;if(e){var n=a.getRatio(e);switch(a.target){case"start":a.setValuesOffset(n);break;case"end":a.setValuesOffset(0,n);break;case"selection":a.setValuesOffset(n,n);break;case"background":a.selectionWidth+=n,a.setValues([a.selectionStartPos,a.selectionStartPos+a.selectionWidth].sort())}a.prevPos=t}},a.onDragEnd=function(){a.removeEventListener("mousemove",a.onDragging),a.removeEventListener("mousemove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchend",a.onDragEnd)},a.onValueChange=function(t){var e=a.attributes.onValueChange,e=((void 0===e?Tn:e)(a.getValues(),t),new Io("valueChange",{detail:{oldValue:t,value:a.getValues()}}));a.dispatchEvent(e)},a.selectionStartPos=0,a.selectionWidth=0,a.prevPos=0,a.target="",a}function aE(t){var o=nE.call(this,Ln({},aE.defaultOptions,t))||this;return o.onValueChanged=function(t){var e=o.style.value;t!==e&&(e=new Io("scroll",t={detail:{oldValue:t,value:e}}),o.dispatchEvent(e),e=new Io("valueChanged",t),o.dispatchEvent(e))},o.onTrackClick=function(t){var e=o.attributes.thumbLen,n=x(o.getLocalPosition(),2),r=n[0],n=n[1],i=x(o.padding,4),a=i[0],i=i[3],r=o.getOrientVal([r+i,n+a]),i=o.getOrientVal(Rw(t))-e/2,n=o.valueOffset(i-r,!0);o.setValue(n)},o.onThumbMouseenter=function(){o.thumbShape.attr(o.getStyle("thumbStyle","active"))},o.onTrackMouseenter=function(){o.trackShape.attr(o.getStyle("trackStyle","active"))},o.onThumbMouseleave=function(){o.thumbShape.attr(o.getStyle("thumbStyle"))},o.onTrackMouseleave=function(){o.trackShape.attr(o.getStyle("trackStyle"))},o.onDragStart=function(t){t.stopPropagation(),o.prevPos=o.getOrientVal(Rw(t)),document.addEventListener("mousemove",o.onDragging),document.addEventListener("mouseup",o.onDragEnd),document.addEventListener("touchmove",o.onDragging),document.addEventListener("touchcancel",o.onDragEnd)},o.onDragging=function(t){t.stopPropagation();var t=o.getOrientVal(Rw(t)),e=t-o.prevPos;o.setOffset(e),o.prevPos=t},o.onDragEnd=function(t){t.preventDefault(),document.removeEventListener("mousemove",o.onDragging),document.removeEventListener("mouseup",o.onDragEnd),document.removeEventListener("touchmove",o.onDragging),document.removeEventListener("touchcancel",o.onDragEnd)},o}Me(aE,nE=Rc),Object.defineProperty(aE.prototype,"padding",{get:function(){return Sw(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(aE.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.width,t=t.height,n=x(this.padding,4),r=n[0],i=n[1],a=n[2],n=n[3];return{x:n,y:r,width:e-(n+i),height:t-(r+a)}},enumerable:!1,configurable:!0}),Object.defineProperty(aE.prototype,"trackLen",{get:function(){var t=this.availableSpace,e=t.width,t=t.height;return this.getOrientVal([e,t])},enumerable:!1,configurable:!0}),Object.defineProperty(aE.prototype,"thumbRadius",{get:function(){var t=this.attributes.isRound,e=this.availableSpace,n=e.width,e=e.height,r=_n(this.attributes,["thumbStyle","default","radius"]);return t?r||this.getOrientVal([e,n])/2:0},enumerable:!1,configurable:!0}),aE.prototype.render=function(t,e){var n=t.width,r=t.height,i=t.trackStyle,a=t.thumbStyle,o=t.value,s=t.thumbLen,t=t.orient,e=Dw(e,".track","rect").attr("className","track").style("width",null!=n?n:10).style("height",null!=r?r:200).call(A,Tw(i)).node(),n=this.valueOffset(o||0),r=this.availableSpace;this.thumbShape=Dw(e,".thumb","rect").attr("className","thumb").style("x","vertical"===t?r.x:r.x+n).style("y","vertical"===t?r.y+n:r.y).style("width","vertical"===t?r.width:s).style("height","vertical"===t?s:r.height).style("radius",this.thumbRadius).call(A,Tw(a)).node(),this.trackShape=e},aE.prototype.getValue=function(){return this.style.value},aE.prototype.setValue=function(t){var e=this.style,n=e.value,r=e.min,e=e.max;this.update({value:dn(t,r,e)}),this.onValueChanged(n)},aE.prototype.setOffset=function(t){var e=this.getValue();this.setValue(this.valueOffset(t,!0)+e)},aE.prototype.valueOffset=function(t,e){var n=this.attributes,r=n.thumbLen,i=n.min,n=n.max,r=this.trackLen-r;return(e=void 0!==e&&e)?t/r:r*dn(t,i,n)},aE.prototype.getStyle=function(t,e){return void 0===e&&(e="default"),Tw(_n(this.attributes,t),e)},aE.prototype.bindEvents=function(){this.trackShape.addEventListener("click",this.onTrackClick),this.thumbShape.addEventListener("mousedown",this.onDragStart),this.thumbShape.addEventListener("touchstart",this.onDragStart),this.onHover()},aE.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orient?t[0]:t[1]},aE.prototype.onHover=function(){this.thumbShape.addEventListener("mouseenter",this.onThumbMouseenter),this.trackShape.addEventListener("mouseenter",this.onTrackMouseenter),this.thumbShape.addEventListener("mouseleave",this.onThumbMouseleave),this.trackShape.addEventListener("mouseleave",this.onTrackMouseleave)},aE.defaultOptions={type:aE.tag="scrollbar",style:{orient:"vertical",min:0,max:1,isRound:!0,thumbLen:20,padding:[2,2,2,2],trackStyle:{default:{fill:"#fafafa",lineWidth:1,stroke:"#e8e8e8"},active:{}},thumbStyle:{default:{fill:"#c1c1c1"},active:{opacity:.8}}}};var rc={style:{data:[],dataThreshold:100,showTitle:!0,titlePosition:"lb",titleFill:"black",titleFontSize:12,titleTextAlign:"center",titleSpacing:0,titleTextBaseline:"middle",showLine:!0,lineLineWidth:1,lineStroke:"black",lineArrow:new gs({style:{path:"M 10,10 L -10,0 L 10,-10 L0,0 L10,10Z",anchor:"0.5 0.5",fill:"black",transformOrigin:"center"}}),lineArrowOffset:15,lineArrowSize:10,showTick:!0,tickDirection:"positive",tickStroke:"black",tickLength:5,tickLineWidth:1,tickStrokeOpacity:.65,showLabel:!0,labelSpacing:0,labelDirection:"positive",labelAlign:"parallel",labelTransforms:[],showGrid:!0,gridType:"segment",gridConnect:"line",gridDirection:"positive",gridLength:0,gridControlAngles:[]}},oE=(Ln({},rc,{style:{type:"arc"}}),Ln({},rc,{style:{}}),ck({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 sE(t,e,n,r){var i=n[e].data,n=n.map(function(t){return t.data}),i="function"==typeof r?r.call(null,i,e,n):r;t.attr(i||{})}function lE(t,e){return Object.fromEntries(Object.entries(t).map(function(t){t=x(t,2);return[t[0],ak(t[1],e)]}))}function cE(t,e){return e&&en(e)?t.filter(e):t}function uE(t){return t.reduce(function(t,e,n){return"".concat(t).concat(0===n?"M":" L").concat(e[0],",").concat(e[1])},"")}function fE(t,e,n){var r,i,a,o;return"surround"===e.type?(r=t,n=n,o=(e=e).connect,e=e.center,"line"===(void 0===o?"line":o)?uE(r):e?(i=Ww(r[0],e),a=n?0:1,r.reduce(function(t,e,n){var e=x(e,2),r=e[0],e=e[1];return(0===n?"M":"".concat(t,"A").concat(i,",").concat(i,",0,0,").concat(a,",")).concat(r,",").concat(e)},"")):""):uE(t)}function hE(t,e,n){function r(t,e){return"".concat(l," ").concat(t," ").concat(c," ").concat(e," ").concat(s)}var i=n.type,a=n.connect,o=n.center,s=n.closed?" Z":"",n=x([fE(t,n),fE(e.slice().reverse(),n,!0)],2),l=n[0],c=n[1],n=x([t[0],e.slice(-1)[0]],2),t=n[0],e=n[1];if("line"===a||"surround"===i)return r("L".concat(e.join()),"L".concat(t.join()));if(o)return a=(n=x([Ww(e,o),Ww(t,o)],2))[0],i=n[1],r("A".concat(a,",").concat(a,",0,0,1,").concat(e.join(" ")," L").concat(e.join()),"A".concat(i,",").concat(i,",0,0,0,").concat(t.join(" ")));throw new Error("Arc grid need to specified center")}function dE(t,e,n){n.type,n.center;var r=n.connect,i=n.areaFill;if(n.closed,!(e.length<2)&&i&&r){for(var a=Array.isArray(i)?i:[i,"transparent"],o=[],s=0;s<e.length-1;s++){var l=x([e[s].points,e[s+1].points],2),l=hE(l[0],l[1],n);o.push({path:l,fill:a[s%a.length]})}P(t).selectAll(".grid-region").data(o,function(t,e){return e}).join(function(t){return t.append("path").each(function(t,e){this.attr(t),sE(this,e,o,t)}).attr("className","grid-region")},function(t){return t.each(function(t,e){this.attr(t),sE(this,e,o,t)})},function(t){return t.remove()})}}Me(vE,pE=Rc),vE.prototype.render=function(t,e){t.className;var n,r,i,a,o=t.items,o=void 0===o?[]:o,s=(t.type,t.center,t.areaFill,t.closed,Z(t,["className","items","type","center","areaFill","closed"])),o=(o=o,t.closed?o.map(function(t){var e=t.points,n=x(e),r=n[0];return n.slice(1),m(m({},t),{points:b(b([],x(e),!1),[r],!1)})}):o);n=e,r=t,i=s,a=o.map(function(t,e){return{id:t.id||"grid-line-".concat(e),path:fE(t.points,r)}}),P(n).selectAll(".grid-line").data(a,function(t){return t.id}).join(function(t){return t.append("path").style("stroke","#D9D9D9").style("lineWidth",1).style("lineDash",[4,4]).each(function(t,e){t=t.path;this.attr(m(m({},i),{path:t})),sE(this,e,a,m({path:t},i))}).attr("className","grid-line")},function(t){return t.each(function(t,e){this.attr(t),sE(this,e,a,t)})},function(t){return t.remove()}),dE(e,o,t)};var pE,yE=vE;function vE(){return null!==pE&&pE.apply(this,arguments)||this}var gE=En(function(t,e){var e=x(e.angleRange,2),n=e[0];return(e[1]-n)*t+n},function(t,e){return b([t],x(e.angleRange),!1).join()}),mE=En(function(t,e){var n,r,i;return"linear"===e.type?(r=(n=x(e.startPos,2))[0],n=n[1],i=x(e.endPos,2),me([0,0],[(r=x([i[0]-r,i[1]-n],2))[0],r[1]])):(i=tk(gE(t,e)),[-Math.sin(i),Math.cos(i)])},function(t,e){var n="linear"===(n=e).type?b(b([],x(n.startPos),!1),x(n.endPos),!1):b(b(b([],x(n.angleRange),!1),x(n.center),!1),[n.radius],!1);return"arc"===e.type&&n.push(t),n.join()});function bE(t,e,n){var t=mE(t,n);return n=[],t=t,"positive"!==e?(n[0]=t[1],n[1]=-1*t[0]):(n[0]=-1*t[1],n[1]=t[0]),n}var xE=En(function(t,e){var n=x(e.startPos,2),r=n[0],n=n[1],e=x(e.endPos,2),e=x([e[0]-r,e[1]-n],2);return[r+e[0]*t,n+e[1]*t]},function(t,e){return b(b([t],x(e.startPos),!1),x(e.endPos),!1).join()}),wE=En(function(t,e){var n=e.radius,r=x(e.center,2),i=r[0],r=r[1],t=tk(gE(t,e));return[i+n*Math.cos(t),r+n*Math.sin(t)]},function(t,e){return b(b(b([t],x(e.angleRange),!1),[e.radius],!1),x(e.center),!1).join()});function kE(t,e){return("linear"===e.type?xE:wE)(t,e)}function EE(a,t,o){function e(t,e){var e=x(e,2),n=(r=x(e[0],2))[0],r=r[1],i=(e=x(e[1],2))[0],e=e[1];a.maybeAppendByClassName(t,"line").attr("className","".concat(oE.line.name," ").concat(t)).call(A,m(m({},o),{x1:n,y1:r,x2:i,y2:e}))}var n,r,i,s=t.startPos,l=t.endPos,c=t.truncRange,u=t.lineExtension,f=x([s,l],2),h=x(f[0],2),d=h[0],h=h[1],f=x(f[1],2),p=f[0],f=f[1],l=x(u?(s=x([s=s,l=l,u=void 0===(u=u)?[0,0]:u],3),u=(l=x(s[0],2))[0],l=l[1],y=(n=x(s[1],2))[0],n=n[1],v=(s=x(s[2],2))[0],s=s[1],u=(y=x([y-u,n-l],2))[0],n=y[1],l=Math.sqrt(Math.pow(u,2)+Math.pow(n,2)),v=(y=x([-v/l,s/l],2))[0],s=y[1],[v*u,v*n,s*u,s*n]):new Array(4).fill(0),4),y=l[0],v=l[1],u=l[2],s=l[3];a.node().removeChildren();c?(l=(n=x(c,2))[0],c=n[1],i=(l=x([d+(p-d)*l,h+(f-h)*l],2))[0],l=l[1],r=(c=x([d+(p-d)*c,h+(f-h)*c],2))[0],c=c[1],e(oE.lineFirst.name,[[d+y,h+v],[i,l]]),e(oE.lineSecond.name,[[r,c],[p+u,f+s]]),i=a,t.truncRange,t.truncShape,t.lineExtension,i.select(oE.lineFirst.class).node(),i.select(oE.lineSecond.class).node()):e("axis-line",[[d+y,h+v],[p+u,f+s]])}function ME(t,e,n){var r,i,a,o,s,l,c,u,f,h,d,p,y,v=e.type;"linear"===v?EE(t,e,n):(r=t,a=n,u=(c=x((i=e).angleRange,2))[0],c=c[1],o=(s=x(i.center,2))[0],s=s[1],i=i.radius,console.assert(u<c,"end angle should be greater than start angle"),(360==(l=c-u)?r.maybeAppendByClassName(oE.line,"circle").style("cx",o).style("cy",s).style("r",i):(d=(p=x([i,i],2))[0],p=p[1],f=(y=x([u*Math.PI/180,c*Math.PI/180],2))[0],y=y[1],h=(f=x([o+i*Math.cos(f),s+i*Math.sin(f)],2))[0],f=f[1],s=(o=x([o+i*Math.cos(y),s+i*Math.sin(y)],2))[0],i=o[1],y=180<l?1:0,o=c<u?0:1,l="M".concat(h,",").concat(f,",A").concat(d,",").concat(p,",0,").concat(y,",").concat(o,",").concat(s,",").concat(i),r.maybeAppendByClassName(oE.line,"path").style("path",l))).call(A,a)),c=t,u=v,h=n,d=(f=e).lineArrow,p=e.truncRange,y=void 0===(y=e.lineArrowOffset)?0:y,f=e.lineArrowSize,d&&(P(d=Qw(d)).call(A,m({},h)),hk(d,f,!0),("arc"!==u&&p?c.select(oE.lineSecond.class):c.select(oE.line.class)).style("markerEnd",d).style("markerEndOffset",-y))}function OE(t){var e=t.type,n=t.gridCenter;return"linear"===e?n:n||t.center}function SE(t,r){var e=r.gridLength,i=void 0===e?0:e;return t.map(function(t){var t=t.value,e=x(kE(t,r),2),n=e[0],e=e[1],t=x(ve([0,0],bE(t,r.gridDirection,r),i),2);return{points:[[n,e],[n+t[0],e+t[1]]]}})}function _E(t,e,n,r){var i=r.type,a=r.closed,o=r.areaFill,s=r.connect,l=OE(n),c=cE(e,n.gridFilter),e="segment"===i?SE(c,n):function(t,o,e){var s,l,c=e.controlAngles;if(!(e=OE(o)))throw new Error("grid center is not provid");if(t.length<2)throw new Error("Invalid grid data");if(c&&0!==c.length)return e=x(e,2),s=e[0],l=e[1],t.map(function(t){var t=x(kE(t.value,o),2),e=t[0],t=t[1],n=x([e-s,t-l],2),r=n[0],i=n[1],a=[[e,t]];return c.forEach(function(t){var t=tk(t),t=x([Math.cos(t),Math.sin(t)],2),e=t[0],t=t[1];a.push([r*e-i*t+s,r*t+i*e+l])}),{points:a}});throw new Error("Invalid gridControlAngles")}(c,n,r);t.maybeAppendByClassName(oE.grid,function(){return new yE({})}).update(m(m({type:i,connect:s,closed:a,center:l},r),{items:e,areaFill:en(o)?c.map(function(t,e){return ak(o,[t,e,c])}):o}))}Object.defineProperty(PE.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(PE.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(PE.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(PE.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(PE.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(PE.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),PE.prototype.clear=function(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},PE.prototype.empty=function(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},PE.prototype.add=function(t,e){return t<this.x1&&(this.x1=t),e<this.y1&&(this.y1=e),t>this.x2&&(this.x2=t),e>this.y2&&(this.y2=e),this},PE.prototype.rotate=function(t,e,n){t=this.rotatedPoints(t,e,n);return this.clear().add(t[0],t[1]).add(t[2],t[3]).add(t[4],t[5]).add(t[6],t[7])},PE.prototype.rotatedPoints=function(t,e,n){var r=this.x1,i=this.y1,a=this.x2,o=this.y2,s=Math.cos(t),t=Math.sin(t),l=e-e*s+n*t,e=n-e*t-n*s;return[[s*r-t*i+l,t*r+s*i+e],[s*r-t*o+l,t*r+s*o+e],[s*a-t*o+l,t*a+s*o+e],[s*a-t*i+l,t*a+s*i+e]].flat(1)},PE.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},PE.prototype.intersects=function(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)},PE.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE};var AE=PE;function PE(t){var t=t||{},e=t.left,n=t.top,r=t.right,t=t.bottom;this.x1=null!=e?e:+Number.MAX_VALUE,this.x2=null!=r?r:-Number.MAX_VALUE,this.y1=null!=n?n:+Number.MAX_VALUE,this.y2=null!=t?t:-Number.MAX_VALUE}function TE(t,c){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 t=t,n=(e=x(e=c,4))[0],r=e[1],i=e[2],e=e[3],a=(t=x(t,4))[0],o=t[1],i-=n,e-=r,s=t[2]-a,t=t[3]-o,0!=(l=i*t-s*e)&&(o=i*(i=r-o)-e*(r=n-a))<0!=(e=0<l)&&(n=s*i-t*r)<0!=e&&l<o!=e&&l<n!=e;var e,n,r,i,a,o,s,l})}function LE(t,e,n){void 0===n&&(n=[0,0,0,0]);var r=e.getEulerAngles()||0,i=(e.setEulerAngles(0),e.getLocalBounds()),a=i.min,o=i.max,i=i.halfExtents,s=a[0],l=2*i[0],i=2*i[1],a=a[1],c=o[0],o=o[1],u=0,f=0,h=s,d=a,p=("text"===e.tagName&&(i-=1.5,p=e.style.textAlign,y=e.style.textBaseline,u=+e.style.dx,f=+e.style.dy,"center"===p?h=(s+c)/2:"right"!==p&&"end"!==p||(h=c),"middle"===y?d=(a+o)/2:"bottom"!==y&&"baseline"!==y||(d=o)),x(n,4)),c=p[0],y=void 0===c?0:c,o=p[1],n=void 0===o?0:o,c=p[2],o=p[3];return t.set((u+=s)-(void 0===o?n:o),(f+=a)-y,u+l+n,f+i+(void 0===c?y:c)),e.setEulerAngles(r),t.rotatedPoints(tk(r),h,d)}function NE(t,a){var o;return b([],x(t.reduce(function(t,e,n){return n&&o&&(n=o,r=e,i=a,n=LE(new AE,n,i),TE(r=LE(new AE,r,i),[n[0],n[1],n[2],n[3]])||TE(r,[n[0],n[1],n[4],n[5]])||TE(r,[n[4],n[5],n[6],n[7]])||TE(r,[n[2],n[3],n[6],n[7]]))?(t.add(o),t.add(e)):o=e,t;var r,i},new Set)),!1)}var CE=function(t,e){var e=e.seq,n=void 0===e?2:e;return t.filter(function(t,e){return!(e%n&&(t.style.visibility="hidden"))})};var jE=new Map([["hide",function(t,e,n,r){var i=t.length,a=e.keepHeader,o=e.keepTail;if(!(i<=1||2===i&&a&&o)){var s,l,c,u=CE,f=2,h=t.slice(),d=t.slice(),p=Date.now(),y=Math.min.apply(Math,b([1],x(t.map(function(t){return t.getBBox().width})),!1));for("linear"!==n.type||0!==mE(0,n)[1]&&0!==mE(0,n)[0]||(n=Gw(t[0]).left,t=Gw(t[i-1]).right,t=Math.abs(t-n)||1,f=Math.max(Math.floor(i*y/t),f)),a&&(s=h.splice(0,1)[0]),o&&(l=h.splice(-1,1)[0],h.reverse());NE((l?b(b([l],x(d),!1),[s],!1):b([s],x(d),!1)).filter(function(t){return Jw(t)}),null==e?void 0:e.margin).length;)if((l&&!s&&f%2==0||l&&s)&&h.splice(0,1).forEach(r.hide),d=u(((c=h).forEach(r.show),c),{seq:f}),f++,200<Date.now()-p)return}}],["rotate",function(t,e,n,r){function i(){return NE(t,s).length<1}function a(n){t.forEach(function(t,e){e=an(n)?n[e]:n;_(e)||r.rotate(t,e)})}var o=void 0===(l=e.optionalAngles)?[0,45,90]:l,s=e.margin,l=e.recoverWhenFailed,e=t.map(function(t){return+(nk(t,"rotate")||0)});if(!i()){for(var c=0;c<o.length;c++)if(a(o[c]),i())return;l&&a(e)}}],["ellipsis",function(t,e,n,r){if(!(t.length<=1))for(var i,a,o=void 0===(s=e.suffix)?"...":s,s=e.minLength,l=e.maxLength,c=e.step,u=void 0===(e=e.margin)?[0,0,0,0]:e,e=(e=t[0],d=e.style.fontFamily||"sans-serif",v=e.style.fontWeight||"normal",i=e.style.fontStyle||"normal",a=e.style.fontVariant,{fontSize:"object"==typeof(e=e.style.fontSize)?e.value:e,fontFamily:d,fontWeight:v,fontStyle:i,fontVariant:a}),f=Ew(c,e)||1,h=Ew(s,e)||1,d=Ew(l,e),p=(!_(d)&&d!==1/0||(d=Math.max.apply(null,t.map(function(t){return t.getBBox().width}))),Date.now()),y=t.slice(),v=x(u,4),g=(v[0],v[1],v[2],v[3],d);h+f<g;g-=f){var m=function(e){return y.forEach(function(t){r.ellipsis(t,e,o)}),(y=NE(t,u)).length<1||300<Date.now()-p?{value:void 0}:void 0}(g);if("object"==typeof m)return m.value}}]]);function RE(i,a,o){var t=a.labelTransforms,t=void 0===t?[]:t;t.length&&t.forEach(function(t){var e,n=t.type,r=jE.get(n);e=i,n=n,a.labelTransforms&&("ellipsis"!==n||1<e.map(function(t){return t.querySelector("text")}).length)&&null!=r&&r(i,t,a,o)})}function IE(t){for(var e=t;e<0;)e+=360;return e%360}var FE=En(function(t,e){var t=x(t,2),n=t[0],t=t[1],e=x(e,2),r=e[0],e=e[1],n=x([n*r+t*e,n*e-t*r],2),e=n[0],t=n[1];return Math.atan2(t,e)},function(t,e){return b(b([],x(t),!1),x(e),!1).join()});function BE(t,e){return bE(t,e.labelDirection,e)}function DE(t,e,n){var r,i=n.labelAlign,e=nk(e,"rotate");return e?+e%180:(e=0,r=BE(t.value,n),t=mE(t.value,n),"horizontal"===i?0:(e="perpendicular"===i?FE([1,0],r):FE([t[0]<0?-1:1,0],t),ik(n=((n=ek(e))+360)%180,-90,90)||(n+=180),n))}function zE(t,e,n){e.setLocalEulerAngles(+t);t=function(t,e,n){var r=n.type,i=n.labelAlign,t=BE(t,n),n=IE(e),e=IE(ek(FE([1,0],t)));if([90,270].includes(e)&&!n)return"middle";if(!(e%180)&&[90,270].includes(n))return"middle";if("linear"!==r)return"parallel"===i?"middle":ik(n,90,270)?ik(e,90,270)?"start":"end":ik(e,90,270)?"end":"start";if(0===e){if(ik(n,0,90,!1,!0))return"start";if(ik(n,0,90)||ik(n,270,360))return"start"}if(90===e){if(ik(n,0,90,!1,!0))return"start";if(ik(n,90,180)||ik(n,270,360))return"end"}if(270===e){if(ik(n,0,90,!1,!0))return"end";if(ik(n,90,180)||ik(n,270,360))return"start"}if(180===e){if(90===n)return"start";if(ik(n,0,90)||ik(n,270,360))return"end"}return"start"}(e.__data__.value,t,n),n=e.querySelector(".axis-label-item");"text"===(null==n?void 0:n.nodeName)&&P(n).style("textAlign",t)}function GE(t,e,n,r){var i=r.showTick,a=r.tickLength,o=r.tickDirection,s=r.labelDirection,l=ak(r.labelSpacing,[t,e,n]),s=x([BE(t.value,r),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)}(s,o)],2),o=x(de([0,0],ve([0,0],s[0],l+(1===s[1]?ak(i?a:0,[t,e,n]):0)),kE(t.value,r)),2);return{x:o[0],y:o[1]}}function WE(t,e,n,r,i){var a=i.labelFormatter,o=BE(e.value,i),i=function(){return Qw(e.label||"")};return hn(a)?i=function(){return Qw(a)}:en(a)&&(i=function(){return Qw(ak(a,[e,n,r,o]))}),t.append(i).attr("className",oE.labelItem.name)}function VE(t,e,n,r,i,a){var o=null==(o=r.getElementsByClassName(oE.labelItem.toString()))?void 0:o[0],a=x(jw(lE(a,[t,e,n])),2),s=a[0],a=a[1],l=a.transform,a=Z(a,["transform"]);"text"===(null==o?void 0:o.nodeName)&&P(o).call(A,m({fontSize:12,fontFamily:"sans-serif",fontWeight:"normal",textBaseline:"middle"},s)),r.attr(m(m({},GE(t,e,n,i)),a)),rk(r,l),zE(DE(t,r,i),r,i)}function YE(n){RE(this.node().childNodes,n,{hide:function(t){t.style.visibility="hidden"},show:function(t){t.style.visibility="visible"},rotate:function(t,e){zE(+e,t,n)},ellipsis:function(t,e,n){null!=(t=t.querySelector("text"))&&t.attr("wordWrap",!0).attr("wordWrapWidth",e).attr("maxLines",1).attr("textOverflow",n)}})}function HE(t,e){return bE(t,e.tickDirection,e)}var qE=En(function(t,e){t=x(t,2);return[[0,0],[t[0]*e,t[1]*e]]},function(t,e){return b(b([],x(t),!1),[e],!1).join()});function UE(t,e,n,r,i){var a=i.tickFormatter,o=HE(e.value,i),i="line";return a instanceof N?i=function(){return a}:en(a)&&(i=function(){return ak(a,[e,n,r,o])}),t.append(i).attr("className",oE.tickItem.name)}function XE(t,e,n,r,i,a,o){var s=HE(t.value,a),l=(u=t,f=e,h=n,s=s,l=(a=a).tickLength,c=(a=x(kE(u.value,a),2))[0],a=a[1],s=x(qE(s,ak(l,[u,f,h])),2),u=(l=x(s[0],2))[0],f=l[1],h=x(s[1],2),{x:c,y:a,x1:u,x2:h[0],y1:f,y2:h[1]}),s=l.x1,c=l.x2,a=l.y1,u=l.y2,f=l.x,h=l.y,l=x(jw(lE(o,[t,e,n])),2),o=l[0],t=l[1];"line"===r.node().nodeName&&r.call(A,m({x1:s,x2:c,y1:a,y2:u},o)),i.attr(m({x:f,y:h},t)),A(r,o)}var KE={text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"left-top"},$E=ck({text:"text"},"title");function ZE(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(t){return t[0]}).join(""):2<t.length?t[0]:t}function JE(t,e){var n,r;try{for(var i=Se(Object.entries(e)),a=i.next();!a.done;a=i.next()){var o=x(a.value,2),s=o[0],l=o[1];t.node().attr(s)||t.style(s,l)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}Me(e5,QE=Rc),e5.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,n=t.height,r=t.position,i=t.spacing,t=t.inset,a=this.querySelector($E.text.class);if(!a)return{x:0,y:0,width:+e,height:+n};var a=a.getBBox().height,i=x(Sw(i),3),o=i[0],i=i[2],s=x([0,+n-a],2),l=s[0],s=s[1],r=ZE(r);if("i"===r)return{x:0,y:l,width:+e,height:+n};r.includes("t")&&(l=(o=x([a+o,+n-a-o],2))[0],s=o[1]),r.includes("b")&&(s=x([+n-a-i],1)[0]);o=x(Sw(t),4),r=o[0],n=o[1],a=o[2],i=o[3],t=x([i+n,r+a],2);return{x:i,y:l+r,width:+e-t[0],height:s-t[1]}},e5.prototype.render=function(t,e){t.width,t.height,t.position,t.spacing,t.class;var n,r,i,a=Z(t,["width","height","position","spacing","class"]),o=x(jw(a),2),s=o[0],t=(o[1],t=(o=t).width,l=o.height,o=o.position,n=x([+t/2,+l/2],2),u=(n=x([+n[0],+n[1],"center","middle"],4))[0],r=n[1],i=n[2],n=n[3],(o=ZE(o)).includes("l")&&(u=(c=x([0,"start"],2))[0],i=c[1]),o.includes("r")&&(u=(c=x([+t,"end"],2))[0],i=c[1]),o.includes("t")&&(r=(t=x([0,"top"],2))[0],n=t[1]),o.includes("b")&&(r=(c=x([+l,"bottom"],2))[0],n=c[1]),{x:u,y:r,textAlign:i,textBaseline:n}),o=t.x,l=t.y,c=t.textAlign,u=t.textBaseline;a.text?P(e).maybeAppendByClassName($E.text,"text").call(A,s).call(JE,{x:o,y:l,textAlign:c,textBaseline:u}):e.removeChildren()};var QE,t5=e5;function e5(t){return QE.call(this,Yw({},{style:KE},t=void 0===t?{}:t))||this}function n5(t,e,n){var r,i,a,o,s,t=t.select(oE.mainGroup.class);return t=t,e=e,r=(n=n).titlePosition,n=void 0===(n=n.titleSpacing)?0:n,r=ZE(void 0===r?"lb":r),i=(a=t.node().getBBox()).x,a=a.y,o=(t=x(t.node().getBounds().halfExtents,2))[0],t=t[1],s=(e=x(e.node().getBounds().halfExtents,2))[0],e=e[1],i=x([i+o,a+t],2),i=(a=x([i[0],i[1]],2))[0],a=a[1],r.includes("l")&&(i-=o+s+n),r.includes("r")&&(i+=o+s+n),r.includes("t")&&(a-=t+e+n),r.includes("b")&&(a+=t+e+n),{x:i,y:a}}function r5(t,e,n,r){var i,a,o,s;n.title&&(a=(t=x((t=t,i=(a=n).title,a=t.maybeAppendByClassName(oE.title,function(){return Qw(i)}),[t,a]),2))[0],t=t[1],a=a,e=e,n=n,o=(r=x(jw(r=r),2))[0],r=r[1],s=void 0===(s=r.transform)?"":s,r=Z(r,["transform"]),t.call(A,o),e=(o=n5(e,a,n)).x,n=o.y,a.node().attr(r),a.node().setPosition(e,n),rk(t,s))}var i5,a5=lk({render:function(n,e){var t=uk(n),r=t.type,i=t.data,a=t.dataThreshold,a=void 0===a?100:a,o=(t.crossSize,t.animation,t.title,t.showTitle),s=(t.titleSpacing,t.truncRange),l=(t.truncShape,t.showLine),c=(t.lineExtension,t.lineArrow,t.lineArrowOffset,t.lineArrowSize,t.showTick),u=(t.tickDirection,t.tickLength,t.tickFilter,t.tickFormatter,t.showLabel),f=(t.labelAlign,t.labelDirection,t.labelSpacing,t.labelFilter,t.labelFormatter,t.labelTransforms,t.showGrid),t=(t.gridFilter,t.gridLength,Z(t,["type","data","dataThreshold","crossSize","animation","title","showTitle","titleSpacing","truncRange","truncShape","showLine","lineExtension","lineArrow","lineArrowOffset","lineArrowSize","showTick","tickDirection","tickLength","tickFilter","tickFormatter","showLabel","labelAlign","labelDirection","labelSpacing","labelFilter","labelFormatter","labelTransforms","showGrid","gridFilter","gridLength"])),r=x(Nw("linear"===r?(t.startPos,t.endPos,Z(t,["startPos","endPos"])):(t.angleRange,t.radius,t.center,Z(t,["angleRange","radius","center"])),["title","line","tick","label","grid"]),5),h=r[0],d=r[1],p=r[2],y=r[3],t=r[4],v=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}(i,a).filter(function(t){t=t.value;return!(s&&t>s[0]&&t<s[1])}),r=P(e).maybeAppendByClassName(oE.gridGroup,"g"),i=(r.node().removeChildren(),f&&_E(r,v,n,t),P(e).maybeAppendByClassName(oE.mainGroup,"g")),a=(ok(l,i.maybeAppendByClassName(oE.lineGroup,"g"),function(t){ME(t,n,d)}),i.maybeAppendByClassName(oE.tickGroup,"g")),f=(ok(c,a,function(t){var r,i,a;t=t,i=p,a=cE(v,(r=n).tickFilter),t.selectAll(".axis-tick").data(a).join(function(t){return t.append("g").attr("className",oE.tick.name).each(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=UE.apply(void 0,b(b([P(this)],x(t),!1),[a,r],!1));XE.apply(void 0,b(b([],x(t),!1),[a,n,this,r,i],!1))})},function(t){return t.each(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.removeChildren();var n=UE.apply(void 0,b(b([P(this)],x(t),!1),[a,r],!1));XE.apply(void 0,b(b([],x(t),!1),[a,n,this,r,i],!1))})},function(t){return t.remove()})}),i.maybeAppendByClassName(oE.labelGroup,"g")),r=(ok(u,f,function(t){var e,r,i,a;e=t,i=y,a=cE(v,(r=n).labelFilter),e.selectAll(oE.label.class).data(a).join(function(t){return t.append("g").attr("className",oE.label.name).each(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];WE.apply(void 0,b(b([P(this)],x(t),!1),[a,r],!1)),VE.apply(void 0,b(b([],x(t),!1),[a,this,r,i],!1))}).call(function(){YE.call(e,r)})},function(t){return t.each(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=P(this);n.node().removeChildren(),WE.apply(void 0,b(b([n],x(t),!1),[a,r],!1)),VE.apply(void 0,b(b([],x(t),!1),[a,this,r,i],!1))}).call(function(){YE.call(e,r)})},function(t){return t.remove()})}),P(e).maybeAppendByClassName(oE.titleGroup,"g"));ok(o,r,function(t){r5(t,P(e),n,h)})}},m({},rc.style)),o5={pageViews:[],effect:"linear",duration:200,orient:"horizontal",initPage:0,loop:!1,buttonPath:[["M",(kc=0)-(wc=6),(nu=0)-wc],["L",kc+wc,nu],["L",kc-wc,nu+wc],["Z"]],buttonFill:"black",buttonSize:12,buttonCursor:"pointer",formatter:function(t,e){return"".concat(t,"/").concat(e)},pageNumFontSize:12,pageNumFill:"black",pageNumTextAlign:"start",pageNumTextBaseline:"middle",controllerPadding:5,controllerSpacing:5},s5=ck({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"),l5=(Me(c5,i5=Rc),Object.defineProperty(c5.prototype,"pageShape",{get:function(){var n,t=this.attributes.pageViews,t=x((n=t.map(function(t){t=t.getBBox();return[t.width,t.height]}))[0].map(function(t,e){return n.map(function(t){return t[e]})}).map(function(t){return Math.max.apply(Math,b([],x(t),!1))}),2),e=t[0],t=t[1],r=this.attributes,i=r.pageWidth,r=r.pageHeight;return{pageWidth:void 0===i?e:i,pageHeight:void 0===r?t:r}},enumerable:!1,configurable:!0}),Object.defineProperty(c5.prototype,"currPage",{get:function(){return this._currPage},enumerable:!1,configurable:!0}),Object.defineProperty(c5.prototype,"finished",{get:function(){var t,n=this;return this.finishedPromise||(this.finishedPromise=new Promise(function(t,e){n.resolveFinishedPromise=function(){n.finishedPromise=null,t(n.currPage)}})),"idle"===this.playState&&null!=(t=this.resolveFinishedPromise)&&t.call(this),this.finishedPromise},enumerable:!1,configurable:!0}),c5.prototype.setVisiblePages=function(n){this.attributes.pageViews.forEach(function(t,e){n.includes(e)?t.attr("visibility","visible"):t.attr("visibility","hidden")})},c5.prototype.adjustControllerLayout=function(){var t=this.prevBtnGroup,e=this.nextBtnGroup,n=this.pageInfoGroup,r=this.attributes,i=r.orient,r=r.controllerPadding,a=n.getBBox(),o=a.width,a=(a.height,x("horizontal"===i?[-180,0]:[-90,90],2)),s=a[0],a=a[1],s=(t.setLocalEulerAngles(s),e.setLocalEulerAngles(a),t.getBBox()),a=s.width,s=s.height,l=e.getBBox(),c=l.width,l=l.height,c=Math.max(a,o,c),i="horizontal"===i?{offset:[[0,0],[a/2+r,0],[a+o+2*r,0]],textAlign:"start"}:{offset:[[c/2,-s-r],[c/2,0],[c/2,l+r]],textAlign:"center"},a=x(i.offset,3),o=x(a[0],2),s=o[0],c=o[1],l=x(a[1],2),r=l[0],o=l[1],l=x(a[2],2),a=l[0],l=l[1],i=i.textAlign,u=n.querySelector("text");u&&(u.style.textAlign=i),t.setLocalPosition(s,c),n.setLocalPosition(r,o),e.setLocalPosition(a,l)},c5.prototype.updatePageInfo=function(){var t,e=this.currPage,n=this.attributes,r=n.formatter,n=n.pageViews;n.length<2||(null!=(t=this.pageInfoGroup.querySelector(s5.pageInfo.class))&&t.attr("text",r(e+1,n.length)),this.adjustControllerLayout())},c5.prototype.getFollowingPageDiff=function(t){var e=this.attributes.orient,n=this.pageShape,r=n.pageWidth,n=n.pageHeight,t=t<this.currPage?-1:1;return"horizontal"===e?[t*r,0]:[0,t*n]},c5.prototype.prepareFollowingPage=function(t){var e=this.attributes.pageViews,n=(this.setVisiblePages([t,this.currPage]),x(this.getFollowingPageDiff(t),2)),r=n[0],n=n[1];e[t].setLocalPosition(r,n)},c5.prototype.renderController=function(t){var e,n,r,i,a=this,o=this.attributes,s=o.controllerSpacing,o=o.pageViews,l=this.pageShape,c=l.pageWidth,l=l.pageHeight;o.length<2||(r=(o=x(Nw(this.attributes,["button","pageNum"]),2))[0],o=o[1],i=(r=x(jw(r),2))[0],r=r[1],e=i.size,i=Z(i,["size"]),n=t.maybeAppendByClassName(s5.prevBtnGroup,"g").call(A,r),this.prevBtnGroup=n.node(),n.maybeAppendByClassName(s5.prevBtn,"path").attr("className","btn"),r=t.maybeAppendByClassName(s5.nextBtnGroup,"g").call(A,r),this.nextBtnGroup=r.node(),r.maybeAppendByClassName(s5.nextBtn,"path").attr("className","btn"),t.selectAll(".btn").call(A,i).each(function(){P(this).style("transformOrigin","center"),hk(P(this).node(),e,!0)}),i=t.maybeAppendByClassName(s5.pageInfoGroup,"g"),this.pageInfoGroup=i.node(),i.maybeAppendByClassName(s5.pageInfo,"text").style("text","").call(A,m(m({},Aw),o)),this.updatePageInfo(),t.node().setLocalPosition(c+s,l/2),n.on("click",function(){a.prev()}),r.on("click",function(){a.next()}))},c5.prototype.goTo=function(e){var n=this,t=this.attributes,r=t.duration,i=t.effect,t=t.pageViews,a=this.currPage,o=this.playState,s=this.finished,l=this.playWindow;return e===a||"idle"!==o||e<0||e>=t.length||(t[a].setLocalPosition(0,0),this.prepareFollowingPage(e),o={duration:r,easing:i,fill:"both"},a=(t=x(this.getFollowingPageDiff(e),2))[0],r=t[1],this.playState="running",Promise.all([l.animate([{transform:"translate(0, 0)"},{transform:"translate(".concat(-a,", ").concat(-r,")")}],o)].map(function(t){return null==t?void 0:t.finished})).then(function(){var t;n._currPage=e,n.playState="idle",n.setVisiblePages([e]),n.updatePageInfo(),null!=(t=n.resolveFinishedPromise)&&t.call(n)})),{finished:s}},c5.prototype.prev=function(){var t=this.attributes,e=t.loop,t=t.pageViews.length,n=this.currPage,e=e?(n-1+t)%t:dn(n-1,0,t);return this.goTo(e)},c5.prototype.next=function(){var t=this.attributes,e=t.loop,t=t.pageViews.length,n=this.currPage,e=e?(n+1)%t:dn(n+1,0,t);return this.goTo(e)},c5.prototype.render=function(t,e){var n=this,r=t.pageViews,t=t.initPage,i=(this.clipPath=P(e).maybeAppendByClassName(s5.clipPath,function(){return new Es({style:{x:0,y:0,width:0,height:0}})}),P(e).maybeAppendByClassName(s5.contentGroup,"g").style("x",0).style("y",0).style("clipPath",this.clipPath.node())),i=(this.clipPath.style("width",this.pageShape.pageWidth).style("height",this.pageShape.pageHeight),this.playWindow=i.maybeAppendByClassName(s5.playWindow,"g").node(),this.playWindow.removeChildren(),r.forEach(function(t){return n.playWindow.appendChild(t)}),this.setVisiblePages([t]),P(e).maybeAppendByClassName(s5.controller,"g"));this.renderController(i),this.goTo(t)},c5);function c5(t){t=i5.call(this,Yw({},{style:o5},t))||this;return t._currPage=0,t.finishedPromise=null,t.resolveFinishedPromise=null,t.playState="idle",t}function u5(t,e,n){return"horizontal"===(t=void 0===t?"horizontal":t)?e:n}xk.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"]]}),xk.registerSymbol("verticalHandle",function(t,e,n){var r=1.4*n,i=n/2,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+(n=n/6)],["L",t+r-2,e+n],["M",a,e-n],["L",t+r-2,e-n]]}),xk.registerSymbol("horizontalHandle",function(t,e,n){var r=1.4*n,i=n/2,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-(n=n/6),a],["L",t-n,e+r-2],["M",t+n,a],["L",t+n,e+r-2]]});var f5,h5=ck({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"),d5={span:[1,1],marker:"path",markerD:yk(6,6,6),markerFill:"#d3d2d3",markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelFontFamily:"sans-serif",valueFontFamily:"sans-serif",labelTextAlign:"start",valueTextAlign:"start",labelTextBaseline:"middle",valueTextBaseline:"middle"},p5=(Me(y5,f5=Rc),Object.defineProperty(y5.prototype,"showValue",{get:function(){var t=this.attributes.value;return!!t&&(hn(t)||pn(t)?""!==t:""!==t.attr("text"))},enumerable:!1,configurable:!0}),Object.defineProperty(y5.prototype,"actualSpace",{get:function(){var t=this.markerGroup,e=this.labelGroup,n=this.valueGroup,t=t.node().getBBox(),r=t.width,t=t.height,e=e.node().getBBox(),i=e.width,e=e.height,n=n.node().getBBox(),a=n.width,n=n.height;return{markerWidth:r,labelWidth:i,valueWidth:a,height:Math.max(t,e,n)}},enumerable:!1,configurable:!0}),Object.defineProperty(y5.prototype,"span",{get:function(){var t,e=this.attributes;return"span"in e?(t=(e=x(Sw(e.span),2))[0],e=e[1],[t/(e=t+(t=this.showValue?e:0)),t/e]):[1,1]},enumerable:!1,configurable:!0}),Object.defineProperty(y5.prototype,"shape",{get:function(){var t=this.attributes,e=t.markerSize,t=t.width,n=this.actualSpace,r=n.markerWidth,n=n.height,i=this.actualSpace,a=i.labelWidth,i=i.valueWidth,o=x(this.spacing,2),s=o[0],o=o[1];return t&&(t=t-e-s-o,e=x(this.span,2),a=(e=x([e[0]*t,e[1]*t],2))[0],i=e[1]),{width:r+a+i+s+o,height:n,markerWidth:r,labelWidth:a,valueWidth:i}},enumerable:!1,configurable:!0}),Object.defineProperty(y5.prototype,"spacing",{get:function(){var t,e=this.attributes.spacing;return e?(t=(e=x(Sw(e),2))[0],e=e[1],this.showValue?[t,e]:[t,0]):[0,0]},enumerable:!1,configurable:!0}),Object.defineProperty(y5.prototype,"layout",{get:function(){var t=this.shape,e=t.markerWidth,n=t.labelWidth,r=t.valueWidth,i=t.width,t=t.height,a=x(this.spacing,2),o=a[0];return{height:t,width:i,markerWidth:e,labelWidth:n,valueWidth:r,position:[e/2,e+o,e+n+o+a[1]]}},enumerable:!1,configurable:!0}),y5.prototype.renderMarker=function(t){var e=this,n=this.attributes,r=n.marker,i=n.markerSize,a=Lw(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(h5.markerGroup,"g"),ok(!!r,this.markerGroup,function(){e.markerGroup.maybeAppendByClassName(h5.marker,r).call(A,m({anchor:"0.5 0.5"},a)),hk(e.markerGroup.node(),i,!0)})},y5.prototype.renderLabel=function(t){var e=this.attributes.label,n=Lw(this.attributes,"label");this.labelGroup=t.maybeAppendByClassName(h5.labelGroup,"g"),this.labelGroup.maybeAppendByClassName(h5.label,function(){return Qw(e)}).call(A,n)},y5.prototype.renderValue=function(t){var e=this,n=this.attributes.value,r=Lw(this.attributes,"value");this.valueGroup=t.maybeAppendByClassName(h5.valueGroup,"g"),ok(this.showValue,this.valueGroup,function(){e.valueGroup.maybeAppendByClassName(h5.value,function(){return Qw(n)}).call(A,r)})},y5.prototype.renderBackground=function(t){var e=this.shape,n=e.width,e=e.height,r=Lw(this.attributes,"background");this.background=t.maybeAppendByClassName(h5.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(h5.background,"rect").call(A,m({width:n,height:e},r))},y5.prototype.adjustLayout=function(){var t=this.layout,e=(t.markerWidth,t.labelWidth),n=t.valueWidth,r=(t.width,t.height),t=x(t.position,3),i=t[0],a=t[1],t=t[2],r=r/2;this.markerGroup.call(A,{x:i,y:r}),this.labelGroup.call(A,{x:a,y:r}),fk(this.labelGroup.select(h5.label.class),e),this.showValue&&(this.valueGroup.call(A,{x:t,y:r}),fk(this.valueGroup.select(h5.value.class),n))},y5.prototype.render=function(t,e){e=P(e);this.renderMarker(e),this.renderLabel(e),this.renderValue(e),this.renderBackground(e),this.adjustLayout()},y5);function y5(t){return f5.call(this,Yw({},{style:d5},t))||this}function v5(t,e,n){return void 0===n&&(n=!0),t?e(t):n}var g5,m5=ck({itemPage:"item-page",navigator:"navigator",pageView:"page-view",item:"item"},"items"),b5={data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orient:"horizontal",click:Tn,mouseenter:Tn,mouseleave:Tn},x5=(Me(w5,g5=Rc),Object.defineProperty(w5.prototype,"attrs",{get:function(){return uk(this.attributes)},enumerable:!1,configurable:!0}),Object.defineProperty(w5.prototype,"grid",{get:function(){var t=this.attrs,e=t.gridRow,n=t.gridCol,t=t.data;if(e||n)return e&&n?[e,n]:e?[e,t.length]:[t.length,n];throw new Error("gridRow and gridCol can not be set null at the same time")},enumerable:!1,configurable:!0}),Object.defineProperty(w5.prototype,"renderData",{get:function(){var t=this.attrs,a=t.data,o=t.layout,s=Lw(this.attrs,"item");return a.map(function(e,n){var t=e.id,r=e.label,i=e.value;return{id:"".concat(void 0===t?n:t),index:n,style:m({layout:o,label:r,value:i},Object.fromEntries(Object.entries(s).map(function(t){t=x(t,2);return[t[0],ak(t[1],[e,n,a])]})))}})},enumerable:!1,configurable:!0}),w5.prototype.getGridLayout=function(){var u=this,t=this.attrs,f=t.orient,h=t.width,d=t.rowPadding,p=t.colPadding,y=x(this.navigatorShape,1)[0],t=x(this.grid,2),v=t[0],g=t[1],m=g*v,b=0;return this.itemsCache.children.map(function(t,e){var n,r=Math.floor(e/m),i=e%m,a=u.ifHorizontal(g,v),a=[Math.floor(i/a),i%a],a=("vertical"===f&&a.reverse(),x(a,2)),o=a[0],a=a[1],s=(h-y-(g-1)*p)/g,t=t.getBBox().height,l=x([0,0],2),c=l[0],l=l[1];return b="horizontal"===f?(c=(n=x([b,o*(t+d)],2))[0],l=n[1],a===g-1?0:b+s+p):(c=(n=x([a*(s+p),b],2))[0],l=n[1],o===v-1?0:b+t+d),{page:r,index:e,row:o,col:a,pageIndex:i,width:s,height:t,x:c,y:l}})},w5.prototype.getFlexLayout=function(){var t=this.attrs,e=t.width,n=t.height,a=t.rowPadding,o=t.colPadding,t=x(this.navigatorShape,1)[0],r=x(this.grid,2),s=r[0],l=r[1],r=x([e-t,n],2),c=r[0],u=r[1],e=x([0,0,0,0,0,0,0,0],8),f=e[0],h=e[1],d=e[2],p=e[3],y=e[4],v=e[5],g=e[6],m=e[7];return this.itemsCache.children.map(function(t,e){var t=t.getBBox(),n=t.width,t=t.height,r=0===g?0:o,i=g+r+n;return i<=c&&v5(y,function(t){return t<l})?(r=x([g+r,m,i],3),f=r[0],h=r[1],g=r[2]):(i=x([v+1,0,0,m+t+a],4),v=i[0],y=i[1],g=i[2],(m=i[3])+a+t<=u&&v5(v,function(t){return t<s})?(r=x([g,m,n],3),f=r[0],h=r[1],g=r[2]):(i=x([0,0,n,0,d+1,0,0,0],8),f=i[0],h=i[1],g=i[2],m=i[3],d=i[4],p=i[5],v=i[6],y=i[7])),{width:n,height:t,x:f,y:h,page:d,index:e,pageIndex:p++,row:v,col:y++}})},Object.defineProperty(w5.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var t="grid"===this.attributes.layout?this.getGridLayout:this.getFlexLayout,e=t.call(this);return 0<e.slice(-1)[0].page?(this.navigatorShape=[55,0],t.call(this)):e},enumerable:!1,configurable:!0}),w5.prototype.ifHorizontal=function(t,e){return u5(this.attrs.orient,t,e)},w5.prototype.renderItems=function(){var t=this.attrs,e=t.click,n=t.mouseenter,r=t.mouseleave,i=(this.items=[],this.itemsCache.removeChildren(),this.items);P(this.itemsCache).selectAll(m5.itemPage.class).data(this.renderData).join(function(t){return t.append(function(t){t=t.style,t=new p5({style:t});return i.push(t),t}).attr("className",m5.item.name).on("click",function(){null!=e&&e(this)}).on("mouseenter",function(){null!=n&&n(this)}).on("mouseleave",function(){null!=r&&r(this)})},function(t){return t.each(function(t){t=t.style;this.update(t)})},function(t){return t.remove()}),this.appendChild(this.itemsCache).style.visibility="hidden"},w5.prototype.adjustLayout=function(){var n,u=this.items,t=this.itemsLayout;P(this.pageViews).selectAll(m5.itemPage.class).data(Object.entries((n="page",t.reduce(function(t,e){return(t[e[n]]=t[e[n]]||[]).push(e),t},{}))).map(function(t){t=x(t,2);return{page:t[0],items:t[1]}})).join(function(t){return t.append("g").attr("className",m5.itemPage.name).each(function(t){var c=this;t.items.forEach(function(t){var n,r,i,e=t.x,a=t.y,o=t.index,s=t.width,l=t.height,o=c.appendChild(u[o]);n=t,r=o,(i=hn(t="__data__")?t.split("."):t).forEach(function(t,e){e<i.length-1?(on(r[t])||(r[t]=pn(i[e+1])?[]:{}),r=r[t]):r[t]=n}),o.update({x:e,y:a,width:s,height:l})})})},function(t){return t},function(t){return t.remove()}),this.removeChild(this.itemsCache)},w5.prototype.renderNavigator=function(t){var e=this.attrs,n=e.orient,r=e.layout,e=e.width,i=x(this.navigatorShape,2),a=i[0],i=i[1],o=Lw(this.attrs,"nav"),s=(null==(s=this.pageViews.children[0])?void 0:s.getBBox().height)||0,r="grid"===r?{pageWidth:e-a,pageHeight:s-i}:{},l=m(m(m({},o),r),{orient:n,pageViews:this.pageViews.children});t.maybeAppendByClassName(m5.navigator,function(){return new l5({style:l})}).update(o)},w5.prototype.render=function(t,e){e=P(e);this.renderItems(),this.adjustLayout(),this.renderNavigator(e)},w5);function w5(t){t=g5.call(this,Yw({},{style:b5},t))||this;return t.items=[],t.itemsCache=new cs,t.pageViews=new cs({className:m5.pageView.name}),t.navigatorShape=[0,0],t}var k5,n={style:{padding:0,orient:"horizontal",backgroundFill:"transparent",titleText:"",showTitle:!0,titleSpacing:4,titlePosition:"left-top",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12}},E5=Ln({},n,{style:{type:"category",items:[],maxCols:void 0,maxRows:void 0,spacing:[8,2],itemBackground:{padding:0,style:{fill:"transparent",active:{cursor:"pointer"}}},reverse:!1}}),M5=Ln({},n,{style:{type:"continuous",color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],slidable:!0,showHandle:!0,showLabel:!0,showIndicator:!0,labelSpacing:5,indicatorLabelFill:"white",indicatorLabelFontSize:12,indicatorBackgroundFill:"#262626"}}),O5=ck({title:"title",titleGroup:"title-group",items:"items",itemsGroup:"items-group",contentGroup:"content-group",ribbonGroup:"ribbon-group",ribbon:"ribbon",handlesGroup:"handles-group",startHandle:"start-handle",endHandle:"end-handle",labelGroup:"label-group",label:"label",indicator:"indicator"},"legend"),S5=(Me(_5,k5=Rc),_5.prototype.renderTitle=function(t,e,n){var r=this.attributes.showTitle,i=x(jw(Lw(this.attributes,"title")),2),a=i[0],i=i[1];this.titleGroup=t.maybeAppendByClassName(O5.titleGroup,"g").call(A,i),ok(!!r,this.titleGroup,function(t){t.maybeAppendByClassName(O5.title,function(){return new t5({style:m({width:e,height:n},a)})}).update(a)})},_5.prototype.renderItems=function(t,e,n){var r=this,i=x(Nw(this.attributes,["title"]),2),i=x(jw(i[1]),2),a=i[0],i=i[1],o=m(m({},a),{width:e,height:n});this.itemsGroup=t.maybeAppendByClassName(O5.itemsGroup,"g").call(A,i),this.itemsGroup.maybeAppendByClassName(O5.items,function(){return new x5({style:o})}).update(i),Object.entries(o).forEach(function(t){var t=x(t,2),e=t[0],t=t[1];return r.itemsGroup.attr(e,t)})},_5.prototype.adjustLayout=function(){var t,e;this.attributes.showTitle&&(t=(e=this.titleGroup.select(O5.title.class).node().getAvailableSpace()).x,e=e.y,this.itemsGroup.node().setLocalPosition(t,e))},Object.defineProperty(_5.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.showTitle,n=t.width,t=t.height;return e?[(e=this.titleGroup.select(O5.title.class).node().getAvailableSpace()).width,e.height]:[n,t]},enumerable:!1,configurable:!0}),_5.prototype.render=function(t,e){var n=t.width,t=t.height,e=P(e);this.renderTitle(e,n,t),this.renderItems.apply(this,b([e],x(this.availableSpace),!1)),this.adjustLayout()},_5);function _5(t){return k5.call(this,Yw({},E5,t))||this}var A5,P5={formatter:function(t){return t},padding:[2,4],position:"right",labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",backgroundZIndex:-1,backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333"},T5=ck({background:"background",labelGroup:"label-group",label:"label"},"indicator"),L5=(Me(N5,A5=Rc),N5.prototype.renderBackground=function(){var t=this.style,e=t.position,t=x(Sw(t.padding),4),n=t[0],r=t[1],i=t[2],t=t[3],a=this.label.node().getLocalBounds(),o=a.min,a=a.max,t=[[o[0]-t,o[1]-n],[a[0]+r,a[1]+i]],o=this.getPath(e,t),n=Lw(this.attributes,"background");this.background=P(this.group).maybeAppendByClassName(T5.background,"path").call(A,n).style("path",o),this.group.appendChild(this.label.node())},N5.prototype.renderLabel=function(){var t=this.attributes,e=t.value,n=t.formatter,t=x(jw(Lw(this.attributes,"label")),2),r=t[0],t=t[1];this.label=P(this.group).maybeAppendByClassName(T5.labelGroup,"g").call(A,t),e&&this.label.maybeAppendByClassName(T5.label,function(){return Qw(n(e))}).style("text",n(e).toString()).selectAll("text").call(A,m(m({},Aw),r))},N5.prototype.adjustLayout=function(){var t=x(this.point,2),e=t[0],t=t[1];this.group.attr("x",-e).attr("y",-t)},N5.prototype.getPath=function(n,t){var r=this,t=x(t,2),e=x(t[0],2),i=e[0],e=e[1],t=x(t[1],2),a=t[0],t=t[1],o={top:"bottom",right:"left",bottom:"top",left:"right"},a=Object.entries({top:[[i,e],[a,e]],right:[[a,e],[a,t]],bottom:[[a,t],[i,t]],left:[[i,t],[i,e]]}).map(function(t){var t=x(t,2),e=t[0],t=t[1];return e===o[n]?r.createCorner(t):[b(["M"],x(t[0]),!1),b(["L"],x(t[1]),!1)]});return a.push([["Z"]]),a.flat().filter(function(t,e,n){return 0===e||"M"!==t[0]})},N5.prototype.createCorner=function(t,e){void 0===e&&(e=10);var n=function(t,e){var n=(t=x(t,2))[0],t=t[1],r=(e=x(e,2))[0],e=e[1];return n!==r&&t===e}.apply(void 0,b([],x(t),!1)),t=x(t,2),r=x(t[0],2),i=r[0],r=r[1],t=x(t[1],2),a=t[0],t=t[1],a=x(n?[a-i,[i,a]]:[t-r,[r,t]],2),t=a[0],a=x(a[1],2),o=a[0],a=a[1],s=t/2,e=e*(t/Math.abs(t)),t=e/2,e=e*Math.sqrt(3)/2*.8,o=x([o,o+s-t,o+s,o+s+t,a],5),s=o[0],t=o[1],a=o[2],l=o[3],o=o[4];return n?(this.point=[a,r-e],[["M",s,r],["L",t,r],["L",a,r-e],["L",l,r],["L",o,r]]):(this.point=[i+e,a],[["M",i,s],["L",i,t],["L",i+e,a],["L",i,l],["L",i,o]])},N5.prototype.bindEvents=function(){this.label.on(mo.BOUNDS_CHANGED,this.renderBackground)},N5.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout()},N5);function N5(t){void 0===t&&(t={});t=A5.call(this,Yw({},{style:m({visibility:"hidden"},P5)},t))||this;return t.point=[0,0],t.group=t.appendChild(new cs({})),t}var C5=ck({marker:"marker",labelGroup:"labelGroup",label:"label"},"handle"),j5=lk({render:function(t,e){var a,o=t.orient,n=t.visibility,r=t.spacing,s=void 0===r?0:r,r=t.showLabel,l=t.formatter,i=t.markerSymbol,i=void 0===i?u5(o,"horizontalHandle","verticalHandle"):i,t=x(Nw(t,["label","marker"]),2),c=t[0],t=t[1],u=c.text,f=Z(c,["text"]);i&&"hidden"!==n?(c=m({symbol:i},t),a=P(e).maybeAppend(C5.marker.name,function(){return new xk({})}).update(c),ok(r,P(e).maybeAppendByClassName(C5.labelGroup,"g"),function(t){var t=t.maybeAppendByClassName(C5.label,"text").call(A,m({text:l(u).toString()},f)),e=a.node().getBBox(),n=e.width,e=e.height,e=x(u5(o,[0,e+s,"center","top"],[n+s,0,"start","middle"]),4),n=e[0],r=e[1],i=e[2],e=e[3];t.node().setLocalPosition(n,r),t.style("textAlign",i).style("textBaseline",e)})):(null!=(n=e.querySelector(C5.marker.class))&&n.remove(),null!=(i=e.querySelector(C5.label.class))&&i.remove())}},m({},{markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orient:"vertical",spacing:0,showLabel:!0,formatter:function(t){return t.toString()}}));function R5(t,e){var t=x(function(t,e){for(var n=1;n<t.length;n+=1){var r=t[n-1],i=t[n];if(r<=e&&e<=i)return[r,i]}return[e,e]}(t,e),2),n=t[0],t=t[1];return{tick:(n+t)/2<e?t:n,range:[n,t]}}var I5=ck({backgroundGroup:"background-group",background:"background",ribbonGroup:"ribbon-group",ribbon:"ribbon",clipPath:"clip-path"},"ribbon");function F5(t){var e=t.orient,n=t.size,t=t.len;return u5(e,[t,n],[n,t])}function B5(t){var e=t.type,t=x(F5(t),2),n=t[0],t=t[1];return"size"===e?[["M",0,t],["L",0+n,0],["L",0+n,t],["Z"]]:[["M",0,t],["L",0,0],["L",0+n,0],["L",0+n,t],["Z"]]}function D5(t){var e,n,i,a,r=t.orient,o=t.color,s=t.block,t=t.blocks,l=(e=en(o)?new Array(20).fill(0).map(function(t,e,n){return o(e/(n.length-1))}):o).length;return l?s?(s=t,t=e,n=r,i=Array.from(t),a=s+1,new Array(a).fill(0).reduce(function(t,e,n){var r=i[n%i.length];return t+" ".concat(n/(a-1),":").concat(r).concat(n<a-1?" ".concat((n+1)/(a-1),":").concat(r):"")},"l(".concat("horizontal"===n?"0":"270",")"))):e.reduce(function(t,e,n){return t+" ".concat(n/(l-1),":").concat(e)},"l(".concat(u5(r,"0","270"),")")):""}function z5(t,e,n){var r,i,a,o=D5(e),t=t.maybeAppendByClassName(I5.ribbon,"path").call(A,m({path:B5(e),fill:o},n)),n=t.maybeAppendByClassName(I5.clipPath,"path").call(A,{path:(n=(o=e).orient,(e=o.range)?(i=(o=x(F5(o),2))[0],o=o[1],r=(e=x(e,2))[0],e=e[1],a=u5(n,r*i,0),r=u5(n,0,r*o),i=u5(n,e*i,i),[["M",a,r],["L",a,a=u5(n,o,e*o)],["L",i,a],["L",i,r],["Z"]]):[])}).node();t.style("clip-path",n)}var G5,W5,V5,Y5,H5=lk({render:function(t,e){var n,r=x(Nw(t,["ribbon","background"]),2),i=r[0],r=r[1],a=P(e).maybeAppendByClassName(I5.backgroundGroup,"g");n=t,r=r,a.maybeAppendByClassName(I5.background,"path").call(A,m({path:B5(n)},r)),z5(P(e).maybeAppendByClassName(I5.ribbonGroup,"g"),t,i)}},m({},{type:"color",orient:"horizontal",size:30,range:[0,1],len:200,block:!1,blocks:0,color:["#fff","#000"],backgroundFill:"#e5e5e5"})),q5=En(function(t){return{min:Math.min.apply(Math,b([],x(t.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,b([],x(t.map(function(t){return t.value})),!1))}},function(t){return t.map(function(t){return t.id})}),U5=(Me(X5,G5=Rc),X5.prototype.render=function(t,e){var n=this,r=(t.data,t.width),i=t.height,a=(t.orient,t.defaultValue,t.color,t.block,t.type,t.slidable,t.step,t.showTitle),o=(t.showHandle,t.showLabel),t=(t.showIndicator,x(Nw(uk(t),["title","label","indicator","ribbon","handle"]),5)),s=t[0],l=(t[1],t[2]),c=t[3],t=(t[4],P(e).maybeAppendByClassName(O5.title,function(){return new t5({style:m({width:r,height:i},s)})})),a=(ok(a,P(e),function(t){}),t.node().getAvailableSpace()),t=a.x,u=a.y,a=(a.width,a.height,P(e).maybeAppendByClassName(O5.contentGroup,"g").call(A,{x:t,y:u})),f=a.maybeAppendByClassName(O5.ribbonGroup,"g");this.renderRibbon(f,c),this.handlesGroup=f.maybeAppendByClassName(O5.handlesGroup,"g"),this.renderHandles(),this.renderIndicator(a,l),ok(o,P(e).maybeAppendByClassName(O5.labelGroup,"g").call(A,{x:t,y:u}),function(t){n.renderLabel(t)})},Object.defineProperty(X5.prototype,"range",{get:function(){var t=this.attributes.data;return q5(t)},enumerable:!1,configurable:!0}),Object.defineProperty(X5.prototype,"ribbonScale",{get:function(){var t=this.range,e=t.min,t=t.max;return this._ribbonScale.update({domain:[e,t],range:[0,1]}),this._ribbonScale},enumerable:!1,configurable:!0}),Object.defineProperty(X5.prototype,"ribbonRange",{get:function(){var t=x(this.selection,2),e=t[0],t=t[1],n=this.ribbonScale;return[n.map(e),n.map(t)]},enumerable:!1,configurable:!0}),Object.defineProperty(X5.prototype,"selection",{get:function(){var t=this.range,e=t.min,t=t.max,n=this.attributes.defaultValue,e=x(void 0===n?[e,t]:n,2);return[e[0],e[1]]},enumerable:!1,configurable:!0}),X5.prototype.ifHorizontal=function(t,e){return u5(this.style.orient,"function"==typeof t?t():t,"function"==typeof e?e():e)},X5.prototype.renderRibbon=function(t,e){var n=this.attributes,r=n.type,i=n.orient,a=n.color,o=n.block,n=n.data;this.ribbon=t.maybeAppendByClassName(O5.ribbon,function(){return new H5({})}).update(m({type:r,orient:i,color:a,block:o,blocks:n.length-1,range:this.ribbonRange},e))},X5.prototype.renderHandles=function(){var t=this.attributes,e=t.showHandle,t=t.slidable,n=x(this.selection,2),r=n[0],n=n[1];this.startHandle=this.renderHandle("start",r),this.endHandle=this.renderHandle("end",n),e&&t?this.handlesGroup.style("visibility","visible"):this.handlesGroup.style("visibility","hidden")},X5.prototype.renderHandle=function(t,e){var n=this.attributes.orient,r=Lw(this.attributes,"handle"),r=(r.formatter,Z(r,["formatter"])),n=this.handlesGroup.maybeAppendByClassName(O5.prefix("".concat(t,"-handle")),function(){return new j5({})}).call(A,m({orient:n,labelText:e},r));return this.setHandlePosition(t,e),n},X5.prototype.setHandlePosition=function(t,e){var n=this.attributes,r=n.ribbonSize,n=n.handleFormatter,e=this.getOffset(e),r=x(this.ifHorizontal([e,.7*r],[r/2,e]),2),e=r[0],r=r[1],t=this.handlesGroup.select(".".concat(O5.prefix("".concat(t,"-handle")))).node(),n=(null!=t&&t.attr("formatter",n),x(t.getLocalPosition(),2)),i=n[0],n=n[1];Math.abs(e+r-i-n)<100?null!=t&&t.setLocalPosition(e,r):null!=t&&t.animate([{transform:"translate(".concat(t.getLocalPosition().slice(0,2).join(","),")")},{transform:"translate(".concat(e,", ").concat(r,")")}],{duration:200,fill:"both"})},X5.prototype.renderIndicator=function(t,e){this.indicator=t.maybeAppendByClassName(O5.indicator,function(){return new L5({style:e})}).update(e)},Object.defineProperty(X5.prototype,"labelData",{get:function(){var o=this,t=this.attributes,e=t.data,s=t.labelAlign;return e.reduce(function(t,e,n,r){var i,a=null!=(a=null==e?void 0:e.id)?a:n.toString();return"value"===s?t.push(m(m({},e),{id:a,label:null!=(i=null==e?void 0:e.label)?i:e.value.toString(),value:o.ribbonScale.map(e.value)})):n<r.length-1&&(i=r[n+1],r=((n=(r=x([e.value,i.value],2))[0])+(i=r[1]))/2,t.push(m(m({},e),{id:a,range:[n,i],label:[n,i].join("~"),value:o.ribbonScale.map(r)}))),t},[])},enumerable:!1,configurable:!0}),Object.defineProperty(X5.prototype,"labelStyle",{get:function(){var t=this.attributes,e=t.orient,t=t.labelDirection,t=void 0===t?"positive":t,n=x(["center","middle"],2),r=n[0],n=n[1];return"horizontal"===e?n="positive"===t?"top":"bottom":r="positive"===t?"end":"start",{labelTextAlign:r,labelTextBaseline:n}},enumerable:!1,configurable:!0}),X5.prototype.renderLabel=function(t){var e=this.attributes,n=e.ribbonSize,e=e.ribbonLen,r=Lw(this.attributes,"label"),i=r.spacing,a=(r.align,r.formatter),o=r.filter,r=Z(r,["spacing","align","formatter","filter"]),e=x(this.ifHorizontal([[0,n/2],[e,n/2]],[[n/2,0],[n/2,e]]),2),s=e[0],e=e[1],l=m(m({type:"linear",startPos:s,endPos:e,data:this.labelData,showLine:!1,showGrid:!1,showTick:!1,labelSpacing:i+n/2,labelTransform:"rotate(0)"},this.labelStyle),Object.fromEntries(Object.entries(r).map(function(t){var t=x(t,2),e=t[0],t=t[1];return["label".concat((e=e).charAt(0).toUpperCase()+e.slice(1)),t]}))),s=t.maybeAppendByClassName(O5.label,function(){return new a5({style:l})}).call(A,l).node();s.attr("labelFormatter",a),s.attr("labelFilter",o)},X5.prototype.bindEvents=function(){var n=this,t=new Map;t.set("ribbon",this.ribbon),t.set("start",this.startHandle),t.set("end",this.endHandle),t.forEach(function(t,e){null!=t&&t.on("mousedown",n.onDragStart(e)),null!=t&&t.on("touchstart",n.onDragStart(e))}),null!=(t=this.startHandle)&&t.on("mouseover",function(){return n.updateMouse()}),null!=(t=this.endHandle)&&t.on("mouseover",function(){return n.updateMouse()}),this.ribbon.on("mousemove",this.onHovering),this.addEventListener("mouseout",this.hideIndicator)},X5.prototype.showIndicator=function(t,e){void 0===e&&(e="".concat(t));var n,r=this.attributes,i=r.orient;r.showIndicator&&"number"==typeof t?(n=(r=this.range).min,r=r.max,t=dn(t,n,r),n=[this.getOffset(t),0],"vertical"===i&&n.reverse(),this.indicator.update({visibility:"visible",position:this.ifHorizontal("top","left"),value:e}),(r=this.indicator.node()).setLocalPosition.apply(r,b([],x(n),!1))):this.hideIndicator()},X5.prototype.hideIndicator=function(){var t;null!=(t=this.indicator)&&t.style("visibility","hidden")},X5.prototype.updateMouse=function(){this.style.slidable&&(this.style.cursor="grabbing")},X5.prototype.setSelection=function(t,e){this.updateSelection(t,e)},X5.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i,a,o,s,l=x(this.selection,2),c=l[0],l=l[1],t=x([t,e],2),e=t[0],t=t[1],n=(n&&(e+=c,t+=l),this.range),c=n.min,l=n.max,u=x((n=[c,l],c=[e,t],l=this.selection,void 0===r&&(r=4),i=(n=x(n,2))[0],n=n[1],a=(c=x(c,2))[0],c=c[1],o=(l=x(l,2))[0],l=l[1],c=(a=x([a,c],2))[0],s=(a=a[1])-c,a<c&&(c=(u=x([a,c],2))[0],a=u[1]),n-i<s?[i,n]:c<i?o===i&&l===a?[i,a]:[i,s+i]:n<a?l===n&&o===c?[c,n]:[n-s,n]:[Ow(c,r),Ow(a,r)]),2),e=u[0],t=u[1];this.update({defaultValue:[e,t]}),this.dispatchSelection()},Object.defineProperty(X5.prototype,"step",{get:function(){var t=this.attributes.step,t=void 0===t?1:t,e=this.range,n=e.min,e=e.max;return mn(t)?Ow(.01*(e-n),0):t},enumerable:!1,configurable:!0}),X5.prototype.getTickValue=function(t){var e=this.attributes,n=e.data,e=e.block,r=this.range.min;return e?R5(n.map(function(t){return t.value}),t).tick:(e=this.step,r+Math.round((t-r)/e)*e)},X5.prototype.getValueByCanvasPoint=function(t,e){var n=this.range,r=n.min,n=n.max,i=x(this.ribbon.node().getPosition(),2),a=i[0],i=i[1],a=this.ifHorizontal(a,i),i=this.ifHorizontal.apply(this,b([],x(Rw(t)),!1));return dn(this.getOffset(i-a,!0)+r,r,n)},X5.prototype.getOffset=function(t,e){void 0===e&&(e=!1);var n=this.range,r=n.min,n=n.max,i=this.attributes.ribbonLen,a=this.eventToOffsetScale;return a.update({domain:[r,n],range:[0,i]}),e?a.invert(t):a.map(t)},X5.prototype.dispatchSelection=function(){var t=new Io("valuechange",{detail:{value:this.selection}});this.dispatchEvent(t)},X5.prototype.dispatchIndicated=function(t,e){t=new Io("indicated",{detail:{value:t,range:e}});this.dispatchEvent(t)},t([$w(100)],X5.prototype,"dispatchSelection",null),t([$w(100)],X5.prototype,"dispatchIndicated",null),X5);function X5(t){var a=G5.call(this,Yw({},M5,t))||this;return a.eventToOffsetScale=new Rb({}),a._ribbonScale=new Rb({}),a.onHovering=function(t){var e=a.attributes,n=e.data,e=e.block,t=(t.stopPropagation(),a.getValueByCanvasPoint(t));e?(e=R5(n.map(function(t){return t.value}),t).range,a.showIndicator((e[0]+e[1])/2,"".concat(e[0],"-").concat(e[1])),a.dispatchIndicated(t,e)):(n=a.getTickValue(t),a.showIndicator(n),a.dispatchIndicated(n))},a.onDragStart=function(e){return function(t){t.stopPropagation(),a.attributes.slidable&&(a.target=e,a.prevValue=a.getTickValue(a.getValueByCanvasPoint(t)),document.addEventListener("mousemove",a.onDragging),document.addEventListener("touchmove",a.onDragging),document.addEventListener("mouseleave",a.onDragEnd),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchend",a.onDragEnd))}},a.onDragging=function(t){var e=a.target,n=(a.updateMouse(),x(a.selection,2)),r=n[0],n=n[1],t=a.getTickValue(a.getValueByCanvasPoint(t)),i=t-a.prevValue;"start"===e?r!==t&&a.updateSelection(t,n):"end"===e?n!==t&&a.updateSelection(r,t):"ribbon"===e&&0!=i&&(a.prevValue=t,a.updateSelection(i,i,!0))},a.onDragEnd=function(){a.style.cursor="default",document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("touchmove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchend",a.onDragEnd)},a}function K5(t){W5||(W5=document.createElement("table"),Y5=document.createElement("tr"),V5=/^\s*<(\w+|!)[^>]*>/,Y5={tr:document.createElement("tbody"),tbody:W5,thead:W5,tfoot:W5,td:Y5,th:Y5,"*":document.createElement("div")});var e=V5.test(t)&&RegExp.$1,e=(e&&e in Y5||(e="*"),Y5[e]),t=(t="string"==typeof t?t.replace(/(^\s*)|(\s*$)/g,""):t,e.innerHTML=""+t,e.childNodes[0]);return t&&e.contains(t)&&e.removeChild(t),t}var $5,Mo="tooltip",Z5="tooltip-title",J5="tooltip-list",r="tooltip-list-item",e="tooltip-list-item-name",bc="tooltip-list-item-marker",yo="tooltip-list-item-name-label",Ec="tooltip-list-item-value",xo="tooltip-crosshair-x",wo="tooltip-crosshair-y",ko={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"},So=((Oo={})[".".concat(Mo)]={position:"absolute",visibility:"visible","z-index":8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)","background-color":"rgba(255, 255, 255, 0.96)","box-shadow":"0 6px 12px 0 rgba(0, 0, 0, 0.12)","border-radius":"4px",color:"rgba(0, 0, 0, 0.65)","font-size":"12px","line-height":"20px",padding:"12px","min-width":"120px","max-width":"360px","font-family":"Roboto-Regular"},Oo[".".concat(Z5)]={color:"rgba(0, 0, 0, 0.45)"},Oo[".".concat(J5)]={margin:"0px","list-style-type":"none",padding:"0px"},Oo[".".concat(r)]={"list-style-type":"none","margin-top":"12px",display:"flex","line-height":"1em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},Oo[".".concat(bc)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},Oo[".".concat(e)]={display:"flex","align-items":"center","max-width":"216px"},Oo[".".concat(yo)]=m({flex:1},ko),Oo[".".concat(Ec)]=m({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},ko),Oo[".".concat(xo)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},Oo[".".concat(wo)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},Oo),Q5=(Me(tM,$5=Rc),Object.defineProperty(tM.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),Object.defineProperty(tM.prototype,"position",{set:function(t){var t=x(t,2),e=t[0],t=t[1];this.attr({x:e,y:t}),this.updatePosition()},enumerable:!1,configurable:!0}),Object.defineProperty(tM.prototype,"elementSize",{get:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty(tM.prototype,"items",{get:function(){var t=this.attributes.items;return this.sort(this.filter(t.map(function(t,e){var n=t.name,n=void 0===n?"":n,r=t.value,i=t.color,i=void 0===i?"black":i,a=t.index,t=Z(t,["name","value","color","index"]);return m({name:n,value:r,color:i,index:void 0===a?e:a},t)})))},enumerable:!1,configurable:!0}),Object.defineProperty(tM.prototype,"HTMLTooltipItemsElements",{get:function(){var e=this.attributes.template.item,r=[];return this.items.forEach(function(t){var n;r.push(K5((n=t,(t=e)&&n?t.replace(/\\?\{([^{}]+)\}/g,function(t,e){return"\\"===t.charAt(0)?t.slice(1):void 0===n[e]?"":n[e]}):t)))}),r},enumerable:!1,configurable:!0}),Object.defineProperty(tM.prototype,"customContent",{get:function(){var t=this.attributes.customContent;return hn(t)?Vw(t):bn(t)?t:en(t)?Vw(t(this.attributes.items)):void 0},enumerable:!1,configurable:!0}),tM.prototype.render=function(t,e){this.updateHTMLTooltipElement(),this.updatePosition()},tM.prototype.update=function(t){this.attr(Ln({},this.attributes,t)),this.render(this.attributes,this)},tM.prototype.clear=function(){this.element.innerHTML=""},tM.prototype.destroy=function(){var t;null!=(t=this.element)&&t.remove(),null!=(t=this.customContent)&&t.remove()},tM.prototype.show=function(){this.visibility="visible",this.element.style.visibility="visible"},tM.prototype.hide=function(){this.visibility="hidden",this.element.style.visibility="hidden"},tM.prototype.initShape=function(){var t=this.attributes.template.container;this.element=K5(t),!this.id&&""===this.id||this.element.setAttribute("id",this.id)},tM.prototype.updateHTMLTooltipElement=function(){var e,r,t=this.attributes.title,n=this.element,i=this.customContent,t=(this.clear(),i?n.appendChild(i):(i=this.attributes.template.title,n.innerHTML=i,n.getElementsByClassName(Z5)[0].innerHTML=t,i=this.HTMLTooltipItemsElements,(e=document.createElement("ul")).className=J5,i.forEach(function(t){e.appendChild(t)}),this.element.appendChild(e)),this.attributes.style);r=n,Object.entries(t).forEach(function(t){var t=x(t,2),e=t[0],n=t[1];b([r],x(r.querySelectorAll(e)),!1).filter(function(t){return t.matches(e)}).forEach(function(t){t&&(t.style.cssText+=Object.entries(n).reduce(function(t,e){return"".concat(t).concat(e.join(":"),";")},""))})}),this.element.style.visibility=this.visibility},tM.prototype.getRelativeOffsetFromCursor=function(t){var e=this.attributes,n=e.position,e=x(e.offset,2),i=e[0],a=e[1],e=(t||n).split("-"),o={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},t=this.elementSize,s=t.width,l=t.height,c=[-s/2,-l/2];return e.forEach(function(t){var e=x(c,2),n=e[0],e=e[1],t=x(o[t],2),r=t[0],t=t[1];c=[n+(s/2+i)*r,e+(l/2+a)*t]}),c},tM.prototype.setOffsetPosition=function(t){var t=x(t,2),e=t[0],t=t[1],n=this.attributes,r=n.x,i=n.y,n=n.container,a=n.x,n=n.y;this.element.style.left="".concat(r+a+e,"px"),this.element.style.top="".concat(i+n+t,"px")},tM.prototype.updatePosition=function(){this.throttleUpdatePosition()},tM.prototype.autoPosition=function(t){var e,n,r,i,a,o,s,t=x(t,2),l=t[0],t=t[1],c=this.attributes,u=c.x,f=c.y,h=c.autoPosition,c=c.bounding;return h?(e=(h=this.element).offsetWidth,h=h.offsetHeight,f=(u=x([u+l,f+t],2))[0],u=u[1],n=this.attributes.position,r={left:"right",right:"left",top:"bottom",bottom:"top"},s=c.x,i=c.y,a={left:f<s,right:s+c.width<f+e,top:u<i,bottom:i+c.height<u+h},o=[],n.split("-").forEach(function(t){o.push(a[t]?r[t]:t)}),s=o.join("-"),this.getRelativeOffsetFromCursor(s)):[l,t]},tM.prototype.filter=function(t){var e=this.attributes.filterBy;return e?t.filter(e):t},tM.prototype.sort=function(t){var e=this.attributes.sortBy;return e?t.sort(e):t},tM.tag="tooltip",tM.defaultOptions={style:{x:0,y:0,visibility:"visible",title:"",position:"bottom-right",offset:[5,5],follow:!0,enterable:!1,autoPosition:!0,items:[],throttleFrequency:50,container:{x:0,y:0},bounding:{x:0,y:0,width:0,height:0},template:{container:'<div class="'.concat(Mo,'"></div>'),title:'<div class="'.concat(Z5,'"></div>'),item:'<li class="'.concat(r,'" data-index={index}>\n <span class="').concat(e,'">\n <span class="').concat(bc,'" style="background:{color}"></span>\n <span class="').concat(yo,'" title="{name}">{name}</span>\n </span>\n <span class="').concat(Ec,'" title="{value}">{value}</span>\n </li>')},style:So}},tM);function tM(t){var e=$5.call(this,Ln({},tM.defaultOptions,t))||this;return e.visibility="visible",e.throttleUpdatePosition=Pn(function(){e.setOffsetPosition(e.autoPosition(e.getRelativeOffsetFromCursor()))},e.attributes.throttleFrequency,{}),e.visibility=e.attributes.visibility,e.initShape(),e.render(e.attributes,e),e}var eM,nM={default:{sizeStyle:{width:44,height:22,radius:11},tagStyle:{textStyle:{fontSize:12,lineHeight:16,fill:"#fff"},padding:0},markerStyle:{size:11}},small:{sizeStyle:{width:28,height:16,radius:8},tagStyle:{textStyle:{fontSize:10,lineHeight:14,fill:"#fff"},padding:0},markerStyle:{size:8}},mini:{sizeStyle:{width:20,height:14,radius:7},tagStyle:{textStyle:{fontSize:7,lineHeight:10,fill:"#fff"},padding:0},markerStyle:{size:7}}};function rM(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!0);var r=Number(t.style.height)-2*e;return{x:n?Number(t.style.width)+Number(t.style.x)-e-r:Number(t.style.x)+e,y:Number(t.style.y)+e,width:r,height:r,radius:r/2}}function iM(t){return eM.call(this,Ln({},iM.defaultOptions,t))||this}Me(iM,eM=Rc),iM.prototype.render=function(t,e){var i=this,n=t.size,n=void 0===n?"default":n,a=t.spacing,r=t.disabled,o=t.checked,s=t.unCheckedChildren,t=t.checkedChildren,e=Dw(e,".switch-content","g").attr("className","switch-content").node(),l=e.getLocalBounds(),n=_n(nM,n,nM.default),c=n.sizeStyle,u=n.tagStyle,f=r?"no-drop":"pointer",n=o?"#1890FF":"#00000040",h=c,d=o?t:s,p=((t||s)&&Dw(e,".switch-tag",function(){return new Ek({})}).attr("className","switch-tag").call(function(t){var e,t=t.node(),n=(t.update(Ln({cursor:f,backgroundStyle:null,text:!1,marker:!1},u,d)),null==t?void 0:t.getLocalBounds()),r=n.max,n=n.min,i=r[0]-n[0]+c.radius,r=r[1]-n[1],n=Math.max(i+c.height+2,c.width);h=m(m({},c),{width:n}),t.update((t={x:l.min[0],y:l.min[1],width:n,height:h.height},n={width:i,height:r},i=h.radius,r=o,e=n.width,n=n.height,void 0===i&&(i=0),{x:(r=void 0===o?!0:r)?Number(t.x)+i:Number(t.width)+Number(t.x)-e,y:Number(t.y)+(Number(t.height)-n)/2}))}),Dw(e,".switch-background","rect").attr("className","switch-background").style("zIndex",(e.style.zIndex||0)-1).style("x",l.min[0]).style("y",l.min[1]).style("fill",n).style("cursor",f).style("fillOpacity",r?.4:1).call(A,h).node()),y=Dw(e,".switch-background-stroke","rect").attr("className","switch-background-stroke").style("zIndex",(e.style.zIndex||0)-2).style("x",l.min[0]).style("y",l.min[1]).style("stroke",n).style("lineWidth",0).call(A,h).node();Dw(e,".switch-handle","rect").attr("className","switch-handle").style("fill","#fff").style("cursor",f).call(function(t){var e,t=t.node(),n=rM(p,a,o),r=rM(p,a,!o);t.attr("x")&&!Nn(n,r)&&i.checked!==o?(t.attr(r),null!=(e=t.getAnimations()[0])&&e.cancel(),null!=(e=y.getAnimations()[0])&&e.cancel(),t.animate([{x:r.x},{x:n.x}],{duration:120,fill:"both"}),y.animate([{lineWidth:0,strokeOpacity:.5},{lineWidth:14,strokeOpacity:0}],{duration:400,easing:"ease-on"})):t.attr(n)}),this.checked=!!o},iM.defaultOptions={type:iM.tag="switch",style:{x:0,y:0,spacing:2,checked:!0,disabled:!1}};var aM,oM,sM,lM,_o={tagText:"",lineStroke:"#416180",lineStrokeOpacity:.45,lineLineWidth:1,lineLineDash:[5,5]},Ao=Yw({},_o,{type:"line",tagPosition:"start",tagAlign:"center",tagVerticalAlign:"bottom"}),Po=Yw({},_o,{type:"circle",defaultRadius:0}),To=Yw({},_o,{type:"polygon",defaultRadius:0,startAngle:0}),Lo=(Me(cM,aM=Rc),Object.defineProperty(cM.prototype,"localPointer",{get:function(){var t=x(this.getPosition(),2),e=t[0],t=t[1],n=x(this.pointer,2);return[n[0]-e,n[1]-t]},enumerable:!1,configurable:!0}),Object.defineProperty(cM.prototype,"tagCfg",{get:function(){var t=Lw(this.attributes,"tag");return t.position,Z(t,["position"])},enumerable:!1,configurable:!0}),Object.defineProperty(cM.prototype,"crosshairCfg",{get:function(){var t=Lw(this.attributes,"line");return m(m({},t),{path:this.crosshairPath})},enumerable:!1,configurable:!0}),cM.prototype.render=function(t,e){var n=this,e=Dw(e,".crosshair-group","g").attr("className","crosshair-group").node();this.shapesGroup=e,this.tagShape=Dw(e,".crosshair-tag",function(){return new Ek({className:"crosshair-tag",style:n.tagCfg})}).node(),this.crosshairShape=Dw(e,".crosshair-path","path").attr("className","crosshair-path").call(A,this.crosshairCfg).node(),this.adjustLayout()},cM.prototype.update=function(t){this.attr(Ln({},this.attributes,t=void 0===t?{}:t)),this.render(this.attributes,this)},cM.prototype.setPointer=function(t){this.pointer=t},cM.tag="crosshair-base",cM.defaultOptions={style:_o},cM);function cM(t){return aM.call(this,Ln({},cM.defaultOptions,t))||this}function uM(t){return oM.call(this,Yw({},uM.defaultOptions,t))||this}function fM(t){return sM.call(this,Yw({},fM.defaultOptions,t))||this}function hM(t){return lM.call(this,Yw({},hM.defaultOptions,t))||this}Me(uM,oM=Lo),Object.defineProperty(uM.prototype,"crosshairPath",{get:function(){var t=this.attributes,e=x(t.startPos,2),n=e[0],e=e[1],t=x(t.endPos,2);return[["M",0,0],["L",t[0]-n,t[1]-e],["Z"]]},enumerable:!1,configurable:!0}),Object.defineProperty(uM.prototype,"localPointer",{get:function(){var t,e,n;return this.pointer?(t=(e=x(this.getPosition(),2))[0],e=e[1],[(n=x(this.pointer,2))[0]-t,n[1]-e]):this.attributes.startPos},enumerable:!1,configurable:!0}),Object.defineProperty(uM.prototype,"isVertical",{get:function(){var t=this.attributes,e=x(t.startPos,2),n=e[0],e=e[1],t=x(t.endPos,2),r=t[0],t=t[1];return n===r&&e!==t},enumerable:!1,configurable:!0}),Object.defineProperty(uM.prototype,"tagShapeSpace",{get:function(){var t=zw(this.tagShape);return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),uM.prototype.update=function(t){oM.prototype.update.call(this,t)},uM.prototype.setPointer=function(t){oM.prototype.setPointer.call(this,t),this.adjustPosition()},uM.prototype.setText=function(t){this.tagShape.update({text:t}),this.adjustTag()},uM.prototype.adjustLayout=function(){this.adjustPosition(),this.adjustTag()},uM.prototype.adjustPosition=function(){var t=x(this.localPointer,2),e=t[0],t=t[1],n=x(this.attributes.startPos,2),r=n[0],n=n[1],r=this.getOrientVal([r,t],[e,n]);this.shapesGroup.setLocalPosition(r)},uM.prototype.adjustTag=function(){var t,e=this.attributes,n=e.tagText,r=e.tagPosition,i=x(e.startPos,2),a=i[0],i=i[1],e=x(e.endPos,2),o=e[0],e=e[1];n&&""!==n?(this.tagShape.show(),t=(n=this.tagShapeSpace).width,n=n.height,a=(o=x(this.getOrientVal({start:[-t/2,n/2],end:[o-a+t/2,n/2]},{start:[0,0],end:[0,e-i+n]})[r],2))[0],t=o[1],this.tagShape.setLocalPosition(a,t)):this.tagShape.hide()},uM.prototype.getOrientVal=function(t,e){return this.isVertical?e:t},uM.tag="line-crosshair",uM.defaultOptions={style:Ao},t([$w(20)],uM.prototype,"setPointer",null),Me(fM,sM=Lo),Object.defineProperty(fM.prototype,"crosshairPath",{get:function(){return this.createCirclePath()},enumerable:!1,configurable:!0}),fM.prototype.update=function(t){sM.prototype.update.call(this,t)},fM.prototype.setPointer=function(t){var t=x(t,2),e=t[0],t=t[1],e=(sM.prototype.setPointer.call(this,[e,t]),x(this.localPointer,2)),t=e[0],e=e[1],n=x(this.attributes.center,2),r=n[0],n=n[1],t=this.createCirclePath(Math.pow(Math.pow(t-r,2)+Math.pow(e-n,2),.5));this.crosshairShape.attr({path:t})},fM.prototype.adjustLayout=function(){this.tagShape.hide()},fM.prototype.createCirclePath=function(t){var e=this.attributes,n=x(e.center,2),r=n[0],n=n[1],e=e.defaultRadius;return yk(r,n,t||e)},fM.tag="circle-crosshair",fM.defaultOptions={style:Po},t([$w(20)],fM.prototype,"setPointer",null),Me(hM,lM=Lo),Object.defineProperty(hM.prototype,"crosshairPath",{get:function(){return this.createPolygonPath()},enumerable:!1,configurable:!0}),hM.prototype.update=function(t){lM.prototype.update.call(this,t)},Object.defineProperty(hM.prototype,"points",{get:function(){for(var t,e,n,r,i,a,o=this.attributes,s=o.startAngle,l=o.sides,c=2*Math.PI/l,u=[1,0],f=[],h=0;h<l;h+=1)f.push((t=[0,0],e=u,n=[0,0],r=s/180*Math.PI+c*h,a=i=void 0,i=e[0]-n[0],e=e[1]-n[1],a=Math.sin(r),r=Math.cos(r),t[0]=i*r-e*a+n[0],t[1]=i*a+e*r+n[1],t));return f},enumerable:!1,configurable:!0}),hM.prototype.setPointer=function(t){var t=x(t,2),e=t[0],t=t[1],e=(lM.prototype.setPointer.call(this,[e,t]),x(this.localPointer,2)),t=e[0],e=e[1],n=this.attributes.center,r=x(this.intersection([t,e]),2),i=r[0],r=r[1];i&&r&&(t=Kw(n,[t,e])/Kw(n,[i,r]),e=this.createPolygonPath(t),this.crosshairShape.attr({path:e}))},hM.prototype.adjustLayout=function(){this.tagShape.hide()},hM.prototype.createPolygonPath=function(r){var t=this.attributes,i=t.defaultRadius,t=x(t.center,2),a=t[0],o=t[1],t=this.points.map(function(t,e){var t=x(t,2),t=x(ve([0,0],[t[0],t[1]],r||i),2),n=t[0],t=t[1];return[0===e?"M":"L",a+n,o+t]});return t.push(["Z"]),t},hM.prototype.intersection=function(t){for(var e,n,r,i,a,o,s,l,t=x(t,2),c=t[0],u=t[1],f=this.points,t=x(this.attributes.center,2),h=t[0],d=t[1],p=1;p<=f.length;p+=1){var y=x(f[p-1],2),v=y[0],y=y[1],g=x(f[p%f.length],2),m=g[0],g=g[1],v=(i=[h,d],v=[v+h,y+d],y=[m+h,g+d],l=s=o=a=g=m=void 0,g=(r=x(r=[c,u],2))[0],r=r[1],a=(i=x(i,2))[0],i=i[1],o=(v=x(v,2))[0],v=v[1],s=(y=x(y,2))[0],y=y[1],l=[],(y-v)*(a-g)==(i-r)*(s-o)?(i-r)*(o-g)==(v-r)*(a-g)&&(Uw(g,a,r,i,o,v)&&Xw(l,o,v),Uw(g,a,r,i,s,y)&&Xw(l,s,y),Uw(o,s,v,y,g,r)&&Xw(l,g,r),Uw(o,s,v,y,a,i))&&Xw(l,a,i):(m=(g*(i-r)+v*(a-g)-r*(a-g)-o*(i-r))/((s-o)*(i-r)-(a-g)*(y-v)),0<=(y=(o*(y-v)+r*(s-o)-v*(s-o)-g*(y-v))/((a-g)*(y-v)-(s-o)*(i-r)))&&y<=1&&0<=m&&m<=1&&(l[0]=g+y*(a-g),l[1]=r+y*(i-r))),l);0!==v.length&&(e=(s=x(v,2))[0],n=s[1])}return[e,n]},hM.tag="polygon-crosshair",hM.defaultOptions={style:To},t([$w(20)],hM.prototype,"setPointer",null);Me(vM,dM=N),Object.defineProperty(vM.prototype,"decorationType",{get:function(){var t=this.attributes.type;return t&&"none"!==t&&an(t)?t.map(function(t){return an(t)?t:[t,"solid"]}):"none"},enumerable:!1,configurable:!0}),Object.defineProperty(vM.prototype,"doubleSpacing",{get:function(){return 2*this.attributes.style.lineWidth},enumerable:!1,configurable:!0}),Object.defineProperty(vM.prototype,"hangingRate",{get:function(){return this.attributes.hangingRate},enumerable:!1,configurable:!0}),Object.defineProperty(vM.prototype,"dashedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[2*t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(vM.prototype,"dottedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(vM.prototype,"solidCfg",{get:function(){return{lineDash:[0,0]}},enumerable:!1,configurable:!0}),Object.defineProperty(vM.prototype,"decorationCfg",{get:function(){var r=this,i=this.attributes.style,t=this.decorationType;return"none"===t?[]:t.map(function(t){var e,t=x(t,2),n=t[0],t=t[1];return"wavy"===t?m({path:r.getWavyPath(n)},i):"double"===t?m({path:r.getDoubleLinePath(n)},i):(e={solid:r.solidCfg,dashed:r.dashedCfg,dotted:r.dottedCfg},m(m({path:r.getLinePath(n)},i),e[t]))})},enumerable:!1,configurable:!0}),vM.prototype.update=function(t){var e=this;this.attr(Yw({},this.attributes,t)),this.clear(),this.decorationCfg.forEach(function(t){e.appendChild(new gs({style:t}))})},vM.prototype.clear=function(){this.removeChildren()},vM.prototype.getLinePos=function(t){var e=x(this.hangingRate,3),n=e[0],r=e[1],e=e[2],i=this.attributes,a=i.height,i=i.fontSize,o=x([0,0],2),s=o[0],o=o[1],o=("overline"===t?(s=(n=x([0,a*n-i/2],2))[0],n):"line-through"===t?(s=(n=x([0,a*r],2))[0],n):(s=(t=x([0,a*e+i/2],2))[0],t))[1];return[s,o]},vM.prototype.getLinePath=function(t){var e=this.attributes.width,t=x(this.getLinePos(t),2),n=t[0],t=t[1];return[["M",n,t],["L",n+e,t]]},vM.prototype.getDoubleLinePath=function(t){var e,n=this.doubleSpacing,r=this.attributes.width,i=x(this.getLinePos(t),2),a=i[0],i=i[1],o=x([0,0],2),s=o[0],o=o[1];return"line-through"===t&&(s=(e=x([-.5,.5],2))[0],o=e[1]),"underline"===t?(s=(e=x([0,1],2))[0],o=e[1]):"overline"===t&&(s=(e=x([1,0],2))[0],o=e[1]),[["M",a,i+n*s],["L",a+r,i+n*s],["M",a,i+n*o],["L",a+r,i+n*o]]},vM.prototype.getWavyPath=function(t){return[]},vM.tag="decoration",vM.defaultOptions={style:{width:0,height:0,type:"none",hangingRate:[.5,.55,.5],style:{lineWidth:1,stroke:"#000"}}};var dM,pM,yM=vM;function vM(t){t=dM.call(this,Yw({},vM.defaultOptions,t))||this;return t.update({}),t}function gM(t){t=pM.call(this,Yw({},gM.defaultOptions,t))||this;return t.init(),t}Me(gM,pM=Rc),Object.defineProperty(gM.prototype,"textWidth",{get:function(){var e=this;return un(this.renderText.split("\n").map(function(t){return kw(t,e.font)}))||0},enumerable:!1,configurable:!0}),Object.defineProperty(gM.prototype,"textHeight",{get:function(){return zw(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(gM.prototype,"width",{get:function(){var t=this.attributes.width;return"auto"===t||void 0===t||0===t?this.textWidth:t},enumerable:!1,configurable:!0}),Object.defineProperty(gM.prototype,"height",{get:function(){var t=this.attributes.height;return pn(t)&&0!==t?t:zw(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(gM.prototype,"lineHeight",{get:function(){var t=this.attributes,e=t.lineHeight,t=t.fontSize;return e&&0!==e?e:t},enumerable:!1,configurable:!0}),Object.defineProperty(gM.prototype,"capitalizeWord",{get:function(){return this.attributes.text.split("\n").map(function(t){return t.split(" ").map(function(t){return Mw(t,"capitalize")}).join(" ")}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(gM.prototype,"text",{get:function(){var t=this.attributes,e=t.transform,t=t.text;return"capitalize"===e?this.capitalizeWord:Mw(t,e)},enumerable:!1,configurable:!0}),Object.defineProperty(gM.prototype,"ellipsisText",{get:function(){var e=this,t=this.text,n=this.attributes,r=n.width,n=n.overflow,i="ellipsis"===n?"...":n;return t.split("\n").map(function(t){return ww(t,pn(r)?r:1/0,e.font,i)}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(gM.prototype,"renderText",{get:function(){var t=this.attributes.width,e=this.attributes.overflow;return e&&!["none","clip","wrap"].includes(e)&&pn(t)?this.ellipsisText:this.text},enumerable:!1,configurable:!0}),Object.defineProperty(gM.prototype,"verticalAlign",{get:function(){return this.attributes.verticalAlign},enumerable:!1,configurable:!0}),Object.defineProperty(gM.prototype,"font",{get:function(){return An(this.attributes,["fontSize","fontFamily","fontWeight","fontStyle","fontVariant","letterSpacing","leading"])},enumerable:!1,configurable:!0}),Object.defineProperty(gM.prototype,"fontColor",{get:function(){return this.attributes.fontColor},enumerable:!1,configurable:!0}),Object.defineProperty(gM.prototype,"wordWrap",{get:function(){return"wrap"===this.attributes.overflow},enumerable:!1,configurable:!0}),Object.defineProperty(gM.prototype,"wordWrapWidth",{get:function(){var t=this.width;return this.wordWrap?t:1/0},enumerable:!1,configurable:!0}),Object.defineProperty(gM.prototype,"textCfg",{get:function(){var t=this.renderText,e=this.lineHeight,n=this.wordWrap,r=this.wordWrapWidth,i=this.fontColor;return m(m(m({},Aw),this.font),{fill:i,wordWrap:n,lineHeight:e,wordWrapWidth:r,text:t,textAlign:"start",textBaseline:"middle"})},enumerable:!1,configurable:!0}),Object.defineProperty(gM.prototype,"backgroundCfg",{get:function(){var t=this.width,e=this.height,n=this.attributes.backgroundStyle;return m({x:0,y:0,width:t,height:e},n)},enumerable:!1,configurable:!0}),Object.defineProperty(gM.prototype,"decorationLineWidth",{get:function(){var t=this.attributes.fontSize;return Math.floor(2*Math.log10(t))},enumerable:!1,configurable:!0}),Object.defineProperty(gM.prototype,"decorationCfg",{get:function(){var t=this.attributes,e=t.decoration,n=t.fontSize,r=this.decorationLineWidth,i=this.fontColor;return this.textShape.getLineBoundingRects().map(function(t){return Yw({},{fontSize:n,style:{stroke:i,lineWidth:r}},e,t)})},enumerable:!1,configurable:!0}),Object.defineProperty(gM.prototype,"clipRectCfg",{get:function(){var t=this.height;return{width:this.attributes.width,height:t}},enumerable:!1,configurable:!0}),gM.prototype.init=function(){this.initShape(),this.update({})},gM.prototype.update=function(t){this.attr(Yw({},this.attributes,t)),this.render()},gM.prototype.render=function(){var e=this;this.clear(),this.backgroundShape.attr(this.backgroundCfg),this.textShape.attr(this.textCfg),this.layout(),this.decorationGroup.removeChildren(),this.decorationCfg.forEach(function(t){e.decorationGroup.appendChild(new yM({style:t}))})},gM.prototype.clear=function(){var t;(this.backgroundShape.style.clipPath=null)!=(t=this.clipRect)&&t.destroy()},gM.prototype.initShape=function(){this.backgroundShape=new Es({name:"background",style:{width:0,height:0}}),this.decorationGroup=new cs({name:"decoration-group"}),this.textShape=new Os({name:"text",style:this.textCfg}),this.textShape.appendChild(this.decorationGroup),this.backgroundShape.appendChild(this.textShape),this.appendChild(this.backgroundShape)},gM.prototype.overflow=function(){var t=this.wordWrap,e=this.attributes,n=e.width,e=e.overflow;e&&"none"!==e&&!t&&pn(n)&&"clip"===e&&(this.clipRect=new Es({name:"clip-rect",style:this.clipRectCfg}),this.backgroundShape.style.clipPath=this.clipRect,this.backgroundShape.appendChild(this.clipRect))},gM.prototype.adjustTextAlign=function(){var t=this.textWidth,e=this.attributes,n=e.width,e=e.textAlign;pn(n)&&(n=0,n="start"===e?0:"center"===e?(this.width-t)/2:this.width-t,this.textShape.attr({x:n}))},gM.prototype.adjustVerticalAlign=function(){var t=this.verticalAlign,e=this.textHeight,n=0,n="top"===t?e/2:"middle"===t?this.height/2:this.height-e/2;this.textShape.attr({y:n})},gM.prototype.layout=function(){this.adjustTextAlign(),this.adjustVerticalAlign(),this.overflow()},gM.defaultOptions={type:gM.tag="paragraph",style:{text:"",fontColor:"#000",fontFamily:"sans-serif",fontSize:12,fontWeight:"normal",fontVariant:"normal",letterSpacing:0,leading:0,fontStyle:"normal",decoration:{type:"none",style:{}},overflow:"none",backgroundStyle:{},transform:"none",tooltip:!1,tooltipWait:300}};var mM,No=m(m({},Aw),{fill:"rgba(0,0,0,0.45)",fontSize:10,textAlign:"start",textBaseline:"middle",overflow:"clip"}),bM={default:{width:12,height:12,radius:2,stroke:"#dadada",lineWidth:1,fill:"#ffffff",cursor:"pointer"},selected:{width:12,height:12,radius:2,stroke:"#3471F9",lineWidth:1,fill:"#3471F9",cursor:"pointer"}},xM={path:[["M",3,6],["L","5","8.5"],["L","8.5","4"]],lineWidth:1,cursor:"pointer"};function wM(t){return mM.call(this,Ln({},wM.defaultOptions,t))||this}Me(wM,mM=Rc),wM.prototype.render=function(t,e){var n=t.label,r=t.boxStyle,i=t.checkedStyle,a=t.checked,t=t.spacing,a=(this.checked=!!a,Dw(e,".checkbox-content","g").attr("className","checkbox-content").node()),e=wn({},this.checked?bM.selected:bM.default,r),r=wn({},xM,i),t=(this.checkboxBoxShape=Dw(a,".checkbox-box","rect").attr("className","checkbox-box").style("zIndex",(a.style.zIndex||0)-1).call(A,e).node(),Dw(this.checkboxBoxShape,".checkbox-checked","path").attr("className","checkbox-box-checked").style("stroke","#ffffff").call(A,r),i=this.checkboxBoxShape,e=Number(t),{x:(r=i.getLocalBounds()).halfExtents[0]?r.max[0]+(e||0):i.style.x,y:r.halfExtents[1]?(r.min[1]+r.max[1])/2:i.style.y}),e=t.x,r=t.y;Dw(a,".checkbox-label","text").attr("className","checkbox-label").style("x",e).style("y",r).call(A,n)},wM.defaultOptions={type:wM.tag="checkbox",style:{x:0,y:0,label:m({text:""},No),spacing:4,checked:!1}};var kM="gui-poptip",EM="gui-poptip-arrow",MM="gui-poptip-text",OM=((a={})[".".concat(kM)]={visibility:"visible",position:"absolute","background-color":"rgba(0, 0, 0)","box-shadow":"0px 0px 10px #aeaeae","border-radius":"3px",color:"#fff",opacity:.8,"font-size":"12px",padding:"4px 6px",display:"flex","justify-content":"center","align-items":"center","z-index":8,transition:"visibility 50ms"},a[".".concat(MM)]={"text-align":"center"},a[".".concat(kM,"[data-position='top']")]={transform:"translate(-50%, -100%)"},a[".".concat(kM,"[data-position='left']")]={transform:"translate(-100%, -50%)"},a[".".concat(kM,"[data-position='right']")]={transform:"translate(0, -50%)"},a[".".concat(kM,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},a[".".concat(kM,"[data-position='top-left']")]={transform:"translate(0,-100%)"},a[".".concat(kM,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},a[".".concat(kM,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},a[".".concat(kM,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},a[".".concat(kM,"[data-position='right-top']")]={transform:"translate(0, 0)"},a[".".concat(kM,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},a[".".concat(kM,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},a[".".concat(kM,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},a[".".concat(EM)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},a[".".concat(kM,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},a["[data-position='top'] .".concat(EM)]={bottom:"-2px"},a[".".concat(kM,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},a["[data-position='left'] .".concat(EM)]={right:"-2px"},a[".".concat(kM,"[data-position='right']")]={transform:"translate(5px, -50%)"},a["[data-position='right'] .".concat(EM)]={left:"-2px"},a[".".concat(kM,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},a["[data-position='bottom'] .".concat(EM)]={top:"-2px"},a[".".concat(kM,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},a["[data-position='top-left'] .".concat(EM)]={left:"10px",bottom:"-2px"},a[".".concat(kM,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},a["[data-position='top-right'] .".concat(EM)]={right:"10px",bottom:"-2px"},a[".".concat(kM,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},a["[data-position='left-top'] .".concat(EM)]={right:"-2px",top:"8px"},a[".".concat(kM,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},a["[data-position='left-bottom'] .".concat(EM)]={right:"-2px",bottom:"8px"},a[".".concat(kM,"[data-position='right-top']")]={transform:"translate(5px, 0)"},a["[data-position='right-top'] .".concat(EM)]={left:"-2px",top:"8px"},a[".".concat(kM,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},a["[data-position='right-bottom'] .".concat(EM)]={left:"-2px",bottom:"8px"},a[".".concat(kM,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},a["[data-position='bottom-left'] .".concat(EM)]={top:"-2px",left:"8px"},a[".".concat(kM,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},a["[data-position='bottom-right'] .".concat(EM)]={top:"-2px",right:"8px"},a),SM=void 0;var _M;function AM(t){var e=t&&document.getElementById(t);return e||((e=document.createElement("div")).setAttribute("id",t),document.body.appendChild(e)),e}function PM(t){var n,r;return n=AM,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r=r||n.apply(SM,t)}(t)}function TM(t){t=_M.call(this,Ln({style:{id:"gui-poptip"}},TM.defaultOptions,t))||this;return t.visibility="visible",t.map=new Map,t.domStyles="",t.initShape(),t.render(t.attributes,t),t}Me(TM,_M=Rc),Object.defineProperty(TM.prototype,"visible",{get:function(){return"visible"===this.visibility},enumerable:!1,configurable:!0}),TM.prototype.render=function(t,e){this.visibility=this.style.visibility,this.updatePoptipElement()},TM.prototype.update=function(t){this.attr(Ln({},this.style,t)),this.render(this.attributes,this)},TM.prototype.bind=function(s,l){var c,t,e,u=this;s&&(c=this.style.text,e=function(){u.hideTip()},s.addEventListener("mousemove",t=function(t){var e=s,n=u.style,r=c,i=(l&&(o=(i="function"==typeof l?l.call(null,t):l).html,a=i.target,i=Z(i,["html","target"]),n=wn({},u.style,i),!a&&!1!==a||(e=a),"string"==typeof o)&&(r=o),n.position),a=n.arrowPointAtCenter,o=n.follow,n=n.offset;e?(e=(t=x(function(t,e,n,r,i,a){if(void 0===i&&(i=!1),a=void 0===a?!1:a)return[t,e];var o=(a=n.getBoundingClientRect()).x,s=a.y,l=a.width,c=a.height;switch(r){case"top":return i?[o+l/2,s]:[t,s];case"left":return i?[o,s+c/2]:[o,e];case"bottom":return i?[o+l/2,s+c]:[t,s+c];case"right":return i?[o+l,s+c/2]:[o+l,e];case"top-right":case"right-top":return[o+l,s];case"left-bottom":case"bottom-left":return[o,s+c];case"right-bottom":case"bottom-right":return[o+l,s+c];default:return[o,s]}}(t.clientX,t.clientY,e,i,a,o),2))[0],a=t[1],u.showTip(e,a,{text:r,position:i,offset:n})):u.hideTip()}),s.addEventListener("mouseleave",e),this.map.set(s,[t,e]))},TM.prototype.unbind=function(t){var e,n;this.map.has(t)&&(e=(n=x(this.map.get(t)||[],2))[0],n=n[1],e&&t.removeEventListener("mousemove",e),n&&t.removeEventListener("mouseleave",n),this.map.delete(t))},TM.prototype.clear=function(){this.container.innerHTML=""},TM.prototype.destroy=function(){var t,e=this;b([],x(this.map.keys()),!1).forEach(function(t){return e.unbind(t)}),null!=(t=this.container)&&t.remove()},TM.prototype.showTip=function(t,e,n){var r,i=_n(n,"text");i&&"string"!=typeof i||(this.applyStyles(),t&&e&&n&&(r=n.offset,(n=n.position)&&this.container.setAttribute("data-position",n),this.setOffsetPosition(t,e,r),"string"==typeof i&&(n=this.container.querySelector(".".concat(MM)))&&(n.innerHTML=i),this.visibility="visible",this.container.style.visibility="visible"))},TM.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},TM.prototype.getContainer=function(){return this.container},TM.prototype.getClassName=function(){var t=this.style.containerClassName;return"".concat(kM).concat(t?" ".concat(t):"")},TM.prototype.initShape=function(){var t=this,e=this.style.id;this.container=PM(e),this.container.setAttribute("class",this.getClassName()),this.container.addEventListener("mousemove",function(){return t.showTip()}),this.container.addEventListener("mouseleave",function(){return t.hideTip()})},TM.prototype.updatePoptipElement=function(){var t=this.container,e=(this.clear(),this.style),n=e.id,r=e.template,e=e.text,n=(this.container.setAttribute("id",n),this.container.setAttribute("class",this.getClassName()),'<span class="'.concat(EM,'"></span>'));t.innerHTML=n,hn(r)?t.innerHTML+=r:r&&bn(r)&&t.appendChild(r),e&&(t.getElementsByClassName(MM)[0].textContent=e),this.applyStyles(),this.container.style.visibility=this.visibility},TM.prototype.applyStyles=function(){var t,e=Yw({},OM,this.style.domStyles),e=Object.entries(e).reduce(function(t,e){var e=x(e,2),n=e[0],e=e[1],e=Object.entries(e).reduce(function(t,e){var e=x(e,2),n=e[0],e=e[1];return"".concat(t).concat(n,": ").concat(e,";")},"");return"".concat(t).concat(n,"{").concat(e,"}")},"");this.domStyles!==e&&(this.domStyles=e,(t=this.container.querySelector("style"))&&this.container.removeChild(t),(t=document.createElement("style")).innerHTML=e,this.container.appendChild(t))},TM.prototype.setOffsetPosition=function(t,e,n){var n=x(n=void 0===n?this.style.offset:n,2),r=n[0],n=n[1],n=void 0===n?0:n;this.container.style.left="".concat(t+(void 0===r?0:r),"px"),this.container.style.top="".concat(e+n,"px")},TM.tag="poptip",TM.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:OM,template:'<div class="'.concat(MM,'"></div>')}};function LM(r,t,e,n){var[[t,i],[a,o]]=t,[s,l]=function(t){var{min:[t,e],max:[n,r]}=t.getLocalBounds();let i=0,a=0;return 0<t&&(i=t),n<0&&(i=n),0<e&&(a=e),r<0&&(a=r),[i,a]}(r);if(t===a&&i===o)return Z2()([[0,0],[s,l]]);s=[[t-a,i-o]].concat(e).concat([[0,0]]);const c=[n[0]-a,n[1]-o],[u,f]=s;return l=c,t=u,i=f,e=xx(l,t),t=xx(t,i),i=xx(i,l),0<(Math.pow(e,2)+Math.pow(t,2)-Math.pow(i,2))/(2*e*t)&&(a=(()=>{var{min:t,max:e}=r.getLocalBounds(),n=u[0]+(u[1]-c[1])*+u[1]/(u[0]-c[0]);return e[0]<c[0]?Math.min(e[0],n):Math.max(t[0],n)})(),s.splice(1,1,[a,0])),Z2()(s)}const NM=Gx(t=>{var e=t.attributes,{x:n,y:r,x0:i=n,y0:a=r,background:o,connector:s,startMarker:l,endMarker:c,coordCenter:u}=e,e=Z(e,["class","transform","rotate","x","y","x0","y0","background","connector","startMarker","endMarker","coordCenter"]),f=J(e,"background"),h=f["padding"],f=Z(f,["padding"]),d=J(e,"connector"),{points:p=[]}=d,d=Z(d,["points"]),i=[[+i,+a],[+n,+r]],a=Q(t).maybeAppend("text","text").call(I,e).node(),n=LM(Q(t).maybeAppend("background","rect").style("zIndex",-1).call(I,function(t,e=[]){var[e=0,n=0,r=e,i=n]=e,a=t.parentNode,o=a.getEulerAngles(),{min:t,halfExtents:s}=(a.setEulerAngles(0),t.getLocalBounds()),[t,l]=t,[s,c]=s;return a.setEulerAngles(o),{x:t-i,y:l-e,width:2*s+i+n,height:2*c+e+r}}(a,h)).call(I,o?f:{}).node(),i,p,u),r=l&&new xk({id:"startMarker",style:Object.assign({x:0,y:0},J(e,"startMarker"))}),a=c&&new xk({id:"endMarker",style:Object.assign({x:0,y:0},J(e,"endMarker"))});Q(t).maybeAppend("connector","path").style("path",n).style("markerStart",r).style("markerEnd",a).call(I,s?d:{})}),CM=t=>{const l=Z(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Nx(r,i,a,o),{color:i,text:a="",fontSize:o,rotate:e=0,transform:s=""}=e,a={text:String(a),stroke:i,fill:i,fontSize:o},[[i,o]]=t;return Q(new NM).style("x",i).style("y",o).call(I,r).style("transform",s+`rotate(${+e}deg)`).style("coordCenter",n.getCenter()).call(I,a).call(I,l).node()}};CM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const jM=Gx(t=>{var e=Z(t.attributes,["class","x","y"]);const n=J(e,"marker"),{size:s=24}=n,r=()=>{var t=s/2,e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,i]=[-e,e-n],[a,o]=[0,0],[e,n]=[e,e-n];return[["M",r,i],["A",t,t,0,1,1,e,n],["L",a,o],["Z"]]};var[i,a]=function(t){var{min:t,max:e}=t.getLocalBounds();return[.5*(t[0]+e[0]),.5*(t[1]+e[1])]}(Q(t).maybeAppend("marker",()=>new xk({})).call(t=>t.node().update(Object.assign({symbol:r},n))).node());Q(t).maybeAppend("text","text").style("x",i).style("y",a).call(I,e)}),RM=t=>{const s=Z(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Nx(r,i,a,o),{color:i,text:a=""}=e,o={text:String(a),stroke:i,fill:i},[[e,a]]=t;return Q(new jM).call(I,r).style("x",e).style("y",a).call(I,o).call(I,s).node()}},IM=(RM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},Gx(t=>{var{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes;Q(t).maybeAppend("connect-path",()=>new gs({})).style("d",n).call(I,i),Q(t).maybeAppend("area-path",()=>new gs({})).style("d",e).call(I,r)}));const FM=t=>{const{curve:u,gradient:l=!1,defined:f=t=>!Number.isNaN(t)&&null!=t,connectNulls:h=!1}=t,d=Z(t,["curve","gradient","defined","connectNulls"]);return(t,e,c,n)=>{var{mark:r,shape:i,defaultShape:a}=e,n=Nx(n,r,i,a),r=n["fill"],i=Z(n,["fill"]),{color:a=r,seriesColor:n,seriesX:r,seriesY:o}=e,e=jx(c,e),n=l&&n?Px(n,r,o,l):a;const s=Object.assign(Object.assign(Object.assign(Object.assign({},i),{stroke:n,fill:n}),e&&{transform:e}),d);var[r,o]=function(e,n){var r=[],i=[],a=[];let o=!1,s=null;var l=e.length/2;for(let t=0;t<l;t++){var c,u,f=e[t],h=e[t+l];[...f,...h].some(t=>!n(t))?o=!0:(r.push(f),i.push(h),o&&s&&(o=!1,[c,u]=s,a.push([c,f,u,h])),s=[f,h])}return[r.concat(i),a]}(t,f),a=J(s,"connect"),i=!!o.length,n=t=>Q(new gs({})).style("d",t).call(I,s).node();return rv(c)?(e=t=>{const n=c.getCenter(),r=t.slice(0,t.length/2),i=t.slice(t.length/2);return t=J2().curve(Q2),e=t.curve,a=t.lineX0,o=t.lineX1,s=t.lineY0,l=t.lineY1,t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return nx(a())},delete t.lineX0,t.lineEndAngle=function(){return nx(o())},delete t.lineX1,t.lineInnerRadius=function(){return nx(s())},delete t.lineY0,t.lineOuterRadius=function(){return nx(l())},delete t.lineY1,t.curve=function(t){return arguments.length?e(ex(t)):e()._curve},t.angle((t,e)=>kx(bx(r[e],n))).outerRadius((t,e)=>xx(r[e],n)).innerRadius((t,e)=>xx(i[e],n)).defined((t,e)=>[...r[e],...i[e]].every(f)).curve(u)(i);var e,a,o,s,l},!i||h&&!Object.keys(a).length?n(e(r)):i&&!h?n(e(t)):Q(new IM).style("areaStyle",s).style("connectStyle",Object.assign(Object.assign({},a),d)).style("areaPath",e(t)).style("connectPath",o.map(e).join("")).node()):(e=t=>{const n=t.slice(0,t.length/2),r=t.slice(t.length/2);return J2().x((t,e)=>n[e][0]).y1((t,e)=>n[e][1]).y0((t,e)=>r[e][1]).defined((t,e)=>[...n[e],...r[e]].every(f)).curve(u)(n)},!i||h&&!Object.keys(a).length?n(e(r)):i&&!h?n(e(t)):Q(new IM).style("areaStyle",s).style("connectStyle",Object.assign(Object.assign({},a),d)).style("areaPath",e(t)).style("connectPath",o.map(e).join("")).node())}},BM=(FM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=rv(n)?dx:X2;return FM(Object.assign({curve:i},a))(t,e,n,r)}),DM=(BM.props=Object.assign({},FM.props),t=>{const{alpha:a=.5}=t,o=Z(t,["alpha"]);return(t,e,n,r)=>{var i=rv(n)?fx:cx;return FM(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),zM=(DM.props=Object.assign({},FM.props),i=>(t,e,n,r)=>FM(Object.assign({curve:yx},i))(t,e,n,r)),GM=(zM.props=Object.assign({},FM.props),t=>{const l=t["arrowSize"],c=Z(t,["arrowSize"]);return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=Nx(r,a,o,s),a=r["stroke"],o=Z(r,["stroke"]),{color:s=a,transform:r}=e,[e,a]=t,t=O2();return t.moveTo(...e),t.lineTo(...a),l&&([e,i]=_x(e,a,{arrowSize:l}),t.moveTo(...a),t.lineTo(...e),t.moveTo(...a),t.lineTo(...i)),Q(new gs).call(I,o).style("d",t.toString()).style("stroke",s).style("transform",r).call(I,c).node()}}),WM=(GM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=Z(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Nx(r,i,a,o),i=r["stroke"],a=Z(r,["stroke"]),{color:o=i,transform:r}=e,[e,i]=t,t=O2();return t.moveTo(e[0],e[1]),t.bezierCurveTo(e[0]/2+i[0]/2,e[1],e[0]/2+i[0]/2,i[1],i[0],i[1]),Q(new gs).call(I,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(I,s).node()}});WM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const VM=t=>{const{cornerRatio:u=1/3}=t,f=Z(t,["cornerRatio"]);return(t,e,n,r)=>{var i,a,{mark:o,shape:s,defaultShape:l}=e,r=Nx(r,o,s,l),o=r["stroke"],s=Z(r,["stroke"]),{color:l=o,transform:r}=e,[e,o]=t,c=(t=e,e=o,o=n,n=u,a=O2(),rv(o)?(i=xx(t,c=o.getCenter()),i=(xx(e,c)-i)*n+i,a.moveTo(t[0],t[1]),Ax(a,t,e,c,i)):nv(o)?(a.moveTo(t[0],t[1]),a.lineTo(t[0]+(e[0]-t[0])*n,t[1]),a.lineTo(t[0]+(e[0]-t[0])*n,e[1])):(a.moveTo(t[0],t[1]),a.lineTo(t[0],t[1]+(e[1]-t[1])*n),a.lineTo(e[0],t[1]+(e[1]-t[1])*n)),a.lineTo(e[0],e[1]),a);return Q(new gs).call(I,s).style("d",c.toString()).style("stroke",l).style("transform",r).call(I,f).node()}},YM=(VM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=Z(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Nx(r,i,a,o),i=r["stroke"],a=Z(r,["stroke"]),{color:o=i,transform:r}=e,[e,i]=t,t=O2();return t.moveTo(e[0],e[1]),rv(n)?(n=n.getCenter(),t.quadraticCurveTo(n[0],n[1],i[0],i[1])):Ax(t,e,i,Mx(e,i),xx(e,i)/2),Q(new gs).call(I,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(I,s).node()}}),HM=(YM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const u=Z(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Nx(r,i,a,o),i=r["stroke"],a=Z(r,["stroke"]),{color:o=i,src:r="",size:e=32,transform:i=""}=e,{width:s=e,height:l=e}=u,[[t,c]]=t,t=t-Number(s)/2,s=c-Number(l)/2;return Q(new ds).call(I,a).style("x",t).style("y",s).style("width",e).style("height",e).style("img",r).style("stroke",o).style("transform",i).call(I,u).node()}});HM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const qM=t=>{const l=Z(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=Nx(r,e,i,a),{fill:e,stroke:i}=r,a=Z(r,["fill","stroke"]),r=function(i,t){const a=O2();if(rv(t)){const o=t.getCenter();t=[...i,i[0]];const s=t.map(t=>xx(t,o));return t.forEach((t,e)=>{var n,r;0===e?a.moveTo(t[0],t[1]):(n=s[e],r=i[e-1],void 0!==(e=s[e-1])&&Math.abs(n-e)<1e-10?Ax(a,r,t,o,n):a.lineTo(t[0],t[1]))}),a.closePath(),a}return n=a,i.forEach((t,e)=>0===e?n.moveTo(t[0],t[1]):n.lineTo(t[0],t[1])),n.closePath(),n;var n}(t,n);return Q(new gs).call(I,a).style("d",r.toString()).style("stroke",o||i).style("fill",o||e).style("transform",s).call(I,l).node()}};qM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const UM=t=>{const l=Z(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=Nx(r,e,i,a),{fill:e,stroke:i}=r,a=Z(r,["fill","stroke"]),r=function(t,e){var n,[t,r,i,a]=t,o=O2();return rv(e)?(n=xx(e=e.getCenter(),t),o.moveTo(t[0],t[1]),o.quadraticCurveTo(e[0],e[1],i[0],i[1]),Ax(o,i,a,e,n),o.quadraticCurveTo(e[0],e[1],r[0],r[1]),Ax(o,r,t,e,n),o.closePath()):(o.moveTo(t[0],t[1]),o.bezierCurveTo(t[0]/2+i[0]/2,t[1],t[0]/2+i[0]/2,i[1],i[0],i[1]),o.lineTo(a[0],a[1]),o.bezierCurveTo(a[0]/2+r[0]/2,a[1],a[0]/2+r[0]/2,r[1],r[0],r[1]),o.lineTo(t[0],t[1]),o.closePath()),o}(t,n);return Q(new gs).call(I,a).style("d",r.toString()).style("fill",o||e).style("stroke",o||i).style("transform",s).call(I,l).node()}};UM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const XM=t=>{const v=Z(t,[]);return(t,e,n,r)=>{var i,a,o,s,l,c,u,{mark:e,shape:f,defaultShape:h,color:d,transform:p}=e,r=Nx(r,e,f,h),{fill:e,stroke:f}=r,h=Z(r,["fill","stroke"]),y=(r=t,t=n,n=O2(),rv(t)?([i,a]=t=t.getCenter(),o=wx(bx(r[0],t)),s=wx(bx(r[1],t)),y=xx(t,r[2]),l=xx(t,r[3]),c=xx(t,r[8]),u=xx(t,r[10]),t=xx(t,r[11]),n.moveTo(...r[0]),n.arc(i,a,y,o,s),n.arc(i,a,y,s,o,!0),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.arc(i,a,l,o,s),n.lineTo(...r[6]),n.arc(i,a,u,s,o,!0),n.closePath(),n.moveTo(...r[8]),n.arc(i,a,c,o,s),n.arc(i,a,c,s,o,!0),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.arc(i,a,t,o,s),n.arc(i,a,t,s,o,!0)):(n.moveTo(...r[0]),n.lineTo(...r[1]),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.lineTo(...r[5]),n.lineTo(...r[6]),n.lineTo(...r[7]),n.closePath(),n.moveTo(...r[8]),n.lineTo(...r[9]),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.lineTo(...r[13])),n);return Q(new gs).call(I,h).style("d",y.toString()).style("stroke",f).style("fill",d||e).style("transform",p).call(I,v).node()}};XM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const KM=t=>{const s=Z(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Nx(r,i,a,o),{stroke:i,lineWidth:a}=r,o=Z(r,["stroke","lineWidth"]),{color:r=i,size:i=a}=e,t=(a=t,rv(t=n)?(t=t.getCenter(),H2()({startAngle:0,endAngle:2*Math.PI,outerRadius:xx(a[0],t),innerRadius:xx(a[1],t)})):Z2().x(t=>t[0]).y(t=>t[1])(a)),a=(a=n,n=e.transform,rv(a)?([a,e]=a.getCenter(),`translate(${a}, ${e}) `+(n||"")):n);return Q(new gs({})).call(I,o).style("d",t).style("stroke",r).style("lineWidth",i).style("transform",a).call(I,s).node()}};function $M(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}KM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const ZM=Gx(t=>{var e=t.attributes,{points:n,endMarker:r=!0}=e,e=Z(e,["points","class","endMarker","direction"]),i=J(e,"endMarker"),n=(n=n,Z2().x(t=>t[0]).y(t=>t[1])(n));Q(t).maybeAppend("connector","path").style("path",n).style("markerEnd",r?new xk({className:"marker",style:Object.assign(Object.assign({},i),{symbol:$M})}):null).call(I,e)});const JM=t=>{const{offset:s=0,connectLength1:l}=t,c=Z(t,["offset","connectLength1"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Nx(r,i,a,o),{fill:i,stroke:a=i,connectLength1:o=l}=r,i=Z(r,["fill","stroke","connectLength1"]),{color:r,transform:e}=e,n=function(t,e,n,r=0){var[[e,i],[a,o]]=e;if(nv(t)){const l=n;var t=e+l,s=t+r;return[[t,i],[s,i],[s,o],[a+l,o]]}const l=-n;return t=i+l,[[e,t],[e,s=t+-r],[a,s],[a,o+l]]}(n,t,s,o);return Q(new ZM).call(I,i).style("points",n).style("stroke",r||a).style("transform",e).call(I,c).node()}};function QM(t,e,a,n){var r=a["bounds"];const[[o,s],[i,l]]=r,c=i-o,u=l-s;r=t=>{var{x:e,y:n}=t,r=Zv(a.x,c),i=Zv(a.y,u);return Object.assign(Object.assign({},t),{x:(r||e)+o,y:(i||n)+s})};return r("left"===t?{x:0,y:u/2,textAnchor:"start",textBaseline:"middle"}:"right"===t?{x:c,y:u/2,textAnchor:"end",textBaseline:"middle"}:"top"===t?{x:c/2,y:0,textAnchor:"center",textBaseline:"top"}:"bottom"===t?{x:c/2,y:u,textAnchor:"center",textBaseline:"bottom"}:"top-left"===t?{x:0,y:0,textAnchor:"start",textBaseline:"top"}:"top-right"===t?{x:c,y:0,textAnchor:"end",textBaseline:"top"}:"bottom-left"===t?{x:0,y:u,textAnchor:"start",textBaseline:"bottom"}:"bottom-right"===t?{x:c,y:u,textAnchor:"end",textBaseline:"bottom"}:{x:c/2,y:u/2,textAnchor:"center",textBaseline:"middle"})}function tO(r,i,t,e){var{y:t,y1:n,autoRotate:a,rotateToAlignArc:o}=t;const s=e.getCenter(),{innerRadius:l,outerRadius:c,startAngle:u,endAngle:f}=Lx(e,i,[t,n]),h="inside"===r?(u+f)/2:f;e=nO(h,a,o),t=(()=>{var[t,e]=i,n=l+.5*(c-l),[n,t]="inside"===r?eO(s,h,n):Mx(t,e);return{x:n,y:t}})();return Object.assign(Object.assign({},t),{textAlign:"inside"===r?"center":"start",textBaseline:"middle",rotate:e})}function eO(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function nO(t,e,n){return e?(e=n?0:Math.sin(t)<0?90:-90,t/Math.PI*180+e):0}function rO(r,t,e,n){const{y:i,y1:a,autoRotate:o,rotateToAlignArc:s,connector:l=!0,connectorLength2:c=0,connectorDistance:u=0,radius:f=.5,offset:h=0}=e,d=Lx(n,t,[i,a]);var{startAngle:e,endAngle:t}=d;const p=n.getCenter(),y=(e+t)/2;var[e,t]=(()=>{var t="inside"===r?f:1,{innerRadius:e,outerRadius:n}=d,n=e+(n-e)*t;return[n,n+h]})();const v=0<Math.sin(y)?1:-1;var[e,t,...g]=((t,e)=>{var[t,n]=eO(p,y,t),[e,r]=eO(p,y,e),i=l?v*c:0;return[[t,n],[e+i,r],[-i,0]]})(e,t),g={connector:l,connectorPoints:g,dx:l?+u*v:0},m=(t,e="x",n="y")=>({[e]:t[0],[n]:t[1]});return Object.assign(Object.assign(Object.assign(Object.assign({},m(e,"x0","y0")),m(t)),(e=r,m=0<v||iv(n),t=nO(y,o,s),"inside"===e?{textAlign:"center",textBaseline:"middle",rotate:t}:{textAlign:m?"start":"end",textBaseline:"middle",rotate:t})),g)}function iO(t,e,n,r){var i=n["bounds"];return 1===i.length?([i]=i=(i=n).bounds,{x:i[0],y:i[1]}):(iv(r)?tO:lv(r)?rO:QM)(t,e,n,r)}JM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var aO=Object.freeze({__proto__:null,top:iO,bottom:iO,right:iO,left:iO,topLeft:iO,topRight:iO,bottomLeft:iO,bottomRight:iO,inside:iO,outside:iO,area:function(t,e,n,r){var i=e.length/2;const a=e.slice(0,i),o=e.slice(i);var e=Uy(a,(t,e)=>Math.abs(t[1]-o[e][1])),i=(l=t=>[a[t][0],(a[t][1]+o[t][1])/2])(e=Math.max(Math.min(e,i-2),1)),s=l(e-1),l=wx(bx(l(e+1),s))/Math.PI*180;return{x:i[0],y:i[1],transform:`rotate(${l}deg)`,textAlign:"center",textBaseline:"middle"}}});function oO(t,e,n,r){var i=e["position"],i=(a=n,void 0!==(i=i)?i:lv(a)?"inside":nv(a)?"right":"top"),a=r["inside"===i?"innerLabel":"label"],r=Object.assign({},a,e),e=aO[i.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})];if(e)return Object.assign(Object.assign({},a),e(i,t,r,n));throw new Error("Unknown position: "+i)}const sO=t=>(t,e,n,r)=>{var i=e["text"],a=Z(e,["text","x","y"]),t=oO(t,e,n,r),{rotate:e=0,transform:r=""}=t,t=Z(t,["rotate","transform"]);return Q(new NM).call(I,t).style("text",""+i).style("transform",r+`rotate(${+e}deg)`).style("coordCenter",n.getCenter()).call(I,a).node()},lO=(sO.props={},t=>{const s=t["colorAttribute"],l=Z(t,["arrow","colorAttribute"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Z(Nx(r,i,a,o),["stroke"]),{d:i,color:a}=e;return Q(new gs).call(I,r).style("d",i).style(s,a).call(I,l).node()}}),cO=(lO.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>lO(Object.assign({colorAttribute:"fill"},t))),uO=(cO.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>lO(Object.assign({fill:"none",colorAttribute:"stroke"},t))),fO=(uO.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const a=t["render"],o=Z(t,["render"]);return(t,e,n,r)=>{var[[t,i]]=t;return a(Object.assign(Object.assign({},o),{x:t,y:i}))}}),hO=(fO.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},{BLACK:"#000",WHITE:"#fff",STROKE:"#416180"}),dO=t=>{var e="#5B8FF9",e={defaultColor:e,defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:hO.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"transparent",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1,connectStroke:"#aaa"}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,fill:"",strokeOpacity:.95,lineWidth:1},plus:{r:3,fill:"",strokeOpacity:.95,lineWidth:3},diamond:{r:3,fill:"",strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0,connectFill:hO.BLACK,connectFillOpacity:.1}},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:"#1D2129",lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,strokeWidth:0,connectorStroke:hO.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:hO.STROKE,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:hO.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:hO.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:hO.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:hO.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:hO.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:hO.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:hO.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:hO.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:hO.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,lineStroke:hO.BLACK,lineStrokeOpacity:.45,lineLineWidth:.5,lineArrow:null,tickStroke:hO.BLACK,tickStrokeOpacity:.25,tickLineWidth:1,tickLength:4,labelFill:hO.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,labelAlign:"horizontal",gridStroke:hO.BLACK,gridStrokeOpacity:.05,gridLineWidth:.5,gridLineDash:[0,0],titleTransformOrigin:"center"},axisTop:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle",labelSpacing:8,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisBottom:{titleSpacing:10,titleTextBaseline:"bottom",labelSpacing:12,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"},axisLeft:{titleTextBaseline:"middle",titleSpacing:10,titlePosition:"left",titleTransformOrigin:"center",titleTransform:"translate(50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"},axisRight:{titleTextBaseline:"top",titleSpacing:0,titlePosition:"right",titleTransformOrigin:"center",titleTransform:"translate(-50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisArcY:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"bottom",gridDirection:"negative",gridConnect:"arc",gridControlAngles:[90,180,360],gridType:"surround",girdClosed:!0},legend:{padding:8,showTitle:!1,titleFill:hO.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,itemMarkerFill:e,itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemLabelFill:hO.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemValueFill:hO.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:hO.BLACK,navButtonFillOpacity:.45,navPageNumFill:hO.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,backgroundFill:"transparent"},continuousLegend:{labelFill:hO.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:hO.BLACK,handleMarkerFillOpacity:.6,handleMarkerStroke:hO.BLACK,handleMarkerStrokeOpacity:.25,handleMarkerLineWidth:1,handleLabelFill:hO.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},label:{fill:hO.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null,offset:12,connectorStroke:hO.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength2:8,connectorDistance:4},innerLabel:{fill:hO.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{railSize:16,backgroundFill:hO.STROKE,backgroundFillOpacity:1,selectionFill:e,selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:hO.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:hO.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{},title:{fill:hO.BLACK,fillOpacity:.85,fontSize:24,fontWeight:"bold",textBaseline:"top"},subtitle:{fill:hO.BLACK,fillOpacity:.65,fontSize:10,fontWeight:"normal",textBaseline:"top"}};return Object.assign({},e,t)},pO=(dO.props={},{BLACK:"#fff",WHITE:"#000",STROKE:"#416180"}),yO=t=>{var e="#5B8FF9",e={defaultColor:e,defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:pO.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"#141414",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1,connectStroke:"#666"}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,fill:"",strokeOpacity:.95,lineWidth:1},plus:{r:3,fill:"",strokeOpacity:.95,lineWidth:3},diamond:{r:3,fill:"",strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0,connectFill:pO.BLACK,connectFillOpacity:.1}},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:"#1D2129",lineWidth:1}},text:{text:{fill:pO.BLACK,fillOpacity:.65,fontSize:12,strokeWidth:0,connectorStroke:pO.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:pO.STROKE,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:pO.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:pO.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:pO.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:pO.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:pO.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:pO.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:pO.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:pO.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:pO.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,lineStroke:pO.BLACK,lineStrokeOpacity:.45,lineLineWidth:.5,lineArrow:null,tickStroke:pO.BLACK,tickStrokeOpacity:.25,tickLineWidth:1,tickLength:4,labelFill:pO.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,labelAlign:"horizontal",gridStroke:pO.BLACK,gridStrokeOpacity:.05,gridLineWidth:.5,gridLineDash:[0,0],titleTransformOrigin:"center"},axisTop:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle",labelSpacing:8,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisBottom:{titleSpacing:10,titleTextBaseline:"bottom",labelSpacing:12,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"},axisLeft:{titleTextBaseline:"middle",titleSpacing:10,titlePosition:"left",titleTransformOrigin:"center",titleTransform:"translate(50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"},axisRight:{titleTextBaseline:"top",titleSpacing:0,titlePosition:"right",titleTransformOrigin:"center",titleTransform:"translate(-50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisArcY:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"bottom",gridDirection:"negative",gridConnect:"arc",gridControlAngles:[90,180,360],gridType:"surround",girdClosed:!0},legend:{padding:8,showTitle:!1,titleFill:pO.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,itemMarkerFill:e,itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemLabelFill:pO.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemValueFill:pO.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:pO.BLACK,navButtonFillOpacity:.45,navPageNumFill:pO.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,backgroundFill:"transparent"},continuousLegend:{labelFill:pO.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:pO.BLACK,handleMarkerFillOpacity:.6,handleMarkerStroke:pO.BLACK,handleMarkerStrokeOpacity:.25,handleMarkerLineWidth:1,handleLabelFill:pO.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},label:{fill:pO.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null,offset:12,connectorStroke:pO.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength2:8,connectorDistance:4},innerLabel:{fill:pO.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{railSize:16,backgroundFill:pO.STROKE,backgroundFillOpacity:1,selectionFill:e,selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:pO.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:pO.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{},title:{fill:pO.BLACK,fillOpacity:.85,fontSize:24,fontWeight:"bold",textBaseline:"top"},subtitle:{fill:pO.BLACK,fillOpacity:.65,fontSize:10,fontWeight:"normal",textBaseline:"top"}};return Object.assign({},e,t)};function vO(t,e){var n;return(e=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0?null:[1<(n=t.slice(0,e)).length?n[0]+n.slice(2):n,+t.slice(e+1)]}yO.props={},yO.props={};var gO,mO=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function bO(t){var e;if(e=mO.exec(t))return new xO({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]});throw new Error("invalid format: "+t)}function xO(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+""}function wO(t,e){var n,e=vO(t,e);return e?(n=e[0],(e=e[1])<0?"0."+new Array(-e).join("0")+n:n.length>e+1?n.slice(0,e+1)+"."+n.slice(e+1):n+new Array(e-n.length+2).join("0")):t+""}bO.prototype=xO.prototype,xO.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};var kO={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return 1e21<=Math.abs(t=Math.round(t))?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)=>wO(100*t,e),r:wO,s:function(t,e){var n,r,i=vO(t,e);return i?(n=i[0],(i=(i=i[1])-(gO=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1)===(r=n.length)?n:r<i?n+new Array(i-r+1).join("0"):0<i?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+vO(t,Math.max(0,e+i-1))[0]):t+""},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function EO(t){return t}var MO,OO,SO=Array.prototype.map,_O=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function AO(t){var e,s,l,k=void 0===t.grouping||void 0===t.thousands?EO:(s=SO.call(t.grouping,Number),l=t.thousands+"",function(t,e){for(var n=t.length,r=[],i=0,a=s[0],o=0;0<n&&0<a&&(e<o+a+1&&(a=Math.max(1,e-o)),r.push(t.substring(n-=a,n+a)),!((o+=a+1)>e));)a=s[i=(i+1)%s.length];return r.reverse().join(l)}),r=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",E=void 0===t.decimal?".":t.decimal+"",M=void 0===t.numerals?EO:(e=SO.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}),a=void 0===t.percent?"%":t.percent+"",O=void 0===t.minus?"−":t.minus+"",S=void 0===t.nan?"NaN":t.nan+"";function o(t){var c=(t=bO(t)).fill,u=t.align,f=t.sign,e=t.symbol,h=t.zero,d=t.width,p=t.comma,y=t.precision,v=t.trim,g=t.type,m=("n"===g?(p=!0,g="g"):kO[g]||(void 0===y&&(y=12),v=!0,g="g"),(h||"0"===c&&"="===u)&&(h=!0,c="0",u="="),"$"===e?r:"#"===e&&/[boxX]/.test(g)?"0"+g.toLowerCase():""),b="$"===e?i:/[%p]/.test(g)?a:"",x=kO[g],w=/[defgprs%]/.test(g);function n(t){var e,n,r,i=m,a=b;if("c"===g)a=x(t)+a,t="";else{var o=(t=+t)<0||1/t<0;if(t=isNaN(t)?S:x(Math.abs(t),y),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;0<i&&(i=0)}return 0<i?t.slice(0,i)+t.slice(e+1):t}(t)),i=((o=o&&0==+t&&"+"!==f?!1:o)?"("===f?f:O:"-"===f||"("===f?"":f)+i,a=("s"===g?_O[8+gO/3]:"")+a+(o&&"("===f?")":""),w)for(e=-1,n=t.length;++e<n;)if((r=t.charCodeAt(e))<48||57<r){a=(46===r?E+t.slice(e+1):t.slice(e))+a,t=t.slice(0,e);break}}p&&!h&&(t=k(t,1/0));var s=i.length+t.length+a.length,l=s<d?new Array(d-s+1).join(c):"";switch(p&&h&&(t=k(l+t,l.length?d-a.length:1/0),l=""),u){case"<":t=i+t+a+l;break;case"=":t=i+l+t+a;break;case"^":t=l.slice(0,s=l.length>>1)+i+t+a+l.slice(s);break;default:t=l+i+t+a}return M(t)}return y=void 0===y?6:/[gprs]/.test(g)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),n.toString=function(){return t+""},n}return{format:o,formatPrefix:function(t,e){var n=o(((t=bO(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor((t=e,((t=vO(Math.abs(t)))?t[1]:NaN)/3)))),r=Math.pow(10,-e),i=_O[8+e/3];return function(t){return n(r*t)+i}}}}function PO(t,e,n){return t.querySelector(e)?Q(t).select(e):Q(t).append(n)}function TO(t){return Array.isArray(t)?t.join(", "):""+(t||"")}function LO(t){var{innerWidth:t,innerHeight:e}=t.getOptions();return[t,e]}function NO(a,t,e,n,r,i,o,s){void 0===e&&void 0===i||a.update(Object.assign(Object.assign({},e&&{tickCount:e}),i&&{tickMethod:i})),e=t,t=i;var l,t=(i=a).getTicks?i.getTicks():t?([c,l]=Sy(e,t=>+t),i=i.getOptions()["tickCount"],t(c,l,i)):e,c=r?t.filter(r):t;const u=(null==(l=a.getFormatter)?void 0:l.call(a))||n,f=function(t,e){var{innerWidth:e,innerHeight:n,insetTop:r,insetBottom:i,insetLeft:a,insetRight:o}=e.getOptions(),[t,r,i]="left"===t||"right"===t?[r,i,n]:[a,o,e];const s=new Rb({domain:[0,1],range:[t/i,1-r/i]});return t=>s.map(t)}(o,s),h=function(r,i){const{width:a,height:o}=i.getOptions();return t=>{var e,n;return sv(i)?(e=i.map("bottom"===r?[t,1]:[0,t]),"bottom"===r?(n=e[0],new Rb({domain:[0,a],range:[0,1]}).map(n)):"left"===r?(n=e[1],new Rb({domain:[0,o],range:[0,1]}).map(n)):t):t}}(o,s);return rv(s)||nv(s)?(i=c.map((t,e,n)=>{var r,i=(null==(i=a.getBandWidth)?void 0:i.call(a,t))/2||0,i=f(a.map(t)+i);return{value:nv(s)&&null!=(r=a.getTicks)&&r.call(a)?1-i:i,label:u(t,e,n),id:String(e)}}),iv(s)&&"arcY"===o?i.map(t=>{var e=t["value"],t=Z(t,["value"]);return Object.assign({value:1-e},t)}):i):c.map((t,e,n)=>{var r=(null==(r=a.getBandWidth)?void 0:r.call(a,t))/2||0;return{value:h(f(a.map(t)+r)),label:""+u("number"!=typeof(r=t)||Math.abs(r)<1e-15?r:parseFloat(r.toFixed(15)),e,n),id:String(e)}})}function CO(t,e,n){var r;return!(rv(r=e)&&nv(r)||ov(e))&&(void 0===t?!!n.getTicks:t)}Co=AO({thousands:",",grouping:[3],currency:["$",""]}),MO=Co.format,Co.formatPrefix;const jO=t=>{const{position:c,labelFormatter:u=t=>""+t,tickFilter:f,tickCount:h,tickMethod:d,title:p,grid:y=!1}=t,v=Z(t,["order","size","position","labelFormatter","tickFilter","tickCount","tickMethod","title","grid"]);return(t,e,n,r)=>{var{domain:e,bbox:i}=e,{x:i,y:a,width:o,height:s}=i,i=[i+o/2,a+s/2],a=NO(t,e,h,u,f,d,c,n),t=Math.min(o,s)/2,[e,o]=function(t){var[,t,e]=(t=t.getOptions()["transformations"]).find(t=>"polar"===t[0]);return[180*+t/Math.PI,180*+e/Math.PI]}(n),[s,l]=function(t){var[,,,t,e]=(t=t.getOptions()["transformations"]).find(t=>"polar"===t[0]);return[+t,+e]}(n),s=function(t,e,n,r){var[i,a]=LO(r),n={titleFillOpacity:0,titlePosition:"inner",showLine:!1,showTick:!0,gridLength:(n-e)*(Math.min(i,a)/2)};return"arcInner"===t?(LO(r),Object.assign(Object.assign({},n),{labelAlign:"perpendicular",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",gridDirection:"negative"})):Object.assign(Object.assign({},n),{labelAlign:"parallel",labelDirection:"negative",labelSpacing:8,tickDirection:"negative",gridDirection:"positive"})}(c,s,l,n),l=r["axis"];return new a5({style:R({},l,s,Object.assign({type:"arc",center:i,radius:t,angleRange:[e,o],data:a,title:TO(p),showGrid:y},v))})}};const RO=c=>{const{position:u,title:f,labelFormatter:h=t=>""+t,direction:d="left",tickCount:p,tickFilter:y,tickMethod:v,labelAutoHide:g=!1,labelAutoRotate:m=!0,grid:b,label:x=!0,tick:w=!0}=c,k=Z(c,["order","size","transform","position","title","labelFormatter","direction","tickCount","tickFilter","tickMethod","labelAutoHide","labelAutoRotate","grid","label","tick"]);return(t,e,n,r)=>{var i,a,{domain:e,bbox:o}=e,e=NO(t,e,p,h,y,v,u,n),s=CO(b,n,t),l=function(t,e){var[e,n]=LO(e);return"bottom"===t||"top"===t?n:e}(u,n),o=function(t,e,n){var[,n]=n.getCenter(),{x:r,y:i,width:a,height:o}=e;return"bottom"===t?{startPos:[r,i],endPos:[r+a,i]}:"left"===t||"centerHorizontal"===t?{startPos:[r+a,i],endPos:[r+a,i+o],showLine:"centerHorizontal"===t||void 0}:"right"===t?{endPos:[r,i+o],startPos:[r,i]}:"arcY"===t?{startPos:[r,i],endPos:[r+a,i+o],gridCenter:[e.x,n+e.y]}:{startPos:[r,i+o],endPos:[r+a,i+o],showLine:"centerVertical"===t||void 0}}(u,o,n),{showLine:n=void 0!==c.line&&c.line}=o,o=Z(o,["showLine"]),t=(t=t,r=r,i=u,a=d,r=Object.assign({},r.axis,r["axis"+qv("centerHorizontal"===i?"left":i)]||r.axisTop),"bottom"===i?Object.assign(Object.assign({},r),{titlePosition:t.getTicks?"right-bottom":"bottom",titleTransformOrigin:"center",titleTransform:t.getTicks?"translate(-100%, 0)":void 0}):"arcY"===i?Object.assign(Object.assign({},r),{labelDirection:"right"===a?"negative":"positive",labelTransform:"center"===a?"translate(50%, 0)":"",tickDirection:"right"===a?"negative":"positive",labelSpacing:"center"===a?0:4}):r),t=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),{type:"linear",data:e,title:TO(f),showLabel:x,labelTransforms:(i=g,a=m,r=[],i&&r.push({type:"hide"}),a&&r.push({type:"rotate",optionalAngles:[0,30,45,60,90]}),r),showGrid:s,showTick:w,gridLength:l}),k),{showLine:!0}),n?null:{lineOpacity:0}),o);return new a5({style:t})}},IO=t=>{const{position:i,labelFormatter:e=t=>""+t}=t;var n="string"==typeof e?MO(e):e;const a=Object.assign(Object.assign({},t),{labelFormatter:n});return(t,e,n,r)=>("arc"===i||"arcInner"===i?jO:RO)(a)(t,e,n,r)},FO=(IO.props={defaultPosition:"left",defaultSize:45,defaultOrder:0},t=>IO(t)),BO=(FO.props=Object.assign(Object.assign({},IO.props),{defaultPosition:"bottom"}),t=>IO(t));BO.props=Object.assign(Object.assign({},IO.props),{defaultPosition:"left"});const DO=t=>{const{position:u,labelFormatter:f=t=>""+t,dx:h=0,dy:d=0,title:p,gridCol:y,gridRow:v}=t,g=Z(t,["order","size","position","labelFormatter","dx","dy","title","gridCol","gridRow"]);return(e,t,n,r)=>{var{domain:t,bbox:i}=t,{x:i,y:a,width:o,height:s}=i,t=t.map(t=>({id:t,label:f(t),value:"",color:e.map(t)})),[l,c]=function(t,e,n){var[r,i]=[e||100,n||100];return{top:[1,i],bottom:[1,i],left:[r,1],right:[r,1],arcCenter:[r,1]}[t]||[e,n]}(u,v,y),t={data:t,x:i+h,y:a+d,orient:["right","left","arcCenter"].includes(u)?"vertical":"horizontal",width:o,height:s,gridCol:c,gridRow:l,rowPadding:0,colPadding:8,titleText:TO(p),itemMarkerFill:t=>t?t.color:"#fff"},{legend:i={}}=r;return new S5({className:"legend-category",style:Object.assign({},i,t,g)})}},zO=(DO.props={defaultPosition:"top",defaultOrder:1,defaultSize:40},t=>{const l=t["title"],c=Z(t,["title"]);return(e,t,n,r)=>{var{domain:t,bbox:i}=t,{x:i,y:a}=i,[o,s]=t,{continuousLegend:r={}}=r;return new U5({style:Object.assign({},r,{x:i,y:a,width:400,height:300,data:[{value:o},{value:s}],titleText:TO(l),titleFontSize:12,ribbonLen:120,ribbonSize:12,ribbonColor:t.map(t=>e.map(t)),showHandle:!1,showIndicator:!1,labelAlign:"value"},c)})}}),GO=(zO.props={defaultPosition:"top",defaultOrder:1,defaultSize:40},OO={render(t,e){const{text:n,style:r,subtitle:i,subtitleStyle:a}=t;t=PO(e,".title","text").attr("className","title").style("fontSize",14).style("textBaseline","top").style("text",n).call(I,r||{}).node().getLocalBounds();PO(e,".sub-title","text").attr("className","sub-title").style("y",t.max[1]+((null===a||void 0===a?void 0:a.spacing)||0)).style("fontSize",12).style("textBaseline","top").call(t=>{if(!i)return t.node().remove();t.node().attr(Object.assign({text:i},a))})}},class extends ns{constructor(t){super(t),this.descriptor=OO}connectedCallback(){var t,e;null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}update(t={}){var e;this.attr(R({},this.attributes,t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}}),WO=t=>{const{text:a,style:o,subtitle:s,subtitleStyle:l}=t;return(t,e,n,r)=>{var{x:e,y:i}=e.bbox;return new GO({style:R({},{style:r.title,subtitleStyle:r.subtitle},{x:e,y:i,style:o,text:a,subtitle:s,subtitleStyle:l})})}},VO=(WO.props={defaultPosition:"top",defaultOrder:2,defaultSize:30},t=>{const{orient:u,labelFormatter:f}=t,h=Z(t,["orient","labelFormatter","size"]);return(e,t,n,r)=>{var i,t=t["bbox"],{x:t,y:a,width:o,height:s}=t,{slider:r={}}=r;const l=(null==(i=e.getFormatter)?void 0:i.call(e))||(t=>t),c="string"==typeof f?MO(f):f;return new rE({className:"slider",style:Object.assign({},r,Object.assign({x:t,y:a,length:"horizontal"===u?o:s,orient:u,formatter:t=>{return(c||l)(function(t,n){if(!t.getBandWidth)return t.invert(n);const e=t.adjustedRange,r=t=>Math.abs(t);return t.invert(function(e,n){let r,i=!1;if(1===n.length){let t;for(const o of e){var a=n(o);(i?by(a,t)<0:0===by(a,a))&&(r=o,t=a,i=!0)}}else for(const t of e)(i?n(t,r)<0:0===n(t,t))&&(r=t,i=!0);return r}(e,(t,e)=>r(t-n)-r(e-n)))}(e,t))},size:r.railSize},h))})}});VO.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1};const YO=t=>VO(Object.assign(Object.assign({},t),{orient:"horizontal"})),HO=(YO.props=Object.assign(Object.assign({},VO.props),{defaultPosition:"bottom"}),t=>VO(Object.assign(Object.assign({},t),{orient:"vertical"})));HO.props=Object.assign(Object.assign({},VO.props),{defaultPosition:"left"});class qO{constructor(t){this.$value=t}static of(t){return new qO(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}function UO(t,e,n){return qO.of({}).call(XO,t).call(XO,e).call(XO,n).value()}function XO(t,e){for(var[n,r]of Object.entries(e))void 0!==r&&(t[n]=e[n]);return t}function KO(t,e){var n={};for(const i of e){var r=t.style[i];r&&(n[i]=r)}return n}const $O=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"],ZO=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=nv(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,UO(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},JO=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=nv(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,UO(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},QO=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=nv(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,UO(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},t3=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=nv(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,UO(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},e3=l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a,strokeOpacity:o,opacity:s}=t.style;return t.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:a,strokeOpacity:o,opacity:s}],UO(i,n,l))},n3=(e3.props={},l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a,strokeOpacity:o,opacity:s}=t.style;return t.animate([{fillOpacity:a,strokeOpacity:o,opacity:s},{fillOpacity:0,strokeOpacity:0,opacity:0}],UO(i,n,l))});function r3(t){var{min:t,max:e}=t.getLocalBounds(),[t,n]=t,[e,r]=e;return[t,n,e-t,r-n]}function i3(t,e){var[n,r,i,t]=r3(t),a=Math.ceil(Math.sqrt(e/(t/i))),o=[],s=t/Math.ceil(e/a);let l=0,c=e;for(;0<c;){var u=Math.min(c,a),f=i/u;for(let t=0;t<u;t++){var h=n+t*f,d=r+l*s;o.push(function(t){var[t,e,n,r]=t;return`
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).G2={})}(this,function(f){"use strict";const p="main-layer",et="label-layer",nt="element",C="view",rt="plot",it="component",at="label",ot="area";var j="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function I(t,e,n,r,i){!function t(e,n,r,i,a){for(;r<i;){600<i-r&&(o=i-r+1,u=n-r+1,l=Math.log(o),s=.5*Math.exp(2*l/3),l=.5*Math.sqrt(l*s*(o-s)/o)*(u-o/2<0?-1:1),c=Math.max(r,Math.floor(n-u*s/o+l)),u=Math.min(i,Math.floor(n+(o-u)*s/o+l)),t(e,n,c,u,a));var o,s,l,c,u,h=e[n],f=r,d=i;for(B(e,r,n),0<a(e[i],h)&&B(e,r,i);f<d;){for(B(e,f,d),f++,d--;a(e[f],h)<0;)f++;for(;0<a(e[d],h);)d--}0===a(e[r],h)?B(e,r,d):B(e,++d,i),d<=n&&(r=d+1),n<=d&&(i=d-1)}}(t,e,n||0,r||t.length-1,i||D)}function B(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function D(t,e){return t<e?-1:e<t?1:0}function z(t,e){G(t,0,t.children.length,e,t)}function G(t,e,n,r,i){(i=i||$(null)).minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var a=e;a<n;a++){var o=t.children[a];W(i,t.leaf?r(o):o)}return i}function W(t,e){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)}function V(t,e){return t.minX-e.minX}function Y(t,e){return t.minY-e.minY}function H(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function q(t){return t.maxX-t.minX+(t.maxY-t.minY)}function U(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function X(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function $(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function K(t,e,n,r,i){for(var a,o=[e,n];o.length;)(n=o.pop())-(e=o.pop())<=r||(I(t,a=e+Math.ceil((n-e)/r/2)*r,e,n,i),o.push(e,a,a,n))}(e=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()}).prototype.all=function(){return this._all(this.data,[])},e.prototype.search=function(t){var e=this.data,n=[];if(X(t,e))for(var r=this.toBBox,i=[];e;){for(var a=0;a<e.children.length;a++){var o=e.children[a],s=e.leaf?r(o):o;X(t,s)&&(e.leaf?n.push(o):U(t,s)?this._all(o,n):i.push(o))}e=i.pop()}return n},e.prototype.collides=function(t){var e=this.data;if(X(t,e))for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],a=e.leaf?this.toBBox(i):i;if(X(t,a)){if(e.leaf||U(t,a))return!0;n.push(i)}}e=n.pop()}return!1},e.prototype.load=function(t){if(t&&t.length)if(t.length<this._minEntries)for(var e=0;e<t.length;e++)this.insert(t[e]);else{var n,r=this._build(t.slice(),0,t.length-1,0);this.data.children.length?this.data.height===r.height?this._splitRoot(this.data,r):(this.data.height<r.height&&(n=this.data,this.data=r,r=n),this._insert(r,this.data.height-r.height-1,!0)):this.data=r}return this},e.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},e.prototype.clear=function(){return this.data=$([]),this},e.prototype.remove=function(t,e){if(t)for(var n,r,i,a=this.data,o=this.toBBox(t),s=[],l=[];a||s.length;){if(a||(a=s.pop(),r=s[s.length-1],n=l.pop(),i=!0),a.leaf){var c=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,a.children,e);if(-1!==c)return a.children.splice(c,1),s.push(a),this._condense(s),this}i||a.leaf||!U(a,o)?r?(n++,a=r.children[n],i=!1):a=null:(s.push(a),l.push(n),a=(r=a).children[n=0])}return this},e.prototype.toBBox=function(t){return t},e.prototype.compareMinX=function(t,e){return t.minX-e.minX},e.prototype.compareMinY=function(t,e){return t.minY-e.minY},e.prototype.toJSON=function(){return this.data},e.prototype.fromJSON=function(t){return this.data=t,this},e.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},e.prototype._build=function(t,e,n,r){var i,a=n-e+1,o=this._maxEntries;if(a<=o)z(i=$(t.slice(e,n+1)),this.toBBox);else{r||(r=Math.ceil(Math.log(a)/Math.log(o)),o=Math.ceil(a/Math.pow(o,r-1))),(i=$([])).leaf=!1,i.height=r;var s=Math.ceil(a/o),l=s*Math.ceil(Math.sqrt(o));K(t,e,n,l,this.compareMinX);for(var c=e;c<=n;c+=l){var u=Math.min(c+l-1,n);K(t,c,u,s,this.compareMinY);for(var h=c;h<=u;h+=s){var f=Math.min(h+s-1,u);i.children.push(this._build(t,h,f,r-1))}}z(i,this.toBBox)}return i},e.prototype._chooseSubtree=function(t,e,n,r){for(;;){if(r.push(e),e.leaf||r.length-1===n)break;for(var i=1/0,a=1/0,o=void 0,s=0;s<e.children.length;s++){var l=e.children[s],c=H(l),u=(h=t,u=l,(Math.max(u.maxX,h.maxX)-Math.min(u.minX,h.minX))*(Math.max(u.maxY,h.maxY)-Math.min(u.minY,h.minY))-c);u<a?(a=u,i=c<i?c:i,o=l):u===a&&c<i&&(i=c,o=l)}e=o||e.children[0]}var h,u;return e},e.prototype._insert=function(t,e,n){var n=n?t:this.toBBox(t),r=[],i=this._chooseSubtree(n,this.data,e,r);for(i.children.push(t),W(i,n);0<=e&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},e.prototype._split=function(t,e){var n=t[e],r=n.children.length,i=this._minEntries,i=(this._chooseSplitAxis(n,i,r),this._chooseSplitIndex(n,i,r)),r=$(n.children.splice(i,n.children.length-i));r.height=n.height,r.leaf=n.leaf,z(n,this.toBBox),z(r,this.toBBox),e?t[e-1].children.push(r):this._splitRoot(n,r)},e.prototype._splitRoot=function(t,e){this.data=$([t,e]),this.data.height=t.height+1,this.data.leaf=!1,z(this.data,this.toBBox)},e.prototype._chooseSplitIndex=function(t,e,n){for(var r,i,a,o,s=1/0,l=1/0,c=e;c<=n-e;c++){var u=G(t,0,c,this.toBBox),h=G(t,c,n,this.toBBox),f=(i=u,f=h,d=o=a=void 0,a=Math.max(i.minX,f.minX),o=Math.max(i.minY,f.minY),d=Math.min(i.maxX,f.maxX),i=Math.min(i.maxY,f.maxY),Math.max(0,d-a)*Math.max(0,i-o)),d=H(u)+H(h);f<s?(s=f,r=c,l=d<l?d:l):f===s&&d<l&&(l=d,r=c)}return r||n-e},e.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:V,i=t.leaf?this.compareMinY:Y;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},e.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var i=this.toBBox,a=G(t,0,e,i),o=G(t,n-e,n,i),s=q(a)+q(o),l=e;l<n-e;l++){var c=t.children[l];W(a,t.leaf?i(c):c),s+=q(a)}for(var u=n-e-1;e<=u;u--){var h=t.children[u];W(o,t.leaf?i(h):h),s+=q(o)}return s},e.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;0<=r;r--)W(e[r],t)},e.prototype._condense=function(t){for(var e=t.length-1,n=void 0;0<=e;e--)0===t[e].children.length?0<e?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():z(t[e],this.toBBox)};var Z=e,st=1e-6,lt="undefined"!=typeof Float32Array?Float32Array:Array;function ct(){var t=new lt(9);return lt!=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}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var ut=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],e=e[8],h=n[0],f=n[1],d=n[2],p=n[3],g=n[4],y=n[5],m=n[6],v=n[7],n=n[8];return t[0]=h*r+f*o+d*c,t[1]=h*i+f*s+d*u,t[2]=h*a+f*l+d*e,t[3]=p*r+g*o+y*c,t[4]=p*i+g*s+y*u,t[5]=p*a+g*l+y*e,t[6]=m*r+v*o+n*c,t[7]=m*i+v*s+n*u,t[8]=m*a+v*l+n*e,t};function ht(){var t=new lt(16);return lt!=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 ft(t){var e=new lt(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 dt(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 pt(t,e,n,r,i,a,o,s,l,c,u,h,f,d,p,g,y){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=l,t[8]=c,t[9]=u,t[10]=h,t[11]=f,t[12]=d,t[13]=p,t[14]=g,t[15]=y,t}function gt(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 yt(t,e){var n,r,i,a,o,s;return t===e?(n=e[1],r=e[2],i=e[3],a=e[6],o=e[7],s=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]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s):(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]),t}function mt(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],h=e[9],f=e[10],d=e[11],p=e[12],g=e[13],y=e[14],e=e[15],m=n*s-r*o,v=n*l-i*o,b=n*c-a*o,x=r*l-i*s,w=r*c-a*s,k=i*c-a*l,E=u*g-h*p,M=u*y-f*p,O=u*e-d*p,S=h*y-f*g,_=h*e-d*g,A=f*e-d*y,T=m*A-v*_+b*S+x*O-w*M+k*E;return T?(t[0]=(s*A-l*_+c*S)*(T=1/T),t[1]=(i*_-r*A-a*S)*T,t[2]=(g*k-y*w+e*x)*T,t[3]=(f*w-h*k-d*x)*T,t[4]=(l*O-o*A-c*M)*T,t[5]=(n*A-i*O+a*M)*T,t[6]=(y*b-p*k-e*v)*T,t[7]=(u*k-f*b+d*v)*T,t[8]=(o*_-s*O+c*E)*T,t[9]=(r*O-n*_-a*E)*T,t[10]=(p*w-g*b+e*m)*T,t[11]=(h*b-u*w-d*m)*T,t[12]=(s*M-o*S-l*E)*T,t[13]=(n*S-r*M+i*E)*T,t[14]=(g*v-p*x-y*m)*T,t[15]=(u*x-h*v+f*m)*T,t):null}function vt(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],h=t[10],f=t[11],d=t[12],p=t[13],g=t[14],t=t[15];return(e*o-n*a)*(h*t-f*g)-(e*s-r*a)*(u*t-f*p)+(e*l-i*a)*(u*g-h*p)+(n*s-r*o)*(c*t-f*d)-(n*l-i*o)*(c*g-h*d)+(r*l-i*s)*(c*p-u*d)}function bt(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=e[8],f=e[9],d=e[10],p=e[11],g=e[12],y=e[13],m=e[14],e=e[15],v=n[0],b=n[1],x=n[2],w=n[3];return t[0]=v*r+b*s+x*h+w*g,t[1]=v*i+b*l+x*f+w*y,t[2]=v*a+b*c+x*d+w*m,t[3]=v*o+b*u+x*p+w*e,v=n[4],b=n[5],x=n[6],w=n[7],t[4]=v*r+b*s+x*h+w*g,t[5]=v*i+b*l+x*f+w*y,t[6]=v*a+b*c+x*d+w*m,t[7]=v*o+b*u+x*p+w*e,v=n[8],b=n[9],x=n[10],w=n[11],t[8]=v*r+b*s+x*h+w*g,t[9]=v*i+b*l+x*f+w*y,t[10]=v*a+b*c+x*d+w*m,t[11]=v*o+b*u+x*p+w*e,v=n[12],b=n[13],x=n[14],w=n[15],t[12]=v*r+b*s+x*h+w*g,t[13]=v*i+b*l+x*f+w*y,t[14]=v*a+b*c+x*d+w*m,t[15]=v*o+b*u+x*p+w*e,t}function xt(t,e,n){var r,i,a,o,s,l,c,u,h,f,d,p,g=n[0],y=n[1],n=n[2];return e===t?(t[12]=e[0]*g+e[4]*y+e[8]*n+e[12],t[13]=e[1]*g+e[5]*y+e[9]*n+e[13],t[14]=e[2]*g+e[6]*y+e[10]*n+e[14],t[15]=e[3]*g+e[7]*y+e[11]*n+e[15]):(r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=e[8],f=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=r*g+s*y+h*n+e[12],t[13]=i*g+l*y+f*n+e[13],t[14]=a*g+c*y+d*n+e[14],t[15]=o*g+u*y+p*n+e[15]),t}function wt(t,e,n){var r=n[0],i=n[1],n=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]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function kt(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[4],a=e[5],o=e[6],s=e[7],l=e[8],c=e[9],u=e[10],h=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]=i*n+l*r,t[5]=a*n+c*r,t[6]=o*n+u*r,t[7]=s*n+h*r,t[8]=l*n-i*r,t[9]=c*n-a*r,t[10]=u*n-o*r,t[11]=h*n-s*r,t}function Et(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[8],c=e[9],u=e[10],h=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]=i*n-l*r,t[1]=a*n-c*r,t[2]=o*n-u*r,t[3]=s*n-h*r,t[8]=i*r+l*n,t[9]=a*r+c*n,t[10]=o*r+u*n,t[11]=s*r+h*n,t}function Mt(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 Ot(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 St(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=r+r,s=i+i,l=a+a,c=r*o,u=r*s,r=r*l,h=i*s,i=i*l,a=a*l,o=e*o,s=e*s,e=e*l;return t[0]=1-(h+a),t[1]=u+e,t[2]=r-s,t[3]=0,t[4]=u-e,t[5]=1-(c+a),t[6]=i+o,t[7]=0,t[8]=r+s,t[9]=i-o,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 _t(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function At(t,e){var n=e[0],r=e[1],i=e[2],a=e[4],o=e[5],s=e[6],l=e[8],c=e[9],e=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(a,o,s),t[2]=Math.hypot(l,c,e),t}function Tt(t,e){var n=new lt(3),r=(At(n,e),1/n[0]),i=1/n[1],n=1/n[2],a=e[0]*r,o=e[1]*i,s=e[2]*n,l=e[4]*r,c=e[5]*i,u=e[6]*n,r=e[8]*r,i=e[9]*i,e=e[10]*n,n=a+c+e,h=0;return 0<n?(h=2*Math.sqrt(1+n),t[3]=.25*h,t[0]=(u-i)/h,t[1]=(r-s)/h,t[2]=(o-l)/h):c<a&&e<a?(h=2*Math.sqrt(1+a-c-e),t[3]=(u-i)/h,t[0]=.25*h,t[1]=(o+l)/h,t[2]=(r+s)/h):e<c?(h=2*Math.sqrt(1+c-a-e),t[3]=(r-s)/h,t[0]=(o+l)/h,t[1]=.25*h,t[2]=(u+i)/h):(h=2*Math.sqrt(1+e-a-c),t[3]=(o-l)/h,t[0]=(r+s)/h,t[1]=(u+i)/h,t[2]=.25*h),t}function Pt(t,e,n,r,i){var a=e[0],o=e[1],s=e[2],e=e[3],l=a+a,c=o+o,u=s+s,h=a*l,f=a*c,a=a*u,d=o*c,o=o*u,s=s*u,l=e*l,c=e*c,e=e*u,u=r[0],p=r[1],r=r[2],g=i[0],y=i[1],i=i[2],m=(1-(d+s))*u,v=(f+e)*u,u=(a-c)*u,f=(f-e)*p,e=(1-(h+s))*p,s=(o+l)*p,p=(a+c)*r,a=(o-l)*r,c=(1-(h+d))*r;return t[0]=m,t[1]=v,t[2]=u,t[3]=0,t[4]=f,t[5]=e,t[6]=s,t[7]=0,t[8]=p,t[9]=a,t[10]=c,t[11]=0,t[12]=n[0]+g-(m*g+f*y+p*i),t[13]=n[1]+y-(v*g+e*y+a*i),t[14]=n[2]+i-(u*g+s*y+c*i),t[15]=1,t}function Lt(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n+n,o=r+r,s=i+i,n=n*a,l=r*a,r=r*o,c=i*a,u=i*o,i=i*s,a=e*a,o=e*o,e=e*s;return t[0]=1-r-i,t[1]=l+e,t[2]=c-o,t[3]=0,t[4]=l-e,t[5]=1-n-i,t[6]=u+a,t[7]=0,t[8]=c+o,t[9]=u-a,t[10]=1-n-r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Nt(t,e,n,r,i){e=1/Math.tan(e/2);return t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,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?(t[10]=(i+r)*(n=1/(r-i)),t[14]=2*i*r*n):(t[10]=-1,t[14]=-2*r),t}function Ct(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),c=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=(o+a)*c,t[15]=1,t}var jt=Ct;function Rt(t,e,n,r){var i,a,o,s,l=e[0],c=e[1],e=e[2],u=r[0],h=r[1],r=r[2],f=n[0],d=n[1],n=n[2];return Math.abs(l-f)<st&&Math.abs(c-d)<st&&Math.abs(e-n)<st?gt(t):(f=l-f,d=c-d,n=e-n,i=h*(n*=s=1/Math.hypot(f,d,n))-r*(d*=s),r=r*(f*=s)-u*n,u=u*d-h*f,(s=Math.hypot(i,r,u))?(i*=s=1/s,r*=s,u*=s):u=r=i=0,h=d*u-n*r,a=n*i-f*u,o=f*r-d*i,(s=Math.hypot(h,a,o))?(h*=s=1/s,a*=s,o*=s):o=a=h=0,t[0]=i,t[1]=h,t[2]=f,t[3]=0,t[4]=r,t[5]=a,t[6]=d,t[7]=0,t[8]=u,t[9]=o,t[10]=n,t[11]=0,t[12]=-(i*l+r*c+u*e),t[13]=-(h*l+a*c+o*e),t[14]=-(f*l+d*c+n*e),t[15]=1,t)}function Ft(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}var It=Object.freeze({__proto__:null,create:ht,clone:ft,copy:dt,fromValues:function(t,e,n,r,i,a,o,s,l,c,u,h,f,d,p,g){var y=new lt(16);return y[0]=t,y[1]=e,y[2]=n,y[3]=r,y[4]=i,y[5]=a,y[6]=o,y[7]=s,y[8]=l,y[9]=c,y[10]=u,y[11]=h,y[12]=f,y[13]=d,y[14]=p,y[15]=g,y},set:pt,identity:gt,transpose:yt,invert:mt,adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],h=e[9],f=e[10],d=e[11],p=e[12],g=e[13],y=e[14],e=e[15];return t[0]=s*(f*e-d*y)-h*(l*e-c*y)+g*(l*d-c*f),t[1]=-(r*(f*e-d*y)-h*(i*e-a*y)+g*(i*d-a*f)),t[2]=r*(l*e-c*y)-s*(i*e-a*y)+g*(i*c-a*l),t[3]=-(r*(l*d-c*f)-s*(i*d-a*f)+h*(i*c-a*l)),t[4]=-(o*(f*e-d*y)-u*(l*e-c*y)+p*(l*d-c*f)),t[5]=n*(f*e-d*y)-u*(i*e-a*y)+p*(i*d-a*f),t[6]=-(n*(l*e-c*y)-o*(i*e-a*y)+p*(i*c-a*l)),t[7]=n*(l*d-c*f)-o*(i*d-a*f)+u*(i*c-a*l),t[8]=o*(h*e-d*g)-u*(s*e-c*g)+p*(s*d-c*h),t[9]=-(n*(h*e-d*g)-u*(r*e-a*g)+p*(r*d-a*h)),t[10]=n*(s*e-c*g)-o*(r*e-a*g)+p*(r*c-a*s),t[11]=-(n*(s*d-c*h)-o*(r*d-a*h)+u*(r*c-a*s)),t[12]=-(o*(h*y-f*g)-u*(s*y-l*g)+p*(s*f-l*h)),t[13]=n*(h*y-f*g)-u*(r*y-i*g)+p*(r*f-i*h),t[14]=-(n*(s*y-l*g)-o*(r*y-i*g)+p*(r*l-i*s)),t[15]=n*(s*f-l*h)-o*(r*f-i*h)+u*(r*l-i*s),t},determinant:vt,multiply:bt,translate:xt,scale:wt,rotate:function(t,e,n,r){var i,a,o,s,l,c,u,h,f,d,p,g,y,m,v,b,x,w,k,E,M=r[0],O=r[1],r=r[2],S=Math.hypot(M,O,r);return S<st?null:(M*=S=1/S,O*=S,r*=S,S=Math.sin(n),n=Math.cos(n),a=e[0],o=e[1],s=e[2],l=e[3],c=e[4],u=e[5],h=e[6],f=e[7],d=e[8],p=e[9],g=e[10],y=e[11],v=M*O*(i=1-n)-r*S,b=O*O*i+n,x=r*O*i+M*S,w=M*r*i+O*S,k=O*r*i-M*S,E=r*r*i+n,t[0]=a*(n=M*M*i+n)+c*(m=O*M*i+r*S)+d*(r=r*M*i-O*S),t[1]=o*n+u*m+p*r,t[2]=s*n+h*m+g*r,t[3]=l*n+f*m+y*r,t[4]=a*v+c*b+d*x,t[5]=o*v+u*b+p*x,t[6]=s*v+h*b+g*x,t[7]=l*v+f*b+y*x,t[8]=a*w+c*k+d*E,t[9]=o*w+u*k+p*E,t[10]=s*w+h*k+g*E,t[11]=l*w+f*k+y*E,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:kt,rotateY:Et,rotateZ:function(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[4],c=e[5],u=e[6],h=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]=i*n+l*r,t[1]=a*n+c*r,t[2]=o*n+u*r,t[3]=s*n+h*r,t[4]=l*n-i*r,t[5]=c*n-a*r,t[6]=u*n-o*r,t[7]=h*n-s*r,t},fromTranslation:Mt,fromScaling:Ot,fromRotation:function(t,e,n){var r,i=n[0],a=n[1],n=n[2],o=Math.hypot(i,a,n);return o<st?null:(i*=o=1/o,a*=o,n*=o,o=Math.sin(e),e=Math.cos(e),t[0]=i*i*(r=1-e)+e,t[1]=a*i*r+n*o,t[2]=n*i*r-a*o,t[3]=0,t[4]=i*a*r-n*o,t[5]=a*a*r+e,t[6]=n*a*r+i*o,t[7]=0,t[8]=i*n*r+a*o,t[9]=a*n*r-i*o,t[10]=n*n*r+e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},fromXRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromYRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,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]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=e,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},fromRotationTranslation:St,fromQuat2:function(t,e){var n=new lt(3),r=-e[0],i=-e[1],a=-e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=r*r+i*i+a*a+o*o;return 0<h?(n[0]=2*(s*o+u*r+l*a-c*i)/h,n[1]=2*(l*o+u*i+c*r-s*a)/h,n[2]=2*(c*o+u*a+s*i-l*r)/h):(n[0]=2*(s*o+u*r+l*a-c*i),n[1]=2*(l*o+u*i+c*r-s*a),n[2]=2*(c*o+u*a+s*i-l*r)),St(t,e,n),t},getTranslation:_t,getScaling:At,getRotation:Tt,fromRotationTranslationScale:function(t,e,n,r){var i=e[0],a=e[1],o=e[2],e=e[3],s=i*(u=i+i),l=i*(h=a+a),i=i*(f=o+o),c=a*h,a=a*f,o=o*f,u=e*u,h=e*h,e=e*f,f=r[0],d=r[1],r=r[2];return t[0]=(1-(c+o))*f,t[1]=(l+e)*f,t[2]=(i-h)*f,t[3]=0,t[4]=(l-e)*d,t[5]=(1-(s+o))*d,t[6]=(a+u)*d,t[7]=0,t[8]=(i+h)*r,t[9]=(a-u)*r,t[10]=(1-(s+c))*r,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:Pt,fromQuat:Lt,frustum:function(t,e,n,r,i,a,o){var s=1/(n-e),l=1/(i-r),c=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*l,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*l,t[10]=(o+a)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*c,t[15]=0,t},perspectiveNO:Nt,perspective:Nt,perspectiveZO:function(t,e,n,r,i){return e=1/Math.tan(e/2),t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,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?(t[10]=i*(n=1/(r-i)),t[14]=i*r*n):(t[10]=-1,t[14]=-r),t},perspectiveFromFieldOfView:function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),e=Math.tan(e.rightDegrees*Math.PI/180),s=2/(o+e),l=2/(i+a);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(o-e)*s*.5,t[9]=(i-a)*l*.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},orthoNO:Ct,ortho:jt,orthoZO:function(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),o=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=o,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=a*o,t[15]=1,t},lookAt:Rt,targetTo:function(t,e,n,r){var i=e[0],a=e[1],e=e[2],o=r[0],s=r[1],r=r[2],l=i-n[0],c=a-n[1],n=e-n[2],u=l*l+c*c+n*n,h=(0<u&&(l*=u=1/Math.sqrt(u),c*=u,n*=u),s*n-r*c);return 0<(u=h*h+(r=r*l-o*n)*r+(o=o*c-s*l)*o)&&(h*=u=1/Math.sqrt(u),r*=u,o*=u),t[0]=h,t[1]=r,t[2]=o,t[3]=0,t[4]=c*o-n*r,t[5]=n*h-l*o,t[6]=l*r-c*h,t[7]=0,t[8]=l,t[9]=c,t[10]=n,t[11]=0,t[12]=i,t[13]=a,t[14]=e,t[15]=1,t},str:function(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]+")"},frob:function(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])},add:function(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},subtract:Ft,multiplyScalar:function(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},multiplyScalarAndAdd:function(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},exactEquals:function(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]},equals:function(t,e){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],h=t[9],f=t[10],d=t[11],p=t[12],g=t[13],y=t[14],t=t[15],m=e[0],v=e[1],b=e[2],x=e[3],w=e[4],k=e[5],E=e[6],M=e[7],O=e[8],S=e[9],_=e[10],A=e[11],T=e[12],P=e[13],L=e[14],e=e[15];return Math.abs(n-m)<=st*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-v)<=st*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-b)<=st*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(a-x)<=st*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(o-w)<=st*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(s-k)<=st*Math.max(1,Math.abs(s),Math.abs(k))&&Math.abs(l-E)<=st*Math.max(1,Math.abs(l),Math.abs(E))&&Math.abs(c-M)<=st*Math.max(1,Math.abs(c),Math.abs(M))&&Math.abs(u-O)<=st*Math.max(1,Math.abs(u),Math.abs(O))&&Math.abs(h-S)<=st*Math.max(1,Math.abs(h),Math.abs(S))&&Math.abs(f-_)<=st*Math.max(1,Math.abs(f),Math.abs(_))&&Math.abs(d-A)<=st*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(p-T)<=st*Math.max(1,Math.abs(p),Math.abs(T))&&Math.abs(g-P)<=st*Math.max(1,Math.abs(g),Math.abs(P))&&Math.abs(y-L)<=st*Math.max(1,Math.abs(y),Math.abs(L))&&Math.abs(t-e)<=st*Math.max(1,Math.abs(t),Math.abs(e))},mul:bt,sub:Ft});function m(){var t=new lt(3);return lt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Bt(t){var e=new lt(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function Dt(t){var e=t[0],n=t[1],t=t[2];return Math.hypot(e,n,t)}function k(t,e,n){var r=new lt(3);return r[0]=t,r[1]=e,r[2]=n,r}function zt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Gt(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Wt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Vt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function Yt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Ht(t,e){var n=e[0],r=e[1],i=e[2],n=n*n+r*r+i*i;0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function qt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Ut(t,e,n){var r=e[0],i=e[1],e=e[2],a=n[0],o=n[1],n=n[2];t[0]=i*n-e*o,t[1]=e*a-r*n,t[2]=r*o-i*a}function Xt(t,e,n,r){var i=e[0],a=e[1],e=e[2];t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t[2]=e+r*(n[2]-e)}function $t(t,e,n){var r=e[0],i=e[1],e=e[2],a=n[3]*r+n[7]*i+n[11]*e+n[15];return t[0]=(n[0]*r+n[4]*i+n[8]*e+n[12])/(a=a||1),t[1]=(n[1]*r+n[5]*i+n[9]*e+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*e+n[14])/a,t}function Kt(t,e,n){var r=e[0],i=e[1],e=e[2];t[0]=r*n[0]+i*n[3]+e*n[6],t[1]=r*n[1]+i*n[4]+e*n[7],t[2]=r*n[2]+i*n[5]+e*n[8]}function Zt(t,e){var n=t[0],r=t[1],t=t[2],i=e[0],a=e[1],e=e[2];return Math.abs(n-i)<=st*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-a)<=st*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(t-e)<=st*Math.max(1,Math.abs(t),Math.abs(e))}var Jt=Vt,Qt=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],e=e[2]-t[2];return Math.hypot(n,r,e)},te=Dt;function ee(){var t=new lt(4);return lt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function ne(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*a+n[12]*e,t[1]=n[1]*r+n[5]*i+n[9]*a+n[13]*e,t[2]=n[2]*r+n[6]*i+n[10]*a+n[14]*e,t[3]=n[3]*r+n[7]*i+n[11]*a+n[15]*e,t}function re(){var t=new lt(4);return lt!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function ie(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function ae(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=n[0],s=n[1],l=n[2],n=n[3];return t[0]=r*n+e*o+i*l-a*s,t[1]=i*n+e*s+a*o-r*l,t[2]=a*n+e*l+r*s-i*o,t[3]=e*n-r*o-i*s-a*l,t}function oe(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n*n+r*r+i*i+e*e,a=a?1/a:0;return t[0]=-n*a,t[1]=-r*a,t[2]=-i*a,t[3]=e*a,t}function se(t,e,n,r){var i=.5*Math.PI/180,i=(e*=i,n*=i,r*=i,Math.sin(e)),e=Math.cos(e),a=Math.sin(n),n=Math.cos(n),o=Math.sin(r),r=Math.cos(r);t[0]=i*n*r-e*a*o,t[1]=e*a*r+i*n*o,t[2]=e*n*o-i*a*r,t[3]=e*n*r+i*a*o}m(),ee();var le=function(t,e,n,r){var i=new lt(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},ce=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},ue=ae,he=function(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n*n+r*r+i*i+e*e;return 0<a&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=e*a,t};function fe(t,e){var n=new lt(2);return n[0]=t,n[1]=e,n}function de(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function pe(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function ge(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function ye(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function me(t,e){var n=e[0]-t[0],e=e[1]-t[1];return Math.hypot(n,e)}function ve(t,e){var n=e[0],r=e[1],n=n*n+r*r;return 0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t}function be(t,e){return t[0]*e[0]+t[1]*e[1]}function xe(t,e){return t[0]===e[0]&&t[1]===e[1]}m(),k(1,0,0),k(0,1,0),re(),re(),ct();var we=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t};function ke(t){return t.map(function(t){return Array.isArray(t)?[].concat(t):t})}e=new lt(2),lt!=Float32Array&&(e[0]=0,e[1]=0);var Ee=function(t,e){return(Ee=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 Me(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Ee(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var v=function(){return(v=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function J(t,e){var n={};for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n}function t(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}function Oe(t,o,s,l){return new(s=s||Promise)(function(n,e){function r(t){try{a(l.next(t))}catch(t){e(t)}}function i(t){try{a(l.throw(t))}catch(t){e(t)}}function a(t){var e;t.done?n(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(r,i)}a((l=l.apply(t,o||[])).next())})}function Se(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{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||0<e--)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function b(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function _e(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t===e&&r:e.has(t))return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t);throw new TypeError("Cannot read private member from an object whose class did not declare it")}var Ae={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};var Te={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function Pe(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return Te[e]===t.length-1&&"achlmqstvz".includes(e)})}function Le(t){return Pe(t)&&t.every(function(t){t=t[0];return t===t.toUpperCase()})}function Ne(t){return Le(t)&&t.every(function(t){t=t[0];return"ACLMQZ".includes(t)})}function Ce(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=Te[n]&&("m"===n&&2<r.length?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,Te[n]))),Te[n]););}function je(t){return 48<=t&&t<=57}function Re(t){for(var e,n=t.pathValue,r=t.max;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||5760<=e&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}function Fe(t){var e,n,r,i,a,o=t.max,s=t.pathValue,l=t.index,c=s.charCodeAt(l),u=Te[s[l].toLowerCase()];if(t.segmentStart=l,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 1;default:return}}(c)){if(t.index+=1,Re(t),t.data=[],u)for(;;){for(var h=u;0<h;--h){if(97!=(32|c)||3!==h&&4!==h?function(t){var e,n,r=t.max,i=t.pathValue,a=t.index,o=a,s=!1,l=!1,c=!1;if(r<=o)t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param';else if(je(n=43!==(n=i.charCodeAt(o))&&45!==n?n:i.charCodeAt(o+=1))||46===n){if(46!==n){if(e=48===n,n=i.charCodeAt(o+=1),e&&o<r&&n&&je(n))return t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" illegal number';for(;o<r&&je(i.charCodeAt(o));)o+=1,s=!0;n=i.charCodeAt(o)}if(46===n){for(c=!0,o+=1;je(i.charCodeAt(o));)o+=1,l=!0;n=i.charCodeAt(o)}if(101===n||69===n){if(c&&!s&&!l)return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid float exponent';if(43!==(n=i.charCodeAt(o+=1))&&45!==n||(o+=1),!(o<r&&je(i.charCodeAt(o))))return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid integer exponent';for(;o<r&&je(i.charCodeAt(o));)o+=1}t.index=o,t.param=+t.pathValue.slice(a,o)}else t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" is not a number'}(t):(a=i=r=void 0,r=(n=t).index,i=n.pathValue,48===(a=i.charCodeAt(r))?(n.param=0,n.index+=1):49===a?(n.param=1,n.index+=1):n.err='[path-util]: invalid Arc flag "'+i[r]+'", expecting 0 or 1 at index '+r),t.err.length)return;t.data.push(t.param),Re(t),t.index<o&&44===s.charCodeAt(t.index)&&(t.index+=1,Re(t))}if(t.index>=t.max)break;if(!(48<=(e=s.charCodeAt(t.index))&&e<=57||43===e||45===e||46===e))break}Ce(t)}else t.err='[path-util]: Invalid path value "'+s[l]+'" is not a path command'}var Ie=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 Be(t){var o,s,l,c;return Le(t)?ke(t):(t=function(t){if(Pe(t))return ke(t);var e=new Ie(t);for(Re(e);e.index<e.max&&!e.err.length;)Fe(e);return e.err||e.segments}(t),c=l=s=o=0,t.map(function(t){var e=t.slice(1).map(Number),t=t[0],n=t.toUpperCase();if("M"===t)return o=e[0],s=e[1],["M",l=o,c=s];if(t!==n)switch(n){case"A":i=[n,e[0],e[1],e[2],e[3],e[4],e[5]+o,e[6]+s];break;case"V":i=[n,e[0]+s];break;case"H":i=[n,e[0]+o];break;default:var r=e.map(function(t,e){return t+(e%2?s:o)}),i=[n].concat(r)}else i=[n].concat(e);var a=i.length;switch(n){case"Z":o=l,s=c;break;case"H":o=i[1];break;case"V":s=i[1];break;default:o=i[a-2],s=i[a-1],"M"===n&&(l=o,c=s)}return i}))}function De(t){if(Ne(t))return ke(t);for(var e,n,r,i,a,o,s,l=Be(t),c=v({},Ae),u=0;u<l.length;u+=1){l[u]=(e=l[u],n=c,s=o=f=a=h=i=r=void 0,r=e[0],i=n.x1,h=n.y1,a=n.x2,f=n.y2,o=e.slice(1).map(Number),s=e,"TQ".includes(r)||(n.qx=null,n.qy=null),"H"===r?s=["L",e[1],h]:"V"===r?s=["L",i,e[1]]:"S"===r?(e=2*h-f,s=["C",n.x1=2*i-a,n.y1=e].concat(o)):"T"===r?(f=2*i-n.qx,a=2*h-n.qy,s=["Q",n.qx=f,n.qy=a].concat(o)):"Q"===r&&(e=o[0],i=o[1],n.qx=e,n.qy=i),s);var h=l[u],f=h.length;c.x1=+h[f-2],c.y1=+h[f-1],c.x2=+h[f-4]||c.x1,c.y2=+h[f-3]||c.y1}return l}function ze(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function Ge(t,e,n,r,i,a,o,s,l,c){var u=120*Math.PI/180,h=Math.PI/180*(+i||0),f=[],d=(c?(b=c[0],x=c[1],m=c[2],v=c[3]):(t=(g=ze(t,e,-h)).x,e=g.y,1<(d=(p=(t-(s=(g=ze(s,l,-h)).x))/2)*p/(n*n)+(g=(e-(l=g.y))/2)*g/(r*r))&&(n*=d=Math.sqrt(d),r*=d),d=n*n,y=r*r,m=(a=(a===o?-1:1)*Math.sqrt(Math.abs((d*y-d*g*g-y*p*p)/(d*g*g+y*p*p))))*n*g/r+(t+s)/2,v=a*-r*p/n+(e+l)/2,b=Math.asin(((e-v)/r*Math.pow(10,9)>>0)/Math.pow(10,9)),x=Math.asin(((l-v)/r*Math.pow(10,9)>>0)/Math.pow(10,9)),b=t<m?Math.PI-b:b,x=s<m?Math.PI-x:x,b<0&&(b=2*Math.PI+b),x<0&&(x=2*Math.PI+x),o&&x<b&&(b-=2*Math.PI),!o&&b<x&&(x-=2*Math.PI)),x-b),p=(Math.abs(d)>u&&(y=x,g=s,a=l,x=b+u*(o&&b<x?1:-1),f=Ge(s=m+n*Math.cos(x),l=v+r*Math.sin(x),n,r,i,0,o,g,a,[x,y,m,v])),d=x-b,Math.cos(b)),u=Math.sin(b),i=Math.cos(x),o=Math.sin(x),g=Math.tan(d/4),a=4/3*n*g,y=4/3*r*g,m=[t,e],v=[t+a*u,e-y*p],b=[s+a*o,l-y*i],x=[s,l];if(v[0]=2*m[0]-v[0],v[1]=2*m[1]-v[1],c)return v.concat(b,x,f);for(var w=[],k=0,E=(f=v.concat(b,x,f)).length;k<E;k+=1)w[k]=k%2?ze(f[k-1],f[k],h).y:ze(f[k],f[k+1],h).x;return w}function We(t,e,n){var r=t[0],t=t[1];return[r+(e[0]-r)*n,t+(e[1]-t)*n]}function Ve(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function Ye(t,e,n,r,i){var a=Ve([t,e],[n,r]),o={x:0,y:0};return{length:a,point:o="number"==typeof i?i<=0?{x:t,y:e}:a<=i?{x:n,y:r}:{x:(i=We([t,e],[n,r],i/a))[0],y:i[1]}:o,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function He(t,e,n,r){var t=[t,e],e=[n,r],i=We(t,e,.5),e=We(e,i,.5),a=We(i,e,.5),o=We(e,a,.5),s=We(a,o,.5),t=Ye(t[0],t[1],i[0],i[1],a[0]).point,i=Ye(s[0],s[1],o[0],o[1],e[0]).point;return[t.x,t.y,i.x,i.y,n,r]}function qe(t,e){var n;if(void 0===e&&(e=!1),Ne(n=t)&&n.every(function(t){t=t[0];return"MC".includes(t)}))return n=ke(t),e?[n,[]]:n;for(var r,i=De(t),a=v({},Ae),o=[],s="",l=i.length,c=[],u=0;u<l;u+=1){i[u]&&(s=i[u][0]),o[u]=s;var h=function(t,e){var n,r,i,a,o,s,l=t[0],c=t.slice(1).map(Number),u=c[0],h=c[1],f=e.x1,d=e.y1,p=e.x,g=e.y;switch("TQ".includes(l)||(e.qx=null,e.qy=null),l){case"M":return e.x=u,e.y=h,t;case"A":return s=[f,d].concat(c),["C"].concat(Ge(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9]));case"Q":return e.qx=u,e.qy=h,s=[f,d].concat(c),["C"].concat((n=s[0],r=s[1],i=s[2],a=s[3],o=s[4],s=s[5],[1/3*n+2/3*i,1/3*r+2/3*a,1/3*o+2/3*i,1/3*s+2/3*a,o,s]));case"L":return["C"].concat(He(f,d,u,h));case"Z":return f===p&&d===g?["C",f,d,p,g,p,g]:["C"].concat(He(f,d,p,g))}return t}(i[u],a),f=(i[u]=h,y=g=p=d=f=void 0,i),d=o,p=u;if(7<f[p].length){f[p].shift();for(var g=f[p],y=p;g.length;)d[p]="A",f.splice(y+=1,0,["C"].concat(g.splice(0,6)));f.splice(p,1)}l=i.length,"Z"===s&&c.push(u),r=(h=i[u]).length,a.x1=+h[r-2],a.y1=+h[r-1],a.x2=+h[r-4]||a.x1,a.y2=+h[r-3]||a.y1}return e?[i,c]:i}function Ue(t,e){var n=t.x,t=t.y,r=e.x,e=e.y,i=n*r+t*e,a=Math.sqrt((Math.pow(n,2)+Math.pow(t,2))*(Math.pow(r,2)+Math.pow(e,2)));return(n*e-t*r<0?-1:1)*Math.acos(i/a)}function Xe(t,e,n,r,i,F,I,a,o,s,l){var c=l.bbox,B=void 0===c||c,c=l.length,D=void 0===c||c,c=l.sampleSize,u=void 0===c?30:c,h="number"==typeof s,f=t,d=e,p=0,g=[f,d,p],y=[f,d],m={x:0,y:0},v=[{x:f,y:d}];h&&s<=0&&(m={x:f,y:d});for(var b,x,w,k,E,M,O,S,_,A,T,P,L,N,C,j,R=0;R<=u;R+=1)b=t,x=e,w=n,k=r,E=i,M=F,O=I,S=a,_=o,A=R/u,P=j=C=N=L=P=T=void 0,P=Math.abs,L=Math.sin,N=Math.cos,C=Math.sqrt,j=Math.PI,w=P(w),P=P(k),k=j/180*((E%360+360)%360),f=(T=b===S&&x===_?{x:b,y:x}:0===w||0===P?Ye(b,x,S,_,A).point:(E=(b-S)/2,T=(x-_)/2,E={x:N(k)*E+L(k)*T,y:-L(k)*E+N(k)*T},1<(T=Math.pow(E.x,2)/Math.pow(w,2)+Math.pow(E.y,2)/Math.pow(P,2))&&(w*=C(T),P*=C(T)),T=(Math.pow(w,2)*Math.pow(P,2)-Math.pow(w,2)*Math.pow(E.y,2)-Math.pow(P,2)*Math.pow(E.x,2))/(Math.pow(w,2)*Math.pow(E.y,2)+Math.pow(P,2)*Math.pow(E.x,2)),M=(M!==O?1:-1)*C(T<0?0:T),C=w*E.y/P*M,T=-P*E.x/w*M,M=N(k)*C-L(k)*T+(b+S)/2,b=L(k)*C+N(k)*T+(x+_)/2,x=Ue({x:1,y:0},S={x:(E.x-C)/w,y:(E.y-T)/P}),_=Ue(S,{x:(-E.x-C)/w,y:(-E.y-T)/P}),!O&&0<_?_-=2*j:O&&_<0&&(_+=2*j),S=x+(_%=2*j)*A,C=w*N(S),E=P*L(S),{x:N(k)*C-L(k)*E+M,y:L(k)*C+N(k)*E+b})).x,d=T.y,B&&v.push({x:f,y:d}),D&&(p+=Ve(y,[f,d])),y=[f,d],h&&s<=p&&s>g[2]&&(O=(p-s)/(p-g[2]),m={x:y[0]*(1-O)+g[0]*O,y:y[1]*(1-O)+g[1]*O}),g=[f,d,p];return{length:p,point:m=h&&p<=s?{x:a,y:o}:m,min:{x:Math.min.apply(null,v.map(function(t){return t.x})),y:Math.min.apply(null,v.map(function(t){return t.y}))},max:{x:Math.max.apply(null,v.map(function(t){return t.x})),y:Math.max.apply(null,v.map(function(t){return t.y}))}}}function $e(t,e,n,r,i,a,o,s,l,c){var u=c.bbox,h=void 0===u||u,u=c.length,f=void 0===u||u,u=c.sampleSize,d=void 0===u?10:u,p="number"==typeof l,g=t,y=e,m=0,v=[g,y,m],b=[g,y],x={x:0,y:0},w=[{x:g,y:y}];p&&l<=0&&(x={x:g,y:y});for(var k,E,M,O,S,_,A,T,P,L,N=0;N<=d;N+=1)k=t,E=e,M=n,O=r,S=i,_=a,A=o,T=s,L=void 0,L=1-(P=N/d),g=(k={x:Math.pow(L,3)*k+3*Math.pow(L,2)*P*M+3*L*Math.pow(P,2)*S+Math.pow(P,3)*A,y:Math.pow(L,3)*E+3*Math.pow(L,2)*P*O+3*L*Math.pow(P,2)*_+Math.pow(P,3)*T}).x,y=k.y,h&&w.push({x:g,y:y}),f&&(m+=Ve(b,[g,y])),b=[g,y],p&&l<=m&&l>v[2]&&(M=(m-l)/(m-v[2]),x={x:b[0]*(1-M)+v[0]*M,y:b[1]*(1-M)+v[1]*M}),v=[g,y,m];return{length:m,point:x=p&&m<=l?{x:o,y:s}:x,min:{x:Math.min.apply(null,w.map(function(t){return t.x})),y:Math.min.apply(null,w.map(function(t){return t.y}))},max:{x:Math.max.apply(null,w.map(function(t){return t.x})),y:Math.max.apply(null,w.map(function(t){return t.y}))}}}function Ke(t,e,n,r,i,a,o,s){var l=s.bbox,c=void 0===l||l,l=s.length,u=void 0===l||l,l=s.sampleSize,h=void 0===l?10:l,f="number"==typeof o,d=t,p=e,g=0,y=[d,p,g],m=[d,p],v={x:0,y:0},b=[{x:d,y:p}];f&&o<=0&&(v={x:d,y:p});for(var x,w,k,E,M,O,S,_,A=0;A<=h;A+=1)x=t,w=e,k=n,E=r,M=i,O=a,_=void 0,_=1-(S=A/h),d=(x={x:Math.pow(_,2)*x+2*_*S*k+Math.pow(S,2)*M,y:Math.pow(_,2)*w+2*_*S*E+Math.pow(S,2)*O}).x,p=x.y,c&&b.push({x:d,y:p}),u&&(g+=Ve(m,[d,p])),m=[d,p],f&&o<=g&&o>y[2]&&(k=(g-o)/(g-y[2]),v={x:m[0]*(1-k)+y[0]*k,y:m[1]*(1-k)+y[1]*k}),y=[d,p,g];return{length:g,point:v=f&&g<=o?{x:i,y:a}:v,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,b.map(function(t){return t.x})),y:Math.max.apply(null,b.map(function(t){return t.y}))}}}function Ze(t,e,n){for(var r,i,a,o=De(t),s="number"==typeof e,l=[],c=0,u=0,h=0,f=0,d=[],p=[],g=0,y={x:0,y:0},m=y,v=y,b=y,x=0,w=0,k=o.length;w<k;w+=1)l=(r="M"===(i=(a=o[w])[0]))?l:[c,u].concat(a.slice(1)),r?(m=y={x:h=a[1],y:f=a[2]},g=0,s&&e<.001&&(b=y)):"L"===i?(g=(r=Ye(l[0],l[1],l[2],l[3],(e||0)-x)).length,y=r.min,m=r.max,v=r.point):"A"===i?(g=(r=Xe(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8],(e||0)-x,n||{})).length,y=r.min,m=r.max,v=r.point):"C"===i?(g=(r=$e(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],(e||0)-x,n||{})).length,y=r.min,m=r.max,v=r.point):"Q"===i?(g=(r=Ke(l[0],l[1],l[2],l[3],l[4],l[5],(e||0)-x,n||{})).length,y=r.min,m=r.max,v=r.point):"Z"===i&&(g=(r=Ye((l=[c,u,h,f])[0],l[1],l[2],l[3],(e||0)-x)).length,y=r.min,m=r.max,v=r.point),s&&x<e&&e<=x+g&&(b=v),p.push(m),d.push(y),x+=g,c=(r="Z"!==i?a.slice(-2):[h,f])[0],u=r[1];return{length:x,point:b=s&&x<=e?{x:c,y:u}:b,min:{x:Math.min.apply(null,d.map(function(t){return t.x})),y:Math.min.apply(null,d.map(function(t){return t.y}))},max:{x:Math.max.apply(null,p.map(function(t){return t.x})),y:Math.max.apply(null,p.map(function(t){return t.y}))}}}function Je(t){return(c=l=s=0)<=qe(t).map(function(t){var e,n,r,i,a,o;return"M"===t[0]?(s=t[1],l=t[2],0):(o=t.slice(1),e=o[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],c=3*((o-l)*(e+r)-(a-s)*(n+i)+n*(s-r)-e*(l-i)+o*(r+s/3)-a*(i+l/3))/20,n=t.slice(-2),s=n[0],l=n[1],c)}).reduce(function(t,e){return t+e},0);var s,l,c}function Qe(t){return t.map(function(t,e,n){var r,i,a,o,n=e&&n[e-1].slice(-2).concat(t.slice(1)),s=e?$e(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],{bbox:!1}).length:0,n=e?s?(void 0===r&&(r=.5),n=(e=n).slice(0,2),i=e.slice(2,4),a=e.slice(4,6),e=e.slice(6,8),n=We(n,i,r),i=We(i,a,r),a=We(a,e,r),o=We(n,i,r),i=We(i,a,r),r=We(o,i,r),[["C"].concat(n,o,r),["C"].concat(i,a,e)]):[t,t]:[t];return{s:t,ss:n,l:s}})}var tn=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},en=function(t){return"function"==typeof t},_=function(t){return null==t},nn={}.toString,rn=function(t,e){return nn.call(t)==="[object "+e+"]"},an=function(t){return Array.isArray?Array.isArray(t):rn(t,"Array")},on=function(t){var e=typeof t;return null!==t&&"object"==e||"function"==e};function sn(t,e){if(t)if(an(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(on(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}var ln=function(t){return"object"==typeof t&&null!==t},cn=function(t){if(!ln(t)||!rn(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},un=function(t){if(an(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},hn=function(t){if(an(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},fn=function(t){return rn(t,"String")},dn=function(t,e,n){return t<e?e:n<t?n:t},pn=function(t){return rn(t,"Number")};var gn=function(t,e){return(t%e+e)%e},yn=Object.values?function(t){return Object.values(t)}:function(n){var r=[];return sn(n,function(t,e){en(n)&&"prototype"===e||r.push(t)}),r};var mn=function(t){return rn(t,"Boolean")},vn=function(t){return void 0===t},bn=function(t){return t instanceof Element||t instanceof HTMLDocument};function xn(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function wn(t,e,n,r){return e&&xn(t,e),n&&xn(t,n),r&&xn(t,r),t}function kn(t){if("object"!=typeof t||null===t)return t;if(an(t))for(var e=[],n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=kn(t[n]):e[n]=t[n];else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=kn(t[i]):e[i]=t[i];return e}var En=kn;function Mn(a,o){var s;if(en(a))return(s=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=o?o.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=a.apply(this,t),i.set(r,n),n)}).cache=new Map,s;throw new TypeError("Expected a function")}var On=5;function Sn(t,e){if(t===e)return!0;if(t&&e&&!fn(t)&&!fn(e)){if(tn(t)||tn(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=Sn(t[r],e[r]));r++);return n}if(ln(t)||ln(e)){var i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(n=!0,r=0;r<i.length&&(n=Sn(t[i[r]],e[i[r]]));r++);return n}}return!1}function _n(t,e,n){for(var r=0,i=fn(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t}function An(e,t){var n;return null!==e&&cn(e)?(n={},sn(t,function(t){Nn.call(e,t)&&(n[t]=e[t])}),n):{}}function Tn(){}var Pn=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 a in r=r||0,i=i||On,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&cn(o)?(cn(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):an(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},Ln=Sn,Nn=Object.prototype.hasOwnProperty;function Cn(t,e,n){(t.prototype=e.prototype=n).constructor=t}function jn(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function Rn(){}var e="\\s*([+-]?\\d+)\\s*",n="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",r="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Fn=/^#([0-9a-f]{3,8})$/,In=new RegExp("^rgb\\("+[e,e,e]+"\\)$"),Bn=new RegExp("^rgb\\("+[r,r,r]+"\\)$"),Dn=new RegExp("^rgba\\("+[e,e,e,n]+"\\)$"),zn=new RegExp("^rgba\\("+[r,r,r,n]+"\\)$"),Gn=new RegExp("^hsl\\("+[n,r,r]+"\\)$"),Wn=new RegExp("^hsla\\("+[n,r,r,n]+"\\)$"),Vn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Yn(){return this.rgb().formatHex()}function Hn(){return this.rgb().formatRgb()}function qn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Fn.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Un(e):3===n?new $n(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Xn(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Xn(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=In.exec(t))?new $n(e[1],e[2],e[3],1):(e=Bn.exec(t))?new $n(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Dn.exec(t))?Xn(e[1],e[2],e[3],e[4]):(e=zn.exec(t))?Xn(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Gn.exec(t))?Qn(e[1],e[2]/100,e[3]/100,1):(e=Wn.exec(t))?Qn(e[1],e[2]/100,e[3]/100,e[4]):Vn.hasOwnProperty(t)?Un(Vn[t]):"transparent"===t?new $n(NaN,NaN,NaN,0):null}function Un(t){return new $n(t>>16&255,t>>8&255,255&t,1)}function Xn(t,e,n,r){return new $n(t=r<=0?e=n=NaN:t,e,n,r)}function $n(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Kn(){return"#"+Jn(this.r)+Jn(this.g)+Jn(this.b)}function Zn(){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 Jn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Qn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new er(t,e,n,r)}function tr(t){var e,n,r,i,a,o,s,l;return t instanceof er?new er(t.h,t.s,t.l,t.opacity):(t=t instanceof Rn?t:qn(t))?t instanceof er?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new er(o,s,l,t.opacity)):new er}function er(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function nr(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function rr(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function ir(t,e){return Math.abs(t-e)<.001}function ar(t,e){var n=Math.min.apply(Math,t),r=Math.min.apply(Math,e);return{x:n,y:r,width:Math.max.apply(Math,t)-n,height:Math.max.apply(Math,e)-r}}function or(t){return(t+2*Math.PI)%(2*Math.PI)}Cn(Rn,qn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Yn,formatHex:Yn,formatHsl:function(){return tr(this).formatHsl()},formatRgb:Hn,toString:Hn}),Cn($n,function(t,e,n,r){return 1===arguments.length?(i=(i=t)instanceof Rn?i:qn(i))?new $n((i=i.rgb()).r,i.g,i.b,i.opacity):new $n:new $n(t,e,n,null==r?1:r);var i},jn(Rn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new $n(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new $n(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:Kn,formatHex:Kn,formatRgb:Zn,toString:Zn})),Cn(er,function(t,e,n,r){return 1===arguments.length?tr(t):new er(t,e,n,null==r?1:r)},jn(Rn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new er(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new er(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new $n(nr(240<=t?t-240:120+t,n,e),nr(t,n,e),nr(t<120?240+t:t-120,n,e),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+")")}}));var sr={box:function(t,e,n,r){return ar([t,n],[e,r])},length:rr,pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,a){var o=(n-t)*(i-t)+(r-e)*(a-e);return o<0?rr(t,e,i,a):(n-t)*(n-t)+(r-e)*(r-e)<o?rr(n,r,i,a):this.pointToLine(t,e,n,r,i,a)},pointToLine:function(t,e,n,r,i,a){n=[n-t,r-e];return xe(n,[0,0])?Math.sqrt((i-t)*(i-t)+(a-e)*(a-e)):(ve(r=[-n[1],n[0]],r),Math.abs(be([i-t,a-e],r)))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function lr(t,e,n,r,i,a){for(var o=-1,s=1/0,l=[n,r],c=20,u=1/(c=a&&200<a?a/10:c),h=u/10,f=0;f<=c;f++){var d=f*u,p=[i.apply(void 0,t.concat([d])),i.apply(void 0,e.concat([d]))],p=rr(l[0],l[1],p[0],p[1]);p<s&&(o=d,s=p)}if(0===o)return{x:t[0],y:e[0]};if(1===o)return{x:t[(n=t.length)-1],y:e[n-1]};for(var s=1/0,g=0;g<32&&!(h<1e-4);g++){var y=o-h,m=o+h,v=[i.apply(void 0,t.concat([y])),i.apply(void 0,e.concat([y]))],v=rr(l[0],l[1],v[0],v[1]);0<=y&&v<s?(o=y,s=v):(y=[i.apply(void 0,t.concat([m])),i.apply(void 0,e.concat([m]))],v=rr(l[0],l[1],y[0],y[1]),m<=1&&v<s?(o=m,s=v):h*=.5)}return{x:i.apply(void 0,t.concat([o])),y:i.apply(void 0,e.concat([o]))}}function cr(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function ur(t,e,n){n=t+n-2*e;return ir(n,0)?[.5]:(t=(t-e)/n)<=1&&0<=t?[t]:[]}function hr(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function fr(t,e,n,r,i,a,o){var s=cr(t,n,i,o),l=cr(e,r,a,o),c=sr.pointAt(t,e,n,r,o),n=sr.pointAt(n,r,i,a,o);return[[t,e,c.x,c.y,s,l],[s,l,n.x,n.y,i,a]]}function dr(t,e,n,r,i,a,o){return 0===o?(rr(t,e,n,r)+rr(n,r,i,a)+rr(t,e,i,a))/2:(e=(t=fr(t,e,n,r,i,a,.5))[0],n=t[1],e.push(o-1),n.push(o-1),dr.apply(void 0,e)+dr.apply(void 0,n))}var pr={box:function(t,e,n,r,i,a){var o=ur(t,n,i)[0],s=ur(e,r,a)[0],l=[t,i],c=[e,a];return void 0!==o&&l.push(cr(t,n,i,o)),void 0!==s&&c.push(cr(e,r,a,s)),ar(l,c)},length:function(t,e,n,r,i,a){return dr(t,e,n,r,i,a,3)},nearestPoint:function(t,e,n,r,i,a,o,s){return lr([t,n,i],[e,r,a],o,s,cr)},pointDistance:function(t,e,n,r,i,a,o,s){t=this.nearestPoint(t,e,n,r,i,a,o,s);return rr(t.x,t.y,o,s)},interpolationAt:cr,pointAt:function(t,e,n,r,i,a,o){return{x:cr(t,n,i,o),y:cr(e,r,a,o)}},divide:fr,tangentAngle:function(t,e,n,r,i,a,o){t=hr(t,n,i,o),n=hr(e,r,a,o);return or(Math.atan2(n,t))}};function gr(t,e,n,r,i){var a=1-i;return a*a*a*t+3*e*i*a*a+3*n*i*i*a+r*i*i*i}function yr(t,e,n,r,i){var a=1-i;return 3*(a*a*(e-t)+2*a*i*(n-e)+i*i*(r-n))}function mr(t,e,n,r){var i,a,r=-3*t+9*e-9*n+3*r,n=6*t-12*e+6*n,e=3*e-3*t,t=[];return ir(r,0)?ir(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):ir(e=n*n-4*r*e,0)?t.push(-n/(2*r)):0<e&&(a=(-n-(e=Math.sqrt(e)))/(2*r),0<=(i=(-n+e)/(2*r))&&i<=1&&t.push(i),0<=a)&&a<=1&&t.push(a),t}function vr(t,e,n,r,i,a,o,s,l){var c=gr(t,n,i,o,l),u=gr(e,r,a,s,l),h=sr.pointAt(t,e,n,r,l),n=sr.pointAt(n,r,i,a,l),r=sr.pointAt(i,a,o,s,l),i=sr.pointAt(h.x,h.y,n.x,n.y,l),a=sr.pointAt(n.x,n.y,r.x,r.y,l);return[[t,e,h.x,h.y,i.x,i.y,c,u],[c,u,a.x,a.y,r.x,r.y,o,s]]}function br(t,e,n,r,i,a,o,s,l){if(0===l){for(var c=[t,n,i,o],u=[e,r,a,s],h=0,f=c.length,d=0;d<f;d++)h+=rr(c[d],u[d],c[(d+1)%f],u[(d+1)%f]);return h/2}t=vr(t,e,n,r,i,a,o,s,.5),e=[].concat(t[0],[l-1]),n=[].concat(t[1],[l-1]);return br.apply(void 0,e)+br.apply(void 0,n)}var xr={extrema:mr,box:function(t,e,n,r,i,a,o,s){for(var l=[t,o],c=[e,s],u=mr(t,n,i,o),h=mr(e,r,a,s),f=0;f<u.length;f++)l.push(gr(t,n,i,o,u[f]));for(var d=0;d<h.length;d++)c.push(gr(e,r,a,s,h[d]));return ar(l,c)},length:function(t,e,n,r,i,a,o,s){return br(t,e,n,r,i,a,o,s,3)},nearestPoint:function(t,e,n,r,i,a,o,s,l,c,u){return lr([t,n,i,o],[e,r,a,s],l,c,gr,u)},pointDistance:function(t,e,n,r,i,a,o,s,l,c,u){t=this.nearestPoint(t,e,n,r,i,a,o,s,l,c,u);return rr(t.x,t.y,l,c)},interpolationAt:gr,pointAt:function(t,e,n,r,i,a,o,s,l){return{x:gr(t,n,i,o,l),y:gr(e,r,a,s,l)}},divide:vr,tangentAngle:function(t,e,n,r,i,a,o,s,l){t=yr(t,n,i,o,l),n=yr(e,r,a,s,l);return or(Math.atan2(n,t))}};function wr(t,e){t=Math.abs(t);return 0<e?t:-1*t}var kr=function(t,e,n,r,i,a){var o=n,s=r;if(0===o||0===s)return{x:t,y:e};for(var n=i-t,r=a-e,l=Math.abs(n),c=Math.abs(r),u=o*o,h=s*s,f=Math.PI/4,d=0,p=0,g=0;g<4;g++){var d=o*Math.cos(f),p=s*Math.sin(f),y=(u-h)*Math.pow(Math.cos(f),3)/o,m=(h-u)*Math.pow(Math.sin(f),3)/s,v=d-y,b=p-m,y=l-y,m=c-m,x=Math.hypot(b,v),w=Math.hypot(m,y);f+=x*Math.asin((v*m-b*y)/(x*w))/Math.sqrt(u+h-d*d-p*p),f=Math.min(Math.PI/2,Math.max(0,f))}return{x:t+wr(d,n),y:e+wr(p,r)}};function Er(t,e,n,r,i,a){return n*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+t}function Mr(t,e,n,r,i,a){return n*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+e}function Or(t,e,n){return{x:t*Math.cos(n),y:e*Math.sin(n)}}function Sr(t,e,n){var r=Math.cos(n),n=Math.sin(n);return[t*r-e*n,t*n+e*r]}var _r={box:function(t,e,n,r,i,a,o){for(var s=Math.atan(-r/n*Math.tan(i)),l=1/0,c=-1/0,u=[a,o],h=2*-Math.PI;h<=2*Math.PI;h+=Math.PI){var f=s+h;a<o?a<f&&f<o&&u.push(f):o<f&&f<a&&u.push(f)}for(var d=0;d<u.length;d++){var p=Er(t,0,n,r,i,u[d]);p<l&&(l=p),c<p&&(c=p)}for(var g=Math.atan(r/(n*Math.tan(i))),y=1/0,m=-1/0,v=[a,o],b=2*-Math.PI;b<=2*Math.PI;b+=Math.PI){var x=g+b;a<o?a<x&&x<o&&v.push(x):o<x&&x<a&&v.push(x)}for(var w=0;w<v.length;w++){var k=Mr(0,e,n,r,i,v[w]);k<y&&(y=k),m<k&&(m=k)}return{x:l,y:y,width:c-l,height:m-y}},length:function(t,e,n,r,i,a,o){},nearestPoint:function(t,e,n,r,i,a,o,s,l){var s=Sr(s-t,l-e,-i),l=s[0],s=s[1],l=kr(0,0,n,r,l,s),c=(s=l.x,c=l.y,(Math.atan2(c*n,s*r)+2*Math.PI)%(2*Math.PI)),s=(c<a?l=Or(n,r,a):o<c&&(l=Or(n,r,o)),Sr(l.x,l.y,i));return{x:s[0]+t,y:s[1]+e}},pointDistance:function(t,e,n,r,i,a,o,s,l){t=this.nearestPoint(t,e,n,r,i,a,o,s,l);return rr(t.x,t.y,s,l)},pointAt:function(t,e,n,r,i,a,o,s){o=(o-a)*s+a;return{x:Er(t,0,n,r,i,o),y:Mr(0,e,n,r,i,o)}},tangentAngle:function(t,e,n,r,i,a,o,s){var l,o=(o-a)*s+a,s=(s=r,a=i,l=o,-1*n*Math.cos(a)*Math.sin(l)-s*Math.sin(a)*Math.cos(l)),i=(a=r,l=i,r=o,-1*n*Math.sin(l)*Math.sin(r)+a*Math.cos(l)*Math.cos(r));return or(Math.atan2(i,s))}};function Ar(t){for(var e=0,n=[],r=0;r<t.length-1;r++){var i=t[r],a=t[r+1],o=rr(i[0],i[1],a[0],a[1]);n.push({from:i,to:a,length:o}),e+=o}return{segments:n,totalLength:e}}var Tr,Pr,Lr={box:function(t){for(var e=[],n=[],r=0;r<t.length;r++){var i=t[r];e.push(i[0]),n.push(i[1])}return ar(e,n)},length:function(t){var e=t;if(e.length<2)return 0;for(var n=0,r=0;r<e.length-1;r++){var i=e[r],a=e[r+1];n+=rr(i[0],i[1],a[0],a[1])}return n},pointAt:function(t,e){var n=e;if(1<n||n<0||t.length<2)return null;var e=Ar(t),r=e.segments,i=e.totalLength;if(0===i)return{x:t[0][0],y:t[0][1]};for(var a=0,o=null,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=sr.pointAt(c[0],c[1],u[0],u[1],(n-a)/l);break}a+=l}return o},pointDistance:function(t,e,n){for(var r=t,i=e,a=n,o=1/0,s=0;s<r.length-1;s++){var l=r[s],c=r[s+1],l=sr.pointDistance(l[0],l[1],c[0],c[1],i,a);l<o&&(o=l)}return o},tangentAngle:function(t,e){var n=e;if(1<n||n<0||t.length<2)return 0;for(var r=(t=Ar(t)).segments,i=t.totalLength,a=0,o=0,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=Math.atan2(u[1]-c[1],u[0]-c[0]);break}a+=l}return o}},e={exports:{}};function Nr(){}function Cr(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function jr(t,e,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");n=new Cr(n,r||t,i),r=Pr?Pr+e:e;return t._events[r]?t._events[r].fn?t._events[r]=[t._events[r],n]:t._events[r].push(n):(t._events[r]=n,t._eventsCount++),t}function Rr(t,e){0==--t._eventsCount?t._events=new Nr:delete t._events[e]}function Fr(){this._events=new Nr,this._eventsCount=0}r=e,Tr=Object.prototype.hasOwnProperty,Pr="~",Object.create&&(Nr.prototype=Object.create(null),(new Nr).__proto__||(Pr=!1)),Fr.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)Tr.call(t,e)&&n.push(Pr?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},Fr.prototype.listeners=function(t){var t=Pr?Pr+t:t,e=this._events[t];if(!e)return[];if(e.fn)return[e.fn];for(var n=0,r=e.length,i=new Array(r);n<r;n++)i[n]=e[n].fn;return i},Fr.prototype.listenerCount=function(t){t=Pr?Pr+t:t,t=this._events[t];return t?t.fn?1:t.length:0},Fr.prototype.emit=function(t,e,n,r,i,a){var o=Pr?Pr+t:t;if(!this._events[o])return!1;var s,l=this._events[o],c=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,r),!0;case 5:return l.fn.call(l.context,e,n,r,i),!0;case 6:return l.fn.call(l.context,e,n,r,i,a),!0}for(f=1,s=new Array(c-1);f<c;f++)s[f-1]=arguments[f];l.fn.apply(l.context,s)}else for(var u,h=l.length,f=0;f<h;f++)switch(l[f].once&&this.removeListener(t,l[f].fn,void 0,!0),c){case 1:l[f].fn.call(l[f].context);break;case 2:l[f].fn.call(l[f].context,e);break;case 3:l[f].fn.call(l[f].context,e,n);break;case 4:l[f].fn.call(l[f].context,e,n,r);break;default:if(!s)for(u=1,s=new Array(c-1);u<c;u++)s[u-1]=arguments[u];l[f].fn.apply(l[f].context,s)}return!0},Fr.prototype.on=function(t,e,n){return jr(this,t,e,n,!1)},Fr.prototype.once=function(t,e,n){return jr(this,t,e,n,!0)},Fr.prototype.removeListener=function(t,e,n,r){t=Pr?Pr+t:t;if(this._events[t])if(e){var i=this._events[t];if(i.fn)i.fn!==e||r&&!i.once||n&&i.context!==n||Rr(this,t);else{for(var a=0,o=[],s=i.length;a<s;a++)(i[a].fn!==e||r&&!i[a].once||n&&i[a].context!==n)&&o.push(i[a]);o.length?this._events[t]=1===o.length?o[0]:o:Rr(this,t)}}else Rr(this,t);return this},Fr.prototype.removeAllListeners=function(t){return t?(t=Pr?Pr+t:t,this._events[t]&&Rr(this,t)):(this._events=new Nr,this._eventsCount=0),this},Fr.prototype.off=Fr.prototype.removeListener,Fr.prototype.addListener=Fr.prototype.on,Fr.prefixed=Pr,r.exports=Fr.EventEmitter=Fr;var i,Ir,E,Br=e.exports,Dr=((n=i=i||{}).COORDINATE="<coordinate>",n.COLOR="<color>",n.PAINT="<paint>",n.NUMBER="<number>",n.ANGLE="<angle>",n.OPACITY_VALUE="<opacity-value>",n.SHADOW_BLUR="<shadow-blur>",n.LENGTH="<length>",n.PERCENTAGE="<percentage>",n.LENGTH_PERCENTAGE="<length> | <percentage>",n.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",n.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",n.LIST_OF_POINTS="<list-of-points>",n.PATH="<path>",n.FILTER="<filter>",n.Z_INDEX="<z-index>",n.OFFSET_DISTANCE="<offset-distance>",n.DEFINED_PATH="<defined-path>",n.MARKER="<marker>",n.TRANSFORM="<transform>",n.TRANSFORM_ORIGIN="<transform-origin>",n.TEXT="<text>",n.TEXT_TRANSFORM="<text-transform>",function(){function y(t,e){void 0===t&&(t=[0,0,0]),void 0===e&&(e=[0,0,0]),this.center=m(),this.halfExtents=m(),this.min=m(),this.max=m(),this.update(t,e)}y.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]};var t=y.prototype;return t.update=function(t,e){zt(this.center,t),zt(this.halfExtents,e),Jt(this.min,this.center,this.halfExtents),Wt(this.max,this.center,this.halfExtents)},t.setMinMax=function(t,e){Wt(this.center,e,t),Yt(this.center,this.center,.5),Jt(this.halfExtents,e,t),Yt(this.halfExtents,this.halfExtents,.5),zt(this.min,t),zt(this.max,e)},t.getMin=function(){return this.min},t.getMax=function(){return this.max},t.add=function(t){var e,n,r,i,a,o,s,l,c,u,h,f,d,p,g;y.isEmpty(t)||(y.isEmpty(this)?this.setMinMax(t.getMin(),t.getMax()):(n=(e=this.center)[0],p=e[1],a=e[2],i=(r=this.halfExtents)[0],h=r[1],o=r[2],l=(f=t.center)[0],g=f[1],f=f[2],c=(t=t.halfExtents)[0],(d=g-(u=t[1]))<(s=p-h)&&(s=d),(d=p+h)<(p=g+u)&&(d=p),(g=f-(h=t[2]))<(u=a-o)&&(u=g),(p=a+o)<(t=f+h)&&(p=t),e[0]=.5*((a=(g=l-c)<(a=n-i)?g:a)+(o=(o=n+i)<(f=l+c)?f:o)),e[1]=.5*(s+d),e[2]=.5*(u+p),r[0]=.5*(o-a),r[1]=.5*(d-s),r[2]=.5*(p-u),this.min[0]=a,this.min[1]=s,this.min[2]=u,this.max[0]=o,this.max[1]=d,this.max[2]=p))},t.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,t=t.halfExtents,a=e[0],o=e[4],s=e[8],l=e[1],c=e[5],u=e[9],h=e[2],f=e[6],d=e[10],p=Math.abs(a),g=Math.abs(o),y=Math.abs(s),m=Math.abs(l),v=Math.abs(c),b=Math.abs(u),x=Math.abs(h),w=Math.abs(f),k=Math.abs(d);Gt(n,e[12]+a*i[0]+o*i[1]+s*i[2],e[13]+l*i[0]+c*i[1]+u*i[2],e[14]+h*i[0]+f*i[1]+d*i[2]),Gt(r,p*t[0]+g*t[1]+y*t[2],m*t[0]+v*t[1]+b*t[2],x*t[0]+w*t[1]+k*t[2]),this.min=Jt(this.min,n,r),this.max=Wt(this.max,n,r)},t.intersects=function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),t=t.getMin();return n[0]<=r[0]&&e[0]>=t[0]&&n[1]<=r[1]&&e[1]>=t[1]&&n[2]<=r[2]&&e[2]>=t[2]},t.intersection=function(t){var e,n,r,i;return this.intersects(t)?(e=new y,i=m(),n=this.getMin(),r=t.getMin(),i[0]=Math.max(n[0],r[0]),i[1]=Math.max(n[1],r[1]),i[2]=Math.max(n[2],r[2]),n=i,r=m(),i=this.getMax(),t=t.getMax(),r[0]=Math.min(i[0],t[0]),r[1]=Math.min(i[1],t[1]),r[2]=Math.min(i[2],t[2]),e.setMinMax(n,r),e):null},t.containsPoint=function(t){var e=this.getMin(),n=this.getMax();return!(t[0]<e[0]||t[0]>n[0]||t[1]<e[1]||t[1]>n[1]||t[2]<e[2]||t[2]>n[2])},t.getNegativeFarPoint=function(t){return 273===t.pnVertexFlag?zt(m(),this.min):272===t.pnVertexFlag?k(this.min[0],this.min[1],this.max[2]):257===t.pnVertexFlag?k(this.min[0],this.max[1],this.min[2]):256===t.pnVertexFlag?k(this.min[0],this.max[1],this.max[2]):17===t.pnVertexFlag?k(this.max[0],this.min[1],this.min[2]):16===t.pnVertexFlag?k(this.max[0],this.min[1],this.max[2]):1===t.pnVertexFlag?k(this.max[0],this.max[1],this.min[2]):k(this.max[0],this.max[1],this.max[2])},t.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?zt(m(),this.max):272===t.pnVertexFlag?k(this.max[0],this.max[1],this.min[2]):257===t.pnVertexFlag?k(this.max[0],this.min[1],this.max[2]):256===t.pnVertexFlag?k(this.max[0],this.min[1],this.min[2]):17===t.pnVertexFlag?k(this.min[0],this.max[1],this.max[2]):16===t.pnVertexFlag?k(this.min[0],this.max[1],this.min[2]):1===t.pnVertexFlag?k(this.min[0],this.min[1],this.max[2]):k(this.min[0],this.min[1],this.min[2])},y}()),zr=function(){function t(t,e){this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||k(0,1,0),this.updatePNVertexFlag()}var e=t.prototype;return e.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(0<=this.normal[0])<<8)+(Number(0<=this.normal[1])<<4)+Number(0<=this.normal[2])},e.distanceToPoint=function(t){return qt(t,this.normal)-this.distance},e.normalize=function(){var t=1/te(this.normal);Yt(this.normal,this.normal,t),this.distance*=t},e.intersectsLine=function(t,e,n){var r=this.distanceToPoint(t),r=r/(r-this.distanceToPoint(e)),i=0<=r&&r<=1;return i&&n&&Xt(n,t,e,r),i},t}(),Gr=((r=Ir=Ir||{})[r.OUTSIDE=4294967295]="OUTSIDE",r[r.INSIDE=0]="INSIDE",r[r.INDETERMINATE=2147483647]="INDETERMINATE",function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new zr)}return t.prototype.extractFromVPMatrix=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],h=t[10],f=t[11],d=t[12],p=t[13],g=t[14],t=t[15];Gt(this.planes[0].normal,i-e,l-a,f-c),this.planes[0].distance=t-d,Gt(this.planes[1].normal,i+e,l+a,f+c),this.planes[1].distance=t+d,Gt(this.planes[2].normal,i+n,l+o,f+u),this.planes[2].distance=t+p,Gt(this.planes[3].normal,i-n,l-o,f-u),this.planes[3].distance=t-p,Gt(this.planes[4].normal,i-r,l-s,f-h),this.planes[4].distance=t-g,Gt(this.planes[5].normal,i+r,l+s,f+h),this.planes[5].distance=t+g,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})},t}()),Wr=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}var e=t.prototype;return e.clone=function(){return new t(this.x,this.y)},e.copyFrom=function(t){this.x=t.x,this.y=t.y},t}(),Vr=function(){function t(t,e,n,r){this.x=void 0,this.y=void 0,this.width=void 0,this.height=void 0,this.left=void 0,this.right=void 0,this.top=void 0,this.bottom=void 0,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}(),Yr=((e=E=E||{}).GROUP="g",e.CIRCLE="circle",e.ELLIPSE="ellipse",e.IMAGE="image",e.RECT="rect",e.LINE="line",e.POLYLINE="polyline",e.POLYGON="polygon",e.TEXT="text",e.PATH="path",e.HTML="html",e.MESH="mesh",Mn(function(t){return(t=void 0===t?"":t).replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}));function Hr(t){if(!t)throw new Error}function qr(t,e){if(t===e)throw new Error}function Ur(t){return"function"==typeof t}var Xr={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},$r=Mn(function(t){var t=Yr(t),e=Xr[t];return(null==e?void 0:e.alias)||t}),Kr={},Zr=0;var Jr="undefined"!=typeof window&&void 0!==window.document;function Qr(t,e){var n=Number(t.style.zIndex),r=Number(e.style.zIndex);if(n===r){var i=t.parentNode;if(i)return(i=i.childNodes||[]).indexOf(t)-i.indexOf(e)}return n-r}function ti(t){var e,n=t;do{if(null==(e=n.style)?void 0:e.clipPath)return n}while(null!==(n=n.parentElement));return null}function ei(t,e){if(Jr)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}var g,ni,ri,ii,ai="Method not implemented.",oi="Use document.documentElement instead.",si={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"};function M(){M=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return E()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===h)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function m(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:E}}function E(){return{value:void 0,done:!0}}return c(y,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},o.awrap=function(t){return{__await:t}},m(v.prototype),a(v.prototype,n,function(){return this}),o.AsyncIterator=v,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new v(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},m(y),a(y,i,"Generator"),a(y,r,function(){return this}),a(y,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},o}function li(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function ci(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){li(r,e,n,i,a,"next",t)}function a(t){li(r,e,n,i,a,"throw",t)}i(void 0)})}}function ui(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,function(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);n=n.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}(r.key),r)}}function hi(t,e,n){e&&ui(t.prototype,e),n&&ui(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function fi(){return(fi=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function s(t,e){t.prototype=Object.create(e.prototype),di(t.prototype.constructor=t,e)}function di(t,e){return(di=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function pi(t,e){if(null==t)return{};for(var n,r={},i=Object.keys(t),a=0;a<i.length;a++)n=i[a],0<=e.indexOf(n)||(r[n]=t[n]);return r}function gi(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function yi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function mi(t,e){var n,r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){var n;if(t)return"string"==typeof t?yi(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yi(t,e):void 0}(t))||e&&t&&"number"==typeof t.length)return r&&(t=r),n=0,function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(n=g=g||{})[n.kUnknown=0]="kUnknown",n[n.kNumber=1]="kNumber",n[n.kPercentage=2]="kPercentage",n[n.kEms=3]="kEms",n[n.kPixels=4]="kPixels",n[n.kRems=5]="kRems",n[n.kDegrees=6]="kDegrees",n[n.kRadians=7]="kRadians",n[n.kGradians=8]="kGradians",n[n.kTurns=9]="kTurns",n[n.kMilliseconds=10]="kMilliseconds",n[n.kSeconds=11]="kSeconds",n[n.kInteger=12]="kInteger",(r=ni=ni||{})[r.kUNumber=0]="kUNumber",r[r.kUPercent=1]="kUPercent",r[r.kULength=2]="kULength",r[r.kUAngle=3]="kUAngle",r[r.kUTime=4]="kUTime",r[r.kUOther=5]="kUOther",(e=ri=ri||{})[e.kYes=0]="kYes",e[e.kNo=1]="kNo",(n=ii=ii||{})[n.kYes=0]="kYes",n[n.kNo=1]="kNo";function vi(t){return t?"number"===t?g.kNumber:"percent"===t||"%"===t?g.kPercentage:(e=t,Oi.find(function(t){return t.name===e}).unit_type):g.kUnknown;var e}function bi(t){var e=1;switch(t){case g.kPixels:case g.kDegrees:case g.kSeconds:break;case g.kMilliseconds:e=.001;break;case g.kRadians:e=180/Math.PI;break;case g.kGradians:e=.9;break;case g.kTurns:e=360}return e}function xi(t){switch(t){case g.kNumber:case g.kInteger:return"";case g.kPercentage:return"%";case g.kEms:return"em";case g.kRems:return"rem";case g.kPixels:return"px";case g.kDegrees:return"deg";case g.kRadians:return"rad";case g.kGradians:return"grad";case g.kMilliseconds:return"ms";case g.kSeconds:return"s";case g.kTurns:return"turn"}return""}var wi,ki,Ei,Mi,Oi=[{name:"em",unit_type:g.kEms},{name:"px",unit_type:g.kPixels},{name:"deg",unit_type:g.kDegrees},{name:"rad",unit_type:g.kRadians},{name:"grad",unit_type:g.kGradians},{name:"ms",unit_type:g.kMilliseconds},{name:"s",unit_type:g.kSeconds},{name:"rem",unit_type:g.kRems},{name:"turn",unit_type:g.kTurns}],e=((r=wi=wi||{})[r.kUnknownType=0]="kUnknownType",r[r.kUnparsedType=1]="kUnparsedType",r[r.kKeywordType=2]="kKeywordType",r[r.kUnitType=3]="kUnitType",r[r.kSumType=4]="kSumType",r[r.kProductType=5]="kProductType",r[r.kNegateType=6]="kNegateType",r[r.kInvertType=7]="kInvertType",r[r.kMinType=8]="kMinType",r[r.kMaxType=9]="kMaxType",r[r.kClampType=10]="kClampType",r[r.kTransformType=11]="kTransformType",r[r.kPositionType=12]="kPositionType",r[r.kURLImageType=13]="kURLImageType",r[r.kColorType=14]="kColorType",r[r.kUnsupportedColorType=15]="kUnsupportedColorType",function(){function t(){}t.isAngle=function(t){return t===g.kDegrees||t===g.kRadians||t===g.kGradians||t===g.kTurns},t.isLength=function(t){return t>=g.kEms&&t<g.kDegrees},t.isRelativeUnit=function(t){return t===g.kPercentage||t===g.kEms||t===g.kRems},t.isTime=function(t){return t===g.kSeconds||t===g.kMilliseconds};var e=t.prototype;return e.toString=function(){return this.buildCSSText(ri.kNo,ii.kNo,"")},e.isNumericValue=function(){return this.getType()>=wi.kUnitType&&this.getType()<=wi.kClampType},t}()),n=function(n){function t(t){var e=n.call(this)||this;return e.colorSpace=void 0,e.colorSpace=t,e}s(t,n);var e=t.prototype;return e.getType=function(){return wi.kColorType},e.to=function(t){return this},t}(e),Si=((r=ki=ki||{})[r.Constant=0]="Constant",r[r.LinearGradient=1]="LinearGradient",r[r.RadialGradient=2]="RadialGradient",function(r){function t(t,e){var n=r.call(this)||this;return n.type=void 0,n.value=void 0,n.type=t,n.value=e,n}s(t,r);var e=t.prototype;return e.clone=function(){return new t(this.type,this.value)},e.buildCSSText=function(t,e,n){return n},e.getType=function(){return wi.kColorType},t}(e)),_i=function(n){function t(t){var e=n.call(this)||this;return e.value=void 0,e.value=t,e}s(t,n);var e=t.prototype;return e.clone=function(){return new t(this.value)},e.getType=function(){return wi.kKeywordType},e.buildCSSText=function(t,e,n){return n+this.value},t}(e);(r=Ei=Ei||{}).kAdd="+",r.kSubtract="-",r.kMultiply="*",r.kDivide="/",r.kMin="min",r.kMax="max",r.kClamp="clamp",r.kInvalid="",(r=Mi=Mi||{})[r.kLength=0]="kLength",r[r.kAngle=1]="kAngle",r[r.kTime=2]="kTime",r[r.kFrequency=3]="kFrequency",r[r.kResolution=4]="kResolution",r[r.kFlex=5]="kFlex",r[r.kPercent=6]="kPercent",r[r.kNumBaseTypes=7]="kNumBaseTypes";function Ai(t){return"number"==typeof t?new Fi(t,g.kNumber):t}var Ti=function(){function t(t,e){void 0===t&&(t=g.kNumber),void 0===e&&(e=1),this.exponents=[],this.numNonZeroEntries=0,this.percentHint=Mi.kPercent,this.hasPercentHint=!1,this.exponents=new Array(Mi.kNumBaseTypes).fill(0),t!==g.kNumber&&this.setExponent(function(t){switch(qr(t,g.kNumber),t){case g.kEms:case g.kPixels:case g.kRems:return Mi.kLength;case g.kMilliseconds:case g.kSeconds:return Mi.kTime;case g.kDegrees:case g.kRadians:case g.kGradians:case g.kTurns:return Mi.kAngle;case g.kPercentage:return Mi.kPercent;default:return Mi.kLength}}(t),e)}var e=t.prototype;return e.applyPercentHint=function(t){qr(t,Mi.kPercent),this.setExponent(t,this.exponent(t)+this.exponent(Mi.kPercent)),this.setExponent(Mi.kPercent,0),this.percentHint=t,this.hasPercentHint=!0},e.hasNonZeroEntries=function(){return 0<this.numNonZeroEntries},e.isOnlyNonZeroEntry=function(t,e){return qr(e,0),1===this.numNonZeroEntries&&this.exponent(t)===e},e.exponent=function(t){return this.exponents[t]},e.setExponent=function(t,e){var n=this.exponents[t];0==n&&0!==e?this.numNonZeroEntries++:0!==n&&0==e&&this.numNonZeroEntries--,this.exponents[t]=e},t.negateExponents=function(t){return t.exponents.forEach(function(t){return-1*t}),t},e.matchesBaseType=function(t){return qr(t,Mi.kPercent),this.isOnlyNonZeroEntry(t,1)&&!this.hasPercentHint},e.matchesPercentage=function(){return this.isOnlyNonZeroEntry(Mi.kPercent,1)},e.matchesBaseTypePercentage=function(t){return qr(t,Mi.kPercent),this.isOnlyNonZeroEntry(t,1)||this.isOnlyNonZeroEntry(Mi.kPercent,1)},e.matchesNumber=function(){return!this.hasNonZeroEntries()&&!this.hasPercentHint},e.matchesNumberPercentage=function(){return!this.hasNonZeroEntries()||this.isOnlyNonZeroEntry(Mi.kPercent,1)},t.add=function(t,e,n){if(!t.hasPercentHint||!e.hasPercentHint||t.percentHint==e.percentHint){t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint);var r=t.percentHint,i=e.percentHint;if(r!==i)throw new Error;for(var a=0;a<Mi.kNumBaseTypes;++a){var o=a;if(t.exponents[a]!==e.exponents[a]&&(o!==Mi.kPercent&&(t.applyPercentHint(o),e.applyPercentHint(o)),t.exponents[a]!==e.exponents[a]))return t}}return t},t.multiply=function(t,e,n){if(!t.hasPercentHint||!e.hasPercentHint||t.percentHint==e.percentHint){t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint);for(var r=0;r<Mi.kNumBaseTypes;++r){var i=r;t.setExponent(i,t.exponent(i)+e.exponent(i))}}return t},t}(),r=function(n){function d(t){var e=n.call(this)||this;return e.type_=void 0,e.type_=t,e}s(d,n);var t=d.prototype;return t.getType=function(){return wi.kUnknownType},t.equals=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Pi(n).every(function(t){return e.equals(t)})},t.add=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=Pi(e),i=(Li(wi.kSumType,r,this),Ci(r,Ei.kAdd));return i||Vi.create(r)},t.sub=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=(r=Pi(e)).map(function(t){return t.negate()}),i=(Li(wi.kSumType,r,this),Ci(r,Ei.kAdd));return i||Vi.create(r)},t.mul=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=Pi(e),i=(Li(wi.kProductType,r,this),ji(r));return i||Yi.create(r)},t.div=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=(r=Pi(e)).map(function(t){return t.invert()}),i=(Li(wi.kProductType,r,this),ji(r));return i||Yi.create(r)},t.min=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=Pi(e),i=(Li(wi.kMinType,r,this),Ci(r,Ei.kMin));return i||Gi.create(r)},t.max=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=Pi(e),i=(Li(wi.kMaxType,r,this),Ci(r,Ei.kMax));return i||Wi.create(r)},t.to=function(t){var e=this.sumValue();return 0!==e.length&&1===e.length&&(e=Ni(e[0]))?(t="string"==typeof t?vi(t):t,e.convertTo(t)):null},t.toSum=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=0,i=e;r<i.length;r++){var a=i[r];if(!d.isValidUnit(vi(a)))return null}var o=this.sumValue();if(!o.length)return null;for(var s=[],l=mi(o);!(c=l()).done;){var c=Ni(c.value);if(!c)return null;s.push(c)}if(0===e.length)return s.sort(function(t,e){return t.unit-e.unit}),Hr(!!(o=Vi.create(s))),o;for(var u=[],h=0,f=e;h<f.length;h++)!function(){var t=f[h],r=vi(t),t=(Hr(d.isValidUnit(r)),s.reduce(function(t,e,n){return e&&(e=e.convertTo(r))&&(t+=e.value,s[n]=null),t},0));u.push(new Fi(t,r))}();if(s.some(function(t){return!!t}))throw new Error("There were leftover terms that were not converted");return Vi.create(u)},t.type=function(){var t={length:0,angle:0,time:0,frequency:0,resolution:0,flex:0,percent:0,percentHint:"length"},e=this.type_.exponent(Mi.kLength);return e&&(t.length=e),(e=this.type_.exponent(Mi.kAngle))&&(t.angle=e),(e=this.type_.exponent(Mi.kTime))&&(t.time=e),(e=this.type_.exponent(Mi.kFrequency))&&(t.frequency=e),(e=this.type_.exponent(Mi.kResolution))&&(t.resolution=e),(e=this.type_.exponent(Mi.kFlex))&&(t.flex=e),(e=this.type_.exponent(Mi.kPercent))&&(t.percent=e),this.type_.hasPercentHint&&(t.percentHint=function(t){switch(t){case Mi.kLength:return"length";case Mi.kAngle:return"angle";case Mi.kTime:return"time";case Mi.kFrequency:return"frequency";case Mi.kResolution:return"resolution";case Mi.kFlex:return"flex";case Mi.kPercent:return"percent"}return""}(this.type_.percentHint)),t},d.isValidUnit=function(t){return!!(t===g.kNumber||t==g.kPercentage||this.isLength(t)||this.isAngle(t)||this.isTime(t))},t.negate=function(){return Bi.create(this)},t.invert=function(){return Ii.create(this)},d}(e);function Pi(t){return t.map(Ai)}function Li(t,e,n){Hr(!!n),n.getType()===t?e.unshift.apply(e,n.numericValues()):e.unshift(n)}function Ni(t){return 0===Object.keys(t.units).length?new Fi(t.value):1===Object.keys(t.units).length&&1===t.units[Object.keys(t.units)[0]]?new Fi(t.value,Number(Object.keys(t.units)[0])):null}function Ci(t,e){Hr(!!t.length);var n=t[0]instanceof Fi?t[0]:null;if(!n)return null;for(var r=n.value,i=1;i<t.length;i++){var a=t[i]instanceof Fi?t[i]:null;if(!a||a.unit!==n.unit)return null;e===Ei.kAdd?r+=a.value:e===Ei.kMax?r=Math.max(r,a.value):e===Ei.kMin&&(r=Math.min(r,a.value))}return new Fi(r,n.unit)}function ji(t){Hr(!!t.length);for(var e=g.kNumber,n=1,r=0;r<t.length;r++){var i=t[r]instanceof Fi?t[r]:null;if(!i)return null;if(i.unit!==g.kNumber){if(e!==g.kNumber)return null;e=i.unit}n*=i.value}return new Fi(n,e)}function Ri(t){switch(function(t){switch(t){case g.kNumber:case g.kInteger:return ni.kUNumber;case g.kPercentage:return ni.kUPercent;case g.kPixels:return ni.kULength;case g.kMilliseconds:case g.kSeconds:return ni.kUTime;case g.kDegrees:case g.kRadians:case g.kGradians:case g.kTurns:return ni.kUAngle;default:return ni.kUOther}}(t)){case ni.kUNumber:return g.kNumber;case ni.kULength:return g.kPixels;case ni.kUPercent:return g.kPercentage;case ni.kUTime:return g.kSeconds;case ni.kUAngle:return g.kDegrees;default:return g.kUnknown}}var Fi=function(r){function n(t,e){var n,e="string"==typeof(e=void 0===e?g.kNumber:e)?vi(e):e;return(n=r.call(this,new Ti(e))||this).unit=void 0,n.value=void 0,n.unit=e,n.value=t,n}s(n,r);var t=n.prototype;return t.clone=function(){return new n(this.value,this.unit)},t.convertTo=function(t){var e;return this.unit===t?new n(this.value,this.unit):(e=Ri(this.unit))!==Ri(t)||e===g.kUnknown?null:(e=bi(this.unit)/bi(t),new n(this.value*e,t))},t.equals=function(t){return this.value===t.value&&this.unit===t.unit},t.getType=function(){return wi.kUnitType},t.sumValue=function(){var t,e,n=[],r={};return this.unit!==g.kNumber&&(r[t=this.unit,(e=Ri(t))===g.kUnknown?t:e]=1),n.push({value:this.value*bi(this.unit),units:r}),n},t.negate=function(){return new n(-this.value,this.unit)},t.invert=function(){return this.unit===g.kNumber?0===this.value?null:new n(1/this.value,this.unit):Ii.create(this)},t.buildCSSText=function(t,e,n){switch(this.unit){case g.kUnknown:break;case g.kInteger:i=Number(this.value).toFixed(0);break;case g.kNumber:case g.kPercentage:case g.kEms:case g.kRems:case g.kPixels:case g.kDegrees:case g.kRadians:case g.kGradians:case g.kMilliseconds:case g.kSeconds:case g.kTurns:var r,i,a=this.value,o=xi(this.unit);i=a<-999999||999999<a?(r=xi(this.unit),!Number.isFinite(a)||Number.isNaN(a)?function(t,e){void 0===e&&(e="");return(Number.isFinite(t)?(Hr(Number.isNaN(t)),"NaN"):0<t?"infinity":"-infinity")+e}(a,r):a+(r||"")):""+a+o}return n+=i},n}(r),e=function(t){function e(){return t.apply(this,arguments)||this}return s(e,t),e.prototype.isUnitValue=function(){return!1},e}(r),Ii=function(n){function e(t,e){e=n.call(this,e)||this;return e.value=void 0,e.operator="invert",e.value=t,e}s(e,n),e.create=function(t){return new e(t,Ti.negateExponents(t.type_))};var t=e.prototype;return t.clone=function(){return new e(this.value,this.type_)},t.getType=function(){return wi.kInvertType},t.equals=function(t){return t.getType()===wi.kInvertType&&this.value.equals(t.value)},t.sumValue=function(){var e=this.value.sumValue();return 0===e.length||1!==e.length||0===e[0].value?null:(Object.keys(e[0].units).forEach(function(t){e[0].units[t]*=-1}),e[0].value=1/e[0].value,e)},t.buildCSSText=function(t,e,n){return e==ii.kNo&&(n+=t===ri.kYes?"(":"calc("),n=this.value.buildCSSText(ri.kYes,ii.kNo,n+="1 / "),e===ii.kNo&&(n+=")"),n},e}(e),Bi=function(n){function e(t,e){e=n.call(this,e)||this;return e.value=void 0,e.operator="negate",e.value=t,e}s(e,n),e.create=function(t){return new e(t,t.type_)};var t=e.prototype;return t.clone=function(){return new e(this.value,this.type_)},t.getType=function(){return wi.kNegateType},t.equals=function(t){return t.getType()===wi.kNegateType&&this.value.equals(t.value)},t.sumValue=function(){var t=this.value.sumValue();return 0===t.length?null:(t.forEach(function(t){t.value*=-1}),t)},t.buildCSSText=function(t,e,n){return e==ii.kNo&&(n+=t===ri.kYes?"(":"calc("),n=this.value.buildCSSText(ri.kYes,ii.kNo,n+="-"),e===ii.kNo&&(n+=")"),n},e}(e);function Di(t,e){for(var n=t[0].type_,r=1;r<t.length;r++)n=e(n,t[r].type_,!1);return n}function zi(t){return Ki[t]||(Ki[t]=new _i(t)),Ki[t]}var r=function(n){function t(t,e){e=n.call(this,e)||this;return e.values=void 0,e.values=t,e}s(t,n);var e=t.prototype;return e.numericValues=function(){return this.values},e.equals=function(n){return this.getType()===n.getType()&&this.values.every(function(t,e){return t.equals(n.values[e])})},t}(e),Gi=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="min",t}s(e,i),e.create=function(t){return new e(t,Di(t,Ti.add))};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return wi.kMinType},t.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e=mi(this.numericValues());!(n=e()).done;){var n=n.value.sumValue();if(!n.length||JSON.stringify(n[0].units)!==JSON.stringify(t[0].units))return null;n[0].value<t[0].value&&(t=n)}return t},t.buildCSSText=function(t,e,n){n+="min(";for(var r,i=!0,a=mi(this.numericValues());!(r=a()).done;)i||(n+=", "),i=!1,n=r.value.buildCSSText(ri.kYes,ii.kYes,n);return n+=")"},e}(r),Wi=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="max",t}s(e,i),e.create=function(t){return new e(t,Di(t,Ti.add))};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return wi.kMaxType},t.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e=mi(this.numericValues());!(n=e()).done;){var n=n.value.sumValue();if(!n.length||JSON.stringify(n[0].units)!==JSON.stringify(t[0].units))return null;n[0].value<t[0].value&&(t=n)}return t},t.buildCSSText=function(t,e,n){n+="max(";for(var r,i=!0,a=mi(this.numericValues());!(r=a()).done;)i||(n+=", "),i=!1,n=r.value.buildCSSText(ri.kYes,ii.kYes,n);return n+=")"},e}(r),Vi=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="sum",t}s(e,i),e.create=function(t){return new e(t,Di(t,Ti.add))},e.numericTypeFromUnitMap=function(n){var r=new Ti;return Object.keys(n).forEach(function(t){var e=n[t];r=Ti.multiply(r,new Ti(Number(t),e),!1),Hr(!0)}),r},e.canCreateNumericTypeFromSumValue=function(t){var e=this,n=(Hr(!!t.length),this.numericTypeFromUnitMap(t[0].units));return t.every(function(t){return Ti.add(n,e.numericTypeFromUnitMap(t.units),!1),!0})};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return wi.kSumType},t.sumValue=function(){var n=[];return this.numericValues().forEach(function(t){t=t.sumValue();if(!t.length)return null;t.forEach(function(e){var t=n.findIndex(function(t){return JSON.stringify(t.units)===JSON.stringify(e.units)});-1===t?n.push(fi({},e)):n[t].value+=e.value})}),e.canCreateNumericTypeFromSumValue(n)?n:null},t.buildCSSText=function(t,e,n){e==ii.kNo&&(n+=t===ri.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(ri.kYes,ii.kNo,n);for(var i=1;i<r.length;i++){var a=r[i];n=(a.getType()===wi.kNegateType?(n+=" - ",a.value):(n+=" + ",a)).buildCSSText(ri.kYes,ii.kNo,n)}return e===ii.kNo&&(n+=")"),n},e}(r),Yi=function(i){function a(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="product",t}s(a,i),a.create=function(t){return new a(t,Di(t,Ti.multiply))},a.multiplyUnitMaps=function(n,r){return Object.keys(r).forEach(function(t){qr(r[t].value,0);var e=t in n?n[t].value:0;e+r[t].value===0?delete n[t]:n[t]=e+r[t].value}),n};var t=a.prototype;return t.clone=function(){return new a(this.values,this.type_)},t.getType=function(){return wi.kProductType},t.sumValue=function(){var e=[{value:1,units:{}}];return this.numericValues().forEach(function(t){var n=t.sumValue();if(!n.length)return null;var r=[];e.forEach(function(e){n.forEach(function(t){r.push({value:e.value*t.value,units:a.multiplyUnitMaps(e.units,t.units)})})}),e=r}),e},t.buildCSSText=function(t,e,n){e==ii.kNo&&(n+=t===ri.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(ri.kYes,ii.kNo,n);for(var i=1;i<r.length;i++){var a=r[i];n=(a.getType()===wi.kInvertType?(n+=" / ",a.value):(n+=" * ",a)).buildCSSText(ri.kYes,ii.kNo,n)}return e===ii.kNo&&(n+=")"),n},a}(r),Hi=new Fi(0,"px"),qi=(new Fi(1,"px"),new Fi(0,"deg")),Ui=function(o){function t(t,e,n,r,i){var a;return void 0===r&&(r=1),void 0===i&&(i=!1),(a=o.call(this,"rgb")||this).r=void 0,a.g=void 0,a.b=void 0,a.alpha=void 0,a.isNone=void 0,a.r=t,a.g=e,a.b=n,a.alpha=r,a.isNone=i,a}s(t,o);var e=t.prototype;return e.clone=function(){return new t(this.r,this.g,this.b,this.alpha)},e.buildCSSText=function(t,e,n){return n+("rgba("+this.r+","+this.g+","+this.b+","+this.alpha)+")"},t}(n),Xi=function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,t=t.syntax;w.styleValueRegistry.registerMetadata({n:e,inh:n,int:r,d:i,syntax:t})},$i=new _i("unset"),e=new _i("initial"),r=new _i("inherit"),Ki={"":$i,unset:$i,initial:e,inherit:r},Zi=new Ui(0,0,0,0,!0),Ji=new Ui(0,0,0,0),Qi=Mn(function(t,e,n,r){return new Ui(t,e,n,r)},function(t,e,n,r){return"rgba("+t+","+e+","+n+","+r+")"}),ta=Mn(function(t,e){return void 0===e&&(e=g.kNumber),new Fi(t,e)},function(t,e){return""+t+(e=void 0===e?g.kNumber:e)}),ea=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,na=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,ra=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,ia=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var aa={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},oa=Mn(function(t){t="angular"===t.type?Number(t.value):aa[t.value]||0;return ta(t,"deg")}),sa=Mn(function(t){var e,n=50,r=50,i="%",a="%";return"position"===(null==t?void 0:t.type)&&(e=(t=t.value).x,t=t.y,"position-keyword"===(null==e?void 0:e.type)&&("left"===e.value?n=0:"center"===e.value?n=50:"right"===e.value?n=100:"top"===e.value?r=0:"bottom"===e.value&&(r=100)),"position-keyword"===(null==t?void 0:t.type)&&("left"===t.value?n=0:"center"===t.value?r=50:"right"===t.value?n=100:"top"===t.value?r=0:"bottom"===t.value&&(r=100)),"px"!==(null==e?void 0:e.type)&&"%"!==(null==e?void 0:e.type)&&"em"!==(null==e?void 0:e.type)||(i=null==e?void 0:e.type,n=Number(e.value)),"px"!==(null==t?void 0:t.type)&&"%"!==(null==t?void 0:t.type)&&"em"!==(null==t?void 0:t.type)||(a=null==t?void 0:t.type,r=Number(t.value))),{cx:ta(n,i),cy:ta(r,a)}}),la=Mn(function(t){if(-1<t.indexOf("linear")||-1<t.indexOf("radial"))return ks(t).map(function(t){for(var e=t.type,n=t.orientation,t=t.colorStops,r=t,i=r.length,a=(r[i-1].length=null!=(f=r[i-1].length)?f:{type:"%",value:"100"},1<i&&(r[0].length=null!=(f=r[0].length)?f:{type:"%",value:"0"}),0),o=Number(r[0].length.value),s=1;s<i;s++){var l,c=null==(l=r[s].length)?void 0:l.value;if(!_(c)&&!_(o)){for(var u=1;u<s-a;u++)r[a+u].length={type:"%",value:""+(o+(Number(c)-o)*u/(s-a))};a=s,o=Number(c)}}var h,f=t.map(function(t){return{offset:ta(t.length.value,"%"),color:(e=(t=t).type,t=t.value,"hex"===e?"#"+t:"literal"===e?t:"rgb"===e?"rgb("+t.join(",")+")":"rgba("+t.join(",")+")")};var e});return"linear-gradient"===e?new Si(ki.LinearGradient,{angle:n?oa(n):qi,steps:f}):"radial-gradient"===e&&"shape"===(n=n||[{type:"shape",value:"circle"}])[0].type&&"circle"===n[0].value?(e=(t=sa(n[0].at)).cx,t=t.cy,n[0].style&&(h=(n=n[0].style).type,n=n.value,h="extent-keyword"===h?zi(n):ta(n,h)),new Si(ki.RadialGradient,{cx:e,cy:t,size:h,steps:f})):void 0});var e=t[0];if("("===t[1]||"("===t[2])if("l"===e){var n=ea.exec(t);if(n)return r=(null==(r=n[2].match(ia))?void 0:r.map(function(t){return t.split(":")}))||[],[new Si(ki.LinearGradient,{angle:ta(parseFloat(n[1]),"deg"),steps:r.map(function(t){var e=t[0],t=t[1];return{offset:ta(100*Number(e),"%"),color:t}})})]}else if("r"===e){n=function(t){var t=na.exec(t);if(t)return t=(null==(t=t[4].match(ia))?void 0:t.map(function(t){return t.split(":")}))||[],{cx:ta(50,"%"),cy:ta(50,"%"),steps:t.map(function(t){var e=t[0],t=t[1];return{offset:ta(100*Number(e),"%"),color:t}})};return null}(t);if(n&&!fn(n))return[new Si(ki.RadialGradient,n)]}else if("p"===e){var r=t;if(r=ra.exec(r)){var i=r[1],r=r[2];switch(i){case"a":i="repeat";break;case"x":i="repeat-x";break;case"y":i="repeat-y";break;default:i="no-repeat"}return{image:r,repetition:i}}return null}});function ca(t){return on(t)&&t.image}var ua=Mn(function(t){var e;return ca(t)?fi({repetition:"repeat"},t):"transparent"===(t=_(t)?"":t)?Ji:la(t="currentColor"===t?"black":t)||(e=[0,0,0,0],null!==(t=qn(t))&&(e[0]=t.r||0,e[1]=t.g||0,e[2]=t.b||0,e[3]=t.opacity),Qi.apply(void 0,e))});function ha(t,e){if(t instanceof Ui&&e instanceof Ui)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(dn(e[n],0,255));return e[3]=dn(e[3],0,1),"rgba("+e.join(",")+")"}]}function fa(t,e){if(_(e))return ta(0,"px");if(e=(""+e).trim().toLowerCase(),isFinite(Number(e))){if(0<="px".search(t))return ta(Number(e),"px");if(0<="deg".search(t))return ta(Number(e),"deg")}var n=[],r=(e=e.replace(t,function(t){return n.push(t),"U"+t}),"U("+t.source+")");return n.map(function(t){return ta(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)})[0]}var da=Mn(function(t){return fa(new RegExp("px","g"),t)}),pa=(Mn(function(t){return fa(new RegExp("%","g"),t)}),Mn(function(t){return pn(t)||isFinite(Number(t))?ta(Number(t),"px"):fa(new RegExp("px|%|em|rem","g"),t)})),ga=Mn(function(t){return fa(new RegExp("deg|rad|grad|turn","g"),t)});function ya(t){var e=0;return t.unit===g.kDegrees?e=t.value:t.unit===g.kRadians?e=us(Number(t.value)):t.unit===g.kTurns&&(e=360*Number(t.value)),e}function ma(t){return fn(t)?t.split(" ").map(function(t){return pa(t)}):t.map(function(t){return pa(t.toString())})}function va(t,e,n){var r;return t.unit===g.kPixels?Number(t.value):t.unit===g.kPercentage&&n?(n=n.nodeName===E.GROUP?n.getLocalBounds():n.getGeometryBounds(),r=0,Dr.isEmpty(n)||(r=2*n.halfExtents[e]),Number(t.value)/100*r):0}var ba=function(t){return fa(/deg|rad|grad|turn|px|%/g,t)},xa=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function wa(t){if("none"!==(t=(t=void 0===t?"":t).toLowerCase().trim()))for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];if(i=e.index+e[0].length,-1<xa.indexOf(e[1])&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return ba(t)||ua(t)})}),n.lastIndex===t.length)return r}return[]}function ka(t){return t.toString()}var Ea=Mn(function(t){return"number"==typeof t?ta(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?ta(Number(t)):ta(0)});function Ma(t,e){return[t,e,ka]}function Oa(n,r){return function(t,e){return[t,e,function(t){return ka(dn(t,n,r))}]}}function Sa(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}Mn(function(t){return(fn(t)?t.split(" "):t).map(Ea)});var _a=function(e){if(""===e||Array.isArray(e)&&0===e.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var n;try{n=De(e)}catch(t){n=De(""),console.error("[g]: Invalid SVG Path definition: "+e)}var e=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}(n),t=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var a=t[i],o=a[0];"M"===o?(r.length&&(n.push(r),r=[]),r.push([a[1],a[2]])):"Z"===o?r.length&&(e.push(r),r=[]):r.push([a[1],a[2]])}0<r.length&&n.push(r);return{polygons:e,polylines:n}}(n),r=t.polygons,t=t.polylines,i=function(t){for(var e=[],n=null,r=null,i=null,a=0,o=t.length,s=0;s<o;s++){var l=t[s],c=(r=t[s+1],l[0]),u={command:c,prePoint:n,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(c){case"M":i=[l[1],l[2]],a=s;break;case"A":var h=function(t,e){var n=e[1],r=e[2],i=gn(cs(e[3]),2*Math.PI),a=e[4],o=e[5],s=t[0],l=t[1],c=e[6],e=e[7],u=Math.cos(i)*(s-c)/2+Math.sin(i)*(l-e)/2,h=-1*Math.sin(i)*(s-c)/2+Math.cos(i)*(l-e)/2,f=u*u/(n*n)+h*h/(r*r);1<f&&(n*=Math.sqrt(f),r*=Math.sqrt(f));f=n*n*(h*h)+r*r*(u*u),f=f?Math.sqrt((n*n*(r*r)-f)/f):1;a===o&&(f*=-1);isNaN(f)&&(f=0);var d=r?f*n*h/r:0,f=n?f*-r*u/n:0,s=(s+c)/2+Math.cos(i)*d-Math.sin(i)*f,l=(l+e)/2+Math.sin(i)*d+Math.cos(i)*f,p=[(u-d)/n,(h-f)/r],u=[(-1*u-d)/n,(-1*h-f)/r],d=Js([1,0],p),h=Js(p,u);Zs(p,u)<=-1&&(h=Math.PI);1<=Zs(p,u)&&(h=0);0===o&&0<h&&(h-=2*Math.PI);1===o&&h<0&&(h+=2*Math.PI);return{cx:s,cy:l,rx:Ys(t,[c,e])?0:n,ry:Ys(t,[c,e])?0:r,startAngle:d,endAngle:d+h,xRotation:i,arcFlag:a,sweepFlag:o}}(n,l);u.arcParams=h}"Z"===c?(n=i,r=t[a+1]):(v=l.length,n=[l[v-2],l[v-1]]),r&&"Z"===r[0]&&(r=t[a],e[a])&&(e[a].prePoint=n),u.currentPoint=n,e[a]&&Ys(n,e[a].currentPoint)&&(e[a].prePoint=u.prePoint);var f,d,p,g,y,m,v=r?[r[r.length-2],r[r.length-1]]:null,b=(u.nextPoint=v,u.prePoint);["L","H","V"].includes(c)?(u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]]):"Q"===c?(f=[l[1],l[2]],u.startTangent=[b[0]-f[0],b[1]-f[1]],u.endTangent=[n[0]-f[0],n[1]-f[1]]):"T"===c?(d=qs((f=e[s-1]).currentPoint,b),"Q"===f.command?(u.command="Q",u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-d[0],n[1]-d[1]]):(u.command="TL",u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]])):"C"===c?(d=[l[1],l[2]],p=[l[3],l[4]],u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-p[0],n[1]-p[1]],0===u.startTangent[0]&&0===u.startTangent[1]&&(u.startTangent=[d[0]-p[0],d[1]-p[1]]),0===u.endTangent[0]&&0===u.endTangent[1]&&(u.endTangent=[p[0]-d[0],p[1]-d[1]])):"S"===c?(g=qs((p=e[s-1]).currentPoint,b),y=[l[1],l[2]],"C"===p.command?(u.command="C",u.startTangent=[b[0]-g[0],b[1]-g[1]]):(u.command="SQ",u.startTangent=[b[0]-y[0],b[1]-y[1]]),u.endTangent=[n[0]-y[0],n[1]-y[1]]):"A"===c&&(g=$s(u,0),b=g.x,y=g.y,c=$s(u,1,!1),m=c.x,c=c.y,u.startTangent=[b,y],u.endTangent=[m,c]),e.push(u)}return e}(n),a=function(t,e){for(var n=[],r=[],i=[],a=0;a<t.length;a++){var o=t[a],s=o.currentPoint,l=o.params,c=o.prePoint,u=void 0;switch(o.command){case"Q":u=pr.box(c[0],c[1],l[1],l[2],l[3],l[4]);break;case"C":u=xr.box(c[0],c[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var h=o.arcParams;u=_r.box(h.cx,h.cy,h.rx,h.ry,h.xRotation,h.startAngle,h.endAngle);break;default:n.push(s[0]),r.push(s[1])}u&&(o.box=u,n.push(u.x,u.x+u.width),r.push(u.y,u.y+u.height)),e&&("L"===o.command||"M"===o.command)&&o.prePoint&&o.nextPoint&&i.push(o)}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 f=hn(n),d=hn(r),p=un(n),g=un(r);if(0!==i.length)for(var y=0;y<i.length;y++){var m=i[y],v=m.currentPoint,b=void 0;v[0]===f?(b=Hs(m,e),f-=b.xExtra):v[0]===p&&(b=Hs(m,e),p+=b.xExtra),v[1]===d?(b=Hs(m,e),d-=b.yExtra):v[1]===g&&(b=Hs(m,e),g+=b.yExtra)}return{x:f,y:d,width:p-f,height:g-d}}(i,0),o=a.x,s=a.y,l=a.width,a=a.height;return{absolutePath:n,hasArc:e,segments:i,polygons:r,polylines:t,totalLength:0,rect:{x:Number.isFinite(o)?o:0,y:Number.isFinite(s)?s:0,width:Number.isFinite(l)?l:0,height:Number.isFinite(a)?a:0}}},Aa=Mn(_a);function Ta(t,e){t=(fn(t)?Aa:_a)(t);return e&&(e.parsedStyle.defX=t.rect.x,e.parsedStyle.defY=t.rect.y),t}function Pa(t,e,n){var r,i,a,o,s,l,c,u,h,f=t.curve,d=e.curve,t=(f&&0!==f.length||(f=qe(t.absolutePath,!1),t.curve=f),d&&0!==d.length||(d=qe(e.absolutePath,!1),e.curve=d),[f,d]),f=Je((t=f.length!==d.length?function t(e,n,r){var i,e=Qe(e),n=Qe(n),a=e.length,o=n.length,s=e.filter(function(t){return t.l}).length,l=n.filter(function(t){return t.l}).length,s=e.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/s||0,l=n.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/l||0,c=r||Math.max(a,o),u=[s,l],h=[c-a,c-o],r=[e,n].map(function(t,n){return t.l===c?t.map(function(t){return t.s}):t.map(function(t,e){return i=e&&h[n]&&t.l>=u[n],h[n]-=i?1:0,i?t.ss:[t.s]}).flat()});return r[0].length===r[1].length?r:t(r[0],r[1],c)}(f,d):t)[0])!==Je(t[1])?(r=t[0],e=r.slice(1).map(function(t,e,n){return(e?n[e-1].slice(-2):r[0].slice(1)).concat(t.slice(1))}).map(function(n){return n.map(function(t,e){return n[n.length-e-2*(1-e%2)]})}).reverse(),[["M"].concat(e[0].slice(0,2))].concat(e.map(function(t){return["C"].concat(t.slice(2))}))):ke(t[0]);return[f,(i=t[1],a=f,c=i.length-1,u=[],h=0,s=(o=i).length,l=s-1,(d=o.map(function(t,r){return o.map(function(t,e){var n=r+e;return 0===e||o[n]&&"M"===o[n][0]?(e=o[n],["M"].concat(e.slice(-2))):(s<=n&&(n-=l),o[n])})})).forEach(function(t,n){i.slice(1).forEach(function(t,e){h+=Ve(i[(n+e)%c].slice(-2),a[e%c].slice(-2))}),u[n]=h,h=0}),d[u.indexOf(Math.min.apply(null,u))]),function(t){return t}]}function La(t,e){var n,r,i=fn(t)?t.split(" ").map(function(t){var t=t.split(","),e=t[0],t=t[1];return[Number(e),Number(t)]}):t,a=[],o=0,s=Lr.length(i),t=(i.forEach(function(t,e){i[e+1]&&((n=[0,0])[0]=o/s,r=sr.length(t[0],t[1],i[e+1][0],i[e+1][1]),o+=r,n[1]=o/s,a.push(n))}),Math.min.apply(Math,i.map(function(t){return t[0]}))),l=Math.min.apply(Math,i.map(function(t){return t[1]}));return e&&(e.parsedStyle.defX=t,e.parsedStyle.defY=l),{points:i,totalLength:s,segments:a}}var Na=null;function Ca(t){return function(e){var n=0;return t.map(function(t){return t===Na?e[n++]:t})}}function ja(t){return t}var Ra={matrix:["NNNNNN",[Na,Na,0,0,Na,Na,0,0,0,0,1,0,Na,Na,0,1],ja],matrix3d:["NNNNNNNNNNNNNNNN",ja],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",Ca([Na,Na,new Fi(1)]),ja],scalex:["N",Ca([Na,new Fi(1),new Fi(1)]),Ca([Na,new Fi(1)])],scaley:["N",Ca([new Fi(1),Na,new Fi(1)]),Ca([new Fi(1),Na])],scalez:["N",Ca([new Fi(1),new Fi(1),Na])],scale3d:["NNN",ja],skew:["Aa",null,ja],skewx:["A",null,Ca([Na,qi])],skewy:["A",null,Ca([qi,Na])],translate:["Tt",Ca([Na,Na,Hi]),ja],translatex:["T",Ca([Na,Hi,Hi]),Ca([Na,Hi])],translatey:["T",Ca([Hi,Na,Hi]),Ca([Hi,Na])],translatez:["L",Ca([Hi,Hi,Na])],translate3d:["TTL",ja]};function Fa(t){if("none"!==(t=(t||"none").toLowerCase().trim()))for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];var i=e.index+e[0].length,a=e[1],o=Ra[a];if(!o)return[];var s=e[2].split(","),l=o[0];if(l.length<s.length)return[];for(var c=[],u=0;u<l.length;u++){var h=s[u],f=l[u],d=void 0;if(void 0===(d=h?{A:function(t){return"0"===t.trim()?qi:ga(t)},N:Ea,T:pa,L:da}[f.toUpperCase()](h):{a:qi,n:c[0],t:Hi}[f]))return[];c.push(d)}if(r.push({t:a,d:c}),n.lastIndex===t.length)return r}return[]}function Ia(t){switch(t.t){case"rotatex":return i=cs(ya(t.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return i=cs(ya(t.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotatez":return i=cs(ya(t.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":var e=t.d[0].value,n=t.d[1].value,r=t.d[2].value,i=cs(ya(t.d[3])),a=e*e+n*n+r*r,a=(0==a?(e=1,r=n=0):1!=a&&(e/=a=Math.sqrt(a),n/=a,r/=a),Math.sin(i/2)),o=a*Math.cos(i/2),a=a*a;return[1-2*(n*n+r*r)*a,2*(e*n*a+r*o),2*(e*r*a-n*o),0,2*(e*n*a-r*o),1-2*(e*e+r*r)*a,2*(n*r*a+e*o),0,2*(e*r*a+n*o),2*(n*r*a-e*o),1-2*(e*e+n*n)*a,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":o=cs(ya(t.d[0])),a=cs(ya(t.d[1]));return[1,Math.tan(a),0,0,Math.tan(o),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return i=cs(ya(t.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return i=cs(ya(t.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,e=va(t.d[0],0,null)||0,n=va(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=va(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=va(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=va(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=va(t.d[0],0,null)||0,n=va(t.d[1],0,null)||0,r=va(t.d[2],0,null)||0,1];case"perspective":a=va(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,a?-1/a: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 Ba(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 Da(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return function(t,e,n,r,i,a){if(!function(t,e){var n=e[15];if(0===n)return;for(var r=1/n,i=0;i<16;i++)t[i]=e[i]*r;return 1}(ds,t))return;if(dt(ps,ds),ps[3]=0,ps[7]=0,ps[11]=0,ps[15]=1,Math.abs(vt(ps))<1e-8)return;var t=ds[3],o=ds[7],s=ds[11],l=ds[12],c=ds[13],u=ds[14],h=ds[15];if(0!==t||0!==o||0!==s){if(gs[0]=t,gs[1]=o,gs[2]=s,gs[3]=h,!mt(ps,ps))return;yt(ps,ps),ne(i,gs,ps)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=l,e[1]=c,e[2]=u,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]}(d,ds),n[0]=Dt(d[0]),Ht(d[0],d[0]),r[0]=qt(d[0],d[1]),ms(d[1],d[1],d[0],1,-r[0]),n[1]=Dt(d[1]),Ht(d[1],d[1]),r[0]/=n[1],r[1]=qt(d[0],d[2]),ms(d[2],d[2],d[0],1,-r[1]),r[2]=qt(d[1],d[2]),ms(d[2],d[2],d[1],1,-r[2]),n[2]=Dt(d[2]),Ht(d[2],d[2]),r[1]/=n[2],r[2]/=n[2],Ut(ys,d[1],d[2]),qt(d[0],ys)<0)for(var f=0;f<3;f++)n[f]*=-1,d[f][0]*=-1,d[f][1]*=-1,d[f][2]*=-1;a[0]=.5*Math.sqrt(Math.max(1+d[0][0]-d[1][1]-d[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-d[0][0]+d[1][1]-d[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-d[0][0]-d[1][1]+d[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+d[0][0]+d[1][1]+d[2][2],0)),d[2][1]>d[1][2]&&(a[0]=-a[0]);d[0][2]>d[2][0]&&(a[1]=-a[1]);d[1][0]>d[0][1]&&(a[2]=-a[2])}(0===(t=t).length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(Ia).reduce(Ba),e,n,r,i,a),[[e,n,r,a,i]]}var za=function(t,e,n,r,i){for(var a=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],o=0;o<4;o++)a[o][3]=i[o];for(var s=0;s<3;s++)for(var l=0;l<3;l++)a[3][s]+=t[l]*a[l][s];var c=r[0],u=r[1],h=r[2],r=r[3],f=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],h=(f[0][0]=1-2*(u*u+h*h),f[0][1]=2*(c*u-h*r),f[0][2]=2*(c*h+u*r),f[1][0]=2*(c*u+h*r),f[1][1]=1-2*(c*c+h*h),f[1][2]=2*(u*h-c*r),f[2][0]=2*(c*h-u*r),f[2][1]=2*(u*h+c*r),f[2][2]=1-2*(c*c+u*u),a=Ga(a,f),[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]);n[2]&&(h[2][1]=n[2],a=Ga(a,h)),n[1]&&(h[2][1]=0,h[2][0]=n[0],a=Ga(a,h)),n[0]&&(h[2][0]=0,h[1][0]=n[0],a=Ga(a,h));for(var d=0;d<3;d++)for(var p=0;p<3;p++)a[d][p]*=e[d];return 0==(r=a)[0][2]&&0==r[0][3]&&0==r[1][2]&&0==r[1][3]&&0==r[2][0]&&0==r[2][1]&&1==r[2][2]&&0==r[2][3]&&0==r[3][2]&&1==r[3][3]?[a[0][0],a[0][1],a[1][0],a[1][1],a[3][0],a[3][1]]:a[0].concat(a[1],a[2],a[3])};function Ga(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 a=0;a<4;a++)n[r][i]+=e[r][a]*t[a][i];return n}function Wa(t){return t.toFixed(6).replace(".000000","")}function Va(e,n){var r,i;return e.decompositionPair!==n&&(e.decompositionPair=n,r=Da(e)),n.decompositionPair!==e&&(n.decompositionPair=e,i=Da(n)),null===r[0]||null===i[0]?[[!1],[!0],function(t){return(t?n:e)[0].d}]:(r[0].push(0),i[0].push(1),[r,i,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),i=(r=dn(r,-1,1),[]);if(1===r)i=t;else for(var a=Math.acos(r),o=+Math.sin(n*a)/Math.sqrt(1-r*r),s=0;s<4;s++)i.push(t[s]*(Math.cos(n*a)-r*o)+e[s]*o);return i}(r[0][3],i[0][3],t[5]);return za(t[0],t[1],t[2],e,t[4]).map(Wa).join(",")}])}function Ya(t){return t.replace(/[xy]/,"")}function Ha(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var qa=function(t,e){return"perspective"===t&&"perspective"===e||("matrix"===t||"matrix3d"===t)&&("matrix"===e||"matrix3d"===e)};function Ua(r,i,t){var e=!1;if(!r.length||!i.length){r.length||(e=!0,r=i,i=[]);for(var n=0;n<r.length;n++)!function(t){var t=r[t],e=t.t,t=t.d,n="scale"===e.substring(0,5)?1:0;i.push({t:e,d:t.map(function(t){return"number"==typeof t?ta(n):ta(n,t.unit)})})}(n)}var a=[],o=[],s=[];if(r.length!==i.length)var l=Va(r,i),a=[l[0]],o=[l[1]],s=[["matrix",[l[2]]]];else for(var c=0;c<r.length;c++){var u=r[c].t,h=i[c].t,f=r[c].d,d=i[c].d,p=Ra[u],g=Ra[h],y=void 0;if(qa(u,h)){var m=Va([r[c]],[i[c]]);a.push(m[0]),o.push(m[1]),s.push(["matrix",[m[2]]])}else{if(u===h)y=u;else if(p[2]&&g[2]&&Ya(u)===Ya(h))y=Ya(u),f=p[2](f),d=g[2](d);else{if(!p[1]||!g[1]||Ha(u)!==Ha(h)){m=Va(r,i);a=[m[0]],o=[m[1]],s=[["matrix",[m[2]]]];break}y=Ha(u),f=p[1](f),d=g[1](d)}for(var v=[],b=[],x=[],w=0;w<f.length;w++){var k=function(t,e,n,r,i){void 0===i&&(i=0);var a="",o=t.value||0,s=e.value||0,l=Ri(t.unit),c=t.convertTo(l),l=e.convertTo(l);return c&&l?(o=c.value,s=l.value,a=xi(t.unit)):(Fi.isLength(t.unit)||Fi.isLength(e.unit))&&(o=va(t,i,n),s=va(e,i,n),a="px"),[o,s,function(t){return(t=r?Math.max(t,0):t)+a}]}(f[w],d[w],t,!1,w);v[w]=k[0],b[w]=k[1],x.push(k[2])}a.push(v),o.push(b),s.push([y,x])}}return e&&(l=a,a=o,o=l),[a,o,function(t){return t.map(function(t,n){t=t.map(function(t,e){return s[n][1][e](t)}).join(",");return"matrix"===s[n][0]&&16===t.split(",").length&&(s[n][0]="matrix3d"),"matrix3d"===s[n][0]&&6===t.split(",").length&&(s[n][0]="matrix"),s[n][0]+"("+t+")"}).join(" ")}]}var Xa=Mn(function(t){var e;return fn(t)?"text-anchor"===t?[ta(0,"px"),ta(0,"px")]:(1===(e=t.split(" ")).length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length?null:[pa($a(e[0])),pa($a(e[1]))]):[ta(t[0]||0,"px"),ta(t[1]||0,"px")]});function $a(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var n=function(){function t(){this.parser=ga,this.mixer=Ma}return t.prototype.calculator=function(t,e,n,r){return ya(n)},t}(),e=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){return n instanceof _i&&(n=null),w.sceneGraphService.updateDisplayObjectDependency(t,e,n,r),"clipPath"===t&&r.forEach(function(t){0===t.childNodes.length&&w.sceneGraphService.dirtifyToRoot(t)}),n},t}(),r=function(){function t(){this.parser=ua,this.mixer=ha}return t.prototype.calculator=function(t,e,n,r){return n instanceof _i?"none"===n.value?Zi:Ji:n},t}(),Ka=function(){function t(){this.parser=wa}return t.prototype.calculator=function(t,e,n){return n instanceof _i?[]:n},t}();function Za(t){t=t.parsedStyle.fontSize;return _(t)?null:t}function Ja(){this.parser=Xa}var Qa,y,to=function(){function t(){this.parser=pa,this.mixer=Ma}return t.prototype.calculator=function(t,e,n,r,i){if(!Fi.isRelativeUnit(n.unit))return n.value;if(n.unit===g.kPercentage)return 0;if(n.unit===g.kEms){if(r.parentNode){var a=Za(r.parentNode);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}if(n.unit===g.kRems){if(null!=r&&null!=(a=r.ownerDocument)&&a.documentElement){a=Za(r.ownerDocument.documentElement);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}},t}(),eo=function(){function t(){this.mixer=Sa}var e=t.prototype;return e.parser=function(t){t=ma(pn(t)?[t]:t),t=1===t.length?[t[0],t[0]]:[t[0],t[1]];return t},e.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),no=function(){function t(){this.mixer=Sa}var e=t.prototype;return e.parser=function(t){t=ma(pn(t)?[t]:t),t=1===t.length?[t[0],t[0],t[0],t[0]]:2===t.length?[t[0],t[1],t[0],t[1]]:3===t.length?[t[0],t[1],t[2],t[1]]:[t[0],t[1],t[2],t[3]];return t},e.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),ro=function(t){function e(){return t.apply(this,arguments)||this}return s(e,t),e.prototype.postProcessor=function(t){var e,n,r;switch(t.nodeName){case E.CIRCLE:case E.ELLIPSE:var i=t.parsedStyle,a=i.cx,i=i.cy;_(a)||(l=a),_(i)||(c=i);break;case E.LINE:var a=t.parsedStyle,i=a.x1,o=a.x2,s=a.y1,a=a.y2,l=Math.min(i,o),c=Math.min(s,a),u=0;break;case E.RECT:case E.IMAGE:case E.GROUP:case E.HTML:case E.TEXT:case E.MESH:_(t.parsedStyle.x)||(l=t.parsedStyle.x),_(t.parsedStyle.y)||(c=t.parsedStyle.y)}t.nodeName!==E.PATH&&t.nodeName!==E.POLYLINE&&t.nodeName!==E.POLYGON&&(t.parsedStyle.defX=l||0,t.parsedStyle.defY=c||0),_(l)&&_(c)&&_(u)||(e=(r=t.getLocalPosition())[0],n=r[1],r=r[2],t.setLocalPosition(_(l)?e:l,_(c)?n:c,_(u)?r:u))},e}(to),io=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n=null==(n=n=n instanceof _i?null:n)?void 0:n.cloneNode(!0);return n&&(n.style.isMarker=!0),n},t}(),ao=function(){function t(){this.mixer=Ma,this.parser=Ea}return t.prototype.calculator=function(t,e,n){return n.value},t}(),oo=function(){function t(){this.parser=Ea,this.mixer=Oa(0,1)}var e=t.prototype;return e.calculator=function(t,e,n){return n.value},e.postProcessor=function(t){var e,n=t.parsedStyle,r=n.offsetPath,n=n.offsetDistance;!r||(e=r.nodeName)!==E.LINE&&e!==E.PATH&&e!==E.POLYLINE||(e=r.getPoint(n))&&(t.parsedStyle.defX=e.x,t.parsedStyle.defY=e.y,t.setLocalPosition(e.x,e.y))},t}(),so=function(){function t(){this.parser=Ea,this.mixer=Oa(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),lo=function(){function t(){this.parser=Ta,this.mixer=Pa}var e=t.prototype;return e.calculator=function(t,e,n){return n instanceof _i&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Vr(0,0,0,0)}:n},e.postProcessor=function(t){var e,n;t.nodeName===E.PATH&&(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(void 0===e?0:e,void 0===n?0:n))},t}(),co=function(){function t(){this.parser=La}return t.prototype.postProcessor=function(t){var e,n;t.nodeName!==E.POLYGON&&t.nodeName!==E.POLYLINE||(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(e,n))},t}(),uo=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).mixer=Oa(0,1/0),t}return s(t,i),t}(to),ho=function(){function t(){}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof _i?"unset"===n.value?"":n.value:""+n},e.postProcessor=function(t){t.nodeValue=""+t.parsedStyle.text||""},t}(),a=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i,a=r.getAttribute("text");return a&&(i=a,"capitalize"===n.value?i=a.charAt(0).toUpperCase()+a.slice(1):"lowercase"===n.value?i=a.toLowerCase():"uppercase"===n.value&&(i=a.toUpperCase()),r.parsedStyle.text=i),n.value},t}(),fo=function(){function t(){this.parser=Fa,this.mixer=Ua}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof _i?[]:n},e.postProcessor=function(t){bs(t.parsedStyle.transform,t)},t}(),po=function(){function t(){this.parser=Ea}var e=t.prototype;return e.calculator=function(t,e,n,r){return n.value},e.postProcessor=function(t){var e;t.parentNode&&(e=(t=t.parentNode).renderable,t=t.sortable,e&&(e.dirty=!0),t)&&(t.dirty=!0)},t}(),go=function(){function t(){this.registry={},this.define(E.CIRCLE,Ro),this.define(E.ELLIPSE,Wo),this.define(E.RECT,is),this.define(E.IMAGE,Xo),this.define(E.LINE,Ko),this.define(E.GROUP,Yo),this.define(E.PATH,Jo),this.define(E.POLYGON,ts),this.define(E.POLYLINE,ns),this.define(E.TEXT,os),this.define(E.HTML,qo)}var e=t.prototype;return e.define=function(t,e){this.registry[t]=e},e.get=function(t){return this.registry[t]},t}(),yo=function(){function e(t){this.type=void 0,this.eventPhase=e.prototype.NONE,this.target=void 0,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.currentTarget=void 0,this.defaultPrevented=!1,this.timeStamp=void 0,this.nativeEvent=void 0,this.originalEvent=void 0,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.manager=void 0,this.detail=void 0,this.layer=new Wr,this.page=new Wr,this.canvas=new Wr,this.viewport=new Wr,this.path=void 0,this.view=void 0,this.which=void 0,this.returnValue=void 0,this.srcElement=void 0,this.composed=!1,this.isTrusted=void 0,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}var t=e.prototype;return t.composedPath=function(){return!this.manager||this.path&&this.path[0]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},t.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},t.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},t.stopPropagation=function(){this.propagationStopped=!0},t.initEvent=function(){},t.initUIEvent=function(){},t.clone=function(){throw new Error(ai)},hi(e,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"propagationPath",get:function(){return this.composedPath()}}]),e}(),mo=function(r){function t(t,e){var n=r.call(this,null)||this;return n.type=t,n.detail=e,Object.assign(gi(n),e),n}return s(t,r),t}(yo),vo=function(){function t(){this.emitter=new Br}var e=t.prototype;return e.on=function(t,e,n){return this.addEventListener(t,e,n),this},e.addEventListener=function(t,e,n){var r,i,a,o=mn(n)&&n||on(n)&&n.capture,n=on(n)&&n.once,s=Ur(e)?void 0:e,l=!1,c="";return-1<t.indexOf(":")&&(i=(r=t.split(":"))[0],t=r[1],c=i,l=!0),t=o?t+"capture":t,e=Ur(e)?e:e.handleEvent,l&&(a=e,e=function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];(null==(t=n[0].target)?void 0:t.name)===c&&a.apply(void 0,n)}),n?this.emitter.once(t,e,s):this.emitter.on(t,e,s),this},e.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},e.removeAllEventListeners=function(){this.emitter.removeAllListeners()},e.removeEventListener=function(t,e,n){var r,n=mn(n)&&n||on(n)&&n.capture,i=Ur(e)?void 0:e;return e=Ur(e)?e:null==(r=e)?void 0:r.handleEvent,this.emitter.off(t=n?t+"capture":t,e,i),this},e.emit=function(t,e){this.dispatchEvent(new mo(t,e))},e.dispatchEvent=function(t,e){if(void 0===e&&(e=!1),!(t instanceof yo))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");var n;if(n=this.document?this:this.defaultView||(null==(n=this.ownerDocument)?void 0:n.defaultView)){if(t.manager=n.getEventService()||null,!t.manager)return!1;t.defaultPrevented=!1,t.path=[],e||(t.target=this),null!=(n=t.manager)&&n.dispatchEvent(t,t.type,e)}return!t.defaultPrevented},t}(),bo=function(i){function d(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).shadow=!1,t.ownerDocument=null,t.isConnected=!1,t.baseURI="",t.childNodes=[],t.nodeType=0,t.nodeName="",t.nodeValue=null,t.parentNode=null,t}s(d,i),d.isNode=function(t){return!!t.childNodes};var t=d.prototype;return t.getRootNode=function(t){return void 0===t&&(t={}),this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},t.hasChildNodes=function(){return 0<this.childNodes.length},t.isDefaultNamespace=function(t){throw new Error(ai)},t.lookupNamespaceURI=function(t){throw new Error(ai)},t.lookupPrefix=function(t){throw new Error(ai)},t.normalize=function(){throw new Error(ai)},t.isEqualNode=function(t){return this===t},t.isSameNode=function(t){return this.isEqualNode(t)},t.compareDocumentPosition=function(t){if(t===this)return 0;if(!(t instanceof d))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");for(var e=[i=t],n=[a=this];null!=(r=i.parentNode)?r:a.parentNode;)var r,i=i.parentNode?(e.push(i.parentNode),i.parentNode):i,a=a.parentNode?(n.push(a.parentNode),a.parentNode):a;if(i!==a)return d.DOCUMENT_POSITION_DISCONNECTED|d.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|d.DOCUMENT_POSITION_PRECEDING;var o=n.length<e.length?e:n,s=o===e?n:e;if(o[o.length-s.length]===s[0])return o===e?d.DOCUMENT_POSITION_CONTAINED_BY|d.DOCUMENT_POSITION_FOLLOWING:d.DOCUMENT_POSITION_CONTAINS|d.DOCUMENT_POSITION_PRECEDING;for(var l=o.length-s.length,c=s.length-1;0<=c;c--){var u,h=s[c],f=o[l+c];if(f!==h)return(u=h.parentNode.childNodes).indexOf(h)<u.indexOf(f)?s===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING:o===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING}return d.DOCUMENT_POSITION_FOLLOWING},t.contain=function(t){return this.contains(t)},t.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},t.getAncestor=function(t){for(var e=this;0<t&&e;)e=e.parentNode,t--;return e},t.forEach=function(e){e(this)||this.childNodes.forEach(function(t){t.forEach(e)})},hi(d,[{key:"textContent",get:function(){var t="";this.nodeName===E.TEXT&&(t+=this.style.text);for(var e=mi(this.childNodes);!(n=e()).done;){var n=n.value;n.nodeName===E.TEXT?t+=n.nodeValue:t+=n.textContent}return t},set:function(t){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)}),this.nodeName===E.TEXT&&(this.style.text=""+t)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return 0<this.childNodes.length?this.childNodes[0]:null}},{key:"lastChild",get:function(){return 0<this.childNodes.length?this.childNodes[this.childNodes.length-1]:null}}]),d}(vo),xo=(bo.DOCUMENT_POSITION_DISCONNECTED=1,bo.DOCUMENT_POSITION_PRECEDING=2,bo.DOCUMENT_POSITION_FOLLOWING=4,bo.DOCUMENT_POSITION_CONTAINS=8,bo.DOCUMENT_POSITION_CONTAINED_BY=16,bo.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,function(e){function t(){var t=e.call(this)||this;t.defaultView=null,t.documentElement=void 0,t.timeline=void 0,t.ownerDocument=null,t.nodeName="document";try{t.timeline=new w.AnimationTimeline(gi(t))}catch(t){}var r={};return Dl.forEach(function(t){var e=t.n,n=t.inh,t=t.d;n&&t&&(r[e]=Ur(t)?t(E.GROUP):t)}),t.documentElement=new Yo({id:"g-root",style:r}),t.documentElement.ownerDocument=gi(t),t.documentElement.parentNode=gi(t),t.childNodes=[t.documentElement],t}s(t,e);var n=t.prototype;return n.createElement=function(t,e){var n;return"svg"===t?this.documentElement:((n=this.defaultView.customElements.get(t))||(console.warn("Unsupported tagName: ",t),n="tspan"===t?os:Yo),(t=new n(e)).ownerDocument=this,t)},n.createElementNS=function(t,e,n){return this.createElement(e,n)},n.cloneNode=function(t){throw new Error(ai)},n.destroy=function(){try{this.documentElement.destroy(),this.timeline.destroy()}catch(t){}},n.elementsFromBBox=function(t,e,n,r){var t=this.defaultView.context.rBushRoot.search({minX:t,minY:e,maxX:n,maxY:r}),i=[];return t.forEach(function(t){var t=t.id,t=w.displayObjectPool.getByEntity(t),e=t.parsedStyle.pointerEvents,e=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(e);e&&!t.isVisible()||t.isCulled()||!t.isInteractive()||i.push(t)}),i.sort(function(t,e){return e.sortable.renderOrder-t.sortable.renderOrder}),i},n.elementFromPointSync=function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,n=n.y,i=this.defaultView.getConfig(),a=i.width,i=i.height;return r<0||n<0||a<r||i<n?null:(i=(a=this.defaultView.viewport2Client({x:r,y:n})).x,a=a.y,(t=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:t,y:e,viewportX:r,viewportY:n,clientX:i,clientY:a},picked:[]}).picked)&&t[0]||this.documentElement)},n.elementFromPoint=function(){var n=ci(M().mark(function t(e,n){var r,i,a,o,s,l;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.defaultView.canvas2Viewport({x:e,y:n}),r=i.x,i=i.y,o=this.defaultView.getConfig(),a=o.width,o=o.height,r<0||i<0||a<r||o<i)return t.abrupt("return",null);t.next=4;break;case 4:return a=this.defaultView.viewport2Client({x:r,y:i}),o=a.x,s=a.y,t.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:e,y:n,viewportX:r,viewportY:i,clientX:o,clientY:s},picked:[]});case 7:return s=t.sent,l=s.picked,t.abrupt("return",l&&l[0]||this.documentElement);case 10:case"end":return t.stop()}},t,this)}));return function(t,e){return n.apply(this,arguments)}}(),n.elementsFromPointSync=function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,n=n.y,i=this.defaultView.getConfig(),a=i.width,i=i.height;return r<0||n<0||a<r||i<n?[]:(i=(a=this.defaultView.viewport2Client({x:r,y:n})).x,a=a.y,(t=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:t,y:e,viewportX:r,viewportY:n,clientX:i,clientY:a},picked:[]}).picked)[t.length-1]!==this.documentElement&&t.push(this.documentElement),t)},n.elementsFromPoint=function(){var n=ci(M().mark(function t(e,n){var r,i,a,o,s,l;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.defaultView.canvas2Viewport({x:e,y:n}),r=i.x,i=i.y,o=this.defaultView.getConfig(),a=o.width,o=o.height,r<0||i<0||a<r||o<i)return t.abrupt("return",[]);t.next=4;break;case 4:return a=this.defaultView.viewport2Client({x:r,y:i}),o=a.x,s=a.y,t.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:e,y:n,viewportX:r,viewportY:i,clientX:o,clientY:s},picked:[]});case 7:return s=t.sent,(l=s.picked)[l.length-1]!==this.documentElement&&l.push(this.documentElement),t.abrupt("return",l);case 11:case"end":return t.stop()}},t,this)}));return function(t,e){return n.apply(this,arguments)}}(),n.appendChild=function(t,e){throw new Error(oi)},n.insertBefore=function(t,e){throw new Error(oi)},n.removeChild=function(t,e){throw new Error(oi)},n.replaceChild=function(t,e,n){throw new Error(oi)},n.append=function(){throw new Error(oi)},n.prepend=function(){throw new Error(oi)},n.getElementById=function(t){return this.documentElement.getElementById(t)},n.getElementsByName=function(t){return this.documentElement.getElementsByName(t)},n.getElementsByTagName=function(t){return this.documentElement.getElementsByTagName(t)},n.getElementsByClassName=function(t){return this.documentElement.getElementsByClassName(t)},n.querySelector=function(t){return this.documentElement.querySelector(t)},n.querySelectorAll=function(t){return this.documentElement.querySelectorAll(t)},n.find=function(t){return this.documentElement.find(t)},n.findAll=function(t){return this.documentElement.findAll(t)},hi(t,[{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}}]),t}(bo)),wo=(Qa=Qa||{},Qa[Qa.Standard=0]="Standard",(zo=y=y||{}).DESTROY="destroy",zo.ATTR_MODIFIED="DOMAttrModified",zo.INSERTED="DOMNodeInserted",zo.REMOVED="removed",zo.MOUNTED="DOMNodeInsertedIntoDocument",zo.UNMOUNTED="DOMNodeRemovedFromDocument",zo.BOUNDS_CHANGED="bounds-changed",zo.RENDER_ORDER_CHANGED="render-order-changed",zo.CULLED="culled",function(c){function t(t,e,n,r,i,a,o,s){var l=c.call(this,null)||this;return l.relatedNode=void 0,l.prevValue=void 0,l.newValue=void 0,l.attrName=void 0,l.attrChange=void 0,l.prevParsedValue=void 0,l.newParsedValue=void 0,l.relatedNode=e,l.prevValue=n,l.newValue=r,l.attrName=i,l.attrChange=a,l.prevParsedValue=o,l.newParsedValue=s,l.type=t,l}return s(t,c),t}(yo)),ko=(wo.ADDITION=2,wo.MODIFICATION=1,wo.REMOVAL=3,0),Eo=new wo(y.INSERTED,null,"","","",0,"",""),Mo=new wo(y.REMOVED,null,"","","",0,"",""),Oo=new mo(y.DESTROY),So=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).entity=ko++,t.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1,proxyNodeName:void 0},t.cullable={strategy:Qa.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},t.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:k(0,0,0),localRotation:le(0,0,0,1),localScale:k(1,1,1),localTransform:ht(),localSkew:fe(0,0),position:k(0,0,0),rotation:le(0,0,0,1),scaling:k(1,1,1),worldTransform:ht(),origin:k(0,0,0)},t.sortable={dirty:!1,sorted:void 0,lastSortedIndex:void 0,renderOrder:0},t.geometry={contentBounds:void 0,renderBounds:void 0},t.rBushNode={aabb:void 0},t.id=void 0,t.name=void 0,t.namespaceURI="g",t.scrollLeft=0,t.scrollTop=0,t.clientTop=0,t.clientLeft=0,t.destroyed=!1,t.style={},t.computedStyle={anchor:$i,opacity:$i,fillOpacity:$i,strokeOpacity:$i,fill:$i,stroke:$i,transform:$i,transformOrigin:$i,visibility:$i,pointerEvents:$i,lineWidth:$i,lineCap:$i,lineJoin:$i,increasedLineWidthForHitTesting:$i,fontSize:$i,fontFamily:$i,fontStyle:$i,fontWeight:$i,fontVariant:$i,textAlign:$i,textBaseline:$i,textTransform:$i,zIndex:$i,filter:$i,shadowType:$i},t.parsedStyle={},t.attributes={},t}s(t,i),t.isElement=function(t){return!!t.getAttribute};var e=t.prototype;return e.cloneNode=function(t){throw new Error(ai)},e.appendChild=function(t,e){if(t.destroyed)throw new Error("Cannot append a destroyed element.");return w.sceneGraphService.attach(t,this,e),null!=(e=this.ownerDocument)&&e.defaultView&&this.ownerDocument.defaultView.mountChildren(t),Eo.relatedNode=this,t.dispatchEvent(Eo),t},e.insertBefore=function(t,e){return e?(e=this.childNodes.indexOf(e),this.appendChild(t,e-1)):this.appendChild(t),t},e.replaceChild=function(t,e){var n=this.childNodes.indexOf(e);return this.removeChild(e),this.appendChild(t,n),e},e.removeChild=function(t){var e;return Mo.relatedNode=this,t.dispatchEvent(Mo),null!=(e=t.ownerDocument)&&e.defaultView&&t.ownerDocument.defaultView.unmountChildren(t),w.sceneGraphService.detach(t),t},e.removeChildren=function(){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)})},e.destroyChildren=function(){this.childNodes.slice().forEach(function(t){t.destroyChildren(),t.destroy()})},e.matches=function(t){return w.sceneGraphService.matches(t,this)},e.getElementById=function(t){return w.sceneGraphService.querySelector("#"+t,this)},e.getElementsByName=function(t){return w.sceneGraphService.querySelectorAll('[name="'+t+'"]',this)},e.getElementsByClassName=function(t){return w.sceneGraphService.querySelectorAll("."+t,this)},e.getElementsByTagName=function(t){return w.sceneGraphService.querySelectorAll(t,this)},e.querySelector=function(t){return w.sceneGraphService.querySelector(t,this)},e.querySelectorAll=function(t){return w.sceneGraphService.querySelectorAll(t,this)},e.closest=function(t){var e=this;do{if(w.sceneGraphService.matches(t,e))return e}while(null!==(e=e.parentElement));return null},e.find=function(e){var n=this,r=null;return this.forEach(function(t){return!(t===n||!e(t)||(r=t,0))}),r},e.findAll=function(e){var n=this,r=[];return this.forEach(function(t){t!==n&&e(t)&&r.push(t)}),r},e.after=function(){var r=this;if(this.parentNode){for(var i=this.parentNode.childNodes.indexOf(this),t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach(function(t,e){var n;return null==(n=r.parentNode)?void 0:n.appendChild(t,i+e+1)})}},e.before=function(){if(this.parentNode){for(var t=this.parentNode.childNodes.indexOf(this),e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0],a=n.slice(1);this.parentNode.appendChild(i,t),i.after.apply(i,a)}},e.replaceWith=function(){this.after.apply(this,arguments),this.remove()},e.append=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach(function(t){return e.appendChild(t)})},e.prepend=function(){for(var n=this,t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(function(t,e){return n.appendChild(t,e)})},e.replaceChildren=function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)},e.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},e.destroy=function(){this.dispatchEvent(Oo),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.getGeometryBounds=function(){return w.sceneGraphService.getGeometryBounds(this)},e.getRenderBounds=function(){return w.sceneGraphService.getBounds(this,!0)},e.getBounds=function(){return w.sceneGraphService.getBounds(this)},e.getLocalBounds=function(){return w.sceneGraphService.getLocalBounds(this)},e.getBoundingClientRect=function(){return w.sceneGraphService.getBoundingClientRect(this)},e.getClientRects=function(){return[this.getBoundingClientRect()]},e.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},e.getAttributeNames=function(){return Object.keys(this.attributes)},e.getAttribute=function(t){var e=this.attributes[t];return void 0===e&&(t=$r(t),e=this.attributes[t],_(e))?null:e},e.hasAttribute=function(t){return this.getAttributeNames().includes(t)},e.hasAttributes=function(){return!!this.getAttributeNames().length},e.removeAttribute=function(t){this.setAttribute(t,null),delete this.attributes[t]},e.setAttribute=function(t,e,n){this.attributes[t]=e},e.getAttributeNS=function(t,e){throw new Error(ai)},e.getAttributeNode=function(t){throw new Error(ai)},e.getAttributeNodeNS=function(t,e){throw new Error(ai)},e.hasAttributeNS=function(t,e){throw new Error(ai)},e.removeAttributeNS=function(t,e){throw new Error(ai)},e.removeAttributeNode=function(t){throw new Error(ai)},e.setAttributeNS=function(t,e,n){throw new Error(ai)},e.setAttributeNode=function(t){throw new Error(ai)},e.setAttributeNodeNS=function(t){throw new Error(ai)},e.toggleAttribute=function(t,e){throw new Error(ai)},hi(t,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(t){return""!==t})}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){var t;return this.parentNode&&(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t+1])||null}},{key:"previousSibling",get:function(){var t;return this.parentNode&&(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t-1])||null}}]),t}(bo),_o=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).altKey=void 0,t.button=void 0,t.buttons=void 0,t.ctrlKey=void 0,t.metaKey=void 0,t.relatedTarget=void 0,t.shiftKey=void 0,t.client=new Wr,t.movement=new Wr,t.offset=new Wr,t.global=new Wr,t.screen=new Wr,t}s(t,i);var e=t.prototype;return e.getModifierState=function(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)},e.initMouseEvent=function(){throw new Error(ai)},hi(t,[{key:"clientX",get:function(){return this.client.x}},{key:"clientY",get:function(){return this.client.y}},{key:"movementX",get:function(){return this.movement.x}},{key:"movementY",get:function(){return this.movement.y}},{key:"offsetX",get:function(){return this.offset.x}},{key:"offsetY",get:function(){return this.offset.y}},{key:"globalX",get:function(){return this.global.x}},{key:"globalY",get:function(){return this.global.y}},{key:"screenX",get:function(){return this.screen.x}},{key:"screenY",get:function(){return this.screen.y}}]),t}(yo),Ao=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).pointerId=void 0,t.width=0,t.height=0,t.isPrimary=!1,t.pointerType=void 0,t.pressure=void 0,t.tangentialPressure=void 0,t.tiltX=void 0,t.tiltY=void 0,t.twist=void 0,t}s(t,i);var e=t.prototype;return e.getCoalescedEvents=function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]},e.getPredictedEvents=function(){throw new Error("getPredictedEvents is not supported!")},e.clone=function(){return this.manager.clonePointerEvent(this)},t}(_o),To=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).deltaMode=void 0,t.deltaX=void 0,t.deltaY=void 0,t.deltaZ=void 0,t.DOM_DELTA_LINE=0,t.DOM_DELTA_PAGE=1,t.DOM_DELTA_PIXEL=2,t}return s(t,i),t.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},t}(_o),Po=new wo(y.ATTR_MODIFIED,null,null,null,null,wo.MODIFICATION,null,null),Lo={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:""},No={anchor:[0,0],fill:Zi,stroke:Zi,transform:[],zIndex:0,filter:[],shadowType:"outer"},Co=["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting","fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"],N=function(i){function o(t){var r=i.call(this)||this;return r.config=void 0,r.isCustomElement=!1,r.isMutationObserved=!1,r.activeAnimations=[],r.getClip=function(){return this.style.clipPath||null},r.config=t,r.config.interactive=null!=(t=r.config.capture)?t: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||E.GROUP,r.config.style=fi({},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,No,r.config.initialParsedStyle),Object.assign(r.attributes,Lo),r.initAttributes(r.config.style),r.style=new Proxy({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}}),w.displayObjectPool.add(r.entity,gi(r)),r}s(o,i);var t=o.prototype;return t.destroy=function(){i.prototype.destroy.call(this),w.displayObjectPool.remove(this.entity),this.getAnimations().forEach(function(t){t.cancel()})},t.cloneNode=function(e,t){var n,r=fi({},this.attributes);for(n in r){var i=r[n];i instanceof o&&"clipPath"!==n&&"offsetPath"!==n&&"textPath"!==n&&(r[n]=i.cloneNode(e)),t&&(r[n]=t(n,i))}var a=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:r});return a.setLocalTransform(this.getLocalTransform()),e&&this.children.forEach(function(t){t.style.isMarker||(t=t.cloneNode(e),a.appendChild(t))}),a},t.initAttributes=function(t){var e=this.renderable;w.styleValueRegistry.processProperties(this,t=void 0===t?{}:t,{forceUpdateGeometry:!0,usedAttributes:Co}),e.dirty=!0},t.setAttribute=function(t,e,n){void 0===n&&(n=!1);t=$r(t);vn(e)||!n&&e===this.attributes[t]||(this.internalSetAttribute(t,e),i.prototype.setAttribute.call(this,t,e))},t.internalSetAttribute=function(t,e,n){void 0===n&&(n={});var r=this.renderable,i=this.attributes[t],a=this.parsedStyle[t],o=(w.styleValueRegistry.processProperties(this,((o={})[t]=e,o),n),r.dirty=!0,this.parsedStyle[t]);this.isConnected&&(Po.relatedNode=this,Po.prevValue=i,Po.newValue=e,Po.attrName=t,Po.prevParsedValue=a,Po.newParsedValue=o,this.isMutationObserved?this.dispatchEvent(Po):(Po.target=this).ownerDocument.defaultView.dispatchEvent(Po,!0)),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(t,i,e,a,o)},t.getBBox=function(){var t=this.getBounds(),e=t.getMin(),n=e[0],e=e[1],t=t.getMax(),r=t[0],t=t[1];return new Vr(n,e,r-n,t-e)},t.setOrigin=function(t,e,n){return w.sceneGraphService.setOrigin(this,ls(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.getOrigin=function(){return w.sceneGraphService.getOrigin(this)},t.setPosition=function(t,e,n){return w.sceneGraphService.setPosition(this,ls(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.setLocalPosition=function(t,e,n){return w.sceneGraphService.setLocalPosition(this,ls(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.translate=function(t,e,n){return w.sceneGraphService.translate(this,ls(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.translateLocal=function(t,e,n){return w.sceneGraphService.translateLocal(this,ls(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.getPosition=function(){return w.sceneGraphService.getPosition(this)},t.getLocalPosition=function(){return w.sceneGraphService.getLocalPosition(this)},t.scale=function(t,e,n){return this.scaleLocal(t,e,n)},t.scaleLocal=function(t,e,n){return"number"==typeof t&&(t=ls(t,e=e||t,n=n||t)),w.sceneGraphService.scaleLocal(this,t),this},t.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=ls(t,e=e||t,n=n||t)),w.sceneGraphService.setLocalScale(this,t),this},t.getLocalScale=function(){return w.sceneGraphService.getLocalScale(this)},t.getScale=function(){return w.sceneGraphService.getScale(this)},t.getEulerAngles=function(){return us(hs(m(),w.sceneGraphService.getWorldTransform(this))[2])},t.getLocalEulerAngles=function(){return us(hs(m(),w.sceneGraphService.getLocalRotation(this))[2])},t.setEulerAngles=function(t){return w.sceneGraphService.setEulerAngles(this,0,0,t),this},t.setLocalEulerAngles=function(t){return w.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},t.rotateLocal=function(t,e,n){return _(e)&&_(n)?w.sceneGraphService.rotateLocal(this,0,0,t):w.sceneGraphService.rotateLocal(this,t,e,n),this},t.rotate=function(t,e,n){return _(e)&&_(n)?w.sceneGraphService.rotate(this,0,0,t):w.sceneGraphService.rotate(this,t,e,n),this},t.setRotation=function(t,e,n,r){return w.sceneGraphService.setRotation(this,t,e,n,r),this},t.setLocalRotation=function(t,e,n,r){return w.sceneGraphService.setLocalRotation(this,t,e,n,r),this},t.setLocalSkew=function(t,e){return w.sceneGraphService.setLocalSkew(this,t,e),this},t.getRotation=function(){return w.sceneGraphService.getRotation(this)},t.getLocalRotation=function(){return w.sceneGraphService.getLocalRotation(this)},t.getLocalSkew=function(){return w.sceneGraphService.getLocalSkew(this)},t.getLocalTransform=function(){return w.sceneGraphService.getLocalTransform(this)},t.getWorldTransform=function(){return w.sceneGraphService.getWorldTransform(this)},t.setLocalTransform=function(t){return w.sceneGraphService.setLocalTransform(this,t),this},t.resetLocalTransform=function(){w.sceneGraphService.resetLocalTransform(this)},t.getAnimations=function(){return this.activeAnimations},t.animate=function(t,e){var n=null==(n=this.ownerDocument)?void 0:n.timeline;return n?n.play(this,t,e):null},t.isVisible=function(){var t;return"visible"===(null==(t=this.parsedStyle)?void 0:t.visibility)},t.isInteractive=function(){var t;return"none"!==(null==(t=this.parsedStyle)?void 0:t.pointerEvents)},t.isCulled=function(){return!(!this.cullable||!this.cullable.enable||this.cullable.visible)},t.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,this.parentNode.children.map(function(t){return Number(t.style.zIndex)}))+1),this},t.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,this.parentNode.children.map(function(t){return Number(t.style.zIndex)}))-1),this},t.getConfig=function(){return this.config},t.attr=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],a=n[1];return i?on(i)?(Object.keys(i).forEach(function(t){e.setAttribute(t,i[t])}),this):2===n.length?(this.setAttribute(i,a),this):this.attributes[i]:this.attributes},t.getMatrix=function(t){var t=t||this.getWorldTransform(),e=_t(m(),t),n=e[0],e=e[1],r=At(m(),t),i=r[0],r=r[1],t=Tt(re(),t),t=hs(m(),t),a=t[0],t=t[2],o=(a=a||t,t=n,n=e,e=i,i=r,r=Math.cos(a),a=Math.sin(a),e*r),s=i*a,l=0,e=-e*a,a=i*r,i=0,r=t,t=n,n=1,c=new lt(9);return c[0]=o,c[1]=s,c[2]=l,c[3]=e,c[4]=a,c[5]=i,c[6]=r,c[7]=t,c[8]=n,c},t.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},t.setMatrix=function(t){var t=fs(t),e=t[0],n=t[1],r=t[2],i=t[3],t=t[4];this.setEulerAngles(t).setPosition(e,n).setLocalScale(r,i)},t.setLocalMatrix=function(t){var t=fs(t),e=t[0],n=t[1],r=t[2],i=t[3],t=t[4];this.setLocalEulerAngles(t).setLocalPosition(e,n).setLocalScale(r,i)},t.show=function(){this.style.visibility="visible"},t.hide=function(){this.style.visibility="hidden"},t.getCount=function(){return this.childElementCount},t.getParent=function(){return this.parentElement},t.getChildren=function(){return this.children},t.getFirst=function(){return this.firstElementChild},t.getLast=function(){return this.lastElementChild},t.getChildByIndex=function(t){return this.children[t]||null},t.add=function(t,e){return this.appendChild(t,e)},t.setClip=function(t){this.style.clipPath=t},t.set=function(t,e){this.config[t]=e},t.get=function(t){return this.config[t]},t.moveTo=function(t,e,n){return this.setPosition(t,e=void 0===e?0:e,n=void 0===n?0:n),this},t.move=function(t,e,n){return this.setPosition(t,e=void 0===e?0:e,n=void 0===n?0:n),this},t.setZIndex=function(t){return this.style.zIndex=t,this},hi(o,[{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}}]),o}(So),jo=["style"],Ro=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=pi(t,jo);return n.call(this,fi({type:E.CIRCLE,style:fi({cx:"",cy:"",r:""},e),initialParsedStyle:{anchor:[.5,.5]}},t))||this}return s(t,n),t}(N),Fo=["style"],Io=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=pi(t,Fo),e=n.call(this,fi({style:fi({x:"",y:""},e)},t))||this;return e.isCustomElement=!0,e}return s(t,n),t}(N),Bo={},Do=[],zo=function(){function t(){}var e=t.prototype;return e.getByEntity=function(t){return Bo[t]},e.getAll=function(){return Object.keys(Bo).map(function(t){return Bo[t]})},e.add=function(t,e){(Bo[t]=e).nodeName===E.HTML&&Do.push(e)},e.remove=function(t){var e=Bo[t];e&&(delete Bo[t],e.nodeName===E.HTML)&&(t=Do.indexOf(e),Do.splice(t,1))},e.getHTMLs=function(){return Do},t}(),Go=["style"],Wo=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=pi(t,Go);return n.call(this,fi({type:E.ELLIPSE,style:fi({cx:"",cy:"",rx:"",ry:""},e),initialParsedStyle:{anchor:[.5,.5]}},t))||this}return s(t,n),t}(N),Vo=["style"],Yo=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=pi(t,Vo);return n.call(this,fi({type:E.GROUP,style:fi({x:"",y:"",width:"",height:""},e)},t))||this}return s(t,n),t}(N),Ho=["style"],qo=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=pi(t,Ho),e=n.call(this,fi({type:E.HTML,style:fi({x:"",y:"",width:"auto",height:"auto",innerHTML:""},e)},t))||this;return e.cullable.enable=!1,e}s(t,n);var e=t.prototype;return e.getDomElement=function(){return this.parsedStyle.$el},e.getBoundingClientRect=function(){return this.parsedStyle.$el.getBoundingClientRect()},e.getClientRects=function(){return[this.getBoundingClientRect()]},e.getBounds=function(){var t,e,n=this.getBoundingClientRect(),r=null==(r=this.ownerDocument)||null==(r=r.defaultView)?void 0:r.getContextService().getBoundingClientRect();return r?(t=n.left-r.left,r=n.top-r.top,(e=new Dr).setMinMax(k(t,r,0),k(t+n.width,r+n.height,0)),e):null},e.getLocalBounds=function(){if(this.parentNode){var t,e=mt(ht(),this.parentNode.getWorldTransform()),n=this.getBounds();if(!Dr.isEmpty(n))return(t=new Dr).setFromTransformedAABB(n,e),t}return this.getBounds()},t}(N),Uo=["style"],Xo=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=pi(t,Uo);return n.call(this,fi({type:E.IMAGE,style:fi({x:"",y:"",img:"",width:"",height:""},e)},t))||this}return s(t,n),t}(N),$o=["style"],Ko=function(r){function t(t){var t=void 0===t?{}:t,e=t.style,t=pi(t,$o),e=r.call(this,fi({type:E.LINE,style:fi({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0,isBillboard:!1},e)},t))||this,t=(e.markerStartAngle=0,e.markerEndAngle=0,e.parsedStyle),n=t.markerStart,t=t.markerEnd;return n&&n instanceof N&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&t instanceof N&&(e.markerEndAngle=t.getLocalEulerAngles(),e.appendChild(t)),e.transformMarker(!0),e.transformMarker(!1),e}s(t,r);var e=t.prototype;return e.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&&r instanceof N&&(this.markerStartAngle=0,r.remove()),i&&i instanceof N&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&r instanceof N&&(this.markerEndAngle=0,r.remove()),i)&&i instanceof N&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))},e.transformMarker=function(t){var e,n,r,i,a,o=this.parsedStyle,s=o.markerStart,l=o.markerEnd,c=o.markerStartOffset,u=o.markerEndOffset,h=o.x1,f=o.x2,d=o.y1,p=o.y2,g=o.defX,o=o.defY,s=t?s:l;s&&s instanceof N&&(l=0,t=t?(r=h-g,i=d-o,e=f-h,n=p-d,a=c||0,this.markerStartAngle):(r=f-g,i=p-o,e=h-f,n=d-p,a=u||0,this.markerEndAngle),l=Math.atan2(n,e),s.setLocalEulerAngles(180*l/Math.PI+t),s.setLocalPosition(r+Math.cos(l)*a,i+Math.sin(l)*a))},e.getPoint=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.x1,i=n.y1,a=n.x2,o=n.y2,s=n.defX,n=n.defY,r=sr.pointAt(r,i,a,o,t),i=r.x,a=r.y,o=$t(m(),k(i-s,a-n,0),e?this.getWorldTransform():this.getLocalTransform());return new Wr(o[0],o[1])},e.getPointAtLength=function(t,e){return void 0===e&&(e=!1),this.getPoint(t/this.getTotalLength(),e)},e.getTotalLength=function(){var t=this.parsedStyle,e=t.x1,n=t.y1,r=t.x2,t=t.y2;return sr.length(e,n,r,t)},t}(N),Zo=["style"],Jo=function(i){function t(t){var t=void 0===t?{}:t,e=t.style,t=pi(t,Zo),e=i.call(this,fi({type:E.PATH,style:fi({path:"",miterLimit:""},e)},t))||this,t=(e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[],e.parsedStyle),n=t.markerStart,r=t.markerEnd,t=t.markerMid;return n&&n instanceof N&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&t instanceof N&&e.placeMarkerMid(t),r&&r instanceof N&&(e.markerEndAngle=r.getLocalEulerAngles(),e.appendChild(r)),e.transformMarker(!0),e.transformMarker(!1),e}s(t,i);var e=t.prototype;return e.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&&r instanceof N&&(this.markerStartAngle=0,r.remove()),i&&i instanceof N&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&r instanceof N&&(this.markerEndAngle=0,r.remove()),i&&i instanceof N&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.transformMarker=function(t){var e,n,r,i,a,o=this.parsedStyle,s=o.markerStart,l=o.markerEnd,c=o.markerStartOffset,u=o.markerEndOffset,h=o.defX,o=o.defY,s=t?s:l;s&&s instanceof N&&(l=0,h=t?(i=(t=this.getStartTangent())[0],e=(t=t[1])[0]-h,n=t[1]-o,r=i[0]-t[0],i=i[1]-t[1],a=c||0,this.markerStartAngle):(c=(t=this.getEndTangent())[0],e=(t=t[1])[0]-h,n=t[1]-o,r=c[0]-t[0],i=c[1]-t[1],a=u||0,this.markerEndAngle),l=Math.atan2(i,r),s.setLocalEulerAngles(180*l/Math.PI+h),s.setLocalPosition(e+Math.cos(l)*a,n+Math.sin(l)*a))},e.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&&t instanceof N)for(var a=1;a<n.length-1;a++){var o=n[a].currentPoint,s=o[0],o=o[1],l=1===a?t:t.cloneNode(!0);this.markerMidList.push(l),this.appendChild(l),l.setLocalPosition(s-r,o-i)}},e.getTotalLength=function(){return Vs(this)},e.getPointAtLength=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.defX,i=n.defY,n=Ze(n.path.absolutePath,t,v(v({},a),{bbox:!1,length:!0})).point,t=n.x,a=n.y,n=$t(m(),k(t-r,a-i,0),e?this.getWorldTransform():this.getLocalTransform());return new Wr(n[0],n[1])},e.getPoint=function(t,e){return void 0===e&&(e=!1),this.getPointAtLength(t*Vs(this),e)},e.getStartTangent=function(){var t,e,n=this.parsedStyle.path.segments,r=[];return 1<n.length&&(t=n[0].currentPoint,e=n[1].currentPoint,r=[],(n=n[1].startTangent)?r.push([t[0]-n[0],t[1]-n[1]]):r.push([e[0],e[1]]),r.push([t[0],t[1]])),r},e.getEndTangent=function(){var t,e,n=this.parsedStyle.path.segments,r=n.length,i=[];return 1<r&&(t=n[r-2].currentPoint,e=n[r-1].currentPoint,i=[],(n=n[r-1].endTangent)?i.push([e[0]-n[0],e[1]-n[1]]):i.push([t[0],t[1]]),i.push([e[0],e[1]])),i},t}(N),Qo=["style"],ts=function(i){function t(t){var t=void 0===t?{}:t,e=t.style,t=pi(t,Qo),e=i.call(this,fi({type:E.POLYGON,style:fi({points:"",miterLimit:"",isClosed:!0},e)},t))||this,t=(e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[],e.parsedStyle),n=t.markerStart,r=t.markerEnd,t=t.markerMid;return n&&n instanceof N&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&t instanceof N&&e.placeMarkerMid(t),r&&r instanceof N&&(e.markerEndAngle=r.getLocalEulerAngles(),e.appendChild(r)),e.transformMarker(!0),e.transformMarker(!1),e}s(t,i);var e=t.prototype;return e.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&&r instanceof N&&(this.markerStartAngle=0,r.remove()),i&&i instanceof N&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&r instanceof N&&(this.markerEndAngle=0,r.remove()),i&&i instanceof N&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.transformMarker=function(t){var e,n,r,i,a,o=this.parsedStyle,s=o.markerStart,l=o.markerEnd,c=o.markerStartOffset,u=o.markerEndOffset,h=o.points.points,f=o.defX,o=o.defY,s=t?s:l;s&&s instanceof N&&(i=h[l=0][0]-f,a=h[0][1]-o,c=t?(e=h[1][0]-h[0][0],n=h[1][1]-h[0][1],r=c||0,this.markerStartAngle):(t=h.length,n=this.style.isClosed?(e=h[t-1][0]-h[0][0],h[t-1][1]-h[0][1]):(i=h[t-1][0]-f,a=h[t-1][1]-o,e=h[t-2][0]-h[t-1][0],h[t-2][1]-h[t-1][1]),r=u||0,this.markerEndAngle),l=Math.atan2(n,e),s.setLocalEulerAngles(180*l/Math.PI+c),s.setLocalPosition(i+Math.cos(l)*r,a+Math.sin(l)*r))},e.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.points.points,r=e.defX,i=e.defY;if(this.markerMidList.forEach(function(t){t.remove()}),this.markerMidList=[],t&&t instanceof N)for(var a=1;a<(this.style.isClosed?n.length:n.length-1);a++){var o=n[a][0]-r,s=n[a][1]-i,l=1===a?t:t.cloneNode(!0);this.markerMidList.push(l),this.appendChild(l),l.setLocalPosition(o,s)}},t}(N),es=["style"],ns=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=pi(t,es);return n.call(this,fi({type:E.POLYLINE,style:fi({points:"",miterLimit:"",isClosed:!1},e)},t))||this}s(t,n);var e=t.prototype;return e.getTotalLength=function(){return this.parsedStyle.points.totalLength},e.getPointAtLength=function(t,e){return void 0===e&&(e=!1),this.getPoint(t/this.getTotalLength(),e)},e.getPoint=function(n,t){void 0===t&&(t=!1);var e=this.parsedStyle,r=e.defX,i=e.defY,e=e.points,a=e.points,e=e.segments,o=0,s=0,e=(e.forEach(function(t,e){n>=t[0]&&n<=t[1]&&(o=(n-t[0])/(t[1]-t[0]),s=e)}),sr.pointAt(a[s][0],a[s][1],a[s+1][0],a[s+1][1],o)),a=e.x,e=e.y,a=$t(m(),k(a-r,e-i,0),t?this.getWorldTransform():this.getLocalTransform());return new Wr(a[0],a[1])},e.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.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},t}(ts),rs=["style"],is=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=pi(t,rs);return n.call(this,fi({type:E.RECT,style:fi({x:"",y:"",width:"",height:"",radius:""},e)},t))||this}return s(t,n),t}(N),as=["style"],os=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=pi(t,as);return n.call(this,fi({type:E.TEXT,style:fi({x:"",y:"",text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",letterSpacing:"",lineHeight:"",miterLimit:"",wordWrap:!1,wordWrapWidth:0,leading:0,dx:"",dy:""},e)},t))||this}s(t,n);var e=t.prototype;return e.getComputedTextLength=function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.maxLineWidth)||0},e.getLineBoundingRects=function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.lineMetrics)||[]},e.isOverflowing=function(){return!!this.parsedStyle.isOverflowing},t}(N);function ss(t){return void 0===t?0:360<t||t<-360?t%360:t}function ls(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),pn(t)?k(t,e,n):Array.isArray(t)&&3===t.length?Bt(t):k(t[0],t[1]||e,t[2]||n)}function cs(t){return t*(Math.PI/180)}function us(t){return t*(180/Math.PI)}function hs(t,e){return 16===e.length?(n=t,r=e,o=.5*Math.PI,s=(c=At(m(),r))[0],l=c[1],c=c[2],(u=Math.asin(-r[2]/s))<o?-o<u?(i=Math.atan2(r[6]/l,r[10]/c),a=Math.atan2(r[1]/s,r[0]/s)):(a=0,i=-Math.atan2(r[4]/l,r[5]/l)):(a=0,i=Math.atan2(r[4]/l,r[5]/l)),n[0]=i,n[1]=u,n[2]=a,n):(o=t,s=(c=e)[0],r=c[1],l=c[2],c=c[3],.499995*(n=s*s+(i=r*r)+(u=l*l)+(a=c*c))<(t=s*c-r*l)?(o[0]=Math.PI/2,o[1]=2*Math.atan2(r,s),o[2]=0):t<-.499995*n?(o[0]=-Math.PI/2,o[1]=2*Math.atan2(r,s),o[2]=0):(o[0]=Math.asin(2*(s*l-c*r)),o[1]=Math.atan2(2*(s*c+r*l),1-2*(u+a)),o[2]=Math.atan2(2*(s*r+l*c),1-2*(i+u))),o);var n,r,i,a,o,s,l,c,u}function fs(t){var e=t[0],n=t[1],r=t[3],i=t[4],a=Math.sqrt(e*e+n*n),o=Math.sqrt(r*r+i*i);e*i-n*r<0&&(e<i?a=-a:o=-o),a&&(e*=1/a,n*=1/a);r=us(Math.atan2(n,e));return[t[6],t[7],a,o,r]}var ds=ht(),ps=ht(),gs=ee(),d=[m(),m(),m()],ys=m();function ms(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 vs=ht();function bs(t,l){var c,u;return t&&t.length&&(u=c=0,l?(c=l.parsedStyle.defX||0,u=l.parsedStyle.defY||0,l.resetLocalTransform(),l.setLocalPosition(c,u)):l=new N({}),t.forEach(function(t){var e,n,r,i,a,o,s=t.t,t=t.d;"scale"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1],l.scaleLocal(o[0],o[1],1)):"scalex"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(o[0],1,1)):"scaley"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,o[0],1)):"scalez"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,1,o[0])):"scale3d"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1,1],l.scaleLocal(o[0],o[1],o[2])):"translate"===s?(o=t||[Hi,Hi],l.translateLocal(o[0].value,o[1].value,0)):"translatex"===s?(o=t||[Hi],l.translateLocal(o[0].value,0,0)):"translatey"===s?(o=t||[Hi],l.translateLocal(0,o[0].value,0)):"translatez"===s?(o=t||[Hi],l.translateLocal(0,0,o[0].value)):"translate3d"===s?(o=t||[Hi,Hi,Hi],l.translateLocal(o[0].value,o[1].value,o[2].value)):"rotate"===s?(o=t||[qi],l.rotateLocal(0,0,o[0].value)):"rotatex"===s?(o=t||[qi],l.rotateLocal(o[0].value,0,0)):"rotatey"===s?(o=t||[qi],l.rotateLocal(0,o[0].value,0)):"rotatez"===s?(o=t||[qi],l.rotateLocal(0,0,o[0].value)):"rotate3d"!==s&&("skew"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0,0],l.setLocalSkew(cs(o[0]),cs(o[1]))):"skewx"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(cs(o[0]),l.getLocalSkew()[1])):"skewy"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(l.getLocalSkew()[0],cs(o[0]))):"matrix"===s?(e=(o=t.map(function(t){return t.value}))[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],l.setLocalTransform(pt(vs,e,n,0,0,r,i,0,0,0,0,1,0,a+c,o+u,0,1))):"matrix3d"===s&&(pt.apply(It,[vs].concat(t.map(function(t){return t.value}))),vs[12]+=c,vs[13]+=u,l.setLocalTransform(vs)))})),l.getLocalTransform()}xs={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]+\.?))/},ws="";var xs,ws,ks=function(t){return ws=t,Ms()};function Es(t){throw new Error(ws+": "+t)}function Ms(){var t=js(Os);return 0<ws.length&&Es("Invalid input not EOF"),t}function Os(){return Ss("linear-gradient",xs.linearGradient,As)||Ss("repeating-linear-gradient",xs.repeatingLinearGradient,As)||Ss("radial-gradient",xs.radialGradient,Ts)||Ss("repeating-radial-gradient",xs.repeatingRadialGradient,Ts)||Ss("conic-gradient",xs.conicGradient,Ts)}function Ss(n,t,r){return _s(t,function(t){var e=r();return e&&!Gs(xs.comma)&&Es("Missing comma before color stops"),{type:n,orientation:e,colorStops:js(Rs)}})}function _s(t,e){t=Gs(t);if(t)return Gs(xs.startCall)||Es("Missing ("),e=e(t),Gs(xs.endCall)||Es("Missing )"),e}function As(){return zs("directional",xs.sideOrCorner,1)||zs("angular",xs.angleValue,1)}function Ts(){var t,e,n=Ps();return n&&((t=[]).push(n),e=ws,Gs(xs.comma))&&((n=Ps())?t.push(n):ws=e),t}function Ps(){var t,e=function(){var t=zs("shape",/^(circle)/i,0);t&&(t.style=Ds()||Ls());return t}()||function(){var t=zs("shape",/^(ellipse)/i,0);t&&(t.style=Is()||Ls());return t}();return e?e.at=Ns():(t=Ls())?(e=t,(t=Ns())&&(e.at=t)):(t=Cs())&&(e={type:"default-radial",at:t}),e}function Ls(){return zs("extent-keyword",xs.extentKeywords,1)}function Ns(){var t;if(zs("position",/^at/,0))return(t=Cs())||Es("Missing positioning value"),t}function Cs(){var t={x:Is(),y:Is()};if(t.x||t.y)return{type:"position",value:t}}function js(t){var e=t(),n=[];if(e)for(n.push(e);Gs(xs.comma);)(e=t())?n.push(e):Es("One extra comma");return n}function Rs(){var t=zs("hex",xs.hexColor,1)||_s(xs.rgbaColor,function(){return{type:"rgba",value:js(Fs)}})||_s(xs.rgbColor,function(){return{type:"rgb",value:js(Fs)}})||zs("literal",xs.literalColor,0);return t||Es("Expected color definition"),t.length=Is(),t}function Fs(){return Gs(xs.number)[1]}function Is(){return zs("%",xs.percentageValue,1)||Bs()||Ds()}function Bs(){return zs("position-keyword",xs.positionKeywords,1)}function Ds(){return zs("px",xs.pixelValue,1)||zs("em",xs.emValue,1)}function zs(t,e,n){e=Gs(e);if(e)return{type:t,value:e[n]}}function Gs(t){var e=/^[\n\r\t\s]+/.exec(ws),e=(e&&Ws(e[0].length),t.exec(ws));return e&&Ws(e[0].length),e}function Ws(t){ws=ws.substring(t)}function Vs(t){var e;return 0===t.parsedStyle.path.totalLength&&(t.parsedStyle.path.totalLength=Ze(t.parsedStyle.path.absolutePath,void 0,v(v({},e),{bbox:!1,length:!0})).length),t.parsedStyle.path.totalLength}function Ys(t,e){return t[0]===e[0]&&t[1]===e[1]}function Hs(t,e){var n,r=t.prePoint,i=t.currentPoint,t=t.nextPoint,a=Math.pow(i[0]-r[0],2)+Math.pow(i[1]-r[1],2),o=Math.pow(i[0]-t[0],2)+Math.pow(i[1]-t[1],2),r=Math.pow(r[0]-t[0],2)+Math.pow(r[1]-t[1],2),r=Math.acos((a+o-r)/(2*Math.sqrt(a)*Math.sqrt(o)));return!r||0===Math.sin(r)||(void(a=0)===n&&(n=1e-5),Math.abs(r-a)<n)?{xExtra:0,yExtra:0}:(o=Math.abs(Math.atan2(t[1]-i[1],t[0]-i[0])),a=Math.abs(Math.atan2(t[0]-i[0],t[1]-i[1])),o=o>Math.PI/2?Math.PI-o:o,a=a>Math.PI/2?Math.PI-a:a,{xExtra:Math.cos(r/2-o)*(e/2*(1/Math.sin(r/2)))-e/2||0,yExtra:Math.cos(a-r/2)*(e/2*(1/Math.sin(r/2)))-e/2||0})}function qs(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function Us(t,e,n,r,i,a,o,s){var l,c,u;return e=Math.abs(e),n=Math.abs(n),r=cs(r=gn(r,360)),t.x===o.x&&t.y===o.y?{x:t.x,y:t.y,ellipticalArcAngle:0}:0===e||0===n?{x:0,y:0,ellipticalArcAngle:0}:(u=(t.x-o.x)/2,c=(t.y-o.y)/2,u={x:Math.cos(r)*u+Math.sin(r)*c,y:-Math.sin(r)*u+Math.cos(r)*c},1<(c=Math.pow(u.x,2)/Math.pow(e,2)+Math.pow(u.y,2)/Math.pow(n,2))&&(e=Math.sqrt(c)*e,n=Math.sqrt(c)*n),c=(c=(Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(u.y,2)-Math.pow(n,2)*Math.pow(u.x,2))/(Math.pow(e,2)*Math.pow(u.y,2)+Math.pow(n,2)*Math.pow(u.x,2)))<0?0:c,i=(i!==a?1:-1)*Math.sqrt(c),c=e*u.y/n*i,i*=-n*u.x/e,t={x:Math.cos(r)*c-Math.sin(r)*i+(t.x+o.x)/2,y:Math.sin(r)*c+Math.cos(r)*i+(t.y+o.y)/2},l=Xs({x:1,y:0},o={x:(u.x-c)/e,y:(u.y-i)/n}),o=Xs(o,{x:(-u.x-c)/e,y:(-u.y-i)/n}),!a&&0<o?o-=2*Math.PI:a&&o<0&&(o+=2*Math.PI),c=l+(o%=2*Math.PI)*s,u=e*Math.cos(c),i=n*Math.sin(c),{x:Math.cos(r)*u-Math.sin(r)*i+t.x,y:Math.sin(r)*u+Math.cos(r)*i+t.y,ellipticalArcStartAngle:l,ellipticalArcEndAngle:l+o,ellipticalArcAngle:c,ellipticalArcCenter:t,resultantRx:e,resultantRy:n})}var Xs=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)};function $s(t,e,n){void 0===n&&(n=!0);var r=t.arcParams,i=r.rx,i=void 0===i?0:i,a=r.ry,a=void 0===a?0:a,o=r.xRotation,s=r.arcFlag,r=r.sweepFlag,l=Us({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},e),i=Us({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},n?e+.005:e-.005),a=i.x-l.x,o=i.y-l.y,s=Math.sqrt(a*a+o*o);return{x:-a/s,y:-o/s}}function Ks(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Zs(t,e){return Ks(t)*Ks(e)?(t[0]*e[0]+t[1]*e[1])/(Ks(t)*Ks(e)):1}function Js(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Zs(t,e))}function Qs(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,a=t*i,i=e*i,o=n-t,t=n+t,s=r-e,e=r+e;return[["M",o,r],["C",o,r-i,n-a,s,n,s],["C",n+a,s,t,r-i,t,r],["C",t,r+i,n+a,e,n,e],["C",n-a,e,o,r+i,o,r],["Z"]]}function tl(t,e){void 0===e&&(e=t.getLocalTransform());var n,r,i,a,o,s,l,c,u,h,f,d=[];switch(t.nodeName){case E.LINE:var p=t.parsedStyle,d=[["M",p.x1,p.y1],["L",p.x2,p.y2]];break;case E.CIRCLE:var p=t.parsedStyle,g=p.r;d=Qs(g,g,p.cx,p.cy);break;case E.ELLIPSE:var g=t.parsedStyle;d=Qs(g.rx,g.ry,g.cx,g.cy);break;case E.POLYLINE:case E.POLYGON:p=t.parsedStyle.points;g=p.points,p=t.nodeName===E.POLYGON,g=g.map(function(t,e){return[0===e?"M":"L",t[0],t[1]]}),p&&g.push(["Z"]),d=g;break;case E.RECT:var y=t.parsedStyle,m=y.width,v=y.height,b=y.x,x=y.y,y=y.radius,w=y&&y.some(function(t){return 0!==t});n=m,r=v,b=b,x=x,d=(w=w&&y.map(function(t){return dn(t,0,Math.min(Math.abs(m)/2,Math.abs(v)/2))}))?(s=(y=0<n?1:-1)+(o=0<r?1:-1)!=0?1:0,[["M",y*(i=w[0])+b,x],["L",n-y*(a=w[1])+b,x],a?["A",a,a,0,0,s,n+b,o*a+x]:null,["L",n+b,r-o*(a=w[2])+x],a?["A",a,a,0,0,s,n+b-y*a,r+x]:null,["L",b+y*(a=w[3]),r+x],a?["A",a,a,0,0,s,b,r+x-o*a]:null,["L",b,o*i+x],i?["A",i,i,0,0,s,y*i+b,x]:null,["Z"]].filter(function(t){return t})):[["M",b,x],["L",b+n,x],["L",b+n,x+r],["L",b,x+r],["Z"]];break;case E.PATH:w=t.parsedStyle.path.absolutePath;d=[].concat(w)}if(d.length)return l=d,c=e,u=(e=(e=t).parsedStyle).defX,h=void 0===u?0:u,f=void 0===(u=e.defY)?0:u,l.reduce(function(t,e){var n,r,i,a="";return"M"===e[0]||"L"===e[0]?(n=k(e[1]-h,e[2]-f,0),c&&$t(n,n,c),a=""+e[0]+n[0]+","+n[1]):"Z"===e[0]?a=e[0]:"C"===e[0]?(n=k(e[1]-h,e[2]-f,0),r=k(e[3]-h,e[4]-f,0),i=k(e[5]-h,e[6]-f,0),c&&($t(n,n,c),$t(r,r,c),$t(i,i,c)),a=""+e[0]+n[0]+","+n[1]+","+r[0]+","+r[1]+","+i[0]+","+i[1]):"A"===e[0]?(n=k(e[6]-h,e[7]-f,0),c&&$t(n,n,c),a=""+e[0]+e[1]+","+e[2]+","+e[3]+","+e[4]+","+e[5]+","+n[0]+","+n[1]):"Q"===e[0]&&(r=k(e[1]-h,e[2]-f,0),i=k(e[3]-h,e[4]-f,0),c&&($t(r,r,c),$t(i,i,c)),a=""+e[0]+e[1]+","+e[2]+","+e[3]+","+e[4]+"}"),t+a},"")}function el(t,e,n){var r=!1,i=!1,e=!!e&&!e.isNone,n=!!n&&!n.isNone;return"visiblepainted"===t||"painted"===t||"auto"===t?(r=e,i=n):"visiblefill"===t||"fill"===t?r=!0:"visiblestroke"===t||"stroke"===t?i=!0:"visible"!==t&&"all"!==t||(i=r=!0),[r,i]}function nl(){return this.call=this._createCall("sync"),this.call.apply(this,arguments)}function rl(){return this.callAsync=this._createCall("async"),this.callAsync.apply(this,arguments)}function il(){return this.promise=this._createCall("promise"),this.promise.apply(this,arguments)}function al(t){return pl.setup(this,t),pl.create(t)}function ol(t){return yl.setup(this,t),yl.create(t)}function sl(){throw new Error("tapAsync is not supported on a SyncHook")}function ll(){throw new Error("tapPromise is not supported on a SyncHook")}function cl(t){return vl.setup(this,t),vl.create(t)}function ul(){throw new Error("tapAsync is not supported on a SyncWaterfallHook")}function hl(){throw new Error("tapPromise is not supported on a SyncWaterfallHook")}function fl(t){return xl.setup(this,t),xl.create(t)}var o=function(){function t(t,e){void 0===t&&(t=[]),void 0===e&&(e=void 0),this.name=void 0,this.taps=void 0,this.promise=void 0,this._promise=void 0,this._args=t,this.name=e,this.taps=[],this.interceptors=[],this._call=nl,this.call=nl,this._callAsync=rl,this.callAsync=rl,this._promise=il,this.promise=il,this._x=void 0}var e=t.prototype;return e.compile=function(t){throw new Error("Abstract: should be overridden")},e._createCall=function(t){return this.compile({taps:this.taps,interceptors:this.interceptors,args:this._args,type:t})},e._tap=function(t,e,n){if("string"==typeof e)e={name:e.trim()};else if("object"!=typeof e||null===e)throw new Error("Invalid tap options");if("string"!=typeof e.name||""===e.name)throw new Error("Missing name for tap");e=Object.assign({type:t,fn:n},e),e=this._runRegisterInterceptors(e),this._insert(e)},e.tap=function(t,e){this._tap("sync",t,e)},e.tapAsync=function(t,e){this._tap("async",t,e)},e.tapPromise=function(t,e){this._tap("promise",t,e)},e._runRegisterInterceptors=function(t){for(var e=mi(this.interceptors);!(n=e()).done;){var n=n.value;n.register&&void 0!==(n=n.register(t))&&(t=n)}return t},e.withOptions=function(e){function n(t){return Object.assign({},e,"string"==typeof t?{name:t}:t)}var r=this;return{name:this.name,tap:function(t,e){return r.tap(n(t),e)},tapAsync:function(t,e){return r.tapAsync(n(t),e)},tapPromise:function(t,e){return r.tapPromise(n(t),e)},isUsed:function(){return r.isUsed()},withOptions:function(t){return r.withOptions(n(t))}}},e.isUsed=function(){return 0<this.taps.length||0<this.interceptors.length},e._resetCompilation=function(){this.call=this._call,this.callAsync=this._callAsync,this.promise=this._promise},e._insert=function(t){this._resetCompilation(),"string"==typeof t.before?e=new Set([t.before]):Array.isArray(t.before)&&(e=new Set(t.before));for(var e,n=0,r=("number"==typeof t.stage&&(n=t.stage),this.taps.length);0<r;){r--;var i=this.taps[r],a=(this.taps[r+1]=i).stage||0;if(e){if(e.has(i.name)){e.delete(i.name);continue}if(0<e.size)continue}if(!(n<a)){r++;break}}this.taps[r]=t},t}(),dl=function(){function t(t){this.config=t,this.options=void 0,this._args=void 0}var e=t.prototype;return e.create=function(t){var e;switch(this.init(t),this.options.type){case"sync":e=new Function(this.args(),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"throw "+t+";\n"},onResult:function(t){return"return "+t+";\n"},resultReturns:!0,onDone:function(){return""},rethrowIfPossible:!0}));break;case"async":e=new Function(this.args({after:"_callback"}),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"_callback("+t+");\n"},onResult:function(t){return"_callback(null, "+t+");\n"},onDone:function(){return"_callback();\n"}}));break;case"promise":var n=!1,r=this.contentWithInterceptors({onError:function(t){return n=!0,"_error("+t+");\n"},onResult:function(t){return"_resolve("+t+");\n"},onDone:function(){return"_resolve();\n"}}),i="",i=(i+='"use strict";\n')+this.header()+"return new Promise((function(_resolve, _reject) {\n";n&&(i+="var _sync = true;\nfunction _error(_err) {\nif(_sync)\n_resolve(Promise.resolve().then((function() { throw _err; })));\nelse\n_reject(_err);\n};\n"),i+=r,n&&(i+="_sync = false;\n"),i+="}));\n",e=new Function(this.args(),i)}return this.deinit(),e},e.setup=function(t,e){t._x=e.taps.map(function(t){return t.fn})},e.init=function(t){this.options=t,this._args=t.args.slice()},e.deinit=function(){this.options=void 0,this._args=void 0},e.contentWithInterceptors=function(t){var r=this;if(0<this.options.interceptors.length){for(var i=t.onError,a=t.onResult,n=t.onDone,e="",o=0;o<this.options.interceptors.length;o++){var s=this.options.interceptors[o];s.call&&(e+=this.getInterceptor(o)+".call("+this.args({before:s.context?"_context":void 0})+");\n")}return e+=this.content(Object.assign(t,{onError:i&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].error&&(e+=r.getInterceptor(n)+".error("+t+");\n");return e+=i(t)},onResult:a&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].result&&(e+=r.getInterceptor(n)+".result("+t+");\n");return e+=a(t)},onDone:n&&function(){for(var t="",e=0;e<r.options.interceptors.length;e++)r.options.interceptors[e].done&&(t+=r.getInterceptor(e)+".done();\n");return t+=n()}}))}return this.content(t)},e.header=function(){var t="";return this.needContext()?t+="var _context = {};\n":t+="var _context;\n",t+="var _x = this._x;\n",0<this.options.interceptors.length&&(t+="var _taps = this.taps;\nvar _interceptors = this.interceptors;\n"),t},e.needContext=function(){for(var t,e=mi(this.options.taps);!(t=e()).done;)if(t.value.context)return!0;return!1},e.callTap=function(t,e){for(var n=e.onError,r=e.onResult,i=e.onDone,a=e.rethrowIfPossible,o="",s=!1,l=0;l<this.options.interceptors.length;l++){var c=this.options.interceptors[l];c.tap&&(s||(o+="var _tap"+t+" = "+this.getTap(t)+";\n",s=!0),o+=this.getInterceptor(l)+".tap("+(c.context?"_context, ":"")+"_tap"+t+");\n")}o+="var _fn"+t+" = "+this.getTapFn(t)+";\n";var u=this.options.taps[t];switch(u.type){case"sync":a||(o=o+"var _hasError"+t+" = false;\ntry {\n"),o+=r?"var _result"+t+" = _fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n":"_fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n",a||(o=(o=(o=o+"} catch(_err) {\n_hasError"+t+" = true;\n")+n("_err"))+"}\nif(!_hasError"+t+") {\n"),r&&(o+=r("_result"+t)),i&&(o+=i()),a||(o+="}\n");break;case"async":var h=(h=(h="")+(r?"(function(_err"+t+", _result"+t+") {\n":"(function(_err"+t+") {\n")+("if(_err"+t+") {\n"))+n("_err"+t)+"} else {\n";r&&(h+=r("_result"+t)),i&&(h+=i()),o+="_fn"+t+"("+this.args({before:u.context?"_context":void 0,after:h=h+"}\n"+"})"})+");\n";break;case"promise":o=(o=(o=(o+="var _hasResult"+t+" = false;\n")+("var _promise"+t+" = _fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n"))+("if (!_promise"+t+" || !_promise"+t+".then)\n")+(" throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise"+t+" + ')');\n"))+("_promise"+t+".then((function(_result"+t+") {\n")+("_hasResult"+t+" = true;\n"),r&&(o+=r("_result"+t)),i&&(o+=i()),o=(o=o+("}), function(_err"+t+") {\n")+("if(_hasResult"+t+") throw _err"+t+";\n"))+n("_err"+t)+"});\n"}return o},e.callTapsSeries=function(t){var a=this,o=t.onError,s=t.onResult,e=t.resultReturns,l=t.onDone,n=t.doneReturns,c=t.rethrowIfPossible;if(0===this.options.taps.length)return l();for(var u=this.options.taps.findIndex(function(t){return"sync"!==t.type}),h=e||n,f="",d=l,p=0,r=function(t){function e(t){return t?"":l()}var n=t,r=(d!==l&&("sync"!==a.options.taps[n].type||20<p++)&&(p=0,f=(f+="function _next"+n+"() {\n")+d()+"}\n",d=function(){return(h?"return ":"")+"_next"+n+"();\n"}),d),i=a.callTap(n,{onError:function(t){return o(n,t,r,e)},onResult:s&&function(t){return s(n,t,r,e)},onDone:!s&&r,rethrowIfPossible:c&&(u<0||n<u)});d=function(){return i}},i=this.options.taps.length-1;0<=i;i--)r(i);return f+=d()},e.callTapsLooping=function(t){var e=t.onError,n=t.onDone,t=t.rethrowIfPossible;if(0===this.options.taps.length)return n();var a=this.options.taps.every(function(t){return"sync"===t.type}),r="";a||(r+="var _looper = (function() {\nvar _loopAsync = false;\n");for(var r=(r+="var _loop;\n")+"do {\n"+"_loop = false;\n",i=0;i<this.options.interceptors.length;i++){var o=this.options.interceptors[i];o.loop&&(r+=this.getInterceptor(i)+".loop("+this.args({before:o.context?"_context":void 0})+");\n")}return r=r+this.callTapsSeries({onError:e,onResult:function(t,e,n,r){var i=(i="")+("if("+e+" !== undefined) {\n")+"_loop = true;\n";return a||(i+="if(_loopAsync) _looper();\n"),i=(i=i+r(!0)+"} else {\n")+n()+"}\n"},onDone:n&&function(){var t="";return(t+="if(!_loop) {\n")+n()+"}\n"},rethrowIfPossible:t&&a})+"} while(_loop);\n",a||(r+="_loopAsync = true;\n});\n_looper();\n"),r},e.callTapsParallel=function(t){var e=this,a=t.onError,o=t.onResult,s=t.onDone,l=t.rethrowIfPossible,t=t.onTap,c=void 0===t?function(t,e){return e()}:t;if(this.options.taps.length<=1)return this.callTapsSeries({onError:a,onResult:o,onDone:s,rethrowIfPossible:l});for(var u="",n=(u=(u+="do {\n")+("var _counter = "+this.options.taps.length+";\n"),s&&(u=(u+="var _done = (function() {\n")+s()+"});\n"),function(n){function r(){return s?"if(--_counter === 0) _done();\n":"--_counter;"}function i(t){return t||!s?"_counter = 0;\n":"_counter = 0;\n_done();\n"}u=(u+="if(_counter <= 0) break;\n")+c(n,function(){return e.callTap(n,{onError:function(t){var e="";return(e+="if(_counter > 0) {\n")+a(n,t,r,i)+"}\n"},onResult:o&&function(t){var e="";return(e+="if(_counter > 0) {\n")+o(n,t,r,i)+"}\n"},onDone:!o&&r,rethrowIfPossible:l})},r,i)}),r=0;r<this.options.taps.length;r++)n(r);return u+="} while(false);\n"},e.args=function(t){var t=void 0===t?{}:t,e=t.before,t=t.after,n=this._args;return e&&(n=[e].concat(n)),0===(n=t?n.concat(t):n).length?"":n.join(", ")},e.getTapFn=function(t){return"_x["+t+"]"},e.getTap=function(t){return"_taps["+t+"]"},e.getInterceptor=function(t){return"_interceptors["+t+"]"},t}(),pl=new(function(t){function e(){return t.apply(this,arguments)||this}return s(e,t),e.prototype.content=function(t){var i=t.onError,t=t.onDone;return this.callTapsParallel({onError:function(t,e,n,r){return i(e)+r(!0)},onDone:t})},e}(dl)),gl=function(n){function t(t,e){return(t=n.call(this,t=void 0===t?[]:t,e=void 0===e?void 0:e)||this).compile=al,t._call=void 0,t.call=void 0,t}return s(t,n),t}(o),yl=new(function(t){function e(){return t.apply(this,arguments)||this}return s(e,t),e.prototype.content=function(t){var i=this,a=t.onError,e=t.onResult;return t.onDone,this.callTapsSeries({onError:function(t,e,n,r){return a(e)+r(!0)},onResult:function(t,e,n){var r="";return(r+="if("+e+" !== undefined) {\n")+(i._args[0]+" = "+e+";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])}})},e}(dl)),ml=function(n){function t(t,e){return(t=n.call(this,t=void 0===t?[]:t,e=void 0===e?void 0:e)||this).compile=ol,t._call=void 0,t.call=void 0,t}return s(t,n),t}(o),vl=new(function(t){function e(){return t.apply(this,arguments)||this}return s(e,t),e.prototype.content=function(t){var n=t.onError,e=t.onDone,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onDone:e,rethrowIfPossible:t})},e}(dl)),bl=function(n){function t(t,e){return(t=n.call(this,t=void 0===t?[]:t,e=void 0===e?void 0:e)||this).tapAsync=sl,t.tapPromise=ll,t.compile=cl,t}return s(t,n),t}(o),xl=new(function(t){function e(){return t.apply(this,arguments)||this}return s(e,t),e.prototype.content=function(t){var i=this,n=t.onError,e=t.onResult,r=t.resultReturns,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onResult:function(t,e,n){var r="";return(r+="if("+e+" !== undefined) {\n")+(i._args[0]+" = "+e+";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])},doneReturns:r,rethrowIfPossible:t})},e}(dl)),wl=function(n){function t(t,e){return(t=n.call(this,t=void 0===t?[]:t,e=void 0===e?void 0:e)||this).tapAsync=ul,t.tapPromise=hl,t.compile=fl,t}return s(t,n),t}(bl),kl=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],El=/([\"\'])[^\'\"]+\1/;function Ml(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");var n=Date.now(),e=16<(e=n-Fl)?0:16-e,r=Ll();return Rl[r]=t,1<Object.keys(Rl).length||setTimeout(function(){Fl=n;var e=Rl;Rl={},Object.keys(e).forEach(function(t){return e[t](jl())})},e),r}function Ol(t){delete Rl[t]}function Sl(t){return"string"!=typeof t?Ml:""===t?Nl.requestAnimationFrame:Nl[t+"RequestAnimationFrame"]}var _l,Al,Tl,Pl=1,Ll=function(){return Pl++},Nl="object"==typeof self&&self.self==self?self:"object"==typeof j&&j.global==j?j:{},Cl=Date.now(),jl=function(){return Nl.performance&&"function"==typeof Nl.performance.now?Nl.performance.now():Date.now()-Cl},Rl={},Fl=Date.now(),o=function(t,e){for(var n=0;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}}(["","webkit","moz","ms","o"],Sl),Il=Sl(o),Bl="string"!=typeof(dl=o)?Ol:""===dl?Nl.cancelAnimationFrame:Nl[dl+"CancelAnimationFrame"]||Nl[dl+"CancelRequestAnimationFrame"],Dl=(Nl.requestAnimationFrame=Il,Nl.cancelAnimationFrame=Bl,[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:i.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:i.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:i.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:i.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:i.PAINT},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:i.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:i.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:i.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:i.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:i.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:i.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:i.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:i.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:i.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:i.FILTER},{n:"clipPath",syntax:i.DEFINED_PATH},{n:"textPath",syntax:i.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:i.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===E.CIRCLE||t===E.ELLIPSE?"center":t===E.TEXT?"text-anchor":"left top"},l:!0,syntax:i.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===E.CIRCLE||t===E.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:i.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:i.COORDINATE},{n:"cy",int:!0,d:"0",syntax:i.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:i.COORDINATE},{n:"y",int:!0,d:"0",syntax:i.COORDINATE},{n:"z",int:!0,d:"0",syntax:i.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:i.COORDINATE},{n:"y1",int:!0,l:!0,syntax:i.COORDINATE},{n:"z1",int:!0,l:!0,syntax:i.COORDINATE},{n:"x2",int:!0,l:!0,syntax:i.COORDINATE},{n:"y2",int:!0,l:!0,syntax:i.COORDINATE},{n:"z2",int:!0,l:!0,syntax:i.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:i.PATH,p:50},{n:"points",l:!0,syntax:i.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:i.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:i.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:i.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:i.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:i.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:i.NUMBER,d:function(t){return t===E.PATH||t===E.POLYGON||t===E.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:i.MARKER},{n:"markerEnd",syntax:i.MARKER},{n:"markerMid",syntax:i.MARKER},{n:"markerStartOffset",syntax:i.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:i.LENGTH,l:!0,int:!0,d:"0"}]),zl={},Gl=new WeakMap,Wl={},Vl=Mn(function(t){return t.sort(function(t,e){return Wl[t]-Wl[e]})}),Yl=m(),Hl=m(),ql=m(),j=function(){function t(){var e=this;Dl.forEach(function(t){e.registerMetadata(t)})}var e=t.prototype;return e.registerMetadata=function(e){[e.n].concat(e.a||[]).forEach(function(t){zl[t]=e,Wl[t]=e.p||0})},e.unregisterMetadata=function(t){delete zl[t]},e.getPropertySyntax=function(t){return w.CSSPropertySyntaxFactory[t]},e.processProperties=function(n,r,t){var i=this,t=t=void 0===t?{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[]}:t,a=t.skipUpdateAttribute,e=t.skipParse,o=t.forceUpdateGeometry,t=t.usedAttributes,s=o,o=Object.keys(r);o.forEach(function(t){var e=$r(t);a||(n.attributes[e]=r[t]),!s&&null!=(t=zl[e])&&t.l&&(s=!0)}),e||o.forEach(function(t){n.computedStyle[t]=i.parseProperty(t,n.attributes[t],n)}),(o=Vl(null!=t&&t.length?Array.from(new Set(o.concat(t))):o)).forEach(function(t){t in n.computedStyle&&(n.parsedStyle[t]=i.computeProperty(t,n.computedStyle[t],n))}),s&&this.updateGeometry(n),o.forEach(function(t){t in n.parsedStyle&&i.postProcessProperty(t,n)}),n.children.length&&o.forEach(function(e){e in n.parsedStyle&&i.isPropertyInheritable(e)&&n.children.forEach(function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})})})},e.parseProperty=function(t,e,n){var r,t=zl[t],i=e;return"unset"===(e=""!==e&&!_(e)?e:"unset")||"initial"===e||"inherit"===e?i=zi(e):t&&(r=t.k,t=(t=t.syntax)&&this.getPropertySyntax(t),r&&-1<r.indexOf(e)?i=zi(e):t&&t.parser&&(i=t.parser(e,n))),i},e.computeProperty=function(t,e,n){var r=zl[t],i="g-root"===n.id,a=e;if(r){var o=r.syntax,s=r.inh,r=r.d;if(e instanceof _i){var l=e.value;if("initial"===(l="unset"===l?s&&!i?"inherit":"initial":l))_(r)||(e=this.parseProperty(t,Ur(r)?r(n.nodeName):r,n));else if("inherit"===l)return s=this.tryToResolveProperty(n,t,{inherited:!0}),_(s)?void this.addUnresolveProperty(n,t):s}i=o&&this.getPropertySyntax(o);a=i&&i.calculator?(r=n.parsedStyle[t],i.calculator(t,r,e,n,this)):e instanceof _i?e.value:e}return a},e.postProcessProperty=function(t,e){var t=zl[t];t&&t.syntax&&(t=t.syntax&&this.getPropertySyntax(t.syntax))&&t.postProcessor&&t.postProcessor(e)},e.addUnresolveProperty=function(t,e){var n=Gl.get(t);n||(Gl.set(t,[]),n=Gl.get(t)),-1===n.indexOf(e)&&n.push(e)},e.tryToResolveProperty=function(t,e,n){var n=(n=void 0===n?{}:n).inherited;if(n&&(t.parentElement&&function(t,e){t=Gl.get(t);return!t||0===t.length||t.includes(e)}(t.parentElement,e)))return"unset"===(n=t.parentElement.parsedStyle[e])||"initial"===n||"inherit"===n?void 0:n},e.recalc=function(e){var n,t=Gl.get(e);t&&t.length&&(n={},t.forEach(function(t){n[t]=e.attributes[t]}),this.processProperties(e,n),Gl.delete(e))},e.updateGeometry=function(t){var s,e,n,r,i,a,o,l,c,u,h,f,d,p,g,y,m,v=w.geometryUpdaterFactory[t.nodeName];v&&((s=t.geometry).contentBounds||(s.contentBounds=new Dr),s.renderBounds||(s.renderBounds=new Dr),e=t.parsedStyle,d=(v=v.update(e,t)).width,f=v.height,p=void 0===(p=v.depth)?0:p,h=void 0===(h=v.offsetX)?0:h,m=void 0===(m=v.offsetY)?0:m,v=void 0===(v=v.offsetZ)?0:v,n=d<0,r=f<0,p=Gt(Yl,Math.abs(d)/2,Math.abs(f)/2,p/2),l=e.stroke,c=e.lineWidth,u=e.increasedLineWidthForHitTesting,y=e.shadowType,g=e.shadowColor,i=void 0===(i=e.filter)?[]:i,a=e.transformOrigin,o=e.anchor,t.nodeName===E.TEXT&&delete e.anchor,d=Gt(Hl,(1-2*(o&&o[0]||0))*d/2+h,(1-2*(o&&o[1]||0))*f/2+m,(1-2*(o&&o[2]||0))*p[2]+v),s.contentBounds.update(d,p),h=t.nodeName===E.POLYLINE||t.nodeName===E.POLYGON||t.nodeName===E.PATH?Math.SQRT2:.5,l&&!l.isNone&&Wt(p,p,Gt(ql,f=((c||0)+(u||0))*h,f,0)),s.renderBounds.update(d,p),g&&y&&"inner"!==y&&(v=(m=s.renderBounds).min,l=m.max,c=e.shadowBlur||0,u=e.shadowOffsetX||0,h=e.shadowOffsetY||0,f=v[0]-c+u,d=l[0]+c+u,p=v[1]-c+h,g=l[1]+c+h,v[0]=Math.min(v[0],f),l[0]=Math.max(l[0],d),v[1]=Math.min(v[1],p),l[1]=Math.max(l[1],g),s.renderBounds.setMinMax(v,l)),i.forEach(function(t){var e,n,r,i,a,o=t.name,t=t.params;"blur"===o?(i=t[0].value,s.renderBounds.update(s.renderBounds.center,Wt(s.renderBounds.halfExtents,s.renderBounds.halfExtents,k(i,i,0)))):"drop-shadow"===o&&(i=t[0].value,o=t[1].value,t=t[2].value,e=(n=s.renderBounds).min,n=n.max,r=e[0]-t+i,i=n[0]+t+i,a=e[1]-t+o,t=n[1]+t+o,e[0]=Math.min(e[0],r),n[0]=Math.max(n[0],i),e[1]=Math.min(e[1],a),n[1]=Math.max(n[1],t),s.renderBounds.setMinMax(e,n))}),o=e.anchor,y=(n?-1:1)*va(a[0],0,t),m=(r?-1:1)*va(a[1],1,t),y-=(n?-1:1)*(o&&o[0]||0)*s.contentBounds.halfExtents[0]*2,m-=(r?-1:1)*(o&&o[1]||0)*s.contentBounds.halfExtents[1]*2,t.setOrigin(y,m),w.sceneGraphService.dirtifyToRoot(t))},e.isPropertyInheritable=function(t){t=zl[t];return!!t&&t.inh},t}();(o=_l=_l||{})[o.ORBITING=0]="ORBITING",o[o.EXPLORING=1]="EXPLORING",o[o.TRACKING=2]="TRACKING",(dl=Al=Al||{})[dl.DEFAULT=0]="DEFAULT",dl[dl.ROTATIONAL=1]="ROTATIONAL",dl[dl.TRANSLATIONAL=2]="TRANSLATIONAL",dl[dl.CINEMATIC=3]="CINEMATIC",(o=Tl=Tl||{})[o.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",o[o.PERSPECTIVE=1]="PERSPECTIVE";var Ul,Xl="updated",dl=function(){function t(){this.canvas=void 0,this.eventEmitter=new Br,this.matrix=ht(),this.right=k(1,0,0),this.up=k(0,1,0),this.forward=k(0,0,1),this.position=k(0,0,1),this.focalPoint=k(0,0,0),this.distanceVector=k(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.left=void 0,this.rright=void 0,this.top=void 0,this.bottom=void 0,this.projectionMatrix=ht(),this.projectionMatrixInverse=ht(),this.jitteredProjectionMatrix=void 0,this.view=void 0,this.enableUpdate=!0,this.type=_l.EXPLORING,this.trackingMode=Al.DEFAULT,this.projectionMode=Tl.PERSPECTIVE,this.frustum=new Gr,this.orthoMatrix=ht()}var e=t.prototype;return e.isOrtho=function(){return this.projectionMode===Tl.ORTHOGRAPHIC},e.getProjectionMode=function(){return this.projectionMode},e.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},e.getPerspectiveInverse=function(){return this.projectionMatrixInverse},e.getFrustum=function(){return this.frustum},e.getPosition=function(){return this.position},e.getFocalPoint=function(){return this.focalPoint},e.getDollyingStep=function(){return this.dollyingStep},e.getNear=function(){return this.near},e.getFar=function(){return this.far},e.getZoom=function(){return this.zoom},e.getOrthoMatrix=function(){return this.orthoMatrix},e.getView=function(){return this.view},e.setEnableUpdate=function(t){this.enableUpdate=t},e.setType=function(t,e){return this.type=t,this.type===_l.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===_l.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},e.setProjectionMode=function(t){return this.projectionMode=t,this},e.setTrackingMode=function(t){if(this.type!==_l.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this},e.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},e.getViewTransform=function(){return mt(ht(),this.matrix)},e.getWorldTransform=function(){return this.matrix},e.jitterProjectionMatrix=function(t,e){t=Mt(ht(),[t,e,0]);this.jitteredProjectionMatrix=bt(ht(),t,this.projectionMatrix)},e.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},e.setMatrix=function(t){return this.matrix=t,this._update(),this},e.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},e.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},e.setNear=function(t){return this.projectionMode===Tl.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this},e.setFar=function(t){return this.projectionMode===Tl.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this},e.setViewOffset=function(t,e,n,r,i,a){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=a,this.projectionMode===Tl.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},e.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===Tl.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},e.setZoom=function(t){return this.zoom=t,this.projectionMode===Tl.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===Tl.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},e.setZoomByViewportPoint=function(t,e){var n=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),r=n.x,n=n.y,i=this.roll,t=(this.rotate(0,0,-i),this.setPosition(r,n),this.setFocalPoint(r,n),this.setZoom(t),this.rotate(0,0,i),this.canvas.viewport2Canvas({x:e[0],y:e[1]})),i=k(t.x-r,t.y-n,0),e=qt(i,this.right)/Dt(this.right),r=qt(i,this.up)/Dt(this.up);return this.pan(-e,-r),this},e.setPerspective=function(t,e,n,r){this.projectionMode=Tl.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,a,o,s,n=this.near*Math.tan(cs(.5*this.fov))/this.zoom,e=2*n,r=this.aspect*e,l=-.5*r;return null!=(i=this.view)&&i.enabled&&(i=this.view.fullWidth,a=this.view.fullHeight,l+=this.view.offsetX*r/i,n-=this.view.offsetY*e/a,r*=this.view.width/i,e*=this.view.height/a),i=this.projectionMatrix,l=(a=l)+r,n=(r=n)-e,e=this.far,o=2*t/(r-n),s=(l+a)/(l-a),r=(r+n)/(r-n),n=-(e+t)/(e-t),e=-2*e*t/(e-t),i[0]=2*t/(l-a),i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=o,i[6]=0,i[7]=0,i[8]=s,i[9]=r,i[10]=n,i[11]=-1,i[12]=0,i[13]=0,i[14]=e,i[15]=0,wt(this.projectionMatrix,this.projectionMatrix,k(1,-1,1)),mt(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},e.setOrthographic=function(t,e,n,r,i,a){this.projectionMode=Tl.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=a;var o,e=(this.rright-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.rright+this.left)/2,r=(this.top+this.bottom)/2,s=n-e,n=n+e,e=r+t,r=r-t;return null!=(t=this.view)&&t.enabled&&(t=(this.rright-this.left)/this.view.fullWidth/this.zoom,o=(this.top-this.bottom)/this.view.fullHeight/this.zoom,n=(s+=t*this.view.offsetX)+t*this.view.width,r=(e-=o*this.view.offsetY)-o*this.view.height),jt(this.projectionMatrix,s,n,r,e,i,a),wt(this.projectionMatrix,this.projectionMatrix,k(1,-1,1)),mt(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},e.setPosition=function(t,e,n){t=ls(t,e=void 0===e?this.position[1]:e,n=void 0===n?this.position[2]:n);return this._setPosition(t),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},e.setFocalPoint=function(t,e,n){void 0===e&&(e=this.focalPoint[1]),void 0===n&&(n=this.focalPoint[2]);var r,i=k(0,1,0);return this.focalPoint=ls(t,e,n),this.trackingMode===Al.CINEMATIC&&(t=(r=Vt(m(),this.focalPoint,this.position))[0],e=r[1],n=r[2],r=Dt(r),e=us(Math.asin(e/r)),r=90+us(Math.atan2(n,t)),Et(n=ht(),n,cs(r)),kt(n,n,cs(e)),i=$t(m(),[0,1,0],n)),mt(this.matrix,Rt(ht(),this.position,this.focalPoint,i)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},e.getDistance=function(){return this.distance},e.getDistanceVector=function(){return this.distanceVector},e.setDistance=function(t){var e,n,r;return this.distance===t||t<0||(this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100,e=m(),t=this.distance,n=this.forward,r=this.focalPoint,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},e.setMaxDistance=function(t){return this.maxDistance=t,this},e.setMinDistance=function(t){return this.minDistance=t,this},e.setAzimuth=function(t){return this.azimuth=ss(t),this.computeMatrix(),this._getAxes(),this.type===_l.ORBITING||this.type===_l.EXPLORING?this._getPosition():this.type===_l.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getAzimuth=function(){return this.azimuth},e.setElevation=function(t){return this.elevation=ss(t),this.computeMatrix(),this._getAxes(),this.type===_l.ORBITING||this.type===_l.EXPLORING?this._getPosition():this.type===_l.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getElevation=function(){return this.elevation},e.setRoll=function(t){return this.roll=ss(t),this.computeMatrix(),this._getAxes(),this.type===_l.ORBITING||this.type===_l.EXPLORING?this._getPosition():this.type===_l.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getRoll=function(){return this.roll},e._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},e.computeMatrix=function(){var t=ie(re(),[0,0,1],cs(this.roll)),e=(gt(this.matrix),ie(re(),[1,0,0],cs((this.rotateWorld&&this.type!==_l.TRACKING||this.type===_l.TRACKING?1:-1)*this.elevation))),n=ie(re(),[0,1,0],cs((this.rotateWorld&&this.type!==_l.TRACKING||this.type===_l.TRACKING?1:-1)*this.azimuth)),n=ae(re(),n,e),n=ae(re(),n,t),e=Lt(ht(),n);this.type===_l.ORBITING||this.type===_l.EXPLORING?(xt(this.matrix,this.matrix,this.focalPoint),bt(this.matrix,this.matrix,e),xt(this.matrix,this.matrix,[0,0,this.distance])):this.type===_l.TRACKING&&(xt(this.matrix,this.matrix,this.position),bt(this.matrix,this.matrix,e))},e._setPosition=function(t,e,n){this.position=ls(t,e,n);t=this.matrix;t[12]=this.position[0],t[13]=this.position[1],t[14]=this.position[2],t[15]=1,this._getOrthoMatrix()},e._getAxes=function(){zt(this.right,ls(ne(ee(),[1,0,0,0],this.matrix))),zt(this.up,ls(ne(ee(),[0,1,0,0],this.matrix))),zt(this.forward,ls(ne(ee(),[0,0,1,0],this.matrix))),Ht(this.right,this.right),Ht(this.up,this.up),Ht(this.forward,this.forward)},e._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=Dt(this.distanceVector);0===r?(this.elevation=0,this.azimuth=0):this.type===_l.TRACKING||this.rotateWorld?(this.elevation=us(Math.asin(e/r)),this.azimuth=us(Math.atan2(-t,-n))):(this.elevation=-us(Math.asin(e/r)),this.azimuth=-us(Math.atan2(-t,-n)))},e._getPosition=function(){zt(this.position,ls(ne(ee(),[0,0,0,1],this.matrix))),this._getDistance()},e._getFocalPoint=function(){var t,e;Kt(this.distanceVector,[0,0,-this.distance],(t=ct(),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)),Wt(this.focalPoint,this.position,this.distanceVector),this._getDistance()},e._getDistance=function(){this.distanceVector=Vt(m(),this.focalPoint,this.position),this.distance=Dt(this.distanceVector),this.dollyingStep=this.distance/100},e._getOrthoMatrix=function(){var t,e;this.projectionMode===Tl.ORTHOGRAPHIC&&(t=this.position,e=ie(re(),[0,0,1],-this.roll*Math.PI/180),Pt(this.orthoMatrix,e,k((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),k(this.zoom,this.zoom,1),t))},e.triggerUpdate=function(){var t;this.enableUpdate&&(t=this.getViewTransform(),t=bt(ht(),this.getPerspective(),t),this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(Xl))},e.rotate=function(t,e,n){throw new Error(ai)},e.pan=function(t,e){throw new Error(ai)},e.dolly=function(t){throw new Error(ai)},e.createLandmark=function(t,e){throw new Error(ai)},e.gotoLandmark=function(t,e){throw new Error(ai)},t}(),o=function(){function t(){}return t.prototype.update=function(t,e){t=t.r;return{width:2*t,height:2*t}},t}(),$l=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),l=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,r=t.x2,t=t.y2,i=Math.min(e,r),e=Math.max(e,r),r=Math.min(n,t);return{width:e-i,height:Math.max(n,t)-r}},t}(),Kl=function(){function t(){}return t.prototype.update=function(t){t=t.path.rect;return{width:t.width,height:t.height}},t}(),Zl=function(){function t(){}return t.prototype.update=function(t){var t=t.points.points,e=Math.min.apply(Math,t.map(function(t){return t[0]})),n=Math.max.apply(Math,t.map(function(t){return t[0]})),r=Math.min.apply(Math,t.map(function(t){return t[1]}));return{width:n-e,height:Math.max.apply(Math,t.map(function(t){return t[1]}))-r}},t}(),c=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.width,i=t.height,r=void 0===r?0:r,i=void 0===i?0:i;return n&&!fn(n)&&(r||(r=n.width,t.width=r),i||(i=n.height,t.height=i)),{width:r,height:i}},t}(),Jl=function(){function t(t){this.globalRuntime=void 0,this.globalRuntime=t}var e=t.prototype;return e.isReadyToMeasure=function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,a=t.fontSize,o=t.fontStyle,s=t.fontWeight,l=t.fontVariant,t=t.lineWidth;return n&&a&&o&&s&&l&&r&&i&&!_(t)},e.update=function(t,e){var n,r,i=t.text,a=t.textAlign,o=t.lineWidth,s=t.textBaseline,l=t.dx,c=t.dy,u=((null==e||null==(u=e.ownerDocument)||null==(u=u.defaultView)?void 0:u.getConfig())||{}).offscreenCanvas;return this.isReadyToMeasure(t,e)?(e=this.globalRuntime.textService.measureText(i,t,u),i=(t.metrics=e).width,u=e.height,n=e.lineHeight,e=e.fontProperties,i=[i/2,u/2,0],u=[0,1],r=0,"center"===a||"middle"===a?(r=o/2,u=[.5,1]):"right"!==a&&"end"!==a||(r=o,u=[1,1]),a=0,"middle"===s?a=i[1]:"top"===s||"hanging"===s?a=2*i[1]:"alphabetic"===s?a=n-e.ascent:"bottom"!==s&&"ideographic"!==s||(a=0),l&&(r+=l),c&&(a+=c),t.anchor=[u[0],u[1],0],{width:2*i[0],height:2*i[1],offsetX:r,offsetY:a}):(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})},t}(),Ql=function(){function t(t,e){var f=this;this.globalRuntime=void 0,this.context=void 0,this.rootTarget=void 0,this.emitter=new Br,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.pickHandler=void 0,this.tmpMatrix=ht(),this.tmpVec3=m(),this.onPointerDown=function(){var e=ci(M().mark(function t(e){var n,r;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Ao){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,f.createPointerEvent(e);case 4:n=t.sent,f.dispatchEvent(n,"pointerdown"),"touch"===n.pointerType?f.dispatchEvent(n,"touchstart"):"mouse"!==n.pointerType&&"pen"!==n.pointerType||(r=2===n.button,f.dispatchEvent(n,r?"rightdown":"mousedown")),f.trackingData(e.pointerId).pressTargetsByButton[e.button]=n.composedPath(),f.freeEvent(n);case 10:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerUp=function(){var e=ci(M().mark(function t(e){var n,r,i,a,o,s,l;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Ao){t.next=2;break}return t.abrupt("return");case 2:return n=performance.now(),t.next=5,f.createPointerEvent(e);case 5:if(r=t.sent,f.dispatchEvent(r,"pointerup"),"touch"===r.pointerType?f.dispatchEvent(r,"touchend"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||(i=2===r.button,f.dispatchEvent(r,i?"rightup":"mouseup")),i=f.trackingData(e.pointerId),s=f.findMountedTarget(i.pressTargetsByButton[e.button]),(l=s)&&!r.composedPath().includes(s)){for(a=s;a&&!r.composedPath().includes(a);)r.currentTarget=a,f.notifyTarget(r,"pointerupoutside"),"touch"===r.pointerType?f.notifyTarget(r,"touchendoutside"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||(o=2===r.button,f.notifyTarget(r,o?"rightupoutside":"mouseupoutside")),bo.isNode(a)&&(a=a.parentNode);delete i.pressTargetsByButton[e.button],l=a}l&&((s=f.clonePointerEvent(r,"click")).target=l,s.path=[],i.clicksByButton[e.button]||(i.clicksByButton[e.button]={clickCount:0,target:s.target,timeStamp:n}),(l=i.clicksByButton[e.button]).target===s.target&&n-l.timeStamp<200?++l.clickCount:l.clickCount=1,l.target=s.target,l.timeStamp=n,s.detail=l.clickCount,null!=(l=r.detail)&&l.preventClick||("mouse"!==s.pointerType&&"touch"!==s.pointerType||f.dispatchEvent(s,"click"),f.dispatchEvent(s,"pointertap")),f.freeEvent(s)),f.freeEvent(r);case 14:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerMove=function(){var e=ci(M().mark(function t(e){var n,r,i,a,o,s,l,c,u,h;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Ao){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,f.createPointerEvent(e);case 4:if(n=t.sent,r="mouse"===n.pointerType||"pen"===n.pointerType,i=f.trackingData(e.pointerId),a=f.findMountedTarget(i.overTargets),i.overTargets&&a!==n.target)return l="mousemove"===e.type?"mouseout":"pointerout",t.next=12,f.createPointerEvent(e,l,a||void 0);t.next=23;break;case 12:if(o=t.sent,f.dispatchEvent(o,"pointerout"),r&&f.dispatchEvent(o,"mouseout"),n.composedPath().includes(a)){t.next=22;break}return t.next=18,f.createPointerEvent(e,"pointerleave",a||void 0);case 18:for((s=t.sent).eventPhase=s.AT_TARGET;s.target&&!n.composedPath().includes(s.target);)s.currentTarget=s.target,f.notifyTarget(s),r&&f.notifyTarget(s,"mouseleave"),bo.isNode(s.target)&&(s.target=s.target.parentNode);f.freeEvent(s);case 22:f.freeEvent(o);case 23:if(a===n.target){t.next=38;break}l="mousemove"===e.type?"mouseover":"pointerover",c=f.clonePointerEvent(n,l),f.dispatchEvent(c,"pointerover"),r&&f.dispatchEvent(c,"mouseover"),u=a&&bo.isNode(a)&&a.parentNode;case 29:if(u&&u!==(bo.isNode(f.rootTarget)&&f.rootTarget.parentNode)){if(u===n.target)return t.abrupt("break",35);t.next=32}else t.next=35;break;case 32:u=u.parentNode,t.next=29;break;case 35:if(!u||u===(bo.isNode(f.rootTarget)&&f.rootTarget.parentNode)){for((h=f.clonePointerEvent(n,"pointerenter")).eventPhase=h.AT_TARGET;h.target&&h.target!==a&&h.target!==(bo.isNode(f.rootTarget)&&f.rootTarget.parentNode);)h.currentTarget=h.target,f.notifyTarget(h),r&&f.notifyTarget(h,"mouseenter"),bo.isNode(h.target)&&(h.target=h.target.parentNode);f.freeEvent(h)}f.freeEvent(c);case 38:f.dispatchEvent(n,"pointermove"),"touch"===n.pointerType&&f.dispatchEvent(n,"touchmove"),r&&(f.dispatchEvent(n,"mousemove"),f.cursor=f.getCursor(n.target)),i.overTargets=n.composedPath(),f.freeEvent(n);case 43:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerOut=function(){var e=ci(M().mark(function t(e){var n,r,i,a,o;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Ao){t.next=2;break}return t.abrupt("return");case 2:if((n=f.trackingData(e.pointerId)).overTargets)return r="mouse"===e.pointerType||"pen"===e.pointerType,i=f.findMountedTarget(n.overTargets),t.next=8,f.createPointerEvent(e,"pointerout",i||void 0);t.next=19;break;case 8:return a=t.sent,f.dispatchEvent(a),r&&f.dispatchEvent(a,"mouseout"),t.next=13,f.createPointerEvent(e,"pointerleave",i||void 0);case 13:for((o=t.sent).eventPhase=o.AT_TARGET;o.target&&o.target!==(bo.isNode(f.rootTarget)&&f.rootTarget.parentNode);)o.currentTarget=o.target,f.notifyTarget(o),r&&f.notifyTarget(o,"mouseleave"),bo.isNode(o.target)&&(o.target=o.target.parentNode);n.overTargets=null,f.freeEvent(a),f.freeEvent(o);case 19:f.cursor=null;case 20:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerOver=function(){var e=ci(M().mark(function t(e){var n,r,i,a;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Ao){t.next=2;break}return t.abrupt("return");case 2:return n=f.trackingData(e.pointerId),t.next=5,f.createPointerEvent(e);case 5:for(r=t.sent,i="mouse"===r.pointerType||"pen"===r.pointerType,f.dispatchEvent(r,"pointerover"),i&&f.dispatchEvent(r,"mouseover"),"mouse"===r.pointerType&&(f.cursor=f.getCursor(r.target)),(a=f.clonePointerEvent(r,"pointerenter")).eventPhase=a.AT_TARGET;a.target&&a.target!==(bo.isNode(f.rootTarget)&&f.rootTarget.parentNode);)a.currentTarget=a.target,f.notifyTarget(a),i&&f.notifyTarget(a,"mouseenter"),bo.isNode(a.target)&&(a.target=a.target.parentNode);n.overTargets=r.composedPath(),f.freeEvent(r),f.freeEvent(a);case 16:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerUpOutside=function(){var e=ci(M().mark(function t(e){var n,r,i,a;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Ao){t.next=2;break}return t.abrupt("return");case 2:return n=f.trackingData(e.pointerId),r=f.findMountedTarget(n.pressTargetsByButton[e.button]),t.next=6,f.createPointerEvent(e);case 6:if(i=t.sent,r){for(a=r;a;)i.currentTarget=a,f.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType||"mouse"!==i.pointerType&&"pen"!==i.pointerType||f.notifyTarget(i,2===i.button?"rightupoutside":"mouseupoutside"),bo.isNode(a)&&(a=a.parentNode);delete n.pressTargetsByButton[e.button]}f.freeEvent(i);case 9:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onWheel=function(){var e=ci(M().mark(function t(e){var n;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof To){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,f.createWheelEvent(e);case 4:n=t.sent,f.dispatchEvent(n),f.freeEvent(n);case 7:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.globalRuntime=t,this.context=e}var e=t.prototype;return e.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("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel)},e.client2Viewport=function(t){var e=this.context.contextService.getBoundingClientRect();return new Wr(t.x-((null==e?void 0:e.left)||0),t.y-((null==e?void 0:e.top)||0))},e.viewport2Client=function(t){var e=this.context.contextService.getBoundingClientRect();return new Wr(t.x+((null==e?void 0:e.left)||0),t.y+((null==e?void 0:e.top)||0))},e.viewport2Canvas=function(t){var e=t.x,t=t.y,n=this.rootTarget.defaultView.getCamera(),r=this.context.config,i=r.width,r=r.height,a=n.getPerspectiveInverse(),n=n.getWorldTransform(),n=bt(this.tmpMatrix,n,a),a=Gt(this.tmpVec3,e/i*2-1,2*(1-t/r)-1,0);return $t(a,a,n),new Wr(a[0],a[1])},e.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),e=e.getViewTransform(),n=bt(this.tmpMatrix,n,e),e=Gt(this.tmpVec3,t.x,t.y,0),t=($t(this.tmpVec3,this.tmpVec3,n),this.context.config),n=t.width,t=t.height;return new Wr((e[0]+1)/2*n,(1-(e[1]+1)/2)*t)},e.setPickHandler=function(t){this.pickHandler=t},e.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})},e.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 "+t.type)}},e.dispatchEvent=function(t,e,n){n?(t.eventPhase=t.AT_TARGET,n=this.rootTarget.defaultView||null,t.currentTarget=n,this.notifyListeners(t,e)):(t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e)),this.emitter.emit(e||t.type,t)},e.propagate=function(t,e){if(t.target){var n=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var r=n.length-1;1<=r;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 a=i+1;a<n.length;a++)if(t.currentTarget=n[a],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}},e.propagationPath=function(t){var e=[t],n=this.rootTarget.defaultView||null;if(n&&n===t)e.unshift(n.document);else{for(var r=0;r<2048&&t!==this.rootTarget;r++)bo.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);n&&e.push(n)}return e},e.hitTest=function(){var e=ci(M().mark(function t(e){var n,r,i,a;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.viewportX,r=e.viewportY,a=this.context.config,i=a.width,a=a.height,n<0||r<0||i<n||a<r)return t.abrupt("return",null);t.next=4;break;case 4:return t.next=6,this.pickHandler(e);case 6:if(t.t1=t.sent,t.t1){t.next=9;break}t.t1=this.rootTarget;case 9:if(t.t0=t.t1,t.t0){t.next=12;break}t.t0=null;case 12:return t.abrupt("return",t.t0);case 13:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.isNativeEventFromCanvas=function(t){var e=this.context.contextService.getDomElement(),n=null==(n=t.nativeEvent)?void 0:n.target;if(n){if(n===e)return!0;if(e&&e.contains)return e.contains(n)}return!!t.nativeEvent.composedPath&&-1<t.nativeEvent.composedPath().indexOf(e)},e.getExistedHTML=function(t){if(t.nativeEvent.composedPath)for(var e=mi(this.globalRuntime.displayObjectPool.getHTMLs());!(n=e()).done;){var n=n.value;if(-1<t.nativeEvent.composedPath().indexOf(n))return n}return null},e.pickTarget=function(){var e=ci(M().mark(function t(e){return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.hitTest({clientX:e.clientX,clientY:e.clientY,viewportX:e.viewportX,viewportY:e.viewportY,x:e.canvasX,y:e.canvasY}));case 1:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.createPointerEvent=function(){var r=ci(M().mark(function t(e,n,r){var i,a;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:i=this.allocateEvent(Ao),this.copyPointerData(e,i),this.copyMouseData(e,i),this.copyData(e,i),i.nativeEvent=e.nativeEvent,i.originalEvent=e,a=this.getExistedHTML(i),null==r?t.next=11:(t.t0=r,t.next=20);break;case 11:if(t.t1=a,t.t1)t.next=19;else{if(t.t2=this.isNativeEventFromCanvas(i),t.t2)return t.next=17,this.pickTarget(i);t.next=18}break;case 17:t.t2=t.sent;case 18:t.t1=t.t2;case 19:t.t0=t.t1;case 20:return i.target=t.t0,"string"==typeof n&&(i.type=n),t.abrupt("return",i);case 23:case"end":return t.stop()}},t,this)}));return function(t,e,n){return r.apply(this,arguments)}}(),e.createWheelEvent=function(){var e=ci(M().mark(function t(e){var n,r;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.allocateEvent(To),this.copyWheelData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.nativeEvent=e.nativeEvent,n.originalEvent=e,r=this.getExistedHTML(n),t.t0=r,t.t0)t.next=15;else{if(t.t1=this.isNativeEventFromCanvas(n),t.t1)return t.next=13,this.pickTarget(n);t.next=14}break;case 13:t.t1=t.sent;case 14:t.t0=t.t1;case 15:return n.target=t.t0,t.abrupt("return",n);case 17:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.trackingData=function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]},e.cloneWheelEvent=function(t){var e=this.allocateEvent(To);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},e.clonePointerEvent=function(t,e){var n=this.allocateEvent(Ao);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},e.copyPointerData=function(t,e){t instanceof Ao&&e instanceof Ao&&(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)},e.copyMouseData=function(t,e){t instanceof _o&&e instanceof _o&&(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))},e.copyWheelData=function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ},e.copyData=function(t,e){e.isTrusted=t.isTrusted,e.timeStamp=performance.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.page.copyFrom(t.page),e.viewport.copyFrom(t.viewport)},e.allocateEvent=function(t){this.eventPool.has(t)||this.eventPool.set(t,[]);t=this.eventPool.get(t).pop()||new t(this);return t.eventPhase=t.NONE,t.currentTarget=null,t.path=[],t.target=null,t},e.freeEvent=function(t){if(t.manager!==this)throw new 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)},e.notifyTarget=function(t,e){e=null!=(n=e)?n:t.type;var n=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?e+"capture":e;this.notifyListeners(t,n),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,e)},e.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)},e.findMountedTarget=function(t){if(!t)return null;for(var e=t[t.length-1],n=t.length-2;0<=n;n--){var r=t[n];if(!(r===this.rootTarget||bo.isNode(r)&&r.parentNode===e))break;e=t[n]}return e},e.getCursor=function(t){for(var e=t;e;){var n=So.isElement(e)&&e.getAttribute("cursor");if(n)return n;e=bo.isNode(e)&&e.parentNode}},t}(),tc=function(){function t(){this.canvas=void 0,this.context=void 0}var e=t.prototype;return e.getOrCreateCanvas=function(t){if(!this.canvas){if(t)this.canvas=t,this.context=this.canvas.getContext("2d");else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d"),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")}this.canvas.width=10,this.canvas.height=10}return this.canvas},e.getOrCreateContext=function(t){return this.context||this.getOrCreateCanvas(t),this.context},t}(),ec=((rc=Ul=Ul||{})[rc.CAMERA_CHANGED=0]="CAMERA_CHANGED",rc[rc.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",rc[rc.NONE=2]="NONE",function(){function t(t,e){this.globalRuntime=void 0,this.context=void 0,this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.renderOrderChangedEvent=new mo(y.RENDER_ORDER_CHANGED),this.hooks={init:new gl,dirtycheck:new wl(["object"]),cull:new wl(["object","camera"]),beginFrame:new bl([]),beforeRender:new bl(["objectToRender"]),render:new bl(["objectToRender"]),afterRender:new bl(["objectToRender"]),endFrame:new bl([]),destroy:new bl([]),pick:new ml(["result"]),pickSync:new wl(["result"]),pointerDown:new bl(["event"]),pointerUp:new bl(["event"]),pointerMove:new bl(["event"]),pointerOut:new bl(["event"]),pointerOver:new bl(["event"]),pointerWheel:new bl(["event"]),pointerCancel:new bl(["event"])},this.globalRuntime=t,this.context=e}var e=t.prototype;return e.init=function(){var t=ci(M().mark(function t(){var e;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=fi({},this.globalRuntime,this.context),this.context.renderingPlugins.forEach(function(t){t.apply(e)}),t.next=4,this.hooks.init.promise();case 4:this.inited=!0;case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),e.getStats=function(){return this.stats},e.disableDirtyRectangleRendering=function(){return!this.context.config.renderer.getConfig().enableDirtyRectangleRendering||this.context.renderingContext.renderReasons.has(Ul.CAMERA_CHANGED)},e.render=function(t){var e=this,n=(this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0,this.context.renderingContext);this.globalRuntime.sceneGraphService.syncHierarchy(n.root),this.globalRuntime.sceneGraphService.triggerPendingEvents(),n.renderReasons.size&&this.inited&&(this.renderDisplayObject(n.root,t,n),this.hooks.beginFrame.call(),n.renderListCurrentFrame.forEach(function(t){e.hooks.beforeRender.call(t),e.hooks.render.call(t),e.hooks.afterRender.call(t)}),this.hooks.endFrame.call(),n.renderListCurrentFrame=[],n.renderReasons.clear())},e.renderDisplayObject=function(t,e,n){var r=this,i=e.renderer.getConfig(),a=i.enableDirtyCheck,i=i.enableCulling,a=(this.globalRuntime.styleValueRegistry.recalc(t),a?this.hooks.dirtycheck.call(t):t),a=(a&&(i=i?this.hooks.cull.call(a,this.context.camera):a)&&(this.stats.rendered++,n.renderListCurrentFrame.push(i)),t.renderable.dirty=!1,t.sortable.renderOrder=this.zIndexCounter++,this.stats.total++,t.sortable),i=!1;a.dirty&&(a.sorted=t.childNodes.slice().sort(Qr),a.dirty=!(i=!0)),(a.sorted||t.childNodes).forEach(function(t){r.renderDisplayObject(t,e,n)}),i&&t.forEach(function(t){r.renderOrderChangedEvent.target=t,r.renderOrderChangedEvent.detail={renderOrder:t.sortable.renderOrder},t.ownerDocument.defaultView.dispatchEvent(r.renderOrderChangedEvent,!0)})},e.destroy=function(){this.inited=!1,this.hooks.destroy.call()},e.dirtify=function(){this.context.renderingContext.renderReasons.add(Ul.DISPLAY_OBJECT_CHANGED)},t}()),nc=/\[\s*(.*)=(.*)\s*\]/,rc=function(){function t(){}var e=t.prototype;return e.selectOne=function(e,n){var t,r,i,a=this;return e.startsWith(".")?n.find(function(t){return-1<((null==t?void 0:t.classList)||[]).indexOf(a.getIdOrClassname(e))}):e.startsWith("#")?n.find(function(t){return t.id===a.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.find(function(t){return n!==t&&("name"===r?t.name===i:a.attributeToString(t,r)===i)}):null):n.find(function(t){return n!==t&&t.nodeName===e})},e.selectAll=function(e,n){var t,r,i,a=this;return e.startsWith(".")?n.findAll(function(t){return n!==t&&-1<((null==t?void 0:t.classList)||[]).indexOf(a.getIdOrClassname(e))}):e.startsWith("#")?n.findAll(function(t){return n!==t&&t.id===a.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.findAll(function(t){return n!==t&&("name"===r?t.name===i:a.attributeToString(t,r)===i)}):[]):n.findAll(function(t){return n!==t&&t.nodeName===e})},e.is=function(t,e){var n,r;return t.startsWith(".")?e.className===this.getIdOrClassname(t):t.startsWith("#")?e.id===this.getIdOrClassname(t):t.startsWith("[")?(n=(r=this.getAttribute(t)).name,r=r.value,"name"===n?e.name===r:this.attributeToString(e,n)===r):e.nodeName===t},e.getIdOrClassname=function(t){return t.substring(1)},e.getAttribute=function(t){var t=t.match(nc),e="",n="";return t&&2<t.length&&(e=t[1].replace(/"/g,""),n=t[2].replace(/"/g,"")),{name:e,value:n}},e.attributeToString=function(t,e){return t.getAttribute&&(t=t.getAttribute(e),!_(t))&&t.toString?t.toString():""},t}();function ic(t){t=t.renderable;t&&(t.renderBoundsDirty=!0,t.boundsDirty=!0)}var ac,oc=function(){function t(t){var o,i,a,r,s,l,c,u,h,n,f,d,g=this;this.runtime=void 0,this.pendingEvents=[],this.boundsChangedEvent=new mo(y.BOUNDS_CHANGED),this.rotate=(o=re(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=k(e,n,r));var i,a,n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(se(r=re(),e[0],e[1],e[2]),i=g.getRotation(t),a=g.getRotation(t.parentNode),ce(o,a),oe(o,o),ae(r,o,r),ae(n.localRotation,r,i),he(n.localRotation,n.localRotation),g.dirtifyLocal(t,n)):g.rotateLocal(t,e)}),this.rotateLocal=(i=re(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=k(e,n,r));n=t.transformable;se(i,e[0],e[1],e[2]),ue(n.localRotation,n.localRotation,i),g.dirtifyLocal(t,n)}),this.setEulerAngles=(a=re(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=k(e,n,r));n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(se(n.localRotation,e[0],e[1],e[2]),r=g.getRotation(t.parentNode),ce(a,oe(re(),r)),ue(n.localRotation,n.localRotation,a),g.dirtifyLocal(t,n)):g.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=k(e,n,r));var i,a,o,s,l,c,u,h,f,d,p,n=t.transformable;Zt(e,m())||(i=r=e,a=n.localRotation,o=a[0],s=a[1],l=a[2],a=a[3],c=i[0],u=i[1],i=i[2],p=s*(d=o*u-s*c)-l*(f=l*c-o*i),l=l*(h=s*i-l*u)-o*d,o=o*f-s*h,f*=s=2*a,d*=s,l*=2,o*=2,r[0]=c+(h*=s)+(p*=2),r[1]=u+f+l,r[2]=i+d+o,Wt(n.localPosition,n.localPosition,e),g.dirtifyLocal(t,n))},this.setPosition=(r=ht(),s=m(),function(t,e){var n=t.transformable;s[0]=e[0],s[1]=e[1],s[2]=e[2]||0,Zt(g.getPosition(t),s)||(zt(n.position,s),null!==t.parentNode&&t.parentNode.transformable?(e=t.parentNode.transformable,dt(r,e.worldTransform),mt(r,r),$t(n.localPosition,s,r)):zt(n.localPosition,s),g.dirtifyLocal(t,n))}),this.setLocalPosition=(l=m(),function(t,e){var n=t.transformable;l[0]=e[0],l[1]=e[1],l[2]=e[2]||0,Zt(n.localPosition,l)||(zt(n.localPosition,l),g.dirtifyLocal(t,n))}),this.translate=(c=m(),u=m(),h=m(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),Zt(e="number"==typeof e?Gt(u,e,n,r):e,c)||(Wt(h,g.getPosition(t),e),g.setPosition(t,h))}),this.setRotation=function(){var o=re();return function(t,e,n,r,i){var a=t.transformable;"number"==typeof e&&(e=le(e,n,r,i)),null!==t.parentNode&&t.parentNode.transformable?(n=g.getRotation(t.parentNode),ce(o,n),oe(o,o),ae(a.localRotation,o,e),he(a.localRotation,a.localRotation),g.dirtifyLocal(t,a)):g.setLocalRotation(t,e)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(n=ht(),f=m(),d=le(0,0,0,1),function(t){var e;0!==t.localSkew[0]||0!==t.localSkew[1]?(Pt(t.localTransform,t.localRotation,t.localPosition,k(1,1,1),t.origin),0===t.localSkew[0]&&0===t.localSkew[1]||((e=gt(n))[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),bt(t.localTransform,t.localTransform,e)),e=Pt(n,d,f,t.localScale,t.origin),bt(t.localTransform,t.localTransform,e)):Pt(t.localTransform,t.localRotation,t.localPosition,t.localScale,t.origin)}),this.runtime=t}var e=t.prototype;return e.matches=function(t,e){return this.runtime.sceneGraphSelector.is(t,e)},e.querySelector=function(t,e){return this.runtime.sceneGraphSelector.selectOne(t,e)},e.querySelectorAll=function(t,e){return this.runtime.sceneGraphSelector.selectAll(t,e)},e.attach=function(t,e,n){t.parentNode&&this.detach(t),t.parentNode=e,_(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);n=e.sortable,(null!=n&&null!=(e=n.sorted)&&e.length||null!=(e=t.style)&&e.zIndex)&&(n.dirty=!0),e=t.transformable;e&&this.dirtifyWorld(t,e),e.frozen&&this.unfreezeParentToRoot(t)},e.detach=function(t){var e,n,r;t.parentNode&&(e=t.transformable,(null!=(n=t.parentNode.sortable)&&null!=(r=n.sorted)&&r.length||null!=(r=t.style)&&r.zIndex)&&(n.dirty=!0),-1<(r=t.parentNode.childNodes.indexOf(t))&&t.parentNode.childNodes.splice(r,1),e&&this.dirtifyWorld(t,e),t.parentNode=null)},e.getOrigin=function(t){return t.transformable.origin},e.setOrigin=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=k(e,n,r));n=t.transformable;Zt(e,n.origin)||((r=n.origin)[0]=e[0],r[1]=e[1],r[2]=e[2]||0,this.dirtifyLocal(t,n))},e.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=k(e,n,r));n=t.transformable;se(n.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,n)},e.scaleLocal=function(t,e){var n,r,i=t.transformable;n=i.localScale,r=i.localScale,e=k(e[0],e[1],e[2]||1),n[0]=r[0]*e[0],n[1]=r[1]*e[1],n[2]=r[2]*e[2],this.dirtifyLocal(t,i)},e.setLocalScale=function(t,e){var n=t.transformable,e=k(e[0],e[1],e[2]||n.localScale[2]);Zt(e,n.localScale)||(zt(n.localScale,e),this.dirtifyLocal(t,n))},e.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=le(e,n,r,i));n=t.transformable;ce(n.localRotation,e),this.dirtifyLocal(t,n)},e.setLocalSkew=function(t,e,n){"number"==typeof e&&(e=fe(e,n));var r,n=t.transformable;r=n.localSkew,e=e,r[0]=e[0],r[1]=e[1],this.dirtifyLocal(t,n)},e.dirtifyLocal=function(t,e){e.localDirtyFlag||(e.localDirtyFlag=!0,e.dirtyFlag)||this.dirtifyWorld(t,e)},e.dirtifyWorld=function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),this.dirtifyToRoot(t,!0)},e.triggerPendingEvents=function(){function r(t,e){t.isConnected&&!i.has(t.entity)&&(n.boundsChangedEvent.detail=e,(n.boundsChangedEvent.target=t).ownerDocument.defaultView.dispatchEvent(n.boundsChangedEvent,!0),i.add(t.entity))}var n=this,i=new Set;this.pendingEvents.forEach(function(t){var e=t[0],n=t[1];n.affectChildren?e.forEach(function(t){r(t,n)}):r(e,n)}),this.pendingEvents=[],i.clear()},e.dirtifyToRoot=function(t,e){void 0===e&&(e=!1);var n=t;for(n.renderable&&(n.renderable.dirty=!0);n;)ic(n),n=n.parentNode;e&&t.forEach(function(t){ic(t)}),this.informDependentDisplayObjects(t),this.pendingEvents.push([t,{affectChildren:e}])},e.updateDisplayObjectDependency=function(t,e,n,r){var i;e&&e!==n&&(e=this.displayObjectDependencyMap.get(e))&&e[t]&&(i=e[t].indexOf(r),e[t].splice(i,1)),n&&((e=this.displayObjectDependencyMap.get(n))||(this.displayObjectDependencyMap.set(n,{}),e=this.displayObjectDependencyMap.get(n)),e[t]||(e[t]=[]),e[t].push(r))},e.informDependentDisplayObjects=function(t){var n=this,r=this.displayObjectDependencyMap.get(t);r&&Object.keys(r).forEach(function(e){r[e].forEach(function(t){n.dirtifyToRoot(t,!0),t.dispatchEvent(new wo(y.ATTR_MODIFIED,t,n,n,e,wo.MODIFICATION,n,n)),t.isCustomElement&&t.isConnected&&t.attributeChangedCallback&&t.attributeChangedCallback(e,n,n)})})},e.getPosition=function(t){var e=t.transformable;return _t(e.position,this.getWorldTransform(t,e))},e.getRotation=function(t){var e=t.transformable;return Tt(e.rotation,this.getWorldTransform(t,e))},e.getScale=function(t){var e=t.transformable;return At(e.scaling,this.getWorldTransform(t,e))},e.getWorldTransform=function(t,e){return((e=void 0===e?t.transformable:e).localDirtyFlag||e.dirtyFlag)&&(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e)),e.worldTransform},e.getLocalPosition=function(t){return t.transformable.localPosition},e.getLocalRotation=function(t){return t.transformable.localRotation},e.getLocalScale=function(t){return t.transformable.localScale},e.getLocalSkew=function(t){return t.transformable.localSkew},e.getLocalTransform=function(t){t=t.transformable;return t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.localTransform},e.setLocalTransform=function(t,e){var n=_t(m(),e),r=Tt(re(),e),e=At(m(),e);this.setLocalScale(t,e),this.setLocalPosition(t,n),this.setLocalRotation(t,r)},e.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])},e.getTransformedGeometryBounds=function(t,e,n){e=this.getGeometryBounds(t,e=void 0===e?!1:e);return Dr.isEmpty(e)?null:((n=n||new Dr).setFromTransformedAABB(e,this.getWorldTransform(t)),n)},e.getGeometryBounds=function(t,e){t=t.geometry;return((e=void 0===e?!1:e)?t.renderBounds:t.contentBounds||null)||new Dr},e.getBounds=function(t,e){var n,r,i=this,a=(void 0===e&&(e=!1),t.renderable);return a.boundsDirty||e||!a.bounds?!a.renderBoundsDirty&&e&&a.renderBounds?a.renderBounds:(n=e?a.renderBounds:a.bounds,r=this.getTransformedGeometryBounds(t,e,n),t.childNodes.forEach(function(t){t=i.getBounds(t,e);t&&(r?r.add(t):(r=n||new Dr).update(t.center,t.halfExtents))}),e&&(t=ti(t))&&(t=t.style.clipPath.getBounds(e),r?t&&(r=t.intersection(r)):r=t),(r=r||new Dr)&&(e?a.renderBounds=r:a.bounds=r),e?a.renderBoundsDirty=!1:a.boundsDirty=!1,r):a.bounds},e.getLocalBounds=function(t){if(t.parentNode){var e,n=ht(),r=(t.parentNode.transformable&&(n=mt(ht(),this.getWorldTransform(t.parentNode))),this.getBounds(t));if(!Dr.isEmpty(r))return(e=new Dr).setFromTransformedAABB(r,n),e}return this.getBounds(t)},e.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t),i=(Dr.isEmpty(i)||(r=new Dr).setFromTransformedAABB(i,this.getWorldTransform(t)),null==(i=t.ownerDocument)||null==(t=i.defaultView)?void 0:t.getContextService().getBoundingClientRect());return r?(e=(t=r.getMin())[0],t=t[1],n=(r=r.getMax())[0],r=r[1],new Vr(e+((null==i?void 0:i.left)||0),t+((null==i?void 0:i.top)||0),n-e,r-t)):new Vr((null==i?void 0:i.left)||0,(null==i?void 0:i.top)||0,0,0)},e.dirtifyWorldInternal=function(t,e){var n=this;!e.dirtyFlag&&(e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach(function(t){var e=t.transformable;e.dirtyFlag||n.dirtifyWorldInternal(t,e)}),e=t.renderable)&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)},e.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])}},e.sync=function(t,e){var n;e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.dirtyFlag&&(n=(t=t.parentNode)&&t.transformable,null!==t&&n?bt(e.worldTransform,n.worldTransform,e.localTransform):dt(e.worldTransform,e.localTransform),e.dirtyFlag=!1)},e.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},t}(),sc={MetricsString:"|ÉqÅ",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},lc=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,cc=new RegExp(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source+"|"+/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source+"|"+/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source+"|"+/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source),uc=new RegExp(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source+"|"+/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source+"|"+/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source+"|"+/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source),hc=function(){function t(t){var n=this;this.runtime=void 0,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,e){return!n.isBreakingSpace(e)&&!(!t||!uc.exec(e)&&!cc.exec(t))},this.trimByKinsokuShorui=function(t){var e,n=[].concat(t),r=n[n.length-2];return r?(e=r[r.length-1],n[n.length-2]=r.slice(0,-1),n[n.length-1]=e+n[n.length-1],n):t},this.runtime=t}var e=t.prototype;return e.measureFont=function(t,e){if(this.fontMetricsCache[t])return this.fontMetricsCache[t];for(var n={ascent:0,descent:0,fontSize:0},r=this.runtime.offscreenCanvas.getOrCreateCanvas(e),e=this.runtime.offscreenCanvas.getOrCreateContext(e),i=(e.font=t,sc.MetricsString+sc.BaselineSymbol),a=Math.ceil(e.measureText(i).width),o=Math.ceil(e.measureText(sc.BaselineSymbol).width),s=sc.HeightMultiplier*o,o=o*sc.BaselineMultiplier|0,l=(r.width=a,r.height=s,e.fillStyle="#f00",e.fillRect(0,0,a,s),e.font=t,e.textBaseline="alphabetic",e.fillStyle="#000",e.fillText(i,0,o),e.getImageData(0,0,a||1,s||1).data),r=l.length,c=4*a,u=0,h=0,f=!1,u=0;u<o;++u){for(var d=0;d<c;d+=4)if(255!==l[h+d]){f=!0;break}if(f)break;h+=c}for(n.ascent=o-u,h=r-c,f=!1,u=s;o<u;--u){for(var p=0;p<c;p+=4)if(255!==l[h+p]){f=!0;break}if(f)break;h-=c}return n.descent=u-o,n.fontSize=n.ascent+n.descent,this.fontMetricsCache[t]=n},e.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,a=e.lineHeight,o=e.lineWidth,s=e.textBaseline,l=e.textAlign,c=e.letterSpacing,u=e.textPath,h=(e.textPathSide,e.textPathStartOffset,e.leading),h=void 0===h?0:h,f=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,t=t.fontWeight,e=pn(e)&&e+"px"||"16px",a=fn(n)?n.split(","):[n],o=a.length-1;0<=o;o--){var s=a[o].trim();!El.test(s)&&kl.indexOf(s)<0&&(s='"'+s+'"'),a[o]=s}return r+" "+i+" "+t+" "+e+" "+a.join(",")}(e),d=this.measureFont(f,n),p=(0===d.fontSize&&(d.fontSize=r,d.ascent=r),this.runtime.offscreenCanvas.getOrCreateContext(n));p.font=f,e.isOverflowing=!1;var g=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),y=new Array(g.length),m=0;if(!u){for(var v=0;v<g.length;v++){var b=p.measureText(g[v]).width+(g[v].length-1)*c;y[v]=b,m=Math.max(m,b)}var r=m+o,x=a||d.fontSize+o,i=Math.max(x,d.fontSize+o)+(g.length-1)*(x+h),w=0;return"middle"===s?w=-i/2:"bottom"===s||"alphabetic"===s||"ideographic"===s?w=-i:"top"!==s&&"hanging"!==s||(w=0),{font:f,width:r,height:i,lines:g,lineWidths:y,lineHeight:x+=h,maxLineWidth:m,fontProperties:d,lineMetrics:y.map(function(t,e){var n=0;return"center"===l||"middle"===l?n-=t/2:"right"!==l&&"end"!==l||(n-=t),new Vr(n-o/2,w+e*x,t+o,x)})}}u.getTotalLength(),u.getPoint(0);for(var k=0;k<g.length;k++)p.measureText(g[k]).width,g[k].length},e.setGraphemeOnPath=function(){},e.wordWrap=function(t,e,n){for(var r=this,i=e.wordWrapWidth,i=void 0===i?0:i,a=e.letterSpacing,o=e.maxLines,s=void 0===o?1/0:o,o=e.textOverflow,l=this.runtime.offscreenCanvas.getOrCreateContext(n),c=i+a,u="",h=("ellipsis"===o?u="...":o&&"clip"!==o&&(u=o),[]),f=0,d=0,p={},g=function(t){return r.getFromCache(t,a,p,l)},y=Array.from(u).reduce(function(t,e){return t+g(e)},0),m=Array.from(t),v=0;v<m.length;v++){var b=m[v],x=t[v-1],w=t[v+1],k=g(b);if(this.isNewline(b)){if(s<=++f){e.isOverflowing=!0;break}d=0,h[f]=""}else{if(0<d&&c<d+k){if(s<=f+1){if(e.isOverflowing=!0,0<y&&y<=c){for(var E=h[f].length,M=0,O=E,S=0;S<E;S++){var _=g(h[f][S]);if(c<M+_+y){O=S;break}M+=_}h[f]=(h[f]||"").slice(0,O)+u}break}if(d=0,h[++f]="",this.isBreakingSpace(b))continue;this.canBreakInLastChar(b)||(h=this.trimToBreakable(h),d=this.sumTextWidthByCache(h[f]||"",p)),this.shouldBreakByKinsokuShorui(b,w)&&(h=this.trimByKinsokuShorui(h),d+=g(x||""))}d+=k,h[f]=(h[f]||"")+b}}return h.join("\n")},e.isBreakingSpace=function(t){return"string"==typeof t&&0<=sc.BreakingSpaces.indexOf(t.charCodeAt(0))},e.isNewline=function(t){return"string"==typeof t&&0<=sc.Newlines.indexOf(t.charCodeAt(0))},e.trimToBreakable=function(t){var e,t=[].concat(t),n=t[t.length-2],r=this.findBreakableIndex(n);return-1!==r&&n&&(e=n.slice(r,r+1),e=r+(this.isBreakingSpace(e)?0:1),t[t.length-1]+=n.slice(r+1,n.length),t[t.length-2]=n.slice(0,e)),t},e.canBreakInLastChar=function(t){return!t||!lc.test(t)},e.sumTextWidthByCache=function(t,n){return t.split("").reduce(function(t,e){if(n[e])return t+n[e];throw Error("cannot count the word without cache")},0)},e.findBreakableIndex=function(t){for(var e=t.length-1;0<=e;e--)if(!lc.test(t[e]))return e;return-1},e.getFromCache=function(t,e,n,r){var i=n[t];return"number"!=typeof i&&(e=t.length*e,i=r.measureText(t).width+e,n[t]=i),i},t}(),w={},o=(c=new c,Zl=new Zl,(dw={})[E.CIRCLE]=new o,dw[E.ELLIPSE]=new $l,dw[E.RECT]=c,dw[E.IMAGE]=c,dw[E.GROUP]=c,dw[E.LINE]=new l,dw[E.TEXT]=new Jl(w),dw[E.POLYLINE]=Zl,dw[E.POLYGON]=Zl,dw[E.PATH]=new Kl,dw[E.HTML]=null,dw[E.MESH]=null,dw),Jl=($l=new r,c=new to,(l={})[i.PERCENTAGE]=null,l[i.NUMBER]=new ao,l[i.ANGLE]=new n,l[i.DEFINED_PATH]=new e,l[i.PAINT]=$l,l[i.COLOR]=$l,l[i.FILTER]=new Ka,l[i.LENGTH]=c,l[i.LENGTH_PERCENTAGE]=c,l[i.LENGTH_PERCENTAGE_12]=new eo,l[i.LENGTH_PERCENTAGE_14]=new no,l[i.COORDINATE]=new ro,l[i.OFFSET_DISTANCE]=new oo,l[i.OPACITY_VALUE]=new so,l[i.PATH]=new lo,l[i.LIST_OF_POINTS]=new co,l[i.SHADOW_BLUR]=new uo,l[i.TEXT]=new ho,l[i.TEXT_TRANSFORM]=new a,l[i.TRANSFORM]=new fo,l[i.TRANSFORM_ORIGIN]=new Ja,l[i.Z_INDEX]=new po,l[i.MARKER]=new io,l),Zl=(w.CameraContribution=dl,w.AnimationTimeline=null,w.EasingFunction=null,w.offscreenCanvas=new tc,w.displayObjectPool=new zo,w.sceneGraphSelector=new rc,w.sceneGraphService=new oc(w),w.textService=new hc(w),w.geometryUpdaterFactory=o,w.CSSPropertySyntaxFactory=Jl,w.styleValueRegistry=new j,w.layoutRegistry=null,function(){function t(){this.context=void 0,this.plugins=[]}var e=t.prototype;return e.addRenderingPlugin=function(t){this.plugins.push(t),this.context.renderingPlugins.push(t)},e.removeAllRenderingPlugins=function(){var e=this;this.plugins.forEach(function(t){t=e.context.renderingPlugins.indexOf(t);0<=t&&e.context.renderingPlugins.splice(t,1)})},t}()),Kl=function(){function t(t){this.plugins=[],this.config=void 0,this.config=fi({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1},t)}var e=t.prototype;return e.registerPlugin=function(e){-1===this.plugins.findIndex(function(t){return t===e})&&this.plugins.push(e)},e.unregisterPlugin=function(e){var t=this.plugins.findIndex(function(t){return t===e});-1<t&&this.plugins.splice(t,1)},e.getPlugins=function(){return this.plugins},e.getPlugin=function(e){return this.plugins.find(function(t){return t.name===e})},e.getConfig=function(){return this.config},e.setConfig=function(t){Object.assign(this.config,t)},t}(),fc=function(){function a(t){this.strategies=void 0,this.strategies=t}return a.prototype.apply=function(t){var n=t.camera,e=t.renderingService,r=t.renderingContext,i=this.strategies;e.hooks.cull.tap(a.tag,function(e){var t;return e&&(t=e.cullable,0===i.length?t.visible=-1<r.unculledEntities.indexOf(e.entity):t.visible=i.every(function(t){return t.isVisible(n,e)}),!e.isCulled()&&e.isVisible()?e:(e.dispatchEvent(new mo(y.CULLED)),null))}),e.hooks.afterRender.tap(a.tag,function(t){t.cullable.visibilityPlaneMask=-1})},a}(),dc=(fc.tag="Culling",function(){function n(){}return n.prototype.apply=function(t){var e=t.renderingService;e.hooks.dirtycheck.tap(n.tag,function(t){return t&&(t.renderable.dirty||e.disableDirtyRectangleRendering()?t:null)})},n}()),pc=(dc.tag="DirtyCheck",function(){function e(){var a=this;this.autoPreventDefault=!1,this.rootPointerEvent=new Ao(null),this.rootWheelEvent=new To(null),this.context=void 0,this.onPointerMove=function(t){var e,n=null==(e=a.context.renderingContext.root)||null==(e=e.ownerDocument)?void 0:e.defaultView;if(!n.supportsTouchEvents||"touch"!==t.pointerType){for(var r=mi(a.normalizeToPointerEvent(t,n));!(i=r()).done;){var i=i.value,i=a.bootstrapEvent(a.rootPointerEvent,i,n);a.context.eventService.mapEvent(i)}a.setCursor(a.context.eventService.cursor)}}}var t=e.prototype;return t.apply=function(t){var a=this,t=(this.context=t).renderingService,o=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(){var e=ci(M().mark(function t(e){var n;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a.context.renderingService.hooks.pick.promise({position:e,picked:[],topmost:!0});case 2:return n=t.sent,n=n.picked,t.abrupt("return",n[0]||null);case 5:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}()),t.hooks.pointerWheel.tap(e.tag,function(t){t=a.normalizeWheelEvent(t);a.context.eventService.mapEvent(t)}),t.hooks.pointerDown.tap(e.tag,function(t){if(!o.supportsTouchEvents||"touch"!==t.pointerType){var e=a.normalizeToPointerEvent(t,o);!a.autoPreventDefault||!e[0].isNormalized||!t.cancelable&&"cancelable"in t||t.preventDefault();for(var n=mi(e);!(r=n()).done;){var r=r.value,r=a.bootstrapEvent(a.rootPointerEvent,r,o);a.context.eventService.mapEvent(r)}a.setCursor(a.context.eventService.cursor)}}),t.hooks.pointerUp.tap(e.tag,function(t){if(!o.supportsTouchEvents||"touch"!==t.pointerType){var e=a.context.contextService.getDomElement(),n="outside";try{n=e&&t.target&&t.target!==e&&e.contains&&!e.contains(t.target)?"outside":""}catch(t){}for(var r=mi(a.normalizeToPointerEvent(t,o));!(i=r()).done;){var i=i.value,i=a.bootstrapEvent(a.rootPointerEvent,i,o);i.type+=n,a.context.eventService.mapEvent(i)}a.setCursor(a.context.eventService.cursor)}}),t.hooks.pointerMove.tap(e.tag,this.onPointerMove),t.hooks.pointerOver.tap(e.tag,this.onPointerMove),t.hooks.pointerOut.tap(e.tag,this.onPointerMove)},t.getViewportXY=function(t){var e,n=t.offsetX,r=t.offsetY,i=t.clientX,t=t.clientY;return t=!this.context.config.supportsCSSTransform||_(n)||_(r)?(e=(i=this.context.eventService.client2Viewport(new Wr(i,t))).x,i.y):(e=n,r),{x:e,y:t}},t.bootstrapEvent=function(t,e,n){t.view=n,t.originalEvent=null,t.nativeEvent=e,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 n=this.getViewportXY(e),r=n.x,n=n.y,r=(t.viewport.x=r,t.viewport.y=n,this.context.eventService.viewport2Canvas(t.viewport)),n=r.x,r=r.y;return t.canvas.x=n,t.canvas.y=r,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=e.isTrusted,"pointerleave"===t.type&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=si[t.type]||t.type),t},t.normalizeWheelEvent=function(t){var e=this.rootWheelEvent,n=(this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ,this.getViewportXY(t)),r=n.x,n=n.y,r=(e.viewport.x=r,e.viewport.y=n,this.context.eventService.viewport2Canvas(e.viewport)),n=r.x,r=r.y;return e.canvas.x=n,e.canvas.y=r,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.nativeEvent=t,e.type=t.type,e},t.transferMouseData=function(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.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.setCursor=function(t){this.context.contextService.applyCursorStyle(t||this.context.config.cursor||"default")},t.normalizeToPointerEvent=function(t,e){var n=[];if(e.isTouchEvent(t))for(var r=0;r<t.changedTouches.length;r++){var i=t.changedTouches[r];vn(i.button)&&(i.button=0),vn(i.buttons)&&(i.buttons=1),vn(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),vn(i.width)&&(i.width=i.radiusX||1),vn(i.height)&&(i.height=i.radiusY||1),vn(i.tiltX)&&(i.tiltX=0),vn(i.tiltY)&&(i.tiltY=0),vn(i.pointerType)&&(i.pointerType="touch"),vn(i.pointerId)&&(i.pointerId=i.identifier||0),vn(i.pressure)&&(i.pressure=i.force||.5),vn(i.twist)&&(i.twist=0),vn(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else e.isMouseEvent(t)?(vn((e=t).isPrimary)&&(e.isPrimary=!0),vn(e.width)&&(e.width=1),vn(e.height)&&(e.height=1),vn(e.tiltX)&&(e.tiltX=0),vn(e.tiltY)&&(e.tiltY=0),vn(e.pointerType)&&(e.pointerType="mouse"),vn(e.pointerId)&&(e.pointerId=1),vn(e.pressure)&&(e.pressure=.5),vn(e.twist)&&(e.twist=0),vn(e.tangentialPressure)&&(e.tangentialPressure=0),e.isNormalized=!0,n.push(e)):n.push(t);return n},e}()),gc=(pc.tag="Event",[E.CIRCLE,E.ELLIPSE,E.IMAGE,E.RECT,E.LINE,E.POLYLINE,E.POLYGON,E.TEXT,E.PATH,E.HTML]),yc=function(){function t(){}var e=t.prototype;return e.isVisible=function(t,e){var n,r,i=e.cullable;return!i.enable||(n=e.getRenderBounds(),!Dr.isEmpty(n)&&(t=t.getFrustum(),r=null==(r=e.parentNode)||null==(r=r.cullable)?void 0:r.visibilityPlaneMask,i.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(e,n,r||Ir.INDETERMINATE,t.planes),i.visible=i.visibilityPlaneMask!==Ir.OUTSIDE,i.visible))},e.computeVisibilityWithPlaneMask=function(t,e,n,r){if(n===Ir.OUTSIDE||n===Ir.INSIDE)return n;for(var i=Ir.INSIDE,a=-1<gc.indexOf(t.nodeName),o=0,s=r.length;o<s;++o){var l=1<<o;if(0!=(n&l)&&(!a||4!==o&&5!==o)){var c=r[o],u=c.normal,c=c.distance;if(qt(u,e.getPositiveFarPoint(r[o]))+c<0)return Ir.OUTSIDE;qt(u,e.getNegativeFarPoint(r[o]))+c<0&&(i|=l)}}return i},t}(),mc=function(){function c(){this.rBush=void 0,this.toSync=new Set}var t=c.prototype;return t.apply=function(t){function e(t){t.target.renderable.dirty=!0,o.dirtify()}function n(t){for(var e=t.detail.affectChildren,t=t.target,n=(e&&t.forEach(function(t){a.toSync.add(t)}),t);n;)n.renderable&&a.toSync.add(n),n=n.parentElement;o.dirtify()}function r(t){t=t.target,w.styleValueRegistry.recalc(t),w.sceneGraphService.dirtifyToRoot(t),o.dirtify()}function i(t){var e=(t=t.target).rBushNode;e.aabb&&a.rBush.remove(e.aabb),a.toSync.delete(t),w.sceneGraphService.dirtifyToRoot(t),o.dirtify()}var a=this,o=t.renderingService,s=t.renderingContext,t=t.rBushRoot,l=s.root.ownerDocument.defaultView;this.rBush=t;o.hooks.init.tapPromise(c.tag,ci(M().mark(function t(){return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:l.addEventListener(y.MOUNTED,r),l.addEventListener(y.UNMOUNTED,i),l.addEventListener(y.ATTR_MODIFIED,e),l.addEventListener(y.BOUNDS_CHANGED,n);case 4:case"end":return t.stop()}},t)}))),o.hooks.destroy.tap(c.tag,function(){l.removeEventListener(y.MOUNTED,r),l.removeEventListener(y.UNMOUNTED,i),l.removeEventListener(y.ATTR_MODIFIED,e),l.removeEventListener(y.BOUNDS_CHANGED,n)}),o.hooks.endFrame.tap(c.tag,function(){a.syncRTree()})},t.syncRTree=function(){var o=this,s=[];Array.from(this.toSync).filter(function(t){return t.isConnected}).forEach(function(t){var e,n,r,i=t.rBushNode,a=(i&&i.aabb&&o.rBush.remove(i.aabb),t.getRenderBounds());a&&(e=(n=a.getMin())[0],n=n[1],r=(a=a.getMax())[0],a=a[1],i.aabb||(i.aabb={}),i.aabb.id=t.entity,i.aabb.minX=e,i.aabb.minY=n,i.aabb.maxX=r,i.aabb.maxY=a),!i.aabb||isNaN(i.aabb.maxX)||isNaN(i.aabb.maxX)||isNaN(i.aabb.minX)||isNaN(i.aabb.minY)||s.push(i.aabb)}),this.rBush.load(s),s.length=0,this.toSync.clear()},c}(),vc=(mc.tag="Prepare",(dw=ac=ac||{}).READY="ready",dw.BEFORE_RENDER="beforerender",dw.AFTER_RENDER="afterrender",dw.BEFORE_DESTROY="beforedestroy",dw.AFTER_DESTROY="afterdestroy",dw.RESIZE="resize",dw.DIRTY_RECTANGLE="dirtyrectangle",new mo(y.MOUNTED)),bc=new mo(y.UNMOUNTED),xc=new mo(ac.BEFORE_RENDER),wc=new mo(ac.AFTER_RENDER),kc=function(k){function t(t){var e=k.call(this)||this,n=(e.document=void 0,e.customElements=void 0,e.requestAnimationFrame=void 0,e.cancelAnimationFrame=void 0,e.devicePixelRatio=void 0,e.supportsPointerEvents=void 0,e.supportsTouchEvents=void 0,e.isTouchEvent=void 0,e.isMouseEvent=void 0,e.Element=N,e.frameId=void 0,e.inited=!1,e.readyPromise=void 0,e.resolveReadyPromise=void 0,e.context={},e.document=new xo,e.document.defaultView=gi(e),e.customElements=new go,t.container),r=t.canvas,i=t.offscreenCanvas,a=t.width,o=t.height,s=t.devicePixelRatio,l=t.renderer,c=t.background,u=t.cursor,h=t.document,f=t.requestAnimationFrame,d=t.cancelAnimationFrame,p=t.createImage,g=t.supportsPointerEvents,y=t.supportsTouchEvents,m=t.supportsCSSTransform,v=t.isTouchEvent,t=t.isMouseEvent,b=(b=n,x=gi(e),b&&(b="string"==typeof b?b:b.id||Zr++,Kr[b]&&Kr[b].destroy(),Kr[b]=x),a),x=o,w=s;return r&&(w=1<=(w=s||Jr&&window.devicePixelRatio||1)?Math.ceil(w):1,b=a||("auto"===(a=ei(s=r,"width"))?s.offsetWidth:parseFloat(a))||r.width/w,x=o||("auto"===(a=ei(s=r,"height"))?s.offsetHeight:parseFloat(a))||r.height/w),e.devicePixelRatio=w,e.requestAnimationFrame=null!=f?f:Il.bind(globalThis),e.cancelAnimationFrame=null!=d?d:Bl.bind(globalThis),e.supportsTouchEvents=null!=y?y:"ontouchstart"in globalThis,e.supportsPointerEvents=null!=g?g:!!globalThis.PointerEvent,e.isTouchEvent=null!=v?v:function(t){return e.supportsTouchEvents&&t instanceof globalThis.TouchEvent},e.isMouseEvent=null!=t?t:function(t){return!globalThis.MouseEvent||t instanceof globalThis.MouseEvent&&(!e.supportsPointerEvents||!(t instanceof globalThis.PointerEvent))},e.initRenderingContext({container:n,canvas:r,width:b,height:x,renderer:l,offscreenCanvas:i,devicePixelRatio:w,cursor:u||"default",background:c||"transparent",createImage:p,document:h,supportsCSSTransform:m}),e.initDefaultCamera(b,x),ci(M().mark(function t(){return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.initRenderer(l);case 2:e.dispatchEvent(new mo(ac.READY)),e.readyPromise&&e.resolveReadyPromise();case 4:case"end":return t.stop()}},t)}))(),e}s(t,k);var e=t.prototype;return e.initRenderingContext=function(t){this.context.config=t,this.context.renderingContext={root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}},e.initDefaultCamera=function(t,e){var n=this,r=new w.CameraContribution;r.setType(_l.EXPLORING,Al.DEFAULT).setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0).setOrthographic(t/-2,t/2,e/2,e/-2,.1,1e3),r.canvas=this,r.eventEmitter.on(Xl,function(){n.context.renderingContext.renderReasons.add(Ul.CAMERA_CHANGED)}),this.context.camera=r},e.getConfig=function(){return this.context.config},e.getRoot=function(){return this.document.documentElement},e.getCamera=function(){return this.context.camera},e.getContextService=function(){return this.context.contextService},e.getEventService=function(){return this.context.eventService},e.getRenderingService=function(){return this.context.renderingService},e.getRenderingContext=function(){return this.context.renderingContext},e.getStats=function(){return this.getRenderingService().getStats()},e.destroy=function(t,e){void 0===t&&(t=!0),(e=void 0===e?!1:e)||this.dispatchEvent(new mo(ac.BEFORE_DESTROY)),this.frameId&&(this.getConfig().cancelAnimationFrame||cancelAnimationFrame)(this.frameId);var n=this.getRoot();this.unmountChildren(n),t&&this.document.destroy(),this.getRenderingService().destroy(),this.getContextService().destroy(),e||this.dispatchEvent(new mo(ac.AFTER_DESTROY))},e.changeSize=function(t,e){this.resize(t,e)},e.resize=function(t,e){var n=this.context.config,n=(n.width=t,n.height=e,this.getContextService().resize(t,e),this.context.camera),r=n.getProjectionMode();n.setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0),r===Tl.ORTHOGRAPHIC?n.setOrthographic(t/-2,t/2,e/2,e/-2,n.getNear(),n.getFar()):n.setAspect(t/e),this.dispatchEvent(new mo(ac.RESIZE,{width:t,height:e}))},e.appendChild=function(t,e){return this.document.documentElement.appendChild(t,e)},e.insertBefore=function(t,e){return this.document.documentElement.insertBefore(t,e)},e.removeChild=function(t){return this.document.documentElement.removeChild(t)},e.removeChildren=function(){this.document.documentElement.removeChildren()},e.destroyChildren=function(){this.document.documentElement.destroyChildren()},e.render=function(){this.dispatchEvent(xc),this.getRenderingService().render(this.getConfig()),this.dispatchEvent(wc)},e.run=function(){var e=this;(function t(){e.render(),e.frameId=requestAnimationFrame(t)})()},e.initRenderer=function(){var e=ci(M().mark(function t(e){return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}throw new Error("Renderer is required.");case 2:return this.inited=!1,this.readyPromise=void 0,this.context.rBushRoot=new Z,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new pc,new mc,new dc,new fc([new yc])),this.loadRendererContainerModule(e),this.context.contextService=new this.context.ContextService(fi({},w,this.context)),this.context.renderingService=new ec(w,this.context),this.context.eventService=new Ql(w,this.context),this.context.eventService.init(),t.next=14,this.context.contextService.init();case 14:return t.next=16,this.context.renderingService.init();case 16:this.inited=!0,this.getRoot().forEach(function(t){t=t.renderable;t&&(t.renderBoundsDirty=!0,t.boundsDirty=!0,t.dirty=!0)}),this.mountChildren(this.getRoot()),e.getConfig().enableAutoRendering&&this.run();case 20:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.loadRendererContainerModule=function(t){var e=this;t.getPlugins().forEach(function(t){t.context=e.context,t.init()})},e.setRenderer=function(){var e=ci(M().mark(function t(e){var n,r;return M().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((n=this.getConfig()).renderer===e)return t.abrupt("return");t.next=3;break;case 3:return r=n.renderer,n.renderer=e,this.destroy(!1,!0),[].concat(null==r?void 0:r.getPlugins()).reverse().forEach(function(t){t.destroy()}),t.next=9,this.initRenderer(e);case 9:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.setCursor=function(t){this.getConfig().cursor=t,this.getContextService().applyCursorStyle(t)},e.unmountChildren=function(t){var e=this;t.childNodes.forEach(function(t){e.unmountChildren(t)}),this.inited&&(t.isMutationObserved?t.dispatchEvent(bc):(bc.target=t,this.dispatchEvent(bc,!0)),t!==this.document.documentElement&&(t.ownerDocument=null),t.isConnected=!1),t.isCustomElement&&t.disconnectedCallback&&t.disconnectedCallback()},e.mountChildren=function(t){var e=this;this.inited?t.isConnected||(t.ownerDocument=this.document,t.isConnected=!0,t.isMutationObserved?t.dispatchEvent(vc):(vc.target=t,this.dispatchEvent(vc,!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.client2Viewport=function(t){return this.getEventService().client2Viewport(t)},e.viewport2Client=function(t){return this.getEventService().viewport2Client(t)},e.viewport2Canvas=function(t){return this.getEventService().viewport2Canvas(t)},e.canvas2Viewport=function(t){return this.getEventService().canvas2Viewport(t)},e.getPointByClient=function(t,e){return this.client2Viewport({x:t,y:e})},e.getClientByPoint=function(t,e){return this.viewport2Client({x:t,y:e})},hi(t,[{key:"ready",get:function(){var e=this;return this.readyPromise||(this.readyPromise=new Promise(function(t){e.resolveReadyPromise=function(){t(e)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise}}]),t}(vo);function Ec(t,e){return(Ec=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}r=function(i){var t;function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).landmarks=[],t.landmarkAnimationID=void 0,t}t=i,(n=e).prototype=Object.create(t.prototype),Ec(n.prototype.constructor=n,t);var n=e.prototype;return n.rotate=function(t,e,n){if(this.relElevation=ss(e),this.relAzimuth=ss(t),this.relRoll=ss(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===_l.EXPLORING){e=ie(re(),[1,0,0],cs((this.rotateWorld?1:-1)*this.relElevation)),t=ie(re(),[0,1,0],cs((this.rotateWorld?1:-1)*this.relAzimuth)),n=ie(re(),[0,0,1],cs(this.relRoll)),t=ae(re(),t,e),t=ae(re(),t,n),e=Lt(ht(),t);xt(this.matrix,this.matrix,[0,0,-this.distance]),bt(this.matrix,this.matrix,e),xt(this.matrix,this.matrix,[0,0,this.distance])}else{if(90<Math.abs(this.elevation))return this;this.computeMatrix()}return this._getAxes(),this.type===_l.ORBITING||this.type===_l.EXPLORING?this._getPosition():this.type===_l.TRACKING&&this._getFocalPoint(),this._update(),this},n.pan=function(t,e){t=ls(t,e,0),e=Bt(this.position);return Wt(e,e,Yt(m(),this.right,t[0])),Wt(e,e,Yt(m(),this.up,t[1])),this._setPosition(e),this.triggerUpdate(),this},n.dolly=function(t){var e=this.forward,n=Bt(this.position),t=(this.dollyingStep,this.distance+t*this.dollyingStep),t=Math.max(Math.min(t,this.maxDistance),this.minDistance)-this.distance;return n[0]+=t*e[0],n[1]+=t*e[1],n[2]+=t*e[2],this._setPosition(n),this.type===_l.ORBITING||this.type===_l.EXPLORING?this._getDistance():this.type===_l.TRACKING&&Wt(this.focalPoint,n,this.distanceVector),this.triggerUpdate(),this},n.createLandmark=function(t,e){var e=e=void 0===e?{}:e,n=e.position,n=void 0===n?this.position:n,r=e.focalPoint,r=void 0===r?this.focalPoint:r,i=e.roll,e=e.zoom,a=new w.CameraContribution,n=(a.setType(this.type,void 0),a.setPosition(n[0],n[1]||this.position[1],n[2]||this.position[2]),a.setFocalPoint(r[0],r[1]||this.focalPoint[1],r[2]||this.focalPoint[2]),a.setRoll(i||this.roll),a.setZoom(e||this.zoom),{name:t,matrix:ft(a.getWorldTransform()),right:Bt(a.right),up:Bt(a.up),forward:Bt(a.forward),position:Bt(a.getPosition()),focalPoint:Bt(a.getFocalPoint()),distanceVector:Bt(a.getDistanceVector()),distance:a.getDistance(),dollyingStep:a.getDollyingStep(),azimuth:a.getAzimuth(),elevation:a.getElevation(),roll:a.getRoll(),relAzimuth:a.relAzimuth,relElevation:a.relElevation,relRoll:a.relRoll,zoom:a.getZoom()});return this.landmarks.push(n),n},n.gotoLandmark=function(e,t){var n,s,r,i,l,c,u,h,f,d,p,g,y=this,a=(void 0===t&&(t={}),fn(e)?this.landmarks.find(function(t){return t.name===e}):e);a&&(n=void 0===(n=(t=pn(t)?{duration:t}:t).easing)?"linear":n,r=t.duration,s=void 0===r?100:r,r=void 0===(r=t.easingFunction)?void 0:r,t=t.onfinish,i=void 0===t?void 0:t,l=.01,0===s?(this.syncFromLandmark(a),i&&i()):(void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID),c=a.position,u=a.focalPoint,h=a.zoom,f=a.roll,d=r||w.EasingFunction(n),g=function(){y.setFocalPoint(u),y.setPosition(c),y.setRoll(f),y.setZoom(h),y.computeMatrix(),y.triggerUpdate(),i&&i()},this.canvas.requestAnimationFrame(function t(e){var n,r,i,a,o,e=e-(p=void 0===p?e:p);s<e||(n=d(e/s),r=m(),i=m(),a=1,o=0,Xt(r,y.focalPoint,u,n),Xt(i,y.position,c,n),o=y.roll*(1-n)+f*n,a=y.zoom*(1-n)+h*n,y.setFocalPoint(r),y.setPosition(i),y.setRoll(o),y.setZoom(a),Qt(r,u)+Qt(i,c)<=l)?g():(y.computeMatrix(),y.triggerUpdate(),e<s&&(y.landmarkAnimationID=y.canvas.requestAnimationFrame(t)))})))},n.syncFromLandmark=function(t){this.matrix=dt(this.matrix,t.matrix),this.right=zt(this.right,t.right),this.up=zt(this.up,t.up),this.forward=zt(this.forward,t.forward),this.position=zt(this.position,t.position),this.focalPoint=zt(this.focalPoint,t.focalPoint),this.distanceVector=zt(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}(dl);function Mc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,function(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);n=n.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}(r.key),r)}}function Oc(t,e,n){e&&Mc(t.prototype,e),n&&Mc(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function Sc(t,e){return(Sc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}w.CameraContribution=r;function _c(b,e,x,n){if(!(0<=b&&b<=1&&0<=x&&x<=1))throw new Error("bezier x values must be in [0, 1] range");if(b===e&&x===n)return function(t){return t};for(var w=new(Zc?Float32Array:Array)(11),t=0;t<11;++t)w[t]=eu(.1*t,b,x);function r(t){for(var e=0,n=1;10!==n&&w[n]<=t;++n)e+=.1;var r=e+.1*((t-w[--n])/(w[n+1]-w[n])),i=nu(r,b,x);if(.001<=i){for(var a=t,o=r,s=b,l=x,c=0;c<Xc;++c){var u=nu(o,s,l);if(0===u)return o;o-=(eu(o,s,l)-a)/u}return o}if(0===i)return r;for(var h,f,d=t,p=e,g=e+.1,y=b,m=x,v=0;0<(h=eu(f=p+(g-p)/2,y,m)-d)?g=f:p=f,Math.abs(h)>$c&&++v<Kc;);return f}return function(t){return 0===t||1===t?t:eu(r(t),e,n)}}function Ac(t){return Math.pow(t,2)}function Tc(t){return Math.pow(t,3)}function Pc(t){return Math.pow(t,4)}function Lc(t){return Math.pow(t,5)}function Nc(t){return Math.pow(t,6)}function Cc(t){return 1-Math.cos(t*Math.PI/2)}function jc(t){return 1-Math.sqrt(1-t*t)}function Rc(t){return t*t*(3*t-2)}function Fc(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)}function Ic(t,e){var n=(e=e=void 0===e?[]:e)[0],e=void 0===(e=e[1])?.5:e,n=dn(Number(void 0===n?1:n),1,10),e=dn(Number(e),.1,2);return 0===t||1===t?t:-n*Math.pow(2,10*(t-1))*Math.sin((t-1-e/(2*Math.PI)*Math.asin(1/n))*(2*Math.PI)/e)}function Bc(t,e,n){var r=(e=e=void 0===e?[]:e)[0],i=void 0===(i=e[1])?100:i,a=void 0===(a=e[2])?10:a,e=void 0===(e=e[3])?0:e,r=dn(void 0===r?1:r,.1,1e3),i=dn(i,.1,1e3),a=dn(a,.1,1e3),e=dn(e,.1,1e3),o=Math.sqrt(i/r),i=(a=a/(2*Math.sqrt(i*r)))<1?o*Math.sqrt(1-a*a):0,r=a<1?(a*o-e)/i:-e+o,e=n?n*t/1e3:t,e=a<1?Math.exp(-e*a*o)*(+Math.cos(i*e)+r*Math.sin(i*e)):(1+r*e)*Math.exp(-e*o);return 0===t||1===t?t:1-e}function Dc(t,e){var e=e=void 0===e?[]:e,n=void 0===(n=e[0])?10:n;return("start"==e[1]?Math.ceil:Math.floor)(dn(t,0,1)*n)/n}function zc(t,e){var n=(e=e=void 0===e?[]:e)[0],r=e[1],i=e[2],e=e[3];return _c(n,r,i,e)(t)}function Gc(r){return function(t,e,n){return 1-r(1-t,e=void 0===e?[]:e,n)}}function Wc(r){return function(t,e,n){return void 0===e&&(e=[]),t<.5?r(2*t,e,n)/2:1-r(-2*t+2,e,n)/2}}function Vc(r){return function(t,e,n){return void 0===e&&(e=[]),t<.5?(1-r(1-2*t,e,n))/2:(r(2*t-1,e,n)+1)/2}}function Yc(t){return t}var Hc=function(i){var t,e;function n(t,e,n,r){t=i.call(this,t)||this;return t.currentTime=void 0,t.timelineTime=void 0,t.currentTime=n,t.timelineTime=r,t.target=e,t.type="finish",t.bubbles=!1,t.currentTarget=e,t.defaultPrevented=!1,t.eventPhase=t.AT_TARGET,t.timeStamp=Date.now(),t.currentTime=n,t.timelineTime=r,t}return e=i,(t=n).prototype=Object.create(e.prototype),Sc(t.prototype.constructor=t,e),n}(yo),qc=0,Uc=function(){function t(t,e){this.effect=void 0,this.timeline=void 0,this.id=void 0,this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this.oldPlayState=void 0,this._holdTime=void 0,this.readyPromise=void 0,this.finishedPromise=void 0,this.resolveReadyPromise=void 0,this.rejectReadyPromise=void 0,this.resolveFinishedPromise=void 0,this.rejectFinishedPromise=void 0,this.onfinish=void 0,this.oncancel=void 0,this.onframe=void 0,this._currentTime=0,this._startTime=void 0,this._playbackRate=1,this._totalDuration=void 0,this._inEffect=void 0,this._inTimeline=!0,this.onremove=void 0,((this.effect=t).animation=this).timeline=e,this.id=""+qc++,this._inEffect=!!this.effect.update(0),this._totalDuration=Number(null==(t=this.effect)?void 0:t.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}var e=t.prototype;return e.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},e.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()},e.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()},e.finish=function(){this.updatePromises(),this._idle||(this.currentTime=0<this._playbackRate?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())},e.cancel=function(){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())},e.reverse=function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()},e.updatePlaybackRate=function(t){this.playbackRate=t},e.targetAnimations=function(){var t;return(null==(t=this.effect)?void 0:t.target).getAnimations()},e.markTarget=function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)},e.unmarkTarget=function(){var t=this.targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)},e.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))},e.rewind=function(){if(0<=this.playbackRate)this.currentTime=0;else{if(!(this._totalDuration<1/0))throw new Error("Unable to rewind negative playback rate animation with infinite duration");this.currentTime=this._totalDuration}},e.persist=function(){throw new Error(ai)},e.addEventListener=function(t,e,n){throw new Error(ai)},e.removeEventListener=function(t,e,n){throw new Error(ai)},e.dispatchEvent=function(t){throw new Error(ai)},e.commitStyles=function(){throw new Error(ai)},e.ensureAlive=function(){var t;this.playbackRate<0&&0===this.currentTime?this._inEffect=!(null==(t=this.effect)||!t.update(-1)):this._inEffect=!(null==(t=this.effect)||!t.update(this.currentTime)),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))},e.tickCurrentTime=function(t,e){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=0<this._playbackRate?this._totalDuration:0),this.ensureAlive())},e.fireEvents=function(t){var e,n=this;this._isFinished?this._finishedFlag||(this.onfinish&&(e=new Hc(null,this,this.currentTime,t),setTimeout(function(){n.onfinish&&n.onfinish(e)})),this._finishedFlag=!0):(this.onframe&&"running"===this.playState&&(t=new Hc(null,this,this.currentTime,t),this.onframe(t)),this._finishedFlag=!1)},Oc(t,[{key:"pending",get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"ready",get:function(){var n=this;return this.readyPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(t,e){n.resolveReadyPromise=function(){t(n)},n.rejectReadyPromise=function(){e(new Error)}}),this.pending)||this.resolveReadyPromise(),this.readyPromise}},{key:"finished",get:function(){var n=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(t,e){n.resolveFinishedPromise=function(){t(n)},n.rejectFinishedPromise=function(){e(new Error)}}),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){var e;t=Number(t),isNaN(t)||(this.timeline.restart(),this._paused||null===this._startTime||(this._startTime=Number(null==(e=this.timeline)?void 0:e.currentTime)-t/this.playbackRate),this.currentTimePending=!1,this._currentTime!==t&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this)))}},{key:"startTime",get:function(){return this._startTime},set:function(t){null!==t&&(this.updatePromises(),t=Number(t),isNaN(t)||this._paused||this._idle||(this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()))}},{key:"playbackRate",get:function(){return this._playbackRate},set:function(t){var e;t!==this._playbackRate&&(this.updatePromises(),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())}},{key:"_isFinished",get:function(){return!this._idle&&(0<this._playbackRate&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)}},{key:"totalDuration",get:function(){return this._totalDuration}},{key:"_needsTick",get:function(){return this.pending||"running"===this.playState||!this._finishedFlag}}]),t}(),Xc=4,$c=1e-7,Kc=10,Zc="function"==typeof Float32Array,Jc=function(t,e){return 1-3*e+3*t},Qc=function(t,e){return 3*e-6*t},tu=function(t){return 3*t},eu=function(t,e,n){return((Jc(e,n)*t+Qc(e,n))*t+tu(e))*t},nu=function(t,e,n){return 3*Jc(e,n)*t*t+2*Qc(e,n)*t+tu(e)},to=_c(.42,0,1,1),ru={steps:Dc,"step-start":function(t){return Dc(t,[1,"start"])},"step-end":function(t){return Dc(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":zc,ease:function(t){return zc(t,[.25,.1,.25,1])},in:to,out:Gc(to),"in-out":Wc(to),"out-in":Vc(to),"in-quad":Ac,"out-quad":Gc(Ac),"in-out-quad":Wc(Ac),"out-in-quad":Vc(Ac),"in-cubic":Tc,"out-cubic":Gc(Tc),"in-out-cubic":Wc(Tc),"out-in-cubic":Vc(Tc),"in-quart":Pc,"out-quart":Gc(Pc),"in-out-quart":Wc(Pc),"out-in-quart":Vc(Pc),"in-quint":Lc,"out-quint":Gc(Lc),"in-out-quint":Wc(Lc),"out-in-quint":Vc(Lc),"in-expo":Nc,"out-expo":Gc(Nc),"in-out-expo":Wc(Nc),"out-in-expo":Vc(Nc),"in-sine":Cc,"out-sine":Gc(Cc),"in-out-sine":Wc(Cc),"out-in-sine":Vc(Cc),"in-circ":jc,"out-circ":Gc(jc),"in-out-circ":Wc(jc),"out-in-circ":Vc(jc),"in-back":Rc,"out-back":Gc(Rc),"in-out-back":Wc(Rc),"out-in-back":Vc(Rc),"in-bounce":Fc,"out-bounce":Gc(Fc),"in-out-bounce":Wc(Fc),"out-in-bounce":Vc(Fc),"in-elastic":Ic,"out-elastic":Gc(Ic),"in-out-elastic":Wc(Ic),"out-in-elastic":Vc(Ic),spring:Bc,"spring-in":Bc,"spring-out":Gc(Bc),"spring-in-out":Wc(Bc),"spring-out-in":Vc(Bc)},iu=function(t){return("-"===(t=(t=t).replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})).charAt(0)?t.substring(1):t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()};function au(n,r){return function(t){var e;return 1<=t?1:(t+=r*(e=1/n))-t%e}}var ao="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",ou=new RegExp("cubic-bezier\\("+ao+","+ao+","+ao+","+ao+"\\)"),su=/steps\(\s*(\d+)\s*\)/,lu=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function cu(t){var e=ou.exec(t);return e?_c.apply(void 0,e.slice(1).map(Number)):(e=su.exec(t))?au(Number(e[1]),0):(e=lu.exec(t))?au(Number(e[1]),{start:1,middle:.5,end:0}[e[2]]):ru[iu(t)]||ru.linear}function uu(t){return Math.abs((0!==(e=t).duration&&0!==e.iterations?("auto"===e.duration?0:Number(e.duration))*(null!=(e=e.iterations)?e:1):0)/(t.playbackRate||1));var e}var hu=0,fu=1,du=2,pu=3;function gu(t,e,n){c=t,i=n;var r,i,a,o,s,l=null===(l=e)?hu:(r=i.endTime,l<Math.min(i.delay,r)?fu:l>=Math.min(i.delay+c+i.endDelay,r)?du:pu),c=function(t,e,n,r,i){switch(r){case fu:return"backwards"===e||"both"===e?0:null;case pu:return n-i;case du:return"forwards"===e||"both"===e?t:null;case hu:return null}}(t,n.fill,e,l,n.delay);return null===c?null:(i="auto"===n.duration?0:n.duration,r=i,t=l,e=n.iterations,o=c,s=n.iterationStart,0===r?t!==fu&&(s+=e):s+=o/r,e=t=s,o=n.iterationStart,s=l,a=n.iterations,c=c,i=i,e=o=0!==(o=e===1/0?o%1:e%1)||s!==du||0===a||0===c&&0!==i?o:1,s=n.iterations,a=e,c=t,i=l===du&&s===1/0?1/0:1===a?Math.floor(c)-1:Math.floor(c),o=n.direction,t=i,l=e,a="normal"===(s="normal"!==(s=o)&&"reverse"!==o&&(t=t,"alternate-reverse"===o&&(t+=1),s="normal",t!==1/0)&&t%2!=0?"reverse":s)?l:1-l,n.currentIteration=i,n.progress=a,n.easingFunction(a))}function yu(t,e,n){var a=function(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r]){var a;mu(i)&&(a={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:cu(t[r].easing)||e.easingFunction,value:t[r][i]},n[i]=n[i]||[],n[i].push(a))}return n}(t,e),o=function(t,e){var n,r=[];for(n in t)for(var i=t[n],a=0;a<i.length-1;a++){var o=a,s=a+1,l=i[o].computedOffset,c=i[s].computedOffset,u=l,h=c;0===a&&(u=-1/0,0===c)&&(s=o),a===i.length-2&&(h=1/0,1===l)&&(o=s),r.push({applyFrom:u,applyTo:h,startOffset:i[o].computedOffset,endOffset:i[s].computedOffset,easingFunction:i[o].easingFunction,property:n,interpolation:function(t,e,n,r){var i=zl[t];if(i&&i.syntax&&i.int){i=w.styleValueRegistry.getPropertySyntax(i.syntax);if(i){var a,o=w.styleValueRegistry.parseProperty(t,e,r),s=w.styleValueRegistry.parseProperty(t,n,r),o=w.styleValueRegistry.computeProperty(t,o,r),t=w.styleValueRegistry.computeProperty(t,s,r),s=i.mixer(o,t,r);if(s)return a=vu.apply(void 0,s),function(t){return 0===t?e:1===t?n:a(t)}}}return vu(!1,!0,function(t){return t?n:e})}(n,i[o].value,i[s].value,e)})}return r.sort(function(t,e){return t.startOffset-e.startOffset}),r}(a,n);return function(r,i){if(null!==i)o.filter(function(t){return i>=t.applyFrom&&i<t.applyTo}).forEach(function(t){var e=i-t.startOffset,n=t.endOffset-t.startOffset,e=0==n?0:t.easingFunction(e/n);r.style[t.property]=t.interpolation(e)});else for(var t in a)mu(t)&&(r.style[t]=null)}}function mu(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var vu=function(e,n,r){return function(t){return r(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)&&e.length===n.length){for(var i=[],a=0;a<e.length;a++)i.push(t(e[a],n[a],r));return i}throw new Error("Mismatched interpolation arguments "+e+":"+n)}(e,n,t))}};var bu=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=Yc,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.playbackRate=void 0,this.effect=void 0,this.composite=void 0,this.activeDuration=void 0,this.endTime=void 0,this.currentIteration=null,this.progress=null}return Oc(t,[{key:"easing",get:function(){return this._easing},set:function(t){this.easingFunction=cu(t),this._easing=t}}]),t}();function xu(t,i){if(null===t)return[];for(var e=(t=Array.isArray(t)?t:function(t){var e,n=[];for(e in t)if(!(e in["easing","offset","composite"]))for(var r,i=t[e],a=(i=Array.isArray(i)?i:[i]).length,o=0;o<a;o++)n[o]||(r={},"offset"in t&&(r.offset=Number(t.offset)),"easing"in t&&(r.easing=t.easing),"composite"in t&&(r.composite=t.composite),n[o]=r),void 0!==i[o]&&null!==i[o]&&(n[o][e]=i[o]);return n.sort(function(t,e){return(t.computedOffset||0)-(e.computedOffset||0)}),n}(t)).map(function(t){var e,n={};for(e in null!=i&&i.composite&&(n.composite="auto"),t){var r=t[e];if("offset"===e){if(null!==r){if(r=Number(r),!isFinite(r))throw new Error("Keyframe offsets must be numbers.");if(r<0||1<r)throw new Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=r}}else if("composite"===e&&-1===["replace","add","accumulate","auto"].indexOf(r))throw new Error(r+" compositing is not supported");n[e]=r}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==i?void 0:i.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n}),n=!0,r=-1/0,a=0;a<e.length;a++){var o=e[a].offset;if(_(o))n=!1;else{if(o<r)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");r=o}}if(e=e.filter(function(t){return 0<=Number(t.offset)&&Number(t.offset)<=1}),!n)for(var s=e.length,l=(e[s-1].computedOffset=Number(null!=(t=e[s-1].offset)?t:1),1<s&&(e[0].computedOffset=Number(null!=(t=e[0].offset)?t:0)),0),c=Number(e[0].computedOffset),u=1;u<s;u++){var h=e[u].computedOffset;if(!_(h)&&!_(c)){for(var f=1;f<u-l;f++)e[l+f].computedOffset=c+(Number(h)-c)*f/(u-l);l=u,c=Number(h)}}return e}var wu="backwards|forwards|both|none".split("|"),ku="reverse|alternate|alternate-reverse".split("|");function Eu(t,e){var n,r,i;return t=function(t){"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t});return t}(null!=(r=t)?r:{duration:"auto"}),n=t,r=e,i=new bu,r&&(i.fill="both",i.duration="auto"),"number"!=typeof n||isNaN(n)?void 0!==n&&Object.keys(n).forEach(function(t){void 0===n[t]||null===n[t]||"auto"===n[t]||!("number"!=typeof i[t]&&"duration"!==t||"number"==typeof n[t]&&!isNaN(n[t]))||"fill"===t&&-1===wu.indexOf(n[t])||"direction"===t&&-1===ku.indexOf(n[t])||(i[t]=n[t])}):i.duration=n,i}var Mu=function(){function t(t,e,n){var r=this;this.composite="replace",this.iterationComposite="replace",this.target=void 0,this.animation=void 0,this.timing=void 0,this.computedTiming=void 0,this.normalizedKeyframes=void 0,this.timeFraction=void 0,this.interpolations=void 0,this.target=t,this.timing=Eu(n,!1),(this.timing.effect=this).timing.activeDuration=uu(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=xu(e,this.timing),this.interpolations=yu(this.normalizedKeyframes,this.timing,this.target),this.computedTiming=new Proxy(this.timing,{get:function(t,e){return"duration"===e?"auto"===t.duration?0:t.duration:"fill"===e?"auto"===t.fill?"none":t.fill:"localTime"===e?r.animation&&r.animation.currentTime||null:"currentIteration"===e?r.animation&&"running"===r.animation.playState?t.currentIteration||0:null:"progress"===e?r.animation&&"running"===r.animation.playState?t.progress||0:null:t[e]},set:function(){return!0}})}var e=t.prototype;return e.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},e.update=function(t){return null!==t&&(this.timeFraction=gu(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},e.getKeyframes=function(){return this.normalizedKeyframes},e.setKeyframes=function(t){this.normalizedKeyframes=xu(t)},e.getComputedTiming=function(){return this.computedTiming},e.getTiming=function(){return this.timing},e.updateTiming=function(e){var n=this;Object.keys(e||{}).forEach(function(t){n.timing=e[t]})},t}();function Ou(t,e){return Number(t.id)-Number(e.id)}n=function(){function t(t){var n=this;this.document=void 0,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.frameId=void 0,this.webAnimationsNextTick=function(t){n.currentTime=t,n.discardAnimations(),0===n.animations.length?n.timelineTicking=!1:n.requestAnimationFrame(n.webAnimationsNextTick)},this.processRafCallbacks=function(e){var t=n.rafCallbacks;n.rafCallbacks=[],e<Number(n.currentTime)&&(e=Number(n.currentTime)),n.animations.sort(Ou),n.animations=n.tick(e,!0,n.animations)[0],t.forEach(function(t){t[1](e)}),n.applyPendingEffects()},this.document=t}var e=t.prototype;return e.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},e.isTicking=function(){return this.inTick},e.play=function(t,e,n){t=new Mu(t,e,n),e=new Uc(t,this);return this.animations.push(e),this.restartWebAnimationsNextTick(),e.updatePromises(),e.play(),e.updatePromises(),e},e.applyDirtiedAnimation=function(t){var e=this;this.inTick||(t.markTarget(),(t=t.targetAnimations()).sort(Ou),this.tick(Number(this.currentTime),!1,t.slice())[1].forEach(function(t){t=e.animations.indexOf(t);-1!==t&&e.animations.splice(t,1)}),this.applyPendingEffects())},e.restart=function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame(function(){}),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},e.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},e.applyPendingEffects=function(){this.pendingEffects.forEach(function(t){null!=t&&t.applyInterpolations()}),this.pendingEffects=[]},e.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(t){return t.updatePromises()})},e.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(t){return"finished"!==t.playState&&"idle"!==t.playState})},e.restartWebAnimationsNextTick=function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},e.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},e.requestAnimationFrame=function(e){var n=this;return this.rAF(function(t){n.updateAnimationsPromises(),e(t),n.updateAnimationsPromises()})},e.tick=function(n,r,t){var i=this,a=(this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=n,this.ticking=!1,[]),o=[],s=[],l=[];return t.forEach(function(t){t.tick(n,r),t._inEffect?(o.push(t.effect),t.markTarget()):(a.push(t.effect),t.unmarkTarget()),t._needsTick&&(i.ticking=!0);var e=t._inEffect||t._needsTick;((t._inTimeline=e)?s:l).push(t)}),(t=this.pendingEffects).push.apply(t,a),(t=this.pendingEffects).push.apply(t,o),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[s,l]},t}();function Su(t,e){return(Su=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function _u(t,e){e=e.r;t.arc(e,e,e,0,2*Math.PI,!1)}function Au(t,e){var n,r,i=e.rx,e=e.ry;t.ellipse?t.ellipse(i,e,i,e,0,0,2*Math.PI,!1):(n=e<i?i:e,r=e<i?1:i/e,e=e<i?e/i:1,t.save(),t.scale(r,e),t.arc(0,0,n,0,2*Math.PI))}function Tu(t,e){var n,r,i=e.x1,a=e.y1,o=e.x2,s=e.y2,l=e.defX,l=void 0===l?0:l,c=e.defY,c=void 0===c?0:c,u=e.markerStart,h=e.markerEnd,f=e.markerStartOffset,e=e.markerEndOffset,d=0,p=0,g=0,y=0,m=0;u&&u instanceof N&&f&&(n=o-i,r=s-a,m=Math.atan2(r,n),d=Math.cos(m)*(f||0),p=Math.sin(m)*(f||0)),h&&h instanceof N&&e&&(n=i-o,r=a-s,m=Math.atan2(r,n),g=Math.cos(m)*(e||0),y=Math.sin(m)*(e||0)),t.moveTo(i-l+d,a-c+p),t.lineTo(o-l+g,s-c+y)}function Pu(t,e){var n,r,i=e.defX,a=void 0===i?0:i,i=e.defY,o=void 0===i?0:i,i=e.markerStart,s=e.markerEnd,l=e.markerStartOffset,c=e.markerEndOffset,e=e.path,u=e.absolutePath,h=e.segments,f=0,d=0,p=0,g=0,e=0;i&&i instanceof N&&l&&(r=(i=i.parentNode.getStartTangent())[0],i=i[1],n=r[0]-i[0],r=r[1]-i[1],e=Math.atan2(r,n),f=Math.cos(e)*(l||0),d=Math.sin(e)*(l||0)),s&&s instanceof N&&c&&(l=(i=s.parentNode.getEndTangent())[0],s=i[1],n=l[0]-s[0],r=l[1]-s[1],e=Math.atan2(r,n),p=Math.cos(e)*(c||0),g=Math.sin(e)*(c||0));for(var y=0;y<u.length;y++){var m=u[y],v=m[0],b=u[y+1],x=0===y&&(0!==f||0!==d),w=(y===u.length-1||b&&("M"===b[0]||"Z"===b[0]))&&0!==p&&0!==g;switch(v){case"M":x?(t.moveTo(m[1]-a+f,m[2]-o+d),t.lineTo(m[1]-a,m[2]-o)):t.moveTo(m[1]-a,m[2]-o);break;case"L":w?t.lineTo(m[1]-a+p,m[2]-o+g):t.lineTo(m[1]-a,m[2]-o);break;case"Q":t.quadraticCurveTo(m[1]-a,m[2]-o,m[3]-a,m[4]-o),w&&t.lineTo(m[3]-a+p,m[4]-o+g);break;case"C":t.bezierCurveTo(m[1]-a,m[2]-o,m[3]-a,m[4]-o,m[5]-a,m[6]-o),w&&t.lineTo(m[5]-a+p,m[6]-o+g);break;case"A":var k,E,M=h[y].arcParams,O=M.cx,S=M.cy,_=M.rx,A=M.ry,T=M.startAngle,P=M.endAngle,L=M.xRotation,M=M.sweepFlag;t.ellipse?t.ellipse(O-a,S-o,_,A,L,T,P,!!(1-M)):(k=A<_?_:A,E=A<_?1:_/A,A=A<_?A/_:1,t.translate(O-a,S-o),t.rotate(L),t.scale(E,A),t.arc(0,0,k,T,P,!!(1-M)),t.scale(1/E,1/A),t.rotate(-L),t.translate(-(O-a),-(S-o))),w&&t.lineTo(m[6]-a+p,m[7]-o+g);break;case"Z":t.closePath()}}}function Lu(t,e){var n,r,i=e.defX,a=void 0===i?0:i,i=e.defY,o=void 0===i?0:i,i=e.markerStart,s=e.markerEnd,l=e.markerStartOffset,c=e.markerEndOffset,u=e.points.points,h=u.length,e=u[0][0]-a,f=u[0][1]-o,d=u[h-1][0]-a,p=u[h-1][1]-o,g=0,y=0,m=0,v=0,b=0;i&&i instanceof N&&l&&(n=u[1][0]-u[0][0],r=u[1][1]-u[0][1],b=Math.atan2(r,n),g=Math.cos(b)*(l||0),y=Math.sin(b)*(l||0)),s&&s instanceof N&&c&&(n=u[h-1][0]-u[0][0],r=u[h-1][1]-u[0][1],b=Math.atan2(r,n),m=Math.cos(b)*(c||0),v=Math.sin(b)*(c||0)),t.moveTo(e+(g||m),f+(y||v));for(var x=1;x<h-1;x++){var w=u[x];t.lineTo(w[0]-a,w[1]-o)}t.lineTo(d,p)}function Nu(t,e){var n,r,i=e.defX,a=void 0===i?0:i,i=e.defY,o=void 0===i?0:i,i=e.markerStart,s=e.markerEnd,l=e.markerStartOffset,c=e.markerEndOffset,u=e.points.points,h=u.length,e=u[0][0]-a,f=u[0][1]-o,d=u[h-1][0]-a,p=u[h-1][1]-o,g=0,y=0,m=0,v=0,b=0;i&&i instanceof N&&l&&(n=u[1][0]-u[0][0],r=u[1][1]-u[0][1],b=Math.atan2(r,n),g=Math.cos(b)*(l||0),y=Math.sin(b)*(l||0)),s&&s instanceof N&&c&&(n=u[h-2][0]-u[h-1][0],r=u[h-2][1]-u[h-1][1],b=Math.atan2(r,n),m=Math.cos(b)*(c||0),v=Math.sin(b)*(c||0)),t.moveTo(e+g,f+y);for(var x=1;x<h-1;x++){var w=u[x];t.lineTo(w[0]-a,w[1]-o)}t.lineTo(d+m,p+v)}function Cu(t,e){var n,r,i,a,o=e.radius,s=e.width,e=e.height,l=s,c=e;o&&o.some(function(t){return 0!==t})?(n=(s=0<s?1:-1)+(e=0<e?1:-1)==0,r=(o=o.map(function(t){return dn(t,0,Math.min(Math.abs(l)/2,Math.abs(c)/2))}))[0],i=o[1],a=o[2],o=o[3],t.moveTo(s*r,0),t.lineTo(l-s*i,0),0!==i&&t.arc(l-s*i,e*i,i,-e*Math.PI/2,0<s?0:Math.PI,n),t.lineTo(l,c-e*a),0!==a&&t.arc(l-s*a,c-e*a,a,0<s?0:Math.PI,0<e?Math.PI/2:1.5*Math.PI,n),t.lineTo(s*o,c),0!==o&&t.arc(s*o,c-e*o,o,0<e?Math.PI/2:-Math.PI/2,0<s?Math.PI:0,n),t.lineTo(0,e*r),0!==r&&t.arc(s*r,e*r,r,0<s?Math.PI:0,0<e?1.5*Math.PI:Math.PI/2,n)):t.rect(0,0,l,c)}w.EasingFunction=cu,w.AnimationTimeline=n;var ju=function(i){var t;function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).name="canvas-path-generator",t}t=i,(n=e).prototype=Object.create(t.prototype),Su(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){(t={})[E.CIRCLE]=_u,t[E.ELLIPSE]=Au,t[E.RECT]=Cu,t[E.LINE]=Tu,t[E.POLYLINE]=Nu,t[E.POLYGON]=Lu,t[E.PATH]=Pu,t[E.TEXT]=void 0,t[E.GROUP]=void 0,t[E.IMAGE]=void 0,t[E.HTML]=void 0,t[E.MESH]=void 0;var t;this.context.pathGeneratorFactory=t},n.destroy=function(){delete this.context.pathGeneratorFactory},e}(Zl);function Ru(){Ru=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return E()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===h)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function m(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:E}}function E(){return{value:void 0,done:!0}}return c(y,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},o.awrap=function(t){return{__await:t}},m(v.prototype),a(v.prototype,n,function(){return this}),o.AsyncIterator=v,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new v(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},m(y),a(y,i,"Generator"),a(y,r,function(){return this}),a(y,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},o}function Fu(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Iu(t,e){return(Iu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Bu(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Du(t,e){var n,r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){var n;if(t)return"string"==typeof t?Bu(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Bu(t,e):void 0}(t))||e&&t&&"number"==typeof t.length)return r&&(t=r),n=0,function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var zu=m(),Gu=m(),Wu=m(),Vu=ht(),Yu=function(){function s(){var o=this;this.canvasConfig=void 0,this.pathGeneratorFactory=void 0,this.pointInPathPickerFactory=void 0,this.isHit=function(t,e,n,r){var i=o.pointInPathPickerFactory[t.nodeName];if(i){var n=mt(Vu,n),e=$t(Gu,Gt(Wu,e[0],e[1],0),n),n=t.getGeometryBounds().halfExtents,a=t.parsedStyle.anchor;if(e[0]+=(a&&a[0]||0)*n[0]*2,e[1]+=(a&&a[1]||0)*n[1]*2,i(t,new Wr(e[0],e[1]),r,o.isPointInPath))return!0}return!1},this.isPointInPath=function(t,e){var n=w.offscreenCanvas.getOrCreateContext(o.canvasConfig.offscreenCanvas),r=o.pathGeneratorFactory[t.nodeName];return r&&(n.beginPath(),r(n,t.parsedStyle),n.closePath()),n.isPointInPath(e.x,e.y)}}var t=s.prototype;return t.apply=function(t){var n=this,e=t.config,r=t.renderingService,i=t.renderingContext,a=t.pathGeneratorFactory,t=t.pointInPathPickerFactory,o=(this.canvasConfig=e,this.pathGeneratorFactory=a,this.pointInPathPickerFactory=t,null==(e=i.root)?void 0:e.ownerDocument);r.hooks.pick.tapPromise(s.tag,function(){s=Ru().mark(function t(e){return Ru().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",n.pick(o,e));case 1:case"end":return t.stop()}},t)});var s,e=function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Fu(r,e,n,i,a,"next",t)}function a(t){Fu(r,e,n,i,a,"throw",t)}i(void 0)})};return function(t){return e.apply(this,arguments)}}()),r.hooks.pickSync.tap(s.tag,function(t){return n.pick(o,t)})},t.pick=function(t,e){for(var n=e.topmost,r=e.position,i=r.x,r=r.y,a=Gt(zu,i,r,0),o=[],s=Du(t.elementsFromBBox(a[0],a[1],a[0],a[1]));!(l=s()).done;){var l=l.value,c=l.getWorldTransform();if(this.isHit(l,a,c,!1)){c=ti(l);if(c){c=c.parsedStyle.clipPath;if(this.isHit(c,a,c.getWorldTransform(),!0)){if(n)return e.picked=[l],e;o.push(l)}}else{if(n)return e.picked=[l],e;o.push(l)}}}return e.picked=o,e},s}();function Hu(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function qu(t,e){return Math.abs(t-e)<.001}function Uu(t,e){var n=Math.min.apply(Math,t),r=Math.min.apply(Math,e);return{x:n,y:r,width:Math.max.apply(Math,t)-n,height:Math.max.apply(Math,e)-r}}function Xu(t){return(t+2*Math.PI)%(2*Math.PI)}Yu.tag="CanvasPicker";var $u={box:function(t,e,n,r){return Uu([t,n],[e,r])},length:Hu,pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,a){var o=(n-t)*(i-t)+(r-e)*(a-e);return o<0?Hu(t,e,i,a):(n-t)*(n-t)+(r-e)*(r-e)<o?Hu(n,r,i,a):this.pointToLine(t,e,n,r,i,a)},pointToLine:function(t,e,n,r,i,a){n=[n-t,r-e];return xe(n,[0,0])?Math.sqrt((i-t)*(i-t)+(a-e)*(a-e)):(ve(r=[-n[1],n[0]],r),Math.abs(be([i-t,a-e],r)))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function Ku(t,e,n,r,i,a){for(var o=-1,s=1/0,l=[n,r],c=20,u=1/(c=a&&200<a?a/10:c),h=u/10,f=0;f<=c;f++){var d=f*u,p=[i.apply(void 0,t.concat([d])),i.apply(void 0,e.concat([d]))],p=Hu(l[0],l[1],p[0],p[1]);p<s&&(o=d,s=p)}if(0===o)return{x:t[0],y:e[0]};if(1===o)return{x:t[(n=t.length)-1],y:e[n-1]};for(var s=1/0,g=0;g<32&&!(h<1e-4);g++){var y=o-h,m=o+h,v=[i.apply(void 0,t.concat([y])),i.apply(void 0,e.concat([y]))],v=Hu(l[0],l[1],v[0],v[1]);0<=y&&v<s?(o=y,s=v):(y=[i.apply(void 0,t.concat([m])),i.apply(void 0,e.concat([m]))],v=Hu(l[0],l[1],y[0],y[1]),m<=1&&v<s?(o=m,s=v):h*=.5)}return{x:i.apply(void 0,t.concat([o])),y:i.apply(void 0,e.concat([o]))}}function Zu(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function Ju(t,e,n){n=t+n-2*e;return qu(n,0)?[.5]:(t=(t-e)/n)<=1&&0<=t?[t]:[]}function Qu(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function th(t,e,n,r,i,a,o){var s=Zu(t,n,i,o),l=Zu(e,r,a,o),c=$u.pointAt(t,e,n,r,o),n=$u.pointAt(n,r,i,a,o);return[[t,e,c.x,c.y,s,l],[s,l,n.x,n.y,i,a]]}function eh(t,e,n,r,i,a,o){return 0===o?(Hu(t,e,n,r)+Hu(n,r,i,a)+Hu(t,e,i,a))/2:(e=(t=th(t,e,n,r,i,a,.5))[0],n=t[1],e.push(o-1),n.push(o-1),eh.apply(void 0,e)+eh.apply(void 0,n))}var nh={box:function(t,e,n,r,i,a){var o=Ju(t,n,i)[0],s=Ju(e,r,a)[0],l=[t,i],c=[e,a];return void 0!==o&&l.push(Zu(t,n,i,o)),void 0!==s&&c.push(Zu(e,r,a,s)),Uu(l,c)},length:function(t,e,n,r,i,a){return eh(t,e,n,r,i,a,3)},nearestPoint:function(t,e,n,r,i,a,o,s){return Ku([t,n,i],[e,r,a],o,s,Zu)},pointDistance:function(t,e,n,r,i,a,o,s){t=this.nearestPoint(t,e,n,r,i,a,o,s);return Hu(t.x,t.y,o,s)},interpolationAt:Zu,pointAt:function(t,e,n,r,i,a,o){return{x:Zu(t,n,i,o),y:Zu(e,r,a,o)}},divide:th,tangentAngle:function(t,e,n,r,i,a,o){t=Qu(t,n,i,o),n=Qu(e,r,a,o);return Xu(Math.atan2(n,t))}};function rh(t,e,n,r,i){var a=1-i;return a*a*a*t+3*e*i*a*a+3*n*i*i*a+r*i*i*i}function ih(t,e,n,r,i){var a=1-i;return 3*(a*a*(e-t)+2*a*i*(n-e)+i*i*(r-n))}function ah(t,e,n,r){var i,a,r=-3*t+9*e-9*n+3*r,n=6*t-12*e+6*n,e=3*e-3*t,t=[];return qu(r,0)?qu(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):qu(e=n*n-4*r*e,0)?t.push(-n/(2*r)):0<e&&(a=(-n-(e=Math.sqrt(e)))/(2*r),0<=(i=(-n+e)/(2*r))&&i<=1&&t.push(i),0<=a)&&a<=1&&t.push(a),t}function oh(t,e,n,r,i,a,o,s,l){var c=rh(t,n,i,o,l),u=rh(e,r,a,s,l),h=$u.pointAt(t,e,n,r,l),n=$u.pointAt(n,r,i,a,l),r=$u.pointAt(i,a,o,s,l),i=$u.pointAt(h.x,h.y,n.x,n.y,l),a=$u.pointAt(n.x,n.y,r.x,r.y,l);return[[t,e,h.x,h.y,i.x,i.y,c,u],[c,u,a.x,a.y,r.x,r.y,o,s]]}function sh(t,e,n,r,i,a,o,s,l){if(0===l){for(var c=[t,n,i,o],u=[e,r,a,s],h=0,f=c.length,d=0;d<f;d++)h+=Hu(c[d],u[d],c[(d+1)%f],u[(d+1)%f]);return h/2}t=oh(t,e,n,r,i,a,o,s,.5),e=[].concat(t[0],[l-1]),n=[].concat(t[1],[l-1]);return sh.apply(void 0,e)+sh.apply(void 0,n)}var lh={extrema:ah,box:function(t,e,n,r,i,a,o,s){for(var l=[t,o],c=[e,s],u=ah(t,n,i,o),h=ah(e,r,a,s),f=0;f<u.length;f++)l.push(rh(t,n,i,o,u[f]));for(var d=0;d<h.length;d++)c.push(rh(e,r,a,s,h[d]));return Uu(l,c)},length:function(t,e,n,r,i,a,o,s){return sh(t,e,n,r,i,a,o,s,3)},nearestPoint:function(t,e,n,r,i,a,o,s,l,c,u){return Ku([t,n,i,o],[e,r,a,s],l,c,rh,u)},pointDistance:function(t,e,n,r,i,a,o,s,l,c,u){t=this.nearestPoint(t,e,n,r,i,a,o,s,l,c,u);return Hu(t.x,t.y,l,c)},interpolationAt:rh,pointAt:function(t,e,n,r,i,a,o,s,l){return{x:rh(t,n,i,o,l),y:rh(e,r,a,s,l)}},divide:oh,tangentAngle:function(t,e,n,r,i,a,o,s,l){t=ih(t,n,i,o,l),n=ih(e,r,a,s,l);return Xu(Math.atan2(n,t))}};function ch(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function uh(t,e,n,r,i,a){return t<=i&&i<=t+n&&e<=a&&a<=e+r}function hh(t,e,n,r,i,a,o,s){var l=(Math.atan2(s-e,o-t)+2*Math.PI)%(2*Math.PI),t={x:t+n*Math.cos(l),y:e+n*Math.sin(l)};return ch(t.x,t.y,o,s)<=a/2}function fh(t,e,n,r,i,a,o){var s=Math.min(t,n),l=Math.max(t,n),c=Math.min(e,r),u=Math.max(e,r),h=i/2;return s-h<=a&&a<=l+h&&c-h<=o&&o<=u+h&&$u.pointToLine(t,e,n,r,a,o)<=i/2}function dh(t,e,n,r,i){var a=t.length;if(!(a<2)){for(var o=0;o<a-1;o++)if(fh(t[o][0],t[o][1],t[o+1][0],t[o+1][1],e,n,r))return!0;if(i){var i=t[0],s=t[a-1];if(fh(i[0],i[1],s[0],s[1],e,n,r))return!0}}return!1}var ph=1e-6;function gh(t){return Math.abs(t)<ph?0:t<0?-1:1}function yh(t,e,n){var r=!1,i=t.length;if(i<=2)return!1;for(var a,o,s,l=0;l<i;l++){var c=t[l],u=t[(l+1)%i];if(o=u,((s=[e,n])[0]-(a=c)[0])*(o[1]-a[1])==(o[0]-a[0])*(s[1]-a[1])&&Math.min(a[0],o[0])<=s[0]&&s[0]<=Math.max(a[0],o[0])&&Math.min(a[1],o[1])<=s[1]&&s[1]<=Math.max(a[1],o[1]))return!0;0<gh(c[1]-n)!=0<gh(u[1]-n)&&gh(e-(n-c[1])*(c[0]-u[0])/(c[1]-u[1])-c[0])<0&&(r=!r)}return r}function mh(t,e,n){for(var r=!1,i=0;i<t.length&&!(r=yh(t[i],e,n));i++);return r}function vh(t,e,n){var t=t.parsedStyle,r=t.r,i=t.fill,a=t.stroke,o=t.lineWidth,s=t.increasedLineWidthForHitTesting,t=t.pointerEvents,o=((o||0)+(s||0))/2,s=ch(r,r,e.x,e.y),e=el(t,i,a),t=e[0],i=e[1];return t&&i||n?s<=r+o:t?s<=r:!!i&&r-o<=s&&s<=r+o}function bh(t,e,n,r){return t/(n*n)+e/(r*r)}function xh(t,e,n){var t=t.parsedStyle,r=t.rx,i=t.ry,a=t.fill,o=t.stroke,s=t.lineWidth,l=t.increasedLineWidthForHitTesting,t=t.pointerEvents,c=e.x,e=e.y,t=el(t,a,o),a=t[0],o=t[1],t=((s||0)+(l||0))/2,s=(c-r)*(c-r),l=(e-i)*(e-i);return a&&o||n?bh(s,l,r+t,i+t)<=1:a?bh(s,l,r,i)<=1:!!o&&1<=bh(s,l,r-t,i-t)&&bh(s,l,r+t,i+t)<=1}function wh(t,e,n){var t=t.parsedStyle,r=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.lineWidth,l=t.increasedLineWidthForHitTesting,c=t.defX,u=t.defY;return!(!el(t.pointerEvents,t.fill,t.stroke)[1]&&!n||!s)&&fh(r,i,a,o,(s||0)+(l||0),e.x+(void 0===c?0:c),e.y+(void 0===u?0:u))}function kh(t,e,n,r){var i=t.parsedStyle,a=i.lineWidth,o=i.increasedLineWidthForHitTesting,s=i.stroke,l=i.fill,c=i.defX,c=void 0===c?0:c,u=i.defY,u=void 0===u?0:u,h=i.path,i=el(i.pointerEvents,l,s),l=i[0],s=i[1],i=h.segments,f=h.hasArc,d=h.polylines,h=h.polygons,p=Vs(t),g=!1;return l||n?f?r(t,e):mh(h,e.x+c,e.y+u)||mh(d,e.x+c,e.y+u):s||n?function(t,e,n,r,i){for(var a=!1,o=e/2,s=0;s<t.length;s++){var l=t[s],c=l.currentPoint,u=l.params,h=l.prePoint,f=l.box;if(!f||uh(f.x-o,f.y-o,f.width+e,f.height+e,n,r))switch(l.command){case"L":case"Z":if(a=fh(h[0],h[1],c[0],c[1],e,n,r))return!0;break;case"Q":if(a=nh.pointDistance(h[0],h[1],u[1],u[2],u[3],u[4],n,r)<=e/2)return!0;break;case"C":if(a=lh.pointDistance(h[0],h[1],u[1],u[2],u[3],u[4],u[5],u[6],n,r,i)<=e/2)return!0;break;case"A":l.cubicParams||(l.cubicParams=Ge(h[0],h[1],u[1],u[2],u[3],u[4],u[5],u[6],u[7],void 0));for(var d=l.cubicParams,p=h,g=0;g<d.length;g+=6){var y=lh.pointDistance(p[0],p[1],d[g],d[g+1],d[g+2],d[g+3],d[g+4],d[g+5],n,r,i),p=[d[g+4],d[g+5]];if(a=y<=e/2)return!0}}}return a}(i,(a||0)+(o||0),e.x+c,e.y+u,p):g}function Eh(t,e,n){var t=t.parsedStyle,r=t.stroke,i=t.fill,a=t.lineWidth,o=t.increasedLineWidthForHitTesting,s=t.points,l=t.defX,l=void 0===l?0:l,c=t.defY,c=void 0===c?0:c,t=el(t.pointerEvents,i,r),i=t[0],r=!1;return r=(r=t[1]||n?dh(s.points,(a||0)+(o||0),e.x+l,e.y+c,!0):r)||!i&&!n?r:yh(s.points,e.x+l,e.y+c)}function Mh(t,e,n){var t=t.parsedStyle,r=t.lineWidth,i=t.increasedLineWidthForHitTesting,a=t.points,o=t.defX,s=t.defY;return!(!el(t.pointerEvents,t.fill,t.stroke)[1]&&!n||!r)&&dh(a.points,(r||0)+(i||0),e.x+(void 0===o?0:o),e.y+(void 0===s?0:s),!1)}function Oh(t,e,n,r){var i,a,o,s,l,c,u,h,f,d=t.parsedStyle,p=d.radius,g=d.fill,y=d.stroke,m=d.lineWidth,v=d.increasedLineWidthForHitTesting,b=d.width,x=d.height,d=el(d.pointerEvents,g,y),g=d[0],y=d[1],d=(m||0)+(v||0);return p&&p.some(function(t){return 0!==t})?(m=!1,(y||n)&&(u=v=0,s=b,c=x,p=p.map(function(t){return dn(t,0,Math.min(Math.abs(b)/2,Math.abs(x)/2))}),f=d,i=e.x,a=e.y,h=p[0],o=p[1],l=p[2],p=p[3],m=fh(v+h,u,v+s-o,u,f,i,a)||fh(v+s,u+o,v+s,u+c-l,f,i,a)||fh(v+s-l,u+c,v+p,u+c,f,i,a)||fh(v,u+c-p,v,u+h,f,i,a)||hh(v+s-o,u+o,o,Math.PI,Math.PI,f,i,a)||hh(v+s-l,u+c-l,l,0,Math.PI,f,i,a)||hh(v+p,u+c-p,p,Math.PI,Math.PI,f,i,a)||hh(v+h,u+h,h,Math.PI,Math.PI,f,i,a)),m||!g&&!n?m:r(t,e)):(o=d/2,g&&y||n?uh(0-o,0-o,b+o,x+o,e.x,e.y):g?uh(0,0,b,x,e.x,e.y):!!y&&(l=s=0,c=b,p=x,v=d,u=e.x,h=e.y,uh(s-(f=v/2),l-f,c,v,u,h)||uh(s+c-f,l-f,v,p,u,h)||uh(s+f,l+p-f,c,v,u,h)||uh(s-f,l+f,v,p,u,h)))}var Sh=function(i){var t;function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).name="canvas-picker",t}t=i,(n=e).prototype=Object.create(t.prototype),Iu(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){function t(){return!0}(e={})[E.CIRCLE]=vh,e[E.ELLIPSE]=xh,e[E.RECT]=Oh,e[E.LINE]=wh,e[E.POLYLINE]=Mh,e[E.POLYGON]=Eh,e[E.PATH]=kh,e[E.TEXT]=t,e[E.GROUP]=null,e[E.IMAGE]=t,e[E.HTML]=null,e[E.MESH]=null;var e;this.context.pointInPathPickerFactory=e,this.addRenderingPlugin(new Yu)},n.destroy=function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()},e}(Zl);function _h(){_h=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return E()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===h)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function m(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:E}}function E(){return{value:void 0,done:!0}}return c(y,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},o.awrap=function(t){return{__await:t}},m(v.prototype),a(v.prototype,n,function(){return this}),o.AsyncIterator=v,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new v(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},m(y),a(y,i,"Generator"),a(y,r,function(){return this}),a(y,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},o}function Ah(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Th(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Ah(r,e,n,i,a,"next",t)}function a(t){Ah(r,e,n,i,a,"throw",t)}i(void 0)})}}function Ph(){return(Ph=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Lh(t,e){return(Lh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var Nh=function(){function r(t){this.canvasRendererPluginOptions=void 0,this.context=void 0,this.pathGeneratorFactory=void 0,this.rBush=void 0,this.removedRBushNodeAABBs=[],this.renderQueue=[],this.restoreStack=[],this.clearFullScreen=!1,this.vpMatrix=ht(),this.dprMatrix=ht(),this.tmpMat4=ht(),this.vec3a=m(),this.vec3b=m(),this.vec3c=m(),this.vec3d=m(),this.canvasRendererPluginOptions=t}var t=r.prototype;return t.apply=function(t){function a(t){(t=t.target.rBushNode).aabb&&u.removedRBushNodeAABBs.push(t.aabb)}function o(t){(t=t.target.rBushNode).aabb&&u.removedRBushNodeAABBs.push(t.aabb)}function c(t,e){t.isVisible()&&!t.isCulled()&&(u.renderDisplayObject(t,e,u.context,u.restoreStack),u.saveDirtyAABB(t)),(t.sortable.sorted||t.childNodes).forEach(function(t){c(t,e)})}var u=this,h=(this.context=t).config,f=t.camera,l=t.renderingService,d=t.renderingContext,e=t.rBushRoot,n=t.pathGeneratorFactory,p=(this.rBush=e,this.pathGeneratorFactory=n,t.contextService),g=d.root.ownerDocument.defaultView;l.hooks.init.tapPromise(r.tag,Th(_h().mark(function t(){var e,n,r,i;return _h().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:g.addEventListener(y.UNMOUNTED,a),g.addEventListener(y.CULLED,o),e=p.getDPR(),n=h.width,r=h.height,i=p.getContext(),u.clearRect(i,0,0,n*e,r*e,h.background);case 6:case"end":return t.stop()}},t)}))),l.hooks.destroy.tap(r.tag,function(){g.removeEventListener(y.UNMOUNTED,a),g.removeEventListener(y.CULLED,o)}),l.hooks.beginFrame.tap(r.tag,function(){var t=p.getContext(),e=p.getDPR(),n=h.width,r=h.height,i=u.canvasRendererPluginOptions,a=i.dirtyObjectNumThreshold,i=i.dirtyObjectRatioThreshold,o=l.getStats(),s=o.total,o=o.rendered,s=o/s;u.clearFullScreen=l.disableDirtyRectangleRendering()||a<o&&i<s,t&&(t.resetTransform(),u.clearFullScreen)&&u.clearRect(t,0,0,n*e,r*e,h.background)});l.hooks.endFrame.tap(r.tag,function(){var e=p.getContext(),t=p.getDPR();if(Ot(u.dprMatrix,k(t,t,1)),bt(u.vpMatrix,u.dprMatrix,f.getOrthoMatrix()),u.clearFullScreen)c(d.root,e);else{t=u.safeMergeAABB.apply(u,[u.mergeDirtyAABBs(u.renderQueue)].concat(u.removedRBushNodeAABBs.map(function(t){var e=t.minX,n=t.minY,r=t.maxX,t=t.maxY,i=new Dr;return i.setMinMax(k(e,n,0),k(r,t,0)),i})));if(u.removedRBushNodeAABBs=[],Dr.isEmpty(t))return void(u.renderQueue=[]);var n=u.convertAABB2Rect(t),r=n.x,i=n.y,a=n.width,n=n.height,o=$t(u.vec3a,k(r,i,0),u.vpMatrix),s=$t(u.vec3b,k(r+a,i,0),u.vpMatrix),l=$t(u.vec3c,k(r,i+n,0),u.vpMatrix),r=$t(u.vec3d,k(r+a,i+n,0),u.vpMatrix),a=Math.min(o[0],s[0],r[0],l[0]),i=Math.min(o[1],s[1],r[1],l[1]),n=Math.max(o[0],s[0],r[0],l[0]),o=Math.max(o[1],s[1],r[1],l[1]),s=Math.floor(a),r=Math.floor(i),l=Math.ceil(n-a),n=Math.ceil(o-i);e.save(),u.clearRect(e,s,r,l,n,h.background),e.beginPath(),e.rect(s,r,l,n),e.clip(),e.setTransform(u.vpMatrix[0],u.vpMatrix[1],u.vpMatrix[4],u.vpMatrix[5],u.vpMatrix[12],u.vpMatrix[13]),h.renderer.getConfig().enableDirtyRectangleRenderingDebug&&g.dispatchEvent(new mo(ac.DIRTY_RECTANGLE,{dirtyRect:{x:s,y:r,width:l,height:n}})),u.searchDirtyObjects(t).sort(function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder}).forEach(function(t){t&&t.isVisible()&&!t.isCulled()&&u.renderDisplayObject(t,e,u.context,u.restoreStack)}),e.restore(),u.renderQueue.forEach(function(t){u.saveDirtyAABB(t)}),u.renderQueue=[]}u.restoreStack.forEach(function(){e.restore()}),u.restoreStack=[]}),l.hooks.render.tap(r.tag,function(t){u.clearFullScreen||u.renderQueue.push(t)})},t.clearRect=function(t,e,n,r,i,a){t.clearRect(e,n,r,i),a&&(t.fillStyle=a,t.fillRect(e,n,r,i))},t.renderDisplayObject=function(t,e,n,r){var i,a=t.nodeName,o=r[r.length-1],o=(!o||t.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINS||(e.restore(),r.pop()),this.context.styleRendererFactory[a]),a=this.pathGeneratorFactory[a],s=t.parsedStyle.clipPath;s&&(this.applyWorldTransform(e,s),i=this.pathGeneratorFactory[s.nodeName])&&(e.save(),r.push(t),e.beginPath(),i(e,s.parsedStyle),e.closePath(),e.clip()),o&&(this.applyWorldTransform(e,t),e.save(),this.applyAttributesToContext(e,t)),a&&(e.beginPath(),a(e,t.parsedStyle),t.nodeName!==E.LINE)&&t.nodeName!==E.PATH&&t.nodeName!==E.POLYLINE&&e.closePath(),o&&(o.render(e,t.parsedStyle,t,n,this),e.restore()),t.renderable.dirty=!1},t.convertAABB2Rect=function(t){var e=t.getMin(),t=t.getMax(),n=Math.floor(e[0]),e=Math.floor(e[1]);return{x:n,y:e,width:Math.ceil(t[0])-n,height:Math.ceil(t[1])-e}},t.mergeDirtyAABBs=function(t){var n=new Dr;return t.forEach(function(t){var e=t.getRenderBounds(),e=(n.add(e),t.renderable.dirtyRenderBounds);e&&n.add(e)}),n},t.searchDirtyObjects=function(t){var e=t.getMin(),n=e[0],e=e[1],t=t.getMax(),r=t[0],t=t[1];return this.rBush.search({minX:n,minY:e,maxX:r,maxY:t}).map(function(t){t=t.id;return w.displayObjectPool.getByEntity(t)})},t.saveDirtyAABB=function(t){var e=t.renderable,t=(e.dirtyRenderBounds||(e.dirtyRenderBounds=new Dr),t.getRenderBounds());t&&e.dirtyRenderBounds.update(t.center,t.halfExtents)},t.applyAttributesToContext=function(t,e){var n=e.parsedStyle,r=n.stroke,i=n.fill,a=n.opacity,o=n.lineDash,n=n.lineDashOffset;o&&t.setLineDash(o),_(n)||(t.lineDashOffset=n),_(a)||(t.globalAlpha*=a),_(r)||Array.isArray(r)||r.isNone||(t.strokeStyle=e.attributes.stroke),_(i)||Array.isArray(i)||i.isNone||(t.fillStyle=e.attributes.fill)},t.applyWorldTransform=function(t,e,n){var r=0,i=0,a=(e.parsedStyle||{}).anchor,o=a&&a[0]||0,a=a&&a[1]||0;0===o&&0===a||(r=-o*((o=e.getGeometryBounds())&&2*o.halfExtents[0]||0),i=-a*(o&&2*o.halfExtents[1]||0)),n?(dt(this.tmpMat4,e.getLocalTransform()),this.vec3a[0]=r,this.vec3a[1]=i,this.vec3a[2]=0,xt(this.tmpMat4,this.tmpMat4,this.vec3a),bt(this.tmpMat4,n,this.tmpMat4)):(dt(this.tmpMat4,e.getWorldTransform()),this.vec3a[0]=r,this.vec3a[1]=i,this.vec3a[2]=0,xt(this.tmpMat4,this.tmpMat4,this.vec3a)),bt(this.tmpMat4,this.vpMatrix,this.tmpMat4),t.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])},t.safeMergeAABB=function(){for(var e=new Dr,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(t){e.add(t)}),e},r}(),Ch=(Nh.tag="CanvasRenderer",function(){function t(t){this.imagePool=void 0,this.imagePool=t}var e=t.prototype;return e.render=function(t,e,n,r,i){var a=e.fill,o=e.fillRule,s=e.opacity,l=e.fillOpacity,c=e.stroke,u=e.strokeOpacity,h=e.lineWidth,f=e.lineCap,d=e.lineJoin,p=e.shadowType,g=e.shadowColor,y=e.shadowBlur,m=e.filter,e=e.miterLimit,v=!_(a)&&!a.isNone,b=!_(c)&&!c.isNone&&0<h,x=0===a.alpha,m=!(!m||!m.length),g=!_(g)&&0<y,y=n.nodeName,p="inner"===p,y=b&&g&&(y===E.PATH||y===E.LINE||y===E.POLYLINE||x||p);v&&(t.globalAlpha=s*l,y||jh(n,t,g),this.fill(t,n,a,o,r,i),y||this.clearShadowAndFilter(t,m,g)),b&&(t.globalAlpha=s*u,t.lineWidth=h,_(e)||(t.miterLimit=e),_(f)||(t.lineCap=f),_(d)||(t.lineJoin=d),y&&(p&&(t.globalCompositeOperation="source-atop"),jh(n,t,!0),p)&&(this.stroke(t,n,c,r,i),t.globalCompositeOperation="source-over",this.clearShadowAndFilter(t,m,!0)),this.stroke(t,n,c,r,i))},e.clearShadowAndFilter=function(t,e,n){n&&(t.shadowColor="transparent",t.shadowBlur=0),e&&(n=t.filter,!_(n))&&-1<n.indexOf("drop-shadow")&&(t.filter=n.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")},e.fill=function(e,n,t,r,i,a){var o=this;Array.isArray(t)?t.forEach(function(t){e.fillStyle=o.getColor(t,n,e),e.fill(r)}):(ca(t)&&(e.fillStyle=this.getPattern(t,n,e,i,a)),e.fill(r))},e.stroke=function(e,n,t,r,i){var a=this;Array.isArray(t)?t.forEach(function(t){e.strokeStyle=a.getColor(t,n,e),e.stroke()}):(ca(t)&&(e.strokeStyle=this.getPattern(t,n,e,r,i)),e.stroke())},e.getPattern=function(t,e,n,r,i){var a,o,s,l,c,u,h;return t.image instanceof is&&(a=(o=t.image.parsedStyle).width,o=o.height,s=r.contextService.getDPR(),l=r.config.offscreenCanvas,(c=w.offscreenCanvas.getOrCreateCanvas(l)).width=a*s,c.height=o*s,u=w.offscreenCanvas.getOrCreateContext(l),h=[],t.image.forEach(function(t){i.renderDisplayObject(t,u,r,h)}),h.forEach(function(){u.restore()})),this.imagePool.getOrCreatePatternSync(t,n,c,s,function(){e.renderable.dirty=!0,r.renderingService.dirtify()})},e.getColor=function(t,e,n){var r;return t.type!==ki.LinearGradient&&t.type!==ki.RadialGradient||(r=(e=e.getGeometryBounds())&&2*e.halfExtents[0]||1,e=e&&2*e.halfExtents[1]||1,r=this.imagePool.getOrCreateGradient(Ph({type:t.type},t.value,{width:r,height:e}),n)),r},t}());function jh(t,e,n){var r=t.parsedStyle,i=r.filter,a=r.shadowColor,o=r.shadowBlur,s=r.shadowOffsetX,r=r.shadowOffsetY;i&&i.length&&(e.filter=t.style.filter),n&&(e.shadowColor=a.toString(),e.shadowBlur=o||0,e.shadowOffsetX=s||0,e.shadowOffsetY=r||0)}var Rh=function(){function t(t){this.imagePool=void 0,this.imagePool=t}return t.prototype.render=function(t,e,n){var r=e.width,i=e.height,a=e.img,o=e.shadowColor,e=e.shadowBlur,a=fn(a)?this.imagePool.getImageSync(a):(r=r||a.width,i=i||a.height,a);if(a){jh(n,t,!_(o)&&0<e);try{t.drawImage(a,0,0,r,i)}catch(t){}}},t}(),Fh=function(){function t(){}var e=t.prototype;return e.render=function(t,e,n){var r=e.lineWidth,i=e.textAlign,a=e.textBaseline,o=e.lineJoin,s=e.miterLimit,l=e.letterSpacing,c=e.stroke,u=e.fill,h=e.fillOpacity,f=e.strokeOpacity,d=e.opacity,p=e.metrics,g=e.dx,y=e.dy,m=e.shadowColor,e=e.shadowBlur,v=p.font,b=p.lines,x=p.height,w=p.lineHeight,k=p.lineMetrics,E=(t.font=v,t.lineWidth=r,t.textAlign="middle"===i?"center":i,t.textBaseline=a,t.lineJoin=o,_(s)||(t.miterLimit=s),0),M=("middle"===a?E=-x/2-w/2:"bottom"===a||"alphabetic"===a||"ideographic"===a?E=-x:"top"!==a&&"hanging"!==a||(E=-w),g||0);E+=y||0,jh(n,t,!_(m)&&0<e);for(var O=0;O<b.length;O++){var S=r/2+M;E+=w,_(c)||c.isNone||!r||this.drawLetterSpacing(t,b[O],k[O],i,S,E,l,h,f,d,!0),_(u)||this.drawLetterSpacing(t,b[O],k[O],i,S,E,l,h,f,d)}},e.drawLetterSpacing=function(t,e,n,r,i,a,o,s,l,c,u){if(void 0===u&&(u=!1),0===o)u?this.strokeText(t,e,i,a,l):this.fillText(t,e,i,a,s,c);else{for(var h=t.textAlign,f=(t.textAlign="left",i),d=("center"===r||"middle"===r?f=i-n.width/2:"right"!==r&&"end"!==r||(f=i-n.width),Array.from(e)),p=t.measureText(e).width,g=0;g<d.length;++g){var y=d[g];u?this.strokeText(t,y,f,a,l):this.fillText(t,y,f,a,s,c),f+=p-(y=t.measureText(e.substring(g+1)).width)+o,p=y}t.textAlign=h}},e.fillText=function(t,e,n,r,i,a){var o,s=!_(i)&&1!==i;s&&(o=t.globalAlpha,t.globalAlpha=i*a),t.fillText(e,n,r),s&&(t.globalAlpha=o)},e.strokeText=function(t,e,n,r,i){var a,o=!_(i)&&1!==i;o&&(a=t.globalAlpha,t.globalAlpha=i),t.strokeText(e,n,r),o&&(t.globalAlpha=a)},t}(),Ih=function(n){var t;function e(t){var e;return void 0===t&&(t={}),(e=n.call(this)||this).options=void 0,e.name="canvas-renderer",e.options=t,e}t=n,(r=e).prototype=Object.create(t.prototype),Lh(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){var t,e=Ph({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),n=this.context.imagePool,r=new Ch(n),n=((t={})[E.CIRCLE]=r,t[E.ELLIPSE]=r,t[E.RECT]=r,t[E.IMAGE]=new Rh(n),t[E.TEXT]=new Fh,t[E.LINE]=r,t[E.POLYLINE]=r,t[E.POLYGON]=r,t[E.PATH]=r,t[E.GROUP]=void 0,t[E.HTML]=void 0,t[E.MESH]=void 0,t);this.context.defaultStyleRendererFactory=n,this.context.styleRendererFactory=n,this.addRenderingPlugin(new Nh(e))},r.destroy=function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory},e}(Zl);function Bh(){Bh=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return E()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===h)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function m(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:E}}function E(){return{value:void 0,done:!0}}return c(y,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},o.awrap=function(t){return{__await:t}},m(v.prototype),a(v.prototype,n,function(){return this}),o.AsyncIterator=v,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new v(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},m(y),a(y,i,"Generator"),a(y,r,function(){return this}),a(y,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},o}function Dh(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function zh(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Dh(r,e,n,i,a,"next",t)}function a(t){Dh(r,e,n,i,a,"throw",t)}i(void 0)})}}function Gh(t,e){return(Gh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var Wh=function(){function r(){this.context=void 0}return r.prototype.apply=function(t){function i(t){e.hooks.pointerWheel.call(t)}var a=this,e=t.renderingService,n=t.renderingContext,o=(this.context=t,n.root.ownerDocument.defaultView),s=function(t){e.hooks.pointerMove.call(t)},l=function(t){e.hooks.pointerUp.call(t)},c=function(t){e.hooks.pointerDown.call(t)},u=function(t){e.hooks.pointerOver.call(t)},h=function(t){e.hooks.pointerOut.call(t)},f=function(t){e.hooks.pointerCancel.call(t)};e.hooks.init.tapPromise(r.tag,zh(Bh().mark(function t(){var r;return Bh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r=a.context.contextService.getDomElement(),globalThis.navigator.msPointerEnabled?(r.style.msContentZooming="none",r.style.msTouchAction="none"):o.supportsPointerEvents&&(r.style.touchAction="none"),o.supportsPointerEvents?(n=r,globalThis.document.addEventListener("pointermove",s,!0),n.addEventListener("pointerdown",c,!0),n.addEventListener("pointerleave",h,!0),n.addEventListener("pointerover",u,!0),globalThis.addEventListener("pointerup",l,!0)):(n=r,globalThis.document.addEventListener("mousemove",s,!0),n.addEventListener("mousedown",c,!0),n.addEventListener("mouseout",h,!0),n.addEventListener("mouseover",u,!0),globalThis.addEventListener("mouseup",l,!0)),o.supportsTouchEvents&&((e=r).addEventListener("touchstart",c,!0),e.addEventListener("touchend",l,!0),e.addEventListener("touchmove",s,!0),e.addEventListener("touchcancel",f,!0)),r.addEventListener("wheel",i,{passive:!0,capture:!0});case 5:case"end":return t.stop()}var e,n},t)}))),e.hooks.destroy.tap(r.tag,function(){var t,e,n=a.context.contextService.getDomElement();globalThis.navigator.msPointerEnabled?(n.style.msContentZooming="",n.style.msTouchAction=""):o.supportsPointerEvents&&(n.style.touchAction=""),o.supportsPointerEvents?(t=n,globalThis.document.removeEventListener("pointermove",s,!0),t.removeEventListener("pointerdown",c,!0),t.removeEventListener("pointerleave",h,!0),t.removeEventListener("pointerover",u,!0),globalThis.removeEventListener("pointerup",l,!0)):(t=n,globalThis.document.removeEventListener("mousemove",s,!0),t.removeEventListener("mousedown",c,!0),t.removeEventListener("mouseout",h,!0),t.removeEventListener("mouseover",u,!0),globalThis.removeEventListener("mouseup",l,!0)),o.supportsTouchEvents&&((e=n).removeEventListener("touchstart",c,!0),e.removeEventListener("touchend",l,!0),e.removeEventListener("touchmove",s,!0),e.removeEventListener("touchcancel",f,!0)),n.removeEventListener("wheel",i,!0)})},r}(),Vh=(Wh.tag="DOMInteraction",function(i){var t;function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).name="dom-interaction",t}t=i,(n=e).prototype=Object.create(t.prototype),Gh(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.addRenderingPlugin(new Wh)},n.destroy=function(){this.removeAllRenderingPlugins()},e}(Zl));function Yh(){Yh=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return E()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===h)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function m(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:E}}function E(){return{value:void 0,done:!0}}return c(y,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},o.awrap=function(t){return{__await:t}},m(v.prototype),a(v.prototype,n,function(){return this}),o.AsyncIterator=v,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new v(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},m(y),a(y,i,"Generator"),a(y,r,function(){return this}),a(y,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},o}function Hh(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function qh(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Hh(r,e,n,i,a,"next",t)}function a(t){Hh(r,e,n,i,a,"throw",t)}i(void 0)})}}function Uh(t,e){return(Uh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var Xh=function(){function d(){this.context=void 0,this.$camera=void 0}var t=d.prototype;return t.joinTransformMatrix=function(t){return"matrix("+[t[0],t[1],t[4],t[5],t[12],t[13]].join(",")+")"},t.apply=function(t){function i(t,e){e.style.transform=s.joinTransformMatrix(t.getWorldTransform())}function e(t){var e,n,r=t.target;r.nodeName===E.HTML&&(s.$camera||(s.$camera=s.createCamera(l)),e=s.getOrCreateEl(r),s.$camera.appendChild(e),n=r.ownerDocument.documentElement.attributes,Object.keys(n).forEach(function(t){e.style[t]=n[t]}),Object.keys(r.attributes).forEach(function(t){s.updateAttribute(t,r)}),i(r,e))}function n(t){(t=t.target).nodeName===E.HTML&&s.$camera&&(t=s.getOrCreateEl(t))&&t.remove()}function r(t){var e=t.target;e.nodeName===E.HTML&&(t=t.attrName,s.updateAttribute(t,e))}function a(t){var e;(t=t.target).nodeName===E.HTML&&(e=s.getOrCreateEl(t),i(t,e))}function o(){var t,e;s.$camera&&(t=(e=s.context.config).width,e=e.height,s.$camera.style.width=(t||0)+"px",s.$camera.style.height=(e||0)+"px")}var s=this,l=t.camera,c=t.renderingContext,u=t.renderingService,h=t.displayObjectPool,f=(this.context=t,c.root.ownerDocument.defaultView);u.hooks.init.tapPromise(d.tag,qh(Yh().mark(function t(){return Yh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:h.getHTMLs().length&&(s.$camera=s.createCamera(l)),f.addEventListener(ac.RESIZE,o),f.addEventListener(y.MOUNTED,e),f.addEventListener(y.UNMOUNTED,n),f.addEventListener(y.ATTR_MODIFIED,r),f.addEventListener(y.BOUNDS_CHANGED,a);case 6:case"end":return t.stop()}},t)}))),u.hooks.endFrame.tap(d.tag,function(){s.$camera&&c.renderReasons.has(Ul.CAMERA_CHANGED)&&(s.$camera.style.transform=s.joinTransformMatrix(l.getOrthoMatrix()))}),u.hooks.destroy.tap(d.tag,function(){s.$camera&&s.$camera.remove(),f.removeEventListener(ac.RESIZE,o),f.removeEventListener(y.MOUNTED,e),f.removeEventListener(y.UNMOUNTED,n),f.removeEventListener(y.ATTR_MODIFIED,r),f.removeEventListener(y.BOUNDS_CHANGED,a)})},t.getId=function(t){return t.id||"g-html-"+t.entity},t.createCamera=function(t){var e,n,r=this.context.config,i=r.document,a=r.width,r=r.height,o=this.context.contextService.getDomElement(),s=o.parentNode;return s?((n=s.querySelector("#"+(e="g-canvas-camera")))||((n=i=(i||document).createElement("div")).id=e,i.style.position="absolute",i.style.left=(o.offsetLeft||0)+"px",i.style.top=(o.offsetTop||0)+"px",i.style.transformOrigin="left top",i.style.transform=this.joinTransformMatrix(t.getOrthoMatrix()),i.style.overflow="hidden",i.style.pointerEvents="none",i.style.width=(a||0)+"px",i.style.height=(r||0)+"px",s.appendChild(i)),n):null},t.getOrCreateEl=function(t){var e=this.context.config.document,n=this.getId(t),r=this.$camera.querySelector("#"+n);return r||(r=(e||document).createElement("div"),(t.parsedStyle.$el=r).id=n,t.name&&r.setAttribute("name",t.name),t.className&&(r.className=t.className),r.style.position="absolute",r.style.left="0px",r.style.top="0px",r.style["will-change"]="transform",r.style.transform=this.joinTransformMatrix(t.getWorldTransform())),r},t.updateAttribute=function(t,e){var n=this.getOrCreateEl(e);switch(t){case"innerHTML":var r=e.parsedStyle.innerHTML;fn(r)?n.innerHTML=r:(n.innerHTML="",n.appendChild(r));break;case"transformOrigin":r=e.parsedStyle.transformOrigin;n.style["transform-origin"]=r[0].value+" "+r[1].value;break;case"width":r=e.computedStyleMap().get("width");n.style.width=r.toString();break;case"height":r=e.computedStyleMap().get("height");n.style.height=r.toString();break;case"zIndex":r=e.parsedStyle.zIndex;n.style["z-index"]=""+r;break;case"visibility":r=e.parsedStyle.visibility;n.style.visibility=r;break;case"pointerEvents":r=e.parsedStyle.pointerEvents;n.style.pointerEvents=r;break;case"opacity":r=e.parsedStyle.opacity;n.style.opacity=""+r;break;case"fill":var r=e.parsedStyle.fill,i="";r instanceof Ui?i=r.isNone?"transparent":e.getAttribute("fill"):Array.isArray(r)?i=e.getAttribute("fill"):ca(r),n.style.background=i;break;case"stroke":r=e.parsedStyle.stroke,i="";r instanceof Ui?i=r.isNone?"transparent":e.getAttribute("stroke"):Array.isArray(r)?i=e.getAttribute("stroke"):ca(r),n.style["border-color"]=i,n.style["border-style"]="solid";break;case"lineWidth":r=e.parsedStyle.lineWidth;n.style["border-width"]=(r||0)+"px";break;case"lineDash":n.style["border-style"]="dashed";break;case"filter":i=e.style.filter;n.style.filter=i}},d}(),$h=(Xh.tag="HTMLRendering",function(i){var t;function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).name="html-renderer",t}t=i,(n=e).prototype=Object.create(t.prototype),Uh(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.addRenderingPlugin(new Xh)},n.destroy=function(){this.removeAllRenderingPlugins()},e}(Zl));function Kh(){Kh=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return E()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===h)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function m(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:E}}function E(){return{value:void 0,done:!0}}return c(y,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},o.awrap=function(t){return{__await:t}},m(v.prototype),a(v.prototype,n,function(){return this}),o.AsyncIterator=v,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new v(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},m(y),a(y,i,"Generator"),a(y,r,function(){return this}),a(y,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},o}function Zh(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Jh(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Zh(r,e,n,i,a,"next",t)}function a(t){Zh(r,e,n,i,a,"throw",t)}i(void 0)})}}function Qh(t,e){return(Qh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var tf="undefined"!=typeof Float32Array?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var ef=function(){function t(t){this.canvasConfig=void 0,this.imageCache={},this.gradientCache={},this.patternCache={},this.canvasConfig=t}var e=t.prototype;return e.getImageSync=function(t,e){return this.imageCache[t]?e&&e():this.getOrCreateImage(t).then(function(){e&&e()}),this.imageCache[t]},e.getOrCreateImage=function(r){var i,a=this;return this.imageCache[r]?Promise.resolve(this.imageCache[r]):(i=this.canvasConfig.createImage,new Promise(function(t,e){var n;i?n=i(r):Jr&&(n=new window.Image),n&&(n.onload=function(){t(n)},n.onerror=function(t){e(t)},n.crossOrigin="Anonymous",n.src=r,a.imageCache[r]=n)}))},e.getOrCreatePatternSync=function(t,e,n,r,i){var a,o,s,l,c=this.generatePatternKey(t);return c&&this.patternCache[c]?this.patternCache[c]:(l=t.image,s=t.repetition,t=t.transform,a=!1,fn(l)?o=this.getImageSync(l,i):n?(o=n,a=!0):o=l,(i=o&&e.createPattern(o,s))&&(e=t?bs(Fa(t)):(n=new tf(16),tf!=Float32Array&&(n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0),n[0]=1,n[5]=1,n[10]=1,n[15]=1,(l=n)[0]=1,l[1]=0,l[2]=0,l[3]=0,l[4]=0,l[5]=1,l[6]=0,l[7]=0,l[8]=0,l[9]=0,l[10]=1,l[11]=0,l[12]=0,l[13]=0,l[14]=0,l[15]=1,l),a&&(s=o=e,n=(t=[1/r,1/r,1])[0],l=t[1],t=t[2],o[0]=s[0]*n,o[1]=s[1]*n,o[2]=s[2]*n,o[3]=s[3]*n,o[4]=s[4]*l,o[5]=s[5]*l,o[6]=s[6]*l,o[7]=s[7]*l,o[8]=s[8]*t,o[9]=s[9]*t,o[10]=s[10]*t,o[11]=s[11]*t,o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15]),i.setTransform({a:e[0],b:e[1],c:e[4],d:e[5],e:e[12],f:e[13]})),c&&i&&(this.patternCache[c]=i),i)},e.getOrCreateGradient=function(t,e){var r,n,i,a,o,s=this.generateGradientKey(t),l=t.type,c=t.steps,u=t.width,h=t.height,f=t.angle,d=t.cx,p=t.cy,t=t.size;return this.gradientCache[s]||(r=null,l===ki.LinearGradient?(n=u,i=h,f=cs((f=f).value),a=0+n/2,o=0+i/2,n=Math.abs(n*Math.cos(f))+Math.abs(i*Math.sin(f)),i={x1:a-Math.cos(f)*n/2,y1:o-Math.sin(f)*n/2,x2:a+Math.cos(f)*n/2,y2:o+Math.sin(f)*n/2},r=e.createLinearGradient(i.x1,i.y1,i.x2,i.y2)):l===ki.RadialGradient&&(a=u,o=h,f=p,n=t,l=(i=d).value,u=f.value,i.unit===g.kPercentage&&(l=i.value/100*a),f.unit===g.kPercentage&&(u=f.value/100*o),i=Math.max(Ve([0,0],[l,u]),Ve([0,o],[l,u]),Ve([a,o],[l,u]),Ve([a,0],[l,u])),n&&(n instanceof Fi?i=n.value:n instanceof _i&&("closest-side"===n.value?i=Math.min(l,a-l,u,o-u):"farthest-side"===n.value?i=Math.max(l,a-l,u,o-u):"closest-corner"===n.value&&(i=Math.min(Ve([0,0],[l,u]),Ve([0,o],[l,u]),Ve([a,o],[l,u]),Ve([a,0],[l,u]))))),r=e.createRadialGradient(p=(h={x:l,y:u,r:i}).x,t=h.y,0,p,t,h.r)),r&&(c.forEach(function(t){var e,n=t.offset,t=t.color;n.unit===g.kPercentage&&null!=(e=r)&&e.addColorStop(n.value/100,t.toString())}),this.gradientCache[s]=r)),this.gradientCache[s]},e.generateGradientKey=function(t){var e=t.type,n=t.width,r=t.height,i=t.steps,a=t.angle,o=t.cx,s=t.cy,t=t.size;return"gradient-"+e+"-"+((null==a?void 0:a.toString())||0)+"-"+((null==o?void 0:o.toString())||0)+"-"+((null==s?void 0:s.toString())||0)+"-"+((null==t?void 0:t.toString())||0)+"-"+n+"-"+r+"-"+i.map(function(t){return""+t.offset+t.color}).join("-")},e.generatePatternKey=function(t){var e=t.image,t=t.repetition;return fn(e)?"pattern-"+e+"-"+t:e instanceof is?"pattern-"+e.entity+"-"+t:void 0},t}(),nf=function(){function s(){}return s.prototype.apply=function(t){function e(t){var e=t.target,t=e.nodeName,n=e.attributes;t===E.IMAGE&&(t=n.img,fn(t))&&a.getImageSync(t,function(){e.renderable.dirty=!0,r.dirtify()})}function n(t){var e=t.target,n=t.attrName,t=t.newValue;e.nodeName===E.IMAGE&&"img"===n&&fn(t)&&a.getOrCreateImage(t).then(function(){e.renderable.dirty=!0,r.dirtify()})}var r=t.renderingService,i=t.renderingContext,a=t.imagePool,o=i.root.ownerDocument.defaultView;r.hooks.init.tapPromise(s.tag,Jh(Kh().mark(function t(){return Kh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:o.addEventListener(y.MOUNTED,e),o.addEventListener(y.ATTR_MODIFIED,n);case 2:case"end":return t.stop()}},t)}))),r.hooks.destroy.tap(s.tag,function(){o.removeEventListener(y.MOUNTED,e),o.removeEventListener(y.ATTR_MODIFIED,n)})},s}(),rf=(nf.tag="LoadImage",function(i){var t;function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).name="image-loader",t}t=i,(n=e).prototype=Object.create(t.prototype),Qh(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.context.imagePool=new ef(this.context.config),this.addRenderingPlugin(new nf)},n.destroy=function(){this.removeAllRenderingPlugins()},e}(Zl));function af(){af=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return E()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===h)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function m(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:E}}function E(){return{value:void 0,done:!0}}return c(y,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},o.awrap=function(t){return{__await:t}},m(v.prototype),a(v.prototype,n,function(){return this}),o.AsyncIterator=v,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new v(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},m(y),a(y,i,"Generator"),a(y,r,function(){return this}),a(y,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},o}function of(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function sf(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){of(r,e,n,i,a,"next",t)}function a(t){of(r,e,n,i,a,"throw",t)}i(void 0)})}}function lf(t,e){t.prototype=Object.create(e.prototype),cf(t.prototype.constructor=t,e)}function cf(t,e){return(cf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var uf=function(){function t(t){this.$container=void 0,this.$canvas=void 0,this.dpr=void 0,this.context=void 0,this.canvasConfig=void 0,this.renderingContext=void 0,this.renderingContext=t.renderingContext,this.canvasConfig=t.config}var e=t.prototype;return e.init=function(){var t=sf(af().mark(function t(){var e,n;return af().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:n=this.canvasConfig,e=n.container,(n=n.canvas)?(this.$canvas=n,e&&n.parentElement!==e&&e.appendChild(n),this.$container=n.parentElement,this.canvasConfig.container=this.$container):e&&(this.$container=fn(e)?document.getElementById(e):e,this.$container)&&(n=document.createElement("canvas"),this.$container.appendChild(n),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=n),this.context=this.$canvas.getContext("2d"),this.resize(this.canvasConfig.width,this.canvasConfig.height);case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),e.getContext=function(){return this.context},e.getDomElement=function(){return this.$canvas},e.getDPR=function(){return this.dpr},e.getBoundingClientRect=function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()},e.destroy=function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)},e.resize=function(t,e){var n=1<=(n=this.canvasConfig.devicePixelRatio||Jr&&window.devicePixelRatio||1)?Math.ceil(n):1;this.dpr=n,this.$canvas&&(this.$canvas.width=this.dpr*t,this.$canvas.height=this.dpr*e,n=this.$canvas,t=t,e=e,Jr)&&n.style&&(n.style.width=t+"px",n.style.height=e+"px"),this.renderingContext.renderReasons.add(Ul.CAMERA_CHANGED)},e.applyCursorStyle=function(t){this.$container&&this.$container.style&&(this.$container.style.cursor=t)},e.toDataURL=function(){var e=sf(af().mark(function t(e){var n,r;return af().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=(r=e=void 0===e?{}:e).type,r=r.encoderOptions,t.abrupt("return",this.context.canvas.toDataURL(n,r));case 3:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),t}(),hf=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).name="canvas-context-register",t}lf(t,i);var e=t.prototype;return e.init=function(){this.context.ContextService=uf},e.destroy=function(){delete this.context.ContextService},t}(Zl),ff=function(e){function t(t){t=e.call(this,t)||this;return t.registerPlugin(new hf),t.registerPlugin(new rf),t.registerPlugin(new ju),t.registerPlugin(new Ih),t.registerPlugin(new Vh),t.registerPlugin(new Sh),t.registerPlugin(new $h),t}return lf(t,e),t}(Kl);function df(){df=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return E()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===h)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function m(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:E}}function E(){return{value:void 0,done:!0}}return c(y,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},o.awrap=function(t){return{__await:t}},m(v.prototype),a(v.prototype,n,function(){return this}),o.AsyncIterator=v,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new v(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},m(y),a(y,i,"Generator"),a(y,r,function(){return this}),a(y,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},o}function pf(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function gf(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){pf(r,e,n,i,a,"next",t)}function a(t){pf(r,e,n,i,a,"throw",t)}i(void 0)})}}function yf(){return(yf=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function mf(t,e){return(mf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function vf(t){return Ef(t,"Function")}var bf=function(){function a(t){this.dragndropPluginOptions=void 0,this.dragndropPluginOptions=t}return a.prototype.apply=function(t){function e(t){var e,a,o,s,l,c,u=t.target,h=u===d,f=h&&i?d:u.closest&&u.closest("[draggable=true]");f&&(e=function(){var e=gf(df().mark(function t(e){var n,r,i;return df().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a)t.next=8;else{if(n=e.timeStamp-o,r=Ve([e.clientX,e.clientY],s),n<=m||r<=y)return t.abrupt("return");t.next=5}break;case 5:e.type="dragstart",f.dispatchEvent(e),a=!0;case 8:if(e.type="drag",e.dx=e.clientX-c[0],e.dy=e.clientY-c[1],f.dispatchEvent(e),c=[e.clientX,e.clientY],h){t.next=21;break}return n="pointer"===p?[e.canvasX,e.canvasY]:u.getBounds().center,t.next=17,d.elementsFromPoint(n[0],n[1]);case 17:r=t.sent,i=r[r.indexOf(u)+1],i=(null==i?void 0:i.closest("[droppable=true]"))||(g?d:null),l!==i&&(l&&(e.type="dragleave",(e.target=l).dispatchEvent(e)),i&&(e.type="dragenter",(e.target=i).dispatchEvent(e)),l=i)&&(e.type="dragover",(e.target=l).dispatchEvent(e));case 21:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),a=!1,o=t.timeStamp,s=[t.clientX,t.clientY],l=null,c=[t.clientX,t.clientY],r.addEventListener("pointermove",e),u.addEventListener("pointerup",t=function(t){a&&(t.detail={preventClick:!0},t=t.clone(),l&&(t.type="drop",(t.target=l).dispatchEvent(t)),t.type="dragend",f.dispatchEvent(t),a=!1),r.removeEventListener("pointermove",e)},{once:!0}),u.addEventListener("pointerupoutside",t,{once:!0}))}var n=t.renderingService,d=t.renderingContext.root.ownerDocument,r=d.defaultView,t=this.dragndropPluginOptions,p=t.overlap,i=t.isDocumentDraggable,g=t.isDocumentDroppable,y=t.dragstartDistanceThreshold,m=t.dragstartTimeThreshold;n.hooks.init.tapPromise(a.tag,gf(df().mark(function t(){return df().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r.addEventListener("pointerdown",e);case 1:case"end":return t.stop()}},t)}))),n.hooks.destroy.tap(a.tag,function(){r.removeEventListener("pointerdown",e)})},a}(),xf=(bf.tag="Dragndrop",function(n){var t;function e(t){var e;return void 0===t&&(t={}),(e=n.call(this)||this).options=void 0,e.name="dragndrop",e.options=t,e}t=n,(r=e).prototype=Object.create(t.prototype),mf(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){this.addRenderingPlugin(new bf(yf({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))},r.destroy=function(){this.removeAllRenderingPlugins()},e}(Zl)),wf=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},kf={}.toString,Ef=function(t,e){return kf.call(t)==="[object "+e+"]"},Mf=function(t){return null==t},Of=function(t){return Array.isArray?Array.isArray(t):Ef(t,"Array")};function Sf(t){if(!Af(t)||!Ef(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}function _f(t){return(t=Lf(t)).charAt(0).toLowerCase()+t.substring(1)}var Af=function(t){return"object"==typeof t&&null!==t},Tf=function(t){return Ef(t,"Number")},Pf=Object.values?function(t){return Object.values(t)}:function(n){var t,r=[],e=n,i=function(t,e){vf(n)&&"prototype"===e||r.push(t)};if(e)if(Of(e))for(var a=0,o=e.length;a<o&&!1!==i(e[a],a);a++);else if(t=typeof e,null!==e&&"object"==t||"function"==t)for(var s in e)if(e.hasOwnProperty(s)&&!1===i(e[s],s))break;return r},Lf=function(t){return Mf(t)?"":t.toString()},Nf=function(t){t=Lf(t);return t.charAt(0).toUpperCase()+t.substring(1)},Cf={}.toString,jf=function(t){return Cf.call(t).replace(/^\[object /,"").replace(/]$/,"")},Rf=Object.prototype,Ff=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Rf)};var If=5;var R=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 a in r=r||0,i=i||If,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&Sf(o)?(Sf(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):Of(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},Bf=function(t,e){if(!wf(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},Df=Object.prototype.hasOwnProperty;function zf(t){return t}var Gf,Wf=function(n,r,i){function a(){u=!1===i.leading?0:Date.now(),o=null,c=n.apply(s,l),o||(s=l=null)}function t(){var t=Date.now(),e=(u||!1!==i.leading||(u=t),r-(t-u));return s=this,l=arguments,e<=0||r<e?(o&&(clearTimeout(o),o=null),u=t,c=n.apply(s,l),o||(s=l=null)):o||!1===i.trailing||(o=setTimeout(a,e)),c}var o,s,l,c,u=0;i=i||{};return t.cancel=function(){clearTimeout(o),u=0,o=s=l=null},t};function Vf(t){return Mf(t)?0:(wf(t)?t:Object.keys(t)).length}!function(a,o){var s;if(vf(a))return(s=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=o?o.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=a.apply(this,t),i.set(r,n),n)}).cache=new Map;throw new TypeError("Expected a function")}(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(Gf=Gf||document.createElement("canvas").getContext("2d")).font=[a,e,i,n+"px",r].join(" "),Gf.measureText(Ef(t,"String")?t:"").width},function(t,e){return function(){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 a=arguments[e],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}([t],Pf(e=void 0===e?{}:e)).join("")});const Yf=()=>[["cartesian"]],Hf=(Yf.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",t,e,n,r]]),qf=(Hf.props={},({startAngle:t=0,endAngle:e=6*Math.PI,innerRadius:n=0,outerRadius:r=1})=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5],["helix",t,e,n,r]]),Uf=(qf.props={},()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),Xf=(Uf.props={},()=>[["translate",.5,.5],["reflect"],["translate",-.5,-.5]]),$f=(Xf.props={},()=>[["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),Kf=($f.props={},()=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5]]),Zf=(Kf.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[...Uf(),...Hf({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]),Jf=(Zf.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[["transpose"],...Xf(),...Hf({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]),Qf=(Jf.props={},()=>[["parallel",0,1,0,1]]),td=(Qf.props={},({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,isVisual:i=!1})=>[["fisheye",t,e,n,r,i]]),ed=(td.props={},({focusX:t=0,distortionX:e=2,isVisual:n=!1})=>[["fisheye.x",t,e,n]]),nd=(ed.props={},({focusY:t=0,distortionY:e=2,isVisual:n=!1})=>[["fisheye.x",t,e,n]]),rd=(nd.props={},({value:e})=>t=>t.map(()=>e)),id=(rd.props={},({value:e})=>t=>t.map(e)),ad=(id.props={},({value:e})=>t=>t.map(t=>t[e])),od=(ad.props={},({value:t})=>()=>t);function sd(t,e){return t.parent===e.parent?1:2}function ld(t,e){return t+e.x}function cd(t,e){return Math.max(t,e.y)}function ud(){var s=sd,l=1,c=1,u=!1;function e(e){var r,i=0,t=(e.eachAfter(function(t){var e,n=t.children;n?(t.x=(e=n).reduce(ld,0)/e.length,t.y=1+n.reduce(cd,0)):(t.x=r?i+=s(t,r):0,t.y=0,r=t)}),function(t){for(var e;e=t.children;)t=e[0];return t}(e)),n=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),a=t.x-s(t,n)/2,o=n.x+s(n,t)/2;return e.eachAfter(u?function(t){t.x=(t.x-e.x)*l,t.y=(e.y-t.y)*c}:function(t){t.x=(t.x-a)/(o-a)*l,t.y=(1-(e.y?t.y/e.y:1))*c})}return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function hd(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;0<=--r;)e+=n[r].value;else e=1;t.value=e}function fd(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=pd)):void 0===e&&(e=dd);for(var n,r,i,a,o,t=new md(t),s=[t];n=s.pop();)if((i=e(n.data))&&(o=(i=Array.from(i)).length))for(n.children=i,a=o-1;0<=a;--a)s.push(r=i[a]=new md(i[a])),r.parent=n,r.depth=n.depth+1;return t.eachBefore(yd)}function dd(t){return t.children}function pd(t){return Array.isArray(t)?t[1]:null}function gd(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function yd(t){for(var e=0;t.height=e,(t=t.parent)&&t.height<++e;);}function md(t){this.data=t,this.depth=this.height=0,this.parent=null}function vd(t){return null==t?null:bd(t)}function bd(t){if("function"!=typeof t)throw new Error;return t}function xd(){return 0}function wd(t){return function(){return t}}od.props={},md.prototype=fd.prototype={constructor:md,count:function(){return this.eachAfter(hd)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,a=this,o=[a],s=[],l=-1;a=o.pop();)if(s.push(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r]);for(;a=s.pop();)t.call(e,a,++l,this);return this},eachBefore:function(t,e){for(var n,r,i,a=[this],o=-1;n=a.pop();)if(t.call(e,n,++o,this),r=n.children)for(i=r.length-1;0<=i;--i)a.push(r[i]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(i){return this.eachAfter(function(t){for(var e=+i(t.data)||0,n=t.children,r=n&&n.length;0<=--r;)e+=n[r].value;t.value=e})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,n=[];return e.each(function(t){t!==e&&n.push({source:t.parent,target:t})}),n},copy:function(){return fd(this).eachBefore(gd)},[Symbol.iterator]:function*(){var t,e,n,r,i,a=[this];do{for(e=a.reverse(),a=[];t=e.pop();)if(yield t,n=t.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length)}};const kd=4294967296;function Ed(t,e){for(var n,r,i=0,a=(t=function(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}(Array.from(t),e)).length,o=[];i<a;)n=t[i],r&&Od(r,n)?++i:(r=function(t){switch(t.length){case 1:return function(t){return{x:t.x,y:t.y,r:t.r}}(t[0]);case 2:return _d(t[0],t[1]);case 3:return Ad(t[0],t[1],t[2])}}(o=function(t,e){var n,r;if(Sd(e,t))return[e];for(n=0;n<t.length;++n)if(Md(e,t[n])&&Sd(_d(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(Md(_d(t[n],t[r]),e)&&Md(_d(t[n],e),t[r])&&Md(_d(t[r],e),t[n])&&Sd(Ad(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}(o,n)),i=0);return r}function Md(t,e){var n=t.r-e.r,r=e.x-t.x,e=e.y-t.y;return n<0||n*n<r*r+e*e}function Od(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,e=e.y-t.y;return 0<n&&r*r+e*e<n*n}function Sd(t,e){for(var n=0;n<e.length;++n)if(!Od(t,e[n]))return;return 1}function _d(t,e){var n=t.x,r=t.y,t=t.r,i=e.x,a=e.y,e=e.r,o=i-n,s=a-r,l=e-t,c=Math.sqrt(o*o+s*s);return{x:(n+i+o/c*l)/2,y:(r+a+s/c*l)/2,r:(c+t+e)/2}}function Ad(t,e,n){var r=t.x,i=t.y,t=t.r,a=e.x,o=e.y,e=e.r,s=n.x,l=n.y,n=n.r,c=r-a,u=r-s,h=i-o,f=i-l,d=e-t,p=n-t,g=r*r+i*i-t*t,a=g-a*a-o*o+e*e,o=g-s*s-l*l+n*n,e=u*h-c*f,g=(h*o-f*a)/(2*e)-r,s=(f*d-h*p)/e,l=(u*a-c*o)/(2*e)-i,n=(c*p-u*d)/e,f=s*s+n*n-1,h=2*(t+g*s+l*n),a=g*g+l*l-t*t,o=-(1e-6<Math.abs(f)?(h+Math.sqrt(h*h-4*f*a))/(2*f):a/h);return{x:r+g+s*o,y:i+l+n*o,r:o}}function Td(t,e,n){var r,i,a,o,s=t.x-e.x,l=t.y-e.y,c=s*s+l*l;c?(i=e.r+n.r,o=t.r+n.r,(o*=o)<(i*=i)?(r=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-r*r)),n.x=t.x-r*s-a*l,n.y=t.y-r*l+a*s):(r=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*s-a*l,n.y=e.y+r*l+a*s)):(n.x=e.x+n.r,n.y=e.y)}function Pd(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,e=e.y-t.y;return 0<n&&r*r+e*e<n*n}function Ld(t){var e=t._,t=t.next._,n=e.r+t.r,r=(e.x*t.r+t.x*e.r)/n,t=(e.y*t.r+t.y*e.r)/n;return r*r+t*t}function Nd(t){this._=t,this.next=null,this.previous=null}function Cd(t,e){if(!(a=(t="object"==typeof(n=t)&&"length"in n?n:Array.from(n)).length))return 0;var n,r,i,a,o,s,l,c,u,h,f,d=t[0];if(d.x=0,d.y=0,!(1<a))return d.r;if(r=t[1],d.x=-r.r,r.x=d.r,r.y=0,!(2<a))return d.r+r.r;Td(r,d,i=t[2]),d=new Nd(d),r=new Nd(r),i=new Nd(i),((d.next=i.previous=r).next=d.previous=i).next=r.previous=d;t:for(l=3;l<a;++l){Td(d._,r._,i=t[l]),i=new Nd(i),c=r.next,u=d.previous,h=r._.r,f=d._.r;do{if(h<=f){if(Pd(c._,i._)){r=c,(d.next=r).previous=d,--l;continue t}h+=c._.r,c=c.next}else{if(Pd(u._,i._)){((d=u).next=r).previous=d,--l;continue t}f+=u._.r,u=u.previous}}while(c!==u.next);for(i.previous=d,i.next=r,d.next=r.previous=r=i,o=Ld(d);(i=i.next)!==r;)(s=Ld(i))<o&&(d=i,o=s);r=d.next}for(d=[r._],i=r;(i=i.next)!==r;)d.push(i._);for(i=Ed(d,e),l=0;l<a;++l)(d=t[l]).x-=i.x,d.y-=i.y;return i.r}function jd(t){return Math.sqrt(t.value)}function Rd(){var n=null,r=1,i=1,a=xd;function e(t){var e=function(){let t=1;return()=>(t=(1664525*t+1013904223)%kd)/kd}();return t.x=r/2,t.y=i/2,n?t.eachBefore(Fd(n)).eachAfter(Id(a,.5,e)).eachBefore(Bd(1)):t.eachBefore(Fd(jd)).eachAfter(Id(xd,1,e)).eachAfter(Id(a,t.r/Math.min(r,i),e)).eachBefore(Bd(Math.min(r,i)/(2*t.r))),t}return e.radius=function(t){return arguments.length?(n=vd(t),e):n},e.size=function(t){return arguments.length?(r=+t[0],i=+t[1],e):[r,i]},e.padding=function(t){return arguments.length?(a="function"==typeof t?t:wd(+t),e):a},e}function Fd(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Id(o,s,l){return function(t){if(e=t.children){var e,n,r,i=e.length,a=o(t)*s||0;if(a)for(n=0;n<i;++n)e[n].r+=a;if(r=Cd(e,l),a)for(n=0;n<i;++n)e[n].r-=a;t.r=r+a}}}function Bd(n){return function(t){var e=t.parent;t.r*=n,e&&(t.x=e.x+n*t.x,t.y=e.y+n*t.y)}}function Dd(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function zd(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(r-e)/t.value;++s<l;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}var Gd={depth:-1},Wd={},Vd={};function Yd(t){return t.id}function Hd(t){return t.parentId}function qd(){var y,m=Yd,v=Hd;function e(n){var e,t,r,i,a,o,s,l,c=Array.from(n),u=m,h=v,f=new Map;if(null!=y){const p=c.map((t,e)=>{t=y(t,e,n),e=(t=""+t).length;return"/"===(t=Xd(t,e-1)&&!Xd(t,e-2)?t.slice(0,-1):t)[0]?t:"/"+t}),g=p.map(Ud);var d=new Set(p).add("");for(const r of g)d.has(r)||(d.add(r),p.push(r),g.push(Ud(r)),c.push(Vd));u=(t,e)=>p[e],h=(t,e)=>g[e]}for(r=0,e=c.length;r<e;++r)t=c[r],o=c[r]=new md(t),null!=(s=u(t,r,n))&&(s+="")&&(l=o.id=s,f.set(l,f.has(l)?Wd:o)),null!=(s=h(t,r,n))&&(s+="")&&(o.parent=s);for(r=0;r<e;++r)if(s=(o=c[r]).parent){if(!(a=f.get(s)))throw new Error("missing: "+s);if(a===Wd)throw new Error("ambiguous: "+s);a.children?a.children.push(o):a.children=[o],o.parent=a}else{if(i)throw new Error("multiple roots");i=o}if(!i)throw new Error("no root");if(null!=y){for(;i.data===Vd&&1===i.children.length;)i=i.children[0],--e;for(let t=c.length-1;0<=t&&(o=c[t]).data===Vd;--t)o.data=null}if(i.parent=Gd,i.eachBefore(function(t){t.depth=t.parent.depth+1,--e}).eachBefore(yd),i.parent=null,0<e)throw new Error("cycle");return i}return e.id=function(t){return arguments.length?(m=vd(t),e):m},e.parentId=function(t){return arguments.length?(v=vd(t),e):v},e.path=function(t){return arguments.length?(y=vd(t),e):y},e}function Ud(t){let e=t.length;if(e<2)return"";for(;1<--e&&!Xd(t,e););return t.slice(0,e)}function Xd(e,n){if("/"===e[n]){let t=0;for(;0<n&&"\\"===e[--n];)++t;if(0==(1&t))return 1}}function $d(t,e){return t.parent===e.parent?1:2}function Kd(t){var e=t.children;return e?e[0]:t.t}function Zd(t){var e=t.children;return e?e[e.length-1]:t.t}function Jd(t,e){this._=t,this.parent=null,this.children=null,this.A=null,(this.a=this).z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function Qd(){var f=$d,l=1,c=1,u=null;function e(t){var e,n,r,i,a,o,s=function(t){for(var e,n,r,i,a,o=[t=new Jd(t,0)];e=o.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;0<=i;--i)o.push(n=e.children[i]=new Jd(r[i],i)),n.parent=e;return(t.parent=new Jd(null,0)).children=[t],t}(t);return s.eachAfter(h),s.parent.m=-s.z,s.eachBefore(d),u?t.eachBefore(p):((r=n=e=t).eachBefore(function(t){t.x<e.x&&(e=t),t.x>n.x&&(n=t),t.depth>r.depth&&(r=t)}),s=e===n?1:f(e,n)/2,i=s-e.x,a=l/(n.x+s+i),o=c/(r.depth||1),t.eachBefore(function(t){t.x=(t.x+i)*a,t.y=t.depth*o})),t}function h(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e){for(var i,a=0,o=0,s=t.children,l=s.length;0<=--l;)(i=s[l]).z+=a,i.m+=a,a+=i.s+(o+=i.c);e=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+f(t._,r._),t.m=t.z-e):t.z=e}else r&&(t.z=r.z+f(t._,r._));t.parent.A=function(t,e,n){if(e){for(var r,i=t,a=t,o=e,s=i.parent.children[0],l=i.m,c=a.m,u=o.m,h=s.m;o=Zd(o),i=Kd(i),o&&i;)s=Kd(s),(a=Zd(a)).a=t,0<(r=o.z+u-i.z-l+f(o._,i._))&&(function(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}(function(t,e,n){return t.a.parent===e.parent?t.a:n}(o,t,n),t,r),l+=r,c+=r),u+=o.m,l+=i.m,h+=s.m,c+=a.m;o&&!Zd(a)&&(a.t=o,a.m+=u-c),i&&!Kd(s)&&(s.t=i,s.m+=l-h,n=t)}return n}(t,r,t.parent.A||n[0])}function d(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function p(t){t.x*=l,t.y=t.depth*c}return e.separation=function(t){return arguments.length?(f=t,e):f},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function tp(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(i-n)/t.value;++s<l;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}Jd.prototype=Object.create(md.prototype);e=(1+Math.sqrt(5))/2;function ep(t,e,n,r,i,a){for(var o,s,l,c,u,h,f,d,p,g,y,m=[],v=e.children,b=0,x=0,w=v.length,k=e.value;b<w;){for(l=i-n,c=a-r;!(u=v[x++].value)&&x<w;);for(y=(h=f=u)*u*(g=Math.max(c/l,l/c)/(k*t)),p=Math.max(f/y,y/h);x<w;++x){if(u+=s=v[x].value,s<h&&(h=s),f<s&&(f=s),y=u*u*g,p<(d=Math.max(f/y,y/h))){u-=s;break}p=d}m.push(o={value:u,dice:l<c,children:v.slice(b,x)}),o.dice?zd(o,n,r,i,k?r+=c*u/k:a):tp(o,n,r,k?n+=l*u/k:i,a),k-=u,b=x}return m}var np=function e(a){function t(t,e,n,r,i){ep(a,t,e,n,r,i)}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(e);function rp(t,e,n,r,i){var a,o,g=t.children,s=g.length,y=new Array(s+1);for(y[0]=o=a=0;a<s;++a)y[a+1]=o+=g[a].value;!function t(e,n,r,i,a,o,s){if(n-1<=e)return(l=g[e]).x0=i,l.y0=a,l.x1=o,void(l.y1=s);var l=y[e],c=r/2+l,u=e+1,h=n-1;for(;u<h;){var f=u+h>>>1;y[f]<c?u=1+f:h=f}c-y[u-1]<y[u]-c&&e+1<u&&--u;var l=y[u]-l,d=r-l;{var p;s-a<o-i?(t(e,u,l,i,a,p=r?(i*d+o*l)/r:o,s),t(u,n,d,p,a,o,s)):(t(e,u,l,i,a,o,p=r?(a*d+s*l)/r:s),t(u,n,d,i,p,o,s))}}(0,s,t.value,e,n,r,i)}function ip(t,e,n,r,i){(1&t.depth?tp:zd)(t,e,n,r,i)}var ap=function e(d){function t(t,e,n,r,i){if((a=t._squarify)&&a.ratio===d)for(var a,o,s,l,c,u=-1,h=a.length,f=t.value;++u<h;){for(s=(o=a[u]).children,l=o.value=0,c=s.length;l<c;++l)o.value+=s[l].value;o.dice?zd(o,e,n,r,f?n+=(i-n)*o.value/f:i):tp(o,e,n,f?e+=(r-e)*o.value/f:r,i),f-=o.value}else t._squarify=a=ep(d,t,e,n,r,i),a.ratio=d}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(e);function op(t={}){t=t.shapes;return[{name:"color"},{name:"opacity"},{name:"shape",range:t},{name:"enterType"},{name:"enterDelay",scaleKey:"enter"},{name:"enterDuration",scaleKey:"enter"},{name:"enterEasing"},{name:"key",scale:"identity"},{name:"groupKey",scale:"identity"},{name:"label",scale:"identity"}]}function sp(t={}){return[...op(t),{name:"title",scale:"identity"},{name:"tooltip",scale:"identity",independent:!0}]}function lp(){return[{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["x","y"]}]}function cp(){return[{type:"maybeTitle",channel:"x"},{type:"maybeTooltip",channel:["y"]}]}function up(t={}){return op(t)}function hp(){return[{type:"maybeKey"}]}function fp(t,e){return t.getBandWidth(t.invert(e))}function dp(t,e,n={}){const{x:a,y:o,series:s}=e,{x:l,y:c,series:u}=t,{style:{bandOffset:r=u?0:.5,bandOffsetX:h=r,bandOffsetY:f=r}={}}=n,d=!(null===l||void 0===l||!l.getBandWidth),p=!(null===c||void 0===c||!c.getBandWidth),g=!(null===u||void 0===u||!u.getBandWidth);return d||p?(t,e)=>{const n=d?fp(l,a[e]):0;var r=p?fp(c,o[e]):0,e=g&&s?(fp(u,s[e])/2+ +s[e])*n:0,[t,i]=t;return[t+h*n+e,i+f*r]}:t=>t}function pp(t){return parseFloat(t)/100}function gp(t,e,n,r){const{x:i,y:a}=n,{width:o,height:s}=r.getOptions();return[t,Array.from(t,t=>{var e=i[t],t=a[t];return[["string"==typeof e?pp(e)*o:+e,"string"==typeof t?pp(t)*s:+t]]})]}function yp(e){return"function"==typeof e?e:t=>t[e]}function mp(t,e){return Array.from(t,yp(e))}function vp(t,e){var{source:e=t=>t.source,target:n=t=>t.target,value:r=t=>t.value}=e,{links:t,nodes:i}=t;const a=mp(t,e),o=mp(t,n),s=mp(t,r);return{links:t.map((t,e)=>({target:o[e],source:a[e],value:s[e]})),nodes:i||Array.from(new Set([...a,...o]),t=>({key:t}))}}function bp(t,e){return t.getBandWidth(t.invert(e))}const xp=()=>(t,e,n,i)=>{const{x:a,y:o,y1:s,series:l,size:r}=n,c=e.x,u=e.series,[h]=i.getSize(),f=r?r.map(t=>+t/h):null,d=r?(t,e,n)=>{t+=e/2,e=f[n];return[t-e/2,t+e/2]}:(t,e,n)=>[t,t+e];return[t,Array.from(t,t=>{var e=bp(c,a[t]),n=e*(u?bp(u,null===l||void 0===l?void 0:l[t]):1),e=(+(null===l||void 0===l?void 0:l[t])||0)*e,e=+a[t]+e,[e,n]=d(e,n,t),r=+o[t],t=+s[t];return[[e,r],[n,r],[n,t],[e,t]].map(t=>i.map(t))})]};xp.props={defaultShape:"rect",defaultLabelShape:"label",channels:[...sp({shapes:["rect","hollow","funnel","pyramid"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[{type:"maybeZeroY1"},{type:"maybeZeroX"}],postInference:[...hp(),...cp()],interaction:{shareTooltip:!0}};const wp=()=>(t,e,n,r)=>{const{x:i,x1:a,y:o,y1:s}=n;return[t,Array.from(t,t=>{return[[+i[t],+o[t]],[+a[t],+o[t]],[+a[t],+s[t]],[+i[t],+s[t]]].map(t=>r.map(t))})]};function kp(t,e){return null==t||null==e?NaN:t<e?-1:e<t?1:e<=t?0:NaN}function Ep(n){let a,o,i;function s(t,e,n=0,r=t.length){if(n<r){if(0!==a(e,e))return r;do{var i=n+r>>>1;o(t[i],e)<0?n=1+i:r=i}while(n<r)}return n}return i=2!==n.length?(a=kp,o=(t,e)=>kp(n(t),e),(t,e)=>n(t)-e):(a=n===kp||n===function(t,e){return null==t||null==e?NaN:e<t?-1:t<e?1:t<=e?0:NaN}?n:Mp,o=n),{left:s,center:function(t,e,n=0,r=t.length){return r=s(t,e,n,r-1),n<r&&i(t[r-1],e)>-i(t[r],e)?r-1:r},right:function(t,e,n=0,r=t.length){if(n<r){if(0!==a(e,e))return r;do{var i=n+r>>>1;o(t[i],e)<=0?n=1+i:r=i}while(n<r)}return n}}}function Mp(){return 0}wp.props={defaultShape:"rect",defaultLabelShape:"label",channels:[...sp({shapes:["rect","hollow"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeZeroY1"}],postInference:[...hp(),...cp()],interaction:{shareTooltip:!0}};$l=Ep(kp).right;const Op=Ep(function(t){return null===t?NaN:+t}).center;var Sp=$l;function _p(e,n){let r=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&++r;else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(i=+i)>=i&&++r}return r}function Ap(t,e){t=function(e,n){let r=0,i,a=0,o=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(i=t-a,a+=i/++r,o+=i*(t-a));else{let t=-1;for(var s of e)null!=(s=n(s,++t,e))&&(s=+s)>=s&&(i=s-a,a+=i/++r,o+=i*(s-a))}if(1<r)return o/(r-1)}(t,e);return t&&Math.sqrt(t)}function Tp(e,n){let r,i;if(void 0===n)for(const t of e)null!=t&&(void 0===r?t>=t&&(r=i=t):(r>t&&(r=t),i<t&&(i=t)));else{let t=-1;for(var a of e)null!=(a=n(a,++t,e))&&(void 0===r?a>=a&&(r=i=a):(r>a&&(r=a),i<a&&(i=a)))}return[r,i]}class Pp{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){var n=this._partials;let r=0;for(let t=0;t<this._n&&t<32;t++){var i=n[t],a=e+i,i=Math.abs(e)<Math.abs(i)?e-(a-i):i-(a-e);i&&(n[r++]=i),e=a}return n[r]=e,this._n=r+1,this}valueOf(){var t=this._partials;let e=this._n,n,r,i,a=0;if(0<e){for(a=t[--e];0<e&&(n=a,r=t[--e],a=n+r,!(i=r-(a-n))););0<e&&(i<0&&t[e-1]<0||0<i&&0<t[e-1])&&(r=2*i,n=a+r,r==n-a)&&(a=n)}return a}}class Lp extends Map{constructor(t,e=function(t){return null!==t&&"object"==typeof t?t.valueOf():t}){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(Np(this,t))}has(t){return super.has(Np(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):(t.set(e,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){e=e(n);t.has(e)&&(n=t.get(e),t.delete(e));return n}(this,t))}}function Np({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):n}function Cp(t){return t}function jp(t,...e){return Ip(t,Cp,Cp,e)}function Rp(t,e,...n){return Ip(t,Cp,e,n)}function Fp(t,e,...n){return Ip(t,Array.from,e,n)}function Ip(t,u,h,f){return function t(e,n){if(n>=f.length)return h(e);var r=new Lp,i=f[n++];let a=-1;for(const l of e){var o=i(l,++a,e),s=r.get(o);s?s.push(l):r.set(o,[l])}for(const[c,e]of r)r.set(c,t(e,n));return u(r)}(t,0)}function Bp(e,...i){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");e=Array.from(e);let[n]=i;var t,r;return n&&2!==n.length||1<i.length?(t=Uint32Array.from(e,(t,e)=>e),1<i.length?(i=i.map(t=>e.map(t)),t.sort((t,e)=>{for(const r of i){var n=zp(r[t],r[e]);if(n)return n}})):(n=e.map(n),t.sort((t,e)=>zp(n[t],n[e]))),r=e,Array.from(t,t=>r[t])):e.sort(Dp(n))}function Dp(r=kp){if(r===kp)return zp;if("function"!=typeof r)throw new TypeError("compare is not a function");return(t,e)=>{var n=r(t,e);return n||0===n?n:(0===r(e,e))-(0===r(t,t))}}function zp(t,e){return(null==t||!(t<=t))-(null==e||!(e<=e))||(t<e?-1:e<t?1:0)}var Gp=Array.prototype.slice;function Wp(t){return()=>t}var Vp=Math.sqrt(50),Yp=Math.sqrt(10),Hp=Math.sqrt(2);function qp(t,e,n){e=(e-t)/Math.max(0,n),t=Math.floor(Math.log(e)/Math.LN10),n=e/Math.pow(10,t);return 0<=t?(Vp<=n?10:Yp<=n?5:Hp<=n?2:1)*Math.pow(10,t):-Math.pow(10,-t)/(Vp<=n?10:Yp<=n?5:Hp<=n?2:1)}function Up(t){return Math.ceil(Math.log(_p(t))/Math.LN2)+1}function Xp(){var m=Cp,v=Tp,b=Up;function e(t){for(var e,n,r=(t=Array.isArray(t)?t:Array.from(t)).length,i=new Array(r),a=0;a<r;++a)i[a]=m(t[a],a,t);var o=v(i),s=o[0],l=o[1],c=b(i,s,l);if(!Array.isArray(c)){var o=l,u=+c;if(v===Tp&&([s,l]=function(t,e,n){let r;for(;;){var i=qp(t,e,n);if(i===r||0===i||!isFinite(i))return[t,e];0<i?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}(s,l,u)),(c=function(n,r,t){var e,i,a,o,s=-1;if(t=+t,(n=+n)===(r=+r)&&0<t)return[n];if((e=r<n)&&(i=n,n=r,r=i),0===(o=qp(n,r,t))||!isFinite(o))return[];if(0<o){let t=Math.round(n/o),e=Math.round(r/o);for(t*o<n&&++t,e*o>r&&--e,a=new Array(i=e-t+1);++s<i;)a[s]=(t+s)*o}else{o=-o;let t=Math.round(n*o),e=Math.round(r*o);for(t/o<n&&++t,e/o>r&&--e,a=new Array(i=e-t+1);++s<i;)a[s]=(t+s)/o}return e&&a.reverse(),a}(s,l,u))[0]<=s&&(n=qp(s,l,u)),c[c.length-1]>=l)if(l<=o&&v===Tp){const n=qp(s,l,u);isFinite(n)&&(0<n?l=(Math.floor(l/n)+1)*n:n<0&&(l=(Math.ceil(l*-n)+1)/-n))}else c.pop()}for(var h=c.length,f=0,d=h;c[f]<=s;)++f;for(;c[d-1]>l;)--d;(f||d<h)&&(c=c.slice(f,d),h=d-f);var p,g,y=new Array(h+1);for(a=0;a<=h;++a)(p=y[a]=[]).x0=0<a?c[a-1]:s,p.x1=a<h?c[a]:l;if(isFinite(n)){if(0<n)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&y[Math.min(h,Math.floor((e-s)/n))].push(t[a]);else if(n<0)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&(g=Math.floor((s-e)*n),y[Math.min(h,g+(c[g]<=e))].push(t[a]))}else for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&y[Sp(c,e,0,h)].push(t[a]);return y}return e.value=function(t){return arguments.length?(m="function"==typeof t?t:Wp(t),e):m},e.domain=function(t){return arguments.length?(v="function"==typeof t?t:Wp([t[0],t[1]]),e):v},e.thresholds=function(t){return arguments.length?(b="function"==typeof t?t:Wp(Array.isArray(t)?Gp.call(t):t),e):b},e}function $p(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r<t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r<i||void 0===r&&i>=i)&&(r=i)}return r}function Kp(t,e){let n,r=-1,i=-1;if(void 0===e)for(const o of t)++i,null!=o&&(n<o||void 0===n&&o>=o)&&(n=o,r=i);else for(var a of t)null!=(a=e(a,++i,t))&&(n<a||void 0===n&&a>=a)&&(n=a,r=i);return r}function Zp(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r>t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function Jp(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function Qp(t,e,n){var r;if((n=(t=Float64Array.from(function*(e,n){if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(yield t);else{let t=-1;for(var r of e)null!=(r=n(r,++t,e))&&(r=+r)>=r&&(yield r)}}(t,n))).length)&&!isNaN(e=+e))return e<=0||n<2?Zp(t):1<=e?$p(t):(n=(n-1)*e,(r=$p(function n(r,i,a=0,o=1/0,s){if(i=Math.floor(i),a=Math.floor(Math.max(0,a)),o=Math.floor(Math.min(r.length-1,o)),a<=i&&i<=o)for(s=void 0===s?zp:Dp(s);a<o;){600<o-a&&(l=o-a+1,c=i-a+1,h=Math.log(l),u=.5*Math.exp(2*h/3),h=.5*Math.sqrt(h*u*(l-u)/l)*(c-l/2<0?-1:1),n(r,i,Math.max(a,Math.floor(i-c*u/l+h)),Math.min(o,Math.floor(i+(l-c)*u/l+h)),s));var l,c,u,h,f=r[i];let t=a,e=o;for(Jp(r,a,i),0<s(r[o],f)&&Jp(r,a,o);t<e;){for(Jp(r,t,e),++t,--e;s(r[t],f)<0;)++t;for(;0<s(r[e],f);)--e}0===s(r[a],f)?Jp(r,a,e):Jp(r,++e,o),e<=i&&(a=e+1),i<=e&&(o=e-1)}return r}(t,e=Math.floor(n)).subarray(0,e+1)))+(Zp(t.subarray(e+1))-r)*(n-e))}function t0(e,n){let r=0,i=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(++r,i+=t);else{let t=-1;for(var a of e)null!=(a=n(a,++t,e))&&(a=+a)>=a&&(++r,i+=a)}if(r)return i/r}function e0(t,e){return Qp(t,.5,e)}function n0(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function r0(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)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}function i0(e,n){let r=0;if(void 0===n)for(var t of e)(t=+t)&&(r+=t);else{let t=-1;for(var i of e)(i=+n(i,++t,e))&&(r+=i)}return r}function a0(t){t=t.getOptions().transformations;return t.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function o0(t){t=t.getOptions().transformations;return t.some(([t])=>"polar"===t)}function s0(t){t=t.getOptions().transformations;return t.some(([t])=>"reflect"===t)&&t.some(([t])=>t.startsWith("transpose"))}function l0(t){t=t.getOptions().transformations;return t.some(([t])=>"helix"===t)}function c0(t){t=t.getOptions().transformations;return t.some(([t])=>"parallel"===t)}function u0(t){t=t.getOptions().transformations;return t.some(([t])=>"fisheye"===t)}function h0(t){return l0(t)||o0(t)}const f0=(t,e,n,r)=>{var i;const{series:a,x:o,y:s}=n;var{x:n,y:e}=e;if(void 0===o||void 0===s)throw new Error("Missing encode for x or y channel.");var t=a?Array.from(jp(t,t=>a[t]).values()):[t],l=t.map(t=>t[0]);const c=((null==(i=null==n?void 0:n.getBandWidth)?void 0:i.call(n))||0)/2,u=((null==(i=null==e?void 0:e.getBandWidth)?void 0:i.call(e))||0)/2;return[l,Array.from(t,t=>t.map(t=>r.map([+o[t]+c,+s[t]+u]))),t]},d0=(t,e,n,i)=>{const a=Object.entries(n).filter(([t])=>t.startsWith("position")).map(([,t])=>t);if(0===a.length)throw new Error("Missing encode for position channel.");return[t,Array.from(t,e=>{var t=a.map(t=>+t[e]),n=i.map(t),r=[];for(let t=0;t<n.length;t+=2)r.push([n[t],n[t+1]]);return r})]},p0=()=>(t,e,n,r)=>{return(c0(r)?d0:f0)(t,e,n,r)};p0.props={defaultShape:"line",defaultLabelShape:"label",channels:[...sp({shapes:["line","smooth"]}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"},{type:"maybeGradient"}],postInference:[...hp(),...cp(),{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const g0=g=>(t,e,n,o)=>{const{x:r,y:i,x1:a,y1:s,size:l,dx:c,dy:u}=n,[h,f]=o.getSize(),d=dp(e,n,g),p=t=>{var e=+((null===c||void 0===c?void 0:c[t])||0),n=+((null===u||void 0===u?void 0:u[t])||0);return[(a?(+r[t]+ +a[t])/2:+r[t])+e,(s?(+i[t]+ +s[t])/2:+i[t])+n]};return[t,l?Array.from(t,t=>{var[e,n]=p(t),r=+l[t],i=r/h,r=r/f,a=[e-i,n-r],e=[e+i,n+r];return[o.map(d(a,t)),o.map(d(e,t))]}):Array.from(t,t=>[o.map(d(p(t),t))])]};g0.props={defaultShape:"hollow",defaultLabelShape:"label",channels:[...sp({shapes:["hollow","hollowDiamond","hollowHexagon","hollowSquare","hollowTriangleDown","hollowTriangle","hollowBowtie","point","plus","diamond","square","triangle","hexagon","cross","bowtie","hyphen","line","tick","triangleDown"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",scale:"sqrt"},{name:"dx",scale:"identity"},{name:"dy",scale:"identity"}],preInference:[{type:"maybeZeroY"},{type:"maybeZeroX"}],postInference:[...hp(),{type:"maybeSize"},...lp()]};const y0=s=>{const{cartesian:l=!1}=s;return l?gp:(t,e,n,r)=>{if(l)return gp(t,0,n,r);const{x:i,y:a}=n,o=dp(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};y0.props={defaultShape:"text",defaultLabelShape:"label",channels:[...sp({shapes:["text","badge"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...hp(),...lp()]};const m0=()=>(t,e,n,i)=>{const{x:a,y:o}=n,s=e.x,l=e.y;return[t,Array.from(t,t=>{var e=s.getBandWidth(s.invert(+a[t])),n=l.getBandWidth(l.invert(+o[t])),r=+a[t],t=+o[t];return[[r,t],[r+e,t],[r+e,t+n],[r,t+n]].map(t=>i.map(t))})]};m0.props={defaultShape:"cell",defaultLabelShape:"label",channels:[...sp({shapes:["cell","hollow"]}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[{type:"maybeZeroX"},{type:"maybeZeroY"},{type:"maybeZeroPadding"}],postInference:[...hp(),...lp()]};const v0=()=>(t,e,n,a)=>{const{x:o,y:s,y1:l,series:r}=n;n=r?Array.from(jp(t,t=>r[t]).values()):[t];return[n.map(t=>t[0]),Array.from(n,e=>{var n=e.length,r=new Array(2*n);for(let t=0;t<e.length;t++){var i=e[t];r[t]=a.map([+o[i],+s[i]]),r[n+t]=a.map([+o[i],+l[i]])}return r}),n]};v0.props={defaultShape:"area",defaultLabelShape:"label",channels:[...sp({shapes:["area","smooth"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"},{type:"maybeZeroY1"},{type:"maybeZeroPadding"}],postInference:[...hp(),...cp()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const b0=c=>(t,e,n,r)=>{const{x:i,y:a,x1:o=i,y1:s=a}=n,l=dp(e,n,c);e=t.map(t=>[r.map(l([+i[t],+a[t]],t)),r.map(l([+o[t],+s[t]],t))]);return[t,e]};b0.props={defaultShape:"link",defaultLabelShape:"label",channels:[...sp({shapes:["link","arc","vhv","smooth"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeIdentityY"},{type:"maybeIdentityX"}],postInference:[...hp(),...lp()]};const x0=s=>{var t=s["cartesian"];return t?gp:(t,e,n,r)=>{const{x:i,y:a}=n,o=dp(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};x0.props={defaultShape:"image",defaultLabelShape:"label",channels:[...sp({shapes:["image"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...hp(),...lp()]};const w0=()=>(t,e,n,a)=>{const o=Object.entries(n).filter(([t])=>t.startsWith("x")).map(([,t])=>t),s=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t);n=t.map(e=>{var n=[];for(let t=0;t<o.length;t++){var r=o[t][e];if(void 0===r)break;var i=s[t][e];n.push(a.map([+r,+i]))}return n});return[t,n]};w0.props={defaultShape:"polygon",defaultLabelShape:"label",channels:[...sp({shapes:["polygon","ribbon"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...hp(),...lp()]};const k0=()=>(t,e,n,s)=>{const{x:l,y:c,y1:u,y2:h,y3:f,y4:d,series:p}=n,g=e.x,y=e.series;return[t,Array.from(t,t=>{var e=g.getBandWidth(g.invert(+l[t])),n=e*(y?y.getBandWidth(y.invert(+(null===p||void 0===p?void 0:p[t]))):1),e=(+(null===p||void 0===p?void 0:p[t])||0)*e,e=+l[t]+e+n/2,[t,r,i,a,o]=[+c[t],+u[t],+h[t],+f[t],+d[t]];return[[e-n/2,o],[e+n/2,o],[e,o],[e,a],[e-n/2,a],[e+n/2,a],[e+n/2,r],[e-n/2,r],[e-n/2,i],[e+n/2,i],[e,r],[e,t],[e-n/2,t],[e+n/2,t]].map(t=>s.map(t))})]},E0=(k0.props={defaultShape:"box",defaultLabelShape:"label",channels:[...sp({shapes:["box"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[{type:"maybeZeroX"}],postInference:[...hp(),...cp()],interaction:{shareTooltip:!0}},()=>(t,e,n,i)=>{const{x:a,y:o,size:s,rotate:l}=n,[c,u]=i.getSize();n=t.map(t=>{var e=+l[t]/180*Math.PI,n=+s[t],r=n/c,n=n/u,r=r*Math.cos(e),n=-n*Math.sin(e);return[i.map([+a[t]-r/2,+o[t]-n/2]),i.map([+a[t]+r/2,+o[t]+n/2])]});return[t,n]});E0.props={defaultShape:"vector",defaultLabelShape:"label",channels:[...sp({shapes:["vector"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[],postInference:[...hp(),...lp()]};const M0=()=>(t,e,n,r)=>{const i=n["y"];return[t,Array.from(t,t=>{return[[0,i[t]],[1,i[t]]].map(t=>r.map(t))})]};M0.props={defaultShape:"line",defaultLabelShape:"label",channels:[...up({shapes:["line"]}),{name:"y",required:!0}],preInference:[{type:"maybeTupleY"}],postInference:[...hp()]};const O0=()=>(t,e,n,r)=>{const i=n["x"];return[t,Array.from(t,t=>{return[[i[t],1],[i[t],0]].map(t=>r.map(t))})]};O0.props={defaultShape:"line",defaultLabelShape:"label",channels:[...up({shapes:["line"]}),{name:"x",required:!0}],preInference:[{type:"maybeTupleX"}],postInference:[...hp()]};const S0=(...t)=>b0(...t);function _0(t,e,n,r){if(e)return()=>[0,1];const{[t]:i,[t+"1"]:a}=n;return t=>{var e=(null==(e=r.getBandWidth)?void 0:e.call(r,r.invert(+a[t])))||0;return[i[t],a[t]+e]}}function A0(t={}){const{extendX:r=!1,extendY:s=!1}=t;return(t,e,n,i)=>{const a=_0("x",r,n,e.x),o=_0("y",s,n,e.y);return[t,Array.from(t,t=>{var[e,n]=a(t),[t,r]=o(t);return[[e,t],[n,t],[n,r],[e,r]].map(t=>i.map(t))})]}}S0.props={defaultShape:"connector",defaultLabelShape:"label",channels:[...up({shapes:["connector"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...hp()]};const T0=()=>A0();T0.props={defaultShape:"range",defaultLabelShape:"label",channels:[...up({shapes:["range"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...hp()]};const P0=()=>A0({extendY:!0});P0.props={defaultShape:"range",defaultLabelShape:"label",channels:[...up({shapes:["range"]}),{name:"x",required:!0}],preInference:[],postInference:[...hp()]};const L0=()=>A0({extendX:!0});function N0(t){return t.target.depth}function C0(t,e){return t.sourceLinks.length?t.depth:e-1}function j0(t){return function(){return t}}function R0(t,e){return I0(t.source,e.source)||t.index-e.index}function F0(t,e){return I0(t.target,e.target)||t.index-e.index}function I0(t,e){return t.y0-e.y0}function B0(t){return t.value}function D0(t){return t.index}function z0(t){return t.nodes}function G0(t){return t.links}function W0(t,e){t=t.get(e);if(t)return t;throw new Error("missing: "+e)}function V0({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const r of n.sourceLinks)r.y0=t+r.width/2,t+=r.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function Y0(){let x=0,w=0,k=1,E=1,M=24,O=8,S,_=D0,A=C0,T,P,L,N=z0,C=G0,j=6;function e(e){e={nodes:N(e),links:C(e)};{var{nodes:i,links:t}=e;i.forEach((t,e)=>{t.index=e,t.sourceLinks=[],t.targetLinks=[]});const g=new Map(i.map(t=>[_(t),t]));if(t.forEach((t,e)=>{t.index=e;let{source:n,target:r}=t;"object"!=typeof n&&(n=t.source=W0(g,n)),"object"!=typeof r&&(r=t.target=W0(g,r)),n.sourceLinks.push(t),r.targetLinks.push(t)}),null!=L)for(var{sourceLinks:n,targetLinks:r}of i)n.sort(L),r.sort(L)}t=e.nodes;for(const y of t)y.value=void 0===y.fixedValue?Math.max(i0(y.sourceLinks,B0),i0(y.targetLinks,B0)):y.fixedValue;{var a=e.nodes,o=a.length;let t=new Set(a),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.depth=r;for(var{target:e}of t.sourceLinks)n.add(e)}),++r>o)throw new Error("circular link");t=n,n=new Set}if(T){var s,l=Math.max($p(a,t=>t.depth)+1,0);for(let t=0;t<a.length;t++)(s=a[t]).depth=T.call(null,s,l)}}{var c=(i=e.nodes).length;let t=new Set(i),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.height=r;for(var{source:e}of t.targetLinks)n.add(e)}),++r>c)throw new Error("circular link");t=n,n=new Set}}var u=function({nodes:t}){var e=Math.max($p(t,t=>t.depth)+1,0),n=(k-x-M)/(e-1),r=new Array(e).fill(0).map(()=>[]);for(const a of t){var i=Math.max(0,Math.min(e-1,Math.floor(A.call(null,a,e))));a.layer=i,a.x0=x+i*n,a.x1=a.x0+M,r[i]?r[i].push(a):r[i]=[a]}if(P)for(const o of r)o.sort(P);return r}(e),t=(S=Math.min(O,(E-w)/($p(u,t=>t.length)-1)),u),h=Zp(t,t=>(E-w-(t.length-1)*S)/i0(t,B0));for(const m of t){let e=w;for(const v of m){v.y0=e,v.y1=e+v.value*h,e=v.y1+S;for(const b of v.sourceLinks)b.width=b.value*h}e=(E-e+S)/(m.length+1);for(let t=0;t<m.length;++t){var f=m[t];f.y0+=e*(t+1),f.y1+=e*(t+1)}!function(t){if(void 0===L)for(var{sourceLinks:e,targetLinks:n}of t)e.sort(F0),n.sort(R0)}(m)}for(let t=0;t<j;++t){var d=Math.pow(.99,t),p=Math.max(1-d,(t+1)/j);!function(n,r,i){for(let t=n.length,e=t-2;0<=e;--e){var a,o=n[e];for(const c of o){let t=0,e=0;for(var{target:s,value:l}of c.sourceLinks){l=l*(s.layer-c.layer);t+=function(t,e){let n=e.y0-(e.targetLinks.length-1)*S/2;for(var{source:r,width:i}of e.targetLinks){if(r===t)break;n+=i+S}for(var{target:a,width:o}of t.sourceLinks){if(a===e)break;n-=o}return n}(c,s)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,F(c))}void 0===P&&o.sort(I0),o.length&&R(o,i)}}(u,d,p),!function(n,r,i){for(let t=1,e=n.length;t<e;++t){var a,o=n[t];for(const c of o){let t=0,e=0;for(var{source:s,value:l}of c.targetLinks){l=l*(c.layer-s.layer);t+=function(t,e){let n=t.y0-(t.sourceLinks.length-1)*S/2;for(var{target:r,width:i}of t.sourceLinks){if(r===e)break;n+=i+S}for(var{source:a,width:o}of e.targetLinks){if(a===t)break;n-=o}return n}(s,c)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,F(c))}void 0===P&&o.sort(I0),o.length&&R(o,i)}}(u,d,p)}return V0(e),e}function R(t,e){var n=t.length>>1,r=t[n];a(t,r.y0-S,n-1,e),i(t,r.y1+S,1+n,e),a(t,E,t.length-1,e),i(t,w,0,e)}function i(t,e,n,r){for(;n<t.length;++n){var i=t[n],a=(e-i.y0)*r;1e-6<a&&(i.y0+=a,i.y1+=a),e=i.y1+S}}function a(t,e,n,r){for(;0<=n;--n){var i=t[n],a=(i.y1-e)*r;1e-6<a&&(i.y0-=a,i.y1-=a),e=i.y0-S}}function F({sourceLinks:t,targetLinks:e}){if(void 0===L){for(const{source:{sourceLinks:t}}of e)t.sort(F0);for(const{target:{targetLinks:e}}of t)e.sort(R0)}}return e.update=function(t){return V0(t),t},e.nodeId=function(t){return arguments.length?(_="function"==typeof t?t:j0(t),e):_},e.nodeAlign=function(t){return arguments.length?(A="function"==typeof t?t:j0(t),e):A},e.nodeDepth=function(t){return arguments.length?(T=t,e):T},e.nodeSort=function(t){return arguments.length?(P=t,e):P},e.nodeWidth=function(t){return arguments.length?(M=+t,e):M},e.nodePadding=function(t){return arguments.length?(O=S=+t,e):O},e.nodes=function(t){return arguments.length?(N="function"==typeof t?t:j0(t),e):N},e.links=function(t){return arguments.length?(C="function"==typeof t?t:j0(t),e):C},e.linkSort=function(t){return arguments.length?(L=t,e):L},e.size=function(t){return arguments.length?(x=w=0,k=+t[0],E=+t[1],e):[k-x,E-w]},e.extent=function(t){return arguments.length?(x=+t[0][0],k=+t[1][0],w=+t[0][1],E=+t[1][1],e):[[x,w],[k,E]]},e.iterations=function(t){return arguments.length?(j=+t,e):j},e}L0.props={defaultShape:"range",defaultLabelShape:"label",channels:[...up({shapes:["range"]}),{name:"y",required:!0}],preInference:[],postInference:[...hp()]};const H0={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},q0={left:function(t){return t.depth},right:function(t,e){return e-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?Zp(t.sourceLinks,N0)-1:0},justify:C0};const U0=h=>t=>{var{nodeId:e,nodeSort:n,nodeAlign:r,nodeWidth:i,nodePadding:a,nodeDepth:o,nodes:s,links:l,linkSort:c,iterations:u}=Object.assign({},H0,h),l=Y0().nodeSort(n).linkSort(c).links(l).nodes(s).nodeWidth(i).nodePadding(a).nodeDepth(o).nodeAlign("string"==(c=typeof(n=r))?q0[n]||C0:"function"==c?n:C0).iterations(u).extent([[0,0],[1,1]]),s=("function"==typeof e&&l.nodeId(e),l(t)),{nodes:i,links:a}=s;return{nodes:i.map(t=>{var{x0:e,x1:n,y0:r,y1:i}=t;return Object.assign(Object.assign({},t),{x:[e,n,n,e],y:[r,r,i,i]})}),links:a.map(t=>{var{source:e,target:n}=t,e=e.x1,n=n.x0,r=t.width/2;return Object.assign(Object.assign({},t),{x:[e,e,n,n],y:[t.y0+r,t.y0-r,t.y1+r,t.y1-r]})})}};function X0(t){return t}function $0(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function K0(t=""){throw new Error(t)}function Z0(t,e){var n,r,e=e["attributes"],i=new Set(["id","className"]);for([n,r]of Object.entries(e))i.has(n)||t.attr(n,r)}function J0(t){return null!=t&&!Number.isNaN(t)}function Q(t,e){return Q0(t,e)||{}}function Q0(t,n){t=Object.entries(t).filter(([t])=>t.startsWith(n)).map(([t,e])=>[_f(t.replace(n,"").trim()),e]).filter(([t])=>!!t);return 0===t.length?null:Object.fromEntries(t)}function tg(t,e){return void 0===t?null:"number"==typeof t?t:(t=+t.replace("%",""),Number.isNaN(t)?null:t/100*e)}function eg(t){return"object"==typeof t&&!(t instanceof Date)&&null!==t}U0.props={};const ng=y=>{const m={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},v={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},b={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:null}},x={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10};return()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=y,{links:t,nodes:l}=vp(t,e),c=Q(e,"node"),e=Q(e,"link"),{key:u=t=>t.key,color:h=u}=c,{links:i,nodes:t}=U0(Object.assign(Object.assign(Object.assign({},m),{nodeId:yp(u)}),i))({links:t,nodes:l});const f=Q(r,"label"),{text:d=u,spacing:p=5}=f,g=J(f,["text","spacing"]);return[R({},v,{data:t,encode:Object.assign(Object.assign({},c),{color:h}),scale:n,style:Q(r,"node"),labels:[Object.assign(Object.assign(Object.assign({},x),{text:d,dx:t=>t.x[0]<.5?p:-p}),g),...a],animate:"object"==typeof s?Q(s,"node"):s,axis:!1}),R({},b,{data:i,encode:e,labels:o,style:Object.assign({fill:e.color?void 0:"#aaa"},Q(r,"link")),animate:"object"==typeof s?Q(s,"link"):s})]}},rg=(ng.props={composite:!0},t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])]);rg.props={defaultShape:"path",defaultLabelShape:"label",channels:[...sp({shapes:["path","hollow"]}),{name:"d",scale:"identity"}],preInference:[],postInference:[...hp()]};const ig=t=>t?parseInt(t):0;function ag(t,e,n,r){var i;return e?(e=t,t=getComputedStyle(e),i=e.clientWidth||ig(t.width),e=e.clientHeight||ig(t.height),{width:(i={width:i-(ig(t.paddingLeft)+ig(t.paddingRight)),height:e-(ig(t.paddingTop)+ig(t.paddingBottom))}).width,height:i.height}):{width:n,height:r}}function og(t){var{height:t,width:e,padding:n=0,paddingLeft:r=n,paddingRight:i=n,paddingTop:a=n,paddingBottom:n=n,margin:o=0,marginLeft:s=o,marginRight:l=o,marginTop:c=o,marginBottom:o=o,inset:u=0,insetLeft:h=u,insetRight:f=u,insetTop:d=u,insetBottom:u=u}=t;return{width:e-r-i-s-l-h-f,height:t-a-n-c-o-d-u}}function sg(t,e,n){const r=n["value"];var o,i,a,s,l,c,u,h,f,d,n=function(t,e){var n={treemapBinary:rp,treemapDice:zd,treemapSlice:tp,treemapSliceDice:ip,treemapSquarify:np,treemapResquarify:ap};if(e="treemapSquarify"===t?n[t].ratio(e):n[t])return e;throw new TypeError("Invalid tile method!")}(e.tile,e.ratio),p=(t=t,p=e.path,(Array.isArray(t)?"function"==typeof p?qd().path(p):qd():fd)(t));function g(t){return t.x0=t.y0=0,t.x1=a,t.y1=s,t.eachBefore(y),l=[0],i&&t.eachBefore(Dd),t}function y(t){var e=l[t.depth],n=t.x0+e,r=t.y0+e,i=t.x1-e,a=t.y1-e;i<n&&(n=i=(n+i)/2),a<r&&(r=a=(r+a)/2),t.x0=n,t.y0=r,t.x1=i,t.y1=a,t.children&&(e=l[t.depth+1]=c(t)/2,n+=d(t)-e,r+=u(t)-e,(i-=h(t)-e)<n&&(n=i=(n+i)/2),(a-=f(t)-e)<r&&(r=a=(r+a)/2),o(t,n,r,i,a))}return r?p.sum(t=>e.ignoreParentValue&&t.children?0:t[r]).sort(e.sort):p.count(),o=np,i=!1,s=a=1,l=[0],d=f=h=u=c=xd,g.round=function(t){return arguments.length?(i=!!t,g):i},g.size=function(t){return arguments.length?(a=+t[0],s=+t[1],g):[a,s]},g.tile=function(t){return arguments.length?(o=bd(t),g):o},g.padding=function(t){return arguments.length?g.paddingInner(t).paddingOuter(t):g.paddingInner()},g.paddingInner=function(t){return arguments.length?(c="function"==typeof t?t:wd(+t),g):c},g.paddingOuter=function(t){return arguments.length?g.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):g.paddingTop()},g.paddingTop=function(t){return arguments.length?(u="function"==typeof t?t:wd(+t),g):u},g.paddingRight=function(t){return arguments.length?(h="function"==typeof t?t:wd(+t),g):h},g.paddingBottom=function(t){return arguments.length?(f="function"==typeof t?t:wd(+t),g):f},g.paddingLeft=function(t){return arguments.length?(d="function"==typeof t?t:wd(+t),g):d},g.tile(n).size(e.size).round(e.round).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(p),p.descendants().map(t=>Object.assign(t,{x:[t.x0,t.x1],y:[t.y0,t.y1]})).filter("function"==typeof e.layer?e.layer:t=>t.height===e.layer)}const lg=u=>t=>{var{width:t,height:e}=og(t),{data:n,encode:r={},scale:i,style:a={},layout:o={},labels:s=[]}=u,l=J(u,["data","encode","scale","style","layout","labels"]),c={tile:"treemapSquarify",ratio:.5*(1+Math.sqrt(5)),size:[t,e],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,sort:(t,e)=>e.value-t.value,layer:0},t={type:"rect",axis:!1,encode:{x:"x",y:"y",color:t=>t.data.parent.name},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]}},style:{stroke:"#fff"}},e=sg(n,R({},c,o),r),n=Q(a,"label");return[R({},t,Object.assign(Object.assign({data:e,encode:r,scale:i,style:a,labels:[Object.assign(Object.assign({},{fontSize:10,text:t=>t.data.name,position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0,lineHeight:t=>t.y1-t.y0}),n),...s]},l),{axis:!1}))]},cg=(lg.props={composite:!0},u=>t=>{var{width:t,height:e}=og(t),{data:n,encode:r={},scale:i={},style:a={},layout:o={},labels:s=[]}=u,l=J(u,["data","encode","scale","style","layout","labels"]),c={type:"point",axis:!1,legend:!1,scale:{x:{domain:[0,t]},y:{domain:[0,e]},size:{type:"identity"}},encode:{x:"x",y:"y",size:"r",shape:"point"},style:{fill:r.color?void 0:t=>0===t.height?"#ddd":"#fff",stroke:r.color?void 0:t=>0===t.height?"":"#000"}},n=((t,e,n)=>{const r=n["value"];n=(Of(t)?qd().path(e.path):fd)(t);return r?n.sum(t=>t[r]).sort(e.sort):n.count(),Rd().size(e.size).padding(e.padding)(n),n.descendants()})(n,R({},{size:[t,e],padding:0,sort:(t,e)=>e.value-t.value},o),R({},c.encode,r)),t=Q(a,"label");return[R({},c,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a,labels:[Object.assign(Object.assign({},{text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>2*t.r,lineHeight:t=>2*t.r}),t),...s]},l),{axis:!1}))]});function ug(t,e){return Zp(t,t=>e[t])}function hg(t,e){return $p(t,t=>e[t])}function fg(t,e){const n=2.5*dg(t,e)-1.5*gg(t,e);return Zp(t,t=>e[t]>=n?e[t]:NaN)}function dg(t,e){return Qp(t,.25,t=>e[t])}function pg(t,e){return Qp(t,.5,t=>e[t])}function gg(t,e){return Qp(t,.75,t=>e[t])}function yg(t,e){const n=2.5*gg(t,e)-1.5*dg(t,e);return $p(t,t=>e[t]<=n?e[t]:NaN)}function mg(){return(t,e)=>{var n=e["encode"],{y:n,x:r}=n;const i=n["value"],a=r["value"];return[Array.from(jp(t,t=>a[+t]).values()).flatMap(t=>{const e=fg(t,i),n=yg(t,i);return t.filter(t=>i[t]<e||i[t]>n)}),e]}}cg.props={composite:!0};const vg=o=>()=>{var{data:t,encode:e,style:n={}}=o,{extend:r=!1}=n,n=J(n,["extend"]),i=e["y"],i={y:i,y1:i,y2:i,y3:i,y4:i},a={y1:dg,y2:pg,y3:gg};return r?[{type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:ug},a),{y4:hg})],encode:Object.assign(Object.assign({},e),i),style:n}]:(r=Q(n,"box"),n=Q(n,"point"),[{type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:fg},a),{y4:yg})],encode:Object.assign(Object.assign({},e),i),style:r},{type:"point",data:t,transform:[{type:mg}],encode:e,style:Object.assign({},n)}])},bg=(vg.props={composite:!0},s=>{var t=s["cartesian"];return t?gp:(t,e,n,r)=>{const{x:i,y:a}=n,o=dp(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}});function xg(t,e,n,r){if(!isNaN(e)&&!isNaN(n)){var i,a,o,s,l,c,u,h,f,d=t._root,p={data:r},g=t._x0,y=t._y0,m=t._x1,v=t._y1;if(d){for(;d.length;)if((c=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+v)/2))?y=o:v=o,!(d=(i=d)[h=u<<1|c]))return i[h]=p,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&n===l)p.next=d,i?i[h]=p:t._root=p;else{for(;i=i?i[h]=new Array(4):t._root=new Array(4),(c=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+v)/2))?y=o:v=o,(h=u<<1|c)==(f=(o<=l)<<1|a<=s););i[f]=d,i[h]=p}}else t._root=p}return t}function wg(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function kg(t){return t[0]}function Eg(t){return t[1]}function Mg(t,e,n){e=new Og(null==e?kg:e,null==n?Eg:n,NaN,NaN,NaN,NaN);return null==t?e:e.addAll(t)}function Og(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function Sg(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}bg.props={defaultShape:"shape",defaultLabelShape:"label",channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"},{type:"maybeFunctionAttribute"}]};Ka=Mg.prototype=Og.prototype;function _g(t){return function(){return t}}function Ag(t){return 1e-6*(t()-.5)}function Tg(t){return t.index}function Pg(t,e){t=t.get(e);if(t)return t;throw new Error("node not found: "+e)}function Lg(c){var u,h,a,o,f,d,s=Tg,n=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},r=_g(30),p=1;function e(t){for(var e=0,n=c.length;e<p;++e)for(var r,i,a,o,s,l=0;l<n;++l)r=(i=c[l]).source,a=(i=i.target).x+i.vx-r.x-r.vx||Ag(d),o=i.y+i.vy-r.y-r.vy||Ag(d),a*=s=((s=Math.sqrt(a*a+o*o))-h[l])/s*t*u[l],o*=s,i.vx-=a*(s=f[l]),i.vy-=o*s,r.vx+=a*(s=1-s),r.vy+=o*s}function i(){if(a){var t,e=a.length,n=c.length,r=new Map(a.map((t,e)=>[s(t,e,a),t])),i=0;for(o=new Array(e);i<n;++i)(t=c[i]).index=i,"object"!=typeof t.source&&(t.source=Pg(r,t.source)),"object"!=typeof t.target&&(t.target=Pg(r,t.target)),o[t.source.index]=(o[t.source.index]||0)+1,o[t.target.index]=(o[t.target.index]||0)+1;for(i=0,f=new Array(n);i<n;++i)t=c[i],f[i]=o[t.source.index]/(o[t.source.index]+o[t.target.index]);u=new Array(n),l(),h=new Array(n),g()}}function l(){if(a)for(var t=0,e=c.length;t<e;++t)u[t]=+n(c[t],t,c)}function g(){if(a)for(var t=0,e=c.length;t<e;++t)h[t]=+r(c[t],t,c)}return null==c&&(c=[]),e.initialize=function(t,e){a=t,d=e,i()},e.links=function(t){return arguments.length?(c=t,i(),e):c},e.id=function(t){return arguments.length?(s=t,e):s},e.iterations=function(t){return arguments.length?(p=+t,e):p},e.strength=function(t){return arguments.length?(n="function"==typeof t?t:_g(+t),l(),e):n},e.distance=function(t){return arguments.length?(r="function"==typeof t?t:_g(+t),g(),e):r},e}Ka.copy=function(){var t,e,n=new Og(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(r)if(r.length)for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=Sg(e));else n._root=Sg(r);return n},Ka.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return xg(this.cover(e,n),e,n,t)},Ka.addAll=function(t){for(var e,n,r=t.length,i=new Array(r),a=new Array(r),o=1/0,s=1/0,l=-1/0,c=-1/0,u=0;u<r;++u)isNaN(e=+this._x.call(null,n=t[u]))||isNaN(n=+this._y.call(null,n))||((i[u]=e)<o&&(o=e),l<e&&(l=e),(a[u]=n)<s&&(s=n),c<n&&(c=n));if(!(l<o||c<s))for(this.cover(o,s).cover(l,c),u=0;u<r;++u)xg(this,i[u],a[u],t[u]);return this},Ka.cover=function(t,e){if(!isNaN(t=+t)&&!isNaN(e=+e)){var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,s,l=i-n||1,c=this._root;t<n||i<=t||e<r||a<=e;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=c,c=o,l*=2,s){case 0:i=n+l,a=r+l;break;case 1:n=i-l,a=r+l;break;case 2:i=n+l,r=a-l;break;case 3:n=i-l,r=a-l}this._root&&this._root.length&&(this._root=c)}this._x0=n,this._y0=r,this._x1=i,this._y1=a}return this},Ka.data=function(){var e=[];return this.visit(function(t){if(!t.length)for(;e.push(t.data),t=t.next;);}),e},Ka.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Ka.find=function(t,e,n){var r,i,a,o,s,l,c,u,h=this._x0,f=this._y0,d=this._x1,p=this._y1,g=[],y=this._root;for(y&&g.push(new wg(y,h,f,d,p)),null==n?n=1/0:(h=t-n,f=e-n,d=t+n,p=e+n,n*=n);r=g.pop();)!(y=r.node)||(s=r.x0)>d||(l=r.y0)>p||(o=r.x1)<h||(i=r.y1)<f||(y.length?(g.push(new wg(y[3],a=(s+o)/2,c=(l+i)/2,o,i),new wg(y[2],s,c,a,i),new wg(y[1],a,l,o,c),new wg(y[0],s,l,a,c)),(i=(c<=e)<<1|a<=t)&&(r=g[g.length-1],g[g.length-1]=g[g.length-1-i],g[g.length-1-i]=r)):(l=(o=t-+this._x.call(null,y.data))*o+(s=e-+this._y.call(null,y.data))*s)<n&&(h=t-(c=Math.sqrt(n=l)),f=e-c,d=t+c,p=e+c,u=y.data));return u},Ka.remove=function(t){if(!isNaN(a=+this._x.call(null,t))&&!isNaN(o=+this._y.call(null,t))){var e,n,r,i,a,o,s,l,c,u,h,f=this._root,d=this._x0,p=this._y0,g=this._x1,y=this._y1;if(f){if(f.length)for(;;){if((l=a>=(s=(d+g)/2))?d=s:g=s,(c=o>=(s=(p+y)/2))?p=s:y=s,!(f=(e=f)[u=c<<1|l]))return this;if(!f.length)break;(e[u+1&3]||e[u+2&3]||e[u+3&3])&&(n=e,h=u)}for(;f.data!==t;)if(!(f=(r=f).next))return this;(i=f.next)&&delete f.next,r?i?r.next=i:delete r.next:e?(i?e[u]=i:delete e[u],(f=e[0]||e[1]||e[2]||e[3])&&f===(e[3]||e[2]||e[1]||e[0])&&!f.length&&(n?n[h]=f:this._root=f)):this._root=i}}return this},Ka.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},Ka.root=function(){return this._root},Ka.size=function(){var e=0;return this.visit(function(t){if(!t.length)for(;++e,t=t.next;);}),e},Ka.visit=function(t){var e,n,r,i,a,o,s,l=[],c=this._root;for(c&&l.push(new wg(c,this._x0,this._y0,this._x1,this._y1));a=l.pop();)!t(c=a.node,n=a.x0,r=a.y0,i=a.x1,a=a.y1)&&c.length&&(o=(n+i)/2,s=(r+a)/2,(e=c[3])&&l.push(new wg(e,o,s,i,a)),(e=c[2])&&l.push(new wg(e,n,s,o,a)),(e=c[1])&&l.push(new wg(e,o,r,i,s)),e=c[0])&&l.push(new wg(e,n,r,o,s));return this},Ka.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new wg(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i,a,o,s,l,c,u,h=e.node;h.length&&(a=e.x0,o=e.y0,c=(a+(s=e.x1))/2,u=(o+(l=e.y1))/2,(i=h[0])&&n.push(new wg(i,a,o,c,u)),(i=h[1])&&n.push(new wg(i,c,o,s,u)),(i=h[2])&&n.push(new wg(i,a,u,c,l)),i=h[3])&&n.push(new wg(i,c,u,s,l)),r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},Ka.x=function(t){return arguments.length?(this._x=t,this):this._x},Ka.y=function(t){return arguments.length?(this._y=t,this):this._y};var Ng={value:()=>{}};function Cg(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new jg(r)}function jg(t){this._=t}function Rg(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Ng,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}jg.prototype=Cg.prototype={constructor:jg,on:function(t,e){var n,r,i=this._,a=(r=i,(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(0<=n&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(n=(t=a[o]).type)i[n]=Rg(i[n],t.name,e);else if(null==e)for(n in i)i[n]=Rg(i[n],t.name,null);return this}for(;++o<s;)if(n=(n=(t=a[o]).type)&&function(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}(i[n],t.name))return n},copy:function(){var t,e={},n=this._;for(t in n)e[t]=n[t].slice();return new jg(e)},call:function(t,e){if(0<(n=arguments.length-2))for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var Fg,Ig,Bg=0,Dg=0,zg=0,Gg=1e3,Wg=0,Vg=0,Yg=0,Hg="object"==typeof performance&&performance.now?performance:Date,qg="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ug(){return Vg||(qg(Xg),Vg=Hg.now()+Yg)}function Xg(){Vg=0}function $g(){this._call=this._time=this._next=null}function Kg(t,e,n){var r=new $g;return r.restart(t,e,n),r}function Zg(){Vg=(Wg=Hg.now())+Yg,Bg=Dg=0;try{Ug(),++Bg;for(var t,e=Fg;e;)0<=(t=Vg-e._time)&&e._call.call(void 0,t),e=e._next;--Bg}finally{for(var n,r,i=Fg,a=1/(Bg=0);i;)i=i._call?(a>i._time&&(a=i._time),(n=i)._next):(r=i._next,i._next=null,n?n._next=r:Fg=r);Ig=n,Qg(a),Vg=0}}function Jg(){var t=Hg.now(),e=t-Wg;Gg<e&&(Yg-=e,Wg=t)}function Qg(t){Bg||(Dg=Dg&&clearTimeout(Dg),24<t-Vg?(t<1/0&&(Dg=setTimeout(Zg,t-Hg.now()-Yg)),zg=zg&&clearInterval(zg)):(zg||(Wg=Hg.now(),zg=setInterval(Jg,Gg)),Bg=1,qg(Zg)))}$g.prototype=Kg.prototype={constructor:$g,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Ug():+n)+(null==e?0:+e),this._next||Ig===this||(Ig?Ig._next=this:Fg=this,Ig=this),this._call=t,this._time=n,Qg()},stop:function(){this._call&&(this._call=null,this._time=1/0,Qg())}};const t1=4294967296;function e1(t){return t.x}function n1(t){return t.y}var r1=10,i1=Math.PI*(3-Math.sqrt(5));function a1(l){var a,o=1,e=.001,s=1-Math.pow(e,1/300),c=0,u=.6,h=new Map,t=Kg(i),n=Cg("tick","end"),r=function(){let t=1;return()=>(t=(1664525*t+1013904223)%t1)/t1}();function i(){f(),n.call("tick",a),o<e&&(t.stop(),n.call("end",a))}function f(t){var e,n,r=l.length;void 0===t&&(t=1);for(var i=0;i<t;++i)for(o+=(c-o)*s,h.forEach(function(t){t(o)}),e=0;e<r;++e)null==(n=l[e]).fx?n.x+=n.vx*=u:(n.x=n.fx,n.vx=0),null==n.fy?n.y+=n.vy*=u:(n.y=n.fy,n.vy=0);return a}function d(){for(var t,e,n,r=0,i=l.length;r<i;++r)(n=l[r]).index=r,null!=n.fx&&(n.x=n.fx),null!=n.fy&&(n.y=n.fy),(isNaN(n.x)||isNaN(n.y))&&(t=r1*Math.sqrt(.5+r),e=r*i1,n.x=t*Math.cos(e),n.y=t*Math.sin(e)),(isNaN(n.vx)||isNaN(n.vy))&&(n.vx=n.vy=0)}function p(t){return t.initialize&&t.initialize(l,r),t}return null==l&&(l=[]),d(),a={tick:f,restart:function(){return t.restart(i),a},stop:function(){return t.stop(),a},nodes:function(t){return arguments.length?(l=t,d(),h.forEach(p),a):l},alpha:function(t){return arguments.length?(o=+t,a):o},alphaMin:function(t){return arguments.length?(e=+t,a):e},alphaDecay:function(t){return arguments.length?(s=+t,a):+s},alphaTarget:function(t){return arguments.length?(c=+t,a):c},velocityDecay:function(t){return arguments.length?(u=1-t,a):1-u},randomSource:function(t){return arguments.length?(r=t,h.forEach(p),a):r},force:function(t,e){return 1<arguments.length?(null==e?h.delete(t):h.set(t,p(e)),a):h.get(t)},find:function(t,e,n){var r,i,a,o=0,s=l.length;for(null==n?n=1/0:n*=n,o=0;o<s;++o)(r=(r=t-(i=l[o]).x)*r+(r=e-i.y)*r)<n&&(a=i,n=r);return a},on:function(t,e){return 1<arguments.length?(n.on(t,e),a):n.on(t)}}}function o1(t,e,n){var i,l,c,u,h,r,f,d,p,{nodes:t,links:a}=t,{joint:e,nodeStrength:o,linkStrength:s}=e,{linkKey:n=t=>t.id}=n,F=(r=_g(-30),d=(f=1)/0,p=.81,g.initialize=function(t,e){i=t,c=e,I()},g.strength=function(t){return arguments.length?(r="function"==typeof t?t:_g(+t),I(),g):r},g.distanceMin=function(t){return arguments.length?(f=t*t,g):Math.sqrt(f)},g.distanceMax=function(t){return arguments.length?(d=t*t,g):Math.sqrt(d)},g.theta=function(t){return arguments.length?(p=t*t,g):Math.sqrt(p)},g);function g(t){var e,n=i.length,r=Mg(i,e1,n1).visitAfter(B);for(u=t,e=0;e<n;++e)l=i[e],r.visit(D)}function I(){if(i){var t,e,n=i.length;for(h=new Array(n),t=0;t<n;++t)e=i[t],h[e.index]=+r(e,t,i)}}function B(t){var e,n,r,i,a,o=0,s=0;if(t.length){for(r=i=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(o+=e.value,s+=n,r+=n*e.x,i+=n*e.y);t.x=r/s,t.y=i/s}else for((e=t).x=e.data.x,e.y=e.data.y;o+=h[e.data.index],e=e.next;);t.value=o}function D(t,e,n,r){if(!t.value)return!0;var i=t.x-l.x,a=t.y-l.y,o=r-e,s=i*i+a*a;if(o*o/p<s)return s<d&&(0===i&&(s+=(i=Ag(c))*i),0===a&&(s+=(a=Ag(c))*a),s<f&&(s=Math.sqrt(f*s)),l.vx+=i*t.value*u/s,l.vy+=a*t.value*u/s),!0;if(!(t.length||d<=s))for((t.data!==l||t.next)&&(0===i&&(s+=(i=Ag(c))*i),0===a&&(s+=(a=Ag(c))*a),s<f)&&(s=Math.sqrt(f*s));t.data!==l&&(o=h[t.data.index]*u/s,l.vx+=i*o,l.vy+=a*o),t=t.next;);}var y,m,v,b,x,w,k,E,M,O,S,_,A,T,n=Lg(a).id(yp(n)),P=("function"==typeof o&&F.strength(o),"function"==typeof s&&n.strength(s),a1(t).force("link",n).force("charge",F));function L(t){for(var e,n=0,r=m.length;n<r;++n)(e=m[n]).vy+=(b[n]-e.y)*v[n]*t}function N(){if(m){var t,e=m.length;for(v=new Array(e),b=new Array(e),t=0;t<e;++t)v[t]=isNaN(b[t]=+y(m[t],t,m))?0:+x(m[t],t,m)}}function C(t){for(var e,n=0,r=k.length;n<r;++n)(e=k[n]).vx+=(M[n]-e.x)*E[n]*t}function j(){if(k){var t,e=k.length;for(E=new Array(e),M=new Array(e),t=0;t<e;++t)E[t]=isNaN(M[t]=+w(k[t],t,k))?0:+O(k[t],t,k)}}function R(){for(var t,e=A.length,n=0,r=0,i=0;i<e;++i)n+=(t=A[i]).x,r+=t.y;for(n=(n/e-S)*T,r=(r/e-_)*T,i=0;i<e;++i)(t=A[i]).x-=n,t.y-=r}e?P.force("center",(T=1,null==S&&(S=0),null==_&&(_=0),R.initialize=function(t){A=t},R.x=function(t){return arguments.length?(S=+t,R):S},R.y=function(t){return arguments.length?(_=+t,R):_},R.strength=function(t){return arguments.length?(T=+t,R):T},R)):P.force("x",(O=_g(.1),"function"!=typeof w&&(w=_g(null==w?0:+w)),C.initialize=function(t){k=t,j()},C.strength=function(t){return arguments.length?(O="function"==typeof t?t:_g(+t),j(),C):O},C.x=function(t){return arguments.length?(w="function"==typeof t?t:_g(+t),j(),C):w},C)).force("y",(x=_g(.1),"function"!=typeof y&&(y=_g(null==y?0:+y)),L.initialize=function(t){m=t,N()},L.strength=function(t){return arguments.length?(x="function"==typeof t?t:_g(+t),N(),L):x},L.y=function(t){return arguments.length?(y="function"==typeof t?t:_g(+t),N(),L):y},L)),P.stop();var z=Math.ceil(Math.log(P.alphaMin())/Math.log(1-P.alphaDecay()));for(let t=0;t<z;t++)P.tick();return{nodesData:t,linksData:a}}const s1=h=>()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=h,l=Q(e,"node"),c=Q(e,"link"),{links:t,nodes:u}=vp(t,e),{nodesData:t,linksData:u}=o1({links:t,nodes:u},R({},{joint:!0},i),e);return[R({},{type:"link",axis:!1,legend:!1,encode:{x:[t=>t.source.x,t=>t.target.x],y:[t=>t.source.y,t=>t.target.y]},style:{stroke:"#999",strokeOpacity:.6}},{data:u,encode:c,labels:o,style:Q(r,"link"),animate:"object"==typeof s?Q(s,"link"):s}),R({},{type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},scale:{color:{type:"ordinal"}},style:{stroke:"#fff"}},{data:t,encode:Object.assign({},l),scale:n,style:Q(r,"node"),labels:[Object.assign(Object.assign({},{text:""}),Q(r,"label")),...a],animate:"object"==typeof s?Q(s,"node"):s})]},l1=(s1.props={composite:!0},h=>u=>t=>{const{field:e="value",nodeSize:n,separation:r,sortBy:i,as:a=["x","y"]}=u,[o,s]=a;var t=fd(t,t=>t.children).sum(t=>t[e]).sort(i),l=h();l.size([1,1]),n&&l.nodeSize(n),r&&l.separation(r),l(t);const c=[];t.each(t=>{t[o]=t.x,t[s]=t.y,t.name=t.data.name,c.push(t)});l=t.links();return l.forEach(t=>{t[o]=[t.source[o],t.target[o]],t[s]=[t.source[s],t.target[s]]}),{nodes:c,edges:l}}),c1=t=>l1(ud)(t),u1=(c1.props={},t=>l1(Qd)(t)),h1=(u1.props={},c=>{const u={sortBy:(t,e)=>e.value-t.value},h={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},f={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},d={text:"",fontSize:10};return()=>{var{data:t,encode:e={},scale:n={},style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=c,l=null==e?void 0:e.value,{nodes:i,edges:l}=u1(Object.assign(Object.assign(Object.assign({},u),i),{field:l}))(t);return[R({},f,{data:l,encode:Q(e,"link"),scale:Q(n,"link"),labels:o,style:Object.assign({stroke:"#999"},Q(r,"link")),animate:"object"==typeof s?Q(s,"link"):s}),R({},h,{data:i,scale:Q(n,"node"),encode:Q(e,"node"),labels:[Object.assign(Object.assign({},d),Q(r,"label")),...a],style:Object.assign({},Q(r,"node")),animate:"object"==typeof s?Q(s,"node"):s})]}});h1.props={composite:!0};var f1={},d1={},p1=34,g1=10,y1=13;function m1(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function v1(t){var n=Object.create(null),r=[];return t.forEach(function(t){for(var e in t)e in n||r.push(n[e]=e)}),r}function b1(t,e){var t=t+"",n=t.length;return n<e?new Array(e-n+1).join(0)+t:t}function x1(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+b1(-e,6):9999<e?"+"+b1(e,6):b1(e,4))+"-"+b1(t.getUTCMonth()+1,2)+"-"+b1(t.getUTCDate(),2)+(a?"T"+b1(n,2)+":"+b1(r,2)+":"+b1(i,2)+"."+b1(a,3)+"Z":i?"T"+b1(n,2)+":"+b1(r,2)+":"+b1(i,2)+"Z":r||n?"T"+b1(n,2)+":"+b1(r,2)+"Z":"")}function w1(r){var e=new RegExp('["'+r+"\n\r]"),h=r.charCodeAt(0);function n(r,t){var e,n=[],i=r.length,a=0,o=0,s=i<=0,l=!1;function c(){if(s)return d1;if(l)return l=!1,f1;var t,e,n=a;if(r.charCodeAt(n)===p1){for(;a++<i&&r.charCodeAt(a)!==p1||r.charCodeAt(++a)===p1;);return(t=a)>=i?s=!0:(e=r.charCodeAt(a++))===g1?l=!0:e===y1&&(l=!0,r.charCodeAt(a)===g1)&&++a,r.slice(n+1,t-1).replace(/""/g,'"')}for(;a<i;){if((e=r.charCodeAt(t=a++))===g1)l=!0;else if(e===y1)l=!0,r.charCodeAt(a)===g1&&++a;else if(e!==h)continue;return r.slice(n,t)}return s=!0,r.slice(n,i)}for(r.charCodeAt(i-1)===g1&&--i,r.charCodeAt(i-1)===y1&&--i;(e=c())!==d1;){for(var u=[];e!==f1&&e!==d1;)u.push(e),e=c();t&&null==(u=t(u,o++))||n.push(u)}return n}function i(t,n){return t.map(function(e){return n.map(function(t){return o(e[t])}).join(r)})}function a(t){return t.map(o).join(r)}function o(t){return null==t?"":t instanceof Date?x1(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,a){var o,s;return(t=n(t,function(t,e){if(o)return o(t,e-1);var n,r,i;s=t,o=a?(r=a,i=m1(n=t),function(t,e){return r(i(t),e,n)}):m1(t)})).columns=s||[],t},parseRows:n,format:function(t,e){return[(e=null==e?v1(t):e).map(o).join(r)].concat(i(t,e)).join("\n")},formatBody:function(t,e){return i(t,e=null==e?v1(t):e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}function k1(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;E1&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}const E1=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),M1=t=>{const{value:n,format:r=n.split(".").pop(),delimiter:i=",",autoType:a=!0}=t;return()=>Oe(void 0,void 0,void 0,function*(){var t,e=yield fetch(n);if("csv"===r)return t=yield e.text(),w1(i).parse(t,a?k1:X0);if("json"===r)return yield e.json();throw new Error(`Unknown format: ${r}.`)})};M1.props={};const O1=t=>{const{fields:a,as:n=[]}=t;return t=>{if(!a||(e=a,0===Object.keys(e).length))return t;var e;const[r="key",i="value"]=n;return t.reduce((e,n)=>{for(let t=0;t<a.length;t++)e.push(Object.assign(Object.assign({},n),{[r]:a[t],[i]:n[a[t]]}));return e},[])}};O1.props={};const S1=t=>{const{callback:e=function(t){return null!=t&&!Number.isNaN(t)}}=t;return t=>t.filter(e)},_1=(S1.props={},t=>{const e=t["callback"];return t=>Array.isArray(t)?[...t].sort(e):t});function A1(t,e,n){return Math.min(n,Math.max(e,t))}_1.props={};const T1=i=>t=>{const{fields:e=[]}=i;let{start:n=0,end:r=t.length}=i;n=A1(n,0,t.length-1),r=A1(r,1,t.length),n>r&&([n,r]=[r,n]);return t.filter((t,e)=>e>=n&&e<r).map(n=>e.reduce((t,e)=>(e in n&&(t[e]=n[e]),t),{}))},P1=(T1.props={},t=>{t=t.fields;return T1({fields:t})});P1.props={};const L1=r=>t=>{return r&&0!==Object.keys(r).length?t.map(t=>Object.entries(t).reduce((t,[e,n])=>(t[r[e]||e]=n,t),{})):t};L1.props={};const N1=t=>{var r,{fields:t=[]}=t;r=!0;const e=t.map(t=>{var e,n;return Array.isArray(t)?([e,n=r]=t,[e,n]):[t,r]});return t=>{return[...t].sort((r,i)=>e.reduce((t,[e,n=!0])=>0!==t?t:n?r[e]<i[e]?-1:+(r[e]!==i[e]):r[e]>i[e]?-1:+(r[e]!==i[e]),0))}},C1=(N1.props={},t=>{const e=t["value"];return()=>e}),j1=(C1.props={},t=>{const{callback:e=X0}=t;return t=>e(t)}),R1=(j1.props={},t=>{const{callback:e=X0}=t;return t=>Array.isArray(t)?t.map(e):t});R1.props={};var F1=Object.freeze({__proto__:null,weight:function(t,e){return e.value-t.value},frequency:function(t,e){return e.frequency-t.frequency},id:function(t,e){return(""+t.id).localeCompare(""+e.id)},name:function(t,e){return(""+t.name).localeCompare(""+e.name)}});const I1={y:0,thickness:.05,weight:!1,marginRatio:.1,id:t=>t.id,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null};function B1(t){const{y:c,thickness:u,weight:h,marginRatio:f,id:d,source:p,target:g,sourceWeight:y,targetWeight:m,sortBy:v}=Object.assign(Object.assign({},I1),t);return function(t){var e=t.nodes.map(t=>Object.assign({},t)),t=t.edges.map(t=>Object.assign({},t));{var n=e,r=t;r.forEach(t=>{t.source=p(t),t.target=g(t),t.sourceWeight=y(t),t.targetWeight=m(t)});const i=jp(r,t=>t.source),a=jp(r,t=>t.target);n.forEach(t=>{t.id=d(t);var e=i.has(t.id)?i.get(t.id):[],n=a.has(t.id)?a.get(t.id):[];t.frequency=e.length+n.length,t.value=i0(e,t=>t.sourceWeight)+i0(n,t=>t.targetWeight)})}if(r=e,(n="function"==typeof v?v:F1[v])&&r.sort(n),!(n=(r=e).length))throw K0("Invalid nodes: it's empty!");if(h){const o=f/(2*n),s=r.reduce((t,e)=>t+e.value,0);r.reduce((t,e)=>{e.weight=e.value/s,e.width=e.weight*(1-f),e.height=u;var n=o+t,r=n+e.width,i=c-u/2,a=i+u;return e.x=[n,r,r,n],e.y=[i,i,a,a],t+e.width+2*o},0)}else{const l=1/n;r.forEach((t,e)=>{t.x=(e+.5)*l,t.y=c})}return function(t,e){const r=new Map(t.map(t=>[t.id,t]));if(!h)return e.forEach(t=>{var e=p(t),n=g(t),e=r.get(e),n=r.get(n);e&&n&&(t.x=[e.x,n.x],t.y=[e.y,n.y])});e.forEach(t=>{t.x=[0,0,0,0],t.y=[c,c,c,c]});const s=jp(e,t=>t.source),l=jp(e,t=>t.target);t.forEach(n=>{const{width:r,value:i,id:t}=n;var e=s.get(t)||[],a=l.get(t)||[];let o=0;e.map(t=>{var e=t.sourceWeight/i*r;t.x[0]=n.x[0]+o,t.x[1]=n.x[0]+o+e,o+=e}),a.forEach(t=>{var e=t.targetWeight/i*r;t.x[3]=n.x[0]+o,t.x[2]=n.x[0]+o+e,o+=e})})}(e,t),{nodes:e,edges:t}}}const D1=e=>t=>B1(e)(t),z1=(D1.props={},Math.PI/180),G1=64,W1=2048;function V1(t){return t.text}function Y1(){return"serif"}function H1(){return"normal"}function q1(t){return t.value}function U1(){return 90*~~(2*Math.random())}function X1(){return 1}function $1(){}function K1(t,o,r,s){if(!o.sprite){var l=t.context,c=t.ratio;l.clearRect(0,0,(G1<<5)/c,W1/c);let i=0,a=0,n=0;var u,h,f,d,e=r.length;for(--s;++s<e;){o=r[s],l.save(),l.font=o.style+" "+o.weight+" "+~~((o.size+1)/c)+"px "+o.font;let t=l.measureText(o.text+"m").width*c,e=o.size<<1;if(o.rotate?(d=Math.sin(o.rotate*z1),f=Math.cos(o.rotate*z1),u=t*f,h=t*d,f=e*f,d=e*d,t=Math.max(Math.abs(u+d),Math.abs(u-d))+31>>5<<5,e=~~Math.max(Math.abs(h+f),Math.abs(h-f))):t=t+31>>5<<5,e>n&&(n=e),i+t>=G1<<5&&(i=0,a+=n,n=0),a+e>=W1)break;l.translate((i+(t>>1))/c,(a+(e>>1))/c),o.rotate&&l.rotate(o.rotate*z1),l.fillText(o.text,0,0),o.padding&&(l.lineWidth=2*o.padding,l.strokeText(o.text,0,0)),l.restore(),o.width=t,o.height=e,o.xoff=i,o.yoff=a,o.x1=t>>1,o.y1=e>>1,o.x0=-o.x1,o.y0=-o.y1,o.hasText=!0,i+=t}for(var p=l.getImageData(0,0,(G1<<5)/c,W1/c).data,g=[];0<=--s;)if((o=r[s]).hasText){var y=o.width,m=y>>5;let n=o.y1-o.y0;for(let t=0;t<n*m;t++)g[t]=0;if(null==(i=o.xoff))return;a=o.yoff;let r=0,t=-1;for(let e=0;e<n;e++){for(let t=0;t<y;t++){var v=m*e+(t>>5),b=p[(a+e)*(G1<<5)+(i+t)<<2]?1<<31-t%32:0;g[v]|=b,r|=b}r?t=e:(o.y0++,n--,e--,a++)}o.y1=o.y0+t,o.sprite=g.slice(0,(o.y1-o.y0)*m)}}}function Z1(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function J1(t){var e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function Q1(){return document.createElement("canvas")}function ty(t){return"function"==typeof t?t:function(){return t}}const ey={archimedean:Z1,rectangular:function(t){const n=4*t[0]/t[1];let r=0,i=0;return function(t){var e=t<0?-1:1;switch(Math.sqrt(1+4*e*t)-e&3){case 0:r+=n;break;case 1:i+=4;break;case 2:r-=n;break;default:i-=4}return[r,i]}}};function ny(){let b=[256,256],r=V1,i=Y1,p=q1,g=H1,y=U1,m=X1,x=Z1,w=Math.random,v=$1,k=[],E=null,M=1/0;const O=H1,S=Q1,_={};return _.start=function(){const[a,o]=b,s=((t=S()).width=t.height=1,e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2),t.width=(G1<<5)/e,t.height=W1/e,(t=t.getContext("2d")).fillStyle=t.strokeStyle="red",t.textAlign="center",{context:t,ratio:e}),l=_.board||J1((b[0]>>5)*b[1]),c=k.length,u=[],h=k.map(function(t,e,n){return t.text=r.call(this,t,e,n),t.font=i.call(this,t,e,n),t.style=O.call(this,t,e,n),t.weight=g.call(this,t,e,n),t.rotate=y.call(this,t,e,n),t.size=~~p.call(this,t,e,n),t.padding=m.call(this,t,e,n),t}).sort(function(t,e){return e.size-t.size});var t,e;let f=-1,d=_.board?[{x:0,y:0},{x:a,y:o}]:void 0;function n(){for(var t,e,n,r=Date.now();Date.now()-r<M&&++f<c;){var i=h[f];i.x=a*(w()+.5)>>1,i.y=o*(w()+.5)>>1,K1(s,i,h,f),i.hasText&&function(i,t,e){var n=t.x,r=t.y,a=Math.sqrt(b[0]*b[0]+b[1]*b[1]),o=x(b),s=w()<.5?1:-1;let l,c=-s,u,h;for(;(l=o(c+=s))&&(u=~~l[0],h=~~l[1],!(Math.min(Math.abs(u),Math.abs(h))>=a));)if(t.x=n+u,t.y=r+h,!(t.x+t.x0<0||t.y+t.y0<0||t.x+t.x1>b[0]||t.y+t.y1>b[1])&&(!e||!function(t,n,r){var i=t.sprite,a=t.width>>5,e=t.x-(a<<4),o=127&e,s=32-o,l=t.y1-t.y0;let c=(t.y+t.y0)*(r>>=5)+(e>>5),u;for(let e=0;e<l;e++){for(let t=u=0;t<=a;t++)if((u<<s|(t<a?(u=i[e*a+t])>>>o:0))&n[c+t])return 1;c+=r}}(t,i,b[0]))&&(!e||function(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0<e[1].x&&t.y+t.y1>e[0].y&&t.y+t.y0<e[1].y}(t,e))){var f=t.sprite,d=t.width>>5,p=b[0]>>5,g=t.x-(d<<4),y=127&g,m=32-y,v=t.y1-t.y0;let n,r=(t.y+t.y0)*p+(g>>5);for(let e=0;e<v;e++){for(let t=n=0;t<=d;t++)i[r+t]|=n<<m|(t<d?(n=f[e*d+t])>>>y:0);r+=p}return delete t.sprite,1}return}(l,i,d)&&(v.call(null,"word",{cloud:_,word:i}),u.push(i),d?_.hasImage||(t=d,e=i,n=void 0,n=t[0],t=t[1],e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>t.x&&(t.x=e.x+e.x1),e.y+e.y1>t.y&&(t.y=e.y+e.y1)):d=[{x:i.x+i.x0,y:i.y+i.y0},{x:i.x+i.x1,y:i.y+i.y1}],i.x-=b[0]>>1,i.y-=b[1]>>1)}_._tags=u,_._bounds=d,f>=c&&(_.stop(),v.call(null,"end",{cloud:_,words:u,bounds:d}))}return E&&clearInterval(E),E=setInterval(n,0),n(),_},_.stop=function(){return E&&(clearInterval(E),E=null),_},_.createMask=t=>{var e=document.createElement("canvas"),[n,r]=b;if(n&&r){var i=n>>5,a=J1((n>>5)*r),e=(e.width=n,e.height=r,e.getContext("2d")),o=(e.drawImage(t,0,0,t.width,t.height,0,0,n,r),e.getImageData(0,0,n,r).data);for(let e=0;e<r;e++)for(let t=0;t<n;t++){var s=i*e+(t>>5),l=e*n+t<<2,l=250<=o[l]&&250<=o[1+l]&&250<=o[2+l]?1<<31-t%32:0;a[s]|=l}_.board=a,_.hasImage=!0}},_.timeInterval=function(t){M=null==t?1/0:t},_.words=function(t){k=t},_.size=function(t=[]){b=[+t[0],+t[1]]},_.text=function(t){r=ty(t)},_.font=function(t){i=ty(t)},_.fontWeight=function(t){g=ty(t)},_.rotate=function(t){y=ty(t)},_.spiral=function(t){x=ey[t]||t},_.fontSize=function(t){p=ty(t)},_.padding=function(t){m=ty(t)},_.random=function(t){w=ty(t)},_.on=function(t){v=ty(t)},_}const ry={size:[500,500],fontSize:[14,28]};function iy(r){return new Promise((t,e)=>{if(r instanceof HTMLImageElement)t(r);else if("string"==typeof r){const n=new Image;n.crossOrigin="anonymous",n.src=r,n.onload=()=>t(n),void(n.onerror=()=>{console.error(`'image ${r} load failed !!!'`),e()})}else e()})}const ay=f=>h=>Oe(void 0,void 0,void 0,function*(){var i,a,t=Object.assign({},ry,f),e=ny(),e=(i=e,a=t,yield{set(t,e,n){return void 0!==a[t]&&(e=e?e.call(null,a[t]):a[t],n?n.call(null,e):"function"==typeof i[t]?i[t](e):i[t]=e),this},setAsync(e,n,r){return Oe(this,void 0,void 0,function*(){var t;return void 0!==a[e]&&(t=n?yield n.call(null,a[e]):a[e],r?r.call(null,t):"function"==typeof i[e]?i[e](t):i[e]=t),this})}}.set("fontSize",t=>{var e=h.map(t=>t.value),n=t,t=[Zp(e),$p(e)];if("function"==typeof n)return n;if(Array.isArray(n)){const[r,i]=n;if(!t)return()=>(i+r)/2;const[a,o]=t;return o===a?()=>(i+r)/2:({value:t})=>(i-r)/(o-a)*(t-a)+r}return()=>n}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").setAsync("imageMask",iy,e.createMask),e.words([...h]),e.start());const[r,o]=t.size;var t=[{x:0,y:0},{x:r,y:o}],{_bounds:e=t,_tags:t,hasImage:n}=e,t=t.map(t=>{var{x:e,y:n}=t,t=J(t,["x","y"]);return Object.assign(Object.assign({},t),{x:e+r/2,y:n+o/2})}),[{x:e,y:s},{x:l,y:c}]=e,u={text:"",value:0,opacity:0,fontSize:0};return t.push(Object.assign(Object.assign({},u),{x:n?0:e,y:n?0:s}),Object.assign(Object.assign({},u),{x:n?r:l,y:n?o:c})),t});function oy(e){return"string"==typeof e?t=>t[e]:e}ay.props={};const sy=t=>{const{join:e,on:n,select:i=[],as:a=i,unknown:o=NaN}=t;var[t,r]=n;const s=oy(r),l=oy(t),c=Rp(e,([t])=>t,t=>s(t));return t=>t.map(t=>{const r=c.get(l(t));return Object.assign(Object.assign({},t),i.reduce((t,e,n)=>(t[a[n]]=r?r[e]:o,t),{}))})};sy.props={};const ly=u=>c=>Oe(void 0,void 0,void 0,function*(){var{width:t,height:e}=og(c),{data:n,encode:r={},scale:i,style:a={},layout:o={}}=u,s=J(u,["data","encode","scale","style","layout"]),l={size:[t,e]},t={axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size"},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]},fontSize:{type:"identity"},rotate:{type:"identity"}},style:{textAlign:"center"}},e=function(t,e){const{text:n="text",value:r="value"}=e;return t.map(t=>Object.assign(Object.assign({},t),{text:t[n],value:t[r]}))}(n,r),n=yield ay(Object.assign(Object.assign({},l),o))(e);return[R({},t,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a},s),{axis:!1}))]}),cy=(ly.props={composite:!0},()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"]),uy=(cy.props={},()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"]),hy=(uy.props={},()=>["#95F0FF","#78D3F8","#5AB8DB","#3A9DBF","#0A82A4","#00698A","#005170","#003958","#002440"]),fy=(hy.props={},()=>["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"]),dy=(fy.props={},()=>["#9DF5CA","#61DDAA","#42C090","#19A576","#008A5D","#006F45","#00562F","#003E19","#002800"]),py=(dy.props={},()=>["#8CF4F2","#6FD8D6","#52BCBA","#31A09F","#008685","#006C6C","#005354","#003B3D","#002627"]),gy=(py.props={},()=>["#D0E4FF","#B4C8ED","#99ADD1","#7E92B5","#65789B","#4C6080","#334867","#1B324F","#021D38"]),yy=(gy.props={},()=>["#FFC771","#FFAB57","#F6903D","#D77622","#B85C00","#9B4300","#7D2A00","#601000","#450000"]),my=(yy.props={},()=>["#FFC2EC","#FFA6D0","#F08BB4","#D37099","#B65680","#9A3C67","#7E214F","#630038","#490022"]),vy=(my.props={},()=>["#FFBB95","#FF9E7B","#FF8362","#E8684A","#C84D32","#AA311C","#8C1104","#6F0000","#510000"]),by=(vy.props={},()=>["#FFD83B","#F6BD16","#D7A100","#B98700","#9C6E00","#7F5600","#633F00","#482900","#2F1400"]),xy=(by.props={},()=>["#FFCCFF","#EBB0FF","#CE95F5","#B27AD8","#9661BC","#7B48A1","#613086","#48186C","#2E0054"]),wy=(xy.props={},()=>["#FDEDBE","#FFDF80","#FFCB33","#FFB200","#FF8C00","#FF6500","#E6450F","#B22C00","#661900"]),ky=(wy.props={},()=>["#FFEBB0","#FFDF80","#FACA3E","#E6B80B","#B5AC23","#6A9A48","#20876B","#06746B","#044E48"]),Ey=(ky.props={},()=>["#FFEBB0","#FFDF80","#FACA3E","#E6B80B","#B5AC23","#6A9A48","#20876B","#06746B","#044E48"]),My=(Ey.props={},()=>["#D2EDC8","#A9DACC","#75C6D1","#42B3D5","#3993C2","#3073AE","#27539B","#1E3388","#171E6D"]),Oy=(My.props={},()=>["#003F7F","#004C99","#0059B2","#0072E5","#1A8CFF","#4DA6FF","#80BFFF","#B3D9FF","#EAE9EB","#FFD5B1","#FFC08C","#FFAB66","#FF963E","#F17F0B","#D16A0C","#A45411","#794012"]),Sy=(Oy.props={},()=>["#661900","#B22C00","#E6450F","#FF6500","#FF8C00","#FFB200","#FFCB33","#FFDF80","#E0F2EB","#66D8FF","#1AC5FF","#007FFF","#0059FF","#0040FF","#002CB2","#FFDF80","#001F7F"]),_y=(Sy.props={},()=>["#014c63","#10686c","#168575","#16a37e","#0bc286","#65cf9b","#96dcb0","#c1e8c5","#F2EAEA","#FFC5AC","#FFA884","#FF895D","#FF6836","#F3470D","#D13808","#A4300C","#7A270E"]),Ay=(_y.props={},()=>["#661900","#B22C00","#E6450F","#FF6500","#FF8C00","#FFB200","#FFCB33","#FFDF80","#FFE2DC","#EAACFF","#DD78FF","#C53FFF","#A700FF","#8500FF","#620BE1","#3607C2","#27029A"]);function Ty(t,...e){return e.reduce((e,n)=>t=>e(n(t)),t)}function Py(e,n){return n-e?t=>(t-e)/(n-e):t=>.5}function Ly(t,e,n,r,i){let a=n||0,o=r||t.length;for(var s=i||(t=>t);a<o;){var l=Math.floor((a+o)/2);s(t[l])>e?o=l:a=l+1}return a}Ay.props={};const Ny=Math.sqrt(50),Cy=Math.sqrt(10),jy=Math.sqrt(2);function Ry(t,e,n){e=(e-t)/Math.max(0,n),t=Math.floor(Math.log(e)/Math.LN10),n=e/10**t;return 0<=t?(n>=Ny?10:n>=Cy?5:n>=jy?2:1)*10**t:-(10**-t)/(n>=Ny?10:n>=Cy?5:n>=jy?2:1)}function Fy(t,e,n){n=Math.abs(e-t)/Math.max(0,n);let r=10**Math.floor(Math.log(n)/Math.LN10);n/=r;return n>=Ny?r*=10:n>=Cy?r*=5:n>=jy&&(r*=2),e<t?-r:r}const Iy=(t,e,n=5)=>{t=[t,e];let r=0,i=t.length-1,a=t[r],o=t[i],s;return o<a&&([a,o]=[o,a],[r,i]=[i,r]),0<(s=Ry(a,o,n))?(a=Math.floor(a/s)*s,o=Math.ceil(o/s)*s,s=Ry(a,o,n)):s<0&&(a=Math.ceil(a*s)/s,o=Math.floor(o*s)/s,s=Ry(a,o,n)),0<s?(t[r]=Math.floor(a/s)*s,t[i]=Math.ceil(o/s)*s):s<0&&(t[r]=Math.ceil(a*s)/s,t[i]=Math.floor(o*s)/s),t},By=36e5,Dy=864e5,zy=7*Dy;Dy,Dy;function Gy(t,n,s,r){const i=(t,e)=>{let n=e;for(;n&&r(t)%e!=0;)s(t,-1),--n;return t},l=(t,e)=>{e&&i(t,e),n(t)};const c=(t,e)=>{t=new Date(+t-1);return l(t,e),s(t,e),l(t),t};return{ceil:c,floor:(t,e)=>{t=new Date(+t);return l(t,e),t},range:(t,e,n,r)=>{for(var i=[],a=Math.floor(n),o=r?c(t,n):c(t);+o<+e;s(o,a),l(o))i.push(new Date(+o));return i},duration:t}}c=Gy(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),eo=Gy(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),no=Gy(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),ro=Gy(By,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+By*e)},t=>t.getHours()),oo=Gy(Dy,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Dy*e)},t=>t.getDate()-1);const Wy=Gy(2592e6,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth());so=Gy(zy,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+zy*e)},t=>{var e=Wy.floor(t),t=new Date(+t);return Math.floor((+t-+e)/zy)}),lo=Gy(31536e6,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getFullYear();t.setFullYear(n+e)},t=>t.getFullYear());const Vy={millisecond:c,second:eo,minute:no,hour:ro,day:oo,week:so,month:Wy,year:lo};co=Gy(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),uo=Gy(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),ho=Gy(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),a=Gy(By,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+By*e)},t=>t.getUTCHours()),fo=Gy(Dy,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Dy*e)},t=>t.getUTCDate()-1);const Yy=Gy(2592e6,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth());po=Gy(zy,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+zy*e)},t=>{var e=Yy.floor(t),t=new Date(+t);return Math.floor((+t-+e)/zy)}),io=Gy(31536e6,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCFullYear();t.setUTCFullYear(n+e)},t=>t.getUTCFullYear());const Hy={millisecond:co,second:uo,minute:ho,hour:a,day:fo,week:po,month:Yy,year:io};function qy(t,e,n,r,i){var t=+t,e=+e,{tickIntervals:i,year:a,millisecond:o}=function(t){var{year:t,month:e,week:n,day:r,hour:i,minute:a,second:o,millisecond:s}=t?Hy:Vy;return{tickIntervals:[[o,1],[o,5],[o,15],[o,30],[a,1],[a,5],[a,15],[a,30],[i,1],[i,3],[i,6],[i,12],[r,1],[r,2],[n,1],[e,1],[e,3],[t,1]],year:t,millisecond:s}}(i),s=([t,e])=>t.duration*e,n=r?(e-t)/r:n||5,l=r||(e-t)/n,c=i.length,u=Ly(i,l,0,c,s);let h;return h=u===c?[a,Fy(t/a.duration,e/a.duration,n)]:u?([c,a]=l/s(i[u-1])<s(i[u])/l?i[u-1]:i[u],[c,r?Math.ceil(r/c.duration):a]):[o,Math.max(Fy(t,e,n),1)]}const Uy=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=qy(o,t,n,r,i),r=[e.floor(o,n),e.ceil(t,n)];return a?r.reverse():r};function Xy(t){return null!=t&&!Number.isNaN(t)}const $y=e=>t=>-e(-t),Ky=(t,e)=>{const n=Math.log(t);t=t===Math.E?Math.log:t=>Math.log(t)/n;return e?$y(t):t},Zy=(e,t)=>{var n=e===Math.E?Math.exp:t=>e**t;return t?$y(n):n},Jy=(t,e,n,r)=>{var i=t<0,a=Ky(r,i),r=Zy(r,i),i=e<t,o=i?t:e,e=[r(Math.floor(a(i?e:t))),r(Math.ceil(a(o)))];return i?e.reverse():e};function Qy(e,o){return t=>{t.prototype.rescale=function(){this.initRange(),this.nice();var[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},t.prototype.initRange=function(){var t=this.options["interpolator"];this.options.range=e(t)},t.prototype.composeOutput=function(t,e){var n,{domain:r,interpolator:i,round:a}=this.getOptions(),r=o(r.map(t)),a=a?(n=i,t=>{t=n(t);return Tf(t)?Math.round(t):t}):i;this.output=Ty(a,r,e,t)},t.prototype.invert=void 0}}var tm,l={exports:{}},tc={exports:{}},em=function(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||0<=t.length&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))},nm=Array.prototype.concat,rm=Array.prototype.slice,im=tc.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];em(i)?e=nm.call(e,rm.call(i)):e.push(i)}return e},am=(im.wrap=function(t){return function(){return t(im(arguments))}},{aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),om=tc.exports,sm=Object.hasOwnProperty,lm=Object.create(null);for(tm in am)sm.call(am,tm)&&(lm[am[tm]]=tm);var cm=l.exports={to:{},get:{}};function um(t,e,n){return Math.min(Math.max(e,t),n)}function hm(t){t=Math.round(t).toString(16).toUpperCase();return t.length<2?"0"+t:t}cm.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=cm.get.hsl(t),n="hsl";break;case"hwb":e=cm.get.hwb(t),n="hwb";break;default:e=cm.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},cm.get.rgb=function(t){if(!t)return null;var e,n,r,i=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(r=e[2],e=e[1],n=0;n<3;n++){var a=2*n;i[n]=parseInt(e.slice(a,2+a),16)}r&&(i[3]=parseInt(r,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(r=(e=e[1])[3],n=0;n<3;n++)i[n]=parseInt(e[n]+e[n],16);r&&(i[3]=parseInt(r+r,16)/255)}else{if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/))for(n=0;n<3;n++)i[n]=parseInt(e[n+1],0);else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:sm.call(am,e[1])?((i=am[e[1]])[3]=1,i):null:null;for(n=0;n<3;n++)i[n]=Math.round(2.55*parseFloat(e[n+1]))}e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}for(n=0;n<3;n++)i[n]=um(i[n],0,255);return i[3]=um(i[3],0,1),i},cm.get.hsl=function(t){var e;return(t=t&&t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,um(parseFloat(t[2]),0,100),um(parseFloat(t[3]),0,100),um(isNaN(e)?1:e,0,1)]):null},cm.get.hwb=function(t){var e;return(t=t&&t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,um(parseFloat(t[2]),0,100),um(parseFloat(t[3]),0,100),um(isNaN(e)?1:e,0,1)]):null},cm.to.hex=function(){var t=om(arguments);return"#"+hm(t[0])+hm(t[1])+hm(t[2])+(t[3]<1?hm(Math.round(255*t[3])):"")},cm.to.rgb=function(){var t=om(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},cm.to.rgb.percent=function(){var t=om(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"},cm.to.hsl=function(){var t=om(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},cm.to.hwb=function(){var t=om(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},cm.to.keyword=function(t){return lm[t.slice(0,3)]};var fm=l.exports;function dm(t,e,n){let r=n;return r<0&&(r+=1),1<r&&--r,r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function pm(t){var e,n,r,t=fm.get(t);return t?({model:t,value:e}=t,"rgb"===t?e:"hsl"===t?(e=(t=e)[0]/360,n=t[1]/100,r=t[2]/100,t=t[3],0==n?[255*r,255*r,255*r,t]:[255*dm(n=2*r-(r=r<.5?r*(1+n):r+n-r*n),r,e+1/3),255*dm(n,r,e),255*dm(n,r,e-1/3),t]):null):null}const gm=(e,n)=>t=>e*(1-t)+n*t,ym=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return gm(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{var n=t,r=e;const l=pm(n),c=pm(r);return null===l||null===c?l?()=>n:()=>r:e=>{var n=new Array(4);for(let t=0;t<4;t+=1){var r=l[t],i=c[t];n[t]=r*(1-e)+i*e}var[t,a,o,s]=n;return`rgba(${Math.round(t)}, ${Math.round(a)}, ${Math.round(o)}, ${s})`}}},mm=(t,e)=>{const n=gm(t,e);return t=>Math.round(n(t))};function vm({map:t,initKey:e},n){e=e(n);return t.has(e)?t.get(e):n}function bm(t){return"object"==typeof t?t.valueOf():t}class xm extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=bm,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(vm({map:this.map,initKey:this.initKey},t))}has(t){return super.has(vm({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(([{map:t,initKey:n},r]=[{map:this.map,initKey:this.initKey},t],n=n(r),t.has(n)?t.get(n):(t.set(n,r),r)),e);var n,r}delete(t){return super.delete(([{map:t,initKey:e},n]=[{map:this.map,initKey:this.initKey},t],e=e(n),t.has(e)&&(n=t.get(e),t.delete(e)),n));var e,n}}class wm{constructor(t){this.options=R({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=R({},this.options,t),this.rescale(t)}rescale(t){}}const km=Symbol("defaultUnknown");function Em(e,n,r){for(let t=0;t<n.length;t+=1)e.has(n[t])||e.set(r(n[t]),t)}function Mm(t){var{value:t,from:e,to:n,mapper:r,notFoundReturn:i}=t;let a=r.get(t);if(void 0===a){if(i!==km)return i;a=e.push(t)-1,r.set(t,a)}return n[a%n.length]}function Om(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class Sm extends wm{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[],unknown:km}}map(t){return 0===this.domainIndexMap.size&&Em(this.domainIndexMap,this.getDomain(),this.domainKey),Mm({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&Em(this.rangeIndexMap,this.getRange(),this.rangeKey),Mm({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){var[e]=this.options.domain,[n]=this.options.range;this.domainKey=Om(e),this.rangeKey=Om(n),this.rangeIndexMap?(t&&!t.range||this.rangeIndexMap.clear(),t&&!t.domain&&!t.compare||(this.domainIndexMap.clear(),this.sortedDomain=void 0)):(this.rangeIndexMap=new Map,this.domainIndexMap=new Map)}clone(){return new Sm(this.options)}getRange(){return this.options.range}getDomain(){var t,e;return this.sortedDomain||({domain:t,compare:e}=this.options,this.sortedDomain=e?[...t].sort(e):t),this.sortedDomain}}function _m(t){const{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=t;var l=e.length,c=0<(c=(t=l)-(u=a).length)?[...u,...new Array(c).fill(1)]:c<0?u.slice(0,t):u,[t,u]=n,u=u-t,h=u/(2/l*r+1-1/l*i);const f=h*i/l;h-=l*f;const d=function(t){const e=Math.min(...t);return t.map(t=>t/e)}(c),p=h/d.reduce((t,e)=>t+e);var c=new xm(e.map((t,e)=>{e=d[e]*p;return[t,o?Math.floor(e):e]})),g=new xm(e.map((t,e)=>{e=d[e]*p+f;return[t,o?Math.floor(e):e]})),h=Array.from(g.values()).reduce((t,e)=>t+e),t=t+(u-(h-h/l*i))*s;let y=o?Math.round(t):t;var m=new Array(l);for(let t=0;t<l;t+=1){m[t]=(v=y,Math.round(1e12*v)/1e12);var v=e[t];y+=g.get(v)}return{valueBandWidth:c,valueStep:g,adjustedRange:m}}class Am extends Sm{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:km,flex:[]}}clone(){return new Am(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(){var{padding:t,paddingInner:e}=this.options;return 0<t?t:e}getPaddingOuter(){var{padding:t,paddingOuter:e}=this.options;return 0<t?t:e}rescale(){super.rescale();var{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:t,valueBandWidth:n,valueStep:r}=function(t){var e=t["domain"];if(0===(e=e.length))return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!(null==(n=t.flex)||!n.length))return _m(t);var{range:n,paddingOuter:t,paddingInner:r,round:i,align:a}=t;let o,s,l=n[0];return n=n[1]-l,o=n/Math.max(1,2*t+(e-r)),i&&(o=Math.floor(o)),l+=(n-o*(e-r))*a,s=o*(1-r),i&&(l=Math.round(l),s=Math.round(s)),t=new Array(e).fill(0).map((t,e)=>l+e*o),{valueStep:o,valueBandWidth:s,adjustedRange:t}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=r,this.valueBandWidth=n,this.adjustedRange=t}}const Tm=(t,e,n)=>{let r,i,a=t,o=e;if(a===o&&0<n)return[a];let s=Ry(a,o,n);if(0===s||!Number.isFinite(s))return[];if(0<s){a=Math.ceil(a/s),o=Math.floor(o/s),i=new Array(r=Math.ceil(o-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)*s}else{s=-s,a=Math.ceil(a*s),o=Math.floor(o*s),i=new Array(r=Math.ceil(o-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)/s}return i};function Pm(t){return Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}const Lm=[1,5,2,2.5,4,3],Nm=100*Number.EPSILON;const Cm=(n,r,t=5,i=!0,a=Lm,o=[.25,.2,.5,.05])=>{var s=t<0?0:Math.round(t);if(Number.isNaN(n)||Number.isNaN(r)||"number"!=typeof n||"number"!=typeof r||!s)return[];if(r-n<1e-15||1===s)return[n];var l,c,u,h,f,d,p,g={score:-2,lmin:0,lmax:0,lstep:0};let y=1;for(;y<1/0;){for(let t=0;t<a.length;t+=1){var m=a[t],v=(h=m,f=a,d=y,p=void 0,p=Vf(f),1-Bf(f,h)/(p-1)-d+1);if(o[0]*v+o[1]+o[2]+o[3]<g.score){y=1/0;break}let e=2;for(;e<1/0;){x=e;var b=(u=s)<=x?2-(x-1)/(u-1):1;if(o[0]*v+o[1]+o[2]*b+o[3]<g.score)break;var x=(r-n)/(e+1)/y/m;let t=Math.ceil(Math.log10(x));for(;t<1/0;){var w=y*m*10**t,k=(M=r,k=w*(e-1),(M-=n)<k?1-((k-M)/2)**2/(.1*M)**2:1);if(o[0]*v+o[1]*k+o[2]*b+o[3]<g.score)break;var E=Math.floor(r/w)*y-(e-1)*y,M=Math.ceil(n/w)*y;if(E<=M){var O=M-E;for(let t=0;t<=O;t+=1){var S=(E+t)*(w/y),_=S+w*(e-1),A=w,T=function(t,e,n,r,i,a){var o=Vf(e),e=Bf(e,t);let s=0;return t=(r%a+a)%a,1-e/(o-1)-n+(s=(t<Nm||a-t<Nm)&&r<=0&&0<=i?1:s)}(m,a,y,S,_,A),P=1-.5*((r-_)**2+(n-S)**2)/(.1*(r-n))**2,L=(l=e,L=n,l=(l-1)/(_-(N=S)),c=((c=s)-1)/(Math.max(_,r)-Math.min(L,N)),2-Math.max(l/c,c/l)),N=o[0]*T+o[1]*P+o[2]*L+ +o[3];g.score<N&&(!i||S<=n&&r<=_)&&(g.lmin=S,g.lmax=_,g.lstep=A,g.score=N)}}t+=1}e+=1}}y+=1}var t=Pm(g.lmax),e=Pm(g.lmin),C=Pm(g.lstep),j=Math.floor((t=(t-e)/C,Math.round(1e12*t)/1e12))+1,R=new Array(j);R[0]=Pm(e);for(let t=1;t<j;t+=1)R[t]=Pm(R[t-1]+C);return R};class jm extends wm{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:Cm}}map(t){return Xy(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new jm(this.options)}getTicks(){var{domain:t,tickCount:e,tickMethod:n}=this.options,[t,r]=t;return Tf(t)&&Tf(r)?n(t,r,e):[]}}const Rm=(t,e,n)=>{var[t,r]=t,[e,i]=e;let a,o;return Ty(o=t<r?(a=Py(t,r),n(e,i)):(a=Py(r,t),n(i,e)),a)},Fm=(r,t,e)=>{const i=Math.min(r.length,t.length)-1,a=new Array(i),o=new Array(i);var n=r[0]>r[i],s=n?[...r].reverse():r,l=n?[...t].reverse():t;for(let t=0;t<i;t+=1)a[t]=Py(s[t],s[t+1]),o[t]=e(l[t],l[t+1]);return t=>{var e=Ly(r,t,1,i)-1,n=a[e];return Ty(o[e],n)(t)}},Im=(t,e,n,r)=>{return(2<Math.min(t.length,e.length)?Fm:Rm)(t,e,r?mm:n)};class Bm extends wm{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:gm,tickCount:5}}map(t){return Xy(t)?this.output(t):this.options.unknown}invert(t){return Xy(t)?this.input(t):this.options.unknown}nice(){var t,e,n,r;this.options.nice&&([t,e,n,...r]=this.getTickMethodOptions(),this.options.domain=this.chooseNice()(t,e,n,...r))}getTicks(){var t=this.options["tickMethod"],[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return Iy}rescale(){this.nice();var[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){var{clamp:e,range:n}=this.options,t=this.options.domain.map(t),n=Math.min(t.length,n.length);if(e){e=t[0],t=t[n-1];const r=t<e?t:e,i=t<e?e:t;return t=>Math.min(Math.max(r,t),i)}return zf}composeOutput(t,e){var{domain:n,range:r,round:i,interpolate:a}=this.options,n=Im(n.map(t),r,a,i);this.output=Ty(n,e,t)}composeInput(t,e,n){var{domain:r,range:i}=this.options,i=Im(i,r.map(t),gm);this.input=Ty(e,n,i)}}class Dm extends Bm{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:ym,tickMethod:Tm,tickCount:5}}chooseTransforms(){return[zf,zf]}clone(){return new Dm(this.options)}}class zm extends Am{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:km,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new zm(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}const Gm=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class Wm extends Bm{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:ym,tickMethod:Tm,tickCount:5}}constructor(t){super(t)}chooseTransforms(){var t,e,n,r=this.options["exponent"];return 1===r?[zf,zf]:(t=.5===r?Gm:(e=r,t=>t<0?-((-t)**e):t**e),n=r,[t,t=>t<0?-((-t)**(1/n)):t**(1/n)])}clone(){return new Wm(this.options)}}class Vm extends Wm{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:ym,tickMethod:Tm,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new Vm(this.options)}}class Ym extends wm{constructor(t){super(t)}getDefaultOptions(){return{domain:[.5],range:[0,1]}}map(t){return Xy(t)?(t=Ly(this.thresholds,t,0,this.n),this.options.range[t]):this.options.unknown}invert(t){var e=this.options["range"],e=e.indexOf(t),t=this.thresholds;return[t[e-1],t[e]]}clone(){return new Ym(this.options)}rescale(){var{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}const Hm=(t,e,n,r=10)=>{var i=t<0,a=Zy(r,i),o=Ky(r,i),s=e<t,l=s?e:t,c=s?t:e;let u=o(l),h=o(c),f=[];if(!(r%1)&&h-u<n){if(u=Math.floor(u),h=Math.ceil(h),i)for(;u<=h;u+=1){var d=a(u);for(let t=r-1;1<=t;--t){var p=d*t;if(c<p)break;l<=p&&f.push(p)}}else for(;u<=h;u+=1){var g=a(u);for(let t=1;t<r;t+=1){var y=g*t;if(c<y)break;l<=y&&f.push(y)}}2*f.length<n&&(f=Tm(l,c,n))}else f=Tm(u,h,Math.min(h-u,n)).map(a);return s?f.reverse():f};class qm extends Bm{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:ym,tickMethod:Hm,tickCount:5}}chooseNice(){return Jy}getTickMethodOptions(){var{domain:t,tickCount:e,base:n}=this.options;return[t[0],t[t.length-1],e,n]}chooseTransforms(){var{base:t,domain:e}=this.options,e=e[0]<0;return[Ky(t,e),Zy(t,e)]}clone(){return new qm(this.options)}}class Um extends Ym{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:Cm}}constructor(t){super(t)}nice(){var t,e,n=this.options["nice"];n&&([n,t,e]=this.getTickMethodOptions(),this.options.domain=Iy(n,t,e))}getTicks(){var t=this.options["tickMethod"],[e,n,r]=this.getTickMethodOptions();return t(e,n,r)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}rescale(){this.nice();var{range:t,domain:e}=this.options,[n,r]=e;this.n=t.length-1,this.thresholds=new 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){var[t,e]=super.invert(t),[n,r]=this.options.domain;return void 0===t&&void 0===e?[t,e]:[t||n,e||r]}getThresholds(){return this.thresholds}clone(){return new Um(this.options)}}function Xm(t,e,n=!1){var r=t,i=(n||r.sort((t,e)=>t-e),[]);for(let t=1;t<e;t+=1)i.push(function(t,e){var n,r=t.length;if(r)return r<2?t[r-1]:(r=(r-1)*e,(n=t[e=Math.floor(r)])+(t[e+1]-n)*(r-e))}(r,t/e));return i}class $m extends Ym{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:Cm}}constructor(t){super(t)}rescale(){var{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=Xm(t,this.n+1,!1)}invert(t){var[t,e]=super.invert(t),n=this.options["domain"],r=n[0],n=n[n.length-1];return void 0===t&&void 0===e?[t,e]:[t||r,e||n]}getThresholds(){return this.thresholds}clone(){return new $m(this.options)}getTicks(){var{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1;return n(e[0],e[r],t)}}var Km=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Zm=/\[([^]*?)\]/gm;function Jm(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}function Qm(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,i=e;r<i.length;r++){var a,o=i[r];for(a in o)t[a]=o[a]}return t}function tv(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t}var ev,zo=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],rc=["January","February","March","April","May","June","July","August","September","October","November","December"],oc=Jm(rc,3),nv=Qm({},{dayNamesShort:Jm(zo,3),dayNames:zo,monthNamesShort:oc,monthNames:rc,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10?1:0)*t%10]}}),rv={D:function(t){return String(t.getDate())},DD:function(t){return tv(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return tv(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 tv(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 tv(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return tv(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return tv(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return tv(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return tv(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return tv(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return tv(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return tv(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return(t.getHours()<12?e.amPm[0]:e.amPm[1]).toUpperCase()},ZZ:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+tv(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+tv(Math.floor(Math.abs(t)/60),2)+":"+tv(Math.abs(t)%60,2)}},iv={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"};const av=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=qy(o,t,n,r,i),r=e.range(o,new Date(+t+1),n,!0);return a?r.reverse():r};function ov(t){var e=t.getTimezoneOffset(),t=new Date(t);return t.setMinutes(t.getMinutes()+e,t.getSeconds(),t.getMilliseconds()),t}class sv extends Bm{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:av,interpolate:gm,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return Uy}getTickMethodOptions(){var{domain:t,tickCount:e,tickInterval:n,utc:r}=this.options;return[t[0],t[t.length-1],e,n,r]}getFormatter(){const{mask:a,utc:t}=this.options,o=t?Hy:Vy,s=t?ov:zf;return t=>{var e=s(t),t=a||function(t,e){var{second:e,minute:n,hour:r,day:i,week:a,month:o,year:s}=e;return e.floor(t)<t?".SSS":n.floor(t)<t?":ss":r.floor(t)<t?"hh:mm":i.floor(t)<t?"hh A":o.floor(t)<t?a.floor(t)<t?"MMM DD":"ddd DD":s.floor(t)<t?"MMMM":"YYYY"}(t,o),n=void 0;if(void 0===t&&(t=iv.default),void 0===n&&(n={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");var r=[],i=(t=(t=iv[t]||t).replace(Zm,function(t,e){return r.push(e),"@@@"}),Qm(Qm({},nv),n));return(t=t.replace(Km,function(t){return rv[t](e,i)})).replace(/@@@/g,function(){return r.shift()})}}clone(){return new sv(this.options)}}var lv;let cv=ev=class extends Dm{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:zf,tickMethod:Tm,tickCount:5}}constructor(t){super(t)}clone(){return new ev(this.options)}};cv=ev=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}([Qy(function(t){return[t(0),t(1)]},t=>{var[t,e]=t;return Ty(gm(0,1),Py(t,e))})],cv);let uv=lv=class extends Dm{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:zf,tickMethod:Tm,tickCount:5}}constructor(t){super(t)}clone(){return new lv(this.options)}};uv=lv=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}([Qy(function(t){return[t(0),t(.5),t(1)]},t=>{const[e,n,r]=t,i=Ty(gm(0,.5),Py(e,n)),a=Ty(gm(.5,1),Py(n,r));return t=>(e>r?t<n?a:i:t<n?i:a)(t)})],uv);const hv=t=>new Am(t),fv=(hv.props={},t=>new Dm(t)),dv=(fv.props={},t=>new Sm(t)),pv=(dv.props={},t=>new jm(t)),gv=(pv.props={},t=>new zm(t)),yv=(gv.props={},t=>new sv(t)),mv=(yv.props={},t=>new qm(t)),vv=(mv.props={},t=>new Wm(t)),bv=(vv.props={},t=>new Ym(t)),xv=(bv.props={},t=>new $m(t)),wv=(xv.props={},t=>new Um(t)),kv=(wv.props={},t=>new Vm(t)),Ev=(kv.props={},t=>new cv(t));function Mv(t){return function(){return t}}Ev.props={};const Ov=Math.abs,Sv=Math.atan2,_v=Math.cos,Av=Math.max,Tv=Math.min,Pv=Math.sin,Lv=Math.sqrt,Nv=1e-12,Cv=Math.PI,jv=Cv/2,Rv=2*Cv;function Fv(t){return 1<=t?jv:t<=-1?-jv:Math.asin(t)}const Iv=Math.PI,Bv=2*Iv,Dv=1e-6,zv=Bv-Dv;function Gv(n){this._+=n[0];for(let t=1,e=n.length;t<e;++t)this._+=arguments[t]+n[t]}class Wv{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?Gv:function(t){var e=Math.floor(t);if(!(0<=e))throw new Error("invalid digits: "+t);if(15<e)return Gv;const r=10**e;return function(n){this._+=n[0];for(let t=1,e=n.length;t<e;++t)this._+=Math.round(arguments[t]*r)/r+n[t]}}(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,a){this._append`C${+t},${+e},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(t,e,n,r,i){if(t=+t,e=+e,n=+n,r=+r,(i=+i)<0)throw new Error("negative radius: "+i);var a,o,s=this._x1,l=this._y1,c=n-t,u=r-e,h=s-t,f=l-e,d=h*h+f*f;null===this._x1?this._append`M${this._x1=t},${this._y1=e}`:d>Dv&&(Math.abs(f*c-u*h)>Dv&&i?(o=c*c+u*u,r=(n=n-s)*n+(s=r-l)*s,l=Math.sqrt(o),a=Math.sqrt(d),d=(o=i*Math.tan((Iv-Math.acos((o+d-r)/(2*l*a)))/2))/a,r=o/l,Math.abs(d-1)>Dv&&this._append`L${t+d*h},${e+d*f}`,this._append`A${i},${i},0,0,${+(h*s<f*n)},${this._x1=t+r*c},${this._y1=e+r*u}`):this._append`L${this._x1=t},${this._y1=e}`)}arc(t,e,n,r,i,a){if(t=+t,e=+e,a=!!a,(n=+n)<0)throw new Error("negative radius: "+n);let o=n*Math.cos(r),s=n*Math.sin(r),l=t+o,c=e+s,u=1^a,h=a?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Dv||Math.abs(this._y1-c)>Dv)&&this._append`L${l},${c}`,n&&((h=h<0?h%Bv+Bv:h)>zv?this._append`A${n},${n},0,1,${u},${t-o},${e-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:h>Dv&&this._append`A${n},${n},0,${+(h>=Iv)},${u},${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 Vv(){return new Wv}function Yv(n){let r=3;return n.digits=function(t){if(!arguments.length)return r;if(null==t)r=null;else{var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);r=e}return n},()=>new Wv(r)}function Hv(t){return t.innerRadius}function qv(t){return t.outerRadius}function Uv(t){return t.startAngle}function Xv(t){return t.endAngle}function $v(t){return t&&t.padAngle}function Kv(t,e,n,r,i,a,o){var s=t-n,l=e-r,o=(o?a:-a)/Lv(s*s+l*l),l=o*l,o=-o*s,s=t+l,t=e+o,e=n+l,n=r+o,r=(s+e)/2,c=(t+n)/2,u=e-s,h=n-t,f=u*u+h*h,a=i-a,s=s*n-e*t,n=(h<0?-1:1)*Lv(Av(0,a*a*f-s*s)),e=(s*h-u*n)/f,t=(-s*u-h*n)/f,d=(s*h+u*n)/f,s=(-s*u+h*n)/f,u=e-r,h=t-c,n=d-r,f=s-c;return n*n+f*f<u*u+h*h&&(e=d,t=s),{cx:e,cy:t,x01:-l,y01:-o,x11:e*(i/a-1),y11:t*(i/a-1)}}function Zv(){var A=Hv,T=qv,P=Mv(0),L=null,N=Uv,C=Xv,j=$v,R=null,F=Yv(e);function e(){var t,e,n,r,i,a,o,s,l,c,u,h,f,d,p,g,y,m,v,b,x,w,k=+A.apply(this,arguments),E=+T.apply(this,arguments),M=N.apply(this,arguments)-jv,O=C.apply(this,arguments)-jv,S=Ov(O-M),_=M<O;if(R=R||(t=F()),E<k&&(e=E,E=k,k=e),E>Nv?S>Rv-Nv?(R.moveTo(E*_v(M),E*Pv(M)),R.arc(0,0,E,M,O,!_),k>Nv&&(R.moveTo(k*_v(O),k*Pv(O)),R.arc(0,0,k,O,M,_))):(r=e=M,i=n=O,o=a=S,f=(u=j.apply(this,arguments)/2)>Nv&&(L?+L.apply(this,arguments):Lv(k*k+E*E)),w=x=s=Tv(Ov(E-k)/2,+P.apply(this,arguments)),f>Nv&&(h=Fv(f/k*Pv(u)),f=Fv(f/E*Pv(u)),(a-=2*h)>Nv?(r+=h*=_?1:-1,i-=h):(a=0,r=i=(M+O)/2),(o-=2*f)>Nv?(e+=f*=_?1:-1,n-=f):(o=0,e=n=(M+O)/2)),u=E*_v(e),h=E*Pv(e),f=k*_v(i),M=k*Pv(i),s>Nv&&(d=E*_v(n),p=E*Pv(n),g=k*_v(r),y=k*Pv(r),S<Cv)&&((O=function(t,e,n,r,i,a,o,s){var l=(s=s-a)*(n=n-t)-(o=o-i)*(r=r-e);if(!(l*l<Nv))return[t+(l=(o*(e-a)-s*(t-i))/l)*n,e+l*r]}(u,h,g,y,d,p,f,M))?(S=u-O[0],v=h-O[1],b=d-O[0],m=p-O[1],v=1/Pv((1<(S=(S*b+v*m)/(Lv(S*S+v*v)*Lv(b*b+m*m)))?0:S<-1?Cv:Math.acos(S))/2),b=Lv(O[0]*O[0]+O[1]*O[1]),x=Tv(s,(k-b)/(v-1)),w=Tv(s,(E-b)/(1+v))):x=w=0),o>Nv?w>Nv?(l=Kv(g,y,u,h,E,w,_),c=Kv(d,p,f,M,E,w,_),R.moveTo(l.cx+l.x01,l.cy+l.y01),w<s?R.arc(l.cx,l.cy,w,Sv(l.y01,l.x01),Sv(c.y01,c.x01),!_):(R.arc(l.cx,l.cy,w,Sv(l.y01,l.x01),Sv(l.y11,l.x11),!_),R.arc(0,0,E,Sv(l.cy+l.y11,l.cx+l.x11),Sv(c.cy+c.y11,c.cx+c.x11),!_),R.arc(c.cx,c.cy,w,Sv(c.y11,c.x11),Sv(c.y01,c.x01),!_))):(R.moveTo(u,h),R.arc(0,0,E,e,n,!_)):R.moveTo(u,h),k>Nv&&a>Nv?x>Nv?(l=Kv(f,M,d,p,k,-x,_),c=Kv(u,h,g,y,k,-x,_),R.lineTo(l.cx+l.x01,l.cy+l.y01),x<s?R.arc(l.cx,l.cy,x,Sv(l.y01,l.x01),Sv(c.y01,c.x01),!_):(R.arc(l.cx,l.cy,x,Sv(l.y01,l.x01),Sv(l.y11,l.x11),!_),R.arc(0,0,k,Sv(l.cy+l.y11,l.cx+l.x11),Sv(c.cy+c.y11,c.cx+c.x11),_),R.arc(c.cx,c.cy,x,Sv(c.y11,c.x11),Sv(c.y01,c.x01),!_))):R.arc(0,0,k,i,r,_):R.lineTo(f,M)):R.moveTo(0,0),R.closePath(),t)return R=null,t+""||null}return e.centroid=function(){var t=(+A.apply(this,arguments)+ +T.apply(this,arguments))/2,e=(+N.apply(this,arguments)+ +C.apply(this,arguments))/2-Cv/2;return[_v(e)*t,Pv(e)*t]},e.innerRadius=function(t){return arguments.length?(A="function"==typeof t?t:Mv(+t),e):A},e.outerRadius=function(t){return arguments.length?(T="function"==typeof t?t:Mv(+t),e):T},e.cornerRadius=function(t){return arguments.length?(P="function"==typeof t?t:Mv(+t),e):P},e.padRadius=function(t){return arguments.length?(L=null==t?null:"function"==typeof t?t:Mv(+t),e):L},e.startAngle=function(t){return arguments.length?(N="function"==typeof t?t:Mv(+t),e):N},e.endAngle=function(t){return arguments.length?(C="function"==typeof t?t:Mv(+t),e):C},e.padAngle=function(t){return arguments.length?(j="function"==typeof t?t:Mv(+t),e):j},e.context=function(t){return arguments.length?(R=null==t?null:t,e):R},e}function Jv(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Qv(t){this._context=t}function tb(t){return new Qv(t)}function eb(t){return t[0]}function nb(t){return t[1]}function rb(o,s){var l=Mv(!0),c=null,u=tb,h=null,f=Yv(e);function e(t){var e,n,r,i=(t=Jv(t)).length,a=!1;for(null==c&&(h=u(r=f())),e=0;e<=i;++e)!(e<i&&l(n=t[e],e,t))===a&&((a=!a)?h.lineStart():h.lineEnd()),a&&h.point(+o(n,e,t),+s(n,e,t));if(r)return h=null,r+""||null}return o="function"==typeof o?o:void 0===o?eb:Mv(o),s="function"==typeof s?s:void 0===s?nb:Mv(s),e.x=function(t){return arguments.length?(o="function"==typeof t?t:Mv(+t),e):o},e.y=function(t){return arguments.length?(s="function"==typeof t?t:Mv(+t),e):s},e.defined=function(t){return arguments.length?(l="function"==typeof t?t:Mv(!!t),e):l},e.curve=function(t){return arguments.length?(u=t,null!=c&&(h=u(c)),e):u},e.context=function(t){return arguments.length?(null==t?c=h=null:h=u(c=t),e):c},e}function ib(u,h,f){var d=null,p=Mv(!0),g=null,y=tb,m=null,v=Yv(e);function e(t){var e,n,r,i,a,o=(t=Jv(t)).length,s=!1,l=new Array(o),c=new Array(o);for(null==g&&(m=y(a=v())),e=0;e<=o;++e){if(!(e<o&&p(i=t[e],e,t))===s)if(s=!s)n=e,m.areaStart(),m.lineStart();else{for(m.lineEnd(),m.lineStart(),r=e-1;n<=r;--r)m.point(l[r],c[r]);m.lineEnd(),m.areaEnd()}s&&(l[e]=+u(i,e,t),c[e]=+h(i,e,t),m.point(d?+d(i,e,t):l[e],f?+f(i,e,t):c[e]))}if(a)return m=null,a+""||null}function t(){return rb().defined(p).curve(y).context(g)}return u="function"==typeof u?u:void 0===u?eb:Mv(+u),h="function"==typeof h?h:Mv(void 0===h?0:+h),f="function"==typeof f?f:void 0===f?nb:Mv(+f),e.x=function(t){return arguments.length?(u="function"==typeof t?t:Mv(+t),d=null,e):u},e.x0=function(t){return arguments.length?(u="function"==typeof t?t:Mv(+t),e):u},e.x1=function(t){return arguments.length?(d=null==t?null:"function"==typeof t?t:Mv(+t),e):d},e.y=function(t){return arguments.length?(h="function"==typeof t?t:Mv(+t),f=null,e):h},e.y0=function(t){return arguments.length?(h="function"==typeof t?t:Mv(+t),e):h},e.y1=function(t){return arguments.length?(f=null==t?null:"function"==typeof t?t:Mv(+t),e):f},e.lineX0=e.lineY0=function(){return t().x(u).y(h)},e.lineY1=function(){return t().x(u).y(f)},e.lineX1=function(){return t().x(d).y(h)},e.defined=function(t){return arguments.length?(p="function"==typeof t?t:Mv(!!t),e):p},e.curve=function(t){return arguments.length?(y=t,null!=g&&(m=y(g)),e):y},e.context=function(t){return arguments.length?(null==t?g=m=null:m=y(g=t),e):g},e}Vv.prototype=Wv.prototype,Qv.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)}}};var ab=sb(tb);function ob(t){this._curve=t}function sb(e){function t(t){return new ob(e(t))}return t._curve=e,t}function lb(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(sb(t)):e()._curve},t}function cb(){}function ub(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 hb(t,e){this._context=t,this._k=(1-e)/6}function fb(t,e){this._context=t,this._k=(1-e)/6}function db(t,e,n){var r,i,a=t._x1,o=t._y1,s=t._x2,l=t._y2;t._l01_a>Nv&&(r=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,i=3*t._l01_a*(t._l01_a+t._l12_a),a=(a*r-t._x0*t._l12_2a+t._x2*t._l01_2a)/i,o=(o*r-t._y0*t._l12_2a+t._y2*t._l01_2a)/i),t._l23_a>Nv&&(r=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,i=3*t._l23_a*(t._l23_a+t._l12_a),s=(s*r+t._x1*t._l23_2a-e*t._l12_2a)/i,l=(l*r+t._y1*t._l23_2a-n*t._l12_2a)/i),t._context.bezierCurveTo(a,o,s,l,t._x2,t._y2)}function pb(t,e){this._context=t,this._alpha=e}ob.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))}},hb.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:ub(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:ub(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 e(n){function t(t){return new hb(t,n)}return t.tension=function(t){return e(+t)},t}(0),fb.prototype={areaStart:cb,areaEnd:cb,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:ub(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 e(n){function t(t){return new fb(t,n)}return t.tension=function(t){return e(+t)},t}(0),pb.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){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),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:db(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 gb=function e(n){function t(t){return n?new pb(t,n):new hb(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function yb(t,e){this._context=t,this._alpha=e}yb.prototype={areaStart:cb,areaEnd:cb,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){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),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:db(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 mb=function e(n){function t(t){return n?new yb(t,n):new fb(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function vb(t){this._context=t}function bb(t){return new vb(t)}function xb(t,e){this._context=t,this._t=e}function wb(t){return new xb(t,.5)}function kb(t){return new xb(t,0)}function Eb(t){return new xb(t,1)}function tt(t){return new Mb([t],null,t,t.ownerDocument)}vb.prototype={areaStart:cb,areaEnd:cb,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))}},xb.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(),0<=this._line&&(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:var n;this._t<=0?(this._context.lineTo(this._x,e),this._context.lineTo(t,e)):(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}};class Mb{constructor(t=null,e=null,n=null,r=null,i=[null,null,null,null,null],a=[],o=[]){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=a,this._facetElements=o}selectAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new Mb(t,null,this._elements[0],this._document)}selectFacetAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new Mb(this._elements,null,this._parent,this._document,void 0,void 0,t)}select(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new Mb([t],null,t,this._document)}append(t){var e="function"==typeof t?t:()=>this.createElement(t),n=[];if(null!==this._data){for(let t=0;t<this._data.length;t++){var r=this._data[t],[r,i]=Array.isArray(r)?r:[r,null],a=e(r,t);a.__data__=r,null!==i&&(a.__fromElements__=i),this._parent.appendChild(a),n.push(a)}return new Mb(n,null,this._parent,this._document)}for(let t=0;t<this._elements.length;t++){var o=this._elements[t],s=e(o.__data__,t);o.appendChild(s),n.push(s)}return new Mb(n,null,n[0],this._document)}maybeAppend(t,e){var n=this._elements[0],r=n.getElementById(t);return r||((r="string"==typeof e?this.createElement(e):e()).id=t,n.appendChild(r)),new Mb([r],null,this._parent,this._document)}data(e,n=t=>t,r=()=>null){var i=[],a=[],o=new Set(this._elements),s=[],l=new Set,c=new Map(this._elements.map((t,e)=>[n(t.__data__,e),t])),u=new Map(this._facetElements.map((t,e)=>[n(t.__data__,e),t])),h=jp(this._elements,t=>r(t.__data__));for(let t=0;t<e.length;t++){var f=e[t],d=n(f,t),p=r(f,t);if(c.has(d)){var g=c.get(d);g.__data__=f,g.__facet__=!1,a.push(g),o.delete(g),c.delete(d)}else if(u.has(d)){g=u.get(d);g.__data__=f,g.__facet__=!0,a.push(g),u.delete(d)}else if(h.has(d)){const jp=h.get(d);s.push([f,jp]);for(const y of jp)o.delete(y);h.delete(d)}else c.has(p)?((d=c.get(p)).__toData__?d.__toData__.push(f):d.__toData__=[f],l.add(d),o.delete(d)):i.push(f)}var t=[new Mb([],i,this._parent,this._document),new Mb(a,null,this._parent,this._document),new Mb(o,null,this._parent,this._document),new Mb([],s,this._parent,this._document),new Mb(l,null,this._parent,this._document)];return new Mb(this._elements,null,this._parent,this._document,t)}merge(t){var e=[...this._elements,...t._elements],t=[...this._transitions,...t._transitions];return new Mb(e,null,this._parent,this._document,void 0,t)}createElement(t){var e;return this._document?this._document.createElement(t,{}):(e=Mb.registry[t])?new e:K0("Unknown node type: "+t)}join(t=t=>t,e=t=>t,n=t=>t.remove(),r=t=>t,i=t=>t.remove()){t=t(this._enter),e=e(this._update),n=n(this._exit),r=r(this._merge),i=i(this._split);return e.merge(t).merge(n).merge(r).merge(i)}remove(){for(let t=0;t<this._elements.length;t++){const n=this._elements[t];var e=this._transitions[t];e?(Array.isArray(e)?e:[e]).map(t=>t.finished.then(()=>n.remove())):n.remove()}return new Mb([],null,this._parent,this._document,void 0,this._transitions)}each(e){for(let t=0;t<this._elements.length;t++){var n=this._elements[t],r=n.__data__;e.call(n,r,t)}return this}attr(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))})}style(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))})}transition(t){const n="function"!=typeof t?()=>t:t,r=this["_transitions"];return this.each(function(t,e){r[e]=n.call(this,t,e)})}on(t,e){return this.each(function(){this.addEventListener(t,e)}),this}call(t,...e){return t.call(this._parent,this,...e),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}function Ob([t,e],[n,r]){return[t-n,e-r]}function Sb([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function _b([t,e]){return Math.atan2(e,t)}function Ab([t,e]){return _b([t,e])+Math.PI/2}function Tb(t){let e=1/0,n=-1/0,r=1/0,i=-1/0;for(var[a,o]of t)e=Math.min(a,e),n=Math.max(a,n),r=Math.min(o,r),i=Math.max(o,i);var t=n-e,s=i-r;return[e,r,t,s]}function Pb([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function Lb(r,i){return Object.entries(r).reduce((t,[e,n])=>(t[e]=i(n,e,r),t),{})}function Nb(t){return t.map((t,e)=>e)}function F(t,e){for(var[n,r]of Object.entries(e))t.style(n,r)}function Cb(t,e,n){var n=n["arrowSize"],n="string"==typeof n?+parseFloat(n)/100*Sb(t,e):n,r=Math.PI/6,t=Math.atan2(e[1]-t[1],e[0]-t[0]),i=Math.PI/2-t-r,t=t-r;return[[e[0]-n*Math.sin(i),e[1]-n*Math.cos(i)],[e[0]-n*Math.cos(t),e[1]-n*Math.sin(t)]]}function jb(t,e,n,r,i){e=_b(Ob(r,e))+Math.PI,n=_b(Ob(r,n))+Math.PI;t.arc(r[0],r[1],i,e,n,n-e<0)}function Rb(e,t,n,r="y",i="between"){const a="y"===r||!0===r?n:t;var n="y"===r||!0===r?90:0,t=Nb(a),[r,o]=Tp(t,t=>a[t]);const s=new Dm({domain:[r,o],range:[0,100]}),l=t=>s.map(a[t]);r={between:t=>`${e[t]} ${l(t)}%`,start:t=>0===t?`${e[t]} ${l(t)}%`:`${e[t-1]} ${l(t)}%, ${e[t]} ${l(t)}%`,end:t=>t===e.length-1?`${e[t]} ${l(t)}%`:`${e[t]} ${l(t)}%, ${e[t+1]} ${l(t)}%`};return`linear-gradient(${n}deg, ${t.sort((t,e)=>l(t)-l(e)).map(r[i]||r.between).join(",")})`}function Fb(t){var[t,e,n,r]=t;return[r,t,e,n]}function Ib(t,e,n){var[e,r,,i]=a0(t)?Fb(e):e,[n,a]=n,t=t.getCenter(),o=Ab(Ob(e,t)),r=Ab(Ob(r,t)),n=r===o&&n!==a?r+2*Math.PI:r;return{startAngle:o,endAngle:0<=n-o?n:2*Math.PI+n,innerRadius:Sb(i,t),outerRadius:Sb(e,t)}}function Bb(t,e,n,r){var i=t["defaultColor"],t=t[e]||{};return Object.assign({},{fill:i,stroke:i},t[n]||t[r])}function Db(t){var{opacityAttribute:t="fill"}=t;return t+"Opacity"}function zb(t,e){return o0(t)?(e=e["transform"],`translate(${(t=t.getCenter())[0]}, ${t[1]}) `+(e||"")):""}Mb.registry={g:Yo,rect:is,circle:Ro,path:Jo,text:os,ellipse:Wo,image:Xo,line:Ko,polygon:ts,polyline:ns,html:qo};const Gb=P=>{const{colorAttribute:L,first:N=!0,last:C=!0}=P,j=J(P,["colorAttribute","opacityAttribute","first","last"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Bb(r,i,a,o),i=L,a=r[i],{radius:o=0}=r,r=J(r,["symbol"==typeof i?i:i+"","radius"]),i=r.lineWidth||1,{stroke:s,radius:o=o,radiusTopLeft:l=o,radiusTopRight:c=o,radiusBottomRight:u=o,radiusBottomLeft:h=o,innerRadius:f=0,innerRadiusTopLeft:d=f,innerRadiusTopRight:p=f,innerRadiusBottomRight:g=f,innerRadiusBottomLeft:f=f,inset:y=0,insetLeft:m=y,insetRight:v=y,insetBottom:b=y,insetTop:x=y,lineWidth:i="stroke"===L||s?i:0}=j,w=J(j,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","inset","insetLeft","insetRight","insetBottom","insetTop","lineWidth"]),{color:a=a,opacity:k}=e;if(!o0(n)&&!l0(n)){var[E,,M]=!!a0(n)?Fb(t):t;const[T,_]=E;var[M,E]=Ob(M,E),O=(0<M?T:T+M)+m,S=(0<E?_:_+E)+x,M=Math.abs(M)-(m+v),m=Math.abs(E)-(x+b);return tt(new is({})).call(F,r).style("lineWidth",i).style("x",O).style("y",S).style("width",M).style("height",m).style("stroke",void 0===s?a:s).style(Db(P),k).style(L,a).style("radius",[N?l:d,N?c:p,C?u:g,C?h:f]).call(F,w).node()}const{y:_,y1:A}=e;v=n.getCenter(),E=Ib(n,t,[_,A]),x=Zv().cornerRadius(o).padAngle(y*Math.PI/180);return tt(new Jo({})).call(F,r).style("path",x(E)).style("transform",`translate(${v[0]}, ${v[1]})`).style("stroke",a||s).style("lineWidth",i).style(L,a).style(Db(P),k).call(F,j).node()}},Wb=(Gb.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>Gb(Object.assign({colorAttribute:"fill"},t))),Vb=(Wb.props=Object.assign({},Gb.props),t=>Gb(Object.assign({colorAttribute:"stroke"},t)));Vb.props=Object.assign({},Gb.props);const Yb=t=>{const{adjustPoints:s=function(t,e,n){var[t,r,i,a]=t;if(a0(n)){const o=[(e?e[0]:r)[0],r[1]],s=[(e?e[3]:i)[0],i[1]];return[t,o,s,a]}const o=[r[0],(e?e[0]:r)[1]],s=[i[0],(e?e[3]:i)[1]];return[t,o,s,a]}}=t,l=J(t,["adjustPoints"]);return(t,e,n,r,i,...a)=>{var o=e["index"],o=i[o+1],t=s(t,o,n);return Gb(Object.assign({colorAttribute:"fill"},l))(t,e,n,r,i,...a)}};function Hb(t,e,n){var[t,r,i,a]=t;if(a0(n)){const o=[e?e[0][0]:(r[0]+i[0])/2,r[1]],s=[e?e[3][0]:(r[0]+i[0])/2,i[1]];return[t,o,s,a]}const o=[r[0],e?e[0][1]:(r[1]+i[1])/2],s=[i[0],e?e[3][1]:(r[1]+i[1])/2];return[t,o,s,a]}Yb.props=Object.assign({},Gb.props);const qb=t=>Yb(Object.assign({adjustPoints:Hb},t));function Ub(t){const e="function"==typeof t?t:t.render;return class extends Io{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}qb.props=Object.assign({},Gb.props);const Xb=Ub(t=>{var{d1:e,d2:n,style1:r,style2:i}=t.attributes;tt(t).maybeAppend("line",()=>new Jo({})).style("d",e).call(F,r),tt(t).maybeAppend("line1",()=>new Jo({})).style("d",n).call(F,i)});const $b=t=>{const{curve:h,gradient:f=!1,gradientColor:d="between",defined:p=t=>!Number.isNaN(t)&&null!=t,connectNulls:g=!1}=t,y=J(t,["curve","gradient","gradientColor","defined","connectNulls"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Bb(r,i,a,o),{stroke:i,lineWidth:a}=r,o=J(r,["stroke","lineWidth"]),{color:r=i,size:i=a,seriesColor:a,seriesX:s,seriesY:l}=e,a=f&&a?Rb(a,s,l,f,d):r,s=zb(n,e),l=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o),a&&{stroke:a}),i&&{lineWidth:i}),s&&{transform:s}),y);let c;if(o0(n)){const u=n.getCenter();c=n=>lb(rb().curve(ab)).angle((t,e)=>Ab(Ob(n[e],u))).radius((t,e)=>Sb(n[e],u)).defined(([t,e])=>p(t)&&p(e)).curve(h)(n)}else c=rb().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>p(t)&&p(e)).curve(h);var[r,e]=function(t,e){var n=[],r=[];let i=!1,a=null;for(const o of t)e(o[0])&&e(o[1])?(n.push(o),i&&(i=!1,r.push([a,o])),a=o):i=!0;return[n,r]}(t,p),o=Q(l,"connect"),a=!!e.length;return(!a||g&&!Object.keys(o).length?tt(new Jo({})).style("d",c(r)).call(F,l):a&&!g?tt(new Jo({})).style("d",c(t)).call(F,l):tt(new Xb).style("style1",Object.assign(Object.assign({},l),o)).style("style2",l).style("d1",e.map(c).join(",")).style("d2",c(t))).node()}},Kb=($b.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=o0(n)?bb:tb;return $b(Object.assign({curve:i},a))(t,e,n,r)}),Zb=(Kb.props=Object.assign({},$b.props),t=>{const{alpha:a=.5}=t,o=J(t,["alpha"]);return(t,e,n,r)=>{var i=o0(n)?mb:gb;return $b(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),Jb=(Zb.props=Object.assign({},$b.props),t=>$b(Object.assign({curve:Eb},t))),Qb=(Jb.props=Object.assign({},$b.props),t=>$b(Object.assign({curve:kb},t))),t2=(Qb.props=Object.assign({},$b.props),t=>$b(Object.assign({curve:wb},t)));function e2(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"]]}t2.props=Object.assign({},$b.props);var n2,r2=Object.freeze({__proto__:null,point:e2,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"]]},diamond:function(t,e,n){var r=.618*n;return[["M",t-r,e],["L",t,e-n],["L",t+r,e],["L",t,e+n],["Z"]]},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"]]},triangleDown: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"]]},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"]]},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"]]},line:function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},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]]},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]]},plus:function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]},hyphen:function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}});const u=f=>{const{colorAttribute:d,symbol:t,mode:p="auto"}=f,g=J(f,["colorAttribute","symbol","mode"]),y=r2[t]||e2;return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=Bb(r,a,o,s),a=d,o=r[a],s=r["lineWidth"],r=J(r,["symbol"==typeof a?a:a+"","lineWidth"]),a=g.stroke?s||1:s,{color:s=o,transform:o,opacity:l}=e,[c,u]=1===(c=t).length?c[0]:([[c,h],[u,i]]=c,[(c+u)/2,(h+i)/2]),h=function(t,e,n,r){var i;if(1!==e.length)return n=n["size"],"fixed"!==t&&("normal"===t||u0(r))?([[t,r],[e,i]]=e,e=Math.abs((e-t)/2),t=Math.abs((i-r)/2),Math.max(0,(e+t)/2)):n}(p,t,e,n)||g.r||r.r;return tt(new Jo).call(F,r).style("d",y(c,u,h)).style("lineWidth",a).style("transform",o).style("stroke",s).style(Db(f),l).style(d,s).call(F,g).node()}},i2=(u.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>u(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t))),a2=(i2.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"cross"},t))),o2=(a2.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"diamond"},t))),s2=(o2.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t))),l2=(s2.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t))),c2=(l2.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t))),u2=(c2.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t))),h2=(u2.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"point"},t))),f2=(h2.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"square"},t))),d2=(f2.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t))),p2=(d2.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t))),g2=(p2.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t))),y2=(g2.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"line"},t))),m2=(y2.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"plus"},t))),v2=(m2.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"point"},t))),b2=(v2.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"square"},t))),x2=(b2.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"tick"},t))),w2=(x2.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"triangle"},t))),k2=(w2.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t))),E2=(k2.props=Object.assign({},u.props),t=>{const{arrowSize:h="40%"}=t,f=J(t,["arrowSize"]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=Bb(r,e,i,a),{fill:e,stroke:i}=r,a=J(r,["fill","stroke"]),[r,t]=t,[l,c]=Cb(r,t,{arrowSize:h}),u=Vv();return u.moveTo(...r),u.lineTo(...t),u.moveTo(...t),u.lineTo(...l),u.moveTo(...t),u.lineTo(...c),tt(new Jo).call(F,a).style("d",u.toString()).style("stroke",o||i).style("fill",o||e).style("transform",s).call(F,f).node()}});function M2(t,e,n,r){this.message=t,this.expected=e,this.found=n,this.location=r,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,M2)}function O2(){this.constructor=n2}E2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},n2=M2,hc=Error,O2.prototype=hc.prototype,n2.prototype=new O2,M2.buildMessage=function(t,e){var a={literal:function(t){return'"'+r(t.text)+'"'},class:function(t){for(var e="",n=0;n<t.parts.length;n++)e+=t.parts[n]instanceof Array?i(t.parts[n][0])+"-"+i(t.parts[n][1]):i(t.parts[n]);return"["+(t.inverted?"^":"")+e+"]"},any:function(t){return"any character"},end:function(t){return"end of input"},other:function(t){return t.description}};function n(t){return t.charCodeAt(0).toString(16).toUpperCase()}function r(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}function i(t){return t.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}return"Expected "+function(t){for(var e,n,r=new Array(t.length),i=0;i<t.length;i++)r[i]=(n=t[i],a[n.type](n));if(r.sort(),0<r.length){for(e=i=1;i<r.length;i++)r[i-1]!==r[i]&&(r[e]=r[i],e++);r.length=e}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(t)+" but "+((t=e)?'"'+r(t)+'"':"end of input")+" found."};var S2;function _2(t,e,n,r){var i,a,o,s=A2(r=void 0===r?"...":r,n),l=fn(t)?t:_(i=t)?"":i.toString(),c=e,u=[];if(A2(t,n)<=e)return t;for(;;){if(a=l.substr(0,16),c<(o=A2(a,n))+s)break;if(u.push(a),c-=o,!(l=l.substr(16)))return u.join("")}for(;;){if(a=l.substr(0,1),c<(o=A2(a,n))+s)break;if(u.push(a),c-=o,!(l=l.substr(1)))return u.join("")}return"".concat(u.join("")).concat(r)}var A2=Mn(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(S2=S2||document.createElement("canvas").getContext("2d")).font=[a,e,i,"".concat(n,"px"),r].join(" "),S2.measureText(fn(t)?t:"").width},function(t,e){return b([t],x(yn(e=void 0===e?{}:e)),!1).join("")});function T2(t,e){return"string"==typeof t?A2(t,e):t}function P2(t,e){return"capitalize"===e?t.toLowerCase().replace(/( |^)[a-z]/g,function(t){return t.toUpperCase()}):"lowercase"===e?t.toLowerCase():"uppercase"===e?t.toUpperCase():t}function L2(t,e){e=Math.pow(10,e);return~~(t*e)/e}function N2(t){if(pn(t))return[t,t,t,t];if(an(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 C2=["default","active","selected","disabled","inactive"],j2={fontSize:"16px",fontFamily:"sans-serif",fontWeight:"normal",fontVariant:"normal",fontStyle:"normal",textAlign:"start",textBaseline:"alphabetic"};function R2(t){var e;return t?null==t?void 0:t.default:(e=En(t)||{},C2.forEach(function(t){t in e&&delete e[t]}),e)}function F2(t,e,n){return void 0===n&&(n=!1),e?(e=_n(t,e),n?Pn({},R2(t),e):e):R2(t)||{}}function I2(r,i,a){void 0===a&&(a=!1);return Object.keys(r).reduce(function(t,e){var n;return n=e,new RegExp("^".concat(i,"[A-Z].*")).test(n)!==a&&(a?t[e]=r[e]:t[(n=e.slice(i.length)).charAt(0).toLowerCase()+n.slice(1)]=r[e]),t},{})}function B2(t,r){var i=t,t=Object.keys(t).reduce(function(t,e,n){return n>=r.length||(n=r[n],t.push(I2(i,n)),i=I2(i,n,!0)),t},[]);return t.push(i),t}function D2(r,i){return Object.keys(r).reduce(function(t,e){var n;return t["".concat(i).concat((n=e).charAt(0).toUpperCase()+n.slice(1))]=r[e],t},{})}function z2(t,n){void 0===n&&(n=["x","y","class"]);var r=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],i={},a={};return Object.entries(t).forEach(function(t){var t=x(t,2),e=t[0],t=t[1];n.includes(e)||(-1!==r.indexOf(e)?a[e]=t:i[e]=t)}),[i,a]}function G2(t){var e=t.canvas,n=t.touches,r=t.offsetX,t=t.offsetY;return e?[e.x,e.y]:n?[(e=n[0]).clientX,e.clientY]:r&&t?[r,t]:[0,0]}O.prototype.selectAll=function(t){return new O("string"==typeof t?this._parent.querySelectorAll(t):t,null,this._elements[0],this._document)},O.prototype.selectFacetAll=function(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new O(this._elements,null,this._parent,this._document,void 0,void 0,t)},O.prototype.select=function(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new O([t],null,t,this._document)},O.prototype.append=function(t){var e=this,n="function"==typeof t?t:function(){return e.createElement(t)},r=[];if(null!==this._data){for(var i=0;i<this._data.length;i++){var a=this._data[i],a=x(Array.isArray(a)?a:[a,null],2),o=a[0],a=a[1];(l=n(o,i)).__data__=o,null!==a&&(l.__fromElements__=a),this._parent.appendChild(l),r.push(l)}return new O(r,null,this._parent,this._document)}for(i=0;i<this._elements.length;i++){var s=this._elements[i],l=n(o=s.__data__,i);s.appendChild(l),r.push(l)}return new O(r,null,r[0],this._document)},O.prototype.maybeAppend=function(t,e){e=_e(this,W2,"m",V2).call(this,t.startsWith("#")?t:"#".concat(t),e);return e.attr("id",t),e},O.prototype.maybeAppendByClassName=function(t,e){t=t.toString(),e=_e(this,W2,"m",V2).call(this,t.startsWith(".")?t:".".concat(t),e);return e.attr("className",t),e},O.prototype.maybeAppendByName=function(t,e){e=_e(this,W2,"m",V2).call(this,'[name="'.concat(t,'"]'),e);return e.attr("name",t),e},O.prototype.data=function(t,n,e){void 0===n&&(n=function(t){return t}),void 0===e&&(e=function(){return null});for(var r,i,a=[],o=[],s=new Set(this._elements),l=[],c=new Set,u=new Map(this._elements.map(function(t,e){return[n(t.__data__,e),t]})),h=new Map(this._facetElements.map(function(t,e){return[n(t.__data__,e),t]})),f=jp(this._elements,function(t){return e(t.__data__)}),d=0;d<t.length;d++){var p=t[d],g=n(p,d),y=e(p,d);if(u.has(g))(x=u.get(g)).__data__=p,x.__facet__=!1,o.push(x),s.delete(x),u.delete(g);else if(h.has(g))(x=h.get(g)).__data__=p,x.__facet__=!0,o.push(x),h.delete(g);else if(f.has(g)){var m=f.get(g);l.push([p,m]);try{r=void 0;for(var v=Se(m),b=v.next();!b.done;b=v.next()){var x=b.value;s.delete(x)}}catch(t){r={error:t}}finally{try{b&&!b.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}f.delete(g)}else u.has(y)?((x=u.get(y)).__toData__?x.__toData__.push(p):x.__toData__=[p],c.add(x),s.delete(x)):a.push(p)}var w=[new O([],a,this._parent,this._document),new O(o,null,this._parent,this._document),new O(s,null,this._parent,this._document),new O([],l,this._parent,this._document),new O(c,null,this._parent,this._document)];return new O(this._elements,null,this._parent,this._document,w)},O.prototype.merge=function(t){var e=b(b([],x(this._elements),!1),x(t._elements),!1),t=b(b([],x(this._transitions),!1),x(t._transitions),!1);return new O(e,null,this._parent,this._document,void 0,t)},O.prototype.createElement=function(t){if(this._document)return this._document.createElement(t,{});var e=O.registry[t];if(e)return new e;throw e="Unknown node type: ".concat(t),new Error(e)},O.prototype.join=function(t,e,n,r,i){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()});t=(t=void 0===t?function(t){return t}:t)(this._enter),e=e(this._update),n=n(this._exit),r=r(this._merge),i=i(this._split);return e.merge(t).merge(n).merge(r).merge(i)},O.prototype.remove=function(){for(var n=this,t=0;t<this._elements.length;t++)!function(t){var e=n._elements[t],t=n._transitions[t];t?t.then(function(){return e.remove()}):e.remove()}(t);return new O([],null,this._parent,this._document,void 0,this._transitions)},O.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},O.prototype.attr=function(n,r){var i="function"!=typeof r?function(){return r}:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))})},O.prototype.style=function(n,r){var i="function"!=typeof r?function(){return r}:r;return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))})},O.prototype.update=function(n){var r="function"!=typeof n?function(){return n}:n;return this.each(function(t,e){n&&this.update&&this.update(r.call(this,t,e))})},O.prototype.transition=function(t){var n="function"!=typeof t?function(){return t}:t,r=this._transitions;return this.each(function(t,e){r[e]=n.call(this,t,e)})},O.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},O.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,b([this._parent,this],x(e),!1)),this},O.prototype.node=function(){return this._elements[0]},O.prototype.nodes=function(){return this._elements},O.prototype.transitions=function(){return this._transitions},O.prototype.parent=function(){return this._parent},W2=new WeakSet,V2=function(t,e){var n=this._elements[0],t=n.querySelector(t);return t||(t="string"==typeof e?this.createElement(e):e(),n.appendChild(t)),new O([t],null,this._parent,this._document)},O.registry={g:Yo,rect:is,circle:Ro,path:Jo,text:os,ellipse:Wo,image:Xo,line:Ko,polygon:ts,polyline:ns,html:qo};var W2,V2,Y2=O;function O(t,e,n,r,i,a,o){void 0===t&&(t=null),void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=[null,null,null,null,null]),void 0===a&&(a=[]),void 0===o&&(o=[]),W2.add(this),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=a,this._facetElements=o}function S(t,e){var n,r;if(e)try{for(var i=Se(Object.entries(e)),a=i.next();!a.done;a=i.next()){var o=x(a.value,2),s=o[0],l=o[1];t.style(s,l)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function A(t){return new Y2([t],null,t,t.ownerDocument)}function H2(t,e,n){return t.querySelector(e)?A(t).select(e):A(t).append(n)}function q2(t){var e,t=t&&t.getRenderBounds();return t?(e=t.getMax(),t=t.getMin(),{width:e[0]-t[0],height:e[1]-t[1]}):{width:0,height:0}}function U2(t){var t=t.getLocalBounds(),t=x([t.min,t.max],2),e=x(t[0],2),n=e[0],e=e[1],t=x(t[1],2),r=t[0],t=t[1];return{x:n,y:e,width:r-n,height:t-e,left:n,bottom:t,top:e,right:r}}function X2(t,e){var t=x(t,2),n=t[0],t=t[1],e=x(e,2),n=e[0]-n,e=e[1]-t;return Math.sqrt(n*n+e*e)}function $2(t){var e,n;return"string"==typeof t?(e=t,(n=document.createElement("div")).innerHTML=e,n.firstChild):t}function K2(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)J2(t,e[r]);return t}var Z2=5,J2=function(r,i,a,o){void 0===a&&(a=0),void 0===o&&(o=Z2),Object.entries(i).forEach(function(t){var t=x(t,2),e=t[0],t=t[1],n=r;Object.prototype.hasOwnProperty.call(i,e)&&(t?cn(t)?(cn(r[e])||(n[e]={}),a<o?J2(r[e],t,a+1,o):n[e]=i[e]):an(t)?(n[e]=[],n[e]=n[e].concat(t)):n[e]=t:n[e]=t)})};function Q2(t,e,n,r,i,a){return(t===e||Math.min(t,e)<=i&&i<=Math.max(t,e))&&(n===r||Math.min(n,r)<=a&&a<=Math.max(n,r))}function tx(t,e,n){var r=t;(!t.length||e<t[0]||e===t[0]&&n<t[1])&&(r[0]=e,r[1]=n)}function ex(t,e){var t=x(t,2),n=t[0],t=t[1],e=x(e,2),r=e[0],e=e[1];return Math.pow(Math.pow(n-r,2)+Math.pow(t-e,2),.5)}function nx(a){return void 0===a&&(a=0),function(t,e,n){var r,i=n.value;"function"==typeof i&&(n.value=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];r||(t=this,r=window.setTimeout(function(){i.apply(t,e),r=null},a))})}}var rx,ix=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function ax(t){return fn(t)||pn(t)?new os({style:{text:String(t)}}):t}function ox(t){return t*Math.PI/180}function sx(t){return Number((180*t/Math.PI).toPrecision(5))}function lx(t,e){var t=(t instanceof N?t:t.node()).computedStyleMap().get("transform");return!t||"unset"===t.value||null==(t=null==t?void 0:t.find(function(t){return t.t===e}))?void 0:t.d.map(function(t){return t.value})}function cx(t,e){if(e)try{var o=t instanceof N?t:t.node(),n=e.replace(/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,function(t,e,n){return"translate(".concat((e=e,n=n,i=(r=((r=o)instanceof N?r:r.node()).getBBox()).width,a=r.height,[(r=x([e,n].map(function(t,e){var n;return t.includes("%")?parseFloat((null==(n=t.match(/[+-]?([0-9]*[.])?[0-9]+/))?void 0:n[0])||"0")/100*(0===e?i:a):t}),2))[0],r[1]]),")");var r,i,a});o.attr("transform",n)}catch(t){}}function ux(t,e,n,r,i){return(r=void 0===r?!0:r)&&t===e||i&&t===n||e<t&&t<n}function hx(t,e){return en(t)?t.apply(void 0,b([],x(e),!1)):t}function fx(t,e,n,r,i){void 0===r&&(r=!0),void 0===i&&(i=function(t){t instanceof Y2?t.node().removeChildren():t instanceof N?t.removeChildren():t instanceof HTMLElement&&(t.innerHTML="")}),t?n(e):r&&i(e)}function dx(){return null!==rx&&rx.apply(this,arguments)||this}function px(e,n){return Me(t,r=Io),t.prototype.connectedCallback=function(){var t,e;null!=(t=(e=this.descriptor).render)&&t.call(e,this.attributes,this),null!=(e=(t=this.descriptor).bindEvents)&&e.call(t,this.attributes,this)},t.prototype.update=function(t){var e;this.attr(Pn({},this.attributes,t=void 0===t?{}:t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)},t.prototype.attributeChangedCallback=function(){var t,e;null!=(e=null==(t=this.descriptor)?void 0:t.render)&&e.call(t,this.attributes,this)},t;function t(t){t=r.call(this,K2({},{style:n},t))||this;return t.descriptor=e,t}var r}Me(dx,rx=Io);function gx(t,e){function r(t){return"".concat(e,"-").concat(t)}return t=Object.fromEntries(Object.entries(t).map(function(t){var t=x(t,2),e=t[0],t=t[1],n=r(t);return[e,{name:n,class:".".concat(n),id:"#".concat(n),toString:function(){return n}}]})),Object.assign(t,{prefix:r}),t}function yx(t){var r=v({},t),i=new RegExp(/^(f|[\S]+F)(ilter|iltrate)$/),a={},o={iltrate:"ilter",ilter:"iltrate"};return Object.entries(t).forEach(function(t){var t=x(t,2),e=t[0],t=t[1];i.test(e)&&(a[e]=t)}),Object.keys(a).forEach(function(t){delete r[t]}),Object.keys(a).forEach(function(t){var e,n;(t.endsWith("iltrate")&&"function"!=typeof a[t]||t.endsWith("ilter")&&"function"==typeof a[t])&&(n=t.replace(i,function(t,e,n){return"".concat(e).concat(o[n])}),Object.assign(r,((e={})[n]=a[t],e)))}),r}function mx(t,e){"text"===t.node().nodeName&&t.call(S,{wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:"..."})}function vx(t,e,n){void 0===n&&(n=!1);var r=t.getBBox(),i=r.width,r=r.height,e=e/Math.max(i,r);n&&t.scale(e)}function bx(r,e,t,n,i){function a(){return"update"in r?r.update(e):Object.keys(e).forEach(function(t){r.attr(t,e[t])}),Promise.resolve()}void 0===t&&(t={}),void 0===n&&(n=!0),void 0===i&&(i=50);var o={},s={},l=["x","y","width","height","opacity","radius"];Object.entries(e).forEach(function(t){var t=x(t,2),e=t[0],t=t[1],n=r.attr(e);l.includes(e)&&!_(t)&&!_(n)&&n!==t&&Math.abs(+n-+t)>=i&&(o[e]=n,s[e]=t)});return n?0<Object.keys(o).length?(null==(n=r.animate([o,s],v({fill:"both"},t)))?void 0:n.finished.then(a))||Promise.resolve():void Promise.resolve():a()}Me(wx,xx=Io),wx.prototype.connectedCallback=function(){var t=this.style,e=t.x,t=t.y;this.setLocalPosition([+(void 0===e?0:e),+(void 0===t?0:t)]),this.render(this.attributes,this),this.bindEvents(this.attributes,this)},wx.prototype.update=function(t){this.attr(K2({},this.attributes,t=void 0===t?{}:t)),null!=(t=this.render)&&t.call(this,this.attributes,this)},wx.prototype.clear=function(){this.removeChildren()},wx.prototype.destroy=function(){this.removeAllEventListeners(),this.removeChildren(),this.remove()},wx.prototype.attributeChangedCallback=function(){},wx.prototype.bindEvents=function(t,e){};var xx,o=wx;function wx(t){return xx.call(this,t)||this}function kx(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"]]}function Ex(t,e,n){return[["M",t,e+n],["L",t,e-n]]}function Mx(t,e,n){return[["M",t-n,e],["L",t+n,e]]}Jl=kx,j=Mx;function Ox(t){n="default",on(e=t)&&e instanceof Image?n="image":en(e)?n="symbol":fn(e)&&(r=new RegExp("data:(image|text)"),n=e.match(r)?"base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(e)?"url":"symbol");var e,n,r=n;return["base64","url","image"].includes(r)?"image":t&&"symbol"===r?"path":null}Me(Ax,Sx=o),Ax.prototype.render=function(t,e){var r=t.x,i=t.y,a=t.symbol,n=t.size,o=void 0===n?16:n,s=J(t,["x","y","symbol","size"]),l=Ox(a);l?H2(e,".".concat(l,"-marker"),l).attr("className","marker ".concat(l,"-marker")).call(function(t){var e,n;"image"===l?(e=2*o,t.style("img",a).style("width",e).style("height",e).style("x",-o).style("y",-o)):(e=o/2,n=en(a)?a:Ax.getSymbol(a),t.style("path",null==n?void 0:n(r,i,e)).call(S,s))}):(null!=(n=this.querySelector(".marker"))&&n.remove(),this.removeChildren())},Ax.MARKER_SYMBOL_MAP=new Map,Ax.registerSymbol=function(t,e){Ax.MARKER_SYMBOL_MAP.set(t,e)},Ax.getSymbol=function(t){return Ax.MARKER_SYMBOL_MAP.get(t)};var Sx,_x=Ax;function Ax(){return null!==Sx&&Sx.apply(this,arguments)||this}_x.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]]}),_x.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),_x.registerSymbol("line",Ex),_x.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),_x.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]]}),_x.registerSymbol("circle",kx),_x.registerSymbol("point",Jl),_x.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"]]}),_x.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"]]}),_x.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"]]}),_x.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),_x.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"]]}),_x.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"]]}),_x.registerSymbol("line",Ex),_x.registerSymbol("dot",Mx),_x.registerSymbol("dash",j),_x.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]]}),_x.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]]}),_x.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]]}),_x.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]]}),_x.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]]});Me(Lx,Tx=o),Lx.prototype.render=function(t,e){var n,r,i=t.padding,a=t.marker,o=t.text,s=t.textStyle,l=t.radius,c=t.backgroundStyle,u=t.spacing,h=t.align,t=t.verticalAlign,i=x(N2(void 0===i?0:i),4),f=i[0],d=i[1],p=i[2],i=i[3],g=H2(e,".tag-content","g").attr("className","tag-content").node(),y=H2(g,".tag-marker",function(){return new _x({})}).attr("className","tag-marker").call(function(t){t.node().clear(),t.node().update(a||{symbol:"triangle",size:0,x:0})}).node(),u=(u=u,{x:(m=(y=y).getLocalBounds()).halfExtents[0]?m.max[0]+(u||0):y.style.x,y:m.halfExtents[1]?(m.min[1]+m.max[1])/2:y.style.y}),m=u.x,y=u.y,y=(H2(g,".tag-text","text").attr("className","tag-text").style("fontFamily","sans-serif").style("fontSize",12).style("x",m).style("y",y).style("text",_(o)?"":"".concat(o)).call(S,s).style("textBaseline","middle").call(function(t){o||t.remove()}),u=i,m=f,y=h||"start",s=t||"top",t=(h=g).getLocalBounds(),r=n=0,"start"===y&&(n=u),"center"===y&&(n=-t.halfExtents[0]),"end"===y&&(n=-u-2*t.halfExtents[0]),"top"===s&&(r=m+t.halfExtents[1]),"middle"===s&&(r=0),"bottom"===s&&(r=m-2*t.halfExtents[1]),h.setLocalPosition([n,r]),g.getLocalBounds());H2(e,".tag-background","rect").attr("className","tag-background").style("zIndex",(g.style.zIndex||0)-1).style("x",y.min[0]-i).style("y",y.min[1]-f).style("width",null!==c?i+d+2*y.halfExtents[0]:0).style("height",null!==c?f+p+2*y.halfExtents[1]:0).style("radius",null!=l?l:2).style("fill","#fafafa").style("stroke","#d9d9d9").style("lineWidth",1).call(S,c)},Lx.defaultOptions={type:Lx.tag="tag",style:{padding:4,spacing:4}};var Tx,Px=Lx;function Lx(t){return Tx.call(this,Pn({},Lx.defaultOptions,t))||this}var Nx,Cx,jx={small:{textStyle:{fontSize:10},buttonStyle:{width:40,height:20},markerStyle:{size:8}},middle:{textStyle:{fontSize:12},buttonStyle:{width:60,height:30},markerStyle:{size:12}},large:{textStyle:{fontSize:16},buttonStyle:{width:80,height:40},markerStyle:{size:16}}},Rx={primary:{textStyle:{default:{fill:"#fff"},active:{}},buttonStyle:{default:{fill:"#1890ff",lineWidth:0},active:{fill:"#40a9ff"}},markerStyle:{default:{fill:"#1890ff"},active:{fill:"#40a9ff"}}},dashed:{textStyle:{default:{},active:{}},buttonStyle:{default:{fill:"transparent",stroke:"#bbb",lineDash:[5,5]},active:{}},markerStyle:{}},link:{textStyle:{default:{fill:"#1890ff"},active:{}},buttonStyle:{default:{fill:"transparent",lineWidth:0},active:{}},markerStyle:{default:{fill:"#1890ff"}}},text:{textStyle:{default:{fill:"#000"},active:{}},buttonStyle:{default:{fill:"transparent",lineWidth:0},active:{}},markerStyle:{default:{stroke:"#000"}}},default:{textStyle:{default:{fill:"#000"},active:{fill:"#1890ff"}},buttonStyle:{default:{fill:"transparent",stroke:"#bbb"},active:{stroke:"#1890ff"}},markerStyle:{default:{stroke:"#bbb",lineWidth:1},active:{stroke:"#1890ff"}}}},Fx={strict:{textStyle:{fill:"#b8b8b8"},buttonStyle:{},markerStyle:{}},textStyle:{},buttonStyle:{stroke:"#d9d9d9",fill:"#f5f5f5"},markerStyle:{stroke:"#d9d9d9"}};function Ix(t){var n=Nx.call(this,K2({},Ix.defaultOptions,t))||this;return n.state="default",n.clickEvents=function(){var t=n.attributes,e=t.onClick;"disabled"!==t.state&&null!=e&&e.call(n,n)},n.mouseenterEvent=function(){"disabled"!==n.attributes.state&&(n.state="active",n.render(n.attributes,n))},n.mouseleaveEvent=function(){var t=n.attributes.state;n.state=void 0===t?"default":t,n.render(n.attributes,n)},n}function Bx(t){return Cx.call(this,Pn({},Bx.defaultOptions,t))||this}Me(Ix,Nx=o),Object.defineProperty(Ix.prototype,"markerSize",{get:function(){var t=this.attributes.marker,e=this.getStyle("markerStyle");return t?(null==e?void 0:e.size)||2:0},enumerable:!1,configurable:!0}),Object.defineProperty(Ix.prototype,"text",{get:function(){var t,e=this.attributes.text;return""===e?e:(t=this.textAvailableWidth,_2(e,t))},enumerable:!1,configurable:!0}),Object.defineProperty(Ix.prototype,"textAvailableWidth",{get:function(){var t=this.attributes,e=t.marker,n=t.padding,r=t.ellipsis,i=t.width,t=t.markerSpacing;return r?(r=vn(i)?this.getStyle("buttonStyle").width:i,e?r-2*n-t-this.markerSize:r-2*n):1/0},enumerable:!1,configurable:!0}),Object.defineProperty(Ix.prototype,"buttonHeight",{get:function(){var t=this.attributes.height;return t||this.getStyle("buttonStyle").height},enumerable:!1,configurable:!0}),Ix.prototype.getStyle=function(e){var t=this.attributes,n=t.size,t=t.type,r=this.state,i=Pn({},_n(jx,[n,e]),F2(_n(Rx,[t,e]),r),F2(_n(this.attributes,e),r,!0));return"disabled"===r&&(Object.keys(i).forEach(function(t){t in Fx[e]&&(i[t]=_n(Fx,[e,t]))}),Object.keys(Fx.strict[e]).forEach(function(t){i[t]=_n(Fx,["strict",e,t])}),Pn(i,F2(_n(this.attributes,e),"disabled"))),i},Ix.prototype.render=function(t,e){var n=t.padding,n=void 0===n?0:n,r=t.marker,t=t.markerSpacing,t=void 0===t?0:t,n=(e.attr("cursor","disabled"===this.state?"not-allowed":"pointer"),x(N2(n),4)),i=(n[0],n[1]),a=(n[2],n[3]),o=this.buttonHeight,s=this.getStyle("markerStyle"),l=this.markerSize,n=H2(e,".marker",function(){return new _x({className:"marker",style:{symbol:"circle"}})}).call(function(t){t.node().update(v(v({},s),{symbol:r,x:a+l/2,y:o/2,size:l}))}).node().getLocalBounds(),c=this.text,c=void 0===c?"":c,u=this.getStyle("textStyle"),n=(this.textShape=H2(e,".text","text").attr("className","text").style("x",l?n.max[0]+t:a).style("y",o/2).style("text",c).style("textAlign","left").style("textBaseline","middle").call(S,u).node(),this.textShape.getLocalBounds()),c=this.getStyle("buttonStyle");H2(e,".background","rect").attr("className","background").style("zIndex",-1).call(S,c).style("height",o).style("width",a+(l?l+t:0)+2*n.halfExtents[0]+i).node()},Ix.prototype.update=function(t){this.attr(Pn({},this.attributes,t=void 0===t?{}:t));t=this.attributes.state;this.state=void 0===t?"default":t,this.render(this.attributes,this)},Ix.prototype.setState=function(t){this.update({state:t})},Ix.prototype.hide=function(){this.style.visibility="hidden"},Ix.prototype.show=function(){this.style.visibility="visible"},Ix.prototype.bindEvents=function(){this.addEventListener("click",this.clickEvents),this.addEventListener("mouseenter",this.mouseenterEvent),this.addEventListener("mouseleave",this.mouseleaveEvent)},Ix.defaultOptions={type:Ix.tag="button",style:{cursor:"pointer",padding:10,size:"middle",type:"default",text:"",markerAlign:"left",markerSpacing:5,textStyle:{default:{},active:{}},buttonStyle:{default:{lineWidth:1,radius:5},active:{}},markerStyle:{default:{}}}},Me(Bx,Cx=o),Bx.prototype.render=function(t,e){for(var n=t.x,r=t.y,s=t.items,l=t.textStyle,i=t.padding,c=t.width,u=t.separator,t=x(N2(void 0===i?0:i),3),i=t[0],h=t[1],t=t[2],f=H2(e,".container","g").attr("className","container").style("x",n+t).style("y",r+i),d=0,p=0,g=(f.node().removeChildren(),this),a=0;a<s.length;a++)!function(t){var e,n=s[t],r=new Px({className:"breadcrumb-item",style:v(v({x:d,y:p,text:_(n.text)?n.id:n.text,textStyle:l},An(n,["marker"])),{padding:0,backgroundStyle:null})}),i=(f.append(function(){return r}),r.getLocalBounds()),a=2*i.halfExtents[0],i=2*i.halfExtents[1],a=(d+=a,_(c)||c-h<d&&(r.attr({x:0,y:p+i}),d=a,p+=i),g.bindInnerEvents(r,n),u||{}),n=a.spacing,n=void 0===n?0:n,o=a.text,o=void 0===o?"/":o,a=a.style;t!==s.length-1&&(e=new os({className:"".concat(Bx.tag,"-separator"),id:"".concat(Bx.tag,"-separator-").concat(t),style:v(v(v(v({},j2),{x:d+n,y:p+i/2}),a),{text:o,textAlign:"end",textBaseline:"middle"})}),f.append(function(){return e}),t=e.getLocalBounds(),d+=2*t.halfExtents[0]+n)}(a)},Bx.prototype.update=function(t){this.attr(Pn({},this.attributes,t)),this.render(this.attributes,this)},Bx.prototype.bindInnerEvents=function(t,e){var n=this.attributes,r=n.items,i=n.onClick;i&&t.addEventListener("click",function(){i.call(t,e.id,e,r)})},Bx.defaultOptions={type:Bx.tag="breadcrumb",style:{separator:{text:"/",style:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},spacing:8},textStyle:{default:v(v({},j2),{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"}),active:{fill:"#5468ff",cursor:"pointer"}},padding:[8,8,8,8]}};Me(Gx,Dx=N),Gx.prototype.render=function(){var t=this.attributes,e=t.lines,t=t.areas;e&&this.createLines(e),t&&this.createAreas(t)},Gx.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},Gx.prototype.update=function(t){var e=t.lines,t=t.areas;this.clear(),e&&this.setAttribute("lines",e),t&&this.setAttribute("areas",t),this.render()},Gx.prototype.createLines=function(t){A(this.linesGroup).selectAll("line").data(t).join(function(t){return t.append("path").each(function(t){A(this).call(S,t)})},function(t){return t.each(function(t){A(this).call(S,t)})},function(t){return t.remove()})},Gx.prototype.createAreas=function(t){A(this.linesGroup).selectAll("area").data(t).join(function(t){return t.append("path").each(function(t){A(this).call(S,t)})},function(t){return t.each(function(t){A(this).call(S,t)})},function(t){return t.remove()})};var Dx,zx=Gx;function Gx(t){var e=this,n=t.style,t=J(t,["style"]);return(e=Dx.call(this,Pn({},{type:"lines",style:{width:0,height:0}},v({style:n},t)))||this).linesGroup=e.appendChild(new Yo({name:"lines"})),e.areasGroup=e.appendChild(new Yo({name:"areas"})),e.render(),e}Me(Yx,Wx=N),Yx.prototype.render=function(){var t=this.attributes.columns;A(this.columnsGroup).selectAll("column-group").data(t.flat()).join(function(t){return t.append("rect").each(function(t){A(this).call(S,t)})},function(t){return t.each(function(t){A(this).call(S,t)})},function(t){return t.remove()})},Yx.prototype.update=function(t){this.attr(Pn({},this.attributes,t)),t.columns&&(this.clear(),this.render())},Yx.prototype.clear=function(){this.removeChildren()};var Wx,Vx=Yx;function Yx(t){var e=this,n=t.style,t=J(t,["style"]);return(e=Wx.call(this,Pn({},{type:"column",style:{width:0,height:0}},v({style:n},t)))||this).columnsGroup=new Yo({name:"columns"}),e.appendChild(e.columnsGroup),e.render(),e}function Hx(t){return 0===t.length?[0,0]:[hn(function(t,e){if(an(t)){for(var n,r=1/0,i=0;i<t.length;i++){var a=t[i],o=en(e)?e(a):a[e];o<r&&(n=a,r=o)}return n}}(t,function(t){return hn(t)||0})),un(function(t,e){if(an(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=en(e)?e(a):a[e];r<o&&(n=a,r=o)}return n}}(t,function(t){return un(t)||0}))]}function qx(t){for(var e=En(t),n=e[0].length,t=x([Array(n).fill(0),Array(n).fill(0)],2),r=t[0],i=t[1],a=0;a<e.length;a+=1)for(var o=e[a],s=0;s<n;s+=1)0<=o[s]?(o[s]+=r[s],r[s]=o[s]):(o[s]+=i[s],i[s]=o[s]);return e}function Ux(t,e,n){void 0===n&&(n=[[0,0],[1,1]]);for(var e=!!(e=void 0===e?!1:e),r=[],i=0,a=t.length;i<a;i+=2)r.push([t[i],t[i+1]]);for(var o,s,l,c=function(t,e,n,r){var i,a=[],o=!!r;if(o){c=r[0],u=r[1];for(var s=0,l=t.length;s<l;s+=1)var c=pe([0,0],c,x=t[s]),u=ge([0,0],u,x)}for(var s=0,h=t.length;s<h;s+=1){var f,d,p,g,y,m,v,b,x=t[s];0!==s||n?s!==h-1||n?(f=t[[s?s-1:h-1,s-1][n?0:1]],d=t[n?(s+1)%h:s+1],m=ye(m=we([0,0],d,f),m,e),0!==(y=(p=me(x,f))+(g=me(x,d)))&&(p/=y,g/=y),y=ye([0,0],m,-p),m=ye([0,0],m,g),v=de([0,0],x,y),b=pe([0,0],b=de([0,0],x,m),ge([0,0],d,x)),b=ge([0,0],b,pe([0,0],d,x)),v=pe([0,0],v=de([0,0],x,y=ye([0,0],y=we([0,0],b,x),-p/g)),ge([0,0],f,x)),v=ge([0,0],v,pe([0,0],f,x)),b=de([0,0],x,m=ye([0,0],m=we([0,0],x,v),g/p)),o&&(v=pe([0,0],v=ge([0,0],v,c),u),b=pe([0,0],b=ge([0,0],b,c),u)),a.push(i),a.push(v),i=b):(v=x,a.push(i),a.push(v)):i=x}return n&&a.push(a.shift()),a}(r,.4,e,n),u=r.length,h=[],i=0;i<u-1;i+=1)o=c[2*i],s=c[2*i+1],h.push(["C",o[0],o[1],s[0],s[1],(l=r[i+1])[0],l[1]]);return e&&(o=c[u],s=c[u+1],h.push(["C",o[0],o[1],s[0],s[1],(l=r[0])[0],l[1]])),h}function Xx(t,e){var n=(e=void 0===e?!1:e)?t.length-1:0,t=t.map(function(t,e){return b([e===n?"M":"L"],x(t),!1)});return e?t.reverse():t}function $x(t,e){if(void 0===e&&(e=!1),t.length<=2)return Xx(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var a=e?t[r-i-1]:t[i];Ln(a,n.slice(-2))||n.push.apply(n,b([],x(a),!1))}var o=Ux(n,!1);return e?o.unshift(b(["M"],x(t[r-1]),!1)):o.unshift(b(["M"],x(t[0]),!1)),o}function Kx(t,e,n){t=En(t);return t.push(["L",e,n],["L",0,n],["Z"]),t}Me(Qx,Zx=o),Object.defineProperty(Qx.prototype,"rawData",{get:function(){var t=this.attributes.data;return t&&0!==(null==t?void 0:t.length)?(t=En(t),pn(t[0])?[t]:t):[[]]},enumerable:!1,configurable:!0}),Object.defineProperty(Qx.prototype,"data",{get:function(){return this.attributes.isStack?qx(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(Qx.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(Qx.prototype,"baseline",{get:function(){var t=this.scales.y,e=x(t.getOptions().domain||[0,0],2),n=e[0],e=e[1];return e<0?t.map(e):t.map(n<0?0:n)},enumerable:!1,configurable:!0}),Object.defineProperty(Qx.prototype,"containerCfg",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(Qx.prototype,"linesCfg",{get:function(){var n=this;if("line"!==this.attributes.type)throw new Error("linesCfg can only be used in line type");var t,r,i,a,o,e,s,l,c,u=this.attributes,h=u.isStack,f=u.smooth,d=I2(this.attributes,"area"),p=I2(this.attributes,"line"),u=this.containerCfg.width,g=this.data;return 0===g[0].length?{lines:[],areas:[]}:(t=this.scales,e=t.x,t=t.y,g=g,r=(e={type:"line",x:e,y:t}).x,i=e.y,a=(e=x(i.getOptions().range||[0,0],2))[0],o=e[1],a<o&&(e=x([a,o],2),o=e[0],a=e[1]),t=g.map(function(t){return t.map(function(t,e){return[r.map(e),dn(i.map(t),o,a)]})}),e=[],d&&(g=this.baseline,e=h?(f?function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=t[i],s=$x(o),l=void 0,l=0===i?Kx(s,e,n):(a=$x(t[i-1],!0),o=o[0],a[0][0]="L",b(b(b([],x(s),!1),x(a),!1),[b(["M"],x(o),!1),["Z"]],!1));r.push(l)}return r}:function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=Xx(t[i]),s=void 0,s=0===i?Kx(o,e,n):((a=Xx(t[i-1],!0))[0][0]="L",b(b(b([],x(o),!1),x(a),!1),[["Z"]],!1));r.push(s)}return r})(t,u,g):(s=f,l=u,c=g,t.map(function(t){return Kx((s?$x:Xx)(t),l,c)}))),{lines:t.map(function(t,e){return v({stroke:n.getColor(e),path:(f?$x:Xx)(t)},p)}),areas:e.map(function(t,e){return v({path:t,fill:n.getColor(e)},d)})})},enumerable:!1,configurable:!0}),Object.defineProperty(Qx.prototype,"columnsCfg",{get:function(){var i=this;if("column"!==this.attributes.type)throw new Error("columnsCfg can only be used in column type");var a=I2(this.attributes,"column"),o=this.attributes.isStack,t=this.containerCfg.height,s=this.rawData;if(!s)return{columns:[]};o&&(s=qx(s));var e=this.createScales(s),l=e.x,c=e.y,e=x(Hx(s),2),n=e[0],e=e[1],u=new Dm({domain:[0,e-(0<n?0:n)],range:[0,t]}),h=l.getBandWidth(),f=this.rawData;return{columns:s.map(function(t,r){return t.map(function(t,e){var n=h/s.length;return v(v({fill:i.getColor(r)},a),o?{x:l.map(e),y:c.map(t),width:h,height:u.map(f[r][e])}:{x:l.map(e)+n*r,y:0<=t?c.map(t):c.map(0),width:n,height:u.map(Math.abs(t))})})})}},enumerable:!1,configurable:!0}),Qx.prototype.render=function(t,e){this.containerShape=H2(e,".container","rect").attr("className","container").node();var n=t.type,r="spark".concat(n),i="line"===n?this.linesCfg:this.columnsCfg;this.sparkShape=H2(e,".".concat(r),function(){return new("line"===n?zx:Vx)({className:r,style:i})}).call(S,i).node()},Qx.prototype.update=function(t){this.attr(Pn({},this.attributes,t)),this.render(this.attributes,this)},Qx.prototype.clear=function(){this.removeChild(this.sparkShape),this.sparkShape.clear(),this.sparkShape.destroy()},Qx.prototype.getColor=function(t){var e=this.attributes.color;return an(e)?e[t%e.length]:en(e)?e.call(null,t):e},Qx.prototype.createScales=function(t){var e,n=this.attributes,r=n.type,n=n.range,n=void 0===n?[]:n,i=this.containerCfg,a=i.width,i=i.height,o=x(Hx(t),2),s=o[0],o=o[1],s=new Dm({domain:[null!=(e=n[0])?e:s,null!=(e=n[1])?e:o],range:[i,0]});return"line"===r?{type:r,x:new Dm({domain:[0,t[0].length-1],range:[0,a]}),y:s}:(e=(n=this.attributes).isGroup,o=n.spacing,{type:r,x:new Am({domain:t[0].map(function(t,e){return e}),range:[0,a],paddingInner:e?o:0}),y:s})},Qx.tag="sparkline",Qx.defaultOptions={style:{type:"line",width:200,height:20,isStack:!1,nice:!0,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineLineWidth:1,areaOpacity:0,isGroup:!1,columnLineWidth:1,columnStroke:"#fff",columnPadding:.1}};var Zx,Jx=Qx;function Qx(t){return Zx.call(this,Pn({},Qx.defaultOptions,t))||this}var tw,ew={fill:"#fff",stroke:"#bfbfbf",lineWidth:1,size:10,radius:2,strokeOpacity:1},nw={fontSize:12,fill:"#000",fillOpacity:.45,textAlign:"center",textBaseline:"middle"},rw={orient:"horizontal",type:"start",showLabel:!0},iw=gx({labelGroup:"label-group",label:"label",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),aw=px({render:function(t,e){var n=t.size,n=void 0===n?10:n,r=t.radius,r=void 0===r?n/4:r,i=t.orient,t=(t.class,J(t,["size","radius","orient","class"])),a=2.4*n,r=A(e).maybeAppendByClassName(iw.iconRect,"rect").call(S,v(v({},t),{width:n,height:a,radius:r,x:-n/2,y:-a/2})),o=1/3*n,s=2/3*n,l=.25*a,c=.75*a;r.maybeAppendByClassName("".concat(iw.iconLine,"-1"),"line").call(S,{x1:o,x2:o,y1:l,y2:c}).call(S,t),r.maybeAppendByClassName("".concat(iw.iconLine,"-2"),"line").call(S,{x1:s,x2:s,y1:l,y2:c}).call(S,t),r.node().setOrigin(n/2,a/2),"vertical"===i?e.setLocalEulerAngles(90):e.setLocalEulerAngles(0)}}),ow=(Me(sw,tw=o),sw.prototype.renderLabel=function(t){var e=this,n=this.attributes.showLabel,r=x(z2(I2(this.attributes,"label"),[]),2),i=r[0],r=r[1];fx(!!n,A(t).maybeAppendByClassName(iw.labelGroup,"g").call(S,r),function(t){e.label=t.maybeAppendByClassName(iw.label,"text").call(S,v(v({},nw),i)),e.label.on("mousedown",function(t){t.stopPropagation()}),e.label.on("touchstart",function(t){t.stopPropagation()})})},sw.prototype.renderIcon=function(t){var e=this.attributes,n=e.iconShape,n=void 0===n?function(){return new aw({style:r})}:n,e=e.orient,r=v(v({orient:e},ew),I2(this.attributes,"icon"));this.icon=A(t).maybeAppendByClassName(iw.icon,n).update(r)},sw.prototype.render=function(t,e){this.renderIcon(e),this.renderLabel(e)},sw);function sw(t){return tw.call(this,K2({},{style:rw},t))||this}Me(hw,lw=o),Object.defineProperty(hw.prototype,"values",{get:function(){return this.getAttribute("values")},set:function(t){this.setAttribute("values",this.clampValues(t))},enumerable:!1,configurable:!0}),Object.defineProperty(hw.prototype,"sparklineShapeCfg",{get:function(){var t,e,n,r,i,a,o,s;return"horizontal"!==this.attributes.orient?null:(i=(t=I2(this.attributes,"sparkline")).padding,t=J(t,["padding"]),e=(i=x(N2(i),4))[0],n=i[1],r=i[2],i=i[3],a=(o=this.availableSpace).width,o=o.height,s=this.attributes.trackLineWidth,v(v({x:(s=+(void 0===s?0:s))/2+i,y:s/2+e},t),{zIndex:0,width:a-s-i-n,height:o-s-e-r}))},enumerable:!1,configurable:!0}),Object.defineProperty(hw.prototype,"shape",{get:function(){var t=this.attributes,e=t.trackLength,t=t.trackSize,t=x(this.getOrientVal([[e,t],[t,e]]),2);return{width:t[0],height:t[1]}},enumerable:!1,configurable:!0}),Object.defineProperty(hw.prototype,"availableSpace",{get:function(){var t=x(N2(this.attributes.padding),4),e=t[0],n=t[1],r=t[2],t=t[3],i=this.shape;return{x:t,y:e,width:i.width-(t+n),height:i.height-(e+r)}},enumerable:!1,configurable:!0}),hw.prototype.getValues=function(){return this.values},hw.prototype.setValues=function(t,e){void 0===e&&(e=!1),this.attr("values",t=void 0===t?[0,0]:t),bx(this.selectionShape.node(),this.selectionCfg,this.animation,e),bx(this.startHandle.node(),this.getHandleShapeCfg("start"),this.animation,e),bx(this.endHandle.node(),this.getHandleShapeCfg("end"),this.animation,e)},hw.prototype.innerSetValues=function(t,e){void 0===e&&(e=!1);var n=this.values,t=this.clampValues(t=void 0===t?[0,0]:t);this.update({values:t}),e&&this.onValueChange(n)},hw.prototype.renderTrack=function(t){var e=this.attributes.brushable,n=I2(this.attributes,"track");this.trackShape=A(t).maybeAppendByClassName("slider-track","rect").call(S,v(v({},this.shape),n)).style("cursor",e?"crosshair":"default")},hw.prototype.renderSparkline=function(t){var n=this;fx("horizontal"===this.attributes.orient,A(t).maybeAppendByClassName("slider-sparkline-group","g"),function(t){var e=n.sparklineShapeCfg;t.maybeAppendByClassName("slider-sparkline",function(){return new Jx({style:e})}).call(function(t){t.node().update(e)})})},Object.defineProperty(hw.prototype,"selectionCfg",{get:function(){var t=I2(this.attributes,"selection");return v(v({},t),this.calcMask())},enumerable:!1,configurable:!0}),hw.prototype.renderSelection=function(t){function e(t){var e="".concat(t,"-handle"),n=r.getHandleShapeCfg(t);return r.foregroundGroup.maybeAppendByClassName(e,function(){return new ow({style:n})}).style("type",t).update(n)}var r=this;this.foregroundGroup=A(t).maybeAppendByClassName("slider-foreground","g"),this.selectionShape=this.foregroundGroup.maybeAppendByClassName("slider-selection","rect").call(S,this.selectionCfg);this.startHandle=e("start"),this.endHandle=e("end")},hw.prototype.render=function(t,e){this.renderTrack(e),this.renderSparkline(e),this.renderSelection(e)},hw.prototype.clampValues=function(t,e){void 0===e&&(e=4);var n=x(this.range,2),r=n[0],n=n[1],i=x(this.getValues().map(function(t){return L2(t,e)}),2),a=i[0],i=i[1],t=x((t||[a,i]).map(function(t){return L2(t,e)}),2),o=t[0],t=t[1],s=(t<o&&(o=(s=x([t,o],2))[0],t=s[1]),t-o);return n-r<s?[r,n]:o<r?a===r&&i===t?[r,t]:[r,s+r]:n<t?i===n&&a===o?[o,n]:[n-s,n]:[o,t]},hw.prototype.calcMask=function(t){var t=x(this.clampValues(t),2),e=t[0],t=t[1],n=this.availableSpace,r=n.x,i=n.y,a=n.width,n=n.height;return this.getOrientVal([{y:i,height:n,x:e*a+r,width:(t-e)*a},{x:r,width:a,y:e*n+i,height:(t-e)*n}])},hw.prototype.calcHandlePosition=function(t){var e=this.availableSpace,n=e.width,e=e.height,r=x(this.clampValues(),2),i=r[0],r=r[1],t=("start"===t?i:r)*this.getOrientVal([n,e]);return{x:this.getOrientVal([t,n/2]),y:this.getOrientVal([e/2,t])}},hw.prototype.calcHandleText=function(t){var e,n=this.attributes,r=n.orient,n=n.formatter,i=I2(this.attributes,"handle"),a=I2(i,"label"),i=i.spacing,o=this.getHandleSize(),s=this.clampValues(),l=this.availableSpace,c=l.width,l=l.height,u=this.calcMask(),h=u.x,f=u.y,d=u.width,u=u.height,n=n("start"===t?s[0]:s[1]),s=this.appendChild(new os({style:v(v(v({visibility:"hidden"},j2),a),{text:n})})),a=s.getBBox(),p=a.width,a=a.height,s=(s.destroy(),0),g=0;return"horizontal"===r?(e=(r=i+o)+p/2,s="start"===t?0<h-r-p?-e:e:p<c-h-d-r?e:-e):(e=i+o,g="start"===t?a<f-o?-e:e:a<l-f-u-o?e:-e),{x:s,y:g,text:n}},hw.prototype.getHandleLabelShapeCfg=function(t){var e;return this.attributes.showLabel?(e=I2(this.attributes,"handleLabel"),v(v({},e),this.calcHandleText(t))):{}},hw.prototype.getHandleIconShapeCfg=function(){var t=this.attributes,e=t.orient,t=t.handleIconShape,n=I2(this.attributes,"handleIcon"),r=this.getOrientVal(["ew-resize","ns-resize"]),i=this.getHandleSize();return v(v({},n),{shape:t,orient:e,cursor:r,size:i})},hw.prototype.getHandleShapeCfg=function(t){var e=this.attributes,n=e.showHandle,e=e.showLabel,r=this.calcHandlePosition(t),i=r.x,r=r.y,a=this.calcHandleText(t);return v(v(v({zIndex:3,showLabel:e,visibility:n?"visible":"hidden"},D2(this.getHandleIconShapeCfg(),"icon")),D2(v(v({},this.getHandleLabelShapeCfg(t)),a),"label")),{x:i,y:r})},hw.prototype.getHandleSize=function(){var t,e=this.attributes.handleIconSize;return e||(t=(e=this.attributes).width,e=e.height,Math.floor((this.getOrientVal([+e,+t])+4)/2.4))},hw.prototype.getOrientVal=function(t){var t=x(t,2),e=t[0],t=t[1];return"horizontal"===this.attributes.orient?e:t},hw.prototype.setValuesOffset=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!1);var r=x(this.getValues(),2),t=[r[0]+t,r[1]+e].sort();n?this.setValues(t):this.innerSetValues(t,!0)},hw.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,e=e.height;return t/this.getOrientVal([n,e])},hw.prototype.dispatchCustomEvent=function(t,e,n){var r=this;t.on(e,function(t){t.stopPropagation(),r.dispatchEvent(new mo(n,{detail:t}))})},hw.prototype.bindEvents=function(){var n=this,t=this.selectionShape,t=(this.addEventListener("wheel",this.onScroll),t.on("mousedown",this.onDragStart("selection")),t.on("touchstart",this.onDragStart("selection")),this.dispatchCustomEvent(t,"mouseenter","selectionMouseenter"),this.dispatchCustomEvent(t,"mouseleave","selectionMouseleave"),this.dispatchCustomEvent(t,"click","selectionClick"),[this.startHandle,this.endHandle].forEach(function(t){var e=t.node().attr("type");t.on("mousedown",function(t){n.onDragStart(e)(t)}),t.on("touchstart",function(t){n.onDragStart(e)(t)})}),this.trackShape);this.dispatchCustomEvent(t,"click","trackClick"),this.dispatchCustomEvent(t,"mouseenter","trackMouseenter"),this.dispatchCustomEvent(t,"mouseleave","trackMouseleave"),t.on("mousedown",this.onDragStart("track")),t.on("touchstart",this.onDragStart("track"))},hw.prototype.onScroll=function(t){var e;this.attributes.scrollable&&(e=t.deltaX,t=t.deltaY,t=this.getRatio(t||e),this.setValuesOffset(t,t,!0))},hw.defaultOptions={type:hw.tag="slider",style:v(v(v({values:[0,1],trackLength:200,trackSize:20,slidable:!0,brushable:!0,scrollable:!0,orient:"horizontal",trackZIndex:-1,trackFill:"#416180",trackOpacity:.05,selectionCursor:"move",selectionZIndex:2,selectionFill:"#5B8FF9",selectionFillOpacity:.45,sparklinePadding:1,padding:0,showHandle:!0,showLabel:!0,handleSpacing:2,formatter:function(t){return t}},D2(rw,"handle")),D2(ew,"handleIcon")),D2(nw,"handleLabel"))};var lw,cw,uw=hw;function hw(t){var a=lw.call(this,Pn({},hw.defaultOptions,t))||this;return a.range=[0,1],a.animation={duration:100,fill:"both"},a.onDragStart=function(i){return function(t){t.stopPropagation(),a.target=i,a.prevPos=a.getOrientVal(G2(t));var t=a.availableSpace,e=t.x,t=t.y,n=a.attributes,r=n.x,n=n.y;a.selectionStartPos=a.getRatio(a.prevPos-a.getOrientVal([e,t])-a.getOrientVal([+r,+n])),a.selectionWidth=0,document.addEventListener("mousemove",a.onDragging),document.addEventListener("touchmove",a.onDragging),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchend",a.onDragEnd)}},a.onDragging=function(t){var e=a.attributes,n=e.slidable,r=e.brushable,e=(t.stopPropagation(),a.getOrientVal(G2(t))),t=e-a.prevPos;if(t){var i=a.getRatio(t);switch(a.target){case"start":n&&a.setValuesOffset(i);break;case"end":n&&a.setValuesOffset(0,i);break;case"selection":n&&a.setValuesOffset(i,i);break;case"track":if(!r)return;a.selectionWidth+=i,a.innerSetValues([a.selectionStartPos,a.selectionStartPos+a.selectionWidth].sort(),!0)}a.prevPos=e}},a.onDragEnd=function(){document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchend",a.onDragEnd)},a.onValueChange=function(t){t=new mo("valuechange",{detail:{oldValue:t,value:a.getValues()}});a.dispatchEvent(t)},a.selectionStartPos=0,a.selectionWidth=0,a.prevPos=0,a.target="",a}function fw(t){var a=cw.call(this,Pn({},fw.defaultOptions,t))||this;return a.range=[0,1],a.onValueChange=function(t){var e=a.style.value;t!==e&&(a.dispatchEvent(new mo("scroll",t={detail:{oldValue:t,value:e}})),a.dispatchEvent(new mo("valuechange",t)))},a.onTrackClick=function(t){var e,n,r,i;a.attributes.slidable&&(r=(e=x(a.getLocalPosition(),2))[0],e=e[1],n=(i=x(a.padding,4))[0],i=i[3],r=a.getOrientVal([r+i,e+n]),i=(a.getOrientVal(G2(t))-r)/a.trackLength,a.setValue(i,!0))},a.onThumbMouseenter=function(t){a.dispatchEvent(new mo("thumbMouseenter",{detail:t.detail}))},a.onTrackMouseenter=function(t){a.dispatchEvent(new mo("trackMouseenter",{detail:t.detail}))},a.onThumbMouseleave=function(t){a.dispatchEvent(new mo("thumbMouseleave",{detail:t.detail}))},a.onTrackMouseleave=function(t){a.dispatchEvent(new mo("trackMouseleave",{detail:t.detail}))},a}Me(fw,cw=o),Object.defineProperty(fw.prototype,"padding",{get:function(){return N2(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(fw.prototype,"value",{get:function(){var t=this.attributes.value,e=x(this.range,2),n=e[0],e=e[1];return dn(t,n,e)},enumerable:!1,configurable:!0}),Object.defineProperty(fw.prototype,"trackLength",{get:function(){var t=this.attributes,e=t.viewportLength,t=t.trackLength;return void 0===t?e:t},enumerable:!1,configurable:!0}),Object.defineProperty(fw.prototype,"availableSpace",{get:function(){var t=this.attributes.trackSize,e=this.trackLength,n=x(this.padding,4),r=n[0],i=n[1],a=n[2],n=n[3],t=x(this.getOrientVal([[e,t],[t,e]]),2);return{x:n,y:r,width:+t[0]-(n+i),height:+t[1]-(r+a)}},enumerable:!1,configurable:!0}),Object.defineProperty(fw.prototype,"trackRadius",{get:function(){var t=this.attributes,e=t.isRound,t=t.trackSize;return e?t/2:0},enumerable:!1,configurable:!0}),Object.defineProperty(fw.prototype,"thumbRadius",{get:function(){var t,e;return this.attributes.isRound?(t=(e=this.availableSpace).width,e=e.height,this.attributes.thumbRadius||this.getOrientVal([e,t])/2):0},enumerable:!1,configurable:!0}),fw.prototype.getValues=function(t){void 0===t&&(t=this.value);var e=this.attributes,e=e.viewportLength/e.contentLength,n=x(this.range,2),r=n[0],t=t*(n[1]-r-e);return[t,t+e]},fw.prototype.getValue=function(){return this.value},fw.prototype.renderSlider=function(t){var e=this.attributes,n=e.orient,r=e.trackSize,i=e.padding,e=e.slidable,a=x(B2(this.attributes,["track","thumb"]),2),o=a[0],a=a[1],s=v(v({orient:n,padding:i,slidable:e,trackSize:r,brushable:!1,showHandle:!1,values:this.getValues(),trackLength:this.trackLength,trackRadius:this.trackRadius,selectionRadius:this.thumbRadius},D2(o,"track")),D2(a,"selection"));this.slider=A(t).maybeAppendByClassName("scrollbar",function(){return new uw({style:s})}).update(s).node()},fw.prototype.render=function(t,e){this.renderSlider(e)},fw.prototype.setValue=function(t,e){void 0===e&&(e=!1);var n=this.style.value,r=x(this.range,2),i=r[0],r=r[1];this.slider.setValues(this.getValues(dn(t,i,r)),e),this.onValueChange(n)},fw.prototype.bindEvents=function(){var e=this;this.slider.addEventListener("trackClick",function(t){t.stopPropagation(),e.onTrackClick(t.detail)}),this.onHover()},fw.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orient?t[0]:t[1]},fw.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)},fw.defaultOptions={type:fw.tag="scrollbar",style:{value:0,trackSize:10,isRound:!0,slidable:!0,scrollable:!0,orient:"vertical",padding:[2,2,2,2]}};var dw={style:{data:[],dataThreshold:100,showTitle:!0,titlePosition:"lb",titleFill:"black",titleFontSize:12,titleTextAlign:"center",titleSpacing:0,titleTextBaseline:"middle",showLine:!0,lineLineWidth:1,lineStroke:"black",lineArrow:new Jo({style:{path:"M 10,10 L -10,0 L 10,-10 L0,0 L10,10Z",anchor:"0.5 0.5",fill:"black",transformOrigin:"center"}}),lineArrowOffset:15,lineArrowSize:10,showTick:!0,tickDirection:"positive",tickStroke:"black",tickLength:5,tickLineWidth:1,tickStrokeOpacity:.65,showLabel:!0,labelSpacing:0,labelDirection:"positive",labelAlign:"parallel",labelTransforms:[],showGrid:!0,gridType:"segment",gridConnect:"line",gridDirection:"positive",gridLength:0,gridControlAngles:[]}},pw=(Pn({},dw,{style:{type:"arc"}}),Pn({},dw,{style:{}}),gx({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 gw(t,e,n,r){var i=n[e].data,n=n.map(function(t){return t.data}),i="function"==typeof r?r.call(null,i,e,n):r;t.attr(i||{})}function yw(t,e){return Object.fromEntries(Object.entries(t).map(function(t){t=x(t,2);return[t[0],hx(t[1],e)]}))}function mw(t,e){return e&&en(e)?t.filter(e):t}function vw(t){return t.reduce(function(t,e,n){return"".concat(t).concat(0===n?"M":" L").concat(e[0],",").concat(e[1])},"")}function bw(t,e,n){var r,i,a,o;return"surround"===e.type?(r=t,n=n,o=(e=e).connect,e=e.center,"line"===(void 0===o?"line":o)?vw(r):e?(i=X2(r[0],e),a=n?0:1,r.reduce(function(t,e,n){var e=x(e,2),r=e[0],e=e[1];return(0===n?"M":"".concat(t,"A").concat(i,",").concat(i,",0,0,").concat(a,",")).concat(r,",").concat(e)},"")):""):vw(t)}function xw(t,e,n){function r(t,e){return"".concat(l," ").concat(t," ").concat(c," ").concat(e," ").concat(s)}var i=n.type,a=n.connect,o=n.center,s=n.closed?" Z":"",n=x([bw(t,n),bw(e.slice().reverse(),n,!0)],2),l=n[0],c=n[1],n=x([t[0],e.slice(-1)[0]],2),t=n[0],e=n[1];if("line"===a||"surround"===i)return r("L".concat(e.join()),"L".concat(t.join()));if(o)return a=(n=x([X2(e,o),X2(t,o)],2))[0],i=n[1],r("A".concat(a,",").concat(a,",0,0,1,").concat(e.join(" ")," L").concat(e.join()),"A".concat(i,",").concat(i,",0,0,0,").concat(t.join(" ")));throw new Error("Arc grid need to specified center")}function ww(t,e,n){n.type,n.center;var r=n.connect,i=n.areaFill;if(n.closed,!(e.length<2)&&i&&r){for(var a=Array.isArray(i)?i:[i,"transparent"],o=[],s=0;s<e.length-1;s++){var l=x([e[s].points,e[s+1].points],2),l=xw(l[0],l[1],n);o.push({path:l,fill:a[s%a.length]})}A(t).selectAll(".grid-region").data(o,function(t,e){return e}).join(function(t){return t.append("path").each(function(t,e){this.attr(t),gw(this,e,o,t)}).attr("className","grid-region")},function(t){return t.each(function(t,e){this.attr(t),gw(this,e,o,t)})},function(t){return t.remove()})}}Me(Mw,kw=o),Mw.prototype.render=function(t,e){t.className;var n,r,i,a,o=t.items,o=void 0===o?[]:o,s=(t.type,t.center,t.areaFill,t.closed,J(t,["className","items","type","center","areaFill","closed"])),o=(o=o,t.closed?o.map(function(t){var e=t.points,n=x(e),r=n[0];return n.slice(1),v(v({},t),{points:b(b([],x(e),!1),[r],!1)})}):o);n=e,r=t,i=s,a=o.map(function(t,e){return{id:t.id||"grid-line-".concat(e),path:bw(t.points,r)}}),A(n).selectAll(".grid-line").data(a,function(t){return t.id}).join(function(t){return t.append("path").style("stroke","#D9D9D9").style("lineWidth",1).style("lineDash",[4,4]).each(function(t,e){t=t.path;this.attr(v(v({},i),{path:t})),gw(this,e,a,v({path:t},i))}).attr("className","grid-line")},function(t){return t.each(function(t,e){this.attr(t),gw(this,e,a,t)})},function(t){return t.remove()}),ww(e,o,t)};var kw,Ew=Mw;function Mw(){return null!==kw&&kw.apply(this,arguments)||this}var Ow=Mn(function(t,e){var e=x(e.angleRange,2),n=e[0];return(e[1]-n)*t+n},function(t,e){return b([t],x(e.angleRange),!1).join()}),Sw=Mn(function(t,e){var n,r,i;return"linear"===e.type?(r=(n=x(e.startPos,2))[0],n=n[1],i=x(e.endPos,2),ve([0,0],[(r=x([i[0]-r,i[1]-n],2))[0],r[1]])):(i=ox(Ow(t,e)),[-Math.sin(i),Math.cos(i)])},function(t,e){var n="linear"===(n=e).type?b(b([],x(n.startPos),!1),x(n.endPos),!1):b(b(b([],x(n.angleRange),!1),x(n.center),!1),[n.radius],!1);return"arc"===e.type&&n.push(t),n.join()});function _w(t,e,n){var t=Sw(t,n);return n=[],t=t,"positive"!==e?(n[0]=t[1],n[1]=-1*t[0]):(n[0]=-1*t[1],n[1]=t[0]),n}var Aw=Mn(function(t,e){var n=x(e.startPos,2),r=n[0],n=n[1],e=x(e.endPos,2),e=x([e[0]-r,e[1]-n],2);return[r+e[0]*t,n+e[1]*t]},function(t,e){return b(b([t],x(e.startPos),!1),x(e.endPos),!1).join()}),Tw=Mn(function(t,e){var n=e.radius,r=x(e.center,2),i=r[0],r=r[1],t=ox(Ow(t,e));return[i+n*Math.cos(t),r+n*Math.sin(t)]},function(t,e){return b(b(b([t],x(e.angleRange),!1),[e.radius],!1),x(e.center),!1).join()});function Pw(t,e){return("linear"===e.type?Aw:Tw)(t,e)}function Lw(a,t,o){function e(t,e){var e=x(e,2),n=(r=x(e[0],2))[0],r=r[1],i=(e=x(e[1],2))[0],e=e[1];a.maybeAppendByClassName(t,"line").attr("className","".concat(pw.line.name," ").concat(t)).call(S,v(v({},o),{x1:n,y1:r,x2:i,y2:e}))}var n,r,i,s=t.startPos,l=t.endPos,c=t.truncRange,u=t.lineExtension,h=x([s,l],2),f=x(h[0],2),d=f[0],f=f[1],h=x(h[1],2),p=h[0],h=h[1],l=x(u?(s=x([s=s,l=l,u=void 0===(u=u)?[0,0]:u],3),u=(l=x(s[0],2))[0],l=l[1],g=(n=x(s[1],2))[0],n=n[1],y=(s=x(s[2],2))[0],s=s[1],u=(g=x([g-u,n-l],2))[0],n=g[1],l=Math.sqrt(Math.pow(u,2)+Math.pow(n,2)),y=(g=x([-y/l,s/l],2))[0],s=g[1],[y*u,y*n,s*u,s*n]):new Array(4).fill(0),4),g=l[0],y=l[1],u=l[2],s=l[3];a.node().removeChildren();c?(l=(n=x(c,2))[0],c=n[1],i=(l=x([d+(p-d)*l,f+(h-f)*l],2))[0],l=l[1],r=(c=x([d+(p-d)*c,f+(h-f)*c],2))[0],c=c[1],e(pw.lineFirst.name,[[d+g,f+y],[i,l]]),e(pw.lineSecond.name,[[r,c],[p+u,h+s]]),i=a,t.truncRange,t.truncShape,t.lineExtension,i.select(pw.lineFirst.class).node(),i.select(pw.lineSecond.class).node()):e("axis-line",[[d+g,f+y],[p+u,h+s]])}function Nw(t,e,n){var r,i,a,o,s,l,c,u,h,f,d,p,g,y=e.type;"linear"===y?Lw(t,e,n):(r=t,a=n,u=(c=x((i=e).angleRange,2))[0],c=c[1],o=(s=x(i.center,2))[0],s=s[1],i=i.radius,console.assert(u<c,"end angle should be greater than start angle"),(360==(l=c-u)?r.maybeAppendByClassName(pw.line,"circle").style("cx",o).style("cy",s).style("r",i):(d=(p=x([i,i],2))[0],p=p[1],h=(g=x([u*Math.PI/180,c*Math.PI/180],2))[0],g=g[1],f=(h=x([o+i*Math.cos(h),s+i*Math.sin(h)],2))[0],h=h[1],s=(o=x([o+i*Math.cos(g),s+i*Math.sin(g)],2))[0],i=o[1],g=180<l?1:0,o=c<u?0:1,l="M".concat(f,",").concat(h,",A").concat(d,",").concat(p,",0,").concat(g,",").concat(o,",").concat(s,",").concat(i),r.maybeAppendByClassName(pw.line,"path").style("path",l))).call(S,a)),c=t,u=y,f=n,d=(h=e).lineArrow,p=e.truncRange,g=void 0===(g=e.lineArrowOffset)?0:g,h=e.lineArrowSize,d&&(A(d=ax(d)).call(S,v({},f)),vx(d,h,!0),("arc"!==u&&p?c.select(pw.lineSecond.class):c.select(pw.line.class)).style("markerEnd",d).style("markerEndOffset",-g))}function Cw(t){var e=t.type,n=t.gridCenter;return"linear"===e?n:n||t.center}function jw(t,r){var e=r.gridLength,i=void 0===e?0:e;return t.map(function(t){var t=t.value,e=x(Pw(t,r),2),n=e[0],e=e[1],t=x(ye([0,0],_w(t,r.gridDirection,r),i),2);return{points:[[n,e],[n+t[0],e+t[1]]]}})}function Rw(t,e,n,r){var i=r.type,a=r.closed,o=r.areaFill,s=r.connect,l=Cw(n),c=mw(e,n.gridFilter),e="segment"===i?jw(c,n):function(t,o,e){var s,l,c=e.controlAngles;if(!(e=Cw(o)))throw new Error("grid center is not provide");if(t.length<2)throw new Error("Invalid grid data");if(c&&0!==c.length)return e=x(e,2),s=e[0],l=e[1],t.map(function(t){var t=x(Pw(t.value,o),2),e=t[0],t=t[1],n=x([e-s,t-l],2),r=n[0],i=n[1],a=[[e,t]];return c.forEach(function(t){var t=ox(t),t=x([Math.cos(t),Math.sin(t)],2),e=t[0],t=t[1];a.push([r*e-i*t+s,r*t+i*e+l])}),{points:a}});throw new Error("Invalid gridControlAngles")}(c,n,r);t.maybeAppendByClassName(pw.grid,function(){return new Ew({})}).update(v(v({type:i,connect:s,closed:a,center:l},r),{items:e,areaFill:en(o)?c.map(function(t,e){return hx(o,[t,e,c])}):o}))}Object.defineProperty(Iw.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(Iw.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(Iw.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(Iw.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(Iw.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(Iw.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),Iw.prototype.clear=function(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},Iw.prototype.empty=function(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},Iw.prototype.add=function(t,e){return t<this.x1&&(this.x1=t),e<this.y1&&(this.y1=e),t>this.x2&&(this.x2=t),e>this.y2&&(this.y2=e),this},Iw.prototype.rotate=function(t,e,n){t=this.rotatedPoints(t,e,n);return this.clear().add(t[0],t[1]).add(t[2],t[3]).add(t[4],t[5]).add(t[6],t[7])},Iw.prototype.rotatedPoints=function(t,e,n){var r=this.x1,i=this.y1,a=this.x2,o=this.y2,s=Math.cos(t),t=Math.sin(t),l=e-e*s+n*t,e=n-e*t-n*s;return[[s*r-t*i+l,t*r+s*i+e],[s*r-t*o+l,t*r+s*o+e],[s*a-t*o+l,t*a+s*o+e],[s*a-t*i+l,t*a+s*i+e]].flat(1)},Iw.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},Iw.prototype.intersects=function(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)},Iw.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE};var Fw=Iw;function Iw(t){var t=t||{},e=t.left,n=t.top,r=t.right,t=t.bottom;this.x1=null!=e?e:+Number.MAX_VALUE,this.x2=null!=r?r:-Number.MAX_VALUE,this.y1=null!=n?n:+Number.MAX_VALUE,this.y2=null!=t?t:-Number.MAX_VALUE}function Bw(t,c){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 t=t,n=(e=x(e=c,4))[0],r=e[1],i=e[2],e=e[3],a=(t=x(t,4))[0],o=t[1],i-=n,e-=r,s=t[2]-a,t=t[3]-o,0!=(l=i*t-s*e)&&(o=i*(i=r-o)-e*(r=n-a))<0!=(e=0<l)&&(n=s*i-t*r)<0!=e&&l<o!=e&&l<n!=e;var e,n,r,i,a,o,s,l})}function Dw(t,e,n){void 0===n&&(n=[0,0,0,0]);var r=e.getEulerAngles()||0,i=(e.setEulerAngles(0),e.getLocalBounds()),a=i.min,o=i.max,i=i.halfExtents,s=a[0],l=2*i[0],i=2*i[1],a=a[1],c=o[0],o=o[1],u=0,h=0,f=s,d=a,p=("text"===e.tagName&&(i-=1.5,p=e.style.textAlign,g=e.style.textBaseline,u=+e.style.dx,h=+e.style.dy,"center"===p?f=(s+c)/2:"right"!==p&&"end"!==p||(f=c),"middle"===g?d=(a+o)/2:"bottom"!==g&&"baseline"!==g||(d=o)),x(n,4)),c=p[0],g=void 0===c?0:c,o=p[1],n=void 0===o?0:o,c=p[2],o=p[3];return t.set((u+=s)-(void 0===o?n:o),(h+=a)-g,u+l+n,h+i+(void 0===c?g:c)),e.setEulerAngles(r),t.rotatedPoints(ox(r),f,d)}function zw(t,a){var o;return b([],x(t.reduce(function(t,e,n){return n&&o&&(n=o,r=e,i=a,n=Dw(new Fw,n,i),Bw(r=Dw(new Fw,r,i),[n[0],n[1],n[2],n[3]])||Bw(r,[n[0],n[1],n[4],n[5]])||Bw(r,[n[4],n[5],n[6],n[7]])||Bw(r,[n[2],n[3],n[6],n[7]]))?(t.add(o),t.add(e)):o=e,t;var r,i},new Set)),!1)}var Gw=function(t,e){var e=e.seq,n=void 0===e?2:e;return t.filter(function(t,e){return!(e%n&&(t.style.visibility="hidden"))})};var Ww=new Map([["hide",function(t,e,n,r){var i=t.length,a=e.keepHeader,o=e.keepTail;if(!(i<=1||2===i&&a&&o)){var s,l,c,u=Gw,h=2,f=t.slice(),d=t.slice(),p=Date.now(),g=Math.min.apply(Math,b([1],x(t.map(function(t){return t.getBBox().width})),!1));for("linear"!==n.type||0!==Sw(0,n)[1]&&0!==Sw(0,n)[0]||(n=U2(t[0]).left,t=U2(t[i-1]).right,t=Math.abs(t-n)||1,h=Math.max(Math.floor(i*g/t),h)),a&&(s=f.splice(0,1)[0]),o&&(l=f.splice(-1,1)[0],f.reverse());zw((l?b(b([l],x(d),!1),[s],!1):b([s],x(d),!1)).filter(function(t){return ix(t)}),null==e?void 0:e.margin).length;)if((l&&!s&&h%2==0||l&&s)&&f.splice(0,1).forEach(r.hide),d=u(((c=f).forEach(r.show),c),{seq:h}),h++,200<Date.now()-p)return}}],["rotate",function(t,e,n,r){function i(){return zw(t,s).length<1}function a(n){t.forEach(function(t,e){e=an(n)?n[e]:n;_(e)||r.rotate(t,e)})}var o=void 0===(l=e.optionalAngles)?[0,45,90]:l,s=e.margin,e=void 0===(l=e.recoverWhenFailed)||l,l=t.map(function(t){return+(lx(t,"rotate")||0)});if(!i()){for(var c=0;c<o.length;c++)if(a(o[c]),i())return;e&&a(l)}}],["ellipsis",function(t,e,n,r){if(!(t.length<=1))for(var i,a,o=void 0===(s=e.suffix)?"...":s,s=e.minLength,l=e.maxLength,c=e.step,u=void 0===(e=e.margin)?[0,0,0,0]:e,e=(e=t[0],d=e.style.fontFamily||"sans-serif",y=e.style.fontWeight||"normal",i=e.style.fontStyle||"normal",a=e.style.fontVariant,{fontSize:"object"==typeof(e=e.style.fontSize)?e.value:e,fontFamily:d,fontWeight:y,fontStyle:i,fontVariant:a}),h=T2(c,e)||1,f=T2(s,e)||1,d=T2(l,e),p=(!_(d)&&d!==1/0||(d=Math.max.apply(null,t.map(function(t){return t.getBBox().width}))),Date.now()),g=t.slice(),y=x(u,4),m=(y[0],y[1],y[2],y[3],d);f+h<m;m-=h){var v=function(e){return g.forEach(function(t){r.ellipsis(t,e,o)}),(g=zw(t,u)).length<1||300<Date.now()-p?{value:void 0}:void 0}(m);if("object"==typeof v)return v.value}}]]);function Vw(i,a,o){var t=a.labelTransforms,t=void 0===t?[]:t;t.length&&t.forEach(function(t){var e,n=t.type,r=Ww.get(n);e=i,n=n,a.labelTransforms&&("ellipsis"!==n||1<e.map(function(t){return t.querySelector("text")}).length)&&null!=r&&r(i,t,a,o)})}function Yw(t){for(var e=t;e<0;)e+=360;return e%360}var Hw=Mn(function(t,e){var t=x(t,2),n=t[0],t=t[1],e=x(e,2),r=e[0],e=e[1],n=x([n*r+t*e,n*e-t*r],2),e=n[0],t=n[1];return Math.atan2(t,e)},function(t,e){return b(b([],x(t),!1),x(e),!1).join()});function qw(t,e){return _w(t,e.labelDirection,e)}function Uw(t,e,n){var r,i=n.labelAlign,e=lx(e,"rotate");return e?+e%180:(e=0,r=qw(t.value,n),t=Sw(t.value,n),"horizontal"===i?0:(e="perpendicular"===i?Hw([1,0],r):Hw([t[0]<0?-1:1,0],t),ux(n=((n=sx(e))+360)%180,-90,90)||(n+=180),n))}function Xw(t,e,n){e.setLocalEulerAngles(+t);t=function(t,e,n){var r=n.type,i=n.labelAlign,t=qw(t,n),n=Yw(e),e=Yw(sx(Hw([1,0],t)));if([90,270].includes(e)&&!n)return"middle";if(!(e%180)&&[90,270].includes(n))return"middle";if("linear"!==r)return"parallel"===i?"middle":ux(n,90,270)?ux(e,90,270)?"start":"end":ux(e,90,270)?"end":"start";if(0===e){if(ux(n,0,90,!1,!0))return"start";if(ux(n,0,90)||ux(n,270,360))return"start"}if(90===e){if(ux(n,0,90,!1,!0))return"start";if(ux(n,90,180)||ux(n,270,360))return"end"}if(270===e){if(ux(n,0,90,!1,!0))return"end";if(ux(n,90,180)||ux(n,270,360))return"start"}if(180===e){if(90===n)return"start";if(ux(n,0,90)||ux(n,270,360))return"end"}return"start"}(e.__data__.value,t,n),n=e.querySelector(".axis-label-item");"text"===(null==n?void 0:n.nodeName)&&A(n).style("textAlign",t)}function $w(t,e,n,r){var i=r.showTick,a=r.tickLength,o=r.tickDirection,s=r.labelDirection,l=hx(r.labelSpacing,[t,e,n]),s=x([qw(t.value,r),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)}(s,o)],2),o=x(de([0,0],ye([0,0],s[0],l+(1===s[1]?hx(i?a:0,[t,e,n]):0)),Pw(t.value,r)),2);return{x:o[0],y:o[1]}}function Kw(t,e,n,r,i){var a=i.labelFormatter,o=qw(e.value,i),i=function(){return ax(e.label||"")};return fn(a)?i=function(){return ax(a)}:en(a)&&(i=function(){return ax(hx(a,[e,n,r,o]))}),t.append(i).attr("className",pw.labelItem.name)}function Zw(t,e,n,r,i,a){var o=null==(o=r.getElementsByClassName(pw.labelItem.toString()))?void 0:o[0],a=x(z2(yw(a,[t,e,n])),2),s=a[0],a=a[1],l=a.transform,a=J(a,["transform"]);"text"===(null==o?void 0:o.nodeName)&&A(o).call(S,v({fontSize:12,fontFamily:"sans-serif",fontWeight:"normal",textBaseline:"middle"},s)),r.attr(v(v({},$w(t,e,n,i)),a)),cx(r,l),Xw(Uw(t,r,i),r,i)}function Jw(n){Vw(this.node().childNodes,n,{hide:function(t){t.style.visibility="hidden"},show:function(t){t.style.visibility="visible"},rotate:function(t,e){Xw(+e,t,n)},ellipsis:function(t,e,n){null!=(t=t.querySelector("text"))&&t.attr("wordWrap",!0).attr("wordWrapWidth",e).attr("maxLines",1).attr("textOverflow",n)}})}function Qw(t,e){return _w(t,e.tickDirection,e)}var tk=Mn(function(t,e){t=x(t,2);return[[0,0],[t[0]*e,t[1]*e]]},function(t,e){return b(b([],x(t),!1),[e],!1).join()});function ek(t,e,n,r,i){var a=i.tickFormatter,o=Qw(e.value,i),i="line";return a instanceof N?i=function(){return a}:en(a)&&(i=function(){return hx(a,[e,n,r,o])}),t.append(i).attr("className",pw.tickItem.name)}function nk(t,e,n,r,i,a,o){var s=Qw(t.value,a),l=(u=t,h=e,f=n,s=s,l=(a=a).tickLength,c=(a=x(Pw(u.value,a),2))[0],a=a[1],s=x(tk(s,hx(l,[u,h,f])),2),u=(l=x(s[0],2))[0],h=l[1],f=x(s[1],2),{x:c,y:a,x1:u,x2:f[0],y1:h,y2:f[1]}),s=l.x1,c=l.x2,a=l.y1,u=l.y2,h=l.x,f=l.y,l=x(z2(yw(o,[t,e,n])),2),o=l[0],t=l[1];"line"===r.node().nodeName&&r.call(S,v({x1:s,x2:c,y1:a,y2:u},o)),i.attr(v({x:h,y:f},t)),S(r,o)}var rk={text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"left-top"},ik=gx({text:"text"},"title");function ak(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(t){return t[0]}).join(""):2<t.length?t[0]:t}function ok(t,e){var n,r;try{for(var i=Se(Object.entries(e)),a=i.next();!a.done;a=i.next()){var o=x(a.value,2),s=o[0],l=o[1];t.node().attr(s)||t.style(s,l)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}Me(ck,sk=o),ck.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,n=t.height,r=t.position,i=t.spacing,t=t.inset,a=this.querySelector(ik.text.class);if(!a)return{x:0,y:0,width:+e,height:+n};var a=a.getBBox().height,i=x(N2(i),3),o=i[0],i=i[2],s=x([0,+n-a],2),l=s[0],s=s[1],r=ak(r);if("i"===r)return{x:0,y:l,width:+e,height:+n};r.includes("t")&&(l=(o=x([a+o,+n-a-o],2))[0],s=o[1]),r.includes("b")&&(s=x([+n-a-i],1)[0]);o=x(N2(t),4),r=o[0],n=o[1],a=o[2],i=o[3],t=x([i+n,r+a],2);return{x:i,y:l+r,width:+e-t[0],height:s-t[1]}},ck.prototype.render=function(t,e){t.width,t.height,t.position,t.spacing,t.class;var n,r,i,a=J(t,["width","height","position","spacing","class"]),o=x(z2(a),2),s=o[0],t=(o[1],t=(o=t).width,l=o.height,o=o.position,n=x([+t/2,+l/2],2),u=(n=x([+n[0],+n[1],"center","middle"],4))[0],r=n[1],i=n[2],n=n[3],(o=ak(o)).includes("l")&&(u=(c=x([0,"start"],2))[0],i=c[1]),o.includes("r")&&(u=(c=x([+t,"end"],2))[0],i=c[1]),o.includes("t")&&(r=(t=x([0,"top"],2))[0],n=t[1]),o.includes("b")&&(r=(c=x([+l,"bottom"],2))[0],n=c[1]),{x:u,y:r,textAlign:i,textBaseline:n}),o=t.x,l=t.y,c=t.textAlign,u=t.textBaseline;a.text?A(e).maybeAppendByClassName(ik.text,"text").call(S,s).call(ok,{x:o,y:l,textAlign:c,textBaseline:u}):e.removeChildren()};var sk,lk=ck;function ck(t){return sk.call(this,K2({},{style:rk},t=void 0===t?{}:t))||this}function uk(t,e,n){var r,i,a,o,s,t=t.select(pw.mainGroup.class);return t=t,e=e,r=(n=n).titlePosition,n=void 0===(n=n.titleSpacing)?0:n,r=ak(void 0===r?"lb":r),i=(a=t.node().getBBox()).x,a=a.y,o=(t=x(t.node().getBounds().halfExtents,2))[0],t=t[1],s=(e=x(e.node().getBounds().halfExtents,2))[0],e=e[1],i=x([i+o,a+t],2),i=(a=x([i[0],i[1]],2))[0],a=a[1],r.includes("l")&&(i-=o+s+n),r.includes("r")&&(i+=o+s+n),r.includes("t")&&(a-=t+e+n),r.includes("b")&&(a+=t+e+n),{x:i,y:a}}function hk(t,e,n,r){var i,a,o,s;n.title&&(a=(t=x((t=t,i=(a=n).title,a=t.maybeAppendByClassName(pw.title,function(){return ax(i)}),[t,a]),2))[0],t=t[1],a=a,e=e,n=n,o=(r=x(z2(r=r),2))[0],r=r[1],s=void 0===(s=r.transform)?"":s,r=J(r,["transform"]),t.call(S,o),e=(o=uk(e,a,n)).x,n=o.y,a.node().attr(r),a.node().setPosition(e,n),cx(t,s))}var fk,dk=px({render:function(n,e){var t=yx(n),r=t.type,i=t.data,a=(t.class,t.dataThreshold),a=void 0===a?100:a,o=(t.crossSize,t.animation,t.title,t.showTitle),s=(t.titleSpacing,t.truncRange),l=(t.truncShape,t.showLine),c=(t.lineExtension,t.lineArrow,t.lineArrowOffset,t.lineArrowSize,t.showTick),u=(t.tickDirection,t.tickLength,t.tickFilter,t.tickFormatter,t.showLabel),h=(t.labelAlign,t.labelDirection,t.labelSpacing,t.labelFilter,t.labelFormatter,t.labelTransforms,t.showGrid),t=(t.gridFilter,t.gridLength,J(t,["type","data","class","dataThreshold","crossSize","animation","title","showTitle","titleSpacing","truncRange","truncShape","showLine","lineExtension","lineArrow","lineArrowOffset","lineArrowSize","showTick","tickDirection","tickLength","tickFilter","tickFormatter","showLabel","labelAlign","labelDirection","labelSpacing","labelFilter","labelFormatter","labelTransforms","showGrid","gridFilter","gridLength"])),r=x(B2("linear"===r?(t.startPos,t.endPos,J(t,["startPos","endPos"])):(t.angleRange,t.radius,t.center,J(t,["angleRange","radius","center"])),["title","line","tick","label","grid"]),5),f=r[0],d=r[1],p=r[2],g=r[3],y=r[4],m=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}(i,a).filter(function(t){t=t.value;return!(s&&t>s[0]&&t<s[1])}),t=(fx(h,A(e).maybeAppendByClassName(pw.gridGroup,"g"),function(t){Rw(t,m,n,y)}),A(e).maybeAppendByClassName(pw.mainGroup,"g")),r=(fx(l,t.maybeAppendByClassName(pw.lineGroup,"g"),function(t){Nw(t,n,d)}),t.maybeAppendByClassName(pw.tickGroup,"g")),i=(fx(c,r,function(t){var r,i,a;t=t,i=p,a=mw(m,(r=n).tickFilter),t.selectAll(".axis-tick").data(a).join(function(t){return t.append("g").attr("className",pw.tick.name).each(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=ek.apply(void 0,b(b([A(this)],x(t),!1),[a,r],!1));nk.apply(void 0,b(b([],x(t),!1),[a,n,this,r,i],!1))})},function(t){return t.each(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.removeChildren();var n=ek.apply(void 0,b(b([A(this)],x(t),!1),[a,r],!1));nk.apply(void 0,b(b([],x(t),!1),[a,n,this,r,i],!1))})},function(t){return t.remove()})}),t.maybeAppendByClassName(pw.labelGroup,"g")),a=(fx(u,i,function(t){var e,r,i,a;e=t,i=g,a=mw(m,(r=n).labelFilter),e.selectAll(pw.label.class).data(a).join(function(t){return t.append("g").attr("className",pw.label.name).each(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];Kw.apply(void 0,b(b([A(this)],x(t),!1),[a,r],!1)),Zw.apply(void 0,b(b([],x(t),!1),[a,this,r,i],!1))}).call(function(){Jw.call(e,r)})},function(t){return t.each(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=A(this);n.node().removeChildren(),Kw.apply(void 0,b(b([n],x(t),!1),[a,r],!1)),Zw.apply(void 0,b(b([],x(t),!1),[a,this,r,i],!1))}).call(function(){Jw.call(e,r)})},function(t){return t.remove()})}),A(e).maybeAppendByClassName(pw.titleGroup,"g"));fx(o,a,function(t){hk(t,A(e),n,f)})}},v({},dw.style)),pk={effect:"linear",duration:200,orient:"horizontal",initPage:0,loop:!1,buttonPath:[["M",(vo=0)-(dl=6),(r=0)-dl],["L",vo+dl,r],["L",vo-dl,r+dl],["Z"]],buttonFill:"black",buttonSize:12,buttonCursor:"pointer",formatter:function(t,e){return"".concat(t,"/").concat(e)},pageNumFontSize:12,pageNumFill:"black",pageNumTextAlign:"start",pageNumTextBaseline:"middle",controllerPadding:5,controllerSpacing:5},gk=gx({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"),yk=(Me(mk,fk=o),Object.defineProperty(mk.prototype,"defaultPage",{get:function(){var t=this.attributes.initPage;return dn(void 0===t?0:t,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(mk.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(mk.prototype,"pageShape",{get:function(){var n,t=this.pageViews,t=x((n=t.map(function(t){t=t.getBBox();return[t.width,t.height]}),((null==(t=n[0])?void 0:t.map(function(t,e){return n.map(function(t){return t[e]})}))||[]).map(function(t){return Math.max.apply(Math,b([],x(t),!1))})),2),e=t[0],t=t[1],r=this.attributes,i=r.pageWidth,r=r.pageHeight;return{pageWidth:void 0===i?e:i,pageHeight:void 0===r?t:r}},enumerable:!1,configurable:!0}),mk.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(mk.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),Object.defineProperty(mk.prototype,"finished",{get:function(){var t,e=this;return this.finishedPromise||(this.finishedPromise=new Promise(function(t){e.resolveFinishedPromise=function(){e.finishedPromise=null,t(e.currPage)}})),"idle"===this.playState&&null!=(t=this.resolveFinishedPromise)&&t.call(this),this.finishedPromise},enumerable:!1,configurable:!0}),mk.prototype.goTo=function(e){var n=this,t=this.attributes,r=t.duration,t=t.effect,i=this.currPage,a=this.playState,o=(this.finished,this.playWindow),s=this.pageViews;return"idle"!==a||e<0||s.length<=0||e>=s.length||(s[i].setLocalPosition(0,0),this.prepareFollowingPage(e),a={duration:r,easing:t,fill:"both"},i=(s=x(this.getFollowingPageDiff(e),2))[0],r=s[1],this.playState="running",Promise.all([o.animate([{transform:"translate(0, 0)"},{transform:"translate(".concat(-i,", ").concat(-r,")")}],a)].map(function(t){return null==t?void 0:t.finished})).then(function(){var t;n.innerCurrPage=e,n.playState="idle",n.setVisiblePages([e]),n.updatePageInfo(),null!=(t=n.resolveFinishedPromise)&&t.call(n)})),{finished:this.finished}},mk.prototype.prev=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;return!t&&n<=0?{finished:this.finished}:(t=t?(n-1+e)%e:dn(n-1,0,e),this.goTo(t))},mk.prototype.next=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;return!t&&e-1<=n?{finished:this.finished}:(t=t?(n+1)%e:dn(n+1,0,e),this.goTo(t))},mk.prototype.renderClipPath=function(t){var e=this.pageShape,n=e.pageWidth,e=e.pageHeight;this.clipPath=t.maybeAppendByClassName(gk.clipPath,"rect").style("width",n).style("height",e),this.contentGroup.attr("clipPath",this.clipPath.node())},mk.prototype.setVisiblePages=function(n){this.playWindow.children.forEach(function(t,e){n.includes(e)?t.attr("visibility","visible"):t.attr("visibility","hidden")})},mk.prototype.adjustControllerLayout=function(){var t=this.prevBtnGroup,e=this.nextBtnGroup,n=this.pageInfoGroup,r=this.attributes,i=r.orient,r=r.controllerPadding,a=n.getBBox(),o=a.width,a=(a.height,x("horizontal"===i?[-180,0]:[-90,90],2)),s=a[0],a=a[1],s=(t.setLocalEulerAngles(s),e.setLocalEulerAngles(a),t.getBBox()),a=s.width,s=s.height,l=e.getBBox(),c=l.width,l=l.height,c=Math.max(a,o,c),i="horizontal"===i?{offset:[[0,0],[a/2+r,0],[a+o+2*r,0]],textAlign:"start"}:{offset:[[c/2,-s-r],[c/2,0],[c/2,l+r]],textAlign:"center"},a=x(i.offset,3),o=x(a[0],2),s=o[0],c=o[1],l=x(a[1],2),r=l[0],o=l[1],l=x(a[2],2),a=l[0],l=l[1],i=i.textAlign,u=n.querySelector("text");u&&(u.style.textAlign=i),t.setLocalPosition(s,c),n.setLocalPosition(r,o),e.setLocalPosition(a,l)},mk.prototype.updatePageInfo=function(){var t,e=this.currPage,n=this.pageViews,r=this.attributes.formatter;n.length<2||(null!=(t=this.pageInfoGroup.querySelector(gk.pageInfo.class))&&t.attr("text",r(e+1,n.length)),this.adjustControllerLayout())},mk.prototype.getFollowingPageDiff=function(t){var e,n,r,i=this.currPage;return i===t?[0,0]:(e=this.attributes.orient,n=(r=this.pageShape).pageWidth,r=r.pageHeight,t=t<i?-1:1,"horizontal"===e?[t*n,0]:[0,t*r])},mk.prototype.prepareFollowingPage=function(t){var e,n=this.currPage,r=this.pageViews;this.setVisiblePages([t,n]),t!==n&&(e=(n=x(this.getFollowingPageDiff(t),2))[0],n=n[1],r[t].setLocalPosition(e,n))},mk.prototype.renderController=function(t){var e,n,r,i,a,o=this,s=this.attributes.controllerSpacing,l=this.pageShape,c=l.pageWidth,l=l.pageHeight,u=2<=this.pageViews.length,t=t.maybeAppendByClassName(gk.controller,"g").style("visibility",u?"visible":"hidden");u&&(i=(u=x(B2(this.attributes,["button","pageNum"]),2))[0],u=u[1],r=(i=x(z2(i),2))[0],i=i[1],e=r.size,n=J(r,["size"]),r=t.maybeAppendByClassName(gk.prevBtnGroup,"g").call(S,i),this.prevBtnGroup=r.node(),a=r.maybeAppendByClassName(gk.prevBtn,"path"),i=t.maybeAppendByClassName(gk.nextBtnGroup,"g").call(S,i),this.nextBtnGroup=i.node(),[a,i.maybeAppendByClassName(gk.nextBtn,"path")].forEach(function(t){t.node().attr(v(v({},n),{transformOrigin:"center"})),vx(t.node(),e,!0)}),a=t.maybeAppendByClassName(gk.pageInfoGroup,"g"),this.pageInfoGroup=a.node(),a.maybeAppendByClassName(gk.pageInfo,"text").call(S,v(v({},j2),u)),this.updatePageInfo(),t.node().setLocalPosition(c+s,l/2),r.on("click",function(){o.prev()}),i.on("click",function(){o.next()}))},mk.prototype.render=function(t,e){e=A(e);this.renderClipPath(e),this.renderController(e),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},mk.prototype.bindEvents=function(){function t(){var t=this,e=arguments,n=a&&!o;clearTimeout(o),o=setTimeout(function(){o=null,a||r.apply(t,e)},i),n&&r.apply(t,e)}var r,i,a,o,e=this;r=function(){return e.render(e.attributes,e)},i=50;this.playWindow.addEventListener(y.INSERTED,t),this.playWindow.addEventListener(y.REMOVED,t)},mk);function mk(t){t=fk.call(this,K2({},{style:pk},t))||this;return t.finishedPromise=null,t.resolveFinishedPromise=null,t.playState="idle",t.contentGroup=t.appendChild(new Yo({class:gk.contentGroup.name})),t.playWindow=t.contentGroup.appendChild(new Yo({class:gk.playWindow.name})),t.innerCurrPage=t.defaultPage,t}function vk(t,e,n){return"horizontal"===(t=void 0===t?"horizontal":t)?e:n}_x.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"]]}),_x.registerSymbol("verticalHandle",function(t,e,n){var r=1.4*n,i=n/2,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+(n=n/6)],["L",t+r-2,e+n],["M",a,e-n],["L",t+r-2,e-n]]}),_x.registerSymbol("horizontalHandle",function(t,e,n){var r=1.4*n,i=n/2,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-(n=n/6),a],["L",t-n,e+r-2],["M",t+n,a],["L",t+n,e+r-2]]});var bk,xk=gx({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"),wk={span:[1,1],marker:"path",markerD:kx(6,6,6),markerFill:"#d3d2d3",markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelFontFamily:"sans-serif",valueFontFamily:"sans-serif",labelTextAlign:"start",valueTextAlign:"start",labelTextBaseline:"middle",valueTextBaseline:"middle"},kk=(Me(Ek,bk=o),Object.defineProperty(Ek.prototype,"showValue",{get:function(){var t=this.attributes.value;return!!t&&(fn(t)||pn(t)?""!==t:""!==t.attr("text"))},enumerable:!1,configurable:!0}),Object.defineProperty(Ek.prototype,"actualSpace",{get:function(){var t=this.markerGroup,e=this.labelGroup,n=this.valueGroup,t=t.node().getBBox(),r=t.width,t=t.height,e=e.node().getBBox(),i=e.width,e=e.height,n=n.node().getBBox(),a=n.width,n=n.height;return{markerWidth:r,labelWidth:i,valueWidth:a,height:Math.max(t,e,n)}},enumerable:!1,configurable:!0}),Object.defineProperty(Ek.prototype,"span",{get:function(){var t,e=this.attributes;return"span"in e?(t=(e=x(N2(e.span),2))[0],e=e[1],[t/(e=t+(t=this.showValue?e:0)),t/e]):[1,1]},enumerable:!1,configurable:!0}),Object.defineProperty(Ek.prototype,"shape",{get:function(){var t=this.attributes,e=t.markerSize,t=t.width,n=this.actualSpace,r=n.markerWidth,n=n.height,i=this.actualSpace,a=i.labelWidth,i=i.valueWidth,o=x(this.spacing,2),s=o[0],o=o[1];return t&&(t=t-e-s-o,e=x(this.span,2),a=(e=x([e[0]*t,e[1]*t],2))[0],i=e[1]),{width:r+a+i+s+o,height:n,markerWidth:r,labelWidth:a,valueWidth:i}},enumerable:!1,configurable:!0}),Object.defineProperty(Ek.prototype,"spacing",{get:function(){var t,e=this.attributes.spacing;return e?(t=(e=x(N2(e),2))[0],e=e[1],this.showValue?[t,e]:[t,0]):[0,0]},enumerable:!1,configurable:!0}),Object.defineProperty(Ek.prototype,"layout",{get:function(){var t=this.shape,e=t.markerWidth,n=t.labelWidth,r=t.valueWidth,i=t.width,t=t.height,a=x(this.spacing,2),o=a[0];return{height:t,width:i,markerWidth:e,labelWidth:n,valueWidth:r,position:[e/2,e+o,e+n+o+a[1]]}},enumerable:!1,configurable:!0}),Ek.prototype.renderMarker=function(t){var e=this,n=this.attributes,r=n.marker,i=n.markerSize,a=I2(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(xk.markerGroup,"g"),fx(!!r,this.markerGroup,function(){e.markerGroup.maybeAppendByClassName(xk.marker,r).call(S,v({anchor:"0.5 0.5"},a)),vx(e.markerGroup.node(),i,!0)})},Ek.prototype.renderLabel=function(t){var e=this.attributes.label,n=I2(this.attributes,"label");this.labelGroup=t.maybeAppendByClassName(xk.labelGroup,"g"),this.labelGroup.maybeAppendByClassName(xk.label,function(){return ax(e)}).call(S,n)},Ek.prototype.renderValue=function(t){var e=this,n=this.attributes.value,r=I2(this.attributes,"value");this.valueGroup=t.maybeAppendByClassName(xk.valueGroup,"g"),fx(this.showValue,this.valueGroup,function(){e.valueGroup.maybeAppendByClassName(xk.value,function(){return ax(n)}).call(S,r)})},Ek.prototype.renderBackground=function(t){var e=this.shape,n=e.width,e=e.height,r=I2(this.attributes,"background");this.background=t.maybeAppendByClassName(xk.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(xk.background,"rect").call(S,v({width:n,height:e},r))},Ek.prototype.adjustLayout=function(){var t=this.layout,e=(t.markerWidth,t.labelWidth),n=t.valueWidth,r=(t.width,t.height),t=x(t.position,3),i=t[0],a=t[1],t=t[2],r=r/2;this.markerGroup.call(S,{x:i,y:r}),this.labelGroup.call(S,{x:a,y:r}),mx(this.labelGroup.select(xk.label.class),e),this.showValue&&(this.valueGroup.call(S,{x:t,y:r}),mx(this.valueGroup.select(xk.value.class),n))},Ek.prototype.render=function(t,e){e=A(e);this.renderMarker(e),this.renderLabel(e),this.renderValue(e),this.renderBackground(e),this.adjustLayout()},Ek);function Ek(t){return bk.call(this,K2({},{style:wk},t))||this}function Mk(t,e,n){return void 0===n&&(n=!0),t?e(t):n}var Ok,Sk=gx({page:"item-page",navigator:"navigator",item:"item"},"items"),_k={data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orient:"horizontal",click:Tn,mouseenter:Tn,mouseleave:Tn},Ak=(Me(Tk,Ok=o),Object.defineProperty(Tk.prototype,"attrs",{get:function(){return yx(this.attributes)},enumerable:!1,configurable:!0}),Object.defineProperty(Tk.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(Tk.prototype,"grid",{get:function(){var t=this.attrs,e=t.gridRow,n=t.gridCol,t=t.data;if(e||n)return e&&n?[e,n]:e?[e,t.length]:[t.length,n];throw new Error("gridRow and gridCol can not be set null at the same time")},enumerable:!1,configurable:!0}),Object.defineProperty(Tk.prototype,"renderData",{get:function(){var t=this.attrs,a=t.data,o=t.layout,s=I2(this.attrs,"item");return a.map(function(e,n){var t=e.id,r=e.label,i=e.value;return{id:"".concat(void 0===t?n:t),index:n,style:v({layout:o,label:r,value:i},Object.fromEntries(Object.entries(s).map(function(t){t=x(t,2);return[t[0],hx(t[1],[e,n,a])]})))}})},enumerable:!1,configurable:!0}),Tk.prototype.getGridLayout=function(){var u=this,t=this.attrs,h=t.orient,f=t.width,d=t.rowPadding,p=t.colPadding,g=x(this.navigatorShape,1)[0],t=x(this.grid,2),y=t[0],m=t[1],v=m*y,b=0;return this.pageViews.children.map(function(t,e){var n,r=Math.floor(e/v),i=e%v,a=u.ifHorizontal(m,y),a=[Math.floor(i/a),i%a],a=("vertical"===h&&a.reverse(),x(a,2)),o=a[0],a=a[1],s=(f-g-(m-1)*p)/m,t=t.getBBox().height,l=x([0,0],2),c=l[0],l=l[1];return b="horizontal"===h?(c=(n=x([b,o*(t+d)],2))[0],l=n[1],a===m-1?0:b+s+p):(c=(n=x([a*(s+p),b],2))[0],l=n[1],o===y-1?0:b+t+d),{page:r,index:e,row:o,col:a,pageIndex:i,width:s,height:t,x:c,y:l}})},Tk.prototype.getFlexLayout=function(){var t=this.attrs,e=t.width,n=t.height,a=t.rowPadding,o=t.colPadding,t=x(this.navigatorShape,1)[0],r=x(this.grid,2),s=r[0],l=r[1],r=x([e-t,n],2),c=r[0],u=r[1],e=x([0,0,0,0,0,0,0,0],8),h=e[0],f=e[1],d=e[2],p=e[3],g=e[4],y=e[5],m=e[6],v=e[7];return this.pageViews.children.map(function(t,e){var t=t.getBBox(),n=t.width,t=t.height,r=0===m?0:o,i=m+r+n;return i<=c&&Mk(g,function(t){return t<l})?(r=x([m+r,v,i],3),h=r[0],f=r[1],m=r[2]):(i=x([y+1,0,0,v+t+a],4),y=i[0],g=i[1],m=i[2],(v=i[3])+a+t<=u&&Mk(y,function(t){return t<s})?(r=x([m,v,n],3),h=r[0],f=r[1],m=r[2]):(i=x([0,0,n,0,d+1,0,0,0],8),h=i[0],f=i[1],m=i[2],v=i[3],d=i[4],p=i[5],y=i[6],g=i[7])),{width:n,height:t,x:h,y:f,page:d,index:e,pageIndex:p++,row:y,col:g++}})},Object.defineProperty(Tk.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var t="grid"===this.attributes.layout?this.getGridLayout:this.getFlexLayout,e=t.call(this);return 0<e.slice(-1)[0].page?(this.navigatorShape=[55,0],t.call(this)):e},enumerable:!1,configurable:!0}),Tk.prototype.ifHorizontal=function(t,e){return vk(this.attrs.orient,t,e)},Tk.prototype.flattenPage=function(e){e.querySelectorAll(Sk.item.class).forEach(function(t){e.appendChild(t)}),e.querySelectorAll(Sk.page.class).forEach(function(t){e.removeChild(t).destroy()})},Tk.prototype.renderItems=function(t){var e=this.attrs,n=e.click,r=e.mouseenter,i=e.mouseleave,a=(this.flattenPage(t),this.dispatchCustomEvent.bind(this));A(t).selectAll(Sk.item.class).data(this.renderData,function(t){return t.id}).join(function(t){return t.append(function(t){t=t.style;return new kk({style:t})}).attr("className",Sk.item.name).on("click",function(){null!=n&&n(this),a("itemClick",{item:this})}).on("mouseenter",function(){null!=r&&r(this),a("itemMouseenter",{item:this})}).on("mouseleave",function(){null!=i&&i(this),a("itemMouseleave",{item:this})})},function(t){return t.each(function(t){t=t.style;this.update(t)})},function(t){return t.remove()})},Tk.prototype.relayoutNavigator=function(){var t=this.attrs,e=t.layout,t=t.width,n=(null==(n=this.pageViews.children[0])?void 0:n.getBBox().height)||0,r=x(this.navigatorShape,2),i=r[0],r=r[1];this.navigator.update(v({},"grid"===e?{pageWidth:t-i,pageHeight:n-r}:{}))},Tk.prototype.adjustLayout=function(){var n,e=this,t=Object.entries((t=this.itemsLayout,n="page",t.reduce(function(t,e){return(t[e[n]]=t[e[n]]||[]).push(e),t},{}))).map(function(t){t=x(t,2);return{page:t[0],layouts:t[1]}}),u=b([],x(this.navigator.getContainer().children),!1);t.forEach(function(t){var t=t.layouts,c=e.pageViews.appendChild(new Yo({className:Sk.page.name}));t.forEach(function(t){var n,r,i,e=t.x,a=t.y,o=t.index,s=t.width,l=t.height,o=u[o];c.appendChild(o),n=t,r=o,(i=fn(t="__layout__")?t.split("."):t).forEach(function(t,e){e<i.length-1?(on(r[t])||(r[t]=pn(i[e+1])?[]:{}),r=r[t]):r[t]=n}),o.update({x:e,y:a,width:s,height:l})})}),this.relayoutNavigator()},Tk.prototype.renderNavigator=function(t){var e=this.attrs.orient,n=I2(this.attrs,"nav"),n=v(v({},n),{orient:e});return this.navigator=t.maybeAppendByClassName(Sk.navigator,function(){return new yk({})}).update(n).node(),this.navigator},Tk.prototype.render=function(t,e){var n=this.attributes.data;n&&0!==n.length&&(n=this.renderNavigator(A(e)),this.renderItems(n.getContainer()),this.adjustLayout())},Tk.prototype.dispatchCustomEvent=function(t,e){t=new mo(t,{detail:e});this.dispatchEvent(t)},Tk);function Tk(t){t=Ok.call(this,K2({},{style:_k},t))||this;return t.navigatorShape=[0,0],t}var Pk,to={style:{padding:0,orient:"horizontal",backgroundFill:"transparent",titleText:"",showTitle:!0,titleSpacing:4,titlePosition:"left-top",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12}},Lk=Pn({},to,{style:{type:"category",items:[],maxCols:void 0,maxRows:void 0,spacing:[8,2],itemBackground:{padding:0,style:{fill:"transparent",active:{cursor:"pointer"}}},reverse:!1}}),Nk=Pn({},to,{style:{type:"continuous",color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],slidable:!0,showHandle:!0,showLabel:!0,showIndicator:!0,labelSpacing:5,indicatorLabelFill:"white",indicatorLabelFontSize:12,indicatorBackgroundFill:"#262626"}}),Ck=gx({title:"title",titleGroup:"title-group",items:"items",itemsGroup:"items-group",contentGroup:"content-group",ribbonGroup:"ribbon-group",ribbon:"ribbon",handlesGroup:"handles-group",startHandle:"start-handle",endHandle:"end-handle",labelGroup:"label-group",label:"label",indicator:"indicator"},"legend"),jk=(Me(Rk,Pk=o),Rk.prototype.renderTitle=function(t,n,r){var e=this.attributes.showTitle,i=x(z2(I2(this.attributes,"title")),2),a=i[0],i=i[1];this.titleGroup=t.maybeAppendByClassName(Ck.titleGroup,"g").call(S,i),fx(!!e,this.titleGroup,function(t){var e=v({width:n,height:r},a);t.maybeAppendByClassName(Ck.title,function(){return new lk({style:e})}).update(e)})},Rk.prototype.renderItems=function(t,e,n){var r=this,i=x(B2(this.attributes,["title"]),2),i=x(z2(i[1]),2),a=i[0],i=i[1],a=v(v({},a),{width:e,height:n});this.itemsGroup=t.maybeAppendByClassName(Ck.itemsGroup,"g").call(S,i),this.itemsGroup.maybeAppendByClassName(Ck.items,function(){return new Ak({style:{data:[]}})}).update(a),Object.entries(a).forEach(function(t){var t=x(t,2),e=t[0],t=t[1];return r.itemsGroup.attr(e,t)})},Rk.prototype.adjustLayout=function(){var t,e;this.attributes.showTitle&&(t=(e=this.titleGroup.select(Ck.title.class).node().getAvailableSpace()).x,e=e.y,this.itemsGroup.node().setLocalPosition(t,e))},Object.defineProperty(Rk.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.showTitle,n=t.width,t=t.height;return e?[(e=this.titleGroup.select(Ck.title.class).node().getAvailableSpace()).width,e.height]:[n,t]},enumerable:!1,configurable:!0}),Rk.prototype.render=function(t,e){var n=t.width,t=t.height,e=A(e);this.renderTitle(e,n,t),this.renderItems.apply(this,b([e],x(this.availableSpace),!1)),this.adjustLayout()},Rk);function Rk(t){return Pk.call(this,K2({},Lk,t))||this}var Fk,Ik={formatter:function(t){return t},padding:[2,4],position:"right",labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",backgroundZIndex:-1,backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333"},Bk=gx({background:"background",labelGroup:"label-group",label:"label"},"indicator"),Dk=(Me(zk,Fk=o),zk.prototype.renderBackground=function(){var t=this.style,e=t.position,t=x(N2(t.padding),4),n=t[0],r=t[1],i=t[2],t=t[3],a=this.label.node().getLocalBounds(),o=a.min,a=a.max,t=[[o[0]-t,o[1]-n],[a[0]+r,a[1]+i]],o=this.getPath(e,t),n=I2(this.attributes,"background");this.background=A(this.group).maybeAppendByClassName(Bk.background,"path").call(S,n).style("path",o),this.group.appendChild(this.label.node())},zk.prototype.renderLabel=function(){var t=this.attributes,e=t.value,n=t.formatter,t=x(z2(I2(this.attributes,"label")),2),r=t[0],t=t[1];this.label=A(this.group).maybeAppendByClassName(Bk.labelGroup,"g").call(S,t),e&&this.label.maybeAppendByClassName(Bk.label,function(){return ax(n(e))}).style("text",n(e).toString()).selectAll("text").call(S,v(v({},j2),r))},zk.prototype.adjustLayout=function(){var t=x(this.point,2),e=t[0],t=t[1];this.group.attr("x",-e).attr("y",-t)},zk.prototype.getPath=function(n,t){var r=this,t=x(t,2),e=x(t[0],2),i=e[0],e=e[1],t=x(t[1],2),a=t[0],t=t[1],o={top:"bottom",right:"left",bottom:"top",left:"right"},a=Object.entries({top:[[i,e],[a,e]],right:[[a,e],[a,t]],bottom:[[a,t],[i,t]],left:[[i,t],[i,e]]}).map(function(t){var t=x(t,2),e=t[0],t=t[1];return e===o[n]?r.createCorner(t):[b(["M"],x(t[0]),!1),b(["L"],x(t[1]),!1)]});return a.push([["Z"]]),a.flat().filter(function(t,e,n){return 0===e||"M"!==t[0]})},zk.prototype.createCorner=function(t,e){void 0===e&&(e=10);var n=function(t,e){var n=(t=x(t,2))[0],t=t[1],r=(e=x(e,2))[0],e=e[1];return n!==r&&t===e}.apply(void 0,b([],x(t),!1)),t=x(t,2),r=x(t[0],2),i=r[0],r=r[1],t=x(t[1],2),a=t[0],t=t[1],a=x(n?[a-i,[i,a]]:[t-r,[r,t]],2),t=a[0],a=x(a[1],2),o=a[0],a=a[1],s=t/2,e=e*(t/Math.abs(t)),t=e/2,e=e*Math.sqrt(3)/2*.8,o=x([o,o+s-t,o+s,o+s+t,a],5),s=o[0],t=o[1],a=o[2],l=o[3],o=o[4];return n?(this.point=[a,r-e],[["M",s,r],["L",t,r],["L",a,r-e],["L",l,r],["L",o,r]]):(this.point=[i+e,a],[["M",i,s],["L",i,t],["L",i+e,a],["L",i,l],["L",i,o]])},zk.prototype.bindEvents=function(){this.label.on(y.BOUNDS_CHANGED,this.renderBackground)},zk.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout()},zk);function zk(t){void 0===t&&(t={});t=Fk.call(this,K2({},{style:v({visibility:"hidden"},Ik)},t))||this;return t.point=[0,0],t.group=t.appendChild(new Yo({})),t}var Gk=gx({marker:"marker",labelGroup:"labelGroup",label:"label"},"handle"),Wk=px({render:function(t,e){var a,o=t.orient,n=t.visibility,r=t.spacing,s=void 0===r?0:r,r=t.showLabel,l=t.formatter,i=t.markerSymbol,i=void 0===i?vk(o,"horizontalHandle","verticalHandle"):i,t=x(B2(t,["label","marker"]),2),c=t[0],t=t[1],u=c.text,h=J(c,["text"]);i&&"hidden"!==n?(c=v({symbol:i},t),a=A(e).maybeAppend(Gk.marker.name,function(){return new _x({})}).update(c),fx(r,A(e).maybeAppendByClassName(Gk.labelGroup,"g"),function(t){var t=t.maybeAppendByClassName(Gk.label,"text").call(S,v({text:l(u).toString()},h)),e=a.node().getBBox(),n=e.width,e=e.height,e=x(vk(o,[0,e+s,"center","top"],[n+s,0,"start","middle"]),4),n=e[0],r=e[1],i=e[2],e=e[3];t.node().setLocalPosition(n,r),t.style("textAlign",i).style("textBaseline",e)})):(null!=(n=e.querySelector(Gk.marker.class))&&n.remove(),null!=(i=e.querySelector(Gk.label.class))&&i.remove())}},v({},{markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orient:"vertical",spacing:0,showLabel:!0,formatter:function(t){return t.toString()}}));function Vk(t,e){var t=x(function(t,e){for(var n=1;n<t.length;n+=1){var r=t[n-1],i=t[n];if(r<=e&&e<=i)return[r,i]}return[e,e]}(t,e),2),n=t[0],t=t[1];return{tick:(n+t)/2<e?t:n,range:[n,t]}}var Yk=gx({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function Hk(t){var e=t.orient,n=t.size,t=t.len;return vk(e,[t,n],[n,t])}function qk(t){var e=t.type,t=x(Hk(t),2),n=t[0],t=t[1];return"size"===e?[["M",0,t],["L",0+n,0],["L",0+n,t],["Z"]]:[["M",0,t],["L",0,0],["L",0+n,0],["L",0+n,t],["Z"]]}function Uk(t){var e,n,i,a,r=t.orient,o=t.color,s=t.block,t=t.blocks,l=(e=en(o)?new Array(20).fill(0).map(function(t,e,n){return o(e/(n.length-1))}):o).length;return l?s?(s=t,t=e,n=r,i=Array.from(t),a=s+1,new Array(a).fill(0).reduce(function(t,e,n){var r=i[n%i.length];return t+" ".concat(n/(a-1),":").concat(r).concat(n<a-1?" ".concat((n+1)/(a-1),":").concat(r):"")},"l(".concat("horizontal"===n?"0":"270",")"))):e.reduce(function(t,e,n){return t+" ".concat(n/(l-1),":").concat(e)},"l(".concat(vk(r,"0","270"),")")):""}function Xk(t,e,n){var r,i,a,o=Uk(e),t=t.maybeAppendByClassName(Yk.selection,"path").call(S,v({path:qk(e),fill:o},n)),n=t.maybeAppendByClassName(Yk.clipPath,"path").call(S,{path:(n=(o=e).orient,(e=o.range)?(i=(o=x(Hk(o),2))[0],o=o[1],r=(e=x(e,2))[0],e=e[1],a=vk(n,r*i,0),r=vk(n,0,r*o),i=vk(n,e*i,i),[["M",a,r],["L",a,a=vk(n,o,e*o)],["L",i,a],["L",i,r],["Z"]]):[])}).node();t.style("clip-path",n)}var $k,Kk,Zk,Jk,Qk=px({render:function(t,e){var n,r=x(B2(t,["selection","track"]),2),i=r[0],r=r[1],a=A(e).maybeAppendByClassName(Yk.trackGroup,"g");n=t,r=r,a.maybeAppendByClassName(Yk.track,"path").call(S,v({path:qk(n)},r)),Xk(A(e).maybeAppendByClassName(Yk.selectionGroup,"g"),t,i)}},v({},{type:"color",orient:"horizontal",size:30,range:[0,1],len:200,block:!1,blocks:0,color:["#fff","#000"],trackFill:"#e5e5e5"})),t5=Mn(function(t){return{min:Math.min.apply(Math,b([],x(t.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,b([],x(t.map(function(t){return t.value})),!1))}},function(t){return t.map(function(t){return t.id})}),e5=(Me(n5,$k=o),n5.prototype.render=function(t,e){var n=this,r=(t.data,t.width),i=t.height,a=(t.orient,t.defaultValue,t.color,t.block,t.type,t.slidable,t.step,t.showTitle),o=(t.showHandle,t.showLabel),t=(t.showIndicator,x(B2(yx(t),["title","label","indicator","ribbon","handle"]),5)),s=t[0],l=(t[1],t[2]),c=t[3],t=(t[4],A(e).maybeAppendByClassName(Ck.title,function(){return new lk({style:v({width:r,height:i},s)})})),a=(fx(a,A(e),function(t){}),t.node().getAvailableSpace()),t=a.x,u=a.y,a=(a.width,a.height,A(e).maybeAppendByClassName(Ck.contentGroup,"g").call(S,{x:t,y:u})),h=a.maybeAppendByClassName(Ck.ribbonGroup,"g");this.renderRibbon(h,c),this.handlesGroup=h.maybeAppendByClassName(Ck.handlesGroup,"g"),this.renderHandles(),this.renderIndicator(a,l),fx(o,A(e).maybeAppendByClassName(Ck.labelGroup,"g").call(S,{x:t,y:u}),function(t){n.renderLabel(t)})},Object.defineProperty(n5.prototype,"range",{get:function(){var t=this.attributes.data;return t5(t)},enumerable:!1,configurable:!0}),Object.defineProperty(n5.prototype,"ribbonScale",{get:function(){var t=this.range,e=t.min,t=t.max;return this.innerRibbonScale.update({domain:[e,t],range:[0,1]}),this.innerRibbonScale},enumerable:!1,configurable:!0}),Object.defineProperty(n5.prototype,"ribbonRange",{get:function(){var t=x(this.selection,2),e=t[0],t=t[1],n=this.ribbonScale;return[n.map(e),n.map(t)]},enumerable:!1,configurable:!0}),Object.defineProperty(n5.prototype,"selection",{get:function(){var t=this.range,e=t.min,t=t.max,n=this.attributes.defaultValue,e=x(void 0===n?[e,t]:n,2);return[e[0],e[1]]},enumerable:!1,configurable:!0}),n5.prototype.ifHorizontal=function(t,e){return vk(this.style.orient,"function"==typeof t?t():t,"function"==typeof e?e():e)},n5.prototype.renderRibbon=function(t,e){var n=this.attributes,r=n.type,i=n.orient,a=n.color,o=n.block,n=n.data;this.ribbon=t.maybeAppendByClassName(Ck.ribbon,function(){return new Qk({})}).update(v({type:r,orient:i,color:a,block:o,blocks:n.length-1,range:this.ribbonRange},e))},n5.prototype.renderHandles=function(){var t=this.attributes,e=t.showHandle,t=t.slidable,n=x(this.selection,2),r=n[0],n=n[1];this.startHandle=this.renderHandle("start",r),this.endHandle=this.renderHandle("end",n),e&&t?this.handlesGroup.style("visibility","visible"):this.handlesGroup.style("visibility","hidden")},n5.prototype.renderHandle=function(t,e){var n=this.attributes.orient,r=I2(this.attributes,"handle"),r=(r.formatter,J(r,["formatter"])),n=this.handlesGroup.maybeAppendByClassName(Ck.prefix("".concat(t,"-handle")),function(){return new Wk({})}).call(S,v({orient:n,labelText:e},r));return this.setHandlePosition(t,e),n},n5.prototype.setHandlePosition=function(t,e){var n=this.attributes,r=n.ribbonSize,n=n.handleFormatter,e=this.getOffset(e),r=x(this.ifHorizontal([e,.7*r],[r/2,e]),2),e=r[0],r=r[1],t=this.handlesGroup.select(".".concat(Ck.prefix("".concat(t,"-handle")))).node(),n=(null!=t&&t.attr("formatter",n),x(t.getLocalPosition(),2)),i=n[0],n=n[1];Math.abs(e+r-i-n)<100?null!=t&&t.setLocalPosition(e,r):null!=t&&t.animate([{transform:"translate(".concat(t.getLocalPosition().slice(0,2).join(","),")")},{transform:"translate(".concat(e,", ").concat(r,")")}],{duration:200,fill:"both"})},n5.prototype.renderIndicator=function(t,e){this.indicator=t.maybeAppendByClassName(Ck.indicator,function(){return new Dk({style:e})}).update(e)},Object.defineProperty(n5.prototype,"labelData",{get:function(){var o=this,t=this.attributes,e=t.data,s=t.labelAlign;return e.reduce(function(t,e,n,r){var i,a=null!=(a=null==e?void 0:e.id)?a:n.toString();return"value"===s?t.push(v(v({},e),{id:a,label:null!=(i=null==e?void 0:e.label)?i:e.value.toString(),value:o.ribbonScale.map(e.value)})):n<r.length-1&&(i=r[n+1],r=((n=(r=x([e.value,i.value],2))[0])+(i=r[1]))/2,t.push(v(v({},e),{id:a,range:[n,i],label:[n,i].join("~"),value:o.ribbonScale.map(r)}))),t},[])},enumerable:!1,configurable:!0}),Object.defineProperty(n5.prototype,"labelStyle",{get:function(){var t=this.attributes,e=t.orient,t=t.labelDirection,t=void 0===t?"positive":t,n=x(["center","middle"],2),r=n[0],n=n[1];return"horizontal"===e?n="positive"===t?"top":"bottom":r="positive"===t?"end":"start",{labelTextAlign:r,labelTextBaseline:n}},enumerable:!1,configurable:!0}),n5.prototype.renderLabel=function(t){var e=this.attributes,n=e.ribbonSize,e=e.ribbonLen,r=I2(this.attributes,"label"),i=r.spacing,a=(r.align,r.formatter),o=r.filter,r=J(r,["spacing","align","formatter","filter"]),e=x(this.ifHorizontal([[0,n/2],[e,n/2]],[[n/2,0],[n/2,e]]),2),s=e[0],e=e[1],l=v(v({type:"linear",startPos:s,endPos:e,data:this.labelData,showLine:!1,showGrid:!1,showTick:!1,labelSpacing:i+n/2,labelTransform:"rotate(0)"},this.labelStyle),Object.fromEntries(Object.entries(r).map(function(t){var t=x(t,2),e=t[0],t=t[1];return["label".concat((e=e).charAt(0).toUpperCase()+e.slice(1)),t]}))),s=t.maybeAppendByClassName(Ck.label,function(){return new dk({style:l})}).call(S,l).node();s.attr("labelFormatter",a),s.attr("labelFilter",o)},n5.prototype.bindEvents=function(){var n=this,t=new Map;t.set("ribbon",this.ribbon),t.set("start",this.startHandle),t.set("end",this.endHandle),t.forEach(function(t,e){null!=t&&t.on("mousedown",n.onDragStart(e)),null!=t&&t.on("touchstart",n.onDragStart(e))}),null!=(t=this.startHandle)&&t.on("mouseover",function(){return n.updateMouse()}),null!=(t=this.endHandle)&&t.on("mouseover",function(){return n.updateMouse()}),this.ribbon.on("mousemove",this.onHovering),this.addEventListener("mouseout",this.hideIndicator)},n5.prototype.showIndicator=function(t,e){void 0===e&&(e="".concat(t));var n,r=this.attributes,i=r.orient;r.showIndicator&&"number"==typeof t?(n=(r=this.range).min,r=r.max,t=dn(t,n,r),n=[this.getOffset(t),0],"vertical"===i&&n.reverse(),this.indicator.update({visibility:"visible",position:this.ifHorizontal("top","left"),value:e}),(r=this.indicator.node()).setLocalPosition.apply(r,b([],x(n),!1))):this.hideIndicator()},n5.prototype.hideIndicator=function(){var t;null!=(t=this.indicator)&&t.style("visibility","hidden")},n5.prototype.updateMouse=function(){this.style.slidable&&(this.style.cursor="grabbing")},n5.prototype.setSelection=function(t,e){this.updateSelection(t,e)},n5.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i,a,o,s,l=x(this.selection,2),c=l[0],l=l[1],t=x([t,e],2),e=t[0],t=t[1],n=(n&&(e+=c,t+=l),this.range),c=n.min,l=n.max,u=x((n=[c,l],c=[e,t],l=this.selection,void 0===r&&(r=4),i=(n=x(n,2))[0],n=n[1],a=(c=x(c,2))[0],c=c[1],o=(l=x(l,2))[0],l=l[1],c=(a=x([a,c],2))[0],s=(a=a[1])-c,a<c&&(c=(u=x([a,c],2))[0],a=u[1]),n-i<s?[i,n]:c<i?o===i&&l===a?[i,a]:[i,s+i]:n<a?l===n&&o===c?[c,n]:[n-s,n]:[L2(c,r),L2(a,r)]),2),e=u[0],t=u[1];this.update({defaultValue:[e,t]}),this.dispatchSelection()},Object.defineProperty(n5.prototype,"step",{get:function(){var t=this.attributes.step,t=void 0===t?1:t,e=this.range,n=e.min,e=e.max;return vn(t)?L2(.01*(e-n),0):t},enumerable:!1,configurable:!0}),n5.prototype.getTickValue=function(t){var e=this.attributes,n=e.data,e=e.block,r=this.range.min;return e?Vk(n.map(function(t){return t.value}),t).tick:(e=this.step,r+Math.round((t-r)/e)*e)},n5.prototype.getValueByCanvasPoint=function(t,e){var n=this.range,r=n.min,n=n.max,i=x(this.ribbon.node().getPosition(),2),a=i[0],i=i[1],a=this.ifHorizontal(a,i),i=this.ifHorizontal.apply(this,b([],x(G2(t)),!1));return dn(this.getOffset(i-a,!0)+r,r,n)},n5.prototype.getOffset=function(t,e){void 0===e&&(e=!1);var n=this.range,r=n.min,n=n.max,i=this.attributes.ribbonLen,a=this.eventToOffsetScale;return a.update({domain:[r,n],range:[0,i]}),e?a.invert(t):a.map(t)},n5.prototype.dispatchSelection=function(){var t=new mo("valuechange",{detail:{value:this.selection}});this.dispatchEvent(t)},n5.prototype.dispatchIndicated=function(t,e){t=new mo("indicate",{detail:{value:t,range:e}});this.dispatchEvent(t)},t([nx(100)],n5.prototype,"dispatchSelection",null),t([nx(100)],n5.prototype,"dispatchIndicated",null),n5);function n5(t){var a=$k.call(this,K2({},Nk,t))||this;return a.eventToOffsetScale=new Dm({}),a.innerRibbonScale=new Dm({}),a.onHovering=function(t){var e=a.attributes,n=e.data,e=e.block,t=(t.stopPropagation(),a.getValueByCanvasPoint(t));e?(e=Vk(n.map(function(t){return t.value}),t).range,a.showIndicator((e[0]+e[1])/2,"".concat(e[0],"-").concat(e[1])),a.dispatchIndicated(t,e)):(n=a.getTickValue(t),a.showIndicator(n),a.dispatchIndicated(n))},a.onDragStart=function(e){return function(t){t.stopPropagation(),a.attributes.slidable&&(a.target=e,a.prevValue=a.getTickValue(a.getValueByCanvasPoint(t)),document.addEventListener("mousemove",a.onDragging),document.addEventListener("touchmove",a.onDragging),document.addEventListener("mouseleave",a.onDragEnd),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchend",a.onDragEnd))}},a.onDragging=function(t){var e=a.target,n=(a.updateMouse(),x(a.selection,2)),r=n[0],n=n[1],t=a.getTickValue(a.getValueByCanvasPoint(t)),i=t-a.prevValue;"start"===e?r!==t&&a.updateSelection(t,n):"end"===e?n!==t&&a.updateSelection(r,t):"ribbon"===e&&0!=i&&(a.prevValue=t,a.updateSelection(i,i,!0))},a.onDragEnd=function(){a.style.cursor="default",document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("touchmove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchend",a.onDragEnd)},a}function r5(t){Kk||(Kk=document.createElement("table"),Jk=document.createElement("tr"),Zk=/^\s*<(\w+|!)[^>]*>/,Jk={tr:document.createElement("tbody"),tbody:Kk,thead:Kk,tfoot:Kk,td:Jk,th:Jk,"*":document.createElement("div")});var e=Zk.test(t)&&RegExp.$1,e=(e&&e in Jk||(e="*"),Jk[e]),t=(t="string"==typeof t?t.replace(/(^\s*)|(\s*$)/g,""):t,e.innerHTML=""+t,e.childNodes[0]);return t&&e.contains(t)&&e.removeChild(t),t}var i5,ao="tooltip",a5="tooltip-title",o5="tooltip-list",n="tooltip-list-item",Kl="tooltip-list-item-name",Zl="tooltip-list-item-marker",e="tooltip-list-item-name-label",$l="tooltip-list-item-value",Ka="tooltip-crosshair-x",c="tooltip-crosshair-y",eo={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"},ro=((no={})[".".concat(ao)]={position:"absolute",visibility:"visible","z-index":8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)","background-color":"rgba(255, 255, 255, 0.96)","box-shadow":"0 6px 12px 0 rgba(0, 0, 0, 0.12)","border-radius":"4px",color:"rgba(0, 0, 0, 0.65)","font-size":"12px","line-height":"20px",padding:"12px","min-width":"120px","max-width":"360px","font-family":"Roboto-Regular"},no[".".concat(a5)]={color:"rgba(0, 0, 0, 0.45)"},no[".".concat(o5)]={margin:"0px","list-style-type":"none",padding:"0px"},no[".".concat(n)]={"list-style-type":"none","margin-top":"12px",display:"flex","line-height":"1em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},no[".".concat(Zl)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},no[".".concat(Kl)]={display:"flex","align-items":"center","max-width":"216px"},no[".".concat(e)]=v({flex:1},eo),no[".".concat($l)]=v({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},eo),no[".".concat(Ka)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},no[".".concat(c)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},no),s5=(Me(l5,i5=o),Object.defineProperty(l5.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),l5.prototype.getContainer=function(){return this.element},Object.defineProperty(l5.prototype,"position",{set:function(t){var t=x(t,2),e=t[0],t=t[1];this.attr({x:e,y:t}),this.updatePosition()},enumerable:!1,configurable:!0}),Object.defineProperty(l5.prototype,"elementSize",{get:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty(l5.prototype,"items",{get:function(){return this.attributes.items.map(function(t,e){var n=t.name,n=void 0===n?"":n,r=t.value,i=t.color,i=void 0===i?"black":i,a=t.index,t=J(t,["name","value","color","index"]);return v({name:n,value:r,color:i,index:null!=a?a:e},t)})},enumerable:!1,configurable:!0}),Object.defineProperty(l5.prototype,"HTMLTooltipItemsElements",{get:function(){var r=this.attributes.template,i=[];return this.items.forEach(function(t){var e,n;i.push(r5((e=r.item,n=t,e&&n?e.replace(/\\?\{([^{}]+)\}/g,function(t,e){return"\\"===t.charAt(0)?t.slice(1):void 0===n[e]?"":n[e]}):e)))}),i},enumerable:!1,configurable:!0}),Object.defineProperty(l5.prototype,"customContent",{get:function(){var t=this.attributes.customContent;return fn(t)?$2(t):bn(t)?t:void 0},enumerable:!1,configurable:!0}),l5.prototype.render=function(t,e){this.renderHTMLTooltipElement(),this.updatePosition()},l5.prototype.update=function(t){this.attr(Pn({},this.attributes,t)),this.render(this.attributes,this)},l5.prototype.clear=function(){this.element.innerHTML=""},l5.prototype.destroy=function(){var t;null!=(t=this.element)&&t.remove(),null!=(t=this.customContent)&&t.remove()},l5.prototype.show=function(){this.visibility="visible",this.element.style.visibility="visible"},l5.prototype.hide=function(){this.visibility="hidden",this.element.style.visibility="hidden"},l5.prototype.initShape=function(){var t=this.attributes.template;this.element=r5(t.container),this.id&&this.element.setAttribute("id",this.id)},l5.prototype.renderHTMLTooltipElement=function(){var e,r,t=this.attributes,n=t.title,t=t.enterable,i=this.element,a=this.customContent,a=(this.element.style.pointerEvents=t?"auto":"none",this.clear(),a?i.appendChild(a):(t=this.attributes.template,n?(i.innerHTML=t.title,i.getElementsByClassName(a5)[0].innerHTML=n):null!=(t=null==(a=i.getElementsByClassName(a5))?void 0:a[0])&&t.remove(),n=this.HTMLTooltipItemsElements,(e=document.createElement("ul")).className=o5,n.forEach(function(t){e.appendChild(t)}),this.element.appendChild(e)),this.attributes.style);r=i,Object.entries(a).forEach(function(t){var t=x(t,2),e=t[0],n=t[1];b([r],x(r.querySelectorAll(e)),!1).filter(function(t){return t.matches(e)}).forEach(function(t){t&&(t.style.cssText+=Object.entries(n).reduce(function(t,e){return"".concat(t).concat(e.join(":"),";")},""))})}),this.element.style.visibility=this.visibility},l5.prototype.getRelativeOffsetFromCursor=function(t){var e=this.attributes,n=e.position,i=e.offset,e=(t||n).split("-"),a={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},t=this.elementSize,o=t.width,s=t.height,l=[-o/2,-s/2];return e.forEach(function(t){var e=x(l,2),n=e[0],e=e[1],t=x(a[t],2),r=t[0],t=t[1];l=[n+(o/2+i[0])*r,e+(s/2+i[1])*t]}),l},l5.prototype.setOffsetPosition=function(t){var t=x(t,2),e=t[0],t=t[1],n=this.attributes,r=n.x,i=n.y,i=void 0===i?0:i,n=n.container,a=n.x,n=n.y;this.element.style.left="".concat((void 0===r?0:r)+a+e,"px"),this.element.style.top="".concat(i+n+t,"px")},l5.prototype.updatePosition=function(){this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor()))},l5.prototype.autoPosition=function(t){var e,n,r,i,a,o,s,t=x(t,2),l=t[0],t=t[1],c=this.attributes,u=c.x,h=c.y,f=c.autoPosition,c=c.bounding;return f?(e=(f=this.element).offsetWidth,f=f.offsetHeight,h=(u=x([u+l,h+t],2))[0],u=u[1],n=this.attributes.position,r={left:"right",right:"left",top:"bottom",bottom:"top"},s=c.x,i=c.y,a={left:h<s,right:s+c.width<h+e,top:u<i,bottom:i+c.height<u+f},o=[],n.split("-").forEach(function(t){o.push(a[t]?r[t]:t)}),s=o.join("-"),this.getRelativeOffsetFromCursor(s)):[l,t]},l5.tag="tooltip",l5.defaultOptions={style:{x:0,y:0,visibility:"visible",title:"",position:"bottom-right",offset:[5,5],follow:!0,enterable:!1,autoPosition:!0,items:[],container:{x:0,y:0},bounding:{x:0,y:0,width:0,height:0},template:{container:'<div class="'.concat(ao,'"></div>'),title:'<div class="'.concat(a5,'"></div>'),item:'<li class="'.concat(n,'" data-index={index}>\n <span class="').concat(Kl,'">\n <span class="').concat(Zl,'" style="background:{color}"></span>\n <span class="').concat(e,'" title="{name}">{name}</span>\n </span>\n <span class="').concat($l,'" title="{value}">{value}</span>\n </li>')},style:ro}},t([nx(100)],l5.prototype,"updatePosition",null),l5);function l5(t){t=i5.call(this,Pn({},l5.defaultOptions,t))||this;return t.visibility="visible",t.initShape(),t.render(t.attributes,t),t}var c5,u5={default:{sizeStyle:{width:44,height:22,radius:11},tagStyle:{textStyle:{fontSize:12,lineHeight:16,fill:"#fff"},padding:0},markerStyle:{size:11}},small:{sizeStyle:{width:28,height:16,radius:8},tagStyle:{textStyle:{fontSize:10,lineHeight:14,fill:"#fff"},padding:0},markerStyle:{size:8}},mini:{sizeStyle:{width:20,height:14,radius:7},tagStyle:{textStyle:{fontSize:7,lineHeight:10,fill:"#fff"},padding:0},markerStyle:{size:7}}};function h5(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!0);var r=Number(t.style.height)-2*e;return{x:n?Number(t.style.width)+Number(t.style.x)-e-r:Number(t.style.x)+e,y:Number(t.style.y)+e,width:r,height:r,radius:r/2}}function f5(t){return c5.call(this,Pn({},f5.defaultOptions,t))||this}Me(f5,c5=o),f5.prototype.render=function(t,e){var i=this,n=t.size,n=void 0===n?"default":n,a=t.spacing,r=t.disabled,o=t.checked,s=t.unCheckedChildren,t=t.checkedChildren,e=H2(e,".switch-content","g").attr("className","switch-content").node(),l=e.getLocalBounds(),n=_n(u5,n,u5.default),c=n.sizeStyle,u=n.tagStyle,h=r?"no-drop":"pointer",n=o?"#1890FF":"#00000040",f=c,d=o?t:s,p=((t||s)&&H2(e,".switch-tag",function(){return new Px({})}).attr("className","switch-tag").call(function(t){var e,t=t.node(),n=(t.update(Pn({cursor:h,backgroundStyle:null,text:!1,marker:!1},u,d)),null==t?void 0:t.getLocalBounds()),r=n.max,n=n.min,i=r[0]-n[0]+c.radius,r=r[1]-n[1],n=Math.max(i+c.height+2,c.width);f=v(v({},c),{width:n}),t.update((t={x:l.min[0],y:l.min[1],width:n,height:f.height},n={width:i,height:r},i=f.radius,r=o,e=n.width,n=n.height,void 0===i&&(i=0),{x:(r=void 0===o?!0:r)?Number(t.x)+i:Number(t.width)+Number(t.x)-e,y:Number(t.y)+(Number(t.height)-n)/2}))}),H2(e,".switch-background","rect").attr("className","switch-background").style("zIndex",(e.style.zIndex||0)-1).style("x",l.min[0]).style("y",l.min[1]).style("fill",n).style("cursor",h).style("fillOpacity",r?.4:1).call(S,f).node()),g=H2(e,".switch-background-stroke","rect").attr("className","switch-background-stroke").style("zIndex",(e.style.zIndex||0)-2).style("x",l.min[0]).style("y",l.min[1]).style("stroke",n).style("lineWidth",0).call(S,f).node();H2(e,".switch-handle","rect").attr("className","switch-handle").style("fill","#fff").style("cursor",h).call(function(t){var e,t=t.node(),n=h5(p,a,o),r=h5(p,a,!o);t.attr("x")&&!Ln(n,r)&&i.checked!==o?(t.attr(r),null!=(e=t.getAnimations()[0])&&e.cancel(),null!=(e=g.getAnimations()[0])&&e.cancel(),t.animate([{x:r.x},{x:n.x}],{duration:120,fill:"both"}),g.animate([{lineWidth:0,strokeOpacity:.5},{lineWidth:14,strokeOpacity:0}],{duration:400,easing:"ease-on"})):t.attr(n)}),this.checked=!!o},f5.defaultOptions={type:f5.tag="switch",style:{x:0,y:0,spacing:2,checked:!0,disabled:!1}};var d5,p5,g5,y5,oo={tagText:"",lineStroke:"#416180",lineStrokeOpacity:.45,lineLineWidth:1,lineLineDash:[5,5]},so=K2({},oo,{type:"line",tagPosition:"start",tagAlign:"center",tagVerticalAlign:"bottom"}),lo=K2({},oo,{type:"circle",defaultRadius:0}),co=K2({},oo,{type:"polygon",defaultRadius:0,startAngle:0}),uo=(Me(m5,d5=o),Object.defineProperty(m5.prototype,"localPointer",{get:function(){var t=x(this.getPosition(),2),e=t[0],t=t[1],n=x(this.pointer,2);return[n[0]-e,n[1]-t]},enumerable:!1,configurable:!0}),Object.defineProperty(m5.prototype,"tagCfg",{get:function(){var t=I2(this.attributes,"tag");return t.position,J(t,["position"])},enumerable:!1,configurable:!0}),Object.defineProperty(m5.prototype,"crosshairCfg",{get:function(){var t=I2(this.attributes,"line");return v(v({},t),{path:this.crosshairPath})},enumerable:!1,configurable:!0}),m5.prototype.render=function(t,e){var n=this,e=H2(e,".crosshair-group","g").attr("className","crosshair-group").node();this.shapesGroup=e,this.tagShape=H2(e,".crosshair-tag",function(){return new Px({className:"crosshair-tag",style:n.tagCfg})}).node(),this.crosshairShape=H2(e,".crosshair-path","path").attr("className","crosshair-path").call(S,this.crosshairCfg).node(),this.adjustLayout()},m5.prototype.update=function(t){this.attr(Pn({},this.attributes,t=void 0===t?{}:t)),this.render(this.attributes,this)},m5.prototype.setPointer=function(t){this.pointer=t},m5.tag="crosshair-base",m5.defaultOptions={style:oo},m5);function m5(t){return d5.call(this,Pn({},m5.defaultOptions,t))||this}function v5(t){return p5.call(this,K2({},v5.defaultOptions,t))||this}function b5(t){return g5.call(this,K2({},b5.defaultOptions,t))||this}function x5(t){return y5.call(this,K2({},x5.defaultOptions,t))||this}Me(v5,p5=uo),Object.defineProperty(v5.prototype,"crosshairPath",{get:function(){var t=this.attributes,e=x(t.startPos,2),n=e[0],e=e[1],t=x(t.endPos,2);return[["M",0,0],["L",t[0]-n,t[1]-e],["Z"]]},enumerable:!1,configurable:!0}),Object.defineProperty(v5.prototype,"localPointer",{get:function(){var t,e,n;return this.pointer?(t=(e=x(this.getPosition(),2))[0],e=e[1],[(n=x(this.pointer,2))[0]-t,n[1]-e]):this.attributes.startPos},enumerable:!1,configurable:!0}),Object.defineProperty(v5.prototype,"isVertical",{get:function(){var t=this.attributes,e=x(t.startPos,2),n=e[0],e=e[1],t=x(t.endPos,2),r=t[0],t=t[1];return n===r&&e!==t},enumerable:!1,configurable:!0}),Object.defineProperty(v5.prototype,"tagShapeSpace",{get:function(){var t=q2(this.tagShape);return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),v5.prototype.update=function(t){p5.prototype.update.call(this,t)},v5.prototype.setPointer=function(t){p5.prototype.setPointer.call(this,t),this.adjustPosition()},v5.prototype.setText=function(t){this.tagShape.update({text:t}),this.adjustTag()},v5.prototype.adjustLayout=function(){this.adjustPosition(),this.adjustTag()},v5.prototype.adjustPosition=function(){var t=x(this.localPointer,2),e=t[0],t=t[1],n=x(this.attributes.startPos,2),r=n[0],n=n[1],r=this.getOrientVal([r,t],[e,n]);this.shapesGroup.setLocalPosition(r)},v5.prototype.adjustTag=function(){var t,e=this.attributes,n=e.tagText,r=e.tagPosition,i=x(e.startPos,2),a=i[0],i=i[1],e=x(e.endPos,2),o=e[0],e=e[1];n&&""!==n?(this.tagShape.show(),t=(n=this.tagShapeSpace).width,n=n.height,a=(o=x(this.getOrientVal({start:[-t/2,n/2],end:[o-a+t/2,n/2]},{start:[0,0],end:[0,e-i+n]})[r],2))[0],t=o[1],this.tagShape.setLocalPosition(a,t)):this.tagShape.hide()},v5.prototype.getOrientVal=function(t,e){return this.isVertical?e:t},v5.tag="line-crosshair",v5.defaultOptions={style:so},t([nx(20)],v5.prototype,"setPointer",null),Me(b5,g5=uo),Object.defineProperty(b5.prototype,"crosshairPath",{get:function(){return this.createCirclePath()},enumerable:!1,configurable:!0}),b5.prototype.update=function(t){g5.prototype.update.call(this,t)},b5.prototype.setPointer=function(t){var t=x(t,2),e=t[0],t=t[1],e=(g5.prototype.setPointer.call(this,[e,t]),x(this.localPointer,2)),t=e[0],e=e[1],n=x(this.attributes.center,2),r=n[0],n=n[1],t=this.createCirclePath(Math.pow(Math.pow(t-r,2)+Math.pow(e-n,2),.5));this.crosshairShape.attr({path:t})},b5.prototype.adjustLayout=function(){this.tagShape.hide()},b5.prototype.createCirclePath=function(t){var e=this.attributes,n=x(e.center,2),r=n[0],n=n[1],e=e.defaultRadius;return kx(r,n,t||e)},b5.tag="circle-crosshair",b5.defaultOptions={style:lo},t([nx(20)],b5.prototype,"setPointer",null),Me(x5,y5=uo),Object.defineProperty(x5.prototype,"crosshairPath",{get:function(){return this.createPolygonPath()},enumerable:!1,configurable:!0}),x5.prototype.update=function(t){y5.prototype.update.call(this,t)},Object.defineProperty(x5.prototype,"points",{get:function(){for(var t,e,n,r,i,a,o=this.attributes,s=o.startAngle,l=o.sides,c=2*Math.PI/l,u=[1,0],h=[],f=0;f<l;f+=1)h.push((t=[0,0],e=u,n=[0,0],r=s/180*Math.PI+c*f,a=i=void 0,i=e[0]-n[0],e=e[1]-n[1],a=Math.sin(r),r=Math.cos(r),t[0]=i*r-e*a+n[0],t[1]=i*a+e*r+n[1],t));return h},enumerable:!1,configurable:!0}),x5.prototype.setPointer=function(t){var t=x(t,2),e=t[0],t=t[1],e=(y5.prototype.setPointer.call(this,[e,t]),x(this.localPointer,2)),t=e[0],e=e[1],n=this.attributes.center,r=x(this.intersection([t,e]),2),i=r[0],r=r[1];i&&r&&(t=ex(n,[t,e])/ex(n,[i,r]),e=this.createPolygonPath(t),this.crosshairShape.attr({path:e}))},x5.prototype.adjustLayout=function(){this.tagShape.hide()},x5.prototype.createPolygonPath=function(r){var t=this.attributes,i=t.defaultRadius,t=x(t.center,2),a=t[0],o=t[1],t=this.points.map(function(t,e){var t=x(t,2),t=x(ye([0,0],[t[0],t[1]],r||i),2),n=t[0],t=t[1];return[0===e?"M":"L",a+n,o+t]});return t.push(["Z"]),t},x5.prototype.intersection=function(t){for(var e,n,r,i,a,o,s,l,t=x(t,2),c=t[0],u=t[1],h=this.points,t=x(this.attributes.center,2),f=t[0],d=t[1],p=1;p<=h.length;p+=1){var g=x(h[p-1],2),y=g[0],g=g[1],m=x(h[p%h.length],2),v=m[0],m=m[1],y=(i=[f,d],y=[y+f,g+d],g=[v+f,m+d],l=s=o=a=m=v=void 0,m=(r=x(r=[c,u],2))[0],r=r[1],a=(i=x(i,2))[0],i=i[1],o=(y=x(y,2))[0],y=y[1],s=(g=x(g,2))[0],g=g[1],l=[],(g-y)*(a-m)==(i-r)*(s-o)?(i-r)*(o-m)==(y-r)*(a-m)&&(Q2(m,a,r,i,o,y)&&tx(l,o,y),Q2(m,a,r,i,s,g)&&tx(l,s,g),Q2(o,s,y,g,m,r)&&tx(l,m,r),Q2(o,s,y,g,a,i))&&tx(l,a,i):(v=(m*(i-r)+y*(a-m)-r*(a-m)-o*(i-r))/((s-o)*(i-r)-(a-m)*(g-y)),0<=(g=(o*(g-y)+r*(s-o)-y*(s-o)-m*(g-y))/((a-m)*(g-y)-(s-o)*(i-r)))&&g<=1&&0<=v&&v<=1&&(l[0]=m+g*(a-m),l[1]=r+g*(i-r))),l);0!==y.length&&(e=(s=x(y,2))[0],n=s[1])}return[e,n]},x5.tag="polygon-crosshair",x5.defaultOptions={style:co},t([nx(20)],x5.prototype,"setPointer",null);Me(M5,w5=N),Object.defineProperty(M5.prototype,"decorationType",{get:function(){var t=this.attributes.type;return t&&"none"!==t&&an(t)?t.map(function(t){return an(t)?t:[t,"solid"]}):"none"},enumerable:!1,configurable:!0}),Object.defineProperty(M5.prototype,"doubleSpacing",{get:function(){return 2*this.attributes.style.lineWidth},enumerable:!1,configurable:!0}),Object.defineProperty(M5.prototype,"hangingRate",{get:function(){return this.attributes.hangingRate},enumerable:!1,configurable:!0}),Object.defineProperty(M5.prototype,"dashedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[2*t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(M5.prototype,"dottedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(M5.prototype,"solidCfg",{get:function(){return{lineDash:[0,0]}},enumerable:!1,configurable:!0}),Object.defineProperty(M5.prototype,"decorationCfg",{get:function(){var r=this,i=this.attributes.style,t=this.decorationType;return"none"===t?[]:t.map(function(t){var e,t=x(t,2),n=t[0],t=t[1];return"wavy"===t?v({path:r.getWavyPath(n)},i):"double"===t?v({path:r.getDoubleLinePath(n)},i):(e={solid:r.solidCfg,dashed:r.dashedCfg,dotted:r.dottedCfg},v(v({path:r.getLinePath(n)},i),e[t]))})},enumerable:!1,configurable:!0}),M5.prototype.update=function(t){var e=this;this.attr(K2({},this.attributes,t)),this.clear(),this.decorationCfg.forEach(function(t){e.appendChild(new Jo({style:t}))})},M5.prototype.clear=function(){this.removeChildren()},M5.prototype.getLinePos=function(t){var e=x(this.hangingRate,3),n=e[0],r=e[1],e=e[2],i=this.attributes,a=i.height,i=i.fontSize,o=x([0,0],2),s=o[0],o=o[1],o=("overline"===t?(s=(n=x([0,a*n-i/2],2))[0],n):"line-through"===t?(s=(n=x([0,a*r],2))[0],n):(s=(t=x([0,a*e+i/2],2))[0],t))[1];return[s,o]},M5.prototype.getLinePath=function(t){var e=this.attributes.width,t=x(this.getLinePos(t),2),n=t[0],t=t[1];return[["M",n,t],["L",n+e,t]]},M5.prototype.getDoubleLinePath=function(t){var e,n=this.doubleSpacing,r=this.attributes.width,i=x(this.getLinePos(t),2),a=i[0],i=i[1],o=x([0,0],2),s=o[0],o=o[1];return"line-through"===t&&(s=(e=x([-.5,.5],2))[0],o=e[1]),"underline"===t?(s=(e=x([0,1],2))[0],o=e[1]):"overline"===t&&(s=(e=x([1,0],2))[0],o=e[1]),[["M",a,i+n*s],["L",a+r,i+n*s],["M",a,i+n*o],["L",a+r,i+n*o]]},M5.prototype.getWavyPath=function(t){return[]},M5.tag="decoration",M5.defaultOptions={style:{width:0,height:0,type:"none",hangingRate:[.5,.55,.5],style:{lineWidth:1,stroke:"#000"}}};var w5,k5,E5=M5;function M5(t){t=w5.call(this,K2({},M5.defaultOptions,t))||this;return t.update({}),t}function O5(t){t=k5.call(this,K2({},O5.defaultOptions,t))||this;return t.init(),t}Me(O5,k5=o),Object.defineProperty(O5.prototype,"textWidth",{get:function(){var e=this;return un(this.renderText.split("\n").map(function(t){return A2(t,e.font)}))||0},enumerable:!1,configurable:!0}),Object.defineProperty(O5.prototype,"textHeight",{get:function(){return q2(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(O5.prototype,"width",{get:function(){var t=this.attributes.width;return"auto"===t||void 0===t||0===t?this.textWidth:t},enumerable:!1,configurable:!0}),Object.defineProperty(O5.prototype,"height",{get:function(){var t=this.attributes.height;return pn(t)&&0!==t?t:q2(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(O5.prototype,"lineHeight",{get:function(){var t=this.attributes,e=t.lineHeight,t=t.fontSize;return e&&0!==e?e:t},enumerable:!1,configurable:!0}),Object.defineProperty(O5.prototype,"capitalizeWord",{get:function(){return this.attributes.text.split("\n").map(function(t){return t.split(" ").map(function(t){return P2(t,"capitalize")}).join(" ")}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(O5.prototype,"text",{get:function(){var t=this.attributes,e=t.transform,t=t.text;return"capitalize"===e?this.capitalizeWord:P2(t,e)},enumerable:!1,configurable:!0}),Object.defineProperty(O5.prototype,"ellipsisText",{get:function(){var e=this,t=this.text,n=this.attributes,r=n.width,n=n.overflow,i="ellipsis"===n?"...":n;return t.split("\n").map(function(t){return _2(t,pn(r)?r:1/0,e.font,i)}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(O5.prototype,"renderText",{get:function(){var t=this.attributes.width,e=this.attributes.overflow;return e&&!["none","clip","wrap"].includes(e)&&pn(t)?this.ellipsisText:this.text},enumerable:!1,configurable:!0}),Object.defineProperty(O5.prototype,"verticalAlign",{get:function(){return this.attributes.verticalAlign},enumerable:!1,configurable:!0}),Object.defineProperty(O5.prototype,"font",{get:function(){return An(this.attributes,["fontSize","fontFamily","fontWeight","fontStyle","fontVariant","letterSpacing","leading"])},enumerable:!1,configurable:!0}),Object.defineProperty(O5.prototype,"fontColor",{get:function(){return this.attributes.fontColor},enumerable:!1,configurable:!0}),Object.defineProperty(O5.prototype,"wordWrap",{get:function(){return"wrap"===this.attributes.overflow},enumerable:!1,configurable:!0}),Object.defineProperty(O5.prototype,"wordWrapWidth",{get:function(){var t=this.width;return this.wordWrap?t:1/0},enumerable:!1,configurable:!0}),Object.defineProperty(O5.prototype,"textCfg",{get:function(){var t=this.renderText,e=this.lineHeight,n=this.wordWrap,r=this.wordWrapWidth,i=this.fontColor;return v(v(v({},j2),this.font),{fill:i,wordWrap:n,lineHeight:e,wordWrapWidth:r,text:t,textAlign:"start",textBaseline:"middle"})},enumerable:!1,configurable:!0}),Object.defineProperty(O5.prototype,"backgroundCfg",{get:function(){var t=this.width,e=this.height,n=this.attributes.backgroundStyle;return v({x:0,y:0,width:t,height:e},n)},enumerable:!1,configurable:!0}),Object.defineProperty(O5.prototype,"decorationLineWidth",{get:function(){var t=this.attributes.fontSize;return Math.floor(2*Math.log10(t))},enumerable:!1,configurable:!0}),Object.defineProperty(O5.prototype,"decorationCfg",{get:function(){var t=this.attributes,e=t.decoration,n=t.fontSize,r=this.decorationLineWidth,i=this.fontColor;return this.textShape.getLineBoundingRects().map(function(t){return K2({},{fontSize:n,style:{stroke:i,lineWidth:r}},e,t)})},enumerable:!1,configurable:!0}),Object.defineProperty(O5.prototype,"clipRectCfg",{get:function(){var t=this.height;return{width:this.attributes.width,height:t}},enumerable:!1,configurable:!0}),O5.prototype.init=function(){this.initShape(),this.update({})},O5.prototype.update=function(t){this.attr(K2({},this.attributes,t)),this.render()},O5.prototype.render=function(){var e=this;this.clear(),this.backgroundShape.attr(this.backgroundCfg),this.textShape.attr(this.textCfg),this.layout(),this.decorationGroup.removeChildren(),this.decorationCfg.forEach(function(t){e.decorationGroup.appendChild(new E5({style:t}))})},O5.prototype.clear=function(){var t;(this.backgroundShape.style.clipPath=null)!=(t=this.clipRect)&&t.destroy()},O5.prototype.initShape=function(){this.backgroundShape=new is({name:"background",style:{width:0,height:0}}),this.decorationGroup=new Yo({name:"decoration-group"}),this.textShape=new os({name:"text",style:this.textCfg}),this.textShape.appendChild(this.decorationGroup),this.backgroundShape.appendChild(this.textShape),this.appendChild(this.backgroundShape)},O5.prototype.overflow=function(){var t=this.wordWrap,e=this.attributes,n=e.width,e=e.overflow;e&&"none"!==e&&!t&&pn(n)&&"clip"===e&&(this.clipRect=new is({name:"clip-rect",style:this.clipRectCfg}),this.backgroundShape.style.clipPath=this.clipRect,this.backgroundShape.appendChild(this.clipRect))},O5.prototype.adjustTextAlign=function(){var t=this.textWidth,e=this.attributes,n=e.width,e=e.textAlign;pn(n)&&(n=0,n="start"===e?0:"center"===e?(this.width-t)/2:this.width-t,this.textShape.attr({x:n}))},O5.prototype.adjustVerticalAlign=function(){var t=this.verticalAlign,e=this.textHeight,n=0,n="top"===t?e/2:"middle"===t?this.height/2:this.height-e/2;this.textShape.attr({y:n})},O5.prototype.layout=function(){this.adjustTextAlign(),this.adjustVerticalAlign(),this.overflow()},O5.defaultOptions={type:O5.tag="paragraph",style:{text:"",fontColor:"#000",fontFamily:"sans-serif",fontSize:12,fontWeight:"normal",fontVariant:"normal",letterSpacing:0,leading:0,fontStyle:"normal",decoration:{type:"none",style:{}},overflow:"none",backgroundStyle:{},transform:"none",tooltip:!1,tooltipWait:300}};var S5,ho=v(v({},j2),{fill:"rgba(0,0,0,0.45)",fontSize:10,textAlign:"start",textBaseline:"middle",overflow:"clip"}),_5={default:{width:12,height:12,radius:2,stroke:"#dadada",lineWidth:1,fill:"#ffffff",cursor:"pointer"},selected:{width:12,height:12,radius:2,stroke:"#3471F9",lineWidth:1,fill:"#3471F9",cursor:"pointer"}},A5={path:[["M",3,6],["L","5","8.5"],["L","8.5","4"]],lineWidth:1,cursor:"pointer"};function T5(t){return S5.call(this,Pn({},T5.defaultOptions,t))||this}Me(T5,S5=o),T5.prototype.render=function(t,e){var n=t.label,r=t.boxStyle,i=t.checkedStyle,a=t.checked,t=t.spacing,a=(this.checked=!!a,H2(e,".checkbox-content","g").attr("className","checkbox-content").node()),e=wn({},this.checked?_5.selected:_5.default,r),r=wn({},A5,i),t=(this.checkboxBoxShape=H2(a,".checkbox-box","rect").attr("className","checkbox-box").style("zIndex",(a.style.zIndex||0)-1).call(S,e).node(),H2(this.checkboxBoxShape,".checkbox-checked","path").attr("className","checkbox-box-checked").style("stroke","#ffffff").call(S,r),i=this.checkboxBoxShape,e=Number(t),{x:(r=i.getLocalBounds()).halfExtents[0]?r.max[0]+(e||0):i.style.x,y:r.halfExtents[1]?(r.min[1]+r.max[1])/2:i.style.y}),e=t.x,r=t.y;H2(a,".checkbox-label","text").attr("className","checkbox-label").style("x",e).style("y",r).call(S,n)},T5.defaultOptions={type:T5.tag="checkbox",style:{x:0,y:0,label:v({text:""},ho),spacing:4,checked:!1}};var P5="gui-poptip",L5="gui-poptip-arrow",N5="gui-poptip-text",C5=((a={})[".".concat(P5)]={visibility:"visible",position:"absolute","background-color":"rgba(0, 0, 0)","box-shadow":"0px 0px 10px #aeaeae","border-radius":"3px",color:"#fff",opacity:.8,"font-size":"12px",padding:"4px 6px",display:"flex","justify-content":"center","align-items":"center","z-index":8,transition:"visibility 50ms"},a[".".concat(N5)]={"text-align":"center"},a[".".concat(P5,"[data-position='top']")]={transform:"translate(-50%, -100%)"},a[".".concat(P5,"[data-position='left']")]={transform:"translate(-100%, -50%)"},a[".".concat(P5,"[data-position='right']")]={transform:"translate(0, -50%)"},a[".".concat(P5,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},a[".".concat(P5,"[data-position='top-left']")]={transform:"translate(0,-100%)"},a[".".concat(P5,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},a[".".concat(P5,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},a[".".concat(P5,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},a[".".concat(P5,"[data-position='right-top']")]={transform:"translate(0, 0)"},a[".".concat(P5,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},a[".".concat(P5,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},a[".".concat(P5,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},a[".".concat(L5)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},a[".".concat(P5,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},a["[data-position='top'] .".concat(L5)]={bottom:"-2px"},a[".".concat(P5,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},a["[data-position='left'] .".concat(L5)]={right:"-2px"},a[".".concat(P5,"[data-position='right']")]={transform:"translate(5px, -50%)"},a["[data-position='right'] .".concat(L5)]={left:"-2px"},a[".".concat(P5,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},a["[data-position='bottom'] .".concat(L5)]={top:"-2px"},a[".".concat(P5,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},a["[data-position='top-left'] .".concat(L5)]={left:"10px",bottom:"-2px"},a[".".concat(P5,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},a["[data-position='top-right'] .".concat(L5)]={right:"10px",bottom:"-2px"},a[".".concat(P5,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},a["[data-position='left-top'] .".concat(L5)]={right:"-2px",top:"8px"},a[".".concat(P5,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},a["[data-position='left-bottom'] .".concat(L5)]={right:"-2px",bottom:"8px"},a[".".concat(P5,"[data-position='right-top']")]={transform:"translate(5px, 0)"},a["[data-position='right-top'] .".concat(L5)]={left:"-2px",top:"8px"},a[".".concat(P5,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},a["[data-position='right-bottom'] .".concat(L5)]={left:"-2px",bottom:"8px"},a[".".concat(P5,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},a["[data-position='bottom-left'] .".concat(L5)]={top:"-2px",left:"8px"},a[".".concat(P5,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},a["[data-position='bottom-right'] .".concat(L5)]={top:"-2px",right:"8px"},a),j5=void 0;var R5;function F5(t){var e=t&&document.getElementById(t);return e||((e=document.createElement("div")).setAttribute("id",t),document.body.appendChild(e)),e}function I5(t){var n,r;return n=F5,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r=r||n.apply(j5,t)}(t)}function B5(t){t=R5.call(this,Pn({style:{id:"gui-poptip"}},B5.defaultOptions,t))||this;return t.visibility="visible",t.map=new Map,t.domStyles="",t.initShape(),t.render(t.attributes,t),t}Me(B5,R5=o),Object.defineProperty(B5.prototype,"visible",{get:function(){return"visible"===this.visibility},enumerable:!1,configurable:!0}),B5.prototype.render=function(t,e){this.visibility=this.style.visibility,this.updatePoptipElement()},B5.prototype.update=function(t){this.attr(Pn({},this.style,t)),this.render(this.attributes,this)},B5.prototype.bind=function(s,l){var c,t,e,u=this;s&&(c=this.style.text,e=function(){u.hideTip()},s.addEventListener("mousemove",t=function(t){var e=s,n=u.style,r=c,i=(l&&(o=(i="function"==typeof l?l.call(null,t):l).html,a=i.target,i=J(i,["html","target"]),n=wn({},u.style,i),!a&&!1!==a||(e=a),"string"==typeof o)&&(r=o),n.position),a=n.arrowPointAtCenter,o=n.follow,n=n.offset;e?(e=(t=x(function(t,e,n,r,i,a){if(void 0===i&&(i=!1),a=void 0===a?!1:a)return[t,e];var o=(a=n.getBoundingClientRect()).x,s=a.y,l=a.width,c=a.height;switch(r){case"top":return i?[o+l/2,s]:[t,s];case"left":return i?[o,s+c/2]:[o,e];case"bottom":return i?[o+l/2,s+c]:[t,s+c];case"right":return i?[o+l,s+c/2]:[o+l,e];case"top-right":case"right-top":return[o+l,s];case"left-bottom":case"bottom-left":return[o,s+c];case"right-bottom":case"bottom-right":return[o+l,s+c];default:return[o,s]}}(t.clientX,t.clientY,e,i,a,o),2))[0],a=t[1],u.showTip(e,a,{text:r,position:i,offset:n})):u.hideTip()}),s.addEventListener("mouseleave",e),this.map.set(s,[t,e]))},B5.prototype.unbind=function(t){var e,n;this.map.has(t)&&(e=(n=x(this.map.get(t)||[],2))[0],n=n[1],e&&t.removeEventListener("mousemove",e),n&&t.removeEventListener("mouseleave",n),this.map.delete(t))},B5.prototype.clear=function(){this.container.innerHTML=""},B5.prototype.destroy=function(){var t,e=this;b([],x(this.map.keys()),!1).forEach(function(t){return e.unbind(t)}),null!=(t=this.container)&&t.remove()},B5.prototype.showTip=function(t,e,n){var r,i=_n(n,"text");i&&"string"!=typeof i||(this.applyStyles(),t&&e&&n&&(r=n.offset,(n=n.position)&&this.container.setAttribute("data-position",n),this.setOffsetPosition(t,e,r),"string"==typeof i&&(n=this.container.querySelector(".".concat(N5)))&&(n.innerHTML=i),this.visibility="visible",this.container.style.visibility="visible"))},B5.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},B5.prototype.getContainer=function(){return this.container},B5.prototype.getClassName=function(){var t=this.style.containerClassName;return"".concat(P5).concat(t?" ".concat(t):"")},B5.prototype.initShape=function(){var t=this,e=this.style.id;this.container=I5(e),this.container.setAttribute("class",this.getClassName()),this.container.addEventListener("mousemove",function(){return t.showTip()}),this.container.addEventListener("mouseleave",function(){return t.hideTip()})},B5.prototype.updatePoptipElement=function(){var t=this.container,e=(this.clear(),this.style),n=e.id,r=e.template,e=e.text,n=(this.container.setAttribute("id",n),this.container.setAttribute("class",this.getClassName()),'<span class="'.concat(L5,'"></span>'));t.innerHTML=n,fn(r)?t.innerHTML+=r:r&&bn(r)&&t.appendChild(r),e&&(t.getElementsByClassName(N5)[0].textContent=e),this.applyStyles(),this.container.style.visibility=this.visibility},B5.prototype.applyStyles=function(){var t,e=K2({},C5,this.style.domStyles),e=Object.entries(e).reduce(function(t,e){var e=x(e,2),n=e[0],e=e[1],e=Object.entries(e).reduce(function(t,e){var e=x(e,2),n=e[0],e=e[1];return"".concat(t).concat(n,": ").concat(e,";")},"");return"".concat(t).concat(n,"{").concat(e,"}")},"");this.domStyles!==e&&(this.domStyles=e,(t=this.container.querySelector("style"))&&this.container.removeChild(t),(t=document.createElement("style")).innerHTML=e,this.container.appendChild(t))},B5.prototype.setOffsetPosition=function(t,e,n){var n=x(n=void 0===n?this.style.offset:n,2),r=n[0],n=n[1],n=void 0===n?0:n;this.container.style.left="".concat(t+(void 0===r?0:r),"px"),this.container.style.top="".concat(e+n,"px")},B5.tag="poptip",B5.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:C5,template:'<div class="'.concat(N5,'"></div>')}};function D5(r,t,e,n){var[[t,i],[a,o]]=t,[s,l]=function(t){var{min:[t,e],max:[n,r]}=t.getLocalBounds();let i=0,a=0;return 0<t&&(i=t),n<0&&(i=n),0<e&&(a=e),r<0&&(a=r),[i,a]}(r);if(t===a&&i===o)return rb()([[0,0],[s,l]]);s=[[t-a,i-o]].concat(e).concat([[0,0]]);const c=[n[0]-a,n[1]-o],[u,h]=s;return l=c,t=u,i=h,e=Sb(l,t),t=Sb(t,i),i=Sb(i,l),0<(Math.pow(e,2)+Math.pow(t,2)-Math.pow(i,2))/(2*e*t)&&(a=(()=>{var{min:t,max:e}=r.getLocalBounds(),n=u[0]+(u[1]-c[1])*+u[1]/(u[0]-c[0]);return e[0]<c[0]?Math.min(e[0],n):Math.max(t[0],n)})(),s.splice(1,1,[a,0])),rb()(s)}const z5=Ub(t=>{var e=t.attributes,{x:n,y:r,x0:i=n,y0:a=r,background:o,connector:s,startMarker:l,endMarker:c,coordCenter:u}=e,e=J(e,["class","transform","rotate","x","y","x0","y0","background","connector","startMarker","endMarker","coordCenter"]),h=Q(e,"background"),f=h["padding"],h=J(h,["padding"]),d=Q(e,"connector"),{points:p=[]}=d,d=J(d,["points"]),i=[[+i,+a],[+n,+r]],a=tt(t).maybeAppend("text","text").call(F,e).node(),n=D5(tt(t).maybeAppend("background","rect").style("zIndex",-1).call(F,function(t,e=[]){var[e=0,n=0,r=e,i=n]=e,a=t.parentNode,o=a.getEulerAngles(),{min:t,halfExtents:s}=(a.setEulerAngles(0),t.getLocalBounds()),[t,l]=t,[s,c]=s;return a.setEulerAngles(o),{x:t-i,y:l-e,width:2*s+i+n,height:2*c+e+r}}(a,f)).call(F,o?h:{}).node(),i,p,u),r=l&&new _x({id:"startMarker",style:Object.assign({x:0,y:0},Q(e,"startMarker"))}),a=c&&new _x({id:"endMarker",style:Object.assign({x:0,y:0},Q(e,"endMarker"))});tt(t).maybeAppend("connector","path").style("path",n).style("markerStart",r).style("markerEnd",a).call(F,s?d:{})}),G5=t=>{const l=J(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Bb(r,i,a,o),{color:i,text:a="",fontSize:o,rotate:e=0,transform:s=""}=e,a={text:String(a),stroke:i,fill:i,fontSize:o},[[i,o]]=t;return tt(new z5).style("x",i).style("y",o).call(F,r).style("transform",s+`rotate(${+e}deg)`).style("coordCenter",n.getCenter()).call(F,a).call(F,l).node()}};G5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const W5=Ub(t=>{var e=J(t.attributes,["class","x","y"]);const n=Q(e,"marker"),{size:s=24}=n,r=()=>{var t=s/2,e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,i]=[-e,e-n],[a,o]=[0,0],[e,n]=[e,e-n];return[["M",r,i],["A",t,t,0,1,1,e,n],["L",a,o],["Z"]]};var[i,a]=function(t){var{min:t,max:e}=t.getLocalBounds();return[.5*(t[0]+e[0]),.5*(t[1]+e[1])]}(tt(t).maybeAppend("marker",()=>new _x({})).call(t=>t.node().update(Object.assign({symbol:r},n))).node());tt(t).maybeAppend("text","text").style("x",i).style("y",a).call(F,e)}),V5=t=>{const s=J(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Bb(r,i,a,o),{color:i,text:a=""}=e,o={text:String(a),stroke:i,fill:i},[[e,a]]=t;return tt(new W5).call(F,r).style("x",e).style("y",a).call(F,o).call(F,s).node()}},Y5=(V5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},Ub(t=>{var{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes;tt(t).maybeAppend("connect-path",()=>new Jo({})).style("d",n).call(F,i),tt(t).maybeAppend("area-path",()=>new Jo({})).style("d",e).call(F,r)}));const H5=t=>{const{curve:u,gradient:l=!1,defined:h=t=>!Number.isNaN(t)&&null!=t,connectNulls:f=!1}=t,d=J(t,["curve","gradient","defined","connectNulls"]);return(t,e,c,n)=>{var{mark:r,shape:i,defaultShape:a}=e,n=Bb(n,r,i,a),r=n["fill"],i=J(n,["fill"]),{color:a=r,seriesColor:n,seriesX:r,seriesY:o}=e,e=zb(c,e),n=l&&n?Rb(n,r,o,l):a;const s=Object.assign(Object.assign(Object.assign(Object.assign({},i),{stroke:n,fill:n}),e&&{transform:e}),d);var[r,o]=function(e,n){var r=[],i=[],a=[];let o=!1,s=null;var l=e.length/2;for(let t=0;t<l;t++){var c,u,h=e[t],f=e[t+l];[...h,...f].some(t=>!n(t))?o=!0:(r.push(h),i.push(f),o&&s&&(o=!1,[c,u]=s,a.push([c,h,u,f])),s=[h,f])}return[r.concat(i),a]}(t,h),a=Q(s,"connect"),i=!!o.length,n=t=>tt(new Jo({})).style("d",t).call(F,s).node();return o0(c)?(e=t=>{const n=c.getCenter(),r=t.slice(0,t.length/2),i=t.slice(t.length/2);return t=ib().curve(ab),e=t.curve,a=t.lineX0,o=t.lineX1,s=t.lineY0,l=t.lineY1,t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return lb(a())},delete t.lineX0,t.lineEndAngle=function(){return lb(o())},delete t.lineX1,t.lineInnerRadius=function(){return lb(s())},delete t.lineY0,t.lineOuterRadius=function(){return lb(l())},delete t.lineY1,t.curve=function(t){return arguments.length?e(sb(t)):e()._curve},t.angle((t,e)=>Ab(Ob(r[e],n))).outerRadius((t,e)=>Sb(r[e],n)).innerRadius((t,e)=>Sb(i[e],n)).defined((t,e)=>[...r[e],...i[e]].every(h)).curve(u)(i);var e,a,o,s,l},!i||f&&!Object.keys(a).length?n(e(r)):i&&!f?n(e(t)):tt(new Y5).style("areaStyle",s).style("connectStyle",Object.assign(Object.assign({},a),d)).style("areaPath",e(t)).style("connectPath",o.map(e).join("")).node()):(e=t=>{const n=t.slice(0,t.length/2),r=t.slice(t.length/2);return ib().x((t,e)=>n[e][0]).y1((t,e)=>n[e][1]).y0((t,e)=>r[e][1]).defined((t,e)=>[...n[e],...r[e]].every(h)).curve(u)(n)},!i||f&&!Object.keys(a).length?n(e(r)):i&&!f?n(e(t)):tt(new Y5).style("areaStyle",s).style("connectStyle",Object.assign(Object.assign({},a),d)).style("areaPath",e(t)).style("connectPath",o.map(e).join("")).node())}},q5=(H5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=o0(n)?bb:tb;return H5(Object.assign({curve:i},a))(t,e,n,r)}),U5=(q5.props=Object.assign({},H5.props),t=>{const{alpha:a=.5}=t,o=J(t,["alpha"]);return(t,e,n,r)=>{var i=o0(n)?mb:gb;return H5(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),X5=(U5.props=Object.assign({},H5.props),i=>(t,e,n,r)=>H5(Object.assign({curve:wb},i))(t,e,n,r)),$5=(X5.props=Object.assign({},H5.props),t=>{const l=t["arrowSize"],c=J(t,["arrowSize"]);return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=Bb(r,a,o,s),a=r["stroke"],o=J(r,["stroke"]),{color:s=a,transform:r}=e,[e,a]=t,t=Vv();return t.moveTo(...e),t.lineTo(...a),l&&([e,i]=Cb(e,a,{arrowSize:l}),t.moveTo(...a),t.lineTo(...e),t.moveTo(...a),t.lineTo(...i)),tt(new Jo).call(F,o).style("d",t.toString()).style("stroke",s).style("transform",r).call(F,c).node()}}),K5=($5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=J(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Bb(r,i,a,o),i=r["stroke"],a=J(r,["stroke"]),{color:o=i,transform:r}=e,[e,i]=t,t=Vv();return t.moveTo(e[0],e[1]),t.bezierCurveTo(e[0]/2+i[0]/2,e[1],e[0]/2+i[0]/2,i[1],i[0],i[1]),tt(new Jo).call(F,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(F,s).node()}});K5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Z5=t=>{const{cornerRatio:u=1/3}=t,h=J(t,["cornerRatio"]);return(t,e,n,r)=>{var i,a,{mark:o,shape:s,defaultShape:l}=e,r=Bb(r,o,s,l),o=r["stroke"],s=J(r,["stroke"]),{color:l=o,transform:r}=e,[e,o]=t,c=(t=e,e=o,o=n,n=u,a=Vv(),o0(o)?(i=Sb(t,c=o.getCenter()),i=(Sb(e,c)-i)*n+i,a.moveTo(t[0],t[1]),jb(a,t,e,c,i)):a0(o)?(a.moveTo(t[0],t[1]),a.lineTo(t[0]+(e[0]-t[0])*n,t[1]),a.lineTo(t[0]+(e[0]-t[0])*n,e[1])):(a.moveTo(t[0],t[1]),a.lineTo(t[0],t[1]+(e[1]-t[1])*n),a.lineTo(e[0],t[1]+(e[1]-t[1])*n)),a.lineTo(e[0],e[1]),a);return tt(new Jo).call(F,s).style("d",c.toString()).style("stroke",l).style("transform",r).call(F,h).node()}},J5=(Z5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=J(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Bb(r,i,a,o),i=r["stroke"],a=J(r,["stroke"]),{color:o=i,transform:r}=e,[e,i]=t,t=Vv();return t.moveTo(e[0],e[1]),o0(n)?(n=n.getCenter(),t.quadraticCurveTo(n[0],n[1],i[0],i[1])):jb(t,e,i,Pb(e,i),Sb(e,i)/2),tt(new Jo).call(F,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(F,s).node()}}),Q5=(J5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const u=J(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Bb(r,i,a,o),i=r["stroke"],a=J(r,["stroke"]),{color:o=i,src:r="",size:e=32,transform:i=""}=e,{width:s=e,height:l=e}=u,[[t,c]]=t,t=t-Number(s)/2,s=c-Number(l)/2;return tt(new Xo).call(F,a).style("x",t).style("y",s).style("width",e).style("height",e).style("img",r).style("stroke",o).style("transform",i).call(F,u).node()}});Q5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const tE=t=>{const l=J(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=Bb(r,e,i,a),{fill:e,stroke:i}=r,a=J(r,["fill","stroke"]),r=function(i,t){const a=Vv();if(o0(t)){const o=t.getCenter();t=[...i,i[0]];const s=t.map(t=>Sb(t,o));return t.forEach((t,e)=>{var n,r;0===e?a.moveTo(t[0],t[1]):(n=s[e],r=i[e-1],void 0!==(e=s[e-1])&&Math.abs(n-e)<1e-10?jb(a,r,t,o,n):a.lineTo(t[0],t[1]))}),a.closePath(),a}return n=a,i.forEach((t,e)=>0===e?n.moveTo(t[0],t[1]):n.lineTo(t[0],t[1])),n.closePath(),n;var n}(t,n);return tt(new Jo).call(F,a).style("d",r.toString()).style("stroke",o||i).style("fill",o||e).style("transform",s).call(F,l).node()}};tE.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const eE=t=>{const l=J(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=Bb(r,e,i,a),{fill:e,stroke:i}=r,a=J(r,["fill","stroke"]),r=function(t,e){var n,[t,r,i,a]=t,o=Vv();return o0(e)?(n=Sb(e=e.getCenter(),t),o.moveTo(t[0],t[1]),o.quadraticCurveTo(e[0],e[1],i[0],i[1]),jb(o,i,a,e,n),o.quadraticCurveTo(e[0],e[1],r[0],r[1]),jb(o,r,t,e,n),o.closePath()):(o.moveTo(t[0],t[1]),o.bezierCurveTo(t[0]/2+i[0]/2,t[1],t[0]/2+i[0]/2,i[1],i[0],i[1]),o.lineTo(a[0],a[1]),o.bezierCurveTo(a[0]/2+r[0]/2,a[1],a[0]/2+r[0]/2,r[1],r[0],r[1]),o.lineTo(t[0],t[1]),o.closePath()),o}(t,n);return tt(new Jo).call(F,a).style("d",r.toString()).style("fill",o||e).style("stroke",o||i).style("transform",s).call(F,l).node()}};eE.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const nE=t=>{const y=J(t,[]);return(t,e,n,r)=>{var i,a,o,s,l,c,u,{mark:e,shape:h,defaultShape:f,color:d,transform:p}=e,r=Bb(r,e,h,f),{fill:e,stroke:h}=r,f=J(r,["fill","stroke"]),g=(r=t,t=n,n=Vv(),o0(t)?([i,a]=t=t.getCenter(),o=_b(Ob(r[0],t)),s=_b(Ob(r[1],t)),g=Sb(t,r[2]),l=Sb(t,r[3]),c=Sb(t,r[8]),u=Sb(t,r[10]),t=Sb(t,r[11]),n.moveTo(...r[0]),n.arc(i,a,g,o,s),n.arc(i,a,g,s,o,!0),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.arc(i,a,l,o,s),n.lineTo(...r[6]),n.arc(i,a,u,s,o,!0),n.closePath(),n.moveTo(...r[8]),n.arc(i,a,c,o,s),n.arc(i,a,c,s,o,!0),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.arc(i,a,t,o,s),n.arc(i,a,t,s,o,!0)):(n.moveTo(...r[0]),n.lineTo(...r[1]),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.lineTo(...r[5]),n.lineTo(...r[6]),n.lineTo(...r[7]),n.closePath(),n.moveTo(...r[8]),n.lineTo(...r[9]),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.lineTo(...r[13])),n);return tt(new Jo).call(F,f).style("d",g.toString()).style("stroke",h).style("fill",d||e).style("transform",p).call(F,y).node()}};nE.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const rE=t=>{const s=J(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Bb(r,i,a,o),{stroke:i,lineWidth:a}=r,o=J(r,["stroke","lineWidth"]),{color:r=i,size:i=a}=e,t=(a=t,o0(t=n)?(t=t.getCenter(),Zv()({startAngle:0,endAngle:2*Math.PI,outerRadius:Sb(a[0],t),innerRadius:Sb(a[1],t)})):rb().x(t=>t[0]).y(t=>t[1])(a)),a=(a=n,n=e.transform,o0(a)?([a,e]=a.getCenter(),`translate(${a}, ${e}) `+(n||"")):n);return tt(new Jo({})).call(F,o).style("d",t).style("stroke",r).style("lineWidth",i).style("transform",a).call(F,s).node()}};function iE(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}rE.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const aE=Ub(t=>{var e=t.attributes,{points:n,endMarker:r=!0}=e,e=J(e,["points","class","endMarker","direction"]),i=Q(e,"endMarker"),n=(n=n,rb().x(t=>t[0]).y(t=>t[1])(n));tt(t).maybeAppend("connector","path").style("path",n).style("markerEnd",r?new _x({className:"marker",style:Object.assign(Object.assign({},i),{symbol:iE})}):null).call(F,e)});const oE=t=>{const{offset:s=0,connectLength1:l}=t,c=J(t,["offset","connectLength1"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Bb(r,i,a,o),{fill:i,stroke:a=i,connectLength1:o=l}=r,i=J(r,["fill","stroke","connectLength1"]),{color:r,transform:e}=e,n=function(t,e,n,r=0){var[[e,i],[a,o]]=e;if(a0(t)){const l=n;var t=e+l,s=t+r;return[[t,i],[s,i],[s,o],[a+l,o]]}const l=-n;return t=i+l,[[e,t],[e,s=t+-r],[a,s],[a,o+l]]}(n,t,s,o);return tt(new aE).call(F,i).style("points",n).style("stroke",r||a).style("transform",e).call(F,c).node()}};function sE(t,e,a,n){var r=a["bounds"];const[[o,s],[i,l]]=r,c=i-o,u=l-s;r=t=>{var{x:e,y:n}=t,r=tg(a.x,c),i=tg(a.y,u);return Object.assign(Object.assign({},t),{x:(r||e)+o,y:(i||n)+s})};return r("left"===t?{x:0,y:u/2,textAnchor:"start",textBaseline:"middle"}:"right"===t?{x:c,y:u/2,textAnchor:"end",textBaseline:"middle"}:"top"===t?{x:c/2,y:0,textAnchor:"center",textBaseline:"top"}:"bottom"===t?{x:c/2,y:u,textAnchor:"center",textBaseline:"bottom"}:"top-left"===t?{x:0,y:0,textAnchor:"start",textBaseline:"top"}:"top-right"===t?{x:c,y:0,textAnchor:"end",textBaseline:"top"}:"bottom-left"===t?{x:0,y:u,textAnchor:"start",textBaseline:"bottom"}:"bottom-right"===t?{x:c,y:u,textAnchor:"end",textBaseline:"bottom"}:{x:c/2,y:u/2,textAnchor:"center",textBaseline:"middle"})}function lE(r,i,t,e){var{y:t,y1:n,autoRotate:a,rotateToAlignArc:o}=t;const s=e.getCenter(),{innerRadius:l,outerRadius:c,startAngle:u,endAngle:h}=Ib(e,i,[t,n]),f="inside"===r?(u+h)/2:h;e=uE(f,a,o),t=(()=>{var[t,e]=i,n=l+.5*(c-l),[n,t]="inside"===r?cE(s,f,n):Pb(t,e);return{x:n,y:t}})();return Object.assign(Object.assign({},t),{textAlign:"inside"===r?"center":"start",textBaseline:"middle",rotate:e})}function cE(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function uE(t,e,n){return e?(e=n?0:Math.sin(t)<0?90:-90,t/Math.PI*180+e):0}function hE(r,t,e,n){const{y:i,y1:a,autoRotate:o,rotateToAlignArc:s,connector:l=!0,connectorLength2:c=0,connectorDistance:u=0,radius:h=.5,offset:f=0}=e,d=Ib(n,t,[i,a]);var{startAngle:e,endAngle:t}=d;const p=n.getCenter(),g=(e+t)/2;var[e,t]=(()=>{var t="inside"===r?h:1,{innerRadius:e,outerRadius:n}=d,n=e+(n-e)*t;return[n,n+f]})();const y=0<Math.sin(g)?1:-1;var[e,t,...m]=((t,e)=>{var[t,n]=cE(p,g,t),[e,r]=cE(p,g,e),i=l?y*c:0;return[[t,n],[e+i,r],[-i,0]]})(e,t),m={connector:l,connectorPoints:m,dx:l?+u*y:0},v=(t,e="x",n="y")=>({[e]:t[0],[n]:t[1]});return Object.assign(Object.assign(Object.assign(Object.assign({},v(e,"x0","y0")),v(t)),(e=r,v=0<y||s0(n),t=uE(g,o,s),"inside"===e?{textAlign:"center",textBaseline:"middle",rotate:t}:{textAlign:v?"start":"end",textBaseline:"middle",rotate:t})),m)}function fE(t,e,n,r){var i=n["bounds"];return 1===i.length?([i]=i=(i=n).bounds,{x:i[0],y:i[1]}):(s0(r)?lE:h0(r)?hE:sE)(t,e,n,r)}oE.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var dE=Object.freeze({__proto__:null,area:function(t,e,n,r){var i=e.length/2;const a=e.slice(0,i),o=e.slice(i);var e=Kp(a,(t,e)=>Math.abs(t[1]-o[e][1])),i=(l=t=>[a[t][0],(a[t][1]+o[t][1])/2])(e=Math.max(Math.min(e,i-2),1)),s=l(e-1),l=_b(Ob(l(e+1),s))/Math.PI*180;return{x:i[0],y:i[1],transform:`rotate(${l}deg)`,textAlign:"center",textBaseline:"middle"}},bottom:fE,bottomLeft:fE,bottomRight:fE,inside:fE,left:fE,outside:fE,right:fE,spider:function(t,e,n,r,i){var a,o,s,l;return h0(r)?({edgeDistance:i=0}=i,e=J(hE("outside",e,n,r),[]),{x:n,width:o}=r.getOptions(),r=r.getCenter(),i=tg(i,o),{x:s,x0:l,y0:a}=e,n=s<=r[0]?n+i-s:n+o-i-s,{x:o,y:i}=(e.x+=n,e),s=Ob([l,a],r),n=Ob([0,i],r),l=s[1]?s[0]*n[1]/s[1]+r[0]:o,e.connectorPoints=[[l-o,0]],e):{}},surround:function(t,e,n,r,i){var a,o,s;return h0(r)?({offset:i=12}=i,e=J(hE("outside",e,n,r),[]),n=r.getCenter(),r=function(t){if(h0(t)){var[e,n]=t.getSize(),t=t.getOptions().transformations.find(t=>"polar"===t[0]);if(t)return Math.max(e,n)/2*t[4]}return 0}(r)+i,{x0:i,y0:a,connector:o,connectorLength2:s=0}=e,i=Ab([i-n[0],a-n[1]]),a=o?s*(Math.sin(i)<0?-1:1):0,o=n[0]+Math.sin(i)*r,s=n[1]-Math.cos(i)*r,e.x=o+a,e.y=s,e.connectorPoints=[[-a,0]],e):{}},top:fE,topLeft:fE,topRight:fE});function pE(t,e,n,r,i){var a=e["position"],a=(o=n,void 0!==(a=a)?a:h0(o)?"inside":a0(o)?"right":"top"),o=r["inside"===a?"innerLabel":"label"],r=Object.assign({},o,e),e=dE[a.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})];if(e)return Object.assign(Object.assign({},o),e(a,t,r,n,i));throw new Error("Unknown position: "+a)}const gE=o=>(t,e,n,r)=>{var i=e["text"],a=J(e,["text","x","y"]),t=pE(t,e,n,r,o),{rotate:e=0,transform:r=""}=t,t=J(t,["rotate","transform"]);return tt(new z5).call(F,t).style("text",""+i).style("transform",r+`rotate(${+e}deg)`).style("coordCenter",n.getCenter()).call(F,a).node()},yE=(gE.props={},t=>{const s=t["colorAttribute"],l=J(t,["arrow","colorAttribute"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=J(Bb(r,i,a,o),["stroke"]),{d:i,color:a}=e;return tt(new Jo).call(F,r).style("d",i).style(s,a).call(F,l).node()}}),mE=(yE.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>yE(Object.assign({colorAttribute:"fill"},t))),vE=(mE.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>yE(Object.assign({fill:"none",colorAttribute:"stroke"},t))),bE=(vE.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const a=t["render"],o=J(t,["render"]);return(t,e,n,r)=>{var[[t,i]]=t;return a(Object.assign(Object.assign({},o),{x:t,y:i}))}}),xE=(bE.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},{BLACK:"#000",WHITE:"#fff",STROKE:"#416180"}),wE=t=>{var e="#5B8FF9",e={defaultColor:e,defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:xE.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"transparent",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1,connectStroke:"#aaa"}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,fill:"",strokeOpacity:.95,lineWidth:1},plus:{r:3,fill:"",strokeOpacity:.95,lineWidth:3},diamond:{r:3,fill:"",strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0,connectFill:xE.BLACK,connectFillOpacity:.1}},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:xE.BLACK,lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,strokeWidth:0,connectorStroke:xE.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:xE.STROKE,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:xE.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:xE.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:xE.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:xE.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:xE.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:xE.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:xE.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:xE.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:xE.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,lineStroke:xE.BLACK,lineStrokeOpacity:.45,lineLineWidth:.5,lineArrow:null,tickStroke:xE.BLACK,tickStrokeOpacity:.25,tickLineWidth:1,tickLength:4,labelFill:xE.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,labelAlign:"horizontal",gridStroke:xE.BLACK,gridStrokeOpacity:.05,gridLineWidth:.5,gridLineDash:[0,0],titleTransformOrigin:"center"},axisTop:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle",labelSpacing:8,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisBottom:{titleSpacing:10,titleTextBaseline:"bottom",labelSpacing:12,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"},axisLeft:{titleTextBaseline:"middle",titleSpacing:10,titlePosition:"left",titleTransformOrigin:"center",titleTransform:"translate(50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"positive",labelAutoRotate:!1,tickDirection:"positive",gridDirection:"negative"},axisRight:{titleTextBaseline:"top",titleSpacing:0,titlePosition:"right",titleTransformOrigin:"center",titleTransform:"translate(-50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisArcY:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"bottom",gridDirection:"negative",gridConnect:"arc",gridControlAngles:[90,180,360],gridType:"surround",girdClosed:!0},legend:{padding:8,showTitle:!1,titleFill:xE.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,itemMarkerFill:e,itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemLabelFill:xE.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemValueFill:xE.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:xE.BLACK,navButtonFillOpacity:.65,navPageNumFill:xE.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,backgroundFill:"transparent"},continuousLegend:{labelFill:xE.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:xE.BLACK,handleMarkerFillOpacity:.6,handleMarkerStroke:xE.BLACK,handleMarkerStrokeOpacity:.25,handleMarkerLineWidth:1,handleLabelFill:xE.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},label:{fill:xE.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null,offset:12,connectorStroke:xE.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength2:8,connectorDistance:4},innerLabel:{fill:xE.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{trackSize:16,backgroundFill:xE.STROKE,backgroundFillOpacity:1,selectionFill:e,selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:xE.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:xE.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{},title:{fill:xE.BLACK,fillOpacity:.85,fontSize:24,fontWeight:"bold",textBaseline:"top"},subtitle:{fill:xE.BLACK,fillOpacity:.65,fontSize:10,fontWeight:"normal",textBaseline:"top"}};return Object.assign({},e,t)},kE=(wE.props={},{BLACK:"#fff",WHITE:"#000",STROKE:"#416180"}),EE=t=>{var e="#5B8FF9",e={defaultColor:e,defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:kE.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"#141414",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1,connectStroke:"#666"}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,fill:"",strokeOpacity:.95,lineWidth:1},plus:{r:3,fill:"",strokeOpacity:.95,lineWidth:3},diamond:{r:3,fill:"",strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0,connectFill:kE.BLACK,connectFillOpacity:.1}},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:kE.BLACK,lineWidth:1}},text:{text:{fill:kE.BLACK,fillOpacity:.65,fontSize:12,strokeWidth:0,connectorStroke:kE.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:kE.STROKE,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:kE.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:kE.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:kE.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:kE.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:kE.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:kE.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:kE.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:kE.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:kE.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,lineStroke:kE.BLACK,lineStrokeOpacity:.45,lineLineWidth:.5,lineArrow:null,tickStroke:kE.BLACK,tickStrokeOpacity:.25,tickLineWidth:1,tickLength:4,labelFill:kE.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,labelAlign:"horizontal",gridStroke:kE.BLACK,gridStrokeOpacity:.05,gridLineWidth:.5,gridLineDash:[0,0],titleTransformOrigin:"center"},axisTop:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle",labelSpacing:8,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisBottom:{titleSpacing:10,titleTextBaseline:"bottom",labelSpacing:12,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"},axisLeft:{titleTextBaseline:"middle",titleSpacing:10,titlePosition:"left",titleTransformOrigin:"center",titleTransform:"translate(50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"positive",labelAutoRotate:!1,tickDirection:"positive",gridDirection:"negative"},axisRight:{titleTextBaseline:"top",titleSpacing:0,titlePosition:"right",titleTransformOrigin:"center",titleTransform:"translate(-50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisArcY:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"bottom",gridDirection:"negative",gridConnect:"arc",gridControlAngles:[90,180,360],gridType:"surround",girdClosed:!0},legend:{padding:8,showTitle:!1,titleFill:kE.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,itemMarkerFill:e,itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemLabelFill:kE.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemValueFill:kE.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:kE.BLACK,navButtonFillOpacity:.45,navPageNumFill:kE.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,backgroundFill:"transparent"},continuousLegend:{labelFill:kE.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:kE.BLACK,handleMarkerFillOpacity:.6,handleMarkerStroke:kE.BLACK,handleMarkerStrokeOpacity:.25,handleMarkerLineWidth:1,handleLabelFill:kE.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},label:{fill:kE.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null,offset:12,connectorStroke:kE.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength2:8,connectorDistance:4},innerLabel:{fill:kE.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{trackSize:16,backgroundFill:kE.STROKE,backgroundFillOpacity:1,selectionFill:e,selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:kE.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:kE.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{},title:{fill:kE.BLACK,fillOpacity:.85,fontSize:24,fontWeight:"bold",textBaseline:"top"},subtitle:{fill:kE.BLACK,fillOpacity:.65,fontSize:10,fontWeight:"normal",textBaseline:"top"}};return Object.assign({},e,t)},ME=(EE.props={},EE.props={},{BLACK:"#000",WHITE:"#fff",STROKE:"#888"}),OE=t=>{var e="#4e79a7",e={defaultColor:e,defaultCategory10:"tableau10",defaultCategory20:"tableau10",defaultSize:1,elementActiveStroke:ME.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"transparent",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1,connectStroke:"#aaa"}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,fill:"",strokeOpacity:.95,lineWidth:1},plus:{r:3,fill:"",strokeOpacity:.95,lineWidth:3},diamond:{r:3,fill:"",strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0,connectFill:ME.BLACK,connectFillOpacity:.1}},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:"#1D2129",lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:10,strokeWidth:0,connectorStroke:ME.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:ME.STROKE,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:ME.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:ME.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:ME.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:ME.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:ME.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:ME.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:ME.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:ME.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:ME.BLACK,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold",titleSpacing:12,line:!0,lineStroke:"#888",lineStrokeOpacity:1,lineLineWidth:1,lineArrow:null,tickStroke:ME.STROKE,tickStrokeOpacity:1,tickLineWidth:1,tickLength:5,labelFill:ME.BLACK,labelFillOpacity:1,labelFontSize:10,labelAutoRotate:!1,labelFontWeight:"normal",labelSpacing:4,labelAlign:"horizontal",gridStroke:"#ddd",gridStrokeOpacity:1,gridLineWidth:1,gridLineDash:[0,0],titleTransformOrigin:"center"},axisTop:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle",labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisBottom:{titleSpacing:4,titleTextBaseline:"bottom",labelSpacing:8,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"},axisLeft:{titleTextBaseline:"middle",titleSpacing:4,titlePosition:"left",titleTransformOrigin:"center",titleTransform:"translate(50%, 0) rotate(-90) translate(0, -50%)",labelSpacing:4,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"},axisRight:{titleTextBaseline:"top",titleSpacing:0,titlePosition:"right",titleTransformOrigin:"center",titleTransform:"translate(-50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"},axisArcY:{titlePosition:"top",titleSpacing:0,titleTextBaseline:"bottom",gridDirection:"negative",gridConnect:"arc",gridControlAngles:[90,180,360],gridType:"surround",girdClosed:!0},legend:{padding:8,showTitle:!1,titleFill:ME.BLACK,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold",titleSpacing:4,itemMarkerFill:e,itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,4],itemLabelFill:ME.BLACK,itemLabelFillOpacity:1,itemLabelFontSize:10,itemLabelFontWeight:"normal",itemValueFill:ME.BLACK,itemValueFillOpacity:1,itemValueFontSize:10,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:ME.BLACK,navButtonFillOpacity:.45,navButtonSize:6,navPageNumFill:ME.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:10,backgroundFill:"transparent"},continuousLegend:{showTitle:!1,labelFill:ME.BLACK,labelFillOpacity:.45,labelFontSize:10,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:ME.BLACK,handleMarkerFillOpacity:.6,handleMarkerStroke:ME.BLACK,handleMarkerStrokeOpacity:.25,handleMarkerLineWidth:1,handleLabelFill:ME.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:10,handleLabelFontWeight:"normal"},label:{fill:ME.BLACK,fillOpacity:.65,fontSize:10,fontWeight:"normal",stroke:null,offset:12,connectorStroke:ME.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength2:8,connectorDistance:4},innerLabel:{fill:ME.WHITE,fontSize:10,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{trackSize:16,backgroundFill:ME.STROKE,backgroundFillOpacity:.05,selectionFill:e,selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:ME.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:ME.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:10,handleLabelFontWeight:"normal"},scrollbar:{},title:{fill:ME.BLACK,fillOpacity:.85,fontSize:24,fontWeight:"bold",textBaseline:"top"},subtitle:{fill:ME.BLACK,fillOpacity:.65,fontSize:10,fontWeight:"normal",textBaseline:"top"}};return Object.assign({},e,t)};function SE(t,e){var n;return(e=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0?null:[1<(n=t.slice(0,e)).length?n[0]+n.slice(2):n,+t.slice(e+1)]}OE.props={};var _E,AE=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function TE(t){var e;if(e=AE.exec(t))return new PE({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]});throw new Error("invalid format: "+t)}function PE(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+""}function LE(t,e){var n,e=SE(t,e);return e?(n=e[0],(e=e[1])<0?"0."+new Array(-e).join("0")+n:n.length>e+1?n.slice(0,e+1)+"."+n.slice(e+1):n+new Array(e-n.length+2).join("0")):t+""}TE.prototype=PE.prototype,PE.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};var NE={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return 1e21<=Math.abs(t=Math.round(t))?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)=>LE(100*t,e),r:LE,s:function(t,e){var n,r,i=SE(t,e);return i?(n=i[0],(i=(i=i[1])-(_E=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1)===(r=n.length)?n:r<i?n+new Array(i-r+1).join("0"):0<i?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+SE(t,Math.max(0,e+i-1))[0]):t+""},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function CE(t){return t}var jE,RE,FE=Array.prototype.map,IE=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function BE(t){var e,s,l,k=void 0===t.grouping||void 0===t.thousands?CE:(s=FE.call(t.grouping,Number),l=t.thousands+"",function(t,e){for(var n=t.length,r=[],i=0,a=s[0],o=0;0<n&&0<a&&(e<o+a+1&&(a=Math.max(1,e-o)),r.push(t.substring(n-=a,n+a)),!((o+=a+1)>e));)a=s[i=(i+1)%s.length];return r.reverse().join(l)}),r=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",E=void 0===t.decimal?".":t.decimal+"",M=void 0===t.numerals?CE:(e=FE.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}),a=void 0===t.percent?"%":t.percent+"",O=void 0===t.minus?"−":t.minus+"",S=void 0===t.nan?"NaN":t.nan+"";function o(t){var c=(t=TE(t)).fill,u=t.align,h=t.sign,e=t.symbol,f=t.zero,d=t.width,p=t.comma,g=t.precision,y=t.trim,m=t.type,v=("n"===m?(p=!0,m="g"):NE[m]||(void 0===g&&(g=12),y=!0,m="g"),(f||"0"===c&&"="===u)&&(f=!0,c="0",u="="),"$"===e?r:"#"===e&&/[boxX]/.test(m)?"0"+m.toLowerCase():""),b="$"===e?i:/[%p]/.test(m)?a:"",x=NE[m],w=/[defgprs%]/.test(m);function n(t){var e,n,r,i=v,a=b;if("c"===m)a=x(t)+a,t="";else{var o=(t=+t)<0||1/t<0;if(t=isNaN(t)?S:x(Math.abs(t),g),y&&(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;0<i&&(i=0)}return 0<i?t.slice(0,i)+t.slice(e+1):t}(t)),i=((o=o&&0==+t&&"+"!==h?!1:o)?"("===h?h:O:"-"===h||"("===h?"":h)+i,a=("s"===m?IE[8+_E/3]:"")+a+(o&&"("===h?")":""),w)for(e=-1,n=t.length;++e<n;)if((r=t.charCodeAt(e))<48||57<r){a=(46===r?E+t.slice(e+1):t.slice(e))+a,t=t.slice(0,e);break}}p&&!f&&(t=k(t,1/0));var s=i.length+t.length+a.length,l=s<d?new Array(d-s+1).join(c):"";switch(p&&f&&(t=k(l+t,l.length?d-a.length:1/0),l=""),u){case"<":t=i+t+a+l;break;case"=":t=i+l+t+a;break;case"^":t=l.slice(0,s=l.length>>1)+i+t+a+l.slice(s);break;default:t=l+i+t+a}return M(t)}return g=void 0===g?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),n.toString=function(){return t+""},n}return{format:o,formatPrefix:function(t,e){var n=o(((t=TE(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor((t=e,((t=SE(Math.abs(t)))?t[1]:NaN)/3)))),r=Math.pow(10,-e),i=IE[8+e/3];return function(t){return n(r*t)+i}}}}function DE(t,e,n){return t.querySelector(e)?tt(t).select(e):tt(t).append(n)}function zE(t){return Array.isArray(t)?t.join(", "):""+(t||"")}function GE(t){var{innerWidth:t,innerHeight:e}=t.getOptions();return[t,e]}function WE(a,t,e,n,r,i,o,s){void 0===e&&void 0===i||a.update(Object.assign(Object.assign({},e&&{tickCount:e}),i&&{tickMethod:i})),e=t,t=i;var l,t=(i=a).getTicks?i.getTicks():t?([c,l]=Tp(e,t=>+t),i=i.getOptions()["tickCount"],t(c,l,i)):e,c=r?t.filter(r):t;const u=(null==(l=a.getFormatter)?void 0:l.call(a))||n,h=function(t,e){var{innerWidth:e,innerHeight:n,insetTop:r,insetBottom:i,insetLeft:a,insetRight:o}=e.getOptions(),[t,r,i]="left"===t||"right"===t?[r,i,n]:[a,o,e];const s=new Dm({domain:[0,1],range:[t/i,1-r/i]});return t=>s.map(t)}(o,s),f=function(r,i){const{width:a,height:o}=i.getOptions();return t=>{var e,n;return u0(i)?(e=i.map("bottom"===r?[t,1]:[0,t]),"bottom"===r?(n=e[0],new Dm({domain:[0,a],range:[0,1]}).map(n)):"left"===r?(n=e[1],new Dm({domain:[0,o],range:[0,1]}).map(n)):t):t}}(o,s);return o0(s)||a0(s)?(i=c.map((t,e,n)=>{var r,i=(null==(i=a.getBandWidth)?void 0:i.call(a,t))/2||0,i=h(a.map(t)+i);return{value:a0(s)&&null!=(r=a.getTicks)&&r.call(a)?1-i:i,label:u(t,e,n),id:String(e)}}),s0(s)&&"arcY"===o?i.map(t=>{var e=t["value"],t=J(t,["value"]);return Object.assign({value:1-e},t)}):i):c.map((t,e,n)=>{var r=(null==(r=a.getBandWidth)?void 0:r.call(a,t))/2||0;return{value:f(h(a.map(t)+r)),label:""+u("number"!=typeof(r=t)||Math.abs(r)<1e-15?r:parseFloat(r.toFixed(15)),e,n),id:String(e)}})}function VE(t,e,n){var r;return!(o0(r=e)&&a0(r)||c0(e))&&(void 0===t?!!n.getTicks:t)}fo=BE({thousands:",",grouping:[3],currency:["$",""]}),jE=fo.format,fo.formatPrefix;const YE=t=>{const{position:c,labelFormatter:u=t=>""+t,tickFilter:h,tickCount:f,tickMethod:d,title:p,grid:g=!1}=t,y=J(t,["order","size","position","labelFormatter","tickFilter","tickCount","tickMethod","title","grid"]);return(t,e,n,r)=>{var{domain:e,bbox:i}=e,{x:i,y:a,width:o,height:s}=i,i=[i+o/2,a+s/2],a=WE(t,e,f,u,h,d,c,n),t=Math.min(o,s)/2,[e,o]=function(t){var[,t,e]=(t=t.getOptions()["transformations"]).find(t=>"polar"===t[0]);return[180*+t/Math.PI,180*+e/Math.PI]}(n),[s,l]=function(t){var[,,,t,e]=(t=t.getOptions()["transformations"]).find(t=>"polar"===t[0]);return[+t,+e]}(n),s=function(t,e,n,r){var[i,a]=GE(r),n={titleFillOpacity:0,titlePosition:"inner",showLine:!1,showTick:!0,gridLength:(n-e)*(Math.min(i,a)/2)};return"arcInner"===t?(GE(r),Object.assign(Object.assign({},n),{labelAlign:"perpendicular",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",gridDirection:"negative"})):Object.assign(Object.assign({},n),{labelAlign:"parallel",labelDirection:"negative",labelSpacing:8,tickDirection:"negative",gridDirection:"positive"})}(c,s,l,n),l=r["axis"];return new dk({style:R({},l,s,Object.assign({type:"arc",center:i,radius:t,angleRange:[e,o],data:a,title:zE(p),showGrid:g},y))})}};const HE=t=>{const{position:h,title:f,labelFormatter:d=t=>""+t,direction:p="left",tickCount:g,tickFilter:y,tickMethod:m}=t,v=J(t,["order","size","transform","position","title","labelFormatter","direction","tickCount","tickFilter","tickMethod"]);return(t,e,n,r)=>{var{domain:e,bbox:i}=e,e=WE(t,e,g,d,y,m,h,n),a=(a=t,r=r,o=h,s=p,r=Object.assign({},r.axis,r["axis"+$0("centerHorizontal"===o?"left":o)]||r.axisTop),"bottom"===o?Object.assign(Object.assign({},r),{titlePosition:a.getTicks?"right-bottom":"bottom",titleTransformOrigin:"center",titleTransform:a.getTicks?"translate(-100%, 0)":void 0}):"arcY"===o?Object.assign(Object.assign({},r),{labelDirection:"right"===s?"negative":"positive",labelTransform:"center"===s?"translate(50%, 0)":"",tickDirection:"right"===s?"negative":"positive",labelSpacing:"center"===s?0:4,tick:"center"!==s&&void 0}):r),{labelAutoRotate:o=!0,labelAutoHide:s=!1,label:r=!0,tick:l=!0,line:c=!1,grid:u}=Object.assign({},a,v),u=VE(u,n,t),t=function(t,e){var[e,n]=GE(e);return"bottom"===t||"top"===t?n:e}(h,n),i=function(t,e,n){var[,n]=n.getCenter(),{x:r,y:i,width:a,height:o}=e;return"bottom"===t?{startPos:[r,i],endPos:[r+a,i]}:"left"===t||"centerHorizontal"===t?{startPos:[r+a,i],endPos:[r+a,i+o],showLine:"centerHorizontal"===t||void 0}:"right"===t?{endPos:[r,i+o],startPos:[r,i]}:"arcY"===t?{startPos:[r,i],endPos:[r+a,i+o],gridCenter:[e.x,n+e.y]}:{startPos:[r,i+o],endPos:[r+a,i+o],showLine:"centerVertical"===t||void 0}}(h,i,n),{showLine:n=c}=i,c=J(i,["showLine"]),e=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a),{type:"linear",data:e,title:zE(f),showLabel:r,labelTransforms:(i=o,a=[],s&&a.push({type:"hide"}),i&&a.push({type:"rotate",optionalAngles:[0,30,45,60,90]}),a),showGrid:u,showTick:l,gridLength:t}),v),{showLine:!0}),n?null:{lineOpacity:0}),c);return new dk({style:e})}},qE=t=>{const{position:i,labelFormatter:e=t=>""+t}=t;var n="string"==typeof e?jE(e):e;const a=Object.assign(Object.assign({},t),{labelFormatter:n});return(t,e,n,r)=>("arc"===i||"arcInner"===i?YE:HE)(a)(t,e,n,r)},UE=(qE.props={defaultPosition:"left",defaultSize:45,defaultOrder:0},t=>qE(t)),XE=(UE.props=Object.assign(Object.assign({},qE.props),{defaultPosition:"bottom"}),t=>qE(t));XE.props=Object.assign(Object.assign({},qE.props),{defaultPosition:"left"});const $E=t=>{const{position:u,labelFormatter:h=t=>""+t,dx:f=0,dy:d=0,title:p,gridCol:g,gridRow:y}=t,m=J(t,["order","size","position","labelFormatter","dx","dy","title","gridCol","gridRow"]);return(e,t,n,r)=>{var{domain:t,bbox:i}=t,{x:i,y:a,width:o,height:s}=i,t=t.map(t=>({id:t,label:h(t),value:"",color:e.map(t)})),[l,c]=function(t,e,n){var[r,i]=[e||100,n||100];return{top:[1,i],bottom:[1,i],left:[r,1],right:[r,1],arcCenter:[r,1]}[t]||[e,n]}(u,y,g),t={data:t,x:i+f,y:a+d,orient:["right","left","arcCenter"].includes(u)?"vertical":"horizontal",width:o,height:s,gridCol:c,gridRow:l,rowPadding:0,colPadding:8,titleText:zE(p),itemMarkerFill:t=>t?t.color:"#fff"},{legend:i={}}=r;return new jk({className:"legend-category",style:Object.assign({},i,t,m)})}},KE=($E.props={defaultPosition:"top",defaultOrder:1,defaultSize:40},t=>{const l=t["title"],c=J(t,["title"]);return(e,t,n,r)=>{var{domain:t,bbox:i}=t,{x:i,y:a}=i,[o,s]=t,{continuousLegend:r={}}=r;return new e5({style:Object.assign({},r,{x:i,y:a,width:400,height:300,data:[{value:o},{value:s}],titleText:zE(l),titleFontSize:12,ribbonLen:120,ribbonSize:12,ribbonColor:t.map(t=>e.map(t)),showHandle:!1,showIndicator:!1,labelAlign:"value"},c)})}}),ZE=(KE.props={defaultPosition:"top",defaultOrder:1,defaultSize:40},RE={render(t,e){const{text:n,style:r,subtitle:i,subtitleStyle:a}=t;t=DE(e,".title","text").attr("className","title").style("fontSize",14).style("textBaseline","top").style("text",n).call(F,r||{}).node().getLocalBounds();DE(e,".sub-title","text").attr("className","sub-title").style("y",t.max[1]+((null===a||void 0===a?void 0:a.spacing)||0)).style("fontSize",12).style("textBaseline","top").call(t=>{if(!i)return t.node().remove();t.node().attr(Object.assign({text:i},a))})}},class extends Io{constructor(t){super(t),this.descriptor=RE}connectedCallback(){var t,e;null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}update(t={}){var e;this.attr(R({},this.attributes,t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}}),JE=t=>{const{text:a,style:o,subtitle:s,subtitleStyle:l}=t;return(t,e,n,r)=>{var{x:e,y:i}=e.bbox;return new ZE({style:R({},{style:r.title,subtitleStyle:r.subtitle},{x:e,y:i,style:o,text:a,subtitle:s,subtitleStyle:l})})}},QE=(JE.props={defaultPosition:"top",defaultOrder:2,defaultSize:30},t=>{const{orient:u,labelFormatter:h}=t,f=J(t,["orient","labelFormatter","size"]);return(e,t,n,r)=>{var i,t=t["bbox"],{x:t,y:a,width:o,height:s}=t,{slider:r={}}=r;const l=(null==(i=e.getFormatter)?void 0:i.call(e))||(t=>t),c="string"==typeof h?jE(h):h;return new uw({className:"slider",style:Object.assign({},r,Object.assign({x:t,y:a,trackLength:"horizontal"===u?o:s,orient:u,formatter:t=>{return(c||l)(function(t,n){if(!t.getBandWidth)return t.invert(n);const e=t.adjustedRange,r=t=>Math.abs(t);return t.invert(function(e,n){let r,i=!1;if(1===n.length){let t;for(const o of e){var a=n(o);(i?kp(a,t)<0:0===kp(a,a))&&(r=o,t=a,i=!0)}}else for(const t of e)(i?n(t,r)<0:0===n(t,t))&&(r=t,i=!0);return r}(e,(t,e)=>r(t-n)-r(e-n)))}(e,t))}},f))})}});QE.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1};const tM=t=>QE(Object.assign(Object.assign({},t),{orient:"horizontal"})),eM=(tM.props=Object.assign(Object.assign({},QE.props),{defaultPosition:"bottom"}),t=>QE(Object.assign(Object.assign({},t),{orient:"vertical"})));eM.props=Object.assign(Object.assign({},QE.props),{defaultPosition:"left"});class nM{constructor(t){this.$value=t}static of(t){return new nM(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}function rM(t,e,n){return nM.of({}).call(iM,t).call(iM,e).call(iM,n).value()}function iM(t,e){for(var[n,r]of Object.entries(e))void 0!==r&&(t[n]=e[n]);return t}function aM(t,e){var n={};for(const i of e){var r=t.style[i];r&&(n[i]=r)}return n}const oM=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"],sM=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=a0(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,rM(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},lM=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=a0(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,rM(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},cM=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=a0(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,rM(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},uM=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=a0(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,rM(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},hM=l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a,strokeOpacity:o,opacity:s}=t.style;return t.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:a,strokeOpacity:o,opacity:s}],rM(i,n,l))},fM=(hM.props={},l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a,strokeOpacity:o,opacity:s}=t.style;return t.animate([{fillOpacity:a,strokeOpacity:o,opacity:s},{fillOpacity:0,strokeOpacity:0,opacity:0}],rM(i,n,l))});function dM(t){var{min:t,max:e}=t.getLocalBounds(),[t,n]=t,[e,r]=e;return[t,n,e-t,r-n]}function pM(t,e){var[n,r,i,t]=dM(t),a=Math.ceil(Math.sqrt(e/(t/i))),o=[],s=t/Math.ceil(e/a);let l=0,c=e;for(;0<c;){var u=Math.min(c,a),h=i/u;for(let t=0;t<u;t++){var f=n+t*h,d=r+l*s;o.push(function(t){var[t,e,n,r]=t;return`
|
|
2
2
|
M ${t} ${e}
|
|
3
3
|
L ${t+n} ${e}
|
|
4
4
|
L ${t+n} ${e+r}
|
|
5
5
|
L ${t} ${e+r}
|
|
6
6
|
Z
|
|
7
|
-
`}([h,d,f,s]))}c-=u,l+=1}return o}function a3(t,e){t.__data__=e.__data__,t.className=e.className,e.parentNode.replaceChild(t,e)}function o3(t,e,n,r){var i,a,o,s,l,c,u,f,h,d=e["nodeName"],p=n["nodeName"],y=bl(e),v=bl(n);return d===p&&"path"!==d||(void 0===y||void 0===v)?(p=n,d=r,[o,l,s,h]=r3(i=e),[c,u,f,a]=(a3(p,i),r3(p)),o=[Object.assign({transform:`translate(${o-c}, ${l-u}) scale(${s/f}, ${h/a})`},KO(i,$O)),Object.assign({transform:"translate(0, 0) scale(1, 1)"},KO(p,$O))],p.animate(o,d)):(c=y,s="path"===(u=(l=t)["nodeName"])?l:(a3(u=new gs({style:Object.assign(Object.assign({},KO(l,$O)),{d:c})}),l),u),f=[Object.assign({path:y},KO(e,$O)),Object.assign({path:v},KO(n,$O))],h=s.animate(f,r),s.style.transform="scale(1, 1)",s.style.transform="none",h)}n3.props={};const s3=y=>(t,e,n,r,i)=>{[a="pack"]=[y.split];var a="function"==typeof a?a:i3,i=UO(i,n,y),n=t["length"],o=e["length"];if(1===n&&1===o||1<n&&1<o)return[s]=t,[c]=e,o3(s,s,c,i);if(1===n&&1<o){var[s]=t;{var l=s,c=e,u=i,s=a;l.style.visibility="hidden";const d=s(l,c.length);return c.map((t,e)=>{return o3(t,new gs({style:Object.assign({path:d[e]},KO(l,$O))}),t,u)})}}if(1<n&&1===o){var[n]=e;{var o=t,f=n,h=i;const p=(e=a)(f,o.length);var{fillOpacity:e,strokeOpacity:t,opacity:n}=f.style,e=f.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:e,strokeOpacity:t,opacity:n}],h);return[...o.map((t,e)=>{return o3(t,t,new gs({style:{path:p[e],fill:f.style.fill}}),h)}),e]}}return null},l3=(s3.props={},b=>{return ha({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:i.NUMBER}),(t,e,n,r,i)=>{const[a]=t;if(!rv(r))return ZO(b)(t,e,n,r,i);const o=r.getCenter();var{__data__:t,style:e}=a,{radius:s=0,inset:l=0,fillOpacity:c,strokeOpacity:u,opacity:f}=e,{points:e,y:t,y1:h}=(Z(e,["radius","inset","fillOpacity","strokeOpacity","opacity"]),t);const d=H2().cornerRadius(s).padAngle(l*Math.PI/180),p=Lx(r,e,[t,h]),{startAngle:y,endAngle:v}=p,g=new gs({}),m=t=>{g.attr({d:d(t),transform:`translate(${o[0]}, ${o[1]})`});t=bl(g);return g.style.transform="none",t};s=[{waveInArcAngle:y+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:y+1e-4,fillOpacity:c,strokeOpacity:u,opacity:f,offset:.01},{waveInArcAngle:v,fillOpacity:c,strokeOpacity:u,opacity:f}],l=a.animate(s,UO(i,n,b));return l.onframe=function(){a.style.path=m(Object.assign(Object.assign({},p),{endAngle:Number(a.style.waveInArcAngle)}))},l.onfinish=function(){a.style.path=m(Object.assign(Object.assign({},p),{endAngle:v}))},l}}),c3=(l3.props={},c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t,fillOpacity:o,strokeOpacity:s,opacity:l}=a.style,t=[{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.01},{transform:(t+" scale(1)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l}],{width:o,height:s}=a.getBoundingClientRect(),l=(a.setOrigin([o/2,s/2]),a.animate(t,UO(i,n,c)));return l.finished.then(()=>a.setOrigin(0,0)),l}}),u3=c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t,fillOpacity:o,strokeOpacity:s,opacity:l}=a.style,o=[{transform:(t+" scale(1)").trimStart()},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.99},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],{width:s,height:l}=a.getBoundingClientRect(),t=(a.setOrigin([s/2,l/2]),a.animate(o,UO(i,n,c)));return t.finished.then(()=>a.setOrigin(0,0)),t}},f3=o=>(t,e,n,r,i)=>{var[t]=t,a=(null==(a=t.getTotalLength)?void 0:a.call(t))||0;return t.animate([{lineDash:[0,a]},{lineDash:[a,0]}],UO(i,n,o))},h3=(f3.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new gs({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=ZO(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o}),d3=(h3.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new gs({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=QO(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o});function p3(t){return Q(t).selectAll("."+et).nodes()}function y3(t){return Q(t).select("."+nt).node()}function v3(t,e){var{offsetX:e,offsetY:n}=e,{min:[t,r],max:[i,a]}=t.getBounds();return e<t||i<e||(n<r||a<n)?null:[e-t,n-r]}function g3(t){return t&&0!==Object.keys(t).length?t:{highlightedLineWidth:1,highlightedStroke:"#000"}}function m3(){return t=>t.__data__.color}function b3(t){const e=t.scale["x"];return t=>{t=t.__data__.x;return e.invert(t)}}function x3(t){t=Array.from(t.markState.keys());const n=new Map(t.map(t=>[t.key,t.data]));return t=>{var{index:t,markKey:e}=t.__data__;return n.get(e)[t]}}function w3(o,s=(t,e)=>t,l=(t,e,n)=>t.setAttribute(e,n)){const c="__states__",u="__ordinal__",i=t=>{var{[c]:e=[],[u]:n={}}=t,e=e.reduce((t,e)=>Object.assign(Object.assign({},t),J(o,e)),n);if(0!==Object.keys(e).length){for(var[r,i]of Object.entries(e)){var a=t.getAttribute(r),i=s(i,t);l(t,r,i),r in n||(n[r]=a)}t[u]=n}},a=t=>{t[c]||(t[c]=[])};return{setState:(t,...e)=>{a(t),t[c]=[...e],i(t)},removeState:(t,...e)=>{a(t);for(const r of e){var n=t[c].indexOf(r);-1!==r&&t[c].splice(n,1)}i(t)},hasState:(t,e)=>(a(t),-1!==t[c].indexOf(e))}}function k3(r,i){const a=new Map(r.map((t,e)=>[t,e]));return(t,e)=>{var n;return"function"!=typeof t?t:(n=a.get(e),t(i?i(e):e,n,i?r.map(i):r))}}function E3(l,t){var{valueof:c=(t,e)=>t}=t,u=Z(t,["valueof"]);const f="element-link";return[(t,e)=>{if(!(t.length<=1)){var n=t.map(t=>[t,t.getBBox()]);n.sort(([,t],[,e])=>{var{x:t,y:n}=t,{x:e,y:r}=e;return t-e==0?n-r:t-e});for(let t=1;t<n.length;t++){var r=O2();const[o,s]=n[t-1];var[,i]=n[t],i=(r.moveTo(s.x+s.width,s.y),r.lineTo(i.x,i.y),r.lineTo(i.x,i.y+i.height),r.lineTo(s.x+s.width,s.y+s.height),r.closePath(),Ox(u,t=>c(t,o))),{fill:a=o.getAttribute("fill")}=i,i=Z(i,["fill"]),r=new gs({className:f+(e?" "+e:""),style:Object.assign({d:r.toString(),fill:a},i)});l.appendChild(r)}}},t=>{t=t||f;for(const e of l.getElementsByClassName(t)||[])e.remove()}]}function M3(t,e){var{elements:n,datum:r,groupKey:i=t=>t,link:a=!1}=e,e=Z(e,["elements","datum","groupKey","link"]);const o=n(t),s=new Set(o),l=Ly(o,i);n=k3(o,r);const[c,u]=E3(t,Object.assign({elements:o,valueof:n},J(e,"link"))),{setState:f,removeState:h}=w3(e,n),d=t=>{t=t.target;if(s.has(t)){var t=i(t),t=l.get(t),e=new Set(t);for(const n of o)e.has(n)?f(n,"highlighted"):f(n,"unhighlighted");a&&c(t)}},p=t=>{t=t.target;if(s.has(t)){for(const e of o)h(e,"unhighlighted","highlighted");a&&u()}};return t.addEventListener("pointerover",d),t.addEventListener("pointerout",p),()=>{t.removeEventListener("pointerover",d),t.removeEventListener("pointerout",p)}}function O3(n){return t=>{var{container:t,view:e}=t;return M3(t,Object.assign(Object.assign({},g3(n)),{elements:p3,datum:x3(e)}))}}function S3(n={selectedLineWidth:1,selectedColor:"black"}){return t=>{var{container:t,view:e}=t;return M3(t,Object.assign(Object.assign({},g3(n)),{elements:p3,datum:x3(e),groupKey:b3(e)}))}}function _3(n){return t=>{var{container:t,view:e}=t;return M3(t,Object.assign(Object.assign(Object.assign({},n),g3(n)),{elements:p3,datum:x3(e),groupKey:m3()}))}}function A3(t,e){var{elements:n,datum:r,groupKey:l=t=>t,link:c=!1,single:u=!1}=e,e=Z(e,["elements","datum","groupKey","link","single"]);const f=n(t),h=new Set(f),d=Ly(f,l);n=k3(f,r);const[p,y]=E3(t,Object.assign({elements:f,valueof:n},J(e,"link"))),{setState:v,removeState:i,hasState:g}=w3(e,n),m=()=>{for(const t of f)i(t,"selected","unselected");c&&y()},a=t=>{t=t.target;if(!h.has(t))return m();if(u){var e=t;if(g(e,"selected"))m();else{var e=l(e),e=d.get(e),n=new Set(e);for(const i of f)n.has(i)?v(i,"selected"):v(i,"unselected");c&&(y(),p(e))}}else{e=t;var t=l(e),r=d.get(t);const a=new Set(r);if(g(e,"selected")){if(!f.some(t=>!a.has(t)&&g(t,"selected")))return m();for(const o of r)v(o,"unselected");c&&y(t)}else{e=r.some(t=>g(t,"selected"));for(const s of f)a.has(s)?v(s,"selected"):g(s,"selected")||v(s,"unselected");!e&&c&&p(r,t)}}};return t.addEventListener("click",a),()=>{t.removeEventListener("click",a)}}function P3(n){return t=>{var{container:t,view:e}=t;return A3(t,Object.assign(Object.assign({},g3(n)),{elements:p3,datum:x3(e)}))}}function T3(n){return t=>{var{container:t,view:e}=t;return A3(t,Object.assign(Object.assign({},g3(n)),{elements:p3,datum:x3(e),groupKey:b3(e)}))}}function L3(n){return t=>{var{container:t,view:e}=t;return A3(t,Object.assign(Object.assign({},g3(n)),{elements:p3,datum:x3(e),groupKey:m3()}))}}function N3(t){var{wait:M=20,leading:O,trailing:S=!1,labelFormatter:_=t=>""+t}=t,A=Z(t,["wait","leading","trailing","labelFormatter"]);return t=>{const{options:e,view:n,container:r,update:i}=t,{markState:a,scale:o,coordinate:s}=n;t=function(t,e,r){var[t]=Array.from(t.entries()).filter(([t])=>t.type===e).map(([t])=>{const n=t["encode"];return Object.fromEntries(r.map(t=>{var e=n[t];return[t,e?e.value:void 0]}))});return t}(a,"line",["x","y","series"]);if(!t)return;const{y:h,x:d,series:l=[]}=t;t=h.map((t,e)=>e);const c=Ry(t.map(t=>d[t])),u=R({},e),f=u.marks.find(t=>"line"===t.type);t=qy(Ny(t,t=>qy(t,t=>+h[t])/Xy(t,t=>+h[t]),t=>l[t]).values());R(f,{scale:{y:{domain:[1/t,t]}}});const p=y3(r),y=r.getElementsByClassName(et);const v=Ly(r.getElementsByClassName(it),t=>t.__data__.key.split("-")[0]),g=new ys({style:Object.assign({x1:0,y1:0,x2:0,y2:p.getAttribute("height"),stroke:"black",lineWidth:1},J(A,"rule"))}),m=new Os({style:Object.assign({x:0,y:p.getAttribute("height"),text:"",fontSize:10},J(A,"label"))}),b=(g.append(m),p.appendChild(g),(t,e,n)=>{var[t]=t.invert(n),n=e.invert(t);return c[ky(c,n)]}),x=(t,e)=>{g.setAttribute("x1",t[0]),g.setAttribute("x2",t[0]),m.setAttribute("text",_(e))};let w;var k;const E=Dp(t=>{t=v3(p,t);if(t){var{scale:e,coordinate:n}=w,{x:e,y:r}=e,i=b(n,e,t);x(t,i);for(const u of y){var{seriesIndex:a,key:o}=u.__data__,s=a[xy(t=>d[+t]).center(a,i)],l=[0,r.map(1)],s=[0,r.map(h[s]/h[a[0]])],[,a]=n.map(l),[,l]=n.map(s),c=a-l,s=(u.setAttribute("transform",`translate(0, ${c})`),v.get(o)||[]);for(const f of s)f.setAttribute("dy",c)}}},M,{leading:O,trailing:S});return k=[0,0],Oe(this,void 0,void 0,function*(){var t=o["x"];const n=b(s,t,k);x(k,n);t=function(t){var{transform:e=[]}=t,n=e.find(t=>"normalizeY"===t.type);return n||(e.push(n={type:"normalizeY"}),t.transform=e,n)}(f);t.groupBy="color",t.basis=(t,e)=>{return e[t[xy(t=>d[+t]).center(t,n)]]};for(const e of u.marks)e.animate=!1;t=yield i(u);w=t.view}),p.addEventListener("pointerenter",E),p.addEventListener("pointermove",E),p.addEventListener("pointerleave",E),()=>{g.remove(),p.removeEventListener("pointerenter",E),p.removeEventListener("pointermove",E),p.removeEventListener("pointerleave",E)}}}function C3({wait:l=30,leading:c,trailing:u=!1}){return t=>{const{options:e,update:r,container:n}=t,i=y3(n),a=R({},e);for(const s of a.marks)s.animate=!1;const o=Dp(t=>{var e,n,t=v3(i,t);t&&([t,e]=t,(n=function(t){var{coordinates:e=[]}=t,n=e.find(t=>"fisheye"===t.type);return n||(e.push(n={type:"fisheye"}),t.coordinates=e,n)}(a)).focusX=t,n.focusY=e,n.isVisual=!0,r(a))},l,{leading:c,trailing:u});return i.addEventListener("pointerenter",o),i.addEventListener("pointermove",o),i.addEventListener("pointerleave",o),()=>{i.removeEventListener("pointerenter",o),i.removeEventListener("pointermove",o),i.removeEventListener("pointerleave",o)}}}function j3(t,e,n,r){var i=t.tooltipElement||function(t,e,n){var{min:[r,i],max:[a,o]}=t.getBounds(),e=new Q5({className:"tooltip",style:{x:e,y:n,container:{x:0,y:0},items:[],bounding:{x:r,y:i,width:a-r,height:o-i},position:"bottom-right",offset:[10,10],style:{".tooltip":{},".tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}}}});return t.getRootNode().defaultView.getConfig().container.appendChild(e.HTMLTooltipElement),e}(t,n,r),{items:e,title:a}=e;i.show(),i.update({x:n,y:r,items:e,title:a}),t.tooltipElement=i}function R3(t){t=t.tooltipElement;t&&t.hide()}function I3(t){return Object.fromEntries(Object.entries(t).filter(([,t])=>Kv(t)))}function F3(t){var e=t.getAttribute("fill"),n=t.getAttribute("stroke"),t=t["__data__"],{color:t=e||n}=t;return t}function B3(n,a,o,t=n.map(t=>t.__data__)){e=t.map(t=>t.title);var e=Array.from(new Set(e)).filter(Kv),t=t.flatMap((r,t)=>{var t=n[t],e=Z(r,["title"]);const i=F3(t);return Object.entries(e).filter(([t])=>t.startsWith("tooltip")).map(([t,e])=>{var{field:n,title:n=n}=o[t].getOptions();return Object.assign({color:i,name:function(t,e){var{color:t,series:n}=t,{color:e,series:r}=e;return t&&t.invert?t.invert(e):n&&n.invert?n.invert(r):null}(o,r)||n,value:void 0===e?e:""+e},I3(a({channel:t,value:e})))}).filter(({value:t})=>void 0!==t)});return Object.assign(Object.assign({},0<e.length&&{title:e.join(",")}),{items:t})}function D3(t,e){return Array.from(t.values()).some(t=>{return null==(t=t.interaction)?void 0:t[e]})}function z3(t,e){return void 0===t?e:t}function G3(f,t){var{elements:e,wait:n=50,leading:r=!0,trailing:i=!1,scale:h,coordinate:d,crosshairs:p,item:y,startX:v=0,startY:g=0}=t,t=Z(t,["elements","wait","leading","trailing","scale","coordinate","crosshairs","item","startX","startY"]);const m=e(f),[,b]=function(t){var{min:[t,e],max:[n,r]}=t.getBounds();return[n-t,r-e]}(f),x=new Map(m.map(t=>{var e=t["__data__"],e=e["seriesX"];return[t,Ry(e)]})),w=J(t,"crosshairs"),a=Dp(t=>{var t=v3(f,t),e=f.getBounds(),n=e.min[0],e=e.min[1];const r=[t[0]-v,t[1]-g];r;var i=m.map(t=>{var e=x.get(t),t=((t,n)=>{t=t.__data__;return Object.fromEntries(Object.entries(t).filter(([t])=>t.startsWith("series")).map(([t,e])=>{e=e[n];return[Mp(t.replace("series","")),e]}))})(t,((t,e)=>{var[t]=d.invert(t);return ky(e,t)})(r,e)),{x:e,y:n}=t;return[t,d.map([e,n])]}),a=i.map(t=>t[0]),i=i.map(t=>t[1]),a=B3(m,y,h,a);if(j3(f,a,t[0]+n,t[1]+e),p){a=f;n=i;t=Object.assign(Object.assign({},w),{height:b,startX:v,startY:g});var{height:e,startX:i,startY:o}=t,t=Z(t,["height","startX","startY"]);const s=(n=Zy(n.map(t=>t[0])))+i,l=n+i,c=o,u=e-o;(i=a.ruleY||(n=new ys({style:Object.assign({x1:s,x2:l,y1:c,y2:u,lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},t)}),a.appendChild(n),n)).style.x1=s,i.style.x2=l,i.style.y1=c,i.style.y2=u,a.ruleY=i}},n,{leading:r,trailing:i}),o=()=>{var t;R3(f),p&&(t=f).ruleY&&(t.ruleY.remove(),t.ruleY=void 0)};return f.addEventListener("pointerenter",a),f.addEventListener("pointermove",a),f.addEventListener("pointerleave",o),()=>{f.removeEventListener("pointerover",a),f.removeEventListener("pointerout",a),f.removeEventListener("pointerleave",o)}}function W3(r,{elements:t,scale:i,wait:e=50,leading:n=!0,trailing:a=!1,groupKey:o=t=>t,item:s}){t=t(r);const l=new Set(t),c=Ly(t,o),u=Dp(t=>{var e,n=t["target"];l.has(n)&&(n=o(n),n=1===(n=c.get(n)).length?function(t,r,i){var e=(n=t["__data__"])["title"],n=Z(n,["title"]);const a=F3(t);return t=Object.entries(n).filter(([t])=>t.startsWith("tooltip")).map(([t,e])=>{var{field:n,title:n=n}=i[t].getOptions();return Object.assign({color:a,name:n,value:void 0===e?e:""+e},I3(r({channel:t,value:e})))}).filter(({value:t})=>void 0!==t),Object.assign(Object.assign({},e&&{title:e}),{items:t})}(n[0],s,i):B3(n,s,i),{offsetX:t,offsetY:e}=t,j3(r,n,t,e))},e,{leading:n,trailing:a}),f=t=>{t=t.target;l.has(t)&&R3(r)};return r.addEventListener("pointerover",u),r.addEventListener("pointermove",u),r.addEventListener("pointerout",f),()=>{r.removeEventListener("pointerover",u),r.removeEventListener("pointermove",u),r.removeEventListener("pointerout",f)}}function V3(t){const{shared:u,crosshairs:f,series:h,item:d=()=>({}),facet:p=!1}=t,y=Z(t,["shared","crosshairs","series","name","item","facet"]);return(e,t)=>{var{container:n,view:r}=e;const{scale:i,markState:a,coordinate:o}=r;var s=D3(a,"seriesTooltip"),l=D3(a,"crosshairs"),n=y3(n),s=z3(h,s);if(s&&!p)return G3(n,Object.assign(Object.assign({},y),{elements:p3,scale:i,coordinate:o,crosshairs:z3(f,l),item:d}));if(s&&p){s=t.filter(t=>t!==e&&t.options.parentKey===e.options.key);const c=s.flatMap(({container:t})=>p3(t)),i=s[0].view.scale;t=n.getBounds(),s=t.min[0],t=t.min[1];return G3(n.parentNode.parentNode,Object.assign(Object.assign({},y),{elements:()=>c,scale:i,coordinate:o,crosshairs:z3(f,l),item:d,startX:s,startY:t}))}return W3(n,Object.assign(Object.assign({},y),{elements:p3,scale:i,coordinate:o,groupKey:u?b3(r):void 0,item:d}))}}d3.props={};const Y3="legend-category";function H3(t,e){t.getRootNode().defaultView.getContextService().getDomElement().style.cursor=e}function q3(t){return t.getElementsByClassName("legend-category-item-marker")[0]}function U3(t){return t.getElementsByClassName("legend-category-item-label")[0]}function X3(t){return t.getElementsByClassName("items-item")}function K3(t,e){var{legends:n,marker:i,label:a,datum:o,filter:r,setAttribute:s}=e,e=Z(e,["legends","marker","label","datum","filter","setAttribute"]);const l=new Map,c=new Map,u=new Map;var e=0===Object.keys(e).length?{labelUnselectedFill:"#aaa",markerUnselectedFill:"#aaa"}:e,f=J(e,"marker"),e=J(e,"label");const{setState:h,removeState:d}=w3(f,void 0,s),{setState:p,removeState:y}=w3(e,void 0,s),v=Array.from(n(t)),g=v.map(o),m=()=>{for(const r of v){var t=o(r),e=i(r),n=a(r);(g.includes(t)?(d(e,"unselected"),y):(h(e,"unselected"),p))(n,"unselected")}};for(const k of v){var b=()=>{H3(t,"pointer")},x=()=>{H3(t,"default")},w=()=>Oe(this,void 0,void 0,function*(){var t=o(k),e=g.indexOf(t);-1===e?g.push(t):g.splice(e,1),0===g.length&&g.push(...v.map(o)),yield r(g),m()});k.addEventListener("click",w),k.addEventListener("pointerenter",b),k.addEventListener("pointerout",x),l.set(k,w),c.set(k,b),u.set(k,x)}return()=>{for(const t of v)t.removeEventListener("click",l.get(t)),t.removeEventListener("pointerenter",c.get(t)),t.removeEventListener("pointerout",u.get(t))}}function $3(t){var s=t["channel"],r=Z(t,["channel"]);return t=>{const{container:e,view:i,options:a,update:o}=t;var t=e.getElementsByClassName(Y3),t=s?t.find(t=>{t=t.parentNode.__data__;return t.scale.name===s}):t[0],[t,n]=t?function(t){const e=t.attributes["data"];return[t=(t=t.parentNode.__data__).scale.name,{legends:X3,marker:U3,label:q3,datum:t=>{t=t.__data__,t=t.index;return e[t].label}}]}(t):[null,{}];return t&&(s=t),K3(e,Object.assign(Object.assign(Object.assign({},n),{filter:r=>Oe(this,void 0,void 0,function*(){var t=i["scale"];const{[s]:n}=t;t=a.marks,t=t.map(t=>{var{transform:e=[]}=t,e=[{type:"filter",[s]:r},...e];return R({},t,{transform:e,scale:{[s]:{domain:n.getOptions().domain}}})}),t=Object.assign(Object.assign({},a),{marks:t});return o(t)})}),r))}}function Z3(n){return(t,...e)=>R({},n(t,...e),t)}function J3(n){return(t,...e)=>R({},t,n(t,...e))}function Q3(t,e){var n;return t?Array.isArray(t)?t:({value:n=e}=t,t=Z(t,["value"]),Object.assign(Object.assign({},t),{value:n})):e}const tS=()=>t=>{var e=t["children"];if(!Array.isArray(e))return[];const{x:n=0,y:r=0,width:i,height:a,data:o}=t;return e.map(t=>{var e=t["data"],t=Z(t,["data"]);return Object.assign(Object.assign({},t),{data:Q3(e,o),x:n,y:r,width:i,height:a})})},eS=(tS.props={},()=>e=>{var n=e["children"];if(!Array.isArray(n))return[];var{direction:t="row",ratio:r=n.map(()=>1),padding:i=0,data:a}=e,[o,s,l,c]="col"===t?["y","height","width","x"]:["x","width","height","y"];const u=r.reduce((t,e)=>t+e),f=e[s]-i*(n.length-1);var h=r.map(t=>f*(t/u)),d=[];let p=e[o]||0;for(let t=0;t<h.length;t+=1){var y=n[t],v=y["data"],y=Z(y,["data"]),v=Q3(v,a);d.push(Object.assign({[o]:p,[s]:h[t],[c]:e[c]||0,[l]:e[l],data:v},y)),p+=h[t]+i}return d}),nS=(eS.props={},()=>t=>{var e=t["children"],t=Z(t,["children"]);if(!Array.isArray(e))return[];const{data:a,scale:o={},axis:s={},legend:l={}}=t,n=Z(t,["data","scale","axis","legend"]);t=e.map(t=>{var{data:e,scale:n={},axis:r={},legend:i={}}=t,t=Z(t,["data","scale","axis","legend"]);return Object.assign({data:Q3(e,a),scale:R({},o,n),axis:!(!r||!s)&&R({},s,r),legend:!(!i||!l)&&R({},l,i)},t)});return[Object.assign(Object.assign({},n),{marks:t,type:"standardView"})]}),rS=(nS.props={},()=>t=>{var{width:e,height:n,paddingLeft:r,paddingRight:i,paddingTop:a,paddingBottom:o,padding:s,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,margin:d,marginLeft:p,marginBottom:y,marginTop:v,marginRight:g,data:m,coordinates:b,theme:x,component:w,interactions:k,x:E,y:M,key:O,frame:S,title:_,labelTransform:A,parentKey:P}=t,t=Z(t,["width","height","paddingLeft","paddingRight","paddingTop","paddingBottom","padding","inset","insetLeft","insetTop","insetRight","insetBottom","margin","marginLeft","marginBottom","marginTop","marginRight","data","coordinates","theme","component","interactions","x","y","key","frame","title","labelTransform","parentKey"]);return[{type:"standardView",x:E,y:M,key:O,width:e,height:n,padding:s,paddingLeft:r,paddingRight:i,paddingTop:a,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,paddingBottom:o,theme:x,coordinates:b,component:w,interactions:k,frame:S,title:_,labelTransform:A,margin:d,marginLeft:p,marginBottom:y,marginTop:v,marginRight:g,parentKey:P,marks:[Object.assign(Object.assign({},t),{key:O+"-0",data:m})]}]}),iS=(rS.props={},Z3(t=>{const{encode:e,data:i,scale:a,shareSize:o=!1}=t;var{x:t,y:n}=e,r=(e,t)=>{if(void 0===e||!o)return{};const n=Ly(i,t=>t[e]);var t=(null==(t=null===a||void 0===a?void 0:a[t])?void 0:t.domain)||Array.from(n.keys()),r=t.map(t=>n.has(t)?n.get(t).length:1);return{domain:t,flex:r}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:void 0===t?null:{position:"top"}},void 0===t&&{paddingInner:0}),r(t,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:void 0===n?null:{position:"right"}},void 0===n&&{paddingInner:0}),r(n,"y"))}}})),aS=Z3(t=>{const{data:e,scale:n}=t;var r=[t];let i,a,o;for(;r.length;){const{children:u,encode:f={},scale:n={},legend:h={}}=r.shift();var s=f["color"],l=n["color"],c=h["color"];void 0!==s&&(i=s),void 0!==l&&(a=l),void 0!==c&&(o=c),Array.isArray(u)&&r.push(...u)}return{encode:{color:i},scale:{color:R({},a,{domain:void 0!==(t=null==(t=null===n||void 0===n?void 0:n.color)?void 0:t.domain)?t:void 0!==i?Array.from(new Set(e.map(t=>t[i]))):void 0,type:"ordinal"})},legend:{color:R({title:i},o)}}}),oS=Z3(()=>({animate:{enterType:"fadeIn"}})),sS=J3(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),lS=J3(()=>({type:"cell"})),cS=J3(c=>{var t=c["data"];return{data:{type:"inline",value:t,transform:[{type:"custom",callback:()=>{var{data:t,encode:e}=c;const{x:n,y:r}=e,i=n?Array.from(new Set(t.map(t=>t[n]))):[],a=r?Array.from(new Set(t.map(t=>t[r]))):[];if(i.length&&a.length){var o=[];for(const s of i)for(const l of a)o.push({[n]:s,[r]:l});return o}return i.length?i.map(t=>({[n]:t})):a.length?a.map(t=>({[r]:t})):void 0}}]}}}),uS=J3((t,c=function(t){t=t.points;return Ex(t)},w=function(a){return(t,e)=>{var{rowIndex:t,rowValuesLength:n,columnIndex:r,columnValuesLength:i}=t;return t!==n-1?fS(a,e):(t=e.length?void 0:null,R({title:r===i-1&&void 0,grid:t},a))}},k=function(r){return(t,e)=>{var{rowIndex:t,columnIndex:n}=t;return 0!==n?fS(r,e):(n=e.length?void 0:null,R({title:0===t&&void 0,grid:n},r))}},E={})=>{const{data:e,encode:n,children:u,scale:r,x:M=0,y:O=0,shareData:f=!1,key:S}=t,_=e["value"],{x:A,y:P}=n;t=r.color;const T=t["domain"];return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:v,paddingTop:g}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=Sx(t);const s=t.map(c);n=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]);const l=n.map(([n,r])=>t=>{var{[A]:t,[P]:e}=t,t=void 0===A||t===n,e=void 0===P||e===r;return t&&e}).map(t=>_.filter(t)),m=f?qy(l,t=>t.length):void 0,b=n.map(([t,e])=>({columnField:A,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:P,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(u)?u:[u(t)].flat(1));return e.flatMap(c=>{const[u,f,h,d]=s[c],p=b[c],y=l[c];return x[c].map(t=>{var{scale:e,key:n,facet:r=!0,axis:i={}}=t,t=Z(t,["scale","key","facet","axis","legend"]),a=(null==(a=null==e?void 0:e.y)?void 0:a.guide)||i.y,o=(null==(o=null==e?void 0:e.x)?void 0:o.guide)||i.x,s={x:{tickCount:A?5:void 0},y:{tickCount:P?5:void 0}},r=r?y:0===y.length?[]:_,l={color:{domain:T}},o={x:hS(o,w)(p,r),y:hS(a,k)(p,r)};return Object.assign(Object.assign({key:n+"-"+c,data:r,x:u+v+M,y:f+g+O,parentKey:S,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!r.length,dataDomain:m,scale:R(s,e,l),axis:R({},i,o),legend:!1},t),E)})})}}});function fS(t,e){return e.length?R({title:!1,tick:null,label:null},t):R({title:!1,tick:null,label:null,grid:null},t)}function hS(t,e){return"function"==typeof t?t:null===t?()=>null:e(t)}const dS=()=>t=>{return[qO.of(t).call(lS).call(aS).call(oS).call(iS).call(sS).call(cS).call(uS).value()]},pS=(dS.props={},Z3(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),yS=J3(t=>{const{data:w,children:c,x:k=0,y:E=0,key:M}=t;return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:g,paddingTop:m}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=Sx(t);const s=t.map(({points:t})=>Ex(t)),l=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]),b=l.map(([t,e])=>({columnField:t,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:e,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(c)?c:[c(t)].flat(1));return e.flatMap(c=>{const[u,f,h,d]=s[c],[p,y]=l[c],v=b[c];return x[c].map(t=>{var n,r,{scale:e,key:i,encode:a,axis:o}=t,t=Z(t,["scale","key","encode","axis"]),s=null==(s=null==e?void 0:e.y)?void 0:s.guide,l=null==(l=null==e?void 0:e.x)?void 0:l.guide,l={x:("function"==typeof(r=l)?r:null===r?()=>null:(t,e)=>{var{rowIndex:t,rowValuesLength:n}=t;if(t!==n-1)return fS(r,e)})(v,w),y:("function"==typeof(n=s)?n:null===n?()=>null:(t,e)=>{t=t.columnIndex;if(0!==t)return fS(n,e)})(v,w)};return Object.assign({data:w,parentKey:M,key:i+"-"+c,x:u+g+k,y:f+m+E,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:R({x:{facet:!1},y:{facet:!1}},e),axis:R({x:{tickCount:5},y:{tickCount:5}},o,l),legend:!1,encode:R({},a,{x:p,y:y})},t)})})}}}),vS=J3(t=>{var e=t["encode"],t=Z(t,["encode"]),{position:n=[],x:r=n,y:i=[...n].reverse()}=e,n=Z(e,["position","x","y"]),a=[];for(const o of[r].flat(1))for(const s of[i].flat(1))a.push({$x:o,$y:s});return Object.assign(Object.assign({},t),{data:a,encode:Object.assign(Object.assign({},n),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},1===[r].flat(1).length&&{x:{paddingInner:0}}),1===[i].flat(1).length&&{y:{paddingInner:0}})})});const gS=()=>t=>{return[qO.of(t).call(lS).call(aS).call(yS).call(vS).call(oS).call(sS).call(pS).value()]},mS=Z3(t=>({scale:{x:{guide:{type:"axisX"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),bS=Z3(t=>({coordinates:[{type:"polar"}]})),xS=t=>{var e=t["encode"],t=Z(t,["encode"]),e=e["position"];return Object.assign(Object.assign({},t),{encode:{x:e}})};function wS(t){return t=>null}function kS(t){var t=t["points"],[t,e,n,r]=t,i=xx(t,r),t=bx(t,r),r=bx(e,n),r=(e=r,r=wx(r=t),e=wx(e),r<e?e-r:2*Math.PI-(r-e)),e=1/Math.sin(r/2),i=i/(1+e),a=i*Math.sqrt(2),[n,o]=n,t=kx(t)+r/2,r=i*e;return[n+r*Math.sin(t)-a/2,o+r*Math.cos(t)-a/2,a,a]}const ES=()=>t=>{return[qO.of(t).call(lS).call(xS).call(aS).call(bS).call(cS).call(uS,kS,wS,wS,{frame:!1}).call(oS).call(sS).call(mS).value()]};const MS=()=>t=>{const{children:e=[],duration:a=1e3,iterationCount:l=1,direction:c="normal",easing:o="ease-in-out-sine"}=t,u=e.length;if(!Array.isArray(e)||0===u)return[];const n=e[0]["key"],f=e.map(t=>Object.assign(Object.assign({},t),{key:n})).map(t=>{for(var e=a,n=o,r=[t];r.length;){var i=r.pop(),i=(i.animate=R({enterDuration:e,updateDuration:e,exitDuration:e,updateEasing:n,updateType:"morphing",updateFill:"both",exitType:"fadeOut"},i.animate||{}),i)["children"];Array.isArray(i)&&r.push(...i)}return t});return function*(){let t=0,e;for(;"infinite"===l||t<l;){n=c,a=t,o=u,s=void 0,s=[0,o],o=[1-o,1];var[n,r]="normal"===n?s:"reverse"===n?o:"alternate"===n?a%2==0?s:o:"reverse-alternate"===n?a%2==0?o:s:void 0;for(let t=n;t<r;t+=1){var i=Math.abs(t);e!==i&&(yield f[i]),e=i}t++}var a,o,s}};function OS(t,e){if(null!==t)return{type:"column",value:t,field:e}}function SS(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function _S(t,e){var n=[];for(const r of t)n[r]=e;return n}function AS(t,e){var t=t[e];return t?({value:e,field:t=null}=t,[e,t]):[null,null]}function PS(t,...e){for(const i of e){if("string"!=typeof i)return[i,null];var[n,r]=AS(t,i);if(null!==n)return[n,r]}return[null,null]}function TS(t){return!(t instanceof Date)&&"object"==typeof t}MS.props={};const LS=()=>(t,e)=>{var n=e["encode"],n=n["y1"];return void 0!==n?[t,e]:[t,R({},e,{encode:{y1:OS(_S(t,0))}})]};function NS(t,e,n){const r=n["encode"];if(null===t)return[e];n=t;const i=(Array.isArray(n)?n:[n]).map(t=>{return[t,null==(t=AS(r,t))?void 0:t[0]]}).filter(([,t])=>Kv(t));return Array.from(Ly(e,e=>i.map(([,t])=>t[e]).join("-")).values())}function CS(t){var a,r;return Array.isArray(t)?(a=t,(i,t,e)=>(n,r)=>a.reduce((t,e)=>0!==t?t:by(i[n][e],i[r][e]),0)):"function"==typeof t?(r=t,(e,t,n)=>zS(t=>r(e[t]))):"series"===t?IS:"value"===t?FS:"sum"===t?BS:"maxIndex"===t?DS:()=>null}function jS(t,e){for(const n of t)n.sort(e)}function RS(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function IS(t,e,n){return zS(t=>n[t])}function FS(t,e,n){return zS(t=>e[t])}function BS(t,n,e){t=Sx(t),t=Array.from(Ly(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,e.reduce((t,e)=>t+ +n[e])]));return zS(t=>r.get(e[t]))}function DS(t,n,e){t=Sx(t),t=Array.from(Ly(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,Uy(e,t=>n[t])]));return zS(t=>r.get(e[t]))}function zS(n){return(t,e)=>by(n(t),n(e))}LS.props={};const GS=(t={})=>{const{groupBy:P="x",orderBy:T=null,reverse:L=!1,y:N="y",y1:C="y1",series:j=!0}=t;return(t,e)=>{var{data:n,encode:r,style:i={}}=e,[a,o]=AS(r,"y"),[s,l]=AS(r,"y1"),[r]=j?PS(r,"series","color"):AS(r,"color"),c=NS(P,t,e),n=CS(T)(n,a,r),u=(n&&jS(c,n),new Array(t.length)),f=new Array(t.length),h=new Array(t.length),d=[],p=[];for(const O of c){L&&O.reverse();var y=s?+s[O[0]]:0,v=[],g=[];for(const S of O){var m=h[S]=+a[S]-y;m<0?g.push(S):0<=m&&v.push(S)}var b=0<v.length?v:g,x=0<g.length?g:v;let t=v.length-1,e=0;for(;0<t&&0===a[b[t]];)t--;for(;e<x.length-1&&0===a[x[e]];)e++;d.push(b[t]),p.push(x[e]);let n=y;for(const _ of g.reverse()){var w=h[_];n=u[_]=(f[_]=n)+w}let r=y;for(const A of v){var k=h[A];0<k?r=u[A]=(f[A]=r)+k:u[A]=f[A]=r}}const E=new Set(d),M=new Set(p);r="y"===N?u:f,n="y"===C?u:f;return[t,R({},e,{encode:{y:OS(r,o),y1:OS(n,l)},style:Object.assign({first:(t,e)=>E.has(e),last:(t,e)=>M.has(e)},i)})]}};function WS(t){t=t.type;return"string"==typeof t&&["stackY","dodgeX","groupX"].includes(t)}GS.props={};const VS=a=>(t,e,n)=>{var{encode:r,transform:i=[]}=e;return i.some(WS)||({x:i,y:r}=r,void 0===i)||void 0===r?[t,e]:(i=a["series"],r=i?["x","series"]:"x",GS({groupBy:r})(t,e,n))},YS=(VS.props={},(t={})=>{const{channel:i="x"}=t;return(t,e)=>{var n=e["encode"],r=n["title"];return void 0!==r?[t,e]:([r,n]=AS(n,i),[t,R({},e,{encode:{title:OS(r,n)}})])}}),HS=(YS.props={},()=>(t,e)=>{var n=e["encode"],n=n["x"];return void 0!==n?[t,e]:[t,R({},e,{encode:{x:OS(_S(t,0))},scale:{x:{guide:null}}})]}),qS=(HS.props={},()=>(t,e)=>{var n=e["encode"],n=n["y"];return void 0!==n?[t,e]:[t,R({},e,{encode:{y:OS(_S(t,0))},scale:{y:{guide:null}}})]}),US=(qS.props={},()=>(t,e)=>{var n=e["encode"],n=n["size"];return void 0!==n?[t,e]:[t,R({},e,{encode:{size:SS(_S(t,3))}})]}),XS=(US.props={},()=>(t,e)=>{var n=e["encode"],r=n["key"],n=Z(n,["key"]);if(void 0!==r)return[t,e];const i=Object.values(n).map(({value:t})=>t);r=t.map(e=>i.filter(Array.isArray).map(t=>t[e]).join("-"));return[t,R({},e,{encode:{key:OS(r)}})]}),KS=(XS.props={},()=>(t,e)=>{var n=e["encode"],{series:r,color:i}=n;return void 0!==r||void 0===i?[t,e]:([r,i]=AS(n,"color"),[t,R({},e,{encode:{series:OS(r,i)}})])}),$S=(KS.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(TS)?[t,e]:[t,R({},e,{encode:{y:OS(n)}})]}),ZS=($S.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(TS)?[t,e]:[t,R({},e,{encode:{x:OS(n)}})]}),JS=(ZS.props={},()=>(t,e)=>{var n=e["encode"],r=n["y1"];return r?[t,e]:([r]=AS(n,"y"),[t,R({},e,{encode:{y1:OS([...r])}})])}),QS=(JS.props={},()=>(t,e)=>{var n=e["encode"],r=n["x1"];return r?[t,e]:([r]=AS(n,"x"),[t,R({},e,{encode:{x1:OS([...r])}})])}),t_=(QS.props={},t=>{const a=t["channel"];return(t,e)=>{const r=e["encode"];var n=r["tooltip"];if(void 0!==n)return[t,e];n=Array.isArray(a)?a:[a];let i=0;n=n.flatMap(e=>Object.entries(r).filter(([t])=>t.startsWith(e)).flatMap(([t])=>{var[e,n]=AS(r,t),t=[[t,OS(e)]];return e&&null!==n&&(t.push(["tooltip"+(0===i?"":i),OS(e,n)]),i++),t}));return[t,R({},e,{encode:Object.fromEntries(n)})]}}),e_=(t_.props={},()=>(t,e)=>[t,R({scale:{x:{padding:0},y:{padding:0}}},e)]),n_=(e_.props={},()=>(t,e)=>{var{style:n={}}=e,r=Z(e,["data","style"]),{x:i,y:a}=n,n=Z(n,["x","y"]);return null==i||null==a?[t,e]:[[0],R({},r,{data:[0],cartesian:!0,encode:{x:OS([i||0]),y:OS([a||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:n})]}),r_=(n_.props={},()=>(t,e)=>{var{style:n={}}=e;return[t,R({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]}),i_=(r_.props={},()=>(t,e)=>{var n,r=e["data"];return!Array.isArray(r)||r.some(TS)?[t,e]:(n=(r=Array.isArray(r[0])?r:[r]).map(t=>t[0]),r=r.map(t=>t[1]),[t,R({},e,{encode:{x:OS(n),y:OS(r)}})])}),a_=(i_.props={},()=>(t,e)=>{var{style:n={}}=e,n=n["gradient"];return n?[t,R({},e,{encode:{series:SS(_S(t,void 0))}})]:[t,e]}),o_=(a_.props={},(t={})=>{const{groupBy:c="x",reverse:u=!1,orderBy:f,padding:h}=t;return Z(t,["groupBy","reverse","orderBy","padding"]),(t,e)=>{var{data:n,encode:r,scale:i}=e,i=i["series"],[a]=AS(r,"y"),[r]=PS(r,"series","color"),o=RS(r,i),i=NS(c,t,e),n=CS(f)(n,a,r),s=(n&&jS(i,n),new Array(t.length));for(const l of i){u&&l.reverse();for(let t=0;t<l.length;t++)s[l[t]]=o[t]}return[t,R({},e,{scale:{series:{domain:o,paddingInner:h}},encode:{series:OS(s)}})]}}),s_=(o_.props={},t=>{const{groupBy:p=["x"],reducer:y=(t,e)=>e[t[0]],orderBy:v=null,reverse:g=!1,duration:m}=t;return(n,t)=>{const e=t["encode"];var r=(Array.isArray(p)?p:[p]).map(t=>[t,AS(e,t)[0]]);if(0===r.length)return[n,t];let i=[n];for(const[,f]of r){var a=[];for(const n of i){var o=Array.from(Ly(n,t=>f[t]).values());a.push(...o)}i=a}if(v){const[h]=AS(e,v);h&&i.sort((t,e)=>y(t,h)-y(e,h)),g&&i.reverse()}r=(m||3e3)/i.length;const[s]=m?[_S(n,r)]:PS(e,"enterDuration",_S(n,r));var[l]=PS(e,"enterDelay",_S(n,0)),c=new Array(n.length);for(let t=0,e=0;t<i.length;t++){const n=i[t];var u=qy(n,t=>+s[t]);for(const d of n)c[d]=+l[d]+e;e+=u}return[n,R({},t,{encode:{enterDuration:SS(s),enterDelay:SS(c)}})]}});s_.props={};const l_=(t={})=>{const{groupBy:d="x",basis:p="max"}=t;return(e,t)=>{const n=t["encode"];var r,i=Z(n,["x"]),a=Object.entries(i).filter(([t])=>t.startsWith("y")).map(([t])=>[t,AS(n,t)[0]]),[,o]=a.find(([t])=>"y"===t),s=a.map(([t])=>[t,new Array(e.length)]),i=NS(d,e,t),l="function"==typeof(r=p)?r:{min:(t,e)=>Xy(t,t=>e[+t]),max:(t,e)=>qy(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>Zy(t,t=>e[+t]),median:(t,e)=>Jy(t,t=>e[+t]),sum:(t,e)=>ev(t,t=>e[+t]),deviation:(t,e)=>Oy(t,t=>e[+t])}[r]||qy;for(const e of i){var c=l(e,o);for(const h of e)for(let t=0;t<a.length;t++){var[,u]=a[t],[,f]=s[t];f[h]=+u[h]/c}}return[e,R({},t,{encode:Object.fromEntries(s.map(([t,e])=>[t,OS(e,AS(n,t)[1])]))})]}};function c_(t,e,n){return null===t?[-.5,.5]:(t=RS(t,e),[-(e=new Mb({domain:t,range:[0,1],padding:n}).getBandWidth())/2,e/2])}function u_(t,e,n){return e*(1-t)+n*t}l_.props={};const f_=(t={})=>{const{padding:e=0,paddingX:l=e,paddingY:c=e,random:u=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,{x:r,y:i}=r,[a]=AS(n,"x"),[n]=AS(n,"y");const o=c_(a,r,l),s=c_(n,i,c);a=t.map(()=>u_(u(),...s)),r=t.map(()=>u_(u(),...o));return[t,R({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:OS(a),dx:OS(r)}})]}},h_=(f_.props={},(t={})=>{const{padding:a=0,random:o=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,r=r["x"],[n]=AS(n,"x");const i=c_(n,r,a);n=t.map(()=>u_(o(),...i));return[t,R({scale:{x:{padding:.5}}},e,{encode:{dx:OS(n)}})]}}),d_=(h_.props={},(t={})=>{const{groupBy:y="x"}=t;return(e,t)=>{const n=t["encode"];var r=Z(n,["x"]);const i=Object.entries(r).filter(([t])=>t.startsWith("y")).map(([t])=>[t,AS(n,t)[0]]);var a=i.map(([t])=>[t,new Array(e.length)]),o=NS(y,e,t),s=new Array(o.length);for(let t=0;t<o.length;t++){const e=o[t];var[l,c]=Sy(e.flatMap(e=>i.map(([,t])=>+t[e])));s[t]=(l+c)/2}var u=Math.max(...s);for(let t=0;t<o.length;t++){var f=u-s[t];const e=o[t];for(const p of e)for(let t=0;t<i.length;t++){var[,h]=i[t],[,d]=a[t];d[p]=+h[p]+f}}return[e,R({},t,{encode:Object.fromEntries(a.map(([t,e])=>[t,OS(e,AS(n,t)[1])]))})]}}),p_=(d_.props={},(t={})=>{const{groupBy:u="x",series:f=!0}=t;return(t,e)=>{var n=e["encode"];const[r]=AS(n,"y");var[,i]=AS(n,"y1"),n=(f?PS(n,"series","color"):AS(n,"color"),NS(u,t,e)),a=new Array(t.length);for(const c of n){var o=c.map(t=>+r[t]);for(let n=0;n<c.length;n++){var s=c[n],l=Math.max(...o.filter((t,e)=>e!==n));a[s]=r[s]>l?l:r[s]}}return[t,R({},e,{encode:{y1:OS(a,i)}})]}});function y_(t,e){return[t[0]]}function v_(t,e){return[t[t.length-1]]}function g_(t,e){return[t[Uy(t,t=>e[t])]]}function m_(t,e){return[t[function(t,e){let n,r=-1,i=-1;if(void 0===e)for(const o of t)++i,null!=o&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);else for(var a of t)null!=(a=e(a,++i,t))&&(n>a||void 0===n&&a>=a)&&(n=a,r=i);return r}(t,t=>e[t])]]}p_.props={};const b_=(t={})=>{const{groupBy:s="series"}=t,l=Z(t,["groupBy"]);return(t,e)=>{var n=e["encode"],t=NS(s,t,e),[r,i]=Object.entries(l)[0];const[a]=AS(n,r),o="function"==typeof(n=i)?n:{first:y_,last:v_,max:g_,min:m_}[n]||y_;return[t.flatMap(t=>o(t,a)),e]}},x_=(b_.props={},(t={})=>{var e=t["selector"],t=Z(t,["selector"]);return b_(Object.assign({x:e},t))}),w_=(x_.props={},(t={})=>{var e=t["selector"],t=Z(t,["selector"]);return b_(Object.assign({y:e},t))});function k_(e){return t=>null===t?e:e+" of "+t}function E_(){return[(t,e)=>Zy(t,t=>+e[t]),k_("mean")]}function M_(){return[(t,e)=>Jy(t,t=>+e[t]),k_("median")]}function O_(){return[(t,e)=>qy(t,t=>+e[t]),k_("max")]}function S_(){return[(t,e)=>Xy(t,t=>+e[t]),k_("min")]}function __(){return[(t,e)=>t.length,k_("count")]}function A_(){return[(t,e)=>ev(t,t=>+e[t]),k_("sum")]}function P_(){return[(t,e)=>e[t[0]],k_("first")]}function T_(){return[(t,e)=>e[t[t.length-1]],k_("last")]}w_.props={};const L_=(t={})=>{const a=t["groupBy"],c=Z(t,["groupBy"]);return(t,e)=>{const{data:o,encode:s}=e,l=a(t,e);var n,r,i;return l?(n=Object.entries(c).map(([t,e])=>{const[n,r]=function(t){if("function"==typeof t)return[t,null];var e={mean:E_,max:O_,count:__,first:P_,last:T_,sum:A_,min:S_,median:M_}[t];if(e)return e();throw new Error(`Unknown reducer: ${t}.`)}(e),[i,a]=AS(s,t);return[t,OS(l.map(t=>n(t,null!==i&&void 0!==i?i:o)),(null==r?void 0:r(a))||a)]}),r=Object.keys(s).map(t=>{const[e,n]=AS(s,t);return[t,OS(l.map(t=>e[t[0]]),n)]}),i=l.map(t=>o[t[0]]),[Sx(l),R({},e,{data:i,encode:Object.fromEntries([...r,...n])})]):[t,e]}},N_=(L_.props={},(t={})=>{const{channels:n=["x","y"]}=t,e=Z(t,["channels"]);return L_(Object.assign(Object.assign({},e),{groupBy:(t,e)=>NS(n,t,e)}))}),C_=(N_.props={},(t={})=>N_(Object.assign(Object.assign({},t),{channels:["x","color","series"]}))),j_=(C_.props={},(t={})=>N_(Object.assign(Object.assign({},t),{channels:["y","color","series"]}))),R_=(j_.props={},(t={})=>N_(Object.assign(Object.assign({},t),{channels:["color"]})));function I_(t,e,n){var{reverse:r,slice:i,channel:a}=n,n=Z(n,["reverse","slice","channel"]),o=e["encode"];const[s]=AS(o,a);var l,n=function(t,e,n){const{by:r=t,reducer:i="max"}=e,[a]=AS(n,r);if("function"==typeof i)return t=>i(t,a);if("max"===i)return t=>qy(t,t=>+a[t]);if("min"===i)return t=>Xy(t,t=>+a[t]);if("sum"===i)return t=>ev(t,t=>+a[t]);if("median"===i)return t=>Jy(t,t=>+a[t]);if("mean"===i)return t=>Zy(t,t=>+a[t]);if("first"===i)return t=>a[t[0]];if("last"===i)return t=>a[t[t.length-1]];throw new Error("Unknown reducer: "+i)}(a,n,o),n=(o=t,c=t=>s[t],(2!==(l=n).length?Ry(Ny(o,l,c),([t,e],[n,r])=>by(e,r)||by(t,n)):Ry(Ly(o,c),([t,e],[n,r])=>l(e,r)||by(t,n))).map(([t])=>t)),o=(r&&n.reverse(),"number"==typeof i?[0,i]:i),c=i?n.slice(...o):n;return[t,R(e,{scale:{[a]:{domain:c}}})]}R_.props={};const F_=(t={})=>{const{reverse:o=!1,slice:s,channel:l,ordinal:c=!0}=t,u=Z(t,["reverse","slice","channel","ordinal"]);return(t,e)=>{if(c)return I_(t,e,Object.assign({reverse:o,slice:s,channel:l},u));{var n=Object.assign({reverse:o,slice:s,channel:l},u);var{reverse:n,channel:r}=n,i=e["encode"];const[a]=AS(i,r);return i=Ry(t,t=>a[t]),n&&i.reverse(),[i,e]}}},B_=(F_.props={},(t={})=>F_(Object.assign(Object.assign({},t),{channel:"x"}))),D_=(B_.props={},(t={})=>F_(Object.assign(Object.assign({},t),{channel:"color"}))),z_=(D_.props={},(t={})=>F_(Object.assign(Object.assign({},t),{channel:"y"})));z_.props={};const G_=(t={})=>{const{field:o,channel:s="y",reducer:l="sum"}=t;return(t,e)=>{var{data:n,encode:r}=e;const[i]=AS(r,"x");var a,n=o?(n=n,"string"==typeof(a=o)?n.map(t=>t[a]):n.map(a)):AS(r,s)[0],r=Cy(t,function(e,n){if("function"==typeof e)return t=>e(t,n);if("sum"===e)return t=>ev(t,t=>+n[t]);throw new Error("Unknown reducer: "+e)}(l,n),t=>i[t]).map(t=>t[1]);return[t,R({},e,{scale:{x:{flex:r}}})]}};function W_(t,e,n){var r=t.length;if(0===r)return[];var{innerWidth:i,innerHeight:a}=n;let l=Math.ceil(Math.sqrt(e/(a/i))),c=i/l,u=Math.ceil(e/l),o=u*c;for(;o>a;)l+=1,c=i/l,u=Math.ceil(e/l),o=u*c;const f=a-u*c,h=u<=1?0:f/(u-1),[d,p]=u<=1?[(i-r*c)/(r-1),(a-c)/2]:[0,0];return t.map((t,e)=>{var[t,n,r,i]=Ex(t),a=e%l,e=Math.floor(e/l),o=a*c,s=(u-e-1)*c+f,r=c/r,i=c/i;return`translate(${o-t+d*a}, ${s-n-h*e-p}) scale(${r}, ${i})`})}G_.props={};const V_=()=>(t,e)=>[t,R({},e,{modifier:W_,axis:!1})],Y_=(V_.props={},"thresholds");function H_(t){var[e,n]=Sy(t);return Math.min(200,(t=t,Math.ceil((n-e)*Math.cbrt(My(t))/(3.49*Oy(t)))))}const q_=(t={})=>{const{groupChannels:s=["color"],binChannels:l=["x","y"]}=t,c=Z(t,["groupChannels","binChannels"]),u={};return L_(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(c).filter(([t])=>!t.startsWith(Y_)))),Object.fromEntries(l.flatMap(e=>[[e,([t])=>+u[e].get(t).split(",")[0]],[e+"1",([t])=>+u[e].get(t).split(",")[1]]]))),{groupBy:(t,e)=>{const n=e["encode"],i=l.map(t=>{var[t]=AS(n,t);return t}),a=J(c,Y_),o=t.filter(e=>i.every(t=>Kv(t[e]))),r=[...s.map(t=>{var[t]=AS(n,t);return t}).filter(Kv).map(e=>t=>e[t]),...l.map((t,e)=>{const n=i[e];e=a[t]||H_(n),e=Hy().thresholds(e).value(t=>+n[t])(o);const r=new Map(e.flatMap(t=>{var{x0:e,x1:n}=t;const r=e+","+n;return t.map(t=>[t,r])}));return u[t]=r,t=>r.get(t)})];return Array.from(Ly(o,e=>r.map(t=>t(e)).join("-")).values())}}))},U_=(q_.props={},(t={})=>{var e=t["thresholds"];return q_(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))});U_.props={};const X_=(t={})=>{const{groupBy:n,thresholds:o=2e3}=t,e=Z(t,["groupBy","thresholds"]);return L_(Object.assign(Object.assign({},e),{groupBy:(t,e)=>{t=NS(n,t,e);return t.every(t=>t.length<=o)?null:t.flatMap(e=>{{var n=e,r=Math.max(1,Math.floor(e.length/o)),i=n.length,a=[];let t=0;for(;t<i;)a.push(n.slice(t,t+=r));return a}})}}))},K_=(X_.props={},(s={})=>(t,e)=>{const i=e["encode"],n=Object.entries(s).map(([t,e])=>{const[n]=AS(i,t);if(!n)return null;if("function"==typeof e)return t=>e(n[t]);const r=Array.isArray(e)?e:[e];return 0===r.length?null:t=>r.includes(n[t])}).filter(Kv);if(0===n.length)return[t,e];const r=t.filter(e=>n.every(t=>t(e))),a=r.map((t,e)=>e);var o=Object.entries(i).map(([t,e])=>[t,Object.assign(Object.assign({},e),{value:a.map(t=>e.value[r[t]])})]);return[t,R({},e,{encode:Object.fromEntries(o)})]});K_.props={};var xc="object"==typeof p&&p&&p.Object===Object&&p,Eo="object"==typeof self&&self&&self.Object===Object&&self,Sc=xc||Eo||Function("return this")(),Pc=Sc.Symbol,as=Object.prototype,$_=as.hasOwnProperty,Z_=as.toString,J_=Pc?Pc.toStringTag:void 0;var Q_=Object.prototype.toString;var t4="[object Null]",e4="[object Undefined]",n4=Pc?Pc.toStringTag:void 0;function r4(t){if(null==t)return void 0===t?e4:t4;if(n4&&n4 in Object(t)){var e=t,n=$_.call(e,J_),r=e[J_];try{var i=!(e[J_]=void 0)}catch(t){}var a=Z_.call(e);return i&&(n?e[J_]=r:delete e[J_]),a}return Q_.call(t)}function i4(t){return null!=t&&"object"==typeof t}var a4=Array.isArray;function o4(t){return t}var s4="[object AsyncFunction]",l4="[object Function]",c4="[object GeneratorFunction]",u4="[object Proxy]";function f4(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}var h4=/^(?:0|[1-9]\d*)$/;var d4=9007199254740991;function p4(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=d4}function y4(t){return null!=t&&p4(t.length)&&!function(t){var e;if(e=typeof t,null!=t&&("object"==e||"function"==e))return(e=r4(t))==l4||e==c4||e==s4||e==u4}(t)}var v4=Object.prototype;function g4(t){return i4(t)&&"[object Arguments]"==r4(t)}var Tc=Object.prototype,m4=Tc.hasOwnProperty,b4=Tc.propertyIsEnumerable,x4=g4(function(){return arguments}())?g4:function(t){return i4(t)&&m4.call(t,"callee")&&!b4.call(t,"callee")};var mc="object"==typeof c&&c&&!c.nodeType&&c,Mc=mc&&"object"==typeof module&&module&&!module.nodeType&&module,rc=Mc&&Mc.exports===mc?Sc.Buffer:void 0,w4=(rc?rc.isBuffer:void 0)||function(){return!1},k4={};k4["[object Float32Array]"]=k4["[object Float64Array]"]=k4["[object Int8Array]"]=k4["[object Int16Array]"]=k4["[object Int32Array]"]=k4["[object Uint8Array]"]=k4["[object Uint8ClampedArray]"]=k4["[object Uint16Array]"]=k4["[object Uint32Array]"]=!0,k4["[object Arguments]"]=k4["[object Array]"]=k4["[object ArrayBuffer]"]=k4["[object Boolean]"]=k4["[object DataView]"]=k4["[object Date]"]=k4["[object Error]"]=k4["[object Function]"]=k4["[object Map]"]=k4["[object Number]"]=k4["[object Object]"]=k4["[object RegExp]"]=k4["[object Set]"]=k4["[object String]"]=k4["[object WeakMap]"]=!1;var E4,kc="object"==typeof c&&c&&!c.nodeType&&c,M4=kc&&"object"==typeof module&&module&&!module.nodeType&&module,O4=M4&&M4.exports===kc&&xc.process,nu=function(){try{var t=M4&&M4.require&&M4.require("util").types;return t?t:O4&&O4.binding&&O4.binding("util")}catch(t){}}(),wc=nu&&nu.isTypedArray,S4=wc?(E4=wc,function(t){return E4(t)}):function(t){return i4(t)&&p4(t.length)&&!!k4[r4(t)]},_4=Object.prototype.hasOwnProperty;function A4(t,e){var n,r,i,a,o=a4(t),s=!o&&x4(t),l=!o&&!s&&w4(t),c=!o&&!s&&!l&&S4(t),u=o||s||l||c,f=u?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],h=f.length;for(n in t)!e&&!_4.call(t,n)||u&&("length"==n||l&&("offset"==n||"parent"==n)||c&&("buffer"==n||"byteLength"==n||"byteOffset"==n)||(a=void 0,a=typeof(r=n),(i=null==(i=h)?9007199254740991:i)&&("number"==a||"symbol"!=a&&h4.test(r))&&-1<r&&r%1==0&&r<i))||f.push(n);return f}P4=Object.keys,T4=Object;var P4,T4,L4=function(t){return P4(T4(t))},N4=Object.prototype.hasOwnProperty;function C4(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||v4))return L4(t);var e,n,r,i=[];for(r in Object(t))N4.call(t,r)&&"constructor"!=r&&i.push(r);return i}function j4(t){return(y4(t)?A4:C4)(t)}var R4,I4=function(t,e,n){for(var r=-1,i=Object(t),a=n(t),o=a.length;o--;){var s=a[R4?o:++r];if(!1===e(i[s],s,i))break}return t};B4=function(t,e){return t&&I4(t,e,j4)};function F4(t,e){if(null!=t){if(!y4(t))return B4(t,e);for(var n=t.length,r=D4?n:-1,i=Object(t);(D4?r--:++r<n)&&!1!==e(i[r],r,i););}return t}var B4,D4;function z4(t,e){(a4(t)?f4:F4)(t,"function"==typeof(t=e)?t:o4)}function G4(t,e,n){return e<=t&&t<=n}function W4(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function V4(t,e,n){var r=!1,i=t.length;if(!(i<=2)){for(var a,o,s,l=0;l<i;l++){var c=t[l],u=t[(l+1)%i];if(o=u,((s=[e,n])[0]-(a=c)[0])*(o[1]-a[1])==(o[0]-a[0])*(s[1]-a[1])&&Math.min(a[0],o[0])<=s[0]&&s[0]<=Math.max(a[0],o[0])&&Math.min(a[1],o[1])<=s[1]&&s[1]<=Math.max(a[1],o[1]))return 1;0<W4(c[1]-n)!=0<W4(u[1]-n)&&W4(e-(n-c[1])*(c[0]-u[0])/(c[1]-u[1])-c[0])<0&&(r=!r)}return r}}function Y4(t){for(var e,n,r=[],i=t.length,a=0;a<i-1;a++){var o=t[a],s=t[a+1];r.push({from:{x:o[0],y:o[1]},to:{x:s[0],y:s[1]}})}return 1<r.length&&(e=t[0],n=t[i-1],r.push({from:{x:n[0],y:n[1]},to:{x:e[0],y:e[1]}})),r}function H4(t,c){var u=!1;return z4(t,function(t){if(e=t.from,t=t.to,n=c.from,r=c.to,i=n.x-e.x,a=n.y-e.y,o=t.x-e.x,t=t.y-e.y,s=r.x-n.x,r=r.y-n.y,l=null,l=.001*(o*o+t*t)*(s*s+r*r)<(n=o*r-t*s)*n&&G4(r=(i*r-a*s)/n,0,1)&&G4((i*t-a*o)/n,0,1)?{x:e.x+r*o,y:e.y+r*t}:l)return!(u=!0);var e,n,r,i,a,o,s,l}),u}function q4(t){var e=t.map(function(t){return t[0]}),t=t.map(function(t){return t[1]});return{minX:Math.min.apply(null,e),maxX:Math.max.apply(null,e),minY:Math.min.apply(null,t),maxY:Math.max.apply(null,t)}}function U4(t){var{min:t,max:e}=t.getRenderBounds(),[t,n]=t,[e,r]=e;return[[t,n],[t,r],[e,r],[e,n]]}function X4(t){return t.style.priority||0}const K4=()=>(n,t)=>{var r=[];n.sort((t,e)=>by(X4(t),X4(e)));for(let t=0;t<n.length;t++){var i=n[t];let e=!(i.style.visibility="visible");for(let t=0;t<r.length;t++){var a=r[t];if(function(e,n){if(!(e.length<2||n.length<2)){var r,i,a,t=q4(e),o=q4(n);if(t=t,!((o=o).minX>t.maxX||o.maxX<t.minX||o.minY>t.maxY||o.maxY<t.minY))return r=!1,z4(n,function(t){if(V4(e,t[0],t[1]))return!(r=!0)}),r?1:(z4(e,function(t){if(V4(n,t[0],t[1]))return!(r=!0)}),r||(i=Y4(e),o=Y4(n),a=!1,z4(o,function(t){if(H4(i,t))return!(a=!0)}),a))}}(U4(i),U4(a))){i.style.visibility="hidden",e=!0;break}}e||r.push(i)}return n};function $4(){const n=new Map;return[t=>n.get(t),(t,e)=>n.set(t,e)]}const Z4=t=>{const{maxIter:k=10,maxError:E=.1,padding:M=1}=t;return i=>{var e=i.length;if(!(e<=1)){const[y,v]=$4(),[g,m]=$4();var a,o,s,l,[c,t]=$4(),[u,n]=$4();for(const b of i){var{min:r,max:f}=function(t){var t=t.cloneNode(!0),{min:e,max:n}=((e=t.getElementById("connector"))&&t.removeChild(e),t.getRenderBounds());return t.destroy(),{min:e,max:n}}(b);const[x,y]=r;var[r,f]=f;v(b,y),m(b,y),t(b,f-y),n(b,[x,r])}for(let t=0;t<k;t++){i.sort((t,e)=>by(g(t),g(e)));let r=0;for(let n=0;n<e-1;n++){var h=i[n];let t=n+1,e;for(;(e=i[t])&&([[a,o],[s,l]]=[u(h),u(e)],!(a<l&&s<o));)t+=1;if(e){const y=g(h);var d=c(h),p=g(e),d=p-(y+d);d<M&&(d=(M-d)/2,r=Math.max(r,d),m(h,y-d),m(e,p+d))}}if(r<E)break}for(const w of i)w.style.y+=g(w)-y(w)}return i}},J4=t=>{const{edgeDistance:i=0}=t;return(t,e)=>{if(lv(e)){var{x:n,width:r}=e.getOptions();const a=e.getCenter();e=Zv(i,r);const o=n+e,s=n+r-e;t.forEach(t=>{var{x:e,x0:n,y0:r}=t.style,e=e<=a[0]?o-e:s-e,{x:e,y:i}=(t.style.x+=e,t.style),n=bx([n,r],a),r=bx([0,i],a),i=n[1]?n[0]*r[1]/n[1]+a[0]:e;t.style.connectorPoints=[[i-e,0]]})}return t}},Q4=t=>(t,e)=>{if(lv(e)){const a=e.getCenter(),o=t.reduce((t,e)=>{var{x0:e,y0:n,offset:r=0}=e.style;return Math.max(t,xx(a,[e,n])+r)},0);t.forEach(t=>{var{x0:e,y0:n,connector:r,connectorLength2:i=0}=t.style,e=kx([e-a[0],n-a[1]]),n=r?i*(Math.sin(e)<0?-1:1):0,r=a[0]+Math.sin(e)*o,i=a[1]-Math.cos(e)*o;t.style.x=r+n,t.style.y=i,t.style.connectorPoints=[[-n,0]]})}return t};var T=1e-6,tA=1e-12,L=Math.PI,eA=L/2,nA=L/4,rA=2*L,iA=180/L,aA=L/180,oA=Math.abs,sA=Math.atan,lA=Math.atan2,C=Math.cos,cA=Math.ceil,uA=Math.exp,fA=Math.log,hA=Math.pow,j=Math.sin,dA=Math.sign||function(t){return 0<t?1:t<0?-1:0},pA=Math.sqrt,yA=Math.tan;function vA(t){return 1<t?0:t<-1?L:Math.acos(t)}function gA(t){return 1<t?eA:t<-1?-eA:Math.asin(t)}function mA(){}function bA(t,e){t&&wA.hasOwnProperty(t.type)&&wA[t.type](t,e)}var xA={Feature:function(t,e){bA(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)bA(n[r].geometry,e)}},wA={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){kA(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)kA(n[r],e,0)},Polygon:function(t,e){EA(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)EA(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)bA(n[r],e)}};function kA(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function EA(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)kA(t[n],e,1);e.polygonEnd()}function MA(t,e){t&&xA.hasOwnProperty(t.type)?xA[t.type](t,e):bA(t,e)}function OA(t){return[lA(t[1],t[0]),gA(t[2])]}function SA(t){var e=t[0],t=t[1],n=C(t);return[n*C(e),n*j(e),j(t)]}function _A(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function AA(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 PA(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function TA(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function LA(t){var e=pA(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function NA(n,r){function t(t,e){return t=n(t,e),r(t[0],t[1])}return n.invert&&r.invert&&(t.invert=function(t,e){return(t=r.invert(t,e))&&n.invert(t[0],t[1])}),t}function CA(t,e){return[oA(t)>L?t+Math.round(-t/rA)*rA:t,e]}function jA(t,e,n){return(t%=rA)?e||n?NA(IA(t),FA(e,n)):IA(t):e||n?FA(e,n):CA}function RA(n){return function(t,e){return[L<(t+=n)?t-rA:t<-L?t+rA:t,e]}}function IA(t){var e=RA(t);return e.invert=RA(-t),e}function FA(t,e){var i=C(t),a=j(t),o=C(e),s=j(e);function n(t,e){var n=C(e),r=C(t)*n,t=j(t)*n,n=j(e),e=n*i+r*a;return[lA(t*o-e*s,r*i-n*a),gA(e*o+t*s)]}return n.invert=function(t,e){var n=C(e),r=C(t)*n,t=j(t)*n,n=j(e),e=n*o-t*s;return[lA(t*o+n*s,r*i+e*a),gA(e*i-r*a)]},n}function BA(t,e){(e=SA(e))[0]-=t,LA(e);t=vA(-e[1]);return((-e[2]<0?-t:t)+rA-T)%rA}function DA(){var r,e=[];return{point:function(t,e,n){r.push([t,e,n])},lineStart:function(){e.push(r=[])},lineEnd:mA,rejoin:function(){1<e.length&&e.push(e.pop().concat(e.shift()))},result:function(){var t=e;return e=[],r=null,t}}}function zA(t,e){return oA(t[0]-e[0])<T&&oA(t[1]-e[1])<T}function GA(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 WA(t,e,n,r,a){var o,i,s=[],l=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],i=t[e];if(zA(r,i)){if(!r[2]&&!i[2]){for(a.lineStart(),o=0;o<e;++o)a.point((r=t[o])[0],r[1]);return void a.lineEnd()}i[0]+=2*T}s.push(n=new GA(r,t,null,!0)),l.push(n.o=new GA(r,null,n,!1)),s.push(n=new GA(i,t,null,!1)),l.push(n.o=new GA(i,null,n,!0))}}),s.length){for(l.sort(e),VA(s),VA(l),o=0,i=l.length;o<i;++o)l[o].e=n=!n;for(var c,u,f=s[0];;){for(var h=f,d=!0;h.v;)if((h=h.n)===f)return;c=h.z,a.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(o=0,i=c.length;o<i;++o)a.point((u=c[o])[0],u[1]);else r(h.x,h.n.x,1,a);h=h.n}else{if(d)for(c=h.p.z,o=c.length-1;0<=o;--o)a.point((u=c[o])[0],u[1]);else r(h.x,h.p.x,-1,a);h=h.p}}while(c=(h=h.o).z,d=!d,!h.v);a.lineEnd()}}}function VA(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 YA(t){return oA(t[0])<=L?t[0]:dA(t[0])*((oA(t[0])+L)%rA-L)}function HA(v,g,m,b){return function(s){var l,c,u,n=g(s),f=DA(),h=g(f),d=!1,e={point:r,lineStart:i,lineEnd:a,polygonStart:function(){e.point=p,e.lineStart=o,e.lineEnd=y,c=[],l=[]},polygonEnd:function(){e.point=r,e.lineStart=i,e.lineEnd=a,c=Qy(c);var t=function(t,e){var n=YA(e),r=e[1],e=j(r),i=[j(n),-C(n),0],a=0,o=0,s=new _y;1===e?r=eA+T:-1===e&&(r=-eA-T);for(var l=0,c=t.length;l<c;++l)if(f=(u=t[l]).length)for(var u,f,h=u[f-1],d=YA(h),p=h[1]/2+nA,y=j(p),v=C(p),g=0;g<f;++g,d=b,y=w,v=x,h=m){var m=u[g],b=YA(m),x=m[1]/2+nA,w=j(x),x=C(x),k=b-d,E=0<=k?1:-1,M=E*k,O=L<M,S=y*w;s.add(lA(S*E*j(M),v*x+S*C(M))),a+=O?k+E*rA:k,O^n<=d^n<=b&&(LA(S=AA(SA(h),SA(m))),LA(M=AA(i,S)),(E=(O^0<=k?-1:1)*gA(M[2]))<r||r===E&&(S[0]||S[1]))&&(o+=O^0<=k?1:-1)}return(a<-T||a<T&&s<-tA)^1&o}(l,b);c.length?(d||(s.polygonStart(),d=!0),WA(c,UA,t,m,s)):t&&(d||(s.polygonStart(),d=!0),s.lineStart(),m(null,null,1,s),s.lineEnd()),d&&(s.polygonEnd(),d=!1),c=l=null},sphere:function(){s.polygonStart(),s.lineStart(),m(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function r(t,e){v(t,e)&&s.point(t,e)}function t(t,e){n.point(t,e)}function i(){e.point=t,n.lineStart()}function a(){e.point=r,n.lineEnd()}function p(t,e){u.push([t,e]),h.point(t,e)}function o(){h.lineStart(),u=[]}function y(){p(u[0][0],u[0][1]),h.lineEnd();var t,e,n,r,i=h.clean(),a=f.result(),o=a.length;if(u.pop(),l.push(u),u=null,o)if(1&i){if(0<(e=(n=a[0]).length-1)){for(d||(s.polygonStart(),d=!0),s.lineStart(),t=0;t<e;++t)s.point((r=n[t])[0],r[1]);s.lineEnd()}}else 1<o&&2&i&&a.push(a.pop().concat(a.shift())),c.push(a.filter(qA))}return e}}function qA(t){return 1<t.length}function UA(t,e){return((t=t.x)[0]<0?t[1]-eA-T:eA-t[1])-((e=e.x)[0]<0?e[1]-eA-T:eA-e[1])}CA.invert=CA;var XA=HA(function(){return 1},function(c){var u,f=NaN,h=NaN,d=NaN;return{lineStart:function(){c.lineStart(),u=1},point:function(t,e){var n,r,i,a,o,s=0<t?L:-L,l=oA(t-f);oA(l-L)<T?(c.point(f,h=0<(h+e)/2?eA:-eA),c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),c.point(t,h),u=0):d!==s&&L<=l&&(oA(f-d)<T&&(f-=d*T),oA(t-s)<T&&(t-=s*T),l=h,i=e,o=j((n=f)-(r=t)),h=oA(o)>T?sA((j(l)*(a=C(i))*j(r)-j(i)*(r=C(l))*j(n))/(r*a*o)):(l+i)/2,c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),u=0),c.point(f=t,h=e),d=s},lineEnd:function(){c.lineEnd(),f=h=NaN},clean:function(){return 2-u}}},function(t,e,n,r){var i;null==t?(i=n*eA,r.point(-L,i),r.point(0,i),r.point(L,i),r.point(L,0),r.point(L,-i),r.point(0,-i),r.point(-L,-i),r.point(-L,0),r.point(-L,i)):oA(t[0]-e[0])>T?(t=t[0]<e[0]?L:-L,i=n*t/2,r.point(-t,i),r.point(0,i),r.point(t,i)):r.point(e[0],e[1])},[-L,-eA]);function KA(d){var y=C(d),p=6*aA,f=0<y,h=oA(y)>T;function v(t,e){return C(t)*C(e)>y}function g(t,e,n){var r,i,a,o,s,l,c,u=[1,0,0],f=AA(SA(t),SA(e)),h=_A(f,f),d=f[0],p=h-d*d;return p?(r=AA(u,f),PA(u=TA(u,y*h/p),TA(f,-y*d/p)),(p=(f=_A(u,h=r))*f-(d=_A(h,h))*(_A(u,u)-1))<0?void 0:(PA(p=TA(h,(-f-(r=pA(p)))/d),u),p=OA(p),n?(i=t[0],a=e[0],o=t[1],e=e[1],a<i&&(c=i,i=a,a=c),!(l=oA((s=a-i)-L)<T)&&e<o&&(c=o,o=e,e=c),(l||s<T?l?0<o+e^p[1]<(oA(p[0]-i)<T?o:e):o<=p[1]&&p[1]<=e:L<s^(i<=p[0]&&p[0]<=a))?(PA(c=TA(h,(-f+r)/d),u),[p,OA(c)]):void 0):p)):!n&&t}function m(t,e){var n=f?d:L-d,r=0;return t<-n?r|=1:n<t&&(r|=2),e<-n?r|=4:n<e&&(r|=8),r}return HA(v,function(a){var o,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(t,e){var n,r=[t,e],i=v(t,e),t=f?i?0:m(t,e):i?m(t+(t<0?L:-L),e):0;!o&&(c=l=i)&&a.lineStart(),i===l||(n=g(o,r))&&!zA(o,n)&&!zA(r,n)||(r[2]=1),i!==l?(u=0,i?(a.lineStart(),n=g(r,o),a.point(n[0],n[1])):(n=g(o,r),a.point(n[0],n[1],2),a.lineEnd()),o=n):h&&o&&f^i&&(t&s||!(e=g(r,o,!0))||(u=0,f?(a.lineStart(),a.point(e[0][0],e[0][1]),a.point(e[1][0],e[1][1]),a.lineEnd()):(a.point(e[1][0],e[1][1]),a.lineEnd(),a.lineStart(),a.point(e[0][0],e[0][1],3)))),!i||o&&zA(o,r)||a.point(r[0],r[1]),o=r,l=i,s=t},lineEnd:function(){l&&a.lineEnd(),o=null},clean:function(){return u|(c&&l)<<1}}},function(t,e,n,r){var i=r,r=d,a=p,o=n,n=t,s=e;if(a){var l=C(r),c=j(r),u=o*a;null==n?(n=r+o*rA,s=r-u/2):(n=BA(l,n),s=BA(l,s),(0<o?n<s:s<n)&&(n+=o*rA));for(var f,h=n;0<o?s<h:h<s;h-=u)f=OA([l,-c*C(h),-c*j(h)]),i.point(f[0],f[1])}},f?[0,-d]:[-L,d-L])}var $A=1e9,ZA=-$A;function JA(g,m,b,x){function w(t,e){return g<=t&&t<=b&&m<=e&&e<=x}function k(t,e,n,r){var i=0,a=0;if(null==t||(i=o(t,n))!==(a=o(e,n))||s(t,e)<0^0<n)for(;r.point(0===i||3===i?g:b,1<i?x:m),(i=(i+n+4)%4)!==a;);else r.point(e[0],e[1])}function o(t,e){return oA(t[0]-g)<T?0<e?0:3:oA(t[0]-b)<T?0<e?2:1:oA(t[1]-m)<T?0<e?1:0:0<e?3:2}function E(t,e){return s(t.x,e.x)}function s(t,e){var n=o(t,1),r=o(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(r){var i,f,a,o,s,l,c,u,h,d,p,y=r,t=DA(),e={point:n,lineStart:function(){e.point=v,f&&f.push(a=[]);d=!0,h=!1,c=u=NaN},lineEnd:function(){i&&(v(o,s),l&&h&&t.rejoin(),i.push(t.result()));e.point=n,h&&y.lineEnd()},polygonStart:function(){y=t,i=[],f=[],p=!0},polygonEnd:function(){var t=function(){for(var t=0,e=0,n=f.length;e<n;++e)for(var r,i,a=f[e],o=1,s=a.length,l=a[0],c=l[0],u=l[1];o<s;++o)r=c,i=u,l=a[o],c=l[0],u=l[1],i<=x?x<u&&(u-i)*(g-r)<(c-r)*(x-i)&&++t:u<=x&&(c-r)*(x-i)<(u-i)*(g-r)&&--t;return t}(),e=p&&t,n=(i=Qy(i)).length;(e||n)&&(r.polygonStart(),e&&(r.lineStart(),k(null,null,1,r),r.lineEnd()),n&&WA(i,E,t,k,r),r.polygonEnd());y=r,i=f=a=null}};function n(t,e){w(t,e)&&y.point(t,e)}function v(t,e){var n,r,i=w(t,e);f&&a.push([t,e]),d?(o=t,s=e,d=!1,(l=i)&&(y.lineStart(),y.point(t,e))):i&&h?y.point(t,e):!function(t,e,n,r,i,a){var o=t[0],s=t[1],l=0,c=1,u=e[0]-o,f=e[1]-s,n=n-o;if(u||!(0<n)){if(n/=u,u<0){if(n<l)return;n<c&&(c=n)}else if(0<u){if(c<n)return;l<n&&(l=n)}if(n=i-o,u||!(n<0)){if(n/=u,u<0){if(c<n)return;l<n&&(l=n)}else if(0<u){if(n<l)return;n<c&&(c=n)}if(n=r-s,f||!(0<n)){if(n/=f,f<0){if(n<l)return;n<c&&(c=n)}else if(0<f){if(c<n)return;l<n&&(l=n)}if(n=a-s,f||!(n<0)){if(n/=f,f<0){if(c<n)return;l<n&&(l=n)}else if(0<f){if(n<l)return;n<c&&(c=n)}return 0<l&&(t[0]=o+l*u,t[1]=s+l*f),c<1&&(e[0]=o+c*u,e[1]=s+c*f),1}}}}}(n=[c=Math.max(ZA,Math.min($A,c)),u=Math.max(ZA,Math.min($A,u))],r=[t=Math.max(ZA,Math.min($A,t)),e=Math.max(ZA,Math.min($A,e))],g,m,b,x)?i&&(y.lineStart(),y.point(t,e),p=!1):(h||(y.lineStart(),y.point(n[0],n[1])),y.point(r[0],r[1]),i||y.lineEnd(),p=!1),c=t,u=e,h=i}return e}}function QA(t,e,n){var r=tv(t,e-T,n).concat(e);return function(e){return r.map(function(t){return[e,t]})}}function tP(t,e,n){var r=tv(t,e-T,n).concat(e);return function(e){return r.map(function(t){return[t,e]})}}function eP(){return y=p=10,v=90,g=360,m=2.5,e.lines=function(){return t().map(function(t){return{type:"LineString",coordinates:t}})},e.outline=function(){return{type:"Polygon",coordinates:[h(a).concat(d(l).slice(1),h(i).reverse().slice(1),d(c).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.extentMajor(t).extentMinor(t):e.extentMinor()},e.extentMajor=function(t){return arguments.length?(a=+t[0][0],i=+t[1][0],c=+t[0][1],l=+t[1][1],i<a&&(t=a,a=i,i=t),l<c&&(t=c,c=l,l=t),e.precision(m)):[[a,c],[i,l]]},e.extentMinor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],n<r&&(t=r,r=n,n=t),o<s&&(t=s,s=o,o=t),e.precision(m)):[[r,s],[n,o]]},e.step=function(t){return arguments.length?e.stepMajor(t).stepMinor(t):e.stepMinor()},e.stepMajor=function(t){return arguments.length?(v=+t[0],g=+t[1],e):[v,g]},e.stepMinor=function(t){return arguments.length?(p=+t[0],y=+t[1],e):[p,y]},e.precision=function(t){return arguments.length?(m=+t,u=QA(s,o,90),f=tP(r,n,m),h=QA(c,l,90),d=tP(a,i,m),e):m},e.extentMajor([[-180,-90+T],[180,90-T]]).extentMinor([[-180,-80-T],[180,80+T]])();function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return tv(cA(a/v)*v,i,v).map(h).concat(tv(cA(c/g)*g,l,g).map(d)).concat(tv(cA(r/p)*p,n,p).filter(function(t){return oA(t%v)>T}).map(u)).concat(tv(cA(s/y)*y,o,y).filter(function(t){return oA(t%g)>T}).map(f))}var n,r,i,a,o,s,l,c,u,f,h,d,p,y,v,g,m}var nP,rP,iP,aP,oP=t=>t,sP=new _y,lP=new _y,cP={point:mA,lineStart:mA,lineEnd:mA,polygonStart:function(){cP.lineStart=uP,cP.lineEnd=dP},polygonEnd:function(){cP.lineStart=cP.lineEnd=cP.point=mA,sP.add(oA(lP)),lP=new _y},result:function(){var t=sP/2;return sP=new _y,t}};function uP(){cP.point=fP}function fP(t,e){cP.point=hP,nP=iP=t,rP=aP=e}function hP(t,e){lP.add(aP*t-iP*e),iP=t,aP=e}function dP(){hP(nP,rP)}var pP=cP,yP=1/0,vP=yP,gP=-yP,mP=gP;var bP,xP,wP,kP,EP={point:function(t,e){t<yP&&(yP=t);gP<t&&(gP=t);e<vP&&(vP=e);mP<e&&(mP=e)},lineStart:mA,lineEnd:mA,polygonStart:mA,polygonEnd:mA,result:function(){var t=[[yP,vP],[gP,mP]];return gP=mP=-(vP=yP=1/0),t}},MP=0,OP=0,SP=0,_P=0,AP=0,PP=0,TP=0,LP=0,NP=0,CP={point:jP,lineStart:RP,lineEnd:BP,polygonStart:function(){CP.lineStart=DP,CP.lineEnd=zP},polygonEnd:function(){CP.point=jP,CP.lineStart=RP,CP.lineEnd=BP},result:function(){var t=NP?[TP/NP,LP/NP]:PP?[_P/PP,AP/PP]:SP?[MP/SP,OP/SP]:[NaN,NaN];return MP=OP=SP=_P=AP=PP=TP=LP=NP=0,t}};function jP(t,e){MP+=t,OP+=e,++SP}function RP(){CP.point=IP}function IP(t,e){CP.point=FP,jP(wP=t,kP=e)}function FP(t,e){var n=t-wP,r=e-kP,n=pA(n*n+r*r);_P+=n*(wP+t)/2,AP+=n*(kP+e)/2,PP+=n,jP(wP=t,kP=e)}function BP(){CP.point=jP}function DP(){CP.point=GP}function zP(){WP(bP,xP)}function GP(t,e){CP.point=WP,jP(bP=wP=t,xP=kP=e)}function WP(t,e){var n=t-wP,r=e-kP,n=pA(n*n+r*r);_P+=n*(wP+t)/2,AP+=n*(kP+e)/2,PP+=n,TP+=(n=kP*t-wP*e)*(wP+t),LP+=n*(kP+e),NP+=3*n,jP(wP=t,kP=e)}var VP=CP;function YP(t){this._context=t}YP.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,rA)}},result:mA};var HP,qP,UP,XP,KP,$P=new _y,ZP={point:mA,lineStart:function(){ZP.point=JP},lineEnd:function(){HP&&QP(qP,UP),ZP.point=mA},polygonStart:function(){HP=!0},polygonEnd:function(){HP=null},result:function(){var t=+$P;return $P=new _y,t}};function JP(t,e){ZP.point=QP,qP=XP=t,UP=KP=e}function QP(t,e){XP-=t,KP-=e,$P.add(pA(XP*XP+KP*KP)),XP=t,KP=e}var tT=ZP;function eT(){this._string=[]}function nT(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function rT(e,n){var r,i,a=4.5;function o(t){return t&&("function"==typeof a&&i.pointRadius(+a.apply(this,arguments)),MA(t,r(i))),i.result()}return o.area=function(t){return MA(t,r(pP)),pP.result()},o.measure=function(t){return MA(t,r(tT)),tT.result()},o.bounds=function(t){return MA(t,r(EP)),EP.result()},o.centroid=function(t){return MA(t,r(VP)),VP.result()},o.projection=function(t){return arguments.length?(r=null==t?(e=null,oP):(e=t).stream,o):e},o.context=function(t){return arguments.length?(i=null==t?(n=null,new eT):new YP(n=t),"function"!=typeof a&&i.pointRadius(a),o):n},o.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(i.pointRadius(+t),+t),o):a},o.projection(e).context(n)}function iT(r){return function(t){var e,n=new aT;for(e in r)n[e]=r[e];return n.stream=t,n}}function aT(){}function oT(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),MA(n,t.stream(EP)),e(EP.result()),null!=r&&t.clipExtent(r),t}function sT(i,a,t){return oT(i,function(t){var e=a[1][0]-a[0][0],n=a[1][1]-a[0][1],r=Math.min(e/(t[1][0]-t[0][0]),n/(t[1][1]-t[0][1])),e=+a[0][0]+(e-r*(t[1][0]+t[0][0]))/2,n=+a[0][1]+(n-r*(t[1][1]+t[0][1]))/2;i.scale(150*r).translate([e,n])},t)}function lT(t,e,n){return sT(t,[[0,0],e],n)}function cT(r,i,t){return oT(r,function(t){var e=+i,n=e/(t[1][0]-t[0][0]),e=(e-n*(t[1][0]+t[0][0]))/2,t=-n*t[0][1];r.scale(150*n).translate([e,t])},t)}function uT(i,a,t){return oT(i,function(t){var e=+a,n=e/(t[1][1]-t[0][1]),r=-n*t[0][0],e=(e-n*(t[1][1]+t[0][1]))/2;i.scale(150*n).translate([r,e])},t)}eT.prototype={_radius:4.5,_circle:nT(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=nT(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){var t;return this._string.length?(t=this._string.join(""),this._string=[],t):null}},aT.prototype={constructor:aT,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 fT=16,hT=C(30*aA);function dT(t,e){return+e?(_=t,A=e,function(r){var n,i,a,o,s,l,c,u,f,h,d,p,y={point:t,lineStart:e,lineEnd:g,polygonStart:function(){r.polygonStart(),y.lineStart=m},polygonEnd:function(){r.polygonEnd(),y.lineStart=e}};function t(t,e){t=_(t,e),r.point(t[0],t[1])}function e(){u=NaN,y.point=v,r.lineStart()}function v(t,e){var n=SA([t,e]),e=_(t,e);P(u,f,c,h,d,p,u=e[0],f=e[1],c=t,h=n[0],d=n[1],p=n[2],fT,r),r.point(u,f)}function g(){y.point=t,r.lineEnd()}function m(){e(),y.point=b,y.lineEnd=x}function b(t,e){v(n=t,e),i=u,a=f,o=h,s=d,l=p,y.point=v}function x(){P(u,f,c,h,d,p,i,a,n,o,s,l,fT,r),y.lineEnd=g,g()}return y}):(n=t,iT({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}));var n,_,A;function P(t,e,n,r,i,a,o,s,l,c,u,f,h,d){var p,y,v,g,m,b,x,w,k,E,M=o-t,O=s-e,S=M*M+O*O;4*A<S&&h--&&(v=a+f,x=gA(v/=g=pA((p=r+c)*p+(y=i+u)*y+v*v)),m=oA(oA(v)-1)<T||oA(n-l)<T?(n+l)/2:lA(y,p),b=(x=_(m,x))[0],x=x[1],A<(E=O*(w=b-t)-M*(k=x-e))*E/S||.3<oA((M*w+O*k)/S-.5)||r*c+i*u+a*f<hT)&&(P(t,e,n,r,i,a,b,x,m,p/=g,y/=g,v,h,d),d.point(b,x),P(b,x,m,p,y,v,o,s,l,c,u,f,h,d))}}var pT=iT({point:function(t,e){this.stream.point(t*aA,e*aA)}});function yT(t,n,r,i,a,e){var o,s,l,c,u,f,h,d,p,y,v,g;return e?(f=C(e),e=j(e),h=f*t,d=e*t,p=f/t,y=e/t,v=(e*r-f*n)/t,g=(e*n+f*r)/t,b.invert=function(t,e){return[i*(p*t-y*e+v),a*(g-y*t-p*e)]},b):(o=t,s=n,l=r,c=i,u=a,m.invert=function(t,e){return[(t-s)/o*c,(l-e)/o*u]},m);function m(t,e){return[s+o*(t*=c),l-o*(e*=u)]}function b(t,e){return[h*(t*=i)-d*(e*=a)+n,r-d*t-h*e]}}function vT(t){return gT(function(){return t})()}function gT(t){var e,r,n,i,a,o,s,l,c,u,f=150,h=480,d=250,p=0,y=0,v=0,g=0,m=0,b=0,x=1,w=1,k=null,E=XA,M=null,O=oP,S=.5;function _(t){return l(t[0]*aA,t[1]*aA)}function A(t){return(t=l.invert(t[0],t[1]))&&[t[0]*iA,t[1]*iA]}function P(){var t=yT(f,0,0,x,w,b).apply(null,e(p,y)),t=yT(f,h-t[0],d-t[1],x,w,b);return r=jA(v,g,m),s=NA(e,t),l=NA(r,s),o=dT(s,S),T()}function T(){return c=u=null,_}return _.stream=function(t){return c&&u===t?c:c=pT((n=r,iT({point:function(t,e){t=n(t,e);return this.stream.point(t[0],t[1])}})(E(o(O(u=t))))));var n},_.preclip=function(t){return arguments.length?(E=t,k=void 0,T()):E},_.postclip=function(t){return arguments.length?(O=t,M=n=i=a=null,T()):O},_.clipAngle=function(t){return arguments.length?(E=+t?KA(k=t*aA):(k=null,XA),T()):k*iA},_.clipExtent=function(t){return arguments.length?(O=null==t?(M=n=i=a=null,oP):JA(M=+t[0][0],n=+t[0][1],i=+t[1][0],a=+t[1][1]),T()):null==M?null:[[M,n],[i,a]]},_.scale=function(t){return arguments.length?(f=+t,P()):f},_.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],P()):[h,d]},_.center=function(t){return arguments.length?(p=t[0]%360*aA,y=t[1]%360*aA,P()):[p*iA,y*iA]},_.rotate=function(t){return arguments.length?(v=t[0]%360*aA,g=t[1]%360*aA,m=2<t.length?t[2]%360*aA:0,P()):[v*iA,g*iA,m*iA]},_.angle=function(t){return arguments.length?(b=t%360*aA,P()):b*iA},_.reflectX=function(t){return arguments.length?(x=t?-1:1,P()):x<0},_.reflectY=function(t){return arguments.length?(w=t?-1:1,P()):w<0},_.precision=function(t){return arguments.length?(o=dT(s,S=t*t),T()):pA(S)},_.fitExtent=function(t,e){return sT(_,t,e)},_.fitSize=function(t,e){return lT(_,t,e)},_.fitWidth=function(t,e){return cT(_,t,e)},_.fitHeight=function(t,e){return uT(_,t,e)},function(){return e=t.apply(this,arguments),_.invert=e.invert&&A,P()}}function mT(t){var e=0,n=L/3,r=gT(t),t=r(e,n);return t.parallels=function(t){return arguments.length?r(e=t[0]*aA,n=t[1]*aA):[e*iA,n*iA]},t}function bT(t,e){var n,r,i,a=j(t),o=(a+j(e))/2;return oA(o)<T?(n=C(t),s.invert=function(t,e){return[t/n,gA(e*n)]},s):(i=pA(r=1+a*(2*o-a))/o,l.invert=function(t,e){var e=i-e,n=lA(t,oA(e))*dA(e);return e*o<0&&(n-=L*dA(t)*dA(e)),[n/o,gA((r-(t*t+e*e)*o*o)/(2*o))]},l);function s(t,e){return[t*n,j(e)/n]}function l(t,e){e=pA(r-2*o*j(e))/o;return[e*j(t*=o),i-e*C(t)]}}function xT(){return mT(bT).scale(155.424).center([0,33.6442])}function wT(){return xT().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function kT(i){return function(t,e){var n=C(t),r=C(e),n=i(n*r);return n===1/0?[2,0]:[n*r*j(t),n*j(e)]}}function ET(a){return function(t,e){var n=pA(t*t+e*e),r=a(n),i=j(r),r=C(r);return[lA(t*i,n*r),gA(n&&e*i/n)]}}var MT=kT(function(t){return pA(2/(1+t))});MT.invert=ET(function(t){return 2*gA(t/2)});var OT=kT(function(t){return(t=vA(t))&&t/j(t)});function ST(t,e){return[t,fA(yA((eA+e)/2))]}function _T(r){var i,a,o,s=vT(r),e=s.center,l=s.scale,n=s.translate,c=s.clipExtent,u=null;function f(){var e,t=L*l(),n=s((e=jA((e=s.rotate())[0]*aA,e[1]*aA,2<e.length?e[2]*aA:0),function(t){return(t=e.invert(t[0]*aA,t[1]*aA))[0]*=iA,t[1]*=iA,t}([0,0])));return c(null==u?[[n[0]-t,n[1]-t],[n[0]+t,n[1]+t]]:r===ST?[[Math.max(n[0]-t,u),i],[Math.min(n[0]+t,a),o]]:[[u,Math.max(n[1]-t,i)],[a,Math.min(n[1]+t,o)]])}return s.scale=function(t){return(arguments.length?(l(t),f):l)()},s.translate=function(t){return(arguments.length?(n(t),f):n)()},s.center=function(t){return(arguments.length?(e(t),f):e)()},s.clipExtent=function(t){return arguments.length?(null==t?u=i=a=o=null:(u=+t[0][0],i=+t[0][1],a=+t[1][0],o=+t[1][1]),f()):null==u?null:[[u,i],[a,o]]},f()}function AT(t){return yA((eA+t)/2)}function PT(t,e){var n=C(t),i=t===e?j(t):fA(n/C(e))/fA(AT(e)/AT(t)),a=n*hA(AT(t),i)/i;return i?(r.invert=function(t,e){var e=a-e,n=dA(i)*pA(t*t+e*e),r=lA(t,oA(e))*dA(e);return e*i<0&&(r-=L*dA(t)*dA(e)),[r/i,2*sA(hA(a/n,1/i))-eA]},r):ST;function r(t,e){0<a?e<-eA+T&&(e=-eA+T):eA-T<e&&(e=eA-T);e=a/hA(AT(e),i);return[e*j(i*t),a-e*C(i*t)]}}function TT(t,e){return[t,e]}function LT(t,e){var n=C(t),r=t===e?j(t):(n-C(e))/(e-t),i=n/r+t;return oA(r)<T?TT:(a.invert=function(t,e){var e=i-e,n=lA(t,oA(e))*dA(e);return e*r<0&&(n-=L*dA(t)*dA(e)),[n/r,i-dA(r)*pA(t*t+e*e)]},a);function a(t,e){e=i-e,t*=r;return[e*j(t),i-e*C(t)]}}OT.invert=ET(function(t){return t}),ST.invert=function(t,e){return[t,2*sA(uA(e))-eA]},TT.invert=TT;var NT=1.340264,CT=-.081106,jT=893e-6,RT=.003796,IT=pA(3)/2;function FT(t,e){var e=gA(IT*j(e)),n=e*e,r=n*n*n;return[t*C(e)/(IT*(NT+3*CT*n+r*(7*jT+9*RT*n))),e*(NT+CT*n+r*(jT+RT*n))]}function BT(t,e){var n=C(e),r=C(t)*n;return[n*j(t)/r,j(e)/r]}function DT(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function zT(t,e){return[C(e)*j(t),j(e)]}function GT(t,e){var n=C(e),r=1+C(t)*n;return[n*j(t)/r,j(e)/r]}function WT(t,e){return[fA(yA((eA+e)/2)),-t]}FT.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(NT+CT*i+a*(jT+RT*i))-e)/(NT+3*CT*i+a*(7*jT+9*RT*i)))*r)*i*i,!(oA(n)<tA));++o);return[IT*t*(NT+3*CT*i+a*(7*jT+9*RT*i))/C(r),gA(j(r)/IT)]},BT.invert=ET(sA),DT.invert=function(t,e){var n=e,r=25;do{var i=n*n,a=i*i}while(n-=a=(n*(1.007226+i*(.015085+a*(.028874*i-.044475-.005916*a)))-e)/(1.007226+i*(.045255+a*(.259866*i-.311325-.005916*11*a))),oA(a)>T&&0<--r);return[t/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]},zT.invert=ET(gA),GT.invert=ET(function(t){return 2*sA(t)}),WT.invert=function(t,e){return[-e,2*sA(uA(t))-eA]};var VT=Object.freeze({__proto__:null,geoAlbersUsa:function(){var e,n,i,a,o,r,s=wT(),l=xT().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=xT().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){r=[t,e]}};function f(t){var e=t[0],t=t[1];return r=null,i.point(e,t),r||(a.point(e,t),r)||(o.point(e,t),r)}function h(){return e=n=null,f}return f.invert=function(t){var e=s.scale(),n=s.translate(),r=(t[0]-n[0])/e,n=(t[1]-n[1])/e;return(.12<=n&&n<.234&&-.425<=r&&r<-.214?l:.166<=n&&n<.234&&-.214<=r&&r<-.115?c:s).invert(t)},f.stream=function(t){return e&&n===t?e:(r=[s.stream(n=t),l.stream(t),c.stream(t)],i=r.length,e={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()}});var r,i},f.precision=function(t){return arguments.length?(s.precision(t),l.precision(t),c.precision(t),h()):s.precision()},f.scale=function(t){return arguments.length?(s.scale(t),l.scale(.35*t),c.scale(t),f.translate(s.translate())):s.scale()},f.translate=function(t){var e,n,r;return arguments.length?(e=s.scale(),n=+t[0],r=+t[1],i=s.translate(t).clipExtent([[n-.455*e,r-.238*e],[n+.455*e,r+.238*e]]).stream(u),a=l.translate([n-.307*e,r+.201*e]).clipExtent([[n-.425*e+T,r+.12*e+T],[n-.214*e-T,r+.234*e-T]]).stream(u),o=c.translate([n-.205*e,r+.212*e]).clipExtent([[n-.214*e+T,r+.166*e+T],[n-.115*e-T,r+.234*e-T]]).stream(u),h()):s.translate()},f.fitExtent=function(t,e){return sT(f,t,e)},f.fitSize=function(t,e){return lT(f,t,e)},f.fitWidth=function(t,e){return cT(f,t,e)},f.fitHeight=function(t,e){return uT(f,t,e)},f.scale(1070)},geoAlbers:wT,geoAzimuthalEqualArea:function(){return vT(MT).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:MT,geoAzimuthalEquidistant:function(){return vT(OT).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:OT,geoConicConformal:function(){return mT(PT).scale(109.5).parallels([30,30])},geoConicConformalRaw:PT,geoConicEqualArea:xT,geoConicEqualAreaRaw:bT,geoConicEquidistant:function(){return mT(LT).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:LT,geoEqualEarth:function(){return vT(FT).scale(177.158)},geoEqualEarthRaw:FT,geoEquirectangular:function(){return vT(TT).scale(152.63)},geoEquirectangularRaw:TT,geoGnomonic:function(){return vT(BT).scale(144.049).clipAngle(60)},geoGnomonicRaw:BT,geoIdentity:function(){var r,i,e,n,a,o,s,l=1,c=0,u=0,f=1,h=1,d=0,p=null,y=1,v=1,g=iT({point:function(t,e){t=x([t,e]);this.stream.point(t[0],t[1])}}),m=oP;function b(){return y=l*f,v=l*h,o=s=null,x}function x(t){var e,n=t[0]*y,t=t[1]*v;return d&&(e=t*r-n*i,n=n*r+t*i,t=e),[n+c,t+u]}return x.invert=function(t){var e,n=t[0]-c,t=t[1]-u;return d&&(e=t*r+n*i,n=n*r-t*i,t=e),[n/y,t/v]},x.stream=function(t){return o&&s===t?o:o=g(m(s=t))},x.postclip=function(t){return arguments.length?(m=t,p=e=n=a=null,b()):m},x.clipExtent=function(t){return arguments.length?(m=null==t?(p=e=n=a=null,oP):JA(p=+t[0][0],e=+t[0][1],n=+t[1][0],a=+t[1][1]),b()):null==p?null:[[p,e],[n,a]]},x.scale=function(t){return arguments.length?(l=+t,b()):l},x.translate=function(t){return arguments.length?(c=+t[0],u=+t[1],b()):[c,u]},x.angle=function(t){return arguments.length?(i=j(d=t%360*aA),r=C(d),b()):d*iA},x.reflectX=function(t){return arguments.length?(f=t?-1:1,b()):f<0},x.reflectY=function(t){return arguments.length?(h=t?-1:1,b()):h<0},x.fitExtent=function(t,e){return sT(x,t,e)},x.fitSize=function(t,e){return lT(x,t,e)},x.fitWidth=function(t,e){return cT(x,t,e)},x.fitHeight=function(t,e){return uT(x,t,e)},x},geoProjection:vT,geoProjectionMutator:gT,geoMercator:function(){return _T(ST).scale(961/rA)},geoMercatorRaw:ST,geoNaturalEarth1:function(){return vT(DT).scale(175.295)},geoNaturalEarth1Raw:DT,geoOrthographic:function(){return vT(zT).scale(249.5).clipAngle(90+T)},geoOrthographicRaw:zT,geoStereographic:function(){return vT(GT).scale(250).clipAngle(142)},geoStereographicRaw:GT,geoTransverseMercator:function(){var t=_T(WT),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],2<t.length?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:WT});function YT(t){return{type:"FeatureCollection",features:t.flatMap(t=>function(t){if(!t||!t.type)return null;var 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;return"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featureCollection"===e?t:void 0}(t).features)}}function HT(t,e,n,r){var i,a,o,s,l,c,{outline:e=(e=e.filter(UT),e.find(t=>t.sphere)?{type:"Sphere"}:YT(e.filter(t=>!t.sphere).flatMap(t=>t.data.value)))}=r,{size:r="fitExtent"}=r;"fitExtent"===r?(i=t,o=e,{x:c,y:l,width:a,height:s}=c=n,i.fitExtent([[c,l],[a,s]],o)):"fitWidth"===r&&(i=t,c=e,{width:l,height:a}=l=n,[[l,c],[s,o]]=rT(i.fitWidth(l,c)).bounds(c),o=Math.ceil(o-c),c=Math.min(Math.ceil(s-l),o),s=i.scale()*(c-1)/c,[l,c]=i.translate(),c+=(a-o)/2,i.scale(s).translate([l,c]).precision(.2))}function qT(t){var e=t["data"];return Array.isArray(e)?Object.assign(Object.assign({},t),{data:{value:e}}):(e=e["type"],"graticule10"===e?Object.assign(Object.assign({},t),{data:{value:[eP()]}}):"sphere"===e?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t)}function UT(t){return"geoPath"===t.type}var XT,n=()=>t=>{var{children:e,projection:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,h=Z(n,["type"]),d=function(t){if("function"==typeof t)return t;var e="geo"+Pp(t);if(e=VT[e])return e;throw new Error("Unknown projection: "+t)}(r),p=e.map(qT);let y;return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinates:[{type:function(){return[["custom",(t,e,n,r)=>{const i=d();var a,o,s,l={x:t,y:e,width:n,height:r},c=(HT(i,p,l,h),i),l=h;for([o,s]of Object.entries(l))null!=(a=c[o])&&a.call(c,s);y=rT(i);const u=new Rb({domain:[t,t+n]}),f=new Rb({domain:[e,e+r]});return{transform:t=>{return t=t,(t=i(t))?([t,e]=t,[u.map(t),f.map(e)]):null;var e},untransform:t=>{return(t=t)?([t,e]=t,t=[u.invert(t),f.invert(e)],i.invert(t)):null;var e}}}]]}}],children:p.flatMap(t=>{return UT(t)?(e=t.style,Object.assign(Object.assign({},t),{type:"path",style:Object.assign(Object.assign({},e),{d:t=>y(t)})})):t;var e})})]},ko=(n.props={},()=>t=>{var{data:e,scale:n,encode:r,style:i,animate:a,key:o}=t,t=Z(t,["type","data","scale","encode","style","animate","key"]);return[Object.assign(Object.assign({type:"geoView"},t),{children:[{type:"geoPath",key:o+"-0",data:{value:e},scale:n,encode:r,style:i,animate:a}]})]});ko.props={};const KT={"composition.geoView":n,"composition.geoPath":ko};function $T(){return Object.assign({"data.fetch":x1,"data.inline":P1,"data.sortBy":A1,"data.sort":E1,"data.filter":k1,"data.pick":S1,"data.rename":_1,"data.subset":O1,"data.fold":w1,"data.custom":T1,"data.map":L1,"data.cluster":a1,"data.tree":o1,"data.sankey":Yv,"data.arc":R1,"data.wordCloud":em,"data.join":rm,"transform.maybeZeroY1":LS,"transform.maybeZeroX":HS,"transform.maybeStackY":VS,"transform.maybeTitle":YS,"transform.maybeSeries":KS,"transform.maybeZeroPadding":e_,"transform.stackY":GS,"transform.binX":U_,"transform.bin":q_,"transform.dodgeX":o_,"transform.jitter":f_,"transform.jitterX":h_,"transform.symmetryY":d_,"transform.diffY":p_,"transform.stackEnter":s_,"transform.normalizeY":l_,"transform.select":b_,"transform.selectX":x_,"transform.selectY":w_,"transform.groupX":C_,"transform.groupY":j_,"transform.groupColor":R_,"transform.group":N_,"transform.maybeSize":US,"transform.maybeZeroY":qS,"transform.maybeKey":XS,"transform.sortX":B_,"transform.sortY":z_,"transform.sortColor":D_,"transform.flexX":G_,"transform.maybeTupleY":$S,"transform.maybeTupleX":ZS,"transform.maybeIdentityY":JS,"transform.maybeIdentityX":QS,"transform.maybeTuple":i_,"transform.maybeVisualPosition":n_,"transform.maybeFunctionAttribute":r_,"transform.maybeGradient":a_,"transform.maybeTooltip":t_,"transform.pack":V_,"transform.sample":X_,"transform.filter":K_,"coordinate.cartesian":Gp,"coordinate.polar":Wp,"coordinate.helix":Vp,"coordinate.transpose":Yp,"coordinate.theta":Xp,"coordinate.reflect":Hp,"coordinate.reflectX":qp,"coordinate.reflectY":Up,"coordinate.parallel":$p,"coordinate.fisheye":Zp,"coordinate.fisheyeX":Jp,"coordinate.fisheyeY":Qp,"coordinate.radial":Kp,"encode.constant":t0,"encode.field":n0,"encode.transform":e0,"encode.column":r0,"mark.interval":gy,"mark.rect":my,"mark.line":fv,"mark.point":hv,"mark.text":dv,"mark.cell":pv,"mark.area":yv,"mark.link":vv,"mark.image":gv,"mark.polygon":mv,"mark.box":bv,"mark.vector":xv,"mark.lineX":kv,"mark.lineY":wv,"mark.connector":Ev,"mark.range":Sv,"mark.rangeX":_v,"mark.rangeY":Av,"mark.sankey":Jv,"mark.path":Qv,"mark.treemap":ig,"mark.pack":ag,"mark.boxplot":pg,"mark.shape":yg,"mark.forceGraph":r1,"mark.tree":s1,"mark.wordCloud":im,"palette.category10":am,"palette.category20":om,"palette.sequentialBlue":sm,"palette.sequentialDarkBlue":lm,"palette.sequentialGreen":cm,"palette.sequentialDarkGreen":um,"palette.sequentialGrey":fm,"palette.sequentialOrange":hm,"palette.sequentialPink":dm,"palette.sequentialRed":pm,"palette.sequentialYellow":ym,"palette.sequentialPurple":vm,"palette.sequentialYellowOrange":gm,"palette.sequentialYellowGreen":mm,"palette.sequentialPinkPurple":bm,"palette.sequentialGreenBlue":xm,"palette.divergingGreenYellow":wm,"palette.divergingRedBlue":km,"palette.divergingGreenRed":Em,"palette.divergingRedPurple":Mm,"scale.linear":l2,"scale.ordinal":c2,"scale.band":s2,"scale.identity":u2,"scale.point":f2,"scale.time":h2,"scale.log":d2,"scale.pow":p2,"scale.sqrt":m2,"scale.threshold":y2,"scale.quantile":v2,"scale.quantize":g2,"scale.sequential":b2,"shape.interval.rect":Ix,"shape.interval.hollow":Fx,"shape.interval.funnel":Bx,"shape.interval.pyramid":zx,"shape.rect.rect":Ix,"shape.rect.hollow":Fx,"shape.cell.cell":Ix,"shape.cell.hollow":Fx,"shape.line.line":Yx,"shape.line.hv":qx,"shape.line.vh":Ux,"shape.line.hvh":Xx,"shape.line.smooth":Hx,"shape.point.bowtie":Jx,"shape.point.cross":Qx,"shape.point.diamond":tw,"shape.point.hexagon":ew,"shape.point.hollowBowtie":nw,"shape.point.hollowDiamond":rw,"shape.point.hollowHexagon":iw,"shape.point.hollow":aw,"shape.point.hollowSquare":ow,"shape.point.hollowTriangle":sw,"shape.point.hollowTriangleDown":lw,"shape.point.hyphen":cw,"shape.point.line":uw,"shape.point.plus":fw,"shape.point.point":hw,"shape.point.square":dw,"shape.point.tick":pw,"shape.point.triangle":yw,"shape.point.triangleDown":vw,"shape.text.text":CM,"shape.area.area":BM,"shape.area.smooth":DM,"shape.area.step":zM,"shape.link.smooth":WM,"shape.link.vhv":VM,"shape.link.arc":YM,"shape.link.link":GM,"shape.image.image":HM,"shape.polygon.polygon":qM,"shape.polygon.ribbon":UM,"shape.box.box":XM,"shape.vector.vector":gw,"shape.label.label":sO,"shape.text.badge":RM,"shape.lineX.line":KM,"shape.lineY.line":KM,"shape.shape.shape":fO,"shape.connector.connector":JM,"shape.range.range":Ix,"shape.rangeX.range":Ix,"shape.rangeY.range":Ix,"shape.path.path":cO,"shape.path.hollow":uO,"theme.light":dO,"theme.dark":yO,"component.axisX":FO,"component.axisY":BO,"component.legendCategory":DO,"component.legendContinuous":zO,"component.title":WO,"component.sliderX":YO,"component.sliderY":HO,"animation.scaleInX":ZO,"animation.scaleOutX":JO,"animation.scaleInY":QO,"animation.scaleOutY":t3,"animation.waveIn":l3,"animation.fadeIn":e3,"animation.fadeOut":n3,"animation.zoomIn":c3,"animation.zoomOut":u3,"animation.pathIn":f3,"animation.morphing":s3,"animation.growInX":h3,"animation.growInY":d3,"interaction.elementHighlight":O3,"interaction.elementHighlightByX":S3,"interaction.elementHighlightByColor":_3,"interaction.elementSelect":P3,"interaction.elementSelectByX":T3,"interaction.elementSelectByColor":L3,"interaction.fisheye":C3,"interaction.chartIndex":N3,"interaction.tooltip":V3,"interaction.legendFilter":$3,"composition.spaceLayer":tS,"composition.spaceFlex":eS,"composition.mark":rS,"composition.view":nS,"composition.facetRect":dS,"composition.repeatMatrix":gS,"composition.facetCircle":ES,"composition.timingKeyframe":MS,"labelTransform.hideOverlap":K4,"labelTransform.dodgeY":Z4,"labelTransform.spider":J4,"labelTransform.surround":Q4},KT)}function ZT(t,e,...n){t&&(t[e]||[]).forEach(t=>{t.apply(this,n)})}function JT(e,n){const r=t=>{return"string"!=typeof t?t:n[t=e+"."+t]||Uv("Unknown Component: "+t)};return[t=>{var e=t["type"],t=Z(t,["type"]);return r(e)(Object.assign({},t))},r]}function s(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}(xo=XT=XT||{}).BEFORE_RENDER="beforerender",xo.AFTER_RENDER="afterrender",xo.BEFORE_PAINT="beforepaint",xo.AFTER_PAINT="afterpaint",xo.BEFORE_CHANGE_DATA="beforechangedata",xo.AFTER_CHANGE_DATA="afterchangedata",xo.BEFORE_CLEAR="beforeclear",xo.AFTER_CLEAR="afterclear",xo.BEFORE_DESTROY="beforedestroy",xo.AFTER_DESTROY="afterdestroy",xo.BEFORE_CHANGE_SIZE="beforechangesize",xo.AFTER_CHANGE_SIZE="afterchangesize";wo=s("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Oo=s("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Mo=s("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),r=s("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),e=s("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),bc=s("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),yo=s("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Ec=s("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),So=s("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),_o=s("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function QT(t,e,n){(t.prototype=e.prototype=n).constructor=t}function t6(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function e6(){}var n6=1/.7,Ao="\\s*([+-]?\\d+)\\s*",Po="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Lo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",r6=/^#([0-9a-f]{3,8})$/,i6=new RegExp(`^rgb\\(${Ao},${Ao},${Ao}\\)$`),a6=new RegExp(`^rgb\\(${Lo},${Lo},${Lo}\\)$`),o6=new RegExp(`^rgba\\(${Ao},${Ao},${Ao},${Po}\\)$`),s6=new RegExp(`^rgba\\(${Lo},${Lo},${Lo},${Po}\\)$`),l6=new RegExp(`^hsl\\(${Po},${Lo},${Lo}\\)$`),c6=new RegExp(`^hsla\\(${Po},${Lo},${Lo},${Po}\\)$`),u6={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function f6(){return this.rgb().formatHex()}function h6(){return this.rgb().formatRgb()}function d6(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=r6.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?p6(e):3===n?new m6(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?y6(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?y6(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=i6.exec(t))?new m6(e[1],e[2],e[3],1):(e=a6.exec(t))?new m6(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=o6.exec(t))?y6(e[1],e[2],e[3],e[4]):(e=s6.exec(t))?y6(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=l6.exec(t))?M6(e[1],e[2]/100,e[3]/100,1):(e=c6.exec(t))?M6(e[1],e[2]/100,e[3]/100,e[4]):u6.hasOwnProperty(t)?p6(u6[t]):"transparent"===t?new m6(NaN,NaN,NaN,0):null}function p6(t){return new m6(t>>16&255,t>>8&255,255&t,1)}function y6(t,e,n,r){return new m6(t=r<=0?e=n=NaN:t,e,n,r)}function v6(t){return(t=t instanceof e6?t:d6(t))?new m6((t=t.rgb()).r,t.g,t.b,t.opacity):new m6}function g6(t,e,n,r){return 1===arguments.length?v6(t):new m6(t,e,n,null==r?1:r)}function m6(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function b6(){return"#"+E6(this.r)+E6(this.g)+E6(this.b)}function x6(){var t=w6(this.opacity);return(1===t?"rgb(":"rgba(")+k6(this.r)+`, ${k6(this.g)}, `+k6(this.b)+(1===t?")":`, ${t})`)}function w6(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function k6(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function E6(t){return((t=k6(t))<16?"0":"")+t.toString(16)}function M6(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new S6(t,e,n,r)}function O6(t){var e,n,r,i,a,o,s,l;return t instanceof S6?new S6(t.h,t.s,t.l,t.opacity):(t=t instanceof e6?t:d6(t))?t instanceof S6?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new S6(o,s,l,t.opacity)):new S6}function S6(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function _6(t){return(t=(t||0)%360)<0?t+360:t}function A6(t){return Math.max(0,Math.min(1,t||0))}function P6(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}QT(e6,d6,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:f6,formatHex:f6,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return O6(this).formatHsl()},formatRgb:h6,toString:h6}),QT(m6,g6,t6(e6,{brighter(t){return t=null==t?n6:Math.pow(n6,t),new m6(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new m6(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new m6(k6(this.r),k6(this.g),k6(this.b),w6(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:b6,formatHex:b6,formatHex8:function(){return"#"+E6(this.r)+E6(this.g)+E6(this.b)+E6(255*(isNaN(this.opacity)?1:this.opacity))},formatRgb:x6,toString:x6})),QT(S6,function(t,e,n,r){return 1===arguments.length?O6(t):new S6(t,e,n,null==r?1:r)},t6(e6,{brighter(t){return t=null==t?n6:Math.pow(n6,t),new S6(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new S6(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new m6(P6(240<=t?t-240:120+t,n,e),P6(t,n,e),P6(t<120?240+t:t-120,n,e),this.opacity)},clamp(){return new S6(_6(this.h),A6(this.s),A6(this.l),w6(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){var t=w6(this.opacity);return(1===t?"hsl(":"hsla(")+_6(this.h)+`, ${100*A6(this.s)}%, ${100*A6(this.l)}%`+(1===t?")":`, ${t})`)}}));const T6=Math.PI/180,L6=180/Math.PI;var N6=1.78277,C6=-.29227,j6=-.90649,R6=1.97294,I6=R6*j6,F6=R6*N6,B6=N6*C6- -.14861*j6;function D6(t,e,n,r){return 1===arguments.length?(i=t)instanceof z6?new z6(i.h,i.s,i.l,i.opacity):(a=(i=i instanceof m6?i:v6(i)).r/255,o=i.g/255,l=i.b/255,l=(R6*(o-(a=(B6*l+I6*a-F6*o)/(B6+I6-F6)))-C6*(o=l-a))/j6,new z6((l=(s=Math.sqrt(l*l+o*o)/(R6*a*(1-a)))?Math.atan2(l,o)*L6-120:NaN)<0?l+360:l,s,a,i.opacity)):new z6(t,e,n,null==r?1:r);var i,a,o,s,l}function z6(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}QT(z6,D6,t6(e6,{brighter(t){return t=null==t?n6:Math.pow(n6,t),new z6(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new z6(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*T6,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),t=Math.sin(t);return new m6(255*(e+n*(-.14861*r+N6*t)),255*(e+n*(C6*r+j6*t)),255*(e+R6*r*n),this.opacity)}}));var G6=t=>()=>t;function W6(e,n){return function(t){return e+t*n}}function V6(a){return 1==(a=+a)?Y6:function(t,e){return e-t?(n=t,r=e,i=a,n=Math.pow(n,i),r=Math.pow(r,i)-n,i=1/i,function(t){return Math.pow(n+t*r,i)}):G6(isNaN(t)?e:t);var n,r,i}}function Y6(t,e){var n=e-t;return n?W6(t,n):G6(isNaN(t)?e:t)}!function t(e){var o=V6(e);function n(e,t){var n=o((e=g6(e)).r,(t=g6(t)).r),r=o(e.g,t.g),i=o(e.b,t.b),a=Y6(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=r(t),e.b=i(t),e.opacity=a(t),e+""}}return n.gamma=t,n}(1);H6=function(s){var l=s.length-1;return function(t){var e,n=t<=0?t=0:1<=t?l-(t=1):Math.floor(t*l),r=s[n],i=s[n+1],a=0<n?s[n-1]:2*r-i,o=n<l-1?s[n+2]:2*i-r;return((1-3*(t=(t-n/l)*l)+3*(n=t*t)-(e=n*t))*a+(4-6*n+3*e)*r+(1+3*t+3*n-3*e)*i+e*o)/6}};var H6,q6=function(t){for(var e,n=t.length,r=new Array(n),i=new Array(n),a=new Array(n),o=0;o<n;++o)e=g6(t[o]),r[o]=e.r||0,i[o]=e.g||0,a[o]=e.b||0;return r=H6(r),i=H6(i),a=H6(a),e.opacity=1,function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e+""}};function U6(s){return function t(o){function e(e,t){var n=s((e=D6(e)).h,(t=D6(t)).h),r=Y6(e.s,t.s),i=Y6(e.l,t.l),a=Y6(e.opacity,t.opacity);return function(t){return e.h=n(t),e.s=r(t),e.l=i(Math.pow(t,o)),e.opacity=a(t),e+""}}return o=+o,e.gamma=t,e}(1)}U6(function(t,e){var n=e-t;return n?W6(t,180<n||n<-180?n-360*Math.round(n/360):n):G6(isNaN(t)?e:t)});var To=U6(Y6),No=t=>q6(t[t.length-1]),a=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(s),Rc=No(a),Co=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(s),p=No(Co),Eo=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(s),as=No(Eo),Pc=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(s),Tc=No(Pc),Mc=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(s),mc=No(Mc),Sc=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(s),rc=No(Sc),kc=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(s),xc=No(kc),nu=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(s),wc=No(nu),n=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(s),ko=No(n),xo=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(s),Ao=No(xo),Lo=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(s),Po=No(Lo),X6=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(s),K6=No(X6),$6=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(s),Z6=No($6),J6=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(s),Q6=No(J6),t8=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(s),e8=No(t8),n8=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(s),r8=No(n8),i8=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(s),a8=No(i8),o8=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(s),s8=No(o8),l8=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(s),c8=No(l8),u8=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(s),f8=No(u8),h8=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(s),d8=No(h8),p8=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(s),y8=No(p8),v8=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(s),g8=No(v8),m8=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(s),b8=No(m8),x8=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(s),w8=No(x8),k8=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(s),E8=No(k8),M8=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(s),No=No(M8);var O8=To(D6(300,.5,0),D6(-240,.5,1)),S8=To(D6(-100,.75,.35),D6(80,1.5,.8)),To=To(D6(260,.75,.35),D6(80,1.5,.8)),_8=D6();var A8=g6(),P8=Math.PI/3,T8=2*Math.PI/3;function L8(e){var n=e.length;return function(t){return e[Math.max(0,Math.min(n-1,Math.floor(t*n)))]}}var N8=L8(s("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),C8=L8(s("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),j8=L8(s("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),R8=L8(s("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),I8=Object.freeze({__proto__:null,schemeCategory10:wo,schemeAccent:Oo,schemeDark2:Mo,schemePaired:r,schemePastel1:e,schemePastel2:bc,schemeSet1:yo,schemeSet2:Ec,schemeSet3:So,schemeTableau10:_o,interpolateBrBG:Rc,schemeBrBG:a,interpolatePRGn:p,schemePRGn:Co,interpolatePiYG:as,schemePiYG:Eo,interpolatePuOr:Tc,schemePuOr:Pc,interpolateRdBu:mc,schemeRdBu:Mc,interpolateRdGy:rc,schemeRdGy:Sc,interpolateRdYlBu:xc,schemeRdYlBu:kc,interpolateRdYlGn:wc,schemeRdYlGn:nu,interpolateSpectral:ko,schemeSpectral:n,interpolateBuGn:Ao,schemeBuGn:xo,interpolateBuPu:Po,schemeBuPu:Lo,interpolateGnBu:K6,schemeGnBu:X6,interpolateOrRd:Z6,schemeOrRd:$6,interpolatePuBuGn:Q6,schemePuBuGn:J6,interpolatePuBu:e8,schemePuBu:t8,interpolatePuRd:r8,schemePuRd:n8,interpolateRdPu:a8,schemeRdPu:i8,interpolateYlGnBu:s8,schemeYlGnBu:o8,interpolateYlGn:c8,schemeYlGn:l8,interpolateYlOrBr:f8,schemeYlOrBr:u8,interpolateYlOrRd:d8,schemeYlOrRd:h8,interpolateBlues:y8,schemeBlues:p8,interpolateGreens:g8,schemeGreens:v8,interpolateGreys:b8,schemeGreys:m8,interpolatePurples:w8,schemePurples:x8,interpolateReds:E8,schemeReds:k8,interpolateOranges:No,schemeOranges:M8,interpolateCividis:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},interpolateCubehelixDefault:O8,interpolateRainbow:function(t){(t<0||1<t)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return _8.h=360*t-100,_8.s=1.5-1.5*e,_8.l=.8-.9*e,_8+""},interpolateWarm:S8,interpolateCool:To,interpolateSinebow:function(t){var e;return t=(.5-t)*Math.PI,A8.r=255*(e=Math.sin(t))*e,A8.g=255*(e=Math.sin(t+P8))*e,A8.b=255*(e=Math.sin(t+T8))*e,A8+""},interpolateTurbo:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"},interpolateViridis:N8,interpolateMagma:C8,interpolateInferno:j8,interpolatePlasma:R8});function F8(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}function B8(t,e,n,r,i){var a=t[0],t=t[1],o=ct();return a=[a,t],(t=o)[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=a[0],t[7]=a[1],t[8]=1,t}function D8(t,e,n,r,i){var a=new Rb({range:[e,e+r]}),o=new Rb({range:[n,n+i]});return{transform:function(t){var e=t[0],t=t[1];return[a.map(e),o.map(t)]},untransform:function(t){var e=t[0],t=t[1];return[a.invert(e),o.invert(t)]}}}function z8(t,e,n,r,i){return(0,t[0])(e,n,r,i)}function G8(t,e,n,r,i){return t[0]}function W8(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],t=t[3],l=new Rb({range:[s,t]}),c=new Rb({range:[a,o]}),u=1<(s=i/r)?1:s,f=1<s?1/s:1;return{transform:function(t){var e=t[0],t=t[1],e=c.map(e),t=l.map(t);return[.5*(t*Math.cos(e)*u)+.5,.5*(t*Math.sin(e)*f)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/u,t=2*(t-.5)/f,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=F8(Math.atan2(t,e),a,o);return[c.invert(t),l.invert(n)]}}}function V8(t,e,n,r,i){return{transform:function(t){var e=t[0];return[t[1],e]},untransform:function(t){var e=t[0];return[t[1],e]}}}function Y8(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return $8.apply(void 0,Z8([[-1,-1]],e,!1))}function H8(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return $8.apply(void 0,Z8([[-1,1]],e,!1))}function q8(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return $8.apply(void 0,Z8([[1,-1]],e,!1))}function U8(t,e,n,r,i){var a,t=t[0],o=ct();return o=o,t=t,a=Math.sin(t),t=Math.cos(t),o[0]=t,o[1]=a,o[2]=0,o[3]=-a,o[4]=t,o[5]=0,o[6]=0,o[7]=0,o[8]=1,o}function X8(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=(t[3]-s)/(+o/(2*Math.PI)+1),c=l/(2*Math.PI),u=new Rb({range:[s,s+.99*l]}),f=new Rb({range:[a,o]}),h=1<(t=i/r)?1:t,d=1<t?1/t:1;return{transform:function(t){var e=t[0],t=t[1],e=f.map(e),t=u.map(t);return[.5*(Math.cos(e)*(c*e+t)*h)+.5,.5*(Math.sin(e)*(c*e+t)*d)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/h,t=2*(t-.5)/d,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=F8(Math.atan2(t,e)+Math.floor(n/l)*Math.PI*2,a,o),e=n-c*t;return[f.invert(t),u.invert(e)]}}}function K8(t,e,n,r,i){var s=t[0],l=t[1],a=t[2],t=t[3],c=new Rb({range:[a,t]});return{transform:function(t){for(var e=[],n=t.length,r=new Ib({domain:new Array(n).fill(0).map(function(t,e){return e}),range:[s,l]}),i=0;i<n;i++){var a=t[i],o=r.map(i),a=c.map(a);e.push(o,a)}return e},untransform:function(t){for(var e=[],n=0;n<t.length;n+=2){var r=t[n+1];e.push(c.invert(r))}return e}}}var $8=function(t,e,n,r,i){var a=t[0],t=t[1],o=ct();return a=[a,t],(t=o)[0]=a[0],t[1]=0,t[2]=0,t[3]=0,t[4]=a[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},Z8=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function J8(t){return 1/Math.tan(t)}function Q8(t,e,n,r,i){var a=J8(t[0]);return{transform:function(t){var e=t[0],t=t[1];return[e+t*a,t]},untransform:function(t){var e=t[0],t=t[1];return[e-t*a,t]}}}function tL(t,e,n,r,i){var a=J8(t[0]);return{transform:function(t){var e=t[0];return[e,t[1]+e*a]},untransform:function(t){var e=t[0];return[e,t[1]-e*a]}}}function eL(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r,r=a?-1:1;return r*i*(n+1)/(n+i/((t-e)*r))+e}function nL(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r;return i/(i*(n+1)/(t-e)-n*(a?-1:1))+e}function rL(t,e,n){return n?new Rb({range:[0,1],domain:[0,e]}).map(t):t}function iL(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=rL(a,r,void 0!==t&&t);return{transform:function(t){var e=t[0],t=t[1];return[eL(e,s,o,0,1),t]},untransform:function(t){var e=t[0],t=t[1];return[nL(e,s,o,0,1),t]}}}function aL(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=rL(a,i,void 0!==t&&t);return{transform:function(t){return[t[0],eL(t[1],s,o,0,1)]},untransform:function(t){return[t[0],nL(t[1],s,o,0,1)]}}}function oL(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=t[4],c=rL(a,r,t=void 0!==t&&t),u=rL(o,i,t);return{transform:function(t){var e=t[0],t=t[1];return[eL(e,c,s,0,1),eL(t,u,l,0,1)]},untransform:function(t){var e=t[0],t=t[1];return[nL(e,c,s,0,1),nL(t,u,l,0,1)]}}}function sL(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=void 0!==(t=t[4])&&t,c=new Rb({range:[0,r]}),u=new Rb({range:[0,i]}),f=t?a:c.map(a),h=t?o:u.map(o);return{transform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=eL(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])},untransform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=nL(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])}}}var lL=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},cL=(uL.prototype.update=function(t){this.options=R({},this.options,t),this.recoordinate()},uL.prototype.clone=function(){return new uL(this.options)},uL.prototype.getOptions=function(){return this.options},uL.prototype.clear=function(){this.update({transformations:[]})},uL.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},uL.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y;return[(2*e+t.width)/2,(2*n+t.height)/2]},uL.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.options.transformations;return this.update({transformations:lL(lL([],n,!0),[lL([],t,!0)],!1)}),this},uL.prototype.map=function(t){return this.output(t)},uL.prototype.invert=function(t){return this.input(t)},uL.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},uL.prototype.compose=function(t){for(var e=(t=void 0===t?!1:t)?lL([],this.options.transformations,!0).reverse():this.options.transformations,n=t?function(t){return t.untransform}:function(t){return t.transform},r=[],a=[],i=function(t,e){return a.push((e=void 0===e?!0:e)?(i=t,function(t){for(var e=[],n=0;n<t.length-1;n+=2){var r=[t[n],t[n+1]],r=i(r);e.push.apply(e,r)}return e}):t);var i},o=0,s=e;o<s.length;o++){var l,c,u,f,h=s[o],d=h[0],h=h.slice(1),p=this.transformers[d];p&&(l=(f=this.options).x,c=f.y,u=f.width,f=f.height,p=p(lL([],h,!0),l,c,u,f),(h=p)instanceof Float32Array||h instanceof Array?r.push(p):(r.length&&(i(this.createMatrixTransform(r,t)),r.splice(0,r.length)),i(n(p)||Fp,"parallel"!==d)))}return r.length&&i(this.createMatrixTransform(r,t)),function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t?e.reduce(function(e,n){return function(t){return n(e(t))}},t):Fp}.apply(void 0,a)},uL.prototype.createMatrixTransform=function(t,e){var n,r,i,a,o,s,l,c,u,f,h,d,p=ct();return e&&t.reverse(),t.forEach(function(t){return ut(p,p,t)}),e&&(e=t=p,(d=new lt(9))[0]=e[0],d[1]=e[1],d[2]=e[2],d[3]=e[3],d[4]=e[4],d[5]=e[5],d[6]=e[6],d[7]=e[7],d[8]=e[8],d=(e=d)[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],c=(e=e[8])*a-o*l,h=d*c+n*(u=-e*i+o*s)+r*(f=l*i-a*s))&&(t[0]=c*(h=1/h),t[1]=(-e*n+r*l)*h,t[2]=(o*n-r*a)*h,t[3]=u*h,t[4]=(e*d-r*s)*h,t[5]=(-o*d+r*i)*h,t[6]=f*h,t[7]=(-l*d+n*s)*h,t[8]=(a*d-n*i)*h),function(t){t=[t[0],t[1],1];return $t(t,t,p),[t[0],t[1]]}},uL);function uL(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:D8,translate:B8,custom:z8,matrix:G8,polar:W8,transpose:V8,scale:$8,"shear.x":Q8,"shear.y":tL,reflect:Y8,"reflect.x":H8,"reflect.y":q8,rotate:U8,helix:X8,parallel:K8,fisheye:oL,"fisheye.x":iL,"fisheye.y":aL,"fisheye.circular":sL},this.update(t)}function fL(t){return void 0!==t.find(t=>"polar"===t.type)}function hL(t){return void 0!==t.find(t=>"helix"===t.type)}function dL(t){return t.filter(({type:t})=>"transpose"===t).length%2==1}function pL(t){return void 0!==t.find(t=>"theta"===t.type)}function yL(t){return void 0!==t.find(t=>"radial"===t.type)}function vL(t,e,n,r,i,a){var o,{guide:s={}}=n,l=function(t,e,n){var{type:n,domain:r,range:i}=n;return void 0!==n?n:"string"==typeof i?"linear":2<(r||i||[]).length?wL(t):void 0===r?ML(e)?wL(t):OL(e)?"time":kL(t,i):ML([r])?wL(t):OL(e)?"time":kL(t,i)}(t,e,n);return"string"!=typeof l?n:(o=function(t,e,n){var r=n["domain"];if(void 0!==r)return r;var{domainMax:i,domainMin:a}=n;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":var[o,s]=function(t,e){var{zero:e=!1}=e;let n=1/0,r=-1/0;for(const i of t)for(const a of i)Kv(a)&&(n=Math.min(n,+a),r=Math.max(r,+a));return n===1/0?[]:e?[Math.min(0,n),r]:[n,r]}(e,n);return[a||o,i||s];case"band":case"ordinal":case"point":return EL(e);case"quantile":return function(t){return EL(t).sort()}(e);case"sequential":var[o,s]=function(t){let e=1/0,n=-1/0;for(const r of t)for(const i of r)Kv(i)&&(e=Math.min(e,+i),n=Math.max(n,+i));return e===1/0?[]:[e<0?-n:e,n]}(e);return[a||o,i||s];default:return[]}}(l,e,n),Object.assign(Object.assign(Object.assign({},n),function(t,e,n,r){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return function(t){var{interpolate:e=hb,nice:n=!1,tickCount:r=10}=t;return Object.assign(Object.assign({},t),{interpolate:e,nice:n,tickCount:r})}(n);case"band":case"point":return function(t,e,n,r){if(void 0!==r.padding||void 0!==r.paddingInner||void 0!==r.paddingOuter)return Object.assign(Object.assign({},r),{unknown:NaN});var t=function(t,e,n){return"enterDelay"===e||"enterDuration"===e?0:"band"!==t?"point"===t?.5:0:pL(n)?0:.1}(t,e,n),{paddingInner:e=t,paddingOuter:n=t}=r;return Object.assign(Object.assign({},r),{paddingInner:e,paddingOuter:n,padding:t,unknown:NaN})}(t,e,r,n);case"sequential":return function(t){const{palette:e="ylGnBu",offset:n}=t,r=Pp(e),i=I8["interpolate"+r];if(i)return{interpolator:n?t=>i(n(t)):i};throw new Error("Unknown palette: "+r)}(n);default:return n}}(l,t,n,r)),{domain:o,range:function(t,e,n,r,i,a,o){var s=r["range"];if("string"==typeof s)return s.split("-");if(void 0!==s)return s;var{rangeMin:l,rangeMax:c}=r;switch(t){case"linear":case"time":case"log":case"sqrt":var u=xL(n,r,i,a,o),[u,f]=function(t,e){return"enterDelay"===t?[0,1e3]:"enterDuration"==t?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:"color"===t?[e[0],function(t){return t[t.length-1]}(e)]:"opacity"!==t&&"size"===t?[1,10]:[0,1]}(e,u);return[l||u,c||f];case"band":case"point":return[l||0,c||1];case"ordinal":return xL(n,r,i,a,o);case"sequential":return;default:return[]}}(l,t,e,n,o,i,a),guide:s,name:t,type:l}))}function gL(t,n){var t=t.filter(({name:t,facet:e=!0})=>e&&t===n),e=t.flatMap(t=>t.domain),r=t.every(mL)?Sy(e):t.every(bL)?Array.from(new Set(e)):null;if(null!==r)for(const i of t)i.domain=r}function mL(t){t=t.type;return"string"==typeof t&&["linear","log","pow","time"].includes(t)}function bL(t){t=t.type;return"string"==typeof t&&["band","point","ordinal"].includes(t)}function xL(t,e,n,r,i){var[i]=JT("palette",i),{defaultCategory10:r,defaultCategory20:a}=r,t=(t=t.flat(),Array.from(new Set(t)).length<=r.length?r:a),{palette:r,offset:a}=e;return function(t,n,r=t=>t){if(!t)return null;const e=Pp(t),i=I8["scheme"+e],a=I8["interpolate"+e];if(!i&&!a)return null;if(i){if(!i.some(Array.isArray))return i;t=i[n.length];if(t)return t}return n.map((t,e)=>a(r(e/n.length)))}(r,n,a)||i({type:r||t})}function wL(t){return(t=t).startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")?"point":"ordinal"}function kL(t,e){return"color"!==t||e?"linear":"sequential"}function EL(t){return Array.from(new Set(t.flat()))}function ML(t){return SL(t,t=>{t=typeof t;return"string"==t||"boolean"==t})}function OL(t){return SL(t,t=>t instanceof Date)}function SL(t,e){for(const n of t)if(n.some(e))return!0;return!1}function _L(t,e,n){var{encode:r={},scale:i={},transform:a=[]}=e,e=Z(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},e),{encode:r,scale:i,transform:a})]}function AL(t,i,a){return Oe(this,void 0,void 0,function*(){var t=a["library"],e=i["data"],[t]=JT("data",t),n=function(t){if(!t)return{type:"inline",value:null};if(Array.isArray(t))return{type:"inline",value:t};var{type:e="inline"}=t,t=Z(t,["type"]);return Object.assign(Object.assign({},t),{type:e})}(e),{transform:r=[]}=n,n=yield function(t){return t.reduce((n,r)=>e=>Oe(this,void 0,void 0,function*(){var t=yield n(e);return r(t)}),Hv)}([Z(n,["transform"]),...r].map(t))(e);return[Array.isArray(n)?Sx(n):[],Object.assign(Object.assign({},i),{data:n})]})}function PL(t,e,n){var r=e["encode"];if(!r)return[t,e];var i,a,o={};for([i,a]of Object.entries(r))if(Array.isArray(a))for(let t=0;t<a.length;t++)o[""+i+(0===t?"":t)]=a[t];else o[i]=a;return[t,Object.assign(Object.assign({},e),{encode:o})]}function TL(t,e,n){const{encode:r,data:i}=e;var a;return r?(a=Ox(r,t=>{var e,n;return function(t){if("object"!=typeof t||t instanceof Date)return;t=t.type;return Kv(t)}(t)?t:(e=i,{type:"function"==typeof(n=t)?"transform":"string"!=typeof n||void 0===(null==(e=null==e?void 0:e[0])?void 0:e[n])?"constant":"field",value:t})}),[t,Object.assign(Object.assign({},e),{encode:a})]):[t,e]}function LL(t,e,n){var r=e["encode"];return r?(r=Ox(r,(t,e)=>{var n=t["type"];return"constant"!==n||(n=e).startsWith("x")||n.startsWith("y")||n.startsWith("position")||"enterDelay"===n||"enterDuration"===n||"updateDelay"===n||"updateDuration"===n||"exitDelay"===n||"exitDuration"===n?t:Object.assign(Object.assign({},t),{visual:!0})}),[t,Object.assign(Object.assign({},e),{encode:r})]):[t,e]}function NL(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];n=n.library;const a=function(t){const[n]=JT("encode",t);return(t,e)=>void 0===e||void 0===t?null:Object.assign(Object.assign({},e),{type:"column",value:n(e)(t),field:function(t){var{type:t,value:e}=t;return"field"===t&&"string"==typeof e?e:null}(e)})}(n);n=Ox(r,t=>a(i,t));return[t,Object.assign(Object.assign({},e),{encode:n})]}function CL(l,t,e){var n,r=t["encode"],i=Z(t,["encode"]);return r?(n=(r=Object.entries(r)).filter(([,t])=>{t=t.value;return Array.isArray(t[0])}).flatMap(([n,t])=>{var r=[[n,new Array(l.length).fill(void 0)]];const i=t["value"],a=Z(t,["value"]);for(let e=0;e<i.length;e++){var o=i[e];if(Array.isArray(o))for(let t=0;t<o.length;t++){var s=r[t]||[""+n+t,new Array(l).fill(void 0)];s[1][e]=o[t],r[t]=s}}return r.map(([t,e])=>[t,Object.assign({type:"column",value:e},a)])}),r=Object.fromEntries([...r,...n]),[l,Object.assign(Object.assign({},i),{encode:r})]):[l,t]}function jL(t,e,n){const{axis:r={},legend:i={}}=e,a=(t,e)=>{return"boolean"==typeof t?t?{}:null:void 0===(t=t[e])||t?t:null};var o="object"==typeof r?Array.from(new Set(["x","y",...Object.keys(r)])):["x","y"];return R(e,{scale:Object.assign(Object.assign({},Object.fromEntries(o.map(t=>[t,{guide:a(r,t)}]))),{color:{guide:a(i,"color")},size:{guide:a(i,"size")}})}),[t,e]}function RL(t,e,n){var r=e["animate"];return r||void 0===r||R(e,{animate:{enterType:null,exitType:null,updateType:null}}),[t,e]}function IL(s,l,c){return Oe(this,void 0,void 0,function*(){var[t,e]=yield function(s,l,c){return Oe(this,void 0,void 0,function*(){var t=c["library"],[t]=JT("transform",t),{preInference:e=[],postInference:n=[]}=l,{transform:r=[]}=s,e=[_L,AL,PL,TL,LL,NL,CL,RL,jL,...e.map(t),...r.map(t),...n.map(t)];let i=[],a=s;for(const o of e)[i,a]=yield o(i,a,c);return[i,a]})}(s,l,{library:c});const{encode:n,scale:u,data:r}=e;if(!1===Array.isArray(r))return null;const i=l["channels"],a=Cy(Object.entries(n).filter(([,t])=>Kv(t)),t=>t.map(([t,e])=>Object.assign({name:t},e)),([t])=>{const e=null==(n=/([^\d]+)\d*$/.exec(t))?void 0:n[1];var n=i.find(t=>t.name===e);return null!=n&&n.independent?t:e});var o=i.filter(t=>{const{name:e,required:n}=t;if(a.find(([t])=>t===e))return!0;if(n)throw new Error(`Missing encoding for channel: ${e}.`);return!1}).flatMap(t=>{const{name:e,scale:s,scaleKey:l,range:c}=t;return a.filter(([t])=>t.startsWith(e)).map(([t,e],n)=>{var r=e.some(t=>t.visual),i=u[t]||{},{independent:a=!1,key:o=l||t,type:r=r?"identity":s}=i,i=Z(i,["independent","key","type"]);return{name:t,values:e,scaleKey:a?Symbol("independent"):o,scale:Object.assign({type:r,range:c},i)}})});return[e,Object.assign(Object.assign({},l),{index:t,channels:o})]})}function FL(t,e,n){var{component:r=[],coordinates:i=[],title:a,theme:o}=e,[,s]=JT("component",n),l=t.filter(({guide:t})=>null!==t),e=function(t,e,n){const[,o]=JT("component",n),{marks:r,coordinates:s}=t,l=new Map(e.map(t=>[t.name,t]));return r.filter(t=>t.slider).flatMap(t=>{t=t.slider;return Object.entries(t).map(([t,e])=>{var n,r,i,a=l.get(t),t=([t,n=[]]=[t,s],"x"===t?dL(n)?"sliderY":"sliderX":"y"===t?dL(n)?"sliderX":"sliderY":null);if(a&&t)return n=o(t)["props"],{defaultPosition:n,defaultSize:r,defaultOrder:i}=n,Object.assign(Object.assign({position:n,size:r,order:i,type:t},e),{scale:a})})}).filter(t=>!!t)}(e,t,n),c=[...r,...e];a&&(t=s("title")["props"],{defaultPosition:n,defaultOrder:r,defaultSize:e}=t,e=function(t){var{size:t,text:e,subtitle:n,style:r,subtitleStyle:i}=t;if(t)return t;r=null!=(t=null==r?void 0:r.fontSize)?t:14,t=null!=(t=null==i?void 0:i.fontSize)?t:12,i=(null==i?void 0:i.spacing)||0;return(e?r+4:0)+(n?t+i:0)}(R({size:e},o,t="string"==typeof a?{text:a}:a)),c.push(Object.assign({type:"title",position:n,order:r,size:e},t)));for(const x of l){var u=function(t,e){var{name:t,guide:n,type:r}=t,n=n["type"];if(void 0!==n)return n;if("color"===t)switch(r){case"ordinal":return"legendCategory";case"linear":return"legendContinuous";default:return null}return dL(e)&&fL(e)||hL(e)||pL(e)?null:t.startsWith("x")?dL(e)?"axisY":"axisX":t.startsWith("y")?dL(e)?"axisX":"axisY":t.startsWith("position")&&!fL(e)?"axisY":null}(x,i);if(null!==u){var f=s(u)["props"],{defaultPosition:h,defaultSize:d,defaultOrder:p}=f,{guide:f,name:y,field:v}=x;for(const w of Array.isArray(f)?f:[f]){var g=function(t,e,n,r,i){n=["left","right","top","bottom","centerHorizontal","center"].includes(r.position)?r.position:n;{if("axisY"===e&&function(t){return void 0!==t.find(t=>"parallel"===t.type)}(i))return null===(t=/position(\d*)/g.exec(t))?n:(t=+t[1],dL(i)?0==t?"top":"centerVertical":0==t?n:"centerHorizontal");if("axisX"===e&&fL(i)&&!dL(i)||"axisY"===e&&fL(i)&&dL(i)||"axisY"===e&&pL(i)||"axisY"===e&&hL(i)||"axisY"===e&&yL(i))return"bottom"===r.position?"arcInner":"arc";if(fL(i)&&("axisX"===e||"axisY"===e))return"arcY";if(yL(i)&&"axisX"===e)return"arcY";if("axisX"===e&&function(t){return void 0!==t.find(t=>"reflect"===t.type)}(i)||"axisX"===e&&function(t){return void 0!==t.find(t=>"reflectY"===t.type)}(i))return"top";if("string"==typeof e&&e.startsWith("legend")&&fL(i)&&"center"===r.position)return"arcCenter"}return n}(y,u,h,w,i),{size:m=d,order:b=p}=w;c.push(Object.assign(Object.assign({title:v},w),{position:g,order:b,size:m,type:u,scale:x}))}}}return c}function BL(t,e,n,r){var[i]=JT("scale",r),[r]=JT("component",r),{scale:a,bbox:o}=t,t=Z(t,["scale","bbox"]),i=a?i(a):null,{field:a,domain:s}=a||{},a={field:a,domain:s,bbox:o};return r(t)(i,a,e,n)}function DL(t,e){var t=function(t,e){var n=Ly(t,t=>t.position),{padding:t,paddingLeft:e=t,paddingRight:r=t,paddingBottom:i=t,paddingTop:t=t}=e,a={paddingBottom:i,paddingLeft:e,paddingTop:t,paddingRight:r};for(const l of["left","right","top","bottom"]){var o="padding"+qv(l);if(void 0===a[o])if(n.has(l)){const t=n.get(l);var s=t.reduce((t,{size:e})=>t+e,0);a[o]=s}else a[o]=30}return a}(t,e),{paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:a}=t,{width:e,height:o,x:s=0,y:l=0,inset:c=0,insetLeft:u=c,insetTop:f=c,insetBottom:h=c,insetRight:c=c,margin:d=0,marginLeft:p=d,marginBottom:y=d,marginTop:v=d,marginRight:d=d}=e;return Object.assign(Object.assign({},t),{width:e,height:o,insetLeft:u,insetTop:f,insetBottom:h,insetRight:c,innerWidth:e-n-r-p-d,innerHeight:o-i-a-v-y,marginLeft:p,marginBottom:y,marginTop:v,marginRight:d,x:s,y:l})}function zL(t,e,n){var I=Ly(t,t=>t.position),{paddingLeft:t,paddingRight:n,paddingTop:r,paddingBottom:F,marginLeft:i,marginTop:a,marginBottom:B,marginRight:D,innerHeight:o,innerWidth:s,height:z,width:G}=n,t=t+i,i=r+a,r=n+D,a=F+B,W={top:[t,0,s,i,0,!0,by],right:[G-r,i,r,o,1,!1,by],bottom:[t,z-a,s,a,0,!1,by],left:[0,i,t,o,1,!0,by],centerHorizontal:[t,i,s,o,-1,null,null],centerVertical:[t,i,s,o,-1,null,null],arc:[t,i,s,o,-1,null,null],arcY:[t,i,s,o,-1,null,null],arcInner:[t,i,s,o,-1,null,null],center:[t,i,s,o,-1,null,null],arcCenter:[t,i,s,o,-1,null,null]};for(const[R,t]of I.entries()){var l=W[R];if("centerHorizontal"===R)!function(e,t,n){const[r,i,,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==0).map(t=>t+r);for(let t=0;t<e.length;t++){var c=e[t];const r=l[t];var u=l[t+1]-r;c.bbox={x:r,y:i,width:u,height:a}}}(t,e,l);else if("centerVertical"===R)!function(e,t,n){const[r,i,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==1).map(t=>t+i);for(let t=0;t<e.length;t++){var c=e[t];const i=l[t];var u=l[t+1]-i;c.bbox={x:r,y:i,width:a,height:u}}}(t,e,l);else if("arc"===R){p=d=h=f=u=c=void 0;var c=t,u=l,[f,h,d,p]=u;for(let t=0;t<c.length;t++)c[t].bbox={x:f,y:h,width:d,height:p}}else if("arcY"===R){E=k=w=x=b=g=v=m=u=y=void 0;var y=t,u=e,[v,g,,m]=m=l,[b,x]=u.getCenter(),[u,w]=GL(u),k=x-w*(m=m/2),E=(w-u)*m;for(let t=0;t<y.length;t++)y[t].bbox={x:b+v,y:k+g,width:0,height:E}}else if("arcInner"===R){T=P=A=_=m=S=O=w=x=M=void 0;var M=t,x=e,[O,S,,w]=w=l,[m,_]=x.getCenter(),[x]=GL(x),A=x*(w=w/2),P=m-A,T=_-A;for(let t=0;t<M.length;t++)M[t].bbox={x:O+P,y:S+T,width:2*A,height:2*A}}else if("arcCenter"===R){q=H=j=C=Y=V=N=_=L=void 0;var L=t,_=e,[N,V,Y,C]=N=l,[_]=GL(_),j=C/2*_/Math.sqrt(2),H=N+Y/2,q=V+C/2;for(let t=0;t<L.length;t++)L[t].bbox={x:H-j,y:q-j,width:2*j,height:2*j}}else!function(n,t){const[e,r,i,a,o,s,l]=t,[c,u,f,h,d,p,y,v]=0===o?["y",r,"x",e,"height",a,"width",i]:["x",e,"y",r,"width",i,"height",a],g=(n.sort((t,e)=>l(t.order,e.order)),s?u+p:u);for(let t=0,e=g;t<n.length;t++){var m=n[t],b=m["size"];m.bbox={[c]:s?e-b:e,[f]:h,[d]:b,[y]:v},e+=b*(s?-1:1)}}(t,l)}}function GL(t){var t=t.getOptions()["transformations"],[,,,t,e]=t.find(t=>"polar"===t[0]);return[t,e]}function WL(P,T,L,N){return Oe(this,void 0,void 0,function*(){const[n]=JT("composition",L);var[t]=JT("interaction",L);const e=new Set(Object.keys(L).map(t=>{return null==(t=/mark\.(.*)/.exec(t))?void 0:t[1]}).filter(Kv)),r=t=>{t=t.type;return"string"==typeof t&&e.has(t)?"mark":t};const i=t=>"standardView"===r(t);var a=t=>{var e;return i(t)?[t]:(e=r(t),n({type:e})(t))},o=[];const s=new Map;for(var l=new Map,c=[P],u=[];c.length;){var f=c.shift();if(i(f)){var h=l.get(f),[h,d]=h?qL(h,f,L):yield YL(f,L),p=(s.set(h,f),o.push(h),d.flatMap(a));if(c.push(...p),p.every(i)){var y=yield Promise.all(p.map(t=>HL(t,L)));gL(h=(h=y).flatMap(t=>Array.from(t.values())).flatMap(t=>t.channels.map(t=>t.scale)),"x"),gL(h,"y");for(let t=0;t<p.length;t++){var v=p[t],g=y[t];l.set(v,g)}}}else{d="mark"===r(f)?f:yield JL(f,L),h=a(d);Array.isArray(h)?c.push(...h):"function"==typeof h&&u.push(h())}}var m=P["on"];ZT(m,XT.BEFORE_PAINT);const b=new Map,x=[];T.selectAll(n7(F)).data(o,t=>t.key).join(t=>t.append("g").attr("className",F).attr("id",t=>t.key).call(VL).each(function(t){UL(t,Q(this),x,L),b.set(t,this)}),t=>t.call(VL).each(function(t){UL(t,Q(this),x,L)}),t=>t.remove());var w=Array.from(b.entries()).map(([t,e])=>({view:t,container:e,options:s.get(t),update:function(i,a,o){return r=>Oe(this,void 0,void 0,function*(){var[t,e]=yield YL(r,a);UL(t,i,[],a);for(const n of e)WL(n,i,a,o);return{options:r,view:t}})}(Q(e),L,N)}));for(const S of w){const P=S["options"];for(const _ of function(t){var{interactions:t=[]}=t;return t}(P))t(_)(S,w)}const{width:k,height:E}=P;var M=[];for(const A of u){var O=new Promise(e=>Oe(this,void 0,void 0,function*(){for(const t of A)yield WL(Object.assign({width:k,height:E},t),T,L,N);e()}));M.push(O)}N.animations=x,ZT(m,XT.AFTER_PAINT);m=x.filter(Kv).map($L).map(t=>t.finished);return Promise.all([...m,...M])})}function VL(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function YL(t,e){return Oe(this,void 0,void 0,function*(){return qL(yield HL(t,e),t,e)})}function HL(m,b){return Oe(this,void 0,void 0,function*(){var[t]=JT("theme",b);const[i,a]=JT("mark",b);var{theme:e,marks:n,coordinates:r=[]}=m,o=t(ZL(e)),s=new Map,l=[];for(const p of n){var c=yield JL(p,b);l.push(c)}for(const y of yield Promise.all(l.map(r=>Oe(this,void 0,void 0,function*(){const{type:t=Uv("G2Mark type is required."),key:n}=r;var e=a(t)["props"],{composite:e=!1}=e;return e?(yield i(r)(m)).map((t,e)=>Object.assign({key:n+"-"+e},t)):r}))).then(t=>t.flat())){var u,f=y["type"],f=a(f)["props"],f=yield IL(y,f,b);f&&([f,u]=f,s.set(f,u))}for(const v of Ly(Array.from(s.values()).flatMap(t=>t.channels),({scaleKey:t})=>t).values()){var h=v.reduce((t,{scale:e})=>R(t,e),{}),d=v[0]["values"],d=Array.from(new Set(d.map(t=>t.field).filter(Kv)));const m=R({guide:{title:0===d.length?void 0:d},field:d[0]},h);d=v[0]["name"];const g=vL(d,v.flatMap(({values:t})=>t.map(t=>t.value)),m,r,o,b);v.forEach(t=>t.scale=g)}return s})}function qL(t,e,n){var[r]=JT("mark",n);const[i]=JT("scale",n);var a,o,[s]=JT("theme",n),{key:l,frame:c=!1,theme:u,style:f={}}=e,s=s(ZL(u)),u=Array.from(t.values()),u=Array.from(new Set(u.flatMap(t=>t.channels.map(t=>t.scale)))),u=FL(Array.from(u),e,n),h=DL(u,e),d=function(t,e,n){var[n]=JT("coordinate",n),{innerHeight:r,innerWidth:i,insetLeft:a,insetTop:o,insetRight:s,insetBottom:l,marginLeft:c,marginTop:u}=t,{coordinates:e=[]}=e,e=(e=e).find(t=>"cartesian"===t.type)?e:[...e,{type:"cartesian"}];return new cL(Object.assign(Object.assign({},t),{x:a+c,y:o+u,width:i-a-s,height:r-l-o,transformations:e.map(n).flat()}))}(h,e,n),e=c?R({mainLineWidth:1,mainStroke:"#000"},f):f,p=(zL(u,d,h),{}),y=[];for([a,o]of t.entries()){const{children:b,dataDomain:x,modifier:w,key:k}=a;var{index:v,channels:g}=o,m=Ox(Object.fromEntries(g.map(({name:t,scale:e})=>[t,e])),t=>{var e=t["relations"],[e]=function(o){if(!o||!Array.isArray(o))return[Hv,Hv];let s,l;return[t=>{s=t.map.bind(t),l=null==(e=t.invert)?void 0:e.bind(t);const r=o.filter(([t])=>"function"==typeof t);var e=o.filter(([t])=>"function"!=typeof t);const i=new Map(e);if(t.map=t=>{for(var[e,n]of r)if(e(t))return n;return i.has(t)?i.get(t):s(t)},l){const n=new Map(e.map(([t,e])=>[e,t])),a=new Map(r.map(([t,e])=>[e,t]));t.invert=t=>a.has(t)?t:n.has(t)?n.get(t):l(t)}return t},t=>(null!==s&&(t.map=s),null!==l&&(t.invert=l),t)]}(e);return e(i(t))});Object.assign(p,m);const E=function(t,e){var n={};for(const s of t){var{values:r,name:i}=s;const l=e[i];for(const c of r){var{name:a,value:o}=c;n[a]=o.map(t=>l.map(t))}}return n}(g,m),[M,O,S]=function([e,n,t]){if(t)return[e,n,t];var r=[],i=[];for(let t=0;t<e.length;t++){var a=e[t],o=n[t];o.every(([t,e])=>Kv(t)&&Kv(e))&&(r.push(a),i.push(o))}return[r,i]}(r(a)(v,m,E,d));g=x||M.length;const _=w?w(O,g,h):[];v=M.map((t,e)=>{var n={points:O[e],transform:_[e],index:t,markKey:k};for(const[r,i]of Object.entries(E))n[r]=i[t],S&&(n["series"+Pp(r)]=S[e].map(t=>i[t]));return S&&(n.seriesIndex=S[e]),n}),g=(o.data=v,o.index=M,null==b?void 0:b(v,m,h));y.push(...g||[])}return[{layout:h,theme:s,coordinate:d,components:u,markState:t,key:l,scale:p,style:e},y]}function UL(U,X,K,$){Oe(this,void 0,void 0,function*(){const{components:I,theme:n,layout:t,markState:e,coordinate:r,key:i,style:F}=U,{width:B,height:D}=t,z=Z(t,["x","y","width","height"]),a=["view","plot","main","content"];var o,s,l,c=a.map((t,e)=>e);const u=a.map(t=>$v(Object.assign({},n,F),t)),G=["a","margin","padding","inset"].map(t=>J(z,t)),f=t=>t.style("x",t=>v[t].x).style("y",t=>v[t].y).style("width",t=>v[t].width).style("height",t=>v[t].height).each(function(t){var e,n,r=Q(this),t=u[t];for([e,n]of Object.entries(t))r.style(e,n)});let h=0,d=0,p=B,y=D;const v=c.map(t=>{var{left:t=0,top:e=0,bottom:n=0,right:r=0}=G[t];return h+=t,d+=e,p-=t+r,y-=e+n,{x:h,y:d,width:p,height:y}}),g=(X.selectAll(n7(at)).data(c.filter(t=>Kv(u[t])),t=>a[t]).join(t=>t.append("rect").attr("className",at).style("zIndex",-2).call(f),t=>t.call(f),t=>t.remove()),X.selectAll(n7(rt)).data(I,(t,e)=>t.type+"-"+e).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className",rt).append(t=>BL(t,r,n,$)),t=>t.each(function(t){var t=BL(t,r,n,$)["attributes"],[e]=this.childNodes;e.update(Object.assign({},t))})),function(t){let e=-1/0,n=1/0;for(var[r,i]of t){var{animate:r={}}=r,i=i["data"],{updateType:a,updateDuration:o=300,updateDelay:s=0,enterType:l,enterDuration:c=300,enterDelay:u=0,exitType:f,exitDuration:h=300,exitDelay:d=0}=r;for(const E of i){var{updateType:p=a,updateDuration:y=o,updateDelay:v=s,enterType:g=l,enterDuration:m=c,enterDelay:b=u,exitDuration:x=h,exitDelay:w=d,exitType:k=f}=E;void 0!==p&&!p||(e=Math.max(e,y+v),n=Math.min(n,v)),void 0!==k&&!k||(e=Math.max(e,x+w),n=Math.min(n,w)),void 0!==g&&!g||(e=Math.max(e,m+b),n=Math.min(n,b))}}return e===-1/0?null:[n,e-n]}(e)),m=X.selectAll(n7(nt)).data([t],()=>i).join(t=>t.append("rect").style("fill","transparent").attr("className",nt).call(QL).call(e7,Array.from(e.keys())),t=>t.call(e7,Array.from(e.keys())).call(t=>{if(!g)return QL(t);{const[l,c]=g;t.transition(function(t){var{x:e,y:n,width:r,height:i}=this.style,{paddingLeft:t,paddingTop:a,innerWidth:o,innerHeight:s}=t;return this.animate([{x:e,y:n,width:r,height:i},{x:t,y:a,width:o,height:s}],{delay:l,duration:c,fill:"both"})})}})).transitions();K.push(...m.flat());for([o,s]of e.entries()){var W=s["data"];const{key:i,class:O}=o,S=function(l,t,e,n){const[c]=JT("shape",n),u=l["data"],{defaultShape:f,data:r}=t,h=r.map(t=>t.points),{theme:d,coordinate:p}=e,{type:y,style:v={}}=l;return(t,e)=>{var{shape:n=f}=v,{shape:n=n,points:r,seriesIndex:i,index:a}=t,t=Z(t,["shape","points","seriesIndex","index"]),t=Object.assign(Object.assign({},t),{shape:n,mark:y,defaultShape:f,index:e});const o=i?i.map(t=>u[t]):u[a],s=i||a;e=Ox(v,t=>XL(t,o,s,u));return c(Object.assign(Object.assign({},e),{type:t7(l,n)}))(r,t,p,d,h)}}(o,s,U,$),_=(b=o,l=s,KL("enter",b,l,U,$)),A=(b=o,l=s,KL("update",b,l,U,$)),P=(b=o,l=s,KL("exit",b,l,U,$));var b=function(t,e,n){t=t.node().parentElement;return t.findAll(t=>t.style.facet===e).flatMap(t=>t.getElementsByClassName(n))}(X,O,"element");const m=X.select("#"+i).selectAll(n7(et)).selectFacetAll(b).data(W,t=>t.key,t=>t.groupKey).join(t=>t.append(S).attr("className",et).transition(function(t){return _(t,[this])}),e=>e.call(t=>{const l=t.parent(),c=function(n){const r=new Map;return t=>{var e;return r.has(t)?r.get(t):(e=n(t),r.set(t,e),e)}}(t=>{var[t,e]=t.getBounds().min;return[t,e]});e.transition(function(t,e){n=this,r=l,i=c,n.__facet__&&(a=n.parentNode.parentNode,s=r.parentNode,[a,o]=i(a),[i,s]=i(s),a=`translate(${a-i}, ${o-s})`,i=n.style.transform,n.style.transform=(("none"===i?"":i)+" "+a).trimStart(),r.append(n));var n,r,i,a,o=S(t,e),s=A(t,[this],[o]);return null===s&&Xv(this,o),s})}),t=>t.each(function(){this.__removed__=!0}).transition(function(t){return P(t,[this])}).remove(),t=>t.append(S).attr("className",et).transition(function(t){var e=this["__fromElements__"],t=A(t,e,[this]);return new mx(e,null,this.parentNode).transition(t).remove(),t}),t=>t.transition(function(t){var e=new mx([],this.__toData__,this.parentNode).append(S).attr("className",et).nodes();return A(t,[this],e)}).remove()).transitions();K.push(...m.flat())}{var x=U,w=X,k=$,E,M;const[T]=JT("labelTransform",k),{markState:V,labelTransform:L}=x,Y=w.select(n7(tt)).node(),N=new Map,C=new Map,H=Array.from(V.entries()).flatMap(([t,e])=>{var{labels:n=[],key:r}=t;const i=function(t,e,n,r){const[s]=JT("shape",r),l=t["data"],{data:i,defaultLabelShape:c}=e,u=i.map(t=>t.points),{theme:f,coordinate:h}=n;return t=>{const{index:e,points:n}=t,r=l[e];var{formatter:i=t=>""+t}=t,t=Ox(Z(t,["formatter"]),t=>XL(t,r,e,l)),{shape:a=c,text:o}=t,t=Z(t,["shape","text"]),i="string"==typeof i?MO(i):i,i=Object.assign(Object.assign({},t),{text:i(o)});return s(Object.assign({type:"label."+a},t))(n,i,h,f,u)}}(t,e,x,k),a=w.select("#"+r).selectAll(n7(et)).nodes().filter(t=>!t.__removed__);return n.flatMap((e,n)=>{const r=Z(e,["transform"]);return a.flatMap(t=>{t=function(n,r,t){const{seriesIndex:e,seriesKey:i,points:a,key:o,index:s}=t.__data__,l=function(t){const e=t.cloneNode(),n=t.getAnimations(),r=(e.style.visibility="hidden",n.forEach(t=>{t=t.effect.getKeyframes();e.attr(t[t.length-1])}),t.parentNode.appendChild(e),e.getLocalBounds()),{min:i,max:a}=(e.destroy(),r);return[i,a]}(t);if(!e)return[Object.assign(Object.assign({},n),{key:o+"-"+r,bounds:l,index:s,points:a})];var t=function(t){t=t.selector;if(!t)return null;if("function"==typeof t)return t;if("first"===t)return t=>[t[0]];if("last"===t)return t=>[t[t.length-1]];throw new Error("Unknown selector: "+t)}(n),c=e.map((t,e)=>Object.assign(Object.assign({},n),{key:i[e]+"-"+r,bounds:[a[e]],index:t,points:a}));return t?t(c):c}(r,n,t);return t.forEach(t=>{N.set(t,i),C.set(t,e)}),t})})}),j=Q(Y).selectAll(n7(it)).data(H,t=>t.key).join(t=>t.append(t=>N.get(t)(t)).attr("className",it),t=>t.each(function(t){Xv(this,N.get(t)(t))}),t=>t.remove()).nodes(),q=Ly(j,t=>C.get(t.__data__)),R=x["coordinate"];for([E,M]of q){var{transform:E=[]}=E;(function(t){return t.reduce((n,r)=>(t,...e)=>r(n(t,...e),...e),Hv)})(E.map(T))(M,R)}L&&L(j,R)}})}function XL(t,e,n,r){return"function"==typeof t?t(e,n,r):"string"==typeof t&&void 0!==e[t]?e[t]:t}function KL(o,t,e,n,r){var[,i]=JT("shape",r);const[s]=JT("animation",r);r=e.defaultShape;const{theme:a,coordinate:l}=n;e=`default${Pp(o)}Animation`;const{[e]:c}=i(t7(t,r)).props,{[o]:u={}}=a,f=J(t.animate||{},o);return(t,e,n)=>{var{[o+"Type"]:t,[o+"Delay"]:r,[o+"Duration"]:i,[o+"Easing"]:a}=t,t=Object.assign({type:t||c},f);return t.type?(t=s(t)(e,n,{delay:r,duration:i,easing:a},l,u),Array.isArray(t)?t:[t]):null}}function $L(t){return t.finished.then(()=>{t.cancel()}),t}function ZL(t={type:"light"}){var{type:e="light"}=t;return Object.assign(Object.assign({},t),{type:e})}function JL(r,i){return Oe(this,void 0,void 0,function*(){var t={library:i},e=r["data"],n=Z(r,["data"]);return null==e?r:([,{data:e}]=yield AL(0,{data:e},t),Object.assign({data:e},n))})}function QL(t){t.style("x",t=>t.paddingLeft).style("y",t=>t.paddingTop).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function t7(t,e){t=t.type;return t+"."+e}function e7(t,e){const n=t=>void 0!==t.class?""+t.class:"";t.selectAll(n7(u)).data(e,t=>t.key).join(t=>t.append("g").attr("className",u).attr("id",t=>t.key).style("facet",n).style("fill","transparent"),t=>t.style("facet",n),t=>t.remove()),t.select(n7(tt)).node()||t.append("g").attr("className",tt)}function n7(...t){return t.map(t=>"."+t).join("")}function r7(t){for(var t=R({},t),e=new Map([[t,null]]),n=new Map([[null,-1]]),r=[t];r.length;){var i,a,o=r.shift(),{children:s=[]}=(void 0===o.key&&(a=e.get(o),i=n.get(o),a=null===a?"0":a.key+"-"+i,o.key=a),o);if(Array.isArray(s))for(let t=0;t<s.length;t++){var l=s[t];e.set(l,o),n.set(l,t),r.push(l)}}return t}function i7(t,e={},n){const{width:r=640,height:i=480,autoFit:a=!1,on:o}=t,s=r7(t),{canvas:l=(u=r,f=i,h=new ep,h.registerPlugin(new gp),new Xc({width:u,height:f,container:document.createElement("div"),renderer:h})),library:c=$T()}=e;var u,f,h;e.canvas=l,e.library=c,a&&!e.bindAutoFit&&([u,f={}]=[t,e],u.autoFit&&window.addEventListener("resize",o7(u,f)),e.bindAutoFit=!0),l.resize(r,i),ZT(o,XT.BEFORE_RENDER);const d=Q(l.document.documentElement);return l.ready.then(()=>WL(Object.assign(Object.assign({},s),{width:r,height:i}),d,c,e)).then(n).then(()=>ZT(o,XT.AFTER_RENDER)),"string"==typeof(h=l.getConfig().container)?document.getElementById(h):h}function a7(t,e={}){var n,r=t["on"],i=e["canvas"];i&&i.destroy(),[i,t={}]=[t,e],i.autoFit&&window.removeEventListener("resize",o7(i,t)),(e=r)&&(n?delete e[n]:e={})}const o7=(i,a={})=>{return r=()=>{var{width:t,height:e,autoFit:n}=i,r=a["canvas"],{width:r,height:n}=eg(r.getConfig().container,n,t,e),t=Object.assign(Object.assign({},i),{width:r,height:n});t.width&&t.height&&i7(t,a)},o=300,function(){var t=this,e=arguments,n=s&&!l;clearTimeout(l),l=setTimeout(function(){l=null,s||r.apply(t,e)},o),n&&r.apply(t,e)};var r,o,s,l};function s7(t,e){for(var n=[t];n.length;){var r=n.pop(),r=(e&&e(r),r.children||[]);for(const i of r)n.push(i)}}class l7{constructor(t={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=t}map(t=t=>t){t=t(this.value);return this.value=t,this}attr(e,n){return 1===arguments.length?this.value[e]:this.map(t=>(t[e]=n,t))}append(t){t=new t({});return t.children=[],t.parentNode=this,t.index=this.children.length,this.children.push(t),t}remove(){var t,e=this.parentNode;return e&&(e=e["children"],t=e.findIndex(t=>t===this),e.splice(t,1)),this}getNodeByKey(e){let n=null;return s7(this,t=>{e===t.attr("key")&&(n=t)}),n}getNodesByType(e){const n=[];return s7(this,t=>{e===t.type&&n.push(t)}),n}changeData(t){let e=this;for(;e&&e.parentNode;)e=e.parentNode;this.attr("data",t),e.render()}call(t,...e){return t(this.map(),...e),this}}function c7(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function u7(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):Array.isArray(t)?this.attr(n,t):(t=[...this.attr(n)||[],t],this.attr(n,t))}}function f7(t,{name:e,key:r=e}){t.prototype[e]=function(t,e){var n;return 0===arguments.length?this.attr(r):1===arguments.length?this.attr(r,t):((n=this.attr(r)||{})[t]=e,this.attr(r,n))}}function h7(t,{name:e,key:i=e}){t.prototype[e]=function(t,e){var n,r=this.attr(i)||{};return 0===arguments.length?r:1===arguments.length?r[t]:((n=r[t])?kp(e)?n.concat(e):n.push(e):r[t]=kp(e)?e:[e],this.attr(i,r))}}function d7(r){return t=>{for(const n of r){var e=n["type"];"value"===e?c7(t,n):"array"===e?u7(t,n):"object"===e?f7(t,n):"node"===e?function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.append(n)}}(t,n):"container"===e?function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}(t,n):"event"===e&&h7(t,n)}return t}}function p7(t){return Object.entries(t).map(([t,e])=>({type:"node",name:t,ctor:e}))}wo=[{name:"encode",type:"object"},{name:"scale",type:"object"},{name:"data",type:"value"},{name:"transform",type:"array"},{name:"style",type:"object"},{name:"animate",type:"object"},{name:"coordinate",type:"array",key:"coordinates"},{name:"interaction",type:"array",key:"interactions"},{name:"label",type:"array",key:"labels"},{name:"axis",type:"object"},{name:"legend",type:"object"},{name:"slider",type:"object"}];let y7=class extends l7{constructor(){super({},"interval")}},v7=(y7=t([d7(wo)],y7),class extends l7{constructor(){super({},"rect")}}),g7=(v7=t([d7(wo)],v7),class extends l7{constructor(){super({},"point")}}),m7=(g7=t([d7(wo)],g7),class extends l7{constructor(){super({},"area")}}),b7=(m7=t([d7(wo)],m7),class extends l7{constructor(){super({},"line")}}),x7=(b7=t([d7(wo)],b7),class extends l7{constructor(){super({},"cell")}}),w7=(x7=t([d7(wo)],x7),class extends l7{constructor(){super({},"vector")}}),k7=(w7=t([d7(wo)],w7),class extends l7{constructor(){super({},"link")}}),E7=(k7=t([d7(wo)],k7),class extends l7{constructor(){super({},"polygon")}});E7=t([d7(wo)],E7);Oo=t([d7(wo)],class extends l7{constructor(){super({},"image")}});let M7=class extends l7{constructor(){super({},"text")}},O7=(M7=t([d7(wo)],M7),class extends l7{constructor(){super({},"box")}}),S7=(O7=t([d7(wo)],O7),class extends l7{constructor(){super({},"lineX")}}),_7=(S7=t([d7(wo)],S7),class extends l7{constructor(){super({},"lineY")}}),A7=(_7=t([d7(wo)],_7),class extends l7{constructor(){super({},"range")}}),P7=(A7=t([d7(wo)],A7),class extends l7{constructor(){super({},"rangeX")}}),T7=(P7=t([d7(wo)],P7),class extends l7{constructor(){super({},"rangeY")}}),L7=(T7=t([d7(wo)],T7),class extends l7{constructor(){super({},"connector")}}),N7=(L7=t([d7(wo)],L7),class extends l7{constructor(){super({},"shape")}}),C7=(N7=t([d7(wo)],N7),class extends l7{constructor(){super({},"sankey")}}),j7=(C7=t([d7([...wo,{name:"layout",type:"value"}])],C7),class extends l7{constructor(){super({},"treemap")}}),R7=(j7=t([d7([...wo,{name:"layout",type:"value"}])],j7),class extends l7{constructor(){super({},"boxplot")}}),I7=(R7=t([d7(wo)],R7),class extends l7{constructor(){super({},"pack")}}),F7=(I7=t([d7([...wo,{name:"layout",type:"value"}])],I7),class extends l7{constructor(){super({},"forceGraph")}}),B7=(F7=t([d7([...wo,{name:"layout",type:"value"}])],F7),class extends l7{constructor(){super({},"tree")}}),D7=(B7=t([d7([...wo,{name:"layout",type:"value"}])],B7),class extends l7{constructor(){super({},"wordCloud")}});D7=t([d7([...wo,{name:"layout",type:"object"}])],D7);Mo={interval:y7,rect:v7,point:g7,area:m7,line:b7,cell:x7,vector:w7,link:k7,polygon:E7,image:Oo,text:M7,box:O7,lineX:S7,lineY:_7,range:A7,rangeX:P7,rangeY:T7,connector:L7,sankey:C7,treemap:j7,boxplot:R7,shape:N7,pack:I7,forceGraph:F7,tree:B7,wordCloud:D7};let z7=class extends l7{constructor(){super({},"view")}},G7=(z7=t([d7([{type:"value",name:"data"},{type:"array",name:"coordinate",key:"coordinates"},{type:"array",name:"interaction",key:"interactions"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"axis"},{type:"object",name:"legend"},...p7(Mo)])],z7),class extends l7{constructor(){super({},"spaceLayer")}}),W7=(G7=t([d7([{type:"value",name:"data"},...p7(Mo)])],G7),class extends l7{constructor(){super({},"spaceFlex")}}),V7=(W7=t([d7([{type:"value",name:"data"},...p7(Mo)])],W7),class extends l7{constructor(){super({},"facetRect")}}),Y7=(V7=t([d7([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...p7(Mo)])],V7),class extends l7{constructor(){super({},"facetCircle")}}),H7=(Y7=t([d7([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...p7(Mo)])],Y7),class extends l7{constructor(){super({},"repeatMatrix")}}),q7=(H7=t([d7([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"encode"},{type:"object",name:"legend"},...p7(Mo)])],H7),class extends l7{constructor(){super({},"timingKeyframe")}}),U7=(q7=t([d7([...p7(Mo)])],q7),class extends l7{constructor(){super({},"geoView")}}),X7=(U7=t([d7([{type:"value",name:"data"},{type:"value",name:"projection"},{type:"array",name:"coordinate",key:"coordinates"},{type:"array",name:"interaction",key:"interactions"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"legend"},...p7(Mo)])],U7),class extends l7{constructor(){super({},"geoPath")}});X7=t([d7([{type:"value",name:"data"},{type:"value",name:"projection"},{type:"array",name:"coordinate",key:"coordinates"},{type:"array",name:"interaction",key:"interactions"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},...p7(Mo)])],X7);var K7={view:z7,spaceLayer:G7,spaceFlex:W7,facetRect:V7,facetCircle:Y7,repeatMatrix:H7,timingKeyframe:q7,geoView:U7,geoPath:X7};for(const J7 of Object.values(K7))d7(p7(K7))(J7);const $7=$T();function Z7(t){return Object.assign(Object.assign({},t.value),{type:t.type})}r=[{name:"data",type:"value"},{name:"width",type:"value"},{name:"height",type:"value"},{name:"coordinate",type:"array",key:"coordinates"},{name:"interaction",type:"array",key:"interactions"},{name:"theme",type:"object"},{name:"title",type:"object"},{name:"key",type:"value"},{name:"transform",type:"array"},{name:"theme",type:"object"},{name:"on",type:"event"},{name:"scale",type:"object"},{name:"axis",type:"object"},{name:"legend",type:"object"},{name:"style",type:"object"},...p7(Mo),...Object.entries(K7).map(([t,e])=>({type:"container",name:t,ctor:e}))];c.Chart=class extends l7{constructor(t={}){var e=t["container"];super(Z(t,["container"]),"view"),this._container=void 0===(t=e)?document.createElement("div"):"string"==typeof t?document.getElementById(t):t,this._context={library:$7}}render(){var t,e,n,r,i,a,o;return this._context.canvas||({width:i=640,height:o=480,renderer:t,plugins:e,autoFit:n}=this.options(),{width:n,height:r}=eg(this._container,n,i,o),this.width(n),this.height(r),this._context.canvas=([n,r,i,a=new ep,o=[]]=[this._container,i,o,t,e],o.push(new gp),o.forEach(t=>a.registerPlugin(t)),new Xc({container:n,width:r,height:i,renderer:a}))),i7(this.options(),this._context),this}options(){var t,e=this,e=null!==(e=e).type?e:((t=e.children[e.children.length-1]).attr("width",e.attr("width")),t.attr("height",e.attr("height")),t.attr("paddingLeft",e.attr("paddingLeft")),t.attr("paddingTop",e.attr("paddingTop")),t.attr("paddingBottom",e.attr("paddingBottom")),t.attr("paddingRight",e.attr("paddingRight")),t.attr("insetLeft",e.attr("insetLeft")),t.attr("insetRight",e.attr("insetRight")),t.attr("insetBottom",e.attr("insetBottom")),t.attr("insetTop",e.attr("insetTop")),t.attr("marginLeft",e.attr("marginLeft")),t.attr("marginBottom",e.attr("marginBottom")),t.attr("marginTop",e.attr("marginTop")),t.attr("marginRight",e.attr("marginRight")),t.attr("autoFit",e.attr("autoFit")),t.attr("padding",e.attr("padding")),t.attr("margin",e.attr("margin")),t.attr("inset",e.attr("inset")),t),n=[e],r=new Map;for(r.set(e,Z7(e));n.length;){const e=n.pop();var i=r.get(e);for(const s of e.children){var a=Z7(s),{children:o=[]}=i;o.push(a),n.push(s),r.set(s,a),i.children=o}}return r.get(e)}node(){return this._container}context(){return this._context}destroy(){var t,e=this.options(),n=e["on"];ZT(n,XT.BEFORE_DESTROY),a7(e,this._context),e=this._container,(t=e.parentNode)&&t.removeChild(e),ZT(n,XT.AFTER_DESTROY)}clear(){var t=this.options(),e=t["on"];ZT(e,XT.BEFORE_CLEAR),a7(t,this._context),ZT(e,XT.AFTER_CLEAR)}forceFit(){var{width:t,height:e}=this.options(),{width:t,height:e}=eg(this._container,!0,t,e);this.changeSize(t,e)}changeSize(t,e){var{width:n,height:r,on:i}=this.options();if(n===t&&r===e)return this;ZT(i,XT.BEFORE_CHANGE_SIZE),this.width(t),this.height(e),this.render(),ZT(i,XT.AFTER_CHANGE_SIZE)}},c.Chart=t([d7(r)],c.Chart),c.AREA_CLASS_NAME=at,c.COMPONENT_CLASS_NAME=rt,c.ELEMENT_CLASS_NAME=et,c.LABEL_CLASS_NAME=it,c.LABEL_LAYER_CLASS_NAME=tt,c.MAIN_LAYER_CLASS_NAME=u,c.PLOT_CLASS_NAME=nt,c.VIEW_CLASS_NAME=F,c.createLibrary=$T,c.destroy=a7,c.register=function(t,e){Object.assign($7,{[t]:e})},c.render=i7,c.renderToMountedElement=function(t,e={},n){const{width:r=640,height:i=480,on:a}=t;var t=r7(t),{library:o=$T(),group:s=new cs}=e;if(function(t){if(!wp(t)){if(mp(t))return!t.length;var e,n=Lp(t);if("Map"===n||"Set"===n)return!t.size;if(Cp(t))return!Object.keys(t).length;for(e in t)if(Ip.call(t,e))return}return 1}(null==s?void 0:s.parentElement))throw new Error("Unmounted group");var l=Q(s);return e.group=s,e.library=o,ZT(a,XT.BEFORE_RENDER),WL(Object.assign(Object.assign({},t),{width:r,height:i}),l,o,e).then(n).then(()=>ZT(a,XT.AFTER_RENDER)),s},Object.defineProperty(c,"__esModule",{value:!0})});
|
|
7
|
+
`}([f,d,h,s]))}c-=u,l+=1}return o}function gM(t,e){t.__data__=e.__data__,t.className=e.className,e.parentNode.replaceChild(t,e)}function yM(t,e,n,r){var i,a,o,s,l,c,u,h,f,d=e["nodeName"],p=n["nodeName"],g=tl(e),y=tl(n);return d===p&&"path"!==d||(void 0===g||void 0===y)?(p=n,d=r,[o,l,s,f]=dM(i=e),[c,u,h,a]=(gM(p,i),dM(p)),o=[Object.assign({transform:`translate(${o-c}, ${l-u}) scale(${s/h}, ${f/a})`},aM(i,oM)),Object.assign({transform:"translate(0, 0) scale(1, 1)"},aM(p,oM))],p.animate(o,d)):(c=g,s="path"===(u=(l=t)["nodeName"])?l:(gM(u=new Jo({style:Object.assign(Object.assign({},aM(l,oM)),{d:c})}),l),u),h=[Object.assign({path:g},aM(e,oM)),Object.assign({path:y},aM(n,oM))],f=s.animate(h,r),s.style.transform="scale(1, 1)",s.style.transform="none",f)}fM.props={};const mM=g=>(t,e,n,r,i)=>{[a="pack"]=[g.split];var a="function"==typeof a?a:pM,i=rM(i,n,g),n=t["length"],o=e["length"];if(1===n&&1===o||1<n&&1<o)return[s]=t,[c]=e,yM(s,s,c,i);if(1===n&&1<o){var[s]=t;{var l=s,c=e,u=i,s=a;l.style.visibility="hidden";const d=s(l,c.length);return c.map((t,e)=>{return yM(t,new Jo({style:Object.assign({path:d[e]},aM(l,oM))}),t,u)})}}if(1<n&&1===o){var[n]=e;{var o=t,h=n,f=i;const p=(e=a)(h,o.length);var{fillOpacity:e,strokeOpacity:t,opacity:n}=h.style,e=h.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:e,strokeOpacity:t,opacity:n}],f);return[...o.map((t,e)=>{return yM(t,t,new Jo({style:{path:p[e],fill:h.style.fill}}),f)}),e]}}return null},vM=(mM.props={},b=>{return Xi({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:i.NUMBER}),(t,e,n,r,i)=>{const[a]=t;if(!o0(r))return sM(b)(t,e,n,r,i);const o=r.getCenter();var{__data__:t,style:e}=a,{radius:s=0,inset:l=0,fillOpacity:c,strokeOpacity:u,opacity:h}=e,{points:e,y:t,y1:f}=(J(e,["radius","inset","fillOpacity","strokeOpacity","opacity"]),t);const d=Zv().cornerRadius(s).padAngle(l*Math.PI/180),p=Ib(r,e,[t,f]),{startAngle:g,endAngle:y}=p,m=new Jo({}),v=t=>{m.attr({d:d(t),transform:`translate(${o[0]}, ${o[1]})`});t=tl(m);return m.style.transform="none",t};s=[{waveInArcAngle:g+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:g+1e-4,fillOpacity:c,strokeOpacity:u,opacity:h,offset:.01},{waveInArcAngle:y,fillOpacity:c,strokeOpacity:u,opacity:h}],l=a.animate(s,rM(i,n,b));return l.onframe=function(){a.style.path=v(Object.assign(Object.assign({},p),{endAngle:Number(a.style.waveInArcAngle)}))},l.onfinish=function(){a.style.path=v(Object.assign(Object.assign({},p),{endAngle:y}))},l}}),bM=(vM.props={},c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t,fillOpacity:o,strokeOpacity:s,opacity:l}=a.style,t=[{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.01},{transform:(t+" scale(1)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l}],{width:o,height:s}=a.getBoundingClientRect(),l=(a.setOrigin([o/2,s/2]),a.animate(t,rM(i,n,c)));return l.finished.then(()=>a.setOrigin(0,0)),l}}),xM=c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t,fillOpacity:o,strokeOpacity:s,opacity:l}=a.style,o=[{transform:(t+" scale(1)").trimStart()},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.99},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],{width:s,height:l}=a.getBoundingClientRect(),t=(a.setOrigin([s/2,l/2]),a.animate(o,rM(i,n,c)));return t.finished.then(()=>a.setOrigin(0,0)),t}},wM=o=>(t,e,n,r,i)=>{var[t]=t,a=(null==(a=t.getTotalLength)?void 0:a.call(t))||0;return t.animate([{lineDash:[0,a]},{lineDash:[a,0]}],rM(i,n,o))},kM=(wM.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new Jo({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=sM(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o}),EM=(kM.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new Jo({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=cM(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o});function MM(t){return tt(t).selectAll("."+nt).nodes()}function OM(e,t){return t.filter(t=>t!==e&&t.options.parentKey===e.options.key).flatMap(({container:t})=>MM(t))}function SM(t){return tt(t).select("."+rt).node()}function _M(t,e){var{offsetX:e,offsetY:n}=e,{min:[t,r],max:[i,a]}=t.getBounds();return e<t||i<e||(n<r||a<n)?null:[e-t,n-r]}function AM(t,e){var{offsetX:e,offsetY:n}=e,{min:[t,r],max:[i,a]}=t.getBounds();return[Math.min(i,Math.max(t,e))-t,Math.min(a,Math.max(r,n))-r]}function TM(t){return t&&0!==Object.keys(t).length?t:{highlightedLineWidth:1,highlightedStroke:"#000"}}function PM(){return t=>t.__data__.color}function LM(t){const e=t.scale["x"];return t=>{t=t.__data__.x;return e.invert(t)}}function NM(t){t=Array.from(t.markState.keys());const n=new Map(t.map(t=>[t.key,t.data]));return t=>{var{index:t,markKey:e}=t.__data__;return n.get(e)[t]}}function CM(o,s=(t,e)=>t,l=(t,e,n)=>t.setAttribute(e,n)){const c="__states__",u="__ordinal__",i=t=>{var{[c]:e=[],[u]:n={}}=t,e=e.reduce((t,e)=>Object.assign(Object.assign({},t),Q(o,e)),n);if(0!==Object.keys(e).length){for(var[r,i]of Object.entries(e)){var a=t.getAttribute(r),i=s(i,t);l(t,r,i),r in n||(n[r]=a)}t[u]=n}},a=t=>{t[c]||(t[c]=[])};return{setState:(t,...e)=>{a(t),t[c]=[...e],i(t)},removeState:(t,...e)=>{a(t);for(const r of e){var n=t[c].indexOf(r);-1!==r&&t[c].splice(n,1)}i(t)},hasState:(t,e)=>(a(t),-1!==t[c].indexOf(e))}}function jM(r,i){const a=new Map(r.map((t,e)=>[t,e]));return(t,e)=>{var n;return"function"!=typeof t?t:(n=a.get(e),t(i?i(e):e,n,i?r.map(i):r))}}function RM(l,t){var{valueof:c=(t,e)=>t}=t,u=J(t,["valueof"]);const h="element-link";return[(t,e)=>{if(!(t.length<=1)){var n=t.map(t=>[t,t.getBBox()]);n.sort(([,t],[,e])=>{var{x:t,y:n}=t,{x:e,y:r}=e;return t-e==0?n-r:t-e});for(let t=1;t<n.length;t++){var r=Vv();const[o,s]=n[t-1];var[,i]=n[t],i=(r.moveTo(s.x+s.width,s.y),r.lineTo(i.x,i.y),r.lineTo(i.x,i.y+i.height),r.lineTo(s.x+s.width,s.y+s.height),r.closePath(),Lb(u,t=>c(t,o))),{fill:a=o.getAttribute("fill")}=i,i=J(i,["fill"]),r=new Jo({className:h+(e?" "+e:""),style:Object.assign({d:r.toString(),fill:a},i)});l.appendChild(r)}}},t=>{t=t||h;for(const e of l.getElementsByClassName(t)||[])e.remove()}]}function FM(t,e){t=t.getRootNode().defaultView.getContextService().getDomElement();null!=t&&t.style&&(t.style.cursor=e)}function IM(t,e){var{elements:n,datum:r,groupKey:i=t=>t,link:a=!1}=e,e=J(e,["elements","datum","groupKey","link"]);const o=n(t),s=new Set(o),l=jp(o,i);n=jM(o,r);const[c,u]=RM(t,Object.assign({elements:o,valueof:n},Q(e,"link"))),{setState:h,removeState:f}=CM(e,n),d=t=>{t=t.target;if(s.has(t)){var t=i(t),t=l.get(t),e=new Set(t);for(const n of o)e.has(n)?h(n,"highlighted"):h(n,"unhighlighted");a&&c(t)}},p=t=>{t=t.target;if(s.has(t)){for(const e of o)f(e,"unhighlighted","highlighted");a&&u()}};return t.addEventListener("pointerover",d),t.addEventListener("pointerout",p),()=>{t.removeEventListener("pointerover",d),t.removeEventListener("pointerout",p)}}function BM(n){return t=>{var{container:t,view:e}=t;return IM(t,Object.assign(Object.assign({},TM(n)),{elements:MM,datum:NM(e)}))}}function DM(n={selectedLineWidth:1,selectedColor:"black"}){return t=>{var{container:t,view:e}=t;return IM(t,Object.assign(Object.assign({},TM(n)),{elements:MM,datum:NM(e),groupKey:LM(e)}))}}function zM(n){return t=>{var{container:t,view:e}=t;return IM(t,Object.assign(Object.assign(Object.assign({},n),TM(n)),{elements:MM,datum:NM(e),groupKey:PM()}))}}function GM(t,e){var{elements:n,datum:r,groupKey:l=t=>t,link:c=!1,single:u=!1}=e,e=J(e,["elements","datum","groupKey","link","single"]);const h=n(t),f=new Set(h),d=jp(h,l);n=jM(h,r);const[p,g]=RM(t,Object.assign({elements:h,valueof:n},Q(e,"link"))),{setState:y,removeState:i,hasState:m}=CM(e,n),v=()=>{for(const t of h)i(t,"selected","unselected");c&&g()},a=t=>{t=t.target;if(!f.has(t))return v();if(u){var e=t;if(m(e,"selected"))v();else{var e=l(e),e=d.get(e),n=new Set(e);for(const i of h)n.has(i)?y(i,"selected"):y(i,"unselected");c&&(g(),p(e))}}else{e=t;var t=l(e),r=d.get(t);const a=new Set(r);if(m(e,"selected")){if(!h.some(t=>!a.has(t)&&m(t,"selected")))return v();for(const o of r)y(o,"unselected");c&&g(t)}else{e=r.some(t=>m(t,"selected"));for(const s of h)a.has(s)?y(s,"selected"):m(s,"selected")||y(s,"unselected");!e&&c&&p(r,t)}}};return t.addEventListener("click",a),()=>{t.removeEventListener("click",a)}}function WM(n){return t=>{var{container:t,view:e}=t;return GM(t,Object.assign(Object.assign({},TM(n)),{elements:MM,datum:NM(e)}))}}function VM(n){return t=>{var{container:t,view:e}=t;return GM(t,Object.assign(Object.assign({},TM(n)),{elements:MM,datum:NM(e),groupKey:LM(e)}))}}function YM(n){return t=>{var{container:t,view:e}=t;return GM(t,Object.assign(Object.assign({},TM(n)),{elements:MM,datum:NM(e),groupKey:PM()}))}}function HM(t){var{wait:M=20,leading:O,trailing:S=!1,labelFormatter:_=t=>""+t}=t,A=J(t,["wait","leading","trailing","labelFormatter"]);return t=>{const{options:e,view:n,container:r,update:i}=t,{markState:a,scale:o,coordinate:s}=n;t=function(t,e,r){var[t]=Array.from(t.entries()).filter(([t])=>t.type===e).map(([t])=>{const n=t["encode"];return Object.fromEntries(r.map(t=>{var e=n[t];return[t,e?e.value:void 0]}))});return t}(a,"line",["x","y","series"]);if(!t)return;const{y:f,x:d,series:l=[]}=t;t=f.map((t,e)=>e);const c=Bp(t.map(t=>d[t])),u=R({},e),h=u.marks.find(t=>"line"===t.type);t=$p(Rp(t,t=>$p(t,t=>+f[t])/Zp(t,t=>+f[t]),t=>l[t]).values());R(h,{scale:{y:{domain:[1/t,t]}}});const p=SM(r),g=r.getElementsByClassName(nt);const y=jp(r.getElementsByClassName(at),t=>t.__data__.key.split("-")[0]),m=new Ko({style:Object.assign({x1:0,y1:0,x2:0,y2:p.getAttribute("height"),stroke:"black",lineWidth:1},Q(A,"rule"))}),v=new os({style:Object.assign({x:0,y:p.getAttribute("height"),text:"",fontSize:10},Q(A,"label"))}),b=(m.append(v),p.appendChild(m),(t,e,n)=>{var[t]=t.invert(n),n=e.invert(t);return c[Op(c,n)]}),x=(t,e)=>{m.setAttribute("x1",t[0]),m.setAttribute("x2",t[0]),v.setAttribute("text",_(e))};let w;var k;const E=Wf(t=>{t=_M(p,t);if(t){var{scale:e,coordinate:n}=w,{x:e,y:r}=e,i=b(n,e,t);x(t,i);for(const u of g){var{seriesIndex:a,key:o}=u.__data__,s=a[Ep(t=>d[+t]).center(a,i)],l=[0,r.map(1)],s=[0,r.map(f[s]/f[a[0]])],[,a]=n.map(l),[,l]=n.map(s),c=a-l,s=(u.setAttribute("transform",`translate(0, ${c})`),y.get(o)||[]);for(const h of s)h.setAttribute("dy",c)}}},M,{leading:O,trailing:S});return k=[0,0],Oe(this,void 0,void 0,function*(){var t=o["x"];const n=b(s,t,k);x(k,n);t=function(t){var{transform:e=[]}=t,n=e.find(t=>"normalizeY"===t.type);return n||(e.push(n={type:"normalizeY"}),t.transform=e,n)}(h);t.groupBy="color",t.basis=(t,e)=>{return e[t[Ep(t=>d[+t]).center(t,n)]]};for(const e of u.marks)e.animate=!1;t=yield i(u);w=t.view}),p.addEventListener("pointerenter",E),p.addEventListener("pointermove",E),p.addEventListener("pointerleave",E),()=>{m.remove(),p.removeEventListener("pointerenter",E),p.removeEventListener("pointermove",E),p.removeEventListener("pointerleave",E)}}}function qM({wait:l=30,leading:c,trailing:u=!1}){return t=>{const{options:e,update:r,container:n}=t,i=SM(n),a=R({},e);for(const s of a.marks)s.animate=!1;const o=Wf(t=>{var e,n,t=_M(i,t);t&&([t,e]=t,(n=function(t){var{coordinates:e=[]}=t,n=e.find(t=>"fisheye"===t.type);return n||(e.push(n={type:"fisheye"}),t.coordinates=e,n)}(a)).focusX=t,n.focusY=e,n.isVisual=!0,r(a))},l,{leading:c,trailing:u});return i.addEventListener("pointerenter",o),i.addEventListener("pointermove",o),i.addEventListener("pointerleave",o),()=>{i.removeEventListener("pointerenter",o),i.removeEventListener("pointermove",o),i.removeEventListener("pointerleave",o)}}}function UM(t,e,n,r){var{tooltipElement:i=function(t,e,n){var{min:[r,i],max:[a,o]}=t.getBounds(),e=new s5({className:"tooltip",style:{x:e,y:n,container:{x:0,y:0},items:[],bounding:{x:r,y:i,width:a-r,height:o-i},title:" ",position:"bottom-right",offset:[10,10],style:{".tooltip":{},".tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}}}});return t.getRootNode().defaultView.getConfig().container.appendChild(e.HTMLTooltipElement),e}(t,n,r)}=t,{items:e,title:a}=e;i.show(),i.position=[n,r],i.update({items:e,title:a}),t.tooltipElement=i}function XM(t){t=t.tooltipElement;t&&t.hide()}function $M(t){return Object.fromEntries(Object.entries(t).filter(([,t])=>J0(t)))}function KM(t){var e=t.getAttribute("fill"),n=t.getAttribute("stroke"),t=t["__data__"],{color:t=e||n}=t;return t}function ZM(t){return eg(t)?t:{value:void 0===t?t:""+t}}function JM(n,l,c,t=n.map(t=>t.__data__)){e=t.map(t=>t.title);var e=Array.from(new Set(e)).filter(J0),t=t.flatMap((o,t)=>{var t=n[t],e=J(o,["title"]);const s=KM(t);return Object.entries(e).filter(([t])=>t.startsWith("tooltip")).map(([t,e])=>{var{field:n,title:n=n}=c[t].getOptions(),r=ZM(e),{field:i=void 0,color:a=s,name:i=function(t,e){var{color:t,series:n}=t,{color:e,series:r}=e,i=t=>t&&t.invert&&!(t instanceof jm);return i(t)?t.invert(e):i(n)?n.invert(r):null}(c,o)||i||n,value:n}=r,r=J(r,["field","color","name","value"]);return Object.assign(Object.assign(Object.assign({},r),{name:i,color:a,value:n}),$M(l({channel:t,value:e})))}).filter(({value:t})=>void 0!==t)});return Object.assign(Object.assign({},0<e.length&&{title:e.join(",")}),{items:t})}function QM(t,e){return Array.from(t.values()).some(t=>{return null==(t=t.interaction)?void 0:t[e]})}function tO(t,e){return void 0===t?e:t}function eO(h,t){var{elements:e,wait:n=50,leading:r=!0,trailing:i=!1,scale:f,coordinate:d,crosshairs:p,item:g,startX:y=0,startY:m=0}=t,t=J(t,["elements","wait","leading","trailing","scale","coordinate","crosshairs","item","startX","startY"]),e=e(h);const[,v]=function(t){var{min:[t,e],max:[n,r]}=t.getBounds();return[n-t,r-e]}(h),b=[],x=[];for(const l of e){var a=l["__data__"],a=a["seriesX"];(a?b:x).push(l)}const w=new Map(b.map(t=>{var e=t["__data__"];const n=e["seriesX"];return[t,[Bp(n.map((t,e)=>e),t=>n[+t]),n]]}));e=x.map((t,e)=>e);const k=x.map(t=>{t=t.__data__;return t.x}),E=Bp(e,t=>k[t]),M=Q(t,"crosshairs");e=f.x;const O=null!=e&&e.getBandWidth?e.getBandWidth()/2:0,o=Wf(t=>{t=_M(h,t);if(t){var e=h.getBounds(),n=e.min[0],e=e.min[1];const o=[t[0]-y,t[1]-m];o;var r=((t,e,n)=>{var r=e.length;if(0===r)return[];var[t]=d.invert(t),t=t-O,i=(0,Ep(t=>n[+t]).center)(e,t);let a=i,o=i;for(;0<a-1&&n[e[a-1]]==n[e[i]];)a--;for(;o+1<r&&n[e[o+1]]===n[e[i]];)o++;return r0(a,o+1).map(t=>e[t])})(o,E,k).map(t=>x[t]),i=b.map(t=>{var[e,n]=w.get(t),t=((t,n)=>{t=t.__data__;return Object.fromEntries(Object.entries(t).filter(([t])=>t.startsWith("series")).map(([t,e])=>{e=e[n];return[_f(t.replace("series","")),e]}))})(t,((t,e,n)=>{var[t]=d.invert(t);return e[(0,Ep(t=>n[+t]).center)(e,t-O)]})(o,e,n)),{x:e,y:n}=t;return[t,d.map([e+O,n])]}),a=[...i.map(t=>t[0]),...r.map(t=>t.__data__)],r=JM([...b,...r],g,f,a);if(UM(h,r,t[0]+n,t[1]+e),p){a=i.map(t=>t[1]);{var r=h,n=a,{height:e,startX:i,startY:a}=t=Object.assign(Object.assign({},M),{height:v,startX:y,startY:m}),t=J(t,["height","startX","startY"]);const s=(n=t0(n.map(t=>t[0])))+i,l=n+i,c=a,u=e-a;(i=r.ruleY||(n=new Ko({style:Object.assign({x1:s,x2:l,y1:c,y2:u,lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},t)}),r.appendChild(n),n)).style.x1=s,i.style.x2=l,i.style.y1=c,i.style.y2=u,r.ruleY=i}}}},n,{leading:r,trailing:i}),s=()=>{var t;XM(h),p&&(t=h).ruleY&&(t.ruleY.remove(),t.ruleY=void 0)};return h.addEventListener("pointerenter",o),h.addEventListener("pointermove",o),h.addEventListener("pointerleave",s),()=>{h.removeEventListener("pointerover",o),h.removeEventListener("pointerout",o),h.removeEventListener("pointerleave",s)}}function nO(r,{elements:t,scale:i,wait:e=50,leading:n=!0,trailing:a=!1,groupKey:o=t=>t,item:s}){t=t(r);const l=new Set(t),c=jp(t,o),u=Wf(t=>{var e,n=t["target"];l.has(n)&&(n=o(n),n=1===(n=c.get(n)).length?function(t,a,o){var e=(n=t["__data__"])["title"],n=J(n,["title"]);const s=KM(t);return t=Object.entries(n).filter(([t])=>t.startsWith("tooltip")).map(([t,e])=>{var{field:n,title:n=n}=o[t].getOptions(),e=ZM(e),{field:r=void 0,color:i=s,name:r=r||n,value:n}=e,e=J(e,["field","color","name","value"]);return Object.assign(Object.assign(Object.assign({},e),{color:i,name:r,value:n}),$M(a({channel:t,value:n})))}).filter(({value:t})=>void 0!==t),Object.assign(Object.assign({},e&&{title:e}),{items:t})}(n[0],s,i):JM(n,s,i),{offsetX:t,offsetY:e}=t,UM(r,n,t,e))},e,{leading:n,trailing:a}),h=t=>{t=t.target;l.has(t)&&XM(r)};return r.addEventListener("pointerover",u),r.addEventListener("pointermove",u),r.addEventListener("pointerout",h),()=>{r.removeEventListener("pointerover",u),r.removeEventListener("pointermove",u),r.removeEventListener("pointerout",h)}}function rO(t){const{shared:u,crosshairs:h,series:f,item:d=()=>({}),facet:p=!1}=t,g=J(t,["shared","crosshairs","series","name","item","facet"]);return(e,t)=>{var{container:n,view:r}=e;const{scale:i,markState:a,coordinate:o}=r;var s=QM(a,"seriesTooltip"),l=QM(a,"crosshairs"),n=SM(n),s=tO(f,s);if(s&&!p)return eO(n,Object.assign(Object.assign({},g),{elements:MM,scale:i,coordinate:o,crosshairs:tO(h,l),item:d}));if(s&&p){s=t.filter(t=>t!==e&&t.options.parentKey===e.options.key);const c=OM(e,t),i=s[0].view.scale;t=n.getBounds(),s=t.min[0],t=t.min[1];return eO(n.parentNode.parentNode,Object.assign(Object.assign({},g),{elements:()=>c,scale:i,coordinate:o,crosshairs:tO(h,l),item:d,startX:s,startY:t}))}return nO(n,Object.assign(Object.assign({},g),{elements:MM,scale:i,coordinate:o,groupKey:u?LM(r):void 0,item:d}))}}EM.props={};const iO="legend-category";function aO(t){return t.getElementsByClassName("legend-category-item-marker")[0]}function oO(t){return t.getElementsByClassName("legend-category-item-label")[0]}function sO(t){return t.getElementsByClassName("items-item")}function lO(t,e){var{legends:n,marker:i,label:a,datum:o,filter:r,setAttribute:s}=e,e=J(e,["legends","marker","label","datum","filter","setAttribute"]);const l=new Map,c=new Map,u=new Map;var e=0===Object.keys(e).length?{labelUnselectedFill:"#aaa",markerUnselectedFill:"#aaa"}:e,h=Q(e,"marker"),e=Q(e,"label");const{setState:f,removeState:d}=CM(h,void 0,s),{setState:p,removeState:g}=CM(e,void 0,s),y=Array.from(n(t)),m=y.map(o),v=()=>{for(const r of y){var t=o(r),e=i(r),n=a(r);(m.includes(t)?(d(e,"unselected"),g):(f(e,"unselected"),p))(n,"unselected")}};for(const k of y){var b=()=>{FM(t,"pointer")},x=()=>{FM(t,"default")},w=()=>Oe(this,void 0,void 0,function*(){var t=o(k),e=m.indexOf(t);-1===e?m.push(t):m.splice(e,1),0===m.length&&m.push(...y.map(o)),yield r(m),v()});k.addEventListener("click",w),k.addEventListener("pointerenter",b),k.addEventListener("pointerout",x),l.set(k,w),c.set(k,b),u.set(k,x)}return()=>{for(const t of y)t.removeEventListener("click",l.get(t)),t.removeEventListener("pointerenter",c.get(t)),t.removeEventListener("pointerout",u.get(t))}}function cO(t){var s=t["channel"],r=J(t,["channel"]);return t=>{const{container:e,view:i,options:a,update:o}=t;var t=e.getElementsByClassName(iO),t=s?t.find(t=>{t=t.parentNode.__data__;return t.scale.name===s}):t[0],[t,n]=t?function(t){const e=t.attributes["data"];return[t=(t=t.parentNode.__data__).scale.name,{legends:sO,marker:aO,label:oO,datum:t=>{t=t.__data__,t=t.index;return e[t].label}}]}(t):[null,{}];return t&&(s=t),lO(e,Object.assign(Object.assign(Object.assign({},n),{filter:r=>Oe(this,void 0,void 0,function*(){var t=i["scale"];const{[s]:n}=t;t=a.marks,t=t.map(t=>{var{transform:e=[]}=t,e=[{type:"filter",[s]:r},...e];return R({},t,{transform:e,scale:{[s]:{domain:n.getOptions().domain}}})}),t=Object.assign(Object.assign({},a),{marks:t});return o(t)})}),r))}}function uO(a,t){var{brushed:i,brushend:e,brushRegion:o,extent:s,reverse:l=!1}=t,n=J(t,["brushed","brushend","brushRegion","extent","reverse"]);let c=null,u=null,h=null,f=null,d=null,p=!1;const[g,y,m,v]=s,r=(FM(a,"crosshair"),a.style.draggable=!0,()=>{d=new Jo({style:Object.assign(Object.assign({},n),{pointerEvents:"none"})}),f=new is({style:{draggable:!0,fill:"transparent"},className:"mask"}),a.appendChild(d),a.appendChild(f)}),b=()=>{f=new is({style:Object.assign(Object.assign({},n),{draggable:!0}),className:"mask"}),a.appendChild(f)},x=(t,e)=>{var[t,e,n,r]=function(t,e,n,r,i){var[i,a,o,s]=i;return[Math.max(i,Math.min(t,n)),Math.max(a,Math.min(e,r)),Math.min(o,Math.max(t,n)),Math.min(s,Math.max(e,r))]}(t[0],t[1],e[0],e[1],s),[t,e,n,r]=o(t,e,n,r,s);(l?k:w)(t,e,n,r),i(t,e,n,r)},w=(t,e,n,r)=>{f.style.x=t,f.style.y=e,f.style.width=n-t,f.style.height=r-e},k=(t,e,n,r)=>{d.style.d=`
|
|
8
|
+
M${g},${y}L${m},${y}L${m},${v}L${g},${v}Z
|
|
9
|
+
M${t},${e}L${t},${r}L${n},${r}L${n},${e}Z
|
|
10
|
+
`,f.style.x=t,f.style.y=e,f.style.width=n-t,f.style.height=r-e},E=t=>{var e=t["target"],[t,n]=AM(a,t);e===f?h=[t,n]:(((t,e)=>{if(f&&f.remove(),d&&d.remove(),c=[t,e],l)return r();b()})(t,n),p=!0)},M=t=>{var e,n,r,t=AM(a,t);c&&(h?(n=(t,e,n,r,i)=>t+e<r?r-e:i<t+n?i-n:t,r=(e=t)[0]-h[0],e=e[1]-h[1],r=n(r,c[0],u[0],g,m),n=n(e,c[1],u[1],y,v),e=[c[0]+r,c[1]+n],r=[u[0]+r,u[1]+n],x(e,r)):x(c,t))},O=t=>{var e,n,r,i;h?(h=null,{x:e,y:n,width:r,height:i}=f.style,c=[e,n],u=[e+r,n+i]):(u=AM(a,t),x(c,u),p=!1)},S=t=>{t=t.target;f&&t!==f&&(f&&f.remove(),d&&d.remove(),c=null,u=null,h=null,p=!1,f=null,d=null,e())},_=t=>{t=t.target;t!==f||p?FM(a,"crosshair"):FM(a,"move")};return a.addEventListener("dragstart",E),a.addEventListener("drag",M),a.addEventListener("dragend",O),a.addEventListener("click",S),a.addEventListener("pointermove",_),()=>{f&&f.remove(),d&&d.remove(),a.removeEventListener("dragstart",E),a.removeEventListener("drag",M),a.removeEventListener("dragend",O),a.removeEventListener("click",S),a.removeEventListener("pointermove",_)}}function hO(t,e){var{elements:n,datum:r,brushRegion:i,extent:a,reverse:o,series:s=!1}=e,e=J(e,["elements","datum","brushRegion","extent","reverse","series"]);const c=n(t);n=jM(c,r),r=Q(e,"mask");const{setState:u,removeState:l}=CM(e,n),h=new Map,{width:f,height:d,x:p,y:g}=t.getBBox();e=a||[0,0,f,d];return uO(t,Object.assign(Object.assign({},r),{extent:e,brushRegion:i,reverse:o,brushend:s?()=>{for(const t of c)l(t,"unhighlighted");for(const e of h.values())e.remove();h.clear()}:()=>{for(const t of c)l(t,"highlighted","unhighlighted")},brushed:s?(t,e,n,r)=>{var i;for(const o of c){var a=h.get(o)||(a=o,i=void 0,i=a.cloneNode(),a.parentNode.appendChild(i),h.set(a,i),i);a.style.clipPath=new is({style:{x:t+p,y:e+g,width:n-t,height:r-e}}),u(o,"unhighlighted"),u(a,"highlighted")}}:(t,e,n,r)=>{for(const l of c){var{min:i,max:a}=l.getLocalBounds(),[i,o]=i,[a,s]=a;!function(t,e){var[t,n,r,i]=t,[e,a,o,s]=e;return!(r<e||o<t||i<a||s<n)}([i,o,a,s],[t,e,n,r])?u(l,"unhighlighted"):u(l,"highlighted")}}}))}function fO(t){var c=t["facet"],u=J(t,["facet"]);return(t,e)=>{var n,r,i,a,{container:o,view:s}=t,o=SM(o),l={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,reverse:!1};return c?(n=(a=o.getBounds()).min[0],r=a.min[1],i=a.max[0],a=a.max[1],hO(o.parentNode.parentNode,Object.assign(Object.assign({elements:()=>OM(t,e),datum:NM(s),brushRegion:(t,e,n,r)=>[t,e,n,r],maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,extent:[n,r,i,a]},l),u))):hO(o,Object.assign(Object.assign({elements:MM,datum:NM(s),brushRegion:(t,e,n,r)=>[t,e,n,r],extent:void 0},l),u))}}function dO(t){return fO(Object.assign(Object.assign({},t),{brushRegion:(t,e,n,r,i)=>{var[,i,,a]=i;return[t,i,n,a]}}))}function pO(t){return fO(Object.assign(Object.assign({},t),{brushRegion:(t,e,n,r,i)=>{var[i,,a]=i;return[i,e,a,r]}}))}function gO(n){return(t,...e)=>R({},n(t,...e),t)}function yO(n){return(t,...e)=>R({},t,n(t,...e))}function mO(t,e){var n;return t?Array.isArray(t)?t:({value:n=e}=t,t=J(t,["value"]),Object.assign(Object.assign({},t),{value:n})):e}const vO=()=>t=>{var e=t["children"];if(!Array.isArray(e))return[];const{x:n=0,y:r=0,width:i,height:a,data:o}=t;return e.map(t=>{var e=t["data"],t=J(t,["data"]);return Object.assign(Object.assign({},t),{data:mO(e,o),x:n,y:r,width:i,height:a})})},bO=(vO.props={},()=>e=>{var n=e["children"];if(!Array.isArray(n))return[];var{direction:t="row",ratio:r=n.map(()=>1),padding:i=0,data:a}=e,[o,s,l,c]="col"===t?["y","height","width","x"]:["x","width","height","y"];const u=r.reduce((t,e)=>t+e),h=e[s]-i*(n.length-1);var f=r.map(t=>h*(t/u)),d=[];let p=e[o]||0;for(let t=0;t<f.length;t+=1){var g=n[t],y=g["data"],g=J(g,["data"]),y=mO(y,a);d.push(Object.assign({[o]:p,[s]:f[t],[c]:e[c]||0,[l]:e[l],data:y},g)),p+=f[t]+i}return d}),xO=(bO.props={},()=>t=>{var e=t["children"],t=J(t,["children"]);if(!Array.isArray(e))return[];const{data:a,scale:o={},axis:s={},legend:l={}}=t,n=J(t,["data","scale","axis","legend"]);t=e.map(t=>{var{data:e,scale:n={},axis:r={},legend:i={}}=t,t=J(t,["data","scale","axis","legend"]);return Object.assign({data:mO(e,a),scale:R({},o,n),axis:!(!r||!s)&&R({},s,r),legend:!(!i||!l)&&R({},l,i)},t)});return[Object.assign(Object.assign({},n),{marks:t,type:"standardView"})]}),wO=(xO.props={},()=>t=>{var{width:e,height:n,paddingLeft:r,paddingRight:i,paddingTop:a,paddingBottom:o,padding:s,inset:l,insetLeft:c,insetTop:u,insetRight:h,insetBottom:f,margin:d,marginLeft:p,marginBottom:g,marginTop:y,marginRight:m,data:v,coordinates:b,theme:x,component:w,interactions:k,x:E,y:M,key:O,frame:S,title:_,labelTransform:A,parentKey:T,clip:P}=t,t=J(t,["width","height","paddingLeft","paddingRight","paddingTop","paddingBottom","padding","inset","insetLeft","insetTop","insetRight","insetBottom","margin","marginLeft","marginBottom","marginTop","marginRight","data","coordinates","theme","component","interactions","x","y","key","frame","title","labelTransform","parentKey","clip"]);return[{type:"standardView",x:E,y:M,key:O,width:e,height:n,padding:s,paddingLeft:r,paddingRight:i,paddingTop:a,inset:l,insetLeft:c,insetTop:u,insetRight:h,insetBottom:f,paddingBottom:o,theme:x,coordinates:b,component:w,interactions:k,frame:S,title:_,labelTransform:A,margin:d,marginLeft:p,marginBottom:g,marginTop:y,marginRight:m,parentKey:T,clip:P,marks:[Object.assign(Object.assign({},t),{key:O+"-0",data:v})]}]}),kO=(wO.props={},gO(t=>{const{encode:e,data:i,scale:a,shareSize:o=!1}=t;var{x:t,y:n}=e,r=(e,t)=>{if(void 0===e||!o)return{};const n=jp(i,t=>t[e]);var t=(null==(t=null===a||void 0===a?void 0:a[t])?void 0:t.domain)||Array.from(n.keys()),r=t.map(t=>n.has(t)?n.get(t).length:1);return{domain:t,flex:r}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:void 0===t?null:{position:"top"}},void 0===t&&{paddingInner:0}),r(t,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:void 0===n?null:{position:"right"}},void 0===n&&{paddingInner:0}),r(n,"y"))}}})),EO=gO(t=>{const{data:e,scale:n}=t;var r=[t];let i,a,o;for(;r.length;){const{children:u,encode:h={},scale:n={},legend:f={}}=r.shift();var s=h["color"],l=n["color"],c=f["color"];void 0!==s&&(i=s),void 0!==l&&(a=l),void 0!==c&&(o=c),Array.isArray(u)&&r.push(...u)}return{encode:{color:i},scale:{color:R({},a,{domain:void 0!==(t=null==(t=null===n||void 0===n?void 0:n.color)?void 0:t.domain)?t:void 0!==i?Array.from(new Set(e.map(t=>t[i]))):void 0,type:"ordinal"})},legend:{color:R({title:i},o)}}}),MO=gO(()=>({animate:{enterType:"fadeIn"}})),OO=yO(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),SO=yO(()=>({type:"cell"})),_O=yO(c=>{var t=c["data"];return{data:{type:"inline",value:t,transform:[{type:"custom",callback:()=>{var{data:t,encode:e}=c;const{x:n,y:r}=e,i=n?Array.from(new Set(t.map(t=>t[n]))):[],a=r?Array.from(new Set(t.map(t=>t[r]))):[];if(i.length&&a.length){var o=[];for(const s of i)for(const l of a)o.push({[n]:s,[r]:l});return o}return i.length?i.map(t=>({[n]:t})):a.length?a.map(t=>({[r]:t})):void 0}}]}}}),AO=yO((t,c=function(t){t=t.points;return Tb(t)},w=function(a){return(t,e)=>{var{rowIndex:t,rowValuesLength:n,columnIndex:r,columnValuesLength:i}=t;return t!==n-1?TO(a,e):(t=e.length?void 0:null,R({title:r===i-1&&void 0,grid:t},a))}},k=function(r){return(t,e)=>{var{rowIndex:t,columnIndex:n}=t;return 0!==n?TO(r,e):(n=e.length?void 0:null,R({title:0===t&&void 0,grid:n},r))}},E={})=>{const{data:e,encode:n,children:u,scale:r,x:M=0,y:O=0,shareData:h=!1,key:S}=t,_=e["value"],{x:A,y:T}=n;t=r.color;const P=t["domain"];return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:y,paddingTop:m}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=Nb(t);const s=t.map(c);n=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]);const l=n.map(([n,r])=>t=>{var{[A]:t,[T]:e}=t,t=void 0===A||t===n,e=void 0===T||e===r;return t&&e}).map(t=>_.filter(t)),v=h?$p(l,t=>t.length):void 0,b=n.map(([t,e])=>({columnField:A,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:T,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(u)?u:[u(t)].flat(1));return e.flatMap(c=>{const[u,h,f,d]=s[c],p=b[c],g=l[c];return x[c].map(t=>{var{scale:e,key:n,facet:r=!0,axis:i={}}=t,t=J(t,["scale","key","facet","axis","legend"]),a=(null==(a=null==e?void 0:e.y)?void 0:a.guide)||i.y,o=(null==(o=null==e?void 0:e.x)?void 0:o.guide)||i.x,s={x:{tickCount:A?5:void 0},y:{tickCount:T?5:void 0}},r=r?g:0===g.length?[]:_,l={color:{domain:P}},o={x:PO(o,w)(p,r),y:PO(a,k)(p,r)};return Object.assign(Object.assign({key:n+"-"+c,data:r,x:u+y+M,y:h+m+O,parentKey:S,width:f,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!r.length,dataDomain:v,scale:R(s,e,l),axis:R({},i,o),legend:!1},t),E)})})}}});function TO(t,e){return e.length?R({title:!1,tick:null,label:null},t):R({title:!1,tick:null,label:null,grid:null},t)}function PO(t,e){return"function"==typeof t?t:null===t?()=>null:e(t)}const LO=()=>t=>{return[nM.of(t).call(SO).call(EO).call(MO).call(kO).call(OO).call(_O).call(AO).value()]},NO=(LO.props={},gO(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),CO=yO(t=>{const{data:w,children:c,x:k=0,y:E=0,key:M}=t;return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:m,paddingTop:v}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=Nb(t);const s=t.map(({points:t})=>Tb(t)),l=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]),b=l.map(([t,e])=>({columnField:t,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:e,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(c)?c:[c(t)].flat(1));return e.flatMap(c=>{const[u,h,f,d]=s[c],[p,g]=l[c],y=b[c];return x[c].map(t=>{var n,r,{scale:e,key:i,encode:a,axis:o}=t,t=J(t,["scale","key","encode","axis"]),s=null==(s=null==e?void 0:e.y)?void 0:s.guide,l=null==(l=null==e?void 0:e.x)?void 0:l.guide,l={x:("function"==typeof(r=l)?r:null===r?()=>null:(t,e)=>{var{rowIndex:t,rowValuesLength:n}=t;if(t!==n-1)return TO(r,e)})(y,w),y:("function"==typeof(n=s)?n:null===n?()=>null:(t,e)=>{t=t.columnIndex;if(0!==t)return TO(n,e)})(y,w)};return Object.assign({data:w,parentKey:M,key:i+"-"+c,x:u+m+k,y:h+v+E,width:f,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:R({x:{facet:!1},y:{facet:!1}},e),axis:R({x:{tickCount:5},y:{tickCount:5}},o,l),legend:!1,encode:R({},a,{x:p,y:g})},t)})})}}}),jO=yO(t=>{var e=t["encode"],t=J(t,["encode"]),{position:n=[],x:r=n,y:i=[...n].reverse()}=e,n=J(e,["position","x","y"]),a=[];for(const o of[r].flat(1))for(const s of[i].flat(1))a.push({$x:o,$y:s});return Object.assign(Object.assign({},t),{data:a,encode:Object.assign(Object.assign({},n),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},1===[r].flat(1).length&&{x:{paddingInner:0}}),1===[i].flat(1).length&&{y:{paddingInner:0}})})});const RO=()=>t=>{return[nM.of(t).call(SO).call(EO).call(CO).call(jO).call(MO).call(OO).call(NO).value()]},FO=gO(t=>({scale:{x:{guide:{type:"axisX"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),IO=gO(t=>({coordinates:[{type:"polar"}]})),BO=t=>{var e=t["encode"],t=J(t,["encode"]),e=e["position"];return Object.assign(Object.assign({},t),{encode:{x:e}})};function DO(t){return t=>null}function zO(t){var t=t["points"],[t,e,n,r]=t,i=Sb(t,r),t=Ob(t,r),r=Ob(e,n),r=(e=r,r=_b(r=t),e=_b(e),r<e?e-r:2*Math.PI-(r-e)),e=1/Math.sin(r/2),i=i/(1+e),a=i*Math.sqrt(2),[n,o]=n,t=Ab(t)+r/2,r=i*e;return[n+r*Math.sin(t)-a/2,o+r*Math.cos(t)-a/2,a,a]}const GO=()=>t=>{return[nM.of(t).call(SO).call(BO).call(EO).call(IO).call(_O).call(AO,zO,DO,DO,{frame:!1}).call(MO).call(OO).call(FO).value()]};const WO=()=>t=>{const{children:e=[],duration:a=1e3,iterationCount:l=1,direction:c="normal",easing:o="ease-in-out-sine"}=t,u=e.length;if(!Array.isArray(e)||0===u)return[];const n=e[0]["key"],h=e.map(t=>Object.assign(Object.assign({},t),{key:n})).map(t=>{for(var e=a,n=o,r=[t];r.length;){var i=r.pop(),i=(i.animate=R({enterDuration:e,updateDuration:e,exitDuration:e,updateEasing:n,updateType:"morphing",updateFill:"both",exitType:"fadeOut"},i.animate||{}),i)["children"];Array.isArray(i)&&r.push(...i)}return t});return function*(){let t=0,e;for(;"infinite"===l||t<l;){n=c,a=t,o=u,s=void 0,s=[0,o],o=[1-o,1];var[n,r]="normal"===n?s:"reverse"===n?o:"alternate"===n?a%2==0?s:o:"reverse-alternate"===n?a%2==0?o:s:void 0;for(let t=n;t<r;t+=1){var i=Math.abs(t);e!==i&&(yield h[i]),e=i}t++}var a,o,s}};function VO(t,e){if(null!==t)return{type:"column",value:t,field:e}}function YO(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function HO(t,e){var n=[];for(const r of t)n[r]=e;return n}function qO(t,e){var t=t[e];return t?({value:e,field:t=null}=t,[e,t]):[null,null]}function UO(t,...e){for(const i of e){if("string"!=typeof i)return[i,null];var[n,r]=qO(t,i);if(null!==n)return[n,r]}return[null,null]}function XO(t){return!(t instanceof Date)&&"object"==typeof t}WO.props={};const $O=()=>(t,e)=>{var n=e["encode"],n=n["y1"];return void 0!==n?[t,e]:[t,R({},e,{encode:{y1:VO(HO(t,0))}})]};function KO(t,e,n){const r=n["encode"];if(null===t)return[e];n=t;const i=(Array.isArray(n)?n:[n]).map(t=>{return[t,null==(t=qO(r,t))?void 0:t[0]]}).filter(([,t])=>J0(t));return Array.from(jp(e,e=>i.map(([,t])=>t[e]).join("-")).values())}function ZO(t){var a,r;return Array.isArray(t)?(a=t,(i,t,e)=>(n,r)=>a.reduce((t,e)=>0!==t?t:kp(i[n][e],i[r][e]),0)):"function"==typeof t?(r=t,(e,t,n)=>i3(t=>r(e[t]))):"series"===t?t3:"value"===t?e3:"sum"===t?n3:"maxIndex"===t?r3:()=>null}function JO(t,e){for(const n of t)n.sort(e)}function QO(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function t3(t,e,n){return i3(t=>n[t])}function e3(t,e,n){return i3(t=>e[t])}function n3(t,n,e){t=Nb(t),t=Array.from(jp(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,e.reduce((t,e)=>t+ +n[e])]));return i3(t=>r.get(e[t]))}function r3(t,n,e){t=Nb(t),t=Array.from(jp(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,Kp(e,t=>n[t])]));return i3(t=>r.get(e[t]))}function i3(n){return(t,e)=>kp(n(t),n(e))}$O.props={};const a3=(t={})=>{const{groupBy:T="x",orderBy:P=null,reverse:L=!1,y:N="y",y1:C="y1",series:j=!0}=t;return(t,e)=>{var{data:n,encode:r,style:i={}}=e,[a,o]=qO(r,"y"),[s,l]=qO(r,"y1"),[r]=j?UO(r,"series","color"):qO(r,"color"),c=KO(T,t,e),n=ZO(P)(n,a,r),u=(n&&JO(c,n),new Array(t.length)),h=new Array(t.length),f=new Array(t.length),d=[],p=[];for(const O of c){L&&O.reverse();var g=s?+s[O[0]]:0,y=[],m=[];for(const S of O){var v=f[S]=+a[S]-g;v<0?m.push(S):0<=v&&y.push(S)}var b=0<y.length?y:m,x=0<m.length?m:y;let t=y.length-1,e=0;for(;0<t&&0===a[b[t]];)t--;for(;e<x.length-1&&0===a[x[e]];)e++;d.push(b[t]),p.push(x[e]);let n=g;for(const _ of m.reverse()){var w=f[_];n=u[_]=(h[_]=n)+w}let r=g;for(const A of y){var k=f[A];0<k?r=u[A]=(h[A]=r)+k:u[A]=h[A]=r}}const E=new Set(d),M=new Set(p);r="y"===N?u:h,n="y"===C?u:h;return[t,R({},e,{encode:{y:VO(r,o),y1:VO(n,l)},style:Object.assign({first:(t,e)=>E.has(e),last:(t,e)=>M.has(e)},i)})]}};function o3(t){t=t.type;return"string"==typeof t&&["stackY","dodgeX","groupX"].includes(t)}a3.props={};const s3=a=>(t,e,n)=>{var{encode:r,transform:i=[]}=e;return i.some(o3)||({x:i,y:r}=r,void 0===i)||void 0===r?[t,e]:(i=a["series"],r=i?["x","series"]:"x",a3({groupBy:r})(t,e,n))},l3=(s3.props={},(t={})=>{const{channel:i="x"}=t;return(t,e)=>{var n=e["encode"],r=n["title"];return void 0!==r?[t,e]:([r,n]=qO(n,i),[t,R({},e,{encode:{title:VO(r,n)}})])}}),c3=(l3.props={},()=>(t,e)=>{var n=e["encode"],n=n["x"];return void 0!==n?[t,e]:[t,R({},e,{encode:{x:VO(HO(t,0))},scale:{x:{guide:null}}})]}),u3=(c3.props={},()=>(t,e)=>{var n=e["encode"],n=n["y"];return void 0!==n?[t,e]:[t,R({},e,{encode:{y:VO(HO(t,0))},scale:{y:{guide:null}}})]}),h3=(u3.props={},()=>(t,e)=>{var n=e["encode"],n=n["size"];return void 0!==n?[t,e]:[t,R({},e,{encode:{size:YO(HO(t,3))}})]}),f3=(h3.props={},()=>(t,e)=>{var n=e["encode"],r=n["key"],n=J(n,["key"]);if(void 0!==r)return[t,e];const i=Object.values(n).map(({value:t})=>t);r=t.map(e=>i.filter(Array.isArray).map(t=>t[e]).join("-"));return[t,R({},e,{encode:{key:VO(r)}})]}),d3=(f3.props={},()=>(t,e)=>{var n=e["encode"],{series:r,color:i}=n;return void 0!==r||void 0===i?[t,e]:([r,i]=qO(n,"color"),[t,R({},e,{encode:{series:VO(r,i)}})])}),p3=(d3.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(XO)?[t,e]:[t,R({},e,{encode:{y:VO(n)}})]}),g3=(p3.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(XO)?[t,e]:[t,R({},e,{encode:{x:VO(n)}})]}),y3=(g3.props={},()=>(t,e)=>{var n=e["encode"],r=n["y1"];return r?[t,e]:([r]=qO(n,"y"),[t,R({},e,{encode:{y1:VO([...r])}})])}),m3=(y3.props={},()=>(t,e)=>{var n=e["encode"],r=n["x1"];return r?[t,e]:([r]=qO(n,"x"),[t,R({},e,{encode:{x1:VO([...r])}})])}),v3=(m3.props={},t=>{const r=t["channel"];return(t,e)=>{const i=e["encode"];var n=i["tooltip"];if(void 0!==n)return[t,e];n=Array.isArray(r)?r:[r];let a=0;n=n.flatMap(e=>Object.entries(i).filter(([t])=>t.startsWith(e)).flatMap(([t])=>{const[e,n]=qO(i,t);var r,t=[[t,VO(e)]];return e&&null!==n&&(r=e.map(t=>({value:t,field:n})),t.push(["tooltip"+(0===a?"":a),VO(r,n)]),a++),t}));return[t,R({},e,{encode:Object.fromEntries(n)})]}}),b3=(v3.props={},()=>(t,e)=>[t,R({scale:{x:{padding:0},y:{padding:0}}},e)]),x3=(b3.props={},()=>(t,e)=>{var{style:n={}}=e,r=J(e,["data","style"]),{x:i,y:a}=n,n=J(n,["x","y"]);return null==i||null==a?[t,e]:[[0],R({},r,{data:[0],cartesian:!0,encode:{x:VO([i||0]),y:VO([a||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:n})]}),w3=(x3.props={},()=>(t,e)=>{var{style:n={}}=e;return[t,R({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]}),k3=(w3.props={},()=>(t,e)=>{var n,r=e["data"];return!Array.isArray(r)||r.some(XO)?[t,e]:(n=(r=Array.isArray(r[0])?r:[r]).map(t=>t[0]),r=r.map(t=>t[1]),[t,R({},e,{encode:{x:VO(n),y:VO(r)}})])}),E3=(k3.props={},()=>(t,e)=>{var{style:n={}}=e,n=n["gradient"];return n?[t,R({},e,{encode:{series:YO(HO(t,void 0))}})]:[t,e]}),M3=(E3.props={},(t={})=>{const{groupBy:c="x",reverse:u=!1,orderBy:h,padding:f}=t;return J(t,["groupBy","reverse","orderBy","padding"]),(t,e)=>{var{data:n,encode:r,scale:i}=e,i=i["series"],[a]=qO(r,"y"),[r]=UO(r,"series","color"),o=QO(r,i),i=KO(c,t,e),n=ZO(h)(n,a,r),s=(n&&JO(i,n),new Array(t.length));for(const l of i){u&&l.reverse();for(let t=0;t<l.length;t++)s[l[t]]=o[t]}return[t,R({},e,{scale:{series:{domain:o,paddingInner:f}},encode:{series:VO(s)}})]}}),O3=(M3.props={},t=>{const{groupBy:p=["x"],reducer:g=(t,e)=>e[t[0]],orderBy:y=null,reverse:m=!1,duration:v}=t;return(n,t)=>{const e=t["encode"];var r=(Array.isArray(p)?p:[p]).map(t=>[t,qO(e,t)[0]]);if(0===r.length)return[n,t];let i=[n];for(const[,h]of r){var a=[];for(const n of i){var o=Array.from(jp(n,t=>h[t]).values());a.push(...o)}i=a}if(y){const[f]=qO(e,y);f&&i.sort((t,e)=>g(t,f)-g(e,f)),m&&i.reverse()}r=(v||3e3)/i.length;const[s]=v?[HO(n,r)]:UO(e,"enterDuration",HO(n,r));var[l]=UO(e,"enterDelay",HO(n,0)),c=new Array(n.length);for(let t=0,e=0;t<i.length;t++){const n=i[t];var u=$p(n,t=>+s[t]);for(const d of n)c[d]=+l[d]+e;e+=u}return[n,R({},t,{encode:{enterDuration:YO(s),enterDelay:YO(c)}})]}});O3.props={};const S3=(t={})=>{const{groupBy:d="x",basis:p="max"}=t;return(e,t)=>{const n=t["encode"];var r,i=J(n,["x"]),a=Object.entries(i).filter(([t])=>t.startsWith("y")).map(([t])=>[t,qO(n,t)[0]]),[,o]=a.find(([t])=>"y"===t),s=a.map(([t])=>[t,new Array(e.length)]),i=KO(d,e,t),l="function"==typeof(r=p)?r:{min:(t,e)=>Zp(t,t=>e[+t]),max:(t,e)=>$p(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>t0(t,t=>e[+t]),median:(t,e)=>e0(t,t=>e[+t]),sum:(t,e)=>i0(t,t=>e[+t]),deviation:(t,e)=>Ap(t,t=>e[+t])}[r]||$p;for(const e of i){var c=l(e,o);for(const f of e)for(let t=0;t<a.length;t++){var[,u]=a[t],[,h]=s[t];h[f]=+u[f]/c}}return[e,R({},t,{encode:Object.fromEntries(s.map(([t,e])=>[t,VO(e,qO(n,t)[1])]))})]}};function _3(t,e,n){return null===t?[-.5,.5]:(t=QO(t,e),[-(e=new Am({domain:t,range:[0,1],padding:n}).getBandWidth())/2,e/2])}function A3(t,e,n){return e*(1-t)+n*t}S3.props={};const T3=(t={})=>{const{padding:e=0,paddingX:l=e,paddingY:c=e,random:u=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,{x:r,y:i}=r,[a]=qO(n,"x"),[n]=qO(n,"y");const o=_3(a,r,l),s=_3(n,i,c);a=t.map(()=>A3(u(),...s)),r=t.map(()=>A3(u(),...o));return[t,R({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:VO(a),dx:VO(r)}})]}},P3=(T3.props={},(t={})=>{const{padding:a=0,random:o=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,r=r["x"],[n]=qO(n,"x");const i=_3(n,r,a);n=t.map(()=>A3(o(),...i));return[t,R({scale:{x:{padding:.5}}},e,{encode:{dx:VO(n)}})]}}),L3=(P3.props={},(t={})=>{const{groupBy:g="x"}=t;return(e,t)=>{const n=t["encode"];var r=J(n,["x"]);const i=Object.entries(r).filter(([t])=>t.startsWith("y")).map(([t])=>[t,qO(n,t)[0]]);var a=i.map(([t])=>[t,new Array(e.length)]),o=KO(g,e,t),s=new Array(o.length);for(let t=0;t<o.length;t++){const e=o[t];var[l,c]=Tp(e.flatMap(e=>i.map(([,t])=>+t[e])));s[t]=(l+c)/2}var u=Math.max(...s);for(let t=0;t<o.length;t++){var h=u-s[t];const e=o[t];for(const p of e)for(let t=0;t<i.length;t++){var[,f]=i[t],[,d]=a[t];d[p]=+f[p]+h}}return[e,R({},t,{encode:Object.fromEntries(a.map(([t,e])=>[t,VO(e,qO(n,t)[1])]))})]}}),N3=(L3.props={},(t={})=>{const{groupBy:u="x",series:h=!0}=t;return(t,e)=>{var n=e["encode"];const[r]=qO(n,"y");var[,i]=qO(n,"y1"),n=(h?UO(n,"series","color"):qO(n,"color"),KO(u,t,e)),a=new Array(t.length);for(const c of n){var o=c.map(t=>+r[t]);for(let n=0;n<c.length;n++){var s=c[n],l=Math.max(...o.filter((t,e)=>e!==n));a[s]=r[s]>l?l:r[s]}}return[t,R({},e,{encode:{y1:VO(a,i)}})]}});function C3(t,e){return[t[0]]}function j3(t,e){return[t[t.length-1]]}function R3(t,e){return[t[Kp(t,t=>e[t])]]}function F3(t,e){return[t[function(t,e){let n,r=-1,i=-1;if(void 0===e)for(const o of t)++i,null!=o&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);else for(var a of t)null!=(a=e(a,++i,t))&&(n>a||void 0===n&&a>=a)&&(n=a,r=i);return r}(t,t=>e[t])]]}N3.props={};const I3=(t={})=>{const{groupBy:s="series"}=t,l=J(t,["groupBy"]);return(t,e)=>{var n=e["encode"],t=KO(s,t,e),[r,i]=Object.entries(l)[0];const[a]=qO(n,r),o="function"==typeof(n=i)?n:{first:C3,last:j3,max:R3,min:F3}[n]||C3;return[t.flatMap(t=>o(t,a)),e]}},B3=(I3.props={},(t={})=>{var e=t["selector"],t=J(t,["selector"]);return I3(Object.assign({x:e},t))}),D3=(B3.props={},(t={})=>{var e=t["selector"],t=J(t,["selector"]);return I3(Object.assign({y:e},t))});function z3(e){return t=>null===t?e:e+" of "+t}function G3(){return[(t,e)=>t0(t,t=>+e[t]),z3("mean")]}function W3(){return[(t,e)=>e0(t,t=>+e[t]),z3("median")]}function V3(){return[(t,e)=>$p(t,t=>+e[t]),z3("max")]}function Y3(){return[(t,e)=>Zp(t,t=>+e[t]),z3("min")]}function H3(){return[(t,e)=>t.length,z3("count")]}function q3(){return[(t,e)=>i0(t,t=>+e[t]),z3("sum")]}function U3(){return[(t,e)=>e[t[0]],z3("first")]}function X3(){return[(t,e)=>e[t[t.length-1]],z3("last")]}D3.props={};const $3=(t={})=>{const a=t["groupBy"],c=J(t,["groupBy"]);return(t,e)=>{const{data:o,encode:s}=e,l=a(t,e);var n,r,i;return l?(n=Object.entries(c).map(([t,e])=>{const[n,r]=function(t){if("function"==typeof t)return[t,null];var e={mean:G3,max:V3,count:H3,first:U3,last:X3,sum:q3,min:Y3,median:W3}[t];if(e)return e();throw new Error(`Unknown reducer: ${t}.`)}(e),[i,a]=qO(s,t);return[t,VO(l.map(t=>n(t,null!==i&&void 0!==i?i:o)),(null==r?void 0:r(a))||a)]}),r=Object.keys(s).map(t=>{const[e,n]=qO(s,t);return[t,VO(l.map(t=>e[t[0]]),n)]}),i=l.map(t=>o[t[0]]),[Nb(l),R({},e,{data:i,encode:Object.fromEntries([...r,...n])})]):[t,e]}},K3=($3.props={},(t={})=>{const{channels:n=["x","y"]}=t,e=J(t,["channels"]);return $3(Object.assign(Object.assign({},e),{groupBy:(t,e)=>KO(n,t,e)}))}),Z3=(K3.props={},(t={})=>K3(Object.assign(Object.assign({},t),{channels:["x","color","series"]}))),J3=(Z3.props={},(t={})=>K3(Object.assign(Object.assign({},t),{channels:["y","color","series"]}))),Q3=(J3.props={},(t={})=>K3(Object.assign(Object.assign({},t),{channels:["color"]})));function tS(t,e,n){var{reverse:r,slice:i,channel:a}=n,n=J(n,["reverse","slice","channel"]),o=e["encode"];const[s]=qO(o,a);var l,n=function(t,e,n){const{by:r=t,reducer:i="max"}=e,[a]=qO(n,r);if("function"==typeof i)return t=>i(t,a);if("max"===i)return t=>$p(t,t=>+a[t]);if("min"===i)return t=>Zp(t,t=>+a[t]);if("sum"===i)return t=>i0(t,t=>+a[t]);if("median"===i)return t=>e0(t,t=>+a[t]);if("mean"===i)return t=>t0(t,t=>+a[t]);if("first"===i)return t=>a[t[0]];if("last"===i)return t=>a[t[t.length-1]];throw new Error("Unknown reducer: "+i)}(a,n,o),n=(o=t,c=t=>s[t],(2!==(l=n).length?Bp(Rp(o,l,c),([t,e],[n,r])=>kp(e,r)||kp(t,n)):Bp(jp(o,c),([t,e],[n,r])=>l(e,r)||kp(t,n))).map(([t])=>t)),o=(r&&n.reverse(),"number"==typeof i?[0,i]:i),c=i?n.slice(...o):n;return[t,R(e,{scale:{[a]:{domain:c}}})]}Q3.props={};const eS=(t={})=>{const{reverse:o=!1,slice:s,channel:l,ordinal:c=!0}=t,u=J(t,["reverse","slice","channel","ordinal"]);return(t,e)=>{if(c)return tS(t,e,Object.assign({reverse:o,slice:s,channel:l},u));{var n=Object.assign({reverse:o,slice:s,channel:l},u);var{reverse:n,channel:r}=n,i=e["encode"];const[a]=qO(i,r);return i=Bp(t,t=>a[t]),n&&i.reverse(),[i,e]}}},nS=(eS.props={},(t={})=>eS(Object.assign(Object.assign({},t),{channel:"x"}))),rS=(nS.props={},(t={})=>eS(Object.assign(Object.assign({},t),{channel:"color"}))),iS=(rS.props={},(t={})=>eS(Object.assign(Object.assign({},t),{channel:"y"})));iS.props={};const aS=(t={})=>{const{field:o,channel:s="y",reducer:l="sum"}=t;return(t,e)=>{var{data:n,encode:r}=e;const[i]=qO(r,"x");var a,n=o?(n=n,"string"==typeof(a=o)?n.map(t=>t[a]):n.map(a)):qO(r,s)[0],r=Fp(t,function(e,n){if("function"==typeof e)return t=>e(t,n);if("sum"===e)return t=>i0(t,t=>+n[t]);throw new Error("Unknown reducer: "+e)}(l,n),t=>i[t]).map(t=>t[1]);return[t,R({},e,{scale:{x:{flex:r}}})]}};function oS(t,e,n){var r=t.length;if(0===r)return[];var{innerWidth:i,innerHeight:a}=n;let l=Math.ceil(Math.sqrt(e/(a/i))),c=i/l,u=Math.ceil(e/l),o=u*c;for(;o>a;)l+=1,c=i/l,u=Math.ceil(e/l),o=u*c;const h=a-u*c,f=u<=1?0:h/(u-1),[d,p]=u<=1?[(i-r*c)/(r-1),(a-c)/2]:[0,0];return t.map((t,e)=>{var[t,n,r,i]=Tb(t),a=e%l,e=Math.floor(e/l),o=a*c,s=(u-e-1)*c+h,r=c/r,i=c/i;return`translate(${o-t+d*a}, ${s-n-f*e-p}) scale(${r}, ${i})`})}aS.props={};const sS=()=>(t,e)=>[t,R({},e,{modifier:oS,axis:!1})],lS=(sS.props={},"thresholds");function cS(t){var[e,n]=Tp(t);return Math.min(200,(t=t,Math.ceil((n-e)*Math.cbrt(_p(t))/(3.49*Ap(t)))))}const uS=(t={})=>{const{groupChannels:s=["color"],binChannels:l=["x","y"]}=t,c=J(t,["groupChannels","binChannels"]),u={};return $3(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(c).filter(([t])=>!t.startsWith(lS)))),Object.fromEntries(l.flatMap(e=>[[e,([t])=>+u[e].get(t).split(",")[0]],[e+"1",([t])=>+u[e].get(t).split(",")[1]]]))),{groupBy:(t,e)=>{const n=e["encode"],i=l.map(t=>{var[t]=qO(n,t);return t}),a=Q(c,lS),o=t.filter(e=>i.every(t=>J0(t[e]))),r=[...s.map(t=>{var[t]=qO(n,t);return t}).filter(J0).map(e=>t=>e[t]),...l.map((t,e)=>{const n=i[e];e=a[t]||cS(n),e=Xp().thresholds(e).value(t=>+n[t])(o);const r=new Map(e.flatMap(t=>{var{x0:e,x1:n}=t;const r=e+","+n;return t.map(t=>[t,r])}));return u[t]=r,t=>r.get(t)})];return Array.from(jp(o,e=>r.map(t=>t(e)).join("-")).values())}}))},hS=(uS.props={},(t={})=>{var e=t["thresholds"];return uS(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))});hS.props={};const fS=(t={})=>{const{groupBy:n,thresholds:o=2e3}=t,e=J(t,["groupBy","thresholds"]);return $3(Object.assign(Object.assign({},e),{groupBy:(t,e)=>{t=KO(n,t,e);return t.every(t=>t.length<=o)?null:t.flatMap(e=>{{var n=e,r=Math.max(1,Math.floor(e.length/o)),i=n.length,a=[];let t=0;for(;t<i;)a.push(n.slice(t,t+=r));return a}})}}))},dS=(fS.props={},(s={})=>(t,e)=>{const i=e["encode"],n=Object.entries(s).map(([t,e])=>{const[n]=qO(i,t);if(!n)return null;if("function"==typeof e)return t=>e(n[t]);const r=Array.isArray(e)?e:[e];return 0===r.length?null:t=>r.includes(n[t])}).filter(J0);if(0===n.length)return[t,e];const r=t.filter(e=>n.every(t=>t(e))),a=r.map((t,e)=>e);var o=Object.entries(i).map(([t,e])=>[t,Object.assign(Object.assign({},e),{value:a.map(t=>e.value[r[t]])})]);return[t,R({},e,{encode:Object.fromEntries(o)})]});function pS(t){var{min:t,max:e}=t;return[[t[0],t[1]],[e[0],e[1]]]}function gS(t,e){var[t,n]=t,[e,r]=e;return t>=e[0]&&t<=r[0]&&n>=e[1]&&n<=r[1]}dS.props={};const yS=t=>{const r=t["priority"];return(t,e)=>{const n=[];return r&&t.sort(r),t.forEach(t=>{t.attr("visibility","visible");const i=t.getLocalBounds();n.some(t=>{var e=pS(i),t=pS(t.getLocalBounds()),[e,n]=e,[t,r]=t;return e[0]<r[0]&&n[0]>t[0]&&e[1]<r[1]&&n[1]>t[1]})?t.attr("visibility","hidden"):n.push(t)}),t}};function mS(){const n=new Map;return[t=>n.get(t),(t,e)=>n.set(t,e)]}const vS=t=>{const{maxIterations:k=10,maxError:E=.1,padding:M=1}=t;return i=>{var e=i.length;if(!(e<=1)){const[g,y]=mS(),[m,v]=mS();var a,o,s,l,[c,t]=mS(),[u,n]=mS();for(const b of i){var{min:r,max:h}=function(t){var t=t.cloneNode(!0),{min:e,max:n}=((e=t.getElementById("connector"))&&t.removeChild(e),t.getRenderBounds());return t.destroy(),{min:e,max:n}}(b);const[x,g]=r;var[r,h]=h;y(b,g),v(b,g),t(b,h-g),n(b,[x,r])}for(let t=0;t<k;t++){i.sort((t,e)=>kp(m(t),m(e)));let r=0;for(let n=0;n<e-1;n++){var f=i[n];let t=n+1,e;for(;(e=i[t])&&([[a,o],[s,l]]=[u(f),u(e)],!(a<l&&s<o));)t+=1;if(e){const g=m(f);var d=c(f),p=m(e),d=p-(g+d);d<M&&(d=(M-d)/2,r=Math.max(r,d),v(f,g-d),v(e,p+d))}}if(r<E)break}for(const w of i)w.style.y+=m(w)-g(w)}return i}};function bS(t){t/=255;return t<=.03928?t/12.92:Math.pow((.055+t)/1.055,2.4)}function xS(t,e,n){return.2126*bS(t)+.7152*bS(e)+.0722*bS(n)}function wS(t,e){var{r:t,g:n,b:r}=t,{r:e,g:i,b:a}=e,t=xS(t,n,r),n=xS(e,i,a);return(Math.max(t,n)+.05)/(Math.min(t,n)+.05)}function kS(e,t){return t[Kp(t,t=>{return wS(e,"object"==typeof(t=t)?t:ua(t))})]}const ES=t=>{const{threshold:n=4.5,palette:r=["#000","#fff"]}=t;return(t,e)=>(t.forEach(t=>{var e=t.attr("dependentElement").parsedStyle.fill;wS(t.parsedStyle.fill,e)<n&&t.attr("fill",kS(e,r))}),t)},MS=t=>(t,e)=>(t.forEach(t=>{t.attr("visibility","visible");var e=t.attr("bounds");!function(t,e){var[t,n]=t;return!(gS(t,e)&&gS(n,e))}(pS(t.getLocalBounds()),e)||t.attr("visibility","hidden")}),t);var P=1e-6,OS=1e-12,SS=Math.PI,_S=SS/2,AS=SS/4,TS=2*SS,PS=180/SS,LS=SS/180,NS=Math.abs,CS=Math.atan,jS=Math.atan2,T=Math.cos,RS=Math.ceil,FS=Math.exp,IS=Math.log,BS=Math.pow,L=Math.sin,DS=Math.sign||function(t){return 0<t?1:t<0?-1:0},zS=Math.sqrt,GS=Math.tan;function WS(t){return 1<t?0:t<-1?SS:Math.acos(t)}function VS(t){return 1<t?_S:t<-1?-_S:Math.asin(t)}function YS(){}function HS(t,e){t&&US.hasOwnProperty(t.type)&&US[t.type](t,e)}var qS={Feature:function(t,e){HS(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)HS(n[r].geometry,e)}},US={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){XS(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)XS(n[r],e,0)},Polygon:function(t,e){$S(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)$S(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)HS(n[r],e)}};function XS(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function $S(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)XS(t[n],e,1);e.polygonEnd()}function KS(t,e){t&&qS.hasOwnProperty(t.type)?qS[t.type](t,e):HS(t,e)}function ZS(t){return[jS(t[1],t[0]),VS(t[2])]}function JS(t){var e=t[0],t=t[1],n=T(t);return[n*T(e),n*L(e),L(t)]}function QS(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function t4(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 e4(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function n4(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function r4(t){var e=zS(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function i4(n,r){function t(t,e){return t=n(t,e),r(t[0],t[1])}return n.invert&&r.invert&&(t.invert=function(t,e){return(t=r.invert(t,e))&&n.invert(t[0],t[1])}),t}function a4(t,e){return NS(t)>SS&&(t-=Math.round(t/TS)*TS),[t,e]}function o4(t,e,n){return(t%=TS)?e||n?i4(l4(t),c4(e,n)):l4(t):e||n?c4(e,n):a4}function s4(n){return function(t,e){return NS(t+=n)>SS&&(t-=Math.round(t/TS)*TS),[t,e]}}function l4(t){var e=s4(t);return e.invert=s4(-t),e}function c4(t,e){var i=T(t),a=L(t),o=T(e),s=L(e);function n(t,e){var n=T(e),r=T(t)*n,t=L(t)*n,n=L(e),e=n*i+r*a;return[jS(t*o-e*s,r*i-n*a),VS(e*o+t*s)]}return n.invert=function(t,e){var n=T(e),r=T(t)*n,t=L(t)*n,n=L(e),e=n*o-t*s;return[jS(t*o+n*s,r*i+e*a),VS(e*i-r*a)]},n}function u4(t,e){(e=JS(e))[0]-=t,r4(e);t=WS(-e[1]);return((-e[2]<0?-t:t)+TS-P)%TS}function h4(){var r,e=[];return{point:function(t,e,n){r.push([t,e,n])},lineStart:function(){e.push(r=[])},lineEnd:YS,rejoin:function(){1<e.length&&e.push(e.pop().concat(e.shift()))},result:function(){var t=e;return e=[],r=null,t}}}function f4(t,e){return NS(t[0]-e[0])<P&&NS(t[1]-e[1])<P}function d4(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 p4(t,e,n,r,a){var o,i,s=[],l=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],i=t[e];if(f4(r,i)){if(!r[2]&&!i[2]){for(a.lineStart(),o=0;o<e;++o)a.point((r=t[o])[0],r[1]);return void a.lineEnd()}i[0]+=2*P}s.push(n=new d4(r,t,null,!0)),l.push(n.o=new d4(r,null,n,!1)),s.push(n=new d4(i,t,null,!1)),l.push(n.o=new d4(i,null,n,!0))}}),s.length){for(l.sort(e),g4(s),g4(l),o=0,i=l.length;o<i;++o)l[o].e=n=!n;for(var c,u,h=s[0];;){for(var f=h,d=!0;f.v;)if((f=f.n)===h)return;c=f.z,a.lineStart();do{if(f.v=f.o.v=!0,f.e){if(d)for(o=0,i=c.length;o<i;++o)a.point((u=c[o])[0],u[1]);else r(f.x,f.n.x,1,a);f=f.n}else{if(d)for(c=f.p.z,o=c.length-1;0<=o;--o)a.point((u=c[o])[0],u[1]);else r(f.x,f.p.x,-1,a);f=f.p}}while(c=(f=f.o).z,d=!d,!f.v);a.lineEnd()}}}function g4(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 y4(t){return NS(t[0])<=SS?t[0]:DS(t[0])*((NS(t[0])+SS)%TS-SS)}function m4(y,m,v,b){return function(s){var l,c,u,n=m(s),h=h4(),f=m(h),d=!1,e={point:r,lineStart:i,lineEnd:a,polygonStart:function(){e.point=p,e.lineStart=o,e.lineEnd=g,c=[],l=[]},polygonEnd:function(){e.point=r,e.lineStart=i,e.lineEnd=a,c=n0(c);var t=function(t,e){var n=y4(e),r=e[1],e=L(r),i=[L(n),-T(n),0],a=0,o=0,s=new Pp;1===e?r=_S+P:-1===e&&(r=-_S-P);for(var l=0,c=t.length;l<c;++l)if(h=(u=t[l]).length)for(var u,h,f=u[h-1],d=y4(f),p=f[1]/2+AS,g=L(p),y=T(p),m=0;m<h;++m,d=b,g=w,y=x,f=v){var v=u[m],b=y4(v),x=v[1]/2+AS,w=L(x),x=T(x),k=b-d,E=0<=k?1:-1,M=E*k,O=SS<M,S=g*w;s.add(jS(S*E*L(M),y*x+S*T(M))),a+=O?k+E*TS:k,O^n<=d^n<=b&&(r4(S=t4(JS(f),JS(v))),r4(M=t4(i,S)),(E=(O^0<=k?-1:1)*VS(M[2]))<r||r===E&&(S[0]||S[1]))&&(o+=O^0<=k?1:-1)}return(a<-P||a<P&&s<-OS)^1&o}(l,b);c.length?(d||(s.polygonStart(),d=!0),p4(c,b4,t,v,s)):t&&(d||(s.polygonStart(),d=!0),s.lineStart(),v(null,null,1,s),s.lineEnd()),d&&(s.polygonEnd(),d=!1),c=l=null},sphere:function(){s.polygonStart(),s.lineStart(),v(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function r(t,e){y(t,e)&&s.point(t,e)}function t(t,e){n.point(t,e)}function i(){e.point=t,n.lineStart()}function a(){e.point=r,n.lineEnd()}function p(t,e){u.push([t,e]),f.point(t,e)}function o(){f.lineStart(),u=[]}function g(){p(u[0][0],u[0][1]),f.lineEnd();var t,e,n,r,i=f.clean(),a=h.result(),o=a.length;if(u.pop(),l.push(u),u=null,o)if(1&i){if(0<(e=(n=a[0]).length-1)){for(d||(s.polygonStart(),d=!0),s.lineStart(),t=0;t<e;++t)s.point((r=n[t])[0],r[1]);s.lineEnd()}}else 1<o&&2&i&&a.push(a.pop().concat(a.shift())),c.push(a.filter(v4))}return e}}function v4(t){return 1<t.length}function b4(t,e){return((t=t.x)[0]<0?t[1]-_S-P:_S-t[1])-((e=e.x)[0]<0?e[1]-_S-P:_S-e[1])}a4.invert=a4;var x4=m4(function(){return 1},function(c){var u,h=NaN,f=NaN,d=NaN;return{lineStart:function(){c.lineStart(),u=1},point:function(t,e){var n,r,i,a,o,s=0<t?SS:-SS,l=NS(t-h);NS(l-SS)<P?(c.point(h,f=0<(f+e)/2?_S:-_S),c.point(d,f),c.lineEnd(),c.lineStart(),c.point(s,f),c.point(t,f),u=0):d!==s&&SS<=l&&(NS(h-d)<P&&(h-=d*P),NS(t-s)<P&&(t-=s*P),l=f,i=e,o=L((n=h)-(r=t)),f=NS(o)>P?CS((L(l)*(a=T(i))*L(r)-L(i)*(r=T(l))*L(n))/(r*a*o)):(l+i)/2,c.point(d,f),c.lineEnd(),c.lineStart(),c.point(s,f),u=0),c.point(h=t,f=e),d=s},lineEnd:function(){c.lineEnd(),h=f=NaN},clean:function(){return 2-u}}},function(t,e,n,r){var i;null==t?(i=n*_S,r.point(-SS,i),r.point(0,i),r.point(SS,i),r.point(SS,0),r.point(SS,-i),r.point(0,-i),r.point(-SS,-i),r.point(-SS,0),r.point(-SS,i)):NS(t[0]-e[0])>P?(t=t[0]<e[0]?SS:-SS,i=n*t/2,r.point(-t,i),r.point(0,i),r.point(t,i)):r.point(e[0],e[1])},[-SS,-_S]);function w4(d){var g=T(d),p=6*LS,h=0<g,f=NS(g)>P;function y(t,e){return T(t)*T(e)>g}function m(t,e,n){var r,i,a,o,s,l,c,u=[1,0,0],h=t4(JS(t),JS(e)),f=QS(h,h),d=h[0],p=f-d*d;return p?(r=t4(u,h),e4(u=n4(u,g*f/p),n4(h,-g*d/p)),(p=(h=QS(u,f=r))*h-(d=QS(f,f))*(QS(u,u)-1))<0?void 0:(e4(p=n4(f,(-h-(r=zS(p)))/d),u),p=ZS(p),n?(i=t[0],a=e[0],o=t[1],e=e[1],a<i&&(c=i,i=a,a=c),!(l=NS((s=a-i)-SS)<P)&&e<o&&(c=o,o=e,e=c),(l||s<P?l?0<o+e^p[1]<(NS(p[0]-i)<P?o:e):o<=p[1]&&p[1]<=e:SS<s^(i<=p[0]&&p[0]<=a))?(e4(c=n4(f,(-h+r)/d),u),[p,ZS(c)]):void 0):p)):!n&&t}function v(t,e){var n=h?d:SS-d,r=0;return t<-n?r|=1:n<t&&(r|=2),e<-n?r|=4:n<e&&(r|=8),r}return m4(y,function(a){var o,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(t,e){var n,r=[t,e],i=y(t,e),t=h?i?0:v(t,e):i?v(t+(t<0?SS:-SS),e):0;!o&&(c=l=i)&&a.lineStart(),i===l||(n=m(o,r))&&!f4(o,n)&&!f4(r,n)||(r[2]=1),i!==l?(u=0,i?(a.lineStart(),n=m(r,o),a.point(n[0],n[1])):(n=m(o,r),a.point(n[0],n[1],2),a.lineEnd()),o=n):f&&o&&h^i&&(t&s||!(e=m(r,o,!0))||(u=0,h?(a.lineStart(),a.point(e[0][0],e[0][1]),a.point(e[1][0],e[1][1]),a.lineEnd()):(a.point(e[1][0],e[1][1]),a.lineEnd(),a.lineStart(),a.point(e[0][0],e[0][1],3)))),!i||o&&f4(o,r)||a.point(r[0],r[1]),o=r,l=i,s=t},lineEnd:function(){l&&a.lineEnd(),o=null},clean:function(){return u|(c&&l)<<1}}},function(t,e,n,r){var i=r,r=d,a=p,o=n,n=t,s=e;if(a){var l=T(r),c=L(r),u=o*a;null==n?(n=r+o*TS,s=r-u/2):(n=u4(l,n),s=u4(l,s),(0<o?n<s:s<n)&&(n+=o*TS));for(var h,f=n;0<o?s<f:f<s;f-=u)h=ZS([l,-c*T(f),-c*L(f)]),i.point(h[0],h[1])}},h?[0,-d]:[-SS,d-SS])}var k4=1e9,E4=-k4;function M4(m,v,b,x){function w(t,e){return m<=t&&t<=b&&v<=e&&e<=x}function k(t,e,n,r){var i=0,a=0;if(null==t||(i=o(t,n))!==(a=o(e,n))||s(t,e)<0^0<n)for(;r.point(0===i||3===i?m:b,1<i?x:v),(i=(i+n+4)%4)!==a;);else r.point(e[0],e[1])}function o(t,e){return NS(t[0]-m)<P?0<e?0:3:NS(t[0]-b)<P?0<e?2:1:NS(t[1]-v)<P?0<e?1:0:0<e?3:2}function E(t,e){return s(t.x,e.x)}function s(t,e){var n=o(t,1),r=o(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(r){var i,h,a,o,s,l,c,u,f,d,p,g=r,t=h4(),e={point:n,lineStart:function(){e.point=y,h&&h.push(a=[]);d=!0,f=!1,c=u=NaN},lineEnd:function(){i&&(y(o,s),l&&f&&t.rejoin(),i.push(t.result()));e.point=n,f&&g.lineEnd()},polygonStart:function(){g=t,i=[],h=[],p=!0},polygonEnd:function(){var t=function(){for(var t=0,e=0,n=h.length;e<n;++e)for(var r,i,a=h[e],o=1,s=a.length,l=a[0],c=l[0],u=l[1];o<s;++o)r=c,i=u,l=a[o],c=l[0],u=l[1],i<=x?x<u&&(u-i)*(m-r)<(c-r)*(x-i)&&++t:u<=x&&(c-r)*(x-i)<(u-i)*(m-r)&&--t;return t}(),e=p&&t,n=(i=n0(i)).length;(e||n)&&(r.polygonStart(),e&&(r.lineStart(),k(null,null,1,r),r.lineEnd()),n&&p4(i,E,t,k,r),r.polygonEnd());g=r,i=h=a=null}};function n(t,e){w(t,e)&&g.point(t,e)}function y(t,e){var n,r,i=w(t,e);h&&a.push([t,e]),d?(o=t,s=e,d=!1,(l=i)&&(g.lineStart(),g.point(t,e))):i&&f?g.point(t,e):!function(t,e,n,r,i,a){var o=t[0],s=t[1],l=0,c=1,u=e[0]-o,h=e[1]-s,n=n-o;if(u||!(0<n)){if(n/=u,u<0){if(n<l)return;n<c&&(c=n)}else if(0<u){if(c<n)return;l<n&&(l=n)}if(n=i-o,u||!(n<0)){if(n/=u,u<0){if(c<n)return;l<n&&(l=n)}else if(0<u){if(n<l)return;n<c&&(c=n)}if(n=r-s,h||!(0<n)){if(n/=h,h<0){if(n<l)return;n<c&&(c=n)}else if(0<h){if(c<n)return;l<n&&(l=n)}if(n=a-s,h||!(n<0)){if(n/=h,h<0){if(c<n)return;l<n&&(l=n)}else if(0<h){if(n<l)return;n<c&&(c=n)}return 0<l&&(t[0]=o+l*u,t[1]=s+l*h),c<1&&(e[0]=o+c*u,e[1]=s+c*h),1}}}}}(n=[c=Math.max(E4,Math.min(k4,c)),u=Math.max(E4,Math.min(k4,u))],r=[t=Math.max(E4,Math.min(k4,t)),e=Math.max(E4,Math.min(k4,e))],m,v,b,x)?i&&(g.lineStart(),g.point(t,e),p=!1):(f||(g.lineStart(),g.point(n[0],n[1])),g.point(r[0],r[1]),i||g.lineEnd(),p=!1),c=t,u=e,f=i}return e}}function O4(t,e,n){var r=r0(t,e-P,n).concat(e);return function(e){return r.map(function(t){return[e,t]})}}function S4(t,e,n){var r=r0(t,e-P,n).concat(e);return function(e){return r.map(function(t){return[t,e]})}}function _4(){return g=p=10,y=90,m=360,v=2.5,e.lines=function(){return t().map(function(t){return{type:"LineString",coordinates:t}})},e.outline=function(){return{type:"Polygon",coordinates:[f(a).concat(d(l).slice(1),f(i).reverse().slice(1),d(c).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.extentMajor(t).extentMinor(t):e.extentMinor()},e.extentMajor=function(t){return arguments.length?(a=+t[0][0],i=+t[1][0],c=+t[0][1],l=+t[1][1],i<a&&(t=a,a=i,i=t),l<c&&(t=c,c=l,l=t),e.precision(v)):[[a,c],[i,l]]},e.extentMinor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],n<r&&(t=r,r=n,n=t),o<s&&(t=s,s=o,o=t),e.precision(v)):[[r,s],[n,o]]},e.step=function(t){return arguments.length?e.stepMajor(t).stepMinor(t):e.stepMinor()},e.stepMajor=function(t){return arguments.length?(y=+t[0],m=+t[1],e):[y,m]},e.stepMinor=function(t){return arguments.length?(p=+t[0],g=+t[1],e):[p,g]},e.precision=function(t){return arguments.length?(v=+t,u=O4(s,o,90),h=S4(r,n,v),f=O4(c,l,90),d=S4(a,i,v),e):v},e.extentMajor([[-180,-90+P],[180,90-P]]).extentMinor([[-180,-80-P],[180,80+P]])();function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return r0(RS(a/y)*y,i,y).map(f).concat(r0(RS(c/m)*m,l,m).map(d)).concat(r0(RS(r/p)*p,n,p).filter(function(t){return NS(t%y)>P}).map(u)).concat(r0(RS(s/g)*g,o,g).filter(function(t){return NS(t%m)>P}).map(h))}var n,r,i,a,o,s,l,c,u,h,f,d,p,g,y,m,v}var A4,T4,P4,L4,N4=t=>t,C4=new Pp,j4=new Pp,R4={point:YS,lineStart:YS,lineEnd:YS,polygonStart:function(){R4.lineStart=F4,R4.lineEnd=D4},polygonEnd:function(){R4.lineStart=R4.lineEnd=R4.point=YS,C4.add(NS(j4)),j4=new Pp},result:function(){var t=C4/2;return C4=new Pp,t}};function F4(){R4.point=I4}function I4(t,e){R4.point=B4,A4=P4=t,T4=L4=e}function B4(t,e){j4.add(L4*t-P4*e),P4=t,L4=e}function D4(){B4(A4,T4)}var z4=R4,G4=1/0,W4=G4,V4=-G4,Y4=V4;var H4,q4,U4,X4,$4={point:function(t,e){t<G4&&(G4=t);V4<t&&(V4=t);e<W4&&(W4=e);Y4<e&&(Y4=e)},lineStart:YS,lineEnd:YS,polygonStart:YS,polygonEnd:YS,result:function(){var t=[[G4,W4],[V4,Y4]];return V4=Y4=-(W4=G4=1/0),t}},K4=0,Z4=0,J4=0,Q4=0,t_=0,e_=0,n_=0,r_=0,i_=0,a_={point:o_,lineStart:s_,lineEnd:u_,polygonStart:function(){a_.lineStart=h_,a_.lineEnd=f_},polygonEnd:function(){a_.point=o_,a_.lineStart=s_,a_.lineEnd=u_},result:function(){var t=i_?[n_/i_,r_/i_]:e_?[Q4/e_,t_/e_]:J4?[K4/J4,Z4/J4]:[NaN,NaN];return K4=Z4=J4=Q4=t_=e_=n_=r_=i_=0,t}};function o_(t,e){K4+=t,Z4+=e,++J4}function s_(){a_.point=l_}function l_(t,e){a_.point=c_,o_(U4=t,X4=e)}function c_(t,e){var n=t-U4,r=e-X4,n=zS(n*n+r*r);Q4+=n*(U4+t)/2,t_+=n*(X4+e)/2,e_+=n,o_(U4=t,X4=e)}function u_(){a_.point=o_}function h_(){a_.point=d_}function f_(){p_(H4,q4)}function d_(t,e){a_.point=p_,o_(H4=U4=t,q4=X4=e)}function p_(t,e){var n=t-U4,r=e-X4,n=zS(n*n+r*r);Q4+=n*(U4+t)/2,t_+=n*(X4+e)/2,e_+=n,n_+=(n=X4*t-U4*e)*(U4+t),r_+=n*(X4+e),i_+=3*n,o_(U4=t,X4=e)}var g_=a_;function y_(t){this._context=t}y_.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,TS)}},result:YS};var m_,v_,b_,x_,w_,k_=new Pp,E_={point:YS,lineStart:function(){E_.point=M_},lineEnd:function(){m_&&O_(v_,b_),E_.point=YS},polygonStart:function(){m_=!0},polygonEnd:function(){m_=null},result:function(){var t=+k_;return k_=new Pp,t}};function M_(t,e){E_.point=O_,v_=x_=t,b_=w_=e}function O_(t,e){x_-=t,w_-=e,k_.add(zS(x_*x_+w_*w_)),x_=t,w_=e}var S_=E_;let __,A_,T_,P_;class L_{constructor(t){this._append=null==t?N_:function(t){var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);if(15<e)return N_;if(e!==__){const r=10**e;__=e,A_=function(t){let e=1;this._+=t[0];for(var n=t.length;e<n;++e)this._+=Math.round(arguments[e]*r)/r+t[e]}}return A_}(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:var n,r;this._append`M${t},${e}`,this._radius===T_&&this._append===A_||(n=this._radius,r=this._,this._="",this._append`m0,${n}a${n},${n} 0 1,1 0,${-2*n}a${n},${n} 0 1,1 0,${2*n}z`,T_=n,A_=this._append,P_=this._,this._=r),this._+=P_}}result(){var t=this._;return this._="",t.length?t:null}}function N_(t){let e=1;this._+=t[0];for(var n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function C_(e,n){let r=3,i=4.5,a,o;function s(t){return t&&("function"==typeof i&&o.pointRadius(+i.apply(this,arguments)),KS(t,a(o))),o.result()}return s.area=function(t){return KS(t,a(z4)),z4.result()},s.measure=function(t){return KS(t,a(S_)),S_.result()},s.bounds=function(t){return KS(t,a($4)),$4.result()},s.centroid=function(t){return KS(t,a(g_)),g_.result()},s.projection=function(t){return arguments.length?(a=null==t?(e=null,N4):(e=t).stream,s):e},s.context=function(t){return arguments.length?(o=null==t?(n=null,new L_(r)):new y_(n=t),"function"!=typeof i&&o.pointRadius(i),s):n},s.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(o.pointRadius(+t),+t),s):i},s.digits=function(t){if(!arguments.length)return r;if(null==t)r=null;else{var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);r=e}return null===n&&(o=new L_(r)),s},s.projection(e).digits(r).context(n)}function j_(r){return function(t){var e,n=new R_;for(e in r)n[e]=r[e];return n.stream=t,n}}function R_(){}function F_(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),KS(n,t.stream($4)),e($4.result()),null!=r&&t.clipExtent(r),t}function I_(i,a,t){return F_(i,function(t){var e=a[1][0]-a[0][0],n=a[1][1]-a[0][1],r=Math.min(e/(t[1][0]-t[0][0]),n/(t[1][1]-t[0][1])),e=+a[0][0]+(e-r*(t[1][0]+t[0][0]))/2,n=+a[0][1]+(n-r*(t[1][1]+t[0][1]))/2;i.scale(150*r).translate([e,n])},t)}function B_(t,e,n){return I_(t,[[0,0],e],n)}function D_(r,i,t){return F_(r,function(t){var e=+i,n=e/(t[1][0]-t[0][0]),e=(e-n*(t[1][0]+t[0][0]))/2,t=-n*t[0][1];r.scale(150*n).translate([e,t])},t)}function z_(i,a,t){return F_(i,function(t){var e=+a,n=e/(t[1][1]-t[0][1]),r=-n*t[0][0],e=(e-n*(t[1][1]+t[0][1]))/2;i.scale(150*n).translate([r,e])},t)}R_.prototype={constructor:R_,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 G_=16,W_=T(30*LS);function V_(t,e){return+e?(_=t,A=e,function(r){var n,i,a,o,s,l,c,u,h,f,d,p,g={point:t,lineStart:e,lineEnd:m,polygonStart:function(){r.polygonStart(),g.lineStart=v},polygonEnd:function(){r.polygonEnd(),g.lineStart=e}};function t(t,e){t=_(t,e),r.point(t[0],t[1])}function e(){u=NaN,g.point=y,r.lineStart()}function y(t,e){var n=JS([t,e]),e=_(t,e);T(u,h,c,f,d,p,u=e[0],h=e[1],c=t,f=n[0],d=n[1],p=n[2],G_,r),r.point(u,h)}function m(){g.point=t,r.lineEnd()}function v(){e(),g.point=b,g.lineEnd=x}function b(t,e){y(n=t,e),i=u,a=h,o=f,s=d,l=p,g.point=y}function x(){T(u,h,c,f,d,p,i,a,n,o,s,l,G_,r),g.lineEnd=m,m()}return g}):(n=t,j_({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}));var n,_,A;function T(t,e,n,r,i,a,o,s,l,c,u,h,f,d){var p,g,y,m,v,b,x,w,k,E,M=o-t,O=s-e,S=M*M+O*O;4*A<S&&f--&&(y=a+h,x=VS(y/=m=zS((p=r+c)*p+(g=i+u)*g+y*y)),v=NS(NS(y)-1)<P||NS(n-l)<P?(n+l)/2:jS(g,p),b=(x=_(v,x))[0],x=x[1],A<(E=O*(w=b-t)-M*(k=x-e))*E/S||.3<NS((M*w+O*k)/S-.5)||r*c+i*u+a*h<W_)&&(T(t,e,n,r,i,a,b,x,v,p/=m,g/=m,y,f,d),d.point(b,x),T(b,x,v,p,g,y,o,s,l,c,u,h,f,d))}}var Y_=j_({point:function(t,e){this.stream.point(t*LS,e*LS)}});function H_(t,n,r,i,a,e){var o,s,l,c,u,h,f,d,p,g,y,m;return e?(h=T(e),e=L(e),f=h*t,d=e*t,p=h/t,g=e/t,y=(e*r-h*n)/t,m=(e*n+h*r)/t,b.invert=function(t,e){return[i*(p*t-g*e+y),a*(m-g*t-p*e)]},b):(o=t,s=n,l=r,c=i,u=a,v.invert=function(t,e){return[(t-s)/o*c,(l-e)/o*u]},v);function v(t,e){return[s+o*(t*=c),l-o*(e*=u)]}function b(t,e){return[f*(t*=i)-d*(e*=a)+n,r-d*t-f*e]}}function q_(t){return U_(function(){return t})()}function U_(t){var e,r,n,i,a,o,s,l,c,u,h=150,f=480,d=250,p=0,g=0,y=0,m=0,v=0,b=0,x=1,w=1,k=null,E=x4,M=null,O=N4,S=.5;function _(t){return l(t[0]*LS,t[1]*LS)}function A(t){return(t=l.invert(t[0],t[1]))&&[t[0]*PS,t[1]*PS]}function T(){var t=H_(h,0,0,x,w,b).apply(null,e(p,g)),t=H_(h,f-t[0],d-t[1],x,w,b);return r=o4(y,m,v),s=i4(e,t),l=i4(r,s),o=V_(s,S),P()}function P(){return c=u=null,_}return _.stream=function(t){return c&&u===t?c:c=Y_((n=r,j_({point:function(t,e){t=n(t,e);return this.stream.point(t[0],t[1])}})(E(o(O(u=t))))));var n},_.preclip=function(t){return arguments.length?(E=t,k=void 0,P()):E},_.postclip=function(t){return arguments.length?(O=t,M=n=i=a=null,P()):O},_.clipAngle=function(t){return arguments.length?(E=+t?w4(k=t*LS):(k=null,x4),P()):k*PS},_.clipExtent=function(t){return arguments.length?(O=null==t?(M=n=i=a=null,N4):M4(M=+t[0][0],n=+t[0][1],i=+t[1][0],a=+t[1][1]),P()):null==M?null:[[M,n],[i,a]]},_.scale=function(t){return arguments.length?(h=+t,T()):h},_.translate=function(t){return arguments.length?(f=+t[0],d=+t[1],T()):[f,d]},_.center=function(t){return arguments.length?(p=t[0]%360*LS,g=t[1]%360*LS,T()):[p*PS,g*PS]},_.rotate=function(t){return arguments.length?(y=t[0]%360*LS,m=t[1]%360*LS,v=2<t.length?t[2]%360*LS:0,T()):[y*PS,m*PS,v*PS]},_.angle=function(t){return arguments.length?(b=t%360*LS,T()):b*PS},_.reflectX=function(t){return arguments.length?(x=t?-1:1,T()):x<0},_.reflectY=function(t){return arguments.length?(w=t?-1:1,T()):w<0},_.precision=function(t){return arguments.length?(o=V_(s,S=t*t),P()):zS(S)},_.fitExtent=function(t,e){return I_(_,t,e)},_.fitSize=function(t,e){return B_(_,t,e)},_.fitWidth=function(t,e){return D_(_,t,e)},_.fitHeight=function(t,e){return z_(_,t,e)},function(){return e=t.apply(this,arguments),_.invert=e.invert&&A,T()}}function X_(t){var e=0,n=SS/3,r=U_(t),t=r(e,n);return t.parallels=function(t){return arguments.length?r(e=t[0]*LS,n=t[1]*LS):[e*PS,n*PS]},t}function $_(t,e){var n,r,i,a=L(t),o=(a+L(e))/2;return NS(o)<P?(n=T(t),s.invert=function(t,e){return[t/n,VS(e*n)]},s):(i=zS(r=1+a*(2*o-a))/o,l.invert=function(t,e){var e=i-e,n=jS(t,NS(e))*DS(e);return e*o<0&&(n-=SS*DS(t)*DS(e)),[n/o,VS((r-(t*t+e*e)*o*o)/(2*o))]},l);function s(t,e){return[t*n,L(e)/n]}function l(t,e){e=zS(r-2*o*L(e))/o;return[e*L(t*=o),i-e*T(t)]}}function K_(){return X_($_).scale(155.424).center([0,33.6442])}function Z_(){return K_().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function J_(i){return function(t,e){var n=T(t),r=T(e),n=i(n*r);return n===1/0?[2,0]:[n*r*L(t),n*L(e)]}}function Q_(a){return function(t,e){var n=zS(t*t+e*e),r=a(n),i=L(r),r=T(r);return[jS(t*i,n*r),VS(n&&e*i/n)]}}var tA=J_(function(t){return zS(2/(1+t))});tA.invert=Q_(function(t){return 2*VS(t/2)});var eA=J_(function(t){return(t=WS(t))&&t/L(t)});function nA(t,e){return[t,IS(GS((_S+e)/2))]}function rA(r){var i,a,o,s=q_(r),e=s.center,l=s.scale,n=s.translate,c=s.clipExtent,u=null;function h(){var e,t=SS*l(),n=s((e=o4((e=s.rotate())[0]*LS,e[1]*LS,2<e.length?e[2]*LS:0),function(t){return(t=e.invert(t[0]*LS,t[1]*LS))[0]*=PS,t[1]*=PS,t}([0,0])));return c(null==u?[[n[0]-t,n[1]-t],[n[0]+t,n[1]+t]]:r===nA?[[Math.max(n[0]-t,u),i],[Math.min(n[0]+t,a),o]]:[[u,Math.max(n[1]-t,i)],[a,Math.min(n[1]+t,o)]])}return s.scale=function(t){return(arguments.length?(l(t),h):l)()},s.translate=function(t){return(arguments.length?(n(t),h):n)()},s.center=function(t){return(arguments.length?(e(t),h):e)()},s.clipExtent=function(t){return arguments.length?(null==t?u=i=a=o=null:(u=+t[0][0],i=+t[0][1],a=+t[1][0],o=+t[1][1]),h()):null==u?null:[[u,i],[a,o]]},h()}function iA(t){return GS((_S+t)/2)}function aA(t,e){var n=T(t),i=t===e?L(t):IS(n/T(e))/IS(iA(e)/iA(t)),a=n*BS(iA(t),i)/i;return i?(r.invert=function(t,e){var e=a-e,n=DS(i)*zS(t*t+e*e),r=jS(t,NS(e))*DS(e);return e*i<0&&(r-=SS*DS(t)*DS(e)),[r/i,2*CS(BS(a/n,1/i))-_S]},r):nA;function r(t,e){0<a?e<-_S+P&&(e=-_S+P):_S-P<e&&(e=_S-P);e=a/BS(iA(e),i);return[e*L(i*t),a-e*T(i*t)]}}function oA(t,e){return[t,e]}function sA(t,e){var n=T(t),r=t===e?L(t):(n-T(e))/(e-t),i=n/r+t;return NS(r)<P?oA:(a.invert=function(t,e){var e=i-e,n=jS(t,NS(e))*DS(e);return e*r<0&&(n-=SS*DS(t)*DS(e)),[n/r,i-DS(r)*zS(t*t+e*e)]},a);function a(t,e){e=i-e,t*=r;return[e*L(t),i-e*T(t)]}}eA.invert=Q_(function(t){return t}),nA.invert=function(t,e){return[t,2*CS(FS(e))-_S]},oA.invert=oA;var lA=1.340264,cA=-.081106,uA=893e-6,hA=.003796,fA=zS(3)/2;function dA(t,e){var e=VS(fA*L(e)),n=e*e,r=n*n*n;return[t*T(e)/(fA*(lA+3*cA*n+r*(7*uA+9*hA*n))),e*(lA+cA*n+r*(uA+hA*n))]}function pA(t,e){var n=T(e),r=T(t)*n;return[n*L(t)/r,L(e)/r]}function gA(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function yA(t,e){return[T(e)*L(t),L(e)]}function mA(t,e){var n=T(e),r=1+T(t)*n;return[n*L(t)/r,L(e)/r]}function vA(t,e){return[IS(GS((_S+e)/2)),-t]}dA.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(lA+cA*i+a*(uA+hA*i))-e)/(lA+3*cA*i+a*(7*uA+9*hA*i)))*r)*i*i,!(NS(n)<OS));++o);return[fA*t*(lA+3*cA*i+a*(7*uA+9*hA*i))/T(r),VS(L(r)/fA)]},pA.invert=Q_(CS),gA.invert=function(t,e){var n=e,r=25;do{var i=n*n,a=i*i}while(n-=a=(n*(1.007226+i*(.015085+a*(.028874*i-.044475-.005916*a)))-e)/(1.007226+i*(.045255+a*(.259866*i-.311325-.005916*11*a))),NS(a)>P&&0<--r);return[t/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]},yA.invert=Q_(VS),mA.invert=Q_(function(t){return 2*CS(t)}),vA.invert=function(t,e){return[-e,2*CS(FS(t))-_S]};var bA=Object.freeze({__proto__:null,geoAlbersUsa:function(){var e,n,i,a,o,r,s=Z_(),l=K_().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=K_().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){r=[t,e]}};function h(t){var e=t[0],t=t[1];return r=null,i.point(e,t),r||(a.point(e,t),r)||(o.point(e,t),r)}function f(){return e=n=null,h}return h.invert=function(t){var e=s.scale(),n=s.translate(),r=(t[0]-n[0])/e,n=(t[1]-n[1])/e;return(.12<=n&&n<.234&&-.425<=r&&r<-.214?l:.166<=n&&n<.234&&-.214<=r&&r<-.115?c:s).invert(t)},h.stream=function(t){return e&&n===t?e:(r=[s.stream(n=t),l.stream(t),c.stream(t)],i=r.length,e={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()}});var r,i},h.precision=function(t){return arguments.length?(s.precision(t),l.precision(t),c.precision(t),f()):s.precision()},h.scale=function(t){return arguments.length?(s.scale(t),l.scale(.35*t),c.scale(t),h.translate(s.translate())):s.scale()},h.translate=function(t){var e,n,r;return arguments.length?(e=s.scale(),n=+t[0],r=+t[1],i=s.translate(t).clipExtent([[n-.455*e,r-.238*e],[n+.455*e,r+.238*e]]).stream(u),a=l.translate([n-.307*e,r+.201*e]).clipExtent([[n-.425*e+P,r+.12*e+P],[n-.214*e-P,r+.234*e-P]]).stream(u),o=c.translate([n-.205*e,r+.212*e]).clipExtent([[n-.214*e+P,r+.166*e+P],[n-.115*e-P,r+.234*e-P]]).stream(u),f()):s.translate()},h.fitExtent=function(t,e){return I_(h,t,e)},h.fitSize=function(t,e){return B_(h,t,e)},h.fitWidth=function(t,e){return D_(h,t,e)},h.fitHeight=function(t,e){return z_(h,t,e)},h.scale(1070)},geoAlbers:Z_,geoAzimuthalEqualArea:function(){return q_(tA).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:tA,geoAzimuthalEquidistant:function(){return q_(eA).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:eA,geoConicConformal:function(){return X_(aA).scale(109.5).parallels([30,30])},geoConicConformalRaw:aA,geoConicEqualArea:K_,geoConicEqualAreaRaw:$_,geoConicEquidistant:function(){return X_(sA).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:sA,geoEqualEarth:function(){return q_(dA).scale(177.158)},geoEqualEarthRaw:dA,geoEquirectangular:function(){return q_(oA).scale(152.63)},geoEquirectangularRaw:oA,geoGnomonic:function(){return q_(pA).scale(144.049).clipAngle(60)},geoGnomonicRaw:pA,geoIdentity:function(){var r,i,e,n,a,o,s,l=1,c=0,u=0,h=1,f=1,d=0,p=null,g=1,y=1,m=j_({point:function(t,e){t=x([t,e]);this.stream.point(t[0],t[1])}}),v=N4;function b(){return g=l*h,y=l*f,o=s=null,x}function x(t){var e,n=t[0]*g,t=t[1]*y;return d&&(e=t*r-n*i,n=n*r+t*i,t=e),[n+c,t+u]}return x.invert=function(t){var e,n=t[0]-c,t=t[1]-u;return d&&(e=t*r+n*i,n=n*r-t*i,t=e),[n/g,t/y]},x.stream=function(t){return o&&s===t?o:o=m(v(s=t))},x.postclip=function(t){return arguments.length?(v=t,p=e=n=a=null,b()):v},x.clipExtent=function(t){return arguments.length?(v=null==t?(p=e=n=a=null,N4):M4(p=+t[0][0],e=+t[0][1],n=+t[1][0],a=+t[1][1]),b()):null==p?null:[[p,e],[n,a]]},x.scale=function(t){return arguments.length?(l=+t,b()):l},x.translate=function(t){return arguments.length?(c=+t[0],u=+t[1],b()):[c,u]},x.angle=function(t){return arguments.length?(i=L(d=t%360*LS),r=T(d),b()):d*PS},x.reflectX=function(t){return arguments.length?(h=t?-1:1,b()):h<0},x.reflectY=function(t){return arguments.length?(f=t?-1:1,b()):f<0},x.fitExtent=function(t,e){return I_(x,t,e)},x.fitSize=function(t,e){return B_(x,t,e)},x.fitWidth=function(t,e){return D_(x,t,e)},x.fitHeight=function(t,e){return z_(x,t,e)},x},geoProjection:q_,geoProjectionMutator:U_,geoMercator:function(){return rA(nA).scale(961/TS)},geoMercatorRaw:nA,geoNaturalEarth1:function(){return q_(gA).scale(175.295)},geoNaturalEarth1Raw:gA,geoOrthographic:function(){return q_(yA).scale(249.5).clipAngle(90+P)},geoOrthographicRaw:yA,geoStereographic:function(){return q_(mA).scale(250).clipAngle(142)},geoStereographicRaw:mA,geoTransverseMercator:function(){var t=rA(vA),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],2<t.length?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:vA});function xA(t){return{type:"FeatureCollection",features:t.flatMap(t=>function(t){if(!t||!t.type)return null;var 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;return"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featureCollection"===e?t:void 0}(t).features)}}function wA(t,e,n,r){var i,a,o,s,l,c,{outline:e=(e=e.filter(EA),e.find(t=>t.sphere)?{type:"Sphere"}:xA(e.filter(t=>!t.sphere).flatMap(t=>t.data.value)))}=r,{size:r="fitExtent"}=r;"fitExtent"===r?(i=t,o=e,{x:c,y:l,width:a,height:s}=c=n,i.fitExtent([[c,l],[a,s]],o)):"fitWidth"===r&&(i=t,c=e,{width:l,height:a}=l=n,[[l,c],[s,o]]=C_(i.fitWidth(l,c)).bounds(c),o=Math.ceil(o-c),c=Math.min(Math.ceil(s-l),o),s=i.scale()*(c-1)/c,[l,c]=i.translate(),c+=(a-o)/2,i.scale(s).translate([l,c]).precision(.2))}function kA(t){var e=t["data"];return Array.isArray(e)?Object.assign(Object.assign({},t),{data:{value:e}}):(e=e["type"],"graticule10"===e?Object.assign(Object.assign({},t),{data:{value:[_4()]}}):"sphere"===e?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t)}function EA(t){return"geoPath"===t.type}var MA,po=()=>t=>{var{children:e,projection:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,f=J(n,["type"]),d=function(t){if("function"==typeof t)return t;var e="geo"+Nf(t);if(e=bA[e])return e;throw new Error("Unknown projection: "+t)}(r),p=e.map(kA);let g;return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinates:[{type:function(){return[["custom",(t,e,n,r)=>{const i=d();var a,o,s,l={x:t,y:e,width:n,height:r},c=(wA(i,p,l,f),i),l=f;for([o,s]of Object.entries(l))null!=(a=c[o])&&a.call(c,s);g=C_(i);const u=new Dm({domain:[t,t+n]}),h=new Dm({domain:[e,e+r]});return{transform:t=>{return t=t,(t=i(t))?([t,e]=t,[u.map(t),h.map(e)]):null;var e},untransform:t=>{return(t=t)?([t,e]=t,t=[u.invert(t),h.invert(e)],i.invert(t)):null;var e}}}]]}}],children:p.flatMap(t=>{return EA(t)?(e=t.style,Object.assign(Object.assign({},t),{type:"path",style:Object.assign(Object.assign({},e),{d:t=>g(t)})})):t;var e})})]},io=(po.props={},()=>t=>{var{data:e,scale:n,encode:r,style:i,animate:a,key:o}=t,t=J(t,["type","data","scale","encode","style","animate","key"]);return[Object.assign(Object.assign({type:"geoView"},t),{children:[{type:"geoPath",key:o+"-0",data:{value:e},scale:n,encode:r,style:i,animate:a}]})]});io.props={};const OA={"composition.geoView":po,"composition.geoPath":io};function SA(){return Object.assign({"data.fetch":M1,"data.inline":C1,"data.sortBy":N1,"data.sort":_1,"data.filter":S1,"data.pick":P1,"data.rename":L1,"data.subset":T1,"data.fold":O1,"data.custom":j1,"data.map":R1,"data.cluster":c1,"data.tree":u1,"data.sankey":U0,"data.arc":D1,"data.wordCloud":ay,"data.join":sy,"transform.maybeZeroY1":$O,"transform.maybeZeroX":c3,"transform.maybeStackY":s3,"transform.maybeTitle":l3,"transform.maybeSeries":d3,"transform.maybeZeroPadding":b3,"transform.stackY":a3,"transform.binX":hS,"transform.bin":uS,"transform.dodgeX":M3,"transform.jitter":T3,"transform.jitterX":P3,"transform.symmetryY":L3,"transform.diffY":N3,"transform.stackEnter":O3,"transform.normalizeY":S3,"transform.select":I3,"transform.selectX":B3,"transform.selectY":D3,"transform.groupX":Z3,"transform.groupY":J3,"transform.groupColor":Q3,"transform.group":K3,"transform.maybeSize":h3,"transform.maybeZeroY":u3,"transform.maybeKey":f3,"transform.sortX":nS,"transform.sortY":iS,"transform.sortColor":rS,"transform.flexX":aS,"transform.maybeTupleY":p3,"transform.maybeTupleX":g3,"transform.maybeIdentityY":y3,"transform.maybeIdentityX":m3,"transform.maybeTuple":k3,"transform.maybeVisualPosition":x3,"transform.maybeFunctionAttribute":w3,"transform.maybeGradient":E3,"transform.maybeTooltip":v3,"transform.pack":sS,"transform.sample":fS,"transform.filter":dS,"coordinate.cartesian":Yf,"coordinate.polar":Hf,"coordinate.helix":qf,"coordinate.transpose":Uf,"coordinate.theta":Zf,"coordinate.reflect":Xf,"coordinate.reflectX":$f,"coordinate.reflectY":Kf,"coordinate.parallel":Qf,"coordinate.fisheye":td,"coordinate.fisheyeX":ed,"coordinate.fisheyeY":nd,"coordinate.radial":Jf,"encode.constant":rd,"encode.field":ad,"encode.transform":id,"encode.column":od,"mark.interval":xp,"mark.rect":wp,"mark.line":p0,"mark.point":g0,"mark.text":y0,"mark.cell":m0,"mark.area":v0,"mark.link":b0,"mark.image":x0,"mark.polygon":w0,"mark.box":k0,"mark.vector":E0,"mark.lineX":O0,"mark.lineY":M0,"mark.connector":S0,"mark.range":T0,"mark.rangeX":P0,"mark.rangeY":L0,"mark.sankey":ng,"mark.path":rg,"mark.treemap":lg,"mark.pack":cg,"mark.boxplot":vg,"mark.shape":bg,"mark.forceGraph":s1,"mark.tree":h1,"mark.wordCloud":ly,"palette.category10":cy,"palette.category20":uy,"palette.sequentialBlue":hy,"palette.sequentialDarkBlue":fy,"palette.sequentialGreen":dy,"palette.sequentialDarkGreen":py,"palette.sequentialGrey":gy,"palette.sequentialOrange":yy,"palette.sequentialPink":my,"palette.sequentialRed":vy,"palette.sequentialYellow":by,"palette.sequentialPurple":xy,"palette.sequentialYellowOrange":wy,"palette.sequentialYellowGreen":ky,"palette.sequentialPinkPurple":Ey,"palette.sequentialGreenBlue":My,"palette.divergingGreenYellow":Oy,"palette.divergingRedBlue":Sy,"palette.divergingGreenRed":_y,"palette.divergingRedPurple":Ay,"scale.linear":fv,"scale.ordinal":dv,"scale.band":hv,"scale.identity":pv,"scale.point":gv,"scale.time":yv,"scale.log":mv,"scale.pow":vv,"scale.sqrt":kv,"scale.threshold":bv,"scale.quantile":xv,"scale.quantize":wv,"scale.sequential":Ev,"shape.interval.rect":Wb,"shape.interval.hollow":Vb,"shape.interval.funnel":Yb,"shape.interval.pyramid":qb,"shape.rect.rect":Wb,"shape.rect.hollow":Vb,"shape.cell.cell":Wb,"shape.cell.hollow":Vb,"shape.line.line":Kb,"shape.line.hv":Jb,"shape.line.vh":Qb,"shape.line.hvh":t2,"shape.line.smooth":Zb,"shape.point.bowtie":i2,"shape.point.cross":a2,"shape.point.diamond":o2,"shape.point.hexagon":s2,"shape.point.hollowBowtie":l2,"shape.point.hollowDiamond":c2,"shape.point.hollowHexagon":u2,"shape.point.hollow":h2,"shape.point.hollowSquare":f2,"shape.point.hollowTriangle":d2,"shape.point.hollowTriangleDown":p2,"shape.point.hyphen":g2,"shape.point.line":y2,"shape.point.plus":m2,"shape.point.point":v2,"shape.point.square":b2,"shape.point.tick":x2,"shape.point.triangle":w2,"shape.point.triangleDown":k2,"shape.text.text":G5,"shape.area.area":q5,"shape.area.smooth":U5,"shape.area.step":X5,"shape.link.smooth":K5,"shape.link.vhv":Z5,"shape.link.arc":J5,"shape.link.link":$5,"shape.image.image":Q5,"shape.polygon.polygon":tE,"shape.polygon.ribbon":eE,"shape.box.box":nE,"shape.vector.vector":E2,"shape.label.label":gE,"shape.text.badge":V5,"shape.lineX.line":rE,"shape.lineY.line":rE,"shape.shape.shape":bE,"shape.connector.connector":oE,"shape.range.range":Wb,"shape.rangeX.range":Wb,"shape.rangeY.range":Wb,"shape.path.path":mE,"shape.path.hollow":vE,"theme.light":wE,"theme.dark":EE,"theme.academy":OE,"component.axisX":UE,"component.axisY":XE,"component.legendCategory":$E,"component.legendContinuous":KE,"component.title":JE,"component.sliderX":tM,"component.sliderY":eM,"animation.scaleInX":sM,"animation.scaleOutX":lM,"animation.scaleInY":cM,"animation.scaleOutY":uM,"animation.waveIn":vM,"animation.fadeIn":hM,"animation.fadeOut":fM,"animation.zoomIn":bM,"animation.zoomOut":xM,"animation.pathIn":wM,"animation.morphing":mM,"animation.growInX":kM,"animation.growInY":EM,"interaction.elementHighlight":BM,"interaction.elementHighlightByX":DM,"interaction.elementHighlightByColor":zM,"interaction.elementSelect":WM,"interaction.elementSelectByX":VM,"interaction.elementSelectByColor":YM,"interaction.fisheye":qM,"interaction.chartIndex":HM,"interaction.tooltip":rO,"interaction.legendFilter":cO,"interaction.brushHighlight":fO,"interaction.brushXHighlight":dO,"interaction.brushYHighlight":pO,"composition.spaceLayer":vO,"composition.spaceFlex":bO,"composition.mark":wO,"composition.view":xO,"composition.facetRect":LO,"composition.repeatMatrix":RO,"composition.facetCircle":GO,"composition.timingKeyframe":WO,"labelTransform.overlapHide":yS,"labelTransform.overlapDodgeY":vS,"labelTransform.overflowHide":MS,"labelTransform.contrastReverse":ES},OA)}function _A(t,e,...n){t&&(t[e]||[]).forEach(t=>{t.apply(this,n)})}function AA(e,n){const r=t=>{return"string"!=typeof t?t:n[t=e+"."+t]||K0("Unknown Component: "+t)};return[t=>{var e=t["type"],t=J(t,["type"]);return r(e)(Object.assign({},t))},r]}function h(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}(tc=MA=MA||{}).BEFORE_RENDER="beforerender",tc.AFTER_RENDER="afterrender",tc.BEFORE_PAINT="beforepaint",tc.AFTER_PAINT="afterpaint",tc.BEFORE_CHANGE_DATA="beforechangedata",tc.AFTER_CHANGE_DATA="afterchangedata",tc.BEFORE_CLEAR="beforeclear",tc.AFTER_CLEAR="afterclear",tc.BEFORE_DESTROY="beforedestroy",tc.AFTER_DESTROY="afterdestroy",tc.BEFORE_CHANGE_SIZE="beforechangesize",tc.AFTER_CHANGE_SIZE="afterchangesize";l=h("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),zo=h("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),oc=h("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),rc=h("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),hc=h("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Jl=h("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),j=h("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),dw=h("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),vo=h("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),r=h("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function TA(t,e,n){(t.prototype=e.prototype=n).constructor=t}function PA(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function LA(){}var NA=1/.7,dl="\\s*([+-]?\\d+)\\s*",to="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",eo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",CA=/^#([0-9a-f]{3,8})$/,jA=new RegExp(`^rgb\\(${dl},${dl},${dl}\\)$`),RA=new RegExp(`^rgb\\(${eo},${eo},${eo}\\)$`),FA=new RegExp(`^rgba\\(${dl},${dl},${dl},${to}\\)$`),IA=new RegExp(`^rgba\\(${eo},${eo},${eo},${to}\\)$`),BA=new RegExp(`^hsl\\(${to},${eo},${eo}\\)$`),DA=new RegExp(`^hsla\\(${to},${eo},${eo},${to}\\)$`),zA={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function GA(){return this.rgb().formatHex()}function WA(){return this.rgb().formatRgb()}function VA(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=CA.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?YA(e):3===n?new XA(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?HA(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?HA(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=jA.exec(t))?new XA(e[1],e[2],e[3],1):(e=RA.exec(t))?new XA(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=FA.exec(t))?HA(e[1],e[2],e[3],e[4]):(e=IA.exec(t))?HA(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=BA.exec(t))?t6(e[1],e[2]/100,e[3]/100,1):(e=DA.exec(t))?t6(e[1],e[2]/100,e[3]/100,e[4]):zA.hasOwnProperty(t)?YA(zA[t]):"transparent"===t?new XA(NaN,NaN,NaN,0):null}function YA(t){return new XA(t>>16&255,t>>8&255,255&t,1)}function HA(t,e,n,r){return new XA(t=r<=0?e=n=NaN:t,e,n,r)}function qA(t){return(t=t instanceof LA?t:VA(t))?new XA((t=t.rgb()).r,t.g,t.b,t.opacity):new XA}function UA(t,e,n,r){return 1===arguments.length?qA(t):new XA(t,e,n,null==r?1:r)}function XA(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function $A(){return"#"+QA(this.r)+QA(this.g)+QA(this.b)}function KA(){var t=ZA(this.opacity);return(1===t?"rgb(":"rgba(")+JA(this.r)+`, ${JA(this.g)}, `+JA(this.b)+(1===t?")":`, ${t})`)}function ZA(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function JA(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function QA(t){return((t=JA(t))<16?"0":"")+t.toString(16)}function t6(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new n6(t,e,n,r)}function e6(t){var e,n,r,i,a,o,s,l;return t instanceof n6?new n6(t.h,t.s,t.l,t.opacity):(t=t instanceof LA?t:VA(t))?t instanceof n6?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new n6(o,s,l,t.opacity)):new n6}function n6(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function r6(t){return(t=(t||0)%360)<0?t+360:t}function i6(t){return Math.max(0,Math.min(1,t||0))}function a6(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}TA(LA,VA,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:GA,formatHex:GA,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return e6(this).formatHsl()},formatRgb:WA,toString:WA}),TA(XA,UA,PA(LA,{brighter(t){return t=null==t?NA:Math.pow(NA,t),new XA(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new XA(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new XA(JA(this.r),JA(this.g),JA(this.b),ZA(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:$A,formatHex:$A,formatHex8:function(){return"#"+QA(this.r)+QA(this.g)+QA(this.b)+QA(255*(isNaN(this.opacity)?1:this.opacity))},formatRgb:KA,toString:KA})),TA(n6,function(t,e,n,r){return 1===arguments.length?e6(t):new n6(t,e,n,null==r?1:r)},PA(LA,{brighter(t){return t=null==t?NA:Math.pow(NA,t),new n6(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new n6(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new XA(a6(240<=t?t-240:120+t,n,e),a6(t,n,e),a6(t<120?240+t:t-120,n,e),this.opacity)},clamp(){return new n6(r6(this.h),i6(this.s),i6(this.l),ZA(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){var t=ZA(this.opacity);return(1===t?"hsl(":"hsla(")+r6(this.h)+`, ${100*i6(this.s)}%, ${100*i6(this.l)}%`+(1===t?")":`, ${t})`)}}));const o6=Math.PI/180,s6=180/Math.PI;var l6=1.78277,c6=-.29227,u6=-.90649,h6=1.97294,f6=h6*u6,d6=h6*l6,p6=l6*c6- -.14861*u6;function g6(t,e,n,r){return 1===arguments.length?(i=t)instanceof y6?new y6(i.h,i.s,i.l,i.opacity):(a=(i=i instanceof XA?i:qA(i)).r/255,o=i.g/255,l=i.b/255,l=(h6*(o-(a=(p6*l+f6*a-d6*o)/(p6+f6-d6)))-c6*(o=l-a))/u6,new y6((l=(s=Math.sqrt(l*l+o*o)/(h6*a*(1-a)))?Math.atan2(l,o)*s6-120:NaN)<0?l+360:l,s,a,i.opacity)):new y6(t,e,n,null==r?1:r);var i,a,o,s,l}function y6(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}TA(y6,g6,PA(LA,{brighter(t){return t=null==t?NA:Math.pow(NA,t),new y6(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new y6(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*o6,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),t=Math.sin(t);return new XA(255*(e+n*(-.14861*r+l6*t)),255*(e+n*(c6*r+u6*t)),255*(e+h6*r*n),this.opacity)}}));var m6=t=>()=>t;function v6(e,n){return function(t){return e+t*n}}function b6(a){return 1==(a=+a)?x6:function(t,e){return e-t?(n=t,r=e,i=a,n=Math.pow(n,i),r=Math.pow(r,i)-n,i=1/i,function(t){return Math.pow(n+t*r,i)}):m6(isNaN(t)?e:t);var n,r,i}}function x6(t,e){var n=e-t;return n?v6(t,n):m6(isNaN(t)?e:t)}!function t(e){var o=b6(e);function n(e,t){var n=o((e=UA(e)).r,(t=UA(t)).r),r=o(e.g,t.g),i=o(e.b,t.b),a=x6(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=r(t),e.b=i(t),e.opacity=a(t),e+""}}return n.gamma=t,n}(1);w6=function(s){var l=s.length-1;return function(t){var e,n=t<=0?t=0:1<=t?l-(t=1):Math.floor(t*l),r=s[n],i=s[n+1],a=0<n?s[n-1]:2*r-i,o=n<l-1?s[n+2]:2*i-r;return((1-3*(t=(t-n/l)*l)+3*(n=t*t)-(e=n*t))*a+(4-6*n+3*e)*r+(1+3*t+3*n-3*e)*i+e*o)/6}};var w6,k6=function(t){for(var e,n=t.length,r=new Array(n),i=new Array(n),a=new Array(n),o=0;o<n;++o)e=UA(t[o]),r[o]=e.r||0,i[o]=e.g||0,a[o]=e.b||0;return r=w6(r),i=w6(i),a=w6(a),e.opacity=1,function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e+""}};function E6(s){return function t(o){function e(e,t){var n=s((e=g6(e)).h,(t=g6(t)).h),r=x6(e.s,t.s),i=x6(e.l,t.l),a=x6(e.opacity,t.opacity);return function(t){return e.h=n(t),e.s=r(t),e.l=i(Math.pow(t,o)),e.opacity=a(t),e+""}}return o=+o,e.gamma=t,e}(1)}E6(function(t,e){var n=e-t;return n?v6(t,180<n||n<-180?n-360*Math.round(n/360):n):m6(isNaN(t)?e:t)});var Ka=E6(x6),c=t=>k6(t[t.length-1]),no=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(h),ao=c(no),n=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(h),Kl=c(n),Zl=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(h),e=c(Zl),$l=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(h),ro=c($l),oo=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(h),so=c(oo),lo=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(h),uo=c(lo),co=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(h),ho=c(co),a=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(h),o=c(a),fo=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(h),po=c(fo),io=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(h),tc=c(io),dl=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(h),eo=c(dl),to=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(h),M6=c(to),O6=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(h),S6=c(O6),_6=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(h),A6=c(_6),T6=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(h),P6=c(T6),L6=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(h),N6=c(L6),C6=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(h),j6=c(C6),R6=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(h),F6=c(R6),I6=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(h),B6=c(I6),D6=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(h),z6=c(D6),G6=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(h),W6=c(G6),V6=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(h),Y6=c(V6),H6=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(h),q6=c(H6),U6=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(h),X6=c(U6),$6=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(h),K6=c($6),Z6=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(h),J6=c(Z6),Q6=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(h),c=c(Q6);var tT=Ka(g6(300,.5,0),g6(-240,.5,1)),eT=Ka(g6(-100,.75,.35),g6(80,1.5,.8)),Ka=Ka(g6(260,.75,.35),g6(80,1.5,.8)),nT=g6();var rT=UA(),iT=Math.PI/3,aT=2*Math.PI/3;function oT(e){var n=e.length;return function(t){return e[Math.max(0,Math.min(n-1,Math.floor(t*n)))]}}var sT=oT(h("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),lT=oT(h("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),cT=oT(h("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),uT=oT(h("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),hT=Object.freeze({__proto__:null,schemeCategory10:l,schemeAccent:zo,schemeDark2:oc,schemePaired:rc,schemePastel1:hc,schemePastel2:Jl,schemeSet1:j,schemeSet2:dw,schemeSet3:vo,schemeTableau10:r,interpolateBrBG:ao,schemeBrBG:no,interpolatePRGn:Kl,schemePRGn:n,interpolatePiYG:e,schemePiYG:Zl,interpolatePuOr:ro,schemePuOr:$l,interpolateRdBu:so,schemeRdBu:oo,interpolateRdGy:uo,schemeRdGy:lo,interpolateRdYlBu:ho,schemeRdYlBu:co,interpolateRdYlGn:o,schemeRdYlGn:a,interpolateSpectral:po,schemeSpectral:fo,interpolateBuGn:tc,schemeBuGn:io,interpolateBuPu:eo,schemeBuPu:dl,interpolateGnBu:M6,schemeGnBu:to,interpolateOrRd:S6,schemeOrRd:O6,interpolatePuBuGn:A6,schemePuBuGn:_6,interpolatePuBu:P6,schemePuBu:T6,interpolatePuRd:N6,schemePuRd:L6,interpolateRdPu:j6,schemeRdPu:C6,interpolateYlGnBu:F6,schemeYlGnBu:R6,interpolateYlGn:B6,schemeYlGn:I6,interpolateYlOrBr:z6,schemeYlOrBr:D6,interpolateYlOrRd:W6,schemeYlOrRd:G6,interpolateBlues:Y6,schemeBlues:V6,interpolateGreens:q6,schemeGreens:H6,interpolateGreys:X6,schemeGreys:U6,interpolatePurples:K6,schemePurples:$6,interpolateReds:J6,schemeReds:Z6,interpolateOranges:c,schemeOranges:Q6,interpolateCividis:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},interpolateCubehelixDefault:tT,interpolateRainbow:function(t){(t<0||1<t)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return nT.h=360*t-100,nT.s=1.5-1.5*e,nT.l=.8-.9*e,nT+""},interpolateWarm:eT,interpolateCool:Ka,interpolateSinebow:function(t){var e;return t=(.5-t)*Math.PI,rT.r=255*(e=Math.sin(t))*e,rT.g=255*(e=Math.sin(t+iT))*e,rT.b=255*(e=Math.sin(t+aT))*e,rT+""},interpolateTurbo:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"},interpolateViridis:sT,interpolateMagma:lT,interpolateInferno:cT,interpolatePlasma:uT});function fT(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}function dT(t,e,n,r,i){var a=t[0],t=t[1],o=ct();return a=[a,t],(t=o)[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=a[0],t[7]=a[1],t[8]=1,t}function pT(t,e,n,r,i){var a=new Dm({range:[e,e+r]}),o=new Dm({range:[n,n+i]});return{transform:function(t){var e=t[0],t=t[1];return[a.map(e),o.map(t)]},untransform:function(t){var e=t[0],t=t[1];return[a.invert(e),o.invert(t)]}}}function gT(t,e,n,r,i){return(0,t[0])(e,n,r,i)}function yT(t,e,n,r,i){return t[0]}function mT(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],t=t[3],l=new Dm({range:[s,t]}),c=new Dm({range:[a,o]}),u=1<(s=i/r)?1:s,h=1<s?1/s:1;return{transform:function(t){var e=t[0],t=t[1],e=c.map(e),t=l.map(t);return[.5*(t*Math.cos(e)*u)+.5,.5*(t*Math.sin(e)*h)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/u,t=2*(t-.5)/h,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=fT(Math.atan2(t,e),a,o);return[c.invert(t),l.invert(n)]}}}function vT(t,e,n,r,i){return{transform:function(t){var e=t[0];return[t[1],e]},untransform:function(t){var e=t[0];return[t[1],e]}}}function bT(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return OT.apply(void 0,ST([[-1,-1]],e,!1))}function xT(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return OT.apply(void 0,ST([[-1,1]],e,!1))}function wT(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return OT.apply(void 0,ST([[1,-1]],e,!1))}function kT(t,e,n,r,i){var a,t=t[0],o=ct();return o=o,t=t,a=Math.sin(t),t=Math.cos(t),o[0]=t,o[1]=a,o[2]=0,o[3]=-a,o[4]=t,o[5]=0,o[6]=0,o[7]=0,o[8]=1,o}function ET(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=(t[3]-s)/(+o/(2*Math.PI)+1),c=l/(2*Math.PI),u=new Dm({range:[s,s+.99*l]}),h=new Dm({range:[a,o]}),f=1<(t=i/r)?1:t,d=1<t?1/t:1;return{transform:function(t){var e=t[0],t=t[1],e=h.map(e),t=u.map(t);return[.5*(Math.cos(e)*(c*e+t)*f)+.5,.5*(Math.sin(e)*(c*e+t)*d)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/f,t=2*(t-.5)/d,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=fT(Math.atan2(t,e)+Math.floor(n/l)*Math.PI*2,a,o),e=n-c*t;return[h.invert(t),u.invert(e)]}}}function MT(t,e,n,r,i){var s=t[0],l=t[1],a=t[2],t=t[3],c=new Dm({range:[a,t]});return{transform:function(t){for(var e=[],n=t.length,r=new zm({domain:new Array(n).fill(0).map(function(t,e){return e}),range:[s,l]}),i=0;i<n;i++){var a=t[i],o=r.map(i),a=c.map(a);e.push(o,a)}return e},untransform:function(t){for(var e=[],n=0;n<t.length;n+=2){var r=t[n+1];e.push(c.invert(r))}return e}}}var OT=function(t,e,n,r,i){var a=t[0],t=t[1],o=ct();return a=[a,t],(t=o)[0]=a[0],t[1]=0,t[2]=0,t[3]=0,t[4]=a[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},ST=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function _T(t){return 1/Math.tan(t)}function AT(t,e,n,r,i){var a=_T(t[0]);return{transform:function(t){var e=t[0],t=t[1];return[e+t*a,t]},untransform:function(t){var e=t[0],t=t[1];return[e-t*a,t]}}}function TT(t,e,n,r,i){var a=_T(t[0]);return{transform:function(t){var e=t[0];return[e,t[1]+e*a]},untransform:function(t){var e=t[0];return[e,t[1]-e*a]}}}function PT(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r,r=a?-1:1;return r*i*(n+1)/(n+i/((t-e)*r))+e}function LT(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r;return i/(i*(n+1)/(t-e)-n*(a?-1:1))+e}function NT(t,e,n){return n?new Dm({range:[0,1],domain:[0,e]}).map(t):t}function CT(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=NT(a,r,void 0!==t&&t);return{transform:function(t){var e=t[0],t=t[1];return[PT(e,s,o,0,1),t]},untransform:function(t){var e=t[0],t=t[1];return[LT(e,s,o,0,1),t]}}}function jT(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=NT(a,i,void 0!==t&&t);return{transform:function(t){return[t[0],PT(t[1],s,o,0,1)]},untransform:function(t){return[t[0],LT(t[1],s,o,0,1)]}}}function RT(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=t[4],c=NT(a,r,t=void 0!==t&&t),u=NT(o,i,t);return{transform:function(t){var e=t[0],t=t[1];return[PT(e,c,s,0,1),PT(t,u,l,0,1)]},untransform:function(t){var e=t[0],t=t[1];return[LT(e,c,s,0,1),LT(t,u,l,0,1)]}}}function FT(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=void 0!==(t=t[4])&&t,c=new Dm({range:[0,r]}),u=new Dm({range:[0,i]}),h=t?a:c.map(a),f=t?o:u.map(o);return{transform:function(t){var e=t[0],t=t[1],n=c.map(e)-h,r=u.map(t)-f,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=PT(i,0,l,0,s),t=Math.atan2(r,n),i=h+e*Math.cos(t),r=f+e*Math.sin(t),[c.invert(i),u.invert(r)])},untransform:function(t){var e=t[0],t=t[1],n=c.map(e)-h,r=u.map(t)-f,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=LT(i,0,l,0,s),t=Math.atan2(r,n),i=h+e*Math.cos(t),r=f+e*Math.sin(t),[c.invert(i),u.invert(r)])}}}var IT=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},BT=(DT.prototype.update=function(t){this.options=R({},this.options,t),this.recoordinate()},DT.prototype.clone=function(){return new DT(this.options)},DT.prototype.getOptions=function(){return this.options},DT.prototype.clear=function(){this.update({transformations:[]})},DT.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},DT.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y;return[(2*e+t.width)/2,(2*n+t.height)/2]},DT.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.options.transformations;return this.update({transformations:IT(IT([],n,!0),[IT([],t,!0)],!1)}),this},DT.prototype.map=function(t){return this.output(t)},DT.prototype.invert=function(t){return this.input(t)},DT.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},DT.prototype.compose=function(t){for(var e=(t=void 0===t?!1:t)?IT([],this.options.transformations,!0).reverse():this.options.transformations,n=t?function(t){return t.untransform}:function(t){return t.transform},r=[],a=[],i=function(t,e){return a.push((e=void 0===e?!0:e)?(i=t,function(t){for(var e=[],n=0;n<t.length-1;n+=2){var r=[t[n],t[n+1]],r=i(r);e.push.apply(e,r)}return e}):t);var i},o=0,s=e;o<s.length;o++){var l,c,u,h,f=s[o],d=f[0],f=f.slice(1),p=this.transformers[d];p&&(l=(h=this.options).x,c=h.y,u=h.width,h=h.height,p=p(IT([],f,!0),l,c,u,h),(f=p)instanceof Float32Array||f instanceof Array?r.push(p):(r.length&&(i(this.createMatrixTransform(r,t)),r.splice(0,r.length)),i(n(p)||zf,"parallel"!==d)))}return r.length&&i(this.createMatrixTransform(r,t)),function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t?e.reduce(function(e,n){return function(t){return n(e(t))}},t):zf}.apply(void 0,a)},DT.prototype.createMatrixTransform=function(t,e){var n,r,i,a,o,s,l,c,u,h,f,d,p=ct();return e&&t.reverse(),t.forEach(function(t){return ut(p,p,t)}),e&&(e=t=p,(d=new lt(9))[0]=e[0],d[1]=e[1],d[2]=e[2],d[3]=e[3],d[4]=e[4],d[5]=e[5],d[6]=e[6],d[7]=e[7],d[8]=e[8],d=(e=d)[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],c=(e=e[8])*a-o*l,f=d*c+n*(u=-e*i+o*s)+r*(h=l*i-a*s))&&(t[0]=c*(f=1/f),t[1]=(-e*n+r*l)*f,t[2]=(o*n-r*a)*f,t[3]=u*f,t[4]=(e*d-r*s)*f,t[5]=(-o*d+r*i)*f,t[6]=h*f,t[7]=(-l*d+n*s)*f,t[8]=(a*d-n*i)*f),function(t){t=[t[0],t[1],1];return Kt(t,t,p),[t[0],t[1]]}},DT);function DT(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:pT,translate:dT,custom:gT,matrix:yT,polar:mT,transpose:vT,scale:OT,"shear.x":AT,"shear.y":TT,reflect:bT,"reflect.x":xT,"reflect.y":wT,rotate:kT,helix:ET,parallel:MT,fisheye:RT,"fisheye.x":CT,"fisheye.y":jT,"fisheye.circular":FT},this.update(t)}function zT(t){return void 0!==t.find(t=>"polar"===t.type)}function GT(t){return void 0!==t.find(t=>"helix"===t.type)}function WT(t){return t.filter(({type:t})=>"transpose"===t).length%2==1}function VT(t){return void 0!==t.find(t=>"theta"===t.type)}function YT(t){return void 0!==t.find(t=>"radial"===t.type)}function HT(t,e,n,r,i,a){var o,{guide:s={}}=n,l=function(t,e,n){var{type:n,domain:r,range:i}=n;return void 0!==n?n:function(t){return eP(t,eg)}(e)?"identity":"string"==typeof i?"linear":2<(r||i||[]).length?KT(t):void 0===r?QT(e)?KT(t):tP(e)?"time":ZT(t,i):QT([r])?KT(t):tP(e)?"time":ZT(t,i)}(t,e,n);return"string"!=typeof l?n:(o=function(t,e,n){var r=n["domain"];if(void 0!==r)return r;var{domainMax:i,domainMin:a}=n;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":var[o,s]=function(t,e){var{zero:e=!1}=e;let n=1/0,r=-1/0;for(const i of t)for(const a of i)J0(a)&&(n=Math.min(n,+a),r=Math.max(r,+a));return n===1/0?[]:e?[Math.min(0,n),r]:[n,r]}(e,n);return[a||o,i||s];case"band":case"ordinal":case"point":return JT(e);case"quantile":return function(t){return JT(t).sort()}(e);case"sequential":var[o,s]=function(t){let e=1/0,n=-1/0;for(const r of t)for(const i of r)J0(i)&&(e=Math.min(e,+i),n=Math.max(n,+i));return e===1/0?[]:[e<0?-n:e,n]}(e);return[a||o,i||s];default:return[]}}(l,e,n),Object.assign(Object.assign(Object.assign({},n),function(t,e,n,r){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return function(t){var{interpolate:e=ym,nice:n=!1,tickCount:r=10}=t;return Object.assign(Object.assign({},t),{interpolate:e,nice:n,tickCount:r})}(n);case"band":case"point":return function(t,e,n,r){if(void 0!==r.padding||void 0!==r.paddingInner||void 0!==r.paddingOuter)return Object.assign(Object.assign({},r),{unknown:NaN});var t=function(t,e,n){return"enterDelay"===e||"enterDuration"===e?0:"band"!==t?"point"===t?.5:0:VT(n)?0:.1}(t,e,n),{paddingInner:e=t,paddingOuter:n=t}=r;return Object.assign(Object.assign({},r),{paddingInner:e,paddingOuter:n,padding:t,unknown:NaN})}(t,e,r,n);case"sequential":return function(t){const{palette:e="ylGnBu",offset:n}=t,r=Nf(e),i=hT["interpolate"+r];if(i)return{interpolator:n?t=>i(n(t)):i};throw new Error("Unknown palette: "+r)}(n);default:return n}}(l,t,n,r)),{domain:o,range:function(t,e,n,r,i,a,o){var s=r["range"];if("string"==typeof s)return s.split("-");if(void 0!==s)return s;var{rangeMin:l,rangeMax:c}=r;switch(t){case"linear":case"time":case"log":case"sqrt":var u=$T(n,r,i,a,o),[u,h]=function(t,e){return"enterDelay"===t?[0,1e3]:"enterDuration"==t?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:"color"===t?[e[0],function(t){return t[t.length-1]}(e)]:"opacity"!==t&&"size"===t?[1,10]:[0,1]}(e,u);return[l||u,c||h];case"band":case"point":return[l||0,c||1];case"ordinal":return $T(n,r,i,a,o);case"sequential":return;default:return[]}}(l,t,e,n,o,i,a),guide:s,name:t,type:l}))}function qT(t,n){var t=t.filter(({name:t,facet:e=!0})=>e&&t===n),e=t.flatMap(t=>t.domain),r=t.every(UT)?Tp(e):t.every(XT)?Array.from(new Set(e)):null;if(null!==r)for(const i of t)i.domain=r}function UT(t){t=t.type;return"string"==typeof t&&["linear","log","pow","time"].includes(t)}function XT(t){t=t.type;return"string"==typeof t&&["band","point","ordinal"].includes(t)}function $T(t,e,n,r,i){var[i]=AA("palette",i),{defaultCategory10:r,defaultCategory20:a}=r,t=(t=t.flat(),Array.from(new Set(t)).length<=r.length?r:a),{palette:r=t,offset:a}=e;try{return i({type:r})}catch(t){e=function(t,n,r=t=>t){if(!t)return null;const e=Nf(t),i=hT["scheme"+e],a=hT["interpolate"+e];if(!i&&!a)return null;if(i){if(!i.some(Array.isArray))return i;t=i[n.length];if(t)return t}return n.map((t,e)=>a(r(e/n.length)))}(r,n,a);if(e)return e;throw new Error(`Unknown Component: ${r} `)}}function KT(t){return(t=t).startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")?"point":"ordinal"}function ZT(t,e){return"color"!==t||e?"linear":"sequential"}function JT(t){return Array.from(new Set(t.flat()))}function QT(t){return eP(t,t=>{t=typeof t;return"string"==t||"boolean"==t})}function tP(t){return eP(t,t=>t instanceof Date)}function eP(t,e){for(const n of t)if(n.some(e))return!0;return!1}function nP(t,e,n){var{encode:r={},scale:i={},transform:a=[]}=e,e=J(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},e),{encode:r,scale:i,transform:a})]}function rP(t,i,a){return Oe(this,void 0,void 0,function*(){var t=a["library"],e=i["data"],[t]=AA("data",t),n=function(t){if(!t)return{type:"inline",value:null};if(Array.isArray(t))return{type:"inline",value:t};var{type:e="inline"}=t,t=J(t,["type"]);return Object.assign(Object.assign({},t),{type:e})}(e),{transform:r=[]}=n,n=yield function(t){return t.reduce((n,r)=>e=>Oe(this,void 0,void 0,function*(){var t=yield n(e);return r(t)}),X0)}([J(n,["transform"]),...r].map(t))(e);return[Array.isArray(n)?Nb(n):[],Object.assign(Object.assign({},i),{data:n})]})}function iP(t,e,n){var r=e["encode"];if(!r)return[t,e];var i,a,o={};for([i,a]of Object.entries(r))if(Array.isArray(a))for(let t=0;t<a.length;t++)o[""+i+(0===t?"":t)]=a[t];else o[i]=a;return[t,Object.assign(Object.assign({},e),{encode:o})]}function aP(t,e,n){const{encode:r,data:i}=e;var a;return r?(a=Lb(r,t=>{var e,n;return function(t){if("object"!=typeof t||t instanceof Date||null===t)return;t=t.type;return J0(t)}(t)?t:(e=i,{type:"function"==typeof(n=t)?"transform":"string"==typeof n&&function(t,e){return Array.isArray(t)&&t.some(t=>void 0!==t[e])}(e,n)?"field":"constant",value:t})}),[t,Object.assign(Object.assign({},e),{encode:a})]):[t,e]}function oP(t,e,n){var r=e["encode"];return r?(r=Lb(r,(t,e)=>{var n=t["type"];return"constant"!==n||(n=e).startsWith("x")||n.startsWith("y")||n.startsWith("position")||"enterDelay"===n||"enterDuration"===n||"updateDelay"===n||"updateDuration"===n||"exitDelay"===n||"exitDuration"===n?t:Object.assign(Object.assign({},t),{visual:!0})}),[t,Object.assign(Object.assign({},e),{encode:r})]):[t,e]}function sP(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];n=n.library;const a=function(t){const[n]=AA("encode",t);return(t,e)=>void 0===e||void 0===t?null:Object.assign(Object.assign({},e),{type:"column",value:n(e)(t),field:function(t){var{type:t,value:e}=t;return"field"===t&&"string"==typeof e?e:null}(e)})}(n);n=Lb(r,t=>a(i,t));return[t,Object.assign(Object.assign({},e),{encode:n})]}function lP(l,t,e){var n,r=t["encode"],i=J(t,["encode"]);return r?(n=(r=Object.entries(r)).filter(([,t])=>{t=t.value;return Array.isArray(t[0])}).flatMap(([n,t])=>{var r=[[n,new Array(l.length).fill(void 0)]];const i=t["value"],a=J(t,["value"]);for(let e=0;e<i.length;e++){var o=i[e];if(Array.isArray(o))for(let t=0;t<o.length;t++){var s=r[t]||[""+n+t,new Array(l).fill(void 0)];s[1][e]=o[t],r[t]=s}}return r.map(([t,e])=>[t,Object.assign({type:"column",value:e},a)])}),r=Object.fromEntries([...r,...n]),[l,Object.assign(Object.assign({},i),{encode:r})]):[l,t]}function cP(t,e,n){const{axis:r={},legend:i={}}=e,a=(t,e)=>{return"boolean"==typeof t?t?{}:null:void 0===(t=t[e])||t?t:null};var o="object"==typeof r?Array.from(new Set(["x","y",...Object.keys(r)])):["x","y"];return R(e,{scale:Object.assign(Object.assign({},Object.fromEntries(o.map(t=>[t,{guide:a(r,t)}]))),{color:{guide:a(i,"color")},size:{guide:a(i,"size")}})}),[t,e]}function uP(t,e,n){var r=e["animate"];return r||void 0===r||R(e,{animate:{enterType:null,exitType:null,updateType:null}}),[t,e]}function hP(s,l,c){return Oe(this,void 0,void 0,function*(){var[t,e]=yield function(s,l,c){return Oe(this,void 0,void 0,function*(){var t=c["library"],[t]=AA("transform",t),{preInference:e=[],postInference:n=[]}=l,{transform:r=[]}=s,e=[nP,rP,iP,aP,oP,sP,lP,uP,cP,...e.map(t),...r.map(t),...n.map(t)];let i=[],a=s;for(const o of e)[i,a]=yield o(i,a,c);return[i,a]})}(s,l,{library:c});const{encode:n,scale:u,data:r}=e;if(!1===Array.isArray(r))return null;const i=l["channels"],a=Fp(Object.entries(n).filter(([,t])=>J0(t)),t=>t.map(([t,e])=>Object.assign({name:t},e)),([t])=>{const e=null==(n=/([^\d]+)\d*$/.exec(t))?void 0:n[1];var n=i.find(t=>t.name===e);return null!=n&&n.independent?t:e});var o=i.filter(t=>{const{name:e,required:n}=t;if(a.find(([t])=>t===e))return!0;if(n)throw new Error(`Missing encoding for channel: ${e}.`);return!1}).flatMap(t=>{const{name:e,scale:s,scaleKey:l,range:c}=t;return a.filter(([t])=>t.startsWith(e)).map(([t,e],n)=>{var r=e.some(t=>t.visual),i=u[t]||{},{independent:a=!1,key:o=l||t,type:r=r?"identity":s}=i,i=J(i,["independent","key","type"]);return{name:t,values:e,scaleKey:a?Symbol("independent"):o,scale:Object.assign({type:r,range:c},i)}})});return[e,Object.assign(Object.assign({},l),{index:t,channels:o})]})}function fP(t,e,n){var{component:r=[],coordinates:i=[],title:a,theme:o}=e,[,s]=AA("component",n),l=t.filter(({guide:t})=>null!==t),e=function(t,e,n){const[,o]=AA("component",n),{marks:r,coordinates:s}=t,l=new Map(e.map(t=>[t.name,t]));return r.filter(t=>t.slider).flatMap(t=>{t=t.slider;return Object.entries(t).map(([t,e])=>{var n,r,i,a=l.get(t),t=([t,n=[]]=[t,s],"x"===t?WT(n)?"sliderY":"sliderX":"y"===t?WT(n)?"sliderX":"sliderY":null);if(a&&t)return n=o(t)["props"],{defaultPosition:n,defaultSize:r,defaultOrder:i}=n,Object.assign(Object.assign({position:n,size:r,order:i,type:t},e),{scale:a})})}).filter(t=>!!t)}(e,t,n),c=[...r,...e];a&&(t=s("title")["props"],{defaultPosition:n,defaultOrder:r,defaultSize:e}=t,e=function(t){var{size:t,text:e,subtitle:n,style:r,subtitleStyle:i}=t;if(t)return t;r=null!=(t=null==r?void 0:r.fontSize)?t:14,t=null!=(t=null==i?void 0:i.fontSize)?t:12,i=(null==i?void 0:i.spacing)||0;return(e?r+4:0)+(n?t+i:0)}(R({size:e},o,t="string"==typeof a?{text:a}:a)),c.push(Object.assign({type:"title",position:n,order:r,size:e},t)));for(const x of l){var u=function(t,e){var{name:t,guide:n,type:r}=t,n=n["type"];if(void 0!==n)return n;if("color"===t)switch(r){case"ordinal":return"legendCategory";case"linear":return"legendContinuous";default:return null}return WT(e)&&zT(e)||GT(e)||VT(e)?null:t.startsWith("x")?WT(e)?"axisY":"axisX":t.startsWith("y")?WT(e)?"axisX":"axisY":t.startsWith("position")&&!zT(e)?"axisY":null}(x,i);if(null!==u){var h=s(u)["props"],{defaultPosition:f,defaultSize:d,defaultOrder:p}=h,{guide:h,name:g,field:y}=x;for(const w of Array.isArray(h)?h:[h]){var m=function(t,e,n,r,i){n=["left","right","top","bottom","centerHorizontal","center"].includes(r.position)?r.position:n;{if("axisY"===e&&function(t){return void 0!==t.find(t=>"parallel"===t.type)}(i))return null===(t=/position(\d*)/g.exec(t))?n:(t=+t[1],WT(i)?0==t?"top":"centerVertical":0==t?n:"centerHorizontal");if("axisX"===e&&zT(i)&&!WT(i)||"axisY"===e&&zT(i)&&WT(i)||"axisY"===e&&VT(i)||"axisY"===e&>(i)||"axisY"===e&&YT(i))return"bottom"===r.position?"arcInner":"arc";if(zT(i)&&("axisX"===e||"axisY"===e))return"arcY";if(YT(i)&&"axisX"===e)return"arcY";if("axisX"===e&&function(t){return void 0!==t.find(t=>"reflect"===t.type)}(i)||"axisX"===e&&function(t){return void 0!==t.find(t=>"reflectY"===t.type)}(i))return"top";if("string"==typeof e&&e.startsWith("legend")&&zT(i)&&"center"===r.position)return"arcCenter"}return n}(g,u,f,w,i),{size:v=d,order:b=p}=w;c.push(Object.assign(Object.assign({title:y},w),{position:m,order:b,size:v,type:u,scale:x}))}}}return c}function dP(t,e,n,r){var[i]=AA("scale",r),[r]=AA("component",r),{scale:a,bbox:o}=t,t=J(t,["scale","bbox"]),i=a?i(a):null,{field:a,domain:s}=a||{},a={field:a,domain:s,bbox:o};return r(t)(i,a,e,n)}function pP(t,e){var t=function(t,e){var n=jp(t,t=>t.position),{padding:t,paddingLeft:e=t,paddingRight:r=t,paddingBottom:i=t,paddingTop:t=t}=e,a={paddingBottom:i,paddingLeft:e,paddingTop:t,paddingRight:r};for(const l of["left","right","top","bottom"]){var o="padding"+$0(l);if(void 0===a[o])if(n.has(l)){const t=n.get(l);var s=t.reduce((t,{size:e})=>t+e,0);a[o]=s}else a[o]=30}return a}(t,e),{paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:a}=t,{width:e,height:o,x:s=0,y:l=0,inset:c=0,insetLeft:u=c,insetTop:h=c,insetBottom:f=c,insetRight:c=c,margin:d=0,marginLeft:p=d,marginBottom:g=d,marginTop:y=d,marginRight:d=d}=e;return Object.assign(Object.assign({},t),{width:e,height:o,insetLeft:u,insetTop:h,insetBottom:f,insetRight:c,innerWidth:e-n-r-p-d,innerHeight:o-i-a-y-g,marginLeft:p,marginBottom:g,marginTop:y,marginRight:d,x:s,y:l})}function gP(t,e,n){var F=jp(t,t=>t.position),{paddingLeft:t,paddingRight:n,paddingTop:r,paddingBottom:I,marginLeft:i,marginTop:a,marginBottom:B,marginRight:D,innerHeight:o,innerWidth:s,height:z,width:G}=n,t=t+i,i=r+a,r=n+D,a=I+B,W={top:[t,0,s,i,0,!0,kp],right:[G-r,i,r,o,1,!1,kp],bottom:[t,z-a,s,a,0,!1,kp],left:[0,i,t,o,1,!0,kp],centerHorizontal:[t,i,s,o,-1,null,null],centerVertical:[t,i,s,o,-1,null,null],arc:[t,i,s,o,-1,null,null],arcY:[t,i,s,o,-1,null,null],arcInner:[t,i,s,o,-1,null,null],center:[t,i,s,o,-1,null,null],arcCenter:[t,i,s,o,-1,null,null]};for(const[R,t]of F.entries()){var l=W[R];if("centerHorizontal"===R)!function(e,t,n){const[r,i,,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==0).map(t=>t+r);for(let t=0;t<e.length;t++){var c=e[t];const r=l[t];var u=l[t+1]-r;c.bbox={x:r,y:i,width:u,height:a}}}(t,e,l);else if("centerVertical"===R)!function(e,t,n){const[r,i,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==1).map(t=>t+i);for(let t=0;t<e.length;t++){var c=e[t];const i=l[t];var u=l[t+1]-i;c.bbox={x:r,y:i,width:a,height:u}}}(t,e,l);else if("arc"===R){p=d=f=h=u=c=void 0;var c=t,u=l,[h,f,d,p]=u;for(let t=0;t<c.length;t++)c[t].bbox={x:h,y:f,width:d,height:p}}else if("arcY"===R){E=k=w=x=b=m=y=v=u=g=void 0;var g=t,u=e,[y,m,,v]=v=l,[b,x]=u.getCenter(),[u,w]=yP(u),k=x-w*(v=v/2),E=(w-u)*v;for(let t=0;t<g.length;t++)g[t].bbox={x:b+y,y:k+m,width:0,height:E}}else if("arcInner"===R){P=T=A=_=v=S=O=w=x=M=void 0;var M=t,x=e,[O,S,,w]=w=l,[v,_]=x.getCenter(),[x]=yP(x),A=x*(w=w/2),T=v-A,P=_-A;for(let t=0;t<M.length;t++)M[t].bbox={x:O+T,y:S+P,width:2*A,height:2*A}}else if("arcCenter"===R){q=H=j=C=Y=V=N=_=L=void 0;var L=t,_=e,[N,V,Y,C]=N=l,[_]=yP(_),j=C/2*_/Math.sqrt(2),H=N+Y/2,q=V+C/2;for(let t=0;t<L.length;t++)L[t].bbox={x:H-j,y:q-j,width:2*j,height:2*j}}else!function(n,t){const[e,r,i,a,o,s,l]=t,[c,u,h,f,d,p,g,y]=0===o?["y",r,"x",e,"height",a,"width",i]:["x",e,"y",r,"width",i,"height",a],m=(n.sort((t,e)=>l(t.order,e.order)),s?u+p:u);for(let t=0,e=m;t<n.length;t++){var v=n[t],b=v["size"];v.bbox={[c]:s?e-b:e,[h]:f,[d]:b,[g]:y},e+=b*(s?-1:1)}}(t,l)}}function yP(t){var t=t.getOptions()["transformations"],[,,,t,e]=t.find(t=>"polar"===t[0]);return[t,e]}function mP(T,P,L,N){return Oe(this,void 0,void 0,function*(){const[n]=AA("composition",L);var[t]=AA("interaction",L);const e=new Set(Object.keys(L).map(t=>{return null==(t=/mark\.(.*)/.exec(t))?void 0:t[1]}).filter(J0)),r=t=>{t=t.type;return"string"==typeof t&&e.has(t)?"mark":t};const i=t=>"standardView"===r(t);var a=t=>{var e;return i(t)?[t]:(e=r(t),n({type:e})(t))},o=[];const s=new Map;for(var l=new Map,c=[T],u=[];c.length;){var h=c.shift();if(i(h)){var f=l.get(h),[f,d]=f?wP(f,h,L):yield bP(h,L),p=(s.set(f,h),o.push(f),d.flatMap(a));if(c.push(...p),p.every(i)){var g=yield Promise.all(p.map(t=>xP(t,L)));qT(f=(f=g).flatMap(t=>Array.from(t.values())).flatMap(t=>t.channels.map(t=>t.scale)),"x"),qT(f,"y");for(let t=0;t<p.length;t++){var y=p[t],m=g[t];l.set(y,m)}}}else{d="mark"===r(h)?h:yield _P(h,L),f=a(d);Array.isArray(f)?c.push(...f):"function"==typeof f&&u.push(f())}}var v=T["on"];_A(v,MA.BEFORE_PAINT);const b=new Map,x=[];P.selectAll(LP(C)).data(o,t=>t.key).join(t=>t.append("g").attr("className",C).attr("id",t=>t.key).call(vP).each(function(t){kP(t,tt(this),x,L),b.set(t,this)}),t=>t.call(vP).each(function(t){kP(t,tt(this),x,L)}),t=>t.remove());var w=Array.from(b.entries()).map(([t,e])=>({view:t,container:e,options:s.get(t),update:function(i,a,o){return r=>Oe(this,void 0,void 0,function*(){var[t,e]=yield bP(r,a);kP(t,i,[],a);for(const n of e)mP(n,i,a,o);return{options:r,view:t}})}(tt(e),L,N)}));for(const S of w){const T=S["options"];for(const _ of function(t){var{interactions:t=[]}=t;return t}(T))t(_)(S,w)}const{width:k,height:E}=T;var M=[];for(const A of u){var O=new Promise(e=>Oe(this,void 0,void 0,function*(){for(const t of A)yield mP(Object.assign({width:k,height:E},t),P,L,N);e()}));M.push(O)}N.animations=x,_A(v,MA.AFTER_PAINT);v=x.filter(J0).map(OP).map(t=>t.finished);return Promise.all([...v,...M])})}function vP(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function bP(t,e){return Oe(this,void 0,void 0,function*(){return wP(yield xP(t,e),t,e)})}function xP(v,b){return Oe(this,void 0,void 0,function*(){var[t]=AA("theme",b);const[i,a]=AA("mark",b);var{theme:e,marks:n,coordinates:r=[]}=v,o=t(SP(e)),s=new Map,l=[];for(const p of n){var c=yield _P(p,b);l.push(c)}for(const g of yield Promise.all(l.map(r=>Oe(this,void 0,void 0,function*(){const{type:t=K0("G2Mark type is required."),key:n}=r;var e=a(t)["props"],{composite:e=!1}=e;return e?(yield i(r)(v)).map((t,e)=>Object.assign({key:n+"-"+e},t)):r}))).then(t=>t.flat())){var u,h=g["type"],h=a(h)["props"],h=yield hP(g,h,b);h&&([h,u]=h,s.set(h,u))}for(const y of jp(Array.from(s.values()).flatMap(t=>t.channels),({scaleKey:t})=>t).values()){var f=y.reduce((t,{scale:e})=>R(t,e),{}),d=y[0]["values"],d=Array.from(new Set(d.map(t=>t.field).filter(J0)));const v=R({guide:{title:0===d.length?void 0:d},field:d[0]},f);d=y[0]["name"];const m=HT(d,y.flatMap(({values:t})=>t.map(t=>t.value)),v,r,o,b);y.forEach(t=>t.scale=m)}return s})}function wP(t,e,n){var[r]=AA("mark",n);const[i]=AA("scale",n);var a,o,[s]=AA("theme",n),{key:l,frame:c=!1,theme:u,clip:h,style:f={}}=e,s=s(SP(u)),u=Array.from(t.values()),u=Array.from(new Set(u.flatMap(t=>t.channels.map(t=>t.scale)))),u=fP(Array.from(u),e,n),d=pP(u,e),p=function(t,e,n){var[n]=AA("coordinate",n),{innerHeight:r,innerWidth:i,insetLeft:a,insetTop:o,insetRight:s,insetBottom:l,marginLeft:c,marginTop:u}=t,{coordinates:e=[]}=e,e=(e=e).find(t=>"cartesian"===t.type)?e:[...e,{type:"cartesian"}];return new BT(Object.assign(Object.assign({},t),{x:a+c,y:o+u,width:i-a-s,height:r-l-o,transformations:e.map(n).flat()}))}(d,e,n),e=c?R({mainLineWidth:1,mainStroke:"#000"},f):f,g=(gP(u,p,d),{}),y=[];for([a,o]of t.entries()){const{children:x,dataDomain:w,modifier:k,key:E}=a;var{index:m,channels:v}=o,b=Lb(Object.fromEntries(v.map(({name:t,scale:e})=>[t,e])),t=>{var e=t["relations"],[e]=function(o){if(!o||!Array.isArray(o))return[X0,X0];let s,l;return[t=>{s=t.map.bind(t),l=null==(e=t.invert)?void 0:e.bind(t);const r=o.filter(([t])=>"function"==typeof t);var e=o.filter(([t])=>"function"!=typeof t);const i=new Map(e);if(t.map=t=>{for(var[e,n]of r)if(e(t))return n;return i.has(t)?i.get(t):s(t)},l){const n=new Map(e.map(([t,e])=>[e,t])),a=new Map(r.map(([t,e])=>[e,t]));t.invert=t=>a.has(t)?t:n.has(t)?n.get(t):l(t)}return t},t=>(null!==s&&(t.map=s),null!==l&&(t.invert=l),t)]}(e);return e(i(t))});Object.assign(g,b);const M=function(t,e){var n={};for(const s of t){var{values:r,name:i}=s;const l=e[i];for(const c of r){var{name:a,value:o}=c;n[a]=o.map(t=>l.map(t))}}return n}(v,b),[O,S,_]=function([e,n,t]){if(t)return[e,n,t];var r=[],i=[];for(let t=0;t<e.length;t++){var a=e[t],o=n[t];o.every(([t,e])=>J0(t)&&J0(e))&&(r.push(a),i.push(o))}return[r,i]}(r(a)(m,b,M,p));v=w||O.length;const A=k?k(S,v,d):[];m=O.map((t,e)=>{var n={points:S[e],transform:A[e],index:t,markKey:E};for(const[r,i]of Object.entries(M))n[r]=i[t],_&&(n["series"+Nf(r)]=_[e].map(t=>i[t]));return _&&(n.seriesIndex=_[e]),n}),v=(o.data=m,o.index=O,null==x?void 0:x(m,b,d));y.push(...v||[])}return[{layout:d,theme:s,coordinate:p,components:u,markState:t,key:l,clip:h,scale:g,style:e},y]}function kP(X,$,K,Z){Oe(this,void 0,void 0,function*(){const{components:F,theme:n,layout:t,markState:e,coordinate:r,key:i,style:I,clip:a}=X,{width:B,height:D}=t,z=J(t,["x","y","width","height"]),o=["view","plot","main","content"];var s,l,c,u=o.map((t,e)=>e);const h=o.map(t=>Q0(Object.assign({},n,I),t)),G=["a","margin","padding","inset"].map(t=>Q(z,t)),f=t=>t.style("x",t=>m[t].x).style("y",t=>m[t].y).style("width",t=>m[t].width).style("height",t=>m[t].height).each(function(t){var e,n,r=tt(this),t=h[t];for([e,n]of Object.entries(t))r.style(e,n)});let d=0,p=0,g=B,y=D;const m=u.map(t=>{var{left:t=0,top:e=0,bottom:n=0,right:r=0}=G[t];return d+=t,p+=e,g-=t+r,y-=e+n,{x:d,y:p,width:g,height:y}}),v=($.selectAll(LP(ot)).data(u.filter(t=>J0(h[t])),t=>o[t]).join(t=>t.append("rect").attr("className",ot).style("zIndex",-2).call(f),t=>t.call(f),t=>t.remove()),$.selectAll(LP(it)).data(F,(t,e)=>t.type+"-"+e).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className",it).append(t=>dP(t,r,n,Z)),t=>t.each(function(t){var t=dP(t,r,n,Z)["attributes"],[e]=this.childNodes;e.update(Object.assign({},t))})),function(t){let e=-1/0,n=1/0;for(var[r,i]of t){var{animate:r={}}=r,i=i["data"],{updateType:a,updateDuration:o=300,updateDelay:s=0,enterType:l,enterDuration:c=300,enterDelay:u=0,exitType:h,exitDuration:f=300,exitDelay:d=0}=r;for(const E of i){var{updateType:p=a,updateDuration:g=o,updateDelay:y=s,enterType:m=l,enterDuration:v=c,enterDelay:b=u,exitDuration:x=f,exitDelay:w=d,exitType:k=h}=E;void 0!==p&&!p||(e=Math.max(e,g+y),n=Math.min(n,y)),void 0!==k&&!k||(e=Math.max(e,x+w),n=Math.min(n,w)),void 0!==m&&!m||(e=Math.max(e,v+b),n=Math.min(n,b))}}return e===-1/0?null:[n,e-n]}(e)),b=$.selectAll(LP(rt)).data([t],()=>i).join(t=>t.append("rect").style("fill","transparent").attr("className",rt).call(AP).call(PP,Array.from(e.keys())).call(NP,a),t=>t.call(PP,Array.from(e.keys())).call(t=>{if(!v)return AP(t);{const[l,c]=v;t.transition(function(t){var{x:e,y:n,width:r,height:i}=this.style,{paddingLeft:t,paddingTop:a,innerWidth:o,innerHeight:s}=t;return this.animate([{x:e,y:n,width:r,height:i},{x:t,y:a,width:o,height:s}],{delay:l,duration:c,fill:"both"})})}}).call(NP,a)).transitions();K.push(...b.flat());for([s,l]of e.entries()){var W=l["data"];const{key:i,class:S}=s,_=function(l,t,e,n){const[c]=AA("shape",n),u=l["data"],{defaultShape:h,data:r}=t,f=r.map(t=>t.points),{theme:d,coordinate:p}=e,{type:g,style:y={}}=l;return(t,e)=>{var{shape:n=h}=y,{shape:n=n,points:r,seriesIndex:i,index:a}=t,t=J(t,["shape","points","seriesIndex","index"]),t=Object.assign(Object.assign({},t),{shape:n,mark:g,defaultShape:h,index:e});const o=i?i.map(t=>u[t]):u[a],s=i||a;e=Lb(y,t=>EP(t,o,s,u));return c(Object.assign(Object.assign({},e),{type:TP(l,n)}))(r,t,p,d,f)}}(s,l,X,Z),A=(x=s,c=l,MP("enter",x,c,X,Z)),T=(x=s,c=l,MP("update",x,c,X,Z)),P=(x=s,c=l,MP("exit",x,c,X,Z));var x=function(t,e,n){t=t.node().parentElement;return t.findAll(t=>t.style.facet===e).flatMap(t=>t.getElementsByClassName(n))}($,S,"element");const b=$.select("#"+i).selectAll(LP(nt)).selectFacetAll(x).data(W,t=>t.key,t=>t.groupKey).join(t=>t.append(_).attr("className",nt).transition(function(t){return A(t,[this])}),e=>e.call(t=>{const l=t.parent(),c=function(n){const r=new Map;return t=>{var e;return r.has(t)?r.get(t):(e=n(t),r.set(t,e),e)}}(t=>{var[t,e]=t.getBounds().min;return[t,e]});e.transition(function(t,e){n=this,r=l,i=c,n.__facet__&&(a=n.parentNode.parentNode,s=r.parentNode,[a,o]=i(a),[i,s]=i(s),a=`translate(${a-i}, ${o-s})`,i=n.style.transform,n.style.transform=(("none"===i?"":i)+" "+a).trimStart(),r.append(n));var n,r,i,a,o=_(t,e),s=T(t,[this],[o]);return null===s&&Z0(this,o),s})}),t=>t.each(function(){this.__removed__=!0}).transition(function(t){return P(t,[this])}).remove(),t=>t.append(_).attr("className",nt).transition(function(t){var e=this["__fromElements__"],t=T(t,e,[this]);return new Mb(e,null,this.parentNode).transition(t).remove(),t}),t=>t.transition(function(t){var e=new Mb([],this.__toData__,this.parentNode).append(_).attr("className",nt).nodes();return T(t,[this],e)}).remove()).transitions();K.push(...b.flat())}{var w=X,k=$,E=Z,M,O;const[V]=AA("labelTransform",E),{markState:Y,labelTransform:L}=w,H=k.select(LP(et)).node(),N=new Map,C=new Map,q=Array.from(Y.entries()).flatMap(([t,e])=>{var{labels:n=[],key:r}=t;const i=function(t,e,n,r){const[s]=AA("shape",r),l=t["data"],{data:i,defaultLabelShape:c}=e,u=i.map(t=>t.points),{theme:h,coordinate:f}=n;return t=>{const{index:e,points:n}=t,r=l[e];var{formatter:i=t=>""+t}=t,t=Lb(J(t,["formatter"]),t=>EP(t,r,e,l)),{shape:a=c,text:o}=t,t=J(t,["shape","text"]),i="string"==typeof i?jE(i):i,i=Object.assign(Object.assign({},t),{text:i(o)});return s(Object.assign({type:"label."+a},t))(n,i,f,h,u)}}(t,e,w,E),a=k.select("#"+r).selectAll(LP(nt)).nodes().filter(t=>!t.__removed__);return n.flatMap((e,n)=>{const r=J(e,["transform"]);return a.flatMap(t=>{t=function(n,r,i){const{seriesIndex:t,seriesKey:a,points:o,key:e,index:s}=i.__data__,l=function(t){const e=t.cloneNode(),n=t.getAnimations(),r=(e.style.visibility="hidden",n.forEach(t=>{t=t.effect.getKeyframes();e.attr(t[t.length-1])}),t.parentNode.appendChild(e),e.getLocalBounds()),{min:i,max:a}=(e.destroy(),r);return[i,a]}(i);if(!t)return[Object.assign(Object.assign({},n),{key:e+"-"+r,bounds:l,index:s,points:o,dependentElement:i})];var c=function(t){t=t.selector;if(!t)return null;if("function"==typeof t)return t;if("first"===t)return t=>[t[0]];if("last"===t)return t=>[t[t.length-1]];throw new Error("Unknown selector: "+t)}(n),u=t.map((t,e)=>Object.assign(Object.assign({},n),{key:a[e]+"-"+r,bounds:[o[e]],index:t,points:o,dependentElement:i}));return c?c(u):u}(r,n,t);return t.forEach(t=>{N.set(t,i),C.set(t,e)}),t})})}),j=tt(H).selectAll(LP(at)).data(q,t=>t.key).join(t=>t.append(t=>N.get(t)(t)).attr("className",at),t=>t.each(function(t){Z0(this,N.get(t)(t))}),t=>t.remove()).nodes(),U=jp(j,t=>C.get(t.__data__)),R=w["coordinate"];for([M,O]of U){var{transform:M=[]}=M;(function(t){return t.reduce((n,r)=>(t,...e)=>r(n(t,...e),...e),X0)})(M.map(V))(O,R)}L&&L(j,R)}})}function EP(t,e,n,r){return"function"==typeof t?t(e,n,r):"string"==typeof t&&void 0!==e[t]?e[t]:t}function MP(o,t,e,n,r){var[,i]=AA("shape",r);const[s]=AA("animation",r);r=e.defaultShape;const{theme:a,coordinate:l}=n;e=`default${Nf(o)}Animation`;const{[e]:c}=i(TP(t,r)).props,{[o]:u={}}=a,h=Q(t.animate||{},o);return(t,e,n)=>{var{[o+"Type"]:t,[o+"Delay"]:r,[o+"Duration"]:i,[o+"Easing"]:a}=t,t=Object.assign({type:t||c},h);return t.type?(t=s(t)(e,n,{delay:r,duration:i,easing:a},l,u),Array.isArray(t)?t:[t]):null}}function OP(t){return t.finished.then(()=>{t.cancel()}),t}function SP(t={type:"light"}){var{type:e="light"}=t;return Object.assign(Object.assign({},t),{type:e})}function _P(r,i){return Oe(this,void 0,void 0,function*(){var t={library:i},e=r["data"],n=J(r,["data"]);return null==e?r:([,{data:e}]=yield rP(0,{data:e},t),Object.assign({data:e},n))})}function AP(t){t.style("x",t=>t.paddingLeft).style("y",t=>t.paddingTop).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function TP(t,e){t=t.type;return t+"."+e}function PP(t,e){const n=t=>void 0!==t.class?""+t.class:"";t.selectAll(LP(p)).data(e,t=>t.key).join(t=>t.append("g").attr("className",p).attr("id",t=>t.key).style("facet",n).style("fill","transparent"),t=>t.style("facet",n),t=>t.remove()),t.select(LP(et)).node()||t.append("g").attr("className",et)}function LP(...t){return t.map(t=>"."+t).join("")}function NP(t,i){t.node()&&t.style("clipPath",t=>{var e,n,r;if(i)return{paddingTop:t,paddingLeft:e,innerWidth:n,innerHeight:r}=t,new is({style:{x:e,y:t,width:n,height:r}})})}function CP(t){for(var t=R({},t),e=new Map([[t,null]]),n=new Map([[null,-1]]),r=[t];r.length;){var i,a,o=r.shift(),{children:s=[]}=(void 0===o.key&&(a=e.get(o),i=n.get(o),a=null===a?"0":a.key+"-"+i,o.key=a),o);if(Array.isArray(s))for(let t=0;t<s.length;t++){var l=s[t];e.set(l,o),n.set(l,t),r.push(l)}}return t}function jP(t,e={},n){const{width:r=640,height:i=480,autoFit:a=!1,on:o}=t,s=CP(t),{canvas:l=(u=r,h=i,f=new ff,f.registerPlugin(new xf),new kc({width:u,height:h,container:document.createElement("div"),renderer:f})),library:c=SA()}=e;var u,h,f;e.canvas=l,e.library=c,a&&!e.bindAutoFit&&([u,h={}]=[t,e],u.autoFit&&window.addEventListener("resize",FP(u,h)),e.bindAutoFit=!0),l.resize(r,i),_A(o,MA.BEFORE_RENDER);const d=tt(l.document.documentElement);return l.ready.then(()=>mP(Object.assign(Object.assign({},s),{width:r,height:i}),d,c,e)).then(n).then(()=>_A(o,MA.AFTER_RENDER)),"string"==typeof(f=l.getConfig().container)?document.getElementById(f):f}function RP(t,e={}){var n,r=t["on"],i=e["canvas"];i&&i.destroy(),[i,t={}]=[t,e],i.autoFit&&window.removeEventListener("resize",FP(i,t)),(e=r)&&(n?delete e[n]:e={})}const FP=(i,a={})=>{return r=()=>{var{width:t,height:e,autoFit:n}=i,r=a["canvas"],{width:r,height:n}=ag(r.getConfig().container,n,t,e),t=Object.assign(Object.assign({},i),{width:r,height:n});t.width&&t.height&&jP(t,a)},o=300,function(){var t=this,e=arguments,n=s&&!l;clearTimeout(l),l=setTimeout(function(){l=null,s||r.apply(t,e)},o),n&&r.apply(t,e)};var r,o,s,l};function IP(t,e){for(var n=[t];n.length;){var r=n.pop(),r=(e&&e(r),r.children||[]);for(const i of r)n.push(i)}}class BP{constructor(t={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=t}map(t=t=>t){t=t(this.value);return this.value=t,this}attr(e,n){return 1===arguments.length?this.value[e]:this.map(t=>(t[e]=n,t))}append(t){t=new t({});return t.children=[],t.parentNode=this,t.index=this.children.length,this.children.push(t),t}remove(){var t,e=this.parentNode;return e&&(e=e["children"],t=e.findIndex(t=>t===this),e.splice(t,1)),this}getNodeByKey(e){let n=null;return IP(this,t=>{e===t.attr("key")&&(n=t)}),n}getNodesByType(e){const n=[];return IP(this,t=>{e===t.type&&n.push(t)}),n}changeData(t){let e=this;for(;e&&e.parentNode;)e=e.parentNode;this.attr("data",t),e.render()}call(t,...e){return t(this.map(),...e),this}}function DP(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function zP(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):Array.isArray(t)?this.attr(n,t):(t=[...this.attr(n)||[],t],this.attr(n,t))}}function GP(t,{name:e,key:r=e}){t.prototype[e]=function(t,e){var n;return 0===arguments.length?this.attr(r):1===arguments.length?this.attr(r,t):((n=this.attr(r)||{})[t]=e,this.attr(r,n))}}function WP(t,{name:e,key:i=e}){t.prototype[e]=function(t,e){var n,r=this.attr(i)||{};return 0===arguments.length?r:1===arguments.length?r[t]:((n=r[t])?Of(e)?n.concat(e):n.push(e):r[t]=Of(e)?e:[e],this.attr(i,r))}}function VP(r){return t=>{for(const n of r){var e=n["type"];"value"===e?DP(t,n):"array"===e?zP(t,n):"object"===e?GP(t,n):"node"===e?function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.append(n)}}(t,n):"container"===e?function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}(t,n):"event"===e&&WP(t,n)}return t}}function YP(t){return Object.entries(t).map(([t,e])=>({type:"node",name:t,ctor:e}))}l=[{name:"encode",type:"object"},{name:"scale",type:"object"},{name:"data",type:"value"},{name:"transform",type:"array"},{name:"style",type:"object"},{name:"animate",type:"object"},{name:"label",type:"array",key:"labels"},{name:"axis",type:"object"},{name:"legend",type:"object"},{name:"slider",type:"object"}];let HP=class extends BP{constructor(){super({},"interval")}},qP=(HP=t([VP(l)],HP),class extends BP{constructor(){super({},"rect")}}),UP=(qP=t([VP(l)],qP),class extends BP{constructor(){super({},"point")}}),XP=(UP=t([VP(l)],UP),class extends BP{constructor(){super({},"area")}}),$P=(XP=t([VP(l)],XP),class extends BP{constructor(){super({},"line")}}),KP=($P=t([VP(l)],$P),class extends BP{constructor(){super({},"cell")}}),ZP=(KP=t([VP(l)],KP),class extends BP{constructor(){super({},"vector")}}),JP=(ZP=t([VP(l)],ZP),class extends BP{constructor(){super({},"link")}}),QP=(JP=t([VP(l)],JP),class extends BP{constructor(){super({},"polygon")}});QP=t([VP(l)],QP);zo=t([VP(l)],class extends BP{constructor(){super({},"image")}});let t8=class extends BP{constructor(){super({},"text")}},e8=(t8=t([VP(l)],t8),class extends BP{constructor(){super({},"box")}}),n8=(e8=t([VP(l)],e8),class extends BP{constructor(){super({},"lineX")}}),r8=(n8=t([VP(l)],n8),class extends BP{constructor(){super({},"lineY")}}),i8=(r8=t([VP(l)],r8),class extends BP{constructor(){super({},"range")}}),a8=(i8=t([VP(l)],i8),class extends BP{constructor(){super({},"rangeX")}}),o8=(a8=t([VP(l)],a8),class extends BP{constructor(){super({},"rangeY")}}),s8=(o8=t([VP(l)],o8),class extends BP{constructor(){super({},"connector")}}),l8=(s8=t([VP(l)],s8),class extends BP{constructor(){super({},"shape")}}),c8=(l8=t([VP(l)],l8),class extends BP{constructor(){super({},"sankey")}}),u8=(c8=t([VP([...l,{name:"layout",type:"value"}])],c8),class extends BP{constructor(){super({},"treemap")}}),h8=(u8=t([VP([...l,{name:"layout",type:"value"}])],u8),class extends BP{constructor(){super({},"boxplot")}}),f8=(h8=t([VP(l)],h8),class extends BP{constructor(){super({},"pack")}}),d8=(f8=t([VP([...l,{name:"layout",type:"value"}])],f8),class extends BP{constructor(){super({},"forceGraph")}}),p8=(d8=t([VP([...l,{name:"layout",type:"value"}])],d8),class extends BP{constructor(){super({},"tree")}}),g8=(p8=t([VP([...l,{name:"layout",type:"value"}])],p8),class extends BP{constructor(){super({},"wordCloud")}});g8=t([VP([...l,{name:"layout",type:"object"}])],g8);oc={interval:HP,rect:qP,point:UP,area:XP,line:$P,cell:KP,vector:ZP,link:JP,polygon:QP,image:zo,text:t8,box:e8,lineX:n8,lineY:r8,range:i8,rangeX:a8,rangeY:o8,connector:s8,sankey:c8,treemap:u8,boxplot:h8,shape:l8,pack:f8,forceGraph:d8,tree:p8,wordCloud:g8};let y8=class extends BP{constructor(){super({},"view")}},m8=(y8=t([VP([{type:"value",name:"data"},{type:"array",name:"coordinate",key:"coordinates"},{type:"array",name:"interaction",key:"interactions"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"axis"},{type:"object",name:"legend"},...YP(oc)])],y8),class extends BP{constructor(){super({},"spaceLayer")}}),v8=(m8=t([VP([{type:"value",name:"data"},...YP(oc)])],m8),class extends BP{constructor(){super({},"spaceFlex")}}),b8=(v8=t([VP([{type:"value",name:"data"},...YP(oc)])],v8),class extends BP{constructor(){super({},"facetRect")}}),x8=(b8=t([VP([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...YP(oc)])],b8),class extends BP{constructor(){super({},"facetCircle")}}),w8=(x8=t([VP([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...YP(oc)])],x8),class extends BP{constructor(){super({},"repeatMatrix")}}),k8=(w8=t([VP([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"encode"},{type:"object",name:"legend"},...YP(oc)])],w8),class extends BP{constructor(){super({},"timingKeyframe")}}),E8=(k8=t([VP([...YP(oc)])],k8),class extends BP{constructor(){super({},"geoView")}}),M8=(E8=t([VP([{type:"value",name:"data"},{type:"value",name:"projection"},{type:"array",name:"coordinate",key:"coordinates"},{type:"array",name:"interaction",key:"interactions"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"legend"},...YP(oc)])],E8),class extends BP{constructor(){super({},"geoPath")}});M8=t([VP([{type:"value",name:"data"},{type:"value",name:"projection"},{type:"array",name:"coordinate",key:"coordinates"},{type:"array",name:"interaction",key:"interactions"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},...YP(oc)])],M8);var O8={view:y8,spaceLayer:m8,spaceFlex:v8,facetRect:b8,facetCircle:x8,repeatMatrix:w8,timingKeyframe:k8,geoView:E8,geoPath:M8};for(const A8 of Object.values(O8))VP(YP(O8))(A8);const S8=SA();function _8(t){return Object.assign(Object.assign({},t.value),{type:t.type})}rc=[{name:"data",type:"value"},{name:"width",type:"value"},{name:"height",type:"value"},{name:"coordinate",type:"array",key:"coordinates"},{name:"interaction",type:"array",key:"interactions"},{name:"theme",type:"object"},{name:"title",type:"object"},{name:"key",type:"value"},{name:"transform",type:"array"},{name:"theme",type:"object"},{name:"on",type:"event"},{name:"scale",type:"object"},{name:"axis",type:"object"},{name:"legend",type:"object"},{name:"style",type:"object"},...YP(oc),...Object.entries(O8).map(([t,e])=>({type:"container",name:t,ctor:e}))];f.Chart=class extends BP{constructor(t={}){var e=t["container"];super(J(t,["container"]),"view"),this._container=void 0===(t=e)?document.createElement("div"):"string"==typeof t?document.getElementById(t):t,this._context={library:S8}}render(){var t,e,n,r,i,a,o;return this._context.canvas||({width:i=640,height:o=480,renderer:t,plugins:e,autoFit:n}=this.options(),{width:n,height:r}=ag(this._container,n,i,o),this.width(n),this.height(r),this._context.canvas=([n,r,i,a=new ff,o=[]]=[this._container,i,o,t,e],o.push(new xf),o.forEach(t=>a.registerPlugin(t)),new kc({container:n,width:r,height:i,renderer:a}))),jP(this.options(),this._context),this}options(){var t,e=this,e=null!==(e=e).type?e:((t=e.children[e.children.length-1]).attr("width",e.attr("width")),t.attr("height",e.attr("height")),t.attr("paddingLeft",e.attr("paddingLeft")),t.attr("paddingTop",e.attr("paddingTop")),t.attr("paddingBottom",e.attr("paddingBottom")),t.attr("paddingRight",e.attr("paddingRight")),t.attr("insetLeft",e.attr("insetLeft")),t.attr("insetRight",e.attr("insetRight")),t.attr("insetBottom",e.attr("insetBottom")),t.attr("insetTop",e.attr("insetTop")),t.attr("marginLeft",e.attr("marginLeft")),t.attr("marginBottom",e.attr("marginBottom")),t.attr("marginTop",e.attr("marginTop")),t.attr("marginRight",e.attr("marginRight")),t.attr("autoFit",e.attr("autoFit")),t.attr("padding",e.attr("padding")),t.attr("margin",e.attr("margin")),t.attr("inset",e.attr("inset")),t),n=[e],r=new Map;for(r.set(e,_8(e));n.length;){const e=n.pop();var i=r.get(e);for(const s of e.children){var a=_8(s),{children:o=[]}=i;o.push(a),n.push(s),r.set(s,a),i.children=o}}return r.get(e)}node(){return this._container}context(){return this._context}destroy(){var t,e=this.options(),n=e["on"];_A(n,MA.BEFORE_DESTROY),RP(e,this._context),e=this._container,(t=e.parentNode)&&t.removeChild(e),_A(n,MA.AFTER_DESTROY)}clear(){var t=this.options(),e=t["on"];_A(e,MA.BEFORE_CLEAR),RP(t,this._context),_A(e,MA.AFTER_CLEAR)}forceFit(){var{width:t,height:e}=this.options(),{width:t,height:e}=ag(this._container,!0,t,e);this.changeSize(t,e)}changeSize(t,e){var{width:n,height:r,on:i}=this.options();if(n===t&&r===e)return this;_A(i,MA.BEFORE_CHANGE_SIZE),this.width(t),this.height(e),this.render(),_A(i,MA.AFTER_CHANGE_SIZE)}},f.Chart=t([VP(rc)],f.Chart),f.AREA_CLASS_NAME=ot,f.COMPONENT_CLASS_NAME=it,f.ELEMENT_CLASS_NAME=nt,f.LABEL_CLASS_NAME=at,f.LABEL_LAYER_CLASS_NAME=et,f.MAIN_LAYER_CLASS_NAME=p,f.PLOT_CLASS_NAME=rt,f.VIEW_CLASS_NAME=C,f.createLibrary=SA,f.destroy=RP,f.register=function(t,e){Object.assign(S8,{[t]:e})},f.render=jP,f.renderToMountedElement=function(t,e={},n){const{width:r=640,height:i=480,on:a}=t;var t=CP(t),{library:o=SA(),group:s=new Yo}=e;if(function(t){if(!Mf(t)){if(wf(t))return!t.length;var e,n=jf(t);if("Map"===n||"Set"===n)return!t.size;if(Ff(t))return!Object.keys(t).length;for(e in t)if(Df.call(t,e))return}return 1}(null==s?void 0:s.parentElement))throw new Error("Unmounted group");var l=tt(s);return e.group=s,e.library=o,_A(a,MA.BEFORE_RENDER),mP(Object.assign(Object.assign({},t),{width:r,height:i}),l,o,e).then(n).then(()=>_A(a,MA.AFTER_RENDER)),s},Object.defineProperty(f,"__esModule",{value:!0})});
|