/*
* @nebula.js/sn-scatter-plot v3.60.1
* Copyright (c) 2026 QlikTech International AB
* Released under the MIT license.
*/

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@nebula.js/stardust")):"function"==typeof define&&define.amd?define(["@nebula.js/stardust"],t):(e="undefined"!=typeof globalThis?globalThis:e||self)["sn-scatter-plot"]=t(e.stardust)}(this,function(e){"use strict";function t(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}const n={shapes:[{type:"path",attrs:{d:"M15.9488039,5.20769129 C16.0487326,6.70662306 15.3492311,8.30548361 14.050157,9.30477145 C12.651154,10.5039169 10.8524359,10.8037032 8.85386017,10.4039881 L7.3549284,10.0042729 L5.75606786,9.70448659 C5.75606786,9.90434416 5.65613907,10.0042729 5.4562815,10.2041305 C5.05656637,10.6038456 4.55692244,10.8037032 4.05727852,10.8037032 C3.75749217,10.8037032 3.45770582,10.7037744 3.15791946,10.6038456 C3.05799068,10.903632 3.15791946,11.2034184 3.45770582,11.7030623 C5.05656637,14.0014243 3.85742095,15.9000712 3.75749217,16 L2.2585604,15.3004985 C2.2585604,15.2005697 2.95806189,14.0014243 1.95877405,12.6024213 C1.6589877,12.0028486 1.15934378,11.0035608 1.55905891,10.0042729 C1.6589877,9.80441537 1.75891648,9.6045578 1.95877405,9.40470024 C1.6589877,8.90505631 1.55905891,8.30548361 1.85884527,7.7059109 C1.55905891,7.40612455 1.25927256,7.1063382 1.15934378,6.70662306 C0.859557424,5.90719279 0.959486209,4.5081898 1.6589877,3.30904439 C1.95877405,2.6095429 2.55834676,2.0099702 3.15791946,1.51032628 C3.95734974,0.91075357 4.95663758,0.610967217 6.15578299,0.311180864 C9.05371774,-0.388320626 11.9516525,0.111323295 13.9502282,1.61025506 C15.1493736,2.50961412 15.8488751,3.80868831 15.9488039,5.20769129 Z M13.0508691,8.10562604 C13.8502994,7.40612455 14.3499433,6.40683671 14.3499433,5.30762008 C14.2500145,4.20840345 13.550513,3.40897318 12.9509403,2.90932926 C12.1515101,2.40968533 11.252151,2.0099702 10.1529344,1.81011263 C8.95378895,1.61025506 7.75464354,1.71018384 6.45556935,1.91004141 C4.75678001,2.30975655 3.65756338,3.00925804 3.05799068,4.10847467 C2.55834676,5.00783373 2.65827554,5.90719279 2.75820433,6.20697914 C2.75820433,6.30690792 2.85813311,6.40683671 3.05799068,6.40683671 C3.15791946,6.40683671 3.25784825,6.40683671 3.35777703,6.40683671 C3.45770582,6.40683671 3.45770582,6.40683671 3.45770582,6.40683671 L3.5576346,6.40683671 L3.65756338,6.40683671 C4.65685123,6.40683671 5.4562815,6.90648063 5.85599664,7.80583969 L5.85599664,8.00569726 C6.35564056,8.10562604 7.05514205,8.30548361 7.75464354,8.50534118 L9.25357531,8.90505631 C10.0530056,9.0049851 10.7525071,9.0049851 11.4520086,8.80512753 C12.0515813,8.70519875 12.5512252,8.40541239 13.0508691,8.10562604 Z"}}]};function r(){const[t]=e.useState({}),r=e.useConstraints(),i=function(t){const n=e.useConstraints(),[r,i]=e.useState(!1),[o,a]=e.useState({});return e.useEffect(()=>()=>{a({})},[]),e.useEffect(()=>{n&&i(!n.select&&!n.active)},[n]),{enabled:()=>r&&!t.getProgressive(),emit:(e,...t)=>o[e]?.forEach(e=>e(...t)),removeListener:(e,t)=>{const n=o[e]?.indexOf(t);n>-1&&o[e].splice(n,1)},removeAllListeners:e=>{o[e]=void 0},on:(e,t)=>{Array.isArray(o[e])?o[e].push(t):o[e]=[t]},getBrushOptions:e=>({orMode:"tap"===e})}}(t),o=function(){const t=e.useConstraints(),[r,i]=e.useState(!1),[o,a]=e.useState(!1),s=e.useLayout(),l=e.useTranslator(),c=!!s.qSelectionInfo.qInSelections,u=!!s.qHyperCube?.qDimensionInfo?.[0]?.qIsOneAndOnlyOne;e.useEffect(()=>{t&&i(!t.select&&!t.active)},[t]);const d=e=>{a("boolean"==typeof e?e:!o)};return e.useAction(()=>({key:"lasso",label:l.get(o?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),icon:n,hidden:!r||!c||u,active:o,action:d}),[c,u,o,r]),{action:d,enabled:()=>r,active:()=>o}}();return t.zoom={enabled:()=>r&&!r.active},t.scroll={enabled:()=>r&&!r.active},t.interact={enabled:()=>r&&!r.active},t.tooltip={enabled:()=>r&&!r.passive},t.getProgressive=()=>t.progressive,t.setProgressive=e=>{t.progressive=e},t.lasso=o,t.select=i,t}function i(e){return null!==e&&"object"==typeof e&&"r"in e&&"number"==typeof e.r&&"g"in e&&"number"==typeof e.g&&"b"in e&&"number"==typeof e.b&&("number"==typeof e.a||void 0===e.a)}function o(e){if("object"==typeof e&&i(e))return(e.r<<16)+(e.g<<8)+e.b;let t=0,n=0,r=0;if("string"==typeof e){let i;(i=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e))?(t=parseInt(i[1],10),n=parseInt(i[2],10),r=parseInt(i[3],10)):(i=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(e))?(t=parseInt(i[1],16),n=parseInt(i[2],16),r=parseInt(i[3],16)):(i=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(e))&&(t=parseInt(i[1]+i[1],16),n=parseInt(i[2]+i[2],16),r=parseInt(i[3]+i[3],16))}return(t<<16)+(n<<8)+r}const a={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:0,g:0,b:0,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},s="qcm-color";function l(...e){const t={type:s,r:0,g:0,b:0,a:1,invalid:!1,spaces:{}};let n=0,r=0,o=0,l=1;if(null!==(c=e[0])&&"object"==typeof c&&"type"in c&&c.type===s)({r:n,g:r,b:o,a:l}=e[0]),t.invalid=e[0].invalid,t.spaces={...e[0].spaces};else if(i(e[0]))({r:n,g:r,b:o}=e[0]),"a"in e[0]&&({a:l}=e[0]);else if(e.length<3)if("string"==typeof e[0]){const i=e[0];let s;if(s=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(i))n=parseInt(s[1],10),r=parseInt(s[2],10),o=parseInt(s[3],10);else if(s=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(i))n=parseInt(s[1],10),r=parseInt(s[2],10),o=parseInt(s[3],10),l=parseFloat(s[4]);else if(s=/^ARGB\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(i))l=parseInt(s[1],10)/255,n=parseInt(s[2],10),r=parseInt(s[3],10),o=parseInt(s[4],10);else if(s=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(i))n=parseInt(s[1],16),r=parseInt(s[2],16),o=parseInt(s[3],16),l=1;else if(s=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(i))n=parseInt(s[1]+s[1],16),r=parseInt(s[2]+s[2],16),o=parseInt(s[3]+s[3],16),l=1;else if(s=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(i)){let e=parseFloat(s[1]),t=parseFloat(s[3]),i=parseFloat(s[5]);e%=360,t/=100,i/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,i=i<0?0:i>1?1:i;const a=i<=.5?2*i*t:(2-2*i)*t;let c=e/60;const u=a*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[a,u,0];break;case 1:d=[u,a,0];break;case 2:d=[0,a,u];break;case 3:d=[0,u,a];break;case 4:d=[u,0,a];break;case 5:d=[a,0,u];break;default:d=[0,0,0]}const f=i-.5*a;n=d[0]+f,r=d[1]+f,o=d[2]+f,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o),l=1}else if(s=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(i)){let e=parseFloat(s[1]),t=parseFloat(s[3]),i=parseFloat(s[5]);l=parseFloat(s[7]),e%=360,t/=100,i/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,i=i<0?0:i>1?1:i;const a=i<=.5?2*i*t:(2-2*i)*t;let c=e/60;const u=a*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[a,u,0];break;case 1:d=[u,a,0];break;case 2:d=[0,a,u];break;case 3:d=[0,u,a];break;case 4:d=[u,0,a];break;case 5:d=[a,0,u];break;default:d=[0,0,0]}const f=i-.5*a;n=d[0]+f,r=d[1]+f,o=d[2]+f,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o)}else if(s=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(i)){let e=parseFloat(s[1]),t=parseFloat(s[3]),i=parseFloat(s[5]);e%=360,t/=100,i/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,i=i<0?0:i>1?1:i;const a=i*t;let c=e/60;const u=a*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[a,u,0];break;case 1:d=[u,a,0];break;case 2:d=[0,a,u];break;case 3:d=[0,u,a];break;case 4:d=[u,0,a];break;case 5:d=[a,0,u];break;default:d=[0,0,0]}const f=i-a;n=d[0]+f,r=d[1]+f,o=d[2]+f,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o),l=1}else{const e=i.toLowerCase();if(function(e){return e in a}(e)){const t=a[e];({r:n,g:r,b:o}=t),l="a"in t?t.a:1}else t.invalid=!0}}else"number"==typeof e[0]&&e[0]>=0&&"argb"===e[1]?(l=(4278190080&e[0])>>>24,l/=255,n=(16711680&e[0])>>16,r=(65280&e[0])>>8,o=255&e[0]):"number"==typeof e[0]&&e[0]>=0?(n=(16711680&e[0])>>16,r=(65280&e[0])>>8,o=255&e[0]):t.invalid=!0;else 3===e.length||4===e.length?(n=e[0],r=e[1],o=e[2],l=4===e.length?e[3]:1):t.invalid=!0;var c;return Number.isNaN(+n+r+o+l)&&(t.invalid=!0),t.r=Math.floor(n),t.g=Math.floor(r),t.b=Math.floor(o),t.a=l,t}function c(e){let t,n,r=0;const i="string"==typeof e?l(e):e,o=i.r/255,a=i.g/255,s=i.b/255,{a:c}=i,u=Math.max(o,a,s),d=Math.min(o,a,s),f=(u+d)/2;if(u===d)t=0,r=0;else{switch(n=u-d,t=f>.5?n/(2-u-d):n/(u+d),u){case o:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-o)/n+2;break;case s:r=(o-a)/n+4}r/=6}return{h:360*r,s:100*t,l:100*f,a:c}}function u(e){let t,n,r=0;const i="string"==typeof e?l(e):e,o=i.r/255,a=i.g/255,s=i.b/255,c=Math.max(o,a,s),u=Math.min(o,a,s),d=c;if(c===u)t=0,r=0;else{switch(n=c-u,t=0===n?0:n/d,c){case o:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-o)/n+2;break;case s:r=(o-a)/n+4}r/=6}return{h:360*r%360,s:100*t,v:100*d}}function d(e){if(i(e))return`rgb(${e.r}, ${e.g}, ${e.b})`;const t="string"==typeof e?o(e):e;return`rgb(${(16711680&t)>>16}, ${(65280&t)>>8}, ${255&t})`}function f(e,t){return i(e)?`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`:f(l(e))}function p(e){return i(e)?1===e.a?d(e):f(e):p(l(e))}const h=e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};function m(...e){const t=l(...e);return t.invalid||function(e){return.2126*h(e.r)+.7152*h(e.g)+.0722*h(e.b)}(t)<.4}function g(...e){const t=l(...e),n={type:t.type,r:t.r,g:t.g,b:t.b,a:t.a,invalid:t.invalid,spaces:t.spaces},r=()=>(n.spaces.hslaObject||(n.spaces.hslaObject=c(n)),n.spaces.hslaObject),a=e=>{const t=r(),{h:n,s:i,l:o,a:a}=t;return`hsla(${n}, ${i}, ${Math.max(0,Math.min(o+e,100))}, ${a})`};return{get type(){return n.type},isInvalid:()=>n.invalid,get r(){return n.r},get g(){return n.g},get b(){return n.b},get a(){return n.a},getR:()=>n.r,getG:()=>n.g,getB:()=>n.b,getAlpha:()=>n.a,setAlpha:e=>{n.a=e,n.spaces={}},isEqualTo:e=>{let t;if("string"==typeof e)t=l(e);else{if(e.type!==n.type)return!1;t=e}return t.r===n.r&&t.g===n.g&&t.b===n.b&&t.a===n.a},isDark:()=>m(n),getRGB:()=>(n.spaces.rgb||(n.spaces.rgb=d(n)),n.spaces.rgb),getRGBA:()=>(n.spaces.rgba||(n.spaces.rgba=f(n)),n.spaces.rgba),getString:()=>(n.spaces.string||(n.spaces.string=p(n)),n.spaces.string),getHex:()=>(n.spaces.hex||(n.spaces.hex=function(e){let t,n,r;if(i(e))return t=e.r.toString(16),n=e.g.toString(16),r=e.b.toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${[t,n,r].join("")}`;const a="string"==typeof e?o(e):e;return t=((16711680&a)>>16).toString(16),n=((65280&a)>>8).toString(16),r=(255&a).toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${t}${n}${r}`}(n)),n.spaces.hex),getHSL:()=>(n.spaces.hsl||(n.spaces.hsl=function(e){let t,n,r=0;const i="string"==typeof e?l(e):e,o=i.r/255,a=i.g/255,s=i.b/255,c=Math.max(o,a,s),u=Math.min(o,a,s),d=(c+u)/2;if(c===u)t=0,r=0;else{switch(n=c-u,t=d>.5?n/(2-c-u):n/(c+u),c){case o:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-o)/n+2;break;case s:r=(o-a)/n+4}r/=6}return`hsl(${360*r}, ${100*t}, ${100*d})`}(n)),n.spaces.hsl),getHSLA:()=>(n.spaces.hsla||(n.spaces.hsla=function(e){const{h:t,s:n,l:r,a:i}=c(e);return`hsla(${t}, ${n}, ${r}, ${i})`}(n)),n.spaces.hsla),getHSLAObject:r,getShiftedHSLA:a,getHSV:()=>(n.spaces.hsv||(n.spaces.hsv=function(e){const{h:t,s:n,v:r}=u(e);return`hsv(${t}, ${n}, ${r})`}(n)),n.spaces.hsv),getHSVObject:()=>(n.spaces.hsvObject||(n.spaces.hsvObject=u(n)),n.spaces.hsvObject),blend:(e,t)=>`rgba(${Math.floor(n.r+(e.r-n.r)*t)}, ${Math.floor(n.g+(e.g-n.g)*t)}, ${Math.floor(n.b+(e.b-n.b)*t)}, ${Math.floor(n.a+(e.getAlpha()-n.a)*t)})`,getBrightenedColor:(e=1)=>g(a(18*e)),getDarkenedColor:(e=1)=>g(a(18*-e))}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function b(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(e){v(o,r,i,a,s,"next",e)}function s(e){v(o,r,i,a,s,"throw",e)}a(void 0)})}}function x(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach(function(t){x(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function M(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function k(){
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,c=Object.create(l.prototype);return E(c,"_invoke",function(n,r,i){var o,s,l,c=0,u=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,s=0,l=e,f.n=n,a}};function p(n,r){for(s=n,l=r,t=0;!d&&c&&!i&&t<u.length;t++){var i,o=u[t],p=f.p,h=o[2];n>3?(i=h===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,f.n=h,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,u,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,h),s=u,l=h;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(c=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){o=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(n,i,o),!0),c}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(E(t={},r,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,E(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,E(d,"constructor",c),E(c,"constructor",l),l.displayName="GeneratorFunction",E(c,i,"GeneratorFunction"),E(d),E(d,i,"Generator"),E(d,r,function(){return this}),E(d,"toString",function(){return"[object Generator]"}),(k=function(){return{w:o,m:f}})()}function E(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}E=function(e,t,n,r){function o(t,n){E(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},E(e,t,n,r)}function C(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||q(e,t)||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 A(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||q(e)||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 D(e){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D(e)}function q(e,t){if(e){if("string"==typeof e)return y(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}var _="point-label-cross-placement",T="unclassified",N="equal-equal",O="equal-higher",I="equal-lower",L="equal-void",P="higher-equal",R="higher-higher-acute",z="higher-higher-obtuse",F="higher-lower-negative",j="higher-lower-positive",V="higher-void",H="lower-equal",B="lower-higher-negative",$="lower-higher-positive",W="lower-lower-acute",U="lower-lower-obtuse",Y="lower-void",X="void-equal",G="void-higher",K="void-lower",Z="void-void";function J(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*(180/Math.PI)}function Q(e,t,n){var r=Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)),i=Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2)),o=Math.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));return Math.acos((i*i+r*r-o*o)/(2*i*r))*(180/Math.PI)}function ee(e){var t=e.previous,n=e.current,r=e.next,i=t&&t.value,o=n&&n.value,a=r&&r.value;return t||r?t?r?i===o?o===a?N:o<a?O:I:o===a?i>o?P:H:i>o?o<a?Q(t,n,r)>90?z:R:J(t,n)>J(t,r)?j:F:o>a?Q(t,n,r)>90?U:W:J(t,n)>J(t,r)?$:B:i===o?L:i>o?V:Y:o===a?X:o<a?G:K:Z}var te,ne={TOP:"top",TOP_RIGHT:"top-right",RIGHT:"right",BOTTOM_RIGHT:"bottom-right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left",LEFT:"left",TOP_LEFT:"top-left"};function re(e){var t=e.bounds,n=e.size,r=t.x,i=t.y,o=t.width,a=t.height;return"center"===n.insideStrategy?Math.floor(r+o/2)>=0&&Math.ceil(r+o/2)<=n.width&&Math.floor(i+a/2)>=0&&Math.ceil(i+a/2)<=n.height:Math.floor(r+o)>0&&Math.ceil(r)<n.width&&Math.floor(i+a/2)>=0&&Math.ceil(i+a/2)<=n.height}function ie(){te=te||document.createElement("canvas").getContext("2d")}var oe,ae={measureTextWidth:function(e){return ie(),te.measureText(e).width},lineWrap:function(e,t,n,r){var i,o;ie();var a,s,l=e?e.split(/\n+|\r+|\r\n/):[],c=[],u=e?e.split(/\s+/):[],d=l[0];if("number"!=typeof t||t<=0)return[e];if("number"==typeof r&&l.length>=r)return l.slice(0,r);for(n&&(te.font=n),o=0;o<l.length;o++){for(d=C(u=(l[o]||"").split(/\s+/),1)[0],s="",i=1;i<u.length;i++)if(a="".concat(d," ").concat(u[i]),ae.measureTextWidth(a)>t&&("number"!=typeof r||r>c.length)?(c.push(d),d=u[i]):d=a,"number"==typeof r&&c.length>=r){s=u.slice(i+1).join(" ");break}"number"!=typeof r||c.length<r?c.push(d):c[Math.max(0,c.length-1)]="".concat(c[Math.max(0,c.length-1)]||""," ").concat(d," ").concat(s)}return c},wordWrap:function(e,t,n,r,i){if(ie(),!e||!e.length)return[];n&&(te.font=n);var o,a,s,l,c=[],u=e.slice();if(u.filter(function(e){return!!e}),"number"!=typeof t||t<0)return e.slice();for(l=0;l<u.length;l++)a=null,(s=u[l])&&(s.length<=1||ae.measureTextWidth(s)<=t?c.push(s):(o=ae.splitWord(s,t,void 0,r-c.length)).length<=1?c.push(o[0]):(a=o.pop(),c=c.concat(o),u[l+1]?ae.measureTextWidth("".concat(a," ").concat(u[l+1]))>t&&c.length+u.length-l<=r?u.splice(l+1,0,a):u[l+1]="".concat(a," ").concat(u[l+1]):u.push(a)));return c.forEach(function(e,t,n){n[t]=e?e.trim():e}),c.length>r?(c=c.splice(0,r))[c.length-1]=ae.truncate(c[c.length-1],t,n,i).text:(s=c[c.length-1])&&s.length>1&&ae.measureTextWidth(s)>t&&(c[c.length-1]=ae.truncate(s,t,n,i).text),c},truncate:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…";ie();var i,o,a,s=e,l=ae.measureTextWidth("i"),c=Math.ceil(t/l);if(n&&(te.font=n),e&&t){if(ae.measureTextWidth(s)>t){for(i=Math.min(c,s.length);i>0;i--)if(o=s.substring(0,i-1).trim()+r,ae.measureTextWidth(o)<=t){a=s.substring(i-1),s=o;break}i||(a=s,s="…")}}else a=void 0;return{text:s,rest:a}},isNumber:function(e){return"number"==typeof e&&Number.isFinite(e)},explodeWord:function(e,t,n,r){var i;ie();var o=e,a="",s=[];if(ae.isNumber(n)&&n<=1)return[e];var l=Math.ceil(t/r);for(i=Math.min(e.length,l);i>0&&(o=e.substring(0,i)," "===e.substring(i-1,i)?o=e.substring(0,i-1):o+="-",a=e.substring(i),!(ae.measureTextWidth(o)<=t));i--);return(!i&&!o||ae.measureTextWidth(o)>t)&&(o=e.substring(0,1),a=e.substring(1)),s.push(o),a?(ae.measureTextWidth(a)>t?(a=ae.explodeWord(a,t,n-1,r),s=s.concat(a)):s.push(a),s.filter(function(e){return""!==e.trim()})):s},splitWord:function(e,t,n,r){return ie(),e&&t?(n&&(te.font=n),ae.explodeWord(e,t,r,Math.max(1,ae.measureTextWidth("i")))):[]},wrapText:function(e,t,n,r,i){var o;return Number.isNaN(t)?[e]:(o=r>1?ae.lineWrap(e,t,n,r):[e],o=ae.wordWrap(o,t,n,r,i))},getFontHeight:function(e){return ie(),e&&(te.font=e),1.5*ae.measureTextWidth("m")},tokenize:function(e,t,n,r,i,o){var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1;ie(),t&&(te.font=t);var s=ae.getFontHeight(),l=a*s,c=[],u=0,d=[];if(o<s)return[];var f=o?Math.max(1,Math.floor(o/l)):r||1;return Array.isArray(r)?(r.forEach(function(e){u+=Number.isNaN(e)||e<=0?0:e}),r.forEach(function(e){c.push(Number.isNaN(e)||e<=0?f-u:e)})):c=[Number.isNaN(r)||r<=0?f:Math.min(f,r)],Array.isArray(e)?e.forEach(function(e,n){d.length<f&&(d=d.concat(ae.wrapText(e,i,t,c[n])))}):d=ae.wrapText(e,i,t,c[0],n),d}};function se(e){var t,n,r=e.config,i=e.crossPlacements,o=e.node,a=e.line,s=e.groupIndex,l=e.extract,c=e.style,u=e.measureText,d=e.size,f=e.horizontal,p=e.rtl,h=e.meta,m=e.showLabel,g=l.label(o.data);if("string"!=typeof g&&"number"!=typeof g||""===g)return!1;var y=function(){var e,t,n=u({fontFamily:c.fontFamily,fontSize:c.fontSize,text:g});if(null===(e=o.data)||void 0===e||null===(e=e.value)||void 0===e||!e.maxLabelWidth||n.width<=(null===(t=o.data)||void 0===t||null===(t=t.value)||void 0===t?void 0:t.maxLabelWidth))return n;var r="".concat(c.fontSize," ").concat(c.fontFamily),i=ae.tokenize(g,r,"…",3,o.data.value.maxLabelWidth);return n.lines=i.map(function(e){return{text:e,size:u({fontFamily:c.fontFamily,fontSize:c.fontSize,text:e})}}),n.width=Math.max.apply(Math,A(n.lines.map(function(e){return e.size.width}))),n.height*=i.length,n}(),v=o.localBounds,b=o.attrs["stroke-width"],x=l.pointValue(o.data),w=!(null===(t=o.data)||void 0===t||null===(t=t.value)||void 0===t||!t.hasBackground),S=w?{X:3,Y:2}:{X:1,Y:0},M=w?{X:2,Y:2}:{X:0,Y:0},k={x:v.x+v.width/2,y:v.y+v.height/2,width:y.width+2*S.X+2*M.X,height:y.height+2*S.Y+2*M.Y},E="".concat(k.x,"-").concat(k.y),C=!f&&!p,D=f?d.height:d.width,q=(f?k.y:k.x)/D,_=(C?1-q:q)<=(D<=200?.25:.1),N=null===(n=o.data)||void 0===n||null===(n=n.value)||void 0===n||null===(n=n.label)||void 0===n?void 0:n.placement,O=Object.keys(ne).map(function(e){return ne[e]}),I={key:E,config:r,node:o,line:a,group:s,value:x,labelMeasurements:y,bounds:k,inside:re({bounds:v,size:d}),border:b?b/2:0,classification:T,setClassification:function(e){I.classification=e},preferences:[],setPreferences:function(e){var t;(t=I.preferences).push.apply(t,A(e))},fixedPlacement:O.includes(N)?N:void 0,placement:void 0,setPlacement:function(e){I.placement=e,i.setPlacement(e)},duplicate:!1,setDuplicate:function(){I.duplicate=!0},extreme:h.getExtreme(E),elite:_,show:r.labels&&m(o)};return I}var le=(x(x(x(x(x(x(x(x(x(x(oe={},N,[ne.TOP,ne.BOTTOM]),O,[ne.BOTTOM,ne.BOTTOM_RIGHT]),I,[ne.TOP,ne.TOP_RIGHT]),L,[ne.TOP,ne.BOTTOM]),P,[ne.LEFT,ne.BOTTOM_LEFT,ne.TOP,ne.TOP_RIGHT]),R,[ne.BOTTOM,ne.BOTTOM_LEFT,ne.LEFT,ne.TOP_RIGHT]),z,[ne.BOTTOM,ne.TOP]),F,[ne.TOP,ne.TOP_RIGHT,ne.RIGHT]),j,[ne.BOTTOM,ne.BOTTOM_LEFT,ne.LEFT]),V,[ne.TOP]),x(x(x(x(x(x(x(x(x(x(oe,H,[ne.TOP]),B,[ne.TOP,ne.TOP_LEFT]),$,[ne.BOTTOM_RIGHT]),W,[ne.TOP,ne.TOP_LEFT,ne.LEFT,ne.TOP_RIGHT,ne.RIGHT]),U,[ne.TOP,ne.BOTTOM]),Y,[ne.TOP]),X,[ne.TOP]),G,[ne.TOP,ne.BOTTOM]),K,[ne.TOP,ne.BOTTOM,ne.LEFT]),Z,[ne.TOP]),x(oe,T,[ne.TOP,ne.BOTTOM,ne.RIGHT,ne.LEFT,ne.TOP_RIGHT,ne.BOTTOM_RIGHT,ne.BOTTOM_LEFT,ne.TOP_LEFT]));function ce(e){var t=function(e){var t=e.configs,n=e.crossPlacements,r=e.nodes,i=e.extract,o=e.style,a=e.measureText,s=e.size,l=e.horizontal,c=e.rtl,u=e.showLabel,d=function(e){var t={top:[],right:[],bottom:[],left:[]},n=e.nodes.map(function(e){var t=e.localBounds,n={x:t.x+t.width/2,y:t.y+t.height/2};return{key:"".concat(n.x,"-").concat(n.y),center:n}}),r=n.reduce(function(e,t){return(!e.top||t.center.y<e.top.center.y)&&(e.top=t),(!e.right||t.center.x>e.right.center.x)&&(e.right=t),(!e.bottom||t.center.y>e.bottom.center.y)&&(e.bottom=t),(!e.left||t.center.x<e.left.center.x)&&(e.left=t),e},{});return t.top=n.filter(function(e){return e.center.y===r.top.center.y}).map(function(e){return e.key}),t.right=n.filter(function(e){return e.center.x===r.right.center.x}).map(function(e){return e.key}),t.bottom=n.filter(function(e){return e.center.y===r.bottom.center.y}).map(function(e){return e.key}),t.left=n.filter(function(e){return e.center.x===r.left.center.x}).map(function(e){return e.key}),{getExtrema:function(e){return{top:-1!==t.top.indexOf(e),right:-1!==t.right.indexOf(e),bottom:-1!==t.bottom.indexOf(e),left:-1!==t.left.indexOf(e)}},getExtreme:function(e){return[t.top,t.right,t.bottom,t.left].some(function(t){return-1!==t.indexOf(e)})}}}({nodes:r}),f=function(e){var t=e.by,n=e.lineId,r=e.nodes.reduce(function(e,r,i){var o=t(r.data);return e[o]||(e[o]={items:[],index:i}),e[o].items.push({node:r,line:n(r)}),e},{});return Object.keys(r).map(function(e){return r[e]}).sort(function(e,t){return e.index-t.index}).map(function(e){return e.items})}({nodes:r,by:i.majorValue,lineId:i.lineId}).map(function(e,r){return e.map(function(e){return{line:e.line,item:se({config:t.get(e.node.key),crossPlacements:n,node:e.node,line:e.line,groupIndex:r,extract:i,style:o,measureText:a,size:s,horizontal:l,rtl:c,meta:d,showLabel:u})}}).filter(function(e){return e.item}).reduce(function(e,t){return e[t.line]=t.item,e},{})});return f.filter(function(e){return Object.keys(e).length})}({configs:e.configs,crossPlacements:e.crossPlacements,nodes:e.nodes,extract:e.extract,style:e.style,measureText:e.measureText,size:e.size,horizontal:e.horizontal,rtl:e.rtl,showLabel:e.showLabel}),n=A(t.reduce(function(e,t){return e.push.apply(e,A(Object.keys(t).map(function(e){return t[e]}))),e},[])),r=C(n,1)[0],i=function(e){for(var t=e.threshold,n=e.groups.map(function(e){return Object.keys(e).map(function(t){return e[t]})}),r={},i=0;i<=n.length;i++){var o=n[i];if(o)for(var a=0;a<o.length;a++){var s=o[a];if(s.config.lines){var l=s.line;r[l]||(r[l]=[]),r[l].push(s.bounds)}}}for(var c=Object.keys(r).map(function(e){return r[e]}),u=[],d=0;d<c.length;d++)for(var f=0;f<c[d].length-1;f++){var p=c[d][f],h=c[d][f+1],m={x1:p.x,y1:p.y,x2:h.x,y2:h.y},g=m.x1-m.x2,y=m.y1-m.y2;Math.sqrt(g*g+y*y)>t&&u.push(m)}return u}({groups:t,threshold:null==r?void 0:r.node.localBounds.height}),o={getItems:function(){return n},getLines:function(){return i}};return function(e){for(var t=e.groups,n=function(e){for(var n=Object.keys(t[e]).map(function(n){return t[e][n]}),r=0;r<n.length;r++){var i=n[r];if(!i.config.fixed){var o=ee({previous:t[e-1]&&t[e-1][i.line],current:i,next:t[e+1]&&t[e+1][i.line]});i.setClassification(o)}}},r=0;r<t.length;r++)n(r)}({groups:t}),o.getItems().forEach(function(e){e.setPreferences(le[e.classification])}),o}function ue(e){var t=e.item,n=e.placement,r=e.size;return n.x>=0-r.edgeBleed.left&&n.x<=r.width-t.bounds.width+r.edgeBleed.right&&n.y>=0-r.edgeBleed.top&&n.y<=r.height-t.bounds.height}function de(e){var t=e.line1,n=e.line2,r=(n.y2-n.y1)*(t.x2-t.x1)-(n.x2-n.x1)*(t.y2-t.y1);if(0===r)return!1;var i=((n.x2-n.x1)*(t.y1-n.y1)-(n.y2-n.y1)*(t.x1-n.x1))/r,o=((t.x2-t.x1)*(t.y1-n.y1)-(t.y2-t.y1)*(t.x1-n.x1))/r;return i>=0&&i<=1&&o>=0&&o<=1}var fe={x:0,width:0,y:0,height:0},pe=function(e){var t=e.item;return{x:t.bounds.x-t.bounds.width/2,y:t.bounds.y-t.bounds.height-t.node.localBounds.height/2-t.border}},he=function(e){var t=e.item;return{x:t.bounds.x,y:t.bounds.y-t.bounds.height-t.node.localBounds.height/2-t.border}},me=function(e){var t=e.item;return{x:t.bounds.x+t.node.localBounds.width/2+t.border,y:t.bounds.y-t.bounds.height/2}},ge=function(e){var t=e.item;return{x:t.bounds.x,y:t.bounds.y+t.node.localBounds.height/2+t.border}},ye=function(e){var t=e.item;return{x:t.bounds.x-t.bounds.width/2,y:t.bounds.y+t.node.localBounds.height/2+t.border}},ve=function(e){var t=e.item;return{x:t.bounds.x-t.bounds.width,y:t.bounds.y+t.node.localBounds.height/2+t.border}},be=function(e){var t=e.item;return{x:t.bounds.x-t.bounds.width-t.node.localBounds.width/2-t.border,y:t.bounds.y-t.bounds.height/2}},xe=function(e){var t=e.item;return{x:t.bounds.x-t.bounds.width,y:t.bounds.y-t.bounds.height-t.node.localBounds.height/2-t.border}},we=[ne.TOP,ne.TOP_LEFT,ne.TOP_RIGHT],Se=[ne.BOTTOM,ne.BOTTOM_LEFT,ne.BOTTOM_RIGHT];function Me(e){var t=e.position,n={x:2.5,width:-5,y:0,height:0},r=we.indexOf(t)>-1,i=Se.indexOf(t)>-1;return r&&(n.y=4,n.height=-4),i&&(n.height=-4),n}function ke(e){var t=e.cx,n=e.cy,r=e.r,i=e.degrees*(Math.PI/180);return{x:Math.round(t+r*Math.sin(i)),y:Math.round(n+r*-Math.cos(i))}}function Ee(e){var t=e.coordinates,n=e.degrees,r=e.item,i={x:t.x,y:t.y};return n<=90?i.y-=r.bounds.height:n>180&&n<=270?i.x-=r.bounds.width:n>270&&(i.y-=r.bounds.height,i.x-=r.bounds.width),i}var Ce=void 0;function Ae(e){var t=e.item,n=e.validator,r=e.force,i=void 0!==r&&r,o=x(x(x(x(x(x(x(x({},ne.TOP,pe),ne.TOP_RIGHT,he),ne.RIGHT,me),ne.BOTTOM_RIGHT,ge),ne.BOTTOM,ye),ne.BOTTOM_LEFT,ve),ne.LEFT,be),ne.TOP_LEFT,xe);if(t.fixedPlacement)return o[t.fixedPlacement]({item:t});for(var a=[].concat(A(t.preferences),A(Object.keys(ne).map(function(e){return ne[e]}).filter(function(e){return-1===t.preferences.indexOf(e)}))),s=[],l=0;l<a.length;l++){var c=a[l],u=o[c]({item:t}),d=Me({position:c}),f=n({item:t,placement:u,adjustment:d,ignoreLines:i});if(i&&f.inside&&s.push(u),f.valid)return u}var p=function(){return function(e){for(var t=e.item,n=e.validator,r=e.force,i=void 0!==r&&r,o=function(e){return[e.item.node.localBounds.height/2*Math.sqrt(2)]}({item:t}),a=t.bounds.x,s=t.bounds.y,l=0;l<o.length;l++){for(var c=o[l],u=40;u<=180;u+=15){var d=Ee({coordinates:ke({cx:a,cy:s,r:c,degrees:u}),degrees:u,item:t});if(n({item:t,placement:d,ignoreLines:i}).valid)return d}for(var f=320;f>180;f-=15){var p=Ee({coordinates:ke({cx:a,cy:s,r:c,degrees:f}),degrees:f,item:t});if(n({item:t,placement:p,ignoreLines:i}).valid)return p}}return!1}({item:t,validator:n,force:i})};return i?p()||s[0]||Ce:(t.extreme||t.elite)&&p()||Ce}function De(e){var t=e.configs,n=e.crossPlacements,r=e.model,i=e.size,o=e.all,a={},s=r.getItems(),l=[].concat(A(s.map(function(e){return{x:e.node.localBounds.x-e.border+1,y:e.node.localBounds.y-e.border+1,height:e.node.localBounds.height+2*e.border-2,width:e.node.localBounds.width+2*e.border-2}})),A(n.getPlacements({configs:t}))),c=[],u=r.getLines();s.forEach(function(e){var t=e.node.data;if(!(!e.show||!e.inside||t.null&&t.null.value||t.interpolated&&t.interpolated.value)){var n=e.key;if(!a[n]||e.config.duplicates){a[n]=!0;var r=function(e){var t=e.size,n=e.lines,r=e.placements;return function(e){var i=e.item,o=e.placement,a=e.adjustment,s=void 0===a?fe:a,l=e.ignoreLines,c=void 0!==l&&l,u={inside:ue({item:i,placement:o,size:t}),collides:!0,valid:!1};return u.inside?(u.collides=function(e){var t=e.candidate,n=e.lines;return!!e.rects.some(function(e){return function(e){var t=e.rect1,n=e.rect2;return!(n.x>t.x+t.width||n.x+n.width<t.x||n.y>t.y+t.height||n.y+n.height<t.y)}({rect1:e,rect2:t})})||n.some(function(e){return function(e){var t=e.line,n=e.rect,r={x:n.x,y:n.y},i={x:n.x+n.width,y:n.y},o={x:n.x+n.width,y:n.y+n.height},a={x:n.x,y:n.y+n.height},s={x1:i.x,y1:i.y,x2:o.x,y2:o.y},l={x1:o.x,y1:o.y,x2:a.x,y2:a.y},c={x1:a.x,y1:a.y,x2:r.x,y2:r.y};return de({line1:t,line2:{x1:r.x,y1:r.y,x2:i.x,y2:i.y}})||de({line1:t,line2:s})||de({line1:t,line2:l})||de({line1:t,line2:c})}({line:e,rect:t})})}({candidate:{x:o.x+s.x,y:o.y+s.y,width:i.bounds.width+s.width,height:i.bounds.height+s.height},lines:c?[]:n,rects:r}),u.valid=!u.collides,u):u}}({size:i,lines:u,placements:l}),s=Ae({item:e,validator:r});s?(s.height=e.bounds.height,s.width=e.bounds.width,l.push(s),e.setPlacement(s)):o&&c.push({item:e,validator:r})}else e.setDuplicate()}}),c.forEach(function(e){var t=e.item,n=Ae({item:t,validator:e.validator,force:!0});n&&(n.height=t.bounds.height,n.width=t.bounds.width,l.push(n),t.setPlacement(n))})}var qe={require:["chart","renderer"],defaultSettings:{settings:{orientation:"horizontal",rtl:!1,all:!1,label:function(){},showLabel:function(){return!0},pointValue:function(){},majorValue:function(){},lineId:function(){},enabled:function(){return!0},configs:[],insideStrategy:"edge",labelSpace:{use:function(){return!1},size:10},cache:void 0},style:{fontFamily:'"Source Sans Pro", "Arial", "sans-serif"',fontSize:"12px",fill:"#333"}},created:function(){var e,t,n,r,i,o;this.crossPlacements=(e={cache:this.settings.settings.cache,key:this.settings.key},i=e.key,o={isPrimary:!1},null!=(r=e.cache)&&null!==(t=r.has)&&void 0!==t&&t.call(r,_)||(o.isPrimary=!0,null==r||null===(n=r.set)||void 0===n||n.call(r,_,{})),{reset:function(){var e,t=null==r||null===(e=r.get)||void 0===e?void 0:e.call(r,_);t&&(o.isPrimary&&Object.keys(t).forEach(function(e){return delete t[e]}),t[i]=[])},setPlacement:function(e){var t,n=null==r||null===(t=r.get)||void 0===t?void 0:t.call(r,_);n&&n[i].push(e)},getPlacements:function(e){var t,n=e.configs,o=null==r||null===(t=r.get)||void 0===t?void 0:t.call(r,_);if(!o)return[];var a=[],s=n.getCollection().filter(function(e){return!e.labels&&!!e.labelKeys.length}).reduce(function(e,t){return e.push.apply(e,A(t.labelKeys)),e},[]);return Object.keys(o).forEach(function(e){e!==i&&s.some(function(t){return t===e})&&a.push.apply(a,A(o[e]))}),a}})},preferredSize:function(){var e={edgeBleed:{top:0,right:0,left:0}},t=this.settings.settings,n=t.orientation,r=t.rtl,i=t.labelSpace,o=i.use,a=i.size;if(o()){var s="horizontal"===n;e.edgeBleed.top=s?a:0,e.edgeBleed[r?"left":"right"]=s?0:a}return e},render:function(){this.crossPlacements.reset();var e=this.settings.settings;if(!(0,e.enabled)())return[];var t=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).configs,t=void 0===e?[]:e,n={},r=[];return t.forEach(function(e){var t=e.key;n[t]={labels:void 0===e.labels||e.labels,labelKeys:Array.isArray(e.labelKeys)?e.labelKeys:[],lines:void 0===e.lines||e.lines,fixed:void 0!==e.fixed&&e.fixed,duplicates:void 0!==e.duplicates&&e.duplicates},r.push(n[t])}),{meta:{allKeys:t.map(function(e){return e.key})},getCollection:function(){return r},get:function(e){return n[e]},getFirstLabelKey:function(){var e;return null===(e=t.find(function(e){return e.labels}))||void 0===e?void 0:e.key}}}({configs:e.configs}),n=t.getFirstLabelKey();if(!n)return[];if(!this.chart.component(n))return[];var r=this.chart.findShapes("circle, path, rect").filter(function(e){return t.meta.allKeys.includes(e.key)});if(!r.length)return[];var i="horizontal"===e.orientation,o=i?"x":"y";r.sort(function(e,t){return e.localBounds[o]-t.localBounds[o]});var a={label:e.label,pointValue:e.pointValue,majorValue:e.majorValue,lineId:e.lineId},s=this.rect,l={height:s.height,width:s.width,edgeBleed:s.edgeBleed,insideStrategy:e.insideStrategy},c=this.crossPlacements,u=this.style,d=ce({configs:t,crossPlacements:c,nodes:r,extract:a,style:u,measureText:this.renderer.measureText,size:l,horizontal:i,rtl:e.rtl,showLabel:e.showLabel});({model:d}).model.getItems().sort(function(e,t){return e.extreme===t.extreme?0:e.extreme&&!t.extreme?-1:1}),De({configs:t,crossPlacements:c,model:d,size:l,all:e.all});var f=d.getItems(),p=[];f.filter(function(e){return e.placement}).forEach(function(e){var t,n,r,i,o,s=null!==(t=e.node.data.value)&&void 0!==t&&t.hasBackground?2:0,l=null!==(n=e.node.data.value)&&void 0!==n&&n.hasBackground?2:0,c=(null===(r=e.node.data.value)||void 0===r||null===(r=r.style)||void 0===r||null===(r=r.label)||void 0===r?void 0:r.fontSize)||u.fontSize,d=(null===(i=e.node.data.value)||void 0===i||null===(i=i.style)||void 0===i||null===(i=i.label)||void 0===i?void 0:i.fontFamily)||u.fontFamily,f=(null===(o=e.node.data.value)||void 0===o?void 0:o.labelColor)||u.fill;e.labelMeasurements.lines?e.labelMeasurements.lines.forEach(function(t,n){p.push({type:"text",x:e.placement.x+e.placement.width/2,y:e.placement.y+(n+.5)*t.size.height+s+l,fontSize:c,fontFamily:d,fill:f,text:t.text,data:e.node.data.value,baseline:"central",anchor:"middle"})}):p.push({type:"text",x:e.placement.x+e.placement.width/2,y:e.placement.y+e.labelMeasurements.height/2+s+l,fontSize:c,fontFamily:d,fill:f,text:a.label(e.node.data),data:e.node.data.value,baseline:"central",anchor:"middle"})});var h=f.filter(function(e){var t;return e.placement&&(null===(t=e.node.data.value)||void 0===t?void 0:t.hasBackground)}).map(function(e){var t;return{type:"rect",x:e.placement.x+2,y:e.placement.y+2,rx:3,ry:3,fill:null===(t=e.node.data.value)||void 0===t?void 0:t.labelBackgroundColor,width:e.placement.width-4,height:e.placement.height-4,data:e.node.data.value}});return[].concat(A(h),p)}},_e={area:"area",continuous:"range"};function Te(e){return function(e){var t=e.config,n=e.type,r=t.actions,i=t.componentKey,o=t.enable,a=t.eventKey,s=t.events,l=t.fillTargets;return{key:"event:".concat(i),type:"Pan",requireFailure:void 0,recognizeWith:void 0,options:{event:a,enable:function(e,t){if(!o())return!1;if(this.started===a||!t)return!0;if(!r.select.enabled())return!1;var n=this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}).filter(function(e){return-1!==l.indexOf(e.key)}),s=0===n.length&&function(e,t){var n=e.srcEvent.target;return!(!n||0!==(n.getAttribute("data-key")||"").indexOf("".concat(t,"-")))}(t,i);return s?(this.started=a,!0):n.length>0}},events:x(x(x({},"".concat(a,"start"),function(e){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,r.select.brushSelectionIncludeMax=!0),e.preventDefault(),r.select.emit("start",a),this.chart.component(i).emit("".concat(_e[n],"Start"),e),this.started=a,s.onRangeStart({chart:this.chart})}),"".concat(a,"move"),function(e){e.preventDefault(),this.chart.component(i).emit("".concat(_e[n],"Move"),e),s.onRangeMove({chart:this.chart})}),"".concat(a,"end"),function(e){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,r.select.brushSelectionIncludeMax=!0),e.preventDefault(),this.chart.component(i).emit("".concat(_e[n],"End"),e),r.select.emit("end",a),this.started=!1,s.onRangeEnd({chart:this.chart})})}}({config:e,type:"continuous"})}var Ne={ACTIONS:{select:{enabled:function(){return!1}}},BUBBLES_PLACEMENT:"inside",COMPONENT_KEY:"continuous-range-component",DOCK:"bottom",ENABLE:function(){return!0},EVENT_KEY:"continuous-range",EVENTS:function(){},FILL_TARGETS:[],MULTIPLE:!1,OBSERVE_BRUSH:!1,SCALE:"scale",TARGETS:[]};function Oe(e){var t=e.actions,n=e.componentKey,r=e.eventKey;if(!e.onEdited)return!1;var i="".concat(n,"-").concat(r,"-tap");return{prio:1,key:"event:".concat(n,"-tap"),type:"Tap",requireFailure:void 0,recognizeWith:void 0,options:{event:i,interval:10,pointers:1,enable:function(e,r){var i,o;return!(!r||!t.select.enabled()||"INPUT"!==(null===(i=r.target)||void 0===i?void 0:i.nodeName)&&(null===(o=r.target)||void 0===o||!o.hasAttribute("data-other-value")||(r.target.getAttribute("data-key")||"").split("-bubble")[0]!==n))}},events:x({},i,function(e){(e.target.getAttribute("data-key")||"").split("-bubble")[0]&&(e.preventDefault(),this.chart.component(n).emit("bubbleStart",e))})}}function Ie(e){var t=function(){var e,t,n,r,i,o,a,s,l,c,u,d,f,p,h,m,g,y=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{actions:null!==(e=y.actions)&&void 0!==e?e:Ne.ACTIONS,bubblesPlacement:null!==(t=y.bubblesPlacement)&&void 0!==t?t:Ne.BUBBLES_PLACEMENT,componentKey:null!==(n=y.componentKey)&&void 0!==n?n:Ne.COMPONENT_KEY,dock:null!==(r=y.dock)&&void 0!==r?r:Ne.DOCK,enable:null!==(i=y.enable)&&void 0!==i?i:Ne.ENABLE,eventKey:null!==(o=y.eventKey)&&void 0!==o?o:Ne.EVENT_KEY,events:{onRangeStart:null!==(a=null===(s=y.events)||void 0===s?void 0:s.onRangeStart)&&void 0!==a?a:Ne.EVENTS,onRangeMove:null!==(l=null===(c=y.events)||void 0===c?void 0:c.onRangeMove)&&void 0!==l?l:Ne.EVENTS,onRangeEnd:null!==(u=null===(d=y.events)||void 0===d?void 0:d.onRangeEnd)&&void 0!==u?u:Ne.EVENTS},fillTargets:null!==(f=y.fillTargets)&&void 0!==f?f:Ne.FILL_TARGETS,multiple:null!==(p=y.multiple)&&void 0!==p?p:Ne.MULTIPLE,observeBrush:null!==(h=y.observeBrush)&&void 0!==h?h:Ne.OBSERVE_BRUSH,onEdited:y.onEdited,scale:null!==(m=y.scale)&&void 0!==m?m:Ne.SCALE,targetFillSelector:y.targetFillSelector,targetSelector:y.targetSelector,targets:null!==(g=y.targets)&&void 0!==g?g:Ne.TARGETS,toLabel:y.toLabel}}(e),n=[Te(t),Oe(t)].filter(Boolean),r=function(e){var t=e.bubblesPlacement,n=e.componentKey,r=e.dock,i=e.fillTargets,o=e.multiple,a=e.observeBrush,s=e.onEdited,l=e.scale,c=e.targetFillSelector,u=e.targets,d=e.targetSelector,f=e.toLabel;return{key:n,type:"brush-range",layout:{dock:u.map(function(e){return"@".concat(e)}).join(",")},on:s?{bubbleEnd:function(){s()}}:{},settings:{brush:a?{context:"selection",observe:!0}:"selection",scale:l,multiple:o,direction:"left"===r||"right"===r?"vertical":"horizontal",bubbles:{align:"left"===r||"top"===r?"end":"start",placement:t,label:f},target:{components:i,selector:d,fillSelector:c,fill:"rgba(82,204,82,0.2)"}}}}(t);return{interactions:n,components:[r]}}var Le={ACTIONS:{lasso:{enabled:function(){return!1},active:function(){return!1}},select:{enabled:function(){return!1}}},COMPONENT_KEY:"lasso",COMPONENTS:[],EVENTS:function(){},TARGET_KEYS:[]},Pe="lasso";var Re={ACTIONS:{select:{enabled:function(){return!1}}},COMPONENTS:[],EVENTS:function(){},HIT_RADIUS:0,IS_LOCKED:function(){return!1},TARGETS:[]},ze="tap";function Fe(e){var t=e.actions,n=e.components,r=e.events,i=e.hitRadius,o=e.isLocked,a=e.shapesAt,s=e.targets,l={targetComponents:[]};return{key:"event:tap",type:"Tap",requireFailure:void 0,recognizeWith:void 0,options:{event:ze,interval:10,pointers:1,enable:function(e,n){return!n||!!t.select.enabled()&&(l.targetComponents=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter(function(e){return-1!==s.indexOf(e.key)}),l.targetComponents.length>0)}},events:x({},ze,function(e){if(e.preventDefault(),!o(l.targetComponents)&&t.select.enabled()){var c,u,d,f,p=(c=e,f=this.chart.element.getBoundingClientRect(),c.center?(u=c.center.x,d=c.center.y):(u=void 0===c.clientX?Math.floor(c.srcEvent.clientX):c.clientX,d=void 0===c.clientY?Math.floor(c.srcEvent.clientY):c.clientY),{x:u-f.left,y:d-f.top}),h="function"==typeof i?i(l.targetComponents):i,m=h>0?{cx:p.x,cy:p.y,r:h}:p,g=a?a(m):this.chart.shapesAt(m,{components:s.map(function(e){return{key:e}})}),y=this.chart.componentsFromPoint({x:e.center.x,y:e.center.y}),v=y.some(function(e){return"legend-cat"===e.type});if(!g.length&&v||(this.chart.brushSelectionIncludeMax=!1,t.select.brushSelectionIncludeMax=!1,t.select.emit("start",ze,y),r.onSelectStart()),g.length&&n){this.chart.brushSelectionIncludeMax=!1,t.select.brushSelectionIncludeMax=!1;var b="function"==typeof n?n(e,g):n;this.chart.brushFromShapes(g,{components:b}),t.select.emit("end",ze),r.onSelectEnd({chart:this.chart})}}})}}var je="object",Ve=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],He=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];var Be=function(e){return{value:e,label:e.charAt(0).toUpperCase()+e.slice(1),groupHeader:!1,disabled:!1,styles:{fontFamily:e}}};function $e(e){var t=e.theme,n=e.translator,r=e.defaultValue,i=e.flags,o=[],a=t.getStyle("","","fontFamilies");return Array.isArray(a)&&a.length?o.push.apply(o,A(new Set([r].concat(A(a.map(function(e){return e.split(",").map(function(e){return e.trim()}).map(function(e){return e.replace(/\s+/g," ").trim()}).filter(Boolean).join(", ")})))))):o.push(r),[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0}].concat(A(o.map(function(e){return Be(e)})),[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0}],A(function(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?He:Ve}(i).map(function(e){return Be(e)})))}function We(e){var t=e.theme,n=e.translator,r=e.id,i=e.path,o=e.flags,a=function(){return t.getStyle(r,i,"fontFamily")};return{getDefaultValue:function(){return a()},getOptions:function(){return $e({theme:t,translator:n,defaultValue:a(),flags:o})}}}var Ue=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],Ye=function(e){return{value:e,label:e,groupHeader:!1,disabled:!1}};function Xe(e){var t=e.theme,n=e.translator,r=e.id,i=e.path,o=function(){return t.getStyle(r,i,"fontSize")};return{getDefaultValue:function(){return o()},getOptions:function(){return function(e){var t=e.translator,n=e.defaultValue,r=[],i=e.theme.getStyle("","","fontSizes");return Array.isArray(i)&&i.length?r.push.apply(r,A(new Set([n].concat(A(i))))):r.push(n),[{value:"ThemeHeader",label:t.get("properties.themeFontSizes"),metaText:t.get("properties.theme"),groupHeader:!0}].concat(A(r.map(function(e){return Ye(e)})),[{value:"DefaultHeader",label:t.get("properties.allFontSizes"),metaText:t.get("properties.default"),groupHeader:!0}],A(Ue.map(function(e){return Ye(e)})))}({theme:t,translator:n,defaultValue:o()})}}}function Ge(e){var t=e.theme,n=e.translator,r=e.id,i=e.path;return{fontFamily:We({theme:t,translator:n,id:r,path:i,flags:e.flags}),fontSize:Xe({theme:t,translator:n,id:r,path:i})}}var Ke,Ze,Je=["__proto__","constructor"],Qe=function(e){if(Je.some(function(t){return e.includes(t)}))throw new Error("font-resolver: Forbidden property.")};function et(e){return tt.apply(this,arguments)}function tt(){return(tt=b(k().m(function e(t){var n,r,i,o;return k().w(function(e){for(;;)switch(e.n){case 0:if(n=t.app,r=t.items,n.evaluateEx){e.n=1;break}return e.a(2,r);case 1:return e.n=2,Promise.all(r.filter(function(e){var t;return!(null===(t=e.qCalcCondition)||void 0===t||null===(t=t.qCond)||void 0===t||!t.qv)}).map(function(e){var t=e.qCalcCondition.qCond.qv;return n.evaluateEx(t).then(function(t){return 0===t.qNumber?e.qDef.cId:void 0}).catch(function(){return e.qDef.cId})}));case 2:return i=e.v,o=i.filter(Boolean),e.a(2,r.filter(function(e){return!o.includes(e.qDef.cId)}))}},e)}))).apply(this,arguments)}function nt(e){var t=e.app,n=e.translator,r=e.dimension,i={id:r.qDef.cId,text:n.get("Object.ErrorMessage.MissingDimension"),meta:{}},o=r.qLibraryId;if(o)return t.getDimension?t.getDimension(o).then(function(e){return e.getLayout()}).catch(function(){}).then(function(e){if(!e)return i;var t=e.qDim,n=t.qGrouping,o=t.qLabelExpression,a="C"===n,s="H"===n,l="N"===n;return{id:r.qDef.cId,text:o&&l?o:e.qDim.title,meta:{isCyclic:a,isDrillDown:s,isNormal:l}}}):i;var a=r.qDef,s=a.cId,l=a.qLabelExpression,c=a.qFieldLabels,u=a.qFieldDefs,d={isCyclic:!1,isDrillDown:!1,isNormal:!0};return l?t.evaluate?t.evaluate(l).then(function(e){return{id:s,text:e,meta:d}}):i:{id:s,text:c[0]||u[0],meta:d}}function rt(e){return it.apply(this,arguments)}function it(){return(it=b(k().m(function e(t){var n,r,i,o,a,s,l,c;return k().w(function(e){for(;;)switch(e.n){case 0:if(r=t.app,i=t.translator,o=t.properties,a=(null==o||null===(n=o.qHyperCubeDef)||void 0===n||null===(n=n.qLayoutExclude)||void 0===n?void 0:n.qHyperCubeDef)||{},s=a.qDimensions,(l=void 0===s?[]:s).length){e.n=1;break}return e.a(2,Promise.resolve([]));case 1:return e.n=2,et({app:r,items:l});case 2:return c=e.v,e.a(2,Promise.all(c.map(function(e){return nt({app:r,translator:i,dimension:e})})))}},e)}))).apply(this,arguments)}function ot(e){var t=e.app,n=e.translator,r=e.measure,i={id:r.qDef.cId,text:n.get("Object.ErrorMessage.MissingMeasure")},o=r.qLibraryId;if(o)return t.getMeasure?t.getMeasure(o).then(function(e){return e.getLayout()}).catch(function(){}).then(function(e){if(!e)return i;var t=e.qMeasure.qLabelExpression;return{id:r.qDef.cId,text:t||e.qMeasure.qLabel||e.qMeasure.qDef}}):i;var a=r.qDef,s=a.cId,l=a.qLabelExpression,c=a.qLabel,u=a.qDef;return l?t.evaluate?t.evaluate(l).then(function(e){return{id:s,text:e}}):i:{id:s,text:c||u}}function at(e){return st.apply(this,arguments)}function st(){return(st=b(k().m(function e(t){var n,r,i,o,a,s,l,c;return k().w(function(e){for(;;)switch(e.n){case 0:if(r=t.app,i=t.translator,o=t.properties,a=(null==o||null===(n=o.qHyperCubeDef)||void 0===n||null===(n=n.qLayoutExclude)||void 0===n?void 0:n.qHyperCubeDef)||{},s=a.qMeasures,(l=void 0===s?[]:s).length){e.n=1;break}return e.a(2,Promise.resolve([]));case 1:return e.n=2,et({app:r,items:l});case 2:return c=e.v,e.a(2,Promise.all(c.map(function(e){return ot({app:r,translator:i,measure:e})})))}},e)}))).apply(this,arguments)}var lt=function(){if(Ze)return Ke;Ze=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return Ke=function e(){var t,n,r,l,c,u,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(h&&l&&(o(l)||(c=i(l)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&o(r)?r:{},a(d,{name:n,newValue:e(h,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},Ke}(),ct=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(lt);function ut(e,t){return{range:function(e){var n=e.resources,r=e.data,i=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map(function(e){return i[e.value%i.length]})},valueAccessor:e.value}}function dt(e,t){return{range:function(e){var n=e.resources,r=e.data,i=n.theme.palette("categorical",0===t?r.items.length:t);return r.items.map(function(e){return i[e.row.value%i.length]})},valueAccessor:e.value}}function ft(e,t,n,r,i){var o,a,s=i.byRow,l=i.byElemNo;if(r&&(t.input.persistent||e.hc.qDimensionInfo.length>1||void 0===n.activeDimensionIndex&&e.hc.qSize.qcy>((null===(a=(o=e.hc).qDataPages[0]||o.qStackedDataPages[0])||void 0===a?void 0:a.qArea.qHeight)||0)))return l(r,r.raw().qCardinal);if(r){var c=t.pic.extract({field:r.key(),trackBy:r.value}).length;return s(r,c)}return{}}function pt(e,t){var n=e.hc.qDimensionInfo,r=t.input.byDimDef||{activeDimensionIndex:n.length-1};if(r.activeDimensionIndex>=0){var i=n[r.activeDimensionIndex];r=i.coloring&&i.coloring.colorMapRef?{type:"libraryItem",key:i.coloring.colorMapRef,activeDimensionIndex:r.activeDimensionIndex}:{activeDimensionIndex:r.activeDimensionIndex}}return r}function ht(e,t){var n;return t.activeDimensionIndex>=0?n=e.pic.fields().filter(function(e){return"dimension"===e.type()})[t.activeDimensionIndex]:"libraryItem"===t.type?!1===(n=t.key?e.pic.field(function(e){return e.raw().colorMapRef===t.key}):void 0)&&(n=e.pic.field(function(e){return"colorByAlternative"===e.raw().id})):"expression"===t.type&&(n=e.pic.field(function(e){return"colorByAlternative"===e.raw().id})),n}function mt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function gt(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function yt(){}var vt=.7,bt=1/vt,xt="\\s*([+-]?\\d+)\\s*",wt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",St="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Mt=/^#([0-9a-f]{3,8})$/,kt=new RegExp(`^rgb\\(${xt},${xt},${xt}\\)$`),Et=new RegExp(`^rgb\\(${St},${St},${St}\\)$`),Ct=new RegExp(`^rgba\\(${xt},${xt},${xt},${wt}\\)$`),At=new RegExp(`^rgba\\(${St},${St},${St},${wt}\\)$`),Dt=new RegExp(`^hsl\\(${wt},${St},${St}\\)$`),qt=new RegExp(`^hsla\\(${wt},${St},${St},${wt}\\)$`),_t={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 Tt(){return this.rgb().formatHex()}function Nt(){return this.rgb().formatRgb()}function Ot(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Mt.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?It(t):3===n?new zt(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Lt(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Lt(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=kt.exec(e))?new zt(t[1],t[2],t[3],1):(t=Et.exec(e))?new zt(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ct.exec(e))?Lt(t[1],t[2],t[3],t[4]):(t=At.exec(e))?Lt(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Dt.exec(e))?$t(t[1],t[2]/100,t[3]/100,1):(t=qt.exec(e))?$t(t[1],t[2]/100,t[3]/100,t[4]):_t.hasOwnProperty(e)?It(_t[e]):"transparent"===e?new zt(NaN,NaN,NaN,0):null}function It(e){return new zt(e>>16&255,e>>8&255,255&e,1)}function Lt(e,t,n,r){return r<=0&&(e=t=n=NaN),new zt(e,t,n,r)}function Pt(e){return e instanceof yt||(e=Ot(e)),e?new zt((e=e.rgb()).r,e.g,e.b,e.opacity):new zt}function Rt(e,t,n,r){return 1===arguments.length?Pt(e):new zt(e,t,n,null==r?1:r)}function zt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Ft(){return`#${Bt(this.r)}${Bt(this.g)}${Bt(this.b)}`}function jt(){const e=Vt(this.opacity);return`${1===e?"rgb(":"rgba("}${Ht(this.r)}, ${Ht(this.g)}, ${Ht(this.b)}${1===e?")":`, ${e})`}`}function Vt(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ht(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Bt(e){return((e=Ht(e))<16?"0":"")+e.toString(16)}function $t(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ut(e,t,n,r)}function Wt(e){if(e instanceof Ut)return new Ut(e.h,e.s,e.l,e.opacity);if(e instanceof yt||(e=Ot(e)),!e)return new Ut;if(e instanceof Ut)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Ut(a,s,l,e.opacity)}function Ut(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Yt(e){return(e=(e||0)%360)<0?e+360:e}function Xt(e){return Math.max(0,Math.min(1,e||0))}function Gt(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}mt(yt,Ot,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Tt,formatHex:Tt,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Wt(this).formatHsl()},formatRgb:Nt,toString:Nt}),mt(zt,Rt,gt(yt,{brighter(e){return e=null==e?bt:Math.pow(bt,e),new zt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?vt:Math.pow(vt,e),new zt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new zt(Ht(this.r),Ht(this.g),Ht(this.b),Vt(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:Ft,formatHex:Ft,formatHex8:function(){return`#${Bt(this.r)}${Bt(this.g)}${Bt(this.b)}${Bt(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:jt,toString:jt})),mt(Ut,function(e,t,n,r){return 1===arguments.length?Wt(e):new Ut(e,t,n,null==r?1:r)},gt(yt,{brighter(e){return e=null==e?bt:Math.pow(bt,e),new Ut(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?vt:Math.pow(vt,e),new Ut(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new zt(Gt(e>=240?e-240:e+120,i,r),Gt(e,i,r),Gt(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Ut(Yt(this.h),Xt(this.s),Xt(this.l),Vt(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Vt(this.opacity);return`${1===e?"hsl(":"hsla("}${Yt(this.h)}, ${100*Xt(this.s)}%, ${100*Xt(this.l)}%${1===e?")":`, ${e})`}`}}));const Kt=Math.PI/180,Zt=180/Math.PI,Jt=.96422,Qt=.82521,en=4/29,tn=6/29,nn=3*tn*tn,rn=tn*tn*tn;function on(e){if(e instanceof an)return new an(e.l,e.a,e.b,e.opacity);if(e instanceof fn)return pn(e);e instanceof zt||(e=Pt(e));var t,n,r=un(e.r),i=un(e.g),o=un(e.b),a=sn((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=sn((.4360747*r+.3850649*i+.1430804*o)/Jt),n=sn((.0139322*r+.0971045*i+.7141733*o)/Qt)),new an(116*a-16,500*(t-a),200*(a-n),e.opacity)}function an(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function sn(e){return e>rn?Math.pow(e,1/3):e/nn+en}function ln(e){return e>tn?e*e*e:nn*(e-en)}function cn(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function un(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function dn(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof fn)return new fn(e.h,e.c,e.l,e.opacity);if(e instanceof an||(e=on(e)),0===e.a&&0===e.b)return new fn(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Zt;return new fn(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new fn(e,t,n,null==r?1:r)}function fn(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function pn(e){if(isNaN(e.h))return new an(e.l,0,0,e.opacity);var t=e.h*Kt;return new an(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}mt(an,function(e,t,n,r){return 1===arguments.length?on(e):new an(e,t,n,null==r?1:r)},gt(yt,{brighter(e){return new an(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new an(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new zt(cn(3.1338561*(t=Jt*ln(t))-1.6168667*(e=1*ln(e))-.4906146*(n=Qt*ln(n))),cn(-.9787684*t+1.9161415*e+.033454*n),cn(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),mt(fn,dn,gt(yt,{brighter(e){return new fn(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new fn(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return pn(this).rgb()}}));var hn=e=>()=>e;function mn(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):hn(isNaN(e)?t:e)}var gn=function e(t){var n=function(e){return 1===(e=+e)?mn:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):hn(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=Rt(e)).r,(t=Rt(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=mn(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1),yn=/^class(-pyramid)?/,vn=function(e,t,n,r){var i=void 0!==n.min?n.min:r.min(),o=void 0!==n.max?n.max:r.max(),a=i,s=o,l=t.limits,c={},u="percent"===t.limitType?l.map(function(e){return i+(o-i)*e}):l,d=t.colors.map(function(t){return e.resolveUIColor(t)});if(i=Math.min.apply(Math,[i].concat(A(u))),o=Math.max.apply(Math,[o].concat(A(u))),c.min=i,c.max=o,t.breakTypes&&-1===t.breakTypes.indexOf(!0))c.type="categorical",Object.assign(c,function(e){var t=e.min,n=e.max,r=e.limits,i=e.range,o=[],a=[];if(r.length)if(r[r.length-1]<t)a.push(t,n),o.push(i[i.length-1],i[i.length-1],i[i.length-1]);else if(r[0]>n)a.push(t,n),o.push(i[0],i[0],i[0]);else{if(r[0]>t)a.push(t),o.push(i[0]);else{a.push(t);for(var s=0;s<r.length;s++)if(t<r[s]){o.push(i[s]);break}}for(var l=0;l<r.length;l++)t<r[l]&&r[l]<n&&(a.push(r[l]),o.push(i[l]));if(r[r.length-1]<n)a.push(n),o.push(i[r.length]),o.push(i[r.length]);else{a.push(n);for(var c=0;c<r.length;c++)if(r[c]>n){o.push(i[c]),o.push(i[c]);break}}}else o.push(i[0]);return{min:t,max:n,range:o,domain:a}}({min:"percent"===t.limitType?i:a,max:"percent"===t.limitType?o:s,range:d,limits:"percent"===t.limitType?u:l}));else if(t.breakTypes){var f=t.breakTypes;c.type="continuous",c.domain=[i],c.range=[d[0]];for(var p=0;p<u.length;p+=1)if(f[p]){var h=d[p],m=d[p+1],g=gn(h,m)(.5);c.range.push(g),c.domain.push(u[p]),p<u.length-1&&f[p+1]&&(c.range.push(d[p+1]),c.domain.push((u[p]+u[p+1])/2))}else c.range.push(d[p]),c.range.push(d[p+1]),c.domain.push(u[p]),c.domain.push(u[p]+Math.min(1e-6,(o-i)/1e6));c.range.push(d[d.length-1]),c.domain.push(o)}else c.domain=u,c.range=d;return c};function bn(e,t,n,r,i){var o,a,s,l=0,c=[],u=(e-t)/(r+1);if(0===u)return 1;for(o=0;o<n.length;o+=1)a=.99*(n[o]-t),s=n[o]>e?Math.floor(e/u):n[o]<t?0:Math.floor(a/u),Number.isNaN(s)||(c[s]?c[s]+=1:c[s]=1);for(o=0;o<c.length;o+=1)c[o]&&(l+=1);return l<=r||l>=i?Math.max(l,r):bn(e,t,n,r+1,i)}var xn=function(e,t,n,r){var i,o,a=t.theme,s=t.hc,l=r.f,c={mode:"field",fieldType:"measure",field:l?l.key():void 0,reverse:n.input.reverseScheme||!1,type:"continuous",range:function(e){return e.resources.theme.palette("quant")}},u=[],d=!0;if(l){if(Number.isNaN(+l.min())||Number.isNaN(+l.max()))return{invalid:!0};(d=!("S"===(i=n.pic.raw()).qMode&&(i.qDataPages[0]&&i.qSize.qcy>i.qDataPages[0].qArea.qHeight||!i.qDataPages.length&&i.qSize.qcy>0)||"K"===i.qMode&&i.qStackedDataPages[0]&&i.qSize.qcy>i.qStackedDataPages[0].qArea.qHeight||"T"===i.qMode&&i.qSize.qcy>i.qTreeDataPages[0].qGroupSize))&&(u=n.pic.extract({field:0,props:{num:{field:l.key()},exclude:{fields:s.qDimensionInfo.map(function(e,t){return{field:"qDimensionInfo/".concat(t)}}),value:function(e){return Math.min.apply(Math,A(e))<0}}}}).filter(function(e){return e.value>=0&&!e.exclude.value}).map(function(e){return e.num.value}).filter(function(e){return"number"==typeof e}))}if(!1===n.input.autoMinMax){if(c.min=n.input.measureMin,c.max=n.input.measureMax,c.max<c.min)return{invalid:!0}}else if(l&&!d)c.min=l.min(),c.max=l.max();else if(l){if(!u.length)return{invalid:!0};c.min=Math.min.apply(Math,A(u)),c.max=Math.max.apply(Math,A(u))}if(n.input.measureScheme&&(c.palettes={quant:n.input.measureScheme}),a){var f=a.getDataColorScales().filter(function(e){return e.key===n.input.measureScheme})[0];c.type=f&&yn.test(f.type)?"categorical":"continuous","categorical"===c.type&&(o=f.colors.some(function(e){return Array.isArray(e)})?Math.max.apply(Math,A(f.colors.map(function(e){return e?e.length:0}))):f.colors.length)}if("categorical"===c.type){for(var p=d?bn(c.max,c.min,u,1,o):o,h=(c.max-c.min)/p,m=[],g=0;g<p+1;g+=1)m.push(c.min+h*g);c.domain=m,c.range=function(e){for(var t=e.resources.theme.palette("quant",p),n=Math.max(1,Math.floor(t.length/p)),r=[],i=0;i<p;i+=1)r.push(t[i*n]);return[r[0]].concat(r,[r[r.length-1]])}}return c};function wn(e,t){var n;return t.activeMeasureIndex>=0?n=e.pic.fields().filter(function(e){return"measure"===e.type()})[t.activeMeasureIndex]:"libraryItem"===t.type?n=e.pic.field(function(e){return e.raw().colorMapRef===t.key&&void 0!==t.key}):"expression"===t.type&&(n=e.pic.field(function(e){return"colorByAlternative"===e.raw().id})),n||(n=e.pic.field(function(e){return void 0!==e.raw().matchMeasure}))&&(n=e.pic.fields().filter(function(e){return"measure"===e.type()})[n.raw().matchMeasure]),n}function Sn(e){e.measureOverrides.every(function(e){return!e})&&(e.measureOverrides=null)}function Mn(e,t){for(var n=(null==t?void 0:t.domain)||[],r=(null==t?void 0:t.range)||[],i=[],o=0;o<e.length;++o){var a=e[o];if("constant"===(null==a?void 0:a.mode)){var s=n.indexOf(o);-1===s?(n.push(o),r.push(a.primary)):r[s]=a.primary,e[o]=null}else if(a){i.push(o);var l=n.indexOf(o);-1!==l&&(n.splice(l,1),r.splice(l,1))}}return{domain:n,range:r,exclude:i}}function kn(e,t,n,r){var i,o=function(e,t,n,r){if(t.input&&!t.input.auto){if("byMeasure"===t.input.mode)return function(e,t,n){var r=t.theme,i=t.hc,o=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).getCField,a=void 0===o?wn:o,s=n.input.byMeasureDef||{activeMeasureIndex:0},l=a(n,s),c=xn(0,{theme:r,hc:i},n,{f:l});if(c.invalid)return c;"expression"===s.type&&(s.activeMeasureIndex<0||void 0===s.activeMeasureIndex)&&(c.label=s.label,l&&"color.altLabel"===l.raw().labelExpRef&&(c.label=n.input.altLabel)),!c.label&&l&&(c.label=l.title());var u=s.activeMeasureIndex>=0?l:null;if(!u&&l&&void 0!==l.raw().matchMeasure&&l.raw().matchMeasure>-1&&(u=n.pic.fields().filter(function(e){return"measure"===e.type()})[l.raw().matchMeasure]),n.input.useMeasureGradient&&"libraryItem"===s.type)if(u){var d=u.raw().coloring;d&&d.gradient&&ct(c,vn(e,d.gradient,c,u))}else c.auxiliary=s;return c}(e,n,t);if("byDimension"===t.input.mode)return function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.getCDef,o=void 0===i?pt:i,a=r.getCByField,s=void 0===a?ht:a,l=r.getPersistence,c=void 0===l?ft:l,u=o(t,n),d=s(n,u),f=d?d.raw():{},p=n&&n.pic?n.pic.raw():{};if(f.qError||f.qSize&&0===f.qSize.qcy&&!p.qHasOtherValues)return{invalid:!0};var h={mode:"field",fieldType:"dimension",type:"categorical",field:d?d.key():void 0,isFieldLocked:f.qLocked};return("expression"===u.type||u.activeDimensionIndex<0)&&(h.label=u.label,"color.altLabel"===f.labelExpRef&&(h.label=n.input.altLabel)),!h.label&&d&&(h.label=d.title()),n.input.dimensionScheme&&(h.palettes={categorical:n.input.dimensionScheme}),n.input.useDimColVal&&"libraryItem"===u.type&&(h.auxiliary=u),ct(h,c(t,n,u,d,{byRow:dt,byElemNo:ut})),h}(e,n,t);if("byExpression"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,s=n.pic.field(function(e){return"colorByExpression"===e.raw().id});if(!s||!s.raw().qFallbackTitle&&!n.input.colorExpression||!(Number.isFinite(s.raw().qMin)&&Number.isFinite(s.raw().qMax)||n.input.expressionIsColor))return{mode:"constant",type:"constant",primary:r.nil};if(n.input.expressionIsColor)return{mode:"field",fieldType:"expression",field:s?s.key():void 0,type:"color"};var l=xn(0,{hc:i,theme:o},n,{f:s});return l.invalid||(l.label=n.input.expressionLabel||a.get("Object.ChartTooltip.ColorExpression")),l}(0,n,t,r);if("byMultiple"===t.input.mode||"primary"===t.input.mode)return function(e,t,n,r){var i=t.hc,o=t.theme,a=t.translator,s=n.input.useBaseColors;if(("byMultiple"===n.input.mode||"primary"===n.input.mode&&"measure"===n.input.useBaseColors)&&i.qMeasureInfo.length>1&&(s="measure"),"measure"===s){var l=[],c=[];"measure"===n.input.useBaseColors&&i.qMeasureInfo.forEach(function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){l.push(n);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?c.push(r.primary):c.push(i)}});var u=n.input.dimensionScheme?{categorical:n.input.dimensionScheme}:void 0,d=o?o.getDataColorPalettes()[0]:void 0;return"measure"===n.input.useBaseColors&&d&&(u={categorical:d.key}),{mode:"measure",type:"categorical",palettes:u,label:a?a.get("Common.Measures"):void 0,explicit:l.length?{domain:l,range:c}:void 0}}if("dimension"===s){var f=[],p=[];return i.qDimensionInfo.forEach(function(t,n){if(t.baseColor||t.coloring&&t.coloring.baseColor){f.push(n);var i=e.resolveUIColor(t.baseColor||t.coloring.baseColor);"none"===i?p.push(r.primary):p.push(i)}}),{mode:"dimension",type:"categorical",field:f.length?f[0]:void 0,explicit:f.length?{domain:f,range:p}:void 0}}var h=r.primary;if(void 0!==n.input.paletteColor)n.input.paletteColor&&(h=e.resolveUIColor(n.input.paletteColor));else{var m=n.input.singleColor;"number"!=typeof m||Number.isNaN(m)||(h=["#b0afae","#7b7a78","#545352","#4477aa","#7db8da","#b6d7ea","#46c646","#f93f17","#ffcf02","#276e27","#ffffff","#000000"][m])}return{mode:"constant",type:"constant",primary:h}}(e,n,t,r)}return{}}(e,t,n,r);return null!==(i=t.input)&&void 0!==i&&i.measureOverrides?(o.measureOverrides=t.input.measureOverrides.map(function(n,i){return function(e){var t,n=e.cm,r=e.defaults,i=e.index,o=e.input,a=e.pic;if(!o||!o.on)return null;var s=null!==(t=o.mode)&&void 0!==t?t:"primary";return"primary"===s?function(e,t,n){var r=n.primary;return void 0!==t.paletteColor&&t.paletteColor&&(r=e.resolveUIColor(t.paletteColor)),S(S({},n),{},{mode:"constant",type:"constant",primary:r})}(n,o,r):"byExpression"===s?function(e,t,n){var r="qMeasureInfo/".concat(e,"/"),i=t.field(function(e){return e.id().startsWith(r)&&"colorByMeasureExpression"===e.raw().id}),o=i;return S(S({},n),{},o?{mode:"field",fieldType:"expression",field:i?i.key():void 0,type:"color"}:{mode:"constant",type:"constant",primary:n.nil})}(i,a,r):null}({cm:e,input:n,defaults:r,index:i,pic:t.pic})}),function(e,t){var n,r,i,o=t.translator;if(Sn(e),1===(null===(n=e.measureOverrides)||void 0===n?void 0:n.length))return e.measureOverrides[0];if("measure"===e.mode&&e.measureOverrides&&(e.explicit=Mn(e.measureOverrides,e.explicit),Sn(e)),null!==(r=e.measureOverrides)&&void 0!==r&&r.every(function(e){return"constant"===(null==e?void 0:e.mode)})){var a={mode:"measure",type:"categorical",label:null==o?void 0:o.get("Common.Measures")};return a.explicit=Mn(e.measureOverrides),a}return null!==(i=e.measureOverrides)&&void 0!==i&&i.every(function(e){return e})?{invalid:!0,measureOverrides:e.measureOverrides}:e}(o,n)):o}var En=function(e,t){var n=e.fieldType,r={};if(t)if("measure"===n){var i=t.coloring;i&&(r.measureGradient=i.gradient)}else if("dimension"===n){var o=t[0],a=t[1];o&&(r.legendDataPage=o),a&&(r.dimValsData=a.colorMap)}return r},Cn=function(e){throw e.isHandled=!0,e};function An(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.auto,n=function(e){var t=S({hc:null,colorProps:null,layout:null,theme:null},e),n={},r={auto:function(){return{mode:"primary"}},getDimensionColorMap:function(){return Promise.reject()},getMeasure:function(){return Promise.reject()},getAttributeDimension:function(){return Promise.reject()}},i={auto:function(e){return e?(r.auto=e,i):r.auto},getDimensionColorMap:function(e){return e?(r.getDimensionColorMap=e,i):r.getDimensionColorMap},getAttributeDimension:function(e){return e?(r.getAttributeDimension=e,i):r.getAttributeDimension},getMeasure:function(e){return e?(r.getMeasure=e,i):r.getMeasure},set:function(e){var i;if(!e.colorProps)throw new Error('Missing "colorProps"');if(ct(t,e),(n={pic:t.picasso.data("q")({data:t.hc,config:{localeInfo:t.localeInfo}}),input:t.colorProps}).input.auto){var o=r.auto(e.layout);n.input=ct(!0,{},n.input,o,{auto:!1});var a=t.theme?t.theme.getDataColorPalettes():[];a[0]&&(n.input.dimensionScheme=a[0].key);var s=0;n.input.byDimDef&&+n.input.byDimDef.activeDimensionIndex>=0&&(s=+n.input.byDimDef.activeDimensionIndex),t.hc&&t.hc.qDimensionInfo[s]&&t.hc.qDimensionInfo[s].coloring&&t.hc.qDimensionInfo[s].coloring.colorMapRef&&n.input.byDimDef&&(n.input.byDimDef.type="libraryItem",n.input.byDimDef.key=t.hc.qDimensionInfo[s].coloring.colorMapRef)}null!==(i=n.input.measureOverrides)&&void 0!==i&&i.every(function(e){return!e||!e.on})&&(n.input=ct(!1,{},n.input,{measureOverrides:null}))},palettes:function(){if(!n.palettes){var e=t.theme,r=[];(e&&e.getDataColorPickerPalettes()||[]).forEach(function(e){r.push({key:"ui",colors:e.colors})}),n.palettes=r}return n.palettes},getAuxiliaryData:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/qHyperCubeDef";if(!e.auxiliary&&!/qAttrDimInfo/.test(e.field))return Promise.resolve();var i=(e.auxiliary||{}).key;if("measure"===e.fieldType)return r.getMeasure(i,t).catch(function(){});if("dimension"===e.fieldType){var o="".concat(n,"/").concat(e.field).replace("qDimensionInfo","qDimensions").replace("qAttrDimInfo","qAttributeDimensions");return Promise.all([/qAttrDimInfo/.test(e.field)?r.getAttributeDimension(o,t).catch(function(){}):Promise.resolve(),i?r.getDimensionColorMap(i,t).catch(function(){}):Promise.resolve()])}return Promise.resolve()},getAuxiliarySettings:function(e,r){var i=this;return e.auxiliary||/qAttrDimInfo/.test(e.field)?(this.palettes(),this.getAuxiliaryData(e,r).then(function(r){if(!r)return{};if("measure"===e.fieldType){if(r.coloring&&r.coloring.gradient){var o=n.pic.field(e.field);return vn(i,r.coloring.gradient,e,o)}return{}}if("dimension"===e.fieldType){var a={nil:e.nil,others:e.others},s=r[0],l=r[1]?r[1].colorMap:null;if(s){var c=t.picasso.data("q")({data:{qDimensionInfo:[n.pic.field(e.field).raw(),n.pic.field(e.field).raw()],qMeasureInfo:[],qDataPages:s,qInterColumnSortOrder:[0,1],qMode:"S"}});a.legendDataset=c}return l?function(e,t,n,r){var i=r.external,o=r.field,a=S({},e);ct(a,ut(o,o.raw().qCardinal));var s=i.theme?i.theme.getDataColorPalettes()[0]:null;return t.nul&&(a.nil=n.resolveUIColor(t.nul)),t.oth&&(a.others=n.resolveUIColor(t.oth)),t.usePal?(a.palettes={categorical:t.pal},s&&!t.pal&&(a.palettes.categorical=s.key,ct(a,ut(o)))):!1===t.autoFill&&t.single?a.range=[n.resolveUIColor(t.single)]:t.autoFill&&(s&&(a.palettes={categorical:s.key}),ct(a,ut(o))),t.colors&&t.colors.length&&(a.explicit=function(e,t,n){for(var r={},i=0;i<e.length;i+=1)r[e[i].value]=e[i].baseColor;var o=[];return{domain:function(e){var i=e.data,a=[];o=[];for(var s=0;s<i.items.length;s++){var l=i.items[s],c=(l.text||l).label;r[c]&&-1===a.indexOf(l.value)&&(a.push(l.value),o.push(t.resolveUIColor(r[c])))}return a.push(-3,-2),o.push(n.others),o.push(n.nil),a},range:function(){return o}}}(t.colors,n,a)),a}(a,l,i,{external:t,field:n.pic.field(e.field)}):a}return{}})):Promise.resolve()},resolveUIColor:function(e){if(e.index<0||void 0===e.index)return e.color;if(void 0===n.uiPalette&&(n.uiPalette=this.palettes().filter(function(e){return"ui"===e.key})[0]||!1),!n.uiPalette)return e.color;var t="none"===n.uiPalette.colors[0]?e.index:e.index-1;return void 0===n.uiPalette.colors[t]?e.color:n.uiPalette.colors[t]},settings:function(){if(this.palettes(),!n.settings){var e={primary:"steelblue",others:"#aaa",nil:"#ddd"},r=t.theme;r&&(e=S(S({},e),r.getDataColorSpecials())),n.settings=ct(e,kn(this,n,t,e))}return n.settings}};return i}(e.resources).auto(t||function(){return{mode:"byDimension",persistent:!1,useDimColVal:!0,byDimDef:{activeDimensionIndex:0,type:"expression",label:""}}}).getDimensionColorMap(function(e,t){return function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.dimValsData?Promise.resolve({colorMap:n.snapshotData.content.chartData.dimValsData}):Promise.reject():r&&r.getObject?r.getObject("ColorMapModel_".concat(e)).then(function(e){return e.getLayout()}):Promise.reject()}(e,{layout:t.layout,app:t.app})}).getMeasure(function(e,t){return function(e,t){var n=t.layout,r=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.measureGradient?Promise.resolve({coloring:{gradient:n.snapshotData.content.chartData.measureGradient}}):Promise.reject():r&&r.getMeasure?r.getMeasure(e).then(function(e){return e.getMeasure()}):Promise.reject()}(e,{layout:t.layout,app:t.app})}).getAttributeDimension(function(e,t){return function(e,t){var n=t.layout,r=t.model,i=t.app;return n&&n.snapshotData?n.snapshotData.content&&n.snapshotData.content.chartData&&n.snapshotData.content.chartData.legendDataPage?Promise.resolve(n.snapshotData.content.chartData.legendDataPage):Promise.reject():r&&r.session&&i?r.getHyperCubeData(e,[{qHeight:100,qLeft:0,qTop:0,qWidth:2}]).catch(Cn):Promise.reject()}(e,{layout:t.layout,model:t.model,app:t.app})});return n.getSnapshotData=En,n}function Dn(e){return function(t){return"object"===D(t.datum[e])?t.datum[e].value:void 0}}function qn(e){return"object"===D(e.datum.isNull)?e.datum.isNull.value:-2===e.datum.value}function _n(e){return-3===e.datum.value}var Tn={COLOR:void 0,FONT_SIZE:"16px",FONT_FAMILY:"'Source Sans Pro', 'Arial', 'sans-serif'"},Nn={COLOR:void 0,FONT_SIZE:void 0,FONT_FAMILY:"'Source Sans Pro', 'Arial', 'sans-serif'"},On="legend.title",In="legend.label";function Ln(e){var t=e.theme,n=e.key,r=e.styleOverrides,i={title:{color:Tn.COLOR,fontSize:Tn.FONT_SIZE,fontFamily:Tn.FONT_FAMILY},label:{color:Nn.COLOR,fontSize:Nn.FONT_SIZE,fontFamily:Nn.FONT_FAMILY}};if(!t&&!r)return i;var o=r||{},a=o.title,s=o.label,l=function(e){var t=e.theme,n=e.key;return function(e,r,i,o){return void 0!==e?e:t?t.getStyle(n,r,i):o}}({theme:t,key:n});return i.title.color=l(null==a?void 0:a.color,On,"color",Tn.COLOR),i.title.fontSize=l(null==a?void 0:a.fontSize,On,"fontSize",Tn.FONT_SIZE),i.title.fontFamily=l(null==a?void 0:a.fontFamily,On,"fontFamily",Tn.FONT_FAMILY),i.label.color=l(null==s?void 0:s.color,In,"color",Nn.COLOR),i.label.fontSize=l(null==s?void 0:s.fontSize,In,"fontSize",Nn.FONT_SIZE),i.label.fontFamily=l(null==s?void 0:s.fontFamily,In,"fontFamily",Nn.FONT_FAMILY),i}var Pn=function(e,t,n){var r=e&&e.dock||void 0;if("auto"!==r)return r||"right";if(t){var i=t.element.getBoundingClientRect();if(i.height>i.width)return"bottom"}return n?"left":"right"},Rn=function(e,t,n){return!(n.invalid||"color"===n.type||"measure"===n.mode&&t.qMeasureInfo.length<=1||"dimension"===n.mode)&&("function"==typeof e.show?e.show():!1!==e.show)};function zn(e,t){var n=e.styleReference,r=e.styleOverrides,i=e.chart,o=e.rtl,a=t.legendProps,s=t.coloring,l=t.theme,c=t.hc,u=Ln({theme:l,key:n,styleOverrides:r});return{layout:{minimumLayoutMode:"MEDIUM",dock:Pn(a,i,o)},show:"function"==typeof a.show?function(){return Rn(a,c,s)}:Rn(a,c,s),renderer:"svg",mounted:function(e){e.childNodes[0].style.pointerEvents="none",e.style.overflow="hidden"},settings:{title:{show:!1!==a.showTitle,wordBreak:"break-word",maxLines:2,lineHeight:1.2,text:s.label||"",fill:u.title.color,fontSize:u.title.fontSize,fontFamily:u.title.fontFamily}}}}function Fn(e,t,n){var r=[],i=[],o=function(e,t,n){return"categorical"===t.coloring.type?function(e,t,n){var r=zn(e,t);if(!r.show)return!1;var i,o=e.key,a=e.styleReference,s=e.styleOverrides,l=e.viewState,c=e.rtl,u=e.settings,d=e.style,f=t.scaleKey,p=t.theme,h=t.scales,m=Ln({theme:p,key:a,styleOverrides:s}),g=r.layout.dock,y="left"===g||"right"===g?{maxLines:2,wordBreak:"break-word"}:{},v={up:"M13.6,11 L2.4,11 C2.28954305,11 2.2,10.9104569 2.2,10.8 C2.2,10.756726 2.21403557,10.7146192 2.24,10.68 L7.84,3.21333333 C7.90627417,3.12496777 8.03163444,3.10705916 8.12,3.17333333 C8.13516113,3.18470418 8.14862915,3.1981722 8.16,3.21333333 L13.76,10.68 C13.8262742,10.7683656 13.8083656,10.8937258 13.72,10.96 C13.6853808,10.9859644 13.643274,11 13.6,11 Z",down:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z",left:"M11,2.4 L11,13.6 C11,13.7104569 10.9104569,13.8 10.8,13.8 C10.756726,13.8 10.7146192,13.7859644 10.68,13.76 L3.21333333,8.16 C3.12496777,8.09372583 3.10705916,7.96836556 3.17333333,7.88 C3.18470418,7.86483887 3.1981722,7.85137085 3.21333333,7.84 L10.68,2.24 C10.7683656,2.17372583 10.8937258,2.19163444 10.96,2.28 C10.9859644,2.31461923 11,2.35672596 11,2.4 Z",right:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z"};"dimension"===t.coloring.fieldType&&(i=function(e){return e.datum.value>=0||-3===e.datum.value});var b="".concat(f,"Legend");return ct(!0,r,{type:"legend-cat",key:"".concat(o,"-cat"),scale:b in h?b:f,settings:{layout:{scrollOffset:function(){return l?l.get("legendScrollOffset"):void 0},size:-1!==["top","bottom"].indexOf(r.layout.dock)?2:1,direction:c?"rtl":"ltr",horizontal:20},item:{show:i,label:S({fill:m.label.color,fontSize:m.label.fontSize,fontFamily:m.label.fontFamily},y)},navigation:{disabled:n,button:{content:function(e,t){var n=t.direction;return e("i",{style:{"pointer-events":"none",fontSize:"12px",display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizelegibility",margin:"0px"}},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor"},[e("path",{d:v[n]})])])}}}},brush:{consume:[{context:"selection",data:["",o],style:{inactive:{opacity:.3}}}]}},{settings:u,style:d})}(e,t,n):"continuous"===t.coloring.type&&function(e,t){var n,r=e.key,i=e.styleReference,o=e.styleOverrides,a=e.rtl,s=e.settings,l=e.style,c=t.scaleKey,u=t.theme,d="".concat(c,"Range"),f=zn(e,t);if(!f.show)return!1;var p=Ln({theme:u,key:i,styleOverrides:o}),h=f.layout.dock,m="right"===h||"left"===h,g=null===(n=t.scales)||void 0===n?void 0:n[d];return m&&g&&(g.invert=!0),ct(!0,f,{type:"legend-seq",key:"".concat(r,"-seq"),settings:{fill:c,major:d,length:1,tick:{fill:p.label.color,fontSize:p.label.fontSize,fontFamily:p.label.fontFamily},title:{anchor:!a||"top"!==f.layout.dock&&"bottom"!==f.layout.dock?void 0:"right",padding:parseFloat(f.settings.title.fontSize)||16}}},{settings:s,style:l})}(e,t)}(e,t,n&&n.navigationDisabled);return r.push(o),o&&"legend-cat"===o.type&&(i.push(function(e){var t=e.key,n=e.requireFailure,r=e.recognizeWith,i=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:tap-".concat(t),type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"legendtap",interval:10,pointers:1,enable:function(e,n){var r;if(!n)return!0;if(null!=i&&null!==(r=i.interact)&&void 0!==r&&r.enabled&&!i.interact.enabled())return!1;if(!this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some(function(e){return e.key==="".concat(t,"-cat")}))return!1;var o=n.srcEvent.target;return!!(o&&o.hasAttribute("data-action")&&o.hasAttribute("data-component-key"))||!(!o||!o.childNodes[0]||"BUTTON"!==o.childNodes[0].nodeName)}},events:{legendtap:function(e){e.preventDefault();var t=e.srcEvent.target;t&&t.hasAttribute("data-action")&&t.hasAttribute("data-component-key")&&this.chart.component(t.getAttribute("data-component-key")).emit(t.getAttribute("data-action"))}}}}(e,n)),i.push(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,n=e.key,r=e.requireFailure,i=e.recognizeWith,o=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).actions;return{key:"event:pan-".concat(n),type:"Pan",requireFailure:r,recognizeWith:i,options:{event:t,pointers:1,threshold:10,enable:function(e,r){var i;return this.started===t||!r||!(null!=o&&null!==(i=o.interact)&&void 0!==i&&i.enabled&&!o.interact.enabled())&&this.chart.componentsFromPoint({x:r.center.x,y:r.center.y}).some(function(e){return e.key==="".concat(n,"-cat")})}},events:x(x(x({},"".concat(t,"start"),function(e){e.preventDefault(),this.started!==t&&(this.started=t,this.chart.component("".concat(n,"-cat")).emit("panstart",e))}),"".concat(t,"move"),function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panmove",e)}),"".concat(t,"end"),function(e){e.preventDefault(),this.chart.component("".concat(n,"-cat")).emit("panend",e),this.started=!1})}}(e,n))),{interactions:i,components:r}}var jn=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function Vn(e){var t=e.qHyperCube,n=t.qDimensionInfo,r=t.qMeasureInfo,i=n.some(jn),o=r.some(jn),a=e.color.useBaseColors;return"measure"===a&&!o||"dimension"===a&&!i?"off":a}var Hn=function(e){return e.baseColor||e.coloring&&e.coloring.baseColor};function Bn(e){var t,n=e.qHyperCube.qDimensionInfo.some(Hn),r=e.qHyperCube.qMeasureInfo.some(Hn),i=n?"dimension":void 0;return{mode:"primary",useBaseColors:null!==(t=null!=i?i:r?"measure":void 0)&&void 0!==t?t:"off",paletteColor:null}}var $n=function(){};function Wn(e){var t,n,r,i,o=e.picasso,a=e.model,s=e.app,l=e.translator,c=e.layoutService,u=void 0===c?void 0:c,d=e.createConfig,f=void 0===d?$n:d,p=e.config,h=void 0===p?{}:p,m=e.custom,g=void 0===m?{}:m,y=h.localeInfo,v=h.key,b=h.theme,w=void 0===b?void 0:b,M=h.auto,k=void 0===M?void 0:M,E=h.definitionPath,C=null==u||null===(t=u.getLayout)||void 0===t?void 0:t.call(u),D={theme:w,key:v,localeInfo:y,layout:C,hc:null==u||null===(n=u.getHyperCube)||void 0===n?void 0:n.call(u),legendProps:null==u||null===(r=u.getLayoutValue)||void 0===r?void 0:r.call(u,"legend"),colorProps:S(S({},null==u||null===(i=u.getLayoutValue)||void 0===i?void 0:i.call(u,"color")),{},{useBaseColors:C?Vn(C):void 0})},q=function(e){var t=An({resources:e}),n={},r={},i=function(e){return r.settings||(e||console.warn("settings() called before auxiliarySettings()"),r.settings=t.settings()),r.settings},o={config:function(i){if(n=S({},i),r={},!n.key)throw new Error("Missing key");t.set(S(S({},e),n))},auto:function(e){return e?(t.auto(e),o):t.auto()},getAuxiliarySettings:function(e){return r.auxiliarySettings?Promise.resolve(r.auxiliarySettings):t.getAuxiliarySettings(i(!0),e).then(function(e){return r.auxiliarySettings=e||{},r.settings=S(S({},r.settings),r.auxiliarySettings),r.scales=void 0,r.color=void 0,r.auxiliarySettings})},getAuxiliaryData:function(){return t.getAuxiliaryData(i())},getSnapshotData:function(e){var n=i();return t.getAuxiliaryData(n,e).then(function(e){return t.getSnapshotData(n,e)})},resolveUIColor:function(e){return t.resolveUIColor(e)},settings:function(){var e=i();return{mode:e.mode,type:e.type,label:e.label,field:e.field,fieldType:e.fieldType,nil:e.nil,others:e.others,primary:e.primary}},settingsForMeasure:function(e){var t;return(null===(t=i().measureOverrides)||void 0===t?void 0:t[e])||this.settings()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return function(e,t){var n=t.isMeasureSelectionLocked;return"field"!==e.mode||("dimension"===e.fieldType?e.isFieldLocked:"measure"!==e.fieldType||n)}(i(),{isMeasureSelectionLocked:t})},palettes:function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.colorProps,n=e.coloring,r=e.theme,i=[];if(n&&n.palettes&&r){var o=n.palettes.categorical||t.dimensionScheme,a=r.getDataColorPalettes().filter(function(e){return e.key===o})[0]||r.getDataColorPalettes()[0];o&&a&&i.push({key:"categorical",colors:a.colors});var s=n.palettes.metric||t.measureScheme,l=r.getDataColorScales().filter(function(e){return e.key===s})[0]||r.getDataColorScales()[0];if(l){var c=l.colors[0]?l.colors:[[]].concat(A(l.colors.slice(1)));c=Array.isArray(c[0])?c.map(function(e){return e.slice().reverse()}):c.slice().reverse(),i.push({key:"quant",colors:c})}}return i}({coloring:i(),colorProps:n.colorProps,theme:n.theme})},scales:function(){return r.scales=r.scales||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.hc,n=e.coloring,r=e.rtl,i=e.key,o=e.source,a=e.picasso,s={},l=i;if(n){var c={override:!0,domain:n.explicit&&"function"==typeof n.explicit.domain?n.explicit.domain:[].concat(A((n.explicit||{}).domain||[]),[-3,-2]),range:n.explicit&&"function"==typeof n.explicit.range?n.explicit.range:[].concat(A((n.explicit||{}).range||[]),[n.others,n.nil])};if("field"===n.mode){if("dimension"===n.fieldType){var u,d=function(e){var t=e.hc,n=e.coloring,r={data:{extract:[{source:"dummy",field:0,filter:function(){return r.expando=t.qDataPages[0]?t.qDataPages[0].qArea.qTop:0,!1}},{source:e.source,field:n.field,trackBy:n.valueAccessor,reduce:"first",props:{row:{reduce:function(){return r.expando++}},text:{value:function(e){return e.qText},reduce:"first"}}}]},expando:0};return r}({hc:t,source:o,coloring:n}),f=d.data;if(n.legendDataset){var p=0,h={};a.data("q")({data:t}).extract({field:n.field,trackBy:n.valueAccessor,reduce:function(e){var t=e[0];return h[t]=p++,e[0]}}),u={source:"attrDim",extract:{field:"qDimensionInfo/0",filter:function(e){return e.qElemNumber>=0},props:{row:{value:function(e){return h[e.qElemNumber]}}}}}}var m={data:f,range:n.range,domain:n.domain,explicit:c,type:"categorical-color",label:function(e){return e.datum.text&&e.datum.text.value?e.datum.text.value:e.datum.label}};s[l]=m,u&&(s["".concat(l,"Legend")]=S(S({},m),{},{data:u})),t&&t.qHasOtherValues&&u&&((u||m.data).amend=[{label:t.qDimensionInfo[0].othersLabel,source:{key:"qHyperCube",field:"qDimensionInfo/0"},row:{value:-3},value:-3}])}else if("measure"===n.fieldType){var g={data:{field:n.field},min:n.min,max:n.max};s[l]=ct({},g,{type:"categorical"===n.type?"threshold-color":"sequential-color",range:n.range,domain:n.domain,invert:n.reverse}),"sequential-color"===s[l].type&&(s["".concat(l,"Range")]=ct({},g,{invert:!!r}))}else if("color"!==n.type)throw new Error("UNUSED FIELD")}else if("dimension"===n.mode){var y={data:t.qDimensionInfo.map(function(e,t){return t}),label:function(e){return t.qDimensionInfo[e.datum.value].qFallbackTitle},explicit:c,type:"categorical-color"};s[l]=y}else if("measure"===n.mode){var v={data:t.qMeasureInfo.map(function(e,t){return t}).filter(function(e){var t;return!(null!==(t=n.explicit)&&void 0!==t&&null!==(t=t.exclude)&&void 0!==t&&t.includes(e))}),label:function(e){return t.qMeasureInfo[e.datum.value].qFallbackTitle},explicit:c,type:"categorical-color"};s[l]=v}}return s}({hc:n.hc,coloring:i(),key:n.key,source:n.source,picasso:e.picasso}),r.scales},color:function(){return r.color=r.color||function(e){var t=e.coloring,n=e.scales,r=e.key,i=Dn(r),o=Dn("".concat(r,"IsAnOther")),a=function(e,t){var r=e.fieldType,a=e.invalid,s=e.mode,l=e.nil,c=e.others,u=e.primary,d=e.type;return a?function(e){return _n(e)||o(e)?c:l}:n[t]?function(e){return _n(e)?c:qn(e)||-2===i(e)&&"dimension"===r||"NaN"===i(e)?l:o(e)?c:e.resources.scale(t)(i(e))||c}:"constant"===s?function(e){return _n(e)||o(e)?c:qn(e)?l:u}:"color"===d?function(e){return _n(e)||o(e)?c:qn(e)?l:i(e)||c}:null},s=a(t,r);if(t.measureOverrides){var l=Dn("".concat(r,"MeasureIdx")),c=t.measureOverrides.map(function(e){return e&&a(e)});return function(e){var t=l(e);return c[t]?c[t](e):s(e)}}return s}({coloring:i(),scales:this.scales(),key:n.key}),r.color},datumProps:function(e){return function(e){var t,n,r=e.hc,i=e.coloring,o=e.scales,a=e.key,s=e.addMeasureIx,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,c=a,u=i.nil;"field"===i.mode&&i.field?t=i.field:o[a]&&"field"===i.mode&&(t=o[a].data.field||i.field),t?(n={field:t,reduce:"first"},"color"===i.type&&(n.value=function(e){return"NaN"!==e.qNum?(t=e.qNum,"rgba(".concat([(16711680&t)>>16,(65280&t)>>8,255&t,((4278190080&t)>>>24)/255].join(","),")")):e.qText&&Ot(e.qText)?e.qText:u;var t})):"dimension"===i.mode?n=void 0!==i.field?i.field:r.qDimensionInfo.length-1:"measure"===i.mode&&(n=l);var d=x({},c,n);return r.qDimensionInfo.length>1&&(d["".concat(c,"IsAnOther")]={fields:r.qDimensionInfo.map(function(e,t){return{field:"qDimensionInfo/".concat(t)}}),value:function(e){return-1!==e.indexOf(-3)}}),s&&(d["".concat(c,"MeasureIdx")]=l),d}({coloring:this.settingsForMeasure(e),scales:this.scales(),key:n.key,hc:n.hc,addMeasureIx:i().measureOverrides},e)},data:function(){var e=i(),t={key:"dummy",data:[["field"],["a"]]};return e.legendDataset?[t,{type:"q",key:"attrDim",data:e.legendDataset.raw(),config:{localeInfo:n.localeInfo}}]:[t]},legend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.eventName,r=e.key,o=e.viewState,a=e.chart,s=e.rtl,l=e.styleReference,c=void 0===l?"object.legend":l,u=e.styleOverrides,d=e.settings,f=void 0===d?{}:d,p=e.style,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Fn({eventName:t,key:r,rtl:s,viewState:o,chart:a,styleReference:c,styleOverrides:u,settings:f,style:void 0===p?{}:p},{legendProps:n.legendProps,scaleKey:n.key,coloring:i(),theme:n.theme,hc:n.hc,scales:this.scales()},h)}};return o}({picasso:o,model:a,app:s,translator:l,auto:k});!1!==k&&q.auto(function(e){return k?k({layout:e,defaultAuto:Bn}):Bn(e)});var _=!1,T={getColor:function(){return q.color()},getPaletteColor:function(e){var t=e.index,n=e.color;return q.resolveUIColor({index:t,color:n})},getData:function(){return q.data()},getDatumProps:function(e){return q.datumProps(e)},getSnapshotData:function(){return q.getSnapshotData(E)},getSettingsForMeasure:function(e){return q.settingsForMeasure(e)},getSettings:function(){return q.settings()},getLegend:function(e,t){return q.legend(e,t)},getScales:function(){return q.scales()},getPalettes:function(){return q.palettes()},isSelectionLocked:function(e){var t=e.isMeasureSelectionLocked;return q.isSelectionLocked({isMeasureSelectionLocked:t})},isInitialized:function(){return _},custom:S({},g),initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).createConfig,t=(void 0===e?f:e)({getUseBaseColors:Vn}),n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return S(S(S({},e),t),{},{colorProps:S(S({},e.colorProps),t.colorProps||{})})}(D,t);return q.config(n),q.getAuxiliarySettings(E).then(function(){_=!0})}};return T}var Un="center",Yn="bottom",Xn=[{key:"NoDataExist",alignment:Un,condition:function(e){var t=e.layoutService;if(!t)return!1;var n=t.meta.size;return n.x*n.y===0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:Un,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every(function(e){return"NaN"===e.qMin&&"NaN"===e.qMax})}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:Un,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:Un},{key:"DataRangeIncludingZero",alignment:Yn},{key:"LimitedData",alignment:Yn},{key:"NegativeOrZeroValues",alignment:Yn}].reduce(function(e,t){return e[t.key]=t,e},{}),Gn=function(){return!1};function Kn(e){var t=e.chart,n=e.logicalSize;if(n)return n;var r=t?t.element.getBoundingClientRect():{};return{width:r.width,height:r.height}}var Zn=[{key:"FULL",size:{width:550,height:450}},{key:"MEDIUM",size:{width:400,height:220}},{key:"SMALL",size:{width:300,height:150}},{key:"XSMALL",size:{width:150,height:75}}];function Jn(e){var t=e.width,n=e.height,r=Zn.filter(function(e){return t>=e.size.width&&n>=e.size.height}).shift();return r?r.key:"SPARK"}var Qn={left:"right",right:"left",top:"bottom",bottom:"top",near:"far",far:"near"};function er(e){var t=e.orientation,n=e.dock,r=e.btt,i=e.rtl,o="horizontal"===t?function(e){return"bottom"===e||"near"===e?"bottom":"top"}(n):function(e,t){var n="left"===e||"near"===e?"left":"right";return t?Qn[n]:n}(n,i),a=function(e,t,n){return"vertical"===e?t?"bottom":"top":n?"right":"left"}(t,r,i);return{current:o,opposite:Qn[o],start:a,end:Qn[a]}}function tr(e){var t=e.chart,n=e.layoutService,r=e.config,i=void 0===r?{}:r,o=i.logicalSize,a=void 0!==o&&o,s=i.rtl,l=void 0!==s&&s,c={chart:{size:void 0,mode:void 0},x:{dock:void 0,opposite:void 0,size:void 0},y:{dock:void 0,opposite:void 0,size:void 0}},u={type:"x-y",config:S({},i),meta:c,update:function(e){c.chart.size={width:e.width,height:e.height},c.chart.mode=Jn(e);var t=er({orientation:"horizontal",dock:n.getLayoutValue("xAxis.dock"),btt:!1,rtl:l}),r=t.current,i=t.opposite;c.x.dock=r,c.x.opposite=i,c.x.size=e.width;var o=er({orientation:"vertical",dock:n.getLayoutValue("yAxis.dock"),btt:!0,rtl:l}),a=o.current,s=o.opposite;c.y.dock=a,c.y.opposite=s,c.y.size=e.height}};return u.update(Kn({chart:t,logicalSize:a})),u}var nr="vertical",rr="horizontal";function ir(e){var t=e.chart,n=e.layoutService,r=e.config,i=void 0===r?{}:r,o=e.typeConfig,a=void 0===o?{}:o,s=i.logicalSize,l=void 0!==s&&s,c=i.rtl,u=void 0!==c&&c,d=a.fallback===nr?nr:rr,f=!!a.invert,p=a.measureAxes||[{ref:"measureAxis",name:"minor"}],h={chart:{orientation:void 0,size:void 0,mode:void 0},major:{orientation:void 0,dock:void 0,opposite:void 0,size:void 0}},m={type:"major-minor",config:S({},i),meta:h,update:function(e){h.chart.orientation=n.getLayoutValue("orientation",d),h.chart.size={width:e.width,height:e.height},h.chart.mode=Jn(e),h.major.orientation=function(e){var t=e.chartOrientation,n=e.invert;return e.layoutService.meta.isContinuous?rr:n?t===nr?rr:nr:t}({layoutService:n,chartOrientation:h.chart.orientation,invert:f});var t=er({orientation:h.major.orientation,dock:n.getLayoutValue("dimensionAxis.dock"),btt:!1,rtl:u}),r=t.current,i=t.opposite;h.major.dock=r,h.major.opposite=i,h.major.size=h.major.orientation===nr?e.height:e.width,p.forEach(function(t){var r={};r.orientation=h.major.orientation===nr?rr:nr;var i=er({orientation:r.orientation,dock:n.getLayoutValue("".concat(t.ref,".dock")),btt:!0,rtl:u}),o=i.current,a=i.opposite,s=i.start,l=i.end;r.dock=o,r.opposite=a,r.start=s,r.end=l,r.size=r.orientation===nr?e.height:e.width,h[t.name]=r})}};return m.update(Kn({chart:t,logicalSize:l})),m}function or(e){var t=e.chart,n=e.layoutService,r=e.config,i=void 0===r?{}:r,o=e.typeConfig,a=void 0===o?{}:o;return("x-y"===a.type?tr:ir)({chart:t,layoutService:n,config:i,typeConfig:a})}function ar(e,t,n){if(void 0===e||void 0===t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(void 0===i[a])return n;i=i[a]}return i}var sr=["__proto__","constructor"];function lr(e,t,n){if(void 0!==e&&void 0!==t){var r=t.split("."),i=r[r.length-1];if(!sr.some(function(e){return r.includes(e)})){for(var o=e,a=0;a<r.length-1;++a){var s=r[a];void 0===o[s]&&(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}}}function cr(){var e={};return{get:function(t){return e[t]},set:function(t,n){return e[t]=n,n},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}function ur(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];clearTimeout(t),t=setTimeout(function(){return e.apply(r,o)},n)}}var dr={ERROR_CODES:[7005],DIMENSION:"qDimensionInfo",MEASURE:"qMeasureInfo"},fr=function(e,t){return e[t].reduce(function(e,t,n){var r;return r=t,dr.ERROR_CODES.some(function(e){var t;return e===(null===(t=r.qError)||void 0===t?void 0:t.qErrorCode)})?e.filtered.push(n):e.reduced.push(t),e},{reduced:[],filtered:[]})};function pr(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[]).map(function(e){var t,n=null===(t=e.qCardinalities)||void 0===t?void 0:t.qHypercubeCardinal;if(n)return n;var r=e.qStateCounts||{},i=r.qLocked,o=void 0===i?0:i,a=r.qOption,s=void 0===a?0:a,l=r.qSelected;return o+s+(void 0===l?0:l)})}function hr(e){switch(e.qHyperCube.qMode){case"S":return function(e){var t=e.qHyperCube.qSize;return{refs:{dataPages:"qHyperCube.qDataPages"},size:{x:t.qcx,y:t.qcy,dimensions:pr(e)}}}(e);case"K":return function(e){var t=pr(e);return{refs:{dataPages:"qHyperCube.qStackedDataPages"},size:{x:e.qHyperCube.qSize.qcx,y:t[0],dimensions:t}}}(e);case"T":return function(e){var t=pr(e);return{refs:{dataPages:"qHyperCube.qTreeDataPages"},size:{x:e.qHyperCube.qSize.qcx,y:t[0],dimensions:t}}}(e);default:throw new Error("Mode not supported")}}function mr(e){var t=e.originalArray,n=e.newArray,r=e.matchKey;return Array.isArray(t)&&t.length?(n.forEach(function(e){var n=-1;t.some(function(t,i){return t[r]&&t[r]===e[r]&&(n=i),n}),n>-1?t[n]=e:t.push(e)}),t):n}function gr(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function vr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yr(Object(n),!0).forEach(function(t){gr(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yr(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var br=Object.prototype.hasOwnProperty,xr=Object.prototype.toString,wr=Object.defineProperty,Sr=Object.getOwnPropertyDescriptor,Mr=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===xr.call(e)},kr=function(e){if(!e||"[object Object]"!==xr.call(e))return!1;var t,n=br.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&br.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||br.call(e,t)},Er=function(e,t){wr&&"__proto__"===t.name?wr(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Cr=function(e,t){if("__proto__"===t){if(!br.call(e,t))return;if(Sr)return Sr(e,t).value}return e[t]},Ar=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=Cr(s,n),s!==(i=Cr(t,n))&&(u&&i&&(kr(i)||(o=Mr(i)))?(o?(o=!1,a=r&&Mr(r)?r:[]):a=r&&kr(r)?r:{},Er(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&Er(s,{name:n,newValue:i}));return s};function Dr(e,t,n,r){if(!e)return-1;const i=n.cache,o=e.origin?e.origin():null;o&&(e=o);let a=i.fields.indexOf(e),s=-1,l=-1;if(-1===a)for(let t=0;t<i.wrappedFields.length;t++)if(l=i.wrappedFields[t].attrDims.map(e=>e.instance).indexOf(e),s=i.wrappedFields[t].attrExps.map(e=>e.instance).indexOf(e),-1!==l||-1!==s){a=t;break}if(Array.isArray(r)&&r.some((e,t)=>e!==t)){const e=r.indexOf(a);-1!==e&&(a=e)}return a-=t.qArea.qLeft,a<0||a>=t.qArea.qWidth?-1:l>=0?e=>e[a].qAttrDims.qValues[l]:s>=0?e=>e[a].qAttrExps.qValues[s]:e=>e[a]}function qr(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function _r(e){let{cache:t,f:n,mainCell:r,p:i,page:o,rowIdx:a,row:s,sourceKey:l,target:c,targetProp:u,columnOrder:d}=e,f=r;if(i.field&&i.field!==n){const e=Dr(i.field,o,{cache:t},d);if(-1===e)return;f=Ar({qRow:a},e(s))}c[u]=qr(i,f,{key:l})}function Tr(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let e=0;e<i.length;e++)if(void 0!==i[e].field){const a=t.raw(),s=t.key(),l="object"==typeof i[e].field?i[e].field:t.field(i[e].field),{props:c,main:u}=r.normalizeConfig(i[e],t),d=Object.keys(c),f=!!i[e].trackBy,p=typeof i[e].trackBy,h={},m=[],g=[];for(let t=0;t<a.qDataPages.length;t++){const o=Dr(l,a.qDataPages[t],{cache:n},a.qColumnOrder);if(-1!==o)for(let y=0;y<a.qDataPages[t].qMatrix.length;y++){const v=a.qDataPages[t].qArea.qTop+y,b=Ar({qRow:v},o(a.qDataPages[t].qMatrix[y])),x=qr(u,b,{key:s});if(!u.filter||u.filter(b)){for(let e=0;e<d.length;e++){const r=c[d[e]];let i=r.fields||[r];r.fields&&(x[d[e]]=[]);for(let o=0;o<i.length;o++)_r({cache:n,f:l,mainCell:b,p:i[o],prop:d[e],page:a.qDataPages[t],rowIdx:v,row:a.qDataPages[t].qMatrix[y],sourceKey:s,target:r.fields?x[d[e]]:x,targetProp:r.fields?o:d[e],columnOrder:a.qColumnOrder});if(r.fields){const t=x[d[e]].map(e=>e.value),n=x[d[e]].map(e=>e.label);x[d[e]]={value:"function"==typeof r.value?r.value(t):void 0!==r.value?r.value:t,label:"function"==typeof r.label?r.label(n):void 0!==r.label?String(r.label):String(x[d[e]].value)}}}f&&r.track({cfg:i[e],itemData:b,obj:x,target:m,tracker:h,trackType:p}),g.push(x)}}}const y=f?r.collect(m,{main:u,propsArr:d,props:c}):g;o=[...o,...y]}return o}function Nr(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function Or(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Lr)):void 0===t&&(t=Ir);for(var n,r,i,o,a,s=new zr(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new zr(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Rr)}function Ir(e){return e.children}function Lr(e){return Array.isArray(e)?e[1]:null}function Pr(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function Rr(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function zr(e){this.data=e,this.depth=this.height=0,this.parent=null}function Fr(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}zr.prototype=Or.prototype={constructor:zr,count:function(){return this.eachAfter(Nr)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},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,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function(){return Or(this).eachBefore(Pr)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}};var jr={depth:-1},Vr={},Hr={};function Br(e){return e.id}function $r(e){return e.parentId}function Wr(e){let t=e.length;if(t<2)return"";for(;--t>1&&!Ur(e,t););return e.slice(0,t)}function Ur(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}function Yr(e,t){"/"===e.charAt(0)&&(e=e.substring(1));const n=e.split("/");let r,i=t;for(let e=0;e<n.length;e++){if("*"===n[e]&&Array.isArray(i)){const t=[];r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++){let n=Yr(r,i[e]);Array.isArray(n)?t.push(...n):t.push(n)}return t}if(!n[e]&&Array.isArray(i)){const t=new Array(i.length);r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++)t[e]=Yr(r,i[e]);return t}n[e]in i&&(i=i[n[e]])}return i}function Xr(e,t,n){let r=[];if(!e||!e.length)return r;if(t<=0){const t=n>=0?[e[n]]:e;r=[...r,...t]}else for(let i=0;i<e.length;i++)e[i].children&&e[i].children.length&&(r=[...r,...Xr(e[i].children,t-1,n)]);return r}function Gr(e,t,n){if(e===t)return e=>e;if(e>t){const n=Math.max(0,Math.min(100,e-t));return e=>{let t=e;for(let e=0;e<n;++e)t=t.parent;return t}}if(t>e){const r=Math.max(0,Math.min(100,t-e));return e=>Xr(e.children,r-1,n)}return!1}const Kr=/^qDimensionInfo(?:\/(\d+))?/,Zr=/^\/?qMeasureInfo\/(\d+)/,Jr=/\/qAttrExprInfo\/(\d+)/,Qr=/\/qAttrDimInfo\/(\d+)/;function ei(e){return(e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map((e,t)=>t)).filter(t=>t<e.qDimensionInfo.length)}function ti(e,t){let{cube:n}=t;if(!e)return-1;let r=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,s=-1,l=-1,c=-1,u=-1,d=r;const f=n.qEffectiveInterColumnSortOrder,p=ei(n);return Kr.test(d)&&(i=!0,o=+Kr.exec(d)[1],d=r.replace(Kr,"")),Zr.test(d)&&("K"===n.qMode?c=+Zr.exec(d)[1]:f&&-1!==f.indexOf(-1)?(c=+Zr.exec(d)[1],u=0):u=+Zr.exec(d)[1],d=d.replace(Zr,"")),d&&(Qr.exec(d)?s=+Qr.exec(d)[1]:Jr.exec(d)&&(a=+Jr.exec(d)[1])),l=i?"S"===n.qMode?p[o]:f?f.indexOf(o):o:f&&-1!==f.indexOf(-1)?f.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1),{fieldDepth:l+1,pseudoMeasureIndex:c,measureIdx:u,attrDimIdx:s,attrIdx:a}}function ni(e,t){let n,r,i=Gr(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?e=>e.data.qValues[t.measureIdx]:e=>e.data,t.attrDimIdx>=0?r=e=>{var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=e=>{var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:i,attrFn:r,valueFn:n}}function ri(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function ii(e){let{propsArr:t,props:n,item:r,itemData:i,ret:o,sourceKey:a}=e;for(let e=0;e<t.length;e++){const s=n[t[e]],l=s.fields||[s];let c,u;s.fields&&(c=[],u=[]);for(let n=0;n<l.length;n++){const d=l[n];let f,p,h,m,g,y;if("primitive"===d.type?(h=d.value,y=String(d.value)):("function"==typeof d.value&&(f=e=>d.value(e,r)),"function"==typeof d.label&&(p=e=>d.label(e,r)),d.accessor?(m=d.accessor(r),Array.isArray(m)?(g=m.map(d.valueAccessor),d.attrAccessor&&(g=g.map(d.attrAccessor)),f&&(h=g.map(f),f=null),p&&(y=g.map(p),p=null),h=d.reduce?d.reduce(h):h,y=d.reduceLabel?d.reduceLabel(y,h):String(h)):(h=d.attrAccessor?d.attrAccessor(d.valueAccessor(m)):d.valueAccessor(m),y=h)):(h=i,y=i)),s.fields){const e=f?f(h):h;c.push(e),u.push(p&&null!=y?p(y):null!=y?y:String(e))}else{const n=f?f(h):h;o[t[e]]={value:n,label:p?p(y):null!=y?y:String(n)},d.field&&(o[t[e]].source={field:d.field.key(),key:a})}}c&&(o[t[e]]={value:"function"==typeof s.value?s.value(c,r):c,label:"function"==typeof s.label?s.label(u,r):u})}}const oi=(e,t,n)=>{const r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=Yr(r,e);return o&&o[0]?(t.tree=Or(o[0],n.children||(e=>e[i])),t.tree):null},ai=e=>{let{propsArr:t,props:n,cube:r,cache:i,itemDepthObject:o,f:a}=e;for(let e=0;e<t.length;e++){const i=n[t[e]],s=i.fields?i.fields:[i];for(let e=0;e<s.length;e++){const t=s[e];if(t.field!==a){const e=ni(o,ti(t.field,{cube:r}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function si(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const i=t.raw(),o=t.key(),a="S"===i.qMode?function(e){const t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){const t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map((e,t)=>t)}(e),r=e.fields(),i=e.fields().filter(e=>"dimension"===e.type()).map(e=>n.indexOf(r.indexOf(e))),o=e.fields().filter(e=>"measure"===e.type()).map(e=>n.indexOf(r.indexOf(e))),a={__root:{__id:"__root",qValues:[]}};for(let e=0;e<t.length;e++){const n=t[e];let r="__root",l=!1;for(let e=0;e<i.length;e++){var s;const t=n[i[e]],o="".concat(r,"__").concat(null!==(s=t.qElemNumber)&&void 0!==s?s:t.qElemNo);a[o]||(a[o]=vr({__id:o,__parent:r,qValues:[]},t),l=!0),r=o}if(l)for(let e=0;e<o.length;e++){const t=n[o[e]];a[r].qValues.push(t)}}const l=Object.keys(a).map(e=>a[e]);return function(){var e,t=Br,n=$r;function r(r){var i,o,a,s,l,c,u,d,f=Array.from(r),p=t,h=n,m=new Map;if(null!=e){const t=f.map((t,n)=>function(e){let t=(e=`${e}`).length;return Ur(e,t-1)&&!Ur(e,t-2)&&(e=e.slice(0,-1)),"/"===e[0]?e:`/${e}`}(e(t,n,r))),n=t.map(Wr),i=new Set(t).add("");for(const e of n)i.has(e)||(i.add(e),t.push(e),n.push(Wr(e)),f.push(Hr));p=(e,n)=>t[n],h=(e,t)=>n[t]}for(a=0,i=f.length;a<i;++a)o=f[a],c=f[a]=new zr(o),null!=(u=p(o,a,r))&&(u+="")&&(d=c.id=u,m.set(d,m.has(d)?Vr:c)),null!=(u=h(o,a,r))&&(u+="")&&(c.parent=u);for(a=0;a<i;++a)if(u=(c=f[a]).parent){if(!(l=m.get(u)))throw new Error("missing: "+u);if(l===Vr)throw new Error("ambiguous: "+u);l.children?l.children.push(c):l.children=[c],c.parent=l}else{if(s)throw new Error("multiple roots");s=c}if(!s)throw new Error("no root");if(null!=e){for(;s.data===Hr&&1===s.children.length;)s=s.children[0],--i;for(let e=f.length-1;e>=0&&(c=f[e]).data===Hr;--e)c.data=null}if(s.parent=jr,s.eachBefore(function(e){e.depth=e.parent.depth+1,--i}).eachBefore(Rr),s.parent=null,i>0)throw new Error("cycle");return s}return r.id=function(e){return arguments.length?(t=Fr(e),r):t},r.parentId=function(e){return arguments.length?(n=Fr(e),r):n},r.path=function(t){return arguments.length?(e=Fr(t),r):e},r}().id(e=>e.__id).parentId(e=>e.__parent)(l)}(t):oi(i,n,e);if(!a)return null;const s=a.height,l=[];for(let o=0;o<=s;o++){let a=null;if(o>0)if("S"===i.qMode){let e=ei(i)[o-1];a=n.fields[e]}else{let e=i.qEffectiveInterColumnSortOrder[o-1];o>i.qEffectiveInterColumnSortOrder.length&&(e=i.qDimensionInfo.length),a=n.fields[e]}const{props:s,main:c}=r.normalizeConfig(vr(vr({},e),{},{field:a?a.key():void 0}),t),u=Object.keys(s);l[o]={propsArr:u,props:s,main:c};const d=a?ti(a,{cube:i}):{fieldDepth:0};ai({propsArr:u,props:s,cube:i,cache:n,itemDepthObject:d,f:a})}const c=a.copy().descendants(),u=a.descendants();for(let e=0;e<u.length;e++){const t=l[u[e].depth].propsArr,n=l[u[e].depth].props,r=l[u[e].depth].main,i=c[e],a=i.data,s=ri(r,a,{key:o});ii({propsArr:t,props:n,item:i,itemData:a,ret:s,sourceKey:o}),u[e].data=s}return a}function li(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let a=0;a<i.length;a++)if(void 0!==i[a].field){const s=t.raw(),l=t.key();if(!oi(s,n,e))continue;const c="object"==typeof i[a].field?i[a].field:t.field(i[a].field),{props:u,main:d}=r.normalizeConfig(i[a],t),f=Object.keys(u),p=ti(c,{cube:s}),{nodeFn:h,attrFn:m,valueFn:g}=ni({fieldDepth:0},p);ai({propsArr:f,props:u,cube:s,cache:n,itemDepthObject:p,f:c});const y=!!i[a].trackBy,v=typeof i[a].trackBy,b={},x=[],w=h(n.tree),S=[];for(let e=0;e<w.length;e++){const t=w[e],n=m?m(g(t)):g(t);if(d.filter&&!d.filter(n))continue;const o=ri(d,n,{key:l});ii({propsArr:f,props:u,item:t,itemData:n,ret:o,sourceKey:l}),y&&r.track({cfg:i[a],itemData:n,obj:o,target:x,tracker:b,trackType:v}),S.push(o)}const M=y?r.collect(x,{main:d,propsArr:f,props:u}):S;o=[...o,...M]}return o}var ci,ui,di=(ci=function(e){
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,c,u,d,f=e.length,p=e.search(/[0-9\-\+#]/),h=p>0?e.substring(0,p):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=f-g,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),x=g>0?e.substring(b,f):"";if(n=(t="-"===(e=e.substring(p,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(o),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0===+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",y=(d=t[0]).length%l,f=d.length,b=0;b<f;b++)m+=d.charAt(b),!((b-y+1)%l)&&b<f-l&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+x}},ci(ui={exports:{}}),ui.exports);function fi(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const pi={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y","-3":"m","-6":"μ","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},hi=/%\)?$/,mi=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,gi=/^\(oct\)/i,yi=/^\(dec\)/i,vi=/^\(hex\)/i,bi=/^\(bin\)/i,xi=/^\(rom\)/i,wi=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,Si=/#|0/g;function Mi(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function ki(e,t,n){const r=fi(e);return n?r:new RegExp(r||"",t)}function Ei(e,t,n,r){let i,o,a,s,l,c,u,d,f,p=e.pattern;var h,m;r&&(e.abbreviate=!0),h=t,(m=n)&&(m=fi(m)),h&&(h=fi(h)),f=new RegExp("(?:[#0]+".concat(h,")?[#0]+(?:").concat(m,"[#0]+)?")),a=p.match(f),a=a?a[0]:"",s=a?p.substr(0,p.indexOf(a)):p,l=a?p.substring(p.indexOf(a)+a.length):"",a||(a=p?"#":"##########"),t&&t===n&&(i=a.split(n),o=i.pop(),a=i.join("")+n+o,t=""),c=t,t=/,/.test(n)?"¤":",",c&&(a=a.replace(ki(c,"g"),t)),u=n,n=".",u&&(a=a.replace(ki(u,"g"),n)),d=a.match(/#/g),d=d?d.length:0;const g=p.split(u);let y;g[1]&&(y=g[1].match(Si)),e.prefix=s||"",e.postfix=l||"",e.pattern=p,e.maxPrecision=y?y.length:2,e.percentage=hi.test(p),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(ki(t,null,!0),"|").concat(ki(n,null,!0)),"g"),e.groupTemp=c,e.decTemp=u,e.t=t,e.d=n,e.temp=d}class Ci{constructor(e,t,n,r,i){this.localeInfo=e,this.pattern=t,this.thousandDelimiter=n||",",this.decimalDelimiter=r||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return pi;const n={};return e.qNumericalAbbreviation.split(t).forEach(e=>{let t=e.split(":");2===t.length&&(n[t[0]]=t[1])}),n}(e,this.patternSeparator),this.prepare()}clone(){const e=new Ci(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}format(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}prepare(e,t,n){let r;if(void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),!e)return void(this._prepared={pattern:!1});this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],wi.test(e[0])&&(r.positive.isFunctional=!0),e[1]?wi.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?wi.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const i="U"===this.type;r.positive.isFunctional||Ei(r.positive,t,n,i),r.negative&&!r.negative.isFunctional&&Ei(r.negative,t,n,i),r.zero&&!r.zero.isFunctional&&Ei(r.zero,t,n,i)}formatValue(e){let t,n,r,i,o,a,s,l,c,u=this._prepared,d="",f="",p=e;if(isNaN(e))return"".concat(p);if(e=+e,!1===u.pattern)return e.toString();if(0===e&&u.zero)return u=u.zero,u.pattern;if(e<0&&u.negative?(u=u.negative,e=-e):u=u.positive,o=u.d,a=u.t,u.isFunctional)e=function(e,t,n){let r;return mi.test(t)?e=Mi(e,Number(/\d{2}/.exec(t)[0]),t,n):gi.test(t)?e=Mi(e,8,t,n):yi.test(t)?e=Mi(e,10,t,n):vi.test(t)?e=Mi(e,16,t,n):bi.test(t)?e=Mi(e,2,t,n):xi.test(t)&&(r="",e<0&&(r="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){let n,r="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();for(;i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=s[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t),e=r+e):e=t+r+e.toExponential(0)),e}(e,u.pattern,o);else{if(u.percentage&&(e*=100),u.abbreviate){const t=Object.keys(this.abbreviations).map(e=>parseInt(e,10)).sort((e,t)=>e-t);let r,i,o=t[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);o<=n&&s<t.length;)s++,o=t[s];s>0&&(r=t[s-1]),r&&n>0&&r>0?i=r:(n<0&&r<0||!r)&&(o<0&&o-n<=u.maxPrecision?i=o:r<=n&&!(o>0&&-n<=u.maxPrecision)&&(i=r)),i&&(d=this.abbreviations[i],e/=10**i)}if(r=Math.abs(e),t=u.temp,l=u.numericPattern,c=l.split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,c||"#"!==l.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{const t=Number((e+1e-15*(e<0?-1:1)).toFixed(Math.min(20,c?c.length:0)).split(".")[0]);let n=l.split(o)[0];if(n+=o,e=di(n,t)||"0",c){const t=Math.max(0,Math.min(14,c.length)),n=c.replace(/#+$/,"").length;let i=("I"===this.type?0:r%1+1e-15).toFixed(t).slice(2).replace(/0+$/,"");for(s=i.length;s<n;s++)i+="0";i&&(e+=o+i)}else 0===t&&(i=0)}else if(r>=10**t||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),f=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(l+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)l+="#";e=di(l,e)}e=e.replace(u.numericRegex,e=>e===a?u.groupTemp:e===o?u.decTemp:""),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return u.prefix+e+f+d+u.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function Ai(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{size:n=5e3,multipleArguments:r=!1,toKey:i=e=>e}=t;let o,a,s=Object.create(null),l=Object.create(null),c=0,u=0;return o=r?function(){return a=i(...arguments),o.has(a)?o.get(a):o.set(a,e(...arguments))}:t=>(a=i(t),o.has(a)?o.get(a):o.set(a,e(t))),o.set=(e,t)=>(c>=n&&(delete s[l[u]],delete l[u],c--,u++),s[e]=t,l[c]=e,c++,t),o.get=e=>s[e],o.has=e=>e in s,o.clear=()=>{s=Object.create(null),l=Object.create(null),c=0,u=0},o.size=()=>c,o}function Di(e,t,n,r,i){const o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Ci(...t)}(i,e,t,n,r),a=Ai(o.formatValue.bind(o),{toKey:e=>isNaN(e)?e:+e});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),o.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},s}const qi="D",_i="T",Ti="TS",Ni=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Oi=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ii=["January","February","March","April","May","June","July","August","September","October","November","December"],Li=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Pi(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function Ri(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}class zi{constructor(e,t,n){const r=e||{};r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:Ni,qDayNames:Oi,qLongMonthNames:Ii,qMonthNames:Li}),this.localeInfo=r,this.locale_days=r.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=r.qCalendarStrings.qDayNames.slice(),this.locale_months=r.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=r.qCalendarStrings.qMonthNames.slice(),t||(t={[_i]:r.qTimeFmt||"hh:mm:ss",[qi]:r.qDateFmt||"YYYY-MM-DD",[Ti]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]),this.pattern=t}clone(){const e=new zi(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}format(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");const n=/t+/gi.test(t);let r;e instanceof Date?r=function(e,t){let n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&(n%=12,n||(n=12)),r<0&&(r=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:r,date:e.getUTCDate(),h:n,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}(e,n):(e<0&&(e=-e,t="-".concat(t)),r=function(e,t){let n,r=function(e){const t=e,n=24*Ri(t),r=60*Ri(n),i=60*Ri(r),o=1e3*Ri(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}(e),i=r.d,o=r.h,a=r.m,s=r.s,l=r.f,c=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(c=n?n.getDay()-1:0,c<0&&(c=6));let u="";return n&&(u=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:c,date:i,h:o,m:a,s:s,f:l,t:u}}(e,t));const i=(o=this,a=r,{"Y+|y+":{Y:"".concat(Number("".concat(a.year).slice(-2))),YY:Pi("".concat(a.year).slice(-2),2),YYY:Pi("".concat(a.year).slice(-3),3),def:e=>Pi("".concat(a.year),e.length)},"M+":{M:a.month+1,MM:Pi("".concat(a.month+1),2),MMM:o.locale_months_abbr[a.month],def:o.locale_months[a.month]},"W+|w+":{W:a.day,WW:Pi("".concat(a.day),2),WWW:o.locale_days_abbr[a.day],def:o.locale_days[a.day]},"D+|d+":{D:a.date,def:e=>Pi("".concat(a.date),e.length)},"h+|H+":{h:a.h,def:e=>Pi("".concat(a.h),e.length)},"m+":{m:a.m,def:e=>Pi("".concat(a.m),e.length)},"s+|S+":{s:a.s,def:e=>Pi("".concat(a.s),e.length)},"f+|F+":{def(e){let t="".concat(a.f),n=e.length-t.length;if(n>0)for(let e=0;e<n;e++)t+="0";else n<0&&(t=t.slice(0,e.length));return t}},"t{1,2}|T{1,2}":{def(e){let t=a.t;return e[0].toUpperCase()===e[0]&&(t=t.toUpperCase()),t=t.slice(0,e.length),t}}});var o,a;const s=[];for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&s.push(e);const l=new RegExp(s.join("|"),"g");return t.replace(l,e=>{let t,n,r;for(n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&(t=new RegExp(n),t.test(e)))break;if(!t)return"";for(const t in i[n])if(t===e||t.toLowerCase()===e){r=i[n][t],void 0===r&&(r=i[n][t.toLowerCase()]);break}return void 0===r&&(r=i[n].def),"function"==typeof r&&(r=r(e)),r})}}function Fi(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new zi(...t)}function ji(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=Fi(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=Ai(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function i(e){return"IV"!==t?function(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}(e):e}function o(e){return e=i(e),r(e)}return o.format=function(e,t){return r.clear(),t=i(t),n.format(t,e)},o.locale=function(i){return n=Fi(i,e,t),r=Ai(n.format.bind(n),{toKey:e=>"object"==typeof e?e.getTime():e}),this},o.qtype=function(e){return void 0!==e&&(t=e,r.clear()),t},o}function Vi(){let e,{meta:t,id:n,key:r,localeInfo:i,fieldExtractor:o,value:a,type:s,sourceField:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const c=a||("dimension"===s?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),u="dimension"===s?"first":"avg",d=function(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return ji(e.qNumFormat.qFmt,e.qNumFormat.qType,t);let n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(n="#".concat(i,"##"),o="U"),Di(n,r,i,o,t)}(t,i),f={id:()=>n,key:()=>r,raw:()=>t,title:()=>t.qFallbackTitle||t.label,type:()=>s,origin:()=>l,items:()=>(e||(e=o(f)),e),min:()=>t.qMin,max:()=>t.qMax,value:c,label:e=>(null==e?void 0:e.qText)||"",reduce:u,reduceLabel:"dimension"===s?"first":(e,t)=>d(t),formatter:()=>d,tags:()=>t.qTags};return f}function Hi(e,t,n,r,i){return(t[e]||[]).map((t,o)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:Vi(Ar({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=Hi("qAttrDimInfo",t,n,a,Ar({},i,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),s.attrExps=Hi("qAttrExprInfo",t,n,a,Ar({},i,{value:e=>null==e?void 0:e.qNum,type:"measure"})),s.measures=Hi("qMeasureInfo",t,n,a,Ar({},i,{value:e=>null==e?void 0:e.qValue,type:"measure"})),s})}function Bi(){let{key:e,data:t,config:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},i=t;if(!i)throw new Error('Missing "data" input');if(!i.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');const o=Bi.util,a={cache:r,cube:i,localeInfo:n.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:n.virtualFields},s={key:()=>e,raw:()=>i,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];const r=n.allFields;if("function"==typeof e){for(let t=0;t<r.length;t++)if(e(r[t]))return r[t];return!1}if("string"==typeof e){for(let t=0;t<r.length;t++)if(r[t].key()===e||r[t].title()===e)return r[t]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}(e,a),fields:()=>r.fields.slice(),extract:e=>a.extractor(e,s,r,o),hierarchy:e=>a.hierarchy(e,s,r,o),_cache:()=>r};"K"===i.qMode||"T"===i.qMode||!i.qMode&&i.qNodesOnDim?(a.extractor=li,a.hierarchy=si,a.pages="K"===i.qMode?i.qStackedDataPages:i.qTreeDataPages):"S"===i.qMode?(a.extractor=Tr,a.pages=i.qDataPages,a.hierarchy=si):a.extractor=()=>[],a.fieldExtractor=e=>a.extractor({field:e},s,r,o);const l="S"===i.qMode?e=>e.qElemNumber:void 0,c="S"===i.qMode?e=>e.qNum:void 0;r.wrappedFields.push(...Hi("qDimensionInfo",i,e,"",Ar({},a,{value:l,type:"dimension"}))),r.wrappedFields.push(...Hi("qMeasureInfo",i,e,"",Ar({},a,{value:c,type:"measure"}))),r.fields=r.wrappedFields.map(e=>e.instance);const u=e=>{e.forEach(e=>{r.allFields.push(e.instance),u(e.measures),u(e.attrDims),u(e.attrExps)})};return u(r.wrappedFields),(n.virtualFields||[]).forEach(t=>{const n=s.field(t.from),i=Vi(vr({meta:n.raw(),id:"".concat(e,"/").concat(t.key),sourceField:n,fieldExtractor:e=>a.extractor({field:e},s,r,o),key:t.key,type:n.type(),localeInfo:a.localeInfo,value:n.value},t.override||{}));r.virtualFields.push(i)}),r.allFields.push(...r.virtualFields),s}const $i=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],Wi=/\/qDimensionInfo(?:\/(\d+))?/,Ui=/\/qMeasureInfo\/(\d+)/,Yi=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,Xi=/\/qAttrExprInfo\/(\d+)/,Gi=/\/?qHyperCube/,Ki=/\/?qTreeData/,Zi=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),Ji=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function Qi(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=t.byCells,i=t.primarySource,o=[],a={},s=e.isActive();let l=!1;return e.brushes().forEach(e=>{const t=function(e,t){let n=e,r=-1,i=-1,o="",a=e=>e;Gi.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=Zi):Ki.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=Ji);let s=!0;if(Wi.test(e)&&(r=+Wi.exec(e)[1]),Ui.test(e)&&(i=+Ui.exec(e)[1]),Yi.test(e)){i=-1,r=0;const e=+Yi.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),s=!1}if(Xi.test(e)){const e=i;if(t){i=0;const a=Yr(o,t);i+=(a.qMeasureInfo||[]).length,r>-1?(i=a.qDimensionInfo.slice(0,r).reduce((e,t)=>e+t.qAttrExprInfo.length,i),r=-1):(i=a.qDimensionInfo.reduce((e,t)=>e+t.qAttrExprInfo.length,i),i=a.qMeasureInfo.slice(0,e).reduce((e,t)=>e+t.qAttrExprInfo.length,i)),i+=+Xi.exec(n)[1]}else r>-1?(r=-1,i=+Xi.exec(n)[1]):i+=+Xi.exec(n)[1]+1}return $i.forEach(e=>{let[t,r]=e;n=n.replace(t,r)}),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.multiRangeSelectTreeDataValues||(a.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach(e=>a.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})))}else{if("range"===e.type&&t.measureIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.rangeSelectHyperCubeValues||(a.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),n.forEach(e=>a.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})))}if("range"===e.type&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.selectHyperCubeContinuousRange||(a.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),n.forEach(e=>a.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}})))}if("value"===e.type&&t.dimensionIdx>-1)if(r)if(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){const r=n.qHyperCube,o=r.qNoOfLeftDims,s=r.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(a.selectPivotCells||(a.selectPivotCells={path:t.path,cells:[]}),e.id===i||!i){const n=e.brush.values().map(e=>+e).filter(e=>!isNaN(e));(0===o||s>=o)&&o>-1?n.forEach(e=>{a.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:s-o})}):n.forEach(e=>{a.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})}),l=!!a.selectPivotCells.cells.length}}else a.selectHyperCubeCells||(a.selectHyperCubeCells={path:t.path,cols:[]}),a.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==i&&(i||a.selectHyperCubeCells.values)||(a.selectHyperCubeCells.values=e.brush.values().map(e=>+e).filter(e=>!isNaN(e)),l=!!a.selectHyperCubeCells.values.length);else{const n=e.brush.values().map(e=>+e).filter(e=>!isNaN(e));l=!!n.length,o.push({params:[t.path,t.dimensionIdx,n,!1],method:"selectHyperCubeValues"})}}}),!l&&s?[{method:"resetMadeSelections",params:[]}]:(a.rangeSelectHyperCubeValues&&o.push({method:"rangeSelectHyperCubeValues",params:[a.rangeSelectHyperCubeValues.path,a.rangeSelectHyperCubeValues.ranges,[],null===(c=t.orMode)||void 0===c||c]}),a.selectHyperCubeContinuousRange&&o.push({method:"selectHyperCubeContinuousRange",params:[a.selectHyperCubeContinuousRange.path,a.selectHyperCubeContinuousRange.ranges]}),a.selectHyperCubeCells&&o.push({method:"selectHyperCubeCells",params:[a.selectHyperCubeCells.path,a.selectHyperCubeCells.values,a.selectHyperCubeCells.cols]}),a.selectPivotCells&&o.push({method:"selectPivotCells",params:[a.selectPivotCells.path,a.selectPivotCells.cells]}),a.multiRangeSelectTreeDataValues&&o.push({method:"multiRangeSelectTreeDataValues",params:[a.multiRangeSelectTreeDataValues.path,a.multiRangeSelectTreeDataValues.ranges]}),o);var c}function eo(e){Bi.util=e.data("matrix").util,e.data("q",Bi),e.formatter("q-number",Di),e.formatter("q-time",ji)}function to(e){var t=ar(e.layout||{},e.path.split("/").join("."));if(!t)return!1;var n=t.qIsOneAndOnlyOne;return void 0!==n&&n}function no(e){var t=e.brush,n=e.colorField,r=e.legendAlias,i=e.useLegendCube,o=void 0!==i&&i;!n||/qAttrDimInfo/.test(n)?(t.removeKeyAlias("attrDim/qDimensionInfo/0"),r&&t.removeKeyAlias(r),t.addKeyAlias("attrDim/qDimensionInfo/0","qHyperCube/".concat(n))):o&&t.addKeyAlias(r,"qHyperCube/".concat(n))}eo.qBrushHelper=Qi,eo.selections=Qi;var ro="Shift";var io=function(e,t){return t[e]?io(e+1,t):e},oo=function(e,t){var n=t.reduce(function(e,t){return e[t]=!0,e},{});return e.reduce(function(e,t,r){var i=io(r,n);return n[i]=!0,e[r]=i,e},{})};function ao(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.layout,n=e.filtered,r=void 0===n?{}:n,i=(null==t?void 0:t.qHyperCube)||{},o=i.qDimensionInfo,a=void 0===o?[]:o,s=i.qMeasureInfo,l=void 0===s?[]:s;return{dimensions:oo(a,r.dimensions||[]),measures:oo(l,r.measures||[])}}function so(e){var t=e.selection,n=e.fieldMap,r=t.method,i=t.params;if("selectHyperCubeValues"===r){var o=n.dimensions[i[1]];void 0!==o&&(i[1]=o)}return"selectHyperCubeContinuousRange"===r&&i[1].forEach(function(e){var t=n.dimensions[e.qDimIx];void 0!==t&&(e.qDimIx=t)}),t}var lo=[],co=0,uo=function(e){var t=lo.filter(function(e){var t;return null===(t=e.selections)||void 0===t?void 0:t.isActive()});t.length&&("Enter"===e.key?t.forEach(function(e){return e.selections.confirm()}):"Escape"!==e.key&&"Esc"!==e.key||t.forEach(function(e){return e.selections.cancel()}))};function fo(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.selections,r=t.brush,i=t.majorScale,o=t.actions,a=t.selectionsFn,s=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).path,l=void 0===s?"/qHyperCubeDef":s;if(!n)return{layout:function(){},filteredFields:function(){},allowSimultaneous:function(){},release:function(){}};var c=++co,u=null,d={dimensions:[],measures:[]},f=[],p={};n.on=n.on.bind(n),n.isActive=n.isActive.bind(n),n.addListener=n.addListener.bind(n),n.removeListener=n.removeListener.bind(n);var h=function(e){var t=e.brush,n=e.getConfig;return{interceptor:function(e){var r=t.brushes(),i=n(),o=i.allowSimultaneous,a=i.layout,s=void 0===a?{}:a;r.forEach(function(n){var r,i,a;("range"===n.type||null!==(r=e[0])&&void 0!==r&&r.key&&(null===(i=e[0])||void 0===i?void 0:i.key)!==n.id&&0!==o.indexOf(null===(a=e[0])||void 0===a?void 0:a.key))&&t.clear([])});var l=e.filter(function(e){return-2!==e.value});if(l.length>1){var c=function(e){var t=e.layout,n=void 0===t?{}:t,r=e.values,i=void 0===r?[]:r;if(null==i||!i.length)return[];var o=Array.from(new Set(i.map(function(e){return e.key}))),a=[];return o.forEach(function(e){var t=to({layout:n,path:e}),r=i.filter(function(t){return t.key===e}),o=t?[r.pop()]:r;a.push.apply(a,A(o))}),a.filter(Boolean)}({layout:s,values:l});return c}return l},rangeInterceptor:function(e){var r=t.brushes(),i=n().allowSimultaneous;return r.filter(function(e){return"value"===e.type}).length?(t.clear([]),e):(r.forEach(function(n){var r=n.id===e[0].key||i.includes(n.id)&&i.includes(e[0].key);"range"!==n.type||r||t.clear([])}),e)}}}({brush:r,getConfig:function(){return{layout:u,allowSimultaneous:f}}}),m=h.rangeInterceptor,g=h.interceptor;r.intercept("set-ranges",m),r.intercept("toggle-ranges",m),r.intercept("toggle-values",g),r.intercept("set-values",g),r.intercept("add-values",g),r.on("start",function(){return n.begin(l)});var y,v,b={activate:function(){},deactivated:function(){return r.end()},cleared:function(){return r.clear()},canceled:function(){return r.end()}};y=n,v=b,Object.keys(v).forEach(function(e){y.on(e,v[e])});var x=null==i||null===(e=i.max)||void 0===e?void 0:e.call(i);return null!=o&&o.select?(o.select.on("start",function(){var e;r.start(),"function"==typeof o.select.getBrushOptions&&(p=(e=o.select).getBrushOptions.apply(e,arguments))}),o.select.on("end",function(){var e=a(r,p,u),t=ao({layout:u,filtered:d});e.forEach(function(e){var r=so({selection:e,fieldMap:t});!function(e,t,n){if(t&&void 0!==n&&"selectHyperCubeContinuousRange"===e.method){var r=e.params;if(r&&r[1]&&r[1][0]){var i=r[1][0],o=i.qDimIx,a=i.qRange;"undefined"!==o&&a&&!1===a.qMaxInclEq&&a.qMax>=n&&(a.qMaxInclEq=!0)}}}(r,o.select.brushSelectionIncludeMax,x),n.select(r)})})):r.on("update",function(){var e=a(r,p,u),t=ao({layout:u,filtered:d});e.forEach(function(e){n.select(so({selection:e,fieldMap:t}))})}),0===lo.length&&document.addEventListener("keyup",uo),lo.push({key:c,selections:n}),{layout:function(e){u=e},filteredFields:function(e){d=e},allowSimultaneous:function(e){f=e},release:function(){u=null;var e=lo.indexOf(lo.filter(function(e){return e.key===c})[0]);-1!==e&&lo.splice(e,1),lo.length||document.removeEventListener("keyup",uo),function(e,t){Object.keys(t).forEach(function(n){e.removeListener(n,t[n])})}(n,b)}}}function po(e){var t=e.chart,n=e.document,r=e.selectionInfo,i=e.eventName,o=e.componentName,a=e.brushName,s=void 0===a?"selection":a,l=e.emit,c=void 0===l?"rangeClear":l,u=r.event===i,d=n.querySelector("[data-key='".concat(o,"-edge-0']"));if(u||!d)return!1;var f=t.component(o);return!!f&&(f.emit(c),"string"==typeof s&&t.brush(s).clear(),f)}var ho=["chart","document","selections","selectionInfo"],mo=function(e){e.chart,e.document,e.selections,e.selectionInfo;var t=M(e,ho);t.clearDiscrete(),t.clearContinuous(),t.clearMinor(),t.clearRange(),t.clearTap(),t.clearLegend()};function go(e){var t,n=e.lasso;null!=n&&null!==(t=n.active)&&void 0!==t&&t.call(n)&&(null==n||n.action(!1))}function yo(e){var t,n=e.chart,r=e.selectionInfo,i=e.selectionActions,o=e.actions,a=void 0===o?{}:o,s=e.selections,l=e.selectionEvents;if(!1===i||!1===l)return function(){};var c=i.reset,u=void 0===c?go:c,d=i.clear,f=!1!==d&&function(e){var t=e.clear,n=void 0===t?mo:t,r=e.selections,i=e.selectionInfo,o=e.chart;return function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).cleared,t={selections:r,selectionInfo:i,chart:o,document:document,cleared:e};return n(S({clearDiscrete:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"discreteRange":i,a=e.componentName,s=void 0===a?"discrete-range-brush":a,l=e.cleared;return po({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:o,componentName:s,emit:"areaClear",brushName:e.brushName})}(S(S({},t),e))},clearContinuous:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.eventName,o=void 0===i?"continuousRange":i,a=e.componentName,s=void 0===a?"continuous-range-brush":a,l=e.cleared;return po({selectionInfo:t,chart:n,document:r,eventName:void 0!==l&&l?void 0:o,componentName:s,brushName:e.brushName})}(S(S({},t),e))},clearMinor:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.componentName,o=void 0===i?"minor-range-brush":i,a=e.eventName,s=void 0===a?"minorRange":a,l=e.cleared,c=void 0!==l&&l,u=e.brushName,d=po({selectionInfo:t,chart:n,document:r,eventName:c?void 0:s,componentName:o,brushName:void 0!==u&&u});if(d){var f=d.settings.settings,p=f.scale,h=f.brush,m=n.scale(p).data().fields.map(function(e){return e.id()}),g=n.brush(h),y=g.brushes().filter(function(e){return"range"===e.type&&m.some(function(t){return t===e.id})});g&&y.length&&y.forEach(function(e){g.removeRanges(e.brush.ranges().map(function(t){return{key:e.id,range:t}}))})}}(S(S({},t),e))},clearRange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"xAxis":o,s=e.cleared;po({selectionInfo:t,chart:n,document:r,eventName:void 0!==s&&s?void 0:a,componentName:"".concat(a,"-range-brush"),emit:"areaClear",brushName:!1})&&i.clear()}(S(S({},t),e))},clearTap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.chart,n=e.selectionInfo,r=e.selections,i=e.events,o=void 0===i?["tap"]:i,a=e.brushNames,s=void 0===a?[]:a;if(n&&o.includes(n.event)){var l=n.currentComponent;n.previousComponent!==l&&(r.clear(),s.forEach(function(e){return t.brush(e).end()}))}}(S(S({},t),e))},clearLegend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){var t=e.selectionInfo,n=e.chart,r=e.document,i=e.selections,o=e.eventName,a=void 0===o?"legendRange":o,s=e.componentName,l=void 0===s?"legend-range-brush":s,c=e.cleared,u=void 0!==c&&c,d=e.brushName;po({selectionInfo:t,chart:n,document:r,eventName:u?void 0:a,componentName:l,brushName:void 0!==d&&d})&&i.clear()}(S(S({},t),e))}},t))}}({clear:d,selections:s,selectionInfo:r,chart:n}),p=function(e){var t=e.chart,n=e.actions,r=e.reset,i=e.clear,o=!1,a={deactivated:function(e){var t=(n||{}).lasso;r({e:e,lasso:void 0!==t&&t})},canceled:function(e){var o=(n||{}).lasso;r({e:e,lasso:void 0!==o&&o}),i({e:e,chart:t,document:document})},cleared:function(e){o||(o=!0,i({e:e,chart:t,document:document,cleared:!0}),o=!1)}};return!1===r&&delete a.deactivated,!1===i&&delete a.cleared,!1===r&&!1===i&&delete a.canceled,a}({chart:n,clear:f,reset:u,actions:a}),h={};Object.entries(p).forEach(function(e){var t=C(e,2),n=t[0],r=t[1];h[n]=function(e,t){return t?function(n){return t({event:n,defaultFunc:e})}:e}(r,l[n])});var m=function(e){var t=e.selectionEvents,n=e.selections,r=e.selectionInfo,i=e.clear,o=e.chart,a=e.document,s=t.start,l={selections:n,selectionInfo:r,chart:o,document:a},c=function(e){return Object.assign(r,e||{})},u=function(e){var t=e.event,n=e.components;return function(){return function(e){var t=e.selectionInfo,n=e.clear,r=e.event,i=e.components,o=void 0===i?[]:i;(0,e.setSelectionInfo)(S(S({},void 0===t?{}:t),{},{event:r,components:o.map(function(e){return e.key}).filter(Boolean)})),n()}({event:t,components:n,clear:i,selectionInfo:r,setSelectionInfo:c})}};return"function"==typeof s?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];s(S(S({defaultFunc:u({event:e,components:t}),setSelectionInfo:c,clear:i},l),{},{event:e,components:t}))}:function(e){u({event:e,components:arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]})()}}({selectionEvents:l,selections:s,selectionInfo:r,clear:f,chart:n,document:document});return null==a||null===(t=a.select)||void 0===t||t.on("start",m),Object.entries(h).forEach(function(e){var t=C(e,2),n=t[0],r=t[1];null==s||s.on(n,r)}),function(){var e;null==a||null===(e=a.select)||void 0===e||e.removeListener("start",m),Object.entries(h).forEach(function(e){var t=C(e,2),n=t[0],r=t[1];null==s||s.removeListener(n,r)})}}var vo=[{key:"qHyperCube/qDimensionInfo/0:numeric",includeMax:!1}];function bo(e){var t=e.chart,n=e.actions,r=e.selections,i=e.picassoQ,o=e.config,a=o.allowSimultaneous,s=void 0!==a&&a,l=o.majorScale,c=void 0===l?void 0:l,u=o.selectionActions,d=void 0===u?{}:u,f=d.clear,p=d.reset,h=o.selectionEvents,m=void 0===h?{deactivated:void 0,canceled:void 0,cleared:void 0,start:void 0}:h,g=o.brushEvents,y=void 0===g?{}:g,v=o.brushName,b=void 0===v?"selection":v,x=o.brushMaxListeners,w=void 0===x?20:x,S=o.brushRanges,M=void 0!==S&&S,k=o.interceptors,E=void 0===k?{}:k,D=o.selectionsFn,q=void 0===D?i.selections:D,_=t.brush(b);if("number"==typeof w&&_.setMaxListeners(w),M){var T=!0===M?vo:M;_.configure({ranges:T})}var N={canSelect:!0,getIsSelectionLocked:!1,isInnerDimensionLocked:!1,lockedDimensions:[],singleSelectIndex:0,selectionInfo:{colorField:void 0,components:[],event:void 0,currentComponent:void 0,previousComponent:void 0}},O=fo({brush:_,majorScale:c,actions:n,selections:r,picassoQ:i,selectionsFn:q});!function(e){var t=e.brush,n=e.interceptors,r=void 0===n?{}:n;Object.entries(r).forEach(function(e){var n=C(e,2),r=n[0],i=n[1];(Array.isArray(i)?i:[i]).forEach(function(e){t.intercept(r,e)})})}({brush:_,interceptors:E});var I=function(e){var t=e.chart,n=e.selectionActions,r=e.brush,i=e.actions,o=e.selectionInfo,a=e.selections,s=e.selectionEvents,l=function(e){var t=e.brush,n=e.chart,r=e.selectionInfo,i=e.brushEvents,o=void 0===i?{}:i,a=Object.entries(o).map(function(e){var i=C(e,2),o=i[0],a=i[1],s=function(){return a({chart:n,selectionInfo:r})};return t.on(o,s),[o,s]});return function(){a.forEach(function(e){var n=C(e,2),r=n[0],i=n[1];t.removeListener(r,i)})}}({brush:r,chart:t,selectionInfo:o,brushEvents:e.brushEvents}),c=yo({chart:t,selectionInfo:o,selectionActions:n,actions:i,selections:a,selectionEvents:s}),u=function(e){var t=e.actions;if(null==t||!t.lasso)return function(){};var n=!1,r=function(e){n||e.key!==ro||(t.lasso.action(!0),n=!0)},i=function(e){e.key===ro&&(t.lasso.action(!1),n=!1)};return document.addEventListener("keydown",r),document.addEventListener("keyup",i),function(){document.removeEventListener("keydown",r),document.removeEventListener("keyup",i)}}({actions:i});return function(){l(),c(),u()}}({chart:t,brush:_,actions:n,selections:r,selectionInfo:N.selectionInfo,selectionActions:{clear:f,reset:p},selectionEvents:m,brushEvents:y});if(s){var L=!0===s?A(Array(15)).map(function(e,t){return"qHyperCube/qMeasureInfo/".concat(t)}):s;O.allowSimultaneous(L)}return{unbindEvents:I,state:N,picassoSelections:O,brush:_}}var xo=["colorField","useLegendCube"];function wo(e){var t=e.chart,n=e.selections,r=e.actions,i=void 0!==r&&r,o=e.config,a=void 0===o?{}:o,s=bo({chart:t,actions:i,selections:n,picassoQ:eo,config:a}),l=s.unbindEvents,c=s.state,u=s.picassoSelections,d=s.brush,f=a.custom,p=void 0===f?{}:f,h=a.legendAlias,m=void 0===h?void 0:h,g=a.setBrushAliases,y=void 0===g?no:g;return{getIsDimensionLocked:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return c.lockedDimensions[e]},getIsSelectionLocked:function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return null!==(e=null==n||null===(t=n.isLocked)||void 0===t?void 0:t.call(n))&&void 0!==e?e:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return!(null==e||!e.length)&&e.filter(function(e){return"object"===D(e.data)&&Array.isArray(e.data.fields)}).every(function(e){return e.data.fields.every(function(e){var t=e.raw();return!(!t.qLocked&&t.qCardinal)})})}(r)},getIsSingleSelect:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c.singleSelectIndex;return c.singleSelectDimensions[e]},getCanSelect:function(){return c.canSelect},getSelectionsObject:function(){return n},getSelectionInfo:function(){return c.selectionInfo},setLayout:function(e){var t=function(e){var t,n,r,i=e.selections,o=e.picassoSelections,a=e.layout,s={lockedDimensions:[],singleSelectDimensions:[]};null!=i&&null!==(t=i.isModal)&&void 0!==t&&t.call(i)&&i.confirm(),o.layout(a);var l=(null!==(n=null==a?void 0:a.qHyperCube)&&void 0!==n?n:{}).qDimensionInfo,c=void 0===l?[]:l;return s.lockedDimensions=c.map(function(e){return!!e.qLocked}),s.singleSelectDimensions=c.map(function(e,t){return to({layout:a,path:"qHyperCube/qDimensionInfo/".concat(t)})}),s.singleSelectIndex=function(e){var t,n=((null==e?void 0:e.qHyperCube)||{}).qDimensionInfo,r=void 0===n?[]:n,i=r.map(function(e,t){var n;return!(e.qLocked||(null===(n=e.qCardinalities)||void 0===n?void 0:n.qHypercubeCardinal)<=1)&&t}).filter(function(e){return"number"==typeof e});return null!==(t=i[0])&&void 0!==t?t:Math.max(r.length-1,0)}(a),s.canSelect=0===c.length||c.some(function(e){return!e.qLocked}),s.dimensionLocked=!(null===(r=c[0])||void 0===r||!r.qLocked),s}({selections:n,picassoSelections:u,layout:e});Object.assign(c,t)},setFilteredFields:function(e){u.filteredFields(e)},setBrushAliases:function(e){var t=e.colorField,n=e.useLegendCube,r=void 0!==n&&n,i=M(e,xo),o=S({useLegendCube:r,colorField:t,brush:d,legendAlias:m},i);y(S(S({},o),{},{defaultFunc:function(){return no(o)}}))},destroy:function(){l(),u.release()},custom:S({},p)}}var So="'Source Sans Pro', 'Arial', 'sans-serif'",Mo="#333333",ko="#595959",Eo="#737373",Co="#cccccc",Ao="#e6e6e6";function Do(e){var t={};return[].concat(A(e),A([["","","color"],["object","","fontFamily"],["object","axis.label.name","color",ko],["object","axis.label.name","fontFamily",So],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",Co],["object","axis.line.minor","color",Ao],["object","axis.title","color"],["object","axis.title","fontFamily",So],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",Ao],["object","grid.line.major","color",Co],["object","grid.line.minor","color",Ao],["object","label.value","color",ko],["object","label.value","fontFamily",So],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",ko],[!1,"label.value","lightColor",Ao],["object","outOfRange","color","#999"],["object","legend.title","color",Mo],["object","legend.title","fontFamily",So],["object","legend.title","fontSize","15px"],["object","legend.label","color",ko],["object","legend.label","fontFamily",So],["object","legend.label","fontSize","13px"],["object","referenceLine.label.name","color",Mo],["object","referenceLine.label.name","fontFamily",So],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",Ao],["object","referenceLine.outOfBounds","fontFamily",So],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",Eo,function(e){return"transparent"===e?Eo:e}]])).reduce(function(e,n){var r="".concat(n[0],"-").concat(n[1],"-").concat(n[2],"}");return t[r]||(t[r]=!0,e.push(n)),e},[]).sort(function(e,t){return(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0)})}var qo="object",_o=function(e){return e};function To(e){var t=e.theme,n=e.id,r=e.transform,i=e.extend,o=e.matrix,a={},s=r.reduce(function(e,t){var n=C(t,2),r=n[0],i=n[1];return e[r]=i,e},{});return o.forEach(function(e){var r=C(e,5),i=r[0],o=r[1],l=r[2],c=r[3],u=r[4],d=void 0===u?function(e){return e}:u,f=function(e){var t=e.theme,n=e.base,r=e.path,i=e.attribute,o=e.defaultValue,a=void 0===o?void 0:o;if(!t||!1===n)return a;var s=t.getStyle(n,r,i);return void 0===s?a:s}({theme:t,base:i===qo&&n?"".concat(qo,".").concat(n):i,path:o,attribute:l,defaultValue:c}),p=(s["".concat(o,".").concat(l)]||_o)(d(f));lr(a,[o,l].filter(Boolean).join("."),p)}),i.forEach(function(e){var t=C(e,2),n=t[0],r=t[1];lr(a,n,r)}),a}var No={NOOP:function(){},FALSE:function(){return!1},ARRAY:function(){return[]},OBJECT:function(){return{}}},Oo="chart-modules-tooltip",Io="#".concat(Oo);function Lo(){if(!document.querySelector(Io)){var e=document.createElement("div");e.id=Oo,e.setAttribute("data-qs-css",""),e.style.overflow="hidden",e.style.position="fixed",e.style.pointerEvents="none",e.style.left="0px",e.style.top="0px",e.style.width="100%",e.style.height="100%",e.style.zIndex=1020,document.body.appendChild(e)}}function Po(e){return{show:!0,key:e.key,type:"tooltip",layout:{displayOrder:3},beforeMount:function(){Lo()},beforeUpdate:function(){Lo()},destroyed:function(){var e;null!=(e=document.querySelector(Io))&&e.parentElement&&e.childElementCount<1&&e.parentElement.removeChild(e)},settings:{appendTo:function(){return document.querySelector(Io)},direction:e.rtl?"rtl":"ltr",duration:e.duration},style:{arrow:{color:"#404040"},content:{display:"table","border-spacing":"4px",background:"rgba(64, 64, 64, 0.9)",opacity:"1",fontSize:"13px",fontFamily:"'Source Sans Pro', 'Arial', 'sans-serif'","empty-cells":"show"},cell:{"max-width":"180px","word-break":"break-word","word-wrap":"break-word","overflow-wrap":"break-word",hyphens:"auto"}}}}var Ro="position",zo={bar:"rect",diamond:"path",point:"circle",square:"rect",triangle:"path","n-polygon":"path",slice:"path"},Fo=function(e){return e.data.value},jo=function(e){var t,n=e.data;return null==n||null===(t=n.major)||void 0===t?void 0:t.value};function Vo(e){var t=e.chart,n=e.expando,r=e.nodes,i=e.collectConfig,o=e.collectibles,a=e.meta,s=i.from,l={chart:t,expando:n,nodes:r,collectConfig:i,collectibles:o,meta:a};switch("function"==typeof s?"custom":s){case"single":return function(e){var t=C(e.nodes,1)[0];if("container"===t.type&&t.children[0]){var n=C(t.children,1)[0];return n.key=t.key,[n]}return[t]}(l);case"position":return function(e){var t=e.collectibles,n=e.meta;return e.chart.shapesAt(n.position.absolute,{components:t.map(function(e){return{key:e.key}})})}(l);case"dimension":return function(e){var t=e.chart,n=e.nodes,r=e.collectConfig,i=e.collectibles,o=e.meta,a=C(n,1)[0],s=r.filter,l=r.after,c="function"==typeof s?s:function(){return!0},u="function"==typeof l?l:function(){},d=i.reduce(function(e,n){var i=zo[n.type]||n.type;return e.push.apply(e,A(t.findShapes(i).filter(function(e){return e.key===n.key&&e.data&&function(e){var t=e.meta,n=e.collectible,r=e.nodes,i=e.collectConfig.by,o=void 0===i?Fo:i,a=n.major,s=void 0===a?jo:a,l=o({data:r.triggerer.data}),c=s({data:r.candidate.data,meta:t}),u=Array.isArray(l),d=Array.isArray(c);return u&&d?l.length===c.length&&l.every(function(e,t){return e===c[t]}):!u&&!d&&l===c}({collectConfig:r,meta:o,collectible:n,nodes:{triggerer:a,candidate:e}})}))),e},[]).filter(c);return u({collected:d,triggerer:a}),d}(l);case"radius":return function(e){var t=e.chart,n=e.collectConfig,r=e.collectibles,i=e.meta,o=C(e.nodes,1)[0].localBounds,a=n.distance,s=n.filter,l="function"==typeof s?s:function(){return!0},c=r.map(function(e){return e.key});return t.shapesAt({cx:i.position.absolute.x,cy:i.position.absolute.y,r:a||Math.max(o.width,o.height)},{components:c.map(function(e){return{key:e}})}).filter(l)}(l);case"custom":return function(e){var t=e.chart,n=e.expando,r=e.nodes,i=e.meta;return e.collectConfig.from({chart:t,expando:n,nodes:r,meta:i})}(l);default:return[]}}var Ho=Number.MAX_VALUE;function Bo(e){var t=e.nodes.filter(function(e){return e.bounds.height+e.bounds.width!==0}).reduce(function(e,t){var n=t.bounds;return e.xMin=Math.min(e.xMin,n.x,n.x+n.width),e.yMin=Math.min(e.yMin,n.y,n.y+n.height),e.xMax=Math.max(e.xMax,n.x,n.x+n.width),e.yMax=Math.max(e.yMax,n.y,n.y+n.height),e},{xMin:Ho,xMax:-Ho,yMin:Ho,yMax:-Ho}),n=t.xMin,r=t.xMax,i=t.yMin;return{x:n,y:i,width:r-n,height:t.yMax-i}}function $o(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal,o=e.nodes;if(!o.length)return[];var a=C(o,1)[0].key,s=n.main.collectibles.filter(function(e){return!e.if||e.if()});if(!s.length)return[];var l=n.main.triggers.find(function(e){return-1!==e.keys.indexOf(a)})||{},c=l.collect,u=l.placement;if(!c||!c.from||!u)return[];var d={triggerer:a,position:i.get(Ro)},f=(Vo({chart:t,expando:r,nodes:o,collectConfig:c,collectibles:s,meta:d})||[]).map(function(e){return e.children.length?e.children[0]:e});return f.length?function(e){var t=e.chart,n=e.config,r=e.expando,i=e.placementConfig,o=e.hovered,a=e.collected,s=e.meta,l=function(e){for(var t=e.chart,n=e.config,r=e.expando,i=e.placementConfig,o=e.hovered,a=e.collected,s=e.meta,l=C(o,1)[0],c=Array.isArray(i)?i:[i],u={bounds:l.bounds,key:l.key},d=Bo({nodes:a}),f=0;f<c.length;f++){var p=c[f];if("function"==typeof p){var h=p({chart:t,expando:r,hovered:o,collected:A(a),meta:s,collectedBounds:d,combineBounds:Bo});if(h)return h}if("trigger"===p)return u;if("collectible"===p){var m=n.main.placements.collectible;return{bounds:"function"==typeof m?m({collected:A(a)}):d,key:a[0].key}}}return u}({chart:t,config:n,expando:r,placementConfig:i,hovered:o,collected:a,meta:s}),c=l.bounds,u=l.key,d=C(a,1)[0].desc;return[{bounds:c,nodes:a,data:a.map(function(e){return e.data}),key:u,meta:s,desc:d}]}({chart:t,config:n,expando:r,placementConfig:u,hovered:o,collected:f,meta:d}):[]}var Wo=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗＡ-Ｚａ-ｚｦ-ￜ]"),Uo=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),Yo=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),Xo=function(e){return Wo.test(e)},Go=function(e){return Uo.test(e)||Yo.test(e)};function Ko(e){for(var t=e?e.length:0,n=0;n<t;n++){var r=e[n];if(Xo(r))return"ltr";if(Go(r))return"rtl"}return"ltr"}function Zo(e){var t=e.config,n=e.h,r=e.context,i={section:function(e){return function(e){return{type:"section",content:e.content}}({content:e.content})},text:function(e){var n=e.value,r=e.style,i=e.survive,o=e.visibility;return function(e){var t=e.config,n=e.value,r=e.style,i=void 0===r?{}:r,o=i.bold,a=void 0!==o&&o,s=i.italic,l=e.survive,c=e.visibility;return{type:"text",content:[{content:n,style:{"font-weight":a?"bold":"normal","font-style":void 0!==s&&s?"italic":"normal","text-align":t.rtl?"right":"left",direction:Ko(n),"white-space":"pre-wrap"},colspan:2}],survive:S(S({},{visibility:!1}),l),visibility:S(S({},{count:!0,force:!1}),c)}}({config:t,value:n,style:r,survive:i,visibility:o})},measure:function(e){var r=e.label,i=e.value,o=e.color,a=e.style,s=e.survive,l=e.visibility;return function(e){var t,n,r,i,o=e.h,a=e.label,s=e.value,l=e.color,c=e.style,u=e.survive,d=e.visibility,f=e.config.rtl,p=o("div",{style:{display:"inline-block",width:10,height:10,"background-color":l,margin:"0 8px"}});return{type:"measure",label:a,value:s,content:[{content:f?[":",a]:[a,":"],style:{"text-align":f?"right":"left","font-weight":null!=c&&null!==(t=c.label)&&void 0!==t&&t.bold?"bold":"normal","font-style":null!=c&&null!==(n=c.label)&&void 0!==n&&n.italic?"italic":"normal",direction:Ko(a)}},{content:l?f?[s,p]:[p,s]:s,style:{"text-align":f?"left":"right","vertical-align":"middle","font-weight":null!=c&&null!==(r=c.value)&&void 0!==r&&r.bold?"bold":"normal","font-style":null!=c&&null!==(i=c.value)&&void 0!==i&&i.italic?"italic":"normal",direction:Ko(s)}}],survive:S(S({},{color:!1,duplicate:!1,visibility:!1}),u),visibility:S(S({},{count:!0,force:!1}),d)}}({config:t,h:n,label:r,value:i,color:o,style:a,survive:s,visibility:l})},divider:function(){return function(e){var t=e.visibility;return{type:"divider",content:[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2}],survive:{visibility:!1},visibility:S(S({},{count:!1,force:!1}),t)}}({visibility:(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).visibility})},row:function(e){return function(e){var t=e.survive,n=e.visibility;return{type:"row",content:[{content:e.content,style:e.style,colspan:e.colspan}],survive:S(S({},{visibility:!1}),t),visibility:S(S({},{count:!0}),n)}}({content:e.content,style:e.style,colspan:e.colspan,survive:e.survive,visibility:e.visibility})},raw:function(e){return function(e){var t=e.survive,n=e.visibility;return{type:"raw",content:e.value,survive:S(S({},{visibility:!1}),t),visibility:S(S({},{count:!0}),n)}}({value:e.value,survive:e.survive,visibility:e.visibility})},color:function(e){var i=e.nodes,o=e.property,a=e.filter,s=void 0===a||a,l=e.visibility,c=e.fillColor;return function(e){var t=e.config,n=e.h,r=e.context,i=e.nodes,o=e.property,a=e.filter,s=e.visibility,l=e.fillColor,c=t.rtl,u={type:"color",label:void 0,value:void 0,content:[],filter:a,survive:{visibility:!1},visibility:S(S({},{count:!0}),s)},d=t.getColorSettings();if("color"===d.type||!d.fieldType)return u;var f=C(i,1)[0];if(u.value=function(e){var t=e.config,n=e.context,r=e.property,i=e.node,o=i.data[r];if(o){if(-3===i.data.value)return i.data.label;var a=n.resources.dataset(o.source.key).field(o.source.field).formatter(),s=o.value,l=o.label,c=t.getColorSettings();if(a&&"measure"===c.fieldType)return Number.isNaN(+s)?"-":a(o.value);var u=l||s;return void 0===u||Number.isNaN(u)||"NaN"===u?"-":u}}({config:t,context:r,property:o,node:f}),void 0===u.value)return u;u.label=function(e){var t=e.context,n=e.property,r=e.node,i=e.config.getColorSettings();if(i.label)return i.label;var o=r.data[n];if(o&&"color"!==i.type){var a=t.resources.dataset,s=o.source,l=s.key,c=s.field;return a(l).field(c).title()}}({config:t,context:r,property:o,node:f});var p=null!=l?l:function(e){var t=e.node.attrs;return(null==t?void 0:t.fill)||"#ddd"}({node:f}),h=n("div",{style:{display:"inline-block",width:10,height:10,"background-color":p,margin:"0 8px"}});return u.content.push({content:c?[":",u.label]:[u.label,":"],style:{"text-align":c?"right":"left",direction:Ko(u.label)}},{content:c?[u.value,h]:[h,u.value],style:{"text-align":c?"left":"right","vertical-align":"middle",direction:Ko(u.value)}}),u}({config:t,h:n,context:r,nodes:i,property:o,filter:s,visibility:l,fillColor:c})}};return i}function Jo(e){var t=e.chart,n=e.translator,r=e.config,i=e.expando,o=e.h,a=e.data,s=e.style,l=C(a,1)[0],c=function(e){var t=e.config,n=e.nodes.reduce(function(e,n){var r=t.main.getGroupByValue({data:n.data});return e[r]||(e[r]={sorting:Object.keys(e).length,items:[]}),e[r].items.push(n),e},{});return Object.keys(n).map(function(e){return n[e]}).sort(function(e,t){return e.sorting-t.sorting}).map(function(e){return e.items})}({config:r,nodes:l.node.nodes}),u=function(e){var t=e.chart,n=e.config,r=e.expando,i=e.h,o=e.context,a=e.groups,s=o.node.meta,l=o.resources,c=l.dataset,u=l.formatter,d=Zo({config:n,h:i,context:o}),f=function(e){var t=e.dataset;return{dataset:{title:function(e,n){return t(e).field(n).title()}}}}({dataset:c}),p=a.map(function(e){var t=d.section({content:A((n.main.section({expando:r,h:i,nodes:e,dataset:c,formatter:u,meta:s,create:d,util:f})||[]).filter(function(e){var t;return null===(t=e.content)||void 0===t?void 0:t.length})).filter(Boolean)});return t.content=function(e){var t=e.config,n=e.content,r=n.find(function(e){return"color"===e.type&&e.filter}),i=r?n.filter(function(e){return"measure"!==e.type||e.survive.color||e.label!==r.label||e.value!==r.value}):n;return t.main.showDuplicateMeasures?i:i.reduce(function(e,t){var n=t.type,r=t.survive;if("measure"!==n||r.duplicate)return e.filtered.push(t),e;var i="".concat(t.label,"-").concat(t.value);return e.memory[i]||(e.memory[i]=!0,e.filtered.push(t)),e},{memory:{},filtered:[]}).filtered}({config:n,content:t.content}),t});return n.main.sections({chart:t,expando:r,h:i,nodes:o.node.nodes,dataset:c,formatter:u,meta:s,create:d,util:f,sections:p}),p.filter(Boolean)}({chart:t,config:r,expando:i,h:o,context:l,groups:c}),d=function(e){var t=e.translator,n=e.config,r=e.context,i=e.templates,o=n.main.layout,a=o.rows,s=o.grouping,l=o.single,c=function(e){var t=e.limit,n=e.grouping,r=e.single,i={count:0,overflow:0,index:{started:void 0,group:void 0},single:{found:!1,index:0}};return{process:function(e){var o=e.survive,a=e.visibility,s=e.index;if(a.force)return!0;if(i.single.found||(i.single.found=!0,i.single.index=s),r&&s!==i.single.index)return n?(i.index.started!==s&&i.index.group!==s&&(i.overflow++,i.index.group=s),!1):(i.overflow++,!1);if(i.count>=t&&(null==o||!o.visibility)){if(!n)return i.overflow++,!1;if(i.index.started!==s)return i.index.group!==s&&(i.overflow++,i.index.group=s),!1}return a.count&&i.count++,n&&(i.index.started=s),!0},overflow:function(){return i.overflow}}}({limit:a,grouping:s,single:"function"==typeof l?l({meta:r.node.meta,sections:i}):l}),u=i.reduce(function(e,t,n){var r=t.type,o=t.content;"section"===r&&(void 0===o?[]:o).forEach(function(t){c.process({survive:t.survive,visibility:t.visibility,index:n})&&e.push(t.content)});var a=n===i.length-1;return"divider"!==r||a||c.process({survive:t.survive,visibility:t.visibility,index:n})&&e.push(t.content),e},[]).filter(function(e){return e.length}),d=c.overflow();return d&&u.push(function(e){var t=e.translator,n=e.config,r=e.count,i=t?t.get("Object.ChartTooltip.NMore",r):"+".concat(r," more"),o=Ko(i);return[{content:i,style:{"font-weight":"bold","text-align":n.rtl?"right":"left",direction:o},colspan:2}]}({translator:t,config:n,count:d})),u}({translator:n,config:r,context:l,templates:u});return d.length?function(e){var t=e.h,n=e.style;return e.rows.map(function(e){return t("tr",{},e.map(function(e){var r={style:S(S({},n.cell||{}),e.style||{}),class:e.class};return e.colspan&&(r.colspan=e.colspan),t("td",r,e.content)}))})}({h:o,style:s,rows:d}):function(e){var t=e.h;return t("tr",{},t("td",{style:{fontStyle:"italic",opacity:.75}},"Empty"))}({h:o})}var Qo="collected";function ea(e){var t=e.chart,n=e.translator,r=e.config,i=e.expando,o=e.internal;if(!r.main.key)return!1;var a=cr(),s=Po({key:r.main.key,rtl:r.rtl,duration:r.duration}),l=r.main.events.tooltip,c=l.afterShow,u=l.afterHide,d=function(){var e=a.get(Qo);return{expando:i,nodes:e.nodes,meta:e.meta}};return ct(!0,s,{settings:{filter:function(e){return $o({chart:t,config:r,expando:i,internal:o,nodes:e})},extract:function(e){return a.set(Qo,e.node),e},content:function(e){var o=e.h,a=e.data,s=e.style;return Jo({chart:t,translator:n,config:r,expando:i,h:o,data:a,style:s})},placement:function(e){var t=e.nodes;return r.main.placement({meta:t[0].meta})},afterShow:function(){return c(d())},afterHide:function(){return u(d())}},style:{arrow:{color:r.style.background},content:r.style}})}function ta(e){var t=e.config,n=t.legend.keys;if(!n.tooltip||!n.component)return!1;if("categorical"!==t.getColorSettings().type)return!1;var r=Po({key:n.tooltip,rtl:t.rtl,duration:t.duration});return ct(!0,r,{settings:{filter:function(e){return e.filter(function(e){return e.data&&e.key===n.component})},extract:function(e){return e},content:function(e){var t=e.h,n=e.data;return[t("tr",{},[t("td",{style:S(S({},e.style.cell||{}),{"font-weight":"bold","text-align":"left"}),colspan:2},n[0].node.data.label)])]},placement:"pointer"},style:{arrow:{color:t.style.background},content:t.style}})}function na(e){var t=e.config.main.triggers.reduce(function(e,t){return t.keys.forEach(function(n){var r=t.distance||0;e.distance[n]=r,e.distances.includes(r)||e.distances.push(r),e.key[n]=!0,e.keys[r]||(e.keys[r]=[]),e.keys[r].push(n)}),e},{distance:{},distances:[],key:{},keys:{}});return function(e){return e.components.filter(function(e){return t.key[e.key]}).reduce(function(e,n){e.any=!0,e.components.push(n.key);var r=t.distance[n.key];return 0===r?e.position.push(n.key):(e.distances.includes(r)||(e.distances.push(r),e.distanceKeys[r]=[]),e.distanceKeys[r].push(n.key)),e},{any:!1,components:[],position:[],distances:[],distanceKeys:{}})}}var ra=function(){return!0};function ia(e){var t=e.config.main.triggers.reduce(function(e,t){var n=t.filter;return t.keys.forEach(function(t){e[t]="function"==typeof n?n:ra}),e},{});return function(e){var n=t[e.key];return!n||n(e)}}function oa(e){var t=e.chart,n=e.event,r=e.component,i={absolute:{x:0,y:0},relative:{x:0,y:0}},o=t.element.getBoundingClientRect(),a=o.left,s=o.top;i.absolute.x=(void 0===n.clientX?Math.floor(n.srcEvent.clientX):n.clientX)-a,i.absolute.y=(void 0===n.clientY?Math.floor(n.srcEvent.clientY):n.clientY)-s;var l=t.component(r);if(l){var c=l.rect.computedInner;i.relative.x=i.absolute.x-c.x,i.relative.y=i.absolute.y-c.y}return i}function aa(e){var t=e.chart,n=e.filter,r=e.hits,i=e.position,o=[];if(r.position.length&&o.push.apply(o,A(t.shapesAt(i.absolute,{components:r.position.map(function(e){return{key:e}})}).filter(n))),!o.length&&r.distances.length){var a=[];r.distances.forEach(function(e){a.push.apply(a,A(t.shapesAt({cx:i.absolute.x,cy:i.absolute.y,r:e},{components:r.distanceKeys[e].map(function(e){return{key:e}})}).filter(n)))}),a.length&&o.push(function(e){var t=e.nodes,n=e.origin,r=t.find(function(e){return"path"===e.type});if(r)return r;var i=function(e){var t=Math.abs(n.x-(e.localBounds.x+e.localBounds.width/2)),r=Math.abs(n.y-(e.localBounds.y+e.localBounds.height/2));return Math.sqrt(t*t+r*r)};return t.slice(1).reduce(function(e,t){var n=i(t);return n<e.distance&&(e.distance=n,e.node=t),e},{node:t[0],distance:i(t[0])}).node}({nodes:a,origin:i.relative}))}return o}var sa="tooltipTap";function la(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal,o=e.facade,a=n.delay.tap,s=na({config:n}),l=ia({config:n}),c=n.main.triggers.reduce(function(e,t){return e.push.apply(e,A(t.keys)),e},[]);return{key:"event:".concat(sa),type:"Tap",options:{event:sa,enable:function(e,r){return!r||!!n.enable({event:r})&&t.componentsFromPoint({x:r.center.x,y:r.center.y}).filter(function(e){return-1!==c.indexOf(e.key)}).length>0}},recognizeWith:"tap",events:x({},sa,function(e){if(e.preventDefault(),"mouse"!==e.pointerType&&!n.main.suppress({event:e})){var c=t.component(n.main.key);if(c&&c.show){var u=t.componentsFromPoint({x:e.center.x,y:e.center.y}),d=s({components:u});if(d.any){var f=C(d.components,1)[0],p=oa({chart:t,event:e,component:f});i.set(Ro,p);var h=aa({chart:t,filter:l,hits:d,position:p});if(h.length){var m=h[0].key;n.main.events.tooltip.beforeShow({expando:r,event:e,collectNodes:function(){return o.collectNodes({nodes:h})},meta:{triggerer:m,position:p}}).then(function(){c.emit("show",e,{nodes:h,delay:a})}).catch(function(){})}else c.emit("hide")}else c.emit("hide")}}})}}function ca(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal,o=e.facade,a=na({config:n}),s=ia({config:n}),l=function(e){var t=e.config,n=e.expando,r=e.internal,i=e.facade,o=t.main.events.tooltip.beforeShow,a=t.delay.hover,s={ongoing:{},latest:void 0};return function(e){var t=e.event,l=e.tooltip,c=e.nodes,u=function(e){var t=e.nodes;return JSON.stringify(t.map(function(e){var t;return{key:e.key,bounds:e.bounds,value:null===(t=e.data)||void 0===t?void 0:t.value}}))}({nodes:c});if(!s.ongoing[u]){s.ongoing[u]=!0,s.latest=u;var d=c[0].key;o({expando:n,event:t,collectNodes:function(){return i.collectNodes({nodes:c})},meta:{triggerer:d,position:r.get(Ro)}}).then(function(){u===s.latest&&l.emit("show",t,{nodes:c,delay:a})}).catch(function(){l.emit("show")}).finally(function(){delete s.ongoing[u],u===s.latest&&(s.latest=void 0)})}}}({config:n,expando:r,internal:i,facade:o}),c=[n.main.key,n.legend.keys.tooltip].filter(Boolean),u=function(){c.forEach(function(e){var n=t.component(e);null!=n&&n.show&&n.emit("hide")})};return{type:"native",events:{mousemove:function(e){if(n.enable({event:e})&&!n.main.suppress({event:e})){var r=t.componentsFromPoint({x:e.clientX,y:e.clientY}),o=t.component(n.main.key);if(o&&o.show){var c=a({components:r});if(c.any){var u=C(c.components,1)[0],d=oa({chart:t,event:e,component:u});i.set(Ro,d);var f=aa({chart:t,filter:s,hits:c,position:d});if(!f.length)return void o.emit("hide");l({event:e,tooltip:o,nodes:f})}else o.emit("hide")}var p=n.legend;if(p.keys.tooltip&&p.keys.component){var h=t.component(p.keys.tooltip);h&&h.show&&(r.some(function(e){return e.key===p.keys.component})?h.emit("show",e):h.emit("hide"))}}},mouseup:function(e){2===e.button&&u()},mouseleave:function(){n.main.events.interaction.mouseleave({expando:r}),u()},wheel:function(){u()}}}}function ua(e){var t=e.chart,n=e.translator,r=function(e){var t=e.config;return ct(!0,{},{rtl:!1,enable:No.FALSE,getColorSettings:No.OBJECT,style:{fontSize:void 0,fontFamily:void 0,color:void 0,background:void 0},delay:{hover:500,tap:0},duration:8e3,main:{key:void 0,suppress:No.FALSE,getGroupByValue:No.NOOP,collectibles:[],triggers:[],placement:function(){return{type:"bounds"}},placements:{collectible:"combine"},showDuplicateMeasures:!1,layout:{rows:7,grouping:!1,single:!1},section:No.ARRAY,sections:No.NOOP,events:{tooltip:{beforeShow:function(){return Promise.resolve()},afterShow:No.NOOP,afterHide:No.NOOP},interaction:{mouseleave:No.NOOP}}},legend:{keys:{tooltip:void 0,component:void 0}}},void 0===t?{}:t)}({config:e.config}),i=cr(),o=cr(),a={components:void 0,interactions:void 0};return{getComponents:function(){return a.components||(a.components=function(e){var t=e.config;return[ea({chart:e.chart,translator:e.translator,config:t,expando:e.expando,internal:e.internal}),ta({config:t})].filter(Boolean)}({chart:t,translator:n,config:r,expando:i,internal:o})),a.components},getInteractions:function(){return a.interactions||(a.interactions=function(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal,o=function(e){var t=e.chart,n=e.config,r=e.expando,i=e.internal;return{collectNodes:function(e){var o=e.nodes,a=C($o({chart:t,config:n,expando:r,internal:i,nodes:o}),1)[0];return(void 0===a?{nodes:[]}:a).nodes}}}({chart:t,config:n,expando:r,internal:i});return{gestures:[la({chart:t,config:n,expando:r,internal:i,facade:o})],native:ca({chart:t,config:n,expando:r,internal:i,facade:o})}}({chart:t,config:r,expando:i,internal:o})),a.interactions},expando:i}}var da="AVERAGE",fa="POLYNOMIAL2",pa="POLYNOMIAL3",ha="POLYNOMIAL4";function ma(e){var t=e.dimValue,n=e.value,r=e.qTrendLine,i=r.qType,o=r.qCoeff,a={x:t,y:o[2]*Math.pow(n,2)+o[1]*n+o[0]};switch(i){case fa:return a;case pa:return a.y+=o[3]*Math.pow(n,3),a;case ha:return a.y+=o[4]*Math.pow(n,4)+o[3]*Math.pow(n,3),a;default:return a}}var ga={average:function(e){return{x:e.dimValue,y:e.qTrendLine.qCoeff[0]}},linear:function(e){var t=e.dimValue,n=e.value,r=e.qTrendLine;return{x:t,y:r.qCoeff[1]*n+r.qCoeff[0]}},polynomial2:ma,polynomial3:ma,polynomial4:ma,exponential:function(e){var t=e.dimValue,n=e.value,r=e.qTrendLine;return{x:t,y:Math.exp(r.qCoeff[0]+n*r.qCoeff[1])}},log:function(e){var t=e.dimValue,n=e.value,r=e.qTrendLine;return{x:t,y:r.qCoeff[1]+r.qCoeff[0]*Math.log(n)}},power:function(e){var t=e.dimValue,n=e.value,r=e.qTrendLine;return{x:t,y:Math.pow(10,r.qCoeff[0]+r.qCoeff[1]*Math.log(n)*Math.LOG10E)}}};function ya(e,t){for(var n=ga[t.qType.toLowerCase()],r=Math.max(1,e/500),i=1/0,o=-1/0,a=0;a<e;a+=r){var s=n({dimValue:null,value:a+1,qTrendLine:t}).y;i=Math.min(s,i),o=Math.max(s,o)}return{min:i,max:o}}function va(e){return ga[e.qType.toLowerCase()]}var ba={TYPES:{AVERAGE:"properties.trendlines.types.average",LINEAR:"properties.trendlines.types.linear",POLYNOMIAL2:"properties.trendlines.types.polynomial2",POLYNOMIAL3:"properties.trendlines.types.polynomial3",POLYNOMIAL4:"properties.trendlines.types.polynomial4",EXPONENTIAL:"properties.trendlines.types.exponential",LOG:"properties.trendlines.types.logarithmic",POWER:"properties.trendlines.types.power"},STYLE:{DASHED:"properties.trendlines.style.dashed"},TYPE:"properties.trendlines.type",HEADER:"properties.trendlines",ADD_BUTTON:"properties.trendlines.button.add"},xa={color:"#f93f17",index:9},wa={x:NaN,y:NaN,dimValue:NaN,layerId:NaN,measureIndex:NaN},Sa=function(e){var t=e.layoutService,n=e.getMinMax,r=e.colorModel,i=e.chart,o=e.translator,a=e.keys.colorScale,s=e.isEnabled,l=void 0===s?function(){return!0}:s,c=[wa],u=[],d=[],f=function(e,t){return e.meta.isContinuous?function(e,t){return{generate:function(e,n,r){var i=[],o=va(e),a=t({qTrendLine:e,measureIndex:r}),s=a.min,l=a.max,c=(l-s)/100;if(c>0){for(var u=function(t){var a=o({dimValue:t,value:t,qTrendLine:e});if(a.layerId=n,a.measureIndex=r,a.dimValue=t,e.flipXY){var s=a.x;a.x=a.y,a.y=s,a.dimValue=a.x}i.push(a)},d=s,f=s;f<=l;f+=c)u(f),d=f;d!==l&&u(l)}return i},calculate:function(e,t){return va(e)({dimValue:t,value:t,qTrendLine:e})},findMinMax:function(e,t){var n=this.generate(t).map(function(e){return e.y});return{min:Math.min.apply(Math,A(n)),max:Math.max.apply(Math,A(n))}}}}(0,t):e.meta.mode.K?function(e){return{generate:function(t,n,r){for(var i=[],o=e.getDataPages()[0],a=o.qData[0].qSubNodes,s=o.qArea.qTop,l=ga[t.qType.toLowerCase()],c=0;c<a.length;c++){var u=a[c],d=l({dimValue:u.qElemNo,value:c+s+1,qTrendLine:t});d.layerId=n,d.measureIndex=r,d.dimValue=u.qText,i.push(d)}return i},findMinMax:ya}}(e):function(e){return{generate:function(t,n,r){for(var i=[],o=e.getDataPages()[0],a=o.qMatrix,s=o.qArea.qTop,l=ga[t.qType.toLowerCase()],c=0;c<a.length;c++){var u=a[c][0],d=c+s+1,f=l({dimValue:u.qElemNumber,value:d,qTrendLine:t});f.layerId=n,f.measureIndex=r,f.dimValue=u.qText,i.push(f)}return i},calculate:function(e,t,n){return(0,ga[e.qType.toLowerCase()])({dimValue:n,value:t,qTrendLine:e})},findMinMax:ya}}(e)}(t,n);t.getLayoutValue("qHyperCube.qMeasureInfo",[]).forEach(function(e,t){Array.isArray(e.qTrendLines)&&(u.push.apply(u,A(e.qTrendLines)),d.push.apply(d,A(e.qTrendLines.map(function(){return t}))))});var p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e},n=cr();return function(r){var i=t(r);return n.has(i)?n.get(i):n.set(i,e(r))}}(function(e){var t=(u[e]||{}).style,n=r.settings();if(t.autoColor){if("measure"===n.mode){var o=d[e],s=i.scale(a)(o);return function(e){return dn(e).l<70}(s)?function(e){var t=dn(e);return t.l<30?t.l+=15:t.l<50?t.l+=10:t.l+=5,t.toString()}(s):function(e){var t=dn(e);return t.l-=5,t.toString()}(s)}return r.resolveUIColor(xa)}return t.paletteColor?r.resolveUIColor(t.paletteColor):"none"});return{query:{hasTrendLines:function(){return!!u.length&&l()},getData:function(){return c},getStroke:p,getLineDash:function(e){return(u[e]||{}).style.lineDash},getLabel:function(e){return(u[e]||{}).label},getExpression:function(e){var t=(u[e]||{}).qExpression;return u[e].flipXY&&(t=t.replace(/[xy]/g,function(e){return"x"===e?"y":"x"})),t},isFlipped:function(e){return u[e].flipXY},getType:function(e){var t=(u[e]||{}).qType;return o.get(ba.TYPES[t])},getMinMax:function(){var e=1/0,n=-1/0;return u.forEach(function(r){var i=f.findMinMax(t.meta.size.y,r);e=Math.min(i.min,e),n=Math.max(i.max,n)}),{min:e,max:n}},getCalculatedValue:function(e,t,n){var r=u[e];return f.calculate(r,t,n)}},command:{update:function(){c.length=0,u.forEach(function(e,t){var n=f.generate(e,t,d[t]);c.push.apply(c,A(n))})}}}},Ma={source:"trend",extract:{field:"x",props:{minor:{field:"y"},layer:{field:"layerId"},measureIndex:{field:"measureIndex"},dimValue:{field:"dimValue"}}}},ka=function(e){var t=e.meta;return t.isContinuous?function(e){return(0,e.scale)(e.datum.value)}:t.isGroupedByMeasure?function(e){var t=e.scale,n=e.datum;return t([n.value,n.measureIndex.value])+t.bandwidth()/2}:function(e){var t=e.scale;return t(e.datum.value)+t.bandwidth()/2}},Ea=function(e){e.style.dashed?e.style.lineDash="8, 4":e.style.lineDash=""},Ca=function(e){Ea(e),e.qMultiDimMode="Sum",e.qXColIx=0};function Aa(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Da(e){return Math.pow(e.x,2)+Math.pow(e.y,2)}function qa(e,t,n){var r=Aa(n,e),i=Aa(t,e),o=Da(i);if(0===o)return e;var a,s,l,c,u=(s=i,((a=r).x*s.x+a.y*s.y)/o);return u<=0?e:u>=1?t:function(e,t){return{x:e.x+t.x,y:e.y+t.y}}(e,(c=u,{x:(l=i).x*c,y:l.y*c}))}function _a(e){var t,n,r=e.keys,i=e.model,o=e.chart,a=e.pos,s=e.lineNode,l=i,c=o.component(r.trendlines),u=o.scale(r.majorScale),d=o.scale(r.minorScale),f=s.data.layer.value,p=function(e,t){var n=1/0,r=null;if(1===e.length)return e[0];for(var i=0;i<e.length-1;++i){var o=qa(e[i],e[i+1],t),a=Da(Aa(o,t));a<n&&(n=a,r=o)}return r}(s.data.points.map(function(e){return{x:u(e.dimValue.value)*c.rect.computed.width,y:d(e.minor.value)*c.rect.computed.height}}),a);return l.query.isFlipped(f)?(n=d.invert(p.y/c.rect.computed.height),t=l.query.getCalculatedValue(f,n).y,p.x=u(t)*c.rect.computed.width):(t=u.invert(p.x/c.rect.computed.width),n=l.query.getCalculatedValue(f,t).y,p.y=d(n)*c.rect.computed.height),{key:s.key,children:[],data:{layer:f,x:t,y:n},bounds:{x:p.x,y:p.y,width:0,height:0}}}function Ta(e){var t=e.animations,n=e.chart,r=e.colorService,i=e.isEnabled,o=e.keys,a=void 0===o?{}:o,s=e.layoutService,l=e.orientation,c=e.translator,u=e.getMinMax;a.trendlines||(a.trendlines="trend-lines");var d=Sa({layoutService:s,getMinMax:u,colorModel:{settings:function(){return r.getSettings()},resolveUIColor:function(e){return r.getPaletteColor(e)}},chart:n,translator:c,keys:a,isEnabled:i});return{getComponents:function(){return function(e,t){var n=t.animations,r=t.layoutService,i=t.trendLineModel,o=t.orientation;if(!i.query.hasTrendLines())return[];var a=function(e,t){var n=e.trendlines,r=e.majorScale,i=e.minorScale,o=t.animations,a=t.trendLineModel,s=t.orientation,l=ka(t.layoutService);return{key:n,type:"line",layout:{dock:"center"},data:Ma,animations:o,settings:{connect:!0,orientation:s,coordinates:{major:{scale:r,fn:l},minor:{scale:i},layerId:{ref:"layer"}},layers:{curve:"monotone",line:{strokeWidth:2,stroke:function(e){var t=e.datum;return a.query.getStroke(t.layer.value)},strokeDasharray:function(e){var t=e.datum;return a.query.getLineDash(t.layer.value)}}}}}}(e,{animations:n,trendLineModel:i,layoutService:r,orientation:o}),s=[a];if(e.tooltipOverlay){var l=function(e,t){var n=e.majorScale,r=e.minorScale,i=e.tooltipOverlay,o="horizontal"===t.orientation,a={scale:n,fn:ka(t.layoutService)},s={scale:r,ref:"minor"};return{key:i,type:"point",layout:{dock:"center"},data:Ma,settings:{x:o?a:s,y:o?s:a,opacity:0,size:1,sizeLimits:{maxPx:8,minPx:8}}}}(e,{layoutService:r,orientation:o});s.push(l)}return s}(a,{animations:t,layoutService:s,trendLineModel:d,orientation:l})},getData:function(){return d.query.hasTrendLines()?[{key:"trend",data:d.query.getData()}]:[]},collectNodes:function(e){var t=e.nodes,r=e.meta;return function(e){var t=e.keys,n=e.model,r=e.chart,i=e.nodes,o=e.meta;return i.length?[_a({keys:t,model:n,chart:r,pos:o.position.relative,lineNode:i[0]})]:[]}({keys:a,model:d,chart:n,nodes:t,meta:r})},getModel:function(){return d},update:function(){return d.command.update()}}}function Na(){const[t,n]=e.useState(),[r,i]=e.useState();return e.useEffect(()=>{n(function(e){var t=S({},e),n={},r={},i=!1,o={get:function(e){return t[e]},set:function(e,o){var a=t[e];!i&&n[e]?t[e]=n[e](o,a):t[e]=o,!i&&r[e]&&r[e](t[e],a)},preventSet:function(e,t){i=!0,o.set(e,t),i=!1},intercept:function(e,t){n[e]=t},onChanged:function(e,t){r[e]=t}};return o}({dataView:{},legendScrollOffset:void 0})),i(cr())},[]),{viewCache:r,viewState:t}}Ta.propertyPanelProperties=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).translator;return{type:"array",ref:"qTrendLines",titleTranslation:ba.HEADER,itemTitleRef:function(t){var n=D(t.label);return"string"===n&&t.label?t.label:"object"===n?t.label.qStringExpression?t.label.qStringExpression.qExpr:t.label.qValueExpression.qExpr:e.get(ba.TYPES[t.qType])},max:8,allowAdd:!0,allowRemove:!0,allowMove:!1,addTranslation:ba.ADD_BUTTON,add:Ca,items:{label:{ref:"label",type:"string",expression:"optional",translation:"Common.Label",defaultValue:""},type:{ref:"qType",type:"string",component:"dropdown",translation:ba.TYPE,options:[{value:da,translation:ba.TYPES.AVERAGE},{value:"LINEAR",translation:ba.TYPES.LINEAR},{value:fa,translation:ba.TYPES.POLYNOMIAL2},{value:pa,translation:ba.TYPES.POLYNOMIAL3},{value:ha,translation:ba.TYPES.POLYNOMIAL4},{value:"EXPONENTIAL",translation:ba.TYPES.EXPONENTIAL},{value:"LOG",translation:ba.TYPES.LOG},{value:"POWER",translation:ba.TYPES.POWER}],defaultValue:da},autoColor:{ref:"style.autoColor",type:"boolean",translation:"properties.colors",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},paletteColor:{ref:"style.paletteColor",translation:"properties.color",type:"object",component:"color-picker",dualOutput:!0,defaultValue:xa,show:function(e){return!e.style.autoColor}},dashed:{ref:"style.dashed",translation:ba.STYLE.DASHED,type:"boolean",defaultValue:!0,change:Ea}}}};var Oa=Object.prototype.hasOwnProperty,Ia=Object.prototype.toString,La=Object.defineProperty,Pa=Object.getOwnPropertyDescriptor,Ra=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Ia.call(e)},za=function(e){if(!e||"[object Object]"!==Ia.call(e))return!1;var t,n=Oa.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Oa.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Oa.call(e,t)},Fa=function(e,t){La&&"__proto__"===t.name?La(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},ja=function(e,t){if("__proto__"===t){if(!Oa.call(e,t))return;if(Pa)return Pa(e,t).value}return e[t]},Va=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=ja(s,n),s!==(i=ja(t,n))&&(u&&i&&(za(i)||(o=Ra(i)))?(o?(o=!1,a=r&&Ra(r)?r:[]):a=r&&za(r)?r:{},Fa(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&Fa(s,{name:n,newValue:i}));return s},Ha="2.10.0";function Ba(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Wa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$a(Object(n),!0).forEach(function(t){Ba(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$a(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ua(e){return!!e.changedTouches}function Ya(e){return"number"==typeof e&&!isNaN(e)}function Xa(e){return"number"!=typeof e||isNaN(e)}function Ga(e){const t=e.length;let n=NaN,r=NaN,i=NaN,o=NaN;for(let a=0;a<t;a++)n=isNaN(n)?e[a].x:Math.min(n,e[a].x),r=isNaN(r)?e[a].x:Math.max(r,e[a].x),i=isNaN(i)?e[a].y:Math.min(i,e[a].y),o=isNaN(o)?e[a].y:Math.max(o,e[a].y);return[n,i,r,o]}function Ka(e){return[{x:e.x1||0,y:e.y1||0},{x:e.x2||0,y:e.y2||0}]}function Za(e){return[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}]}function Ja(e){const[t,n,r,i]=Ga(e);return{x:t,y:n,width:r-t,height:i-n}}function Qa(e){return{x1:e[0].x,y1:e[0].y,x2:e[1].x,y2:e[1].y}}function es(e){const{x:t,y:n,width:r,height:i,x1:o,x2:a,y1:s,y2:l,cx:c,cy:u,r:d,vertices:f}=e||{};return Ya(c)&&Ya(u)&&Ya(d)?"circle":Ya(o)&&Ya(a)&&Ya(s)&&Ya(l)?"line":Ya(t)&&Ya(n)&&Ya(r)&&Ya(i)?"rect":Ya(t)&&Ya(n)?"point":Array.isArray(f)?f.every(e=>Array.isArray(e))?"geopolygon":"polygon":null}function ts(e,t){return{x:t.x-e,y:t.y-e,width:t.width+e,height:t.height+e}}var ns=Math.PI,rs=2*ns,is=1e-6,os=rs-is;function as(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function ss(){return new as}function ls(e){return function(){return e}}as.prototype=ss.prototype={constructor:as,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-e,l=r-t,c=o-e,u=a-t,d=c*c+u*u;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>is)if(Math.abs(u*s-l*c)>is&&i){var f=n-o,p=r-a,h=s*s+l*l,m=f*f+p*p,g=Math.sqrt(h),y=Math.sqrt(d),v=i*Math.tan((ns-Math.acos((h+d-m)/(2*g*y)))/2),b=v/y,x=v/g;Math.abs(b-1)>is&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+i+","+i+",0,0,"+ +(u*f>c*p)+","+(this._x1=e+x*s)+","+(this._y1=t+x*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t);else;},arc:function(e,t,n,r,i,o){e=+e,t=+t,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^o,d=o?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)>is||Math.abs(this._y1-c)>is)&&(this._+="L"+l+","+c),n&&(d<0&&(d=d%rs+rs),d>os?this._+="A"+n+","+n+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):d>is&&(this._+="A"+n+","+n+",0,"+ +(d>=ns)+","+u+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var cs=Math.abs,us=Math.atan2,ds=Math.cos,fs=Math.max,ps=Math.min,hs=Math.sin,ms=Math.sqrt,gs=1e-12,ys=Math.PI,vs=ys/2,bs=2*ys;function xs(e){return e>=1?vs:e<=-1?-vs:Math.asin(e)}function ws(e){return e.innerRadius}function Ss(e){return e.outerRadius}function Ms(e){return e.startAngle}function ks(e){return e.endAngle}function Es(e){return e&&e.padAngle}function Cs(e,t,n,r,i,o,a){var s=e-n,l=t-r,c=(a?o:-o)/ms(s*s+l*l),u=c*l,d=-c*s,f=e+u,p=t+d,h=n+u,m=r+d,g=(f+h)/2,y=(p+m)/2,v=h-f,b=m-p,x=v*v+b*b,w=i-o,S=f*m-h*p,M=(b<0?-1:1)*ms(fs(0,w*w*x-S*S)),k=(S*b-v*M)/x,E=(-S*v-b*M)/x,C=(S*b+v*M)/x,A=(-S*v+b*M)/x,D=k-g,q=E-y,_=C-g,T=A-y;return D*D+q*q>_*_+T*T&&(k=C,E=A),{cx:k,cy:E,x01:-u,y01:-d,x11:k*(i/w-1),y11:E*(i/w-1)}}function As(){var e=ws,t=Ss,n=ls(0),r=null,i=Ms,o=ks,a=Es,s=null;function l(){var l,c,u=+e.apply(this,arguments),d=+t.apply(this,arguments),f=i.apply(this,arguments)-vs,p=o.apply(this,arguments)-vs,h=cs(p-f),m=p>f;if(s||(s=l=ss()),d<u&&(c=d,d=u,u=c),d>gs)if(h>bs-gs)s.moveTo(d*ds(f),d*hs(f)),s.arc(0,0,d,f,p,!m),u>gs&&(s.moveTo(u*ds(p),u*hs(p)),s.arc(0,0,u,p,f,m));else{var g,y,v=f,b=p,x=f,w=p,S=h,M=h,k=a.apply(this,arguments)/2,E=k>gs&&(r?+r.apply(this,arguments):ms(u*u+d*d)),C=ps(cs(d-u)/2,+n.apply(this,arguments)),A=C,D=C;if(E>gs){var q=xs(E/u*hs(k)),_=xs(E/d*hs(k));(S-=2*q)>gs?(x+=q*=m?1:-1,w-=q):(S=0,x=w=(f+p)/2),(M-=2*_)>gs?(v+=_*=m?1:-1,b-=_):(M=0,v=b=(f+p)/2)}var T=d*ds(v),N=d*hs(v),O=u*ds(w),I=u*hs(w);if(C>gs){var L,P=d*ds(b),R=d*hs(b),z=u*ds(x),F=u*hs(x);if(h<ys&&(L=function(e,t,n,r,i,o,a,s){var l=n-e,c=r-t,u=a-i,d=s-o,f=d*l-u*c;if(!(f*f<gs))return[e+(f=(u*(t-o)-d*(e-i))/f)*l,t+f*c]}(T,N,z,F,P,R,O,I))){var j=T-L[0],V=N-L[1],H=P-L[0],B=R-L[1],$=1/hs(function(e){return e>1?0:e<-1?ys:Math.acos(e)}((j*H+V*B)/(ms(j*j+V*V)*ms(H*H+B*B)))/2),W=ms(L[0]*L[0]+L[1]*L[1]);A=ps(C,(u-W)/($-1)),D=ps(C,(d-W)/($+1))}}M>gs?D>gs?(g=Cs(z,F,T,N,d,D,m),y=Cs(P,R,O,I,d,D,m),s.moveTo(g.cx+g.x01,g.cy+g.y01),D<C?s.arc(g.cx,g.cy,D,us(g.y01,g.x01),us(y.y01,y.x01),!m):(s.arc(g.cx,g.cy,D,us(g.y01,g.x01),us(g.y11,g.x11),!m),s.arc(0,0,d,us(g.cy+g.y11,g.cx+g.x11),us(y.cy+y.y11,y.cx+y.x11),!m),s.arc(y.cx,y.cy,D,us(y.y11,y.x11),us(y.y01,y.x01),!m))):(s.moveTo(T,N),s.arc(0,0,d,v,b,!m)):s.moveTo(T,N),u>gs&&S>gs?A>gs?(g=Cs(O,I,P,R,u,-A,m),y=Cs(T,N,z,F,u,-A,m),s.lineTo(g.cx+g.x01,g.cy+g.y01),A<C?s.arc(g.cx,g.cy,A,us(g.y01,g.x01),us(y.y01,y.x01),!m):(s.arc(g.cx,g.cy,A,us(g.y01,g.x01),us(g.y11,g.x11),!m),s.arc(0,0,u,us(g.cy+g.y11,g.cx+g.x11),us(y.cy+y.y11,y.cx+y.x11),m),s.arc(y.cx,y.cy,A,us(y.y11,y.x11),us(y.y01,y.x01),!m))):s.arc(0,0,u,w,x,m):s.lineTo(O,I)}else s.moveTo(0,0);if(s.closePath(),l)return s=null,l+""||null}return l.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-ys/2;return[ds(r)*n,hs(r)*n]},l.innerRadius=function(t){return arguments.length?(e="function"==typeof t?t:ls(+t),l):e},l.outerRadius=function(e){return arguments.length?(t="function"==typeof e?e:ls(+e),l):t},l.cornerRadius=function(e){return arguments.length?(n="function"==typeof e?e:ls(+e),l):n},l.padRadius=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:ls(+e),l):r},l.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:ls(+e),l):i},l.endAngle=function(e){return arguments.length?(o="function"==typeof e?e:ls(+e),l):o},l.padAngle=function(e){return arguments.length?(a="function"==typeof e?e:ls(+e),l):a},l.context=function(e){return arguments.length?(s=null==e?null:e,l):s},l}function Ds(e){this._context=e}function qs(e){return new Ds(e)}function _s(e){return e[0]}function Ts(e){return e[1]}function Ns(){var e=_s,t=null,n=ls(0),r=Ts,i=ls(!0),o=null,a=qs,s=null;function l(l){var c,u,d,f,p,h=l.length,m=!1,g=new Array(h),y=new Array(h);for(null==o&&(s=a(p=ss())),c=0;c<=h;++c){if(!(c<h&&i(f=l[c],c,l))===m)if(m=!m)u=c,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=c-1;d>=u;--d)s.point(g[d],y[d]);s.lineEnd(),s.areaEnd()}m&&(g[c]=+e(f,c,l),y[c]=+n(f,c,l),s.point(t?+t(f,c,l):g[c],r?+r(f,c,l):y[c]))}if(p)return s=null,p+""||null}function c(){return function(){var e=_s,t=Ts,n=ls(!0),r=null,i=qs,o=null;function a(a){var s,l,c,u=a.length,d=!1;for(null==r&&(o=i(c=ss())),s=0;s<=u;++s)!(s<u&&n(l=a[s],s,a))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+e(l,s,a),+t(l,s,a));if(c)return o=null,c+""||null}return a.x=function(t){return arguments.length?(e="function"==typeof t?t:ls(+t),a):e},a.y=function(e){return arguments.length?(t="function"==typeof e?e:ls(+e),a):t},a.defined=function(e){return arguments.length?(n="function"==typeof e?e:ls(!!e),a):n},a.curve=function(e){return arguments.length?(i=e,null!=r&&(o=i(r)),a):i},a.context=function(e){return arguments.length?(null==e?r=o=null:o=i(r=e),a):r},a}().defined(i).curve(a).context(o)}return l.x=function(n){return arguments.length?(e="function"==typeof n?n:ls(+n),t=null,l):e},l.x0=function(t){return arguments.length?(e="function"==typeof t?t:ls(+t),l):e},l.x1=function(e){return arguments.length?(t=null==e?null:"function"==typeof e?e:ls(+e),l):t},l.y=function(e){return arguments.length?(n="function"==typeof e?e:ls(+e),r=null,l):n},l.y0=function(e){return arguments.length?(n="function"==typeof e?e:ls(+e),l):n},l.y1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:ls(+e),l):r},l.lineX0=l.lineY0=function(){return c().x(e).y(n)},l.lineY1=function(){return c().x(e).y(r)},l.lineX1=function(){return c().x(t).y(n)},l.defined=function(e){return arguments.length?(i="function"==typeof e?e:ls(!!e),l):i},l.curve=function(e){return arguments.length?(a=e,null!=o&&(s=a(o)),l):a},l.context=function(e){return arguments.length?(null==e?o=s=null:s=a(o=e),l):o},l}function Os(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function Is(e){return e}Ds.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var Ls=Array.prototype.slice;function Ps(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Rs(e){this._context=e}function zs(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function Fs(e,t){this._context=e,this._k=(1-t)/6}Rs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Ps(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Ps(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Fs.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:zs(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:zs(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var js=function e(t){function n(e){return new Fs(e,t)}return n.tension=function(t){return e(+t)},n}(0);function Vs(e,t){this._context=e,this._alpha=t}Vs.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(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:!function(e,t,n){var r=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>gs){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>gs){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,o,a,e._x2,e._y2)}(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Hs=function e(t){function n(e){return t?new Vs(e,t):new Fs(e,0)}return n.alpha=function(t){return e(+t)},n}(.5);function Bs(e){return e<0?-1:1}function $s(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(Bs(o)+Bs(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Ws(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Us(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function Ys(e){this._context=e}function Xs(e){this._context=new Gs(e)}function Gs(e){this._context=e}function Ks(e){this._context=e}function Zs(e){var t,n,r=e.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function Js(e,t){this._context=e,this._t=t}function Qs(e,t){if((i=e.length)>1)for(var n,r,i,o=1,a=e[t[0]],s=a.length;o<i;++o)for(r=a,a=e[t[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function el(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function tl(e,t){return e[t]}function nl(e){for(var t,n=-1,r=0,i=e.length,o=-1/0;++n<i;)(t=+e[n][1])>o&&(o=t,r=n);return r}function rl(e){for(var t,n=0,r=-1,i=e.length;++r<i;)(t=+e[r][1])&&(n+=t);return n}function il(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unspecified",r=arguments.length>2?arguments[2]:void 0;const i={},o=e||{get:()=>{},has:()=>!1,default:()=>{}};function a(e,t){if(!e||"string"!=typeof e)throw new TypeError("Invalid argument: key must be a non-empty string");return!(e in i)&&(i[e]=t,!0)}function s(e){return i[e]||o.get(e)}function l(e,i){if(void 0!==i)return a(e,i);const o=s(e);return r&&void 0===o&&r.warn("".concat(e," does not exist in ").concat(n," registry")),o||s(t)}return t=o.default(),l.add=a,l.get=s,l.has=function(e){return!!i[e]||o.has(e)},l.remove=function(e){const t=i[e];return delete i[e],t},l.getKeys=function(){return Object.keys(i)},l.getValues=function(){return Object.keys(i).map(e=>i[e])},l.default=function(e){return void 0!==e&&(t=e),t},l.register=a,l}function ol(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function al(e){return(e=ol(Math.abs(e)))?e[1]:NaN}Ys.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Us(this,this._t0,Ws(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Us(this,Ws(this,n=$s(this,e,t)),n);break;default:Us(this,this._t0,n=$s(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(Xs.prototype=Object.create(Ys.prototype)).point=function(e,t){Ys.prototype.point.call(this,t,e)},Gs.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}},Ks.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=Zs(e),i=Zs(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},Js.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var sl,ll=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function cl(e){if(!(t=ll.exec(e)))throw new Error("invalid format: "+e);var t;return new ul({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function ul(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function dl(e,t){var n=ol(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}cl.prototype=ul.prototype,ul.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 fl={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>dl(100*e,t),r:dl,s:function(e,t){var n=ol(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(sl=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+ol(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function pl(e){return e}var hl,ml,gl,yl=Array.prototype.map,vl=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function bl(e){var t=void 0===e.grouping||void 0===e.thousands?pl:function(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}(yl.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",i=void 0===e.decimal?".":e.decimal+"",o=void 0===e.numerals?pl:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(yl.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",s=void 0===e.minus?"−":e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function c(e){var c=(e=cl(e)).fill,u=e.align,d=e.sign,f=e.symbol,p=e.zero,h=e.width,m=e.comma,g=e.precision,y=e.trim,v=e.type;"n"===v?(m=!0,v="g"):fl[v]||(void 0===g&&(g=12),y=!0,v="g"),(p||"0"===c&&"="===u)&&(p=!0,c="0",u="=");var b="$"===f?n:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===f?r:/[%p]/.test(v)?a:"",w=fl[v],S=/[defgprs%]/.test(v);function M(e){var n,r,a,f=b,M=x;if("c"===v)M=w(e)+M,e="";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:w(Math.abs(e),g),y&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),k&&0===+e&&"+"!==d&&(k=!1),f=(k?"("===d?d:s:"-"===d||"("===d?"":d)+f,M=("s"===v?vl[8+sl/3]:"")+M+(k&&"("===d?")":""),S)for(n=-1,r=e.length;++n<r;)if(48>(a=e.charCodeAt(n))||a>57){M=(46===a?i+e.slice(n+1):e.slice(n))+M,e=e.slice(0,n);break}}m&&!p&&(e=t(e,1/0));var E=f.length+e.length+M.length,C=E<h?new Array(h-E+1).join(c):"";switch(m&&p&&(e=t(C+e,C.length?h-M.length:1/0),C=""),u){case"<":e=f+e+M+C;break;case"=":e=f+C+e+M;break;case"^":e=C.slice(0,E=C.length>>1)+f+e+M+C.slice(E);break;default:e=C+f+e+M}return o(e)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),M.toString=function(){return e+""},M}return{format:c,formatPrefix:function(e,t){var n=c(((e=cl(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(al(t)/3))),i=Math.pow(10,-r),o=vl[8+r/3];return function(e){return n(i*e)+o}}}}!function(e){hl=bl(e),ml=hl.format,gl=hl.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});const xl=new Date,wl=new Date;function Sl(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(s<n&&n<r);return a},i.filter=n=>Sl(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(xl.setTime(+t),wl.setTime(+r),e(xl),e(wl),Math.floor(n(xl,wl))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i:null)),i}const Ml=6e4,kl=864e5,El=6048e5,Cl=Sl(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ml)/kl,e=>e.getDate()-1);Cl.range;const Al=Sl(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/kl,e=>e.getUTCDate()-1);Al.range;const Dl=Sl(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/kl,e=>Math.floor(e/kl));function ql(e){return Sl(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ml)/El)}Dl.range;const _l=ql(0),Tl=ql(1),Nl=ql(2),Ol=ql(3),Il=ql(4),Ll=ql(5),Pl=ql(6);function Rl(e){return Sl(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/El)}_l.range,Tl.range,Nl.range,Ol.range,Il.range,Ll.range,Pl.range;const zl=Rl(0),Fl=Rl(1),jl=Rl(2),Vl=Rl(3),Hl=Rl(4),Bl=Rl(5),$l=Rl(6);zl.range,Fl.range,jl.range,Vl.range,Hl.range,Bl.range,$l.range;const Wl=Sl(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Wl.every=e=>isFinite(e=Math.floor(e))&&e>0?Sl(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null,Wl.range;const Ul=Sl(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());function Yl(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Xl(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Gl(e){let t,n,r;function i(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<0?i=t+1:o=t}while(i<o)}return i}return 2!==e.length?(t=Yl,n=(t,n)=>Yl(e(t),n),r=(t,n)=>e(t)-n):(t=e===Yl||e===Xl?e:Kl,n=e,r=e),{left:i,center:function(e,t,n=0,o=e.length){const a=i(e,t,n,o-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<=0?i=t+1:o=t}while(i<o)}return i}}}function Kl(){return 0}Ul.every=e=>isFinite(e=Math.floor(e))&&e>0?Sl(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null,Ul.range;const Zl=Gl(Yl).right;Gl(function(e){return null===e?NaN:+e}).center;var Jl=Zl;class Ql extends Map{constructor(e,t=tc){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(ec(this,e))}has(e){return super.has(ec(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);e.has(r)&&(n=e.get(r),e.delete(r));return n}(this,e))}}function ec({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function tc(e){return null!==e&&"object"==typeof e?e.valueOf():e}const nc=Math.sqrt(50),rc=Math.sqrt(10),ic=Math.sqrt(2);function oc(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=nc?10:o>=rc?5:o>=ic?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?oc(e,t,2*n):[s,l,c]}function ac(e,t,n){return oc(e=+e,t=+t,n=+n)[2]}function sc(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function lc(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function cc(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function uc(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=yc(i),u=vc(i),d=yc(o),f=vc(o),p=yc(a),h=vc(a),m=yc(s),g=vc(s),y=yc(l),v=vc(l),b={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:Fc,e:Fc,f:$c,g:tu,G:ru,H:jc,I:Vc,j:Hc,L:Bc,m:Wc,M:Uc,p:function(e){return i[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Cu,s:Au,S:Yc,u:Xc,U:Gc,V:Zc,w:Jc,W:Qc,x:null,X:null,y:eu,Y:nu,Z:iu,"%":Eu},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:ou,e:ou,f:uu,g:wu,G:Mu,H:au,I:su,j:lu,L:cu,m:du,M:fu,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Cu,s:Au,S:pu,u:hu,U:mu,V:yu,w:vu,W:bu,x:null,X:null,y:xu,Y:Su,Z:ku,"%":Eu},w={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return k(e,t,n,r)},d:qc,e:qc,f:Lc,g:Ec,G:kc,H:Tc,I:Tc,j:_c,L:Ic,m:Dc,M:Nc,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:Ac,Q:Rc,s:zc,S:Oc,u:xc,U:wc,V:Sc,w:bc,W:Mc,x:function(e,t,r){return k(e,n,t,r)},X:function(e,t,n){return k(e,r,t,n)},y:Ec,Y:kc,Z:Cc,"%":Pc};function S(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=dc[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function M(e,t){return function(n){var r,i,o=cc(1900,void 0,1);if(k(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(t&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=lc(cc(o.y,0,1))).getUTCDay(),r=i>4||0===i?Fl.ceil(r):Fl(r),r=Al.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=sc(cc(o.y,0,1))).getDay(),r=i>4||0===i?Tl.ceil(r):Tl(r),r=Cl.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?lc(cc(o.y,0,1)).getUTCDay():sc(cc(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,lc(o)):sc(o)}}function k(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=w[i in dc?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=S(n,b),b.X=S(r,b),b.c=S(t,b),x.x=S(n,x),x.X=S(r,x),x.c=S(t,x),{format:function(e){var t=S(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=M(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=M(e+="",!0);return t.toString=function(){return e},t}}}var dc={"-":"",_:" ",0:"0"},fc=/^\s*\d+/,pc=/^%/,hc=/[\\^$*+?|[\]().{}]/g;function mc(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function gc(e){return e.replace(hc,"\\$&")}function yc(e){return new RegExp("^(?:"+e.map(gc).join("|")+")","i")}function vc(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function bc(e,t,n){var r=fc.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function xc(e,t,n){var r=fc.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function wc(e,t,n){var r=fc.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Sc(e,t,n){var r=fc.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Mc(e,t,n){var r=fc.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function kc(e,t,n){var r=fc.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Ec(e,t,n){var r=fc.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Cc(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Ac(e,t,n){var r=fc.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function Dc(e,t,n){var r=fc.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function qc(e,t,n){var r=fc.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function _c(e,t,n){var r=fc.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Tc(e,t,n){var r=fc.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Nc(e,t,n){var r=fc.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Oc(e,t,n){var r=fc.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Ic(e,t,n){var r=fc.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Lc(e,t,n){var r=fc.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Pc(e,t,n){var r=pc.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Rc(e,t,n){var r=fc.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function zc(e,t,n){var r=fc.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Fc(e,t){return mc(e.getDate(),t,2)}function jc(e,t){return mc(e.getHours(),t,2)}function Vc(e,t){return mc(e.getHours()%12||12,t,2)}function Hc(e,t){return mc(1+Cl.count(Wl(e),e),t,3)}function Bc(e,t){return mc(e.getMilliseconds(),t,3)}function $c(e,t){return Bc(e,t)+"000"}function Wc(e,t){return mc(e.getMonth()+1,t,2)}function Uc(e,t){return mc(e.getMinutes(),t,2)}function Yc(e,t){return mc(e.getSeconds(),t,2)}function Xc(e){var t=e.getDay();return 0===t?7:t}function Gc(e,t){return mc(_l.count(Wl(e)-1,e),t,2)}function Kc(e){var t=e.getDay();return t>=4||0===t?Il(e):Il.ceil(e)}function Zc(e,t){return e=Kc(e),mc(Il.count(Wl(e),e)+(4===Wl(e).getDay()),t,2)}function Jc(e){return e.getDay()}function Qc(e,t){return mc(Tl.count(Wl(e)-1,e),t,2)}function eu(e,t){return mc(e.getFullYear()%100,t,2)}function tu(e,t){return mc((e=Kc(e)).getFullYear()%100,t,2)}function nu(e,t){return mc(e.getFullYear()%1e4,t,4)}function ru(e,t){var n=e.getDay();return mc((e=n>=4||0===n?Il(e):Il.ceil(e)).getFullYear()%1e4,t,4)}function iu(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+mc(t/60|0,"0",2)+mc(t%60,"0",2)}function ou(e,t){return mc(e.getUTCDate(),t,2)}function au(e,t){return mc(e.getUTCHours(),t,2)}function su(e,t){return mc(e.getUTCHours()%12||12,t,2)}function lu(e,t){return mc(1+Al.count(Ul(e),e),t,3)}function cu(e,t){return mc(e.getUTCMilliseconds(),t,3)}function uu(e,t){return cu(e,t)+"000"}function du(e,t){return mc(e.getUTCMonth()+1,t,2)}function fu(e,t){return mc(e.getUTCMinutes(),t,2)}function pu(e,t){return mc(e.getUTCSeconds(),t,2)}function hu(e){var t=e.getUTCDay();return 0===t?7:t}function mu(e,t){return mc(zl.count(Ul(e)-1,e),t,2)}function gu(e){var t=e.getUTCDay();return t>=4||0===t?Hl(e):Hl.ceil(e)}function yu(e,t){return e=gu(e),mc(Hl.count(Ul(e),e)+(4===Ul(e).getUTCDay()),t,2)}function vu(e){return e.getUTCDay()}function bu(e,t){return mc(Fl.count(Ul(e)-1,e),t,2)}function xu(e,t){return mc(e.getUTCFullYear()%100,t,2)}function wu(e,t){return mc((e=gu(e)).getUTCFullYear()%100,t,2)}function Su(e,t){return mc(e.getUTCFullYear()%1e4,t,4)}function Mu(e,t){var n=e.getUTCDay();return mc((e=n>=4||0===n?Hl(e):Hl.ceil(e)).getUTCFullYear()%1e4,t,4)}function ku(){return"+0000"}function Eu(){return"%"}function Cu(e){return+e}function Au(e){return Math.floor(+e/1e3)}const Du=il();Du("d3-number",function(e,t,n){let r,i;function o(e){return i(e)}function a(){o.locale({decimal:n||".",thousands:t||",",grouping:[3],currency:["$",""]})}return o.locale=function(t){return r=bl(t),i=r.format(e),this},a(),o.format=function(e,i,o,s){return(o||s)&&(t=o,n=s,a()),r.format(e)(i)},o.pattern=function(t){return t&&(e=t,i=r.format(t)),e},o}),Du("d3-time",function(e){let t=uc({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),n=t.format(e);function r(e){return n(e)}return r.format=function(e,n){return t.format(e)(n)},r.locale=function(){return t=uc(...arguments),n=t.format(e),this},r.parse=function(e,n){return t.parse(e)(n)},r.parsePattern=function(e){return t.parse(e)},r});const qu={id:e=>"".concat(e.source,"/").concat(e.key||e.title),key:e=>String(e.key||e.title),tags:e=>e.tags,min:e=>e.min,max:e=>e.max,type:e=>e.type,title:e=>String(e.title),values:e=>e.values,value:e=>e,label:e=>e,formatter:e=>(e=>{if("function"==typeof e.formatter)return e.formatter();const t=e.formatter||{};return Du(t.type||"d3-number")(t.format||"")})(e)};function _u(e){let{id:t=qu.id,key:n=qu.key,min:r=qu.min,max:i=qu.max,type:o=qu.type,tags:a=qu.tags,title:s=qu.title,values:l=qu.values,value:c=qu.value,label:u=qu.label,formatter:d=qu.formatter}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{id:()=>t(e),key:()=>n(e),raw:()=>e,tags:()=>a(e),type:()=>o(e),min:()=>r(e),max:()=>i(e),title:()=>s(e),items:()=>l(e),formatter:()=>d(e),value:c,label:u}}const Tu=e=>e.filter(e=>"number"==typeof e&&!isNaN(e)),Nu=e=>e.reduce((e,t)=>e+t,0),Ou={first:e=>e[0],last:e=>e[e.length-1],min:e=>{const t=Tu(e);return t.length?Math.min.apply(null,t):NaN},max:e=>{const t=Tu(e);return t.length?Math.max.apply(null,t):NaN},sum:e=>{const t=Tu(e);return t.length?t.reduce((e,t)=>e+t,0):NaN},avg:e=>{const t=Tu(e),n=t.length;return n?Nu(t)/n:NaN}};function Iu(e,t,n,r){const i={},o=r.field||(void 0!==e.field?t.field(e.field):null);return Object.keys(n).forEach(a=>{const s=n[a],l=i[a]={};-1!==["number","string","boolean"].indexOf(typeof s)?(l.type="primitive",l.value=s):"function"==typeof s?(l.type="function",l.value=s,l.label=s,l.field=o):"object"==typeof s&&(s.fields?l.fields=s.fields.map(n=>Iu(e,t,{main:n},r).main):void 0!==s.field?(l.type="field",l.field=t.field(s.field),l.value=l.field.value,l.label=l.field.label):o&&(l.value=o.value,l.label=o.label,l.field=o),"function"==typeof s.filter&&(l.filter=s.filter),void 0!==s.value&&(l.value=s.value),void 0!==s.label&&(l.label=s.label),"function"==typeof s.reduce?l.reduce=s.reduce:s.reduce?l.reduce=Ou[s.reduce]:l.field&&l.field.reduce&&(l.reduce="string"==typeof l.field.reduce?Ou[l.field.reduce]:l.field.reduce),"function"==typeof s.reduceLabel?l.reduceLabel=s.reduceLabel:s.reduceLabel?l.reduceLabel=Ou[s.reduceLabel]:l.field&&l.field.reduceLabel&&(l.reduceLabel="string"==typeof l.field.reduceLabel?Ou[l.field.reduceLabel]:l.field.reduceLabel))}),i}function Lu(e,t){const{main:n}=Iu(e,t,{main:{value:e.value,label:e.label,reduce:e.reduce,filter:e.filter}},{});return{props:Iu(e,t,e.props||{},n),main:n}}function Pu(e,t,n,r){const i=Array(e.length),o=Array(e.length);let a;for(let t=0;t<e.length;t++)a=r?e[t][r]:e[t],i[t]=a.value,o[t]=a.label;const s=t.reduce,l=t.reduceLabel,c=s?s(i):i,u={value:c,label:l?l(o,c):n?n(c):String(c)};return r&&e[0][r].source?(u.source=e[0][r].source,u):!r&&e[0].source?(u.source=e[0].source,u):u}function Ru(e,t){let{main:n,propsArr:r,props:i}=t,o=[];const a=n.field.formatter(),s={};return r.forEach(e=>{s[e]=i[e].field?i[e].field.formatter():e=>e}),o.push(...e.map(e=>{const t=Pu(e.items,n,a);return r.forEach(n=>{t[n]=Pu(e.items,i[n],s[n],n)}),t})),o}function zu(e){let{cfg:t,itemData:n,obj:r,target:i,tracker:o,trackType:a}=e;const s="function"===a?t.trackBy(n):n[t.trackBy];let l=o[s];l||(l=o[s]={items:[],id:s},i.push(l)),l.items.push(r)}function Fu(e){if(e.length<1e4)return Math.max(...e);let t=-1/0;const n=e.length;for(let r=0;r<n;r++)t<e[r]&&(t=e[r]);return t}function ju(e){if(e.length<1e4)return Math.min(...e);let t=1/0;const n=e.length;for(let r=0;r<n;r++)t>e[r]&&(t=e[r]);return t}const Vu={diverging:function(e,t){if((s=e.length)>0)for(var n,r,i,o,a,s,l=0,c=e[t[0]].length;l<c;++l)for(o=a=0,n=0;n<s;++n)(i=(r=e[t[n]][l])[1]-r[0])>=0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):r[0]=o},none:Qs,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,i=e[t[0]],o=i.length;r<o;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;i[r][1]+=i[r][0]=-s/2}Qs(e,t)}},expand:function(e,t){if((r=e.length)>0){for(var n,r,i,o=0,a=e[0].length;o<a;++o){for(i=n=0;n<r;++n)i+=e[n][o][1]||0;if(i)for(n=0;n<r;++n)e[n][o][1]/=i}Qs(e,t)}},wiggle:function(e,t){if((i=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,i,o=0,a=1;a<r;++a){for(var s=0,l=0,c=0;s<i;++s){for(var u=e[t[s]],d=u[a][1]||0,f=(d-(u[a-1][1]||0))/2,p=0;p<s;++p){var h=e[t[p]];f+=(h[a][1]||0)-(h[a-1][1]||0)}l+=d,c+=f*d}n[a-1][1]+=n[a-1][0]=o,l&&(o-=c/l)}n[a-1][1]+=n[a-1][0]=o,Qs(e,t)}}},Hu={ascending:function(e){var t=e.map(rl);return el(e).sort(function(e,n){return t[e]-t[n]})},insideout:function(e){var t,n,r=e.length,i=e.map(rl),o=function(e){var t=e.map(nl);return el(e).sort(function(e,n){return t[e]-t[n]})}(e),a=0,s=0,l=[],c=[];for(t=0;t<r;++t)n=o[t],a<s?(a+=i[n],l.push(n)):(s+=i[n],c.push(n));return c.reverse().concat(l)},none:el,reverse:function(e){return el(e).reverse()}};function Bu(e,t,n,r){const i=r||e.items,o={},a=t.stackKey,s=t.value,l=t.startProp||"start",c=t.endProp||"end",u=t.offset||"none",d=t.order||"none",f=t.valueRef||"";let p=0,h={};for(let e=0;e<i.length;e++){let t=i[e],n=f?t[f]:null;if(n&&n.source){let e="".concat(n.source.key||"","/").concat(n.source.field);h[e]||(h[e]=n.source)}let r=a(t);o[r]=o[r]||{items:[]},o[r].items.push(t),p=Math.max(p,o[r].items.length)}const m=Array.apply(null,{length:p}).map(Number.call,Number),g=Object.keys(o).map(e=>o[e].items),y=function(){var e=ls([]),t=el,n=Qs,r=tl;function i(i){var o,a,s=e.apply(this,arguments),l=i.length,c=s.length,u=new Array(c);for(o=0;o<c;++o){for(var d,f=s[o],p=u[o]=new Array(l),h=0;h<l;++h)p[h]=d=[0,+r(i[h],f,h,i)],d.data=i[h];p.key=f}for(o=0,a=t(u);o<c;++o)u[a[o]].index=o;return n(u,a),u}return i.keys=function(t){return arguments.length?(e="function"==typeof t?t:ls(Ls.call(t)),i):e},i.value=function(e){return arguments.length?(r="function"==typeof e?e:ls(+e),i):r},i.order=function(e){return arguments.length?(t=null==e?el:"function"==typeof e?e:ls(Ls.call(e)),i):t},i.offset=function(e){return arguments.length?(n=null==e?Qs:e,i):n},i}().keys(m).value((e,t)=>e[t]?s(e[t]):0).order(Hu[d]).offset(Vu[u]);let v=y(g),b=[];for(let e=0;e<v.length;e++){let t=v[e];for(let e=0;e<t.length;e++){let n=t[e],r=t[e].data[t.key];r&&(r[l]={value:n[0]},r[c]={value:n[1]},b.push(n[0],n[1]))}}let x=Object.keys(h).map(e=>{let t=n(h[e].key);return t?t.field(h[e].field):null}).filter(e=>!!e);const w=_u({title:x.map(e=>e.title()).join(", "),min:ju(b),max:Fu(b),type:"measure",formatter:x[0]?x[0].formatter:void 0});e.fields.push(w)}function $u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={};const r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).logger;if(Array.isArray(e))n.items=e.map(e=>({value:e,label:String(e)}));else if(e){if("collection"in e)n=Wa({},t.collection(e.collection));else{const i=t.dataset?t.dataset(e.source):null;let o=e.value||(e=>e),a=e.label||(e=>e);if(e.groupBy||e.mapTo)r.warn('Deprecated "data" configuration',e),n.items=[];else if(e.hierarchy)n.root=i.hierarchy?i.hierarchy(e.hierarchy):null,n.fields=i.fields();else if(e.items)n.items=e.skipNormalize?e.items:e.items.map(e=>({value:o(e),label:String(a(e))}));else if(e.extract){const r=Array.isArray(e.extract)?e.extract:[e.extract];n.items=[];const o=[];r.forEach(e=>{const r=e.source?t.dataset(e.source):i;r&&(n.items=[...n.items,...r.extract(e)],void 0!==e.field&&o.push(r.field(e.field)))}),o.length&&(n.fields=o),e.amend&&Array.isArray(e.amend)&&(n.items=[...n.items,...e.amend])}else if(void 0!==e.field&&i){const t=i.field(e.field);t&&(n.fields||(n.fields=[]),n.fields.push(t),"value"in e||(o=t.value||(e=>e),a=t.label||(e=>e),n.value=o),n.items=t.items().map(t=>({value:o(t),label:String(a(t)),source:{field:e.field}})))}else e.fields&&e.fields.forEach(e=>{const r="object"==typeof e&&e.source?t.dataset(e.source):i;if(!r)return;let o;o="object"==typeof e&&void 0!==e.field?r.field(e.field):r.field(e),o&&(n.fields||(n.fields=[]),n.fields.push(o))});n.items&&e.map&&(n.items=n.items.map(e.map))}e&&e.stack&&(Array.isArray(e.stack.stackByKey)?e.stack.stackByKey.forEach(r=>{const i=n.items.filter(e=>{var t;return(null===(t=e.key)||void 0===t?void 0:t.value)&&e.key.value===r});Bu(n,e.stack,t.dataset,i)}):Bu(n,e.stack,t.dataset,n.items))}return e&&!Array.isArray(e)&&"function"==typeof e.filter&&n.items&&(n.items=n.items.filter(e.filter)),e&&!Array.isArray(e)&&"function"==typeof e.sort&&n.items&&(n.items=n.items.sort(e.sort)),n}function Wu(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:$u;if(e.data){const r=i(e.data,t,n);if(r&&r.fields&&r.fields[0])return r.fields[0].formatter()}if(r=e.formatter?"".concat(e.formatter,"-").concat(e.type||"number"):e.type||"d3-number",n.formatter.has(r)){return n.formatter.get(r)(e.format||"")}throw new Error("Formatter of type '".concat(r,"' was not found"))}function Uu(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}const Yu=Symbol("implicit");function Xu(){var e=new Ql,t=[],n=[],r=Yu;function i(i){let o=e.get(i);if(void 0===o){if(r!==Yu)return r;e.set(i,o=t.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new Ql;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return Xu(t,n).unknown(r)},Uu.apply(i,arguments),i}function Gu(){var e,t,n=Xu().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,s=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=a<o,f=d?a:o,p=d?o:a;e=(p-f)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),f+=(p-f-e*(n-l))*u,t=e*(1-l),s&&(f=Math.round(f),t=Math.round(t));var h=function(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++r<i;)o[r]=e+r*n;return o}(n).map(function(t){return f+e*t});return i(d?h.reverse():h)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([o,a]=e,o=+o,a=+a,d()):[o,a]},n.rangeRound=function(e){return[o,a]=e,o=+o,a=+a,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,d()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},n.copy=function(){return Gu(r(),[o,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},Uu.apply(d(),arguments)}function Ku(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Zu(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ju(){}var Qu=.7,ed=1/Qu,td="\\s*([+-]?\\d+)\\s*",nd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",rd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",id=/^#([0-9a-f]{3,8})$/,od=new RegExp(`^rgb\\(${td},${td},${td}\\)$`),ad=new RegExp(`^rgb\\(${rd},${rd},${rd}\\)$`),sd=new RegExp(`^rgba\\(${td},${td},${td},${nd}\\)$`),ld=new RegExp(`^rgba\\(${rd},${rd},${rd},${nd}\\)$`),cd=new RegExp(`^hsl\\(${nd},${rd},${rd}\\)$`),ud=new RegExp(`^hsla\\(${nd},${rd},${rd},${nd}\\)$`),dd={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 fd(){return this.rgb().formatHex()}function pd(){return this.rgb().formatRgb()}function hd(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=id.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?md(t):3===n?new vd(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?gd(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?gd(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=od.exec(e))?new vd(t[1],t[2],t[3],1):(t=ad.exec(e))?new vd(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=sd.exec(e))?gd(t[1],t[2],t[3],t[4]):(t=ld.exec(e))?gd(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=cd.exec(e))?kd(t[1],t[2]/100,t[3]/100,1):(t=ud.exec(e))?kd(t[1],t[2]/100,t[3]/100,t[4]):dd.hasOwnProperty(e)?md(dd[e]):"transparent"===e?new vd(NaN,NaN,NaN,0):null}function md(e){return new vd(e>>16&255,e>>8&255,255&e,1)}function gd(e,t,n,r){return r<=0&&(e=t=n=NaN),new vd(e,t,n,r)}function yd(e,t,n,r){return 1===arguments.length?function(e){return e instanceof Ju||(e=hd(e)),e?new vd((e=e.rgb()).r,e.g,e.b,e.opacity):new vd}(e):new vd(e,t,n,null==r?1:r)}function vd(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function bd(){return`#${Md(this.r)}${Md(this.g)}${Md(this.b)}`}function xd(){const e=wd(this.opacity);return`${1===e?"rgb(":"rgba("}${Sd(this.r)}, ${Sd(this.g)}, ${Sd(this.b)}${1===e?")":`, ${e})`}`}function wd(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Sd(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Md(e){return((e=Sd(e))<16?"0":"")+e.toString(16)}function kd(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Cd(e,t,n,r)}function Ed(e){if(e instanceof Cd)return new Cd(e.h,e.s,e.l,e.opacity);if(e instanceof Ju||(e=hd(e)),!e)return new Cd;if(e instanceof Cd)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Cd(a,s,l,e.opacity)}function Cd(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Ad(e){return(e=(e||0)%360)<0?e+360:e}function Dd(e){return Math.max(0,Math.min(1,e||0))}function qd(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Ku(Ju,hd,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:fd,formatHex:fd,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Ed(this).formatHsl()},formatRgb:pd,toString:pd}),Ku(vd,yd,Zu(Ju,{brighter(e){return e=null==e?ed:Math.pow(ed,e),new vd(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Qu:Math.pow(Qu,e),new vd(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new vd(Sd(this.r),Sd(this.g),Sd(this.b),wd(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:bd,formatHex:bd,formatHex8:function(){return`#${Md(this.r)}${Md(this.g)}${Md(this.b)}${Md(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:xd,toString:xd})),Ku(Cd,function(e,t,n,r){return 1===arguments.length?Ed(e):new Cd(e,t,n,null==r?1:r)},Zu(Ju,{brighter(e){return e=null==e?ed:Math.pow(ed,e),new Cd(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Qu:Math.pow(Qu,e),new Cd(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new vd(qd(e>=240?e-240:e+120,i,r),qd(e,i,r),qd(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Cd(Ad(this.h),Dd(this.s),Dd(this.l),wd(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=wd(this.opacity);return`${1===e?"hsl(":"hsla("}${Ad(this.h)}, ${100*Dd(this.s)}%, ${100*Dd(this.l)}%${1===e?")":`, ${e})`}`}}));var _d=e=>()=>e;function Td(e){return 1===(e=+e)?Nd:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):_d(isNaN(t)?n:t)}}function Nd(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):_d(isNaN(e)?t:e)}var Od=function e(t){var n=Td(t);function r(e,t){var r=n((e=yd(e)).r,(t=yd(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Nd(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Id(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function Ld(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=Hd(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function Pd(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Rd(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function zd(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=Hd(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var Fd=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,jd=new RegExp(Fd.source,"g");function Vd(e,t){var n,r,i,o=Fd.lastIndex=jd.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=Fd.exec(e))&&(r=jd.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Rd(n,r)})),o=jd.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function Hd(e,t){var n,r=typeof t;return null==t||"boolean"===r?_d(t):("number"===r?Rd:"string"===r?(n=hd(t))?(t=n,Od):Vd:t instanceof hd?Od:t instanceof Date?Pd:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?Id:Array.isArray(t)?Ld:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?zd:Rd)(e,t)}function Bd(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function $d(e){return+e}var Wd=[0,1];function Ud(e){return e}function Yd(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function Xd(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=Yd(i,r),o=n(a,o)):(r=Yd(r,i),o=n(o,a)),function(e){return o(r(e))}}function Gd(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=Yd(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=Jl(e,t,1,r)-1;return o[n](i[n](t))}}function Kd(){var e,t,n,r,i,o,a=Wd,s=Wd,l=Hd,c=Ud;function u(){var e=Math.min(a.length,s.length);return c!==Ud&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?Gd:Xd,i=o=null,d}function d(t){return null==t||isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((o||(o=r(s,a.map(e),Rd)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,$d),u()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=Bd,u()},d.clamp=function(e){return arguments.length?(c=!!e||Ud,u()):c!==Ud},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function Zd(e,t,n,r){var i,o=function(e,t,n){n=+n;const r=(t=+t)<(e=+e),i=r?ac(t,e,n):ac(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}(e,t,n);switch((r=cl(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(al(t)/3)))-al(Math.abs(e)))}(o,a))||(r.precision=i),gl(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,al(t)-al(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-al(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return ml(r)}function Jd(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const r=t<e,[i,o,a]=r?oc(t,e,n):oc(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let e=0;e<s;++e)l[e]=(o-e)/-a;else for(let e=0;e<s;++e)l[e]=(o-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(i+e)/-a;else for(let e=0;e<s;++e)l[e]=(i+e)*a;return l}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return Zd(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i,o=t(),a=0,s=o.length-1,l=o[a],c=o[s],u=10;for(c<l&&(i=l,l=c,c=i,i=a,a=s,s=i);u-- >0;){if((i=ac(l,c,n))===r)return o[a]=l,o[s]=c,t(o);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return e},e}function Qd(){var e=Kd()(Ud,Ud);return e.copy=function(){return t=e,Qd().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},Uu.apply(e,arguments),Jd(e)}function ef(){var e,t=[.5],n=[0,1],r=1;function i(i){return null!=i&&i<=i?n[Jl(t,i,0,r)]:e}return i.domain=function(e){return arguments.length?(t=Array.from(e),r=Math.min(t.length,n.length-1),i):t.slice()},i.range=function(e){return arguments.length?(n=Array.from(e),r=Math.min(t.length,n.length-1),i):n.slice()},i.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},i.unknown=function(t){return arguments.length?(e=t,i):e},i.copy=function(){return ef().domain(t).range(n).unknown(e)},Uu.apply(i,arguments)}function tf(e){return void 0===e?e=>e:t=>e(t)}function nf(e){return Math.max(0,Math.min(1,e))}function rf(e){return"object"==typeof e}function of(e,t,n){const r=Math.abs(t-n)/(e+1),i=[];for(let o=1;o<=e;o++){const e=o*r;i.push(t<n?t+e:t-e)}return i}function af(e,t,n){if(1===e.length)return e;const r=e.concat([]);for(let i=0;i<e.length;i++){let o=e[i],a=e[i+1];0===i&&o!==n.start()?(r.push(...of(t,o,a)),o-=a-o,a=e[i],r.push(...of(t,o,a))):i===e.length-1&&a!==n.end()?(a=o+(o-e[i-1]),r.push(...of(t,o,a))):r.push(...of(t,o,a))}return r.filter(e=>e>=n.min()&&e<=n.max())}function sf(e){let{distance:t,scale:n,minorCount:r=0,unitDivider:i=100,formatter:o}=e;const a=Xa(i)||Xa(t)?2:Math.max(t/i,2),s=Math.min(1e3,Math.round(a));let l=n.ticks(s);l.length<=1&&(l=n.ticks(s+1));const c=r>0?af(l,r,n):l;c.sort((e,t)=>e-t);const u=c.map(tf(o));return c.map((e,t)=>{const r=n(e);return{position:r,start:r,end:r,label:u[t],value:e,isMinor:-1===l.indexOf(e)}})}function lf(e){let{distance:t,scale:n,minorCount:r=0,unitDivider:i=100,formatter:o}=e;const a=Xa(i)||Xa(t)?2:Math.max(t/i,2),s=Math.min(1e3,Math.round(a)),l=s>10?10:s;n.nice(l);const c=n.ticks(s),u=r>0?af(c,r,n):c;u.sort((e,t)=>e-t);const d=u.map(tf(o));return u.map((e,t)=>{const r=n(e);return{position:r,start:r,end:r,label:d[t],value:e,isMinor:-1===c.indexOf(e)}})}function cf(e){let t,{settings:n,scale:r,distance:i,formatter:o=e=>e}=e;const a=n.minorTicks&&!Xa(n.minorTicks.count)?Math.min(100,n.minorTicks.count):0;if(Array.isArray(n.ticks.values)){const e=n.ticks.values.filter(e=>"object"==typeof e?!Xa(e.value):!Xa(e));t=function(e){let{values:t,scale:n,formatter:r=e=>e}=e;return t.sort((e,t)=>(rf(e)?e.value:e)-(rf(t)?t.value:t)).filter((e,t,r)=>{const i=rf(e)?e.value:e;return i<=n.max()&&i>=n.min()&&r.indexOf(e)===t}).map(e=>{const t=rf(e),i=t?e.value:e,o=n(i);return{position:o,value:i,label:t&&void 0!==e.label?e.label:r(i),isMinor:!!t&&!!e.isMinor,start:t&&!isNaN(e.start)?nf(n(e.start)):o,end:t&&!isNaN(e.end)?nf(n(e.end)):o}})}({values:e,scale:r.copy(),formatter:o})}else if(Xa(n.ticks.count)){t=(n.ticks.tight?lf:sf)({distance:i,minorCount:a,unitDivider:n.ticks.distance,scale:r,formatter:o}),n.ticks.forceBounds&&function(e,t,n){const r=e.map(e=>e.position),i=t.range();-1===r.indexOf(i[0])?e.splice(0,0,{position:i[0],start:i[0],end:i[0],label:n(t.start()),isMinor:!1,value:t.start()}):e[0]&&e[0].isMinor&&(e[0].isMinor=!1);const o=e[e.length-1];-1===r.indexOf(i[1])?e.push({position:i[1],start:i[1],end:i[1],label:n(t.end()),isMinor:!1,value:t.end()}):o&&o.isMinor&&(o.isMinor=!1)}(t,r,o)}else{t=function(e){let{count:t,minorCount:n,scale:r,formatter:i}=e;return r.ticks((t-1)*n+t).map((e,t)=>{const o=r(e);return{position:o,start:o,end:o,label:i(e),isMinor:t%(n+1)!==0,value:e}})}({count:Math.min(1e3,n.ticks.count),minorCount:a,scale:r.copy(),formatter:o})}return t}function uf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r={};return Object.keys(t).forEach(i=>{const o=typeof e[i];r[i]="function"===o?e[i](n):"undefined"===o?t[i]:e[i]}),r}const df={min:NaN,max:NaN,expand:NaN,include:[],invert:!1},ff={tight:!1,forceBounds:!1,values:void 0,count:NaN,distance:100},pf={count:NaN};function hf(e,t){e.instance||(e.instance=t.copy(),e.instance.domain([t.start(),t.end()]),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}function mf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Qd(),i={instance:null,invert:!1},o={data:t,resources:n},a=uf(e,df,o);let s;function l(e){return Xa(e)?NaN:r(e)}a.ticks=uf(e.ticks,ff,o),a.minorTicks=uf(e.minorTicks,pf,o),l.data=()=>t,l.invert=function(e){return r.invert(e)},l.rangeRound=function(e){return r.rangeRound(e),l},l.clamp=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return r.clamp(e),l},l.cachedTicks=function(){return s},l.clearTicksCache=function(){return s=void 0,this},l.ticks=function(e){return null!==e&&"object"==typeof e?(e.settings=e.settings||{},e.settings=Va(!0,{},a,e.settings),e.scale=l,s=cf(e),s):(s=r.ticks(e),s)},l.nice=function(e){return r.nice(e),l},l.tickFormat=function(e,t){return r.tickFormat(e,t)},l.interpolate=function(e){return r.interpolate(e),l},l.domain=function(e){return arguments.length?(r.domain(e),i.instance&&i.instance.domain([l.start(),l.end()]),l):r.domain()},l.range=function(e){return arguments.length?(r.range(e),l):r.range()},l.start=function(){return l.domain()[0]},l.end=function(){return l.domain()[this.domain().length-1]},l.min=function(){return Math.min(this.start(),this.end())},l.max=function(){return Math.max(this.start(),this.end())},l.classify=function(e){let t=(l.start()-l.end())/e,n=[l.end()],r=[],i=t/2;for(let o=0;o<e;o++){let e=n[n.length-1]||0,o=e+t,a=l(e+i);n.push(o,o),r.push(a,a)}return n.pop(),l.domain(n),l.range(r),l},l.copy=function(){const i=mf(e,t,n);return i.domain(l.domain()),i.range(l.range()),i.clamp(r.clamp()),i},l.norm=function(e){return hf(i,l),i.instance(e)},l.normInvert=function(e){return hf(i,l),i.instance.invert(e)};const{mini:c,maxi:u}=function(e,t){const n=+e.min,r=+e.max;let i=0,o=1;if(t&&t[0]){const n=t.map(e=>e.min()).filter(e=>!isNaN(e)),r=t.map(e=>e.max()).filter(e=>!isNaN(e));if(i=n.length?Math.min(...n):Number.NaN,o=r.length?Math.max(...r):Number.NaN,isNaN(i)||isNaN(o))i=-1,o=1;else if(i===o&&0===i)i=-1,o=1;else if(i===o&&i)i-=Math.abs(.1*i),o+=Math.abs(.1*o);else if(!isNaN(e.expand)){const t=o-i;i-=t*e.expand,o+=t*e.expand}if(Array.isArray(e.include)){const t=e.include.filter(e=>!isNaN(e));i=Math.min(...t,i),o=Math.max(...t,o)}}return{mini:isNaN(n)?i:n,maxi:isNaN(r)?o:r}}(a,t?t.fields:[]);return l.domain([c,u]),l.range(a.invert?[1,0]:[0,1]),i.invert=a.invert,l}const gf={padding:0,paddingInner:NaN,paddingOuter:NaN,align:.5,invert:!1,maxPxStep:NaN,range:[0,1]};function yf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={data:t,resources:arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}},r=uf(e,gf,n),i=t.items||[],o={},a=[],s=[];function l(e,n){e.data=()=>t,e.datum=e=>i[o[e]],e.start=function(){return e.domain()[0]},e.end=function(){return e.domain()[e.domain().length-1]},e.labels=()=>s,e.ticks=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.scale=e,function(e){let{scale:t}=e;const n=t.domain(),r=t.data().items,i=t.labels?t.labels():n,o=t.bandwidth();return n.map((e,n)=>{const a=t(e);return{position:a+o/2,label:"".concat(i[n]),data:r?r[n]:void 0,start:a,end:a+o}})}(t,n.trackBy)}}const c=Gu();l(c,e),c.pxScale=function(t){const n=r.maxPxStep;if(isNaN(n))return c;const i=c.domain().length,o=Math.max(1,i-c.paddingInner()+2*c.paddingOuter());if(o*n>=t)return c;const a=c.copy();a.type=c.type,l(a,e);const s=o*n/t,u=(1-s)*c.align();return a.range(r.invert?[s+u,u]:[u,s+u]),a};const u="function"==typeof e.value?e.value:e=>e.datum.value,d="function"==typeof e.label?e.label:e=>e.datum.label;for(let e=0;e<i.length;e++){const t=Va({datum:i[e]},n),r=u(t,e);-1===a.indexOf(r)&&(a.push(r),s.push(d(t,e)),o[r]=e)}return c.domain(a),c.range(r.invert?r.range.slice().reverse():r.range),c.padding(isNaN(r.padding)?0:r.padding),isNaN(r.paddingInner)||c.paddingInner(r.paddingInner),isNaN(r.paddingOuter)||c.paddingOuter(r.paddingOuter),c.align(isNaN(r.align)?.5:r.align),c}const vf={depth:0};function bf(e,t,n){return e.ancestors().map(e=>t(Va({datum:e.data},n))).reverse().slice(1).toString()}const xf=e=>e.min(),wf=e=>e.max();function Sf(e,t){const n=e&&!isNaN(e.min),r=e&&!isNaN(e.max);let i=n?+e.min:0,o=r?+e.max:1;if(t&&t.length){if(!n){const e=t.map(xf).filter(Ya);i=e.length?Math.min(...e):i}if(!r){const e=t.map(wf).filter(Ya);o=e.length?Math.max(...e):o}}return[i,o]}const Mf={domain:[],range:[],invert:!1,min:NaN,max:NaN};function kf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=mf(e,t,n).clamp(!0).interpolate(Od),i=uf(e,Mf,{data:t,resources:n}),o=Array.isArray(i.domain)&&i.domain.length,a=Array.isArray(i.range)&&i.range.length,s=r;Va(!0,s,r);const[l,c]=Sf(i,t?t.fields:[]),u=o?i.domain.length:-1,d=n.theme?n.theme.palette("sequential",u>0?u:2):[],f=a?i.range:d;return s.range(i.invert?f.slice().reverse():f.slice()),s.domain(o?i.domain:function(e,t,n){const r=e.length;if(2===r)return[t,n];const i=[],o=(n-t)/(r-1);i.push(t);for(let e=1;e<r-1;e++)i.push(t+o*e);return i.push(n),i}(s.range(),l,c)),s}const Ef={domain:[],range:[],invert:!1,min:NaN,max:NaN,nice:!1};function Cf(e){const t=[];for(let n=0;n<e.length-1;n++)t.push((e[n]+e[n+1])/2);return t}const Af={domain:[],range:[]};const Df={domain:[],range:[],unknown:void 0},qf={domain:[],range:[],override:!1};const _f=il();function Tf(e,t,n){let r=e.data;e.source&&(n.logger.warn("Deprecated: Scale data source configuration"),r={extract:[]},(Array.isArray(e.source)?e.source:[e.source]).forEach(e=>{r.extract.push({field:e})}));const i=$u(r,t,n);let o,a=e.type||function(e){return e.root?"h-band":e.fields&&e.fields[0]?function(e){const t=e.map(e=>"dimension"===e.type()?"band":"linear");return-1!==t.indexOf("linear")?"linear":"band"}(e.fields):"linear"}(i);return"color"===a&&(a=i.fields&&i.fields[0]&&"dimension"===i.fields[0].type()?"categorical-color":"sequential-color"),n.scale.has(a)&&(o=n.scale.get(a),o=o(e,i,{theme:n.theme,logger:n.logger}),o.type=a),o}_f("linear",mf),_f("band",yf),_f("h-band",function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i={data:n,resources:r},o=uf(t,gf,i);o.ticks=uf(t.ticks,vf,i),o.value="function"==typeof t.value?t.value:e=>e.datum.value,o.label="function"==typeof t.label?t.label:e=>e.datum.value;let a=yf(o);const{values:s,labels:l,items:c,ticks:u}=function(e,t,n){const r=t.ticks.depth,i=t.value,o=t.label,a=[],s=[],l={},c=[];let u=0;if(!e)return{values:a,labels:s,items:l,ticks:c};e.eachAfter(e=>{if(e.depth>0){const t=bf(e,i,n),d=e.leaves()||[e],f=i(Va({datum:e.data},n)),p=o(Va({datum:e.data},n)),h=Array.isArray(e.children),m={key:t,count:d.length,value:f,label:p,leftEdge:bf(d[0],i,n),rightEdge:bf(d[Math.max(d.length-1,0)],i,n),node:e};h?(a.push("SPACER_".concat(u,"_SPACER")),u++):(a.push(t),s.push(p)),(r<=0&&!h||e.depth===r)&&c.push(m),l[t]=m}});const d=e.height-1;return d>0&&a.splice(-d),{values:a,labels:s,items:l,ticks:c}}(n.root,o,i),d=function(e){const t=String(e),n=c[t];return a(n?o.invert?n.rightEdge:n.leftEdge:t)};Va(!0,d,a),d.bandwidth=function(e){const t=c[String(e)],n=a.bandwidth();if(t&&!t.isLeaf){const e=d(t.leftEdge),r=d(t.rightEdge);return Math.abs(e-r)+n}return n},d.step=function(e){const t=c[String(e)],n=t?t.count:1;let r=a.step();return r*=n,r},d.data=()=>n,d.datum=e=>{const t=c[String(e)];return t?t.node.data:null},d.copy=()=>e(t,n,r),d.labels=()=>l,d.ticks=()=>u.map(e=>{const t=d(e.key),n=d.bandwidth(e.key);return{position:t+n/2,label:e.label,data:e.node.data,start:t,end:t+n}});const f=a.pxScale;return d.pxScale=function(e){return a=f(e),d},d.domain(s),d}),_f("sequential-color",kf),_f("threshold-color",function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=ef(),i=uf(e,Ef,{data:t,resources:n}),o=Array.isArray(i.domain)&&i.domain.length,a=Array.isArray(i.range)&&i.range.length;function s(e){return Xa(e)?NaN:r(e)}Object.keys(r).forEach(e=>s[e]=r[e]);const l=t.fields,[c,u]=Sf(i,l),d=o?i.domain.length:-1,f=n.theme?n.theme.palette("sequential",d>0?d:2):[];let p=a?i.range:f,h=[];return h=o?i.domain:i.nice?function(e,t,n){const r=2===e.length?10:Math.max(1,e.length),i=Qd().domain([t,n]).nice(r).ticks(r);if(!e||!e.length)return i;const o=Math.max(0,e.length-1);for(;i.length>o;)i[0]-t<=n-i[i.length-1]?i.shift():i.pop();return i}(p,c,u):[c+(u-c)/2],p.length>h.length+1?h=function(e,t,n){const r=e.length;if(2===r)return[t+(n-t)/2];const i=[],o=(n-t)/r;for(let e=1;e<r;e++)i.push(t+o*e);return i}(p,c,u):p.length<h.length+1&&(p=function(e,t,n,r){n=e[0],r=e&&e.length>=2?e[e.length-1]:r;const i=kf().domain([n,r]).range(t);return[n,...Cf(e),r].map(e=>i(e))}(h,p,c,u)),s.data=()=>t,s.range(i.invert?p.slice().reverse():p),s.domain(h),s}),_f("categorical-color",function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Xu(),i={data:t,resources:n},o=uf(e,Af,i),a="function"==typeof e.value?e.value:e=>e.datum.value,s="function"==typeof e.label?e.label:e=>e.datum.label,l=t.items||[],c={},u=[],d=[];for(let e=0;e<l.length;e++){const t=Va({datum:l[e]},i),n=a(t,e);-1===u.indexOf(n)&&(u.push(n),d.push(s(t,e)),c[n]=e)}return r.data=()=>t,r.labels=()=>d,r.label=e=>d[u.indexOf(e)],r.datum=e=>l[c[e]],r.range(o.range),Array.isArray(o.domain)&&o.domain.length?r.domain(o.domain):r.domain(u),r}(e,t,n),i=n.theme,o=uf(e,Df,{data:t,resources:n});let a;if(o.explicit=uf(e.explicit,qf,{data:t,resources:n}),a=Array.isArray(o.range)&&0!==o.range.length?o.range.slice():i?i.palette("categorical",r.domain().length).slice():[],o.unknown)r.unknown(o.unknown);else if(i&&i.palette("unknown")){let e=i.palette("unknown");r.unknown(e[0])}if(Array.isArray(o.explicit.domain)&&o.explicit.domain.length){const e=r.domain().slice(),t=o.explicit.domain,n=Array.isArray(o.explicit.range)?o.explicit.range:[],i=Math.floor(e.length/a.length);for(let e=1;e<i+1;e*=2)a=a.concat(a);if(o.explicit.override)for(let r=0;r<t.length;r++){const i=e.indexOf(t[r]);i>-1&&(a[i]=n[r])}else{const r=t.map((t,r)=>[e.indexOf(t),t,n[r]]).sort((e,t)=>e[0]-t[0]);r.forEach(t=>{const n=e.indexOf(t[1]);-1!==n&&a.splice(n,0,t[2])})}a.length=e.length}return r.range(a),r});var Nf={};function Of(){Of.init.call(this)}Nf.isObject=function(e){return"object"==typeof e&&null!==e},Nf.isNumber=function(e){return"number"==typeof e},Nf.isUndefined=function(e){return void 0===e},Nf.isFunction=function(e){return"function"==typeof e};var If=Of;Of.EventEmitter=Of,Of.prototype._events=void 0,Of.prototype._maxListeners=void 0,Of.defaultMaxListeners=10,Of.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},Of.prototype.setMaxListeners=function(e){if(!Nf.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},Of.prototype.emit=function(e){var t,n,r,i,o,a;if(this._events||(this._events={}),"error"===e&&!this._events.error)throw(t=arguments[1])instanceof Error?t:Error('Uncaught, unspecified "error" event.');if(n=this._events[e],Nf.isUndefined(n))return!1;if(Nf.isFunction(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];n.apply(this,i)}else if(Nf.isObject(n)){for(r=arguments.length,i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];for(r=(a=n.slice()).length,o=0;o<r;o++)a[o].apply(this,i)}return!0},Of.prototype.addListener=function(e,t){var n;if(!Nf.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,Nf.isFunction(t.listener)?t.listener:t),this._events[e]?Nf.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,Nf.isObject(this._events[e])&&!this._events[e].warned)&&((n=Nf.isUndefined(this._maxListeners)?Of.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,Nf.isFunction(console.error)&&console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),Nf.isFunction(console.trace)&&console.trace()));return this},Of.prototype.on=Of.prototype.addListener,Of.prototype.once=function(e,t){if(!Nf.isFunction(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},Of.prototype.removeListener=function(e,t){var n,r,i,o;if(!Nf.isFunction(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(n=this._events[e]).length,r=-1,n===t||Nf.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(Nf.isObject(n)){for(o=i;o-- >0;)if(n[o]===t||n[o].listener&&n[o].listener===t){r=o;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},Of.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],Nf.isFunction(n))this.removeListener(e,n);else if(Array.isArray(n))for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},Of.prototype.listeners=function(e){return this._events&&this._events[e]?Nf.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},Of.listenerCount=function(e,t){return e._events&&e._events[t]?Nf.isFunction(e._events[t])?1:e._events[t].length:0};var Lf={mixin:e=>(Object.keys(If.prototype).forEach(t=>{e[t]=If.prototype[t]}),If.init(e),e)};function Pf(){let e=0,t=0,n=0,r=0;n=n||e;const i={move(e){this.moveTo(n+e)},moveTo(o){const a=Math.max(e,Math.min(t-r,o));n!==a&&(n=a,i.emit("update"))},update(o){let a=!1;({min:e=e,max:t=t}=o),void 0!==o.viewSize&&o.viewSize!==r&&(r=o.viewSize,a=!0);const s=Math.max(e,Math.min(t-r,n));n!==s&&(n=s,a=!0),a&&i.emit("update")},getState:()=>({min:e,max:t,start:n,viewSize:r})};return Lf.mixin(i),i}function Rf(e,t){const n=e.min||0,r=e.max||0,i=e.viewSize||0,o=t||Pf();return o.update({min:n,max:r,viewSize:i}),o}function zf(e,t){return e<=t}function Ff(e,t){return e<t}function jf(e,t,n){let r=0;for(;r<e.length&&t>e[r];)++r;return e[r]===t&&n&&++r,r}function Vf(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=[];function i(){}return i.configure=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{includeMax:r=!0,includeMin:i=!0}=n;e=r?zf:Ff,t=i?zf:Ff},i.add=e=>{let{min:t,max:n}=e;const i=jf(r,t),o=jf(r,n,!0),a=[i,o-i];i%2==0&&a.push(t),o%2==0&&a.push(n);const s=r.join(",");r.splice(...a);return s!==r.join(",")},i.remove=e=>{let{min:t,max:n}=e;const i=jf(r,t),o=jf(r,n,!0),a=[i,o-i];i%2==1&&a.push(t),o%2==1&&a.push(n);const s=r.join(",");r.splice(...a);return s!==r.join(",")},i.set=e=>{const t=r.join(",");r=[],Array.isArray(e)?e.forEach(i.add):i.add(e);return t!==r.join(",")},i.clear=()=>{const e=r.length>0;return r=[],e},i.containsValue=n=>function(e,t,n,r){const i=e.length;for(let o=1;o<i;o+=2)if(n(e[o-1],t)&&r(t,e[o]))return!0;return!1}(r,n,t,e),i.containsRange=e=>{let{min:t,max:n}=e;const i=jf(r,t,!0),o=jf(r,n);return i===o&&o%2==1},i.toggle=e=>i.containsRange(e)?i.remove(e):i.add(e),i.ranges=()=>{const e=[];for(let t=1;t<r.length;t+=2)e.push({min:r[t-1],max:r[t]});return e},i.configure(n),i}function Hf(){let e=[];function t(){}return t.add=t=>-1===e.indexOf(t)&&(e.push(t),!0),t.remove=t=>{const n=e.indexOf(t);return-1!==n&&(e.splice(n,1),!0)},t.contains=t=>-1!==e.indexOf(t),t.values=()=>e.slice(),t.clear=()=>e=[],t.toString=()=>e.join(";"),t}const Bf={key:void 0,includeMin:!0,includeMax:!0};function $f(e){let{items:t,collection:n,vc:r}=e;const i={},o=[];let a,s;for(let e=0,o=t.length;e<o;e++){a=t[e].key,n[a]||(n[a]=r()),s=t[e].values||[t[e].value];for(let e=0;e<s.length;e++)n[a].add(s[e])&&(i[a]=i[a]||[],i[a].push(s[e]))}const l=Object.keys(i);for(let e=0,t=l.length;e<t;e++)a=l[e],o.push({id:a,values:i[a]});return o}function Wf(e){let{items:t,collection:n}=e;const r={},i=[];let o,a;for(let e=0,i=t.length;e<i;e++)if(o=t[e].key,n[o]){a=t[e].values||[t[e].value];for(let e=0;e<a.length;e++)n[o].remove(a[e])&&(r[o]=r[o]||[],r[o].push(a[e]))}const s=Object.keys(r);for(let e=0,t=s.length;e<t;e++)o=s[e],i.push({id:o,values:r[o]});return i}function Uf(e){const t={};let n,r;for(let i=0,o=e.length;i<o;i++){n=e[i].key,r=e[i].values||[e[i].value],t[n]||(t[n]=[]);for(let e=0;e<r.length;e++){-1===t[n].indexOf(r[e])&&t[n].push(r[e])}}return t}function Yf(e){let{key:t,collection:n,obj:r,fn:i,value:o}=e;n[t]||(n[t]=i()),r[t]=r[t]||[],r[t].push(o),n[t].add(o)}function Xf(e,t){const n=[],r=Object.keys(e);let i,o;const a=e=>-1===t[i].indexOf(e);for(let s=0,l=r.length;s<l;s++)i=r[s],t[i]?(o=e[i].filter(a),o.length&&n.push({id:i,values:o})):n.push({id:i,values:e[i]});return n}function Gf(e,t,n){const r=function(e,t){if(!Object.keys(t).length)return e;const n=e.length,r=Array(n);for(let i=0;i<n;i++)r[i]=e[i].key in t?Va({},e[i],{key:t[e[i].key]}):e[i];return r}(t,n);return e&&e.length?e.reduce((e,t)=>t(e),r):r}function Kf(e){return e.replace(/(-[a-z])/g,e=>e.toUpperCase().replace("-",""))}function Zf(e){return e.replace(/([A-Z])/g,e=>"-".concat(e.toLowerCase()))}function Jf(e,t,n){let{ranges:r,interceptors:i,rc:o,aliases:a,rangeConfig:s}=n;const l=Gf(i["".concat(t,"Ranges")],e,a);let c=!1;return l.forEach(e=>{const n=e.key;if(r[n]||(r[n]=o(s.sources[n]||s.default)),"set"===t)c=r[n][t](e.ranges||e.range)||c;else{const i=e.ranges||[e.range];for(let e=0;e<i.length;e++)c=r[n][t](i[e])||c}}),c}function Qf(){let{vc:e=Hf,rc:t=Vf}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=!1,r={},i={},o={},a={sources:{},default:Va({},Bf)};const s={addValues:[],removeValues:[],toggleValues:[],setValues:[],addRanges:[],setRanges:[],removeRanges:[],toggleRanges:[]},l=()=>{const e={values:{},ranges:{}};return Object.keys(i).forEach(t=>{e.values[t]=i[t].values()}),Object.keys(r).forEach(t=>{e.ranges[t]=r[t].ranges()}),e},c={ls:[],clear(){this.ls.forEach(e=>e.clear())},start(){this.ls.forEach(e=>e.start())},end(){this.ls.forEach(e=>e.end())},update(){const e=l();this.ls.forEach(t=>t._state(e))},updateValues(){const e=l();this.ls.forEach(t=>t._state({values:e.values}))},updateRanges(){const e=l();this.ls.forEach(t=>t._state({ranges:e.ranges}))}},u={configure:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Array.isArray(e.ranges)&&e.ranges.length&&(a={sources:{},default:Va({},Bf)},e.ranges.forEach(e=>{const t={};Object.keys(Bf).filter(e=>"key"!==e).forEach(n=>{t[n]=void 0!==e[n]?e[n]:Bf[n]}),void 0!==e.key?a.sources[e.key]=t:a.default=t}),Object.keys(r).forEach(e=>r[e].configure(a.sources[e]||a.default)),u.emit("update",[],[]))},link:e=>{if(u===e)throw new Error("Can't link to self");c.ls.push(e),e._state(l())},_state:e=>{if(!e)return l();if(e.values){const t=[];Object.keys(e.values).forEach(n=>{i[n]&&e.values[n].join(";")===i[n].toString()||t.push({key:n,values:e.values[n]})}),Object.keys(i).forEach(n=>{e.values[n]||t.push({key:n,values:[]})}),t.length&&u.setValues(t)}if(e.ranges){const t=[];Object.keys(e.ranges).forEach(n=>{r[n]&&e.ranges[n].join(";")===r[n].toString()||t.push({key:n,ranges:e.ranges[n]})}),Object.keys(r).forEach(n=>{e.ranges[n]||t.push({key:n,ranges:[]})}),t.length&&u.setRanges(t)}},start:function(){if(!n){n=!0;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];u.emit("start",...t),c.start()}},end:function(){if(n){n=!1,r={},i={};for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];u.emit("end",...t),c.end()}},isActive:()=>n,clear:()=>{const e=u.brushes().filter(e=>"value"===e.type&&e.brush.values().length).map(e=>({id:e.id,values:e.brush.values()})),t=Object.keys(r).length>0||e.length;r={},i={},t&&(u.emit("update",[],e),c.clear())},brushes:()=>{let e=[];return e=e.concat(Object.keys(r).map(e=>({type:"range",id:e,brush:r[e]}))),e=e.concat(Object.keys(i).map(e=>({type:"value",id:e,brush:i[e]}))),e},addValue:(e,t)=>{u.addValues([{key:e,value:t}])},addValues:t=>{const r=Gf(s.addValues,t,o),a=$f({vc:e,collection:i,items:r});u.emit("add-values",r),a.length&&(n||(n=!0,u.emit("start")),u.emit("update",a,[]),c.updateValues())}};return u.setValues=t=>{const r=Gf(s.setValues,t,o),a=function(e){let{items:t,vCollection:n,vc:r}=e;const i={},o=Uf(t);let a,s=[],l=[];const c={},u=Object.keys(n);for(let e=0,t=u.length;e<t;e++)a=u[e],c[a]=n[a].values().slice(),delete n[a];const d=e=>{n[a]&&n[a].contains(e)||Yf({key:a,value:e,collection:n,obj:i,fn:r})},f=Object.keys(o);for(let e=0,t=f.length;e<t;e++)a=f[e],o[a].forEach(d);return l=Xf(c,i),s=Xf(i,c),[s,l]}({items:r,vCollection:i,vc:e});u.emit("set-values",r),(a[0].length>0||a[1].length>0)&&(n||(n=!0,u.emit("start")),u.emit("update",a[0],a[1]),c.updateValues())},u.removeValue=(e,t)=>{u.removeValues([{key:e,value:t}])},u.removeValues=e=>{const t=Gf(s.removeValues,e,o),n=Wf({collection:i,items:t});u.emit("remove-values",t),n.length&&(u.emit("update",[],n),c.updateValues())},u.addAndRemoveValues=(t,r)=>{const a=Gf(s.addValues,t,o),l=Gf(s.removeValues,r,o),d=$f({vc:e,collection:i,items:a}),f=Wf({collection:i,items:l});u.emit("add-values",a),u.emit("remove-values",l),(d.length||f.length)&&(n||(n=!0,u.emit("start")),u.emit("update",d,f),c.updateValues())},u.toggleValue=(e,t)=>{u.toggleValues([{key:e,value:t}])},u.toggleValues=t=>{const r=Gf(s.toggleValues,t,o),a=function(e){let{items:t,values:n,vc:r}=e;const i={},o={},a=[],s=[],l=Uf(t);let c,u,d;const f=Object.keys(l);for(let e=0,t=f.length;e<t;e++){c=f[e],d=l[c];for(let e=0,t=d.length;e<t;e++)u=d[e],n[c]&&n[c].contains(u)?n[c]&&n[c].contains(u)&&(o[c]=o[c]||[],o[c].push(u),n[c].remove(u)):Yf({key:c,value:u,collection:n,obj:i,fn:r})}const p=Object.keys(i);for(let e=0,t=p.length;e<t;e++)c=p[e],a.push({id:c,values:i[c]});const h=Object.keys(o);for(let e=0,t=h.length;e<t;e++)c=h[e],s.push({id:c,values:o[c]});return[a,s]}({items:r,values:i,vc:e});u.emit("toggle-values",r),(a[0].length>0||a[1].length>0)&&(n||(n=!0,u.emit("start")),u.emit("update",a[0],a[1]),c.updateValues())},u.containsValue=(e,t)=>{let n=o[e]||e;return!!i[n]&&i[n].contains(t)},u.addRange=(e,t)=>{u.addRanges([{key:e,range:t}])},u.addRanges=e=>{Jf(e,"add",{ranges:r,rc:t,interceptors:s,aliases:o,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.removeRange=(e,t)=>{u.removeRanges([{key:e,range:t}])},u.removeRanges=e=>{Jf(e,"remove",{ranges:r,rc:t,interceptors:s,aliases:o,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.setRange=(e,t)=>{u.setRanges([{key:e,range:t}])},u.setRanges=e=>{Jf(e,"set",{ranges:r,rc:t,interceptors:s,aliases:o,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.toggleRange=(e,t)=>{u.toggleRanges([{key:e,range:t}])},u.toggleRanges=e=>{Jf(e,"toggle",{ranges:r,rc:t,interceptors:s,aliases:o,rangeConfig:a})&&(n||(n=!0,u.emit("start")),u.emit("update",[],[]),c.updateRanges())},u.containsRangeValue=(e,t)=>{let n=o[e]||e;return!!r[n]&&r[n].containsValue(t)},u.containsRange=(e,t)=>{let n=o[e]||e;return!!r[n]&&r[n].containsRange(t)},u.containsMappedData=(e,t,n)=>{let a=[];const s=Object.keys(e);let l,c,u,d;for(let t=0,n=s.length;t<n;t++){if(l=s[t],"value"===l)c=e,a[t]={key:"",i:t,bool:!1};else{if("source"===l)continue;c=e[l],a[t]={key:l,i:t,bool:!1}}u=c.source&&c.source.field,void 0!==u&&(void 0!==c.source.key&&(u="".concat(c.source.key,"/").concat(u)),u in o&&(u=o[u]),d=c.value,r[u]?a[t].bool=Array.isArray(d)?r[u].containsRange({min:d[0],max:d[1]}):r[u].containsValue(d):i[u]&&i[u].contains(d)&&(a[t].bool=!0))}return t?(a=a.filter(e=>-1!==t.indexOf(e.key)),"and"===n?!!a.length&&!a.some(e=>!1===e.bool):"xor"===n?!!a.length&&a.some(e=>e.bool)&&a.some(e=>!1===e.bool):a.some(e=>e.bool)):a.some(e=>e.bool)},u.intercept=(e,t)=>{const n=Kf(e);s[n]&&s[n].push(t)},u.removeInterceptor=(e,t)=>{const n=Kf(e);if(!s[n])return;const r=s[n].indexOf(t);-1!==r&&s[n].splice(r,1)},u.removeAllInterceptors=e=>{const t=[];if(e){const n=Kf(e);s[n]&&s[n].length&&t.push({name:e,handlers:s[n]})}else Object.keys(s).forEach(e=>{s[e].length&&t.push({name:Zf(e),handlers:s[e]})});t.forEach(e=>{e.handlers.slice().forEach(t=>u.removeInterceptor(e.name,t))})},u.addKeyAlias=(e,t)=>{o[e]=t},u.removeKeyAlias=e=>{delete o[e]},Lf.mixin(u),u}function ep(e){return e*e*e}function tp(e){return--e*e*e+1}function np(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}il();const rp=["stroke","fill","color","backgroundColor","thumbColor"];function ip(e,t){const n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n);let a;for(a=0;a<r;++a)i[a]=op(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(e){for(a=0;a<r;++a)o[a]=i[a](e);return o}}function op(e,t,n){const r=typeof t;let i;return null==t||"boolean"===r?function(e){return()=>e}(t):("number"===r?Rd:"string"===r?(i=hd(t))&&rp.includes(n)?(t=i,Od):Vd:t instanceof hd?Od:t instanceof Date?Pd:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?Id:Array.isArray(t)?ip:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?ap:Rd)(e,t)}function ap(e,t){const n={},r={};let i;for(i in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)i in e?n[i]=op(e[i],t[i],i):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}function sp(e,t){return e.data?e.data.value:"text"===e.type?e.text:t}const lp={fontFamily:"Arial",fontSize:"13px",color:"#595959",backgroundColor:"#ffffff",stroke:"#000000",strokeWidth:0,$fill:"#333333"},cp=/^\$/;function up(e){const t=typeof e;return"object"!==t&&"function"!==t&&"undefined"!==t}function dp(e,t,n){const r=e[t];r&&r.scale&&r.scale.pxScale?r.scale=r.scale.pxScale(n):r&&r.pxScale&&(e[t]=r.pxScale(n))}function fp(e,t){return e.pxScale?e.pxScale(t):e}const pp={normalizeSettings:function(e,t,n){const r=Va({},e),i=Va({},t);return Object.keys(r).forEach(e=>{i[e]={};const o=r[e],a=typeof o;if("function"==typeof o)i[e].fn=o;else if(up(o)){let n=t[e];"string"==typeof n&&cp.test(n)&&(n=lp[n]);const r=typeof n;i[e]="undefined"===r||r===a?o:n}else o&&"object"==typeof o&&("function"==typeof o.fn&&(i[e].fn=o.fn),void 0!==o.scale&&(i[e].scale=n.scale(o.scale)),"string"==typeof o.ref&&(i[e].ref=o.ref))}),Object.keys(t).forEach(e=>{if(e in r)return;const n=t[e];"string"===typeof n&&cp.test(n)?i[e]=lp[n]:i[e]=n}),i},resolveForItem:function(e,t,n){const r={},i=Object.keys(t),o=i.length,a=e.datum,s=e.datum;for(let l=0;l<o;l++){const o=i[l],c=t[o],u="object"==typeof s&&void 0!==c,d=u&&"string"==typeof c.ref,f=u&&o in s,p=d?s[c.ref]:f?s[o]:a;up(c)?r[o]=c:u&&c.fn?(c.scale&&(e.scale=c.scale),r[o]=c.fn.call(null,e,n)):u&&c.scale&&p?(r[o]=c.scale(p.value),c.scale.bandwidth&&(r[o]+=c.scale.bandwidth()/2)):d&&p?r[o]=p.value:c.fn?r[o]=c.fn.call(null,e,n):r[o]=c}return r},updateScaleSize:dp};function hp(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((e,t)=>Array.isArray(t.children)?(e.push(...hp(t.children)),e):(e.push(t),e),[])}function mp(e,t){let{context:n,data:r,style:i,filter:o,mode:a}=t;const s=e.chart.brush(n),l=r,c=i.active||{},u=i.inactive||{},d=[];Object.keys(c).forEach(e=>{d.push(e)}),Object.keys(u).forEach(e=>{-1===d.indexOf(e)&&d.push(e)});const f=[];let p=!1;const h=()=>{let t=hp(e.nodes);return"function"==typeof o&&(t=t.filter(o)),t},m=()=>{const e=h(),t=e.length;let n,r=!1;const i="function"==typeof l?l({brush:s}):l;for(let r=0;r<t;r++){if(n=e[r].data,!n)continue;e[r].__style||(e[r].__style={},d.forEach(t=>{e[r].__style[t]=e[r][t]}));const t=s.containsMappedData(n,i,a),o=f.indexOf(e[r]);let l=!1;t&&-1===o?(f.push(e[r]),l=!0):t||-1===o||(f.splice(o,1),l=!0),e[r].needToUpdate=l||p,e[r].isActive=t}for(let i=0;i<t;i++)if(n=e[i].data,n){if(e[i].needToUpdate){const t=Va({},e[i],e[i].__style),n=e[i].isActive;d.forEach(r=>{e[i][r]=n&&r in c?"function"==typeof c[r]?c[r].call(null,t,f):c[r]:!n&&r in u?"function"==typeof u[r]?u[r].call(null,t,f):u[r]:e[i].__style[r]}),r=!0}delete e[i].needToUpdate}return p=!1,r},g=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1};const{suppressRender:n}=t,r=h(),i=r.length;for(let e=0;e<i;e++)r[e].data&&(r[e].__style=r[e].__style||{},d.forEach(t=>{r[e].__style[t]=r[e][t],t in u&&(r[e][t]="function"==typeof u[t]?u[t].call(null,r[e]):u[t])}));p=!0,f.length=0,n||e.renderer.render(e.nodes)},y=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{suppressRender:!1};const{suppressRender:n}=t,r=h(),i=r.length;for(let e=0;e<i;e++)r[e].__style&&(Object.keys(r[e].__style).forEach(t=>{r[e][t]=r[e].__style[t]}),r[e].__style=void 0);f.length=0,n||e.renderer.render(e.nodes)},v=()=>{if(m()){const t="function"==typeof e.config.sortNodes?e.config.sortNodes(e):e.nodes;"function"==typeof e.config.customRender?e.config.customRender({render:e.renderer.render,nodes:t}):e.renderer.render(t)}};return s.on("start",g),s.on("end",y),s.on("update",v),{isActive:()=>s.isActive(),update:()=>{f.length=0,p=!0,m()},cleanUp:function(){s.removeListener("start",g),s.removeListener("end",y),s.removeListener("update",v)}}}function gp(e){let{nodes:t,action:n,chart:r,trigger:i}=e;const o=[];for(let e=0;e<t.length;e++){let n=t[e].data;null!==n&&o.push(n)}!function(e){let{dataPoints:t,action:n,chart:r,trigger:i}=e;if(!i)return;const o=i.data||[""];let a={items:[],actionFn:"toggleRanges"},s={items:[],actionFn:"toggleValues"};-1!==["add","remove","set","toggle"].indexOf(n)&&(a.actionFn="".concat(n,"Ranges"),s.actionFn="".concat(n,"Values"));for(let e=0;e<t.length;e++){const n=t[e];n&&o.forEach(e=>{let t=n&&!e?n:n[e];if(t){let e={key:t.source.field};void 0!==t.source.key&&(e.key="".concat(t.source.key,"/").concat(t.source.field)),Array.isArray(t.value)?(e.range={min:t.value[0],max:t.value[1]},a.items.push(e)):(e.value=t.value,s.items.push(e))}})}i.contexts.forEach(e=>{a.items.length?r.brush(e)[a.actionFn](a.items):r.brush(e)[s.actionFn](s.items)})}({dataPoints:o,action:n,chart:r,trigger:i})}function yp(e){let{collisions:t,t:n,config:r,action:i}=e,o=[],a=!1;t.length>0&&(o=t,a=!0,"stop"===n.propagation&&(o=[t[t.length-1]]));const s=o.map(e=>e.node);return gp({nodes:s,action:i,chart:r.chart,data:r.data,trigger:n}),a}function vp(e,t,n){const r=n.element().getBoundingClientRect();let i=Ua(e)?function(e,t){return 1!==e.changedTouches.length?null:{x:e.changedTouches[0].clientX-t.left,y:e.changedTouches[0].clientY-t.top}}(e,r):function(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}(e,r);return null===i||i.x<0||i.y<0||i.x>r.width||i.y>r.height?[]:(t.touchRadius>0&&Ua(e)?i={cx:i.x,cy:i.y,r:t.touchRadius}:t.mouseRadius>0&&!Ua(e)&&(i={cx:i.x,cy:i.y,r:t.mouseRadius}),n.itemsAt(i))}function bp(e,t,n){return e?"function"==typeof e?e(t):e:n}const xp={fill:"fill",stroke:"stroke",opacity:"opacity",strokeWidth:"stroke-width",strokeLinejoin:"stroke-linejoin",fontFamily:"font-family",fontSize:"font-size",fontStyle:"font-style",textDecoration:"text-decoration",fontWeight:"font-weight",baseline:"dominant-baseline",dominantBaseline:"dominant-baseline",anchor:"text-anchor",textAnchor:"text-anchor",maxWidth:"maxWidth",transform:"transform",strokeDasharray:"stroke-dasharray",id:"id"};function wp(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?"M".concat(r.x," ").concat(r.y):"L".concat(r.x," ").concat(r.y),n+=" "}return t&&(n+="Z"),n}function Sp(e,t,n,r){const i=n/2,o=e-r/2,a=t-r/2,s=e-i,l=t-i;return[{x:o,y:a},{x:o,y:l},{x:o+r,y:l},{x:o+r,y:a},{x:s+n,y:a},{x:s+n,y:a+r},{x:o+r,y:a+r},{x:o+r,y:l+n},{x:o,y:l+n},{x:o,y:a+r},{x:s,y:a+r},{x:s,y:a}]}function Mp(e){return-e/180*Math.PI}function kp(e){return function(e){let t=(.5*(Math.floor(e/Math.PI*2)+2)+.25)*Math.PI,n=Math.cos(Math.abs(t-e))*Math.sqrt(2),r=n*Math.cos(e),i=n*Math.sin(e);return{x1:r<0?1:0,y1:i<0?1:0,x2:r>=0?r:r+1,y2:i>=0?i:i+1}}(Mp(e))}function Ep(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Cp(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Ap(e,t){return{x:e.x*t,y:e.y*t}}function Dp(e,t){return e.x-t.x}function qp(e,t){return e.y-t.y}function _p(e,t){return Dp(e,t)**2+qp(e,t)**2}function Tp(e,t){return Math.sqrt(_p(e,t))}function Np(e,t){return e.x*t.x+e.y*t.y}function Op(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:0,y:0};const r=Math.cos(t),i=Math.sin(t),o=Cp(e,n);return Ep({x:r*o.x-i*o.y,y:i*o.x+r*o.y},n)}const Ip={up:0,down:180,left:90,right:-90};function Lp(e){let{x:t,y:n,size:r}=e;const i=r/2;return{type:"rect",x:t-i,y:n-i,width:r,height:r}}const Pp=il();Pp.add("circle",function(e){return{type:"circle",fill:"black",cx:e.x,cy:e.y,r:e.size/2}}),Pp.add("diamond",function(e){const t=e.size,n=e.x-t/2,r=e.y-t/2;return{type:"path",fill:"black",d:wp([{x:n,y:r+t/2},{x:n+t/2,y:r},{x:n+t,y:r+t/2},{x:n+t/2,y:r+t},{x:n,y:r+t/2}])}}),Pp.add("saltire",function(e){const t=Mp(45),n=e.size/2,r=isNaN(e.width)?n/2:e.width,i=Math.min(r,n);let o=e.size;const a=Math.sin(Math.asin(-t))*(i/2);o+=2*(n/Math.sin(-t)-n),o-=2*a;const s={x:e.x,y:e.y},l=Sp(e.x,e.y,o,i).map(e=>Op(e,t,s));return{type:"path",fill:"black",d:wp(l)}}),Pp.add("square",function(e){const t=e.size;return{type:"rect",fill:"black",x:e.x-t/2,y:e.y-t/2,width:t,height:t}}),Pp.add("triangle",function(e){const t=e.size,n={x:e.x,y:e.y},r=Ip[e.direction]||0,i=t/2,o=e.x-i,a=e.y-i;let s=[{x:o,y:a+t},{x:o+i,y:a},{x:o+t,y:a+t},{x:o,y:a+t}];const l=Mp(r);return s=s.map(e=>Op(e,l,n)),{type:"path",fill:"black",d:wp(s)}}),Pp.add("line",function(e){const t="vertical"===e.direction,n=e.size/2,r=e.x,i=e.y;return{type:"line",stroke:"black",strokeWidth:1,x1:r-(t?0:n),y1:i-(t?n:0),x2:r+(t?0:n),y2:i+(t?n:0),collider:Lp(e)}}),Pp.add("star",function(e){const t=e.size,n=[],r=t/2,i=e.points||5,o=Math.min(e.innerRadius||t/2,t)/2,a=isNaN(e.startAngle)?90:e.startAngle,s=360/i;for(let t=1;t<=i;t++){const i=s*t+a,l=Mp(i),c=Mp(i+s/2),u=Math.sin(l),d=Math.cos(l),f=Math.sin(c),p=Math.cos(c);n.push({x:e.x+d*r,y:e.y+u*r}),n.push({x:e.x+p*o,y:e.y+f*o})}return{type:"path",fill:"black",d:wp(n)}}),Pp.add("n-polygon",function(e){const t=[],n=e.size/2,r=Math.max(isNaN(e.sides)?6:e.sides,3),i=360/r,o=isNaN(e.startAngle)?0:e.startAngle;for(let a=1;a<=r;a++){const r=Mp(i*a+o),s=Math.sin(r),l=Math.cos(r);t.push({x:e.x+l*n,y:e.y+s*n})}return{type:"path",fill:"black",d:wp(t)}}),Pp.add("cross",function(e){const t=e.x,n=e.y,r=e.size/2,i=isNaN(e.width)?r/2:e.width,o=Math.min(i,r);return{type:"path",fill:"black",d:wp(Sp(t,n,e.size,o))}}),Pp.add("bar",function(e){const t={x:e.x,y:e.y},n="vertical"===e.direction,r=e.size/2,i=r/2/2;let o=[{x:t.x-r,y:t.y+i},{x:t.x-r,y:t.y-i},{x:t.x+r,y:t.y-i},{x:t.x+r,y:t.y+i}];if(n){const e=Mp(90);o=o.map(n=>Op(n,e,t))}const a=Ja(o);return a.type="rect",a.fill="black",a}),Pp.add("rect",function(e){const{x:t,y:n,size:r}=e,i=void 0===e.width?r:e.width,o=void 0===e.height?r:e.height;return{type:"rect",fill:"black",x:t-i/2,y:n-o/2,width:i,height:o}}),Pp.add("image",function(e){const{x:t,y:n}=e,{width:r,height:i,imageSrc:o,position:a,symbol:s,imageScalingFactor:l}=e.imageSettings||{};return{type:"image",x:t,y:n,width:r,height:i,src:o,symbol:s,r:10,cx:0,cy:0,imageScalingFactor:l,imagePosition:a}});const Rp=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Pp;return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=e.get(t.type);if(n){const e=n(t);return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(t).forEach(n=>{void 0!==xp[n]&&"transform"!==n&&(e[n]=t[n])})}(e,t),void 0!==t.data&&(e.data=t.data),e}return n}};function zp(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{dock:n="center",displayOrder:r=0,prioOrder:i=0,preferredSize:o=0,minimumLayoutMode:a,show:s=!0}=e;n=n||"center";return{computePreferredSize(e){let{inner:n,outer:r,children:i}=e;return"function"==typeof o?o({inner:n,outer:r,children:i,dock:this.dock()},t):o},dock(e){return void 0!==e?(n=e,this):"function"==typeof n?n(t):n},displayOrder(e){return void 0!==e?(r=e,this):"function"==typeof r?r(t):r},prioOrder(e){return void 0!==e?(i=e,this):"function"==typeof i?i(t):i},minimumLayoutMode(e){return void 0!==e?(a=e,this):"function"==typeof a?a(t):a},show(e){return void 0!==e?(s=e,this):"function"==typeof s?s(t):s}}}function Fp(e,t,n){const{require:r=[]}=t,i=t.mediator||{},{settings:o,formatter:a,scale:s,data:l,renderer:c,chart:u,dockConfig:d,mediator:f,instance:p,rect:h,style:m,registries:g,resolver:y,update:v,_DO_NOT_USE_getInfo:b,symbol:x,isVisible:w}=n;e.emit=()=>{},w&&(e.isVisible=w),Object.defineProperty(e,"settings",{get:o}),Object.defineProperty(e,"data",{get:l}),Object.defineProperty(e,"formatter",{get:a}),Object.defineProperty(e,"scale",{get:s}),Object.defineProperty(e,"mediator",{get:f}),Object.defineProperty(e,"style",{get:m}),Object.defineProperty(e,"registries",{get:g}),h&&Object.defineProperty(e,"rect",{get:h}),b&&(e._DO_NOT_USE_getInfo=b),Object.keys(t).forEach(n=>{var r;r=n,["on","preferredSize","created","beforeMount","mounted","resize","beforeUpdate","updated","beforeRender","render","beforeUnmount","beforeDestroy","destroyed","defaultSettings","data","settings","formatter","scale","chart","dockConfig","mediator","style","resolver","registries","_DO_NOT_USE_getInfo","symbol","isVisible"].some(e=>e===r)||("function"==typeof t[n]?e[n]=t[n].bind(e):e[n]=t[n])}),r.forEach(t=>{"renderer"===t?Object.defineProperty(e,"renderer",{get:c}):"chart"===t?Object.defineProperty(e,"chart",{get:u}):"dockConfig"===t?Object.defineProperty(e,"dockConfig",{get:d}):"instance"===t?Object.defineProperty(e,"instance",{get:p}):"update"===t&&v?Object.defineProperty(e,"update",{get:v}):"resolver"===t?Object.defineProperty(e,"resolver",{get:y}):"symbol"===t&&Object.defineProperty(e,"symbol",{get:x})}),Object.keys(i).forEach(t=>{e.mediator.on(t,i[t].bind(e))})}function jp(e,t,n){const r=t=>e[t]?(n.warn("Deprecation Warning the ".concat(t," property should be moved into layout: {} property")),e[t]):e.layout?e.layout[t]:void 0,i={};return i.displayOrder=r("displayOrder"),i.dock=r("dock"),i.prioOrder=r("prioOrder"),i.minimumLayoutMode=r("minimumLayoutMode"),e.layout=e.layout||{},e.layout.displayOrder=void 0!==i.displayOrder?i.displayOrder:e.layout.displayOrder,e.layout.prioOrder=void 0!==i.prioOrder?i.prioOrder:e.layout.prioOrder,e.layout.dock=i.dock||e.layout.dock,e.layout.minimumLayoutMode=i.minimumLayoutMode||e.layout.minimumLayoutMode,i.show=e.show,i.preferredSize=t,i}function Vp(e,t,n){Object.keys(n.on||{}).forEach(r=>{e.eventListeners=e.eventListeners||[];const i=n.on[r].bind(e);e.eventListeners.push({event:r,listener:i}),t.on(r,i)}),e.emit=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.emit(e,...r)}}function Hp(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{defaultSettings:n={},_DO_NOT_USE_getInfo:r=()=>({})}=e,{chart:i,container:o,mediator:a,registries:s,theme:l,renderer:c}=t,u=Lf.mixin({});let d,f,p,h,m,g=t.settings||{},y=Va(!0,{},n,g),v=[],b=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pp,n={};return{resolve:function(r){let{data:i,settings:o,defaults:a={},scaled:s}=r;const l=n.norm=t.normalizeSettings(o,a,e.chart),c={scale:e.chart.scale,formatter:e.chart.formatter};s&&Object.keys(s).forEach(e=>{l[e]&&t.updateScaleSize(l,e,s[e])});const u=[];if(!i||!Array.isArray(i.items)){const e={data:i,resources:c};let r=t.resolveForItem(e,n.norm,-1);return{settings:n.norm,item:r}}{let e;for(let r=0,o=i.items.length;r<o;r++){e={datum:i.items[r],data:i,resources:c};let o=t.resolveForItem(e,n.norm,r);o.data=i.items[r],u.push(o)}}return{settings:n.norm,items:u}}}}({chart:i}),x=!1;const w={nodes:[],chart:i,config:y.brush||{},renderer:null},S={tap:[],over:[]},M=[],k={},E=Va({},g);function C(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(){const i=void 0!==e[t],o=void 0!==g[t];let a;for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return i&&("function"==typeof e[t]?a=e[t].call(k,...l):r&&(a=e[t])),o&&("function"==typeof g[t]?a=g[t].call(E,...l):r&&(a=g[t])),i||o||(a=n.call(k,...l)),a}}const A=C("preferredSize",()=>0,!0),D=C("resize",e=>{let{inner:t}=e;return t}),q=C("created"),_=C("beforeMount"),T=C("mounted"),N=C("beforeUnmount"),O=C("beforeUpdate"),I=C("updated"),L=C("beforeRender"),P=C("beforeDestroy"),R=C("destroyed"),z=e.render,F=()=>{y.brush&&(y.brush.consume||[]).forEach(e=>{e.context&&e.style&&M.push(mp(w,e))})},j=()=>{y.brush&&(y.brush.trigger||[]).forEach(e=>{"over"===e.on?S.over.push(e):S.tap.push(e)})};Object.defineProperty(w,"data",{get:()=>v});const V=y.renderer||e.renderer,H=V?c||s.renderer(V)():c||s.renderer()();"function"==typeof H.settings&&H.settings(y.rendererSettings),w.renderer=H;const B={resources:i.logger?{logger:i.logger()}:{}};let $=zp(jp(y,A,i.logger()),B);const W=e=>{e.key=y.key,e.element=H.element()},U=()=>{};U.dockConfig=()=>$,U.set=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.settings&&(g=e.settings,y=Va(!0,{},n,e.settings),$=zp(jp(y,A,i.logger()),B),w.config=y.brush||{}),y.scale&&(d=i.scale(y.scale)),y.data){const{rendererSettings:e}=y,t="function"==typeof(null==e?void 0:e.progressive)&&e.progressive(),n=$u(y.data,{dataset:i.dataset,collection:i.dataCollection},{logger:i.logger()},i.dataCollection);t?t.isFirst?(v=n,v.items&&(v.items=[...n.items])):v.items&&(v.items=[...v.items,...n.items||[]]):v=n}else v=d?d.data():[];"string"==typeof y.formatter||"object"==typeof y.formatter?f=i.formatter(y.formatter):d&&d.data().fields&&(f=d.data().fields[0].formatter()),m=l.style(y.style||{})},U.resize=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=D({inner:e,outer:t});h=n?H.size(n):H.size(e),E.rect=Va(!0,{computedPhysical:h.computedPhysical,computedOuter:t.computed||t,computedInner:e.computed||e},e),h=Va(!0,{computedOuter:t.computed||t,computedInner:e.computed||e},h)},U.getRect=()=>E.rect;const Y=()=>{const e=H.renderArgs?H.renderArgs.slice(0):[],{rendererSettings:t}=y;let n=v;const r="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();return v.items&&r&&(n=Wa(Wa({},v),{},{items:v.items.slice(r.start,r.end)})),e.push({data:n}),e};let X,G,K;function Z(e){const{rendererSettings:t}=y,n="function"==typeof(null==t?void 0:t.progressive)&&t.progressive();n?n.isFirst?w.nodes=[...e||[]]:w.nodes&&(w.nodes=[...w.nodes,...e||[]]):w.nodes=e}U.beforeMount=_,U.beforeRender=()=>{L({size:h})},U.render=()=>{const e=z.call(k,...Y());Z(e),H.render(e),X=e,G=E.rect.computed},U.hide=()=>{U.unmount(),H.size({x:0,y:0,width:0,height:0}),H.clear()},U.beforeUpdate=()=>{O({settings:y,data:v})},U.update=()=>{K&&K.stop();const{rendererSettings:e,brush:t,animations:n}=y;if("function"==typeof(null==e?void 0:e.transform)&&e.transform())return H.render(),void(X=null);const r=z.call(k,...Y());Z(r),M.forEach(e=>e.cleanUp()),M.length=0,S.tap=[],S.over=[],t&&(F(),j()),M.forEach(e=>{e.isActive()&&e.update()}),X&&n&&("function"==typeof n.enabled?n.enabled():n.enabled)?(n.compensateForLayoutChanges&&n.compensateForLayoutChanges({currentNodes:X,currentRect:E.rect.computed,previousRect:G}),K=function(e,t,n,r){let i,{old:o,current:a}=e,{renderer:s}=t,l=[],c={nodes:[],ips:[]},u={nodes:[],ips:[]},d={nodes:[],ips:[]},f=[],p=null;const h=n.trackBy||sp,m={start(){let e={};if(o.forEach((t,n)=>{let r=h(t,n);e[r]=t}),a.forEach((t,n)=>{let r=h(t,n);if(e[r]){if("path"===t.type&&t.points&&t.points.length>0&&"trend"!==t.data.source.key){const n=function(e,t){const n=e.points.filter(e=>!e.dummy),r=t.points.filter(e=>!e.dummy),i=r.map(e=>e.data.major.value),o=n.filter(e=>i.includes(e.data.major.value)).map(e=>e.data.major.value),a=n.filter(e=>o.includes(e.data.major.value)),s=r.filter(e=>o.includes(e.data.major.value));return{old:a,current:s}}(e[r],t);d.ips.push(ap(Va({},e[r],{points:n.old}),Va({},t,{points:n.current}))),l.push(Va({},e[r],{commonPoints:n.old}))}else d.ips.push(ap(e[r],t)),l.push(e[r]);d.nodes.push(t),e[r]=!1}else c.nodes.push(t),c.ips.push(ap(Va({},t,{r:.001,opacity:0}),t))}),Object.keys(e).forEach(t=>{e[t]&&(u.nodes.push(e[t]),u.ips.push(ap(e[t],Va({},e[t],{r:1e-4,opacity:0}))))}),f.push({name:"exiting",easing:ep,duration:200,tweens:u.ips,nodes:[...l]}),f.push({name:"updating",easing:np,duration:400,tweens:d.ips,nodes:[]}),f.push({name:"entering",easing:tp,duration:200,tweens:c.ips,nodes:[...d.nodes]}),n.isMainComponent){var t;const e=null===(t=n.isMainComponent)||void 0===t?void 0:t.filterFn,i=e?l.filter(e).length:l.length,{isInit:o,shouldBeRemoved:a}=r.getValue("animations.updatingStageMeta");!1===o?(r.setValue("animations.updatingStageMeta.shouldBeRemoved",0===i),r.setValue("animations.updatingStageMeta.isInit",!0)):r.setValue("animations.updatingStageMeta.shouldBeRemoved",a&&0===i)}f.length&&(p=s.getScene(a),f[0].started=Date.now(),"undefined"!=typeof window&&(i=window.requestAnimationFrame(m.tick)))},tick(){let e=f[0];e||m.stop(),e.started||(e.started=Date.now());let t=(Date.now()-e.started)/e.duration,o=[],a=e.tweens.map(n=>n(e.easing(Math.min(1,t))));const{adjustTweenedNodes:l}=n;if(l&&l(a),o.push(...a),o.push(...e.nodes),s.render(o),t>=1){f.shift();const{isInit:e,shouldBeRemoved:t}=r.getValue("animations.updatingStageMeta");f.length?"updating"===f[0].name&&t&&f.shift():(!0===e&&r.setValue("animations.updatingStageMeta.isInit",!1),m.stop())}i&&(i=window.requestAnimationFrame(m.tick))},stop(){i&&(window.cancelAnimationFrame(i),i=!1)},inProgress:()=>!!i,get targetScene(){return p}};return m}({old:X,current:r},{renderer:H},n,i.storage),K.start()):H.render(r),X=r,G=E.rect.computed,H.setKey&&"string"==typeof g.key&&H.setKey(g.key)},U.updated=I,U.destroy=()=>{U.unmount(),P(p),H.destroy(),R(),p=null};const J=e=>{w.nodes=e,M.forEach(e=>{e.isActive()&&e.update()}),H.render(e)};return Fp(k,e,{settings:()=>y,data:()=>v,scale:()=>d,formatter:()=>f,renderer:()=>H,chart:()=>i,dockConfig:()=>$,mediator:()=>a,instance:()=>E,rect:()=>E.rect,style:()=>m,update:()=>J,registries:()=>s,resolver:()=>b,symbol:()=>Rp(s.symbol)}),Fp(E,g,{settings:()=>y,data:()=>v,scale:()=>d,formatter:()=>f,renderer:()=>H,chart:()=>i,dockConfig:()=>$,mediator:()=>a,style:()=>m,_DO_NOT_USE_getInfo:r.bind(k),isVisible:()=>x}),U.getBrushedShapes=function(e,t,n){const r=[];if(y.brush&&y.brush.consume){const o=i.brush(e),a=H.findShapes("*");y.brush.consume.filter(t=>t.context===e).forEach(e=>{for(let i=0;i<a.length;i++){const s=a[i];s.data&&o.containsMappedData(s.data,n||e.data,t)&&(W(s),r.push(s),a.splice(i,1),i--)}})}return r},U.findShapes=e=>{var t;const n=(null!==(t=K)&&void 0!==t&&t.inProgress()?K.targetScene:H).findShapes(e);for(let e=0,t=n.length;e<t;e++)W(n[e]);return n},U.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=H.itemsAt(e);let r;r=t&&"stop"===t.propagation&&n.length>0?[n.pop().node]:n.map(e=>e.node);for(let e=0,t=r.length;e<t;e++)W(r[e]);return r},U.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.contexts=Array.isArray(t.contexts)?t.contexts:[];gp({nodes:e,action:t.action||"toggle",trigger:t,chart:i,data:w.data})},U.mount=()=>{p=H.element&&H.element()?p:H.appendTo(o),H.setKey&&"string"==typeof g.key&&H.setKey(g.key),y.brush&&(F(),j()),Vp(E,u,g),Vp(k,u,e),x=!0},U.mounted=()=>T(p),U.unmount=()=>{[E,k].forEach(e=>{!function(e,t){e.eventListeners&&(e.eventListeners.forEach(e=>{let{event:n,listener:r}=e;t.removeListener(n,r)}),e.eventListeners.length=0),e.emit=()=>{}}(e,u)}),S.tap=[],S.over=[],M.forEach(e=>{e.cleanUp()}),M.length=0,N(),x=!1},U.onBrushTap=e=>{S.tap.forEach(t=>{(function(e){let{e:t,t:n,config:r}=e;return yp({collisions:vp(t,n,r.renderer),t:n,config:r,action:bp(n.action,t,"toggle")})})({e:e,t:t,config:w})&&"stop"===t.globalPropagation&&i.toggleBrushing(!0)})},U.onBrushOver=e=>{S.over.forEach(t=>{(function(e){let{e:t,t:n,config:r}=e;return yp({collisions:vp(t,n,r.renderer),t:n,config:r,action:bp(n.action,t,"set")})})({e:e,t:t,config:w})&&"stop"===t.globalPropagation&&i.toggleBrushing(!0)})},U.def=k,U.ctx=E,U.renderer=()=>H,U.set({settings:g}),q(),U}function Bp(e){const t=Va(!0,{},e),n={getAll:()=>t,getValue:(e,n)=>function(e,t,n){if(void 0===e||void 0===t)return n;const r=t.split(".");let i=e;for(let e=0;e<r.length;++e){const t=r[e];if(void 0===i[t])return n;i=i[t]}return i}(t,e,n),setValue:(e,n)=>function(e,t,n){if(void 0===e||void 0===t)return;const r=t.split("."),i=r[r.length-1];let o=e;for(let e=0;e<r.length-1;++e){const t=r[e];void 0===o[t]&&(o[t]=Number.isNaN(+r[e+1])?{}:[]),o=o[t]}void 0!==n?o[i]=n:delete o[i]}(t,e,n)};return n}function $p(e,t,n){const r=Ep(function(e,t){const n=Np(e,t)/Np(t,t)||1;return{x:t.x*n,y:t.y*n}}(Cp(n,e),Cp(t,e)),e);return r}function Wp(e,t,n){return Tp(e,n)+Tp(t,n)-Tp(e,t)<1e-12}function Up(e,t){return e.x>=t.x&&e.x+e.width<=t.x+t.width&&e.y>=t.y&&e.y+e.height<=t.y+t.height}function Yp(e){return e.x1===e.x2&&e.y1===e.y2}function Xp(e){return e.width<=0||e.height<=0}function Gp(e){return e.r<=0}function Kp(e){return e.edges.length<=2}function Zp(e,t){let n=!1;for(let r=0,i=t.edges.length;r<i;r++)if(n=ih(e,Qa(t.edges[r])),!0===n)return!0;return!1}function Jp(e,t){let n=!1;const{numPolygons:r,polygons:i}=t;for(let t=0;t<r;t++){if(n=ph(e,i[t]),!0===n)return!0}return!1}function Qp(e,t){if(Gp(e))return!1;return _p({x:e.cx,y:e.cy},t)<=e.r**2}function eh(e,t){if(Xp(t)||Gp(e))return!1;const n=t.width/2,r=t.height/2,i=t.x+n,o=t.y+r,a=e.r,s=e.cx,l=e.cy,c=Math.abs(s-i),u=Math.abs(l-o);if(c>n+a||u>r+a)return!1;if(c<=n||u<=r)return!0;return(c-n)**2+(u-r)**2<=a**2}function th(e,t){if(Gp(e)||Yp(t))return!1;const[n,r]=Ka(t);if(Qp(e,n)||Qp(e,r))return!0;const i={x:e.cx,y:e.cy},o=$p(n,r,i);return _p(o,i)<=e.r**2&&Wp(n,r,o)}function nh(e,t){if(Kp(t)||Gp(e))return!1;if(rh(t,{x:e.cx,y:e.cy}))return!0;const n=t.edges.length;for(let r=0;r<n;r++){if(th(e,Qa(t.edges[r])))return!0}return!1}function rh(e,t){if(Kp(e)||!lh(e.boundingRect(),t))return!1;const{x:n,y:r}=t,i=e.vertices;let o,a,s,l,c;for(o=!1,l=-1,a=i.length,s=a-1;++l<a;s=l){if(i[l].x===n&&i[l].y===r)return!0;if(i[l].y===i[s].y&&i[l].y===r&&(n-i[l].x)*(n-i[s].x)<=0)return!0;if(i[l].y<r&&r<=i[s].y||i[s].y<r&&r<=i[l].y){if(c=(i[s].x-i[l].x)*(r-i[l].y)/(i[s].y-i[l].y)+i[l].x,n===c)return!0;n<c&&(o=!o)}}return o}function ih(e,t){if(Kp(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(uh(t,Qa(e.edges[n])))return!0}const[n,r]=Ka(t);return rh(e,n)||rh(e,r)}function oh(e,t){if(Kp(e))return!1;for(let n=0,r=e.edges.length;n<r;n++){if(ch(t,Qa(e.edges[n])))return!0}const[n,r,i,o]=Za(t);return rh(e,n)||rh(e,r)||rh(e,i)||rh(e,o)}function ah(e,t){return!Xp(e)&&!Xp(t)&&(e.x<=t.x+t.width&&t.x<=e.x+e.width&&e.y<=t.y+t.height&&t.y<=e.y+e.height)}function sh(e,t){if(Xp(e)||Xp(t))return!1;return[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}].every(t=>lh(e,t))}function lh(e,t){return!Xp(e)&&(t.x>=e.x&&t.x<=e.x+e.width&&t.y>=e.y&&t.y<=e.y+e.height)}function ch(e,t){if(Yp(t)||Xp(e))return!1;const[n,r]=Ka(t);if(lh(e,n)||lh(e,r))return!0;const i=Za(e);let o=i.length;for(let e=0;e<o;e++){if(uh(Qa([i[e],i[3!==e?e+1:0]]),t))return!0}return!1}function uh(e,t){const[n,r]=Ka(e),[i,o]=Ka(t),a=Dp(r,n),s=qp(r,n),l=Dp(o,i),c=qp(o,i),u=Dp(n,i),d=qp(n,i);let f=c*a-l*s;const p=l*d-c*u,h=a*d-s*u;let m,g;if(0===a&&0===s)return!1;if(0===l&&0===c)return!1;if(0===f){if(0===p&&0===h){if(0===a){if(0===s)return n.x===r.x&&n.y===r.y;m=qp(i,n)/s,g=qp(o,n)/s}else m=(i.x-n.x)/a,g=(o.x-n.x)/a;return!(m<0&&g<0||m>1&&g>1)}return!1}const y=p/f;return f=h/f,y>=0&&y<=1&&f>=0&&f<=1}function dh(e,t){if(Yp(e))return!1;const[n,r]=Ka(e);return Wp(n,r,t)}function fh(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!ah(n,r)&&(sh(n,r)?Zp(e,t):Zp(t,e))}function ph(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!ah(n,r)&&(sh(r,n)?function(e,t){let n=!1;const{numPolygons:r,polygons:i}=e;for(let e=0;e<r;e++)if(n=fh(t,i[e]),!0===n)return!0;return!1}(e,t):function(e,t){let n=!1;for(let r=0,i=t.edges.length;r<i;r++)if(n=gh(e,Qa(t.edges[r])),!0===n)return!0;return!1}(e,t))}function hh(e,t){if(Gp(e))return!1;if(mh(t,{x:e.cx,y:e.cy}))return!0;const{numPolygons:n,polygons:r}=t;for(let t=0;t<n;t++){const n=r[t],i=n.edges.length;for(let t=0;t<i;t++){if(th(e,Qa(n.edges[t])))return!0}}return!1}function mh(e,t){if(!lh(e.boundingRect(),t))return!1;const{x:n,y:r}=t,i=e.numPolygons;let o,a,s,l,c,u,d=!1;for(a=0;a<i;a++)for(o=e.vertices[a],c=-1,s=o.length,l=s-1;++c<s;l=c){if(o[c].x===n&&o[c].y===r)return!0;if(o[c].y===o[l].y&&o[c].y===r&&(n-o[c].x)*(n-o[l].x)<=0)return!0;if(o[c].y<r&&r<=o[l].y||o[l].y<r&&r<=o[c].y){if(u=(o[l].x-o[c].x)*(r-o[c].y)/(o[l].y-o[c].y)+o[c].x,n===u)return!0;n<u&&(d=!d)}}return d}function gh(e,t){const[n,r]=Ka(t);if(mh(e,n)||mh(e,r))return!0;const{numPolygons:i,polygons:o}=e;for(let e=0;e<i;e++){const n=o[e];for(let e=0,r=n.edges.length;e<r;e++){if(uh(t,Qa(n.edges[e])))return!0}}return!1}function yh(e,t){const[n,r,i,o]=Za(t);if(mh(e,n)||mh(e,r)||mh(e,i)||mh(e,o))return!0;const{numPolygons:a,polygons:s}=e;for(let e=0;e<a;e++){const n=s[e];for(let e=0,r=n.edges.length;e<r;e++){if(ch(t,Qa(n.edges[e])))return!0}}return!1}const vh=/^\$/,bh="@extend";function xh(e){throw new Error('Cyclical reference for "'.concat(e,'"'))}function wh(e,t,n){if("string"==typeof e){let r=t[e];return-1!==n.indexOf(e)&&xh(e),vh.test(r)?(n.push(e),wh(r,t,n)):r}let r=e;const i=Va(!0,{},t,e),o={};if(e[bh]){const o=e[bh];-1!==n.indexOf(o)&&xh(o);let a=n.slice();a.push(o),r=Va(!0,{},wh(i[o],t,a),e)}return Object.keys(r).forEach(e=>{let t=n.slice();if(e===bh||vh.test(e))return;o[e]=r[e];let a=o[e];vh.test(a)&&a in i?(-1!==n.indexOf(a)&&xh(a),t.push(a),a=i[a],"object"==typeof a||vh.test(a)&&a in i?o[e]=wh(a,i,t):o[e]=a):"object"==typeof a&&(o[e]=wh(a,i,t))}),o}function Sh(e,t){return wh(e,t,[])}function Mh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={},n=e;const r=e=>{e.forEach(e=>{const n=Array.isArray(e.colors[0])?e.colors:[e.colors];t[e.key]={colors:n,sizes:n.map(e=>e?e.length:0)}})},i={palette:(e,n)=>((e,n)=>{const r=t[e];if(!r)return[];const i=r.sizes;for(let e=0;e<i.length;e++)if(n<=i[e])return r.colors[e];return r.colors[i.length-1]})(e,n),setPalettes:r,style:e=>Sh(e,n),setStyle:t=>{n=Va({},e,t)}};return r(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]),i}function kh(e){e.x=Math.floor(e.x),e.y=Math.floor(e.y),e.width=Math.floor(e.width),e.height=Math.floor(e.height)}function Eh(e){const t={center:{minWidthRatio:.5,minHeightRatio:.5,minWidth:0,minHeight:0}};return Va(!0,t,e),t.center.minWidthRatio=Math.min(Math.max(t.center.minWidthRatio,0),1),t.center.minHeightRatio=Math.min(Math.max(t.center.minHeightRatio,0),1),t.center.minWidth=Math.max(t.center.minWidth,0),t.center.minHeight=Math.max(t.center.minHeight,0),t}function Ch(e,t,n,r,i){return{x:isNaN(e)?0:e,y:isNaN(e)?0:t,width:isNaN(e)?0:n,height:isNaN(e)?0:r,margin:isNaN(i)?0:i}}function Ah(e,t,n){if(void 0===e.cachedSize){const r=e.config.dock();let i,o=e.comp.preferredSize({inner:t,outer:n,dock:r});isNaN(o)?o&&!isNaN(o.size)&&(o.width=o.size,o.height=o.size):o={width:o,height:o},i="top"===r||"bottom"===r?o.height:"right"===r||"left"===r?o.width:Math.max(o.width,o.height),e.cachedSize=Math.ceil(i),e.edgeBleed=o.edgeBleed||0}return e.cachedSize}function Dh(e,t){switch(t.config.dock()){case"top":e.y+=t.cachedSize,e.height-=t.cachedSize;break;case"bottom":e.height-=t.cachedSize;break;case"left":e.x+=t.cachedSize,e.width-=t.cachedSize;break;case"right":e.width-=t.cachedSize}}function qh(e,t){const n=t.edgeBleed;n&&(e.left=Math.max(e.left,n.left||0),e.right=Math.max(e.right,n.right||0),e.top=Math.max(e.top,n.top||0),e.bottom=Math.max(e.bottom,n.bottom||0))}function _h(e,t,n){t.x<n.left&&(t.width-=n.left-t.x,t.x=n.left);const r=e.width-(t.x+t.width);r<n.right&&(t.width-=n.right-r),t.y<n.top&&(t.height-=n.top-t.y,t.y=n.top);const i=e.height-(t.y+t.height);i<n.bottom&&(t.height-=n.bottom-i)}function Th(e,t,n,r,i){const o=Va({},t),a=Va({},n);Dh(o,r),qh(a,r),_h(e,o,a);const s=function(e,t,n){const r=Math.min(n.center.minWidth,e.width)||Math.max(e.width*n.center.minWidthRatio,1),i=Math.min(n.center.minHeight,e.height)||Math.max(e.height*n.center.minHeightRatio,1);return t.width>=r&&t.height>=i}(e,o,i);return!!s&&(Dh(t,r),qh(n,r),!0)}function Nh(e){return{x:e.margin.left+e.x*e.scaleRatio.x,y:e.margin.top+e.y*e.scaleRatio.y,width:e.width*e.scaleRatio.x,height:e.height*e.scaleRatio.y}}function Oh(e){return Ja([].concat(...e.map(Za)))}function Ih(e){let{visible:t,layoutRect:n,reducedRect:r,containerRect:i,translation:o}=e;const a=Ch(r.x,r.y,r.width,r.height),s=Ch(r.x,r.y,r.width,r.height),l={},c=t.slice(),u=c.slice().sort((e,t)=>e.config.displayOrder()-t.config.displayOrder());return t.sort((e,t)=>{if(e.referencedDocks.length>0&&t.referencedDocks.length>0)return 0;if(t.referencedDocks.length>0)return-1;if(e.referencedDocks.length>0)return 1;const n=e.config.displayOrder()-t.config.displayOrder();return 0===n?c.indexOf(e)-c.indexOf(t):n}).forEach(e=>{let t={},c={};switch(e.config.dock()){case"top":t.height=c.height=e.cachedSize,t.width=n.width,c.width=a.width,t.x=n.x,c.x=a.x,t.y=c.y=a.y-e.cachedSize,a.y-=e.cachedSize,a.height+=e.cachedSize;break;case"bottom":t.x=n.x,c.x=a.x,t.y=c.y=a.y+a.height,t.width=n.width,c.width=a.width,t.height=c.height=e.cachedSize,a.height+=e.cachedSize;break;case"left":t.x=c.x=s.x-e.cachedSize,t.y=n.y,c.y=s.y,t.width=c.width=e.cachedSize,t.height=n.height,c.height=s.height,s.x-=e.cachedSize,s.width+=e.cachedSize;break;case"right":t.x=c.x=s.x+s.width,t.y=n.y,c.y=s.y,t.width=c.width=e.cachedSize,t.height=n.height,c.height=s.height,s.width+=e.cachedSize;break;case"center":t.x=c.x=r.x,t.y=c.y=r.y,t.width=c.width=r.width,t.height=c.height=r.height;break;default:if(e.referencedDocks.length>0){const n=e.referencedDocks.map(e=>l[e]).filter(e=>!!e);n.length>0&&(t=Oh(n.map(e=>e.outerRect)),c=Oh(n.map(e=>e.r)))}}e.key&&(l[e.key]={r:c,outerRect:t}),function(e,t,n,r){const i={x:r.width/n.width,y:r.height/n.height},o={left:0,top:0};if(n.preserveAspectRatio){const e=i.x<i.y,t=Math.min(i.x,i.y);i.x=t,i.y=t;const a=e?"height":"width",s=(r[a]-n[a]*i.x)*n.align;o.left=e?0:s,o.top=e?s:0}e.scaleRatio=i,e.margin=o,t.scaleRatio=i,t.margin=o,n.scaleRatio=i,n.margin=o}(c,t,n,i),c.edgeBleed=e.edgeBleed,c.computed=Nh(c),t.edgeBleed=e.edgeBleed,t.computed=Nh(t),c.x+=o.x,c.y+=o.y,t.x+=o.x,t.y+=o.y,e.comp.resize(c,t),e.cachedSize=void 0,e.edgeBleed=void 0}),u}function Lh(e,t,n){const r=e.layoutModes||{},i=t.minimumLayoutMode();let o=t.show();return o&&"object"==typeof i?o=r[i.width]&&r[i.height]&&n.width>=r[i.width].width&&n.height>=r[i.height].height:o&&void 0!==i&&(o=r[i]&&n.width>=r[i].width&&n.height>=r[i].height),o}function Ph(e){if(!e.resize||"function"!=typeof e.resize)throw new Error("Component is missing resize function");if(!e.dockConfig&&!e.preferredSize)throw new Error("Component is missing preferredSize function")}function Rh(e){let t=Eh(e);const n={};return n.layout=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e||isNaN(e.x)||isNaN(e.y)||isNaN(e.width)||isNaN(e.height))throw new Error("Invalid rect");if(!n.length)return{visible:[],hidden:[],ordered:[]};const{logicalContainerRect:r,containerRect:i}=function(e,t){const n={x:0,y:0,width:0,height:0},r={x:0,y:0,width:0,height:0};return n.width=e.width||0,n.height=e.height||0,void 0!==t.size&&(n.width=isNaN(t.size.width)?n.width:t.size.width,n.height=isNaN(t.size.height)?n.height:t.size.height),void 0!==t.logicalSize?(r.width=isNaN(t.logicalSize.width)?n.width:t.logicalSize.width,r.height=isNaN(t.logicalSize.height)?n.height:t.logicalSize.height,r.align=isNaN(t.logicalSize.align)?.5:Math.min(Math.max(t.logicalSize.align,0),1),r.preserveAspectRatio=t.logicalSize.preserveAspectRatio):(r.width=n.width,r.height=n.height,r.preserveAspectRatio=!1),kh(r),kh(n),{logicalContainerRect:r,containerRect:n}}(e,t),[o,a]=function(e,t,n){const r=[],i=[];for(let o=0;o<e.length;++o){const a=e[o];Ph(a);let s=a.dockConfig;const l=a.key,c=s.dock(),u=/@/.test(c)?c.split(",").map(e=>e.replace(/^\s*@/,"")):[];Lh(t,s,n)?r.push({comp:a,key:l,config:s,referencedDocks:u}):i.push({comp:a,key:l,config:s,referencedDocks:u})}return[r,i]}(n,t,r),s=function(e){let{layoutRect:t,visible:n,hidden:r,settings:i}=e;const o=Ch(t.x,t.y,t.width,t.height),a={left:0,right:0,top:0,bottom:0},s=n.slice();s.sort((e,t)=>e.config.prioOrder()-t.config.prioOrder());for(let e=0;e<s.length;++e){const n=s[e];Ah(n,o,t),Th(t,o,a,n,i)||(r.push(s.splice(e,1)[0]),--e)}!function(e,t){if(0!==t.length)for(let n=0;n<e.length;++n){let r=e[n];if(r.referencedDocks.length){const i=r.referencedDocks.every(e=>t.some(t=>t.key===e));i&&t.push(e.splice(n,1)[0])}}}(n,r);const l=n.filter(e=>-1!==s.indexOf(e));return n.length=0,n.push(...l),_h(t,o,a),o}({layoutRect:r,visible:o,hidden:a,settings:t}),l=Ih({visible:o,layoutRect:r,reducedRect:s,containerRect:i,translation:{x:e.x,y:e.y}});return a.forEach(e=>{e.comp.visible=!1;const t=Ch();e.comp.resize(t,t)}),{visible:o.map(e=>e.comp),hidden:a.map(e=>e.comp),ordered:l.map(e=>e.comp)}},n.settings=function(e){t=Eh(e)},n}const zh=(e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];if(r.hasKey&&r.key===t)return e[n]}return null},Fh=e=>null==e?void 0:e.map(e=>{const t=e.instance.dockConfig();return{preferredSize:n=>t.computePreferredSize(Wa(Wa({},n),{},{children:Fh(e.children)}))}}),jh=(e,t)=>({visible:[],hidden:t,ordered:[]}),Vh=e=>(t,n)=>{var r;const i=n.map((e,t)=>{const n=e.instance.dockConfig();return{index:t,key:e.key,dockConfig:n,resize:e.instance.resize,preferredSize:t=>n.computePreferredSize(Wa(Wa({},t),{},{children:Fh(e.children)}))}}),o=e=>n[e.index],{visible:a=i,hidden:s=[],ordered:l=a}=null!==(r=e(t,i))&&void 0!==r?r:{};return{visible:a.map(o),hidden:s.map(o),ordered:l.map(o)}},Hh=e=>"function"==typeof e?Vh(e):(e=>{const t=Rh(e);return Vh((e,n)=>t.layout(e,n))})(e);function Bh(e,t,n){const r=t.left-n.left,i=t.top-n.top,o=es(e),a=Va(!0,{},e);switch(o){case"circle":a.cx+=r,a.cy+=i;break;case"polygon":for(let e=0,t=a.vertices.length;e<t;e++){const t=a.vertices[e];t.x+=r,t.y+=i}break;case"geopolygon":for(let e=0;e<a.vertices.length;e++){const t=a.vertices[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n.x+=r,n.y+=i}}break;case"line":a.x1+=r,a.y1+=i,a.x2+=r,a.y2+=i;break;case"point":case"rect":a.x+=r,a.y+=i}return a}function $h(e,t){const n=[];let r=0;t.forEach(e=>{n.push(r),r++;const t=e.instance.def.additionalElements&&e.instance.def.additionalElements();t&&(r+=t.length)}),t.forEach((t,r)=>((e,t,n)=>{const r=t.instance.renderer().element();if(isNaN(n)||!r||!e||!e.children)return;const i=e.children[Math.max(0,n)];if(r===i)return;const o=t.instance.def.additionalElements&&t.instance.def.additionalElements().filter(Boolean);e.insertBefore&&void 0!==i?(e.insertBefore(r,i),o&&o.forEach(t=>{e.insertBefore(t,r)})):(o&&o.forEach(t=>{e.appendChild(t,r)}),e.appendChild(r))})(e,t,n[r]))}function Wh(e,t){let{element:n,data:r=[],settings:i={},on:o={}}=e;const a=t.registries,s=t.logger,l=Mh(t.style,t.palettes),c=[],u=Va({},e),d=function(){const e={};return Lf.mixin(e),e}();let f=[],p=null,h=null,m=null,g=[],y=()=>{},v=()=>{};const b={};let x=!1;const w=function(e){let{createComponent:t}=e;const n={};let r=[],i=[];const o=e=>{const n=t(e);return n&&(r.push(n),e.components&&(n.children=e.components.map(e=>o(e)).filter(e=>!!e))),n},a=e=>{const t=r.indexOf(e);-1!==t&&r.splice(t,1)},s=(e,t)=>{for(let n=e.length-1;n>=0;n--){const r=e[n],i=t.find(e=>r.hasKey&&r.key===e.key);i?r.children&&i.components&&s(r.children,i.components):(e.splice(n,1),a(r),r.children&&s(r.children,[]),r.instance.destroy())}},l=e=>{let{compList:t,data:n,excludeFromUpdate:r,formatters:i,scales:a,settingsList:s}=e;return s.map(e=>{const s=zh(t,e.key);return r.indexOf(e.key)>-1?(delete s.updateWith,s):s?(e.rendererSettings&&"function"==typeof s.instance.renderer().settings&&s.instance.renderer().settings(e.rendererSettings),e.rendererSettings&&"function"==typeof e.rendererSettings.transform&&e.rendererSettings.transform()?(s.applyTransform=!0,s):(s.updateWith={formatters:i,scales:a,data:n,settings:e},e.components&&(s.children=l({compList:s.children||[],data:n,excludeFromUpdate:r,formatters:i,scales:a,settingsList:e.components})),s)):o(e)}).filter(e=>!!e)},c=e=>{let{components:t,hidden:n,layoutFn:r,ordered:i,rect:o,visible:a}=e;const{visible:s,hidden:l,ordered:u}=r(o,t);a.push(...s),n.push(...l),i.push(...u),s.forEach(e=>{if(e.children){var t,r;const o=Hh(null!==(t=null===(r=e.settings)||void 0===r?void 0:r.strategy)&&void 0!==t?t:{});c({components:e.children,hidden:n,layoutFn:o,ordered:i,rect:e.instance.getRect(),visible:a})}}),l.forEach(e=>{e.children&&c({components:e.children,hidden:n,layoutFn:jh,ordered:i,rect:null,visible:a})})};return n.destroy=()=>{r.forEach(e=>e.instance.destroy()),r=[],i=[]},n.findComponentByKey=e=>zh(r,e),n.forEach=e=>{r.forEach(e)},n.layout=e=>{let{layoutSettings:t,rect:n}=e;const r=[],o=[],a=[],s=Hh(t);return c({components:i,hidden:o,layoutFn:s,ordered:a,rect:n,visible:r}),{visible:r,hidden:o,ordered:a}},n.set=e=>{let{components:t}=e;i=t.map(e=>o(e)).filter(e=>!!e)},n.update=e=>{let{components:t,data:n,excludeFromUpdate:r,formatters:o,scales:a}=e;s(i,t),i=l({compList:i,data:n,excludeFromUpdate:r,formatters:o,scales:a,settingsList:t})},n}({createComponent:e=>{if(!a.component.has(e.type))return s.warn("Unknown component: ".concat(e.type)),!1;return{instance:Hp(a.component(e.type),{settings:e,chart:u,mediator:d,registries:a,theme:l,container:n}),settings:Va(!0,{},e),key:e.key,hasKey:void 0!==e.key}}});function S(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};return function(){const r="function"==typeof e[t];let i;for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];return i=r?e[t].call(u,...a):n.call(u,...a),i}}const M=()=>{let e;i.dockLayout?(s.warn('Deprecation Warning: "dockLayout" property should be renamed to "strategy"'),e=i.dockLayout):e=i.strategy;const t=function(e){if("function"==typeof e.getBoundingClientRect){const{width:t,height:n}=e.getBoundingClientRect();return{x:0,y:0,width:t,height:n}}return{x:0,y:0,width:0,height:0}}(n);return w.layout({layoutSettings:e,rect:t})},k=S("created"),E=S("beforeMount"),C=S("mounted"),A=S("beforeUpdate"),D=S("updated"),q=S("beforeRender"),_=S("beforeDestroy"),T=S("destroyed"),N=function(e,t){let{partialData:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{formatters:r={},scales:i={},scroll:o={}}=t;y=function(e,t){let{types:n,logger:r}=t;const i={},o=[];return Array.isArray(e)?o.push(...e):(r.warn('Deprecated: "data-source" configuration"'),o.push(e)),o.forEach((e,t)=>{let o=n(e.type);if(o){let n=e.key;void 0===e.key&&(r.warn("Missing key for dataset. Using index '".concat(t,"' as key.")),n=t);let a=o({key:n,data:e.data,config:e.config});i[n]=a}}),e=>e?i[e]:i[Object.keys(i)[0]]}(e,{logger:s,types:a.data}),n||Object.keys(b).forEach(e=>b[e].clear()),t.palettes&&l.setPalettes(t.palettes),t.style&&l.setStyle(t.style),v=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:$u;const i={};return(e||[]).forEach(e=>{if(!e.key)throw new Error('Data collection is missing "key" property');if("object"==typeof e.data&&"collection"in e.data)throw new Error("Data config for collections may not reference other collections");i[e.key]=()=>r(e.data,t,n)}),e=>{let t,n;if("string"==typeof e?t=e:"object"==typeof e&&(t=e.key,n=e),!(t in i))throw new Error("Unknown data collection: ".concat(t));"function"==typeof i[t]&&(i[t]=i[t]());let r=i[t];if(n&&n.fields&&n.fields.filter){let e=r.fields.filter(n.fields.filter);r.fields.length!==e.length&&(r=Va(r,{fields:e}))}return r}}(t.collections,{dataset:y},{logger:s});const c={theme:l,logger:s};p=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Tf;const i={};return{get(o){let a;return"string"==typeof o&&e[o]?a=o:"object"==typeof o&&"scale"in o&&e[o.scale]&&(a=o.scale),a?(i[a]=i[a]||r(e[a],t,n),i[a]):r(o,t,n)},all(){return Object.keys(e).forEach(this.get),i}}}(i,{dataset:y,collection:v},Wa(Wa({},c),{},{scale:a.scale})),h=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Wu;const i={};return{get(o){let a;return"string"==typeof o&&e[o]?a=o:"object"==typeof o&&"formatter"in o&&e[o.formatter]?a=o.formatter:"object"==typeof o&&"type"in o&&e[o.type]&&(a=o.type),a?(i[a]=i[a]||r(e[a],t,n),i[a]):r(o||{},t,n)},all(){return Object.keys(e).forEach(this.get),i}}}(r,{dataset:y,collection:v},Wa(Wa({},c),{},{formatter:a.formatter})),m=function(e,t){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Rf(e[r],t?t[r]:null));return n}(o,m)};function O(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t={},r=e.filter(e=>!!e.key).map(e=>e.key);g.forEach(e=>{e.key&&-1!==r.indexOf(e.key)?t[e.key]=e:e.destroy()}),g=e.map(e=>{const r=e.key&&t[e.key]?t[e.key]:a.interaction(e.type)(u,d,n);return r.set(e),r})}const I=e=>{const t=n.getBoundingClientRect(),r="clientX"in e?e.clientX:e.x,i="clientY"in e?e.clientY:e.y,o={x:r-t.left,y:i-t.top},a=[];return f.forEach(e=>{const t=e.instance.getRect();lh(t.computedPhysical?t.computedPhysical:{x:t.margin.left+t.x*t.scaleRatio.x,y:t.margin.top+t.y*t.scaleRatio.y,width:t.width*t.scaleRatio.x,height:t.height*t.scaleRatio.y},o)&&a.push(e)}),a},L=()=>{if(c.length||!n)return;Object.keys(o).forEach(e=>{const t=o[e].bind(u);n.addEventListener(e,t),c.push({key:e,listener:t})});const e={},t=t=>{t.touches?(e.x=t.touches[0].clientX,e.y=t.touches[0].clientY,e.multiTouch=t.touches.length>1):(e.x=t.clientX,e.y=t.clientY,e.multiTouch=!1),e.time=Date.now(),e.comps=I(e)},r=t=>{const n=e.comps||I(t);if(!n.every(e=>e.instance.def.disableTriggers)&&("touchend"===t.type&&t.preventDefault(),function(e,t){const n=Ua(e),r=n?e.changedTouches[0]:e,i=Date.now()-t.time,o=isNaN(t.x)?0:Math.abs(r.clientX-t.x),a=isNaN(t.y)?0:Math.abs(r.clientY-t.y);return(0===e.button||n)&&!t.multiTouch&&o<=12&&a<=12&&i<=300}(t,e)))for(let e=n.length-1;e>=0;e--){if(n[e].instance.onBrushTap(t),x){x=!1;break}}},i=[];i.push({key:"mousedown",listener:t}),i.push({key:"mouseup",listener:r}),function(e){return"ontouchstart"in e&&"ontouchend"in e||navigator.maxTouchPoints>1}(n)&&(i.push({key:"touchstart",listener:t}),i.push({key:"touchend",listener:r})),i.push({key:"mousemove",listener:e=>{const t=I(e);for(let n=t.length-1;n>=0;n--){if(t[n].instance.onBrushOver(e),x){x=!1;break}}}}),i.forEach(e=>{n.addEventListener(e.key,e.listener),c.push(e)})},P=()=>{c.forEach(e=>{let{key:t,listener:r}=e;return n.removeEventListener(t,r)}),c.length=0},R=()=>{n.innerHTML="",(()=>{const{components:e=[]}=i;q(),N(r,i),w.set({components:e});const{visible:t,hidden:o,ordered:a}=M();f=t,o.forEach(e=>{e.instance.hide(),e.visible=!1}),t.forEach(e=>e.instance.beforeMount()),t.forEach(e=>e.instance.mount()),t.forEach(e=>e.instance.beforeRender()),t.forEach(e=>e.instance.render()),t.forEach(e=>e.instance.mounted()),t.forEach(e=>{e.visible=!0}),$h(n,a)})(),L(),O(i.interactions)};return u.layoutComponents=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{excludeFromUpdate:t=[]}=e;e.data&&(r=e.data),e.settings&&(i=e.settings,O(e.settings.interactions)),A(),N(r,i);const{formatters:n,scales:o,components:a=[]}=i;w.update({components:a,data:r,excludeFromUpdate:t,formatters:n,scales:o}),w.forEach(e=>{e.updateWith&&e.instance.set(e.updateWith)}),w.forEach(e=>{e.updateWith&&e.instance.beforeUpdate()}),M()},u.update=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{partialData:t,excludeFromUpdate:o=[]}=e;let a;e.data&&(r=e.data),e.settings&&(i=e.settings,O(e.settings.interactions)),A(),N(r,i,{partialData:t});const{formatters:s,scales:l,components:c=[]}=i;w.update({components:c,data:r,excludeFromUpdate:o,formatters:s,scales:l}),w.forEach(e=>{e.updateWith&&e.instance.set(e.updateWith)}),w.forEach(e=>{e.updateWith&&e.instance.beforeUpdate()});const u=[],d=[];let p;if(t)w.forEach(e=>{(e.updateWith||e.applyTransform)&&e.visible&&u.push(e)}),p=u;else{const{visible:e,hidden:t,ordered:n}=M();f=e,p=e,a=n,e.forEach(e=>{e.updateWith&&e.visible?u.push(e):d.push(e)}),t.forEach(e=>{e.instance.hide(),e.visible=!1,delete e.updateWith,e.applyTransform=!1})}d.forEach(e=>e.instance.beforeMount()),d.forEach(e=>e.instance.mount()),p.forEach(e=>e.instance.beforeRender()),p.forEach(e=>{(e.updateWith||e.applyTransform)&&e.visible?e.instance.update():e.instance.render()}),t||$h(n,a),d.forEach(e=>e.instance.mounted()),u.forEach(e=>e.instance.updated()),f.forEach(e=>{delete e.updateWith,e.visible=!0,e.applyTransform=!1}),D()},u.destroy=()=>{_(),w.destroy(),P(),O(),delete u.update,delete u.destroy,T()},u.getAffectedShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"and",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=[];return f.filter(e=>null==r||e.key===r).forEach(r=>{const o=r.instance.getBrushedShapes(e,t,n);i=[...i,...o]}),i},u.findShapes=e=>{let t=[];return f.forEach(n=>{const r=n.instance.findShapes(e);t=[...t,...r]}),t},u.componentsFromPoint=e=>I(e).map(e=>e.instance.ctx),u.shapesAt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];const i=n.getBoundingClientRect();let o=f;if(Array.isArray(t.components)&&t.components.length>0){const e=t.components.map(e=>e.key);o=f.filter(t=>-1!==e.indexOf(t.key)).map(n=>({instance:n.instance,opts:t.components[e.indexOf(n.key)]}))}for(let n=o.length-1;n>=0;n--){const a=o[n],s=Bh(e,i,a.instance.renderer().element().getBoundingClientRect()),l=a.instance.shapesAt(s,a.opts),c=l.length>0&&"stop"===t.propagation;if(r=[...r,...l],r.length>0&&c)return r}return r},u.brushFromShapes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{components:[]};for(let n=0;n<t.components.length;n++){const r=t.components[n].key;f.filter(e=>r===e.key).forEach(r=>{let i=e.filter(e=>e.key===r.key);r.instance.brushFromShapes(i,t.components[n])})}},u.scroll=function(){return function(e,t){return t[e]||(t[e]=Pf()),t[e]}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",m)},u.dataset=e=>y(e),u.dataCollection=e=>v(e),u.scales=function(){return p.all()},u.formatters=function(){return h.all()},u.brush=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return b[e]||(b[e]=Qf()),b[e]},u.scale=function(e){return p.get(e)},u.formatter=function(e){return h.get(e)},u.toggleBrushing=function(e){x=void 0!==e?e:!x},u.component=e=>{const t=w.findComponentByKey(e);return null==t?void 0:t.instance.ctx},u.logger=()=>s,u.theme=()=>l,u.storage=Bp({animations:{updatingStageMeta:{isInit:!1,shouldBeRemoved:!1}}}),Object.defineProperty(u,"interactions",{get:()=>({instances:g,on(){L(),g.forEach(e=>e.on())},off(){P(),g.forEach(e=>e.off())}})}),k(),n&&(E(),R(),C(n),u.element=n),u}const Uh=e=>{let t=il(e);return t.prio=e=>e?t.default(e[0]):[t.default()],t.types=()=>t.getKeys(),t};var Yh=il();function Xh(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}const Gh=e=>e.filter(e=>"number"==typeof e&&!isNaN(e));const Kh=e=>{let{key:t,data:n,cache:r,config:i}=e;if(!n)return;let o=n;"string"==typeof o&&(o=(e=>{let{data:t,config:n}=e;const r=t.split("\n"),i=r[0],o=r[1];let a=",";if(n&&n.parse&&n.parse.delimiter)a=n.parse.delimiter;else if(i){const e=[/,/,/\t/,/;/];for(let t=0;t<e.length;t++){const n=e[t];if(i&&o){if(n.test(i)&&n.test(o)&&i.split(n).length===o.split(n).length){a=n;break}}else n.test(i)&&(a=n)}}return r.map(e=>e.split(a))})({data:n,config:i})),Array.isArray(o)&&function(e){let t,{source:n,data:r,cache:i,config:o}=e,a=r;const s=o&&o.parse;Array.isArray(r[0])?s&&!1===s.headers?t=r[0].map((e,t)=>t):(t=r[0],a=r.slice(1)):t=Object.keys(r[0]);const l=!!s&&"function"==typeof s.row&&s.row;let c,u=t;u=s&&"function"==typeof s.fields?s.fields(u.slice()):t.map(e=>({key:e,title:e})),Array.isArray(r[0])?c=u.map(()=>[]):(c={},u.forEach(e=>{c[e.key]=[]}));for(let e=0;e<a.length;e++){const t=l?l(a[e],e,u):a[e];if(t)if(Array.isArray(t))for(let e=0;e<u.length;e++)c[e].push(t[e]);else for(let e=0;e<u.length;e++)c[u[e].key].push(t[u[e].key])}const d=Array.isArray(c)?e=>c[e]:e=>c[u[e].key];for(let e=0;e<u.length;e++){const t=d(e),r=Gh(t),o=r.length>0,a=o?"measure":"dimension",s=o?Math.min(...r):NaN,l=o?Math.max(...r):NaN;i.fields.push(_u(Va({source:n,key:e,title:u[e].title,values:t,min:s,max:l,type:a},u[e]),{value:u[e].value,label:u[e].label}))}}({data:o,cache:r,source:t,config:i})};function Zh(){let{key:e,data:t,config:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[]},i={key:()=>e,raw:()=>t,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];for(let t=0;t<n.fields.length;t++)if(n.fields[t].key()===e)return n.fields[t];for(let t=0;t<n.fields.length;t++)if(n.fields[t].title()===e)return n.fields[t];return null}(e,{cache:r}),fields:()=>r.fields.slice(),extract:e=>function(e,t){const n=Array.isArray(e)?e:[e];let r=[];return n.forEach(e=>{if(void 0!==e.field){const n=t.field(e.field),i=t.key();if(!n)throw Error("Field '".concat(e.field,"' not found"));const{props:o,main:a}=Lu(e,t),s=Object.keys(o),l=!!e.trackBy,c=typeof e.trackBy,u={},d=[],f=n.items(),p=[];for(let t=0;t<f.length;t++){const n=f[t];if(a.filter&&!a.filter(n))continue;const r=Xh(a,n,{key:i});s.forEach(e=>{const a=o[e];let s=a.field?a.field.items()[t]:n;r[e]=Xh(a,s,{key:i})}),l&&zu({cfg:e,itemData:n,obj:r,target:d,tracker:u,trackType:c}),p.push(r)}r=l?[...r,...Ru(d,{main:a,propsArr:s,props:o})]:[...r,...p]}}),r}(e,i),hierarchy:()=>null};return Kh({key:e,data:t,config:n,cache:r}),i}Zh.util={normalizeConfig:Lu,collect:Ru,track:zu};const Jh=il();Jh.default("matrix"),Jh("matrix",Zh),Jh("default",Zh);const Qh=il();function em(e,t,n){return Math.max(e,Math.min(t,n))}function tm(e){let{item:t,value:n,boxCenter:r,rendWidth:i,rendHeight:o,flipXY:a,symbol:s}=e,l="x",c="y",u=i,d=o,f=n<.5?90:-90;return a&&(l="y",c="x",u=o,d=i,f=n<.5?180:0),s(Va({},t.oob,{[l]:r*u,[c]:Math.max(t.oob.size/2,Math.min(n*d,d-t.oob.size/2)),startAngle:f}))}function nm(e){let{item:t,boxWidth:n,boxPadding:r,rendWidth:i,rendHeight:o,flipXY:a}=e,s="x",l="y",c="width",u="height",d=i,f=o;a&&(s="y",l="x",c="height",u="width",d=o,f=i);const{actualDiff:p,actualLow:h}=function(e){let{start:t,end:n,minPx:r=.1,maxPx:i=1}=e;const o=Math.max(t,n),a=Math.min(t,n),s=em(-.1,1.2,o),l=em(-.1,1.2,a),c=s*i-l*i,u=Math.max(r,c),d=(u-c)/2;return{actualDiff:u,startModifier:d,actualLow:l*i-d}}({start:t.start,end:t.end,minPx:t.box.minHeightPx,maxPx:f});return Va({},t.box,{type:"rect",[s]:(r+t.major)*d,[l]:h,[u]:p,[c]:n*d,data:t.data||{},collider:{type:null}})}function rm(e){let{item:t,from:n,to:r,boxCenter:i,rendWidth:o,rendHeight:a,flipXY:s}=e,l="x1",c="y1",u="x2",d="y2",f=o,p=a;return s&&(l="y1",c="x1",u="y2",d="x2",f=a,p=o),Va({},t.line,{type:"line",[d]:Math.floor(n*p),[l]:i*f,[c]:Math.floor(r*p),[u]:i*f,data:t.data||{},collider:{type:null}})}function im(e){let{item:t,key:n,position:r,width:i,boxCenter:o,rendWidth:a,rendHeight:s,flipXY:l}=e,c="x1",u="y1",d="x2",f="y2",p=a,h=s;l&&(c="y1",u="x1",d="y2",f="x2",p=s,h=a);const m=i/2;return Va({type:"line"},t[n],{[u]:Math.floor(r*h),[c]:(o-m)*p,[f]:Math.floor(r*h),[d]:(o+m)*p,r:m*p,cx:o*p,cy:r*h,width:i*p,data:t.data||{},collider:{type:null}})}function om(e,t,n){const{width:r,maxWidthPx:i,minWidthPx:o}=t.box,a=e>=0?1:-1;let s=Math.min(a*e*r,isNaN(i)?n:i/n);return s=isNaN(o)?s:Math.max(o/n,s),s*a}Qh("native",function(e,t,n){let r,i,o={chart:e,mediator:t,element:n},a=[],s=!0;function l(){"function"==typeof r.enable&&(r.enable=r.enable.bind(o)()),r.enable&&Object.keys(r.events).forEach(e=>{const t=r.events[e].bind(o);n.addEventListener(e,t),a.push({key:e,listener:t})})}function c(){a.forEach(e=>{let{key:t,listener:r}=e;n.removeEventListener(t,r)}),a=[]}return{get key(){return i},set(e){!function(e){i=e.key,r=e,r.events=r.events||[],void 0===r.enable&&(r.enable=!0)}(e),c(),s&&l()},off(){s=!1,c()},on(){s=!0,0===a.length&&l()},destroy(){c(),o=null,r=null}}});const am={oob:{show:!0,type:"n-polygon",fill:"#999",stroke:"#000",strokeWidth:0,size:10,sides:3,startAngle:-90},box:{show:!0,fill:"#fff",stroke:"#000",strokeWidth:1,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1},line:{show:!0,stroke:"#000",strokeWidth:1},median:{show:!0,stroke:"#000",strokeWidth:1},whisker:{show:!0,stroke:"#000",strokeWidth:1,fill:"",type:"line",width:1}},sm=Object.keys(am),lm={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},style:{box:"$shape",line:"$shape-guide",whisker:"$shape-guide",median:"$shape-guide--inverted"}},created(){this.state={}},render(e){let{data:t}=e;const{width:n,height:r}=this.rect,i="horizontal"===this.settings.settings.orientation,{style:o,resolver:a,symbol:s}=this,l=sm.filter(e=>!this.settings.settings[e]||!1!==this.settings.settings[e].show),c={};l.forEach(e=>c[e]=am[e]);const u=function(e){let{keys:t,data:n,defaultSettings:r,style:i,settings:o,width:a,height:s,resolver:l}=e;const c=Va(!0,{},r||{},i||{}),u={major:"horizontal"===o.orientation?s:a,minor:"horizontal"===o.orientation?a:s},d=o.major;let f;f="object"==typeof d&&"object"==typeof d.ref&&void 0!==d.ref.start&&void 0!==d.ref.end?l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:Va(!0,{},{binStart:{scale:o.major.scale,ref:o.major.ref.start},binEnd:{scale:o.major.scale,ref:o.major.ref.end}})}):"object"==typeof d&&void 0!==d.binStart&&void 0!==d.binEnd?l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:Va(!0,{},{binStart:{scale:o.major.scale,ref:"binStart"},binEnd:{scale:o.major.scale,ref:"binEnd"}},o.major)}):l.resolve({data:n,scaled:u,defaults:{major:.5},settings:{major:o.major}});const p=o.minor||{},h={};["start","end","min","max","med"].forEach(e=>{(p[e]||n.items&&n.items.length&&n.items[0][e])&&(h[e]={scale:p.scale,ref:e})});let m,g={major:f,minor:l.resolve({data:n,defaults:{start:0,end:1},scaled:u,settings:Va(!0,{},h,p)})};for(let e=0,r=t.length;e<r;e++)o[m]&&!1===o[m].show||(m=t[e],g[m]=l.resolve({data:n,defaults:c[m],settings:o[m],scaled:u}));return g}({keys:l,data:t,defaultSettings:c,style:o,settings:this.settings.settings,width:n,height:r,resolver:a}),{settings:d,items:f}=u,p=function(e){let{width:t,height:n,flipXY:r,resolved:i,keys:o,symbol:a}=e;const s=[],l=i.major.items;if(!l.length)return s;const c=t,u=n,d=r?n:t,f=i.major.settings,p=["start","end","min","max","med"].filter(e=>void 0!==i.minor.settings[e]),h=p.length,m=o.filter(e=>"oob"!==e);let g,y,v,b,x,w,S,M,k;const E=o?o.length:0,C=m?m.length:0;function A(){S?g.push(tm({item:v,value:0,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r,symbol:a})):M&&g.push(tm({item:v,value:1,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r,symbol:a}))}const D={box:function(){v.box&&Ya(v.start)&&Ya(v.end)&&g.push(nm({item:v,boxWidth:b,boxPadding:x,rendWidth:c,rendHeight:u,flipXY:r}))},line:function(){Ya(v.min)&&Ya(v.start)&&g.push(rm({item:v,from:v.min,to:v.start,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r})),Ya(v.max)&&Ya(v.end)&&g.push(rm({item:v,from:v.max,to:v.end,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r}))},median:function(){v.median&&Ya(v.med)&&g.push(im({item:v,key:"median",position:v.med,width:b,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r}))},whisker:function(){if(v.whisker){const e=b*v.whisker.width;Ya(v.min)&&g.push(im({item:v,key:"whisker",position:v.min,width:e,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r})),Ya(v.max)&&g.push(im({item:v,key:"whisker",position:v.max,width:e,boxCenter:w,rendWidth:c,rendHeight:u,flipXY:r}))}}};function q(){let e,t=-Number.MAX_VALUE,n=Number.MAX_VALUE;for(let r=0;r<h;r++)e=v[p[r]],Ya(e)&&(t<e&&(t=e),n>e&&(n=e));S=t<0&&t!==-Number.MAX_VALUE,M=n>1&&n!==Number.MAX_VALUE,k=S||M}for(let e=0,t=l.length;e<t;e++){g=[],y=null;const t=l[e],n=t.data;let r=null,a=null;void 0!==f.binStart?(r=t.binStart,a=t.binEnd,y=f.binStart.scale):(y=f.major.scale,r=y?t.major:0);let c=0;y?y.bandwidth?(c=y.bandwidth(),r-=c/2):c=a-r:c=1,v=Va({},{major:r,majorEnd:a},i.minor.items[e]);for(let t=0;t<E;t++)v[o[t]]=i[o[t]].items[e];if(b=om(c,v,d),x=(c-b)/2,w=x+v.major+b/2,q(),k)v.oob&&A();else for(let e=0;e<C;e++)v[m[e]]&&!1===v[m[e]].show||D[m[e]]();const u={type:"container",data:n,collider:{type:"bounds"},children:g};s.push(u)}return s}({width:n,height:r,flipXY:i,resolved:u,keys:l,symbol:s});return p}};const cm={shape:"saltire",width:2,size:.5,fill:"#333",stroke:"#333",strokeWidth:0},um=/px$/,dm={shape:"circle",label:"",fill:"#333",stroke:"#ccc",strokeDasharray:"",strokeWidth:0,strokeLinejoin:"miter",opacity:1,x:.5,y:.5,size:1,show:!0},fm={imageSrc:void 0,imageScalingFactor:void 0,position:"center-center",symbol:"rectangle",width:void 0,height:void 0},pm={maxPx:1e4,minPx:1,maxRelExtent:.1,minRelExtent:.01,maxRelDiscrete:1,minRelDiscrete:.1};function hm(e,t){return e&&"function"==typeof e.bandwidth?{isBandwidth:!0,value:Math.max(1,e.bandwidth()*t)}:{isBandwidth:!1,value:Math.max(1,t)}}function mm(e,t,n,r){let{width:i,height:o}=t;return e.filter(e=>!1!==e.show&&!isNaN(e.x+e.y)).map(e=>{let t=e,a=um.test(e.size)?parseInt(e.size,10):n.min+t.size*(n.max-n.min);Xa(a)&&(t=cm,a=n.min+t.size*(n.max-n.min));const[s,l]=function(e){let t=dm.shape,n={};return"object"==typeof e.shape&&"string"==typeof e.shape.type?(t=e.shape.type,n=e.shape):"string"==typeof e.shape&&(t=e.shape),[t,n]}(t),c=Wa(Wa({},l),{},{type:s,label:e.label,x:e.x*i,y:e.y*o,fill:t.fill,size:Math.min(n.maxGlobal,Math.max(n.minGlobal,a)),stroke:t.stroke,strokeWidth:t.strokeWidth,strokeDasharray:t.strokeDasharray,opacity:t.opacity,imageSettings:t.imageSettings});t===e.errorShape&&(c.width=t.width);const u=r(c);return u.data=e.data,u})}const gm={require:["chart","resolver","symbol"],defaultSettings:{settings:{},data:{},animations:{enabled:!1,trackBy:e=>e.data.value},style:{item:"$shape"}},render(e){let{data:t}=e;const n=this.resolver.resolve({data:t,defaults:Va({},dm,this.style.item),settings:this.settings.settings,scaled:{x:this.rect.width,y:this.rect.height}}),{width:r,height:i}=this.rect,o=Va({},pm,this.settings.settings.sizeLimits),a=n.items;a.length>0&&"image"===a[0].shape&&t.items.forEach((e,t)=>{a[t].imageSettings=Va({},fm,this.settings.settings.imageSettings)});const s=function(e,t,n,r,i){const o=hm(e?e.scale:void 0,n),a=hm(t?t.scale:void 0,r);let s=Math.min(o.value*i[o.isBandwidth?"maxRelDiscrete":"maxRelExtent"],a.value*i[a.isBandwidth?"maxRelDiscrete":"maxRelExtent"]),l=Math.min(o.value*i[o.isBandwidth?"minRelDiscrete":"minRelExtent"],a.value*i[a.isBandwidth?"minRelDiscrete":"minRelExtent"]);return{min:Math.max(1,Math.floor(l)),max:Math.max(1,Math.floor(s)),maxGlobal:i.maxPx,minGlobal:i.minPx}}(n.settings.x,n.settings.y,r,i,o);return mm(a,this.rect,s,this.settings.shapeFn||this.symbol)}};const ym={label:"",arc:1,show:!0,fill:"#333",stroke:"#ccc",strokeWidth:1,strokeLinejoin:"round",opacity:1,innerRadius:0,outerRadius:.8,cornerRadius:0,offset:0};function vm(e,t,n,r){let{x:i,y:o,width:a,height:s}=t;const l=As(),c={x:i+a/2,y:o+s/2},u=Math.min(a,s)/2,d=Math.min(a,s)/2,f=d/100;return e.map((e,t)=>{const i=n[t];i.type="path";const o=d*i.outerRadius,a=u*i.innerRadius,s=f*i.cornerRadius;l.innerRadius(a),l.outerRadius(o),l.cornerRadius(s),i.arcDatum=e;const p=l.centroid(e),h=i.offset?function(e,t,n,r){let[i,o]=e;const a=Math.sqrt(i*i+o*o);i/=a,o/=a;const s=n-r;return{x:i*t*s,y:o*t*s}}(p,i.offset,o,a):{x:0,y:0};return i.transform="translate(".concat(h.x,", ").concat(h.y,") translate(").concat(c.x,", ").concat(c.y,")"),i.desc={share:e.value/r,slice:{start:e.startAngle,end:e.endAngle,innerRadius:a,outerRadius:o,cornerRadius:s,offset:{x:c.x+h.x,y:c.y+h.y}}},i})}function bm(e,t){return e.slice&&"arc"in e.slice?t.arc:t.data.value}const xm={require:["chart","resolver"],defaultSettings:{settings:{startAngle:0,endAngle:2*Math.PI,padAngle:0,slice:{}},style:{slice:"$shape"},data:{}},render(e){let{data:t}=e;const n=[],r=[],i=this.settings.settings,{items:o}=this.resolver.resolve({data:t,defaults:Va({},ym,this.style.slice),settings:i.slice});let a=0;for(let e=0,t=o.length;e<t;e++){const t=bm(i,o[e]);t>0&&o[e].outerRadius>=o[e].innerRadius&&(n.push(t),r.push(o[e]),a+=t)}const s=function(){var e=Is,t=Os,n=null,r=ls(0),i=ls(bs),o=ls(0);function a(a){var s,l,c,u,d,f=a.length,p=0,h=new Array(f),m=new Array(f),g=+r.apply(this,arguments),y=Math.min(bs,Math.max(-bs,i.apply(this,arguments)-g)),v=Math.min(Math.abs(y)/f,o.apply(this,arguments)),b=v*(y<0?-1:1);for(s=0;s<f;++s)(d=m[h[s]=s]=+e(a[s],s,a))>0&&(p+=d);for(null!=t?h.sort(function(e,n){return t(m[e],m[n])}):null!=n&&h.sort(function(e,t){return n(a[e],a[t])}),s=0,c=p?(y-f*b)/p:0;s<f;++s,g=u)l=h[s],u=g+((d=m[l])>0?d*c:0)+b,m[l]={data:a[l],index:s,value:d,startAngle:g,endAngle:u,padAngle:v};return m}return a.value=function(t){return arguments.length?(e="function"==typeof t?t:ls(+t),a):e},a.sortValues=function(e){return arguments.length?(t=e,n=null,a):t},a.sort=function(e){return arguments.length?(n=e,t=null,a):n},a.startAngle=function(e){return arguments.length?(r="function"==typeof e?e:ls(+e),a):r},a.endAngle=function(e){return arguments.length?(i="function"==typeof e?e:ls(+e),a):i},a.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:ls(+e),a):o},a}().sortValues(null);s.startAngle(i.startAngle),s.endAngle(i.endAngle),s.padAngle(i.padAngle);return vm(s(n),Va({},this.rect,{x:0,y:0}),r,a)}};const wm=function(e){function t(t){if(e[t.type]&&e[t.type].condition(t)){const n=e[t.type],r=void 0===n.conditionAppend||n.conditionAppend(t);n.items.forEach(e=>{const n=Math.round(t[e.key]),i=t[e.key]-n;t[e.key]=n,r&&"append"===e.type&&(i>0?t[e.key]+=.5:t[e.key]-=.5)})}}return void 0===e&&((e={}).line={append:["x1","x2","y1","y2"],round:[],condition:e=>e.x1===e.x2||e.y1===e.y2,conditionAppend:e=>e.strokeWidth%2!=0},e.rect={append:["x","y"],round:["width","height"],condition:()=>!0,conditionAppend:e=>e.strokeWidth%2!=0}),Object.keys(e).forEach(t=>{const n=e[t];n.items=[],n.append.forEach(e=>{n.items.push({key:e,type:"append"})}),n.round.forEach(e=>{n.items.push({key:e,type:"round"})})}),t.multiple=e=>e.forEach(e=>t(e)),t}();class Sm{constructor(){this.reset(),this.push(...arguments)}static evaluateKey(e,t){if(t){const t=e.substring(0,1),n=e.substring(1);if("x"===t)return"y".concat(n);if("y"===t)return"x".concat(n);if("cx"===e)return"cy";if("cy"===e)return"cx";if("width"===e)return"height";if("height"===e)return"width"}return e}transposeCoordinate(e,t,n){if("number"==typeof t&&isFinite(t)){const r=e.substring(0,1);if("x"===r||"cx"===e)return t*this.width;if("width"===e)return t*this.width;if("r"===e)return t*(n?this.height:this.width);if("y"===r||"cy"===e)return t*this.height;if("height"===e)return t*this.height}return t}push(){return this.storage.push(...arguments),this}processItem(e){let t={};const n=void 0!==e.flipXY?e.flipXY:this.flipXY,r=void 0!==e.crisp?e.crisp:this.crisp;if(e.fn&&"function"==typeof e.fn){let r=n?this.height:this.width,i=n?this.width:this.height;e=e.fn({width:r,height:i,flipXY:n});const o=Object.keys(e);for(let r=0,i=o.length;r<i;r++){let i=o[r];t[Sm.evaluateKey(i,n)]=e[i]}}else{const r=Object.keys(e);for(let i=0,o=r.length;i<o;i++){let o=r[i];const a=Sm.evaluateKey(o,n),s=this.transposeCoordinate(a,e[o],n);t[a]=s}}return r&&wm(t),t}output(){let e=[];for(let t=0,n=this.storage.length;t<n;t++){let n=this.processItem(this.storage[t]);e.push(n)}return e}reset(){this.storage=[],this.flipXY=!1,this.crisp=!1,this.width=0,this.height=0}}function Mm(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Sm(...t)}function km(e,t){return e&&t?e.cachedTicks&&e.cachedTicks()||e.ticks({distance:t}):[]}const Em={created(){},require:["chart","renderer","resolver"],defaultSettings:{layout:{displayOrder:0},style:{ticks:"$guide-line",minorTicks:"$guide-line--minor"}},beforeRender(){this.blueprint=Mm(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render(){if(this.x=this.settings.x?this.chart.scale(this.settings.x):null,this.y=this.settings.y?this.chart.scale(this.settings.y):null,dp(this,"x",this.rect.width),dp(this,"y",this.rect.height),!this.x&&!this.y)return[];this.settings.ticks=Va({show:!0},this.style.ticks,this.settings.ticks||{}),this.settings.minorTicks=Va({show:!1},this.style.minorTicks,this.settings.minorTicks||{}),this.lines={x:[],y:[]},this.lines.x=km(this.x,this.rect.width),this.lines.y=km(this.y,this.rect.height),this.lines.y=this.lines.y.map(e=>Va(e,{flipXY:!0}));let e=e=>{let{dir:t,isMinor:n}=e,r=this.lines[t].filter(e=>!!e.isMinor===n),i=n?this.settings.minorTicks:this.settings.ticks;this.resolver.resolve({settings:i,data:{items:r,dir:t}}).items.forEach(e=>{let n=e.data;var r,i;e.show&&this.blueprint.push({type:"line",x1:n.position,y1:0,x2:n.position,y2:1,stroke:e.stroke||"black",strokeWidth:void 0!==e.strokeWidth?e.strokeWidth:1,strokeDasharray:void 0!==e.strokeDasharray?e.strokeDasharray:void 0,flipXY:n.flipXY||!1,value:null!==(r=n.value)&&void 0!==r?r:null===(i=n.data)||void 0===i?void 0:i.value,dir:t})})};return e({dir:"x",isMinor:!1}),e({dir:"x",isMinor:!0}),e({dir:"y",isMinor:!1}),e({dir:"y",isMinor:!0}),this.blueprint.output()}};function Cm(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.8,"left"===r||"right"===r){let i="right"===r;return"\n      M ".concat(e," ").concat(t-n,"\n      A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(i?0:1,", ").concat(e," ").concat(t+n,"\n      L ").concat(i?e+n:e-n," ").concat(t," Z\n    ")}let i="bottom"===r;return"\n    M ".concat(e-n," ").concat(t,"\n    A ").concat(1.25*n," ").concat(1.25*n,", 0, 1, ").concat(i?1:0,", ").concat(e+n," ").concat(t,"\n    L ").concat(e," ").concat(i?t+n:t-n," Z\n  ")}function Am(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"bottom";if(n*=.75,"left"===r||"right"===r){let i="right"===r;return"\n      M ".concat(e+=i?1.5*n:-1.5*n," ").concat(t-n,"\n      L ").concat(e," ").concat(t+n,"\n      L ").concat(i?e+n:e-n," ").concat(t," Z\n    ")}let i="bottom"===r;return t+=i?1.5*n:-1.5*n,"\n    M ".concat(e-n," ").concat(t,"\n    L ").concat(e+n," ").concat(t,"\n    L ").concat(e," ").concat(i?t+n:t-n," Z\n  ")}function Dm(e,t,n){return e<t||e>n}function qm(e,t){if("string"==typeof e.formatter)return t.formatter(e.formatter);if("object"==typeof e.formatter)return t.formatter(e.formatter);if(void 0!==e.scale&&e.scale.data){const t=e.scale.data()&&e.scale.data().fields;return t&&t[0]?t[0].formatter():null}return null}function _m(e){if(void 0===e)return 0;if("number"==typeof e&&isFinite(e))return e;if("string"==typeof e)switch(e){case"center":case"middle":return.5;case"bottom":case"right":return 1;default:return 0}return 0}function Tm(e){var t,n;let{chart:r,blueprint:i,renderer:o,p:a,settings:s,items:l,slopeLine:c}=e,u=!0,d=!1,f=!1,p=!1,h=!1,m=Va(!0,{},s.style.line,a.line||{}),g=Va(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},s.style.label||{},{fill:m.stroke});if(d=c?i.processItem({type:"line",x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2,stroke:m.stroke||"black",strokeWidth:m.strokeWidth||1,strokeDasharray:m.strokeDasharray,flipXY:!1,value:a.valueInfo?a.valueInfo.id:a.value}):i.processItem({type:"line",x1:a.position,y1:0,x2:a.position,y2:1,stroke:m.stroke||"black",strokeWidth:m.strokeWidth||1,strokeDasharray:m.strokeDasharray,flipXY:a.flipXY||!1,value:a.valueInfo?a.valueInfo.id:a.value}),a.label&&!1!==a.label.show&&(null==c||!c.slope||0===c.slope)){const e=Va(!0,{fill:"#000",fontFamily:"Arial",fontSize:"12px",opacity:1,maxWidth:1,maxWidthPx:9999,padding:5,background:{fill:"#fff",stroke:"transparent",strokeWidth:0,opacity:.5}},s.style.label||{},{fill:m.stroke},a.label);let t,n={width:0,height:0},c="";t=qm(a,r),!1!==a.label.showValue&&(t?c=" (".concat(t(a.value),")"):a.scale&&(c=" (".concat(a.value,")"))),c&&(n=o.measureText({text:c,fontFamily:e.fontFamily,fontSize:e.fontSize}));let d=o.measureText({text:e.text||"",fontFamily:e.fontFamily,fontSize:e.fontSize}),g={width:d.width+n.width,height:Math.max(d.height,n.height)},y=e.padding,v=_m(a.flipXY?e.vAlign:e.align),b=_m(a.flipXY?e.align:e.vAlign),x=Math.min(1+g.width+2*y,e.maxWidth*i.width,e.maxWidthPx),w=g.height+2*y,S=a.flipXY?w:x,M=a.flipXY?x:w;if(f=i.processItem({fn:t=>{let{width:n,height:r}=t,o=a.position*n-(a.flipXY?w:x)*(1-v);o=a.flipXY?o:Math.max(o,0);return{type:"rect",x:o,y:Math.max(Math.abs(b*r-M*b),0),width:a.flipXY?S:Math.min(S,i.width-o),height:M,stroke:e.background.stroke,strokeWidth:e.background.strokeWidth,fill:e.background.fill,opacity:e.background.opacity}},flipXY:a.flipXY||!1}),f.x<-1||f.x+f.width>i.width+1||f.y<-1||f.y+f.height>i.height+1)f=void 0;else{p={type:"text",text:e.text||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:f.x+y,y:f.y+f.height/2+g.height/3,maxWidth:f.width-2*y-n.width,anchor:"start"},c&&(h={type:"text",text:c||"",fill:e.fill,opacity:e.opacity,fontFamily:e.fontFamily,fontSize:e.fontSize,x:p.x+3+(f.width-(n.width+2*y)),y:p.y});for(let e=0,t=l.length;e<t;e++){let t=l[e];"rect"===t.type?ah(f,t)&&(u=!1):"line"===t.type&&a.flipXY===t.flipXY&&ch(f,t)&&(u=!1)}}}if(d&&l.push(d),c&&0!==c.slope&&(!1!==(null===(t=c.label)||void 0===t?void 0:t.show)||!1!==(null===(n=c.label)||void 0===n?void 0:n.showValue))){var y,v,b;let e,t;const n=120;let s=!1!==(null===(y=c.label)||void 0===y?void 0:y.show)?null===(v=c.label)||void 0===v?void 0:v.text:"";if(!1!==(null===(b=c.label)||void 0===b?void 0:b.showValue)){var x;const t=qm(a,r),n=t?t(c.value):c.value;e="(".concat(c.slope,"x + ").concat(n,")"),s+=null!==(x=c.label)&&void 0!==x&&x.text?" ".concat(e):e}if(s.length>1){var w,S,M;const e=o.measureText({text:s,fontFamily:g.fontFamily,fontSize:g.fontSize});e.width=e.width>n?n:e.width;const a=function(e,t,n){const r=e.scale({scale:"x"}),i=e.scale({scale:"y"});if(t>0){if(r.max()*t+n>=i.max())return!0}else if(t<0&&r.min()*t+n>=i.max())return!0;return!1}(r,c.slope,c.value)?function(e,t,n){const r=e.scale({scale:"x"}),i=e.scale({scale:"y"});return r((i.max()-n)/t)}(r,c.slope,c.value):void 0,u=void 0===a||c.isRtl?g.padding:3*g.padding,f=void 0!==a||c.slope>0?3*g.padding:g.padding,p=function(e,t,n,r,i,o){let a=0;if(void 0!==n){if(n<.8)return a=e.slope<0||e.isRtl?3*o.padding:2*o.padding,e.isRtl,n*i.width+a;if(1===n)return e.isRtl?n*i.width-(r.width+3*o.padding):n*i.width-(r.width+6*o.padding);if(n>.8)return e.isRtl?n*i.width-(r.width+3*o.padding):n*i.width-(r.width+6*o.padding)}else if(e.slope>0)return t.x2-(r.width+2*o.padding);return e.isRtl?t.x1-(r.width+2*o.padding):t.x1}(c,d,a,e,i,g),h=Math.min(d.y1,d.y2);null!==(w=c.label)&&void 0!==w&&w.stroke&&(t={type:"rect",x:c.isRtl?Math.max(p,u)-2:Math.max(p,u)+2,y:Math.abs(Math.max(h,f)-e.height),rx:3,ry:3,width:e.width+g.padding,height:e.height-2,stroke:m.stroke,fill:m.stroke});const y={type:"text",text:s,fill:null!==(S=null===(M=c.label)||void 0===M?void 0:M.stroke)&&void 0!==S?S:m.stroke,opacity:g.opacity,fontFamily:g.fontFamily,fontSize:g.fontSize,x:t?t.x+2:Math.max(p,u)+2,y:t?t.y+e.height-g.padding:Math.abs(Math.max(h,f)-g.padding/2),anchor:"start",title:s,maxWidth:n,width:e.width};(function(e,t,n,r,i){for(let o=0,a=e.length;o<a;o++){const a=e[o];if("text"===(null==a?void 0:a.type)&&Math.abs(a.x-t.x)<Math.max(a.width+r,t.width+r)&&Math.abs(a.y-t.y)<n.height+i)return!0}return!1})(l,y,e,u,f)||(t&&l.push(t),l.push(y))}}u&&f&&p&&(l.push(f,p),h&&l.push(h))}function Nm(e){const t={value:e.value};return e.label&&(t.label=e.label.text),t}function Om(e){return void 0!==("function"==typeof e.value?e.value():e.value)}function Im(e,t){const n=e.min();if(n===e.max()){const r=function(e){const t=e.range();return 2===(null==t?void 0:t.length)&&t[0]>t[1]}(e);if(t<n)return r?2:-1;if(t>n)return r?-1:2}return e(t)}function Lm(e,t){return e&&t&&Math.abs(e.x-t.x)<1e-15&&Math.abs(e.y-t.y)<1e-15}const Pm={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:0},style:{oob:{show:!0,width:10,fill:"#1A1A1A",stroke:"transparent",strokeWidth:0,opacity:1,text:{fontFamily:"Arial",stroke:"transparent",fill:"#fff",strokeWidth:0,opacity:1},triangle:{fill:"#4D4D4D",stroke:"transparent",strokeWidth:0,opacity:1},padding:{x:28,y:5}},line:{stroke:"#000"},label:{strokeWidth:0}}},preferredSize:()=>30,beforeRender(){this.blueprint=Mm(),this.blueprint.width=this.rect.width,this.blueprint.height=this.rect.height,this.blueprint.x=this.rect.x,this.blueprint.y=this.rect.y,this.blueprint.crisp=!0},render(){let e=this.settings;if(this.lines={x:[],y:[]},this.lines.x=e.lines&&e.lines.x||[],this.lines.y=e.lines&&e.lines.y||[],0===this.lines.x.length&&0===this.lines.y.length)return[];const t={x0:[],x1:[],y0:[],y1:[]};this.lines.x=this.lines.x.filter(Om).map(e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=Im(t,e.value);return Va(e,{scale:t,position:n})}return Va(e,{position:e.value})}),this.lines.y=this.lines.y.filter(Om).map(e=>{if("function"==typeof e.value&&(e.value=e.value()),e.scale){let t=this.chart.scale(e.scale);const n=Im(t,e.value);return Va(e,{scale:t,position:n,flipXY:!0})}return Va(e,{position:e.value,flipXY:!0})}),this.lines.x=this.lines.x.filter(e=>!(e.position<0||e.position>1)||(t["x".concat(e.position>1?1:0)].push(Nm(e)),!1)),this.lines.y=this.lines.y.filter(e=>!(!e.slope||0===e.slope)||(!(e.position<0||e.position>1)||(t["y".concat(e.position>1?1:0)].push(Nm(e)),!1)));let n=[];return[...this.lines.x,...this.lines.y].forEach(r=>{if(!0===r.show||void 0===r.show){let i;if(r.slope&&0!==r.slope){const e=this.chart.scale({scale:"x"}),n=this.chart.scale({scale:"y"}),o=e.min(),a=e.max(),s=n.min(),l=n.max();i=Wa(Wa({},r),{},{x1:void 0,y1:void 0,x2:void 0,y2:void 0});const c=o*r.slope+r.value,u=a*r.slope+r.value,d=(s-r.value)/r.slope,f=(l-r.value)/r.slope;let p=[];Dm(c,s,l)||(p[0]={x:Im(e,o),y:Im(n,c)}),Dm(d,o,a)||(p[1]={x:Im(e,d),y:1}),Dm(u,s,l)||(p[2]={x:Im(e,a),y:Im(n,u)}),Dm(f,o,a)||(p[3]={x:Im(e,f),y:0});const h=p.filter(e=>!!e).length;if(h>2&&function(e){Lm(e[0],e[1])&&(e[1]=void 0),Lm(e[1],e[2])&&(e[2]=void 0),Lm(e[2],e[3])&&(e[3]=void 0),Lm(e[3],e[0])&&(e[3]=void 0)}(p),p=p.filter(e=>!!e),p.length<2)return void t["y".concat(c>l?0:1)].push(Nm(r));i.x1=p[0].x,i.y1=p[0].y,i.x2=p[1].x,i.y2=p[1].y}else i=void 0;Tm({chart:this.chart,blueprint:this.blueprint,renderer:this.renderer,p:r,settings:e,items:n,slopeLine:i})}}),e.style.oob.show&&function(e){let{blueprint:t,oob:n,settings:r,items:i}=e;const o=Object.keys(n);let a=r.style.oob||{};for(let e=0,r=o.length;e<r;e++){const r=o[e],s=n[r];if(s.length>0){let e=r.charAt(1),n="y"===r.charAt(0),o=a.padding.x+a.width,l=a.padding.y+a.width,c="bottom";c=n?"1"===e?"bottom":"top":"1"===e?"right":"left";let u=t.processItem({fn:t=>{let{width:r,height:i}=t,u=e*r+("1"===e?-o:o),d=n?l:i-l;return"arc"===a.type?{type:"path",d:Cm(n?d:u,n?u:d,a.width,c),x:u,y:d,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0}:{type:"circle",cx:u,cy:d,r:a.width,stroke:a.stroke,fill:a.fill,strokeWidth:a.strokeWidth||0,opacity:a.opacity,data:s}},flipXY:n}),d=u.cx||u.x,f=u.cy||u.y;const p=s.map(e=>e.label?"".concat(e.label," (").concat(e.value,")"):"(".concat(e.value,")")),h=p.reduce((e,t,n)=>0===n?t:"".concat(e,"\n\n").concat(t),"");let m={type:"text",text:s.length||"",title:h,x:d-.4*a.width,y:f+.4*a.width,fontFamily:a.text.fontFamily,fontSize:"".concat(1.3*a.width,"px"),stroke:a.text.stroke,fill:a.text.fill,strokeWidth:a.text.strokeWidth||0,opacity:a.text.opacity},g={type:"path",d:Am(d,f,a.width,c),x:d,y:f,stroke:a.triangle.stroke,fill:a.triangle.fill,strokeWidth:a.triangle.strokeWidth||0,opacity:a.triangle.opacity};i.push(u,m,g)}}}({blueprint:this.blueprint,oob:t,settings:e,items:n}),n}};function Rm(e){const t={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null}};return"top"===e.align||"bottom"===e.align?(t.x1=e.innerRect.x-e.outerRect.x,t.x2=t.x1+e.innerRect.width,t.y1=t.y2="top"===e.align?e.innerRect.height-e.padding:e.padding):(t.x1=t.x2="left"===e.align?e.innerRect.width-e.padding:e.padding,t.y1=e.innerRect.y-e.outerRect.y,t.y2=t.y1+e.innerRect.height),function(e,t){Va(e,t.style)}(t,e),t}function zm(e){return"string"==typeof e||"number"==typeof e?e:"-"}function Fm(e,t,n){n.layered||!n.stepSize?function(e,t){t.collider={type:"polygon",vertices:[{x:t.boundingRect.x,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y},{x:t.boundingRect.x+t.boundingRect.width,y:t.boundingRect.y+t.boundingRect.height},{x:t.boundingRect.x,y:t.boundingRect.y+t.boundingRect.height}]}}(0,t):n.tilted?function(e,t,n){const r=n.angle*(Math.PI/180),i=Math.max(n.stepSize/2,t.boundingRect.height/2),o="start"===t.anchor,a="end"===t.anchor&&r<0,s="start"===t.anchor&&r>=0,l=t.boundingRect.y+(s||a?t.boundingRect.height:0),c=[{x:t.x-i,y:l},{x:t.x+i,y:l}].map(e=>Op(e,r,{x:t.x,y:t.y})),u={x:o?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y+t.boundingRect.height},d={x:o?t.boundingRect.x+t.boundingRect.width+10:t.boundingRect.x-10,y:t.boundingRect.y},f=r>=0?[u,d]:[d,u];c.push(...f),t.collider={type:"polygon",vertices:c}}(0,t,n):function(e,t,n){if("bottom"===n.align||"top"===n.align){const r=e.position*n.innerRect.width+(n.innerRect.x-n.outerRect.x-n.stepSize/2);t.collider={type:"rect",x:r,y:0,width:r<0?n.stepSize+r:n.stepSize,height:n.innerRect.height}}else{const r=e.position*n.innerRect.height+(n.innerRect.y-n.outerRect.y-n.stepSize/2);t.collider={type:"rect",x:0,y:r,width:n.innerRect.width,height:r<0?n.stepSize+r:n.stepSize}}const r=t.collider;r.x=Math.max(r.x,0),r.y=Math.max(r.y,0);const i=r.x+r.width-(n.outerRect.x+n.outerRect.width);r.width=i>0?r.width-i:r.width;const o=r.y+r.height-(n.outerRect.y+n.outerRect.height);r.height=o>0?r.height-o:r.height}(e,t,n)}function jm(e,t){const n=isNaN(e.style.align)?.5:Math.min(Math.max(e.style.align,0),1);let r=0;if(e.tilted)r=e.stepSize*n;else{const i=t?e.textRect.height:e.textRect.width;r=Math.max(0,e.stepSize-i)*n}return r}function Vm(e,t){var n,r;const i={type:"text",text:zm(e.label),x:0,y:0,maxWidth:t.maxWidth,maxHeight:t.maxHeight,tickValue:null!==(n=e.value)&&void 0!==n?n:null===(r=e.data)||void 0===r?void 0:r.value};return"top"===t.align||"bottom"===t.align?(i.x=e.start*t.innerRect.width+(t.innerRect.x-t.outerRect.x)+jm(t,!1),i.y="top"===t.align?t.innerRect.height:0,i.anchor=t.stepSize?"start":"middle",i.x+=isNaN(t.style.offset)?0:+t.style.offset):(i.y=e.start*t.innerRect.height+(t.innerRect.y-t.outerRect.y)+jm(t,!0),i.x="left"===t.align?t.innerRect.width:0,i.anchor="left"===t.align?"end":"start",i.baseline=t.stepSize?"text-before-edge":"central",i.y+=isNaN(t.style.offset)?0:+t.style.offset),function(e,t){["fill","fontSize","fontFamily"].forEach(n=>{e[n]=t.style[n]})}(i,t),function(e,t){if(!t.tilted&&!t.stepSize)if("top"===t.align||"bottom"===t.align){const n=0,r=t.outerRect.width,i=Math.min(t.maxWidth/2,t.textRect.width/2),o=e.x-i,a=e.x+i;o<n?(e.anchor="start",e.x=t.innerRect.x-t.outerRect.x):a>r&&(e.anchor="end",e.x=t.innerRect.width+t.innerRect.x)}else{const n=0,r=t.outerRect.height,i=t.maxHeight/2,o=e.y-i,a=e.y+i;o<n?(e.y=t.innerRect.y-t.outerRect.y,e.baseline="text-before-edge"):a>r&&(e.y=t.innerRect.height+(t.innerRect.y-t.outerRect.y),e.baseline="text-after-edge")}}(i,t),function(e,t){"top"===t.align?e.y-=t.padding:"bottom"===t.align?e.y+=t.padding+t.maxHeight:"left"===t.align?e.x-=t.padding:"right"===t.align&&(e.x+=t.padding)}(i,t),function(e,t){if(t.tilted){const n=-t.angle,r=n*(Math.PI/180);"bottom"===t.align?(e.x-=t.maxHeight*Math.sin(r)/2,e.y-=t.maxHeight,e.y+=t.maxHeight*Math.cos(r)/2):e.x-=t.maxHeight*Math.sin(r)/3,e.transform="rotate(".concat(n,", ").concat(e.x,", ").concat(e.y,")"),e.anchor="bottom"===t.align==t.angle<0?"start":"end";const i=Math.cos(r)*t.maxWidth;if("bottom"===t.align==t.angle<0){const n=t.outerRect.width-t.paddingEnd;e.x+i>n&&(e.maxWidth=(n-e.x-10)/Math.cos(r))}else{const n=t.paddingEnd;e.x-i<n&&(e.maxWidth=(e.x-n-10)/Math.cos(r))}}}(i,t),function(e,t){e.boundingRect=t.textBounds(e)}(i,t),Fm(e,i,t),i}function Hm(e,t){const n={type:"line",x1:0,x2:0,y1:0,y2:0,collider:{type:null},tickValue:e.value};return"top"===t.align||"bottom"===t.align?(n.x1=n.x2=e.position*t.innerRect.width+(t.innerRect.x-t.outerRect.x),n.y1="top"===t.align?t.innerRect.height:0,n.y2="top"===t.align?n.y1-t.tickSize:n.y1+t.tickSize):(n.y1=n.y2=e.position*t.innerRect.height+(t.innerRect.y-t.outerRect.y),n.x1="left"===t.align?t.innerRect.width:0,n.x2="left"===t.align?n.x1-t.tickSize:n.x1+t.tickSize),function(e,t){Va(e,t.style)}(n,t),function(e,t){"top"===t.align?(e.y1-=t.padding,e.y2-=t.padding):"bottom"===t.align?(e.y1+=t.padding,e.y2+=t.padding):"left"===t.align?(e.x1-=t.padding,e.x2-=t.padding):"right"===t.align&&(e.x1+=t.padding,e.x2+=t.padding)}(n,t),function(e,t){const n=e.strokeWidth/2;e.x1===t.innerRect.width?(e.x1-=n,e.x2-=n):0===e.x1?(e.x1+=n,e.x2+=n):e.y1===t.innerRect.height?(e.y1-=n,e.y2-=n):0===e.y1&&(e.y1+=n,e.y2+=n)}(n,t),n}function Bm(e){return!e.isMinor&&e.position>=0&&e.position<=1}function $m(e){let{rect:t,state:n,majorTicks:r,measure:i,horizontal:o}=e;return o?function(e){let{majorTicks:t,measureText:n,rect:r,state:i}=e;const o="layered"===i.labels.activeMode?2:1,a=r.width,s=t.map(e=>e.label).map(e=>"".concat(e.slice(0,1)).concat(e.length>1?"…":"")).map(n).map(e=>e.width);for(let e=0;e<t.length;++e){const n=t[e];if(o*a*Math.abs(n.start-n.end)<s[e])return!0}return!1}({majorTicks:r,measureText:i,rect:t,state:n}):function(e){let{majorTicks:t,measureText:n,rect:r}=e;const i=r.height,o=n("M").height;return!(t.length<2)&&i*Math.abs(t[0].position-t[1].position)<o}({majorTicks:r,measureText:i,rect:t})}function Wm(e){let{value:t,maxValue:n,minValue:r,range:i,modifier:o}=e;return isNaN(i)||isNaN(o)||(t=i*o),t>n&&(t=n),t<r&&(t=r),t}function Um(e){let{isDiscrete:t,rect:n,formatter:r,measureText:i,scale:o,settings:a,state:s}=e,l=0;const c={left:0,top:0,right:0,bottom:0},{maxLengthPx:u,minLengthPx:d}=a.labels;if(a.labels.show){const e=a.align,f="top"===e||"bottom"===e,p=f?n.inner.width:n.inner.height,h=o.ticks({settings:a,distance:p,formatter:r}).filter(Bm),m=e=>{const t=i({text:e,fontSize:a.labels.fontSize,fontFamily:a.labels.fontFamily});return t.width=Wm({value:t.width,maxValue:u,minValue:d}),t};if(t&&f&&"auto"===a.labels.mode&&(!function(e){let{majorTicks:t,measure:n,rect:r,state:i,settings:o}=e;const a=o.labels.maxGlyphCount,s="layered"===i.labels.activeMode?2:1,l=o.labels.tiltThreshold?o.labels.tiltThreshold:.7,c=n("…").width,u=r.width;let d=0,f=0;if(isNaN(a))for(let e=0;e<t.length;e++){const r=t[e],i=r.label,o=n(i).width*(i.length>1?l:1);if(f=s*u*Math.abs(r.start-r.end),o+c>f)return!0}else{const e=t.reduce((e,t)=>Math.min(Math.abs(t.start-t.end),e),1/0);if(f=s*u*e,d=n("M").width*l*a,d+c>f)return!0}return!1}({majorTicks:h,measure:m,rect:n.inner,state:s,settings:a})?s.labels.activeMode="horizontal":s.labels.activeMode="tilted"),!a.labels.filterOverlapping&&"tilted"!==s.labels.activeMode&&$m({rect:n.inner,state:s,majorTicks:h,measure:m,horizontal:f})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}let g,y;if("tilted"===s.labels.activeMode){const e=Math.abs(a.labels.tiltAngle)*(Math.PI/180);g=t=>Wm({value:t.width,maxValue:u,minValue:d})*Math.sin(e)+t.height*Math.cos(e)}else g=f?e=>e.height:e=>Wm({value:e.width,maxValue:u,minValue:d});if(f&&"tilted"!==s.labels.activeMode)y=["M"];else if(isNaN(a.labels.maxGlyphCount))y=h.map(e=>e.label);else{let e="";for(let t=0;t<a.labels.maxGlyphCount;t++)e+="M";y=[e]}const v=y.map(m),b=v.map(g),x=Math.max(...b,0);if(l+=x,l+=a.labels.margin,"layered"===s.labels.activeMode&&(l*=2),"tilted"===s.labels.activeMode){const e="bottom"===a.align==a.labels.tiltAngle>=0,t=Math.abs(a.labels.tiltAngle)*(Math.PI/180),r=(x-m("M").height*Math.cos(t))/Math.sin(t),i=e=>Math.min(r,e.width)*Math.cos(t)+e.height,o=(t,r)=>{const i=h[r]?h[r].position:0;return e?t-i*n.inner.width:t-(1-i)*n.inner.width},s=Math.min(a.labels.maxEdgeBleed,Math.max(...v.map(i).map(o),0))+a.paddingEnd;if(c[e?"left":"right"]=s,!a.labels.filterOverlapping&&function(e){let{majorTicks:t,measureText:n,rect:r,bleedSize:i,angle:o}=e;if(t.length<2)return!1;if(0===o)return!0;const a=Math.abs(o),s=1/(Math.min(r.outer.width-i,r.inner.width)*Math.abs(t[0].position-t[1].position));return n("M").height>Math.sin(a*(Math.PI/180))/s}({majorTicks:h,measureText:m,rect:n,bleedSize:s,angle:a.labels.tiltAngle})){return{size:Math.max(n.outer.width,n.outer.height),isToLarge:!0}}}}return{size:l,edgeBleed:c}}const Ym=(e,t,n)=>e.width*Math.abs(t.position-n.position);function Xm(e){let{layered:t,major:n,innerRect:r,outerRect:i,tick:o,index:a}=e;const s=t?2:1,l=n[a-s],c=n[a+s],u=l?Ym(r,o,l)/2-2:1/0,d=c?Ym(r,o,c)/2-2:1/0;return n.length<2?r.width:l?c?2*Math.min(u,d):(e=>{let{innerRect:t,outerRect:n,tick:r,prevWidth:i}=e;const o=t.x-n.x,a=n.width-t.width-o,s=t.width-t.width*r.position+a,l=2*Math.min(i,s),c=1===r.position?t.width/2-2:0;return Math.max(i,l,c)})({innerRect:r,outerRect:i,tick:o,prevWidth:u}):(e=>{let{innerRect:t,outerRect:n,tick:r,nextWidth:i}=e;const o=t.x-n.x,a=t.width*r.position+o,s=2*Math.min(i,a),l=0===r.position?t.width/2-2:0;return Math.max(i,s,l)})({innerRect:r,outerRect:i,tick:o,nextWidth:d})}function Gm(e){const t=e.innerRect,n={cx:t.width/2,cy:t.height/2},r=Math.min(t.height,t.width)/2*e.radius,i=r+e.style.strokeWidth,o={visible:!0,type:"path",arcDatum:{startAngle:e.startAngle,endAngle:e.endAngle},transform:"translate(0, 0) translate(".concat(n.cx,", ").concat(n.cy,")"),desc:{share:1,slice:{cornerRadius:0,innerRadius:r,outerRadius:i}},ticks:[]};return function(e,t){Va(e,t.style)}(o,e),o}function Km(e,t,n,r){return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}}function Zm(e,t){const n=t.innerRect,r={cx:n.width/2,cy:n.height/2},i=Math.min(n.height,n.width)/2*t.radius+t.padding,o=t.startAngle,a=t.endAngle,s=t.tickSize,l=a-o;let c=a-e.position*l;c-=Math.PI/2;const u=Km(r.cx,r.cy,i+s,c),d=Km(r.cx,r.cy,i,c),f={type:"line",x1:u.x,y1:u.y,x2:d.x,y2:d.y,value:e.value};return function(e,t){const n=Wa({},t.style);Va(e,n)}(f,t),f}function Jm(e){return"string"==typeof e||"number"==typeof e?e:"-"}function Qm(e,t,n){let r;return r="left"===t?n.x:"right"===t?e.outerRect.width-n.x:Math.max(n.x,e.outerRect.width-n.x),r}function eg(e,t){const n=t.innerRect,r={cx:n.width/2,cy:n.height/2},i=Math.min(n.height,n.width)/2*t.radius+t.padding,o=t.startAngle,a=t.endAngle,s=t.tickSize,l=a-o,c=.2;let u,d;u="top"===t.align||"bottom"===t.align?a-e.position*l:o+e.position*l,d=u<-.2&&u>-Math.PI+c?"left":u>.2&&u<Math.PI-c?"right":"center",u-=Math.PI/2;const f=function(e,t,n,r){return{x:e+n*Math.cos(r),y:t+n*Math.sin(r)}}(r.cx,r.cy,i+s+6,u);let p;p="left"===d?"end":"right"===d?"start":"middle";const h={type:"text",text:Jm(e.label),align:d,x:f.x,y:f.y,maxHeight:t.maxHeight,maxWidth:Qm(t,d,f),anchor:p,baseline:"middle"};return function(e,t){["fill","fontSize","fontFamily"].forEach(n=>{e[n]=t.style[n]})}(h,t),function(e,t){e.boundingRect=t.textBounds(e)}(h,t),function(e,t,n){let r,i;const o=parseFloat(n.fontSize)||0;r=t.y-o/2,i=e.innerRect.height-(t.y+o/2),(r<0||i<0)&&(n.text="")}(t,f,h),h}function tg(e){let t=0;return t+=e.paddingStart,t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0,t}function ng(e){let t=0;return t+=e.line.show?e.line.strokeWidth/2:0,t+=e.ticks.show?e.ticks.margin:0,t}function rg(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=tg(e)+e.labels.margin,t}function ig(e,t){return e.map(e=>Hm(e,t))}function og(e,t){return t?Math.abs(t.end-t.start):e.bandwidth()}function ag(e){let{textMetrics:t,settings:n,innerRect:r,scale:i,tilted:o,layered:a,tick:s}=e;const l=t.height,c=og(i,s),u={width:0,height:l};if("left"===n.align||"right"===n.align)u.width=r.width-rg(n)-n.paddingEnd;else if(a)u.width=c*r.width*2;else if(o){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);u.width=(r.height-rg(n)-n.paddingEnd-l*Math.cos(e))/Math.sin(e)}else u.width=c*r.width;return u.width=Wm({value:u.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),u}function sg(e){let{textMetrics:t,settings:n,innerRect:r,outerRect:i,tilted:o,layered:a,tick:s,index:l,major:c}=e;const u=t.height,d={width:0,height:u};if("left"===n.align||"right"===n.align)d.width=r.width-rg(n)-n.paddingEnd;else if(o){const e=Math.abs(n.labels.tiltAngle)*(Math.PI/180);d.width=(r.height-rg(n)-n.paddingEnd-u*Math.cos(e))/Math.sin(e)}else d.width=Xm({layered:a,major:c,innerRect:r,outerRect:i,tick:s,index:l});return d.width=Wm({value:d.width,maxValue:n.labels.maxLengthPx,minValue:n.labels.minLengthPx}),d}function lg(e){let t;function n(){return t=sg,n}function r(){return t=ag,r}function i(e){let{settings:n,scale:r,innerRect:i,outerRect:o,measureText:a,ticks:s,state:l,textBounds:c}=e;const u=[],d=function(e){return e.filter(e=>!e.isMinor)}(s),f=function(e){return e.filter(e=>e.isMinor)}(s),p={innerRect:i,align:n.align,outerRect:o},h="tilted"===l.labels.activeMode,m="layered"===l.labels.activeMode;let g;if(n.arc&&(p.startAngle=n.arc.startAngle,p.endAngle=n.arc.endAngle,p.radius=n.arc.radius),n.line.show&&(p.style=n.line,p.padding=n.paddingStart,n.arc?u.push(Gm(p)):u.push(Rm(p))),n.ticks.show&&(p.style=n.ticks,p.tickSize=n.ticks.tickSize,p.padding=tg(n),n.arc?(p.padding=ng(n),g=function(e,t){return e.map(e=>Zm(e,t))}(d,p)):g=ig(d,p)),n.labels.show){const e=rg(n);p.style=n.labels,p.padding=e,p.tilted=h,p.layered=m,p.angle=n.labels.tiltAngle,p.paddingEnd=n.paddingEnd,p.textBounds=c;const s=(e,s)=>{p.textRect=function(e){let{style:t,measureText:n,tick:r}=e;return n({text:r.label,fontSize:t.fontSize,fontFamily:t.fontFamily})}({tick:e,measureText:a,style:p.style});const l=t({textMetrics:p.textRect,settings:n,innerRect:i,outerRect:o,scale:r,tilted:h,layered:m,tick:e,major:d,index:s});p.maxWidth=l.width,p.maxHeight=l.height,p.stepSize=function(e){let{innerRect:t,scale:n,settings:r,tick:i}=e;return("top"===r.align||"bottom"===r.align?t.width:t.height)*og(n,i)}({innerRect:i,scale:r,settings:n,tick:e})};let l=[];n.arc?(p.padding=function(e){let t=0;return t+=e.ticks.show?e.ticks.tickSize:0,t+=ng(e)+e.labels.margin,t}(n),l=function(e,t,n){return e.map((e,r)=>{n(e,r);const i=eg(e,t);return i.data=e.data,i})}(d,p,s)):l=!m||"top"!==n.align&&"bottom"!==n.align?function(e,t,n){return e.map((e,r)=>{n(e,r);const i=Vm(e,t);return i.data=e.data,i})}(d,p,s):function(e,t,n,r){const i=t.padding,o=rg(n);return e.map((e,a)=>{r(e,a);const s=o+t.maxHeight+n.labels.margin;t.layer=a%2,t.padding=a%2==0?i:s;const l=Vm(e,t);return l.data=e.data,l})}(d,p,n,s),n.labels.filterOverlapping&&function(e,t,n){let r=(t,n)=>ah(ts(1,e[t].boundingRect),ts(1,e[n].boundingRect));if(n&&n.tilted){const t=Math.abs(n.angle);r=(n,r)=>{const i=1/Math.abs(e[n].x-e[r].x),o=Math.sin(t*(Math.PI/180))/i;return e[n].boundingRect.height>o}}for(let n=0;n<=e.length-1;n++)for(let i=n+1;i<=Math.min(n+5,n+(e.length-1));i++)e[n]&&e[i]&&r(n,i)&&(i===e.length-1?(e.splice(n,1),t&&t.splice(n,1)):(e.splice(i,1),t&&t.splice(i,1)),i--,n--)}(l,g,p),u.push(...l)}return n.minorTicks&&n.minorTicks.show&&f.length>0&&(p.style=n.minorTicks,p.tickSize=n.minorTicks.tickSize,p.padding=function(e){return e.line.strokeWidth+e.minorTicks.margin}(n),u.push(...ig(f,p))),g&&u.push(...g),u}return n.build=i,r.build=i,e?r():n()}const cg={labels:{show:!0,tiltAngle:40,tiltThreshold:.7,maxEdgeBleed:1/0,margin:4,maxLengthPx:150,minLengthPx:0,mode:"auto",maxGlyphCount:NaN,align:.5,offset:0,filterOverlapping:!1},ticks:{show:!1,margin:0,tickSize:4},line:{show:!1},paddingStart:0,paddingEnd:10,align:"auto"},ug={labels:{show:!0,margin:4,maxLengthPx:150,minLengthPx:0,align:.5,offset:0,filterOverlapping:!0},ticks:{show:!0,margin:0,tickSize:8},minorTicks:{show:!1,tickSize:3,margin:0},line:{show:!0},paddingStart:0,paddingEnd:10,align:"auto"};const dg={require:["chart","renderer","dockConfig"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{},style:{labels:"$label",ticks:"$guide-line",minorTicks:"$guide-line--minor",line:"$guide-line"}},created(){this.state={isDiscrete:!!this.scale.bandwidth,isHorizontal:!1,labels:{activeMode:"horizontal"},ticks:[],innerRect:{width:0,height:0,x:0,y:0},outerRect:{width:0,height:0,x:0,y:0},defaultDock:void 0,concreteNodeBuilder:void 0,settings:void 0},this.state.isDiscrete?this.state.defaultDock="bottom":this.state.defaultDock="left",this.setState(this.settings)},setState(){this.state.isDiscrete=!!this.scale.bandwidth,this.state.settings=function(e){let{state:t,style:n,settings:r}=e;const i=Va(!0,{},t.isDiscrete?cg:ug,n),o=Va(!0,{},i,r.settings),a=r.layout.dock||t.defaultDock;o.dock=a,o.align=function(e,t){const n=["top","bottom"],r=["left","right"];return-1!==n.indexOf(e)&&-1===r.indexOf(t)||-1!==r.indexOf(e)&&-1===n.indexOf(t)?e:t}(r.settings.align,a),o.labels.tiltAngle=Math.max(-90,Math.min(o.labels.tiltAngle,90));const{paddingStart:s,paddingEnd:l}=o;return o.paddingStart="function"==typeof s?s.call(null):s,o.paddingEnd="function"==typeof l?l.call(null):l,o}(this),this.state.concreteNodeBuilder=lg(this.state.isDiscrete),this.dockConfig.dock(this.state.settings.dock),this.state.isHorizontal="top"===this.state.settings.align||"bottom"===this.state.settings.align,this.state.labels.activeMode=function(e,t,n){const r=t.labels.mode;return n&&e.isHorizontal?"auto"===r?e.labels.activeMode:-1!==["layered","tilted"].indexOf(t.labels.mode)&&-1!==["top","bottom"].indexOf(t.dock)?r:"horizontal":"horizontal"}(this.state,this.state.settings,this.state.isDiscrete)},preferredSize(e){const{formatter:t,state:n,scale:r}=this,i=this.state.isHorizontal?e.inner.width:e.inner.height;this.state.pxScale=fp(r,i);const o=function(e){let{isDiscrete:t,rect:n,formatter:r,measureText:i,scale:o,settings:a,state:s}=e,l=0;const{size:c,edgeBleed:u,isToLarge:d}=Um({isDiscrete:t,rect:n,formatter:r,measureText:i,scale:o,settings:a,state:s});if(l+=c,d)return{size:l};if(a.ticks.show&&(l+=a.ticks.margin,l+=a.ticks.tickSize),a.minorTicks&&a.minorTicks.show){const e=a.minorTicks.margin+a.minorTicks.tickSize;e>l&&(l=e)}if(a.line.show){const e=a.line.strokeWidth/2;l+=e,u[function(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left";default:return e}}(a.align)]=Math.ceil(e)}return l+=a.paddingStart,l+=a.paddingEnd,{size:l,edgeBleed:u}}({isDiscrete:this.state.isDiscrete,rect:{inner:e.inner,outer:e.outer},formatter:t,measureText:this.renderer.measureText,scale:this.state.pxScale,settings:this.state.settings,state:n});return o},beforeUpdate(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{settings:t}=e;this.setState(t)},resize(e){const{inner:t,outer:n}=e,r=Va({},t,function(e){let{align:t,inner:n}=e;return"left"===t?{x:n.width+n.x}:"right"===t||"bottom"===t?n:{y:n.y+n.height}}({align:this.state.settings.align,inner:t})),i=n||r;return Va(this.state.innerRect,r),Va(this.state.outerRect,i),n},beforeRender(){const{scale:e,formatter:t}=this,n=this.state.isHorizontal?this.state.innerRect.width:this.state.innerRect.height;this.state.pxScale=fp(e,n),this.state.ticks=this.state.pxScale.ticks({distance:n,formatter:t}).filter(e=>e.position>=0&&e.position<=1)},render(){const{state:e}=this,t=[];return t.push(...this.state.concreteNodeBuilder.build({settings:this.state.settings,scale:this.state.pxScale,innerRect:this.state.innerRect,outerRect:this.state.outerRect,measureText:this.renderer.measureText,textBounds:this.renderer.textBounds,ticks:this.state.ticks,state:e})),wm.multiple(t),t}};const fg={render:()=>[]};function pg(e,t,n){let r="";if("function"==typeof e)r=e();else if("string"==typeof e)r=e;else if(n){const e=(n.data().fields||[]).map(e=>e.title());r=e.join(t)}return r}function hg(e,t){let n="middle";return"left"===e?"top"===t?n="end":"bottom"===t&&(n="start"):"right"===e?"top"===t?n="start":"bottom"===t&&(n="end"):"left"===t?n="start":"right"===t&&(n="end"),n}const mg={require:["renderer","chart"],defaultSettings:{layout:{dock:"bottom",displayOrder:0,prioOrder:0},settings:{paddingStart:5,paddingEnd:5,paddingLeft:0,paddingRight:0,anchor:"center",join:", ",maxLengthPx:NaN},style:{text:"$title"}},created(){this.definitionSettings=this.settings.settings;const e=this.settings.text,t=this.definitionSettings.join;this.title=pg(e,t,this.scale)},preferredSize(){return this.renderer.measureText({text:this.title,fontSize:this.style.text.fontSize,fontFamily:this.style.text.fontFamily}).height+this.definitionSettings.paddingStart+this.definitionSettings.paddingEnd},render(){const{title:e,definitionSettings:t,rect:n}=this,r=[];return r.push(function(e){let{title:t,definitionSettings:n,dock:r,rect:i,measureText:o,style:a}=e;const s={type:"text",text:t,x:0,y:0,dx:0,dy:0,anchor:hg(r,n.anchor),baseline:"alphabetical",stroke:"transparent",strokeWidth:0,fontWeight:"normal"};Va(s,a.text);const l=o(s);if("top"===r||"bottom"===r){let e=i.width/2;"left"===n.anchor?e=n.paddingLeft||0:"right"===n.anchor&&(e=i.width-(n.paddingRight||0)),s.x=e,s.y="top"===r?i.height-n.paddingStart:n.paddingStart+l.height,s.dy="top"===r?-l.height/6:-l.height/3,s.maxWidth=.8*i.width}else{let e=i.height/2;"top"===n.anchor?e=n.paddingStart:"bottom"===n.anchor&&(e=i.height-n.paddingStart),s.y=e,s.x="left"===r?i.width-n.paddingStart:n.paddingStart,s.dx="left"===r?-l.height/3:l.height/3;const t="left"===r?270:90;s.transform="rotate(".concat(t,", ").concat(s.x+s.dx,", ").concat(s.y+s.dy,")"),s.maxWidth=.8*i.height}return isNaN(n.maxLengthPx)||(s.maxWidth=Math.min(s.maxWidth,n.maxLengthPx)),s}({title:e,dock:this.settings.layout.dock,definitionSettings:t,rect:n,measureText:this.renderer.measureText,style:this.style})),r},beforeUpdate(e){e.settings&&(Va(this.settings,e.settings),this.definitionSettings=e.settings.settings);const t=this.settings.text,n=this.definitionSettings.join;this.title=pg(t,n,this.scale)}};function gg(e,t){const n=e.settings.layout.dock,r=e.settings.settings.invert,i="top"===n||"bottom"===n,o=i?"width":"height",a=e.rect[o],s=e.chart.scroll(e.settings.scroll);let l;{let e=t[i?"x":"y"];r&&(e=a-e);const n=s.getState();l={startOffset:e,startScroll:n.start,swipe:!1};const o=e/a*(n.max-n.min)+n.min;o<n.start?l.startScroll=o:o>n.start+n.viewSize&&(l.startScroll=o-n.viewSize)}return{update:e=>{let t=e[i?"x":"y"];if(r&&(t=a-t),!l.swipe){if(Math.abs(l.startOffset-t)<=1)return;l.swipe=!0}const n=s.getState(),o=(t-l.startOffset)/a*(n.max-n.min),c=l.startScroll+o;s.moveTo(c)},end:e=>{let t=e[i?"x":"y"];r&&(t=a-t);const n=s.getState();if(l.swipe){const e=(t-l.startOffset)/a*(n.max-n.min),r=l.startScroll+e;s.moveTo(r)}else{const e=t/a*(n.max-n.min)+n.min-n.viewSize/2;s.moveTo(e)}}}}function yg(e,t){const n=t.element().getBoundingClientRect();return{x:e.center.x-n.left,y:e.center.y-n.top}}const vg={require:["chart","renderer"],on:{panStart(e){const t=yg(e,this.renderer),n={x:t.x-e.deltaX,y:t.y-e.deltaY};this.currentMove=gg(this,n),this.currentMove.update(t)},panMove(e){if(!this.currentMove)return;const t=yg(e,this.renderer);this.currentMove.update(t)},panEnd(e){if(!this.currentMove)return;const t=yg(e,this.renderer);this.currentMove.end(t),this.currentMove=null},panCancel(){this.currentMove=null},tap(e){const t=yg(e,this.renderer);gg(this,t).end(t)}},defaultSettings:{settings:{backgroundColor:"#eee",thumbColor:"#ccc",width:16}},preferredSize:function(e){const t=this.chart.scroll(this.settings.scroll).getState();if(t.viewSize>=t.max-t.min){return Math.max(e.width,e.height)}return this.settings.settings.width},render:function(e){const t=this.settings.layout.dock,n=this.settings.settings.invert,r="top"===t||"bottom"===t,i=r?"width":"height",o=this.rect[i],a=this.chart.scroll(this.settings.scroll).getState();let s=o*(a.start-a.min)/(a.max-a.min);const l=o*a.viewSize/(a.max-a.min);return n&&(s=o-s-l),e("div",{style:{position:"relative",width:"100%",height:"100%",background:this.settings.settings.backgroundColor,pointerEvents:"auto"}},[].concat(e("div",{class:"scroller",style:{position:"absolute",[r?"left":"top"]:"".concat(s,"px"),[r?"top":"left"]:"25%",[r?"height":"width"]:"50%",[i]:"".concat(Math.max(1,l),"px"),background:this.settings.settings.thumbColor}})))},renderer:"dom"};function bg(e){let{h:t,isVertical:n,value:r,pos:i,align:o,borderHit:a,state:s,idx:l}=e;const c="end"!==o,u=c?{left:"0",top:"0"}:{right:"0",bottom:"0"};let d=0,f="100%",p="100%";return s.targetRect&&"start"===s.settings.bubbles.align?(f="".concat(s.targetRect.x+s.targetRect.width,"px"),p="".concat(s.targetRect.y+s.targetRect.height,"px")):s.targetRect&&"end"===s.settings.bubbles.align&&(d=n?s.targetRect.x:s.targetRect.y,f="".concat(s.rect.width-d,"px"),p="".concat(s.rect.height-d,"px")),c||(i-=a),t("div",{onmouseover(e){e.srcElement.children[0].style.backgroundColor="#000",e.srcElement.children[0].style[n?"height":"width"]="2px"},onmouseout(e){e.srcElement.children[0].style.backgroundColor=s.style.line.stroke,e.srcElement.children[0].style[n?"height":"width"]="1px"},"data-value":r,"data-key":[s.key,"edge",l].join("-"),style:{cursor:n?"ns-resize":"ew-resize",position:"absolute",left:"".concat(n?d:i,"px"),top:"".concat(n?i:d,"px"),height:n?"".concat(a,"px"):p,width:n?f:"".concat(a,"px"),pointerEvents:"auto"}},[t("div",{style:Va({backgroundColor:s.style.line.stroke,position:"absolute",height:n?"".concat(1,"px"):"100%",width:n?"100%":"".concat(1,"px"),pointerEvents:"none"},u)})])}function xg(e){let{h:t,isVertical:n,label:r,otherValue:i,rangeIdx:o,idx:a,pos:s,align:l,state:c,value:u}=e;const d="end"!==l,f="outside"===c.settings.bubbles.placement;let p,h="none";n?(p=d?"left":"right",f&&(h=d?"translate(-100%,  0px)":"translate(100%,  0px)")):(p=d?"top":"bottom",f&&(h=d?"translate(0px, -100%)":"translate(0px,  100%)"));let m=c.edit&&c.edit.rangeIdx===o&&c.edit.bubbleIdx===a;const g={position:"relative",borderRadius:"".concat(c.style.bubble.borderRadius,"px"),border:"".concat(c.style.bubble.strokeWidth,"px solid ").concat(c.style.bubble.stroke),backgroundColor:c.style.bubble.fill,color:c.style.bubble.color,fontFamily:c.style.bubble.fontFamily,fontSize:c.style.bubble.fontSize,padding:"4px 8px",textAlign:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"150px",minWidth:"50px",minHeight:"1em",pointerEvents:"auto",transform:n?"translate(0,-50%)":"translate(-50%,0)",cursor:n?"ns-resize":"ew-resize"};let y=c.style.bubble.stroke;const v=m?t("input",{type:"text",value:u,style:Wa(Wa({},g),{},{textAlign:"start",textOverflow:"",fontSize:"13px"}),onkeyup(e){if("Enter"===e.key){e.preventDefault(),e.stopPropagation();const t=parseFloat(e.target.value);isNaN(t)?(y="rgba(230, 78, 78, 0.6)",e.target.style.border="".concat(c.style.bubble.strokeWidth,"px solid ").concat(y)):c.onEditConfirmed(o,t,i)}else"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),c.onEditCanceled())}}):t("div",{"data-key":[c.key,"bubble",o,a].join("-"),"data-other-value":i,"data-idx":o,"data-bidx":a,style:g},[r]);return t("div",{style:{position:"absolute",[p]:"0",[n?"top":"left"]:"".concat(s,"px"),transform:h}},[v])}function wg(e){let{h:t,isVertical:n,top:r,height:i,color:o,on:a,opacity:s}=e;return t("div",Va({style:{backgroundColor:o,opacity:s,position:"absolute",left:n?0:"".concat(r,"px"),top:n?"".concat(r,"px"):0,height:n?"".concat(i,"px"):"100%",width:n?"100%":"".concat(i,"px"),pointerEvents:"auto"}},a),[])}function Sg(e){let{borderHit:t,els:n,isVertical:r,state:i,vStart:o,vEnd:a,idx:s}=e,l=0;i.targetRect&&(l=r?i.targetRect.y:i.targetRect.x);const c=!!i.scale,u=c?i.scale.norm(o)*i.size:o,d=c?i.scale.norm(a)*i.size:a,f=Math.abs(u-d),p=Math.min(u,d)+l,h=p+f;if(i.targetRect){const e=i.targetFillRect||i.targetRect,t=r?e.height:e.width,s=c?i.scale.norm(o)*t:o,l=c?i.scale.norm(a)*t:a,u=Math.abs(s-l),d=Math.min(s,l),f={h:i.h,isVertical:r,top:d,height:u,color:i.style.target.fill,opacity:i.style.target.opacity};i.style.target.opacity<.8&&(f.on={onmouseover(e){e.srcElement.style.opacity=i.style.target.opacity+.1},onmouseout(e){e.srcElement.style.opacity=i.style.target.opacity}}),n.push(i.h("div",{style:{position:"absolute",left:"".concat(e.x,"px"),top:"".concat(e.y,"px"),height:"".concat(e.height,"px"),width:"".concat(e.width,"px")}},[wg(f)]))}const m=u<d?o:a,g=u<d?a:o,[y,v]=c?i.scale.domain():[Math.min(o,a),Math.max(o,a)],b=m+1e-5>=y&&m-1e-5<=v,x=g-1e-5<=v&&g+1e-5>=y;b&&n.push(bg({h:i.h,isVertical:r,borderHit:t,value:m,pos:p,align:"start",state:i,idx:s})),x&&n.push(bg({h:i.h,isVertical:r,borderHit:t,value:g,pos:h,align:"end",state:i,idx:s}));const w=i.settings.bubbles;if(w&&w.show){w.fontSize,w.fontFamily,w.fill;const e=[o,a];b&&n.push(xg({h:i.h,isVertical:r,align:w.align,rangeIdx:s,idx:0,otherValue:g,value:m,label:"".concat(i.format(m,e)),pos:p,state:i})),x&&n.push(xg({h:i.h,isVertical:r,align:w.align,rangeIdx:s,idx:1,otherValue:m,value:g,label:"".concat(i.format(g,e)),pos:h,state:i}))}}function Mg(e){const t=e.active.limitHigh-e.active.end,n=e.active.limitLow-e.active.start;let r=e.current-e.start;return r=r<0?Math.max(r,n):Math.min(r,t),r}function kg(e){let t=[];const n=0===e.direction;if(Array.isArray(e.ranges)&&e.ranges.forEach((r,i)=>{e.active&&i===e.active.idx||Sg({borderHit:5,els:t,isVertical:n,state:e,vStart:Math.min(r.min,r.max),vEnd:Math.max(r.min,r.max),idx:i})}),e.active){let r=e.start,i=e.current;if(-1!==e.active.idx)if("foo"===e.active.mode)r=Math.min(e.active.start,e.active.end),i=Math.max(e.active.start,e.active.end);else if("modify"===e.active.mode)r=Math.min(e.start,e.current),i=Math.max(e.start,e.current);else{const t=Mg(e);r=e.active.start+t,i=e.active.end+t}Sg({borderHit:5,els:t,isVertical:n,state:e,vStart:r,vEnd:i,idx:e.active.idx})}return t}function Eg(e){return{min:e.scale.min(),max:e.scale.max()}}function Cg(e){return{min:0,max:e.direction?e.rect.width:e.rect.height}}function Ag(e,t,n){let r,i,o=e.ranges,a=-1;for(r=0;r<o.length;r++){if(o[r].min<=t&&t<=o[r].max){a=r,n.min=r?o[r-1].max:n.min,n.max=r+1<o.length?o[r+1].min:n.max;break}if(t<o[r].min){n.max=o[r].min,n.min=r?o[r-1].max:n.min;break}}-1===a&&o.length&&r>=o.length&&(n.min=o[o.length-1].max),-1!==a&&(i={idx:a,start:o[a].min,end:o[a].max,limitLow:n.min,limitHigh:n.max,mode:"foo"}),e.active=i}function Dg(e){e.renderer.render(kg(e))}function qg(e,t){if(!t||!t.isActive())return[];const n=e.scale.data(),r=(n&&n.fields||[]).map(e=>e.id()),i=t.brushes().filter(e=>"range"===e.type&&-1!==r.indexOf(e.id))[0];return i?i.brush.ranges():[]}function _g(e,t){let n,r=1/0;const i=t.domain(),o=t.bandwidth()/2;for(let a=0;a<i.length;++a){const s=Math.abs(e-o-t(i[a]));s<r&&(r=s,n=i[a])}return n}function Tg(e,t){return Math.min(...e)<=Math.max(...t)&&Math.max(...e)>=Math.min(...t)}function Ng(e){const t=e.reduce((e,t)=>(e.push(...Za(t.bounds)),e),[]);return Ja(t)}const Og={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{rangeStart(e){this.start(e)},rangeMove(e){this.move(e)},rangeEnd(e){this.end(e)},rangeClear(e){this.clear(e)},bubbleStart(e){this.bubbleStart(e)}},created(){this.state={key:this.settings.key||"brush-range"}},beforeRender(e){this.state.rect=e.size.computedInner},renderRanges(){this.state.started||(this.state.ranges=qg(this.state,this.state.brushInstance),this.state.active=null,Dg(this.state))},render(e){const t=this.settings.settings;this.state.direction="vertical"===t.direction?0:1;const n=this.renderer.element().getBoundingClientRect(),r=this.state.rect[0===this.state.direction?"height":"width"];let i=fp(this.chart.scale(t.scale),r);const o=function(e){const t={targetRect:null,targetFillRect:null,scale:null,size:null},n=e.settings.settings,r=n.target&&(n.target.components||(n.target.component?[n.target.component]:[])).map(t=>e.chart.component(t)).filter(e=>!!e&&!!e.rect),i=n.target&&n.target.selector?e.chart.findShapes(n.target.selector):[],o=n.target&&n.target.fillSelector?e.chart.findShapes(n.target.fillSelector):[];if(i.length>0){const r=Ng(i);if(t.size=r[0===e.state.direction?"height":"width"],t.scale=fp(e.chart.scale(n.scale),t.size),t.targetRect=r,o.length>0){const e=Ng(o);t.targetFillRect=e}}else if(r&&r.length>0){const n=r.slice(1).reduce((e,t)=>({x0:Math.min(e.x0,t.rect.computedInner.x),y0:Math.min(e.y0,t.rect.computedInner.y),x1:Math.max(e.x1,t.rect.computedInner.x+t.rect.computedInner.width),y1:Math.max(e.y1,t.rect.computedInner.y+t.rect.computedInner.height)}),{x0:r[0].rect.computedInner.x,y0:r[0].rect.computedInner.y,x1:r[0].rect.computedInner.x+r[0].rect.computedInner.width,y1:r[0].rect.computedInner.y+r[0].rect.computedInner.height});t.targetRect={x:n.x0-e.state.rect.x,y:n.y0-e.state.rect.y,width:n.x1-n.x0,height:n.y1-n.y0}}return t}(this);if(i=o.scale?o.scale:i,this.state.targetRect=o.targetRect,this.state.targetFillRect=o.targetFillRect,this.state.size=null===o.size?r:o.size,this.state.settings=t,this.state.style=this.style,this.state.offset=n,this.state.brush="object"==typeof t.brush?t.brush.context:t.brush,this.state.brushInstance=this.chart.brush(this.state.brush),this.state.renderer=this.renderer,this.state.multi=!!t.multiple,this.state.h=e,this.state.onEditConfirmed=(e,t,n)=>{this.state.edit=null,function(e,t,n,r){let i=e.ranges.map(e=>({min:e.min,max:e.max}));const o=e.scale.min(),a=e.scale.max();i[t]={min:Math.max(o,Math.min(n,r)),max:Math.min(a,Math.max(n,r))},e.ranges[t]=Wa({},i[t]);const s=e.scale.data();s&&s.fields&&s.fields.forEach(t=>{e.fauxBrushInstance||e.brushInstance.setRange(t.id(),i)})}(this.state,e,t,n),this.emit("bubbleEnd"),Dg(this.state)},this.state.onEditCanceled=()=>{this.state.edit=null,Dg(this.state)},this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX"},this.state.format="function"==typeof t.bubbles.label&&((e,n)=>t.bubbles.label.call(void 0,{datum:e,data:n,scale:i,resources:{scale:this.chart.scale,formatter:this.chart.formatter}})),{}.hasOwnProperty.call(i,"norm")){this.state.editable=!0,this.state.observeBrush="object"==typeof t.brush&&t.brush.observe,this.state.fauxBrushInstance=null,this.state.findValues=null,this.state.scale=i;const e=this.state.scale.data();!this.state.format&&e&&e.fields&&e.fields[0]&&(this.state.format=e.fields[0].formatter())}else this.state.editable=!1,this.state.scale=mf(),this.state.scale.data=i.data,this.state.format||(this.state.format=(e,t)=>Tg(i.range(),t)?function(e,t){const n=t.ticks(),r=t.domain().indexOf(_g(e,t));return-1!==r?n[r].label:"-"}(e,i):"-"),this.state.fauxBrushInstance=Qf(),this.state.findValues=e=>function(e,t){const n=t.domain(),r=t.range(),i=[];return e.forEach(e=>{if(!Tg(r,[e.min,e.max]))return;const o=n.indexOf(_g(e.min,t)),a=n.indexOf(_g(e.max,t));i.push.apply(i,n.slice(Math.min(o,a),Math.max(o,a)+1))}),i}(e,i);return this.state.ranges=qg(this.state,this.state.brushInstance),this.state.observeBrush||this.state.sourcedFromThisComponent?[kg(this.state)]:[]},mounted(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.on("update",this.renderRanges)},beforeDestroy(){this.state.observeBrush&&this.state.brushInstance&&this.state.brushInstance.removeListener("update",this.renderRanges)},start(e){!function(e){let{state:t,e:n,renderer:r,ranges:i,targetSize:o}=e;if(t.started)return;t.edit=null;const a=n.center.x-n.deltaX,s=n.center.y-n.deltaY;let l=document.elementFromPoint(a,s);r.element().contains(l)||(l=null);const c={started:!0};t.offset=Va({},r.element().getBoundingClientRect());const u=a-t.offset.left,d=s-t.offset.top;t.offset.left+=t.targetRect?t.targetRect.x:0,t.offset.top+=t.targetRect?t.targetRect.y:0,t.ranges=i(t,t.fauxBrushInstance||t.brushInstance);const f=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],p=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];c.current=t.scale.normInvert(p/t.size),c.start=t.scale.normInvert(f/t.size);let h=t.ranges;const m=Eg(t);let g,y,v=-1;if(l&&l.hasAttribute("data-idx"))v=parseInt(l.getAttribute("data-idx"),10),m.min=v>0?h[v-1].max:m.min,m.max=v+1<h.length?h[v+1].min:m.max;else{for(g=0;g<h.length;g++){if(h[g].min<=c.start&&c.start<=h[g].max){v=g,m.min=g?h[g-1].max:m.min,m.max=g+1<h.length?h[g+1].min:m.max;break}if(c.start<h[g].min){m.max=h[g].min,m.min=g?h[g-1].max:m.min;break}}-1===v&&h.length&&g>=h.length&&(m.min=h[h.length-1].max)}if(-1!==v||t.multi||(c.ranges=[],m.min=t.scale.min(),m.max=t.scale.max()),-1!==v)if(y={idx:v,start:h[v].min,end:h[v].max,limitLow:m.min,limitHigh:m.max,mode:"move"},l&&l.hasAttribute("data-other-value"))c.start=parseFloat(l.getAttribute("data-other-value")),y.mode="modify";else{let e=t.scale.norm(y.start)*t.size,n=t.scale.norm(y.end)*t.size;Math.abs(f-e)<=o?(c.start=y.end,y.mode="modify"):Math.abs(f-n)<=o&&(c.start=y.start,y.mode="modify")}else y={idx:-1,start:c.start,end:c.current,limitLow:m.min,limitHigh:m.max,mode:"current"};c.active=y,"modify"!==y.mode&&t.targetRect&&!lh(t.targetRect,{x:u,y:d})||Object.keys(c).forEach(e=>t[e]=c[e])}({e:e,state:this.state,renderer:this.renderer,ranges:qg,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e,e.fauxBrushInstance||e.brushInstance);const n=Eg(e);Ag(e,e.current,n)}(this.state,qg),Dg(this.state),this.state.sourcedFromThisComponent=!0,this.state.active=null)},move(e){this.state.started&&(!function(e,t){const n=(t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset])/e.size,r=e.scale.normInvert(n);e.current=Math.max(Math.min(r,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){let t=e.ranges.map(e=>({min:e.min,max:e.max}));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{const n=Mg(e);t[e.active.idx].min+=n,t[e.active.idx].max+=n}else t.push({min:Math.min(e.start,e.current),max:Math.max(e.start,e.current)});const n=e.scale.data();n&&n.fields&&n.fields.forEach(n=>{if(e.fauxBrushInstance){let r=qg(e,e.fauxBrushInstance),i=e.findValues(r),o=e.findValues(t),a=o.filter(e=>-1===i.indexOf(e)),s=i.filter(e=>-1===o.indexOf(e)),l=a.map(e=>({key:n.id(),value:e})),c=s.map(e=>({key:n.id(),value:e}));e.brushInstance.addAndRemoveValues(l,c),e.fauxBrushInstance.setRange(n.id(),t)}else e.brushInstance.setRange(n.id(),t)})}(this.state),Dg(this.state))},clear(){this.state.fauxBrushInstance&&this.state.fauxBrushInstance.clear(),this.state.renderer.render([]),this.state.started=!1,this.state.active=null,this.state.sourcedFromThisComponent=!1},bubbleStart(e){if(!this.state.editable)return;const t=e.srcEvent||e,n=t.target,r={rangeIdx:parseInt(n.getAttribute("data-idx"),10),bubbleIdx:parseInt(n.getAttribute("data-bidx"),10)};if(isNaN(r.rangeIdx)||JSON.stringify(r)===JSON.stringify(this.state.edit))return;this.state.edit=r,t.stopPropagation(),t.stopImmediatePropagation(),t.preventDefault();const i=n.parentNode;Dg(this.state);const o=i.querySelector("input");o.focus(),o.select()}};function Ig(e){e.renderer.render(kg(e))}function Lg(e){return e.rc.ranges()}function Pg(e,t){const n={x:e.direction?t.min+e.rect.x:e.rect.x,y:e.direction?e.rect.y:t.min+e.rect.y,width:e.direction?t.max-t.min:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:t.max-t.min};return e.chart.shapesAt(n,e.settings.brush)}const Rg={require:["chart","settings","renderer"],defaultSettings:{settings:{bubbles:{show:!0,align:"start"}},style:{bubble:"$label-overlay",line:"$shape-guide--inverted",target:"$selection-area-target"}},renderer:"dom",on:{areaStart(e){this.start(e)},areaMove(e){this.move(e)},areaEnd(e){this.end(e)},areaClear(e){this.clear(e)}},created(){this.state={key:this.settings.key||"brush-area-dir"}},render(e){this.state.rect=this.rect;const t=this.settings.settings,n="vertical"===t.direction?0:1,r=this.state.rect[0===n?"height":"width"],i=this.renderer.element().getBoundingClientRect(),o=(t.target?t.target.components||[t.target.component]:[]).map(e=>this.chart.component(e)).filter(e=>!!e&&!!e.rect),a=o[0]?o.slice(1).reduce((e,t)=>({x0:Math.min(e.x0,t.rect.x),y0:Math.min(e.y0,t.rect.y),x1:Math.max(e.x1,t.rect.x+t.rect.width),y1:Math.max(e.y1,t.rect.y+t.rect.height)}),{x0:o[0].rect.x,y0:o[0].rect.y,x1:o[0].rect.x+o[0].rect.width,y1:o[0].rect.y+o[0].rect.height}):null;return this.state.targetRect=a?{x:a.x0-this.rect.x,y:a.y0-this.rect.y,width:a.x1-a.x0,height:a.y1-a.y0}:null,this.state.style=this.style,this.state.chart=this.chart,this.state.direction=n,this.state.settings=t,this.state.offset=i,this.state.rc=Vf(),this.state.renderer=this.renderer,this.state.multi=!!t.multiple,this.state.h=e,this.state.size=r,this.state.cssCoord={offset:0===this.state.direction?"top":"left",coord:0===this.state.direction?"y":"x",pos:0===this.state.direction?"deltaY":"deltaX",area:0===this.state.direction?"height":"width"},this.state.format=function(e,t){return function(e,t,n){const r=Math.min(...n),i=Math.max(...n),o={x:e.direction?r+e.rect.x:e.rect.x,y:e.direction?e.rect.y:r+e.rect.y,width:e.direction?i-r:e.rect.width+e.rect.x,height:e.direction?e.rect.height+e.rect.y:i-r},a=e.chart.shapesAt(o,e.settings.brush);if(0===a.length)return"-";const s=a.reduce((n,i)=>{const o=n.bounds,a=i.bounds;return t===r?o[e.cssCoord.coord]<=a[e.cssCoord.coord]?n:i:o[e.cssCoord.coord]+o[e.cssCoord.area]>=a[e.cssCoord.coord]+a[e.cssCoord.area]?n:i}),l=e.settings.brush.components.reduce((e,t)=>e.key===s.key?e:t);return"function"==typeof e.settings.bubbles.label?e.settings.bubbles.label(s.data):Array.isArray(l.data)&&l.data.length?s.data[l.data[0]].label:s.data&&s.data.label?s.data.label:"-"}(this,e,t)},[]},start(e){!function(e){let{state:t,e:n,renderer:r,ranges:i,targetSize:o}=e;if(t.started)return;const a=n.center.x-n.deltaX,s=n.center.y-n.deltaY;let l=document.elementFromPoint(a,s);r.element().contains(l)||(l=null);const c={started:!0};t.offset=r.element().getBoundingClientRect(),t.ranges=i(t);const u=a-t.offset.left,d=s-t.offset.top,f=n.center[t.cssCoord.coord]-n[t.cssCoord.pos]-t.offset[t.cssCoord.offset],p=n.center[t.cssCoord.coord]-t.offset[t.cssCoord.offset];let h=p,m=f;c.start=f,c.current=p;let g=t.ranges;const y=Cg(t);let v,b,x=-1;if(l&&l.hasAttribute("data-idx"))x=parseInt(l.getAttribute("data-idx"),10),y.min=x>0?g[x-1].max:y.min,y.max=x+1<g.length?g[x+1].min:y.max;else{for(v=0;v<g.length;v++){if(g[v].min<=m&&m<=g[v].max){x=v,y.min=v?g[v-1].max:y.min,y.max=v+1<g.length?g[v+1].min:y.max;break}if(m<g[v].min){y.max=g[v].min,y.min=v?g[v-1].max:y.min;break}}-1===x&&g.length&&v>=g.length&&(y.min=g[g.length-1].max)}if(-1!==x||t.multi||(c.ranges=[],y.min=0,y.max=t.direction?t.rect.width:t.rect.height),-1!==x)if(b={idx:x,start:g[x].min,end:g[x].max,limitLow:y.min,limitHigh:y.max,mode:"move"},l&&l.hasAttribute("data-other-value"))c.start=parseFloat(l.getAttribute("data-other-value")),b.mode="modify";else{let e=b.start,t=b.end;Math.abs(f-e)<=o?(c.start=b.end,b.mode="modify"):Math.abs(f-t)<=o&&(c.start=b.start,b.mode="modify")}else b={idx:-1,start:m,end:h,limitLow:y.min,limitHigh:y.max,mode:"current"};c.active=b,"modify"!==b.mode&&t.targetRect&&!lh(t.targetRect,{x:u,y:d})||Object.keys(c).forEach(e=>t[e]=c[e])}({e:e,state:this.state,renderer:this.renderer,ranges:Lg,targetSize:5})},end(){this.state.started&&(!function(e,t){e.started=!1,e.ranges=t(e);const n=Cg(e);Ag(e,e.current,n)}(this.state,Lg),Ig(this.state))},move(e){this.state.started&&(!function(e,t){const n=t.center[e.cssCoord.coord]-e.offset[e.cssCoord.offset];e.current=Math.max(Math.min(n,e.active.limitHigh),e.active.limitLow)}(this.state,e),function(e){const t=e.ranges.map(e=>({min:e.min,max:e.max}));if(-1!==e.active.idx)if("modify"===e.active.mode)t[e.active.idx].min=Math.min(e.start,e.current),t[e.active.idx].max=Math.max(e.start,e.current);else{const n=Mg(e);t[e.active.idx].min=e.active.start+n,t[e.active.idx].max=e.active.end+n}else t.push({min:Math.min(e.start,e.current),max:Math.max(e.start,e.current)});e.rc.set(t);let n=[];t.forEach(t=>{n=[...n,...Pg(e,t)]}),function(e,t){e.chart.brushFromShapes(t,e.settings.brush)}(e,n)}(this.state),Ig(this.state))},clear(){this.state.rc&&this.state.rc.clear(),this.state.renderer.render([])}};function zg(e){const t="vertical"===e.direction,n=e.rect[t?"height":"width"],r=e.rect[t?"width":"height"];return function(e){const t=e.brush;if(!t||!t.isActive())return[];const n=e.scale.data(),r=(n&&n.fields||[]).map(e=>e.id()),i=t.brushes().filter(e=>"range"===e.type&&-1!==r.indexOf(e.id))[0];return i?i.brush.ranges():[]}(e).map(i=>{const o=e.scale(i.min)*n,a=e.scale(i.max)*n,s=Math.min(o,a),l=Math.abs(o-a);return{type:"rect",fill:e.fill,opacity:e.opacity,x:t?0:s,width:t?r:l,y:t?s:0,height:t?l:r}})}function Fg(e,t,n,r){function i(){!function(e){e.renderer.render(zg(e))}(e)}function o(){!function(e){e.renderer.render(zg(e))}(e)}function a(){!function(e){e.renderer.render(zg(e))}(e)}e.brush=t,t&&(t.on("start",i),t.on("update",o),t.on("end",a),e.start=i,e.update=o,e.end=a,e.brush=t,e.scale=n,e.renderer=r)}function jg(e){e.brush&&(e.brush.removeListener("start",e.start),e.brush.removeListener("update",e.update),e.brush.removeListener("end",e.end)),e.start=void 0,e.update=void 0,e.end=void 0,e.brush=void 0,e.scale=void 0,e.renderer=void 0}const Vg={require:["chart","settings","renderer"],defaultSettings:{settings:{}},preferredSize:()=>50,created(){this.state={}},render(){const e=this.settings.settings,t=this.chart.brush(e.brush),n=e.direction||"horizontal",r="horizontal"===n?this.rect.width:this.rect.height,i=fp(this.chart.scale(e.scale),r);return jg(this.state),Fg(this.state,t,i,this.renderer),this.state.rect=this.rect,this.state.fill=e.fill||"#ccc",this.state.opacity=void 0!==e.opacity?e.opacity:1,this.state.direction=n,zg(this.state)},beforeDestroy(){jg(this.state)}};function Hg(e,t){const n=t.center.x,r=t.center.y;return{x:n-e.left,y:r-e.top}}function Bg(e,t,n){return _p(e,t.points[0])<n.settings.snapIndicator.threshold**2}function $g(e,t){null==e.path.d?e.path.d="M".concat(t.x," ").concat(t.y," "):e.path.d+="L".concat(t.x," ").concat(t.y," "),e.points.push(t)}function Wg(e){let{state:t,start:n=null,end:r=null}=e;null!==n&&(t.snapIndicator.x1=n.x,t.snapIndicator.y1=n.y),null!==r&&(t.snapIndicator.x2=r.x,t.snapIndicator.y2=r.y)}function Ug(e,t){e.snapIndicator.visible=t}const Yg={require:["chart","renderer","settings"],defaultSettings:{layout:{displayOrder:0},settings:{brush:{components:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.5},lasso:{fill:"transparent",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:"20, 10"},startPoint:{r:10,fill:"green",stroke:"black",strokeWidth:1,opacity:1}}},on:{lassoStart(e){this.start(e)},lassoEnd(e){this.end(e)},lassoMove(e){this.move(e)},lassoCancel(){this.cancel()}},created(){this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}}},start(e){var t;this.state.active=!0,this.state.path={visible:!0,type:"path",d:null,fill:(t=this.settings.settings.lasso).fill,stroke:t.stroke,strokeWidth:t.strokeWidth,opacity:t.opacity,strokeDasharray:t.strokeDasharray,collider:{type:null}},this.state.snapIndicator=function(e){return{visible:!1,type:"line",x1:0,y1:0,x2:0,y2:0,strokeDasharray:e.strokeDasharray,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity,collider:{type:null}}}(this.settings.settings.snapIndicator),this.state.startPoint=function(e){return{visible:!0,type:"circle",cx:0,cy:0,r:e.r,fill:e.fill,opacity:e.opacity,stroke:e.stroke,strokeWidth:e.strokeWidth,collider:{type:null}}}(this.settings.settings.startPoint),this.state.rendererBounds=this.renderer.element().getBoundingClientRect(),this.state.componentDelta=function(e,t){const n=e.element.getBoundingClientRect();return{x:t.left-n.left,y:t.top-n.top}}(this.chart,this.state.rendererBounds),this.state.brushConfig=this.settings.settings.brush.components.map(e=>({key:e.key,contexts:e.contexts||["lassoBrush"],data:e.data||[""],action:e.action||"add"}));const n=Hg(this.state.rendererBounds,e);$g(this.state,n),Wg({state:this.state,start:n}),function(e,t){e.startPoint.cx=t.x,e.startPoint.cy=t.y}(this.state,n)},move(e){if(!this.state.active)return;const t=Hg(this.state.rendererBounds,e);Bg(t,this.state,this.settings)?Ug(this.state,!0):Ug(this.state,!1),$g(this.state,t),Wg({state:this.state,end:t}),function(e,t){const n=[e.startPoint,e.path,e.snapIndicator].filter(e=>e.visible);t.render(n)}(this.state,this.renderer),function(e,t){if(e.active){const n=e.points[e.points.length-2],r=e.points[e.points.length-1];e.lineBrushShape.x1=n.x+e.componentDelta.x,e.lineBrushShape.y1=n.y+e.componentDelta.y,e.lineBrushShape.x2=r.x+e.componentDelta.x,e.lineBrushShape.y2=r.y+e.componentDelta.y;const i=t.shapesAt(e.lineBrushShape,{components:e.brushConfig});t.brushFromShapes(i,{components:e.brushConfig})}}(this.state,this.chart)},end(e){if(!this.state.active)return;Ug(this.state,!1);Bg(Hg(this.state.rendererBounds,e),this.state,this.settings)&&function(e,t){if(e.active){const n=e.componentDelta.x,r=e.componentDelta.y,i=e.points.map(e=>({x:e.x+n,y:e.y+r})),o=t.shapesAt({vertices:i},{components:e.brushConfig});t.brushFromShapes(o,{components:e.brushConfig})}}(this.state,this.chart),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([])},cancel(){this.state.active&&(!function(e,t){e.brushConfig.forEach(e=>{e.contexts.forEach(e=>{t.brush(e).end()})})}(this.state,this.chart),this.state={points:[],active:!1,path:null,snapIndicator:null,startPoint:null,rendererBounds:null,componentDelta:null,brushConfig:null,lineBrushShape:{x1:0,y1:0,x2:0,y2:0}},this.renderer.render([]))},render(){}};function Xg(e,t,n,r,i){let o,a=0,s=t.length-1;for(;a<s;){let l=Math.floor((a+s)/2);o=i(t[l]),o[n]+o[r]<e[n]?a=l+1:s=l}return a}function Gg(e){let{orientation:t,targetNodes:n,labels:r,container:i}=e,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Xg;const a=[],s="v"===t?"x":"y",l="v"===t?"width":"height",c=e=>e.textBounds,u=e=>e.node.localBounds;return(e,t)=>{const{textBounds:d,node:f}=r[t];if(d[s]<i[s]||d[s]+d[l]>i[s]+i[l])return!1;for(let e=o(d,a,s,l,c);e<a.length;e++)if(ah(d,a[e].textBounds))return!1;const p=o(d,n,s,l,u),h=d[s]+d[l];for(let e=p;e<n.length;e++){const t=n[e].node;if(h<t.localBounds[s])break;if(ah(d,t.localBounds)&&f!==t)return!1}return a.push(r[t]),!0}}const Kg=4;function Zg(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function Jg(e){const t=typeof e;return("string"===t||"number"===t)&&""!==e}function Qg(e){return Wa(Wa({type:"rect",rx:2,ry:2,fill:e.backgroundColor},e.backgroundBounds),{},{data:"".concat(e.data," ").concat(e.text),rotation:e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal"})}function ey(e,t,n){return n?e.width>=t.height:e.width>=t.width}function ty(e,t,n){return n?e.height>=t.width:e.height>=t.height}function ny(e,t,n,r,i){let o,a;return"v"===e?(o=r||i||ey(t,n,!0),a=ty(t,n,!r)):(o=ey(t,n),a=i||ty(t,n,!1)),o&&a}function ry(e,t,n,r){return e+.5*t+(r-.5)*(t-n)-.5*n}function iy(e,t,n){const r={type:"text",text:t,maxWidth:n.rotate?e.height:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:n.rotate?"end":"start",baseline:"central",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},i=n.textMetrics;if(!n.overflow&&!function(e,t,n){return ey(e,t,n.rotate)&&ty(e,t,n.rotate)}(e,i,n))return!1;const o=.5*i.height;return n.rotate?(r.x=ry(e.x,e.width,i.height,n.align)+o,r.y=ry(e.y,e.height,i.width,n.justify),"right"===n.dock?r.transform="rotate(90, ".concat(r.x+r.dx,", ").concat(r.y+r.dy,") translate(").concat(i.width,", 0)"):r.transform="rotate(-90, ".concat(r.x+r.dx,", ").concat(r.y+r.dy,")")):(r.x=ry(e.x,e.width,i.width,n.align),r.y=ry(e.y,e.height,i.height,n.justify)+o),r}function oy(e){let{bar:t,view:n,direction:r,position:i,padding:o=Kg,measured:a}=e;const s={};if(Va(s,t),i&&"inside"!==i)if("up"===r||"down"===r){const e=Math.max(0,Math.min(t.y,n.height)),o=Math.max(0,Math.min(t.y+t.height,n.height));"outside"===i&&"up"===r||"opposite"===i&&"down"===r?(s.y=0,s.height=e):("outside"===i&&"down"===r||"opposite"===i&&"up"===r)&&(s.y=o,s.height=n.height-o)}else{const e=Math.max(0,Math.min(t.x,n.width)),o=Math.max(0,Math.min(t.x+t.width,n.width));"outside"===i&&"left"===r||"opposite"===i&&"right"===r?(s.x=0,s.width=e):("outside"===i&&"right"===r||"opposite"===i&&"left"===r)&&(s.x=o,s.width=n.width-o)}else;return function(e,t){const n=Math.max(0,Math.min(e.y,t.height)),r=Math.max(0,Math.min(e.y+e.height,t.height)),i=Math.max(0,Math.min(e.x,t.width)),o=Math.max(0,Math.min(e.x+e.width,t.width));e.x=i,e.width=o-i,e.y=n,e.height=r-n}(s,n),function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{top:r=Kg,bottom:i=Kg,left:o=Kg,right:a=Kg}=n,s="function"==typeof o?o(t):o,l="function"==typeof a?a(t):a,c="function"==typeof r?r(t):r,u="function"==typeof i?i(t):i;e.x+=s,e.width-=s+l,e.y+=c,e.height-=c+u}(s,a,o),s}function ay(e){let t,n,r,i,o,{direction:a,fitsHorizontally:s,measured:l,node:c,orientation:u,placementSettings:d,rect:f}=e,p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oy;const h=[],m="h"===u?"width":"height";for(o=0;o<d.length;o++)if(r=d[o],i=p({bar:c.localBounds,view:f,direction:a,position:r.position,padding:r.padding,measured:l}),h.push(i),t=!o||i[m]>t[m]?i:t,ny(u,i,l,s,r.overflow)){n=i;break}return n||(n=t,o=h.indexOf(n)),r=d[o],{bounds:n,placement:r}}function sy(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const{top:o=Kg,bottom:a=Kg,left:s=Kg,right:l=Kg}=i,c="function"==typeof s?s(t):s,u="function"==typeof l?l(t):l,d="function"==typeof o?o(t):o,f="function"==typeof a?a(t):a,p=e.x+e.dx,h=e.y+e.dy,m=n?Math.min(t.width,r.height):Math.min(t.height,r.width),g=n?Math.min(t.height,r.height):Math.min(t.width,r.width),y=.5*t.height,v=1e-9;return{x:(n?p-y:p)-c-v,y:(n?h:h-y)-d-v,width:g+(c+u)-v,height:m+(d+f)-v}}function ly(e){let{chart:t,targetNodes:n,rect:r,fitsHorizontally:i,collectiveOrientation:o}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ay,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:iy,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Gg;const c=[],u={container:r,targetNodes:n,labels:[],orientation:o};let d,f,p,h,m,g,y,v,b,x,w,S,M,k;for(let e=0,l=n.length;e<l;e++){g=null,f=n[e],p=f.node,M=Zg(p,t),b=f.direction,k="left"===b||"right"===b?"h":"v";for(let t=0;t<f.texts.length;t++){if(h=f.texts[t],!Jg(h))continue;x=f.labelSettings[t],v=f.measurements[t],S=x.placements;const n=a({direction:b,fitsHorizontally:i,lblStngs:x,measured:v,node:p,orientation:k,placements:S,placementSettings:f.placementSettings[t],rect:r});if(g=n.bounds,w=n.placement,g&&w){var E;m=w.justify;const t="function"==typeof x.linkData?x.linkData(M,e):void 0,n="function"==typeof w.overflow?w.overflow(M,e):w.overflow;"up"===b&&(m=1-m),"opposite"===w.position&&(m=1-m),"left"===b&&(m=1-m);const r=!("h"===o||i);if(d=s(g,h,{justify:"h"===k?w.align:m,align:"h"===k?m:w.align,fontSize:x.fontSize,fontFamily:x.fontFamily,textMetrics:v,rotate:r,overflow:!!n,dock:null!==(E=x.dock)&&void 0!==E?E:"left"}),d){const n=sy(d,v,r,g,w.padding);y="function"==typeof w.fill?w.fill(Wa(Wa({},M),{},{textBounds:n}),e):w.fill,d.fill=y,void 0!==t&&(d.data=t),"object"==typeof w.background&&(d.backgroundColor="function"==typeof w.background.fill?w.background.fill(Wa(Wa({},M),{},{textBounds:n}),e):w.background.fill,void 0!==d.backgroundColor&&(d.backgroundBounds=sy(d,v,r,g,w.background.padding))),c.push(d),u.labels.push({node:p,textBounds:n})}}}}const C=c.filter(l(u));return[...C.filter(e=>void 0!==e.backgroundBounds).map(Qg),...C]}function cy(e){const t=2*Math.PI;return(e%t+t)%t}function uy(e,t){e.x+=t,e.width-=2*t,e.y+=t,e.height-=2*t}function dy(e){return{x:e.x,y:e.y-e.height/2,width:e.width,height:e.height}}function fy(e,t,n){let{x:r,y:i}=t;if(r*r+i*i>e*e)return null;let o=Math.sin(n),a=Math.cos(n),s=r*a-i*o,l=e*e-s*s;if(l<0)return null;let c=Math.sqrt(l);return{x:s*a+o*c,y:-s*o+a*c}}function py(e){let t,n,{radius:r,size:i,angle:o}=e,{width:a,height:s}=i,l={x:a/2,y:s/2};switch(Math.floor(o/(Math.PI/2))){case 0:if(t=fy(r,l,o),!t)return null;t.y*=-1,n={x:-a,y:0};break;case 1:if(t=fy(r,l,Math.PI-o),!t)return null;n={x:-a,y:-s};break;case 2:if(t=fy(r,l,o-Math.PI),!t)return null;t.x*=-1,n={x:0,y:-s};break;case 3:if(t=fy(r,l,2*Math.PI-o),!t)return null;t.x*=-1,t.y*=-1,n={x:0,y:0};break;default:throw new Error("invalid angle")}return{x:t.x+n.x,y:t.y+n.y,width:a,height:s}}function hy(e){let{slice:t,measured:n,padding:r}=e,{start:i,end:o,innerRadius:a,outerRadius:s}=t,l=s-a-2*r,c=o-i;if(c<Math.PI){let e=(n.height/2+r)/Math.tan(c/2);e>a&&(l=s-e-2*r)}if(l<0||l<n.minReqWidth)return null;const u=cy((i+o)/2);let d=s-r,f={x:Math.sin(u)*d,y:-Math.cos(u)*d,width:l,height:n.height};return u<Math.PI?(f.angle=u-Math.PI/2,f.anchor="end"):(f.angle=u+Math.PI/2,f.anchor="start"),f}function my(e){let{context:t,node:n,bounds:r}=e;let{start:i,end:o}=n.desc.slice;const a=cy((i+o)/2);switch(Math.floor(a/(Math.PI/2))){case 0:t.q1maxY=r.y-2,void 0===t.q2minY&&(t.q2minY=r.y+r.height+2);break;case 1:t.q2minY=r.y+r.height+2;break;case 2:t.q3minY=r.y+r.height+2;break;case 3:t.q4maxY=r.y-2,void 0===t.q3minY&&(t.q3minY=r.y+r.height+2)}}function gy(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function yy(e,t,n){const r={type:"text",text:t,maxWidth:e.width,x:e.x,y:e.y+("top"===e.baseline?e.height/2:0),fill:n.fill,anchor:e.anchor||"start",baseline:"middle",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily};if(!isNaN(e.angle)){let t=e.angle*(360/(2*Math.PI));r.transform="rotate(".concat(t,", ").concat(r.x,", ").concat(r.y,")")}return r}function vy(e){let t,n,{slice:r,direction:i,position:o,padding:a,measured:s,view:l,context:c,store:u}=e,{start:d,end:f,innerRadius:p,offset:h}=r;switch(o){case"into":t="rotate"===i?hy({slice:r,measured:s,padding:a}):function(e){let{slice:t,padding:n,measured:r}=e,{start:i,end:o,innerRadius:a,outerRadius:s}=t;const l=cy((i+o)/2);let c=py({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return c?(c.baseline="top",ch(c,{x1:0,y1:0,x2:Math.sin(i)*s,y2:-Math.cos(i)*s})||ch(c,{x1:0,y1:0,x2:Math.sin(o)*s,y2:-Math.cos(o)*s})||eh({cx:0,cy:0,r:a},c)?null:(uy(c,n),c)):null}({slice:r,measured:s,padding:a});break;case"inside":n={start:d,end:f,innerRadius:0,outerRadius:p},t="rotate"===i?hy({slice:n,measured:s,padding:a}):function(e){let{slice:t,padding:n,measured:r,store:i}=e;const{start:o,end:a,outerRadius:s}=t,l=cy((o+a)/2);let c=py({radius:s,size:{width:r.width+2*n+1,height:r.height+2*n},angle:l});return c?(c.baseline="top",uy(c,n),i.insideLabelBounds.some(e=>ah(e,c))?null:(i.insideLabelBounds.push({x:c.x-4,y:c.y,width:c.width+8,height:c.height}),c)):null}({slice:n,measured:s,padding:a,store:u});break;case"outside":t="rotate"===i?function(e){let{slice:t,measured:n,padding:r,view:i}=e,{start:o,end:a,outerRadius:s,offset:l}=t,c=s+r,u=a-o;if(u<Math.PI&&(n.height/2+r)/Math.tan(u/2)>c)return null;const d=cy((o+a)/2);let f=Math.sin(d)*c,p=-Math.cos(d)*c,h=n.width+1,m=d%Math.PI;if(m>Math.PI/2&&(m=Math.PI-m),Math.cos(m)>.001){let e=p<0?i.y:i.y+i.height,t=Math.abs(e-l.y)/Math.cos(m)-Math.tan(m)*(n.height/2)-2*r-s;t<h&&(h=t)}if(Math.sin(m)>.001){let e=f<0?i.x:i.x+i.width,t=Math.abs(e-l.x)/Math.sin(m)-n.height/2/Math.tan(m)-2*r-s;t<h&&(h=t)}if(h<=0||h<n.minReqWidth)return null;let g={x:f,y:p,width:h,height:n.height};return d<Math.PI?(g.angle=d-Math.PI/2,g.anchor="start"):(g.angle=d+Math.PI/2,g.anchor="end"),g}({slice:r,measured:s,padding:a,view:l}):function(e){let{slice:t,measured:n,padding:r,view:i,context:o}=e,{start:a,end:s,outerRadius:l,offset:c}=t;const u=cy((a+s)/2);if(function(e,t,n){switch(t){case 0:return e.q1maxY<0;case 1:return e.q2minY>n.height;case 2:return e.q3minY>n.height;case 3:return e.q4maxY<0;default:return!0}}(o,Math.floor(u/(Math.PI/2)),i))return null;let d=l+r+n.height/2,f=Math.sin(u)*d,p=-Math.cos(u)*d,h=n.width+1;if(u<Math.PI){let e=Math.abs(i.x+i.width-(f+c.x));e<h&&(h=e)}else{let e=Math.abs(i.x-(f+c.x));e<h&&(h=e)}if(h<n.minReqWidth)return null;let m={x:f,y:p,width:h,height:n.height};return u<Math.PI?m.anchor="start":m.anchor="end",m}({slice:r,measured:s,padding:a,view:l,context:c});break;default:throw new Error("not implemented")}return t&&(t.x+=h.x,t.y+=h.y,"outside"===o&&"rotate"!==i&&function(e,t,n){const{start:r,end:i,offset:o,outerRadius:a}=n,s=cy((r+i)/2);switch(Math.floor(s/(Math.PI/2))){case 0:if(void 0!==t.q1maxY){let n=Math.min(e.y,t.q1maxY-e.height),r=e.y-n;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x-2,y1:e.y+2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}break;case 1:if(void 0!==t.q2minY){let n=Math.max(e.y,t.q2minY),r=n-e.y;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x-2,y1:e.y-2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}break;case 2:if(void 0!==t.q3minY){let n=Math.max(e.y,t.q3minY),r=n-e.y;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x+2,y1:e.y-2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}break;case 3:if(void 0!==t.q4maxY){let n=Math.min(e.y,t.q4maxY-e.height),r=e.y-n;if(e.y=n,r>1){let t=a+2;e.line={type:"line",x1:e.x+2,y1:e.y+2,x2:o.x+Math.sin(s)*t,y2:o.y-Math.cos(s)*t,strokeWidth:1}}}}}(t,c,r)),t}function by(e){let{context:t,direction:n,measured:r,node:i,placementSettings:o,rect:a,store:s}=e,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vy;for(let e=0;e<o.length;e++){let c=o[e],u=l({context:t,slice:i.desc.slice,view:a,direction:n,position:c.position,measured:r,padding:c.padding,store:s});if(u)return{bounds:u,placement:c}}return{bounds:null,placement:null}}function xy(e,t,n){const r=t.fontFamily,i="".concat(t.fontSize,"px"),o=n.measureText({text:e,fontFamily:r,fontSize:i});return o.minReqWidth=Math.min(o.width,n.measureText({text:"".concat(e[0],"…"),fontFamily:r,fontSize:i}).width),o}const wy=/\n+|\r+|\r\n/,Sy=/\s/,My=/[a-zA-Z\u00C0-\u00F6\u00F8-\u00FF\u00AD]/;function ky(e){return"string"==typeof e?-1!==e.search(wy):-1!==String(e).search(wy)}function Ey(e){return-1!==e.search(Sy)}function Cy(e){return-1!==e.search(My)}function Ay(e,t,n){return Math.max(t,Math.min(n,e))}function Dy(){let{string:e,separator:t="",reverse:n=!1,measureText:r=e=>({width:e.length,height:1}),mandatoryBreakIdentifiers:i=[ky],noBreakAllowedIdentifiers:o=[],suppressIdentifier:a=[Ey,ky,e=>""===e],hyphenationIdentifiers:s=[Cy]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const l=String(e).split(t);!function(e){""===e[0]&&e.shift(),""===e[e.length-1]&&e.pop()}(l);const c=l.length,u=n?e=>e>=0:e=>e<c;let d=n?c:-1;function f(e){const t=Ay(e,0,c-1),n=l[t],u=r(n),d=function(e,t,n,r,i){return r.some(r=>r(e,t,n))?1:i.some(r=>r(e,t,n))?0:2}(n,t,l,i,o);return{index:t,value:n,breakOpportunity:d,suppress:a.some(e=>e(n,t,l)),hyphenation:s.some(e=>e(n,t,l)),width:u.width,height:u.height,done:!1}}return{next:function(e){return isNaN(e)?n?d--:d++:d=Ay(e,0,c-1),u(d)?f(d):{done:!0}},peek:f,length:c}}const qy="…",_y=/^\s*\d+(\.\d+)?px\s*$/i;function Ty(e){return"string"===typeof e&&_y.test(e)}function Ny(e){const t=e["font-size"]||e.fontSize;return Ty(t)?parseFloat(t)*Math.max(isNaN(e.lineHeight)?1.2:e.lineHeight,0):19.2}function Oy(e){const t=e.maxHeight,n=Math.max(e.maxLines,1)||1/0;if(isNaN(t))return n;const r=Ny(e);return Math.max(1,Math.min(Math.floor(t/r),n))}function Iy(e,t){return{lines:[],line:"",width:0,maxLines:Oy(e),maxWidth:e.maxWidth,hyphens:{enabled:"auto"===e.hyphens,char:"‐",metrics:t("‐")}}}function Ly(e){e.lines.push(e.line),e.line="",e.width=0}function Py(e,t){e.line+=t.value,e.width+=t.width}function Ry(e,t,n){if(t.width>e.maxWidth)return t;const r=t.index;for(let i=1;i<5;i++){const o=n.peek(t.index-1);if(!t.hyphenation||!o.hyphenation||0===t.index)return t;if(e.width+e.hyphens.metrics.width<=e.maxWidth)return e.line+=e.hyphens.char,t;if(1===e.line.length)return t;t=n.next(r-i),e.line=e.line.slice(0,-1),e.width-=t.width}return t}function zy(e,t,n){const r=Dy({string:t.value,measureText:n});for(;e.lines.length<e.maxLines;){let t=r.next();if(t.done)break;e.width+t.width>e.maxWidth&&2===t.breakOpportunity&&e.line.length>0?(t=e.hyphens.enabled?Ry(e,t,r):t,Ly(e),Py(e,t)):Py(e,t)}}function Fy(e,t){const n=Dy({string:e.text,separator:"",measureText:t,noBreakAllowedIdentifiers:[(e,t)=>0===t]}),r=Iy(e,t);let i=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){Ly(r),i=!1;break}1===e.breakOpportunity?Ly(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?r.width+=e.width:(e=r.hyphens.enabled?Ry(r,e,n):e,Ly(r),Py(r,e)):Py(r,e)}return{lines:r.lines,reduced:i}}function jy(e,t){const n=Dy({string:e.text,separator:/(\s|-|\u2010)/,measureText:t}),r=Iy(e,t);let i=!0;for(;r.lines.length<r.maxLines;){let e=n.next();if(e.done){Ly(r),i=!1;break}1===e.breakOpportunity?Ly(r):r.width+e.width>r.maxWidth&&2===e.breakOpportunity?e.suppress?Ly(r):e.width>r.maxWidth?zy(r,e,t):(Ly(r),Py(r,e)):Py(r,e)}return{lines:r.lines,reduced:i}}function Vy(e){return{"break-all":Fy,"break-word":jy}[e.wordBreak]}function Hy(e){return t=>{const n=t.node;if(function(e){return"text"===e.type&&!e._lineBreak}(n)){const r=Vy(n);if(!r)return;const i=e(n);if(i.width>n.maxWidth||ky(n.text)){const o=(Ny(n)-i.height)/2,a=r(n,function(e,t){return n=>t({text:n,fontSize:e.fontSize,fontFamily:e.fontFamily})}(n,e));t.node=function(e,t,n,r){const i={type:"container",children:[]};void 0!==t.id&&(i.id=t.id);let o=0;return e.lines.forEach((a,s)=>{const l=Va({},t);l.text=a,l._lineBreak=!0,o+=n,e.reduced&&s===e.lines.length-1?l.text+=qy:delete l.maxWidth,l.dy=isNaN(l.dy)?o:l.dy+o,o+=r,o+=n,i.children.push(l)}),i}(a,n,o,i.height)}}}}function By(e,t){const n=e["font-family"]||e.fontFamily,r=e["font-size"]||e.fontSize,i="string"==typeof e.text?e.text:"".concat(e.text),{maxWidth:o}=e;if(void 0===o)return i;let a=t({text:i,fontSize:r,fontFamily:n}).width;if(a<=o)return i;let s=0,l=i.length-1;for(;s<=l;){let e=Math.floor((s+l)/2);a=t({text:i.substr(0,e)+qy,fontSize:r,fontFamily:n}).width,a<=o?s=e+1:l=e-1}return i.substr(0,l)+qy}function $y(e){const t=e.baseline||e["dominant-baseline"];let n=0;const r=parseInt(e.fontSize||e["font-size"],10)||0;switch(t){case"hanging":n=.75*r;break;case"text-before-edge":n=.85*r;break;case"middle":n=.25*r;break;case"central":n=.35*r;break;case"mathemetical":n=r/2;break;case"text-after-edge":case"ideographic":n=.2*-r;break;default:n=0}return n}const Wy={},Uy={},Yy={fontSize:void 0,fontFamily:void 0};let Xy;function Gy(e,t){return!e&&!t||e===t}function Ky(e){let{text:t,fontWeight:n,fontSize:r,fontFamily:i}=e;const o="".concat(t," ").concat(n," ").concat(r," ").concat(i);return"number"!=typeof Uy[o]&&(Xy=Xy||document.createElement("canvas").getContext("2d"),function(e){let{fontWeight:t,fontSize:n,fontFamily:r}=e;Gy(Yy.fontWeight,t)&&Gy(Yy.fontSize,n)&&Gy(Yy.fontFamily,r)||(Xy.font=[t,n,r].filter(e=>!!e).join(" "),Yy.fontWeight=t,Yy.fontSize=n,Yy.fontFamily=r)}({fontWeight:n,fontSize:r,fontFamily:i}),Uy[o]=Xy.measureText(t).width),Uy[o]}function Zy(e){return"number"!=typeof Wy[e]&&(Wy[e]=function(e){if(Ty(e)){const t=parseFloat(e);return t+4*Math.ceil((t+1e-12)/24)}return 16}(e)),Wy[e]}function Jy(e){let{text:t,fontWeight:n,fontSize:r,fontFamily:i}=e;return{width:Ky({text:t,fontWeight:n,fontSize:r,fontFamily:i}),height:Zy(r)}}function Qy(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Jy;const n=e["font-size"]||e.fontSize,r=e["font-family"]||e.fontFamily,i=t({text:e.text,fontFamily:r,fontSize:n}),o=Math.min(e.maxWidth||i.width,i.width),a=e.x||0,s=e.y||0,l=e.dx||0,c={x:0,y:s+((e.dy||0)+$y(e))-.75*i.height,width:o,height:i.height},u=e["text-anchor"]||e.anchor;return c.x="middle"===u?a+l-o/2:"end"===u?a+l-o:a+l,c}function ev(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Jy;const n=Vy(e),r=e["font-size"]||e.fontSize,i=e["font-family"]||e.fontFamily,o=t({text:e.text,fontFamily:i,fontSize:r});if(n&&(o.width>e.maxWidth||ky(e.text))){const o=n(e,e=>t({text:e,fontFamily:i,fontSize:r})),a=Va({},e);let s=0,l="";for(let e=0,n=o.lines.length;e<n;e++){let a=o.lines[e];a+=e===n-1&&o.reduced?qy:"";const c=t({text:a,fontSize:r,fontFamily:i}).width;c>=s&&(s=c,l=a)}a.text=l;const c=Qy(a,t);return c.height=Ny(e)*o.lines.length,c}return Qy(e,t)}function tv(e,t){return{node:e,data:e.data,scale:t.scale,formatter:t.formatter,dataset:t.dataset}}function nv(e,t,n){const r={type:"text",text:t,maxWidth:e.width,x:0,y:e.y,dx:0,dy:0,fill:n.fill,anchor:"start",baseline:"alphabetical",fontSize:"".concat(n.fontSize,"px"),fontFamily:n.fontFamily},i=n.textMetrics;if(e.width<n.fontSize)return!1;const o=Math.max(0,e.width-i.width);return r.x=e.x+n.align*o,r.y=e.y+i.height/1.2,r}function rv(e){let{cx:t,cy:n,r:r}=e;return{type:"circle",bounds:{cx:t,cy:n,r:r}}}function iv(e){return e.desc&&e.desc.slice?function(e){let{start:t,end:n,innerRadius:r,outerRadius:i,offset:o}=e;if(Math.abs(t+2*Math.PI-n)>1e-12)return{type:null,bounds:null};let a=0!==r?r:i;return rv({cx:o.x,cy:o.y,r:a})}(e.desc.slice):"circle"===e.type?rv(e.attrs):"rect"===e.type?{type:"rect",bounds:e.bounds}:{type:null,bounds:null}}var ov={bar:function(e){let{settings:t,chart:n,nodes:r,rect:i,renderer:o,style:a}=e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ly;const l=Va({fontSize:12,fontFamily:"Arial",align:.5,justify:0,fill:"#333"},a.label);l.fontSize=parseInt(l.fontSize,10);const c=t.labels.map(e=>Va({},l,t,e)),u=t.labels.map(e=>e.placements.map(n=>Va({},l,t,e,n))),{fitsHorizontally:d,hasHorizontalDirection:f,targetNodes:p}=function(e){let{nodes:t,rect:n,chart:r,labelSettings:i,placementSettings:o,settings:a,renderer:s}=e;const l={},c=[];let u,d,f,p,h,m,g,y=!0,v=!1;for(let e=0;e<t.length;e++){if(d=t[e],p=d.localBounds,!ah(p,n))continue;let b=Zg(d,r);u={node:d,texts:[],measurements:[],labelSettings:[],placementSettings:[]};for(let t=0;t<i.length;t++)m=i[t],f="function"==typeof m.label?m.label(b,e):void 0,Jg(f)&&(g="function"==typeof a.direction?a.direction(b,e):a.direction||"up",v=v||"left"===g||"right"===g,l.fontFamily=m.fontFamily,l.fontSize="".concat(m.fontSize,"px"),l.text=f,h=s.measureText(l),u.measurements.push(h),u.texts.push(f),u.labelSettings.push(m),u.placementSettings.push(o[t]),u.direction=g,y=y&&h.width<=p.width-2*Kg);c.push(u)}return{targetNodes:c,fitsHorizontally:y,hasHorizontalDirection:v}}({nodes:r,chart:n,renderer:o,settings:t,rect:i,labelSettings:c,placementSettings:u}),h=function(e){let{orientation:t="auto",defaultOrientation:n="h"}=e;switch(t.toLocaleLowerCase()){case"vertical":return"v";case"horizontal":return"h";default:return n}}({orientation:t.orientation,defaultOrientation:f?"h":"v"}),m="h"===h?"y":"x",g="h"===h?"height":"width";return p.sort((e,t)=>e.node.localBounds[m]+e.node.localBounds[g]-(t.node.localBounds[m]+t.node.localBounds[g])),s({chart:n,targetNodes:p,stngs:t,rect:i,fitsHorizontally:d,collectiveOrientation:h})},slice:function(e){let{settings:t,chart:n,nodes:r,rect:i,renderer:o,style:a}=e,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:by,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:yy;const c=Va({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,position:"into"},a.label);c.fontSize=parseInt(c.fontSize,10);const u=t.labels.map(e=>Va({},c,t,e)),d=t.labels.map(e=>e.placements.map(n=>Va({},c,t,e,n))),f=[],p={insideLabelBounds:[]};r=function(e){const t=[],n=[],r=[],i=[];for(let o=0;o<e.length;++o){const{start:a,end:s}=e[o].desc.slice,l=cy((a+s)/2);switch(Math.floor(l/(Math.PI/2))){case 0:t.push(e[o]);break;case 1:n.push(e[o]);break;case 2:r.push(e[o]);break;case 3:i.push(e[o])}}const o=(e,t)=>cy((e.desc.slice.start+e.desc.slice.end)/2)-cy((t.desc.slice.start+t.desc.slice.end)/2),a=(e,t)=>o(t,e);return t.sort(a),n.sort(o),r.sort(a),i.sort(o),t.concat(n,i,r)}(r);const h={};for(let e=0,t=r.length;e<t;e++){const t=r[e],a=gy(t,n);for(let n=0;n<u.length;n++){const r=u[n],c="function"==typeof r.label?r.label(a,e):"";if(!c)continue;const m="function"==typeof r.direction?r.direction(a,e):r.direction||"horizontal",g="function"==typeof r.linkData?r.linkData(a,e):void 0,y=xy(c,r,o),v=s({context:h,direction:m,lblStngs:r,measured:y,node:t,placementSettings:d[n],rect:i,store:p}),b=v.bounds,x=v.placement;if(b&&x){if("outside"===x.position&&"rotate"!==m){my({context:h,node:t,bounds:b});if(!Up(dy(b),i))continue}const n="function"==typeof x.fill?x.fill(a,e):x.fill,o=l(b,c,{fill:n,fontSize:r.fontSize,fontFamily:r.fontFamily,textMetrics:y});o&&(void 0!==g&&(o.data=g),f.push(o),b.line&&(b.line.stroke=n,f.push(b.line)))}}}return f},rows:function(e){let{settings:t,chart:n,nodes:r,renderer:i,style:o}=e,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nv;const s=Va({fontSize:12,fontFamily:"Arial",fill:"#333",padding:4,align:.5,justify:.5},o.label);s.fontSize=parseInt(s.fontSize,10);const l=Va({},s,t),c=t.labels.map(e=>Va({},l,e)),u={},d=[];for(let e=0,t=r.length;e<t;e++){let t=r[e],o=tv(t,n),{type:s,bounds:f}=iv(t);if(!f)continue;let p,h=0,m=[],g=[],y="circle"===s?2*f.r*.9:f.height;for(h+=l.padding,p=0;p<c.length;p++){let t=c[p],n="function"==typeof t.label?t.label(o,e):"";u.fontFamily=t.fontFamily,u.fontSize="".concat(t.fontSize,"px"),u.text=n;let r=i.measureText(u);if(h+=r.height+t.padding,h>y)break;g.push(n),m.push(r)}const v=p,b=Math.max(0,y-h);let x;for(x="circle"===s?f.cy-.9*f.r:f.y,x+=l.justify*b+l.padding,p=0;p<v;p++){let t,n=c[p];if("circle"===s){let e=Math.max(Math.abs(x-f.cy),Math.abs(x+m[p].height-f.cy)),n=Math.sqrt(f.r*f.r-e*e);t={x:f.cx-n+l.padding,y:x,width:2*n-2*l.padding,height:m[p].height}}else t={x:f.x+l.padding,y:x,width:f.width-2*l.padding,height:m[p].height};x+=m[p].height+l.padding;let r="function"==typeof n.fill?n.fill(o,e):n.fill;const u="function"==typeof n.linkData?n.linkData(o,e):void 0;let h=a(t,g[p],{fill:r,align:n.align,fontSize:n.fontSize,fontFamily:n.fontFamily,textMetrics:m[p]});if(h){if(h.text&&h.text!==qy){const e=By(h,i.measureText);if(qy===e)continue;h.ellipsed=e}void 0!==u&&(h.data=u),d.push(h)}}}return d}};const av={require:["chart","renderer","settings"],defaultSettings:{settings:{},style:{label:"$label"}},render(){const e=this.settings.settings,t=[];return(e.sources||[]).forEach(e=>{e.strategy&&ov[e.strategy.type]&&e.component&&t.push(...function(e,t){let{chart:n,source:r,rect:i,renderer:o,style:a}=e;if(!n.component(r.component))return[];const s=n.findShapes(r.selector).filter(e=>e.key===r.component);return t({chart:n,settings:r.strategy.settings,nodes:s,rect:{x:0,y:0,width:i.width,height:i.height},renderer:o,style:a})}({chart:this.chart,rect:this.rect,renderer:this.renderer,source:e,style:this.style},ov[e.strategy.type]))}),t}};const sv={layout:{size:1,direction:"ltr",scrollOffset:0},item:{show:!0,label:{fontSize:"12px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:136,lineHeight:1.2},shape:{type:"square",size:12}},title:{show:!0,text:void 0,anchor:"start",fontSize:"16px",fontFamily:"Arial",fill:"#595959",wordBreak:"none",maxLines:2,maxWidth:156,lineHeight:1.25}};function lv(e){let{x:t=0,y:n,item:r,globalMetrics:i,createSymbol:o,direction:a="ltr"}=e,s=r.label.displayObject,l=r.label.bounds,c=r.symbol.meta;const u="rtl"===a;let d={x:u?t+i.maxLabelBounds.width:t+i.maxSymbolSize+i.spacing,y:n,width:i.maxLabelBounds.width,height:Math.max(i.maxSymbolSize,i.maxLabelBounds.height)},f=function(e,t,n){const r=Math.max(0,e.width-t),i=Math.max(0,e.height-t);return{x:e.x+t/2+n.align*r,y:e.y+t/2+n.justify*i}}({x:u?t+i.maxLabelBounds.width+i.spacing:t,y:n,width:i.maxSymbolSize,height:d.height},c.size,{align:void 0===c.align?.5:c.align,justify:void 0===c.justify?.5:c.justify});const p=o(Va({},c,f));return delete p.collider,s.anchor=u?"end":"start",function(e,t,n){const r=n.textMetrics;if(e.height<r.height)return!1;const i=Math.max(0,e.width-r.width);t.baseline="text-before-edge";const o=Math.max(0,e.height-r.height);t.x=e.x+n.align*i,t.y=e.y+n.justify*o+.175*parseInt(t.fontSize,10)}(d,s,{textMetrics:l,fontSize:parseInt(s.fontSize,10),align:0,justify:.5}),{item:{type:"container",data:r.label.displayObject.data,children:[p,s],collider:{type:"rect",x:t,y:n,width:i.maxItemBounds.width,height:i.maxItemBounds.height}},metrics:d}}function cv(e,t){const n=e.items.length,r=Math.ceil(n/t),i="horizontal"===e.layout.orientation?"width":"height",o="width"===i?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[i]*r+(r-1)*e.layout.margin[o]}function uv(e,t){let n,r,i,o,{onScroll:a=()=>{}}=t,s=null,l=0;const c={itemize:t=>{n=function(e,t){let n,r,{resolved:i,dock:o}=e,a=[],s=i.items.items,l=i.symbols.items,c=i.labels.items,u=0,d=0,f=0;for(let e=0;e<s.length;e++){if(!1===s[e].show)continue;const i=void 0!==c[e].text?c[e].text:c[e].data.label||"";n=Va({},c[e],{type:"text",fontSize:"".concat(parseInt(c[e].fontSize,10),"px"),text:i,title:i}),r={symbol:{meta:l[e]},label:{displayObject:n,bounds:t.textBounds(n)}},a.push(r),u=Math.max(l[e].size,u),d=Math.max(r.label.bounds.width,d),f=Math.max(r.label.bounds.height,f)}return{items:a,globalMetrics:{spacing:8,maxSymbolSize:u,maxItemBounds:{height:Math.max(u,f),width:u+8+d},maxLabelBounds:{width:d,height:f}},layout:{margin:{vertical:void 0!==i.layout.item.vertical?i.layout.item.vertical:4,horizontal:void 0!==i.layout.item.horizontal?i.layout.item.horizontal:4},mode:i.layout.item.mode,size:i.layout.item.size,orientation:"top"===o||"bottom"===o?"horizontal":"vertical",direction:i.layout.item.direction,scrollOffset:i.layout.item.scrollOffset}}}(t,e.renderer),s=isNaN(n.layout.scrollOffset)?s:n.layout.scrollOffset},getItemsToRender:t=>{i=t.viewRect,l=c.getContentOverflow(i);const a=c.extent();s=Math.max(0,Math.min(s,l)),o=Va({},i);const u="horizontal"===c.orientation()?"x":"y";return o[u]-=s,o["x"===u?"width":"height"]=a,function(e,t,n){let{viewRect:r}=e,{itemized:i,create:o=lv,parallels:a,createSymbol:s}=n;const l=i.layout.direction,c=i.globalMetrics,u=i.items,d="horizontal"===i.layout.orientation;let f=0;const p=[],h=c.maxItemBounds.height,m=c.maxItemBounds.width,g=i.layout.margin.vertical+h,y=i.layout.margin.horizontal+m;let v=t.x,b=t.y,x=r.x-t.x;for(let e=0;e<u.length;e++){let n=o({y:b,x:"rtl"===l?r.x+x+r.width-m-(v-t.x):v,item:u[e],globalMetrics:c,direction:l,createSymbol:s});if((d&&v>=r.x-m||!d&&b>=r.y-h)&&p.push(n.item),f++,f>=a?(f=0,d?(v+=y,b=t.y):(b+=g,v=t.x)):d?b+=g:v+=y,!d&&b>r.y+r.height)break;if(d&&v>r.x+r.width)break}return p}(t,o,{itemized:n,parallels:r,createSymbol:e.symbol})},parallelize:(e,t)=>(r=function(e,t,n){const r=n.items.length,i="horizontal"===n.layout.orientation?"width":"height",o="width"===i?"horizontal":"vertical",a=n.globalMetrics.maxItemBounds[i]*r+(r-1)*n.layout.margin[o];let s=Math.ceil(a/e);if(null!=t){const e="horizontal"===n.layout.orientation?"height":"width",r="width"===e?"horizontal":"vertical",i=n.layout.margin[r]||4,o=Math.floor((t+i)/(i+n.globalMetrics.maxItemBounds[e]));s=Math.min(s,o)}const l=isNaN(n.layout.size)?1:n.layout.size;return Math.max(1,Math.min(s,l))}(e,t,n),r),hasContentOverflow:()=>{const e="horizontal"===n.layout.orientation?"width":"height";return cv(n,r)>i[e]},getContentOverflow:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;const t="horizontal"===n.layout.orientation?"width":"height";return Math.max(0,cv(n,r)-e[t])},getNextSize:()=>{const e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},getPrevSize:()=>{const e="horizontal"===n.layout.orientation?"width":"height",t="width"===e?"horizontal":"vertical";return n.globalMetrics.maxItemBounds[e]+n.layout.margin[t]},hasNext:()=>"horizontal"===c.orientation()?i.x+i.width<o.x+o.width:i.y+i.height<o.y+o.height,hasPrev:()=>"horizontal"===c.orientation()?o.x<i.x:o.y<i.y,next:()=>{c.scroll(-c.getNextSize())},prev:()=>{c.scroll(c.getPrevSize())},scroll:e=>{const t=Math.max(0,Math.min(l,s-e));t!==s&&(s=t,a())},offset:()=>s,orientation:()=>n.layout.orientation,direction:()=>n.layout.direction,extent:()=>cv(n,r),spread:()=>function(e,t){const n=t,r="horizontal"===e.layout.orientation?"height":"width",i="width"===r?"horizontal":"vertical";return e.globalMetrics.maxItemBounds[r]*n+(n-1)*e.layout.margin[i]}(n,r)};return c}function dv(e){return Object.keys(e).filter(t=>e[t]).join(" ")}const fv={up:"▲",right:"▶",down:"▼",left:"◀"};function pv(e,t){let{size:n,isActive:r,direction:i,nav:o,attrs:a}=t,s={},l="";const c=a;o&&o.button&&("function"==typeof o.button.class?s=o.button.class({direction:i}):o.button.class&&(s=o.button.class),"function"==typeof o.button.content&&(l=o.button.content(e,{direction:i})),void 0!==o.button.tabIndex&&(c.tabindex=o.button.tabIndex));const u={width:"".concat(n,"px"),minWidth:"".concat(n,"px"),height:"".concat(n,"px")};return Object.keys(s).length||(u.border="0",u.background="none"),(!r||o&&o.disabled)&&(c.disabled="disabled"),e("button",Va({class:dv(s),style:u},c),[l||e("span",{style:{pointerEvents:"none"}},[fv[i]])])}function hv(e){let t;const n={itemize:e=>{t=function(e){let{dock:t,navigation:n}=e;return{layout:{orientation:"top"===t||"bottom"===t?"vertical":"horizontal"},navigation:n}}(e)},render:r=>function(e,t,n,r){let{rect:i,itemRenderer:o}=t;if(!e||!e.renderArgs)return;e.size(i);const a=e.renderArgs[0],s="vertical"===n.layout.orientation,l="rtl"===o.direction(),c=o.hasNext(),u=o.hasPrev();if(!u&&!c)return void e.render([]);const d=s?["right","left"]:["down","up"];l&&s&&d.reverse();const f=[a("div",{style:{position:"relative",display:"flex","flex-direction":s?"column":"row","justify-content":"center",height:"100%",pointerEvents:"auto"},dir:l&&!s?"rtl":"ltr"},[pv(a,{size:32,isActive:c,direction:d[0],attrs:{"data-action":"next","data-component-key":r.settings.key},nav:n.navigation}),pv(a,{size:32,isActive:u,direction:d[1],attrs:{"data-action":"prev","data-component-key":r.settings.key},nav:n.navigation})])];e.render(f)}(n.renderer,r,t,e),extent:()=>32,spread:()=>64};return n}function mv(e){let t;const n={itemize:n=>{t=function(e,t){let{resolved:n}=e;if(!1===n.title.item.show)return null;const r=Va({},n.title.item,{type:"text"});if("rtl"===n.layout.item.direction&&(r.anchor&&"start"!==r.anchor?"end"===r.anchor&&(r.anchor="start"):r.anchor="end"),void 0===n.title.settings.text){const e=t.scale.data().fields;r.text=e&&e[0]?e[0].title():""}return{displayObject:r,bounds:t.renderer.textBounds(r)}}(n,e)},render:e=>{!function(e,t,n){let{rect:r}=e;if(!t)return;const i=[];if(t.size(r),n){const e={start:0,end:r.width,middle:r.width/2};i.push(Va({},n.displayObject,{x:e[n.displayObject.anchor]||0,y:0,baseline:"text-before-edge",title:n.displayObject.text}))}t.render(i)}(e,n.renderer,t)},spread:()=>t?t.bounds.height:0,extent:()=>t?t.bounds.width:0};return n}function gv(e,t,n,r){let i,o,a,{itemRenderer:s,navigationRenderer:l,titleRenderer:c,isPreliminary:u=!1}=r,d=0;const f={x:t.spacing,y:t.spacing,width:e.width-2*t.spacing,height:e.height-2*t.spacing};if(i={x:f.x,y:f.y,width:f.width,height:c.spread()},"horizontal"===n){i={x:f.x,y:f.y,width:c.extent(),height:c.spread()};const e=f.width-i.width-(i.width?t.spacing:0),n=f.height;s.parallelize(e,u?void 0:n);const r=s.extent()>e?l.extent():0,p=s.spread(),h=r?l.spread():0;o={x:i.x+i.width+(i.width?t.spacing:0),y:f.y+Math.max(0,(h-p)/2),width:f.width-r-i.width-(r?t.spacing:0)-(i.width?t.spacing:0),height:n},a={x:o.x+o.width+(r?t.spacing:0),y:f.y,width:r,height:f.height},i.y=o.y;"rtl"===s.direction()&&(a.x=f.x,o.x=a.x+a.width+(a.width?t.spacing:0),i.x=o.x+o.width+(i.width?t.spacing:0)),d=Math.max(i.height,h,s.spread())}else{const e=f.height-i.height-(i.height?t.spacing:0),n=f.width;s.parallelize(e,u?void 0:n);const r=s.extent()>e?l.extent():0;a={x:f.x,y:f.y+f.height-r,width:f.width,height:r},o={x:f.x,y:i.y+i.height+(i.height?t.spacing:0),width:f.width,height:f.height-i.height-(i.height?t.spacing:0)-a.height-(a.height?t.spacing:0)},d=Math.max(c.extent(),r?l.spread():0,s.spread())}return o=Va({},e,{x:e.x+o.x,y:e.y+o.y,width:o.width,height:o.height}),a.x+=e.x,a.y+=e.y,i.x+=e.x,i.y+=e.y,{title:Va({},e,i),content:Va({},e,o),navigation:Va({},e,a),orientation:n,preferredSize:d}}function yv(e){e.state.resolved=function(e){const t=e.scale.domain();let n={items:[]};const r=e.settings.layout.dock;if("threshold-color"===e.scale.type){const i=e.scale.data().fields[0];let o=e=>String(e);e.settings.formatter?o=e.chart.formatter(e.settings.formatter):i&&(o=i.formatter());for(let e=0;e<t.length-1;e++){const r={value:t[e],label:"".concat(o(t[e])," - < ").concat(o(t[e+1]))};i&&(r.source={field:i.id()}),n.items.push(r)}"vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")&&n.items.reverse()}else{const r=e.scale.labels?e.scale.labels():null;n.items=t.map((t,n)=>{const i=e.scale.datum?Va({},e.scale.datum(t)):{value:t};return i.value=t,e.scale.label?i.label=e.scale.label(t):r&&(i.label=r[n]),i})}const i=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:Va(!0,{},sv.title,e.style.title),settings:e.settings.settings.title}),o=e.resolver.resolve({data:{fields:e.scale.data().fields},defaults:sv.layout,settings:e.settings.settings.layout}),a=e.resolver.resolve({data:n,defaults:Va(!0,{},sv.item.label,e.style.item.label),settings:(e.settings.settings.item||{}).label}),s=Va(!0,{},(e.settings.settings.item||{}).shape);void 0===s.fill&&e.settings.scale&&(s.fill={scale:e.settings.scale});const l=e.resolver.resolve({data:n,defaults:Va(!0,{},sv.item.shape,e.style.item.shape),settings:s}),c=e.resolver.resolve({data:n,defaults:Va(!0,{},{show:sv.item.show}),settings:{show:(e.settings.settings.item||{}).show}});function u(e,n){let r=e.data.value,i=t[n+1];e.data.value=[r,i]}"threshold-color"===e.scale.type&&("vertical"==("top"===r||"bottom"===r?"horizontal":"vertical")?(c.items.reverse().forEach(u),c.items.reverse()):c.items.forEach(u));return{title:i,labels:a,symbols:l,items:c,layout:o}}(e),e.titleRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.itemRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center"}),e.navigationRenderer.itemize({resolved:e.state.resolved,dock:e.settings.layout.dock||"center",navigation:e.settings.settings.navigation}),e.state.display={spacing:8}}function vv(e){const{rect:t,settings:n,state:r,itemRenderer:i,navigationRenderer:o,titleRenderer:a}=e,s=n.layout.dock,l="top"===s||"bottom"===s?"horizontal":"vertical",c=gv(t,r.display,l,{itemRenderer:i,navigationRenderer:o,titleRenderer:a});e.renderer.size(c.content);let u=i.getItemsToRender({viewRect:Va({},c.content,{x:0,y:0})});return o.render({rect:c.navigation,itemRenderer:i}),a.render({rect:c.title}),e.state.views={layout:c},u}const bv={require:["chart","settings","renderer","update","resolver","registries","symbol"],defaultSettings:{settings:{},style:{item:{label:"$label",shape:"$shape"},title:"$title"}},mounted(e){e&&e.parentNode&&(this.navigationRenderer.renderer.appendTo(e.parentNode),this.titleRenderer.renderer.appendTo(e.parentNode),e.parentNode.insertBefore(this.navigationRenderer.renderer.element(),e),e.parentNode.insertBefore(this.titleRenderer.renderer.element(),e)),this.navigationRenderer.render({rect:this.state.views.layout.navigation,itemRenderer:this.itemRenderer}),this.titleRenderer.render({rect:this.state.views.layout.title})},beforeUnmount(){this.navigationRenderer.renderer.clear(),this.titleRenderer.renderer.clear()},on:{panstart(){if(this.state.interaction.started)return;this.itemRenderer.getContentOverflow()&&(this.state.interaction.started=!0,this.state.interaction.delta=0)},panmove(e){if(!this.state.interaction.started)return;const t="horizontal"===this.itemRenderer.orientation()?("rtl"===this.itemRenderer.direction()?-1:1)*e.deltaX:e.deltaY;this.itemRenderer.scroll(t-this.state.interaction.delta),this.state.interaction.delta=t},panend(){this.state.interaction.started=!1},scroll(e){this.itemRenderer.scroll(-e)},next(){this.itemRenderer.next()},prev(){this.itemRenderer.prev()}},created(){this.state={interaction:{}},this.onScroll=()=>{const e=vv(this);this.update(e)},this.itemRenderer=uv(this,{onScroll:this.onScroll}),this.navigationRenderer=hv(this),this.titleRenderer=mv(this),this.navigationRenderer.renderer=this.registries.renderer("dom")(),this.titleRenderer.renderer=this.registries.renderer(this.settings.renderer)(),yv(this)},preferredSize(e){return function(e,t){let n=0;const r=e.settings.layout.dock||"center",i="top"===r||"bottom"===r?"horizontal":"vertical",o=e.state.display,a=gv(t.inner,o,i,{itemRenderer:e.itemRenderer,navigationRenderer:e.navigationRenderer,titleRenderer:e.titleRenderer,isPreliminary:!0});return n+=o.spacing,n+=a.preferredSize,n+=o.spacing,n}(this,e)},beforeUpdate(){yv(this)},render(){return vv(this)},beforeDestroy(){this.navigationRenderer.renderer.destroy(),this.titleRenderer.renderer.destroy()},additionalElements(){return[this.titleRenderer.renderer.element(),this.navigationRenderer.renderer.element()]},_DO_NOT_USE_getInfo(){return{offset:this.itemRenderer.offset()}}};function xv(e,t){let n=0;const r=e.state.isVertical?"justify":"align",i=e.state.isVertical?"y":"x",o=e.state.isVertical?"height":"width",a=e.state.isVertical?"requiredHeight":"requiredWidth";n=e.state.rect[o]-e.state.legend.length()-e.state.title[a](),n*=Math.min(1,Math.max(e.stgns[r],0)),t[i]+=n}function wv(e,t,n){const r=n[e];return"object"==typeof r?-1!==r.valid.indexOf(t)?t:r.default:n.default}function Sv(e){return wv(e.layout.dock,e.settings.title.anchor,{left:{valid:["top"],default:"top"},right:{valid:["top"],default:"top"},top:{valid:["left","right"],default:"left"},bottom:{valid:["left","right"],default:"left"},default:"top"})}function Mv(e,t){const n={x:0,y:0,width:0,height:0},r=e.stgns.padding;return n.x=r.left,n.y=r.top,n.width=t.width-r.left-r.right,n.height=t.height-r.top-r.bottom,n}function kv(e){const t="top"!==e.settings.layout.dock&&"bottom"!==e.settings.layout.dock,n=e.stgns.title,r=e.chart.scale(e.stgns.fill),i=e.chart.scale(e.stgns.major),o=function(e,t){const n=t.domain();let r=n,i=e.stgns.tick.label;!i&&e.formatter?i=e.formatter:!i&&t.data().fields&&(i=t.data().fields[0].formatter()),"function"==typeof i&&(r=n.map(i).map(String));const o=n.map((n,i)=>{const o=r[i];return{value:n,label:o,pos:t.norm(parseFloat(n,10)),textMetrics:e.renderer.measureText({text:o,fontSize:e.stgns.tick.fontSize,fontFamily:e.stgns.tick.fontFamily})}});return o}(e,i),a=wv((s=e.settings).layout.dock,s.settings.tick.anchor,{left:{valid:["left","right"],default:"left"},right:{valid:["left","right"],default:"right"},top:{valid:["top","bottom"],default:"top"},bottom:{valid:["top","bottom"],default:"bottom"},default:"right"});var s;if(void 0===n.text){const e=i.data().fields;n.text=e&&e[0]?e[0].title():""}const l=e.renderer.measureText({text:n.text,fontSize:n.fontSize,fontFamily:n.fontFamily}),c=e.renderer.textBounds({text:n.text,fontSize:n.fontSize,fontFamily:n.fontFamily,maxLines:n.maxLines,maxWidth:n.maxLengthPx,wordBreak:n.wordBreak,hyphens:n.hyphens,lineHeight:n.lineHeight}),u={isVertical:t,nodes:[],title:{anchor:Sv(e.settings),textMetrics:l,textBounds:c,requiredWidth:()=>{if(!n.show)return 0;let e=c.width,r=n.maxLengthPx;return t||(e+=n.padding,r+=n.padding),Math.min(e,r,u.rect.width)},requiredHeight:()=>{if(!n.show)return 0;let e=c.height;return t&&(e+=n.padding),Math.min(e,u.rect.height)}},ticks:{values:o,anchor:a,length:Math.min(Math.max(...o.map(e=>e.textMetrics.width)),e.stgns.tick.maxLengthPx),requiredHeight:()=>"top"===a?Math.max(...u.ticks.values.map(e=>e.textMetrics.height))+e.stgns.tick.padding:0,height:Math.max(...o.map(e=>e.textMetrics.height))},legend:{fillScale:r,majorScale:i,length:()=>{const n=t?"height":"width",r=t?"requiredHeight":"requiredWidth",i=Math.min(u.rect[n],u.rect[n]*e.stgns.length)-u.title[r]();return Math.max(0,Math.min(i,e.stgns.maxLengthPx))}}};return u}const Ev={require:["chart","settings","renderer"],defaultSettings:{layout:{displayOrder:0,dock:"right"},settings:{size:15,length:.5,maxLengthPx:250,align:.5,justify:0,padding:{left:5,right:5,top:5,bottom:5},tick:{label:null,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,anchor:null,padding:5},title:{show:!0,text:void 0,fill:"#595959",fontSize:"12px",fontFamily:"Arial",maxLengthPx:100,padding:5,maxLines:2,wordBreak:"none",lineHeight:1.2,hyphens:"auto",anchor:null}}},preferredSize(e){const t=this.state;t.rect=Mv(this,e.inner);let n=this.stgns.size;const r=t.isVertical?this.stgns.padding.left+this.stgns.padding.right:this.stgns.padding.top+this.stgns.padding.bottom;n+=r;const i=Math.max(e.inner.width,e.inner.height);if("left"===t.ticks.anchor||"right"===t.ticks.anchor){const e=t.ticks.values.reduce((e,t)=>e+t.textMetrics.height,0);if(e>this.state.legend.length())return i;n+=t.ticks.length}else{if(t.ticks.length>this.state.legend.length())return i;n+=Math.max(...t.ticks.values.map(e=>e.textMetrics.height))}return n+=this.stgns.tick.padding,this.stgns.title.show&&(n="left"===t.title.anchor||"right"===t.title.anchor?Math.max(t.title.textBounds.height+r,n):Math.max(n,t.title.requiredWidth()+r)),this.state.preferredSize=n,n},created(){this.stgns=this.settings.settings,this.state=kv(this)},beforeUpdate(e){this.stgns=e.settings.settings,this.state=kv(this)},beforeRender(e){if(this.state.nodes=[],this.state.rect=Mv(this,e.size),this.stgns.title.show){const e=function(e){const t=e.state,n=e.stgns,r="left"===t.ticks.anchor,i="top"===t.ticks.anchor;let o=t.rect.x,a=t.rect.y,s="start";"left"===t.title.anchor?(o+=t.title.requiredWidth()-n.title.padding,a+=t.title.textMetrics.height,a+=i?t.rect.height-t.title.textBounds.height:0,s="end"):"right"===t.title.anchor?(o+=t.legend.length(),o+=n.title.padding,a+=t.title.textMetrics.height,a+=i?t.rect.height-t.title.textBounds.height:0):"top"===t.title.anchor&&(o+=r?t.rect.width:0,a+=t.title.textMetrics.height,s=r?"end":"start");const l={tag:"legend-title",type:"text",x:o,y:Math.min(a,t.rect.y+t.rect.height),text:n.title.text,fill:n.title.fill,fontSize:n.title.fontSize,fontFamily:n.title.fontFamily,maxWidth:n.title.maxLengthPx,maxLines:n.title.maxLines,wordBreak:n.title.wordBreak,hyphens:n.title.hyphens,lineHeight:n.title.lineHeight,anchor:s,title:n.title.text};return xv(e,l),l}(this);this.state.nodes.push(e)}const t=function(e){const t=e.state.legend.fillScale,n=e.state.legend.majorScale,r=t.domain().map(e=>({type:"stop",color:t(e),offset:Math.min(1,Math.max(0,n.norm(e)))}));return r.sort((e,t)=>e.offset-t.offset)}(this),n=function(e,t){const n=e.state,r=e.stgns,i=n.rect;let o=i.x,a=i.y,s=n.isVertical?r.size:n.legend.length(),l=n.isVertical?n.legend.length():r.size;"left"===n.ticks.anchor?o+=n.rect.width-r.size:"top"===n.ticks.anchor&&(a+=n.rect.height-r.size),"top"===n.title.anchor?a+=n.title.requiredHeight():"left"===n.title.anchor&&(o+=n.title.requiredWidth());const c={type:"rect",x:o,y:a,width:s,height:l,fill:{type:"gradient",stops:t,degree:n.isVertical?90:180}};return xv(e,c),c}(this,t),r=function(e,t){const n=e.state,r=e.stgns;let i="start";const o={type:"rect",x:t.x,y:t.y,width:n.isVertical?0:t.width,height:n.isVertical?t.height:0,fill:"transparent"},a=n.ticks.values.map(a=>{let s=0,l=0,c=0,u="alphabetical";return n.isVertical?(l=t.y+t.height*a.pos,u=0===a.pos?"text-before-edge":"text-after-edge"):s=t.x+t.width*a.pos,"right"===n.ticks.anchor?(s=t.x+r.size+r.tick.padding,o.x=t.x+t.width):"left"===n.ticks.anchor?(s=t.x-r.tick.padding,i="end"):"top"===n.ticks.anchor?(l=t.y-r.tick.padding,c-=.25*a.textMetrics.height,i=0===a.pos?"start":"end"):"bottom"===n.ticks.anchor&&(l=t.y+t.height+r.tick.padding,c=.8*a.textMetrics.height,i=0===a.pos?"start":"end",o.y=t.y+t.height),{type:"text",x:s,y:l,dx:0,dy:c,text:a.label,fontSize:r.tick.fontSize,fontFamily:r.tick.fontFamily,fill:r.tick.fill,maxWidth:n.isVertical?r.tick.maxLengthPx:Math.min(r.tick.maxLengthPx,n.legend.length()/2),anchor:i,textBoundsFn:e.renderer.textBounds,title:a.label,baseline:u}});return{type:"container",id:"legend-seq-ticks",children:[...a,o]}}(this,n),i={id:"legend-seq-target",type:"container",children:[n,r]};this.state.nodes.push(i)},render(){return this.state.nodes}};const Cv={coordinates:{minor:.5,major:.5,layerId:0,defined:!0},layers:{curve:"linear",show:!0,line:{stroke:"#ccc",strokeWidth:1,strokeLinejoin:"miter",strokeDasharray:void 0,opacity:1,show:!0,showMinor0:!0},area:{fill:"#ccc",opacity:.8,show:!0}}};function Av(e,t){let{generatorType:n,item:r,data:i,major:o,minor:a,layerObj:s,stngs:l}=t,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const u={type:"path",points:e,generatorType:n,major:o,minor:a,layerObj:s,stngs:l,opacity:r.opacity,stroke:r.stroke,strokeWidth:r.strokeWidth,strokeLinejoin:r.strokeLinejoin,fill:c||r.fill,data:i};return r.strokeDasharray&&(u.strokeDasharray=r.strokeDasharray),u}function Dv(e){const{metaLayers:t,coordinates:n,layers:r,lines:i,areas:o}=function(e){let{data:t,stngs:n,rect:r,resolver:i,style:o,domain:a}=e;const{width:s,height:l}=r,c=i.resolve({data:t,defaults:Cv.coordinates,settings:n.coordinates||{},scaled:{major:"vertical"===n.orientation?l:s,minor:"vertical"===n.orientation?s:l}}),u=!n.connect&&a.length>2&&("function"==typeof n.coordinates.layerId||"object"==typeof n.coordinates.layerId),d={};let f=0;for(let e=0;e<c.items.length;e++){let t=c.items[e],n=t.layerId;if(u){const e=d[n]?d[n].items[d[n].items.length-1]:null,r=e?a.indexOf(e.data.major?e.data.major.value:e.data.value):null;e&&a.indexOf(t.data.major?t.data.major.value:t.data.value)-1!==r&&d[n].items.push({dummy:!0})}d[n]=d[n]||{order:f++,id:n,items:[],dataItems:[],consumableData:{}},d[n].dataItems.push(t.data),d[n].items.push(t)}const p=Object.keys(d).map(e=>(d[e].consumableData=Wa({points:d[e].dataItems},d[e].dataItems[0]),d[e])),h={items:p.map(e=>e.consumableData)},m=n.layers||{};return{coordinates:c,metaLayers:p,layers:i.resolve({data:h,defaults:{curve:Cv.layers.curve,show:Cv.layers.show},settings:{curve:m.curve,show:m.show}}),lines:i.resolve({data:h,defaults:Va({},Cv.layers.line,o.line),settings:m.line}),areas:i.resolve({data:h,defaults:Va({},Cv.layers.area,o.area),settings:m.area})}}(e),a=[];return t.forEach((t,s)=>{const l=r.items[s];if(!1===l.show)return;l.datum=l.data,l.data=[],l.id=t.id;const c=[],u=[];let d,f;for(let r=0;r<t.items.length;r++){if(d=t.items[r],f=d.data,!d.dummy){if(isNaN(d.major))continue;e.missingMinor0&&(d.minor0=n.settings.minor.scale?n.settings.minor.scale(f.minor0?f.minor0.value:0):0),isNaN(d.minor)||c.push(d.minor),l.data.push(d.data)}u.push(d)}const p=c.sort((e,t)=>e-t)[Math.floor((c.length-1)/2)];a.push({layerObj:l,lineObj:i.items[s],areaObj:o.items[s],median:p,points:u,consumableData:t.consumableData})}),a}const qv={require:["chart","resolver"],defaultSettings:{style:{area:"$shape",line:"$shape-outline"}},created(){},render(e){let{data:t}=e;const{width:n,height:r}=this.rect;this.stngs=this.settings.settings||{};const i=!this.stngs.coordinates||void 0===this.stngs.coordinates.minor0,o=Dv({data:t,stngs:this.stngs,rect:this.rect,resolver:this.resolver,style:this.style,missingMinor0:i,domain:this.stngs.coordinates&&this.stngs.coordinates.major&&this.stngs.coordinates.major.scale?this.chart.scale(this.stngs.coordinates.major.scale).domain():[]});if(this.stngs.layers&&this.stngs.layers.sort){const e=o.map(e=>({id:e.layerObj.id,data:e.layerObj.data})).sort(this.stngs.layers.sort).map(e=>e.id);o.sort((t,n)=>e.indexOf(t.layerObj.id)-e.indexOf(n.layerObj.id))}else o.sort((e,t)=>e.median-t.median);return function(e,t){let{width:n,height:r,missingMinor0:i,stngs:o}=t;const a=[],s=o.layers||{};return e.forEach(e=>{const{lineObj:t,layerObj:l,areaObj:c,points:u}=e;let d={size:r,p:"y"},f={size:n,p:"x"};if("vertical"===o.orientation){const e=Va(!0,{},f);f=Va(!0,{},d),d=Va(!0,{},e)}s.area&&!1!==c.show&&a.push(Av(u,{data:e.consumableData,item:c,generatorType:"area",major:f,minor:d,layerObj:l,stngs:o})),t&&!1!==t.show&&(a.push(Av(u,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"1"),major:f,minor:d,layerObj:l,stngs:o},"none")),!i&&s.area&&!1!==c.show&&!1!==t.showMinor0&&a.push(Av(u,{data:e.consumableData,item:t,generatorType:"line".concat(d.p.toUpperCase(),"0"),major:f,minor:d,layerObj:l,stngs:o},"none")))}),a}(o,{width:n,height:r,missingMinor0:i,stngs:this.stngs})}};function _v(e,t){let n,r,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];"object"==typeof t.center?(n=t.center.x,r=t.center.y):(n=t.clientX,r=t.clientY);const o=n-e.state.boundingRect.left,a=r-e.state.boundingRect.top;return{x:i?Math.max(0,Math.min(o,e.rect.width)):o,y:i?Math.max(0,Math.min(a,e.rect.height)):a}}function Tv(e,t){return{x:t.x+e.rect.x,y:t.y+e.rect.y}}function Nv(e,t){const n=Math.min(e.x,t.x),r=Math.min(e.y,t.y);return{x:n,y:r,width:Math.max(e.x,t.x)-n,height:Math.max(e.y,t.y)-r}}const Ov={require:["chart","renderer"],defaultSettings:{layout:{displayOrder:99},settings:{brush:{components:[]}},style:{area:"$selection-area-target"}},on:{areaStart(e){this.start(e)},areaMove(e){this.move(e)},areaEnd(e){this.end(e)},areaCancel(){this.cancel()}},created(){this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1}},preferredSize:()=>0,render(){},start(e){this.state.boundingRect=this.renderer.element().getBoundingClientRect();const t=_v(this,e,!1);lh({x:0,y:0,width:this.rect.width,height:this.rect.height},t)&&(this.state.brushConfig=this.settings.settings.brush.components.map(e=>({key:e.key,contexts:e.contexts,data:e.data,action:e.action||"set"})),this.state.start=_v(this,e),this.state.active=!0)},move(e){var t;this.state.active&&(this.state.end=_v(this,e),function(e){if(e.state.active){const t=Tv(e,e.state.start),n=Tv(e,e.state.end),r=e.chart.shapesAt(Nv(t,n),{components:e.state.brushConfig});e.chart.brushFromShapes(r,{components:e.state.brushConfig})}}(this),(t=this).renderer.render([Va({type:"rect"},Nv(t.state.start,t.state.end),t.style.area)]))},end(){this.state.active&&(this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))},cancel(){this.state.active&&(!function(e,t){e.brushConfig.forEach(e=>{Array.isArray(e.contexts)&&e.contexts.forEach(e=>{t.brush(e).end()})})}(this.state,this.chart),this.state={start:{x:0,y:0},end:{x:0,y:0},active:!1},this.renderer.render([]))}};function Iv(e,t,n){let{renderer:r,style:i,props:o,h:a}=n;const s=function(e,t){return{tooltip:"function"==typeof e.tooltipClass?e.tooltipClass({dock:t.dock}):e.tooltipClass,content:"function"==typeof e.contentClass?e.contentClass({dock:t.dock}):e.contentClass,arrow:"function"==typeof e.arrowClass?e.arrowClass({dock:t.dock}):e.arrowClass}}(o,t),l=function(e,t,n,r){return r.content({h:e,style:n,data:t})}(a,e,i,o),c=a("div",{dir:o.direction,class:dv(Va({"pic-tooltip":!0},s.tooltip)),style:Va({position:"relative",display:"inline-block"},t.computedTooltipStyle)},a("div",{style:i.content,class:dv(Va({"pic-tooltip-content":!0},s.content))},l),a("div",{class:dv(Va({"pic-tooltip-arrow":!0},s.arrow)),style:Va({},i.arrow,i["arrow-".concat(t.dock)],t.computedArrowStyle)}));return r.render(c),r.element().children[0]}function Lv(e){let{defaultDuration:t,defaultDelay:n}=e,r=null,i=null,o=!1;const a=function(){const e=function(){},t={pending:[],debounced:[],active:[],cancelled:[],rejected:[],fulfilled:[]};let n;return e.set=e=>{n=e,t[n].forEach(t=>t(e))},e.on=(e,n)=>{Array.isArray(e)?e.forEach(e=>t[e].push(n)):t[e].push(n)},e.destroy=()=>{Object.keys(t).forEach(e=>{t[e].length=0})},e}(),s=function(){},l=()=>{r=null,i=null,o=!1,a.set("fulfilled")};return s.invoke=function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n;r&&(clearTimeout(r),a.set("debounced")),a.set("pending"),r=setTimeout(()=>{e(),o=!0,r=null,a.set("active")},c),s>0&&(i&&clearTimeout(i),i=setTimeout(l,s+Math.max(c,0)))},s.clear=()=>{o?a.set("cancelled"):r&&(clearTimeout(r),a.set("rejected")),i&&clearTimeout(i),r=null,i=null,o=!1},s.on=(e,t)=>{a.on(e,t)},s.destroy=()=>{s.clear(),a.destroy()},s}function Pv(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return{left:"translate(-100%,-50%) translateX(".concat(-e,"px)"),right:"translate(".concat(e,"px, -50%)"),top:"translate(-50%, -100%) translateY(".concat(-e,"px)"),bottom:"translate(-50%, ".concat(e,"px)"),inside:"translate(-50%, -50%)"}}function Rv(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return{left:{x:-e-n,y:-t/2},right:{x:n,y:-t/2},top:{x:-e/2,y:-t-n},bottom:{x:-e/2,y:n},inside:{x:-e/2,y:-t/2}}}function zv(e,t){const n=e>0?"-":"+";return e=Math.abs(e),void 0===t&&(t=e),{left:{left:"100%",top:"calc(50% ".concat(n," ").concat(e,"px)"),borderWidth:"".concat(t,"px")},right:{left:"".concat(2*-e,"px"),top:"calc(50% ".concat(n," ").concat(e,"px)"),borderWidth:"".concat(t,"px")},top:{left:"calc(50% ".concat(n," ").concat(e,"px)"),top:"100%",borderWidth:"".concat(t,"px")},bottom:{left:"calc(50% ".concat(n," ").concat(e,"px)"),top:"".concat(2*-e,"px"),borderWidth:"".concat(t,"px")},inside:{left:"0px",top:"0px",borderWidth:"0px"}}}function Fv(e,t,n,r,i,o){const a=t+o.x,s=n+o.y,l=i;return!(a<0||s<0)&&!(a+r>e.width||s+l>e.height)}function jv(e){let{area:t,vx:n,vy:r,width:i,height:o,offset:a}=e;const s=n+a.x,l=r+a.y,c=i,u=o;let d=s<0?-s:0,f=l<0?-l:0;return d+=s+c>t.width?-(s+c-t.width):0,f+=l+u>t.height?-(l+u-t.height):0,{x:d,y:f}}function Vv(e){let{options:t,pointer:n,width:r,height:i,dockOrder:o,x:a,y:s}=e;const{targetBounds:l}=n,c=Pv(t.offset),u=c[t.dock];if(u)return{computedTooltipStyle:{left:"".concat(a,"px"),top:"".concat(s,"px"),transform:u},computedArrowStyle:zv(t.offset)[t.dock],dock:t.dock};const d={width:"target"===t.area?l.width:window.innerWidth,height:"target"===t.area?l.height:window.innerHeight},f=Rv(r,i,t.offset),p=[],h="target"===t.area?a:l.left+a,m="target"===t.area?s:l.top+s;for(let e=0;e<o.length;e+=1){const n=o[e],l=jv({area:d,vx:h,vy:m,width:r,height:i,offset:f[n]}),u={left:"".concat(a,"px"),top:"".concat(s,"px"),transform:c[n]},g=zv(t.offset)[n];0!==l.x&&(u.width="".concat(r-20-Math.abs(l.x),"px"),"top"!==n&&"bottom"!==n||(u.left="".concat(a+l.x,"px"),g.left="calc(50% ".concat(l.x>0?"-":"+"," ").concat(Math.abs(l.x),"px)")));const y={computedTooltipStyle:u,computedArrowStyle:g,dock:n,rect:{width:r,height:i}};if(0===l.x&&0===l.y)return y;y.offset=l,p.push(y)}return p.sort((e,t)=>Math.abs(e.offset.x)-Math.abs(t.offset.x)),p[0]}function Hv(e,t,n){const r=e.key?n.component(e.key):n.componentsFromPoint({x:t.clientX,y:t.clientY})[0];if(!r)return{x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1}};const i=r.rect;return Va({scaleRatio:i.scaleRatio},i.computedInner)}const Bv={bounds:function(e){let{resources:t,nodes:n,pointer:r,width:i,height:o,options:a}=e;const{targetBounds:s}=r,{x:l,y:c,width:u,height:d}=t.getNodeBoundsRelativeToTarget(n[0]),f={left:{x:l,y:c+d/2},right:{x:l+u,y:c+d/2},top:{x:l+u/2,y:c},bottom:{x:l+u/2,y:c+d},inside:{x:l+u/2,y:c+d/2}},p=Pv(a.offset),h=p[a.dock];if(h)return{computedTooltipStyle:{left:"".concat(f[a.dock].x,"px"),top:"".concat(f[a.dock].y,"px"),transform:h},computedArrowStyle:zv(a.offset)[a.dock],dock:a.dock};const m={width:"target"===a.area?s.width:window.innerWidth,height:"target"===a.area?s.height:window.innerHeight},g=Rv(i,o,a.offset),y=["top","left","right","bottom","inside"];for(let e=0;e<y.length;e+=1){const t=y[e];if(Fv(m,"target"===a.area?f[t].x:s.left+f[t].x,"target"===a.area?f[t].y:s.top+f[t].y,i,o,g[t]))return{computedTooltipStyle:{left:"".concat(f[t].x,"px"),top:"".concat(f[t].y,"px"),transform:p[t]},computedArrowStyle:zv(a.offset)[t],dock:t}}const v=function(e){let{options:t,docks:n,dockOffsets:r,targetBounds:i,area:o,width:a}=e;const s="top",l="target"===t.area?n[s].x:i.left+n[s].x,c=("target"===t.area?n[s].y:(i.top,n[s].y),r[s]),u=l+c.x,d=(c.y,a);let f=n.top.x;return u<0&&u+d>o.width||(u<0?f-=u:u+d>o.width&&(f-=u+d-o.width)),f}({options:a,docks:f,dockOffsets:g,targetBounds:s,area:m,width:i});return{computedTooltipStyle:{left:"".concat(v,"px"),top:"".concat(f.top.y,"px"),transform:p.top},computedArrowStyle:zv(a.offset+v-f.top.x,a.offset).top,dock:"top"}},pointer:function(e){let{options:t,pointer:n,width:r,height:i}=e;const{x:o,y:a}=n;return Vv({x:o,y:a,pointer:n,width:r,height:i,options:t,dockOrder:["top","left","right","bottom"]})},slice:function(e){let{options:t,pointer:n,width:r,height:i,nodes:o,resources:a}=e;const s=o[0],{dx:l,dy:c}=n,u=a.getComponentBoundsFromNode(s),d=l+u.x+u.width/2,f=c+u.y+u.height/2,{start:p,end:h,outerRadius:m}=s.desc.slice,g=(p+h)/2-Math.PI/2,y=2*Math.PI,v=(g%y+y)%y;let b=["top","left","right","bottom"];return"auto"===t.dock&&(b=v<=Math.PI/4||v>=7*Math.PI/4?["right","top","bottom","left"]:v<=3*Math.PI/4?["bottom","left","right","top"]:v<=5*Math.PI/4?["left","top","bottom","right"]:["top","left","right","bottom"]),Vv({x:d+m*u.scaleRatio.x*Math.cos(v),y:f+m*u.scaleRatio.y*Math.sin(v),pointer:n,width:r,height:i,options:t,dockOrder:b})}};function $v(e,t){let{width:n,height:r}=e,{chart:i,state:o,props:a}=t;const s={resources:{formatter:i.formatter,scale:i.scale,component:i.component,getComponentBoundsFromNode:e=>Hv(e,o.pointer,i),getNodeBoundsRelativeToTarget:e=>function(e,t,n){const r=Hv(e,t,n),i=e.bounds;return{x:r.x+t.dx+i.x,y:r.y+t.dy+i.y,width:i.width,height:i.height}}(e,o.pointer,i)},nodes:o.activeNodes,pointer:o.pointer,width:n,height:r},l=typeof a.placement;if("object"===l&&"function"==typeof a.placement.fn)return a.placement.fn(s);let c={type:"pointer",offset:8,dock:"auto",area:"viewport"};"function"===l&&(c=Va(c,a.placement(s))),"object"===l&&Bv[a.placement.type]?c=Va(c,a.placement):"string"===l&&Bv[a.placement]&&(c=Va(c,{type:a.placement})),s.options=c;const u=Bv[c.type](s);let{x:d,y:f,width:p,height:h}=s.resources.getComponentBoundsFromNode(s.nodes[0]);return d+=s.pointer.dx,p+=d,f+=s.pointer.dy,h+=f,u.computedTooltipStyle.left="".concat(Math.min(Math.max(0,d,parseFloat(u.computedTooltipStyle.left)),p),"px"),u.computedTooltipStyle.top="".concat(Math.min(Math.max(0,f,parseFloat(u.computedTooltipStyle.top)),h),"px"),u}let Wv;function Uv(){Wv=null}const Yv={duration:8e3,delay:500,filter:e=>e.filter(e=>e.data&&void 0!==e.data.value),extract:e=>e.node.data.value,content:e=>{let{h:t,data:n}=e;return n.map(e=>t("div",{},e))},isEqual:(e,t)=>e.length&&e.length===t.length&&e.every((e,n)=>t[n]&&JSON.stringify(e.data)===JSON.stringify(t[n].data)),placement:{type:"pointer",dock:"auto",offset:8,area:"viewport"},tooltipClass:{},contentClass:{},arrowClass:{},direction:"ltr",appendTo:void 0,beforeShow:void 0,afterShow:void 0,beforeHide:void 0,onHide:void 0,afterHide:void 0};const Xv={require:["chart","renderer"],defaultSettings:{settings:Yv,style:{tooltip:{},content:{backgroundColor:"$gray-25",color:"$font-color--inverted",fontFamily:"$font-family",fontSize:"$font-size",lineHeight:"$line-height",borderRadius:"4px",padding:"8px",opacity:.9},arrow:{position:"absolute",width:"0px",height:"0px",borderStyle:"solid",color:"$gray-25",opacity:.9},"arrow-bottom":{borderTopColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-top":{borderBottomColor:"transparent",borderLeftColor:"transparent",borderRightColor:"transparent"},"arrow-right":{borderTopColor:"transparent",borderLeftColor:"transparent",borderBottomColor:"transparent"},"arrow-left":{borderTopColor:"transparent",borderBottomColor:"transparent",borderRightColor:"transparent"}}},renderer:"dom",on:{hide(){this.hide()},show(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.show(e,t)},prevent(e){this.prevent(e)}},hide(){this.dispatcher.clear(),this.state.activeNodes=[],this.state.pointer={}},show(e){let t,{nodes:n,duration:r,delay:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!this.state.prevent&&this.state.targetElement&&(this.state.pointer=function(e,t){let{chart:n,state:r}=t,i=0,o=0;e.center?(i+=e.center.x,o+=e.center.y):(i+=e.clientX,o+=e.clientY);const a=n.element.getBoundingClientRect(),s=r.targetElement.getBoundingClientRect(),l=i,c=o,u=a.left-s.left,d=a.top-s.top,f=i-a.left,p=o-a.top;return i-=s.left,o-=s.top,{x:i,y:o,dx:u,dy:d,cx:f,cy:p,clientX:l,clientY:c,targetBounds:s,chartBounds:a}}(e,this),t=Array.isArray(n)?this.props.filter(n):this.props.filter(this.chart.shapesAt({x:this.state.pointer.cx,y:this.state.pointer.cy})),this.props.isEqual(this.state.activeNodes,t)||(this.dispatcher.clear(),this.state.activeNodes=t,this.state.activeNodes.length&&this.dispatcher.invoke(()=>this.invokeRenderer(this.state.activeNodes),r,i)))},prevent(e){this.state.prevent=!!e},init(e){this.state={activeNodes:[],pointer:{},targetElement:null,prevent:!1},this.props=e.settings,this.dispatcher=Lv({defaultDuration:this.props.duration,defaultDelay:this.props.delay});const t=this.dispatcher.clear;this.dispatcher.on("pending",()=>{!function(e){Wv&&Wv!==e&&Wv()}(t),Wv=t,"function"==typeof this.props.beforeShow&&this.props.beforeShow.call(void 0,{resources:{formatter:this.chart.formatter,scale:this.chart.scale}})}),this.dispatcher.on(["cancelled","fulfilled"],()=>{const e={resources:{formatter:this.chart.formatter,scale:this.chart.scale}};"function"==typeof this.props.beforeHide&&this.props.beforeHide.call(void 0,Va({element:this.state.tooltipElm},e)),"function"==typeof this.props.onHide?this.props.onHide.call(void 0,Va({element:this.state.tooltipElm},e)):this.renderer.clear([]),"function"==typeof this.props.afterHide&&this.props.afterHide.call(void 0,e),Wv===t&&(Wv=null),this.state.tooltipElm=void 0}),this.dispatcher.on("active",()=>{"function"==typeof this.props.afterShow&&this.props.afterShow.call(void 0,{element:this.state.tooltipElm,resources:{formatter:this.chart.formatter,scale:this.chart.scale}})})},created(){this.init(this.settings)},beforeUpdate(e){let{settings:t}=e;this.dispatcher&&(this.dispatcher.destroy(),Uv()),this.init(t)},render(e){return this.h=e,[]},beforeDestroy(){this.dispatcher.destroy(),Uv()},appendTo(){if(this.props.appendTo){this.state.targetElement="function"==typeof this.props.appendTo?this.props.appendTo({resources:{formatter:this.chart.formatter,scale:this.chart.scale}}):this.props.appendTo;const{width:e,height:t}=this.state.targetElement.getBoundingClientRect();this.renderer.destroy(),this.renderer.size({width:e,height:t}),this.renderer.appendTo(this.state.targetElement)}else this.state.targetElement=this.renderer.element()},mounted(){this.appendTo()},updated(){this.appendTo()},invokeRenderer(e){const t=function(e,t){let{chart:n,scale:r,props:i,h:o}=t;const a={resources:{dataset:n.dataset,scale:n.scale,formatter:n.formatter},scale:r,h:o},s=[];return e.forEach(e=>{if("function"==typeof i.extract){const t=Va({node:e},a);s.push(i.extract(t))}}),s}(e,this),n=$v(Iv(t,{},this).getBoundingClientRect(),this);this.state.tooltipElm=Iv(t,n,this)}};const Gv={require:["renderer","chart"],defaultSettings:{settings:{target:"",selector:"*",fill:"rgba(0, 255, 0, 0.1)",stroke:"lime",opacity:1,useOuterRect:!1}},on:{update(){this.draw()}},draw(){const e=this.chart.findShapes(this.props.selector).filter(e=>e.key===this.props.target),t=e.filter(e=>e.collider).map(e=>e.collider);t.forEach(e=>{e.fill=this.props.fill,e.stroke=this.props.stroke,e.opacity=this.props.opacity,e.collider={type:null}}),this.renderer.render(t)},created(){this.props=this.settings.settings},resize(e){let{outer:t,inner:n}=e;return this.props.useOuterRect?t:n},render(){},mounted(){this.draw()},updated(){this.props=this.settings.settings,this.draw()}};var Kv={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},Zv=/([astvzqmhlc])([^astvzqmhlc]*)/gi,Jv=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function Qv(e){const t=[],n=String(e).trim();return"M"!==n[0]&&"m"!==n[0]||n.replace(Zv,(e,n,r)=>{const i=function(e){const t=e.match(Jv);return t?t.map(Number):[]}(r);let o=n.toLowerCase(),a=n;if("m"===o&&i.length>2&&(t.push([a,...i.splice(0,2)]),o="l",a="m"===a?"l":"L"),i.length<Kv[o])return"";for(t.push([a,...i.splice(0,Kv[o])]);i.length>=Kv[o]&&i.length&&Kv[o];)t.push([a,...i.splice(0,Kv[o])]);return""}),t}const eb=2*Math.PI;function tb(e,t){return{x:.5*(e.x+t.x),y:.5*(e.y+t.y)}}function nb(e,t,n,r,i){const o=1-e;return o**3*t+3*o**2*e*n+3*o*e**2*r+e**3*i}function rb(e,t,n,r){let i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:8;if(o<1||function(e,t,n,r){return Math.abs(e.x+n.x-(t.x+t.x))+Math.abs(e.y+n.y-(t.y+t.y))+Math.abs(t.x+r.x-(n.x+n.x))+Math.abs(t.y+r.y-(n.y+n.y))}(e,t,n,r)<=10)return i[i.length-1]!==e&&i.push(e),i.push(r),i;const a=tb(e,t),s=tb(t,n),l=tb(n,r),c={x:nb(.5,e.x,t.x,n.x,r.x),y:nb(.5,e.y,t.y,n.y,r.y)},u=tb(a,s),d=tb(s,l);return rb(e,a,u,c,i,o-1),rb(c,d,l,r,i,o-1),i}function ib(e,t,n){const{cp1:r,cp2:i}=function(e,t,n){return{cp1:{x:e.x+2/3*(t.x-e.x),y:e.y+2/3*(t.y-e.y)},cp2:{x:n.x+2/3*(t.x-n.x),y:n.y+2/3*(t.y-n.y)}}}(e,t,n);return rb(e,r,i,n)}function ob(e,t,n){const r=[],i=!!e[4],o=!!e[5],a=e[3];let s,l,c,u,d=e[6],f=e[7],p=e[1],h=e[2];if("a"===e[0]&&(d+=t,f+=n),t===f&&n===f)return r;if(!p||!h)return r.push({x:d,y:f}),r;({cx:s,cy:l,rx:p,ry:h,sweepAngle:c,startAngle:u}=function(e,t,n,r,i,o,a,s,l){let c,u,d,f,p,h;const m=Mp(n%360),g=Math.cos(m),y=Math.sin(m),v=(s-o)/2,b=(l-a)/2,x=g*v+y*b,w=g*b-y*v;h=x**2/(e=Math.abs(e))**2+w**2/(t=Math.abs(t))**2,h>1&&(h=Math.sqrt(h),e*=h,t*=h);const S=e*w,M=t*x,k=S**2+M**2,E=(e*t)**2-k;let C=Math.sqrt(Math.max(E/k,0));r===i&&(C=-C);const A=C*(S/t),D=C*(-M/e);f=g*A-y*D+(s+o)/2,p=y*A+g*D+(l+a)/2;const q=(x-A)/e,_=(w-D)/t,T=(-x-A)/e,N=(-w-D)/t;return c=Math.atan2(_,q),c+=c<0?eb:0,u=Math.atan2(N,T),u+=u<0?eb:0,d=u-c,!i&&c<u?d-=eb:i&&u<c&&(d+=eb),d%=eb,{startAngle:c,sweepAngle:d,cx:f,cy:p,rx:e,ry:t}}(p,h,a,i,o,d,f,t,n));const m=Math.abs(c*Math.sqrt((p**2+h**2)/2)),g=Math.ceil(m/10),y=c/g;for(let e=1;e<=g;e++){const t=(u+y*e)%eb,n=Math.cos(t),i=Math.sin(t);r.push({x:s+n*p+-i*n,y:l+i*h+n*i})}return r}function ab(e){const t=Qv(e),n=[],r=[];let i=0,o=0,a=null,s=null,l=null,c=null;for(let e=0;e<t.length;++e){const u=t[e],d=u[0];switch("S"!==d&&"s"!==d&&"C"!==d&&"c"!==d&&(a=null,s=null),"T"!==d&&"t"!==d&&"Q"!==d&&"q"!==d&&(l=null,c=null),d){case"m":r.length&&n.push(r.splice(0));case"l":i+=u[1],o+=u[2],r.push({x:i,y:o});break;case"M":r.length&&n.push(r.splice(0));case"L":i=u[1],o=u[2],r.push({x:i,y:o});break;case"H":i=u[1],r.push({x:i,y:o});break;case"h":i+=u[1],r.push({x:i,y:o});break;case"V":o=u[1],r.push({x:i,y:o});break;case"v":o+=u[1],r.push({x:i,y:o});break;case"a":r.push(...ob(u,i,o)),i+=u[6],o+=u[7];break;case"A":r.push(...ob(u,i,o)),i=u[6],o=u[7];break;case"c":r.push(...rb({x:i,y:o},{x:u[1]+i,y:u[2]+o},{x:u[3]+i,y:u[4]+o},{x:u[5]+i,y:u[6]+o})),a=u[3]+i,s=u[4]+o,i+=u[5],o+=u[6];break;case"C":r.push(...rb({x:i,y:o},{x:u[1],y:u[2]},{x:u[3],y:u[4]},{x:u[5],y:u[6]})),a=u[3],s=u[4],i=u[5],o=u[6];break;case"s":null!==a&&null!==a||(a=i,s=o),r.push(...rb({x:i,y:o},{x:2*i-a,y:2*o-s},{x:u[1]+i,y:u[2]+o},{x:u[3]+i,y:u[4]+o})),a=u[1]+i,s=u[2]+o,i+=u[3],o+=u[4];break;case"S":null!==a&&null!==a||(a=i,s=o),r.push(...rb({x:i,y:o},{x:2*i-a,y:2*o-s},{x:u[1],y:u[2]},{x:u[3],y:u[4]})),a=u[1],s=u[2],i=u[3],o=u[4];break;case"Q":r.push(...ib({x:i,y:o},{x:u[1],y:u[2]},{x:u[3],y:u[4]})),l=u[1],c=u[2],i=u[3],o=u[4];break;case"q":r.push(...ib({x:i,y:o},{x:u[1]+i,y:u[2]+o},{x:u[3]+i,y:u[4]+o})),l=u[1]+i,c=u[2]+o,i+=u[3],o+=u[4];break;case"T":null!==l&&null!==l||(l=i,c=o),l=2*i-l,c=2*o-c,r.push(...ib({x:i,y:o},{x:l,y:c},{x:u[1],y:u[2]})),i=u[1],o=u[2];break;case"t":null!==l&&null!==l||(l=i,c=o),l=2*i-l,c=2*o-c,r.push(...ib({x:i,y:o},{x:l,y:c},{x:u[1]+i,y:u[2]+o})),i+=u[1],o+=u[2];break;case"z":case"Z":r.length&&r.push({x:r[0].x,y:r[0].y})}}return function(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];Math.abs(n.x-r.x)<1e-12&&Math.abs(n.y-r.y)<1e-12&&(e.splice(t,1),t--)}}(r),n.push(r.splice(0)),n}const sb={require:["renderer","chart"],defaultSettings:{settings:{target:"",fill:"transparent",stroke:"lime",opacity:1,radius:2,useOuterRect:!1}},on:{update(){this.draw()}},draw(){const e=this.chart.findShapes("path").filter(e=>e.key===this.props.target),t=[];e.forEach(e=>{ab(e.attrs.d).forEach(e=>{e.forEach(e=>{t.push({type:"circle",cx:e.x,cy:e.y,r:this.props.radius,fill:this.props.fill,stroke:this.props.stroke,opacity:this.props.opacity,collider:{type:null}})})})}),this.renderer.render(t)},created(){this.props=this.settings.settings},resize(e){let{outer:t,inner:n}=e;return this.props.useOuterRect?t:n},render(){},mounted(){this.draw()},updated(){this.props=this.settings.settings,this.draw()}};var lb=[function(e){e.component("box",lm),e.component("box-marker",lm)},function(e){e.component("point",gm),e.component("point-marker",gm)},function(e){e.component("pie",xm)},function(e){e.component("grid-line",Em)},function(e){e.component("ref-line",Pm)},function(e){e.component("axis",dg)},function(e){e.component("container",fg)},function(e){e.component("text",mg)},function(e){e.component("scrollbar",vg)},function(e){e.component("brush-range",Og),e.component("brush-area-dir",Rg)},function(e){e.component("range",Vg)},function(e){e.component("brush-lasso",Yg)},function(e){e.component("labels",av)},function(e){e.component("legend-cat",bv)},function(e){e.component("legend-seq",Ev)},function(e){e.component("line",qv)},function(e){e.component("brush-area",Ov)},function(e){e.component("tooltip",Xv)},function(e){e.component("debug-collider",Gv)},function(e){e.component("debug-path-to-points",sb)}];let cb=class{constructor(e){this._parent=null,this._children=[],this._ancestors=null,this.type=e,this.data=null}detach(){return this._parent&&this._parent.removeChild(this),this}get parent(){return this._parent}get isBranch(){return this._children&&this._children.length}get children(){return this._children}get ancestors(){return this._ancestors||(this._ancestors=[],this.parent&&this._ancestors.push(this.parent,...this.parent.ancestors)),this._ancestors}get descendants(){let e=[];const t=this.children.length;let n,r;for(n=0;n<t;n++)r=this.children[n],e.push(r),r.children.length&&(e=[...e,...r.descendants]);return e}equals(e){const t=this.children,n=e.children;if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(!t[e].equals(n[e]))return!1;return!0}toJSON(){return{type:this.type,children:this.children.map(e=>e.toJSON())}}};class ub{constructor(){let{x:e=0,y:t=0,width:n=0,height:r=0,minWidth:i=0,minHeight:o=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({x:e,y:t,width:n,height:r,minWidth:i,minHeight:o})}set(){let{x:e=0,y:t=0,width:n=0,height:r=0,minWidth:i=0,minHeight:o=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="rect",n>=0?(this.x=e,this.width=Math.max(n,i)):(this.x=e+Math.min(n,-i),this.width=-Math.min(n,-i)),r>=0?(this.y=t,this.height=Math.max(r,o)):(this.y=t+Math.min(r,-o),this.height=-Math.min(r,-o))}containsPoint(e){return lh(this,e)}intersectsLine(e){return ch(this,Qa(e))}intersectsRect(e){return ah(this,Ja(e))}intersectsCircle(e){return eh(e,this)}intersectsPolygon(e){return oh(e,this)}intersectsGeoPolygon(e){return yh(e,this)}points(){return[{x:this.x,y:this.y},{x:this.x+this.width,y:this.y},{x:this.x+this.width,y:this.y+this.height},{x:this.x,y:this.y+this.height}]}}class db{constructor(){let{cx:e=0,cy:t=0,r:n=0,minRadius:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({cx:e,cy:t,r:n,minRadius:r})}set(){let{cx:e=0,cy:t=0,r:n=0,minRadius:r=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="circle",this.cx=e,this.cy=t,this.r=Math.max(n,r),this.vector={x:this.cx,y:this.cy}}containsPoint(e){return Qp(this,e)}intersectsLine(e){return th(this,Qa(e))}intersectsRect(e){return eh(this,Ja(e))}intersectsCircle(e){return n=e,!Gp(t=this)&&!Gp(n)&&(t.cx-n.cx)**2+(t.cy-n.cy)**2<=(t.r+n.r)**2;var t,n}intersectsPolygon(e){return nh(this,e)}intersectsGeoPolygon(e){return hh(this,e)}points(){return[{x:this.cx,y:this.cy}]}}class fb{constructor(){let{x1:e=0,y1:t=0,x2:n=0,y2:r=0,tolerance:i=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({x1:e,y1:t,x2:n,y2:r,tolerance:i})}set(){let{x1:e=0,y1:t=0,x2:n=0,y2:r=0,tolerance:i=0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="line",this.x1=e,this.y1=t,this.x2=n,this.y2=r,this.tolerance=Math.max(0,Math.round(i)),this.vectors=this.points(),this.zeroSize=e===n&&t===r}containsPoint(e){if(this.tolerance>0){return th({cx:e.x,cy:e.y,r:this.tolerance},this)}return dh(this,e)}intersectsLine(e){return uh(this,Qa(e))}intersectsRect(e){return ch(Ja(e),this)}intersectsCircle(e){return th(e,this)}intersectsPolygon(e){return ih(e,this)}intersectsGeoPolygon(e){return gh(e,this)}points(){return[{x:this.x1,y:this.y1},{x:this.x2,y:this.y2}]}}class pb{constructor(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({vertices:e})}set(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.type="polygon",this.vertices=e.slice(),this.edges=[],function(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}(this.vertices),!(this.vertices.length<=2)){!function(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}(this.vertices),this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(let e=0;e<this.vertices.length;e++)e<this.vertices.length-1&&this.edges.push([this.vertices[e],this.vertices[e+1]]),this.xMin=isNaN(this.xMin)?this.vertices[e].x:Math.min(this.xMin,this.vertices[e].x),this.xMax=isNaN(this.xMax)?this.vertices[e].x:Math.max(this.xMax,this.vertices[e].x),this.yMin=isNaN(this.yMin)?this.vertices[e].y:Math.min(this.yMin,this.vertices[e].y),this.yMax=isNaN(this.yMax)?this.vertices[e].y:Math.max(this.yMax,this.vertices[e].y);this._bounds=null,this._boundingRect=null}}containsPoint(e){return rh(this,e)}intersectsCircle(e){return nh(e,this)}intersectsLine(e){return ih(this,Qa(e))}intersectsRect(e){return oh(this,Ja(e))}intersectsPolygon(e){return fh(this,e)}intersectsGeoPolygon(e){return ph(e,this)}points(){return this.vertices}bounds(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}boundingRect(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}function hb(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new pb(...t)}function mb(e){const t=e[0],n=e[e.length-1];t.x===n.x&&t.y===n.y||e.push(t)}function gb(e){for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];n.x===r.x&&n.y===r.y&&(e.splice(t,1),t--)}}class yb{constructor(){let{vertices:e=[[]]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({vertices:e})}set(){let{vertices:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.type="geopolygon",this.vertices=e.slice(),this.numPolygons=this.vertices.length,this.polygons=[],this.xMin=NaN,this.yMin=NaN,this.xMax=NaN,this.yMax=NaN;for(let e=0;e<this.numPolygons;e++)gb(this.vertices[e]),this.vertices[e].length>2&&mb(this.vertices[e]),this.polygons[e]=hb({vertices:this.vertices[e]}),this.xMin=isNaN(this.xMin)?this.polygons[e].xMin:Math.min(this.xMin,this.polygons[e].xMin),this.xMax=isNaN(this.xMax)?this.polygons[e].xMax:Math.max(this.xMax,this.polygons[e].xMax),this.yMin=isNaN(this.yMin)?this.polygons[e].yMin:Math.min(this.yMin,this.polygons[e].yMin),this.yMax=isNaN(this.yMax)?this.polygons[e].yMax:Math.max(this.yMax,this.polygons[e].yMax);this._bounds=null,this._boundingRect=null}containsPoint(e){return mh(this,e)}intersectsCircle(e){return hh(e,this)}intersectsLine(e){return gh(this,Qa(e))}intersectsRect(e){return yh(this,Ja(e))}intersectsPolygon(e){return ph(this,e)}intersectsGeoPolygon(e){return function(e,t){const n=e.boundingRect(),r=t.boundingRect();return!!ah(n,r)&&(sh(r,n)?Jp(t,e):Jp(e,t))}(this,e)}points(){return this.vertices}bounds(){return this._bounds||(this._bounds=[{x:this.xMin,y:this.yMin},{x:this.xMax,y:this.yMin},{x:this.xMax,y:this.yMax},{x:this.xMin,y:this.yMax}]),this._bounds}boundingRect(){return this._boundingRect||(this._boundingRect={x:this.xMin,y:this.yMin,width:this.xMax-this.xMin,height:this.yMax-this.yMin}),this._boundingRect}}function vb(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new yb(...t)}function bb(e,t){return e.x!==t.x||e.y!==t.y}class xb{constructor(){let{points:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set({points:e})}set(){let{points:e=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.type="polyline",this.segments=[],this._points=e.slice(),this._points.length>1)for(let e=0,t=this._points.length-1;e<t;e++)bb(this._points[e],this._points[e+1])&&this.segments.push({x1:this._points[e].x,y1:this._points[e].y,x2:this._points[e+1].x,y2:this._points[e+1].y})}containsPoint(e){return this.segments.some(t=>dh(t,e))}intersectsCircle(e){return this.segments.some(t=>th(e,t))}intersectsLine(e){const t=Qa(e);return this.segments.some(e=>uh(e,t))}intersectsRect(e){const t=Ja(e);return this.segments.some(e=>ch(t,e))}intersectsPolygon(e){return this.segments.some(t=>ih(e,t))}intersectsGeoPolygon(e){return this.segments.some(t=>gh(e,t))}points(){return this._points}}const wb=il();function Sb(e,t){return wb.get(e)(t)}wb.add("rect",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new ub(...t)}),wb.add("circle",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new db(...t)}),wb.add("line",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new fb(...t)}),wb.add("polygon",hb),wb.add("geopolygon",vb),wb.add("polyline",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new xb(...t)});class Mb{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.set(e)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.geometries=[],e.forEach(e=>{const t=Sb(e.type,e);t&&this.geometries.push(t)})}containsPoint(e){return this.geometries.some(t=>t.containsPoint(e))}intersectsLine(e){return this.geometries.some(t=>t.intersectsLine(e))}intersectsRect(e){return this.geometries.some(t=>t.intersectsRect(e))}intersectsCircle(e){return this.geometries.some(t=>t.intersectsCircle(e))}intersectsPolygon(e){return this.geometries.some(t=>t.intersectsPolygon(e))}intersectsGeoPolygon(e){return this.geometries.some(t=>t.intersectsGeoPolygon(e))}}class kb{constructor(){this._elements=[[1,0,0],[0,1,0],[0,0,1]],this._stack=[]}clone(){return(new kb).multiply(this)}set(e){return this._elements=e,this}save(){return this._stack.push(this.elements),this}restore(){return this._stack.length&&(this._elements=this._stack.pop()),this}add(e){let t,n;for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]+=e;return this}translate(e,t){return this.multiply([[1,0,e],[0,1,t],[0,0,1]]),this}rotate(e){let t=Math.cos(-e),n=Math.sin(-e);return this.multiply([[t,n,0],[-n,t,0],[0,0,1]]),this}multiply(e){let t,n,r,i;if(e instanceof kb&&(e=e._elements),Array.isArray(e)){for(r=[[0,0,0],[0,0,0],[0,0,0]],t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)for(i=0;i<3;i++)r[t][n]+=this._elements[t][i]*e[i][n];this._elements=r}else for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)this._elements[t][n]*=e;return this}scale(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return this.multiply([[e,0,0],[0,t,0],[0,0,1]]),this}transform(e,t,n,r,i,o){return this.multiply([[e,n,i],[t,r,o],[0,0,1]]),this}determinant(){let e=this._elements[0][0],t=this._elements[0][1],n=this._elements[0][2],r=this._elements[1][0],i=this._elements[1][1],o=this._elements[1][2],a=this._elements[2][0],s=this._elements[2][1],l=this._elements[2][2],c=0;return c=e*i*l+t*o*a+n*r*s-n*i*a-t*r*l-e*o*s,c}invert(){let e=this.determinant(),t=this._elements[0][0],n=this._elements[0][1],r=this._elements[0][2],i=this._elements[1][0],o=this._elements[1][1],a=this._elements[1][2],s=this._elements[2][0],l=this._elements[2][1],c=this._elements[2][2];return this._elements=[[o*c-a*l,r*l-n*c,n*a-r*o],[a*s-i*c,t*c-r*s,r*i-t*a],[i*l-o*s,s*n-t*l,t*o-n*i]],this.multiply(1/e),this}transpose(){const e=Object.create(this._elements);return this._elements=[[e[0][0],e[1][0],e[2][0]],[e[0][1],e[1][1],e[2][1]],[e[0][2],e[1][2],e[2][2]]],this}identity(){return this._elements=[[1,0,0],[0,1,0],[0,0,1]],this}toString(){return"".concat(this._elements.map(e=>e.join("\t")).join("\n"))}isIdentity(){const e=this._elements;return 1===e[0][0]&&0===e[0][1]&&0===e[0][2]&&0===e[1][0]&&1===e[1][1]&&0===e[1][2]&&0===e[2][0]&&0===e[2][1]&&1===e[2][2]}transformPoint(e){let t,n,r=[e.x,e.y,1],i=this._elements,o=[0,0,0];for(t=0;t<this._elements.length;t++)for(n=0;n<this._elements[t].length;n++)o[t]+=r[n]*i[t][n];return{x:o[0],y:o[1]}}transformPoints(e){let t,n,r,i,o,a=this._elements,s=[];for(i=0;i<e.length;i++){for(t=[e[i].x,e[i].y,1],o=[0,0,0],n=0;n<this._elements.length;n++)for(r=0;r<this._elements[n].length;r++)o[n]+=t[r]*a[n][r];s.push({x:o[0],y:o[1]})}return s}get elements(){const e=this._elements;return[[e[0][0],e[0][1],e[0][2]],[e[1][0],e[1][1],e[1][2]],[e[2][0],e[2][1],e[2][2]]]}}const Eb=/(translate|scale|rotate|matrix)\(([0-9,.eE+-\s]+)(?:,|\s?)+\)/g;function Cb(e,t){const n=t.args[0]*(Math.PI/180);if(t.args.length>2){const r=t.args[1],i=t.args[2];e.translate(r,i),e.rotate(n),e.translate(-r,-i)}else 1===t.args.length&&e.rotate(n)}function Ab(e,t){const n=t.args[0],r=isNaN(t.args[1])?t.args[0]:t.args[1];e.scale(n,r)}function Db(e,t){const n=t.args[0],r=isNaN(t.args[1])?0:t.args[1];e.translate(n,r)}function qb(e,t){t.args.length>=6&&e.transform(...t.args)}function _b(e,t){const n=function(e){let t,n=[];for(;null!==(t=Eb.exec(e));){const e=t[2].trim(),r=-1===e.indexOf(",")?e.split(" "):e.split(",");n.push({cmd:t[1],args:r.filter(e=>e.trim().length>0).map(e=>Number(e))})}return n}(e);let r;for(let e=0,i=n.length;e<i;e++)r=n[e],"rotate"===r.cmd?Cb(t,r):"scale"===r.cmd?Ab(t,r):"matrix"===r.cmd?qb(t,r):"translate"===r.cmd&&Db(t,r)}const Tb={type:/^\w[\w-]+/,attr:/^\[\w(?:[\w\._-]+)?(?:[!]?=['\"][\w\s*#_-]*['\"])?\]/,universal:/^(\*)/,tag:/^\.(\w+)/},Nb={type:(e,t)=>t.filter(t=>{const n=t.type;return!!n&&n.toLowerCase()===e.toLowerCase()}),attr:(e,t,n,r)=>r.filter(r=>{const i=r.attrs[e];if(!t)return void 0!==i;if(void 0===i)return!1;switch(t){case"=":return n===String(i);case"!=":return n!==String(i);default:return!1}}),universal:e=>e,tag:(e,t)=>t.filter(t=>{const n=t.tag;return!!n&&-1!==n.trim().split(/\s+/).indexOf(e.replace(".",""))})};function Ob(e,t){if(!t||!t.length||!e||"function"!=typeof Nb[e.type])return[];switch(e.type){case"type":case"tag":return Nb[e.type](e.value,t);case"attr":return Nb[e.type](e.attribute,e.operator,e.attributeValue,t);case"universal":return Nb[e.type](t);default:return[]}}var Ib={find:function(e,t){const n=[],r=[];let i,o;if(t.isBranch){let a;i=function(e){const t=[];let n,r,i,o;return e.split(/\s*,\s*/).forEach(e=>{e=e.trim(),n=[];const a=t=>{i=e.match(Tb[t]),i&&(o=!0,e=e.slice(i[0].length),r={type:t,value:i[0]},"attr"===t&&(i=i[0].match(/\[(\w[\w\._-]+)?(?:([!]?=)['\"]([\w\s#_-]*)['\"])?\]/),r.attribute=i[1],r.operator=i[2],r.attributeValue=i[3]),n.push(r))};for(;e&&(o=!1,i=e.match(/^\s*([>+~]|\s)\s*/),i&&(o=!0,n.push({type:" ",value:i[0]}),e=e.slice(i[0].length)),Object.keys(Tb).forEach(a),n&&n.length&&t.indexOf(n)<0&&t.push(n),o););}),t}(e),o=t.descendants;for(let e=0,t=i.length;e<t;e++){a=i[e];const t=[];let n=o.slice(),s=!1;a.reverse().forEach(e=>{if(" "===e.type)return t.push(n),n=o.slice(),void(s=!1);n=Ob(e,n),s=!0}),s&&t.push(n);const l=t[0].filter(e=>{let n,r=e.parent;for(let e=1;e<t.length;e++){for(n=t[e].indexOf(r);r&&n<0;)r=r.parent,n=t[e].indexOf(r);if(n<0)return!1}return!0});r.push(l)}for(let e=0,t=r.length;e<t;e++)for(let t=0,i=r[e].length;t<i;t++)n.indexOf(r[e][t])<0&&n.push(r[e][t])}return n||[]}};function Lb(e,t,n){const r=e.type;let i=e.points();n&&(i=i.every(e=>Array.isArray(e))?i.map(e=>n.transformPoints(e)):n.transformPoints(i)),function(e,t){for(let n=0,r=e.length;n<r;n++)e[n].x/=t,e[n].y/=t}(i,t);let o=null;if("rect"===r||"bounds"===r)o=Ja(i),o.type=r;else if("circle"===r)o=function(e,t){return{cx:e[0].x,cy:e[0].y,r:t}}(i,e.r),o.type=r;else if("line"===r)o=Qa(i),o.type=r;else if("polygon"===r||"polyline"===r){o={type:"path",d:wp(i,"polygon"===r)}}else if("geopolygon"===r){let e="";for(let t=0;t<i.length;t++)e+=wp(i[t],!0);o={type:"path",d:e}}return o}class Pb{constructor(e){this._bounds=function(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const{x:n,y:r,width:i,height:o}=e.boundingRect?e.boundingRect(t):{x:0,y:0,width:0,height:0};return{x:n,y:r,width:i,height:o}},this._attrs=e.attrs,this._type=e.type,this._data=e.data,this._dpi=e.stage?e.stage.dpi:1,this._collider=()=>function(e,t){if(e.collider){const n=e.modelViewMatrix;return"collection"===e.colliderType?{type:"container",children:e.collider.geometries.map(e=>Lb(e,t,n))}:Lb(e.collider,t,n)}return null}(e,this._dpi),this._desc=e.desc,this._tag=e.tag,this._children=()=>e.children.map(e=>new Pb(e)),this._parent=()=>e.parent?new Pb(e.parent):null,this._cache={elementBoundingRect:null},this._getElementBoundingRect=()=>(!this._cache.elementBoundingRect&&this.element&&(this._cache.elementBoundingRect=this.element.getBoundingClientRect()),this._cache.elementBoundingRect||{left:0,top:0})}get children(){return this._children()}get parent(){return this._parent()}get type(){return this._type}get data(){return this._data}get attrs(){return this._attrs}set element(e){this._cache.elementBoundingRect=null,this._element=e}get element(){return this._element}set key(e){this._key=e}get key(){return this._key}get bounds(){const e=this._bounds();return e.x/=this._dpi,e.y/=this._dpi,e.width/=this._dpi,e.height/=this._dpi,e}get localBounds(){return this._bounds(!1)}boundsRelativeTo(e){const t=typeof e,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?this.bounds:this.localBounds,r=this._getElementBoundingRect();let i=r.left,o=r.top;if("object"===t&&null!==e&&"function"==typeof e.getBoundingClientRect){const{left:t=0,top:n=0}=e.getBoundingClientRect();i-=t,o-=n}return n.x+=i,n.y+=o,n}get collider(){return this._collider()}get desc(){return this._desc}get tag(){return this._tag}}function Rb(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Pb(...t)}class zb{constructor(e){this._node=Rb(e),this._parent=null,this._input=null}get node(){return this._node}set parent(e){this._parent=e}get parent(){return this._parent}set input(e){this._input=e}get input(){return this._input}}function Fb(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new zb(...t)}function jb(e,t){const n=e.parent;if(n&&"stage"!==n.type){t.parent=Fb(n);const e=n.parent;e&&"stage"!==e.type&&jb(e,t.parent)}}function Vb(e,t,n){if(null===e.colliderType)return null;const r=function(e,t){let n={};if(e.modelViewMatrix)if(Array.isArray(t))n=e.inverseModelViewMatrix.transformPoints(t);else if(isNaN(t.r))Array.isArray(t.vertices)?n.vertices=e.inverseModelViewMatrix.transformPoints(t.vertices):n=e.inverseModelViewMatrix.transformPoint(t);else{const r={x:t.cx,y:t.cy};({x:n.cx,y:n.cy}=e.inverseModelViewMatrix.transformPoint(r)),n.r=t.r}else n=t;return Array.isArray(n.vertices)&&(n=n.vertices.every(e=>Array.isArray(e))?vb(n):hb(n)),n}(e,n);return"frontChild"===e.colliderType?function(e,t,n){for(let r=e.descendants.length-1;r>=0;r--){const i=e.descendants[r];if(null!==i.collider&&i.collider[t](n)){const e=Fb(i);return jb(i,e),e}}return null}(e,t,r):function(e,t,n){if(e.collider[t](n)){const t=Fb(e);return jb(e,t),t}return null}(e,t,r)}function Hb(e,t,n,r){const i=e.length;for(let o=0;o<i;o++){const i=e[o],a=Vb(i,t,r);a&&n.push(a),!i.children||a||i.collider||Hb(i.children,t,n,r)}}function Bb(e,t,n){const r=e.length;for(let i=0;i<r;i++){const r=e[i];if(null!==Vb(r,t,n))return!0;if(r.children&&!r.collider)return Bb(r.children,t,n)}return!1}function $b(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;let n={};switch(es(e)){case"circle":return n.cx=e.cx*t,n.cy=e.cy*t,n.r=e.r,["intersectsCircle",n];case"rect":return n=Za(e).map(e=>Ap(e,t)),["intersectsRect",n];case"line":return n=Ka(e).map(e=>Ap(e,t)),["intersectsLine",n];case"point":return n=Ap(e,t),["containsPoint",n];case"polygon":return n.vertices=e.vertices.map(e=>Ap(e,t)),["intersectsPolygon",n];case"geopolygon":return n.vertices=e.vertices.map(e=>e.map(e=>Ap(e,t))),["intersectsGeoPolygon",n];default:return[]}}function Wb(e,t){const[n,r]=$b(t,e.dpi),i=[];return n&&(Hb([e],n,i,r),function(e,t){for(let n=0,r=t.length;n<r;n++)t[n].input=e}(t,i)),i}function Ub(e,t){const[n,r]=$b(t,e.dpi);return Bb([e],n,r)}class Yb extends cb{constructor(e){super(e),this._stage=null,this._collider={type:null,definition:null,fn:null},this._attrs={},this._node=null}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.node=e;const{data:t,desc:n,tag:r,strokeReference:i,fillReference:o}=e;var a,s;a=this.attrs,s=e,Object.keys(xp).forEach(e=>{const t=s[e];void 0!==t&&(a[xp[e]]=t)}),void 0!==t&&(this.data=t),"object"==typeof n&&(this.desc=Va(!0,{},n)),"string"==typeof r&&(this.tag=r),"string"==typeof i&&(this.strokeReference=i),"string"==typeof o&&(this.fillReference=o)}findShapes(e){return Ib.find(e,this).map(e=>Rb(e))}getItemsFrom(e){return Wb(this,e)}containsPoint(e){return Ub(this,e)}intersectsLine(e){return Ub(this,e)}intersectsRect(e){return Ub(this,e)}intersectsCircle(e){return Ub(this,e)}intersectsPolygon(e){return Ub(this,e)}intersectsGeoPolygon(e){return Ub(this,e)}resolveLocalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new kb;void 0!==this.attrs.transform&&_b(this.attrs.transform,e),this.modelViewMatrix=e.clone()}resolveGlobalTransform(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new kb;const t=this.ancestors;if(t.length>0)for(let n=t.length-1;n>=0;n--)t[n].resolveLocalTransform(e),e=t[n].modelViewMatrix;this.resolveLocalTransform(e)}attr(e){return this.attrs[e]}equals(e){const t=this.attrs,n=Object.keys(t),r=e.attrs,i=Object.keys(r);if(n.length!==i.length)return!1;for(let e=0;e<n.length;e++){const i=n[e];if(!Object.hasOwnProperty.call(r,i))return!1;if(t[i]!==r[i])return!1}return super.equals(e)}toJSON(){const e=super.toJSON();return e.attrs=this.attrs,e}get attrs(){return this._attrs}get stage(){return this._parent&&!this._stage?this._stage=this._parent.stage:this._parent||this._stage===this||(this._stage=null),this._stage}set modelViewMatrix(e){this._mvm=e,this._imvm=null}get modelViewMatrix(){return this._mvm}get inverseModelViewMatrix(){return this._imvm=this._imvm?this._imvm:this._mvm.clone().invert(),this._imvm}set node(e){this._node=e}get node(){return this._node}set collider(e){const t=Array.isArray(e)?"collection":e&&e.type;return"string"!=typeof t?(this._collider.type=null,this._collider.definition=null,void(this._collider.fn=null)):null!==this._collider&&this._collider.type===t&&null!==this._collider.fn?(this._collider.fn.set(e),void(this._collider.definition=e)):(this._collider.type=t,void(this._collider.definition=e))}get collider(){if(null!==this._collider.fn)return this._collider.fn;switch(this._collider.type){case"collection":this._collider.fn=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Mb(...t)}(this._collider.definition);break;case"frontChild":return!0;case"bounds":this._collider.fn=Sb("rect",this.boundingRect());break;case"line":case"rect":case"circle":case"polygon":case"geopolygon":case"polyline":this._collider.fn=Sb(this._collider.type,this._collider.definition);break;default:return null}return this._collider.fn}get colliderType(){return this._collider.type}}class Xb extends cb{addChild(e){if(!(e&&e instanceof cb))throw new TypeError("Expecting a Node as argument, but got ".concat(e));if(e===this)throw new Error("Can not add itself as child!");if(e._children&&e._children.length&&this.ancestors.indexOf(e)>=0)throw new Error("Can not add an ancestor as child!");return e._parent&&e._parent!==this&&e._parent.removeChild(e),this._children.push(e),e._parent=this,e._ancestors=null,this}addChildren(e){let t,n=e?e.length:0;for(t=0;t<n;t++)this.addChild(e[t]);return this}removeChild(e){const t=this._children.indexOf(e);return t>=0&&(this._children.splice(t,1),e._parent=null,e._ancestors=null),this}removeChildren(e){let t,n;if(!this._children)return this;if(e)for(n=e.length,t=0;t<n;t++)this.removeChild(e[t]);else for(;this._children.length;)this.removeChild(this._children[0]);return this}}const Gb=Xb.prototype;class Kb extends Yb{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const{collider:t}=e,n=Va({type:null},t);this.collider=n,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}appendChildRect(e,t){if(void 0!==e.bounds){const n=this.__boundingRect[t]||{},[r,,i]=e.bounds(t),{x:o,y:a}=r,{x:s,y:l}=i,c=isNaN(n.width)?s:Math.max(s,n.width+n.x),u=isNaN(n.height)?l:Math.max(l,n.height+n.y);n.x=isNaN(n.x)?o:Math.min(o,n.x),n.y=isNaN(n.y)?a:Math.min(a,n.y),n.width=c-n.x,n.height=u-n.y,this.__boundingRect[t]=n}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=this.children.length;for(let n=0;n<t;n++)this.appendChildRect(this.children[n],e);return this.__boundingRect[e]=Va({x:0,y:0,width:0,height:0},this.__boundingRect[e]),this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}addChild(e){const t=Gb.addChild.call(this,e);if(this._collider&&"bounds"===this._collider.type){this.appendChildRect(e,!0);const t=Va({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}addChildren(e){const t=Gb.addChildren.call(this,e),n=e.length;if(this._collider&&"bounds"===this._collider.type&&n>0){for(let t=0;t<n;t++)this.appendChildRect(e[t],!0);const t=Va({type:"bounds",x:0,y:0,width:0,height:0},this.__boundingRect.true);this.collider=t}return t}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;if(Gb.removeChild.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=Va(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}removeChildren(e){if(Gb.removeChildren.call(this,e),this._collider&&"bounds"===this._collider.type){this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null};const e=Va(this.boundingRect(!0),{type:"bounds"});this.collider=e}return this}}function Zb(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Kb(...t)}class Jb extends Kb{constructor(e){super("stage"),this._stage=this,this._dpiRatio=e||1}get dpi(){return this._dpiRatio}}const Qb=Xb.prototype,ex=["x1","x2","y1","y2","id","offset","style"];class tx extends Yb{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e),this._boundingRect={}}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=this.attrs;let n="";for(let r=0,i=ex.length;r!==i;r++)n=ex[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return Qb.addChild.call(this,e)}addChildren(e){return Qb.addChildren.call(this,e)}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return Qb.removeChild.call(this,e),this}removeChildren(e){return Qb.removeChildren.call(this,e),this}}function nx(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new tx(...t)}const rx=Xb.prototype,ix=["patternUnits","x","y","width","height","id"];class ox extends Yb{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{type:t="container"}=e;super(t),this.set(e),this._boundingRect={}}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.set(e);const t=this.attrs;let n="";for(let r=0,i=ix.length;r!==i;r++)n=ix[r],void 0!==e[n]&&(t[n]=e[n])}addChild(e){return rx.addChild.call(this,e)}addChildren(e){return rx.addChildren.call(this,e)}removeChild(e){e._stage=null;let t,n=e.descendants,r=n?n.length:0;for(t=0;t<r;t++)n[t]._stage=null;return rx.removeChild.call(this,e),this}removeChildren(e){return rx.removeChildren.call(this,e),this}}class ax extends Yb{constructor(){super("rect"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x:t=0,y:n=0,width:r=0,height:i=0,rx:o=0,ry:a=0,collider:s}=e,l=Va({type:"rect",x:t,y:n,width:r,height:i},s);super.set(e),r>=0?(this.attrs.x=t,this.attrs.width=r):(this.attrs.x=t+r,this.attrs.width=-r),i>=0?(this.attrs.y=n,this.attrs.height=i):(this.attrs.y=n+i,this.attrs.height=-i),o>0&&(this.attrs.rx=o),a>0&&(this.attrs.ry=a),this.collider=l,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=Za(this.attrs),n=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t,[r,i,o,a]=Ga(n);return this.__boundingRect[e]={x:r,y:i,width:o-r,height:a-i},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}class sx extends Yb{constructor(){super("circle"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{cx:t=0,cy:n=0,r:r=0,collider:i}=e,o=Va({type:"circle",cx:t,cy:n,r:r},i);super.set(e),this.attrs.cx=t,this.attrs.cy=n,this.attrs.r=r,this.collider=o,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=this.bounds(e);return this.__boundingRect[e]={x:t[0].x,y:t[0].y,width:t[2].x-t[0].x,height:t[2].y-t[0].y},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const{cx:t,cy:n,r:r,r:i}=this.attrs,o=t-r,a=n-i;let s=2*r,l=2*i,c=[{x:o,y:a},{x:o+s,y:a},{x:o+s,y:a+l},{x:o,y:a+l}];if(e&&this.modelViewMatrix){c=this.modelViewMatrix.transformPoints(c);const[t,n,r,i]=Ga(c);s=r-t,l=i-n,this.__bounds[e]=[{x:t,y:n},{x:t+s,y:n},{x:t+s,y:n+l},{x:t,y:n+l}]}else this.__bounds[e]=c;return this.__bounds[e]}}class lx extends Yb{constructor(){super("line"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x1:t=0,y1:n=0,x2:r=0,y2:i=0,collider:o}=e;super.set(e),this.attrs.x1=t,this.attrs.y1=n,this.attrs.x2=r,this.attrs.y2=i;const a={type:"line",x1:t,y1:n,x2:r,y2:i};this.collider=Va(a,o),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];let t=Ka(this.attrs);e&&this.modelViewMatrix&&(t=this.modelViewMatrix.transformPoints(t));const[n,r,i,o]=Ga(t),a=n!==i||r!==o;return this.__boundingRect[e]={x:n,y:r,width:a?Math.max(1,i-n):0,height:a?Math.max(1,o-r):0},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}const cx=Math.PI/2;function ux(e,t){const n=Math.atan2(t.y-e.y,t.x-e.x);return n<0?n+2*Math.PI:n}function dx(e,t,n){return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}}const fx={step:function(e){return new Js(e,.5)},stepAfter:function(e){return new Js(e,1)},stepBefore:function(e){return new Js(e,0)},linear:qs,basis:function(e){return new Rs(e)},cardinal:js.tension(0),catmullRom:Hs,monotonex:function(e){return new Ys(e)},monotoney:function(e){return new Xs(e)},natural:function(e){return new Ks(e)}};function px(e){if(e.length<2)return!1;const t=e[0],n=e[e.length-1];return Math.abs(t.x-n.x)<1e-12&&Math.abs(t.y-n.y)<1e-12}class hx extends Yb{constructor(){super("path"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(super.set(e),this.segments=[],this.points=[],e.arcDatum){const t=As();t.innerRadius(e.desc.slice.innerRadius),t.outerRadius(e.desc.slice.outerRadius),t.cornerRadius(e.desc.slice.cornerRadius);const n=t(e.arcDatum);this.attrs.d=n}else if(e.points){const{major:t,minor:n,layerObj:r,points:i,stngs:o,generatorType:a}=e,s=Ns(),l=o.coordinates?o.coordinates.defined:null;s[t.p](e=>e.major*t.size)["".concat(n.p,"1")](e=>e.minor*n.size)["".concat(n.p,"0")](e=>e.minor0*n.size).curve(fx["monotone"===r.curve?"monotone".concat(t.p):r.curve]),l?s.defined(e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor)&&e.defined):s.defined(e=>!e.dummy&&"number"==typeof e.minor&&!isNaN(e.minor));const c=o.connect?i.filter(s.defined()):i,u=("area"===a?s:s[a]())(c);this.attrs.d=u}else e.d&&(this.attrs.d=e.d);if(this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null},Array.isArray(e.collider)||"object"==typeof e.collider&&void 0!==e.collider.type)this.collider=e.collider;else if(this.attrs.d){if(this.segments=ab(this.attrs.d),this.segments.length>1&&this.segments.every(e=>px(e)))return void(this.collider=Va({type:"geopolygon",vertices:this.segments},e.collider));this.segments.forEach(t=>{if(t.length<=1);else if(px(t))this.collider=Va({type:"polygon",vertices:t},e.collider);else if("object"==typeof e.collider&&e.collider.visual){const n=this.attrs["stroke-width"]/2;this.collider=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=[],i=[];if("h"===n.forceOrientation){const t=e[0].x<e[1].x?-1:1,n=e[e.length-1].x>e[e.length-2].x?1:-1;e.unshift({x:e[0].x+t,y:e[0].y}),e.push({x:e[e.length-1].x+n,y:e[e.length-1].y})}else if("v"===n.forceOrientation){const t=e[0].y<e[1].y?-1:1,n=e[e.length-1].y>e[e.length-2].y?1:-1;e.unshift({x:e[0].x,y:e[0].y+t}),e.push({x:e[e.length-1].x,y:e[e.length-1].y+n})}const o=e.length-1;for(let n=1;n<o;n++){const a=e[n-1],s=e[n],l=e[n+1],c=ux(s,a),u=ux(s,l),d=(c+u)/2,f=d+Math.PI,p=Math.max(d,f),h=Math.min(d,f),m=c>u;if(1===n){const e=ux(a,s);r.push(dx(a,e-cx,t)),i.unshift(dx(a,e+cx,t))}const g=m?p:h,y=m?h:p;if(r.push(dx(s,g,t)),i.unshift(dx(s,y,t)),n===o-1){const e=ux(l,s);r.push(dx(l,e+cx,t)),i.unshift(dx(l,e-cx,t))}}return{type:"polygon",vertices:[...r,...i]}}(t,n,e.collider)}else this.collider=Va({type:"polyline",points:t},e.collider)})}}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];this.points.length||(this.segments=this.segments.length?this.segments:ab(this.attrs.d),this.points=function(e){const t=[];let n,r=e.length;for(let i=0;i<r;i++){n=e[i];for(let e=0;e<n.length;e++)t.push(n[e])}return t}(this.segments));const t=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(this.points):this.points,[n,r,i,o]=Ga(t);return this.__boundingRect[e]={x:n||0,y:r||0,width:i-n||0,height:o-r||0},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}function mx(e){let{data:t,_boundingRect:n,_textBoundsFn:r}=e;return null!=t&&(n||r)}class gx extends Yb{constructor(){super("text"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x:t=0,y:n=0,dx:r=0,dy:i=0,textBoundsFn:o,text:a,title:s,collider:l,boundingRect:c,ellipsed:u}=e;super.set(e),this.attrs.x=t,this.attrs.y=n,this.attrs.dx=r,this.attrs.dy=i,this.attrs.text=a,void 0!==s&&(this.attrs.title=String(s)),"object"==typeof c?this._textBoundsFn=()=>c:"function"==typeof o&&(this._textBoundsFn=o),"string"==typeof u&&(this.ellipsed=u),this.collider=Va({type:mx(this)?"bounds":null},l),this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null}}boundingRect(){let e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[t])return this.__boundingRect[t];if("function"!=typeof this._textBoundsFn)return{x:0,y:0,width:0,height:0};e=this._textBoundsFn(this.attrs);const n=Za(e),r=t&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(n):n,[i,o,a,s]=Ga(r);return this.__boundingRect[t]={x:i,y:o,width:a-i,height:s-o},this.__boundingRect[t]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}class yx extends Yb{constructor(){super("image"),this.set(...arguments)}set(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{x:t=0,y:n=0,width:r=0,height:i=0,rx:o=0,ry:a=0,src:s,collider:l,cx:c=0,cy:u=0,r:d=0,opacity:f,imageScalingFactor:p,imagePosition:h,symbol:m}=e;let g;g="circle"===e.symbol?Va({type:"circle",cx:c,cy:u,r:d},l):Va({type:"bounds",x:t,y:n,width:r,height:i},l),super.set(e),r>=0?(this.attrs.x=t,this.attrs.width=r):(this.attrs.x=t+r,this.attrs.width=-r),i>=0?(this.attrs.y=n,this.attrs.height=i):(this.attrs.y=n+i,this.attrs.height=-i),o>0&&(this.attrs.rx=o),a>0&&(this.attrs.ry=a),s&&(this.attrs.src=s),this.attrs.r=d,this.attrs.cx=c,this.attrs.cy=u,this.attrs.opacity=void 0!==f?f:1,this.attrs.imageScalingFactor=void 0!==p?p:1,this.attrs.imagePosition=h||"center-center",this.attrs.symbol=m||"rectangle",this.collider=g,this.__boundingRect={true:null,false:null},this.__bounds={true:null,false:null},e.collider||(this.attrs.updateCollider=this.updateCollider.bind(this))}updateCollider(e){let t;t="circle"===e.symbol?Va(this.collider,{type:"circle",cx:e.cx,cy:e.cy,r:e.r}):Va(this.collider,{type:"bounds",x:e.x,y:e.y,width:e.width,height:e.height}),this.collider=t}boundingRect(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__boundingRect[e])return this.__boundingRect[e];const t=Za(this.attrs),n=e&&this.modelViewMatrix?this.modelViewMatrix.transformPoints(t):t,[r,i,o,a]=Ga(n);return this.__boundingRect[e]={x:r,y:i,width:o-r,height:a-i},this.__boundingRect[e]}bounds(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(null!==this.__bounds[e])return this.__bounds[e];if("circle"===this._node.symbol){const t=this.boundingRect(e),n=Math.min(t.width,t.height)/2,r=t.x-n,i=t.y-n;let o=2*n,a=2*n,s=[{x:r,y:i},{x:r+o,y:i},{x:r+o,y:i+a},{x:r,y:i+a}];if(e&&this.modelViewMatrix){s=this.modelViewMatrix.transformPoints(s);const[t,n,r,i]=Ga(s);o=r-t,a=i-n,this.__bounds[e]=[{x:t,y:n},{x:t+o,y:n},{x:t+o,y:n+a},{x:t,y:n+a}]}else this.__bounds[e]=s;return this.__bounds[e]}const t=this.boundingRect(e);return this.__bounds[e]=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],this.__bounds[e]}}const vx=il();function bx(e,t){return vx.get(e)(t)}vx.add("rect",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new ax(...t)}),vx.add("circle",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new sx(...t)}),vx.add("text",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new gx(...t)}),vx.add("line",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new lx(...t)}),vx.add("path",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new hx(...t)}),vx.add("stage",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Jb(...t)}),vx.add("container",Zb),vx.add("defs",Zb),vx.add("linearGradient",nx),vx.add("radialGradient",nx),vx.add("conicGradient",nx),vx.add("stop",nx),vx.add("pattern",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new ox(...t)}),vx.add("image",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new yx(...t)});const xx=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=[{}];function n(){return t[t.length-1]}return n.save=function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=n(),o={};let a="";for(let t=0;t<e.length;t++)a=e[t],void 0!==i[a]&&(o[a]=i[a]);return Va(o,r),t.push(o),n()},n.restore=function(){t.splice(t.length-1,1)},n}(["stroke","fill","strokeWidth","opacity","fontFamily","fontSize","baseline"]);function wx(e,t){if(Array.isArray(t))for(let n=0,r=t.length;n<r;n++)t[n](e)}function Sx(e,t,n){e.node=n[t],e.index=t}function Mx(e,t,n,r){let i=!1;const o={siblings:e,node:null,index:0};for(let a=0,s=e.length;a<s;a++){if(Sx(o,a,e),wx(o,r.create),i="function"==typeof o.node.disabled?o.node.disabled():o.node.disabled,i)continue;o.node=xx.save(o.node);const s=bx(o.node.type,o.node);s&&(o.node.transform&&(n.save(),_b(o.node.transform,n)),n.isIdentity()||(s.modelViewMatrix=n.clone()),t.addChild(s),o.node.children&&Mx(o.node.children,s,n,r),o.node.transform&&n.restore()),xx.restore()}}function kx(e){let{items:t,stage:n,dpi:r,on:i={}}=e;return n||(n=bx("stage",r)),Mx(t,n,new kb,i),n}function Ex(e,t,n){const{orientation:r,degree:i,stops:o=[]}=n;let a=null;if("radial"===r){const n=t.boundingRect();a=e.createRadialGradient(n.x+n.width/2,n.y+n.height/2,1e-5,n.x+n.width/2,n.y+n.height/2,Math.max(n.width,n.height)/2)}else if("conic"===r){const t=n.startAngle||0,r=n.x||0,i=n.y||0;a=e.createConicGradient(t,r,i)}else{const r=kp(i);["x1","x2","y1","y2"].forEach(e=>{e in n&&(r[e]=n[e])});const o=t.boundingRect();a=e.createLinearGradient(o.x+r.x1*o.width,o.y+r.y1*o.height,o.x+r.x2*o.width,o.y+r.y2*o.height)}for(let e=0,t=o.length;e<t;e++){let t=o[e];a.addColorStop(t.offset,t.color)}return a}function Cx(e,t,n){return t.width=e.width,t.height=e.height,n.save(),n.fillStyle=e.fill,e.shapes.forEach(e=>{if("rect"===e.type)n.rect(e.x,e.y,e.width,e.height)}),n.fill(),n.restore(),n.createPattern(t,"repeat")}function Ax(){let{x:e,y:t,width:n,height:r,scaleRatio:i,margin:o,edgeBleed:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const s={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0},edgeBleed:{left:0,right:0,top:0,bottom:0,bool:!1}};return s.x=isNaN(e)?s.x:e,s.y=isNaN(t)?s.y:t,s.width=isNaN(n)?s.width:n,s.height=isNaN(r)?s.height:r,void 0!==i&&(s.scaleRatio.x=isNaN(i.x)?s.scaleRatio.x:i.x,s.scaleRatio.y=isNaN(i.y)?s.scaleRatio.y:i.y),void 0!==o&&(s.margin.left=isNaN(o.left)?0:o.left,s.margin.top=isNaN(o.top)?0:o.top),"object"==typeof a&&["left","right","top","bottom"].forEach(e=>{!isNaN(a[e])&&a[e]>0&&(s.edgeBleed[e]=a[e],s.edgeBleed.bool=!0)}),s.computedPhysical={x:Math.round(s.margin.left+(s.x-s.edgeBleed.left)*s.scaleRatio.x),y:Math.round(s.margin.top+(s.y-s.edgeBleed.top)*s.scaleRatio.y),width:Math.round((s.width+s.edgeBleed.left+s.edgeBleed.right)*s.scaleRatio.x),height:Math.round((s.height+s.edgeBleed.top+s.edgeBleed.bottom)*s.scaleRatio.y)},s}function Dx(){const e={element:()=>{},root:()=>{},settings:()=>{},appendTo:()=>{},getScene:()=>[],render:()=>!1,itemsAt:()=>[],findShapes:()=>[],clear:()=>{},destory:()=>{},size:()=>{},measureText:Jy,textBounds:ev,setKey:t=>{e.element().setAttribute("data-key",t)}};return e}function qx(e){return t=>{let{node:n}=t;"text"!==n.type||null==n.data||n.textBoundsFn||(n.textBoundsFn=e.textBounds)}}const _x=200,Tx=200;class Nx{constructor(e){this.targetCanvas=e,this.bufferCanvas=e.cloneNode()}updateSize(e){let t,{rect:n,dpiRatio:r,canvasBufferSize:i}=e;t=i?"function"==typeof i?i(n):i:{width:n.computedPhysical.width+2*_x,height:n.computedPhysical.height+2*Tx},this.bufferCanvas.style.width="".concat(t.width,"px"),this.bufferCanvas.style.height="".concat(t.height,"px"),this.bufferCanvas.width=Math.round(t.width*r),this.bufferCanvas.height=Math.round(t.height*r)}apply(){this.targetCanvas.getContext("2d").drawImage(this.bufferCanvas,0,0)}clear(){this.bufferCanvas.width=this.bufferCanvas.width}getContext(){return this.bufferCanvas.getContext("2d")}}const Ox=il();function Ix(e){return Array.isArray(e)?e:"string"==typeof e?-1!==e.indexOf(",")?e.split(","):e.split(" "):[]}function Lx(e){return("undefined"==typeof window?1:window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}function Px(e,t){t.setTransform(e[0][0],e[1][0],e[0][1],e[1][1],e[0][2],e[1][2])}function Rx(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const i=Object.keys(r);for(let i=0,o=n.length;i<o;i++){let o=n[i];const a=o[0],s=o[1],l=o[2];if(a in t.attrs&&!(s in r)&&e[s]!==t.attrs[a]){const n=l?l(t.attrs[a]):t.attrs[a];"function"==typeof e[s]?e[s](n):e[s]=n}}for(let t=0,n=i.length;t<n;t++){const n=i[t];e[n]=r[n]}}function zx(e,t,n,r){for(let i=0,o=e.length;i<o;i++){let o=e[i],a={};t.save(),o.attrs&&(o.attrs.fill||o.attrs.stroke)&&(o.attrs.fill&&"object"==typeof o.attrs.fill&&"gradient"===o.attrs.fill.type?a.fillStyle=Ex(t,o,o.attrs.fill):o.attrs.fill&&"object"==typeof o.attrs.fill&&"pattern"===o.attrs.fill.type&&(a.fillStyle=r.patterns.create(o.attrs.fill)),o.attrs.stroke&&"object"==typeof o.attrs.stroke&&"gradient"===o.attrs.stroke.type?a.strokeStyle=Ex(t,o,o.attrs.stroke):o.attrs.stroke&&"object"==typeof o.attrs.stroke&&"pattern"===o.attrs.stroke.type&&(a.strokeStyle=r.patterns.create(o.attrs.stroke))),Rx(t,o,n,a),o.modelViewMatrix&&Px(o.modelViewMatrix.elements,t),Ox.has(o.type)&&Ox.get(o.type)(o.attrs,{g:t,doFill:"fill"in o.attrs&&"none"!==o.attrs.fill,doStroke:"stroke"in o.attrs&&0!==o.attrs["stroke-width"],ellipsed:o.ellipsed}),o.children&&zx(o.children,t,n,r),t.restore()}}function Fx(){let e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:kx;const r={transform:void 0,canvasBufferSize:void 0,progressive:void 0};let i,o=!1,a=Ax();const s=[["fill","fillStyle"],["stroke","strokeStyle"],["opacity","globalAlpha"],["globalAlpha","globalAlpha"],["stroke-width","lineWidth"],["stroke-linejoin","lineJoin"],["stroke-dasharray","setLineDash",Ix]];let l;const c=Dx();return c.element=()=>e,c.root=()=>e,c.settings=e=>(e&&Object.keys(r).forEach(t=>{void 0!==e[t]&&(r[t]=e[t])}),r),c.appendTo=n=>(e||(e=n.ownerDocument.createElement("canvas"),e.style.position="absolute",e.style["-webkit-font-smoothing"]="antialiased",e.style["-moz-osx-font-smoothing"]="antialiased",e.style.pointerEvents="none"),"function"!=typeof r.transform||t||(t=new Nx(e)),n.appendChild(e),e),c.getScene=r=>{const i=Lx(t&&t.getContext()||e.getContext("2d")),o=a.scaleRatio.x,s=a.scaleRatio.y,l={type:"container",children:r,transform:a.edgeBleed.bool?"translate(".concat(a.edgeBleed.left*i*o,", ").concat(a.edgeBleed.top*i*s,")"):""};return 1===i&&1===o&&1===s||(l.transform+="scale(".concat(i*o,", ").concat(i*s,")")),n({items:[l],dpi:i,on:{create:[Hy(c.measureText),qx(c)]}})},c.render=n=>{if(!e)return!1;l||(l=function(e){const t=e.createElement("canvas"),n=t.getContext("2d");let r={};return{create(e){const i=e.key;return i?(r[i]=r[i]||Cx(e,t,n),r[i]):Cx(e,t,n)},clear(){r={}}}}(e.ownerDocument));const u=t&&t.getContext()||e.getContext("2d"),d=Lx(u),f=t&&r.transform();if(f)return e.width=e.width,function(e){let{el:t,dpiRatio:n,transform:r}=e;if("object"==typeof r){const e=[r.horizontalScaling,r.horizontalSkewing,r.verticalSkewing,r.verticalScaling,r.horizontalMoving*n,r.verticalMoving*n];t.getContext("2d").setTransform(...e)}}({el:e,dpiRatio:d,transform:f}),t.apply(),!0;o&&(e.style.left="".concat(a.computedPhysical.x,"px"),e.style.top="".concat(a.computedPhysical.y,"px"),e.style.width="".concat(a.computedPhysical.width,"px"),e.style.height="".concat(a.computedPhysical.height,"px"),e.width=Math.round(a.computedPhysical.width*d),e.height=Math.round(a.computedPhysical.height*d),t&&t.updateSize({rect:a,dpiRatio:d,canvasBufferSize:r.canvasBufferSize}));const p=c.getScene(n),h=!i||!p.equals(i);l.clear();const m=o||h,g="function"==typeof r.progressive&&r.progressive();return m&&(g&&!g.isFirst||c.clear(),zx(p.children,u,s,{patterns:l})),t&&(e.width=e.width,t.apply()),o=!1,g&&!g.isFirst&&p.children.unshift(...i.children),i=p,m},c.itemsAt=e=>i?i.getItemsFrom(e):[],c.findShapes=e=>i?i.findShapes(e):[],c.clear=()=>(e&&(e.width=e.width),t&&t.clear(),i=null,c),c.size=e=>{if(e){const t=Ax(e);JSON.stringify(a)!==JSON.stringify(t)&&(o=!0,a=t)}return a},c.destroy=()=>{e&&(e.parentElement&&e.parentElement.removeChild(e),e=null),t&&(t=null),i=null},c}function jx(e,t){Ox.add(e,t)}function Vx(e,t){return Math.max(0,Math.min(e,t))}const Hx=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗＡ-Ｚａ-ｚｦ-ￜ]"),Bx=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),$x=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]");function Wx(e){return Hx.test(e)}function Ux(e){return Bx.test(e)||$x.test(e)}function Yx(e){let t,n,r=e?e.length:0;for(t=0;t<r;t++){if(n=e[t],Wx(n))return"ltr";if(Ux(n))return"rtl"}return"ltr"}const Xx={start:"end",end:"start",center:"center",middle:"middle"};function Gx(e,t){return"rtl"===t?Xx[e]:e}function Kx(e,t){if(Kx.cache[e])return void t(Kx.cache[e]);const n=new Image;n.src=e,n.onload=()=>{Kx.cache[e]=n,t(n)},n.onerror=e=>{console.error("Image load error",e)}}function Zx(e,t){const n=[];let r;const i=[],o=[],a=[];let s,l;const c=e=>e.id,u=(e,t)=>{let n;return n="object"==typeof e?"id"in e?e.id:t:e,{content:e,id:"".concat(n,"__").concat(e.type||"")}};e.isTree||(e=e.map(u)),t=t.map(u),s=e.map(c),l=t.map(c);for(let e=0,r=t.length;e<r;e++){-1===s.indexOf(t[e].id)?n.push(t[e]):o.push(t[e])}for(let t=0,n=e.length;t<n;t++){-1===l.indexOf(e[t].id)?i.push(e[t]):a.push(e[t])}for(let e=0,t=n.length;e<t;e++)n[e].content.children&&(n[e].diff=Zx([],n[e].content.children),n[e].children=n[e].diff.updatedNew.concat(n[e].diff.added),n[e].children.isTree=!0);for(let e=0,t=o.length;e<t;e++)o[e].diff=Zx(a[e].children||[],o[e].content.children||[]),o[e].object=a[e].object,o[e].children=o[e].diff.items;return r=o.concat(n),n.isTree=!0,i.isTree=!0,o.isTree=!0,a.isTree=!0,r.isTree=!0,{added:n,updatedNew:o,updatedOld:a,removed:i,items:r}}function Jx(e,t,n){for(let r=0,i=e.length;r<i;r++)e[r].object=n(e[r].content.type,t)}function Qx(e,t){for(let n=0,r=e.length;n<r;n++)null!==e[n].object&&void 0!==e[n].object&&(t(e[n].object),e[n].object=null)}function ew(e,t,n,r){let i;for(let o=0,a=e.length;o<a;o++)i=e[o],null!==i.object&&void 0!==i.object&&(n(i.object,i.content),i.diff&&(Jx(i.diff.added,i.object,t),Qx(i.diff.removed,r),ew(i.diff.items,t,n,r)))}function tw(e,t,n,r,i,o){const a=Zx(e,t);return Jx(a.added,n,r),Qx(a.removed,o),ew(a.items,r,i,o),a.items}Kx.cache={},jx("rect",function(e,t){let{g:n,doFill:r,doStroke:i}=t;n.beginPath(),e.rx>0||e.ry>0?function(e,t,n,r,i,o,a){o=Vx(r/2,o>0?o:a),a=Vx(i/2,a>0?a:o),e.moveTo(t,n+a),e.lineTo(t,n+i-a),e.quadraticCurveTo(t,n+i,t+o,n+i),e.lineTo(t+r-o,n+i),e.quadraticCurveTo(t+r,n+i,t+r,n+i-a),e.lineTo(t+r,n+a),e.quadraticCurveTo(t+r,n,t+r-o,n),e.lineTo(t+o,n),e.quadraticCurveTo(t,n,t,n+a)}(n,e.x,e.y,e.width,e.height,e.rx,e.ry):n.rect(e.x,e.y,e.width,e.height),r&&n.fill(),i&&n.stroke()}),jx("circle",function(e,t){let{g:n,doFill:r,doStroke:i}=t;n.beginPath(),n.moveTo(e.cx+e.r,e.cy),n.arc(e.cx,e.cy,e.r,0,2*Math.PI,!1),r&&n.fill(),i&&n.stroke()}),jx("line",function(e,t){let{g:n,doStroke:r}=t;n.beginPath(),n.moveTo(e.x1,e.y1),n.lineTo(e.x2,e.y2),r&&n.stroke()}),jx("path",function(e,t){let{g:n,doStroke:r,doFill:i}=t;const o=new Path2D(e.d);i&&n.fill(o),r&&n.stroke(o)}),jx("text",function(e,t){let{g:n,ellipsed:r,doStroke:i}=t;const o=r||By(e,Jy);n.font=[e["font-style"],e["font-weight"],e["font-size"],e["font-family"]].filter(e=>!!e).join(" ");const a=Yx(e.text);n.canvas.dir!==a&&(n.canvas.dir=a);const s=Gx("middle"===e["text-anchor"]?"center":e["text-anchor"],n.canvas.dir);s&&n.textAlign!==s&&(n.textAlign=s);const l=$y(e);n.fillText(o,e.x+e.dx,e.y+e.dy+l),i&&n.strokeText(o,e.x+e.dx,e.y+e.dy+l)}),jx("image",function(e,t){let{g:n}=t;const r=n.canvas,i=n.getTransform(),o=window.devicePixelRatio||1,a=r.clientWidth*o,s=r.clientHeight*o;r.width===a&&r.height===s||(r.width=a,r.height=s),Kx(e.src,t=>{if(n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,r.width,r.height),n.setTransform(i),n.globalAlpha=e.opacity,e.width||e.height||(e.width=t.naturalWidth*e.imageScalingFactor,e.height=t.naturalHeight*e.imageScalingFactor),function(e){const t=e.imagePosition||"center-center";let n=e.width,r=e.height;if("circle"===e.symbol){const t=Math.min(e.width,e.height)/2;n=2*t,r=2*t}switch(t){case"top-center":e.y-=r/2;break;case"center-left":e.x-=n/2;break;case"center-right":e.x+=n/2;break;case"top-left":e.x-=n/2,e.y-=r/2;break;case"top-right":e.x+=n/2,e.y-=r/2;break;case"bottom-left":e.x-=n/2,e.y+=r/2;break;case"bottom-right":e.x+=n/2,e.y+=r/2;break;case"bottom-center":e.y+=r/2}}(e),"circle"===e.symbol){const r=e.x,i=e.y;e.r=Math.min(e.width,e.height)/2;const o=r-e.width/2,a=i-e.height/2;n.save(),n.beginPath(),n.arc(r,i,e.r,0,2*Math.PI),n.clip(),n.drawImage(t,o,a,e.width,e.height),n.restore()}else e.x-=e.width/2,e.y-=e.height/2,n.drawImage(t,e.x,e.y,e.width,e.height);n.globalAlpha=1,e.updateCollider&&e.updateCollider(e)})});const nw="http://www.w3.org/2000/svg",rw=(e,t)=>{if(!e||"string"!=typeof e)throw new Error("Invalid type: ".concat(e));const n=t.ownerDocument.createElementNS(nw,"container"===e?"g":e);return t.appendChild(n),n},iw=e=>{e.parentNode&&e.parentNode.removeChild(e)};function ow(e){let{element:t,attrs:n}=e;return function(){const{width:e,height:r,imagePosition:i,imageScalingFactor:o,symbol:a}=n;let{x:s=0,y:l=0}=n,c=e>0?e:this.naturalWidth,u=r>0?r:this.naturalHeight;switch(o&&(c*=o,u*=o),i){case"top-center":l-=u/2;break;case"center-left":s-=c/2;break;case"center-right":s+=c/2;break;case"top-left":s-=c/2,l-=u/2;break;case"top-right":s+=c/2,l-=u/2;break;case"bottom-left":s-=c/2,l+=u/2;break;case"bottom-right":s+=c/2,l+=u/2;break;case"bottom-center":l+=u/2}if(t.setAttribute("width",c),t.setAttribute("height",u),t.setAttribute("x",s-c/2),t.setAttribute("y",l-u/2),t.setAttribute("preserveAspectRatio","none"),"circle"===a){const e=t.ownerSVGElement;if(!e)return;const n="clip-".concat(Math.random().toString(36).substr(2,9));if(!e.querySelector("#".concat(n))){const t=e.querySelector("defs")||e.insertBefore(document.createElementNS(nw,"defs"),e.firstChild),r=document.createElementNS(nw,"clipPath");r.setAttribute("id",n);const i=document.createElementNS(nw,"circle");i.setAttribute("cx",s),i.setAttribute("cy",l),i.setAttribute("r",Math.min(c,u)/2),r.appendChild(i),t.appendChild(r)}t.setAttribute("clip-path","url(#".concat(n,")"))}}}const aw=(e,t)=>{if((e=>{switch(e.type){case"circle":return!isNaN(e.attrs.cx)&&!isNaN(e.attrs.cy)&&!isNaN(e.attrs.r);case"line":return!(isNaN(e.attrs.x1)||isNaN(e.attrs.y1)||isNaN(e.attrs.x2)||isNaN(e.attrs.y2));case"rect":return!(isNaN(e.attrs.x)||isNaN(e.attrs.y)||isNaN(e.attrs.width)||isNaN(e.attrs.height));case"text":case"image":return!isNaN(e.attrs.x)&&!isNaN(e.attrs.y);default:return!0}})(t)){for(const n in t.attrs)if("stroke"===n&&t.strokeReference)e.setAttribute("stroke",t.strokeReference);else if("fill"===n&&t.fillReference)e.setAttribute("fill",t.fillReference);else if("text"===n){e.setAttribute("style","white-space: pre"),e.textContent=t.ellipsed||By(t.attrs,Jy);const n=Yx(t.attrs.text);"rtl"===n&&(e.setAttribute("direction","rtl"),e.setAttribute("dir","rtl"),e.setAttribute("text-anchor",Gx(e.getAttribute("text-anchor"),n)))}else if("text"!==t.type||"dy"!==n&&"dominant-baseline"!==n)if("text"===t.type&&"title"===n&&t.attrs.title){const n=e.ownerDocument.createElementNS(nw,"title");n.textContent=t.attrs.title,e.appendChild(n)}else if("image"===t.type&&"src"===n){e.setAttributeNS("http://www.w3.org/1999/xlink","href",t.attrs.src);let n=new Image;n.src=t.attrs.src,n.onload=ow({element:e,attrs:t.attrs})}else e.setAttribute(n,t.attrs[n]);else{const r=+e.getAttribute(n)||0;let i=0;i="dominant-baseline"===n?$y(t.attrs):t.attrs[n],e.setAttribute("dy",i+r)}if("string"==typeof t.data||"number"==typeof t.data||"boolean"==typeof t.data)e.setAttribute("data",t.data);else if("object"==typeof t.data&&null!==t.data)for(const n in t.data)"string"!=typeof t.data[n]&&"number"!=typeof t.data[n]&&"boolean"!=typeof t.data[n]||e.setAttribute("data-".concat(n),t.data[n])}};class sw{constructor(e,t,n,r){this.create=e,this.nodeCreator=t,this.nodeMaintainer=n,this.nodeDestroyer=r}render(e,t){return this.create([],e,t,this.nodeCreator,this.nodeMaintainer,this.nodeDestroyer)}}function lw(){return new sw(tw,rw,aw,iw)}function cw(e){let t,n,r,i=0;if(0===(e=JSON.stringify(e)).length)return i;for(t=0,r=e.length;t<r;t++)n=e.charCodeAt(t),i=(i<<5)-i+n,i&=i;return i}function uw(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nw,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:kx;const n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:lw)();let r,i,o,a=!1,s=Ax();const l={transform:void 0,disableScreenReader:!1},c=Dx(),u={type:"defs",children:[]},d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cw,n={},r=Date.now();const i={onCreate(i){let o={};i.node&&"object"==typeof i.node.fill&&"pattern"===i.node.fill.type&&i.node.fill.shapes&&(o.fill=i.node.fill),i.node&&"object"==typeof i.node.stroke&&"pattern"===i.node.stroke.type&&i.node.stroke.shapes&&(o.stroke=i.node.stroke),Object.keys(o).forEach(a=>{let s="";const l=o[a],c=t(l),u="picasso-pattern-".concat(r,"-").concat(c);if("undefined"!=typeof window&&(s=window.location.href.split("#")[0]),!n[c]){const t={patternUnits:"userSpaceOnUse",x:0,y:0,width:l.width,height:l.height,type:"pattern",id:u,children:[],fill:l.fill};l.shapes.forEach(e=>{t.children.push(e)}),e.push(t),n[c]=!0}i.node["".concat(a,"Reference")]="url('".concat(s,"#").concat(u,"')")})},clear(){n={}}};return i}(u.children),f=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cw,n={},r=Date.now();const i={getOrCreateGradient(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fill",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",s=t(i[o]),l="picasso-gradient-".concat(r,"-").concat(s);if(!n[s]){let{orientation:t,degree:r,stops:a=[]}=i[o],c={};void 0===r&&(r=90),"radial"===t?c.type="radialGradient":(c=kp(r),["x1","x2","y1","y2"].forEach(e=>{e in i[o]&&(c[e]=i[o][e])}),c.type="linearGradient"),c.id=l,c.children=a.map(e=>{let{offset:t,color:n,opacity:r}=e;return{type:"stop",offset:"".concat(100*t,"%"),style:"stop-color:".concat(n,";stop-opacity:").concat(void 0!==r?r:1)}}),e.push(c),n[s]=l}return"url('".concat(a,"#").concat(l,"')")},onCreate(e){let t="";"undefined"!=typeof window&&(t=window.location.href.split("#")[0]);const n=e.node;n.fill&&"object"==typeof n.fill&&"gradient"===n.fill.type&&(n.fillReference=i.getOrCreateGradient(n,"fill",t)),n.stroke&&"object"==typeof n.stroke&&"gradient"===n.stroke.type&&(n.strokeReference=i.getOrCreateGradient(n,"stroke",t))},clear(){n={}}};return i}(u.children);return c.element=()=>r,c.root=()=>i,c.settings=e=>(e&&Object.keys(l).forEach(t=>{void 0!==e[t]&&(l[t]=e[t])}),l),c.appendTo=t=>(r||(r=t.ownerDocument.createElementNS(e,"svg"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none",r.setAttribute("xmlns",e),i=t.ownerDocument.createElementNS(e,"g"),i.style.pointerEvents="auto",r.appendChild(i)),t.appendChild(r),r),c.getScene=e=>{const n=s.scaleRatio.x,r=s.scaleRatio.y,i={type:"container",children:Array.isArray(e)?[...e,u]:e,transform:s.edgeBleed.bool?"translate(".concat(s.edgeBleed.left*n,", ").concat(s.edgeBleed.top*r,")"):""};return 1===n&&1===r||(i.transform+="scale(".concat(n,", ").concat(r,")")),t({items:[i],on:{create:[e=>{e.node.fillReference=void 0,e.node.strokeReference=void 0},f.onCreate,d.onCreate,Hy(c.measureText),qx(c)]}})},c.render=e=>{if(!r)return!1;const t="function"==typeof l.transform&&l.transform();if(t){const{horizontalScaling:e,horizontalSkewing:n,verticalSkewing:r,verticalScaling:o,horizontalMoving:a,verticalMoving:s}=t;return i.style.transform="matrix(".concat(e,", ").concat(n,", ").concat(r,", ").concat(o,", ").concat(a,", ").concat(s,")"),!0}i.style.transform="";l.disableScreenReader&&r.setAttribute("aria-hidden",!0),a&&(r.style.left="".concat(s.computedPhysical.x,"px"),r.style.top="".concat(s.computedPhysical.y,"px"),r.setAttribute("width",s.computedPhysical.width),r.setAttribute("height",s.computedPhysical.height)),f.clear(),d.clear(),u.children.length=0;const p=c.getScene(e),h=!o||!p.equals(o),m=a||h;return m&&(c.clear(),n.render(p.children,i)),a=!1,o=p,m},c.itemsAt=e=>o?o.getItemsFrom(e):[],c.findShapes=e=>o?o.findShapes(e):[],c.clear=()=>{if(!i)return c;o=null;const e=i.cloneNode(!1);return r.replaceChild(e,i),i=e,c},c.destroy=()=>{r&&r.parentNode&&r.parentNode.removeChild(r),r=null,i=null},c.size=e=>{if(e){const t=Ax(e);JSON.stringify(s)!==JSON.stringify(t)&&(a=!0,s=t)}return s},c}var dw,fw,pw,hw,mw,gw,yw,vw={},bw=[],xw=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function ww(e,t){for(var n in t)e[n]=t[n];return e}function Sw(e){var t=e.parentNode;t&&t.removeChild(e)}function Mw(e,t,n){var r,i,o,a={};for(o in t)"key"==o?r=t[o]:"ref"==o?i=t[o]:a[o]=t[o];if(arguments.length>2&&(a.children=arguments.length>3?dw.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===a[o]&&(a[o]=e.defaultProps[o]);return kw(e,a,r,i,null)}function kw(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==i?++pw:i};return null==i&&null!=fw.vnode&&fw.vnode(o),o}function Ew(e){return e.children}function Cw(e,t){this.props=e,this.context=t}function Aw(e,t){if(null==t)return e.__?Aw(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?Aw(e):null}function Dw(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return Dw(e)}}function qw(e){(!e.__d&&(e.__d=!0)&&hw.push(e)&&!_w.__r++||mw!==fw.debounceRendering)&&((mw=fw.debounceRendering)||gw)(_w)}function _w(){var e,t,n,r,i,o,a,s;for(hw.sort(yw);e=hw.shift();)e.__d&&(t=hw.length,r=void 0,i=void 0,a=(o=(n=e).__v).__e,(s=n.__P)&&(r=[],(i=ww({},o)).__v=o.__v+1,Fw(s,o,i,n.__n,void 0!==s.ownerSVGElement,null!=o.__h?[a]:null,r,null==a?Aw(o):a,o.__h),jw(r,o),o.__e!=a&&Dw(o)),hw.length>t&&hw.sort(yw));_w.__r=0}function Tw(e,t,n,r,i,o,a,s,l,c){var u,d,f,p,h,m,g,y=r&&r.__k||bw,v=y.length;for(n.__k=[],u=0;u<t.length;u++)if(null!=(p=n.__k[u]=null==(p=t[u])||"boolean"==typeof p||"function"==typeof p?null:"string"==typeof p||"number"==typeof p||"bigint"==typeof p?kw(null,p,null,null,p):Array.isArray(p)?kw(Ew,{children:p},null,null,null):p.__b>0?kw(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):p)){if(p.__=n,p.__b=n.__b+1,null===(f=y[u])||f&&p.key==f.key&&p.type===f.type)y[u]=void 0;else for(d=0;d<v;d++){if((f=y[d])&&p.key==f.key&&p.type===f.type){y[d]=void 0;break}f=null}Fw(e,p,f=f||vw,i,o,a,s,l,c),h=p.__e,(d=p.ref)&&f.ref!=d&&(g||(g=[]),f.ref&&g.push(f.ref,null,p),g.push(d,p.__c||h,p)),null!=h?(null==m&&(m=h),"function"==typeof p.type&&p.__k===f.__k?p.__d=l=Nw(p,l,e):l=Ow(e,p,f,y,h,l),"function"==typeof n.type&&(n.__d=l)):l&&f.__e==l&&l.parentNode!=e&&(l=Aw(f))}for(n.__e=m,u=v;u--;)null!=y[u]&&("function"==typeof n.type&&null!=y[u].__e&&y[u].__e==n.__d&&(n.__d=Iw(r).nextSibling),Bw(y[u],y[u]));if(g)for(u=0;u<g.length;u++)Hw(g[u],g[++u],g[++u])}function Nw(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t="function"==typeof r.type?Nw(r,t,n):Ow(n,r,r,i,r.__e,t));return t}function Ow(e,t,n,r,i,o){var a,s,l;if(void 0!==t.__d)a=t.__d,t.__d=void 0;else if(null==n||i!=o||null==i.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(i),a=null;else{for(s=o,l=0;(s=s.nextSibling)&&l<r.length;l+=1)if(s==i)break e;e.insertBefore(i,o),a=o}return void 0!==a?a:i.nextSibling}function Iw(e){var t,n,r;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(t=e.__k.length-1;t>=0;t--)if((n=e.__k[t])&&(r=Iw(n)))return r;return null}function Lw(e,t,n){"-"===t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||xw.test(t)?n:n+"px"}function Pw(e,t,n,r,i){var o;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Lw(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Lw(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?zw:Rw,o):e.removeEventListener(t,o?zw:Rw,o);else if("dangerouslySetInnerHTML"!==t){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==t&&"height"!==t&&"href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))}}function Rw(e){return this.l[e.type+!1](fw.event?fw.event(e):e)}function zw(e){return this.l[e.type+!0](fw.event?fw.event(e):e)}function Fw(e,t,n,r,i,o,a,s,l){var c,u,d,f,p,h,m,g,y,v,b,x,w,S,M,k=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(l=n.__h,s=t.__e=n.__e,t.__h=null,o=[s]),(c=fw.__b)&&c(t);try{e:if("function"==typeof k){if(g=t.props,y=(c=k.contextType)&&r[c.__c],v=c?y?y.props.value:c.__:r,n.__c?m=(u=t.__c=n.__c).__=u.__E:("prototype"in k&&k.prototype.render?t.__c=u=new k(g,v):(t.__c=u=new Cw(g,v),u.constructor=k,u.render=$w),y&&y.sub(u),u.props=g,u.state||(u.state={}),u.context=v,u.__n=r,d=u.__d=!0,u.__h=[],u._sb=[]),null==u.__s&&(u.__s=u.state),null!=k.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=ww({},u.__s)),ww(u.__s,k.getDerivedStateFromProps(g,u.__s))),f=u.props,p=u.state,u.__v=t,d)null==k.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==k.getDerivedStateFromProps&&g!==f&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(g,v),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(g,u.__s,v)||t.__v===n.__v){for(t.__v!==n.__v&&(u.props=g,u.state=u.__s,u.__d=!1),u.__e=!1,t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(e){e&&(e.__=t)}),b=0;b<u._sb.length;b++)u.__h.push(u._sb[b]);u._sb=[],u.__h.length&&a.push(u);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(g,u.__s,v),null!=u.componentDidUpdate&&u.__h.push(function(){u.componentDidUpdate(f,p,h)})}if(u.context=v,u.props=g,u.__P=e,x=fw.__r,w=0,"prototype"in k&&k.prototype.render){for(u.state=u.__s,u.__d=!1,x&&x(t),c=u.render(u.props,u.state,u.context),S=0;S<u._sb.length;S++)u.__h.push(u._sb[S]);u._sb=[]}else do{u.__d=!1,x&&x(t),c=u.render(u.props,u.state,u.context),u.state=u.__s}while(u.__d&&++w<25);u.state=u.__s,null!=u.getChildContext&&(r=ww(ww({},r),u.getChildContext())),d||null==u.getSnapshotBeforeUpdate||(h=u.getSnapshotBeforeUpdate(f,p)),M=null!=c&&c.type===Ew&&null==c.key?c.props.children:c,Tw(e,Array.isArray(M)?M:[M],t,n,r,i,o,a,s,l),u.base=t.__e,t.__h=null,u.__h.length&&a.push(u),m&&(u.__E=u.__=null),u.__e=!1}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Vw(n.__e,t,n,r,i,o,a,l);(c=fw.diffed)&&c(t)}catch(e){t.__v=null,(l||null!=o)&&(t.__e=s,t.__h=!!l,o[o.indexOf(s)]=null),fw.__e(e,t,n)}}function jw(e,t){fw.__c&&fw.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){fw.__e(e,t.__v)}})}function Vw(e,t,n,r,i,o,a,s){var l,c,u,d=n.props,f=t.props,p=t.type,h=0;if("svg"===p&&(i=!0),null!=o)for(;h<o.length;h++)if((l=o[h])&&"setAttribute"in l==!!p&&(p?l.localName===p:3===l.nodeType)){e=l,o[h]=null;break}if(null==e){if(null===p)return document.createTextNode(f);e=i?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,f.is&&f),o=null,s=!1}if(null===p)d===f||s&&e.data===f||(e.data=f);else{if(o=o&&dw.call(e.childNodes),c=(d=n.props||vw).dangerouslySetInnerHTML,u=f.dangerouslySetInnerHTML,!s){if(null!=o)for(d={},h=0;h<e.attributes.length;h++)d[e.attributes[h].name]=e.attributes[h].value;(u||c)&&(u&&(c&&u.__html==c.__html||u.__html===e.innerHTML)||(e.innerHTML=u&&u.__html||""))}if(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||Pw(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||Pw(e,o,t[o],n[o],r)}(e,f,d,i,s),u)t.__k=[];else if(h=t.props.children,Tw(e,Array.isArray(h)?h:[h],t,n,r,i&&"foreignObject"!==p,o,a,o?o[0]:n.__k&&Aw(n,0),s),null!=o)for(h=o.length;h--;)null!=o[h]&&Sw(o[h]);s||("value"in f&&void 0!==(h=f.value)&&(h!==e.value||"progress"===p&&!h||"option"===p&&h!==d.value)&&Pw(e,"value",h,d.value,!1),"checked"in f&&void 0!==(h=f.checked)&&h!==e.checked&&Pw(e,"checked",h,d.checked,!1))}return e}function Hw(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){fw.__e(e,n)}}function Bw(e,t,n){var r,i;if(fw.unmount&&fw.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Hw(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){fw.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Bw(r[i],t,n||"function"!=typeof e.type);n||null==e.__e||Sw(e.__e),e.__=e.__e=e.__d=void 0}function $w(e,t,n){return this.constructor(e,n)}function Ww(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createElement:t=document.createElement.bind(document)}=e;let n,r,i=Ax();const o={transform:void 0,disableScreenReader:!1},a=Dx();return a.element=()=>n,a.root=()=>n,a.settings=e=>(e&&Object.keys(o).forEach(t=>{void 0!==e[t]&&(o[t]=e[t])}),o),a.appendTo=e=>(n||(n=t("div"),n.style.position="absolute",n.style["-webkit-font-smoothing"]="antialiased",n.style["-moz-osx-font-smoothing"]="antialiased",n.style.pointerEvents="none"),e.appendChild(n),n),a.render=e=>{if(!n)return!1;const t="function"==typeof o.transform&&o.transform();if(t){const{horizontalScaling:e,horizontalSkewing:r,verticalSkewing:i,verticalScaling:o,horizontalMoving:a,verticalMoving:s}=t;return n.style.transform="matrix(".concat(e,", ").concat(r,", ").concat(i,", ").concat(o,", ").concat(a,", ").concat(s,")"),!0}n.style.transform="";let a;return o.disableScreenReader&&n.setAttribute("aria-hidden",!0),n.style.left="".concat(i.computedPhysical.x,"px"),n.style.top="".concat(i.computedPhysical.y,"px"),n.style.width="".concat(i.computedPhysical.width,"px"),n.style.height="".concat(i.computedPhysical.height,"px"),a=Array.isArray(e)?Mw("div",null,e):e,r=function(e,t,n){var r,i,o;fw.__&&fw.__(e,t),i=(r="function"==typeof n)?null:n&&n.__k||t.__k,o=[],Fw(t,e=(!r&&n||t).__k=Mw(Ew,null,[e]),i||vw,vw,void 0!==t.ownerSVGElement,!r&&n?[n]:i?null:t.firstChild?dw.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r),jw(o,e)}(a,n,r),!0},a.renderArgs=[Mw],a.clear=()=>{if(n){let e=n.firstChild;for(;e;)n.removeChild(e),e=n.firstChild;r=null}return a},a.destroy=()=>{n&&n.parentElement&&n.parentElement.removeChild(n),n=null,r=null},a.size=e=>(e&&(i=Ax(e)),i),a}dw=bw.slice,fw={__e:function(e,t,n,r){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},pw=0,Cw.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=ww({},this.state),"function"==typeof e&&(e=e(ww({},n),this.props)),e&&ww(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),qw(this))},Cw.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),qw(this))},Cw.prototype.render=Ew,hw=[],gw="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,yw=function(e,t){return e.__v.__b-t.__v.__b},_w.__r=0;var Uw=[function(e){e.renderer("svg",uw)},function(e){e.renderer("canvas",Fx)},function(e){e.renderer("dom",Ww)}];const Yw={OFF:0,ERROR:1,WARN:2,INFO:3,DEBUG:4};const Xw=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=function(){let{level:e=Yw.OFF,pipe:t=console}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e;const r={[Yw.OFF]:()=>{},[Yw.ERROR]:function(){return t.error(...arguments)},[Yw.WARN]:function(){return t.warn(...arguments)},[Yw.INFO]:function(){return t.info(...arguments)},[Yw.DEBUG]:function(){return t.log(...arguments)}},i=function(e){if(e&&!(n<e)){for(var t=arguments.length,i=new Array(t>1?t-1:0),o=1;o<t;o++)i[o-1]=arguments[o];(r[e]||r[Yw.DEBUG])(...i)}};return{log:i,error:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(Yw.ERROR,...t)},warn:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(Yw.WARN,...t)},info:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(Yw.INFO,...t)},debug:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return i(Yw.DEBUG,...t)},level:e=>("number"==typeof e&&(n=e),n),LOG_LEVEL:Yw}}(t.logger),i={component:il(n.component,"component",r),data:il(n.data,"data",r),formatter:il(n.formatter,"formatter",r),interaction:il(n.interaction,"interaction",r),renderer:Uh(n.renderer),scale:il(n.scale,"scale",r),symbol:il(n.symbol,"symbol",r),logger:r};function o(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e({palettes:t.palettes.concat(n.palettes||[]),style:Va({},t.style,n.style),logger:n.logger||t.logger,renderer:n.renderer||t.renderer},i)}return t.renderer&&t.renderer.prio&&i.renderer.default(t.renderer.prio[0]),o.use=function(e){return function(e){e(arguments.length>2?arguments[2]:void 0,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i)},o.chart=e=>Wh(e,{registries:i,logger:r,style:t.style,palettes:t.palettes}),o.config=()=>t,Object.keys(i).forEach(e=>{o[e]=i[e]}),o.version=Ha,o}({renderer:{prio:["svg","canvas"]},logger:{level:0},style:{"$font-family":"'Source Sans Pro', Arial, sans-serif","$font-size":"12px","$line-height":"16px","$font-size--l":"16px","$font-weight":"normal","$gray-100":"#ffffff","$gray-98":"#f9f9f9","$gray-95":"#f2f2f2","$gray-90":"#e6e6e6","$gray-35":"#595959","$gray-30":"#4d4d4d","$gray-25":"#404040","$gray-20":"#333333","$border-95":"rgba(255, 255, 255, 0.05)","$border-90":"rgba(255, 255, 255, 0.1)","$border-80":"rgba(255, 255, 255, 0.2)","$border-20":"rgba(0, 0, 0, 0.2)","$border-10":"rgba(0, 0, 0, 0.1)","$border-5":"rgba(0, 0, 0, 0.05)","$primary-blue":"#3F8AB3","$primary-green":"#6CB33F","$primary-red":"#DC423F","$primary-orange":"#EF960F","$spacing--s":4,$spacing:8,"$spacing--l":12,"$font-color":"$gray-35","$font-color--inverted":"$gray-90","$guide-color":"$gray-90","$guide-color--inverted":"$gray-35",$border:"$border-80","$border--inverted":"$border-10",$shape:{fill:"$primary-blue",strokeWidth:1,stroke:"$border"},"$shape-outline":{stroke:"$primary-blue",strokeWidth:2},"$shape-guide":{stroke:"$guide-color",strokeWidth:1},"$shape-guide--inverted":{"@extend":"$shape-guide",stroke:"$guide-color--inverted"},$label:{fontSize:"$font-size",fontFamily:"$font-family",fill:"$font-color"},"$label--inverted":{$extend:"$label",fill:"$font-color--inverted"},"$label-overlay":{fontSize:"$font-size--l",fontFamily:"$font-family",fill:"$gray-100",color:"$font-color",stroke:"$guide-color--inverted",strokeWidth:1,borderRadius:4},$title:{"@extend":"$label",fontSize:"$font-size--l",fontWeight:"$font-weight",stroke:"$guide-color--inverted",strokeWidth:0},"$guide-line":{strokeWidth:1,stroke:"$guide-color"},"$guide-line--minor":{strokeWidth:1,stroke:"$gray-95"},"$padding--s":{left:"$spacing--s",right:"$spacing--s",top:"$spacing--s",bottom:"$spacing--s"},$padding:{left:"$spacing",right:"$spacing",top:"$spacing",bottom:"$spacing"},"$selection-area-target":{fill:"$primary-green",strokeWidth:0,opacity:.2}},palettes:[{key:"categorical",colors:[["#a54343","#d76c6c","#ec983d","#ecc43d","#f9ec86","#cbe989","#70ba6e","#578b60","#79d69f","#26a0a7","#138185","#65d3da"]]},{key:"diverging",colors:[["#3d52a1","#3a89c9","#77b7e5","#b4ddf7","#e6f5fe","#ffe3aa","#f9bd7e","#ed875e","#d24d3e","#ae1c3e"]]},{key:"sequential",colors:[["rgb(180,221,212)","rgb(34, 83, 90)"]]}]},{component:Yh,data:Jh,formatter:Du,interaction:Qh,renderer:Uh(),scale:_f,symbol:Pp});function Gw(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Zw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kw(Object(n),!0).forEach(function(t){Gw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}lb.forEach(Xw.use),Uw.forEach(Xw.use),[].forEach(Xw.use);var Jw=Object.prototype.hasOwnProperty,Qw=Object.prototype.toString,eS=Object.defineProperty,tS=Object.getOwnPropertyDescriptor,nS=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===Qw.call(e)},rS=function(e){if(!e||"[object Object]"!==Qw.call(e))return!1;var t,n=Jw.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&Jw.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||Jw.call(e,t)},iS=function(e,t){eS&&"__proto__"===t.name?eS(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},oS=function(e,t){if("__proto__"===t){if(!Jw.call(e,t))return;if(tS)return tS(e,t).value}return e[t]},aS=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=oS(s,n),s!==(i=oS(t,n))&&(u&&i&&(rS(i)||(o=nS(i)))?(o?(o=!1,a=r&&nS(r)?r:[]):a=r&&rS(r)?r:{},iS(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&iS(s,{name:n,newValue:i}));return s};function sS(e,t,n,r){if(!e)return-1;const i=n.cache,o=e.origin?e.origin():null;o&&(e=o);let a=i.fields.indexOf(e),s=-1,l=-1;if(-1===a)for(let t=0;t<i.wrappedFields.length;t++)if(l=i.wrappedFields[t].attrDims.map(e=>e.instance).indexOf(e),s=i.wrappedFields[t].attrExps.map(e=>e.instance).indexOf(e),-1!==l||-1!==s){a=t;break}if(Array.isArray(r)&&r.some((e,t)=>e!==t)){const e=r.indexOf(a);-1!==e&&(a=e)}return a-=t.qArea.qLeft,a<0||a>=t.qArea.qWidth?-1:l>=0?e=>e[a].qAttrDims.qValues[l]:s>=0?e=>e[a].qAttrExps.qValues[s]:e=>e[a]}function lS(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function cS(e){let{cache:t,f:n,mainCell:r,p:i,page:o,rowIdx:a,row:s,sourceKey:l,target:c,targetProp:u,columnOrder:d}=e,f=r;if(i.field&&i.field!==n){const e=sS(i.field,o,{cache:t},d);if(-1===e)return;f=aS({qRow:a},e(s))}c[u]=lS(i,f,{key:l})}function uS(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let e=0;e<i.length;e++)if(void 0!==i[e].field){const a=t.raw(),s=t.key(),l="object"==typeof i[e].field?i[e].field:t.field(i[e].field),{props:c,main:u}=r.normalizeConfig(i[e],t),d=Object.keys(c),f=!!i[e].trackBy,p=typeof i[e].trackBy,h={},m=[],g=[];for(let t=0;t<a.qDataPages.length;t++){const o=sS(l,a.qDataPages[t],{cache:n},a.qColumnOrder);if(-1!==o)for(let y=0;y<a.qDataPages[t].qMatrix.length;y++){const v=a.qDataPages[t].qArea.qTop+y,b=aS({qRow:v},o(a.qDataPages[t].qMatrix[y])),x=lS(u,b,{key:s});if(!(u.filter&&!u.filter(b))){for(let e=0;e<d.length;e++){const r=c[d[e]];let i=r.fields||[r];r.fields&&(x[d[e]]=[]);for(let o=0;o<i.length;o++)cS({cache:n,f:l,mainCell:b,p:i[o],prop:d[e],page:a.qDataPages[t],rowIdx:v,row:a.qDataPages[t].qMatrix[y],sourceKey:s,target:r.fields?x[d[e]]:x,targetProp:r.fields?o:d[e],columnOrder:a.qColumnOrder});if(r.fields){const t=x[d[e]].map(e=>e.value),n=x[d[e]].map(e=>e.label);x[d[e]]={value:"function"==typeof r.value?r.value(t):void 0!==r.value?r.value:t,label:"function"==typeof r.label?r.label(n):void 0!==r.label?String(r.label):String(x[d[e]].value)}}}f&&r.track({cfg:i[e],itemData:b,obj:x,target:m,tracker:h,trackType:p}),g.push(x)}}}const y=f?r.collect(m,{main:u,propsArr:d,props:c}):g;o=[...o,...y]}return o}function dS(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function fS(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=hS)):void 0===t&&(t=pS);for(var n,r,i,o,a,s=new yS(e),l=[s];n=l.pop();)if((i=t(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)l.push(r=i[o]=new yS(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(gS)}function pS(e){return e.children}function hS(e){return Array.isArray(e)?e[1]:null}function mS(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function gS(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function yS(e){this.data=e,this.depth=this.height=0,this.parent=null}function vS(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}yS.prototype=fS.prototype={constructor:yS,count:function(){return this.eachAfter(dS)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)e.call(t,o,++l,this);return this},eachBefore:function(e,t){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(e.call(t,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;e=n.pop(),t=r.pop();for(;e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},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,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function(){return fS(this).eachBefore(mS)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,o=[i];do{for(e=o.reverse(),o=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n<r;++n)o.push(t[n])}while(o.length)}};var bS={depth:-1},xS={},wS={};function SS(e){return e.id}function MS(e){return e.parentId}function kS(){var e,t=SS,n=MS;function r(r){var i,o,a,s,l,c,u,d,f=Array.from(r),p=t,h=n,m=new Map;if(null!=e){const t=f.map((t,n)=>function(e){e=`${e}`;let t=e.length;CS(e,t-1)&&!CS(e,t-2)&&(e=e.slice(0,-1));return"/"===e[0]?e:`/${e}`}(e(t,n,r))),n=t.map(ES),i=new Set(t).add("");for(const e of n)i.has(e)||(i.add(e),t.push(e),n.push(ES(e)),f.push(wS));p=(e,n)=>t[n],h=(e,t)=>n[t]}for(a=0,i=f.length;a<i;++a)o=f[a],c=f[a]=new yS(o),null!=(u=p(o,a,r))&&(u+="")&&(d=c.id=u,m.set(d,m.has(d)?xS:c)),null!=(u=h(o,a,r))&&(u+="")&&(c.parent=u);for(a=0;a<i;++a)if(u=(c=f[a]).parent){if(!(l=m.get(u)))throw new Error("missing: "+u);if(l===xS)throw new Error("ambiguous: "+u);l.children?l.children.push(c):l.children=[c],c.parent=l}else{if(s)throw new Error("multiple roots");s=c}if(!s)throw new Error("no root");if(null!=e){for(;s.data===wS&&1===s.children.length;)s=s.children[0],--i;for(let e=f.length-1;e>=0&&(c=f[e]).data===wS;--e)c.data=null}if(s.parent=bS,s.eachBefore(function(e){e.depth=e.parent.depth+1,--i}).eachBefore(gS),s.parent=null,i>0)throw new Error("cycle");return s}return r.id=function(e){return arguments.length?(t=vS(e),r):t},r.parentId=function(e){return arguments.length?(n=vS(e),r):n},r.path=function(t){return arguments.length?(e=vS(t),r):e},r}function ES(e){let t=e.length;if(t<2)return"";for(;--t>1&&!CS(e,t););return e.slice(0,t)}function CS(e,t){if("/"===e[t]){let n=0;for(;t>0&&"\\"===e[--t];)++n;if(!(1&n))return!0}return!1}function AS(e,t){"/"===e.charAt(0)&&(e=e.substring(1));const n=e.split("/");let r,i=t;for(let e=0;e<n.length;e++){if("*"===n[e]&&Array.isArray(i)){const t=[];r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++){let n=AS(r,i[e]);Array.isArray(n)?t.push(...n):t.push(n)}return t}if(!n[e]&&Array.isArray(i)){const t=new Array(i.length);r=n.slice(e+1).join("/");for(let e=0;e<i.length;e++)t[e]=AS(r,i[e]);return t}n[e]in i&&(i=i[n[e]])}return i}function DS(e,t,n){let r=[];if(!e||!e.length)return r;if(t<=0){const t=n>=0?[e[n]]:e;r=[...r,...t]}else for(let i=0;i<e.length;i++)e[i].children&&e[i].children.length&&(r=[...r,...DS(e[i].children,t-1,n)]);return r}function qS(e,t,n){if(e===t)return e=>e;if(e>t){const n=Math.max(0,Math.min(100,e-t));return e=>{let t=e;for(let e=0;e<n;++e)t=t.parent;return t}}if(t>e){const r=Math.max(0,Math.min(100,t-e));return e=>DS(e.children,r-1,n)}return!1}const _S=/^qDimensionInfo(?:\/(\d+))?/,TS=/^\/?qMeasureInfo\/(\d+)/,NS=/\/qAttrExprInfo\/(\d+)/,OS=/\/qAttrDimInfo\/(\d+)/;function IS(e){const t=e.qColumnOrder&&e.qColumnOrder.length?e.qColumnOrder:e.qDimensionInfo.map((e,t)=>t);return t.filter(t=>t<e.qDimensionInfo.length)}function LS(e,t){let{cube:n}=t;if(!e)return-1;let r=e.origin&&e.origin()?e.origin().key():e.key(),i=!1,o=-1,a=-1,s=-1,l=-1,c=-1,u=-1,d=r;const f=n.qEffectiveInterColumnSortOrder,p=IS(n);return _S.test(d)&&(i=!0,o=+_S.exec(d)[1],d=r.replace(_S,"")),TS.test(d)&&("K"===n.qMode?c=+TS.exec(d)[1]:f&&-1!==f.indexOf(-1)?(c=+TS.exec(d)[1],u=0):u=+TS.exec(d)[1],d=d.replace(TS,"")),d&&(OS.exec(d)?s=+OS.exec(d)[1]:NS.exec(d)&&(a=+NS.exec(d)[1])),l=i?"S"===n.qMode?p[o]:f?f.indexOf(o):o:f&&-1!==f.indexOf(-1)?f.indexOf(-1):n.qDimensionInfo.length-("K"===n.qMode?0:1),{fieldDepth:l+1,pseudoMeasureIndex:c,measureIdx:u,attrDimIdx:s,attrIdx:a}}function PS(e,t){let n,r,i=qS(e.fieldDepth,t.fieldDepth,t.pseudoMeasureIndex);return n=t.measureIdx>=0?e=>e.data.qValues[t.measureIdx]:e=>e.data,t.attrDimIdx>=0?r=e=>{var n;return null==e||null===(n=e.qAttrDims)||void 0===n?void 0:n.qValues[t.attrDimIdx]}:t.attrIdx>=0&&(r=e=>{var n;return null==e||null===(n=e.qAttrExps)||void 0===n?void 0:n.qValues[t.attrIdx]}),{nodeFn:i,attrFn:r,valueFn:n}}function RS(e,t,n){let{key:r}=n;const i={value:"function"==typeof e.value?e.value(t):void 0!==e.value?e.value:t};return i.label="function"==typeof e.label?e.label(t):void 0!==e.label?String(e.label):String(i.value),e.field&&(i.source={key:r,field:e.field.key()}),i}function zS(e){let{propsArr:t,props:n,item:r,itemData:i,ret:o,sourceKey:a}=e;for(let e=0;e<t.length;e++){const s=n[t[e]],l=s.fields||[s];let c,u;s.fields&&(c=[],u=[]);for(let n=0;n<l.length;n++){const d=l[n];let f,p,h,m,g,y;if("primitive"===d.type?(h=d.value,y=String(d.value)):("function"==typeof d.value&&(f=e=>d.value(e,r)),"function"==typeof d.label&&(p=e=>d.label(e,r)),d.accessor?(m=d.accessor(r),Array.isArray(m)?(g=m.map(d.valueAccessor),d.attrAccessor&&(g=g.map(d.attrAccessor)),f&&(h=g.map(f),f=null),p&&(y=g.map(p),p=null),h=d.reduce?d.reduce(h):h,y=d.reduceLabel?d.reduceLabel(y,h):String(h)):(h=d.attrAccessor?d.attrAccessor(d.valueAccessor(m)):d.valueAccessor(m),y=h)):(h=i,y=i)),s.fields){const e=f?f(h):h;c.push(e),u.push(p&&null!=y?p(y):null!=y?y:String(e))}else{const n=f?f(h):h;o[t[e]]={value:n,label:p?p(y):null!=y?y:String(n)},d.field&&(o[t[e]].source={field:d.field.key(),key:a})}}c&&(o[t[e]]={value:"function"==typeof s.value?s.value(c,r):c,label:"function"==typeof s.label?s.label(u,r):u})}}const FS=(e,t,n)=>{const r="K"===e.qMode?"/qStackedDataPages/*/qData":"/qTreeDataPages/*",i="K"===e.qMode?"qSubNodes":"qNodes",o=AS(r,e);return o&&o[0]?(t.tree=fS(o[0],n.children||(e=>e[i])),t.tree):null};const jS=e=>{let{propsArr:t,props:n,cube:r,cache:i,itemDepthObject:o,f:a}=e;for(let e=0;e<t.length;e++){const i=n[t[e]],s=i.fields?i.fields:[i];for(let e=0;e<s.length;e++){const t=s[e];if(t.field!==a){const e=PS(o,LS(t.field,{cube:r}));t.accessor=e.nodeFn,t.valueAccessor=e.valueFn,t.attrAccessor=e.attrFn}}}};function VS(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;const i=t.raw(),o=t.key(),a="S"===i.qMode?function(e){const t=e.raw().qDataPages.length?e.raw().qDataPages[0].qMatrix:[],n=function(e){const t=e.raw().qColumnOrder,n=e.fields();return t&&t.length===n.length?t:n.map((e,t)=>t)}(e),r=e.fields(),i=e.fields().filter(e=>"dimension"===e.type()).map(e=>n.indexOf(r.indexOf(e))),o=e.fields().filter(e=>"measure"===e.type()).map(e=>n.indexOf(r.indexOf(e))),a={__root:{__id:"__root",qValues:[]}};for(let e=0;e<t.length;e++){const n=t[e];let r="__root",l=!1;for(let e=0;e<i.length;e++){var s;const t=n[i[e]],o="".concat(r,"__").concat(null!==(s=t.qElemNumber)&&void 0!==s?s:t.qElemNo);a[o]||(a[o]=Zw({__id:o,__parent:r,qValues:[]},t),l=!0),r=o}if(l)for(let e=0;e<o.length;e++){const t=n[o[e]];a[r].qValues.push(t)}}const l=Object.keys(a).map(e=>a[e]),c=kS().id(e=>e.__id).parentId(e=>e.__parent)(l);return c}(t):FS(i,n,e);if(!a)return null;const s=a.height,l=[];for(let o=0;o<=s;o++){let a=null;if(o>0)if("S"===i.qMode){let e=IS(i)[o-1];a=n.fields[e]}else{let e=i.qEffectiveInterColumnSortOrder[o-1];o>i.qEffectiveInterColumnSortOrder.length&&(e=i.qDimensionInfo.length),a=n.fields[e]}const{props:s,main:c}=r.normalizeConfig(Zw(Zw({},e),{},{field:a?a.key():void 0}),t),u=Object.keys(s);l[o]={propsArr:u,props:s,main:c};const d=a?LS(a,{cube:i}):{fieldDepth:0};jS({propsArr:u,props:s,cube:i,cache:n,itemDepthObject:d,f:a})}const c=a.copy().descendants(),u=a.descendants();for(let e=0;e<u.length;e++){const t=l[u[e].depth].propsArr,n=l[u[e].depth].props,r=l[u[e].depth].main,i=c[e],a=i.data,s=RS(r,a,{key:o});zS({propsArr:t,props:n,item:i,itemData:a,ret:s,sourceKey:o}),u[e].data=s}return a}function HS(e,t,n,r){const i=Array.isArray(e)?e:[e];let o=[];for(let a=0;a<i.length;a++)if(void 0!==i[a].field){const s=t.raw(),l=t.key();if(!FS(s,n,e))continue;const c="object"==typeof i[a].field?i[a].field:t.field(i[a].field),{props:u,main:d}=r.normalizeConfig(i[a],t),f=Object.keys(u),p=LS(c,{cube:s}),{nodeFn:h,attrFn:m,valueFn:g}=PS({fieldDepth:0},p);jS({propsArr:f,props:u,cube:s,cache:n,itemDepthObject:p,f:c});const y=!!i[a].trackBy,v=typeof i[a].trackBy,b={},x=[],w=h(n.tree),S=[];for(let e=0;e<w.length;e++){const t=w[e],n=m?m(g(t)):g(t);if(d.filter&&!d.filter(n))continue;const o=RS(d,n,{key:l});zS({propsArr:f,props:u,item:t,itemData:n,ret:o,sourceKey:l}),y&&r.track({cfg:i[a],itemData:n,obj:o,target:x,tracker:b,trackType:v}),S.push(o)}const M=y?r.collect(x,{main:d,propsArr:f,props:u}):S;o=[...o,...M]}return o}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var BS=function(e,t){return e(t={exports:{}},t.exports),t.exports}(function(e){
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,i,o,a,s,l,c,u,d,f=e.length,p=e.search(/[0-9\-\+#]/),h=p>0?e.substring(0,p):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),y=f-g,v=e.substring(y,y+1),b=y+("."===v||","===v?1:0),x=g>0?e.substring(b,f):"";if(n=(t="-"===(e=e.substring(p,b)).charAt(0)?-t:+t)<0?t=-t:0,i=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",o=r&&r[1]&&r[0]||",",e=e.split(i),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(o),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0===+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",y=(d=t[0]).length%l,f=d.length,b=0;b<f;b++)m+=d.charAt(b),!((b-y+1)%l)&&b<f-l&&(m+=o);t[0]=m}return t[1]=e[1]&&t[1]?i+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+x}});function $S(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}const WS={3:"k",6:"M",9:"G",12:"T",15:"P",18:"E",21:"Z",24:"Y","-3":"m","-6":"μ","-9":"n","-12":"p","-15":"f","-18":"a","-21":"z","-24":"y"},US=/%\)?$/,YS=/^\(r(0[2-9]|[12]\d|3[0-6])\)/i,XS=/^\(oct\)/i,GS=/^\(dec\)/i,KS=/^\(hex\)/i,ZS=/^\(bin\)/i,JS=/^\(rom\)/i,QS=/^(\(rom\)|\(bin\)|\(hex\)|\(dec\)|\(oct\)|\(r(0[2-9]|[12]\d|3[0-6])\))/i,eM=/#|0/g;function tM(e,t,n,r){return e=e.toString(t),n[1]===n[1].toUpperCase()&&(e=e.toUpperCase()),e.length-e.indexOf(".")>10&&(e=e.slice(0,e.indexOf(".")+11)),e.replace(".",r||".")}function nM(e,t,n){let r;return YS.test(t)?e=tM(e,Number(/\d{2}/.exec(t)[0]),t,n):XS.test(t)?e=tM(e,8,t,n):GS.test(t)?e=tM(e,10,t,n):KS.test(t)?e=tM(e,16,t,n):ZS.test(t)?e=tM(e,2,t,n):JS.test(t)&&(r="",e<0&&(r="-",e=-e),0===(e=Math.floor(e))?e="0":e<=5e5?(e=function(e,t){let n,r="",i=Number(String(e).slice(-3)),o=(e-i)/1e3,a=[0,1,4,5,9,10,40,50,90,100,400,500,900].reverse(),s=["0","I","IV","V","IX","X","XL","L","XC","C","CD","D","CM"].reverse();for(;i>0;)for(n=0;n<a.length;n++)if(a[n]<=i){r+=s[n],i-=a[n];break}for(n=0;n<o;n++)r="M".concat(r);return t[1]!==t[1].toUpperCase()&&(r=r.toLowerCase()),r}(e,t),e=r+e):e=t+r+e.toExponential(0)),e}function rM(e,t,n){const r=$S(e);return n?r:new RegExp(r||"",t)}function iM(e,t,n,r){let i,o,a,s,l,c,u,d,f,p=e.pattern;var h,m;r&&(e.abbreviate=!0),h=t,(m=n)&&(m=$S(m)),h&&(h=$S(h)),f=new RegExp("(?:[#0]+".concat(h,")?[#0]+(?:").concat(m,"[#0]+)?")),a=p.match(f),a=a?a[0]:"",s=a?p.substr(0,p.indexOf(a)):p,l=a?p.substring(p.indexOf(a)+a.length):"",a||(a=p?"#":"##########"),t&&t===n&&(i=a.split(n),o=i.pop(),a=i.join("")+n+o,t=""),c=t,t=/,/.test(n)?"¤":",",c&&(a=a.replace(rM(c,"g"),t)),u=n,n=".",u&&(a=a.replace(rM(u,"g"),n)),d=a.match(/#/g),d=d?d.length:0;const g=p.split(u);let y;g[1]&&(y=g[1].match(eM)),e.prefix=s||"",e.postfix=l||"",e.pattern=p,e.maxPrecision=y?y.length:2,e.percentage=US.test(p),e.numericPattern=a||"",e.numericRegex=new RegExp("".concat(rM(t,null,!0),"|").concat(rM(n,null,!0)),"g"),e.groupTemp=c,e.decTemp=u,e.t=t,e.d=n,e.temp=d}class oM{constructor(e,t,n,r,i){this.localeInfo=e,this.pattern=t,this.thousandDelimiter=n||",",this.decimalDelimiter=r||".",this.type=i||"numeric",this.patternSeparator=";",this.abbreviations=function(e,t){if(!e||!e.qNumericalAbbreviation)return WS;const n={};return e.qNumericalAbbreviation.split(t).forEach(e=>{let t=e.split(":");2===t.length&&(n[t[0]]=t[1])}),n}(e,this.patternSeparator),this.prepare()}clone(){const e=new oM(this.localeInfo,this.pattern,this.thousandDelimiter,this.decimalDelimiter,this.type);return e.subtype=this.subtype,e}format(e,t,n,r){return this.prepare(t,n,r),this.formatValue(e)}prepare(e,t,n){let r;if(void 0===e&&(e=this.pattern),void 0===t&&(t=this.thousandDelimiter),void 0===n&&(n=this.decimalDelimiter),!e)return void(this._prepared={pattern:!1});this._prepared={positive:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},negative:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""},zero:{d:n,t:t,abbreviate:!1,isFunctional:!1,prefix:"",postfix:""}},r=this._prepared,e=e.split(this.patternSeparator),r.positive.pattern=e[0],r.negative.pattern=e[1],r.zero.pattern=e[2],QS.test(e[0])&&(r.positive.isFunctional=!0),e[1]?QS.test(e[1])&&(r.negative.isFunctional=!0):r.negative=!1,e[2]?QS.test(e[2])&&(r.zero.isFunctional=!0):r.zero=!1;const i="U"===this.type;r.positive.isFunctional||iM(r.positive,t,n,i),r.negative&&!r.negative.isFunctional&&iM(r.negative,t,n,i),r.zero&&!r.zero.isFunctional&&iM(r.zero,t,n,i)}formatValue(e){let t,n,r,i,o,a,s,l,c,u=this._prepared,d="",f="",p=e;if(isNaN(e))return"".concat(p);if(e=+e,!1===u.pattern)return e.toString();if(0===e&&u.zero)return u=u.zero,u.pattern;if(e<0&&u.negative?(u=u.negative,e=-e):u=u.positive,o=u.d,a=u.t,u.isFunctional)e=nM(e,u.pattern,o);else{if(u.percentage&&(e*=100),u.abbreviate){const t=Object.keys(this.abbreviations).map(e=>parseInt(e,10)).sort((e,t)=>e-t);let r,i,o=t[0];for(s=0,n=Number(Number(e).toExponential().split("e")[1]);o<=n&&s<t.length;)s++,o=t[s];s>0&&(r=t[s-1]),r&&n>0&&r>0?i=r:(n<0&&r<0||!r)&&(o<0&&o-n<=u.maxPrecision?i=o:r<=n&&!(o>0&&-n<=u.maxPrecision)&&(i=r)),i&&(d=this.abbreviations[i],e/=10**i)}if(r=Math.abs(e),t=u.temp,l=u.numericPattern,c=l.split(o)[1],"I"===this.type&&(e=Math.round(e)),i=e,c||"#"!==l.slice(-1)[0])if(r>=1e15||r>0&&r<=1e-14)e=r?r.toExponential(15).replace(/\.?0+(?=e)/,""):"0";else{const t=Number((e+1e-15*(e<0?-1:1)).toFixed(Math.min(20,c?c.length:0)).split(".")[0]);let n=l.split(o)[0];if(n+=o,e=BS(n,t)||"0",c){const t=Math.max(0,Math.min(14,c.length)),n=c.replace(/#+$/,"").length;let i=("I"===this.type?0:r%1+1e-15).toFixed(t).slice(2).replace(/0+$/,"");for(s=i.length;s<n;s++)i+="0";i&&(e+=o+i)}else 0===t&&(i=0)}else if(r>=10**t||r<1||r<1e-4)0===e?e="0":r<1e-4||r>=1e20?(e=(e=i.toExponential(Math.max(1,Math.min(14,t))-1)).replace(/\.?0+(?=e)/,""),f=""):(e=e.toPrecision(Math.max(1,Math.min(14,t)))).indexOf(".")>=0&&(e=(e=e.replace(e.indexOf("e")<0?/0+$/:/\.?0+(?=e)/,"")).replace(".",o));else{for(l+=o,t=Math.max(0,Math.min(20,t-Math.ceil(Math.log(r)/Math.log(10)))),s=0;s<t;s++)l+="#";e=BS(l,e)}e=e.replace(u.numericRegex,e=>e===a?u.groupTemp:e===o?u.decTemp:""),i<0&&!/^-/.test(e)&&(e="-".concat(e))}return u.prefix+e+f+d+u.postfix}static getStaticFormatter(){return{prepare(){},formatValue:e=>"".concat(e)}}}function aM(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{size:n=5e3,multipleArguments:r=!1,toKey:i=e=>e}=t;let o,a,s=Object.create(null),l=Object.create(null),c=0,u=0;return o=r?function(){return a=i(...arguments),o.has(a)?o.get(a):o.set(a,e(...arguments))}:t=>(a=i(t),o.has(a)?o.get(a):o.set(a,e(t))),o.set=(e,t)=>(c>=n&&(delete s[l[u]],delete l[u],c--,u++),s[e]=t,l[c]=e,c++,t),o.get=e=>s[e],o.has=e=>e in s,o.clear=()=>{s=Object.create(null),l=Object.create(null),c=0,u=0},o.size=()=>c,o}function sM(e,t,n,r,i){const o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new oM(...t)}(i,e,t,n,r),a=aM(o.formatValue.bind(o),{toKey:e=>isNaN(e)?e:+e});function s(e){return a(e)}return s.format=function(e,t,n,r){return a.clear(),o.format(t,e,n,r)},s.pattern=function(e){return e&&(a.clear(),o.pattern=e,o.prepare()),o.pattern},s}const lM="D",cM="T",uM="TS",dM="IV",fM=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],pM=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],hM=["January","February","March","April","May","June","July","August","September","October","November","December"],mM=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function gM(e,t){for(let n=e.length;n<t;n++)e="0".concat(e);return e}function yM(e){let t=e.toString().split(".");return t[1]?(t=Number("0.".concat(t[1])),t):0}function vM(e,t){let n,r=function(e){const t=e,n=24*yM(t),r=60*yM(n),i=60*yM(r),o=1e3*yM(i);return{d:Math.floor(t),h:Math.floor(n),m:Math.floor(r),s:Math.floor(i),f:Math.round(o)}}(e),i=r.d,o=r.h,a=r.m,s=r.s,l=r.f,c=0;/w+|t+/gi.test(t)&&(n=new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,Math.round(86400*(e-Math.floor(e))))),isNaN(n.getTime())&&(n=null)),/D+/gi.test(t)||(o+=24*i),/h+/gi.test(t)||(a+=60*o),/m+/gi.test(t)||(s+=60*a),/w+/gi.test(t)&&(c=n?n.getDay()-1:0,c<0&&(c=6));let u="";return n&&(u=n.getUTCHours()>=12?"pm":"am"),{year:0,month:0,day:c,date:i,h:o,m:a,s:s,f:l,t:u}}class bM{constructor(e,t,n){const r=e||{};if(r.qCalendarStrings||(r.qCalendarStrings={qLongDayNames:fM,qDayNames:pM,qLongMonthNames:hM,qMonthNames:mM}),this.localeInfo=r,this.locale_days=r.qCalendarStrings.qLongDayNames.slice(),this.locale_days_abbr=r.qCalendarStrings.qDayNames.slice(),this.locale_months=r.qCalendarStrings.qLongMonthNames.slice(),this.locale_months_abbr=r.qCalendarStrings.qMonthNames.slice(),!t){t={[cM]:r.qTimeFmt||"hh:mm:ss",[lM]:r.qDateFmt||"YYYY-MM-DD",[uM]:r.qTimestampFmt||"YYYY-MM-DD hh:mm:ss"}[n]}this.pattern=t}clone(){const e=new bM(this.localeInfo,this.pattern);return e.subtype=this.subtype,e}format(e,t){t||(t=this.pattern?this.pattern:"YYYY-MM-DD hh:mm:ss"),t=t.replace(/\[.+]|\[|]/g,"");const n=/t+/gi.test(t);let r;e instanceof Date?r=function(e,t){let n=e.getUTCHours(),r=e.getUTCDay()-1;return t&&(n%=12,n||(n=12)),r<0&&(r=6),{year:e.getUTCFullYear(),month:e.getUTCMonth(),day:r,date:e.getUTCDate(),h:n,m:e.getUTCMinutes(),s:e.getUTCSeconds(),f:e.getUTCMilliseconds(),t:e.getUTCHours()>=12?"pm":"am"}}(e,n):(e<0&&(e=-e,t="-".concat(t)),r=vM(e,t));const i=function(e,t){return{"Y+|y+":{Y:"".concat(Number("".concat(t.year).slice(-2))),YY:gM("".concat(t.year).slice(-2),2),YYY:gM("".concat(t.year).slice(-3),3),def:e=>gM("".concat(t.year),e.length)},"M+":{M:t.month+1,MM:gM("".concat(t.month+1),2),MMM:e.locale_months_abbr[t.month],def:e.locale_months[t.month]},"W+|w+":{W:t.day,WW:gM("".concat(t.day),2),WWW:e.locale_days_abbr[t.day],def:e.locale_days[t.day]},"D+|d+":{D:t.date,def:e=>gM("".concat(t.date),e.length)},"h+|H+":{h:t.h,def:e=>gM("".concat(t.h),e.length)},"m+":{m:t.m,def:e=>gM("".concat(t.m),e.length)},"s+|S+":{s:t.s,def:e=>gM("".concat(t.s),e.length)},"f+|F+":{def(e){let n="".concat(t.f),r=e.length-n.length;if(r>0)for(let e=0;e<r;e++)n+="0";else r<0&&(n=n.slice(0,e.length));return n}},"t{1,2}|T{1,2}":{def(e){let n=t.t;return e[0].toUpperCase()===e[0]&&(n=n.toUpperCase()),n=n.slice(0,e.length),n}}}}(this,r),o=[];for(const e in i)Object.prototype.hasOwnProperty.call(i,e)&&o.push(e);const a=new RegExp(o.join("|"),"g"),s=t.replace(a,e=>{let t,n,r;for(n in i)if(Object.prototype.hasOwnProperty.call(i,n)&&(t=new RegExp(n),t.test(e)))break;if(!t)return"";for(const t in i[n])if(t===e||t.toLowerCase()===e){r=i[n][t],void 0===r&&(r=i[n][t.toLowerCase()]);break}return void 0===r&&(r=i[n].def),"function"==typeof r&&(r=r(e)),r});return s}}function xM(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new bM(...t)}function wM(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"TS",n=xM(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,e,t),r=aM(n.format.bind(n),{toKey:e=>"object"==typeof e&&"function"==typeof e.getTime?e.getTime():e});function i(e){return t!==dM?function(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}(e):e}function o(e){return e=i(e),r(e)}return o.format=function(e,t){return r.clear(),t=i(t),n.format(t,e)},o.locale=function(i){return n=xM(i,e,t),r=aM(n.format.bind(n),{toKey:e=>"object"==typeof e?e.getTime():e}),this},o.qtype=function(e){return void 0!==e&&(t=e,r.clear()),t},o}function SM(e,t){if(e&&e.qNumFormat&&-1!==["D","T","TS","IV"].indexOf(e.qNumFormat.qType))return wM(e.qNumFormat.qFmt,e.qNumFormat.qType,t);let n="#",r=t&&void 0!==t.qThousandSep?t.qThousandSep:",",i=t&&void 0!==t.qDecimalSep?t.qDecimalSep:".",o="U",a=e&&!!e.qIsAutoFormat;return e&&e.qNumFormat?(n=e.qNumFormat.qFmt||n,r=e.qNumFormat.qThou||r,i=e.qNumFormat.qDec||i,o=e.qNumFormat.qType||o,a=a&&-1===["M"].indexOf(e.qNumFormat.qType)):a=!0,(a||"U"===o)&&(n="#".concat(i,"##"),o="U"),sM(n,r,i,o,t)}function MM(){let e,{meta:t,id:n,key:r,localeInfo:i,fieldExtractor:o,value:a,type:s,sourceField:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const c=a||("dimension"===s?e=>null==e?void 0:e.qElemNo:e=>null==e?void 0:e.qValue),u="dimension"===s?"first":"avg",d=SM(t,i),f="dimension"===s?"first":(e,t)=>d(t),p={id:()=>n,key:()=>r,raw:()=>t,title:()=>t.qFallbackTitle||t.label,type:()=>s,origin:()=>l,items:()=>(e||(e=o(p)),e),min:()=>t.qMin,max:()=>t.qMax,value:c,label:e=>(null==e?void 0:e.qText)||"",reduce:u,reduceLabel:f,formatter:()=>d,tags:()=>t.qTags};return p}function kM(e,t,n,r,i){return(t[e]||[]).map((t,o)=>{const a="".concat(r?"".concat(r,"/"):"").concat(e,"/").concat(o),s={instance:MM(aS({id:"".concat(n?"".concat(n,"/"):"").concat(a),key:a,meta:t},i))};return s.attrDims=kM("qAttrDimInfo",t,n,a,aS({},i,{value:e=>null==e?void 0:e.qElemNo,type:"dimension"})),s.attrExps=kM("qAttrExprInfo",t,n,a,aS({},i,{value:e=>null==e?void 0:e.qNum,type:"measure"})),s.measures=kM("qMeasureInfo",t,n,a,aS({},i,{value:e=>null==e?void 0:e.qValue,type:"measure"})),s})}function EM(){let{key:e,data:t,config:n={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r={fields:[],wrappedFields:[],allFields:[],virtualFields:[]},i=t;if(!i)throw new Error('Missing "data" input');if(!i.qDimensionInfo)throw new Error('The "data" input is not recognized as a hypercube');const o=EM.util,a={cache:r,cube:i,localeInfo:n.localeInfo,fieldExtractor:null,pages:null,hierarchy:()=>null,virtualFields:n.virtualFields},s={key:()=>e,raw:()=>i,field:e=>function(e,t){let{cache:n}=t;if("number"==typeof e)return n.fields[e];const r=n.allFields;if("function"==typeof e){for(let t=0;t<r.length;t++)if(e(r[t]))return r[t];return!1}if("string"==typeof e){for(let t=0;t<r.length;t++)if(r[t].key()===e||r[t].title()===e)return r[t]}else if(e&&-1!==r.indexOf(e))return e;throw Error("Field not found: ".concat(e))}(e,a),fields:()=>r.fields.slice(),extract:e=>a.extractor(e,s,r,o),hierarchy:e=>a.hierarchy(e,s,r,o),_cache:()=>r};"K"===i.qMode||"T"===i.qMode||!i.qMode&&i.qNodesOnDim?(a.extractor=HS,a.hierarchy=VS,a.pages="K"===i.qMode?i.qStackedDataPages:i.qTreeDataPages):"S"===i.qMode?(a.extractor=uS,a.pages=i.qDataPages,a.hierarchy=VS):a.extractor=()=>[],a.fieldExtractor=e=>a.extractor({field:e},s,r,o);const l="S"===i.qMode?e=>e.qElemNumber:void 0,c="S"===i.qMode?e=>e.qNum:void 0;r.wrappedFields.push(...kM("qDimensionInfo",i,e,"",aS({},a,{value:l,type:"dimension"}))),r.wrappedFields.push(...kM("qMeasureInfo",i,e,"",aS({},a,{value:c,type:"measure"}))),r.fields=r.wrappedFields.map(e=>e.instance);const u=e=>{e.forEach(e=>{r.allFields.push(e.instance),u(e.measures),u(e.attrDims),u(e.attrExps)})};return u(r.wrappedFields),(n.virtualFields||[]).forEach(t=>{const n=s.field(t.from),i=MM(Zw({meta:n.raw(),id:"".concat(e,"/").concat(t.key),sourceField:n,fieldExtractor:e=>a.extractor({field:e},s,r,o),key:t.key,type:n.type(),localeInfo:a.localeInfo,value:n.value},t.override||{}));r.virtualFields.push(i)}),r.allFields.push(...r.virtualFields),s}const CM=[["qHyperCube","qHyperCubeDef"],["qTreeData","qTreeDataDef"],["qDimensionInfo","qDimensions"],["qMeasureInfo","qMeasures"],["qAttrDimInfo","qAttributeDimensions"],["qAttrExprInfo","qAttributeExpressions"]],AM=/\/qDimensionInfo(?:\/(\d+))?/,DM=/\/qMeasureInfo\/(\d+)/,qM=/\/qAttrDimInfo\/(\d+)(?:\/(\d+))?/,_M=/\/qAttrExprInfo\/(\d+)/,TM=/\/?qHyperCube/,NM=/\/?qTreeData/,OM=e=>"".concat(e.substr(0,e.indexOf("/qHyperCubeDef")+14)),IM=e=>"".concat(e.substr(0,e.indexOf("/qTreeDataDef")+13));function LM(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;const r=t.byCells,i=t.primarySource,o=[],a={},s=e.isActive();let l=!1;if(e.brushes().forEach(e=>{const t=function(e,t){let n=e,r=-1,i=-1,o="",a=e=>e;TM.test(e)?(o="".concat(n.substr(0,n.indexOf("qHyperCube")+10)),a=OM):NM.test(e)&&(o="".concat(n.substr(0,n.indexOf("qTreeData")+9)),a=IM);let s=!0;if(AM.test(e)&&(r=+AM.exec(e)[1]),DM.test(e)&&(i=+DM.exec(e)[1]),qM.test(e)){i=-1,r=0;const e=+qM.exec(n)[2];isNaN(e)||(r=e,n=n.replace(/\/\d+$/,"")),s=!1}if(_M.test(e)){const e=i;if(t){i=0;const a=AS(o,t);i+=(a.qMeasureInfo||[]).length,r>-1?(i=a.qDimensionInfo.slice(0,r).reduce((e,t)=>e+t.qAttrExprInfo.length,i),r=-1):(i=a.qDimensionInfo.reduce((e,t)=>e+t.qAttrExprInfo.length,i),i=a.qMeasureInfo.slice(0,e).reduce((e,t)=>e+t.qAttrExprInfo.length,i)),i+=+_M.exec(n)[1]}else r>-1?(r=-1,i=+_M.exec(n)[1]):i+=+_M.exec(n)[1]+1}return CM.forEach(e=>{let[t,r]=e;n=n.replace(t,r)}),s&&(n=a(n)),n&&"/"!==n[0]&&(n="/".concat(n)),{measureIdx:i,dimensionIdx:r,path:n}}(e.id,n);if("range"===e.type&&t.measureIdx>-1&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.multiRangeSelectTreeDataValues||(a.multiRangeSelectTreeDataValues={path:t.path,ranges:[]}),n.forEach(e=>a.multiRangeSelectTreeDataValues.ranges.push({qMeasureIx:t.measureIdx,qDimensionIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})))}else{if("range"===e.type&&t.measureIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.rangeSelectHyperCubeValues||(a.rangeSelectHyperCubeValues={path:t.path,ranges:[]}),n.forEach(e=>a.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:t.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})))}if("range"===e.type&&t.dimensionIdx>-1){const n=e.brush.ranges();n.length&&(l=!0,a.selectHyperCubeContinuousRange||(a.selectHyperCubeContinuousRange={path:t.path,ranges:[]}),n.forEach(e=>a.selectHyperCubeContinuousRange.ranges.push({qDimIx:t.dimensionIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!1}})))}if("value"===e.type&&t.dimensionIdx>-1)if(r)if(n&&n.qHyperCube&&("P"===n.qHyperCube.qMode||"T"===n.qHyperCube.qMode||"K"===n.qHyperCube.qMode)){const r=n.qHyperCube,o=r.qNoOfLeftDims,s=r.qEffectiveInterColumnSortOrder.indexOf(t.dimensionIdx);if(a.selectPivotCells||(a.selectPivotCells={path:t.path,cells:[]}),e.id===i||!i){const n=e.brush.values().map(e=>+e).filter(e=>!isNaN(e));(0===o||s>=o)&&o>-1?n.forEach(e=>{a.selectPivotCells.cells.push({qType:"T",qCol:e,qRow:s-o})}):n.forEach(e=>{a.selectPivotCells.cells.push({qType:"L",qCol:t.dimensionIdx,qRow:e})}),l=!!a.selectPivotCells.cells.length}}else a.selectHyperCubeCells||(a.selectHyperCubeCells={path:t.path,cols:[]}),a.selectHyperCubeCells.cols.push(t.dimensionIdx),e.id!==i&&(i||a.selectHyperCubeCells.values)||(a.selectHyperCubeCells.values=e.brush.values().map(e=>+e).filter(e=>!isNaN(e)),l=!!a.selectHyperCubeCells.values.length);else{const n=e.brush.values().map(e=>+e).filter(e=>!isNaN(e));l=!!n.length,o.push({params:[t.path,t.dimensionIdx,n,!1],method:"selectHyperCubeValues"})}}}),!l&&s)return[{method:"resetMadeSelections",params:[]}];var c;a.rangeSelectHyperCubeValues&&o.push({method:"rangeSelectHyperCubeValues",params:[a.rangeSelectHyperCubeValues.path,a.rangeSelectHyperCubeValues.ranges,[],null===(c=t.orMode)||void 0===c||c]});return a.selectHyperCubeContinuousRange&&o.push({method:"selectHyperCubeContinuousRange",params:[a.selectHyperCubeContinuousRange.path,a.selectHyperCubeContinuousRange.ranges]}),a.selectHyperCubeCells&&o.push({method:"selectHyperCubeCells",params:[a.selectHyperCubeCells.path,a.selectHyperCubeCells.values,a.selectHyperCubeCells.cols]}),a.selectPivotCells&&o.push({method:"selectPivotCells",params:[a.selectPivotCells.path,a.selectPivotCells.cells]}),a.multiRangeSelectTreeDataValues&&o.push({method:"multiRangeSelectTreeDataValues",params:[a.multiRangeSelectTreeDataValues.path,a.multiRangeSelectTreeDataValues.ranges]}),o}function PM(e){EM.util=e.data("matrix").util,e.data("q",EM),e.formatter("q-number",sM),e.formatter("q-time",wM)}PM.qBrushHelper=LM,PM.selections=LM;const RM={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function zM(e){return RM[e]||e}function FM(e){return function(t,n,r){let i,o,a,s,l=[],c=!0;function u(){"function"==typeof i.enable&&(i.enable=i.enable.bind(o)()),i.enable&&(i.gestures.forEach(t=>{t.options=t.options||{},void 0===t.options.enable&&(t.options.enable=!0),"function"==typeof t.options.enable&&(t.options.enable=t.options.enable.bind(o));const n=zM(t.type);e&&e[n]&&(t.options.event=t.options.event||t.type.toLowerCase(),a=a||new e.Manager(r),a.add(new e[n](t.options)),Object.keys(t.events).forEach(e=>{t.events[e]=t.events[e].bind(o),a.on(e,t.events[e])}),l.push(t))}),i.gestures.forEach(t=>{const n=zM(t.type);e&&e[n]&&(t.recognizeWith&&a.get(t.options.event).recognizeWith(t.recognizeWith.split(" ").filter(e=>""!==e)),t.requireFailure&&a.get(t.options.event).requireFailure(t.requireFailure.split(" ").filter(e=>""!==e)))}))}function d(){l.forEach(e=>{Object.keys(e.events).forEach(t=>{a.off(t,e.events[t])}),a.remove(e.options.event)}),l=[]}return{get key(){return s},set(e){!function(e){s=e.key,i=e,o={chart:t,mediator:n,settings:i},i.gestures=i.gestures||[],void 0===i.enable&&(i.enable=!0)}(e),d(),c&&u()},off(){c=!1,d()},on(){c=!0,0===l.length&&u()},destroy(){d(),a&&a.destroy(),a=null,o=null,i=null}}}}function jM(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function VM(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var HM,BM={exports:{}};
/*! Hammer.JS - v2.0.7 - 2016-04-22
   * http://hammerjs.github.io/
   *
   * Copyright (c) 2016 Jorik Tangelder;
   * Licensed under the MIT license */var $M,WM,UM=(HM||(HM=1,function(e){!function(t,n,r,i){var o,a=["","webkit","Moz","MS","ms","o"],s=n.createElement("div"),l=Math.round,c=Math.abs,u=Date.now;function d(e,t,n){return setTimeout(v(e,n),t)}function f(e,t,n){return!!Array.isArray(e)&&(p(e,n[t],n),!0)}function p(e,t,n){var r;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==i)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function h(e,n,r){var i="DEPRECATED METHOD: "+n+"\n"+r+" AT \n";return function(){var n=new Error("get-stack-trace"),r=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=t.console&&(t.console.warn||t.console.log);return o&&o.call(t.console,i,r),e.apply(this,arguments)}}o="function"!=typeof Object.assign?function(e){if(e===i||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!==i&&null!==r)for(var o in r)r.hasOwnProperty(o)&&(t[o]=r[o])}return t}:Object.assign;var m=h(function(e,t,n){for(var r=Object.keys(t),o=0;o<r.length;)(!n||n&&e[r[o]]===i)&&(e[r[o]]=t[r[o]]),o++;return e},"extend","Use `assign`."),g=h(function(e,t){return m(e,t,!0)},"merge","Use `assign`.");function y(e,t,n){var r,i=t.prototype;(r=e.prototype=Object.create(i)).constructor=e,r._super=i,n&&o(r,n)}function v(e,t){return function(){return e.apply(t,arguments)}}function b(e,t){return"function"==typeof e?e.apply(t&&t[0]||i,t):e}function x(e,t){return e===i?t:e}function w(e,t,n){p(E(t),function(t){e.addEventListener(t,n,!1)})}function S(e,t,n){p(E(t),function(t){e.removeEventListener(t,n,!1)})}function M(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function k(e,t){return e.indexOf(t)>-1}function E(e){return e.trim().split(/\s+/g)}function C(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}function A(e){return Array.prototype.slice.call(e,0)}function D(e,t,n){for(var r=[],i=[],o=0;o<e.length;){var a=e[o][t];C(i,a)<0&&r.push(e[o]),i[o]=a,o++}return r=r.sort(function(e,n){return e[t]>n[t]}),r}function q(e,t){for(var n,r,o=t[0].toUpperCase()+t.slice(1),s=0;s<a.length;){if((r=(n=a[s])?n+o:t)in e)return r;s++}return i}var _=1;function T(e){var n=e.ownerDocument||e;return n.defaultView||n.parentWindow||t}var N="ontouchstart"in t,O=q(t,"PointerEvent")!==i,I=N&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),L="touch",P="mouse",R=24,z=["x","y"],F=["clientX","clientY"];function j(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){b(e.options.enable,[e])&&n.handler(t)},this.init()}function V(e,t,n){var r=n.pointers.length,o=n.changedPointers.length,a=1&t&&r-o===0,s=12&t&&r-o===0;n.isFirst=!!a,n.isFinal=!!s,a&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,r=t.pointers,o=r.length;n.firstInput||(n.firstInput=H(t)),o>1&&!n.firstMultiple?n.firstMultiple=H(t):1===o&&(n.firstMultiple=!1);var a=n.firstInput,s=n.firstMultiple,l=s?s.center:a.center,d=t.center=B(r);t.timeStamp=u(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=Y(l,d),t.distance=U(l,d),function(e,t){var n=t.center,r=e.offsetDelta||{},i=e.prevDelta||{},o=e.prevInput||{};1!==t.eventType&&4!==o.eventType||(i=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=i.x+(n.x-r.x),t.deltaY=i.y+(n.y-r.y)}(n,t),t.offsetDirection=W(t.deltaX,t.deltaY);var f=$(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=f.x,t.overallVelocityY=f.y,t.overallVelocity=c(f.x)>c(f.y)?f.x:f.y,t.scale=s?function(e,t){return U(t[0],t[1],F)/U(e[0],e[1],F)}(s.pointers,r):1,t.rotation=s?function(e,t){return Y(t[1],t[0],F)+Y(e[1],e[0],F)}(s.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,r,o,a,s=e.lastInterval||t,l=t.timeStamp-s.timeStamp;if(8!=t.eventType&&(l>25||s.velocity===i)){var u=t.deltaX-s.deltaX,d=t.deltaY-s.deltaY,f=$(l,u,d);r=f.x,o=f.y,n=c(f.x)>c(f.y)?f.x:f.y,a=W(u,d),e.lastInterval=t}else n=s.velocity,r=s.velocityX,o=s.velocityY,a=s.direction;t.velocity=n,t.velocityX=r,t.velocityY=o,t.direction=a}(n,t);var p=e.element;M(t.srcEvent.target,p)&&(p=t.srcEvent.target),t.target=p}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function H(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:l(e.pointers[n].clientX),clientY:l(e.pointers[n].clientY)},n++;return{timeStamp:u(),pointers:t,center:B(t),deltaX:e.deltaX,deltaY:e.deltaY}}function B(e){var t=e.length;if(1===t)return{x:l(e[0].clientX),y:l(e[0].clientY)};for(var n=0,r=0,i=0;i<t;)n+=e[i].clientX,r+=e[i].clientY,i++;return{x:l(n/t),y:l(r/t)}}function $(e,t,n){return{x:t/e||0,y:n/e||0}}function W(e,t){return e===t?1:c(e)>=c(t)?e<0?2:4:t<0?8:16}function U(e,t,n){n||(n=z);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return Math.sqrt(r*r+i*i)}function Y(e,t,n){n||(n=z);var r=t[n[0]]-e[n[0]],i=t[n[1]]-e[n[1]];return 180*Math.atan2(i,r)/Math.PI}j.prototype={handler:function(){},init:function(){this.evEl&&w(this.element,this.evEl,this.domHandler),this.evTarget&&w(this.target,this.evTarget,this.domHandler),this.evWin&&w(T(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&S(this.element,this.evEl,this.domHandler),this.evTarget&&S(this.target,this.evTarget,this.domHandler),this.evWin&&S(T(this.element),this.evWin,this.domHandler)}};var X={mousedown:1,mousemove:2,mouseup:4},G="mousedown",K="mousemove mouseup";function Z(){this.evEl=G,this.evWin=K,this.pressed=!1,j.apply(this,arguments)}y(Z,j,{handler:function(e){var t=X[e.type];1&t&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:P,srcEvent:e}))}});var J={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},Q={2:L,3:"pen",4:P,5:"kinect"},ee="pointerdown",te="pointermove pointerup pointercancel";function ne(){this.evEl=ee,this.evWin=te,j.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}t.MSPointerEvent&&!t.PointerEvent&&(ee="MSPointerDown",te="MSPointerMove MSPointerUp MSPointerCancel"),y(ne,j,{handler:function(e){var t=this.store,n=!1,r=e.type.toLowerCase().replace("ms",""),i=J[r],o=Q[e.pointerType]||e.pointerType,a=o==L,s=C(t,e.pointerId,"pointerId");1&i&&(0===e.button||a)?s<0&&(t.push(e),s=t.length-1):12&i&&(n=!0),s<0||(t[s]=e,this.callback(this.manager,i,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(s,1))}});var re={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function ie(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,j.apply(this,arguments)}function oe(e,t){var n=A(e.touches),r=A(e.changedTouches);return 12&t&&(n=D(n.concat(r),"identifier")),[n,r]}y(ie,j,{handler:function(e){var t=re[e.type];if(1===t&&(this.started=!0),this.started){var n=oe.call(this,e,t);12&t&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:L,srcEvent:e})}}});var ae={touchstart:1,touchmove:2,touchend:4,touchcancel:8},se="touchstart touchmove touchend touchcancel";function le(){this.evTarget=se,this.targetIds={},j.apply(this,arguments)}function ce(e,t){var n=A(e.touches),r=this.targetIds;if(3&t&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=A(e.changedTouches),s=[],l=this.target;if(o=n.filter(function(e){return M(e.target,l)}),1===t)for(i=0;i<o.length;)r[o[i].identifier]=!0,i++;for(i=0;i<a.length;)r[a[i].identifier]&&s.push(a[i]),12&t&&delete r[a[i].identifier],i++;return s.length?[D(o.concat(s),"identifier"),s]:void 0}function ue(){j.apply(this,arguments);var e=v(this.handler,this);this.touch=new le(this.manager,e),this.mouse=new Z(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function de(e,t){1&e?(this.primaryTouch=t.changedPointers[0].identifier,fe.call(this,t)):12&e&&fe.call(this,t)}function fe(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY};this.lastTouches.push(n);var r=this.lastTouches;setTimeout(function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)},2500)}}function pe(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],o=Math.abs(t-i.x),a=Math.abs(n-i.y);if(o<=25&&a<=25)return!0}return!1}y(le,j,{handler:function(e){var t=ae[e.type],n=ce.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:L,srcEvent:e})}}),y(ue,j,{handler:function(e,t,n){var r=n.pointerType==L,i=n.pointerType==P;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)de.call(this,t,n);else if(i&&pe.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var he=q(s.style,"touchAction"),me=he!==i,ge="compute",ye="auto",ve="manipulation",be="none",xe="pan-x",we="pan-y",Se=function(){if(!me)return!1;var e={},n=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(r){e[r]=!n||t.CSS.supports("touch-action",r)}),e}();function Me(e,t){this.manager=e,this.set(t)}Me.prototype={set:function(e){e==ge&&(e=this.compute()),me&&this.manager.element.style&&Se[e]&&(this.manager.element.style[he]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return p(this.manager.recognizers,function(t){b(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),function(e){if(k(e,be))return be;var t=k(e,xe),n=k(e,we);return t&&n?be:t||n?t?xe:we:k(e,ve)?ve:ye}(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var r=this.actions,i=k(r,be)&&!Se[be],o=k(r,we)&&!Se[we],a=k(r,xe)&&!Se[xe];if(i){var s=1===e.pointers.length,l=e.distance<2,c=e.deltaTime<250;if(s&&l&&c)return}if(!a||!o)return i||o&&6&n||a&&n&R?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};var ke=32;function Ee(e){this.options=o({},this.defaults,e||{}),this.id=_++,this.manager=null,this.options.enable=x(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function Ce(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}function Ae(e){return 16==e?"down":8==e?"up":2==e?"left":4==e?"right":""}function De(e,t){var n=t.manager;return n?n.get(e):e}function qe(){Ee.apply(this,arguments)}function _e(){qe.apply(this,arguments),this.pX=null,this.pY=null}function Te(){qe.apply(this,arguments)}function Ne(){Ee.apply(this,arguments),this._timer=null,this._input=null}function Oe(){qe.apply(this,arguments)}function Ie(){qe.apply(this,arguments)}function Le(){Ee.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Pe(e,t){return(t=t||{}).recognizers=x(t.recognizers,Pe.defaults.preset),new Re(e,t)}function Re(e,t){var n;this.options=o({},Pe.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new((n=this).options.inputClass||(O?ne:I?le:N?ue:Z))(n,V),this.touchAction=new Me(this,this.options.touchAction),ze(this,!0),p(this.options.recognizers,function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}function ze(e,t){var n,r=e.element;r.style&&(p(e.options.cssProps,function(i,o){n=q(r.style,o),t?(e.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=e.oldCssProps[n]||""}),t||(e.oldCssProps={}))}Ee.prototype={defaults:{},set:function(e){return o(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(f(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=De(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return f(e,"dropRecognizeWith",this)||(e=De(e,this),delete this.simultaneous[e.id]),this},requireFailure:function(e){if(f(e,"requireFailure",this))return this;var t=this.requireFail;return-1===C(t,e=De(e,this))&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(f(e,"dropRequireFailure",this))return this;e=De(e,this);var t=C(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<8&&r(t.options.event+Ce(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=8&&r(t.options.event+Ce(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=ke},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},recognize:function(e){var t=o({},e);if(!b(this.options.enable,[this,t]))return this.reset(),void(this.state=ke);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},process:function(e){},getTouchAction:function(){},reset:function(){}},y(qe,Ee,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,n=e.eventType,r=6&t,i=this.attrTest(e);return r&&(8&n||!i)?16|t:r||i?4&n?8|t:2&t?4|t:2:ke}}),y(_e,qe,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var e=this.options.direction,t=[];return 6&e&&t.push(we),e&R&&t.push(xe),t},directionTest:function(e){var t=this.options,n=!0,r=e.distance,i=e.direction,o=e.deltaX,a=e.deltaY;return i&t.direction||(6&t.direction?(i=0===o?1:o<0?2:4,n=o!=this.pX,r=Math.abs(e.deltaX)):(i=0===a?1:a<0?8:16,n=a!=this.pY,r=Math.abs(e.deltaY))),e.direction=i,n&&r>t.threshold&&i&t.direction},attrTest:function(e){return qe.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=Ae(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),y(Te,qe,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[be]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),y(Ne,Ee,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ye]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance<t.threshold,i=e.deltaTime>t.time;if(this._input=e,!r||!n||12&e.eventType&&!i)this.reset();else if(1&e.eventType)this.reset(),this._timer=d(function(){this.state=8,this.tryEmit()},t.time,this);else if(4&e.eventType)return 8;return ke},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&4&e.eventType?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=u(),this.manager.emit(this.options.event,this._input)))}}),y(Oe,qe,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[be]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),y(Ie,qe,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return _e.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return 30&n?t=e.overallVelocity:6&n?t=e.overallVelocityX:n&R&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&c(t)>this.options.velocity&&4&e.eventType},emit:function(e){var t=Ae(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),y(Le,Ee,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ve]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,r=e.distance<t.threshold,i=e.deltaTime<t.time;if(this.reset(),1&e.eventType&&0===this.count)return this.failTimeout();if(r&&i&&n){if(4!=e.eventType)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<t.interval,a=!this.pCenter||U(this.pCenter,e.center)<t.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,a&&o?this.count+=1:this.count=1,this._input=e,0===this.count%t.taps)return this.hasRequireFailures()?(this._timer=d(function(){this.state=8,this.tryEmit()},t.interval,this),2):8}return ke},failTimeout:function(){return this._timer=d(function(){this.state=ke},this.options.interval,this),ke},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Pe.VERSION="2.0.7",Pe.defaults={domEvents:!1,touchAction:ge,enable:!0,inputTarget:null,inputClass:null,preset:[[Oe,{enable:!1}],[Te,{enable:!1},["rotate"]],[Ie,{direction:6}],[_e,{direction:6},["swipe"]],[Le],[Le,{event:"doubletap",taps:2},["tap"]],[Ne]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Re.prototype={set:function(e){return o(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?2:1},recognize:function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var r=this.recognizers,i=t.curRecognizer;(!i||i&&8&i.state)&&(i=t.curRecognizer=null);for(var o=0;o<r.length;)n=r[o],2===t.stopped||i&&n!=i&&!n.canRecognizeWith(i)?n.reset():n.recognize(e),!i&&14&n.state&&(i=t.curRecognizer=n),o++}},get:function(e){if(e instanceof Ee)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event==e)return t[n];return null},add:function(e){if(f(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(f(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,n=C(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(e!==i&&t!==i){var n=this.handlers;return p(E(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this}},off:function(e,t){if(e!==i){var n=this.handlers;return p(E(e),function(e){t?n[e]&&n[e].splice(C(n[e],t),1):delete n[e]}),this}},emit:function(e,t){this.options.domEvents&&function(e,t){var r=n.createEvent("Event");r.initEvent(e,!0,!0),r.gesture=t,t.target.dispatchEvent(r)}(e,t);var r=this.handlers[e]&&this.handlers[e].slice();if(r&&r.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var i=0;i<r.length;)r[i](t),i++}},destroy:function(){this.element&&ze(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},o(Pe,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:ke,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:R,DIRECTION_ALL:30,Manager:Re,Input:j,TouchAction:Me,TouchInput:le,MouseInput:Z,PointerEventInput:ne,TouchMouseInput:ue,SingleTouchInput:ie,Recognizer:Ee,AttrRecognizer:qe,Tap:Le,Pan:_e,Swipe:Ie,Pinch:Te,Rotate:Oe,Press:Ne,on:w,off:S,each:p,merge:g,extend:m,assign:o,inherit:y,bindFn:v,prefixed:q}),(void 0!==t?t:"undefined"!=typeof self?self:{}).Hammer=Pe,e.exports?e.exports=Pe:t.Hammer=Pe}(window,document)}(BM)),BM.exports),YM=jM(UM),XM={exports:{}},GM={};function KM(){if($M)return GM;$M=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),d=Symbol.iterator;var f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},p=Object.assign,h={};function m(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||f}function g(){}function y(e,t,n){this.props=e,this.context=t,this.refs=h,this.updater=n||f}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},g.prototype=m.prototype;var v=y.prototype=new g;v.constructor=y,p(v,m.prototype),v.isPureReactComponent=!0;var b=Array.isArray,x=Object.prototype.hasOwnProperty,w={current:null},S={key:!0,ref:!0,__self:!0,__source:!0};function M(t,n,r){var i,o={},a=null,s=null;if(null!=n)for(i in void 0!==n.ref&&(s=n.ref),void 0!==n.key&&(a=""+n.key),n)x.call(n,i)&&!S.hasOwnProperty(i)&&(o[i]=n[i]);var l=arguments.length-2;if(1===l)o.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}if(t&&t.defaultProps)for(i in l=t.defaultProps)void 0===o[i]&&(o[i]=l[i]);return{$$typeof:e,type:t,key:a,ref:s,props:o,_owner:w.current}}function k(t){return"object"==typeof t&&null!==t&&t.$$typeof===e}var E=/\/+/g;function C(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function A(n,r,i,o,a){var s=typeof n;"undefined"!==s&&"boolean"!==s||(n=null);var l=!1;if(null===n)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(n.$$typeof){case e:case t:l=!0}}if(l)return a=a(l=n),n=""===o?"."+C(l,0):o,b(a)?(i="",null!=n&&(i=n.replace(E,"$&/")+"/"),A(a,r,i,"",function(e){return e})):null!=a&&(k(a)&&(a=function(t,n){return{$$typeof:e,type:t.type,key:n,ref:t.ref,props:t.props,_owner:t._owner}}(a,i+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(E,"$&/")+"/")+n)),r.push(a)),1;if(l=0,o=""===o?".":o+":",b(n))for(var c=0;c<n.length;c++){var u=o+C(s=n[c],c);l+=A(s,r,i,u,a)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=d&&e[d]||e["@@iterator"])?e:null}(n),"function"==typeof u)for(n=u.call(n),c=0;!(s=n.next()).done;)l+=A(s=s.value,r,i,u=o+C(s,c++),a);else if("object"===s)throw r=String(n),Error("Objects are not valid as a React child (found: "+("[object Object]"===r?"object with keys {"+Object.keys(n).join(", ")+"}":r)+"). If you meant to render a collection of children, use an array instead.");return l}function D(e,t,n){if(null==e)return e;var r=[],i=0;return A(e,r,"","",function(e){return t.call(n,e,i++)}),r}function q(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var _={current:null},T={transition:null},N={ReactCurrentDispatcher:_,ReactCurrentBatchConfig:T,ReactCurrentOwner:w};function O(){throw Error("act(...) is not supported in production builds of React.")}return GM.Children={map:D,forEach:function(e,t,n){D(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return D(e,function(){t++}),t},toArray:function(e){return D(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},GM.Component=m,GM.Fragment=n,GM.Profiler=i,GM.PureComponent=y,GM.StrictMode=r,GM.Suspense=l,GM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=N,GM.act=O,GM.cloneElement=function(t,n,r){if(null==t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var i=p({},t.props),o=t.key,a=t.ref,s=t._owner;if(null!=n){if(void 0!==n.ref&&(a=n.ref,s=w.current),void 0!==n.key&&(o=""+n.key),t.type&&t.type.defaultProps)var l=t.type.defaultProps;for(c in n)x.call(n,c)&&!S.hasOwnProperty(c)&&(i[c]=void 0===n[c]&&void 0!==l?l[c]:n[c])}var c=arguments.length-2;if(1===c)i.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];i.children=l}return{$$typeof:e,type:t.type,key:o,ref:a,props:i,_owner:s}},GM.createContext=function(e){return(e={$$typeof:a,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:o,_context:e},e.Consumer=e},GM.createElement=M,GM.createFactory=function(e){var t=M.bind(null,e);return t.type=e,t},GM.createRef=function(){return{current:null}},GM.forwardRef=function(e){return{$$typeof:s,render:e}},GM.isValidElement=k,GM.lazy=function(e){return{$$typeof:u,_payload:{_status:-1,_result:e},_init:q}},GM.memo=function(e,t){return{$$typeof:c,type:e,compare:void 0===t?null:t}},GM.startTransition=function(e){var t=T.transition;T.transition={};try{e()}finally{T.transition=t}},GM.unstable_act=O,GM.useCallback=function(e,t){return _.current.useCallback(e,t)},GM.useContext=function(e){return _.current.useContext(e)},GM.useDebugValue=function(){},GM.useDeferredValue=function(e){return _.current.useDeferredValue(e)},GM.useEffect=function(e,t){return _.current.useEffect(e,t)},GM.useId=function(){return _.current.useId()},GM.useImperativeHandle=function(e,t,n){return _.current.useImperativeHandle(e,t,n)},GM.useInsertionEffect=function(e,t){return _.current.useInsertionEffect(e,t)},GM.useLayoutEffect=function(e,t){return _.current.useLayoutEffect(e,t)},GM.useMemo=function(e,t){return _.current.useMemo(e,t)},GM.useReducer=function(e,t,n){return _.current.useReducer(e,t,n)},GM.useRef=function(e){return _.current.useRef(e)},GM.useState=function(e){return _.current.useState(e)},GM.useSyncExternalStore=function(e,t,n){return _.current.useSyncExternalStore(e,t,n)},GM.useTransition=function(){return _.current.useTransition()},GM.version="18.3.1",GM}function ZM(){return WM||(WM=1,XM.exports=KM()),XM.exports}var JM=ZM(),QM=jM(JM),ek=t({__proto__:null,default:QM},[JM]);const tk={black:"#000",white:"#fff"},nk="#e57373",rk="#ef5350",ik="#f44336",ok="#d32f2f",ak="#c62828",sk="#f3e5f5",lk="#ce93d8",ck="#ba68c8",uk="#ab47bc",dk="#9c27b0",fk="#7b1fa2",pk="#e3f2fd",hk="#90caf9",mk="#42a5f5",gk="#1976d2",yk="#1565c0",vk="#4fc3f7",bk="#29b6f6",xk="#03a9f4",wk="#0288d1",Sk="#01579b",Mk="#81c784",kk="#66bb6a",Ek="#4caf50",Ck="#388e3c",Ak="#2e7d32",Dk="#1b5e20",qk="#ffb74d",_k="#ffa726",Tk="#ff9800",Nk="#f57c00",Ok="#e65100",Ik={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function Lk(e){let t="https://mui.com/production-error/?code="+e;for(let e=1;e<arguments.length;e+=1)t+="&args[]="+encodeURIComponent(arguments[e]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}var Pk=Object.freeze({__proto__:null,default:Lk}),Rk="$$material";function zk(){return zk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zk.apply(null,arguments)}function Fk(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}var jk=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),Vk="-ms-",Hk="-moz-",Bk="-webkit-",$k="comm",Wk="rule",Uk="decl",Yk="@keyframes",Xk=Math.abs,Gk=String.fromCharCode,Kk=Object.assign;function Zk(e){return e.trim()}function Jk(e,t,n){return e.replace(t,n)}function Qk(e,t){return e.indexOf(t)}function eE(e,t){return 0|e.charCodeAt(t)}function tE(e,t,n){return e.slice(t,n)}function nE(e){return e.length}function rE(e){return e.length}function iE(e,t){return t.push(e),e}var oE=1,aE=1,sE=0,lE=0,cE=0,uE="";function dE(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:oE,column:aE,length:a,return:""}}function fE(e,t){return Kk(dE("",null,null,"",null,null,0),e,{length:-e.length},t)}function pE(){return cE=lE>0?eE(uE,--lE):0,aE--,10===cE&&(aE=1,oE--),cE}function hE(){return cE=lE<sE?eE(uE,lE++):0,aE++,10===cE&&(aE=1,oE++),cE}function mE(){return eE(uE,lE)}function gE(){return lE}function yE(e,t){return tE(uE,e,t)}function vE(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function bE(e){return oE=aE=1,sE=nE(uE=e),lE=0,[]}function xE(e){return uE="",e}function wE(e){return Zk(yE(lE-1,kE(91===e?e+2:40===e?e+1:e)))}function SE(e){for(;(cE=mE())&&cE<33;)hE();return vE(e)>2||vE(cE)>3?"":" "}function ME(e,t){for(;--t&&hE()&&!(cE<48||cE>102||cE>57&&cE<65||cE>70&&cE<97););return yE(e,gE()+(t<6&&32==mE()&&32==hE()))}function kE(e){for(;hE();)switch(cE){case e:return lE;case 34:case 39:34!==e&&39!==e&&kE(cE);break;case 40:41===e&&kE(e);break;case 92:hE()}return lE}function EE(e,t){for(;hE()&&e+cE!==57&&(e+cE!==84||47!==mE()););return"/*"+yE(t,lE-1)+"*"+Gk(47===e?e:hE())}function CE(e){for(;!vE(mE());)hE();return yE(e,lE)}function AE(e){return xE(DE("",null,null,null,[""],e=bE(e),0,[0],e))}function DE(e,t,n,r,i,o,a,s,l){for(var c=0,u=0,d=a,f=0,p=0,h=0,m=1,g=1,y=1,v=0,b="",x=i,w=o,S=r,M=b;g;)switch(h=v,v=hE()){case 40:if(108!=h&&58==eE(M,d-1)){-1!=Qk(M+=Jk(wE(v),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:M+=wE(v);break;case 9:case 10:case 13:case 32:M+=SE(h);break;case 92:M+=ME(gE()-1,7);continue;case 47:switch(mE()){case 42:case 47:iE(_E(EE(hE(),gE()),t,n),l);break;default:M+="/"}break;case 123*m:s[c++]=nE(M)*y;case 125*m:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:-1==y&&(M=Jk(M,/\f/g,"")),p>0&&nE(M)-d&&iE(p>32?TE(M+";",r,n,d-1):TE(Jk(M," ","")+";",r,n,d-2),l);break;case 59:M+=";";default:if(iE(S=qE(M,t,n,c,u,i,s,b,x=[],w=[],d),o),123===v)if(0===u)DE(M,t,S,S,x,o,d,s,w);else switch(99===f&&110===eE(M,3)?100:f){case 100:case 108:case 109:case 115:DE(e,S,S,r&&iE(qE(e,S,S,0,0,i,s,b,i,x=[],d),w),i,w,d,s,r?x:w);break;default:DE(M,S,S,S,[""],w,0,s,w)}}c=u=p=0,m=y=1,b=M="",d=a;break;case 58:d=1+nE(M),p=h;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==pE())continue;switch(M+=Gk(v),v*m){case 38:y=u>0?1:(M+="\f",-1);break;case 44:s[c++]=(nE(M)-1)*y,y=1;break;case 64:45===mE()&&(M+=wE(hE())),f=mE(),u=d=nE(b=M+=CE(gE())),v++;break;case 45:45===h&&2==nE(M)&&(m=0)}}return o}function qE(e,t,n,r,i,o,a,s,l,c,u){for(var d=i-1,f=0===i?o:[""],p=rE(f),h=0,m=0,g=0;h<r;++h)for(var y=0,v=tE(e,d+1,d=Xk(m=a[h])),b=e;y<p;++y)(b=Zk(m>0?f[y]+" "+v:Jk(v,/&\f/g,f[y])))&&(l[g++]=b);return dE(e,t,n,0===i?Wk:s,l,c,u)}function _E(e,t,n){return dE(e,t,n,$k,Gk(cE),tE(e,2,-2),0)}function TE(e,t,n,r){return dE(e,t,n,Uk,tE(e,0,r),tE(e,r+1,-1),r)}function NE(e,t){for(var n="",r=rE(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function OE(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Uk:return e.return=e.return||e.value;case $k:return"";case Yk:return e.return=e.value+"{"+NE(e.children,r)+"}";case Wk:e.value=e.props.join(",")}return nE(n=NE(e.children,r))?e.return=e.value+"{"+n+"}":""}function IE(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var LE=function(e,t,n){for(var r=0,i=0;r=i,i=mE(),38===r&&12===i&&(t[n]=1),!vE(i);)hE();return yE(e,lE)},PE=function(e,t){return xE(function(e,t){var n=-1,r=44;do{switch(vE(r)){case 0:38===r&&12===mE()&&(t[n]=1),e[n]+=LE(lE-1,t,n);break;case 2:e[n]+=wE(r);break;case 4:if(44===r){e[++n]=58===mE()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Gk(r)}}while(r=hE());return e}(bE(e),t))},RE=new WeakMap,zE=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||RE.get(n))&&!r){RE.set(e,!0);for(var i=[],o=PE(t,i),a=n.props,s=0,l=0;s<o.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=i[s]?o[s].replace(/&\f/g,a[c]):a[c]+" "+o[s]}}},FE=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function jE(e,t){switch(function(e,t){return 45^eE(e,0)?(((t<<2^eE(e,0))<<2^eE(e,1))<<2^eE(e,2))<<2^eE(e,3):0}(e,t)){case 5103:return Bk+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Bk+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Bk+e+Hk+e+Vk+e+e;case 6828:case 4268:return Bk+e+Vk+e+e;case 6165:return Bk+e+Vk+"flex-"+e+e;case 5187:return Bk+e+Jk(e,/(\w+).+(:[^]+)/,Bk+"box-$1$2"+Vk+"flex-$1$2")+e;case 5443:return Bk+e+Vk+"flex-item-"+Jk(e,/flex-|-self/,"")+e;case 4675:return Bk+e+Vk+"flex-line-pack"+Jk(e,/align-content|flex-|-self/,"")+e;case 5548:return Bk+e+Vk+Jk(e,"shrink","negative")+e;case 5292:return Bk+e+Vk+Jk(e,"basis","preferred-size")+e;case 6060:return Bk+"box-"+Jk(e,"-grow","")+Bk+e+Vk+Jk(e,"grow","positive")+e;case 4554:return Bk+Jk(e,/([^-])(transform)/g,"$1"+Bk+"$2")+e;case 6187:return Jk(Jk(Jk(e,/(zoom-|grab)/,Bk+"$1"),/(image-set)/,Bk+"$1"),e,"")+e;case 5495:case 3959:return Jk(e,/(image-set\([^]*)/,Bk+"$1$`$1");case 4968:return Jk(Jk(e,/(.+:)(flex-)?(.*)/,Bk+"box-pack:$3"+Vk+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Bk+e+e;case 4095:case 3583:case 4068:case 2532:return Jk(e,/(.+)-inline(.+)/,Bk+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(nE(e)-1-t>6)switch(eE(e,t+1)){case 109:if(45!==eE(e,t+4))break;case 102:return Jk(e,/(.+:)(.+)-([^]+)/,"$1"+Bk+"$2-$3$1"+Hk+(108==eE(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Qk(e,"stretch")?jE(Jk(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==eE(e,t+1))break;case 6444:switch(eE(e,nE(e)-3-(~Qk(e,"!important")&&10))){case 107:return Jk(e,":",":"+Bk)+e;case 101:return Jk(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Bk+(45===eE(e,14)?"inline-":"")+"box$3$1"+Bk+"$2$3$1"+Vk+"$2box$3")+e}break;case 5936:switch(eE(e,t+11)){case 114:return Bk+e+Vk+Jk(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Bk+e+Vk+Jk(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Bk+e+Vk+Jk(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Bk+e+Vk+e+e}return e}var VE,HE,BE,$E,WE=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Uk:e.return=jE(e.value,e.length);break;case Yk:return NE([fE(e,{value:Jk(e.value,"@","@"+Bk)})],r);case Wk:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return NE([fE(e,{props:[Jk(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return NE([fE(e,{props:[Jk(t,/:(plac\w+)/,":"+Bk+"input-$1")]}),fE(e,{props:[Jk(t,/:(plac\w+)/,":-moz-$1")]}),fE(e,{props:[Jk(t,/:(plac\w+)/,Vk+"input-$1")]})],r)}return""})}}],UE=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,i,o=e.stylisPlugins||WE,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)});var l,c,u=[OE,(c=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&c(e)})],d=function(e){var t=rE(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}([zE,FE].concat(o,u));i=function(e,t,n,r){l=n,function(e){NE(AE(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new jk({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:i};return f.sheet.hydrate(s),f},YE={exports:{}},XE={};function GE(){return HE||(HE=1,YE.exports=function(){if(VE)return XE;VE=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:switch(e=e.type){case l:case c:case r:case o:case i:case d:return e;default:switch(e=e&&e.$$typeof){case s:case u:case h:case p:case a:return e;default:return f}}case n:return f}}}function x(e){return b(e)===c}return XE.AsyncMode=l,XE.ConcurrentMode=c,XE.ContextConsumer=s,XE.ContextProvider=a,XE.Element=t,XE.ForwardRef=u,XE.Fragment=r,XE.Lazy=h,XE.Memo=p,XE.Portal=n,XE.Profiler=o,XE.StrictMode=i,XE.Suspense=d,XE.isAsyncMode=function(e){return x(e)||b(e)===l},XE.isConcurrentMode=x,XE.isContextConsumer=function(e){return b(e)===s},XE.isContextProvider=function(e){return b(e)===a},XE.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},XE.isForwardRef=function(e){return b(e)===u},XE.isFragment=function(e){return b(e)===r},XE.isLazy=function(e){return b(e)===h},XE.isMemo=function(e){return b(e)===p},XE.isPortal=function(e){return b(e)===n},XE.isProfiler=function(e){return b(e)===o},XE.isStrictMode=function(e){return b(e)===i},XE.isSuspense=function(e){return b(e)===d},XE.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===o||e===i||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===p||e.$$typeof===a||e.$$typeof===s||e.$$typeof===u||e.$$typeof===g||e.$$typeof===y||e.$$typeof===v||e.$$typeof===m)},XE.typeOf=b,XE}()),YE.exports}!function(){if($E)return BE;$E=1;var e=GE(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};function o(n){return e.isMemo(n)?r:i[n.$$typeof]||t}i[e.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i[e.Memo]=r;var a=Object.defineProperty,s=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,u=Object.getPrototypeOf,d=Object.prototype;BE=function e(t,r,i){if("string"!=typeof r){if(d){var f=u(r);f&&f!==d&&e(t,f,i)}var p=s(r);l&&(p=p.concat(l(r)));for(var h=o(t),m=o(r),g=0;g<p.length;++g){var y=p[g];if(!(n[y]||i&&i[y]||m&&m[y]||h&&h[y])){var v=c(r,y);try{a(t,y,v)}catch(e){}}}}return t}}();function KE(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}var ZE=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},JE=function(e,t,n){ZE(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}};var QE={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},eC=/[A-Z]|^ms/g,tC=/_EMO_([^_]+?)_([^]*?)_EMO_/g,nC=function(e){return 45===e.charCodeAt(1)},rC=function(e){return null!=e&&"boolean"!=typeof e},iC=IE(function(e){return nC(e)?e:e.replace(eC,"-$&").toLowerCase()}),oC=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(tC,function(e,t,n){return sC={name:t,styles:n,next:sC},t})}return 1===QE[e]||nC(e)||"number"!=typeof t||0===t?t:t+"px"};function aC(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var i=n;if(1===i.anim)return sC={name:i.name,styles:i.styles,next:sC},i.name;var o=n;if(void 0!==o.styles){var a=o.next;if(void 0!==a)for(;void 0!==a;)sC={name:a.name,styles:a.styles,next:sC},a=a.next;return o.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=aC(e,t,n[i])+";";else for(var o in n){var a=n[o];if("object"!=typeof a){var s=a;null!=t&&void 0!==t[s]?r+=o+"{"+t[s]+"}":rC(s)&&(r+=iC(o)+":"+oC(o,s)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var l=aC(e,t,a);switch(o){case"animation":case"animationName":r+=iC(o)+":"+l+";";break;default:r+=o+"{"+l+"}"}}else for(var c=0;c<a.length;c++)rC(a[c])&&(r+=iC(o)+":"+oC(o,a[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=sC,l=n(e);return sC=s,aC(e,t,l)}}var c=n;if(null==t)return c;var u=t[c];return void 0!==u?u:c}var sC,lC=/label:\s*([^\s;{]+)\s*(;|$)/g;function cC(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";sC=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=aC(n,t,o)):i+=o[0];for(var a=1;a<e.length;a++){if(i+=aC(n,t,e[a]),r)i+=o[a]}lC.lastIndex=0;for(var s,l="";null!==(s=lC.exec(i));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:c,styles:i,next:sC}}var uC,dC,fC=!!ek.useInsertionEffect&&ek.useInsertionEffect,pC=fC||function(e){return e()},hC=fC||JM.useLayoutEffect,mC=JM.createContext("undefined"!=typeof HTMLElement?UE({key:"css"}):null),gC=mC.Provider,yC=function(e){return JM.forwardRef(function(t,n){var r=JM.useContext(mC);return e(t,r,n)})},vC=JM.createContext({}),bC={}.hasOwnProperty,xC="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",wC=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return ZE(t,n,r),pC(function(){return JE(t,n,r)}),null},SC=yC(function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var i=e[xC],o=[r],a="";"string"==typeof e.className?a=KE(t.registered,o,e.className):null!=e.className&&(a=e.className+" ");var s=cC(o,void 0,JM.useContext(vC));a+=t.key+"-"+s.name;var l={};for(var c in e)bC.call(e,c)&&"css"!==c&&c!==xC&&(l[c]=e[c]);return l.className=a,n&&(l.ref=n),JM.createElement(JM.Fragment,null,JM.createElement(wC,{cache:t,serialized:s,isStringTag:"string"==typeof i}),JM.createElement(i,l))}),MC=function(e,t){var n=arguments;if(null==t||!bC.call(t,"css"))return JM.createElement.apply(void 0,n);var r=n.length,i=new Array(r);i[0]=SC,i[1]=function(e,t){var n={};for(var r in t)bC.call(t,r)&&(n[r]=t[r]);return n[xC]=e,n}(e,t);for(var o=2;o<r;o++)i[o]=n[o];return JM.createElement.apply(null,i)};uC=MC||(MC={}),dC||(dC=uC.JSX||(uC.JSX={}));var kC=yC(function(e,t){var n=cC([e.styles],void 0,JM.useContext(vC)),r=JM.useRef();return hC(function(){var e=t.key+"-global",i=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),o=!1,a=document.querySelector('style[data-emotion="'+e+" "+n.name+'"]');return t.sheet.tags.length&&(i.before=t.sheet.tags[0]),null!==a&&(o=!0,a.setAttribute("data-emotion",e),i.hydrate([a])),r.current=[i,o],function(){i.flush()}},[t]),hC(function(){var e=r.current,i=e[0];if(e[1])e[1]=!1;else{if(void 0!==n.next&&JE(t,n.next,!0),i.tags.length){var o=i.tags[i.tags.length-1].nextElementSibling;i.before=o,i.flush()}t.insert("",n,i,!1)}},[t,n.name]),null});function EC(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return cC(t)}function CC(){var e=EC.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var AC=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,DC=IE(function(e){return AC.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),qC=function(e){return"theme"!==e},_C=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?DC:qC},TC=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},NC=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return ZE(t,n,r),pC(function(){return JE(t,n,r)}),null},OC=function e(t,n){var r,i,o=t.__emotion_real===t,a=o&&t.__emotion_base||t;void 0!==n&&(r=n.label,i=n.target);var s=TC(t,n,o),l=s||_C(a),c=!l("as");return function(){var u=arguments,d=o&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==u[0]||void 0===u[0].raw)d.push.apply(d,u);else{var f=u[0];d.push(f[0]);for(var p=u.length,h=1;h<p;h++)d.push(u[h],f[h])}var m=yC(function(e,t,n){var r=c&&e.as||a,o="",u=[],f=e;if(null==e.theme){for(var p in f={},e)f[p]=e[p];f.theme=JM.useContext(vC)}"string"==typeof e.className?o=KE(t.registered,u,e.className):null!=e.className&&(o=e.className+" ");var h=cC(d.concat(u),t.registered,f);o+=t.key+"-"+h.name,void 0!==i&&(o+=" "+i);var m=c&&void 0===s?_C(r):l,g={};for(var y in e)c&&"as"===y||m(y)&&(g[y]=e[y]);return g.className=o,n&&(g.ref=n),JM.createElement(JM.Fragment,null,JM.createElement(NC,{cache:t,serialized:h,isStringTag:"string"==typeof r}),JM.createElement(r,g))});return m.displayName=void 0!==r?r:"Styled("+("string"==typeof a?a:a.displayName||a.name||"Component")+")",m.defaultProps=t.defaultProps,m.__emotion_real=m,m.__emotion_base=a,m.__emotion_styles=d,m.__emotion_forwardProp=s,Object.defineProperty(m,"toString",{value:function(){return"."+i}}),m.withComponent=function(t,r){return e(t,zk({},n,r,{shouldForwardProp:TC(m,r,!0)})).apply(void 0,d)},m}}.bind(null);["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach(function(e){OC[e]=OC(e)});var IC,LC,PC={exports:{}},RC={};var zC=(LC||(LC=1,PC.exports=function(){if(IC)return RC;IC=1;var e=ZM(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(e,n,a){var s,l={},c=null,u=null;for(s in void 0!==a&&(c=""+a),void 0!==n.key&&(c=""+n.key),void 0!==n.ref&&(u=n.ref),n)r.call(n,s)&&!o.hasOwnProperty(s)&&(l[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps)void 0===l[s]&&(l[s]=n[s]);return{$$typeof:t,type:e,key:c,ref:u,props:l,_owner:i.current}}return RC.Fragment=n,RC.jsx=a,RC.jsxs=a,RC}()),PC.exports);const FC=new Map;function jC(e){const{styles:t,defaultTheme:n={}}=e,r="function"==typeof t?e=>{return t(null==(r=e)||0===Object.keys(r).length?n:e);var r}:t;return zC.jsx(kC,{styles:r})}
/**
   * @mui/styled-engine v5.18.0
   *
   * @license MIT
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */const VC=[];function HC(e){return VC[0]=e,cC(VC)}var BC=Object.freeze({__proto__:null,GlobalStyles:jC,StyledEngineProvider:function(e){const{injectFirst:t,enableCssLayer:n,children:r}=e,i=JM.useMemo(()=>{const e=`${t}-${n}`;if("object"==typeof document&&FC.has(e))return FC.get(e);const r=function(e,t){const n=UE({key:"css",prepend:e});if(t){const e=n.insert;n.insert=(...t)=>(t[1].styles.match(/^@layer\s+[^{]*$/)||(t[1].styles=`@layer mui {${t[1].styles}}`),e(...t))}return n}(t,n);return FC.set(e,r),r},[t,n]);return t||n?zC.jsx(gC,{value:i,children:r}):r},ThemeContext:vC,css:EC,default:function(e,t){return OC(e,t)},internal_processStyles:(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},internal_serializeStyles:HC,keyframes:CC});function $C(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function WC(e){if(JM.isValidElement(e)||!$C(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=WC(e[n])}),t}function UC(e,t,n={clone:!0}){const r=n.clone?zk({},e):e;return $C(e)&&$C(t)&&Object.keys(t).forEach(i=>{JM.isValidElement(t[i])?r[i]=t[i]:$C(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&$C(e[i])?r[i]=UC(e[i],t[i],n):n.clone?r[i]=$C(t[i])?WC(t[i]):t[i]:r[i]=t[i]}),r}var YC=Object.freeze({__proto__:null,default:UC,isPlainObject:$C});const XC=["values","unit","step"];function GC(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=Fk(e,XC),o=(e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>zk({},e,{[t.key]:t.val}),{})})(t),a=Object.keys(o);function s(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function c(e,i){const o=a.indexOf(i);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==o&&"number"==typeof t[a[o]]?t[a[o]]:i)-r/100}${n})`}return zk({keys:a,values:o,up:s,down:l,between:c,only:function(e){return a.indexOf(e)+1<a.length?c(e,a[a.indexOf(e)+1]):s(e)},not:function(e){const t=a.indexOf(e);return 0===t?s(a[1]):t===a.length-1?l(a[t]):c(e,a[a.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},i)}const KC={borderRadius:4};function ZC(e,t){return t?UC(e,t,{clone:!1}):e}const JC={xs:0,sm:600,md:900,lg:1200,xl:1536},QC={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${JC[e]}px)`};function eA(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||QC;return t.reduce((r,i,o)=>(r[e.up(e.keys[o])]=n(t[o]),r),{})}if("object"==typeof t){const e=r.breakpoints||QC;return Object.keys(t).reduce((r,i)=>{if(-1!==Object.keys(e.values||JC).indexOf(i)){r[e.up(i)]=n(t[i],i)}else{const e=i;r[e]=t[e]}return r},{})}return n(t)}function tA(e,t){return e.reduce((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e},t)}function nA(e){if("string"!=typeof e)throw new Error(Lk(7));return e.charAt(0).toUpperCase()+e.slice(1)}var rA=Object.freeze({__proto__:null,default:nA});function iA(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=n)return n}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function oA(e,t,n,r=n){let i;return i="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:iA(e,n)||r,t&&(i=t(i,r,e)),i}function aA(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=e=>{if(null==e[t])return null;const o=e[t],a=iA(e.theme,r)||{};return eA(e,o,e=>{let r=oA(a,i,e);return e===r&&"string"==typeof e&&(r=oA(a,i,`${t}${"default"===e?"":nA(e)}`,e)),!1===n?r:{[n]:r}})};return o.propTypes={},o.filterProps=[t],o}const sA={m:"margin",p:"padding"},lA={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},cA={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},uA=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}(e=>{if(e.length>2){if(!cA[e])return[e];e=cA[e]}const[t,n]=e.split(""),r=sA[t],i=lA[n]||"";return Array.isArray(i)?i.map(e=>r+e):[r+i]}),dA=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],fA=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];function pA(e,t,n,r){var i;const o=null!=(i=iA(e,t,!1))?i:n;return"number"==typeof o?e=>"string"==typeof e?e:o*e:Array.isArray(o)?e=>"string"==typeof e?e:o[e]:"function"==typeof o?o:()=>{}}function hA(e){return pA(e,"spacing",8)}function mA(e,t){if("string"==typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:`-${n}`}function gA(e,t,n,r){if(-1===t.indexOf(n))return null;const i=function(e,t){return n=>e.reduce((e,r)=>(e[r]=mA(t,n),e),{})}(uA(n),r);return eA(e,e[n],i)}function yA(e,t){const n=hA(e.theme);return Object.keys(e).map(r=>gA(e,t,r,n)).reduce(ZC,{})}function vA(e){return yA(e,dA)}function bA(e){return yA(e,fA)}function xA(...e){const t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>Object.keys(e).reduce((n,r)=>t[r]?ZC(n,t[r](e)):n,{});return n.propTypes={},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n}function wA(e){return"number"!=typeof e?e:`${e}px solid`}function SA(e,t){return aA({prop:e,themeKey:"borders",transform:t})}vA.propTypes={},vA.filterProps=dA,bA.propTypes={},bA.filterProps=fA;const MA=SA("border",wA),kA=SA("borderTop",wA),EA=SA("borderRight",wA),CA=SA("borderBottom",wA),AA=SA("borderLeft",wA),DA=SA("borderColor"),qA=SA("borderTopColor"),_A=SA("borderRightColor"),TA=SA("borderBottomColor"),NA=SA("borderLeftColor"),OA=SA("outline",wA),IA=SA("outlineColor"),LA=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=pA(e.theme,"shape.borderRadius",4),n=e=>({borderRadius:mA(t,e)});return eA(e,e.borderRadius,n)}return null};LA.propTypes={},LA.filterProps=["borderRadius"],xA(MA,kA,EA,CA,AA,DA,qA,_A,TA,NA,LA,OA,IA);const PA=e=>{if(void 0!==e.gap&&null!==e.gap){const t=pA(e.theme,"spacing",8),n=e=>({gap:mA(t,e)});return eA(e,e.gap,n)}return null};PA.propTypes={},PA.filterProps=["gap"];const RA=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=pA(e.theme,"spacing",8),n=e=>({columnGap:mA(t,e)});return eA(e,e.columnGap,n)}return null};RA.propTypes={},RA.filterProps=["columnGap"];const zA=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=pA(e.theme,"spacing",8),n=e=>({rowGap:mA(t,e)});return eA(e,e.rowGap,n)}return null};zA.propTypes={},zA.filterProps=["rowGap"];function FA(e,t){return"grey"===t?t:e}xA(PA,RA,zA,aA({prop:"gridColumn"}),aA({prop:"gridRow"}),aA({prop:"gridAutoFlow"}),aA({prop:"gridAutoColumns"}),aA({prop:"gridAutoRows"}),aA({prop:"gridTemplateColumns"}),aA({prop:"gridTemplateRows"}),aA({prop:"gridTemplateAreas"}),aA({prop:"gridArea"}));function jA(e){return e<=1&&0!==e?100*e+"%":e}xA(aA({prop:"color",themeKey:"palette",transform:FA}),aA({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:FA}),aA({prop:"backgroundColor",themeKey:"palette",transform:FA}));const VA=aA({prop:"width",transform:jA}),HA=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,r;const i=(null==(n=e.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[t])||JC[t];return i?"px"!==(null==(r=e.theme)||null==(r=r.breakpoints)?void 0:r.unit)?{maxWidth:`${i}${e.theme.breakpoints.unit}`}:{maxWidth:i}:{maxWidth:jA(t)}};return eA(e,e.maxWidth,t)}return null};HA.filterProps=["maxWidth"];const BA=aA({prop:"minWidth",transform:jA}),$A=aA({prop:"height",transform:jA}),WA=aA({prop:"maxHeight",transform:jA}),UA=aA({prop:"minHeight",transform:jA});aA({prop:"size",cssProperty:"width",transform:jA}),aA({prop:"size",cssProperty:"height",transform:jA});xA(VA,HA,BA,$A,WA,UA,aA({prop:"boxSizing"}));const YA={border:{themeKey:"borders",transform:wA},borderTop:{themeKey:"borders",transform:wA},borderRight:{themeKey:"borders",transform:wA},borderBottom:{themeKey:"borders",transform:wA},borderLeft:{themeKey:"borders",transform:wA},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:wA},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:LA},color:{themeKey:"palette",transform:FA},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:FA},backgroundColor:{themeKey:"palette",transform:FA},p:{style:bA},pt:{style:bA},pr:{style:bA},pb:{style:bA},pl:{style:bA},px:{style:bA},py:{style:bA},padding:{style:bA},paddingTop:{style:bA},paddingRight:{style:bA},paddingBottom:{style:bA},paddingLeft:{style:bA},paddingX:{style:bA},paddingY:{style:bA},paddingInline:{style:bA},paddingInlineStart:{style:bA},paddingInlineEnd:{style:bA},paddingBlock:{style:bA},paddingBlockStart:{style:bA},paddingBlockEnd:{style:bA},m:{style:vA},mt:{style:vA},mr:{style:vA},mb:{style:vA},ml:{style:vA},mx:{style:vA},my:{style:vA},margin:{style:vA},marginTop:{style:vA},marginRight:{style:vA},marginBottom:{style:vA},marginLeft:{style:vA},marginX:{style:vA},marginY:{style:vA},marginInline:{style:vA},marginInlineStart:{style:vA},marginInlineEnd:{style:vA},marginBlock:{style:vA},marginBlockStart:{style:vA},marginBlockEnd:{style:vA},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:PA},rowGap:{style:zA},columnGap:{style:RA},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:jA},maxWidth:{style:HA},minWidth:{transform:jA},height:{transform:jA},maxHeight:{transform:jA},minHeight:{transform:jA},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function XA(){function e(e,t,n,r){const i={[e]:t,theme:n},o=r[e];if(!o)return{[e]:t};const{cssProperty:a=e,themeKey:s,transform:l,style:c}=o;if(null==t)return null;if("typography"===s&&"inherit"===t)return{[e]:t};const u=iA(n,s)||{};if(c)return c(i);return eA(i,t,t=>{let n=oA(u,l,t);return t===n&&"string"==typeof t&&(n=oA(u,l,`${e}${"default"===t?"":nA(t)}`,t)),!1===a?n:{[a]:n}})}return function t(n){var r;const{sx:i,theme:o={},nested:a}=n||{};if(!i)return null;const s=null!=(r=o.unstable_sxConfig)?r:YA;function l(n){let r=n;if("function"==typeof n)r=n(o);else if("object"!=typeof n)return n;if(!r)return null;const i=function(e={}){var t;return(null==(t=e.keys)?void 0:t.reduce((t,n)=>(t[e.up(n)]={},t),{}))||{}}(o.breakpoints),l=Object.keys(i);let c=i;return Object.keys(r).forEach(n=>{const i=(a=r[n],l=o,"function"==typeof a?a(l):a);var a,l;if(null!=i)if("object"==typeof i)if(s[n])c=ZC(c,e(n,i,o,s));else{const e=eA({theme:o},i,e=>({[n]:e}));!function(...e){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),n=new Set(t);return e.every(e=>n.size===Object.keys(e).length)}(e,i)?c=ZC(c,e):c[n]=t({sx:i,theme:o,nested:!0})}else c=ZC(c,e(n,i,o,s))}),!a&&o.modularCssLayers?{"@layer sx":tA(l,c)}:tA(l,c)}return Array.isArray(i)?i.map(l):l(i)}}const GA=XA();function KA(e,t){const n=this;if(n.vars&&"function"==typeof n.getColorSchemeSelector){const r=n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)");return{[r]:t}}return n.palette.mode===e?t:{}}GA.filterProps=["sx"];const ZA=["breakpoints","palette","spacing","shape"];function JA(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,a=Fk(e,ZA),s=GC(n),l=function(e=8){if(e.mui)return e;const t=hA({spacing:e}),n=(...e)=>(0===e.length?[1]:e).map(e=>{const n=t(e);return"number"==typeof n?`${n}px`:n}).join(" ");return n.mui=!0,n}(i);let c=UC({breakpoints:s,direction:"ltr",components:{},palette:zk({mode:"light"},r),spacing:l,shape:zk({},KC,o)},a);return c.applyStyles=KA,c=t.reduce((e,t)=>UC(e,t),c),c.unstable_sxConfig=zk({},YA,null==a?void 0:a.unstable_sxConfig),c.unstable_sx=function(e){return GA({sx:e,theme:this})},c}var QA=Object.freeze({__proto__:null,default:JA,private_createBreakpoints:GC,unstable_applyStyles:KA});function eD(e=null){const t=JM.useContext(vC);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n}const tD=JA();function nD(e=tD){return eD(e)}function rD(e){const t=HC(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function iD({styles:e,themeId:t,defaultTheme:n={}}){const r=nD(n),i=t&&r[t]||r;let o="function"==typeof e?e(i):e;return i.modularCssLayers&&(o=Array.isArray(o)?o.map(e=>rD("function"==typeof e?e(i):e)):rD(o)),zC.jsx(jC,{styles:o})}const oD=["sx"];function aD(e){const{sx:t}=e,n=Fk(e,oD),{systemProps:r,otherProps:i}=(e=>{var t,n;const r={systemProps:{},otherProps:{}},i=null!=(t=null==e||null==(n=e.theme)?void 0:n.unstable_sxConfig)?t:YA;return Object.keys(e).forEach(t=>{i[t]?r.systemProps[t]=e[t]:r.otherProps[t]=e[t]}),r})(n);let o;return o=Array.isArray(t)?[r,...t]:"function"==typeof t?(...e)=>{const n=t(...e);return $C(n)?zk({},r,n):r}:zk({},r,t),zk({},i,{sx:o})}var sD=Object.freeze({__proto__:null,default:GA,extendSxProp:aD,unstable_createStyleFunctionSx:XA,unstable_defaultSxConfig:YA});const lD=e=>e,cD=(()=>{let e=lD;return{configure(t){e=t},generate:t=>e(t),reset(){e=lD}}})();function uD(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=uD(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function dD(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=uD(e))&&(r&&(r+=" "),r+=t);return r}const fD={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function pD(e,t,n="Mui"){const r=fD[t];return r?`${n}-${r}`:`${cD.generate(e)}-${t}`}function hD(e,t,n="Mui"){const r={};return t.forEach(t=>{r[t]=pD(e,t,n)}),r}var mD,gD,yD={exports:{}},vD={};function bD(){if(mD)return vD;mD=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");function h(p){if("object"==typeof p&&null!==p){var h=p.$$typeof;switch(h){case e:switch(p=p.type){case n:case i:case r:case l:case c:case f:return p;default:switch(p=p&&p.$$typeof){case a:case s:case d:case u:case o:return p;default:return h}}case t:return h}}}return vD.ContextConsumer=o,vD.ContextProvider=a,vD.Element=e,vD.ForwardRef=s,vD.Fragment=n,vD.Lazy=d,vD.Memo=u,vD.Portal=t,vD.Profiler=i,vD.StrictMode=r,vD.Suspense=l,vD.SuspenseList=c,vD.isContextConsumer=function(e){return h(e)===o},vD.isContextProvider=function(e){return h(e)===a},vD.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},vD.isForwardRef=function(e){return h(e)===s},vD.isFragment=function(e){return h(e)===n},vD.isLazy=function(e){return h(e)===d},vD.isMemo=function(e){return h(e)===u},vD.isPortal=function(e){return h(e)===t},vD.isProfiler=function(e){return h(e)===i},vD.isStrictMode=function(e){return h(e)===r},vD.isSuspense=function(e){return h(e)===l},vD.isSuspenseList=function(e){return h(e)===c},vD.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===i||e===r||e===l||e===c||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===u||e.$$typeof===a||e.$$typeof===o||e.$$typeof===s||e.$$typeof===p||void 0!==e.getModuleId)},vD.typeOf=h,vD}function xD(){return gD||(gD=1,yD.exports=bD()),yD.exports}var wD=xD();const SD=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function MD(e){const t=`${e}`.match(SD);return t&&t[1]||""}function kD(e,t=""){return e.displayName||e.name||MD(e)||t}function ED(e,t,n){const r=kD(t);return e.displayName||(""!==r?`${n}(${r})`:n)}var CD=Object.freeze({__proto__:null,default:function(e){if(null!=e){if("string"==typeof e)return e;if("function"==typeof e)return kD(e,"Component");if("object"==typeof e)switch(e.$$typeof){case wD.ForwardRef:return ED(e,e.render,"ForwardRef");case wD.Memo:return ED(e,e.type,"memo");default:return}}},getFunctionName:MD});function AD(e,t){const n=zk({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=zk({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=e[r]||{},o=t[r];n[r]={},o&&Object.keys(o)?i&&Object.keys(i)?(n[r]=zk({},o),Object.keys(i).forEach(e=>{n[r][e]=AD(i[e],o[e])})):n[r]=o:n[r]=i}else void 0===n[r]&&(n[r]=e[r])}),n}const DD="undefined"!=typeof window?JM.useLayoutEffect:JM.useEffect;var qD=Object.freeze({__proto__:null,default:function(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}});function _D(...e){return e.reduce((e,t)=>null==t?e:function(...n){e.apply(this,n),t.apply(this,n)},()=>{})}function TD(e){return e&&e.ownerDocument||document}function ND(e){return TD(e).defaultView||window}function OD(e,t){"function"==typeof e?e(t):e&&(e.current=t)}let ID=0;const LD=ek["useId".toString()];function PD(e){if(void 0!==LD){return LD()}return function(e){const[t,n]=JM.useState(e),r=e||t;return JM.useEffect(()=>{null==t&&(ID+=1,n(`mui-${ID}`))},[t]),r}(e)}function RD(e){const t=JM.useRef(e);return DD(()=>{t.current=e}),JM.useRef((...e)=>(0,t.current)(...e)).current}function zD(...e){return JM.useMemo(()=>e.every(e=>null==e)?null:t=>{e.forEach(e=>{OD(e,t)})},e)}const FD={};const jD=[];class VD{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new VD}start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}}function HD(){const e=function(e,t){const n=JM.useRef(FD);return n.current===FD&&(n.current=e(t)),n}(VD.create).current;return function(e){JM.useEffect(e,jD)}(e.disposeEffect),e}let BD=!0,$D=!1;const WD=new VD,UD={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function YD(e){e.metaKey||e.altKey||e.ctrlKey||(BD=!0)}function XD(){BD=!1}function GD(){"hidden"===this.visibilityState&&$D&&(BD=!0)}function KD(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(e){}return BD||function(e){const{type:t,tagName:n}=e;return!("INPUT"!==n||!UD[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function ZD(){const e=JM.useCallback(e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",YD,!0),t.addEventListener("mousedown",XD,!0),t.addEventListener("pointerdown",XD,!0),t.addEventListener("touchstart",XD,!0),t.addEventListener("visibilitychange",GD,!0))},[]),t=JM.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!KD(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&($D=!0,WD.start(100,()=>{$D=!1}),t.current=!1,!0)},ref:e}}function JD(e,t,n=void 0){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((e,r)=>{if(r){const i=t(r);""!==i&&e.push(i),n&&n[r]&&e.push(n[r])}return e},[]).join(" ")}),r}function QD(e){return"string"==typeof e}function eq(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n}function tq(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(n=>{t[n]=e[n]}),t}const nq=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function rq(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=e,a=Fk(e,nq),s=o?{}:function(e,t,n){return"function"==typeof e?e(t,n):e}(r,i),{props:l,internalRef:c}=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const e=dD(null==n?void 0:n.className,o,null==i?void 0:i.className,null==r?void 0:r.className),t=zk({},null==n?void 0:n.style,null==i?void 0:i.style,null==r?void 0:r.style),a=zk({},n,i,r);return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=eq(zk({},i,r)),s=tq(r),l=tq(i),c=t(a),u=dD(null==c?void 0:c.className,null==n?void 0:n.className,o,null==i?void 0:i.className,null==r?void 0:r.className),d=zk({},null==c?void 0:c.style,null==n?void 0:n.style,null==i?void 0:i.style,null==r?void 0:r.style),f=zk({},c,n,l,s);return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:c.ref}}(zk({},a,{externalSlotProps:s})),u=function(e,t,n){return void 0===e||QD(e)?t:zk({},t,{ownerState:zk({},t.ownerState,n)})}(n,zk({},l,{ref:zD(c,null==s?void 0:s.ref,null==(t=e.additionalProps)?void 0:t.ref)}),i);return u}function iq(e){var t;return parseInt(JM.version,10)>=19?(null==e||null==(t=e.props)?void 0:t.ref)||null:(null==e?void 0:e.ref)||null}const oq=JM.createContext(null);function aq(){return JM.useContext(oq)}var sq="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function lq(e){const{children:t,theme:n}=e,r=aq(),i=JM.useMemo(()=>{const e=null===r?n:function(e,t){if("function"==typeof t)return t(e);return zk({},e,t)}(r,n);return null!=e&&(e[sq]=null!==r),e},[n,r]);return zC.jsx(oq.Provider,{value:i,children:t})}const cq=["value"],uq=JM.createContext();function dq(e){let{value:t}=e,n=Fk(e,cq);return zC.jsx(uq.Provider,zk({value:null==t||t},n))}const fq=JM.createContext(void 0);function pq({value:e,children:t}){return zC.jsx(fq.Provider,{value:e,children:t})}function hq({props:e,name:t}){return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?AD(i.defaultProps,r):i.styleOverrides||i.variants?r:AD(i,r)}({props:e,name:t,theme:{components:JM.useContext(fq)}})}const mq={};function gq(e,t,n,r=!1){return JM.useMemo(()=>{const i=e&&t[e]||t;if("function"==typeof n){const o=n(i),a=e?zk({},t,{[e]:o}):o;return r?()=>a:a}return zk({},t,e?{[e]:n}:n)},[e,t,n,r])}function yq(e){const{children:t,theme:n,themeId:r}=e,i=eD(mq),o=aq()||mq,a=gq(r,i,n),s=gq(r,o,n,!0),l="rtl"===a.direction,c=function(e){const t=eD(),n=PD()||"",{modularCssLayers:r}=e;let i="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return i=r&&null===t?"string"==typeof r?r.replace(/mui(?!\.)/g,i):`@layer ${i};`:"",DD(()=>{const e=document.querySelector("head");if(!e)return;const t=e.firstChild;if(i){var r;if(t&&null!=(r=t.hasAttribute)&&r.call(t,"data-mui-layer-order")&&t.getAttribute("data-mui-layer-order")===n)return;const o=document.createElement("style");o.setAttribute("data-mui-layer-order",n),o.textContent=i,e.prepend(o)}else{var o;null==(o=e.querySelector(`style[data-mui-layer-order="${n}"]`))||o.remove()}},[i,n]),i?zC.jsx(iD,{styles:i}):null}(a);return zC.jsx(lq,{theme:s,children:zC.jsx(vC.Provider,{value:a,children:zC.jsx(dq,{value:l,children:zC.jsxs(pq,{value:null==a?void 0:a.components,children:[c,t]})})})})}var vq,bq={},xq={exports:{}};function wq(){return vq||(vq=1,function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}(xq)),xq.exports}var Sq,Mq=VM(Pk),kq=VM(qD);function Eq(){if(Sq)return bq;Sq=1;var e=wq();Object.defineProperty(bq,"__esModule",{value:!0}),bq.alpha=u,bq.blend=function(e,t,n,r=1){const i=(e,t)=>Math.round((e**(1/r)*(1-n)+t**(1/r)*n)**r),a=o(e),l=o(t),c=[i(a.values[0],l.values[0]),i(a.values[1],l.values[1]),i(a.values[2],l.values[2])];return s({type:"rgb",values:c})},bq.colorChannel=void 0,bq.darken=d,bq.decomposeColor=o,bq.emphasize=p,bq.getContrastRatio=function(e,t){const n=c(e),r=c(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},bq.getLuminance=c,bq.hexToRgb=i,bq.hslToRgb=l,bq.lighten=f,bq.private_safeAlpha=function(e,t,n){try{return u(e,t)}catch(t){return e}},bq.private_safeColorChannel=void 0,bq.private_safeDarken=function(e,t,n){try{return d(e,t)}catch(t){return e}},bq.private_safeEmphasize=function(e,t,n){try{return p(e,t)}catch(t){return e}},bq.private_safeLighten=function(e,t,n){try{return f(e,t)}catch(t){return e}},bq.recomposeColor=s,bq.rgbToHex=function(e){if(0===e.indexOf("#"))return e;const{values:t}=o(e);return`#${t.map((e,t)=>function(e){const t=e.toString(16);return 1===t.length?`0${t}`:t}(3===t?Math.round(255*e):e)).join("")}`};var t=e(Mq),n=e(kq);function r(e,t=0,r=1){return(0,n.default)(e,t,r)}function i(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?`rgb${4===n.length?"a":""}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}function o(e){if(e.type)return e;if("#"===e.charAt(0))return o(i(e));const n=e.indexOf("("),r=e.substring(0,n);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(r))throw new Error((0,t.default)(9,e));let a,s=e.substring(n+1,e.length-1);if("color"===r){if(s=s.split(" "),a=s.shift(),4===s.length&&"/"===s[3].charAt(0)&&(s[3]=s[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(a))throw new Error((0,t.default)(10,a))}else s=s.split(",");return s=s.map(e=>parseFloat(e)),{type:r,values:s,colorSpace:a}}const a=e=>{const t=o(e);return t.values.slice(0,3).map((e,n)=>-1!==t.type.indexOf("hsl")&&0!==n?`${e}%`:e).join(" ")};bq.colorChannel=a;function s(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function l(e){e=o(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,a=r*Math.min(i,1-i),l=(e,t=(e+n/30)%12)=>i-a*Math.max(Math.min(t-3,9-t,1),-1);let c="rgb";const u=[Math.round(255*l(0)),Math.round(255*l(8)),Math.round(255*l(4))];return"hsla"===e.type&&(c+="a",u.push(t[3])),s({type:c,values:u})}function c(e){let t="hsl"===(e=o(e)).type||"hsla"===e.type?o(l(e)).values:e.values;return t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function u(e,t){return e=o(e),t=r(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,s(e)}function d(e,t){if(e=o(e),t=r(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return s(e)}function f(e,t){if(e=o(e),t=r(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return s(e)}function p(e,t=.15){return c(e)>.5?d(e,t):f(e,t)}return bq.private_safeColorChannel=(e,t)=>{try{return a(e)}catch(t){return e}},bq}var Cq=Eq();const Aq=["mode","contrastThreshold","tonalOffset"],Dq={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:tk.white,default:tk.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},qq={text:{primary:tk.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:tk.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function _q(e,t,n,r){const i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=Cq.lighten(e.main,i):"dark"===t&&(e.dark=Cq.darken(e.main,o)))}function Tq(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,i=Fk(e,Aq),o=e.primary||function(e="light"){return"dark"===e?{main:hk,light:pk,dark:mk}:{main:gk,light:mk,dark:yk}}(t),a=e.secondary||function(e="light"){return"dark"===e?{main:lk,light:sk,dark:uk}:{main:dk,light:ck,dark:fk}}(t),s=e.error||function(e="light"){return"dark"===e?{main:ik,light:nk,dark:ok}:{main:ok,light:rk,dark:ak}}(t),l=e.info||function(e="light"){return"dark"===e?{main:bk,light:vk,dark:wk}:{main:wk,light:xk,dark:Sk}}(t),c=e.success||function(e="light"){return"dark"===e?{main:kk,light:Mk,dark:Ck}:{main:Ak,light:Ek,dark:Dk}}(t),u=e.warning||function(e="light"){return"dark"===e?{main:_k,light:qk,dark:Nk}:{main:"#ed6c02",light:Tk,dark:Ok}}(t);function d(e){return Cq.getContrastRatio(e,qq.text.primary)>=n?qq.text.primary:Dq.text.primary}const f=({color:e,name:t,mainShade:n=500,lightShade:i=300,darkShade:o=700})=>{if(!(e=zk({},e)).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error(Lk(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error(Lk(12,t?` (${t})`:"",JSON.stringify(e.main)));return _q(e,"light",i,r),_q(e,"dark",o,r),e.contrastText||(e.contrastText=d(e.main)),e},p={dark:qq,light:Dq};return UC(zk({common:zk({},tk),mode:t,primary:f({color:o,name:"primary"}),secondary:f({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:s,name:"error"}),warning:f({color:u,name:"warning"}),info:f({color:l,name:"info"}),success:f({color:c,name:"success"}),grey:Ik,contrastThreshold:n,getContrastText:d,augmentColor:f,tonalOffset:r},p[t]),i)}const Nq=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Oq(e){return Math.round(1e5*e)/1e5}const Iq={textTransform:"uppercase"},Lq='"Roboto", "Helvetica", "Arial", sans-serif';function Pq(e,t){const n="function"==typeof t?t(e):t,{fontFamily:r=Lq,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:a=400,fontWeightMedium:s=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:d}=n,f=Fk(n,Nq),p=i/14,h=d||(e=>e/c*p+"rem"),m=(e,t,n,i,o)=>zk({fontFamily:r,fontWeight:e,fontSize:h(t),lineHeight:n},r===Lq?{letterSpacing:`${Oq(i/t)}em`}:{},o,u),g={h1:m(o,96,1.167,-1.5),h2:m(o,60,1.2,-.5),h3:m(a,48,1.167,0),h4:m(a,34,1.235,.25),h5:m(a,24,1.334,0),h6:m(s,20,1.6,.15),subtitle1:m(a,16,1.75,.15),subtitle2:m(s,14,1.57,.1),body1:m(a,16,1.5,.15),body2:m(a,14,1.43,.15),button:m(s,14,1.75,.4,Iq),caption:m(a,12,1.66,.4),overline:m(a,12,2.66,1,Iq),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return UC(zk({htmlFontSize:c,pxToRem:h,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:a,fontWeightMedium:s,fontWeightBold:l},g),f,{clone:!1})}function Rq(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}const zq=["none",Rq(0,2,1,-1,0,1,1,0,0,1,3,0),Rq(0,3,1,-2,0,2,2,0,0,1,5,0),Rq(0,3,3,-2,0,3,4,0,0,1,8,0),Rq(0,2,4,-1,0,4,5,0,0,1,10,0),Rq(0,3,5,-1,0,5,8,0,0,1,14,0),Rq(0,3,5,-1,0,6,10,0,0,1,18,0),Rq(0,4,5,-2,0,7,10,1,0,2,16,1),Rq(0,5,5,-3,0,8,10,1,0,3,14,2),Rq(0,5,6,-3,0,9,12,1,0,3,16,2),Rq(0,6,6,-3,0,10,14,1,0,4,18,3),Rq(0,6,7,-4,0,11,15,1,0,4,20,3),Rq(0,7,8,-4,0,12,17,2,0,5,22,4),Rq(0,7,8,-4,0,13,19,2,0,5,24,4),Rq(0,7,9,-4,0,14,21,2,0,5,26,4),Rq(0,8,9,-5,0,15,22,2,0,6,28,5),Rq(0,8,10,-5,0,16,24,2,0,6,30,5),Rq(0,8,11,-5,0,17,26,2,0,6,32,5),Rq(0,9,11,-5,0,18,28,2,0,7,34,6),Rq(0,9,12,-6,0,19,29,2,0,7,36,6),Rq(0,10,13,-6,0,20,31,3,0,8,38,7),Rq(0,10,13,-6,0,21,33,3,0,8,40,7),Rq(0,10,14,-6,0,22,35,3,0,8,42,7),Rq(0,11,14,-7,0,23,36,3,0,9,44,8),Rq(0,11,15,-7,0,24,38,3,0,9,46,8)],Fq=["duration","easing","delay"],jq={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Vq={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Hq(e){return`${Math.round(e)}ms`}function Bq(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function $q(e){const t=zk({},jq,e.easing),n=zk({},Vq,e.duration);return zk({getAutoHeightDuration:Bq,create:(e=["all"],r={})=>{const{duration:i=n.standard,easing:o=t.easeInOut,delay:a=0}=r;return Fk(r,Fq),(Array.isArray(e)?e:[e]).map(e=>`${e} ${"string"==typeof i?i:Hq(i)} ${o} ${"string"==typeof a?a:Hq(a)}`).join(",")}},e,{easing:t,duration:n})}const Wq={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Uq=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function Yq(e={},...t){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=e,a=Fk(e,Uq);if(e.vars&&void 0===e.generateCssVars)throw new Error(Lk(18));const s=Tq(r),l=JA(e);let c=UC(l,{mixins:(u=l.breakpoints,d=n,zk({toolbar:{minHeight:56,[u.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[u.up("sm")]:{minHeight:64}}},d)),palette:s,shadows:zq.slice(),typography:Pq(s,o),transitions:$q(i),zIndex:zk({},Wq)});var u,d;return c=UC(c,a),c=t.reduce((e,t)=>UC(e,t),c),c.unstable_sxConfig=zk({},YA,null==a?void 0:a.unstable_sxConfig),c.unstable_sx=function(e){return GA({sx:e,theme:this})},c}const Xq=Yq();function Gq(){const e=nD(Xq);return e[Rk]||e}var Kq,Zq={},Jq={exports:{}};var Qq,e_={exports:{}};var t_,n_=VM(BC),r_=VM(YC),i_=VM(rA),o_=VM(CD),a_=VM(QA),s_=VM(sD);function l_(){if(t_)return Zq;t_=1;var e=wq();Object.defineProperty(Zq,"__esModule",{value:!0}),Zq.default=function(e={}){const{themeId:o,defaultTheme:s=p,rootShouldForwardProp:l=d,slotShouldForwardProp:u=d}=e,f=e=>(0,a.default)((0,t.default)({},e,{theme:m((0,t.default)({},e,{defaultTheme:s,themeId:o}))}));return f.__mui_systemSx=!0,(e,a={})=>{(0,r.internal_processStyles)(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));const{name:p,slot:v,skipVariantsResolver:b,skipSx:x,overridesResolver:w=g(h(v))}=a,S=(0,n.default)(a,c),M=p&&p.startsWith("Mui")||v?"components":"custom",k=void 0!==b?b:v&&"Root"!==v&&"root"!==v||!1,E=x||!1;let C=d;"Root"===v||"root"===v?C=l:v?C=u:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(C=void 0);const A=(0,r.default)(e,(0,t.default)({shouldForwardProp:C,label:void 0},S)),D=e=>"function"==typeof e&&e.__emotion_real!==e||(0,i.isPlainObject)(e)?n=>{const r=m({theme:n.theme,defaultTheme:s,themeId:o});return y(e,(0,t.default)({},n,{theme:r}),r.modularCssLayers?M:void 0)}:e,q=(n,...r)=>{let i=D(n);const a=r?r.map(D):[];p&&w&&a.push(e=>{const n=m((0,t.default)({},e,{defaultTheme:s,themeId:o}));if(!n.components||!n.components[p]||!n.components[p].styleOverrides)return null;const r=n.components[p].styleOverrides,i={};return Object.entries(r).forEach(([r,o])=>{i[r]=y(o,(0,t.default)({},e,{theme:n}),n.modularCssLayers?"theme":void 0)}),w(e,i)}),p&&!k&&a.push(e=>{var n;const r=m((0,t.default)({},e,{defaultTheme:s,themeId:o}));return y({variants:null==r||null==(n=r.components)||null==(n=n[p])?void 0:n.variants},(0,t.default)({},e,{theme:r}),r.modularCssLayers?"theme":void 0)}),E||a.push(f);const l=a.length-r.length;if(Array.isArray(n)&&l>0){const e=new Array(l).fill("");i=[...n,...e],i.raw=[...n.raw,...e]}const c=A(i,...a);return e.muiName&&(c.muiName=e.muiName),c};return A.withConfig&&(q.withConfig=A.withConfig),q}},Zq.shouldForwardProp=d,Zq.systemDefaultTheme=void 0;var t=e((Kq||(Kq=1,function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Jq)),Jq.exports)),n=e((Qq||(Qq=1,function(e){e.exports=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n},e.exports.__esModule=!0,e.exports.default=e.exports}(e_)),e_.exports)),r=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(n_),i=r_;e(i_),e(o_);var o=e(a_),a=e(s_);const s=["ownerState"],l=["variants"],c=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function d(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function f(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}const p=Zq.systemDefaultTheme=(0,o.default)(),h=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function m({defaultTheme:e,theme:t,themeId:n}){return r=t,0===Object.keys(r).length?e:t[n]||t;var r}function g(e){return e?(t,n)=>n[e]:null}function y(e,i,o){let{ownerState:a}=i,c=(0,n.default)(i,s);const u="function"==typeof e?e((0,t.default)({ownerState:a},c)):e;if(Array.isArray(u))return u.flatMap(e=>y(e,(0,t.default)({ownerState:a},c),o));if(u&&"object"==typeof u&&Array.isArray(u.variants)){const{variants:e=[]}=u;let i=(0,n.default)(u,l);return e.forEach(e=>{let n=!0;if("function"==typeof e.props?n=e.props((0,t.default)({ownerState:a},c,a)):Object.keys(e.props).forEach(t=>{(null==a?void 0:a[t])!==e.props[t]&&c[t]!==e.props[t]&&(n=!1)}),n){Array.isArray(i)||(i=[i]);const n="function"==typeof e.style?e.style((0,t.default)({ownerState:a},c,a)):e.style;i.push(o?f((0,r.internal_serializeStyles)(n),o):n)}}),i}return o?f((0,r.internal_serializeStyles)(u),o):u}return Zq}const c_=e=>function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}(e)&&"classes"!==e,u_=jM(l_())({themeId:Rk,defaultTheme:Xq,rootShouldForwardProp:c_}),d_=["theme"];function f_(e){let{theme:t}=e,n=Fk(e,d_);const r=t[Rk];let i=r||t;return"function"!=typeof t&&(r&&!r.vars?i=zk({},r,{vars:null}):t&&!t.vars&&(i=zk({},t,{vars:null}))),zC.jsx(yq,zk({},n,{themeId:r?Rk:void 0,theme:i}))}const p_=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)};function h_(e){return hq(e)}function m_(e){return pD("MuiSvgIcon",e)}hD("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const g_=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],y_=u_("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${nA(n.color)}`],t[`fontSize${nA(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,i,o,a,s,l,c,u,d,f,p,h;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(n=e.transitions)||null==(r=n.create)?void 0:r.call(n,"fill",{duration:null==(i=e.transitions)||null==(i=i.duration)?void 0:i.shorter}),fontSize:{inherit:"inherit",small:(null==(o=e.typography)||null==(a=o.pxToRem)?void 0:a.call(o,20))||"1.25rem",medium:(null==(s=e.typography)||null==(l=s.pxToRem)?void 0:l.call(s,24))||"1.5rem",large:(null==(c=e.typography)||null==(u=c.pxToRem)?void 0:u.call(c,35))||"2.1875rem"}[t.fontSize],color:null!=(d=null==(f=(e.vars||e).palette)||null==(f=f[t.color])?void 0:f.main)?d:{action:null==(p=(e.vars||e).palette)||null==(p=p.action)?void 0:p.active,disabled:null==(h=(e.vars||e).palette)||null==(h=h.action)?void 0:h.disabled,inherit:void 0}[t.color]}}),v_=JM.forwardRef(function(e,t){const n=h_({props:e,name:"MuiSvgIcon"}),{children:r,className:i,color:o="inherit",component:a="svg",fontSize:s="medium",htmlColor:l,inheritViewBox:c=!1,titleAccess:u,viewBox:d="0 0 24 24"}=n,f=Fk(n,g_),p=JM.isValidElement(r)&&"svg"===r.type,h=zk({},n,{color:o,component:a,fontSize:s,instanceFontSize:e.fontSize,inheritViewBox:c,viewBox:d,hasSvgAsChild:p}),m={};c||(m.viewBox=d);const g=(e=>{const{color:t,fontSize:n,classes:r}=e;return JD({root:["root","inherit"!==t&&`color${nA(t)}`,`fontSize${nA(n)}`]},m_,r)})(h);return zC.jsxs(y_,zk({as:a,className:dD(g.root,i),focusable:"false",color:l,"aria-hidden":!u||void 0,role:u?"img":void 0,ref:t},m,f,p&&r.props,{ownerState:h,children:[p?r.props.children:r,u?zC.jsx("title",{children:u}):null]}))});function b_(e,t){return b_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b_(e,t)}function x_(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,b_(e,t)}v_.muiName="SvgIcon";var w_,S_,M_,k_,E_={exports:{}},C_={},A_={exports:{}},D_={};function q_(){return S_||(S_=1,A_.exports=(w_||(w_=1,function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,a=o>>>1;r<a;){var s=2*(r+1)-1,l=e[s],c=s+1,u=e[c];if(0>i(l,n))c<o&&0>i(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<o&&0>i(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],c=[],u=1,d=null,f=3,p=!1,h=!1,m=!1,g="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,v="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var i=n(c);null!==i;){if(null===i.callback)r(c);else{if(!(i.startTime<=e))break;r(c),i.sortIndex=i.expirationTime,t(l,i)}i=n(c)}}function x(e){if(m=!1,b(e),!h)if(null!==n(l))h=!0,N(w);else{var t=n(c);null!==t&&O(x,t.startTime-e)}}function w(t,i){h=!1,m&&(m=!1,y(E),E=-1),p=!0;var o=f;try{for(b(i),d=n(l);null!==d&&(!(d.expirationTime>i)||t&&!D());){var a=d.callback;if("function"==typeof a){d.callback=null,f=d.priorityLevel;var s=a(d.expirationTime<=i);i=e.unstable_now(),"function"==typeof s?d.callback=s:d===n(l)&&r(l),b(i)}else r(l);d=n(l)}if(null!==d)var u=!0;else{var g=n(c);null!==g&&O(x,g.startTime-i),u=!1}return u}finally{d=null,f=o,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,M=!1,k=null,E=-1,C=5,A=-1;function D(){return!(e.unstable_now()-A<C)}function q(){if(null!==k){var t=e.unstable_now();A=t;var n=!0;try{n=k(!0,t)}finally{n?S():(M=!1,k=null)}}else M=!1}if("function"==typeof v)S=function(){v(q)};else if("undefined"!=typeof MessageChannel){var _=new MessageChannel,T=_.port2;_.port1.onmessage=q,S=function(){T.postMessage(null)}}else S=function(){g(q,0)};function N(e){k=e,M||(M=!0,S())}function O(t,n){E=g(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){h||p||(h=!0,N(w))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,o){var a=e.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0<o?a+o:a,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return r={id:u++,callback:i,priorityLevel:r,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>a?(r.sortIndex=o,t(c,r),null===n(l)&&r===n(c)&&(m?(y(E),E=-1):m=!0,O(x,o-a))):(r.sortIndex=s,t(l,r),h||p||(h=!0,N(w))),r},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}}(D_)),D_)),A_.exports}
/**
   * @license React
   * react-dom.production.min.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */function __(){if(M_)return C_;M_=1;var e=ZM(),t=q_();function n(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function o(e,t){a(e,t),a(e+"Capture",t)}function a(e,t){for(i[e]=t,e=0;e<t.length;e++)r.add(t[e])}var s=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),l=Object.prototype.hasOwnProperty,c=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,u={},d={};function f(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var p={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){p[e]=new f(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];p[t]=new f(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){p[e]=new f(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){p[e]=new f(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){p[e]=new f(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){p[e]=new f(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){p[e]=new f(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){p[e]=new f(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){p[e]=new f(e,5,!1,e.toLowerCase(),null,!1,!1)});var h=/[\-:]([a-z])/g;function m(e){return e[1].toUpperCase()}function g(e,t,n,r){var i=p.hasOwnProperty(t)?p[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!l.call(d,e)||!l.call(u,e)&&(c.test(e)?d[e]=!0:(u[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(h,m);p[t]=new f(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(h,m);p[t]=new f(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(h,m);p[t]=new f(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){p[e]=new f(e,1,!1,e.toLowerCase(),null,!1,!1)}),p.xlinkHref=new f("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){p[e]=new f(e,1,!1,e.toLowerCase(),null,!0,!0)});var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,v=Symbol.for("react.element"),b=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),k=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),_=Symbol.for("react.offscreen"),T=Symbol.iterator;function N(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=T&&e[T]||e["@@iterator"])?e:null}var O,I=Object.assign;function L(e){if(void 0===O)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);O=t&&t[1]||""}return"\n"+O+e}var P=!1;function R(e,t){if(!e||P)return"";P=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s]){var l="\n"+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{P=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?L(e):""}function z(e){switch(e.tag){case 5:return L(e.type);case 16:return L("Lazy");case 13:return L("Suspense");case 19:return L("SuspenseList");case 0:case 2:case 15:return e=R(e.type,!1);case 11:return e=R(e.type.render,!1);case 1:return e=R(e.type,!0);default:return""}}function F(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case x:return"Fragment";case b:return"Portal";case S:return"Profiler";case w:return"StrictMode";case C:return"Suspense";case A:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case k:return(e.displayName||"Context")+".Consumer";case M:return(e._context.displayName||"Context")+".Provider";case E:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case D:return null!==(t=e.displayName||null)?t:F(e.type)||"Memo";case q:t=e._payload,e=e._init;try{return F(e(t))}catch(e){}}return null}function j(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return F(t);case 8:return t===w?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function V(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function H(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function B(e){e._valueTracker||(e._valueTracker=function(e){var t=H(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function $(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=H(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function W(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function U(e,t){var n=t.checked;return I({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Y(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=V(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function X(e,t){null!=(t=t.checked)&&g(e,"checked",t,!1)}function G(e,t){X(e,t);var n=V(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?Z(e,t.type,n):t.hasOwnProperty("defaultValue")&&Z(e,t.type,V(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function K(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function Z(e,t,n){"number"===t&&W(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var J=Array.isArray;function Q(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+V(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function ee(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(n(91));return I({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function te(e,t){var r=t.value;if(null==r){if(r=t.children,t=t.defaultValue,null!=r){if(null!=t)throw Error(n(92));if(J(r)){if(1<r.length)throw Error(n(93));r=r[0]}t=r}null==t&&(t=""),r=t}e._wrapperState={initialValue:V(r)}}function ne(e,t){var n=V(t.value),r=V(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function re(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function ie(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function oe(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ie(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ae,se=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n)})}:e}(function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ae=ae||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ae.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function le(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var ce={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ue=["Webkit","ms","Moz","O"];function de(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ce.hasOwnProperty(e)&&ce[e]?(""+t).trim():t+"px"}function fe(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=de(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(ce).forEach(function(e){ue.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ce[t]=ce[e]})});var pe=I({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function he(e,t){if(t){if(pe[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(n(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(n(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(n(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(n(62))}}function me(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ge=null;function ye(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var ve=null,be=null,xe=null;function we(e){if(e=mi(e)){if("function"!=typeof ve)throw Error(n(280));var t=e.stateNode;t&&(t=yi(t),ve(e.stateNode,e.type,t))}}function Se(e){be?xe?xe.push(e):xe=[e]:be=e}function Me(){if(be){var e=be,t=xe;if(xe=be=null,we(e),t)for(e=0;e<t.length;e++)we(t[e])}}function ke(e,t){return e(t)}function Ee(){}var Ce=!1;function Ae(e,t,n){if(Ce)return e(t,n);Ce=!0;try{return ke(e,t,n)}finally{Ce=!1,(null!==be||null!==xe)&&(Ee(),Me())}}function De(e,t){var r=e.stateNode;if(null===r)return null;var i=yi(r);if(null===i)return null;r=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(i=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!i;break e;default:e=!1}if(e)return null;if(r&&"function"!=typeof r)throw Error(n(231,t,typeof r));return r}var qe=!1;if(s)try{var _e={};Object.defineProperty(_e,"passive",{get:function(){qe=!0}}),window.addEventListener("test",_e,_e),window.removeEventListener("test",_e,_e)}catch(e){qe=!1}function Te(e,t,n,r,i,o,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var Ne=!1,Oe=null,Ie=!1,Le=null,Pe={onError:function(e){Ne=!0,Oe=e}};function Re(e,t,n,r,i,o,a,s,l){Ne=!1,Oe=null,Te.apply(Pe,arguments)}function ze(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Fe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function je(e){if(ze(e)!==e)throw Error(n(188))}function Ve(e){return e=function(e){var t=e.alternate;if(!t){if(null===(t=ze(e)))throw Error(n(188));return t!==e?null:e}for(var r=e,i=t;;){var o=r.return;if(null===o)break;var a=o.alternate;if(null===a){if(null!==(i=o.return)){r=i;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===r)return je(o),e;if(a===i)return je(o),t;a=a.sibling}throw Error(n(188))}if(r.return!==i.return)r=o,i=a;else{for(var s=!1,l=o.child;l;){if(l===r){s=!0,r=o,i=a;break}if(l===i){s=!0,i=o,r=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===r){s=!0,r=a,i=o;break}if(l===i){s=!0,i=a,r=o;break}l=l.sibling}if(!s)throw Error(n(189))}}if(r.alternate!==i)throw Error(n(190))}if(3!==r.tag)throw Error(n(188));return r.stateNode.current===r?e:t}(e),null!==e?He(e):null}function He(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=He(e);if(null!==t)return t;e=e.sibling}return null}var Be=t.unstable_scheduleCallback,$e=t.unstable_cancelCallback,We=t.unstable_shouldYield,Ue=t.unstable_requestPaint,Ye=t.unstable_now,Xe=t.unstable_getCurrentPriorityLevel,Ge=t.unstable_ImmediatePriority,Ke=t.unstable_UserBlockingPriority,Ze=t.unstable_NormalPriority,Je=t.unstable_LowPriority,Qe=t.unstable_IdlePriority,et=null,tt=null;var nt=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(rt(e)/it|0)|0},rt=Math.log,it=Math.LN2;var ot=64,at=4194304;function st(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function lt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~i;0!==s?r=st(s):0!==(o&=a)&&(r=st(o))}else 0!==(a=n&~i)?r=st(a):0!==o&&(r=st(o));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&4194240&o))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-nt(t)),r|=e[n],t&=~i;return r}function ct(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function ut(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function dt(){var e=ot;return!(4194240&(ot<<=1))&&(ot=64),e}function ft(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function pt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-nt(t)]=n}function ht(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-nt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var mt=0;function gt(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var yt,vt,bt,xt,wt,St=!1,Mt=[],kt=null,Et=null,Ct=null,At=new Map,Dt=new Map,qt=[],_t="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Tt(e,t){switch(e){case"focusin":case"focusout":kt=null;break;case"dragenter":case"dragleave":Et=null;break;case"mouseover":case"mouseout":Ct=null;break;case"pointerover":case"pointerout":At.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dt.delete(t.pointerId)}}function Nt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&(null!==(t=mi(t))&&vt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Ot(e){var t=hi(e.target);if(null!==t){var n=ze(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Fe(n)))return e.blockedOn=t,void wt(e.priority,function(){bt(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function It(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Wt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=mi(n))&&vt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);ge=r,n.target.dispatchEvent(r),ge=null,t.shift()}return!0}function Lt(e,t,n){It(e)&&n.delete(t)}function Pt(){St=!1,null!==kt&&It(kt)&&(kt=null),null!==Et&&It(Et)&&(Et=null),null!==Ct&&It(Ct)&&(Ct=null),At.forEach(Lt),Dt.forEach(Lt)}function Rt(e,n){e.blockedOn===n&&(e.blockedOn=null,St||(St=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Pt)))}function zt(e){function t(t){return Rt(t,e)}if(0<Mt.length){Rt(Mt[0],e);for(var n=1;n<Mt.length;n++){var r=Mt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==kt&&Rt(kt,e),null!==Et&&Rt(Et,e),null!==Ct&&Rt(Ct,e),At.forEach(t),Dt.forEach(t),n=0;n<qt.length;n++)(r=qt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<qt.length&&null===(n=qt[0]).blockedOn;)Ot(n),null===n.blockedOn&&qt.shift()}var Ft=y.ReactCurrentBatchConfig,jt=!0;function Vt(e,t,n,r){var i=mt,o=Ft.transition;Ft.transition=null;try{mt=1,Bt(e,t,n,r)}finally{mt=i,Ft.transition=o}}function Ht(e,t,n,r){var i=mt,o=Ft.transition;Ft.transition=null;try{mt=4,Bt(e,t,n,r)}finally{mt=i,Ft.transition=o}}function Bt(e,t,n,r){if(jt){var i=Wt(e,t,n,r);if(null===i)jr(e,t,r,$t,n),Tt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return kt=Nt(kt,e,t,n,r,i),!0;case"dragenter":return Et=Nt(Et,e,t,n,r,i),!0;case"mouseover":return Ct=Nt(Ct,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return At.set(o,Nt(At.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Dt.set(o,Nt(Dt.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Tt(e,r),4&t&&-1<_t.indexOf(e)){for(;null!==i;){var o=mi(i);if(null!==o&&yt(o),null===(o=Wt(e,t,n,r))&&jr(e,t,r,$t,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else jr(e,t,r,null,n)}}var $t=null;function Wt(e,t,n,r){if($t=null,null!==(e=hi(e=ye(r))))if(null===(t=ze(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Fe(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return $t=e,null}function Ut(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Xe()){case Ge:return 1;case Ke:return 4;case Ze:case Je:return 16;case Qe:return 536870912;default:return 16}default:return 16}}var Yt=null,Xt=null,Gt=null;function Kt(){if(Gt)return Gt;var e,t,n=Xt,r=n.length,i="value"in Yt?Yt.value:Yt.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return Gt=i.slice(e,1<t?1-t:void 0)}function Zt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Jt(){return!0}function Qt(){return!1}function en(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?Jt:Qt,this.isPropagationStopped=Qt,this}return I(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Jt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Jt)},persist:function(){},isPersistent:Jt}),t}var tn,nn,rn,on={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},an=en(on),sn=I({},on,{view:0,detail:0}),ln=en(sn),cn=I({},sn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:wn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==rn&&(rn&&"mousemove"===e.type?(tn=e.screenX-rn.screenX,nn=e.screenY-rn.screenY):nn=tn=0,rn=e),tn)},movementY:function(e){return"movementY"in e?e.movementY:nn}}),un=en(cn),dn=en(I({},cn,{dataTransfer:0})),fn=en(I({},sn,{relatedTarget:0})),pn=en(I({},on,{animationName:0,elapsedTime:0,pseudoElement:0})),hn=I({},on,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),mn=en(hn),gn=en(I({},on,{data:0})),yn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},vn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},bn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=bn[e])&&!!t[e]}function wn(){return xn}var Sn=I({},sn,{key:function(e){if(e.key){var t=yn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Zt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?vn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:wn,charCode:function(e){return"keypress"===e.type?Zt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Zt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Mn=en(Sn),kn=en(I({},cn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),En=en(I({},sn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:wn})),Cn=en(I({},on,{propertyName:0,elapsedTime:0,pseudoElement:0})),An=I({},cn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Dn=en(An),qn=[9,13,27,32],_n=s&&"CompositionEvent"in window,Tn=null;s&&"documentMode"in document&&(Tn=document.documentMode);var Nn=s&&"TextEvent"in window&&!Tn,On=s&&(!_n||Tn&&8<Tn&&11>=Tn),In=String.fromCharCode(32),Ln=!1;function Pn(e,t){switch(e){case"keyup":return-1!==qn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var zn=!1;var Fn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function jn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Fn[e.type]:"textarea"===t}function Vn(e,t,n,r){Se(r),0<(t=Hr(t,"onChange")).length&&(n=new an("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Hn=null,Bn=null;function $n(e){Ir(e,0)}function Wn(e){if($(gi(e)))return e}function Un(e,t){if("change"===e)return t}var Yn=!1;if(s){var Xn;if(s){var Gn="oninput"in document;if(!Gn){var Kn=document.createElement("div");Kn.setAttribute("oninput","return;"),Gn="function"==typeof Kn.oninput}Xn=Gn}else Xn=!1;Yn=Xn&&(!document.documentMode||9<document.documentMode)}function Zn(){Hn&&(Hn.detachEvent("onpropertychange",Jn),Bn=Hn=null)}function Jn(e){if("value"===e.propertyName&&Wn(Bn)){var t=[];Vn(t,Bn,e,ye(e)),Ae($n,t)}}function Qn(e,t,n){"focusin"===e?(Zn(),Bn=n,(Hn=t).attachEvent("onpropertychange",Jn)):"focusout"===e&&Zn()}function er(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Wn(Bn)}function tr(e,t){if("click"===e)return Wn(t)}function nr(e,t){if("input"===e||"change"===e)return Wn(t)}var rr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function ir(e,t){if(rr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!l.call(t,i)||!rr(e[i],t[i]))return!1}return!0}function or(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ar(e,t){var n,r=or(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=or(r)}}function sr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?sr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function lr(){for(var e=window,t=W();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=W((e=t.contentWindow).document)}return t}function cr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function ur(e){var t=lr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&sr(n.ownerDocument.documentElement,n)){if(null!==r&&cr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=ar(n,o);var a=ar(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var dr=s&&"documentMode"in document&&11>=document.documentMode,fr=null,pr=null,hr=null,mr=!1;function gr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;mr||null==fr||fr!==W(r)||("selectionStart"in(r=fr)&&cr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},hr&&ir(hr,r)||(hr=r,0<(r=Hr(pr,"onSelect")).length&&(t=new an("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=fr)))}function yr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var vr={animationend:yr("Animation","AnimationEnd"),animationiteration:yr("Animation","AnimationIteration"),animationstart:yr("Animation","AnimationStart"),transitionend:yr("Transition","TransitionEnd")},br={},xr={};function wr(e){if(br[e])return br[e];if(!vr[e])return e;var t,n=vr[e];for(t in n)if(n.hasOwnProperty(t)&&t in xr)return br[e]=n[t];return e}s&&(xr=document.createElement("div").style,"AnimationEvent"in window||(delete vr.animationend.animation,delete vr.animationiteration.animation,delete vr.animationstart.animation),"TransitionEvent"in window||delete vr.transitionend.transition);var Sr=wr("animationend"),Mr=wr("animationiteration"),kr=wr("animationstart"),Er=wr("transitionend"),Cr=new Map,Ar="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Dr(e,t){Cr.set(e,t),o(t,[e])}for(var qr=0;qr<Ar.length;qr++){var _r=Ar[qr];Dr(_r.toLowerCase(),"on"+(_r[0].toUpperCase()+_r.slice(1)))}Dr(Sr,"onAnimationEnd"),Dr(Mr,"onAnimationIteration"),Dr(kr,"onAnimationStart"),Dr("dblclick","onDoubleClick"),Dr("focusin","onFocus"),Dr("focusout","onBlur"),Dr(Er,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Tr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Nr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Tr));function Or(e,t,r){var i=e.type||"unknown-event";e.currentTarget=r,function(e,t,r,i,o,a,s,l,c){if(Re.apply(this,arguments),Ne){if(!Ne)throw Error(n(198));var u=Oe;Ne=!1,Oe=null,Ie||(Ie=!0,Le=u)}}(i,t,void 0,e),e.currentTarget=null}function Ir(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;Or(i,s,c),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;Or(i,s,c),o=l}}}if(Ie)throw e=Le,Ie=!1,Le=null,e}function Lr(e,t){var n=t[di];void 0===n&&(n=t[di]=new Set);var r=e+"__bubble";n.has(r)||(Fr(t,e,2,!1),n.add(r))}function Pr(e,t,n){var r=0;t&&(r|=4),Fr(n,e,r,t)}var Rr="_reactListening"+Math.random().toString(36).slice(2);function zr(e){if(!e[Rr]){e[Rr]=!0,r.forEach(function(t){"selectionchange"!==t&&(Nr.has(t)||Pr(t,!1,e),Pr(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Rr]||(t[Rr]=!0,Pr("selectionchange",!1,t))}}function Fr(e,t,n,r){switch(Ut(t)){case 1:var i=Vt;break;case 4:i=Ht;break;default:i=Bt}n=i.bind(null,t,n,e),i=void 0,!qe||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function jr(e,t,n,r,i){var o=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=hi(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}Ae(function(){var r=o,i=ye(n),a=[];e:{var s=Cr.get(e);if(void 0!==s){var l=an,c=e;switch(e){case"keypress":if(0===Zt(n))break e;case"keydown":case"keyup":l=Mn;break;case"focusin":c="focus",l=fn;break;case"focusout":c="blur",l=fn;break;case"beforeblur":case"afterblur":l=fn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=un;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=dn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=En;break;case Sr:case Mr:case kr:l=pn;break;case Er:l=Cn;break;case"scroll":l=ln;break;case"wheel":l=Dn;break;case"copy":case"cut":case"paste":l=mn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=kn}var u=!!(4&t),d=!u&&"scroll"===e,f=u?null!==s?s+"Capture":null:s;u=[];for(var p,h=r;null!==h;){var m=(p=h).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==f&&(null!=(m=De(h,f))&&u.push(Vr(h,m,p)))),d)break;h=h.return}0<u.length&&(s=new l(s,c,null,n,i),a.push({event:s,listeners:u}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===ge||!(c=n.relatedTarget||n.fromElement)||!hi(c)&&!c[ui])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?hi(c):null)&&(c!==(d=ze(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=un,m="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(u=kn,m="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==l?s:gi(l),p=null==c?s:gi(c),(s=new u(m,h+"leave",l,n,i)).target=d,s.relatedTarget=p,m=null,hi(i)===r&&((u=new u(f,h+"enter",c,n,i)).target=p,u.relatedTarget=d,m=u),d=m,l&&c)e:{for(f=c,h=0,p=u=l;p;p=Br(p))h++;for(p=0,m=f;m;m=Br(m))p++;for(;0<h-p;)u=Br(u),h--;for(;0<p-h;)f=Br(f),p--;for(;h--;){if(u===f||null!==f&&u===f.alternate)break e;u=Br(u),f=Br(f)}u=null}else u=null;null!==l&&$r(a,s,l,u,!1),null!==c&&null!==d&&$r(a,d,c,u,!0)}if("select"===(l=(s=r?gi(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=Un;else if(jn(s))if(Yn)g=nr;else{g=er;var y=Qn}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=tr);switch(g&&(g=g(e,r))?Vn(a,g,n,i):(y&&y(e,s,r),"focusout"===e&&(y=s._wrapperState)&&y.controlled&&"number"===s.type&&Z(s,"number",s.value)),y=r?gi(r):window,e){case"focusin":(jn(y)||"true"===y.contentEditable)&&(fr=y,pr=r,hr=null);break;case"focusout":hr=pr=fr=null;break;case"mousedown":mr=!0;break;case"contextmenu":case"mouseup":case"dragend":mr=!1,gr(a,n,i);break;case"selectionchange":if(dr)break;case"keydown":case"keyup":gr(a,n,i)}var v;if(_n)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else zn?Pn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(On&&"ko"!==n.locale&&(zn||"onCompositionStart"!==b?"onCompositionEnd"===b&&zn&&(v=Kt()):(Xt="value"in(Yt=i)?Yt.value:Yt.textContent,zn=!0)),0<(y=Hr(r,b)).length&&(b=new gn(b,e,null,n,i),a.push({event:b,listeners:y}),v?b.data=v:null!==(v=Rn(n))&&(b.data=v))),(v=Nn?function(e,t){switch(e){case"compositionend":return Rn(t);case"keypress":return 32!==t.which?null:(Ln=!0,In);case"textInput":return(e=t.data)===In&&Ln?null:e;default:return null}}(e,n):function(e,t){if(zn)return"compositionend"===e||!_n&&Pn(e,t)?(e=Kt(),Gt=Xt=Yt=null,zn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return On&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Hr(r,"onBeforeInput")).length&&(i=new gn("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=v))}Ir(a,t)})}function Vr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Hr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=De(e,n))&&r.unshift(Vr(e,o,i)),null!=(o=De(e,t))&&r.push(Vr(e,o,i))),e=e.return}return r}function Br(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function $r(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(l=De(n,o))&&a.unshift(Vr(n,l,s)):i||null!=(l=De(n,o))&&a.push(Vr(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Wr=/\r\n?/g,Ur=/\u0000|\uFFFD/g;function Yr(e){return("string"==typeof e?e:""+e).replace(Wr,"\n").replace(Ur,"")}function Xr(e,t,r){if(t=Yr(t),Yr(e)!==t&&r)throw Error(n(425))}function Gr(){}var Kr=null,Zr=null;function Jr(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Qr="function"==typeof setTimeout?setTimeout:void 0,ei="function"==typeof clearTimeout?clearTimeout:void 0,ti="function"==typeof Promise?Promise:void 0,ni="function"==typeof queueMicrotask?queueMicrotask:void 0!==ti?function(e){return ti.resolve(null).then(e).catch(ri)}:Qr;function ri(e){setTimeout(function(){throw e})}function ii(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void zt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);zt(t)}function oi(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ai(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var si=Math.random().toString(36).slice(2),li="__reactFiber$"+si,ci="__reactProps$"+si,ui="__reactContainer$"+si,di="__reactEvents$"+si,fi="__reactListeners$"+si,pi="__reactHandles$"+si;function hi(e){var t=e[li];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ui]||n[li]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ai(e);null!==e;){if(n=e[li])return n;e=ai(e)}return t}n=(e=n).parentNode}return null}function mi(e){return!(e=e[li]||e[ui])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function gi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(n(33))}function yi(e){return e[ci]||null}var vi=[],bi=-1;function xi(e){return{current:e}}function wi(e){0>bi||(e.current=vi[bi],vi[bi]=null,bi--)}function Si(e,t){bi++,vi[bi]=e.current,e.current=t}var Mi={},ki=xi(Mi),Ei=xi(!1),Ci=Mi;function Ai(e,t){var n=e.type.contextTypes;if(!n)return Mi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Di(e){return null!=(e=e.childContextTypes)}function qi(){wi(Ei),wi(ki)}function _i(e,t,r){if(ki.current!==Mi)throw Error(n(168));Si(ki,t),Si(Ei,r)}function Ti(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,"function"!=typeof i.getChildContext)return r;for(var o in i=i.getChildContext())if(!(o in t))throw Error(n(108,j(e)||"Unknown",o));return I({},r,i)}function Ni(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Mi,Ci=ki.current,Si(ki,e),Si(Ei,Ei.current),!0}function Oi(e,t,r){var i=e.stateNode;if(!i)throw Error(n(169));r?(e=Ti(e,t,Ci),i.__reactInternalMemoizedMergedChildContext=e,wi(Ei),wi(ki),Si(ki,e)):wi(Ei),Si(Ei,r)}var Ii=null,Li=!1,Pi=!1;function Ri(e){null===Ii?Ii=[e]:Ii.push(e)}function zi(){if(!Pi&&null!==Ii){Pi=!0;var e=0,t=mt;try{var n=Ii;for(mt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Ii=null,Li=!1}catch(t){throw null!==Ii&&(Ii=Ii.slice(e+1)),Be(Ge,zi),t}finally{mt=t,Pi=!1}}return null}var Fi=[],ji=0,Vi=null,Hi=0,Bi=[],$i=0,Wi=null,Ui=1,Yi="";function Xi(e,t){Fi[ji++]=Hi,Fi[ji++]=Vi,Vi=e,Hi=t}function Gi(e,t,n){Bi[$i++]=Ui,Bi[$i++]=Yi,Bi[$i++]=Wi,Wi=e;var r=Ui;e=Yi;var i=32-nt(r)-1;r&=~(1<<i),n+=1;var o=32-nt(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Ui=1<<32-nt(t)+i|n<<i|r,Yi=o+e}else Ui=1<<o|n<<i|r,Yi=e}function Ki(e){null!==e.return&&(Xi(e,1),Gi(e,1,0))}function Zi(e){for(;e===Vi;)Vi=Fi[--ji],Fi[ji]=null,Hi=Fi[--ji],Fi[ji]=null;for(;e===Wi;)Wi=Bi[--$i],Bi[$i]=null,Yi=Bi[--$i],Bi[$i]=null,Ui=Bi[--$i],Bi[$i]=null}var Ji=null,Qi=null,eo=!1,to=null;function no(e,t){var n=Ac(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function ro(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,Ji=e,Qi=oi(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,Ji=e,Qi=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Wi?{id:Ui,overflow:Yi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Ac(18,null,null,0)).stateNode=t,n.return=e,e.child=n,Ji=e,Qi=null,!0);default:return!1}}function io(e){return!(!(1&e.mode)||128&e.flags)}function oo(e){if(eo){var t=Qi;if(t){var r=t;if(!ro(e,t)){if(io(e))throw Error(n(418));t=oi(r.nextSibling);var i=Ji;t&&ro(e,t)?no(i,r):(e.flags=-4097&e.flags|2,eo=!1,Ji=e)}}else{if(io(e))throw Error(n(418));e.flags=-4097&e.flags|2,eo=!1,Ji=e}}}function ao(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Ji=e}function so(e){if(e!==Ji)return!1;if(!eo)return ao(e),eo=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!Jr(e.type,e.memoizedProps)),t&&(t=Qi)){if(io(e))throw lo(),Error(n(418));for(;t;)no(e,t),t=oi(t.nextSibling)}if(ao(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(n(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var r=e.data;if("/$"===r){if(0===t){Qi=oi(e.nextSibling);break e}t--}else"$"!==r&&"$!"!==r&&"$?"!==r||t++}e=e.nextSibling}Qi=null}}else Qi=Ji?oi(e.stateNode.nextSibling):null;return!0}function lo(){for(var e=Qi;e;)e=oi(e.nextSibling)}function co(){Qi=Ji=null,eo=!1}function uo(e){null===to?to=[e]:to.push(e)}var fo=y.ReactCurrentBatchConfig;function po(e,t,r){if(null!==(e=r.ref)&&"function"!=typeof e&&"object"!=typeof e){if(r._owner){if(r=r._owner){if(1!==r.tag)throw Error(n(309));var i=r.stateNode}if(!i)throw Error(n(147,e));var o=i,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=o.refs;null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!=typeof e)throw Error(n(284));if(!r._owner)throw Error(n(290,e))}return e}function ho(e,t){throw e=Object.prototype.toString.call(t),Error(n(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function mo(e){return(0,e._init)(e._payload)}function go(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function r(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=qc(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Oc(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function c(e,t,n,r){var i=n.type;return i===x?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"==typeof i&&null!==i&&i.$$typeof===q&&mo(i)===t.type)?((r=o(t,n.props)).ref=po(e,t,n),r.return=e,r):((r=_c(n.type,n.key,n.props,null,e.mode,r)).ref=po(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Ic(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function d(e,t,n,r,i){return null===t||7!==t.tag?((t=Tc(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function f(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Oc(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case v:return(n=_c(t.type,t.key,t.props,null,e.mode,n)).ref=po(e,null,t),n.return=e,n;case b:return(t=Ic(t,e.mode,n)).return=e,t;case q:return f(e,(0,t._init)(t._payload),n)}if(J(t)||N(t))return(t=Tc(t,e.mode,n,null)).return=e,t;ho(e,t)}return null}function p(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case v:return n.key===i?c(e,t,n,r):null;case b:return n.key===i?u(e,t,n,r):null;case q:return p(e,t,(i=n._init)(n._payload),r)}if(J(n)||N(n))return null!==i?null:d(e,t,n,r,null);ho(e,n)}return null}function h(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case v:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case b:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case q:return h(e,t,n,(0,r._init)(r._payload),i)}if(J(r)||N(r))return d(t,e=e.get(n)||null,r,i,null);ho(t,r)}return null}function m(n,o,s,l){for(var c=null,u=null,d=o,m=o=0,g=null;null!==d&&m<s.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var y=p(n,d,s[m],l);if(null===y){null===d&&(d=g);break}e&&d&&null===y.alternate&&t(n,d),o=a(y,o,m),null===u?c=y:u.sibling=y,u=y,d=g}if(m===s.length)return r(n,d),eo&&Xi(n,m),c;if(null===d){for(;m<s.length;m++)null!==(d=f(n,s[m],l))&&(o=a(d,o,m),null===u?c=d:u.sibling=d,u=d);return eo&&Xi(n,m),c}for(d=i(n,d);m<s.length;m++)null!==(g=h(d,n,m,s[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),o=a(g,o,m),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(n,e)}),eo&&Xi(n,m),c}function g(o,s,l,c){var u=N(l);if("function"!=typeof u)throw Error(n(150));if(null==(l=u.call(l)))throw Error(n(151));for(var d=u=null,m=s,g=s=0,y=null,v=l.next();null!==m&&!v.done;g++,v=l.next()){m.index>g?(y=m,m=null):y=m.sibling;var b=p(o,m,v.value,c);if(null===b){null===m&&(m=y);break}e&&m&&null===b.alternate&&t(o,m),s=a(b,s,g),null===d?u=b:d.sibling=b,d=b,m=y}if(v.done)return r(o,m),eo&&Xi(o,g),u;if(null===m){for(;!v.done;g++,v=l.next())null!==(v=f(o,v.value,c))&&(s=a(v,s,g),null===d?u=v:d.sibling=v,d=v);return eo&&Xi(o,g),u}for(m=i(o,m);!v.done;g++,v=l.next())null!==(v=h(m,o,g,v.value,c))&&(e&&null!==v.alternate&&m.delete(null===v.key?g:v.key),s=a(v,s,g),null===d?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(o,e)}),eo&&Xi(o,g),u}return function e(n,i,a,l){if("object"==typeof a&&null!==a&&a.type===x&&null===a.key&&(a=a.props.children),"object"==typeof a&&null!==a){switch(a.$$typeof){case v:e:{for(var c=a.key,u=i;null!==u;){if(u.key===c){if((c=a.type)===x){if(7===u.tag){r(n,u.sibling),(i=o(u,a.props.children)).return=n,n=i;break e}}else if(u.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===q&&mo(c)===u.type){r(n,u.sibling),(i=o(u,a.props)).ref=po(n,u,a),i.return=n,n=i;break e}r(n,u);break}t(n,u),u=u.sibling}a.type===x?((i=Tc(a.props.children,n.mode,l,a.key)).return=n,n=i):((l=_c(a.type,a.key,a.props,null,n.mode,l)).ref=po(n,i,a),l.return=n,n=l)}return s(n);case b:e:{for(u=a.key;null!==i;){if(i.key===u){if(4===i.tag&&i.stateNode.containerInfo===a.containerInfo&&i.stateNode.implementation===a.implementation){r(n,i.sibling),(i=o(i,a.children||[])).return=n,n=i;break e}r(n,i);break}t(n,i),i=i.sibling}(i=Ic(a,n.mode,l)).return=n,n=i}return s(n);case q:return e(n,i,(u=a._init)(a._payload),l)}if(J(a))return m(n,i,a,l);if(N(a))return g(n,i,a,l);ho(n,a)}return"string"==typeof a&&""!==a||"number"==typeof a?(a=""+a,null!==i&&6===i.tag?(r(n,i.sibling),(i=o(i,a)).return=n,n=i):(r(n,i),(i=Oc(a,n.mode,l)).return=n,n=i),s(n)):r(n,i)}}var yo=go(!0),vo=go(!1),bo=xi(null),xo=null,wo=null,So=null;function Mo(){So=wo=xo=null}function ko(e){var t=bo.current;wi(bo),e._currentValue=t}function Eo(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Co(e,t){xo=e,So=wo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(ms=!0),e.firstContext=null)}function Ao(e){var t=e._currentValue;if(So!==e)if(e={context:e,memoizedValue:t,next:null},null===wo){if(null===xo)throw Error(n(308));wo=e,xo.dependencies={lanes:0,firstContext:e}}else wo=wo.next=e;return t}var Do=null;function qo(e){null===Do?Do=[e]:Do.push(e)}function _o(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,qo(t)):(n.next=i.next,i.next=n),t.interleaved=n,To(e,r)}function To(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var No=!1;function Oo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Io(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Lo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Po(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&kl){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,To(e,n)}return null===(i=r.interleaved)?(t.next=t,qo(r)):(t.next=i.next,i.next=t),r.interleaved=t,To(e,n)}function Ro(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,ht(e,n)}}function zo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Fo(e,t,n,r){var i=e.updateQueue;No=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?o=c:a.next=c,a=l;var u=e.alternate;null!==u&&((s=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(null!==o){var d=i.baseState;for(a=0,u=c=l=null,s=o;;){var f=s.lane,p=s.eventTime;if((r&f)===f){null!==u&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,m=s;switch(f=t,p=n,m.tag){case 1:if("function"==typeof(h=m.payload)){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(f="function"==typeof(h=m.payload)?h.call(p,d,f):h))break e;d=I({},d,f);break e;case 2:No=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=i.effects)?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=p,l=d):u=u.next=p,a|=f;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(f=s).next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}if(null===u&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Nl|=a,e.lanes=a,e.memoizedState=d}}function jo(e,t,r){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var i=e[t],o=i.callback;if(null!==o){if(i.callback=null,i=r,"function"!=typeof o)throw Error(n(191,o));o.call(i)}}}var Vo={},Ho=xi(Vo),Bo=xi(Vo),$o=xi(Vo);function Wo(e){if(e===Vo)throw Error(n(174));return e}function Uo(e,t){switch(Si($o,t),Si(Bo,e),Si(Ho,Vo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:oe(null,"");break;default:t=oe(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}wi(Ho),Si(Ho,t)}function Yo(){wi(Ho),wi(Bo),wi($o)}function Xo(e){Wo($o.current);var t=Wo(Ho.current),n=oe(t,e.type);t!==n&&(Si(Bo,e),Si(Ho,n))}function Go(e){Bo.current===e&&(wi(Ho),wi(Bo))}var Ko=xi(0);function Zo(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Jo=[];function Qo(){for(var e=0;e<Jo.length;e++)Jo[e]._workInProgressVersionPrimary=null;Jo.length=0}var ea=y.ReactCurrentDispatcher,ta=y.ReactCurrentBatchConfig,na=0,ra=null,ia=null,oa=null,aa=!1,sa=!1,la=0,ca=0;function ua(){throw Error(n(321))}function da(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!rr(e[n],t[n]))return!1;return!0}function fa(e,t,r,i,o,a){if(na=a,ra=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ea.current=null===e||null===e.memoizedState?Ga:Ka,e=r(i,o),sa){a=0;do{if(sa=!1,la=0,25<=a)throw Error(n(301));a+=1,oa=ia=null,t.updateQueue=null,ea.current=Za,e=r(i,o)}while(sa)}if(ea.current=Xa,t=null!==ia&&null!==ia.next,na=0,oa=ia=ra=null,aa=!1,t)throw Error(n(300));return e}function pa(){var e=0!==la;return la=0,e}function ha(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===oa?ra.memoizedState=oa=e:oa=oa.next=e,oa}function ma(){if(null===ia){var e=ra.alternate;e=null!==e?e.memoizedState:null}else e=ia.next;var t=null===oa?ra.memoizedState:oa.next;if(null!==t)oa=t,ia=e;else{if(null===e)throw Error(n(310));e={memoizedState:(ia=e).memoizedState,baseState:ia.baseState,baseQueue:ia.baseQueue,queue:ia.queue,next:null},null===oa?ra.memoizedState=oa=e:oa=oa.next=e}return oa}function ga(e,t){return"function"==typeof t?t(e):t}function ya(e){var t=ma(),r=t.queue;if(null===r)throw Error(n(311));r.lastRenderedReducer=e;var i=ia,o=i.baseQueue,a=r.pending;if(null!==a){if(null!==o){var s=o.next;o.next=a.next,a.next=s}i.baseQueue=o=a,r.pending=null}if(null!==o){a=o.next,i=i.baseState;var l=s=null,c=null,u=a;do{var d=u.lane;if((na&d)===d)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:e(i,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=f,s=i):c=c.next=f,ra.lanes|=d,Nl|=d}u=u.next}while(null!==u&&u!==a);null===c?s=i:c.next=l,rr(i,t.memoizedState)||(ms=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=c,r.lastRenderedState=i}if(null!==(e=r.interleaved)){o=e;do{a=o.lane,ra.lanes|=a,Nl|=a,o=o.next}while(o!==e)}else null===o&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function va(e){var t=ma(),r=t.queue;if(null===r)throw Error(n(311));r.lastRenderedReducer=e;var i=r.dispatch,o=r.pending,a=t.memoizedState;if(null!==o){r.pending=null;var s=o=o.next;do{a=e(a,s.action),s=s.next}while(s!==o);rr(a,t.memoizedState)||(ms=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),r.lastRenderedState=a}return[a,i]}function ba(){}function xa(e,t){var r=ra,i=ma(),o=t(),a=!rr(i.memoizedState,o);if(a&&(i.memoizedState=o,ms=!0),i=i.queue,Na(Ma.bind(null,r,i,e),[e]),i.getSnapshot!==t||a||null!==oa&&1&oa.memoizedState.tag){if(r.flags|=2048,Aa(9,Sa.bind(null,r,i,o,t),void 0,null),null===El)throw Error(n(349));30&na||wa(r,t,o)}return o}function wa(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=ra.updateQueue)?(t={lastEffect:null,stores:null},ra.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Sa(e,t,n,r){t.value=n,t.getSnapshot=r,ka(t)&&Ea(e)}function Ma(e,t,n){return n(function(){ka(t)&&Ea(e)})}function ka(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!rr(e,n)}catch(e){return!0}}function Ea(e){var t=To(e,1);null!==t&&Jl(t,e,1,-1)}function Ca(e){var t=ha();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:e},t.queue=e,e=e.dispatch=$a.bind(null,ra,e),[t.memoizedState,e]}function Aa(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ra.updateQueue)?(t={lastEffect:null,stores:null},ra.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Da(){return ma().memoizedState}function qa(e,t,n,r){var i=ha();ra.flags|=e,i.memoizedState=Aa(1|t,n,void 0,void 0===r?null:r)}function _a(e,t,n,r){var i=ma();r=void 0===r?null:r;var o=void 0;if(null!==ia){var a=ia.memoizedState;if(o=a.destroy,null!==r&&da(r,a.deps))return void(i.memoizedState=Aa(t,n,o,r))}ra.flags|=e,i.memoizedState=Aa(1|t,n,o,r)}function Ta(e,t){return qa(8390656,8,e,t)}function Na(e,t){return _a(2048,8,e,t)}function Oa(e,t){return _a(4,2,e,t)}function Ia(e,t){return _a(4,4,e,t)}function La(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Pa(e,t,n){return n=null!=n?n.concat([e]):null,_a(4,4,La.bind(null,t,e),n)}function Ra(){}function za(e,t){var n=ma();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&da(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Fa(e,t){var n=ma();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&da(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ja(e,t,n){return 21&na?(rr(n,t)||(n=dt(),ra.lanes|=n,Nl|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ms=!0),e.memoizedState=n)}function Va(e,t){var n=mt;mt=0!==n&&4>n?n:4,e(!0);var r=ta.transition;ta.transition={};try{e(!1),t()}finally{mt=n,ta.transition=r}}function Ha(){return ma().memoizedState}function Ba(e,t,n){var r=Zl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Wa(e))Ua(t,n);else if(null!==(n=_o(e,t,n,r))){Jl(n,e,r,Kl()),Ya(n,t,r)}}function $a(e,t,n){var r=Zl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Wa(e))Ua(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,rr(s,a)){var l=t.interleaved;return null===l?(i.next=i,qo(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=_o(e,t,i,r))&&(Jl(n,e,r,i=Kl()),Ya(n,t,r))}}function Wa(e){var t=e.alternate;return e===ra||null!==t&&t===ra}function Ua(e,t){sa=aa=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ya(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,ht(e,n)}}var Xa={readContext:Ao,useCallback:ua,useContext:ua,useEffect:ua,useImperativeHandle:ua,useInsertionEffect:ua,useLayoutEffect:ua,useMemo:ua,useReducer:ua,useRef:ua,useState:ua,useDebugValue:ua,useDeferredValue:ua,useTransition:ua,useMutableSource:ua,useSyncExternalStore:ua,useId:ua,unstable_isNewReconciler:!1},Ga={readContext:Ao,useCallback:function(e,t){return ha().memoizedState=[e,void 0===t?null:t],e},useContext:Ao,useEffect:Ta,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,qa(4194308,4,La.bind(null,t,e),n)},useLayoutEffect:function(e,t){return qa(4194308,4,e,t)},useInsertionEffect:function(e,t){return qa(4,2,e,t)},useMemo:function(e,t){var n=ha();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ha();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ba.bind(null,ra,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ha().memoizedState=e},useState:Ca,useDebugValue:Ra,useDeferredValue:function(e){return ha().memoizedState=e},useTransition:function(){var e=Ca(!1),t=e[0];return e=Va.bind(null,e[1]),ha().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=ra,o=ha();if(eo){if(void 0===r)throw Error(n(407));r=r()}else{if(r=t(),null===El)throw Error(n(349));30&na||wa(i,t,r)}o.memoizedState=r;var a={value:r,getSnapshot:t};return o.queue=a,Ta(Ma.bind(null,i,a,e),[e]),i.flags|=2048,Aa(9,Sa.bind(null,i,a,r,t),void 0,null),r},useId:function(){var e=ha(),t=El.identifierPrefix;if(eo){var n=Yi;t=":"+t+"R"+(n=(Ui&~(1<<32-nt(Ui)-1)).toString(32)+n),0<(n=la++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=ca++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Ka={readContext:Ao,useCallback:za,useContext:Ao,useEffect:Na,useImperativeHandle:Pa,useInsertionEffect:Oa,useLayoutEffect:Ia,useMemo:Fa,useReducer:ya,useRef:Da,useState:function(){return ya(ga)},useDebugValue:Ra,useDeferredValue:function(e){return ja(ma(),ia.memoizedState,e)},useTransition:function(){return[ya(ga)[0],ma().memoizedState]},useMutableSource:ba,useSyncExternalStore:xa,useId:Ha,unstable_isNewReconciler:!1},Za={readContext:Ao,useCallback:za,useContext:Ao,useEffect:Na,useImperativeHandle:Pa,useInsertionEffect:Oa,useLayoutEffect:Ia,useMemo:Fa,useReducer:va,useRef:Da,useState:function(){return va(ga)},useDebugValue:Ra,useDeferredValue:function(e){var t=ma();return null===ia?t.memoizedState=e:ja(t,ia.memoizedState,e)},useTransition:function(){return[va(ga)[0],ma().memoizedState]},useMutableSource:ba,useSyncExternalStore:xa,useId:Ha,unstable_isNewReconciler:!1};function Ja(e,t){if(e&&e.defaultProps){for(var n in t=I({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function Qa(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:I({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var es={isMounted:function(e){return!!(e=e._reactInternals)&&ze(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Kl(),i=Zl(e),o=Lo(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=Po(e,o,i))&&(Jl(t,e,i,r),Ro(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Kl(),i=Zl(e),o=Lo(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=Po(e,o,i))&&(Jl(t,e,i,r),Ro(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Kl(),r=Zl(e),i=Lo(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=Po(e,i,r))&&(Jl(t,e,r,n),Ro(t,e,r))}};function ts(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!ir(n,r)||!ir(i,o))}function ns(e,t,n){var r=!1,i=Mi,o=t.contextType;return"object"==typeof o&&null!==o?o=Ao(o):(i=Di(t)?Ci:ki.current,o=(r=null!=(r=t.contextTypes))?Ai(e,i):Mi),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=es,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function rs(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&es.enqueueReplaceState(t,t.state,null)}function is(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Oo(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=Ao(o):(o=Di(t)?Ci:ki.current,i.context=Ai(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(Qa(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&es.enqueueReplaceState(i,i.state,null),Fo(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function os(e,t){try{var n="",r=t;do{n+=z(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function as(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ss(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var ls="function"==typeof WeakMap?WeakMap:Map;function cs(e,t,n){(n=Lo(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){jl||(jl=!0,Vl=r),ss(0,t)},n}function us(e,t,n){(n=Lo(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ss(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){ss(0,t),"function"!=typeof r&&(null===Hl?Hl=new Set([this]):Hl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ds(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ls;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=wc.bind(null,e,t,n),t.then(e,e))}function fs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ps(e,t,n,r,i){return 1&e.mode?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Lo(-1,1)).tag=2,Po(n,t,1))),n.lanes|=1),e)}var hs=y.ReactCurrentOwner,ms=!1;function gs(e,t,n,r){t.child=null===e?vo(t,null,n,r):yo(t,e.child,n,r)}function ys(e,t,n,r,i){n=n.render;var o=t.ref;return Co(t,i),r=fa(e,t,n,r,o,i),n=pa(),null===e||ms?(eo&&n&&Ki(t),t.flags|=1,gs(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,js(e,t,i))}function vs(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||Dc(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=_c(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,bs(e,t,o,r,i))}if(o=e.child,0===(e.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:ir)(a,r)&&e.ref===t.ref)return js(e,t,i)}return t.flags|=1,(e=qc(o,r)).ref=t.ref,e.return=t,t.child=e}function bs(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(ir(o,r)&&e.ref===t.ref){if(ms=!1,t.pendingProps=r=o,0===(e.lanes&i))return t.lanes=e.lanes,js(e,t,i);131072&e.flags&&(ms=!0)}}return Ss(e,t,n,r,i)}function xs(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Si(ql,Dl),Dl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,Si(ql,Dl),Dl|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Si(ql,Dl),Dl|=n;else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,Si(ql,Dl),Dl|=r;return gs(e,t,i,n),t.child}function ws(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ss(e,t,n,r,i){var o=Di(n)?Ci:ki.current;return o=Ai(t,o),Co(t,i),n=fa(e,t,n,r,o,i),r=pa(),null===e||ms?(eo&&r&&Ki(t),t.flags|=1,gs(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,js(e,t,i))}function Ms(e,t,n,r,i){if(Di(n)){var o=!0;Ni(t)}else o=!1;if(Co(t,i),null===t.stateNode)Fs(e,t),ns(t,n,r),is(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"==typeof c&&null!==c?c=Ao(c):c=Ai(t,c=Di(n)?Ci:ki.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==c)&&rs(t,a,r,c),No=!1;var f=t.memoizedState;a.state=f,Fo(t,r,a,i),l=t.memoizedState,s!==r||f!==l||Ei.current||No?("function"==typeof u&&(Qa(t,n,u,r),l=t.memoizedState),(s=No||ts(t,n,s,r,f,l,c))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Io(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Ja(t.type,s),a.props=c,d=t.pendingProps,f=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=Ao(l):l=Ai(t,l=Di(n)?Ci:ki.current);var p=n.getDerivedStateFromProps;(u="function"==typeof p||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||f!==l)&&rs(t,a,r,l),No=!1,f=t.memoizedState,a.state=f,Fo(t,r,a,i);var h=t.memoizedState;s!==d||f!==h||Ei.current||No?("function"==typeof p&&(Qa(t,n,p,r),h=t.memoizedState),(c=No||ts(t,n,c,r,f,h,l)||!1)?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=l,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return ks(e,t,n,r,o,i)}function ks(e,t,n,r,i,o){ws(e,t);var a=!!(128&t.flags);if(!r&&!a)return i&&Oi(t,n,!1),js(e,t,o);r=t.stateNode,hs.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=yo(t,e.child,null,o),t.child=yo(t,null,s,o)):gs(e,t,s,o),t.memoizedState=r.state,i&&Oi(t,n,!0),t.child}function Es(e){var t=e.stateNode;t.pendingContext?_i(0,t.pendingContext,t.pendingContext!==t.context):t.context&&_i(0,t.context,!1),Uo(e,t.containerInfo)}function Cs(e,t,n,r,i){return co(),uo(i),t.flags|=256,gs(e,t,n,r),t.child}var As,Ds,qs,_s,Ts={dehydrated:null,treeContext:null,retryLane:0};function Ns(e){return{baseLanes:e,cachePool:null,transitions:null}}function Os(e,t,r){var i,o=t.pendingProps,a=Ko.current,s=!1,l=!!(128&t.flags);if((i=l)||(i=(null===e||null!==e.memoizedState)&&!!(2&a)),i?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Si(Ko,1&a),null===e)return oo(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=o.children,e=o.fallback,s?(o=t.mode,s=t.child,l={mode:"hidden",children:l},1&o||null===s?s=Nc(l,o,0,null):(s.childLanes=0,s.pendingProps=l),e=Tc(e,o,r,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Ns(r),t.memoizedState=Ts,e):Is(t,l));if(null!==(a=e.memoizedState)&&null!==(i=a.dehydrated))return function(e,t,r,i,o,a,s){if(r)return 256&t.flags?(t.flags&=-257,Ls(e,t,s,i=as(Error(n(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=i.fallback,o=t.mode,i=Nc({mode:"visible",children:i.children},o,0,null),(a=Tc(a,o,s,null)).flags|=2,i.return=t,a.return=t,i.sibling=a,t.child=i,1&t.mode&&yo(t,e.child,null,s),t.child.memoizedState=Ns(s),t.memoizedState=Ts,a);if(!(1&t.mode))return Ls(e,t,s,null);if("$!"===o.data){if(i=o.nextSibling&&o.nextSibling.dataset)var l=i.dgst;return i=l,Ls(e,t,s,i=as(a=Error(n(419)),i,void 0))}if(l=0!==(s&e.childLanes),ms||l){if(null!==(i=El)){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!==(o&(i.suspendedLanes|s))?0:o)&&o!==a.retryLane&&(a.retryLane=o,To(e,o),Jl(i,e,o,-1))}return dc(),Ls(e,t,s,i=as(Error(n(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Mc.bind(null,e),o._reactRetry=t,null):(e=a.treeContext,Qi=oi(o.nextSibling),Ji=t,eo=!0,to=null,null!==e&&(Bi[$i++]=Ui,Bi[$i++]=Yi,Bi[$i++]=Wi,Ui=e.id,Yi=e.overflow,Wi=t),t=Is(t,i.children),t.flags|=4096,t)}(e,t,l,o,i,a,r);if(s){s=o.fallback,l=t.mode,i=(a=e.child).sibling;var c={mode:"hidden",children:o.children};return 1&l||t.child===a?(o=qc(a,c)).subtreeFlags=14680064&a.subtreeFlags:((o=t.child).childLanes=0,o.pendingProps=c,t.deletions=null),null!==i?s=qc(i,s):(s=Tc(s,l,r,null)).flags|=2,s.return=t,o.return=t,o.sibling=s,t.child=o,o=s,s=t.child,l=null===(l=e.child.memoizedState)?Ns(r):{baseLanes:l.baseLanes|r,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~r,t.memoizedState=Ts,o}return e=(s=e.child).sibling,o=qc(s,{mode:"visible",children:o.children}),!(1&t.mode)&&(o.lanes=r),o.return=t,o.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=o,t.memoizedState=null,o}function Is(e,t){return(t=Nc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Ls(e,t,n,r){return null!==r&&uo(r),yo(t,e.child,null,n),(e=Is(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ps(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Eo(e.return,t,n)}function Rs(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function zs(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(gs(e,t,r.children,n),2&(r=Ko.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ps(e,n,t);else if(19===e.tag)Ps(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Si(Ko,r),1&t.mode)switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Zo(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Rs(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Zo(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Rs(t,!0,n,null,o);break;case"together":Rs(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Fs(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function js(e,t,r){if(null!==e&&(t.dependencies=e.dependencies),Nl|=t.lanes,0===(r&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(n(153));if(null!==t.child){for(r=qc(e=t.child,e.pendingProps),t.child=r,r.return=t;null!==e.sibling;)e=e.sibling,(r=r.sibling=qc(e,e.pendingProps)).return=t;r.sibling=null}return t.child}function Vs(e,t){if(!eo)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Hs(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Bs(e,t,r){var o=t.pendingProps;switch(Zi(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Hs(t),null;case 1:case 17:return Di(t.type)&&qi(),Hs(t),null;case 3:return o=t.stateNode,Yo(),wi(Ei),wi(ki),Qo(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),null!==e&&null!==e.child||(so(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==to&&(nc(to),to=null))),Ds(e,t),Hs(t),null;case 5:Go(t);var a=Wo($o.current);if(r=t.type,null!==e&&null!=t.stateNode)qs(e,t,r,o,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(null===t.stateNode)throw Error(n(166));return Hs(t),null}if(e=Wo(Ho.current),so(t)){o=t.stateNode,r=t.type;var s=t.memoizedProps;switch(o[li]=t,o[ci]=s,e=!!(1&t.mode),r){case"dialog":Lr("cancel",o),Lr("close",o);break;case"iframe":case"object":case"embed":Lr("load",o);break;case"video":case"audio":for(a=0;a<Tr.length;a++)Lr(Tr[a],o);break;case"source":Lr("error",o);break;case"img":case"image":case"link":Lr("error",o),Lr("load",o);break;case"details":Lr("toggle",o);break;case"input":Y(o,s),Lr("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!s.multiple},Lr("invalid",o);break;case"textarea":te(o,s),Lr("invalid",o)}for(var l in he(r,s),a=null,s)if(s.hasOwnProperty(l)){var c=s[l];"children"===l?"string"==typeof c?o.textContent!==c&&(!0!==s.suppressHydrationWarning&&Xr(o.textContent,c,e),a=["children",c]):"number"==typeof c&&o.textContent!==""+c&&(!0!==s.suppressHydrationWarning&&Xr(o.textContent,c,e),a=["children",""+c]):i.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&Lr("scroll",o)}switch(r){case"input":B(o),K(o,s,!0);break;case"textarea":B(o),re(o);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(o.onclick=Gr)}o=a,t.updateQueue=o,null!==o&&(t.flags|=4)}else{l=9===a.nodeType?a:a.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=ie(r)),"http://www.w3.org/1999/xhtml"===e?"script"===r?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof o.is?e=l.createElement(r,{is:o.is}):(e=l.createElement(r),"select"===r&&(l=e,o.multiple?l.multiple=!0:o.size&&(l.size=o.size))):e=l.createElementNS(e,r),e[li]=t,e[ci]=o,As(e,t,!1,!1),t.stateNode=e;e:{switch(l=me(r,o),r){case"dialog":Lr("cancel",e),Lr("close",e),a=o;break;case"iframe":case"object":case"embed":Lr("load",e),a=o;break;case"video":case"audio":for(a=0;a<Tr.length;a++)Lr(Tr[a],e);a=o;break;case"source":Lr("error",e),a=o;break;case"img":case"image":case"link":Lr("error",e),Lr("load",e),a=o;break;case"details":Lr("toggle",e),a=o;break;case"input":Y(e,o),a=U(e,o),Lr("invalid",e);break;case"option":default:a=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},a=I({},o,{value:void 0}),Lr("invalid",e);break;case"textarea":te(e,o),a=ee(e,o),Lr("invalid",e)}for(s in he(r,a),c=a)if(c.hasOwnProperty(s)){var u=c[s];"style"===s?fe(e,u):"dangerouslySetInnerHTML"===s?null!=(u=u?u.__html:void 0)&&se(e,u):"children"===s?"string"==typeof u?("textarea"!==r||""!==u)&&le(e,u):"number"==typeof u&&le(e,""+u):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(i.hasOwnProperty(s)?null!=u&&"onScroll"===s&&Lr("scroll",e):null!=u&&g(e,s,u,l))}switch(r){case"input":B(e),K(e,o,!1);break;case"textarea":B(e),re(e);break;case"option":null!=o.value&&e.setAttribute("value",""+V(o.value));break;case"select":e.multiple=!!o.multiple,null!=(s=o.value)?Q(e,!!o.multiple,s,!1):null!=o.defaultValue&&Q(e,!!o.multiple,o.defaultValue,!0);break;default:"function"==typeof a.onClick&&(e.onclick=Gr)}switch(r){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Hs(t),null;case 6:if(e&&null!=t.stateNode)_s(e,t,e.memoizedProps,o);else{if("string"!=typeof o&&null===t.stateNode)throw Error(n(166));if(r=Wo($o.current),Wo(Ho.current),so(t)){if(o=t.stateNode,r=t.memoizedProps,o[li]=t,(s=o.nodeValue!==r)&&null!==(e=Ji))switch(e.tag){case 3:Xr(o.nodeValue,r,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Xr(o.nodeValue,r,!!(1&e.mode))}s&&(t.flags|=4)}else(o=(9===r.nodeType?r:r.ownerDocument).createTextNode(o))[li]=t,t.stateNode=o}return Hs(t),null;case 13:if(wi(Ko),o=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(eo&&null!==Qi&&1&t.mode&&!(128&t.flags))lo(),co(),t.flags|=98560,s=!1;else if(s=so(t),null!==o&&null!==o.dehydrated){if(null===e){if(!s)throw Error(n(318));if(!(s=null!==(s=t.memoizedState)?s.dehydrated:null))throw Error(n(317));s[li]=t}else co(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Hs(t),s=!1}else null!==to&&(nc(to),to=null),s=!0;if(!s)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=r,t):((o=null!==o)!==(null!==e&&null!==e.memoizedState)&&o&&(t.child.flags|=8192,1&t.mode&&(null===e||1&Ko.current?0===_l&&(_l=3):dc())),null!==t.updateQueue&&(t.flags|=4),Hs(t),null);case 4:return Yo(),Ds(e,t),null===e&&zr(t.stateNode.containerInfo),Hs(t),null;case 10:return ko(t.type._context),Hs(t),null;case 19:if(wi(Ko),null===(s=t.memoizedState))return Hs(t),null;if(o=!!(128&t.flags),null===(l=s.rendering))if(o)Vs(s,!1);else{if(0!==_l||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(l=Zo(e))){for(t.flags|=128,Vs(s,!1),null!==(o=l.updateQueue)&&(t.updateQueue=o,t.flags|=4),t.subtreeFlags=0,o=r,r=t.child;null!==r;)e=o,(s=r).flags&=14680066,null===(l=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,e=l.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Si(Ko,1&Ko.current|2),t.child}e=e.sibling}null!==s.tail&&Ye()>zl&&(t.flags|=128,o=!0,Vs(s,!1),t.lanes=4194304)}else{if(!o)if(null!==(e=Zo(l))){if(t.flags|=128,o=!0,null!==(r=e.updateQueue)&&(t.updateQueue=r,t.flags|=4),Vs(s,!0),null===s.tail&&"hidden"===s.tailMode&&!l.alternate&&!eo)return Hs(t),null}else 2*Ye()-s.renderingStartTime>zl&&1073741824!==r&&(t.flags|=128,o=!0,Vs(s,!1),t.lanes=4194304);s.isBackwards?(l.sibling=t.child,t.child=l):(null!==(r=s.last)?r.sibling=l:t.child=l,s.last=l)}return null!==s.tail?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ye(),t.sibling=null,r=Ko.current,Si(Ko,o?1&r|2:1&r),t):(Hs(t),null);case 22:case 23:return sc(),o=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==o&&(t.flags|=8192),o&&1&t.mode?!!(1073741824&Dl)&&(Hs(t),6&t.subtreeFlags&&(t.flags|=8192)):Hs(t),null;case 24:case 25:return null}throw Error(n(156,t.tag))}function $s(e,t){switch(Zi(t),t.tag){case 1:return Di(t.type)&&qi(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Yo(),wi(Ei),wi(ki),Qo(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return Go(t),null;case 13:if(wi(Ko),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(n(340));co()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return wi(Ko),null;case 4:return Yo(),null;case 10:return ko(t.type._context),null;case 22:case 23:return sc(),null;default:return null}}As=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ds=function(){},qs=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Wo(Ho.current);var a,s=null;switch(n){case"input":o=U(e,o),r=U(e,r),s=[];break;case"select":o=I({},o,{value:void 0}),r=I({},r,{value:void 0}),s=[];break;case"textarea":o=ee(e,o),r=ee(e,r),s=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=Gr)}for(u in he(n,r),n=null,o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&null!=o[u])if("style"===u){var l=o[u];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(i.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var c=r[u];if(l=null!=o?o[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(a in l)!l.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&l[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(s||(s=[]),s.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(s=s||[]).push(u,c)):"children"===u?"string"!=typeof c&&"number"!=typeof c||(s=s||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(i.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&Lr("scroll",e),s||l===c||(s=[])):(s=s||[]).push(u,c))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}},_s=function(e,t,n,r){n!==r&&(t.flags|=4)};var Ws=!1,Us=!1,Ys="function"==typeof WeakSet?WeakSet:Set,Xs=null;function Gs(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){xc(e,t,n)}else n.current=null}function Ks(e,t,n){try{n()}catch(n){xc(e,t,n)}}var Zs=!1;function Js(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&Ks(t,n,o)}i=i.next}while(i!==r)}}function Qs(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function el(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function tl(e){var t=e.alternate;null!==t&&(e.alternate=null,tl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[li],delete t[ci],delete t[di],delete t[fi],delete t[pi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function nl(e){return 5===e.tag||3===e.tag||4===e.tag}function rl(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||nl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function il(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Gr));else if(4!==r&&null!==(e=e.child))for(il(e,t,n),e=e.sibling;null!==e;)il(e,t,n),e=e.sibling}function ol(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ol(e,t,n),e=e.sibling;null!==e;)ol(e,t,n),e=e.sibling}var al=null,sl=!1;function ll(e,t,n){for(n=n.child;null!==n;)cl(e,t,n),n=n.sibling}function cl(e,t,n){if(tt&&"function"==typeof tt.onCommitFiberUnmount)try{tt.onCommitFiberUnmount(et,n)}catch(e){}switch(n.tag){case 5:Us||Gs(n,t);case 6:var r=al,i=sl;al=null,ll(e,t,n),sl=i,null!==(al=r)&&(sl?(e=al,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):al.removeChild(n.stateNode));break;case 18:null!==al&&(sl?(e=al,n=n.stateNode,8===e.nodeType?ii(e.parentNode,n):1===e.nodeType&&ii(e,n),zt(e)):ii(al,n.stateNode));break;case 4:r=al,i=sl,al=n.stateNode.containerInfo,sl=!0,ll(e,t,n),al=r,sl=i;break;case 0:case 11:case 14:case 15:if(!Us&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(2&o||4&o)&&Ks(n,t,a),i=i.next}while(i!==r)}ll(e,t,n);break;case 1:if(!Us&&(Gs(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){xc(n,t,e)}ll(e,t,n);break;case 21:ll(e,t,n);break;case 22:1&n.mode?(Us=(r=Us)||null!==n.memoizedState,ll(e,t,n),Us=r):ll(e,t,n);break;default:ll(e,t,n)}}function ul(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ys),t.forEach(function(t){var r=kc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function dl(e,t){var r=t.deletions;if(null!==r)for(var i=0;i<r.length;i++){var o=r[i];try{var a=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:al=l.stateNode,sl=!1;break e;case 3:case 4:al=l.stateNode.containerInfo,sl=!0;break e}l=l.return}if(null===al)throw Error(n(160));cl(a,s,o),al=null,sl=!1;var c=o.alternate;null!==c&&(c.return=null),o.return=null}catch(e){xc(o,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)fl(t,e),t=t.sibling}function fl(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(dl(t,e),pl(e),4&i){try{Js(3,e,e.return),Qs(3,e)}catch(t){xc(e,e.return,t)}try{Js(5,e,e.return)}catch(t){xc(e,e.return,t)}}break;case 1:dl(t,e),pl(e),512&i&&null!==r&&Gs(r,r.return);break;case 5:if(dl(t,e),pl(e),512&i&&null!==r&&Gs(r,r.return),32&e.flags){var o=e.stateNode;try{le(o,"")}catch(t){xc(e,e.return,t)}}if(4&i&&null!=(o=e.stateNode)){var a=e.memoizedProps,s=null!==r?r.memoizedProps:a,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===a.type&&null!=a.name&&X(o,a),me(l,s);var u=me(l,a);for(s=0;s<c.length;s+=2){var d=c[s],f=c[s+1];"style"===d?fe(o,f):"dangerouslySetInnerHTML"===d?se(o,f):"children"===d?le(o,f):g(o,d,f,u)}switch(l){case"input":G(o,a);break;case"textarea":ne(o,a);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var h=a.value;null!=h?Q(o,!!a.multiple,h,!1):p!==!!a.multiple&&(null!=a.defaultValue?Q(o,!!a.multiple,a.defaultValue,!0):Q(o,!!a.multiple,a.multiple?[]:"",!1))}o[ci]=a}catch(t){xc(e,e.return,t)}}break;case 6:if(dl(t,e),pl(e),4&i){if(null===e.stateNode)throw Error(n(162));o=e.stateNode,a=e.memoizedProps;try{o.nodeValue=a}catch(t){xc(e,e.return,t)}}break;case 3:if(dl(t,e),pl(e),4&i&&null!==r&&r.memoizedState.isDehydrated)try{zt(t.containerInfo)}catch(t){xc(e,e.return,t)}break;case 4:default:dl(t,e),pl(e);break;case 13:dl(t,e),pl(e),8192&(o=e.child).flags&&(a=null!==o.memoizedState,o.stateNode.isHidden=a,!a||null!==o.alternate&&null!==o.alternate.memoizedState||(Rl=Ye())),4&i&&ul(e);break;case 22:if(d=null!==r&&null!==r.memoizedState,1&e.mode?(Us=(u=Us)||d,dl(t,e),Us=u):dl(t,e),pl(e),8192&i){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!d&&1&e.mode)for(Xs=e,d=e.child;null!==d;){for(f=Xs=d;null!==Xs;){switch(h=(p=Xs).child,p.tag){case 0:case 11:case 14:case 15:Js(4,p,p.return);break;case 1:Gs(p,p.return);var m=p.stateNode;if("function"==typeof m.componentWillUnmount){i=p,r=p.return;try{t=i,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(e){xc(i,r,e)}}break;case 5:Gs(p,p.return);break;case 22:if(null!==p.memoizedState){yl(f);continue}}null!==h?(h.return=p,Xs=h):yl(f)}d=d.sibling}e:for(d=null,f=e;;){if(5===f.tag){if(null===d){d=f;try{o=f.stateNode,u?"function"==typeof(a=o.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=f.stateNode,s=null!=(c=f.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,l.style.display=de("display",s))}catch(t){xc(e,e.return,t)}}}else if(6===f.tag){if(null===d)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(t){xc(e,e.return,t)}}else if((22!==f.tag&&23!==f.tag||null===f.memoizedState||f===e)&&null!==f.child){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;null===f.sibling;){if(null===f.return||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:dl(t,e),pl(e),4&i&&ul(e);case 21:}}function pl(e){var t=e.flags;if(2&t){try{e:{for(var r=e.return;null!==r;){if(nl(r)){var i=r;break e}r=r.return}throw Error(n(160))}switch(i.tag){case 5:var o=i.stateNode;32&i.flags&&(le(o,""),i.flags&=-33),ol(e,rl(e),o);break;case 3:case 4:var a=i.stateNode.containerInfo;il(e,rl(e),a);break;default:throw Error(n(161))}}catch(t){xc(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function hl(e,t,n){Xs=e,ml(e)}function ml(e,t,n){for(var r=!!(1&e.mode);null!==Xs;){var i=Xs,o=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||Ws;if(!a){var s=i.alternate,l=null!==s&&null!==s.memoizedState||Us;s=Ws;var c=Us;if(Ws=a,(Us=l)&&!c)for(Xs=i;null!==Xs;)l=(a=Xs).child,22===a.tag&&null!==a.memoizedState?vl(i):null!==l?(l.return=a,Xs=l):vl(i);for(;null!==o;)Xs=o,ml(o),o=o.sibling;Xs=i,Ws=s,Us=c}gl(e)}else 8772&i.subtreeFlags&&null!==o?(o.return=i,Xs=o):gl(e)}}function gl(e){for(;null!==Xs;){var t=Xs;if(8772&t.flags){var r=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Us||Qs(5,t);break;case 1:var i=t.stateNode;if(4&t.flags&&!Us)if(null===r)i.componentDidMount();else{var o=t.elementType===t.type?r.memoizedProps:Ja(t.type,r.memoizedProps);i.componentDidUpdate(o,r.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&jo(t,a,i);break;case 3:var s=t.updateQueue;if(null!==s){if(r=null,null!==t.child)switch(t.child.tag){case 5:case 1:r=t.child.stateNode}jo(t,s,r)}break;case 5:var l=t.stateNode;if(null===r&&4&t.flags){r=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var d=u.memoizedState;if(null!==d){var f=d.dehydrated;null!==f&&zt(f)}}}break;default:throw Error(n(163))}Us||512&t.flags&&el(t)}catch(e){xc(t,t.return,e)}}if(t===e){Xs=null;break}if(null!==(r=t.sibling)){r.return=t.return,Xs=r;break}Xs=t.return}}function yl(e){for(;null!==Xs;){var t=Xs;if(t===e){Xs=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Xs=n;break}Xs=t.return}}function vl(e){for(;null!==Xs;){var t=Xs;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Qs(4,t)}catch(e){xc(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){xc(t,i,e)}}var o=t.return;try{el(t)}catch(e){xc(t,o,e)}break;case 5:var a=t.return;try{el(t)}catch(e){xc(t,a,e)}}}catch(e){xc(t,t.return,e)}if(t===e){Xs=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Xs=s;break}Xs=t.return}}var bl,xl=Math.ceil,wl=y.ReactCurrentDispatcher,Sl=y.ReactCurrentOwner,Ml=y.ReactCurrentBatchConfig,kl=0,El=null,Cl=null,Al=0,Dl=0,ql=xi(0),_l=0,Tl=null,Nl=0,Ol=0,Il=0,Ll=null,Pl=null,Rl=0,zl=1/0,Fl=null,jl=!1,Vl=null,Hl=null,Bl=!1,$l=null,Wl=0,Ul=0,Yl=null,Xl=-1,Gl=0;function Kl(){return 6&kl?Ye():-1!==Xl?Xl:Xl=Ye()}function Zl(e){return 1&e.mode?2&kl&&0!==Al?Al&-Al:null!==fo.transition?(0===Gl&&(Gl=dt()),Gl):0!==(e=mt)?e:e=void 0===(e=window.event)?16:Ut(e.type):1}function Jl(e,t,r,i){if(50<Ul)throw Ul=0,Yl=null,Error(n(185));pt(e,r,i),2&kl&&e===El||(e===El&&(!(2&kl)&&(Ol|=r),4===_l&&rc(e,Al)),Ql(e,i),1===r&&0===kl&&!(1&t.mode)&&(zl=Ye()+500,Li&&zi()))}function Ql(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-nt(o),s=1<<a,l=i[a];-1===l?0!==(s&n)&&0===(s&r)||(i[a]=ct(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var r=lt(e,e===El?Al:0);if(0===r)null!==n&&$e(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&$e(n),1===t)0===e.tag?function(e){Li=!0,Ri(e)}(ic.bind(null,e)):Ri(ic.bind(null,e)),ni(function(){!(6&kl)&&zi()}),n=null;else{switch(gt(r)){case 1:n=Ge;break;case 4:n=Ke;break;case 16:default:n=Ze;break;case 536870912:n=Qe}n=Ec(n,ec.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ec(e,t){if(Xl=-1,Gl=0,6&kl)throw Error(n(327));var r=e.callbackNode;if(vc()&&e.callbackNode!==r)return null;var i=lt(e,e===El?Al:0);if(0===i)return null;if(30&i||0!==(i&e.expiredLanes)||t)t=fc(e,i);else{t=i;var o=kl;kl|=2;var a=uc();for(El===e&&Al===t||(Fl=null,zl=Ye()+500,lc(e,t));;)try{hc();break}catch(t){cc(e,t)}Mo(),wl.current=a,kl=o,null!==Cl?t=0:(El=null,Al=0,t=_l)}if(0!==t){if(2===t&&(0!==(o=ut(e))&&(i=o,t=tc(e,o))),1===t)throw r=Tl,lc(e,0),rc(e,i),Ql(e,Ye()),r;if(6===t)rc(e,i);else{if(o=e.current.alternate,!(30&i||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!rr(o(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)||(t=fc(e,i),2===t&&(a=ut(e),0!==a&&(i=a,t=tc(e,a))),1!==t)))throw r=Tl,lc(e,0),rc(e,i),Ql(e,Ye()),r;switch(e.finishedWork=o,e.finishedLanes=i,t){case 0:case 1:throw Error(n(345));case 2:case 5:yc(e,Pl,Fl);break;case 3:if(rc(e,i),(130023424&i)===i&&10<(t=Rl+500-Ye())){if(0!==lt(e,0))break;if(((o=e.suspendedLanes)&i)!==i){Kl(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Qr(yc.bind(null,e,Pl,Fl),t);break}yc(e,Pl,Fl);break;case 4:if(rc(e,i),(4194240&i)===i)break;for(t=e.eventTimes,o=-1;0<i;){var s=31-nt(i);a=1<<s,(s=t[s])>o&&(o=s),i&=~a}if(i=o,10<(i=(120>(i=Ye()-i)?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*xl(i/1960))-i)){e.timeoutHandle=Qr(yc.bind(null,e,Pl,Fl),i);break}yc(e,Pl,Fl);break;default:throw Error(n(329))}}}return Ql(e,Ye()),e.callbackNode===r?ec.bind(null,e):null}function tc(e,t){var n=Ll;return e.current.memoizedState.isDehydrated&&(lc(e,t).flags|=256),2!==(e=fc(e,t))&&(t=Pl,Pl=n,null!==t&&nc(t)),e}function nc(e){null===Pl?Pl=e:Pl.push.apply(Pl,e)}function rc(e,t){for(t&=~Il,t&=~Ol,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-nt(t),r=1<<n;e[n]=-1,t&=~r}}function ic(e){if(6&kl)throw Error(n(327));vc();var t=lt(e,0);if(!(1&t))return Ql(e,Ye()),null;var r=fc(e,t);if(0!==e.tag&&2===r){var i=ut(e);0!==i&&(t=i,r=tc(e,i))}if(1===r)throw r=Tl,lc(e,0),rc(e,t),Ql(e,Ye()),r;if(6===r)throw Error(n(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,yc(e,Pl,Fl),Ql(e,Ye()),null}function oc(e,t){var n=kl;kl|=1;try{return e(t)}finally{0===(kl=n)&&(zl=Ye()+500,Li&&zi())}}function ac(e){null!==$l&&0===$l.tag&&!(6&kl)&&vc();var t=kl;kl|=1;var n=Ml.transition,r=mt;try{if(Ml.transition=null,mt=1,e)return e()}finally{mt=r,Ml.transition=n,!(6&(kl=t))&&zi()}}function sc(){Dl=ql.current,wi(ql)}function lc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ei(n)),null!==Cl)for(n=Cl.return;null!==n;){var r=n;switch(Zi(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&qi();break;case 3:Yo(),wi(Ei),wi(ki),Qo();break;case 5:Go(r);break;case 4:Yo();break;case 13:case 19:wi(Ko);break;case 10:ko(r.type._context);break;case 22:case 23:sc()}n=n.return}if(El=e,Cl=e=qc(e.current,null),Al=Dl=t,_l=0,Tl=null,Il=Ol=Nl=0,Pl=Ll=null,null!==Do){for(t=0;t<Do.length;t++)if(null!==(r=(n=Do[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=i,r.next=a}n.pending=r}Do=null}return e}function cc(e,t){for(;;){var r=Cl;try{if(Mo(),ea.current=Xa,aa){for(var i=ra.memoizedState;null!==i;){var o=i.queue;null!==o&&(o.pending=null),i=i.next}aa=!1}if(na=0,oa=ia=ra=null,sa=!1,la=0,Sl.current=null,null===r||null===r.return){_l=1,Tl=t,Cl=null;break}e:{var a=e,s=r.return,l=r,c=t;if(t=Al,l.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var u=c,d=l,f=d.tag;if(!(1&d.mode||0!==f&&11!==f&&15!==f)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var h=fs(s);if(null!==h){h.flags&=-257,ps(h,s,l,0,t),1&h.mode&&ds(a,u,t),c=u;var m=(t=h).updateQueue;if(null===m){var g=new Set;g.add(c),t.updateQueue=g}else m.add(c);break e}if(!(1&t)){ds(a,u,t),dc();break e}c=Error(n(426))}else if(eo&&1&l.mode){var y=fs(s);if(null!==y){!(65536&y.flags)&&(y.flags|=256),ps(y,s,l,0,t),uo(os(c,l));break e}}a=c=os(c,l),4!==_l&&(_l=2),null===Ll?Ll=[a]:Ll.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,zo(a,cs(0,c,t));break e;case 1:l=c;var v=a.type,b=a.stateNode;if(!(128&a.flags||"function"!=typeof v.getDerivedStateFromError&&(null===b||"function"!=typeof b.componentDidCatch||null!==Hl&&Hl.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t,zo(a,us(a,l,t));break e}}a=a.return}while(null!==a)}gc(r)}catch(e){t=e,Cl===r&&null!==r&&(Cl=r=r.return);continue}break}}function uc(){var e=wl.current;return wl.current=Xa,null===e?Xa:e}function dc(){0!==_l&&3!==_l&&2!==_l||(_l=4),null===El||!(268435455&Nl)&&!(268435455&Ol)||rc(El,Al)}function fc(e,t){var r=kl;kl|=2;var i=uc();for(El===e&&Al===t||(Fl=null,lc(e,t));;)try{pc();break}catch(t){cc(e,t)}if(Mo(),kl=r,wl.current=i,null!==Cl)throw Error(n(261));return El=null,Al=0,_l}function pc(){for(;null!==Cl;)mc(Cl)}function hc(){for(;null!==Cl&&!We();)mc(Cl)}function mc(e){var t=bl(e.alternate,e,Dl);e.memoizedProps=e.pendingProps,null===t?gc(e):Cl=t,Sl.current=null}function gc(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=$s(n,t)))return n.flags&=32767,void(Cl=n);if(null===e)return _l=6,void(Cl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Bs(n,t,Dl)))return void(Cl=n);if(null!==(t=t.sibling))return void(Cl=t);Cl=t=e}while(null!==t);0===_l&&(_l=5)}function yc(e,t,r){var i=mt,o=Ml.transition;try{Ml.transition=null,mt=1,function(e,t,r,i){do{vc()}while(null!==$l);if(6&kl)throw Error(n(327));r=e.finishedWork;var o=e.finishedLanes;if(null===r)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(n(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-nt(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,a),e===El&&(Cl=El=null,Al=0),!(2064&r.subtreeFlags)&&!(2064&r.flags)||Bl||(Bl=!0,Ec(Ze,function(){return vc(),null})),a=!!(15990&r.flags),!!(15990&r.subtreeFlags)||a){a=Ml.transition,Ml.transition=null;var s=mt;mt=1;var l=kl;kl|=4,Sl.current=null,function(e,t){if(Kr=jt,cr(e=lr())){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{var i=(r=(r=e.ownerDocument)&&r.defaultView||window).getSelection&&r.getSelection();if(i&&0!==i.rangeCount){r=i.anchorNode;var o=i.anchorOffset,a=i.focusNode;i=i.focusOffset;try{r.nodeType,a.nodeType}catch(e){r=null;break e}var s=0,l=-1,c=-1,u=0,d=0,f=e,p=null;t:for(;;){for(var h;f!==r||0!==o&&3!==f.nodeType||(l=s+o),f!==a||0!==i&&3!==f.nodeType||(c=s+i),3===f.nodeType&&(s+=f.nodeValue.length),null!==(h=f.firstChild);)p=f,f=h;for(;;){if(f===e)break t;if(p===r&&++u===o&&(l=s),p===a&&++d===i&&(c=s),null!==(h=f.nextSibling))break;p=(f=p).parentNode}f=h}r=-1===l||-1===c?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(Zr={focusedElem:e,selectionRange:r},jt=!1,Xs=t;null!==Xs;)if(e=(t=Xs).child,1028&t.subtreeFlags&&null!==e)e.return=t,Xs=e;else for(;null!==Xs;){t=Xs;try{var m=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var g=m.memoizedProps,y=m.memoizedState,v=t.stateNode,b=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Ja(t.type,g),y);v.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=t.stateNode.containerInfo;1===x.nodeType?x.textContent="":9===x.nodeType&&x.documentElement&&x.removeChild(x.documentElement);break;default:throw Error(n(163))}}catch(e){xc(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Xs=e;break}Xs=t.return}m=Zs,Zs=!1}(e,r),fl(r,e),ur(Zr),jt=!!Kr,Zr=Kr=null,e.current=r,hl(r),Ue(),kl=l,mt=s,Ml.transition=a}else e.current=r;if(Bl&&(Bl=!1,$l=e,Wl=o),a=e.pendingLanes,0===a&&(Hl=null),function(e){if(tt&&"function"==typeof tt.onCommitFiberRoot)try{tt.onCommitFiberRoot(et,e,void 0,!(128&~e.current.flags))}catch(e){}}(r.stateNode),Ql(e,Ye()),null!==t)for(i=e.onRecoverableError,r=0;r<t.length;r++)o=t[r],i(o.value,{componentStack:o.stack,digest:o.digest});if(jl)throw jl=!1,e=Vl,Vl=null,e;!!(1&Wl)&&0!==e.tag&&vc(),a=e.pendingLanes,1&a?e===Yl?Ul++:(Ul=0,Yl=e):Ul=0,zi()}(e,t,r,i)}finally{Ml.transition=o,mt=i}return null}function vc(){if(null!==$l){var e=gt(Wl),t=Ml.transition,r=mt;try{if(Ml.transition=null,mt=16>e?16:e,null===$l)var i=!1;else{if(e=$l,$l=null,Wl=0,6&kl)throw Error(n(331));var o=kl;for(kl|=4,Xs=e.current;null!==Xs;){var a=Xs,s=a.child;if(16&Xs.flags){var l=a.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for(Xs=u;null!==Xs;){var d=Xs;switch(d.tag){case 0:case 11:case 15:Js(8,d,a)}var f=d.child;if(null!==f)f.return=d,Xs=f;else for(;null!==Xs;){var p=(d=Xs).sibling,h=d.return;if(tl(d),d===u){Xs=null;break}if(null!==p){p.return=h,Xs=p;break}Xs=h}}}var m=a.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var y=g.sibling;g.sibling=null,g=y}while(null!==g)}}Xs=a}}if(2064&a.subtreeFlags&&null!==s)s.return=a,Xs=s;else e:for(;null!==Xs;){if(2048&(a=Xs).flags)switch(a.tag){case 0:case 11:case 15:Js(9,a,a.return)}var v=a.sibling;if(null!==v){v.return=a.return,Xs=v;break e}Xs=a.return}}var b=e.current;for(Xs=b;null!==Xs;){var x=(s=Xs).child;if(2064&s.subtreeFlags&&null!==x)x.return=s,Xs=x;else e:for(s=b;null!==Xs;){if(2048&(l=Xs).flags)try{switch(l.tag){case 0:case 11:case 15:Qs(9,l)}}catch(e){xc(l,l.return,e)}if(l===s){Xs=null;break e}var w=l.sibling;if(null!==w){w.return=l.return,Xs=w;break e}Xs=l.return}}if(kl=o,zi(),tt&&"function"==typeof tt.onPostCommitFiberRoot)try{tt.onPostCommitFiberRoot(et,e)}catch(e){}i=!0}return i}finally{mt=r,Ml.transition=t}}return!1}function bc(e,t,n){e=Po(e,t=cs(0,t=os(n,t),1),1),t=Kl(),null!==e&&(pt(e,1,t),Ql(e,t))}function xc(e,t,n){if(3===e.tag)bc(e,e,n);else for(;null!==t;){if(3===t.tag){bc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Hl||!Hl.has(r))){t=Po(t,e=us(t,e=os(n,e),1),1),e=Kl(),null!==t&&(pt(t,1,e),Ql(t,e));break}}t=t.return}}function wc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=Kl(),e.pingedLanes|=e.suspendedLanes&n,El===e&&(Al&n)===n&&(4===_l||3===_l&&(130023424&Al)===Al&&500>Ye()-Rl?lc(e,0):Il|=n),Ql(e,t)}function Sc(e,t){0===t&&(1&e.mode?(t=at,!(130023424&(at<<=1))&&(at=4194304)):t=1);var n=Kl();null!==(e=To(e,t))&&(pt(e,t,n),Ql(e,n))}function Mc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Sc(e,n)}function kc(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,o=e.memoizedState;null!==o&&(r=o.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(n(314))}null!==i&&i.delete(t),Sc(e,r)}function Ec(e,t){return Be(e,t)}function Cc(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ac(e,t,n,r){return new Cc(e,t,n,r)}function Dc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function qc(e,t){var n=e.alternate;return null===n?((n=Ac(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function _c(e,t,r,i,o,a){var s=2;if(i=e,"function"==typeof e)Dc(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case x:return Tc(r.children,o,a,t);case w:s=8,o|=8;break;case S:return(e=Ac(12,r,t,2|o)).elementType=S,e.lanes=a,e;case C:return(e=Ac(13,r,t,o)).elementType=C,e.lanes=a,e;case A:return(e=Ac(19,r,t,o)).elementType=A,e.lanes=a,e;case _:return Nc(r,o,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case M:s=10;break e;case k:s=9;break e;case E:s=11;break e;case D:s=14;break e;case q:s=16,i=null;break e}throw Error(n(130,null==e?e:typeof e,""))}return(t=Ac(s,r,t,o)).elementType=e,t.type=i,t.lanes=a,t}function Tc(e,t,n,r){return(e=Ac(7,e,r,t)).lanes=n,e}function Nc(e,t,n,r){return(e=Ac(22,e,r,t)).elementType=_,e.lanes=n,e.stateNode={isHidden:!1},e}function Oc(e,t,n){return(e=Ac(6,e,null,t)).lanes=n,e}function Ic(e,t,n){return(t=Ac(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Lc(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ft(0),this.expirationTimes=ft(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ft(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Pc(e,t,n,r,i,o,a,s,l){return e=new Lc(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Ac(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Oo(o),e}function Rc(e){if(!e)return Mi;e:{if(ze(e=e._reactInternals)!==e||1!==e.tag)throw Error(n(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Di(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(n(171))}if(1===e.tag){var r=e.type;if(Di(r))return Ti(e,r,t)}return t}function zc(e,t,n,r,i,o,a,s,l){return(e=Pc(n,r,!0,e,0,o,0,s,l)).context=Rc(null),n=e.current,(o=Lo(r=Kl(),i=Zl(n))).callback=null!=t?t:null,Po(n,o,i),e.current.lanes=i,pt(e,i,r),Ql(e,r),e}function Fc(e,t,n,r){var i=t.current,o=Kl(),a=Zl(i);return n=Rc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Lo(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Po(i,t,a))&&(Jl(e,i,a,o),Ro(e,i,a)),a}function jc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Vc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Hc(e,t){Vc(e,t),(e=e.alternate)&&Vc(e,t)}bl=function(e,t,r){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ei.current)ms=!0;else{if(0===(e.lanes&r)&&!(128&t.flags))return ms=!1,function(e,t,n){switch(t.tag){case 3:Es(t),co();break;case 5:Xo(t);break;case 1:Di(t.type)&&Ni(t);break;case 4:Uo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Si(bo,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Si(Ko,1&Ko.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Os(e,t,n):(Si(Ko,1&Ko.current),null!==(e=js(e,t,n))?e.sibling:null);Si(Ko,1&Ko.current);break;case 19:if(r=0!==(n&t.childLanes),128&e.flags){if(r)return zs(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Si(Ko,Ko.current),r)break;return null;case 22:case 23:return t.lanes=0,xs(e,t,n)}return js(e,t,n)}(e,t,r);ms=!!(131072&e.flags)}else ms=!1,eo&&1048576&t.flags&&Gi(t,Hi,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Fs(e,t),e=t.pendingProps;var o=Ai(t,ki.current);Co(t,r),o=fa(null,t,i,e,o,r);var a=pa();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Di(i)?(a=!0,Ni(t)):a=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Oo(t),o.updater=es,t.stateNode=o,o._reactInternals=t,is(t,i,e,r),t=ks(null,t,i,!0,a,r)):(t.tag=0,eo&&a&&Ki(t),gs(null,t,o,r),t=t.child),t;case 16:i=t.elementType;e:{switch(Fs(e,t),e=t.pendingProps,i=(o=i._init)(i._payload),t.type=i,o=t.tag=function(e){if("function"==typeof e)return Dc(e)?1:0;if(null!=e){if((e=e.$$typeof)===E)return 11;if(e===D)return 14}return 2}(i),e=Ja(i,e),o){case 0:t=Ss(null,t,i,e,r);break e;case 1:t=Ms(null,t,i,e,r);break e;case 11:t=ys(null,t,i,e,r);break e;case 14:t=vs(null,t,i,Ja(i.type,e),r);break e}throw Error(n(306,i,""))}return t;case 0:return i=t.type,o=t.pendingProps,Ss(e,t,i,o=t.elementType===i?o:Ja(i,o),r);case 1:return i=t.type,o=t.pendingProps,Ms(e,t,i,o=t.elementType===i?o:Ja(i,o),r);case 3:e:{if(Es(t),null===e)throw Error(n(387));i=t.pendingProps,o=(a=t.memoizedState).element,Io(e,t),Fo(t,i,null,r);var s=t.memoizedState;if(i=s.element,a.isDehydrated){if(a={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Cs(e,t,i,r,o=os(Error(n(423)),t));break e}if(i!==o){t=Cs(e,t,i,r,o=os(Error(n(424)),t));break e}for(Qi=oi(t.stateNode.containerInfo.firstChild),Ji=t,eo=!0,to=null,r=vo(t,null,i,r),t.child=r;r;)r.flags=-3&r.flags|4096,r=r.sibling}else{if(co(),i===o){t=js(e,t,r);break e}gs(e,t,i,r)}t=t.child}return t;case 5:return Xo(t),null===e&&oo(t),i=t.type,o=t.pendingProps,a=null!==e?e.memoizedProps:null,s=o.children,Jr(i,o)?s=null:null!==a&&Jr(i,a)&&(t.flags|=32),ws(e,t),gs(e,t,s,r),t.child;case 6:return null===e&&oo(t),null;case 13:return Os(e,t,r);case 4:return Uo(t,t.stateNode.containerInfo),i=t.pendingProps,null===e?t.child=yo(t,null,i,r):gs(e,t,i,r),t.child;case 11:return i=t.type,o=t.pendingProps,ys(e,t,i,o=t.elementType===i?o:Ja(i,o),r);case 7:return gs(e,t,t.pendingProps,r),t.child;case 8:case 12:return gs(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,o=t.pendingProps,a=t.memoizedProps,s=o.value,Si(bo,i._currentValue),i._currentValue=s,null!==a)if(rr(a.value,s)){if(a.children===o.children&&!Ei.current){t=js(e,t,r);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var l=a.dependencies;if(null!==l){s=a.child;for(var c=l.firstContext;null!==c;){if(c.context===i){if(1===a.tag){(c=Lo(-1,r&-r)).tag=2;var u=a.updateQueue;if(null!==u){var d=(u=u.shared).pending;null===d?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}a.lanes|=r,null!==(c=a.alternate)&&(c.lanes|=r),Eo(a.return,r,t),l.lanes|=r;break}c=c.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(n(341));s.lanes|=r,null!==(l=s.alternate)&&(l.lanes|=r),Eo(s,r,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}gs(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps.children,Co(t,r),i=i(o=Ao(o)),t.flags|=1,gs(e,t,i,r),t.child;case 14:return o=Ja(i=t.type,t.pendingProps),vs(e,t,i,o=Ja(i.type,o),r);case 15:return bs(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,o=t.pendingProps,o=t.elementType===i?o:Ja(i,o),Fs(e,t),t.tag=1,Di(i)?(e=!0,Ni(t)):e=!1,Co(t,r),ns(t,i,o),is(t,i,o,r),ks(null,t,i,!0,e,r);case 19:return zs(e,t,r);case 22:return xs(e,t,r)}throw Error(n(156,t.tag))};var Bc="function"==typeof reportError?reportError:function(e){console.error(e)};function $c(e){this._internalRoot=e}function Wc(e){this._internalRoot=e}function Uc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Yc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Xc(){}function Gc(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if("function"==typeof i){var s=i;i=function(){var e=jc(a);s.call(e)}}Fc(t,a,e,i)}else a=function(e,t,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var e=jc(a);o.call(e)}}var a=zc(t,r,e,0,null,!1,0,"",Xc);return e._reactRootContainer=a,e[ui]=a.current,zr(8===e.nodeType?e.parentNode:e),ac(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var s=r;r=function(){var e=jc(l);s.call(e)}}var l=Pc(e,0,!1,null,0,!1,0,"",Xc);return e._reactRootContainer=l,e[ui]=l.current,zr(8===e.nodeType?e.parentNode:e),ac(function(){Fc(t,l,n,r)}),l}(n,t,e,i,r);return jc(a)}Wc.prototype.render=$c.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(n(409));Fc(e,t,null,null)},Wc.prototype.unmount=$c.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;ac(function(){Fc(null,e,null,null)}),t[ui]=null}},Wc.prototype.unstable_scheduleHydration=function(e){if(e){var t=xt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<qt.length&&0!==t&&t<qt[n].priority;n++);qt.splice(n,0,e),0===n&&Ot(e)}},yt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=st(t.pendingLanes);0!==n&&(ht(t,1|n),Ql(t,Ye()),!(6&kl)&&(zl=Ye()+500,zi()))}break;case 13:ac(function(){var t=To(e,1);if(null!==t){var n=Kl();Jl(t,e,1,n)}}),Hc(e,1)}},vt=function(e){if(13===e.tag){var t=To(e,134217728);if(null!==t)Jl(t,e,134217728,Kl());Hc(e,134217728)}},bt=function(e){if(13===e.tag){var t=Zl(e),n=To(e,t);if(null!==n)Jl(n,e,t,Kl());Hc(e,t)}},xt=function(){return mt},wt=function(e,t){var n=mt;try{return mt=e,t()}finally{mt=n}},ve=function(e,t,r){switch(t){case"input":if(G(e,r),t=r.name,"radio"===r.type&&null!=t){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var i=r[t];if(i!==e&&i.form===e.form){var o=yi(i);if(!o)throw Error(n(90));$(i),G(i,o)}}}break;case"textarea":ne(e,r);break;case"select":null!=(t=r.value)&&Q(e,!!r.multiple,t,!1)}},ke=oc,Ee=ac;var Kc={usingClientEntryPoint:!1,Events:[mi,gi,yi,Se,Me,oc]},Zc={findFiberByHostInstance:hi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Jc={bundleType:Zc.bundleType,version:Zc.version,rendererPackageName:Zc.rendererPackageName,rendererConfig:Zc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:y.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ve(e))?null:e.stateNode},findFiberByHostInstance:Zc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Qc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qc.isDisabled&&Qc.supportsFiber)try{et=Qc.inject(Jc),tt=Qc}catch(e){}}return C_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Kc,C_.createPortal=function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Uc(t))throw Error(n(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:b,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,r)},C_.createRoot=function(e,t){if(!Uc(e))throw Error(n(299));var r=!1,i="",o=Bc;return null!=t&&(!0===t.unstable_strictMode&&(r=!0),void 0!==t.identifierPrefix&&(i=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Pc(e,1,!1,null,0,r,0,i,o),e[ui]=t.current,zr(8===e.nodeType?e.parentNode:e),new $c(t)},C_.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(n(188));throw e=Object.keys(e).join(","),Error(n(268,e))}return e=null===(e=Ve(t))?null:e.stateNode},C_.flushSync=function(e){return ac(e)},C_.hydrate=function(e,t,r){if(!Yc(t))throw Error(n(200));return Gc(null,e,t,!0,r)},C_.hydrateRoot=function(e,t,r){if(!Uc(e))throw Error(n(405));var i=null!=r&&r.hydratedSources||null,o=!1,a="",s=Bc;if(null!=r&&(!0===r.unstable_strictMode&&(o=!0),void 0!==r.identifierPrefix&&(a=r.identifierPrefix),void 0!==r.onRecoverableError&&(s=r.onRecoverableError)),t=zc(t,null,e,1,null!=r?r:null,o,0,a,s),e[ui]=t.current,zr(e),i)for(e=0;e<i.length;e++)o=(o=(r=i[e])._getVersion)(r._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[r,o]:t.mutableSourceEagerHydrationData.push(r,o);return new Wc(t)},C_.render=function(e,t,r){if(!Yc(t))throw Error(n(200));return Gc(null,e,t,!1,r)},C_.unmountComponentAtNode=function(e){if(!Yc(e))throw Error(n(40));return!!e._reactRootContainer&&(ac(function(){Gc(null,null,e,!1,function(){e._reactRootContainer=null,e[ui]=null})}),!0)},C_.unstable_batchedUpdates=oc,C_.unstable_renderSubtreeIntoContainer=function(e,t,r,i){if(!Yc(r))throw Error(n(200));if(null==e||void 0===e._reactInternals)throw Error(n(38));return Gc(e,t,r,!1,i)},C_.version="18.3.1-next-f1338f8080-20240426",C_}var T_=(k_||(k_=1,function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),E_.exports=__()),E_.exports),N_=jM(T_),O_=!1,I_=QM.createContext(null),L_="unmounted",P_="exited",R_="entering",z_="entered",F_="exiting",j_=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i=P_,r.appearStatus=R_):i=z_:i=t.unmountOnExit||t.mountOnEnter?L_:P_,r.state={status:i},r.nextCallback=null,r}x_(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===L_?{status:P_}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==R_&&n!==z_&&(t=R_):n!==R_&&n!==z_||(t=F_)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===R_){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:N_.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===P_&&this.setState({status:L_})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[N_.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||O_?this.safeSetState({status:z_},function(){t.props.onEntered(o)}):(this.props.onEnter(o,a),this.safeSetState({status:R_},function(){t.props.onEntering(o,a),t.onTransitionEnd(l,function(){t.safeSetState({status:z_},function(){t.props.onEntered(o,a)})})}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:N_.findDOMNode(this);t&&!O_?(this.props.onExit(r),this.safeSetState({status:F_},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:P_},function(){e.props.onExited(r)})})})):this.safeSetState({status:P_},function(){e.props.onExited(r)})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:N_.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],o=i[0],a=i[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===L_)return null;var t=this.props,n=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var r=Fk(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return QM.createElement(I_.Provider,{value:null},"function"==typeof n?n(e,r):QM.cloneElement(QM.Children.only(n),r))},t}(QM.Component);function V_(){}function H_(e,t){var n=Object.create(null);return e&&JM.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=function(e){return t&&JM.isValidElement(e)?t(e):e}(e)}),n}function B_(e,t,n){return null!=n[t]?n[t]:e.props[t]}function $_(e,t,n){var r=H_(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,i=Object.create(null),o=[];for(var a in e)a in t?o.length&&(i[a]=o,o=[]):o.push(a);var s={};for(var l in t){if(i[l])for(r=0;r<i[l].length;r++){var c=i[l][r];s[i[l][r]]=n(c)}s[l]=n(l)}for(r=0;r<o.length;r++)s[o[r]]=n(o[r]);return s}(t,r);return Object.keys(i).forEach(function(o){var a=i[o];if(JM.isValidElement(a)){var s=o in t,l=o in r,c=t[o],u=JM.isValidElement(c)&&!c.props.in;!l||s&&!u?l||!s||u?l&&s&&JM.isValidElement(c)&&(i[o]=JM.cloneElement(a,{onExited:n.bind(null,a),in:c.props.in,exit:B_(a,"exit",e),enter:B_(a,"enter",e)})):i[o]=JM.cloneElement(a,{in:!1}):i[o]=JM.cloneElement(a,{onExited:n.bind(null,a),in:!0,exit:B_(a,"exit",e),enter:B_(a,"enter",e)})}}),i}j_.contextType=I_,j_.propTypes={},j_.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:V_,onEntering:V_,onEntered:V_,onExit:V_,onExiting:V_,onExited:V_},j_.UNMOUNTED=L_,j_.EXITED=P_,j_.ENTERING=R_,j_.ENTERED=z_,j_.EXITING=F_;var W_=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},U_=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}x_(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,r,i=t.children,o=t.handleExited;return{children:t.firstRender?(n=e,r=o,H_(n.children,function(e){return JM.cloneElement(e,{onExited:r.bind(null,e),in:!0,appear:B_(e,"appear",n),enter:B_(e,"enter",n),exit:B_(e,"exit",n)})})):$_(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=H_(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var n=zk({},t.children);return delete n[e.key],{children:n}}))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Fk(e,["component","childFactory"]),i=this.state.contextValue,o=W_(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?QM.createElement(I_.Provider,{value:i},o):QM.createElement(I_.Provider,{value:i},QM.createElement(t,r,o))},t}(QM.Component);U_.propTypes={},U_.defaultProps={component:"div",childFactory:function(e){return e}};const Y_=e=>e.scrollTop;function X_(e,t){var n,r;const{timeout:i,easing:o,style:a={}}=e;return{duration:null!=(n=a.transitionDuration)?n:"number"==typeof i?i:i[t.mode]||0,easing:null!=(r=a.transitionTimingFunction)?r:"object"==typeof o?o[t.mode]:o,delay:a.transitionDelay}}function G_(e){return pD("MuiPaper",e)}hD("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const K_=["className","component","elevation","square","variant"],Z_=u_("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return zk({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.divider}`},"elevation"===t.variant&&zk({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&"dark"===e.palette.mode&&{backgroundImage:`linear-gradient(${Cq.alpha("#fff",p_(t.elevation))}, ${Cq.alpha("#fff",p_(t.elevation))})`},e.vars&&{backgroundImage:null==(n=e.vars.overlays)?void 0:n[t.elevation]}))}),J_=JM.forwardRef(function(e,t){const n=h_({props:e,name:"MuiPaper"}),{className:r,component:i="div",elevation:o=1,square:a=!1,variant:s="elevation"}=n,l=Fk(n,K_),c=zk({},n,{component:i,elevation:o,square:a,variant:s}),u=(e=>{const{square:t,elevation:n,variant:r,classes:i}=e;return JD({root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]},G_,i)})(c);return zC.jsx(Z_,zk({as:i,ownerState:c,className:dD(u.root,r),ref:t},l))});const Q_=hD("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),eT=["center","classes","className"];let tT,nT,rT,iT,oT=e=>e;const aT=CC(tT||(tT=oT`
  0% {
    transform: scale(0);
    opacity: 0.1;
  }

  100% {
    transform: scale(1);
    opacity: 0.3;
  }
`)),sT=CC(nT||(nT=oT`
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
`)),lT=CC(rT||(rT=oT`
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(0.92);
  }

  100% {
    transform: scale(1);
  }
`)),cT=u_("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),uT=u_(function(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:a,in:s,onExited:l,timeout:c}=e,[u,d]=JM.useState(!1),f=dD(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:a,height:a,top:-a/2+o,left:-a/2+i},h=dD(n.child,u&&n.childLeaving,r&&n.childPulsate);return s||u||d(!0),JM.useEffect(()=>{if(!s&&null!=l){const e=setTimeout(l,c);return()=>{clearTimeout(e)}}},[l,s,c]),zC.jsx("span",{className:f,style:p,children:zC.jsx("span",{className:h})})},{name:"MuiTouchRipple",slot:"Ripple"})(iT||(iT=oT`
  opacity: 0;
  position: absolute;

  &.${0} {
    opacity: 0.3;
    transform: scale(1);
    animation-name: ${0};
    animation-duration: ${0}ms;
    animation-timing-function: ${0};
  }

  &.${0} {
    animation-duration: ${0}ms;
  }

  & .${0} {
    opacity: 1;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: currentColor;
  }

  & .${0} {
    opacity: 0;
    animation-name: ${0};
    animation-duration: ${0}ms;
    animation-timing-function: ${0};
  }

  & .${0} {
    position: absolute;
    /* @noflip */
    left: 0px;
    top: 0;
    animation-name: ${0};
    animation-duration: 2500ms;
    animation-timing-function: ${0};
    animation-iteration-count: infinite;
    animation-delay: 200ms;
  }
`),Q_.rippleVisible,aT,550,({theme:e})=>e.transitions.easing.easeInOut,Q_.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,Q_.child,Q_.childLeaving,sT,550,({theme:e})=>e.transitions.easing.easeInOut,Q_.childPulsate,lT,({theme:e})=>e.transitions.easing.easeInOut),dT=JM.forwardRef(function(e,t){const n=h_({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:i={},className:o}=n,a=Fk(n,eT),[s,l]=JM.useState([]),c=JM.useRef(0),u=JM.useRef(null);JM.useEffect(()=>{u.current&&(u.current(),u.current=null)},[s]);const d=JM.useRef(!1),f=HD(),p=JM.useRef(null),h=JM.useRef(null),m=JM.useCallback(e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;l(e=>[...e,zC.jsx(uT,{classes:{ripple:dD(i.ripple,Q_.ripple),rippleVisible:dD(i.rippleVisible,Q_.rippleVisible),ripplePulsate:dD(i.ripplePulsate,Q_.ripplePulsate),child:dD(i.child,Q_.child),childLeaving:dD(i.childLeaving,Q_.childLeaving),childPulsate:dD(i.childPulsate,Q_.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},c.current)]),c.current+=1,u.current=a},[i]),g=JM.useCallback((e={},t={},n=()=>{})=>{const{pulsate:i=!1,center:o=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&d.current)return void(d.current=!1);"touchstart"===(null==e?void 0:e.type)&&(d.current=!0);const s=a?null:h.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,g;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(o)g=Math.sqrt((2*l.width**2+l.height**2)/3),g%2==0&&(g+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;g=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===p.current&&(p.current=()=>{m({pulsate:i,rippleX:c,rippleY:u,rippleSize:g,cb:n})},f.start(80,()=>{p.current&&(p.current(),p.current=null)})):m({pulsate:i,rippleX:c,rippleY:u,rippleSize:g,cb:n})},[r,m,f]),y=JM.useCallback(()=>{g({},{pulsate:!0})},[g]),v=JM.useCallback((e,t)=>{if(f.clear(),"touchend"===(null==e?void 0:e.type)&&p.current)return p.current(),p.current=null,void f.start(0,()=>{v(e,t)});p.current=null,l(e=>e.length>0?e.slice(1):e),u.current=t},[f]);return JM.useImperativeHandle(t,()=>({pulsate:y,start:g,stop:v}),[y,g,v]),zC.jsx(cT,zk({className:dD(Q_.root,i.root,o),ref:h},a,{children:zC.jsx(U_,{component:null,exit:!0,children:s})}))});function fT(e){return pD("MuiButtonBase",e)}const pT=hD("MuiButtonBase",["root","disabled","focusVisible"]),hT=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],mT=u_("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${pT.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),gT=JM.forwardRef(function(e,t){const n=h_({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:i=!1,children:o,className:a,component:s="button",disabled:l=!1,disableRipple:c=!1,disableTouchRipple:u=!1,focusRipple:d=!1,LinkComponent:f="a",onBlur:p,onClick:h,onContextMenu:m,onDragLeave:g,onFocus:y,onFocusVisible:v,onKeyDown:b,onKeyUp:x,onMouseDown:w,onMouseLeave:S,onMouseUp:M,onTouchEnd:k,onTouchMove:E,onTouchStart:C,tabIndex:A=0,TouchRippleProps:D,touchRippleRef:q,type:_}=n,T=Fk(n,hT),N=JM.useRef(null),O=JM.useRef(null),I=zD(O,q),{isFocusVisibleRef:L,onFocus:P,onBlur:R,ref:z}=ZD(),[F,j]=JM.useState(!1);l&&F&&j(!1),JM.useImperativeHandle(r,()=>({focusVisible:()=>{j(!0),N.current.focus()}}),[]);const[V,H]=JM.useState(!1);JM.useEffect(()=>{H(!0)},[]);const B=V&&!c&&!l;function $(e,t,n=u){return RD(r=>{t&&t(r);return!n&&O.current&&O.current[e](r),!0})}JM.useEffect(()=>{F&&d&&!c&&V&&O.current.pulsate()},[c,d,F,V]);const W=$("start",w),U=$("stop",m),Y=$("stop",g),X=$("stop",M),G=$("stop",e=>{F&&e.preventDefault(),S&&S(e)}),K=$("start",C),Z=$("stop",k),J=$("stop",E),Q=$("stop",e=>{R(e),!1===L.current&&j(!1),p&&p(e)},!1),ee=RD(e=>{N.current||(N.current=e.currentTarget),P(e),!0===L.current&&(j(!0),v&&v(e)),y&&y(e)}),te=()=>{const e=N.current;return s&&"button"!==s&&!("A"===e.tagName&&e.href)},ne=JM.useRef(!1),re=RD(e=>{d&&!ne.current&&F&&O.current&&" "===e.key&&(ne.current=!0,O.current.stop(e,()=>{O.current.start(e)})),e.target===e.currentTarget&&te()&&" "===e.key&&e.preventDefault(),b&&b(e),e.target===e.currentTarget&&te()&&"Enter"===e.key&&!l&&(e.preventDefault(),h&&h(e))}),ie=RD(e=>{d&&" "===e.key&&O.current&&F&&!e.defaultPrevented&&(ne.current=!1,O.current.stop(e,()=>{O.current.pulsate(e)})),x&&x(e),h&&e.target===e.currentTarget&&te()&&" "===e.key&&!e.defaultPrevented&&h(e)});let oe=s;"button"===oe&&(T.href||T.to)&&(oe=f);const ae={};"button"===oe?(ae.type=void 0===_?"button":_,ae.disabled=l):(T.href||T.to||(ae.role="button"),l&&(ae["aria-disabled"]=l));const se=zD(t,z,N),le=zk({},n,{centerRipple:i,component:s,disabled:l,disableRipple:c,disableTouchRipple:u,focusRipple:d,tabIndex:A,focusVisible:F}),ce=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,o=JD({root:["root",t&&"disabled",n&&"focusVisible"]},fT,i);return n&&r&&(o.root+=` ${r}`),o})(le);return zC.jsxs(mT,zk({as:oe,className:dD(ce.root,a),ownerState:le,onBlur:Q,onClick:h,onContextMenu:U,onFocus:ee,onKeyDown:re,onKeyUp:ie,onMouseDown:W,onMouseLeave:G,onMouseUp:X,onDragLeave:Y,onTouchEnd:Z,onTouchMove:J,onTouchStart:K,ref:se,tabIndex:l?-1:A,type:_},ae,T,{children:[o,B?zC.jsx(dT,zk({ref:I,center:i},D)):null]}))});function yT(e){return pD("MuiTypography",e)}hD("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const vT=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],bT=u_("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${nA(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>zk({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),xT={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},wT={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},ST=JM.forwardRef(function(e,t){const n=h_({props:e,name:"MuiTypography"}),r=(e=>wT[e]||e)(n.color),i=aD(zk({},n,{color:r})),{align:o="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:f=xT}=i,p=Fk(i,vT),h=zk({},i,{align:o,color:r,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:f}),m=s||(u?"p":f[d]||xT[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:a}=e;return JD({root:["root",o,"inherit"!==e.align&&`align${nA(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]},yT,a)})(h);return zC.jsx(bT,zk({as:m,ref:t,ownerState:h,className:dD(g.root,a)},p))});const MT=JM.forwardRef(function(e,t){const{children:n,container:r,disablePortal:i=!1}=e,[o,a]=JM.useState(null),s=zD(JM.isValidElement(n)?iq(n):null,t);if(DD(()=>{i||a(function(e){return"function"==typeof e?e():e}(r)||document.body)},[r,i]),DD(()=>{if(o&&!i)return OD(t,o),()=>{OD(t,null)}},[t,o,i]),i){if(JM.isValidElement(n)){const e={ref:s};return JM.cloneElement(n,e)}return zC.jsx(JM.Fragment,{children:n})}return zC.jsx(JM.Fragment,{children:o?T_.createPortal(n,o):o})}),kT=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],ET={entering:{opacity:1},entered:{opacity:1}},CT=JM.forwardRef(function(e,t){const n=Gq(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:o=!0,children:a,easing:s,in:l,onEnter:c,onEntered:u,onEntering:d,onExit:f,onExited:p,onExiting:h,style:m,timeout:g=r,TransitionComponent:y=j_}=e,v=Fk(e,kT),b=JM.useRef(null),x=zD(b,iq(a),t),w=e=>t=>{if(e){const n=b.current;void 0===t?e(n):e(n,t)}},S=w(d),M=w((e,t)=>{Y_(e);const r=X_({style:m,timeout:g,easing:s},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),c&&c(e,t)}),k=w(u),E=w(h),C=w(e=>{const t=X_({style:m,timeout:g,easing:s},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),f&&f(e)}),A=w(p);return zC.jsx(y,zk({appear:o,in:l,nodeRef:b,onEnter:M,onEntered:k,onEntering:S,onExit:C,onExited:A,onExiting:E,addEndListener:e=>{i&&i(b.current,e)},timeout:g},v,{children:(e,t)=>JM.cloneElement(a,zk({style:zk({opacity:0,visibility:"exited"!==e||l?void 0:"hidden"},ET[e],m,a.props.style),ref:x},t))}))});function AT(e){return pD("MuiBackdrop",e)}hD("MuiBackdrop",["root","invisible"]);const DT=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],qT=u_("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>zk({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),_T=JM.forwardRef(function(e,t){var n,r,i;const o=h_({props:e,name:"MuiBackdrop"}),{children:a,className:s,component:l="div",components:c={},componentsProps:u={},invisible:d=!1,open:f,slotProps:p={},slots:h={},TransitionComponent:m=CT,transitionDuration:g}=o,y=Fk(o,DT),v=zk({},o,{component:l,invisible:d}),b=(e=>{const{classes:t,invisible:n}=e;return JD({root:["root",n&&"invisible"]},AT,t)})(v),x=null!=(n=p.root)?n:u.root;return zC.jsx(m,zk({in:f,timeout:g},y,{children:zC.jsx(qT,zk({"aria-hidden":!0},x,{as:null!=(r=null!=(i=h.root)?i:c.Root)?r:l,className:dD(b.root,s,null==x?void 0:x.className),ownerState:zk({},v,null==x?void 0:x.ownerState),classes:b,ref:t,children:a}))}))});function TT(e){return pD("MuiButton",e)}const NT=hD("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),OT=JM.createContext({}),IT=JM.createContext(void 0),LT=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],PT=e=>zk({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),RT=u_(gT,{shouldForwardProp:e=>c_(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${nA(n.color)}`],t[`size${nA(n.size)}`],t[`${n.variant}Size${nA(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;const i="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],o="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return zk({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":zk({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Cq.alpha(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===t.variant&&"inherit"!==t.color&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Cq.alpha(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===t.variant&&"inherit"!==t.color&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Cq.alpha(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:o,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===t.variant&&"inherit"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":zk({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${NT.focusVisible}`]:zk({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${NT.disabled}`]:zk({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"contained"===t.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===t.variant&&{padding:"6px 8px"},"text"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main},"outlined"===t.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${Cq.alpha(e.palette[t.color].main,.5)}`},"contained"===t.variant&&{color:e.vars?e.vars.palette.text.primary:null==(n=(r=e.palette).getContrastText)?void 0:n.call(r,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:i,boxShadow:(e.vars||e).shadows[2]},"contained"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},"inherit"===t.color&&{color:"inherit",borderColor:"currentColor"},"small"===t.size&&"text"===t.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"text"===t.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"outlined"===t.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"outlined"===t.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"contained"===t.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"contained"===t.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${NT.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${NT.disabled}`]:{boxShadow:"none"}}),zT=u_("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${nA(n.size)}`]]}})(({ownerState:e})=>zk({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},PT(e))),FT=u_("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${nA(n.size)}`]]}})(({ownerState:e})=>zk({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},PT(e))),jT=JM.forwardRef(function(e,t){const n=JM.useContext(OT),r=JM.useContext(IT),i=h_({props:AD(n,e),name:"MuiButton"}),{children:o,color:a="primary",component:s="button",className:l,disabled:c=!1,disableElevation:u=!1,disableFocusRipple:d=!1,endIcon:f,focusVisibleClassName:p,fullWidth:h=!1,size:m="medium",startIcon:g,type:y,variant:v="text"}=i,b=Fk(i,LT),x=zk({},i,{color:a,component:s,disabled:c,disableElevation:u,disableFocusRipple:d,fullWidth:h,size:m,type:y,variant:v}),w=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,classes:a}=e;return zk({},a,JD({root:["root",o,`${o}${nA(t)}`,`size${nA(i)}`,`${o}Size${nA(i)}`,`color${nA(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${nA(i)}`],endIcon:["icon","endIcon",`iconSize${nA(i)}`]},TT,a))})(x),S=g&&zC.jsx(zT,{className:w.startIcon,ownerState:x,children:g}),M=f&&zC.jsx(FT,{className:w.endIcon,ownerState:x,children:f}),k=r||"";return zC.jsxs(RT,zk({ownerState:x,className:dD(n.className,w.root,l,k),component:s,disabled:c,focusRipple:!d,focusVisibleClassName:dD(w.focusVisible,p),ref:t,type:y},b,{classes:w,children:[S,o,M]}))});function VT(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function HT(e){return parseInt(ND(e).getComputedStyle(e).paddingRight,10)||0}function BT(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,e=>{const t=-1===o.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&VT(e,i)})}function $T(e,t){let n=-1;return e.some((e,r)=>!!t(e)&&(n=r,!0)),n}function WT(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=TD(e);return t.body===e?ND(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=function(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}(TD(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${HT(r)+e}px`;const t=TD(r).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${HT(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=TD(r).body;else{const t=r.parentElement,n=ND(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}const UT=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function YT(e){const t=[],n=[];return Array.from(e.querySelectorAll(UT)).forEach((e,r)=>{const i=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==i&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===i?t.push(e):n.push({documentOrder:r,tabIndex:i,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function XT(){return!0}function GT(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=YT,isEnabled:a=XT,open:s}=e,l=JM.useRef(!1),c=JM.useRef(null),u=JM.useRef(null),d=JM.useRef(null),f=JM.useRef(null),p=JM.useRef(!1),h=JM.useRef(null),m=zD(iq(t),h),g=JM.useRef(null);JM.useEffect(()=>{s&&h.current&&(p.current=!n)},[n,s]),JM.useEffect(()=>{if(!s||!h.current)return;const e=TD(h.current);return h.current.contains(e.activeElement)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex","-1"),p.current&&h.current.focus()),()=>{i||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[s]),JM.useEffect(()=>{if(!s||!h.current)return;const e=TD(h.current),t=t=>{g.current=t,!r&&a()&&"Tab"===t.key&&e.activeElement===h.current&&t.shiftKey&&(l.current=!0,u.current&&u.current.focus())},n=()=>{const t=h.current;if(null===t)return;if(!e.hasFocus()||!a()||l.current)return void(l.current=!1);if(t.contains(e.activeElement))return;if(r&&e.activeElement!==c.current&&e.activeElement!==u.current)return;if(e.activeElement!==f.current)f.current=null;else if(null!==f.current)return;if(!p.current)return;let n=[];if(e.activeElement!==c.current&&e.activeElement!==u.current||(n=o(h.current)),n.length>0){var i,s;const e=Boolean((null==(i=g.current)?void 0:i.shiftKey)&&"Tab"===(null==(s=g.current)?void 0:s.key)),t=n[0],r=n[n.length-1];"string"!=typeof t&&"string"!=typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const i=setInterval(()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()},50);return()=>{clearInterval(i),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}},[n,r,i,a,s,o]);const y=e=>{null===d.current&&(d.current=e.relatedTarget),p.current=!0};return zC.jsxs(JM.Fragment,{children:[zC.jsx("div",{tabIndex:s?0:-1,onFocus:y,ref:c,"data-testid":"sentinelStart"}),JM.cloneElement(t,{ref:m,onFocus:e=>{null===d.current&&(d.current=e.relatedTarget),p.current=!0,f.current=e.target;const n=t.props.onFocus;n&&n(e)}}),zC.jsx("div",{tabIndex:s?0:-1,onFocus:y,ref:u,"data-testid":"sentinelEnd"})]})}const KT=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&VT(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)}),t}(t);BT(t,e.mount,e.modalRef,r,!0);const i=$T(this.containers,e=>e.container===t);return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=$T(this.containers,t=>-1!==t.modals.indexOf(e)),r=this.containers[n];r.restore||(r.restore=WT(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=$T(this.containers,t=>-1!==t.modals.indexOf(e)),i=this.containers[r];if(i.modals.splice(i.modals.indexOf(e),1),this.modals.splice(n,1),0===i.modals.length)i.restore&&i.restore(),e.modalRef&&VT(e.modalRef,t),BT(i.container,e.mount,e.modalRef,i.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=i.modals[i.modals.length-1];e.modalRef&&VT(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function ZT(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=KT,closeAfterTransition:o=!1,onTransitionEnter:a,onTransitionExited:s,children:l,onClose:c,open:u,rootRef:d}=e,f=JM.useRef({}),p=JM.useRef(null),h=JM.useRef(null),m=zD(h,d),[g,y]=JM.useState(!u),v=function(e){return!!e&&e.props.hasOwnProperty("in")}(l);let b=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(b=!1);const x=()=>(f.current.modalRef=h.current,f.current.mount=p.current,f.current),w=()=>{i.mount(x(),{disableScrollLock:r}),h.current&&(h.current.scrollTop=0)},S=RD(()=>{const e=function(e){return"function"==typeof e?e():e}(t)||TD(p.current).body;i.add(x(),e),h.current&&w()}),M=JM.useCallback(()=>i.isTopModal(x()),[i]),k=RD(e=>{p.current=e,e&&(u&&M()?w():h.current&&VT(h.current,b))}),E=JM.useCallback(()=>{i.remove(x(),b)},[b,i]);JM.useEffect(()=>()=>{E()},[E]),JM.useEffect(()=>{u?S():v&&o||E()},[u,E,v,o,S]);const C=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&M()&&(n||(t.stopPropagation(),c&&c(t,"escapeKeyDown")))},A=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&c&&c(t,"backdropClick")};return{getRootProps:(t={})=>{const n=eq(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=zk({},n,t);return zk({role:"presentation"},r,{onKeyDown:C(r),ref:m})},getBackdropProps:(e={})=>zk({"aria-hidden":!0},e,{onClick:A(e),open:u}),getTransitionProps:()=>({onEnter:_D(()=>{y(!1),a&&a()},null==l?void 0:l.props.onEnter),onExited:_D(()=>{y(!0),s&&s(),o&&E()},null==l?void 0:l.props.onExited)}),rootRef:m,portalRef:k,isTopModal:M,exited:g,hasTransition:v}}function JT(e){return pD("MuiModal",e)}hD("MuiModal",["root","hidden","backdrop"]);const QT=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],eN=u_("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>zk({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),tN=u_(_T,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),nN=JM.forwardRef(function(e,t){var n,r,i,o,a,s;const l=h_({name:"MuiModal",props:e}),{BackdropComponent:c=tN,BackdropProps:u,className:d,closeAfterTransition:f=!1,children:p,container:h,component:m,components:g={},componentsProps:y={},disableAutoFocus:v=!1,disableEnforceFocus:b=!1,disableEscapeKeyDown:x=!1,disablePortal:w=!1,disableRestoreFocus:S=!1,disableScrollLock:M=!1,hideBackdrop:k=!1,keepMounted:E=!1,onBackdropClick:C,open:A,slotProps:D,slots:q}=l,_=Fk(l,QT),T=zk({},l,{closeAfterTransition:f,disableAutoFocus:v,disableEnforceFocus:b,disableEscapeKeyDown:x,disablePortal:w,disableRestoreFocus:S,disableScrollLock:M,hideBackdrop:k,keepMounted:E}),{getRootProps:N,getBackdropProps:O,getTransitionProps:I,portalRef:L,isTopModal:P,exited:R,hasTransition:z}=ZT(zk({},T,{rootRef:t})),F=zk({},T,{exited:R}),j=(e=>{const{open:t,exited:n,classes:r}=e;return JD({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},JT,r)})(F),V={};if(void 0===p.props.tabIndex&&(V.tabIndex="-1"),z){const{onEnter:e,onExited:t}=I();V.onEnter=e,V.onExited=t}const H=null!=(n=null!=(r=null==q?void 0:q.root)?r:g.Root)?n:eN,B=null!=(i=null!=(o=null==q?void 0:q.backdrop)?o:g.Backdrop)?i:c,$=null!=(a=null==D?void 0:D.root)?a:y.root,W=null!=(s=null==D?void 0:D.backdrop)?s:y.backdrop,U=rq({elementType:H,externalSlotProps:$,externalForwardedProps:_,getSlotProps:N,additionalProps:{ref:t,as:m},ownerState:F,className:dD(d,null==$?void 0:$.className,null==j?void 0:j.root,!F.open&&F.exited&&(null==j?void 0:j.hidden))}),Y=rq({elementType:B,externalSlotProps:W,additionalProps:u,getSlotProps:e=>O(zk({},e,{onClick:t=>{C&&C(t),null!=e&&e.onClick&&e.onClick(t)}})),className:dD(null==W?void 0:W.className,null==u?void 0:u.className,null==j?void 0:j.backdrop),ownerState:F});return E||A||z&&!R?zC.jsx(MT,{ref:L,container:h,disablePortal:w,children:zC.jsxs(H,zk({},U,{children:[!k&&c?zC.jsx(B,zk({},Y)):null,zC.jsx(GT,{disableEnforceFocus:b,disableAutoFocus:v,disableRestoreFocus:S,isEnabled:P,open:A,children:JM.cloneElement(p,V)})]}))}):null});function rN(e){return pD("MuiDivider",e)}hD("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);const iN=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],oN=u_("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>zk({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:Cq.alpha(e.palette.divider,.08)},"inset"===t.variant&&{marginLeft:72},"middle"===t.variant&&"horizontal"===t.orientation&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},"middle"===t.variant&&"vertical"===t.orientation&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},"vertical"===t.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"}),({ownerState:e})=>zk({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>zk({},t.children&&"vertical"!==t.orientation&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}),({theme:e,ownerState:t})=>zk({},t.children&&"vertical"===t.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}),({ownerState:e})=>zk({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),aN=u_("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>zk({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},"vertical"===t.orientation&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),sN=JM.forwardRef(function(e,t){const n=h_({props:e,name:"MuiDivider"}),{absolute:r=!1,children:i,className:o,component:a=(i?"div":"hr"),flexItem:s=!1,light:l=!1,orientation:c="horizontal",role:u=("hr"!==a?"separator":void 0),textAlign:d="center",variant:f="fullWidth"}=n,p=Fk(n,iN),h=zk({},n,{absolute:r,component:a,flexItem:s,light:l,orientation:c,role:u,textAlign:d,variant:f}),m=(e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:a,textAlign:s,variant:l}=e;return JD({root:["root",t&&"absolute",l,o&&"light","vertical"===a&&"vertical",i&&"flexItem",n&&"withChildren",n&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},rN,r)})(h);return zC.jsx(oN,zk({as:a,className:dD(m.root,o),role:u,ref:t,ownerState:h},p,{children:i?zC.jsx(aN,{className:m.wrapper,ownerState:h,children:i}):null}))});sN.muiSkipListHighlight=!0;const lN=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function cN(e){return`scale(${e}, ${e**2})`}const uN={entering:{opacity:1,transform:cN(1)},entered:{opacity:1,transform:"none"}},dN="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),fN=JM.forwardRef(function(e,t){const{addEndListener:n,appear:r=!0,children:i,easing:o,in:a,onEnter:s,onEntered:l,onEntering:c,onExit:u,onExited:d,onExiting:f,style:p,timeout:h="auto",TransitionComponent:m=j_}=e,g=Fk(e,lN),y=HD(),v=JM.useRef(),b=Gq(),x=JM.useRef(null),w=zD(x,iq(i),t),S=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},M=S(c),k=S((e,t)=>{Y_(e);const{duration:n,delay:r,easing:i}=X_({style:p,timeout:h,easing:o},{mode:"enter"});let a;"auto"===h?(a=b.transitions.getAutoHeightDuration(e.clientHeight),v.current=a):a=n,e.style.transition=[b.transitions.create("opacity",{duration:a,delay:r}),b.transitions.create("transform",{duration:dN?a:.666*a,delay:r,easing:i})].join(","),s&&s(e,t)}),E=S(l),C=S(f),A=S(e=>{const{duration:t,delay:n,easing:r}=X_({style:p,timeout:h,easing:o},{mode:"exit"});let i;"auto"===h?(i=b.transitions.getAutoHeightDuration(e.clientHeight),v.current=i):i=t,e.style.transition=[b.transitions.create("opacity",{duration:i,delay:n}),b.transitions.create("transform",{duration:dN?i:.666*i,delay:dN?n:n||.333*i,easing:r})].join(","),e.style.opacity=0,e.style.transform=cN(.75),u&&u(e)}),D=S(d);return zC.jsx(m,zk({appear:r,in:a,nodeRef:x,onEnter:k,onEntered:E,onEntering:M,onExit:A,onExited:D,onExiting:C,addEndListener:e=>{"auto"===h&&y.start(v.current||0,e),n&&n(x.current,e)},timeout:"auto"===h?null:h},g,{children:(e,t)=>JM.cloneElement(i,zk({style:zk({opacity:0,transform:cN(.75),visibility:"exited"!==e||a?void 0:"hidden"},uN[e],p,i.props.style),ref:w},t))}))});fN.muiSupportAuto=!0;const pN=JM.createContext({});function hN(e){return pD("MuiList",e)}hD("MuiList",["root","padding","dense","subheader"]);const mN=["children","className","component","dense","disablePadding","subheader"],gN=u_("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>zk({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),yN=JM.forwardRef(function(e,t){const n=h_({props:e,name:"MuiList"}),{children:r,className:i,component:o="ul",dense:a=!1,disablePadding:s=!1,subheader:l}=n,c=Fk(n,mN),u=JM.useMemo(()=>({dense:a}),[a]),d=zk({},n,{component:o,dense:a,disablePadding:s}),f=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return JD({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},hN,t)})(d);return zC.jsx(pN.Provider,{value:u,children:zC.jsxs(gN,zk({as:o,className:dD(f.root,i),ref:t,ownerState:d},c,{children:[l,r]}))})});function vN(e){return pD("MuiListItemButton",e)}const bN=hD("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),xN=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],wN=u_(gT,{shouldForwardProp:e=>c_(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(({theme:e,ownerState:t})=>zk({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${bN.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Cq.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${bN.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Cq.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${bN.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Cq.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Cq.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${bN.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${bN.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},"flex-start"===t.alignItems&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4})),SN=JM.forwardRef(function(e,t){const n=h_({props:e,name:"MuiListItemButton"}),{alignItems:r="center",autoFocus:i=!1,component:o="div",children:a,dense:s=!1,disableGutters:l=!1,divider:c=!1,focusVisibleClassName:u,selected:d=!1,className:f}=n,p=Fk(n,xN),h=JM.useContext(pN),m=JM.useMemo(()=>({dense:s||h.dense||!1,alignItems:r,disableGutters:l}),[r,h.dense,s,l]),g=JM.useRef(null);DD(()=>{i&&g.current&&g.current.focus()},[i]);const y=zk({},n,{alignItems:r,dense:m.dense,disableGutters:l,divider:c,selected:d}),v=(e=>{const{alignItems:t,classes:n,dense:r,disabled:i,disableGutters:o,divider:a,selected:s}=e;return zk({},n,JD({root:["root",r&&"dense",!o&&"gutters",a&&"divider",i&&"disabled","flex-start"===t&&"alignItemsFlexStart",s&&"selected"]},vN,n))})(y),b=zD(g,t);return zC.jsx(pN.Provider,{value:m,children:zC.jsx(wN,zk({ref:b,href:p.href||p.to,component:(p.href||p.to)&&"div"===o?"button":o,focusVisibleClassName:dD(v.focusVisible,u),ownerState:y,className:dD(v.root,f)},p,{classes:v,children:a}))})});function MN(e){return pD("MuiListItemIcon",e)}hD("MuiListItemIcon",["root","alignItemsFlexStart"]);const kN=["className"],EN=u_("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>zk({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8})),CN=JM.forwardRef(function(e,t){const n=h_({props:e,name:"MuiListItemIcon"}),{className:r}=n,i=Fk(n,kN),o=zk({},n,{alignItems:JM.useContext(pN).alignItems}),a=(e=>{const{alignItems:t,classes:n}=e;return JD({root:["root","flex-start"===t&&"alignItemsFlexStart"]},MN,n)})(o);return zC.jsx(EN,zk({className:dD(a.root,r),ownerState:o,ref:t},i))});function AN(e){return pD("MuiListItemText",e)}const DN=hD("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),qN=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],_N=u_("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${DN.primary}`]:t.primary},{[`& .${DN.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(({ownerState:e})=>zk({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56})),TN=JM.forwardRef(function(e,t){const n=h_({props:e,name:"MuiListItemText"}),{children:r,className:i,disableTypography:o=!1,inset:a=!1,primary:s,primaryTypographyProps:l,secondary:c,secondaryTypographyProps:u}=n,d=Fk(n,qN),{dense:f}=JM.useContext(pN);let p=null!=s?s:r,h=c;const m=zk({},n,{disableTypography:o,inset:a,primary:!!p,secondary:!!h,dense:f}),g=(e=>{const{classes:t,inset:n,primary:r,secondary:i,dense:o}=e;return JD({root:["root",n&&"inset",o&&"dense",r&&i&&"multiline"],primary:["primary"],secondary:["secondary"]},AN,t)})(m);return null==p||p.type===ST||o||(p=zC.jsx(ST,zk({variant:f?"body2":"body1",className:g.primary,component:null!=l&&l.variant?void 0:"span",display:"block"},l,{children:p}))),null==h||h.type===ST||o||(h=zC.jsx(ST,zk({variant:"body2",className:g.secondary,color:"text.secondary",display:"block"},u,{children:h}))),zC.jsxs(_N,zk({className:dD(g.root,i),ownerState:m,ref:t},d,{children:[p,h]}))});function NN(e){return pD("MuiPopover",e)}hD("MuiPopover",["root","paper"]);const ON=["onEntering"],IN=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],LN=["slotProps"];function PN(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function RN(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function zN(e){return[e.horizontal,e.vertical].map(e=>"number"==typeof e?`${e}px`:e).join(" ")}function FN(e){return"function"==typeof e?e():e}const jN=u_(nN,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),VN=u_(J_,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),HN=JM.forwardRef(function(e,t){var n,r,i;const o=h_({props:e,name:"MuiPopover"}),{action:a,anchorEl:s,anchorOrigin:l={vertical:"top",horizontal:"left"},anchorPosition:c,anchorReference:u="anchorEl",children:d,className:f,container:p,elevation:h=8,marginThreshold:m=16,open:g,PaperProps:y={},slots:v,slotProps:b,transformOrigin:x={vertical:"top",horizontal:"left"},TransitionComponent:w=fN,transitionDuration:S="auto",TransitionProps:{onEntering:M}={},disableScrollLock:k=!1}=o,E=Fk(o.TransitionProps,ON),C=Fk(o,IN),A=null!=(n=null==b?void 0:b.paper)?n:y,D=JM.useRef(),q=zD(D,A.ref),_=zk({},o,{anchorOrigin:l,anchorReference:u,elevation:h,marginThreshold:m,externalPaperSlotProps:A,transformOrigin:x,TransitionComponent:w,transitionDuration:S,TransitionProps:E}),T=(e=>{const{classes:t}=e;return JD({root:["root"],paper:["paper"]},NN,t)})(_),N=JM.useCallback(()=>{if("anchorPosition"===u)return c;const e=FN(s),t=(e&&1===e.nodeType?e:TD(D.current).body).getBoundingClientRect();return{top:t.top+PN(t,l.vertical),left:t.left+RN(t,l.horizontal)}},[s,l.horizontal,l.vertical,c,u]),O=JM.useCallback(e=>({vertical:PN(e,x.vertical),horizontal:RN(e,x.horizontal)}),[x.horizontal,x.vertical]),I=JM.useCallback(e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=O(t);if("none"===u)return{top:null,left:null,transformOrigin:zN(n)};const r=N();let i=r.top-n.vertical,o=r.left-n.horizontal;const a=i+t.height,l=o+t.width,c=ND(FN(s)),d=c.innerHeight-m,f=c.innerWidth-m;if(null!==m&&i<m){const e=i-m;i-=e,n.vertical+=e}else if(null!==m&&a>d){const e=a-d;i-=e,n.vertical+=e}if(null!==m&&o<m){const e=o-m;o-=e,n.horizontal+=e}else if(l>f){const e=l-f;o-=e,n.horizontal+=e}return{top:`${Math.round(i)}px`,left:`${Math.round(o)}px`,transformOrigin:zN(n)}},[s,u,N,O,m]),[L,P]=JM.useState(g),R=JM.useCallback(()=>{const e=D.current;if(!e)return;const t=I(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,P(!0)},[I]);JM.useEffect(()=>(k&&window.addEventListener("scroll",R),()=>window.removeEventListener("scroll",R)),[s,k,R]);JM.useEffect(()=>{g&&R()}),JM.useImperativeHandle(a,()=>g?{updatePosition:()=>{R()}}:null,[g,R]),JM.useEffect(()=>{if(!g)return;const e=function(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}return r.clear=()=>{clearTimeout(n)},r}(()=>{R()}),t=ND(s);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[s,g,R]);let z=S;"auto"!==S||w.muiSupportAuto||(z=void 0);const F=p||(s?TD(FN(s)).body:void 0),j=null!=(r=null==v?void 0:v.root)?r:jN,V=null!=(i=null==v?void 0:v.paper)?i:VN,H=rq({elementType:V,externalSlotProps:zk({},A,{style:L?A.style:zk({},A.style,{opacity:0})}),additionalProps:{elevation:h,ref:q},ownerState:_,className:dD(T.paper,null==A?void 0:A.className)}),B=rq({elementType:j,externalSlotProps:(null==b?void 0:b.root)||{},externalForwardedProps:C,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:F,open:g},ownerState:_,className:dD(T.root,f)}),{slotProps:$}=B,W=Fk(B,LN);return zC.jsx(j,zk({},W,!QD(j)&&{slotProps:$,disableScrollLock:k},{children:zC.jsx(w,zk({appear:!0,in:g,onEntering:(e,t)=>{M&&M(e,t),R()},onExited:()=>{P(!1)},timeout:z},E,{children:zC.jsx(V,zk({},H,{children:d}))}))}))});function BN(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $N(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function WN(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function YN(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?UN(Object(n),!0).forEach(function(t){WN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function XN(){
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var l=r&&r.prototype instanceof s?r:s,c=Object.create(l.prototype);return GN(c,"_invoke",function(n,r,i){var o,s,l,c=0,u=i||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return o=t,s=0,l=e,f.n=n,a}};function p(n,r){for(s=n,l=r,t=0;!d&&c&&!i&&t<u.length;t++){var i,o=u[t],p=f.p,h=o[2];n>3?(i=h===r)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=p&&((i=n<2&&p<o[1])?(s=0,f.v=r,f.n=o[1]):p<h&&(i=n<3||o[0]>r||r>h)&&(o[4]=n,o[5]=r,f.n=h,s=0))}if(i||n>1)return a;throw d=!0,r}return function(i,u,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,h),s=u,l=h;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),p(s,l)):f.n=l:f.v=l);try{if(c=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){o=e,s=1,l=t}finally{c=1}}return{value:t,done:d}}}(n,i,o),!0),c}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][r]?t(t([][r]())):(GN(t={},r,function(){return this}),t),d=c.prototype=s.prototype=Object.create(u);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,GN(e,i,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=c,GN(d,"constructor",c),GN(c,"constructor",l),l.displayName="GeneratorFunction",GN(c,i,"GeneratorFunction"),GN(d),GN(d,i,"Generator"),GN(d,r,function(){return this}),GN(d,"toString",function(){return"[object Generator]"}),(XN=function(){return{w:o,m:f}})()}function GN(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}GN=function(e,t,n,r){function o(t,n){GN(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},GN(e,t,n,r)}function KN(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||QN(e,t)||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 ZN(e){return function(e){if(Array.isArray(e))return BN(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||QN(e)||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 JN(e){return JN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},JN(e)}function QN(e,t){if(e){if("string"==typeof e)return BN(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?BN(e,t):void 0}}function eO(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tO,nO,rO={exports:{}},iO={},oO=(nO||(nO=1,rO.exports=function(){if(tO)return iO;tO=1;var e=QM,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(e,n,a){var s,l={},c=null,u=null;for(s in void 0!==a&&(c=""+a),void 0!==n.key&&(c=""+n.key),void 0!==n.ref&&(u=n.ref),n)r.call(n,s)&&!o.hasOwnProperty(s)&&(l[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps)void 0===l[s]&&(l[s]=n[s]);return{$$typeof:t,type:e,key:c,ref:u,props:l,_owner:i.current}}return iO.Fragment=n,iO.jsx=a,iO.jsxs=a,iO}()),rO.exports),aO=function(e){var t=e.className,n=e.title,r=e.path,i=e.fillRule;return oO.jsxs(v_,{className:t,viewBox:"0 0 16 16",fontSize:"small",role:"img",style:{height:12,width:12},children:[oO.jsx("path",{d:r}),n?oO.jsx("title",{children:n}):void 0,i?oO.jsx("use",{fillRule:i}):void 0]})},sO={STYLE:{ELLIPSIS:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},FOCUS:{boxShadow:"inset 0 0 0 2px #177FE6"},ICONS:{COLOR:{PRIMARY:"rgba(89, 89, 89)",SECONDARY:"rgba(89, 89, 89, 0.8)",DISABLED:"rgba(89, 89, 89, 0.4)"}}}},lO={L:new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗＡ-Ｚａ-ｚｦ-ￜ]"),R:new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),AL:new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]")},cO=function(e){return lO.L.test(e)},uO=function(e){return lO.R.test(e)||lO.AL.test(e)};function dO(e){for(var t,n=e?e.length:0,r=0;r<n;r++){if(t=e[r],cO(t))return"ltr";if(uO(t))return"rtl"}return"ltr"}var fO,pO,hO,mO,gO=u_(jT,{shouldForwardProp:function(e){return"direction"!==e&&"padding"!==e&&"styling"!==e}})(function(e){var t=e.direction,n=e.padding,r=e.styling,i=r.fontSize,o=r.fontFamily,a=r.color;return{fontWeight:"normal",lineHeight:"normal",fontSize:"".concat(i," !important"),fontFamily:"".concat(o," !important"),color:"".concat(a," !important"),height:"100%",minWidth:"0px",maxWidth:"640px",padding:n,"&:disabled":{color:a,opacity:1},"& .MuiButton-startIcon":{margin:"ltr"===t?"0 2px":void 0},"& .MuiButton-endIcon":{margin:"rtl"===t?"0 2px":void 0}}}),yO=u_(function(e){var t=e.className;return oO.jsx(aO,{className:t,path:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z",fillRule:"evenodd"})})(function(){return{color:sO.STYLE.ICONS.COLOR.SECONDARY,marginTop:"1px"}}),vO=u_(function(e){var t=e.className;return oO.jsx(aO,{className:t,path:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5L8 9Z"})})(function(){return{color:sO.STYLE.ICONS.COLOR.SECONDARY,marginTop:"1px","&.disabled":{color:sO.STYLE.ICONS.COLOR.DISABLED,opacity:.6}}}),bO=function(e){var t=e.isOpen,n=e.onClick,r=e.popoverId,i=e.source,o=i.styling,a=i.info.text,s=i.layout.direction,l=i.meta,c=l.allowed,u=l.hasAlternatives,d=l.hasCyclic,f=l.hasMultiple,p=l.index,h=l.isCyclic,m=l.isLocked,g=i.resources.translator,y=i.services.focus,v=i.settings.isDisabled,b=i.state.inSelections,x=!(!c.change||!u),w=!(!c.reload||!h),S=(x||w)&&!b&&!v(),M={pointerEvents:S?"auto":"none"},k=function(e){var t=e.allowed,n=e.canChange,r=e.canReload,i=e.direction,o=e.hasCyclic,a=e.isLocked,s={top:"8px",right:"6px",bottom:"8px",left:"6px"};if(!e.hasMultiple)return"".concat(s.top," ").concat(s.right," ").concat(s.bottom," ").concat(s.left);var l=o&&t.reload;return"ltr"===i&&(a?s.left="0px":r||!n&&l?s.left="4px":n||(s.left="2px"),n||r||(s.right="0px")),"rtl"===i&&(a?s.right="0px":r||!n&&l?s.right="4px":n||(s.right="2px"),n||r||(s.left="0px")),"".concat(s.top," ").concat(s.right," ").concat(s.bottom," ").concat(s.left)}({allowed:c,canChange:x,canReload:w,direction:s,hasCyclic:d,hasMultiple:f,isLocked:m}),E=WN(WN({},"rtl"===s?"endIcon":"startIcon",m&&oO.jsx(yO,{height:12})),"rtl"===s?"startIcon":"endIcon",(x||w)&&oO.jsx(vO,{className:"".concat(b||v()?"disabled":"")})),C=JM.useRef(),A=JM.useRef();JM.useEffect(function(){t||y.shouldFor(p)&&(C.current.focus(),A.current.focusVisible())});var D=dO(a),q="Accessibility.".concat(S?"Alternative":"Normal",".Instructions");return oO.jsx(gO,YN(YN({action:A,"aria-describedby":r,"aria-label":g.get(q),color:"inherit",direction:s,disabled:!S||v()||b,onClick:function(e){S&&n(e)},padding:k,ref:C,style:M,styling:o.title,title:a},E),{},{children:oO.jsx("span",{dir:D,style:sO.STYLE.ELLIPSIS,children:a})}))},xO=function(e){var t=e.className,n=e.title;return oO.jsx(aO,{className:t,title:n,path:"M 6 2 h 10 V 1 H 6 Z m 5 5 h 5 V 6 h -5 Z m 5 5 h -5 v -1 h 5 Z M 5 10 h 1 v 2.663 a 3.5 3.5 0 1 0 -2.922 0.036 l -0.406 0.914 A 4.501 4.501 0 1 1 7.329 13 H 9 v 1 H 5 Z"})},wO=u_(jT,{shouldForwardProp:function(e){return"direction"!==e&&"isFirst"!==e&&"isLast"!==e&&"styling"!==e}})(function(e){var t=e.direction,n=e.isFirst,r=e.isLast,i=e.styling.color;return{fontWeight:"normal",lineHeight:"normal",color:i,height:"24px",width:"24px",padding:0,marginLeft:"ltr"!==t||n?void 0:"4px",marginRight:"rtl"!==t||r?void 0:"4px","&:disabled":{color:i,opacity:1}}}),SO=u_(xO,{shouldForwardProp:function(e){return"direction"!==e&&"isFirst"!==e&&"isLast"!==e}})(function(e){var t=e.direction,n=e.isFirst,r=e.isLast;return{color:sO.STYLE.ICONS.COLOR.PRIMARY,marginTop:"1px",marginLeft:"ltr"!==t||n?void 0:"4px",marginRight:"rtl"!==t||r?void 0:"4px"}}),MO=u_(function(e){var t=e.className,n=e.title;return oO.jsx(aO,{className:t,title:n,path:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7Z"})},{})(function(){return{color:sO.STYLE.ICONS.COLOR.SECONDARY,"&.disabled":{color:sO.STYLE.ICONS.COLOR.DISABLED}}}),kO=function(e){var t=e.source;if(!t.meta.isCyclic)return null;var n=KN(JM.useState(!1),2),r=n[0],i=n[1],o=t.styling,a=t.action.stepCycle,s=t.info,l=s.position,c=s.tooltip,u=t.layout.direction,d=t.meta,f=d.allowed,p=d.isFirst,h=d.isLast,m=t.settings.isDisabled,g=t.state.inSelections;return JM.useEffect(function(){r&&i(!1)},[l]),f.reload?oO.jsx(wO,{direction:u,disabled:r||g||m(),isFirst:p,isLast:h,onClick:function(){return i(!0),void a()},styling:o.title,title:c,variant:"outlined",children:oO.jsx(MO,{className:"".concat(r||g||m()?"disabled":"")})}):oO.jsx(SO,{direction:u,isFirst:p,isLast:h,style:{flexShrink:0},title:c})},EO=function(e){var t=e.className,n=e.title;return oO.jsx(aO,{className:t,title:n,path:"M7 4h9v1H7V4ZM9 8h7v1H9V8ZM11 12h5v1h-5v-1ZM1 4v3.526a3.5 3.5 0 0 0 3.5 3.5h2.31L5.22 9.402l.715-.7L8.7 11.527 5.935 14.35l-.714-.7 1.59-1.624H4.5a4.5 4.5 0 0 1-4.5-4.5V4h1Z"})},CO=u_(jT,{shouldForwardProp:function(e){return"styling"!==e}})(function(e){var t=e.styling,n=t.fontSize,r=t.fontFamily,i=t.color;return{fontWeight:"normal",lineHeight:"normal",fontSize:"".concat(n," !important"),fontFamily:"".concat(r," !important"),color:"".concat(i," !important"),padding:"0px 5px",height:"100%",minWidth:"45px","&:disabled":{color:i}}}),AO={color:sO.STYLE.ICONS.COLOR.SECONDARY,marginTop:"1px","&.disabled":{color:sO.STYLE.ICONS.COLOR.DISABLED}},DO=u_(function(e){var t=e.className;return oO.jsx(aO,{className:t,path:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5 8.5 8z"})})(function(){return AO}),qO=u_(function(e){var t=e.className;return oO.jsx(aO,{className:t,path:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})})(function(){return AO}),_O=u_(EO,{shouldForwardProp:function(e){return"direction"!==e&&"isFirst"!==e&&"isLast"!==e}})(function(e){var t=e.direction,n=e.isFirst,r=e.isLast;return{color:sO.STYLE.ICONS.COLOR.PRIMARY,marginTop:"1px",marginLeft:"ltr"!==t||n?void 0:"4px",marginRight:"rtl"!==t||r?void 0:"4px"}}),TO=function(e){var t=e.source;if(!t.meta.isDrillDown)return null;var n=t.styling,r=t.action.drillUp,i=t.info,o=i.breadcrumbs,a=i.tooltip,s=t.layout.direction,l=t.meta,c=l.isFirst,u=l.isLast,d=t.settings.isDisabled,f=t.state.inSelections,p=d()||f?"disabled":null,h=WN({},"rtl"===s?"startIcon":"endIcon","rtl"===s?oO.jsx(qO,{className:p}):oO.jsx(DO,{className:p})),m=o.map(function(e,t){var i=dO(e);return oO.jsx(CO,YN(YN({disabled:d()||f,onClick:function(){return function(e){r({steps:o.length-e})}(t)},styling:n.title,title:e},h),{},{children:oO.jsx("span",{dir:i,style:sO.STYLE.ELLIPSIS,children:e})}),"breadcrumb-".concat(e))});return oO.jsxs(oO.Fragment,{children:["rtl"===s?m.reverse():void 0,oO.jsx(_O,{direction:s,isFirst:c,isLast:u,style:{flexShrink:0},title:a}),"rtl"===s?void 0:m]})},NO=u_(SN,{shouldForwardProp:function(e){return"nested"!==e&&"rtl"!==e}})(function(e){var t=e.nested,n=e.rtl;return{padding:"4px ".concat(t&&n?"32px":"16px"," 4px ").concat(t&&!n?"32px":"16px"),"&:focus":YN({},sO.STYLE.FOCUS)}}),OO=u_(CN)(function(){return{marginRight:0,justifyContent:"center"}}),IO=u_(function(e){var t=e.className;return oO.jsx(aO,{className:t,path:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2 3 3Z"})})(function(){return{color:sO.STYLE.ICONS.COLOR.SECONDARY}}),LO=u_(xO)(function(){return{color:sO.STYLE.ICONS.COLOR.SECONDARY}}),PO=u_(EO)(function(){return{color:sO.STYLE.ICONS.COLOR.SECONDARY,fontWeight:600}}),RO=function(e){var t=e.meta;return e.selected?oO.jsx(IO,{height:12}):null!=t&&t.isCyclic?oO.jsx(LO,{height:12}):null!=t&&t.isDrillDown?oO.jsx(PO,{height:12}):void 0},zO=function(e){var t=e.id,n=e.meta,r=e.nested,i=e.onClick,o=e.selected,a=e.source,s=e.text,l=a.styling,c=a.settings.isRTL,u=YN({fontWeight:!n||n.isNormal?"normal":600,lineHeight:"normal",fontSize:l.popover.fontSize,fontFamily:l.popover.fontFamily,color:l.popover.color,textAlign:c?"end":"start"},sO.STYLE.ELLIPSIS),d=dO(s),f=oO.jsx(OO,{sx:c?{paddingRight:"12px"}:{paddingLeft:"12px"},children:RO({meta:n,selected:o})});return oO.jsx(QM.Fragment,{children:oO.jsxs(NO,{autoFocus:o,nested:r,onClick:function(e){return null==i?void 0:i(e)},rtl:c,title:s,children:[c&&f,oO.jsx(TN,{dir:d,primaryTypographyProps:{style:u},children:s}),!c&&f]})},t)},FO=u_(sN)(function(){return{marginTop:"-1px"}}),jO=function(e){var t=e.anchor,n=e.id,r=e.onClose,i=e.open,o=e.source,a=o.action,s=a.changeTo,l=a.drillUp,c=a.setActiveField,u=o.info,d=u.breadcrumbs,f=u.group,p=u.id,h=u.text,m=o.data.alternatives,g=o.meta,y=g.index,v=g.isCyclic,b=g.isDrillDown,x=o.resources.translator,w=o.services.focus,S={isChanging:!1},M=JM.useRef(),k=function(){var e,t=document.activeElement;null!=M&&null!==(e=M.current)&&void 0!==e&&e.contains(t)&&t.blur(),r()},E=v||b,C=oO.jsx(zO,{id:p,meta:o.meta,onClick:k,selected:!E,source:o,text:E?f.name:h},p),A=E&&f.items.map(function(e){return oO.jsx(zO,{id:e.id,nested:!0,onClick:function(t){return function(e,t){S.isChanging||(S.isChanging=!0,"keydown"!==e.type&&"keyup"!==e.type||w.queueFor(y),v&&c({fieldIndex:t.index}),b&&l({steps:d.length-t.index}))}(t,e)},selected:e.current,source:o,text:e.text})}),D=m.map(function(e,t){return oO.jsxs(QM.Fragment,{children:[oO.jsx(zO,{id:e.id,meta:e.meta,onClick:function(t){return n=t,r=e.id,void(S.isChanging||(S.isChanging=!0,"keydown"!==n.type&&"keyup"!==n.type||w.queueFor(y),s({id:r})));var n,r},source:o,text:e.text},e.id),t<m.length-1&&oO.jsx(FO,{},"divider-".concat(e.id))]},e.id)});return oO.jsx(HN,{anchorEl:t,anchorOrigin:{vertical:"top",horizontal:"center"},disableRestoreFocus:!0,id:n,onClose:k,open:i,ref:M,slotProps:{paper:{style:{minWidth:"250px",maxWidth:"640px",maxHeight:"300px"}}},transformOrigin:{vertical:"bottom",horizontal:"center"},children:oO.jsxs(yN,{"aria-label":x.get("Accessibility.Popover.Instructions"),dense:!0,children:[C,A,oO.jsx(FO,{},"divider-".concat(p)),D]})})},VO=function(e){var t=e.source,n=KN(JM.useState(null),2),r=n[0],i=n[1],o={id:r?"alternatives-popover":void 0,isOpen:Boolean(r)},a=t.layout.direction,s=t.meta.index,l=t.services.focus,c=function(){i(null)};JM.useEffect(function(){o.isOpen&&c()},[t.info.key]);var u=oO.jsx(kO,{source:t}),d=oO.jsx(TO,{source:t});return oO.jsxs(oO.Fragment,{children:["rtl"===a?void 0:d,"rtl"===a?void 0:u,oO.jsx(bO,{onClick:function(e){var t=e.currentTarget;t.classList.contains("qcm-focus-visible")&&l.queueFor(s),i(t)},isOpen:o.isOpen,popoverId:o.id,source:t}),oO.jsx(jO,{anchor:r,id:o.id,onClose:c,open:o.isOpen,source:t}),"rtl"===a?d:void 0,"rtl"===a?u:void 0]})},HO=function(){if(pO)return fO;pO=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return fO=function e(){var t,n,r,l,c,u,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(h&&l&&(o(l)||(c=i(l)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&o(r)?r:{},a(d,{name:n,newValue:e(h,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},fO}(),BO=eO(HO),$O={},WO=eO((hO||(hO=1,mO=$O,(()=>{var e={370:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,c,u,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(h&&i&&(a(i)||(c=o(i)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(h,u,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};n.r(r),n.d(r,{default:()=>De});var i=n(370),o=n.n(i);const a=function(e,t,n){if(!t)return!1;var r,i=t.split("."),o=i[i.length-1],a=e;for(r=0;r<i.length-1;++r)void 0===a[i[r]]&&(a[i[r]]=Number.isNaN(+i[r+1])?{}:[]),a=a[i[r]];if(void 0!==n){var s=a[o];return a[o]=n,{updated:n,previous:s}}return delete a[o],!1},s=function(e,t,n){var r,i=t.split("."),o=e;if(void 0===o)return n;for(r=0;r<i.length;++r){if(void 0===o[i[r]])return n;o=o[i[r]]}return o},l={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var c="".concat(" ","(").concat("　"),u="".concat("　",")").concat(" ");function d(e){return c+e+u}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===i)return r;if(r.qDerivedFieldData)for(var o=0;o<r.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=r.qDerivedFieldData.qDerivedFieldLists[o],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===i)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function p(e){return!(!e.fullAccumulation&&!e.fullRange)}function h(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function m(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),n=t.trim();return"="===n.substring(0,1)?n.substring(1).trim():n}function g(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function y(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function v(e){return void 0===e?")":", 0, ".concat(e,")")}function b(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function x(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(b("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(b("MaxString(".concat(t,")")),")'\"}")}function w(e){var t=e.modifier,n=void 0===t?{}:t,r=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,l=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var c=x(f(r[0],i),g(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(r&&2===r.length){var u=f(r[0],i),d=f(r[1],i),p=g(0),h=g(1),m=x(u,p),y=x(d,h);return"".concat(a,"({1<").concat(m,",").concat(y,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function S(e){return"".concat(e,"(")}function M(e){var t=e.properties,n=e.layout;return s(t,"qHyperCubeDef.qDimensions",s(n,"qHyperCube.qDimensionInfo",[])).length}const k={isFullRange:p,getNumDimensions:M,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=d(m(t));if(!n.showExcludedValues)return a;var s=w({modifier:n,dimensions:r,dimensionAndFieldList:i}),l=o?"":", 0";if(r&&1===r.length){var c=g(0);return"If(Count(".concat(c,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var u=g(0),f=g(1);return"If(Count(".concat(u,") * Count(").concat(f,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:h,getNumStepComp:function(e,t){if(!p(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return h(e,t)},getAboveCompPrefix:y,getAboveCompSuffix:v,getAboveComp:function(e,t,n,r){return y(e,t)+n+v(r)},getFunctionPrefix:S,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return S(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:w,needDimension:function(e){var t=e.modifier,n=e.properties,r=e.layout;return 0===function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t)&&2===M({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=g(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var i=["Descending","Ascending"],o=n.qSortByNumeric?"(Numeric, ".concat(i[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(i[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(o,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(o,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:m,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(c);if(-1!==n){var r=t.indexOf(u);if(-1!==r)return t.substring(n+c.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach(function(n){void 0===e[n]&&(e[n]=t[n])})},isNumeric:f,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,i=void 0===r?1:r,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!n)return!0;var s=M({properties:t,layout:n});return s>=i&&s<=a},getExpressionWithMarkers:d,canExtract:function(e){var t=e.indexOf(c),n=e.indexOf(u);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:g,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,n){var r=t||e.outputExpression;if(e.base&&e.base.qDef&&(r=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var i=n.qHyperCubeDef.qMeasures.find(function(t){return t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null});i&&t!==i.qDef.qLabel&&(r=i.qLibraryId||i.qDef.base.qLibraryId?"[".concat(i.qDef.qLabel,"]"):i.qDef.base.qDef);var o=function(e){var t=l.OPTIONS.find(function(t){return t.value===e.decomposition});return t?l.EXPRESSIONS[t.value]:""}(e);r=r.startsWith("=")?r.substr(1):r,r="".concat(o,"(").concat(r,", ").concat(e.steps,")")}return r},getDecomposition:function(e){var t="observed";return Object.values(l.EXPRESSIONS).find(function(n){var r=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return l.EXPRESSIONS[n]&&r.includes(l.EXPRESSIONS[n].toLowerCase())&&(t=n),n}),t}};function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}var A=o().bind(null,!0),D={},q=Array.isArray;function _(e){return null!=e&&!Array.isArray(e)&&"object"===C(e)}function T(e){return void 0===e}function N(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function O(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach(function(t,i){if(i!==r.length){n=+t;var o=Number.isNaN(n)?{}:[];e[n||t]=T(e[n||t])?o:e[t],e=e[n||t]}}),e}function I(e,t){var n=!0;if(_(e)&&_(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach(function(r){I(e[r],t[r])||(n=!1)}),n);if(q(e)&&q(t)){if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r+=1)if(!I(e[r],t[r]))return!1;return!0}return e===t}D.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach(function(i){var o=function(e){return e?A({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);I(o,a)||N(t,i)||(T(a)?r.push({op:"add",path:s,value:o}):_(o)&&_(a)?r=r.concat(D.generate(a,o,s)):q(o)&&q(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&T(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,i=e.length;r<i;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(I(t,i))return r;if(!T(t[0])&&T(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),i.splice(s,1)):r=r.concat(D.generate(i[s],t[o],"".concat(n,"/").concat(s)));for(var l=0,c=t.length;l<c;l+=1)-1===(o=a(i,t[l].qInfo&&t[l].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(l),value:t[l]}),i.splice(l,0,t[l])):o!==l&&(r.push({op:"move",path:"".concat(n,"/").concat(l),from:"".concat(n,"/").concat(o)}),i.splice(l,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:"".concat(n,"/").concat(i),value:o}))}),Object.keys(e).forEach(function(i){T(t[i])&&!N(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})}),r},D.apply=function(e,t){t.forEach(function(t){var n,r,i=O(e,t.path),o=t.path.split("/").splice(-1)[0],a=o&&Number.isNaN(+o)?i[o]:i[+o]||i,s=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(i=null,a=e),"add"===t.op||"replace"===t.op)if(q(i))"-"===o&&(o=i.length),i.splice(+o,"add"===t.op?0:1,t.value);else if(q(a)&&q(t.value)){var l,c=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return E(e)}(r=c)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return E(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}(r)||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.")}())}else if(_(a)&&_(t.value))n=a,Object.keys(n).forEach(function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!N(n,e)&&delete n[e]}),A(a,t.value);else{if(!i)throw new Error("Patchee is not an object we can patch");i[o]=t.value}else if("move"===t.op){var u=O(e,t.from);q(i)?i.splice(+o,0,u.splice(+s,1)[0]):(i[o]=u[s],delete u[s])}else"remove"===t.op&&(q(i)?i.splice(+o,1):delete i[o])})},D.clone=function(e){return A({},e)},D.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},D.updateObject=function(e,t){Object.keys(e).length?D.apply(e,D.generate(e,t)):A(e,t)};const L=D;var P="accumulation";function R(e,t){var n=s(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===P)return n[r]}function z(e,t){var n=function(e,t){var n=s(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===P)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var F={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const j={translationKey:"properties.modifier.accumulation",needDimension:k.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,a=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=k.getNumDimensions({properties:r,layout:i}));var c=s(r,"qHyperCubeDef.qDimensions",[]),u=k.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:a}),d=k.getNumStepComp(n,l),f=k.getAboveComp(n,l,u,d),p=k.getRangeComp("RangeSum",f);if(k.needDimension({modifier:n,properties:r,layout:i})){var h=k.getDimComp(c,1),m=k.getDimComp(c,0),g=k.getAggrComp(p,h,m);p=n.showExcludedValues?k.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:a,valueComp:g}):g}return p},extractInputExpression:k.extractInputExpression,initModifier:function(e){k.initModifier(e,F)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(z(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(z(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(z(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(z(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=R(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=R(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(P))return!1;var o=R(t,e);return o&&!o.disabled}}}};var V="movingAverage";function H(e,t){var n=s(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===V)return n[r]}function B(e,t){var n=function(e,t){var n=s(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===V)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var $={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const W={translationKey:"properties.modifier.movingAverage",needDimension:k.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,i=e.properties,o=e.layout,a=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var c=a;void 0===c&&(c=k.getNumDimensions({properties:i,layout:o}));var u=s(i,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,f=k.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:u,dimensionAndFieldList:l,treatMissingAsNull:d}),p=k.getNumStepComp(r,c),h=k.getAboveComp(r,c,f,p);if(r.nullSuppression)t=k.getRangeComp("RangeAvg",h);else{var m=k.getRangeComp("RangeSum",h),g=function(e,t){var n=k.getRowNoComp(e,t);if(!k.isFullRange(e)){var r=e.steps,i="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(i,", ").concat(n,")")}return n}(r,c);t="".concat(m," / ").concat(g)}var y=t;if(k.needDimension({modifier:r,properties:i,layout:o})){var v=k.getDimComp(u,1),b=k.getDimComp(u,0),x=k.getAggrComp(y,v,b);y=r.showExcludedValues?k.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:k.extractInputExpression,initModifier:function(e){k.initModifier(e,$)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(B(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(B(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(B(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(B(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=H(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=H(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(B(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(B(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(V))return!1;var o=H(t,e);return o&&!o.disabled}}}};var U="timeSeriesDecomposition";function Y(e,t){var n=s(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===U)return n[r]}function X(e,t){var n=function(e,t){var n=s(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===U)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var G={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const K={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:k.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties;return n?k.generateTSDExpression(n,t,r):t},extractInputExpression:k.extractInputExpression,initModifier:function(e,t){k.initModifier(e,G),""===e.decomposition&&t&&(e.decomposition=k.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(X(t,e),".decomposition")},type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:l.OPTIONS},steps:{refFn:function(t){return"".concat(X(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,n){var r=Y(t,e);if(r){var i=r.steps;r.steps="number"!=typeof i||Number.isNaN(i)?2:Math.abs(i),n.properties.qHyperCubeDef.qMeasures=n.properties.qHyperCubeDef.qMeasures.map(function(e){return e.qDef.modifiers.map(function(e){return"timeSeriesDecomposition"===e.type?e.steps=i:e.steps=e.steps,e}),e})}},show:function(t){var n=Y(t,e);return n&&!n.fullRange}}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(U))return!1;var o=Y(t,e);return o&&!o.disabled}}}};var Z="difference";function J(e,t){var n=function(e,t){var n=s(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===Z)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Q={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:k.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:k.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,a=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=k.getNumDimensions({properties:r,layout:i}));var c=s(r,"qHyperCubeDef.qDimensions",[]),u=k.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:a}),d=k.getAboveComp(n,l,u),f="".concat(u," - ").concat(d);if(k.needDimension({modifier:n,properties:r,layout:i})){var p=k.getDimComp(c,1),h=k.getDimComp(c,0),m=k.getAggrComp(f,p,h);f=n.showExcludedValues?k.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:a,funcComp:"Only",valueComp:m}):m}return f},initModifier:function(e){Object.keys(Q).forEach(function(t){void 0===e[t]&&(e[t]=Q[t])})},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(J(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(J(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(J(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(Z))return!1;var o=function(e,t){var n=s(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===Z)return n[r]}(t,e);return o&&!o.disabled}}}};var te="normalization";function ne(e,t){var n=s(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===te)return n[r]}function re(e,t){var n=function(e,t){var n=s(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===te)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function ie(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}var oe={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function ae(e){return 2===e?"{1}":""}function se(e,t,n){return 1===e?"{$<".concat(k.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ce(e,t,n){return 0===e&&t>1?"<".concat(k.getDimDefWithWrapper(n),">"):""}const ue={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return k.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:k.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,o=e.numDimensions,a=e.dimensionAndFieldList;if(!n)return t;var l=o;void 0===l&&(l=k.getNumDimensions({properties:r,layout:i}));var c=s(r,"qHyperCubeDef.qDimensions",[]),u=k.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:a}),d=n.selectionScope,f=n.dimensionalScope;return function(e,t,n,r,i,o,a,s){var l=ae(t),c=se(t,n,r),u=""===l&&""===c?"":l||c,d=le(i,o),f=ce(i,o,a),p=function(e){for(var t=[],n=0;n<e;n++)t[n]=k.getDimDefWithWrapper(n);return t.join(", ")}(o);return s?"(If(".concat(e," < 0, null(), ").concat(e,"))/ Sum(").concat(u," ").concat(d).concat(f," Aggr(").concat(u," RangeMax( 0, ").concat(e,"), ").concat(p,"))"):"".concat(e,"/ Sum(").concat(u," ").concat(d).concat(f," Aggr(").concat(u," ").concat(e,", ").concat(p,"))")}(u,d,n.field,n.value,f,l,n.primaryDimension,n.ignoreNegative)},initModifier:function(e){Object.keys(oe).forEach(function(t){void 0===e[t]&&(e[t]=oe[t])})},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!k.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(re(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(n){return function(e,t,n){var r=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return r=function(e,t){if(1===e){var n=ie(t,0);t.splice(n,1)}return t}(ne(e,n).dimensionalScope,r),r}(n,t,e)}},field:{refFn:function(t){return"".concat(re(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,n){return n.app.getFieldList().then(function(e){return e.map(function(e){return{label:e.qName,value:e.qName}})})},show:function(t){return 1===ne(t,e).selectionScope}},value:{refFn:function(t){return"".concat(re(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===ne(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(re(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(n,r){return function(e,t,n,r){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:0,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t){if(e<2){var n=ie(t,0);t.splice(n,1)}return t}(i,o),o=function(e,t){if(0===e){var n=ie(t,1);t.splice(n,1)}return t}(ne(e,r).selectionScope,o),o}(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(re(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(t,n){return 0===(ne(t,e).dimensionalScope||0)&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return k.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(te))return!1;var o=ne(t,e);return o&&!o.disabled}}},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ce};var de="library id deleted",fe="qDef.qDef",pe="qDef.base.qDef",he="qLibraryId",me="qDef.base.qLibraryId",ge="qDef.qLabel",ye="qDef.qLabelExpression",ve="qDef.base.qLabel",be="qDef.base.qLabelExpression",xe="qDef.qAggrFunc",we="qDef.base.qAggrFunc",Se="qDef.base";const Me={getExpression:function(e){var t=s(e,pe);return void 0!==t?t:s(e,fe)},getExpressionRef:function(e){return void 0!==s(e,pe)?pe:fe},getLibraryIdRef:function(e){return s(e,me)?me:he},getLibraryId:function(e){return s(e,me)||s(e,he)},getLabelRef:function(e){return s(e,Se)?ve:ge},getLabelExpressionRef:function(e){return s(e,Se)?be:ye}};var ke={initBase:function(e,t){(t||ke.isValid(e))&&(a(e,pe,s(e,fe)),a(e,me,s(e,he)),a(e,ve,s(e,ge)),a(e,be,s(e,ye)))},restoreBase:function(e){ke.isValid(e)&&(a(e,fe,s(e,pe)),a(e,he,s(e,me)),a(e,ge,s(e,ve)),a(e,ye,s(e,be)),s(e,xe)&&s(e,we)&&a(e,xe,s(e,we)),delete e.qDef.base)},isValid:function(e){var t=s(e,pe),n=s(e,me);return void 0!==t||void 0!==n}};const Ee=ke;function Ce(e){return Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ce(e)}var Ae={accumulation:j,movingAverage:W,difference:ee,normalization:ue,timeSeriesDecomposition:K};const De={modifiers:Ae,apply:_e,applyModifiers:Te,cleanUpMeasure:Ne,destroy:function(e){e&&qe[e.id]&&qe[e.id].masterItemSubscriber&&(qe[e.id].masterItemSubscriber&&qe[e.id].masterItemSubscriber.unsubscribe(),delete qe[e.id])},hasActiveModifiers:Oe,getActiveModifier:Ie,initBase:Ee.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some(function(e){return Ae[e]})},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return Ae[e]&&Ae[e].isApplicable({properties:n,layout:r})})},measureBase:Me,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,i=!1,o=!1;return t.forEach(function(e){var t=Re(e);$e({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||Ge({modifiers:t,properties:n,layout:r}))}),i&&!o},ifEnableTotalsFunction:Le};var qe={};function _e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.model,n=e.properties,r=e.isSnapshot,i=void 0!==r&&r,a=e.masterItem,l=!1;qe[t.id]=qe[t.id]||{isFirstTime:!0};var c=qe[t.id].isFirstTime;if(qe[t.id].isFirstTime=!1,n&&"object"===Ce(n))return Te({model:t,properties:n});var u=t?t.layout:void 0,d=s(u,"qSelectionInfo.qInSelections");if(i||d)return Promise.resolve(l);var f=s(u,"qHyperCube.qMeasureInfo"),p=qe[t.id].lastReloadTime;if(qe[t.id].lastReloadTime=s(t,"app.layout.qLastReloadTime"),Oe({measures:f,layout:u})){var h=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return s(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Be({measure:e,properties:n,layout:r})})}({measures:t,layout:n})}({measures:f,layout:u,model:t,lastReloadTime:p});return h||function(e){var t=e.measures,n=e.layout,r=e.masterItem,i=e.isFirstTime;return!!Array.isArray(t)&&(i||r||t.some(function(e){return function(e){var t=e.measure,n=e.layout;return $e({modifiers:Re(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})}))}({measures:f,layout:u,masterItem:a,isFirstTime:c})?t.getEffectiveProperties().then(function(e){var n=o()(!0,{},e);Fe(n);var r=Ke(n);return We({model:t}).then(function(i){return Ue({libraryIds:r,model:t}).then(function(r){return h&&function(e){var t=e.properties;Pe(t).forEach(function(e){return function(e){var t=e.measure;if(Be({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach(function(e){if("object"===Ce(e)&&!e.disabled){if(n++,"object"!==Ce(Ae[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(n>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var r=Ae[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&Ve(t)&&k.simplifyExpression(t.qDef.base.qDef)!==k.simplifyExpression(r)&&(t.qDef.base.qDef=r)}})}}({measure:e,properties:t})})}({properties:n}),Te({model:t,oldProperties:e,properties:n,runUpdateIfChange:!0,masterItem:a,libraryItemsProps:r,dimensionAndFieldList:i})})}).catch(function(){return Promise.resolve(l)})}):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some(function(e){return"object"===Ce(e.base)})}(f)?t.getEffectiveProperties().then(function(e){return function(e){var t=e.model,n=e.properties,r=Ke(n);return Ze({model:t,libraryIds:r}).then(function(){var e=o()(!0,{},n);return Pe(n).forEach(function(e){return Ne(e)}),Xe({oldProperties:e,newProperties:n,model:t})})}({model:t,properties:e})}):Promise.resolve(l)}function Te(e){var t=e.model,n=e.oldProperties,r=e.properties,i=e.measures,a=e.runUpdateIfChange,l=void 0!==a&&a,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===n&&(n=l?o()(!0,{},r):r),Fe(r);var f=Ke(r);return Ze({model:t,libraryIds:f,masterItem:c}).then(function(){return function(e){var t=e.measures,n=e.properties,r=e.model,i=e.libraryItemsProps,a=e.dimensionAndFieldList;if(t||(t=Pe(n)),!t.length)return Promise.resolve();if(!i&&!Oe({measures:t,properties:n}))return t.forEach(function(e){return Ne(e)}),Promise.resolve();var l=i?void 0:Ke(n);return We({model:r,dimensionAndFieldList:a}).then(function(e){return Ue({libraryIds:l,model:r,libraryItemsProps:i}).then(function(r){t.forEach(function(t){var i=t.qDef.modifiers;r&&$e({modifiers:i,properties:n})?(function(e){var t=e.measure,n=e.properties,r=e.libraryItemsProps,i=e.dimensionAndFieldList,a=0;Ee.isValid(t)||Ee.initBase(t,!0);var l=t.qDef,c=l.modifiers,u=l.base;Array.isArray(c)&&c.forEach(function(e){if("object"===Ce(e)&&!e.disabled){if(a++,"object"!==Ce(Ae[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(a>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Ae[e.type].initModifier(e,t);var l=t.qLibraryId||u&&u.qLibraryId;l?function(e){var t=e.measure,n=e.modifier,r=e.properties,i=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:Ae[n.type].generateExpression({expression:s,modifier:n,properties:r,dimensionAndFieldList:i});n.outputExpression=l,t.qDef.qDef=n.outputExpression,(t.qDef.qLabel||a.qMeasure.qLabel)&&(t.qDef.qLabel=t.qDef.base.qLabel||a.qMeasure.qLabel),(t.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(t.qDef.qLabelExpression=a.qMeasure.qLabelExpression),t.qDef.quarantine&&t.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(t.qDef.qNumFormat=t.qDef.base.qNumFormat||a.qMeasure.qNumFormat,t.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete t.qLibraryId,t.qDef.coloring=a.qMeasure.coloring,n.base=o()(!0,{},t.qDef.base)}({measure:t,modifier:e,libraryId:l,properties:n,libraryItemsProps:r,dimensionAndFieldList:i}):function(e){var t=e.measure,n=e.modifier,r=e.properties,i=e.dimensionAndFieldList;"function"==typeof Ae[n.type].updateModifier&&Ae[n.type].updateModifier(n,r.qHyperCubeDef);var a=Me.getExpression(t),s=""===a?a:Ae[n.type].generateExpression({expression:a,modifier:n,properties:r,dimensionAndFieldList:i});n.outputExpression=s,t.qDef.qDef=n.outputExpression,t.qDef.base.qLabelExpression?t.qDef.qLabelExpression=t.qDef.base.qLabelExpression:t.qDef.qLabel=t.qDef.base.qLabel||a,n.base=o()(!0,{},t.qDef.base)}({measure:t,modifier:e,properties:n,dimensionAndFieldList:i}),function(e){var t=s(e,"qDef.qAggrFunc");"Expr"!==t||Le(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&Le(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(t)}})}({measure:t,properties:n,libraryItemsProps:r,dimensionAndFieldList:e}),je(t)):Ne(t)})})})}({measures:i,properties:r,model:t,libraryItemsProps:u,dimensionAndFieldList:d}).then(function(){return l?Xe({oldProperties:n,newProperties:r,model:t}):Promise.resolve(!1)})}).catch(function(){return Promise.resolve(!1)})}function Ne(e){!function(e){var t=Re(e);return Array.isArray(t)&&t.some(function(e){return"object"===Ce(e)&&!e.disabled&&!Ae[e.type]})}(e)?Ee.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,je(e)}function Oe(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return $e({modifiers:Re(e),properties:n,layout:r})})}function Ie(e){var t=Re(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(Ae[r.type]&&!r.disabled)return r}}function Le(e){var t=Ie(e);return!t||Ae[t.type].enableTotalsFunction(e)}function Pe(e){return s(e,"qHyperCubeDef.qMeasures",[]).concat(s(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function Re(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function ze(e){return s(e,"outputExpression.qValueExpression.qExpr")||s(e,"outputExpression")}function Fe(e){Pe(e).forEach(function(e){return function(e){var t=Ie(e);t&&(void 0!==t.outputExpression&&ze(t)!==e.qDef.qDef?delete e.qDef.base:!Ee.isValid(e)&&t.base&&(e.qDef.base=o()(!0,{},t.base)))}(e)})}function je(e){var t=Re(e);Array.isArray(t)&&t.forEach(function(t){"object"===Ce(t)&&(t.disabled||!Ae[t.type]&&ze(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)})}function Ve(e){return e.base||e.qDef&&e.qDef.base}function He(e){var t=Ve(e);return e.qLibraryId||t&&t.qLibraryId}function Be(e){var t=e.measure,n=e.properties,r=e.layout;return!He(t)&&$e({modifiers:Re(t),properties:n,layout:r})}function $e(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some(function(e){return!("object"!==Ce(e)||e.disabled||!Ae[e.type])&&(void 0===i[e.type]&&(i[e.type]=Ae[e.type].isApplicable({properties:n,layout:r})),i[e.type])})}function We(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],i={},o=t.app.getDimensionList().then(function(e){i.dimensionList=e});r.push(o);var a=t.app.getFieldList().then(function(e){i.fieldList=e});return r.push(a),Promise.all(r).then(function(){return i})}function Ue(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var i=t.measureLibraryIds,o=t.dimensionLibraryIds,a={},s=[];return i.forEach(function(e){var t=n.app.getMeasure(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),o.forEach(function(e){var t=n.app.getDimension(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),Promise.all(s).then(function(){return a}).catch(function(){return null})}function Ye(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Xe(e){var t=e.oldProperties,n=e.newProperties,r=e.model,i=JSON.stringify(s(t,"qHyperCubeDef.qMeasures"),Ye)!==JSON.stringify(s(n,"qHyperCubeDef.qMeasures"),Ye)||JSON.stringify(s(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ye)!==JSON.stringify(s(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ye);return i?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&s(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):function(e,t,n){if(!e)return Promise.resolve();var r=L.generate(t,n);return o()(!0,t,n),r&&r.length?(r=r.map(function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}}),e.applyPatches(r,!0)):Promise.resolve()}(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then(function(){return i}):Promise.resolve(i)}function Ge(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return"object"===Ce(e)&&!e.disabled&&Ae[e.type]&&Ae[e.type].needDimension({modifier:e,properties:n,layout:r})})}function Ke(e){var t=Pe(e),n=[],r=[],i=!1;return t.forEach(function(t){var r=Re(t);if($e({modifiers:r,properties:e})){var o=He(t);o&&n.push(o),i=i||Ge({modifiers:r,properties:e})}}),s(e,"qHyperCubeDef.qDimensions",[]).forEach(function(e){var t=e.qLibraryId;t&&r.push(t)}),{measureLibraryIds:n,dimensionLibraryIds:r}}function Ze(e){var t=e.model,n=e.libraryIds,r=e.masterItem;return!r&&r!==de&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(qe[t.id].masterItemSubscriber=qe[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},i={},o={},a={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=s(e,"qInfo.qType");return n&&a[n]&&a[n].forEach(function(n){t[n]=s(e,n)}),JSON.stringify(t)}function c(e){var t=e.qInfo.qId;if(r[t]){var i=l(e);r[t].properties!==i&&(r[t].properties=i,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function u(){Object.keys(r).forEach(function(e){i[e]||o[e]||(r[e].listener.dispose(),r[e].unbindCloseListnener(),delete r[e])})}var d=function(e,t){return e.once("closed",t),function(){return e.removeListener("closed",t)}};function f(e,i){return t.app[i](e).then(function(t){r[e]={listener:t.layoutSubscribe(c),unbindCloseListnener:d(t,function(){return e=t.id,n(de),delete r[e],void u();var e}),enabled:!1,properties:l(t.layout)}}).catch(function(){})}return{subscribe:function(e){var n=e.measureLibraryIds,a=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;i={},e.measureLibraryIds.forEach(function(e){i[e]=!0}),o={},t.forEach(function(e){o[e]=!0})}({measureLibraryIds:n,dimensionLibraryIds:a}),u(),t.app&&(Object.keys(i).forEach(function(e){i[e]&&!r[e]&&s.push(f(e,"getMeasure"))}),Object.keys(o).forEach(function(e){o[e]&&!r[e]&&s.push(f(e,"getDimension"))})),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach(function(e){r[e].listener.dispose(),r[e].unbindCloseListnener()}),r={}}}}({model:t,callback:function(e){return _e({model:t,masterItem:e}).then(function(){return t.app.clearUndoBuffer()})}}),qe[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}for(var Je in mO.default=r.default,r)-1===["default"].indexOf(Je)&&(mO[Je]=r[Je]);Object.defineProperty(mO,"__esModule",{value:!0})})()),$O));function UO(e){var t=e.model,n=e.properties;return e.noModelDependencies?WO.apply({model:t,properties:n}):t.modifiers?t.modifiers.apply({model:t,properties:n}):Promise.resolve()}function YO(e){return Array.isArray(e)}function XO(e){return null!=e&&!Array.isArray(e)&&"object"===JN(e)}function GO(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function KO(e){return void 0===e}function ZO(e,t){if(XO(e)&&XO(t)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n=Object.keys(e),r=0,i=n.length;r<i;r+=1)if(!ZO(e[n[r]],t[n[r]]))return!1;return!0}if(YO(e)&&YO(t)){if(e.length!==t.length)return!1;for(var o=0,a=e.length;o<a;o+=1)if(!ZO(e[o],t[o]))return!1;return!0}return e===t}function JO(e){var t=e.oldData,n=void 0===t?{}:t,r=e.newData,i=void 0===r?{}:r,o=e.basePath,a=void 0===o?"":o,s=[];return Object.keys(i).forEach(function(e){var t=function(e){return e?BO(!0,{},{value:e}).value:e}(i[e]),r=n[e],o="".concat(a,"/").concat(e);ZO(t,r)||GO(i,e)||(KO(r)?s.push({op:"add",path:o,value:t}):XO(t)&&XO(r)?s.push.apply(s,ZN(JO({oldData:r,newData:t,basePath:o}))):YO(t)&&YO(r)?s.push.apply(s,ZN(function(e){var t=e.newArray,n=e.basePath,r=[];return ZO(t,e.oldArray.slice())||(!KO(t[0])&&KO(t[0].qInfo)||0===t.length)&&r.push({op:"replace",path:n,value:t}),r}({oldArray:r,newArray:t,basePath:o}))):s.push({op:"replace",path:o,value:t}))}),Object.keys(n).forEach(function(e){KO(i[e])&&!GO(n,e)&&s.push({op:"remove",path:"".concat(a,"/").concat(e)})}),s}function QO(e){var t=e.model,n=JO({oldData:e.oldProperties,newData:e.newProperties});null!=t&&t.applyPatches&&null!=n&&n.length&&t.applyPatches(n.map(function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}}),!0)}function eI(e){var t=e.properties,n=e.container,r=e.filtered,i=t.color;if(i){var o=i.auto,a=i.mode;if(!o){var s,l=r.map(function(e){var r;return null===(r=t.qHyperCubeDef[n][e])||void 0===r?void 0:r.qDef.cId}).filter(function(e){return void 0!==e}),c=t.qHyperCubeDef[n].filter(function(e){return!l.includes(e.qDef.cId)});if("byDimension"===a&&"qDimensions"===n){var u=i.byDimDef;if(!u)return;var d=void 0===u.activeDimensionIndex?-1:u.activeDimensionIndex;if(d<0)return;var f=c[d];if(!f)return;if(f.qLibraryId)i.byDimDef={type:"libraryItem",key:f.qLibraryId,label:f.qLibraryId,activeDimensionIndex:d};else{var p=f.qDef,h=p.qLabelExpression||p.qFieldLabels&&p.qFieldLabels[0]||p.qFieldDefs[0],m=(s=f.qDef.qFieldDefs[0]).split(" ").length>1&&"="!==s[0]&&"["!==s[0]?"[".concat(s,"]"):s;i.byDimDef={type:"expression",key:m,label:h||m,activeDimensionIndex:d}}}if("byMeasure"===a&&"qMeasures"===n){var g=i.byMeasureDef;if(!g)return;var y=void 0===g.activeMeasureIndex?-1:g.activeMeasureIndex;if(y<0)return;var v=c[y];if(!v)return;var b=WO.measureBase.getLibraryId(v);if(b){i.byMeasureDef={type:"libraryItem",key:b,label:b,activeMeasureIndex:y};var x=WO.hasActiveModifiers({measures:[v]})?v.qDef.qDef:void 0;x&&(i.byMeasureDef.expression=x)}else{var w=v.qDef;i.byMeasureDef={type:"expression",key:w.qDef,label:w.qLabelExpression||w.qLabel||w.qDef,activeMeasureIndex:y}}}}}}function tI(e){return nI.apply(this,arguments)}function nI(){var e;return e=XN().m(function e(t){var n,r,i,o,a,s,l,c,u,d,f,p,h,m;return XN().w(function(e){for(;;)switch(e.n){case 0:if(n=t.from,r=t.to,i=t.model,o=t.container,a=t.filtered,s=t.noModelDependencies,l=t.skipAttributeExpressions,c=t.onChange,i){e.n=1;break}return e.a(2);case 1:return e.n=2,i.getEffectiveProperties();case 2:return u=e.v,d=u.qHyperCubeDef[o].findIndex(function(e){return e.qDef.cId===n}),f=u.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[o].findIndex(function(e){return e.qDef.cId===r}),p=BO(!0,{},u),h=p.qHyperCubeDef[o][d],(m=p.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[o][f]).qAttributeDimensions=h.qAttributeDimensions,h.qAttributeDimensions=[],l||(m.qAttributeExpressions=h.qAttributeExpressions,h.qAttributeExpressions=[]),p.qHyperCubeDef[o][d]=m,p.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[o][f]=h,c({fromItem:h,toItem:m,oldProperties:u,newProperties:p,model:i}),e.n=3,UO({model:i,properties:p,noModelDependencies:s});case 3:s?eI({properties:p,container:o,filtered:a}):i.colorSupport&&i.colorSupport.colorByUpdater(p,"qHyperCubeDef."),QO({model:i,oldProperties:u,newProperties:p});case 4:return e.a(2)}},e)}),nI=function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(e){$N(o,r,i,a,s,"next",e)}function s(e){$N(o,r,i,a,s,"throw",e)}a(void 0)})},nI.apply(this,arguments)}function rI(e){var t=e.callbacks,n=e.data,r=e.resources,i=e.settings,o=t.onChange,a=n.infos,s=n.filtered,l=r.app,c=r.model,u=r.translator,d=i.noModelDependencies,f=i.skipAttributeExpressions;return a.map(function(e,t){var n=e.cId,r=e.qGrouping,i=e.qGroupFallbackTitles,a=e.qGroupPos,p=e.qFallbackTitle,h=e.qLocked,m=e.title,g="C"===r,y="H"===r,v="N"===r,b="number"==typeof e.explicitColumn?e.explicitColumn:t,x=function(t,n){g&&l&&l.getDimension&&l.getDimension(e.qLibraryId).then(function(e){null==e||e[t](n)}).catch(function(){})};return{meta:{isCyclic:g,isDrillDown:y,isLocked:!!h,isNormal:v},info:{id:n,key:"".concat(n,"-").concat(a),text:v?p:i[a],position:a,breadcrumbs:i.slice(0,e.qGroupPos),group:{name:m,items:i.slice(0,y?e.qGroupPos+1:i.length).map(function(e,t){return{id:"".concat(n,"-item-").concat(t),text:e,current:a===t,index:t}})},tooltip:v?void 0:u.get(g?"Tooltip.dimensions.cyclic":"Tooltip.dimensions.drilldown")},action:{changeTo:function(e){var t=e.id;return tI({from:n,to:t,container:"qDimensions",model:c,filtered:s,noModelDependencies:d,skipAttributeExpressions:f,onChange:o})},drillUp:function(e){var t=e.steps;y&&c&&(null==c||c.drillUp("/qHyperCubeDef",b,t))},stepCycle:function(){return x("stepCycle",1)},setActiveField:function(e){var t=e.fieldIndex;return x("setActiveField",t)}}}})}function iI(e){var t=e.callbacks,n=e.data,r=e.resources,i=e.settings,o=t.onChange,a=n.infos,s=n.filtered,l=r.model,c=i.noModelDependencies,u=i.skipAttributeExpressions;return a.map(function(e){var t=e.cId,n=e.qFallbackTitle;return{meta:{isNormal:!0},info:{id:t,key:t,text:n},action:{changeTo:function(e){var n=e.id;return tI({from:t,to:n,container:"qMeasures",model:l,filtered:s,noModelDependencies:c,skipAttributeExpressions:u,onChange:o})}}}})}function oI(e){var t=e.callbacks,n=e.data,r=e.dock,i=e.key,o=e.rect,a=e.resources,s=e.settings,l=e.state,c=e.styling,u=function(e){var t=e.dock,n=e.rect,r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",height:"100%"};return"left"!==t&&"right"!==t||(r.width="".concat(n.height,"px"),r.height="".concat(n.width,"px"),r.transformOrigin="top left"),"left"===t&&(r.transform="rotate(-90deg) translate(-".concat(n.height,"px, 0)")),"right"===t&&(r.transform="rotate(90deg) translate(0, -".concat(n.width,"px)")),r}({dock:r,rect:o}),d=function(e){var t=e.callbacks,n=e.data,r=e.dock,i=e.key,o=e.resources,a=e.settings,s=e.state,l=e.styling,c=n.alternatives,u=n.infos,d=o.app,f=o.cache,p=o.model,h=a.isRTL,m=a.isSnapshot,g=a.noModelDependencies,y=a.type,v=function(e){var t=e.dock;return"top"!==t&&"bottom"!==t||!e.isRTL?"ltr":"rtl"}({dock:r,isRTL:h}),b=function(e){var t=e.cache,n="axis-title-auto-focus_"+e.key;return{queueFor:function(e){var r;return null==t||null===(r=t.set)||void 0===r?void 0:r.call(t,n,{focus:!0,index:e})},shouldFor:function(e){var r,i,o=null==t||null===(r=t.get)||void 0===r?void 0:r.call(t,n),a=!(null==o||!o.focus||(null==o?void 0:o.index)!==e);return a&&(null==t||null===(i=t.set)||void 0===i||i.call(t,n,{focus:!1})),a}}}({cache:f,key:i}),x=("dimension"===y?rI:iI)({callbacks:t,data:n,resources:o,settings:a});"rtl"===v&&x.reverse();var w={allowed:{change:g?!m:!(null==p||!p.modifiers||null==p||!p.colorSupport||m),reload:!!d&&!m},hasAlternatives:!!c.length,hasCyclic:x.some(function(e){return e.meta.isCyclic}),hasMultiple:u.length>1};return x.map(function(e,t){return YN(YN({data:n,layout:{direction:v},resources:{translator:o.translator},services:{focus:b},settings:a,state:s,styling:l},e),{},{meta:YN(YN(YN({},w),e.meta),{},{index:t,isFirst:0===t,isLast:t===x.length-1})})})}({callbacks:t,data:n,dock:r,key:i,resources:a,settings:s,state:l,styling:c});return oO.jsx("div",{style:u,children:d.map(function(e){return oO.jsxs(QM.Fragment,{children:[oO.jsx(VO,{source:e}),!e.meta.isLast&&oO.jsx("span",{dir:e.layout.direction,style:YN(YN({},c.title),{},{lineHeight:"normal"}),children:", "})]},e.info.id)})})}var aI,sI='"Source Sans Pro", "Arial", "sans-serif"',lI="12px",cI=function(e){var t=e.rect,n=e.state,r=e.settings,i=r.callbacks,o=r.data,a=r.key,s=r.layout,l=r.resources,c=r.settings,u=r.style;return oI({callbacks:i,data:o,dock:s.dock,key:a,rect:t,resources:l,settings:c,state:n,styling:u})},uI={renderer:"react",require:["renderer"],disableTriggers:!0,key:"axis-title",defaultSettings:{callbacks:{onChange:function(){}},data:{alternatives:[],infos:[],filtered:[]},resources:{app:void 0,cache:void 0,model:void 0,selections:void 0,translator:void 0},settings:{isDisabled:function(){return!1},isRTL:!1,isSnapshot:!1,noModelDependencies:!1,skipAttributeExpressions:!1,type:"dimension"},style:{title:{color:"#333",fontFamily:sI,fontSize:lI},popover:{color:"#595959CC",fontFamily:sI,fontSize:lI}}},preferredSize:function(){var e=this.settings,t=e.data,n=e.settings,r=e.style,i=t.alternatives,o=n.type,a=r.title,s=a.fontSize,l=a.fontFamily,c=i.length||"measure"!==o?28:20,u=this.registries.renderer("svg")().measureText({text:"M",fontSize:s,fontFamily:l}).height;return Math.max(c,u)},created:function(){var e=this;this.state={inSelections:!1},this.listeners={onSelectionsActivated:function(){e.state.inSelections=!0,e.renderer.render(cI(e))},onSelectionsDeactivated:function(){e.state.inSelections=!1}}},beforeMount:function(){var e=this.settings.resources.selections;e&&(e.addListener("activated",this.listeners.onSelectionsActivated),e.addListener("deactivated",this.listeners.onSelectionsDeactivated),e.addListener("canceled",this.listeners.onSelectionsDeactivated))},render:function(){return cI(this)},beforeUnmount:function(){var e=this.settings.resources.selections;e&&(e.removeListener("activated",this.listeners.onSelectionsActivated),e.removeListener("deactivated",this.listeners.onSelectionsDeactivated),e.removeListener("canceled",this.listeners.onSelectionsDeactivated))}},dI=function(e){var t=e.dock,n=e.settings.label,r="center"===t,i=r?{}:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"};return oO.jsx("span",{style:i,title:n,children:r?n:"* ".concat(n)})},fI={renderer:"react",disableTriggers:!0,key:"disclaimer",defaultSettings:{settings:{isRTL:!1,label:void 0},style:{fontFamily:'"Source Sans Pro", "Arial", "sans-serif"'}},preferredSize:function(){return 22},render:function(){var e=this.rect,t=this.settings,n=t.layout,r=t.settings,i=t.style;return function(e){var t=e.dock,n=e.rect,r=e.settings,i=e.styling,o=function(e){var t=e.dock;return"top"!==t&&"bottom"!==t||!e.isRTL?"ltr":"rtl"}({dock:t,isRTL:r.isRTL}),a=function(e){var t=e.dock,n=e.rect,r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#404040",fontStyle:"italic",fontSize:"13px",fontFamily:e.styling.fontFamily};return"left"===t&&(r.width="".concat(n.height,"px"),r.transform="rotate(-90deg) translate(-".concat(n.height,"px, 0)"),r.transformOrigin="top left"),"right"===t&&(r.width="".concat(n.height,"px"),r.transform="rotate(90deg) translate(0, -".concat(n.width,"px)"),r.transformOrigin="top left"),"center"===t&&(r.width="".concat(n.width,"px"),r.height="".concat(n.height,"px"),r.color="#404040",r.fontStyle="normal",r.fontSize="1.2em",r.textAlign="center"),"bottom"!==t&&"top"!==t||(r.justifyContent="flex-start",r.alignItems="flex-start"),r}({dock:t,rect:n,styling:i});return oO.jsx("div",{dir:o,style:a,children:oO.jsx(dI,{dock:t,settings:r})})}({dock:n.dock,rect:e,settings:r,styling:i})}},pI={},hI=function(){if(aI)return pI;aI=1;var e=N_;return pI.createRoot=e.createRoot,pI.hydrateRoot=e.hydrateRoot,pI}(),mI=Yq({spacing:8,shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],transitions:{easing:{easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration:{standard:300,short:250,enteringScreen:225,shorter:200,leavingScreen:195,shortest:150,complex:375}},typography:{fontSize:14,fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:600,fontWeightBold:700,htmlFontSize:14,fontFamily:"'Source Sans Pro', 'HelveticaNeue', 'Helvetica Neue', Helvetica, Arial, sans-serif",button:{fontWeight:600,fontSize:14,textTransform:"none"}},shape:{borderRadius:3},components:{MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusVisibleClassName:"qcm-focus-visible"}},MuiButton:{defaultProps:{color:"inherit",disableRipple:!0,focusVisibleClassName:"qcm-focus-visible"},styleOverrides:{root:{height:"32px",lineHeight:"16px",minWidth:"24px",fontSize:141,borderRadius:3,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},text:{padding:"8px 16px","&:active":{backgroundColor:"rgba(0, 0, 0, 0.1)"},"&.Mui-focusVisible":{boxShadow:"inset 0 0 0 2px ".concat("#177FE6")}},outlined:{border:"1px solid rgba(0, 0, 0, 0.15)"},sizeSmall:{fontSize:12,height:"24px","& > svg:only-child, & > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"}},variants:[]},MuiList:{styleOverrides:{padding:{paddingTop:"0px",paddingBottom:"0px"}}},MuiListItemButton:{styleOverrides:{root:{fontSize:14,height:"32px"}}},MuiListItemIcon:{styleOverrides:{root:{color:"#404040",minWidth:"16px",marginRight:"16px"}}},MuiListItemText:{styleOverrides:{root:{fontSize:"12px"},primary:{fontSize:14,color:"#404040",lineHeight:"16px",fontWeight:600},secondary:{fontSize:12,color:"#737373",fontWeight:400,lineHeight:"16px"}}}}});function gI(e){var t={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}},n=e||{},r=n.x,i=n.y,o=n.width,a=n.height,s=n.scaleRatio,l=n.margin;return t.x=Number.isNaN(r)||void 0===r?t.x:r,t.y=Number.isNaN(i)||void 0===i?t.y:i,t.width=Number.isNaN(o)||void 0===o?t.width:o,t.height=Number.isNaN(a)||void 0===a?t.height:a,void 0!==s&&(t.scaleRatio.x=Number.isNaN(s.x)?t.scaleRatio.x:s.x,t.scaleRatio.y=Number.isNaN(s.y)?t.scaleRatio.y:s.y),void 0!==l&&(t.margin.left=Number.isNaN(l.left)?0:l.left,t.margin.top=Number.isNaN(l.top)?0:l.top),t}function yI(){var e={rendererBox:gI(),container:void 0,root:void 0},t=function(){var t,n;null===(t=e.root)||void 0===t||t.unmount(),null===(n=e.container)||void 0===n||null===(n=n.parentElement)||void 0===n||n.removeChild(e.container),e.container=void 0};return{size:function(t){return t&&(e.rendererBox=gI(t)),e.rendererBox},element:function(){return e.container},appendTo:function(t){return e.container||(e.container=document.createElement("div"),e.container.style.position="absolute",e.container.style["-webkit-font-smoothing"]="antialiased",e.container.style["-moz-osx-font-smoothing"]="antialiased",e.container.style.pointerEvents="none",e.root=hI.createRoot(e.container)),t.appendChild(e.container),e.container},setKey:function(t){e.container&&e.container.setAttribute("data-key",t)},render:function(t){if(!e.container)return!1;var n=e.rendererBox,r=n.scaleRatio.x,i=n.scaleRatio.y;return e.container.style.left="".concat(Math.round(n.margin.left+n.x*r),"px"),e.container.style.top="".concat(Math.round(n.margin.top+n.y*i),"px"),e.container.style.width="".concat(Math.round(n.width),"px"),e.container.style.height="".concat(Math.round(n.height),"px"),e.container.style.transform="scale(".concat(r,", ").concat(i,")"),e.container.style.transformOrigin="top left",e.root.render(function(e){var t=e.nodes;return oO.jsx(QM.StrictMode,{children:oO.jsx(f_,{theme:mI,children:t})})}({nodes:t})),!0},findShapes:function(){return[]},itemsAt:function(){return[]},clear:function(){t()},destroy:function(){t()}}}const vI={getGap(e,t){const n=e.position<t.position?e:t,r=e.position<t.position?t:e;return r.position-r.radius-(n.position+n.radius)},findSegmentPositionMeetMaxThenMin(e,t,n){const r=e.position+e.radius,i=e.position-Math.max(0,r-n),o=i-e.radius;return i+Math.max(0,t-o)},layoutPositionFromMin(e,t,n,r=0){const i=e.length-1;let o,a,s,l=t;for(let t=0;t<i;t++)o=e[t],a=e[t+1],s=(o.position+a.position)/2-r/2,o.position=vI.findSegmentPositionMeetMaxThenMin(o,l,s),l=o.position+o.radius+r;a.position=vI.findSegmentPositionMeetMaxThenMin(a,l,n)},adjustPositionFromMax(e,t,n,r=0){const i=e.length-1,o=Math.max(0,e[i].position+e[i].radius-n);if(0===o)return;let a,s,l,c,u=0;for(a=i;a>0&&(s=e[a],l=e[a-1],c=Math.max(0,vI.getGap(l,s)-r),c-=Math.max(0,u+c-o),u+=c,s.move=c,!(u>=o));a--);for(u<o&&(c=Math.max(0,l.position-l.radius-t),c-=Math.max(0,u+c-o),u+=c,l.move=c),u=0,a=0;a<=i;a++)s=e[a],u+=s.move||0,s.move=u,s.position-=u},createLayout(e,t,n,r=0){const i=e.map(e=>e.segment),o=i.length-1;if(o<0)return[];if(0===o){const e=i[0];e.position=vI.findSegmentPositionMeetMaxThenMin(e,t,n)}else vI.layoutPositionFromMin(i,t,n,r),vI.adjustPositionFromMax(i,t,n,r);return e.filter(e=>{const r=Math.ceil(e.segment.position-e.segment.radius),i=e.segment.position+e.segment.radius;return r>=t&&i<=n})}},bI={getTitle:e=>!1!==e.showValue?!1!==e.showLabel?`${e.text} ${e.valueString}`:e.valueString:!1!==e.showLabel?e.text:"",addLabelPositions(e,t,n){for(let r=0;r<e.length;r++){const i=e[r],{value:o}=i,a=t(o);i.center=a*n}e.sort((e,t)=>e.center-t.center)},addLabelWidth(e,t){for(let n=0;n<e.length;n++){const r=e[n];r.totalWidth=t(r.title).width}},addLabelSizes(e,t,n,r){for(let i=0;i<e.length;i++){const o=e[i];o.width=Math.min(t,Math.max(...o.lines.map(e=>r(e).width))),o.height=o.lines.length*n}},addLabelSegments(e,t){for(let n=0;n<e.length;n++){const r=e[n],{center:i}=r,o=r[t]/2;r.segment={position:i,radius:o}}},addLabelTitles(e,t,n){let r;for(let i=0;i<e.length;i++){const o=e[i],{value:a,valueLabel:s}=o;r=bI.hasEngineFormat(a,s,n)?s:t?t(a):a,o.valueString=`(${r})`,o.title=bI.getTitle(o)}},hasEngineFormat(e,t,n){if(void 0===e||void 0===t||e.toString()===t)return!1;if(!n)return!0;const r=`+-${n.qDecimalSep||""}${n.qThousandSep||""}`.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&");return String(t).replace(new RegExp(`[0-9e${r}]`,"g"),"").length>0},reduceMaxNumLines({labels:e,min:t,max:n,gap:r,lineHeight:i,epsilon:o}){const a=e.length-1;if(a<0)return;let s,l;if([s]=e,s.cMin=t,0!==a){for(let t=0;t<a;t++)s=e[t],l=e[t+1],s.cMax=(s.center+l.center-r)/2,l.cMin=s.cMax+r;l.cMax=n;for(let t=0;t<e.length;t++){const n=e[t],r=Math.floor((Math.max(0,n.cMax-n.cMin)+o)/i),a=Math.min(r,n.maxNumLines);n.maxNumLines=Math.max(a,1)}}else s.cMax=n},resolveLabels:e=>e.map(e=>({...e,value:"function"==typeof e.value?e.value():e.value}))};function xI(e){let t;if(void 0!==e&&e.data){const n=e.data()&&e.data().fields;t=n&&n[0]?n[0].formatter():null}return t}let wI;function SI(){wI=wI||document.createElement("canvas").getContext("2d")}const MI={measureTextWidth(e){SI();const{width:t}=wI.measureText(e);return t},lineWrap(e,t,n,r){let i,o;SI();const a=e?e.split(/\n+|\r+|\r\n/):[],s=[];let l,c,u,d,f=e?e.split(/\s+/):[],p=a[0];if("number"!=typeof t||t<=0)return[e];if("number"==typeof r&&a.length>=r)return a.slice(0,r);for(n&&(wI.font=n),o=0;o<a.length;o++){for(d=a[o],f=d.split(/\s+/),[p]=f,u="",i=1;i<f.length;i++)if(l=`${p} ${f[i]}`,c=MI.measureTextWidth(l),c>t&&("number"!=typeof r||r>s.length)?(s.push(p),p=f[i]):p=l,"number"==typeof r&&s.length>=r){u=f.slice(i+1).join(" ");break}"number"!=typeof r||s.length<r?s.push(p):s[Math.max(0,s.length-1)]=`${s[Math.max(0,s.length-1)]} ${p} ${u}`}return s},wordWrap(e,t,n,r,i){if(SI(),!e||!e.length)return[];n&&(wI.font=n);let o=[];const a=e.slice();let s,l,c,u;if(a.filter(e=>!!e),"number"!=typeof t||t<0)return e.slice();for(u=0;u<a.length;u++)c=a[u],l=null,c.length<=1||MI.measureTextWidth(c)<=t?o.push(c):(s=MI.splitWord(c,t,void 0,r-o.length),s.length<=1?o.push(s[0]):(l=s.pop(),o=o.concat(s),a[u+1]?MI.measureTextWidth(`${l} ${a[u+1]}`)>t&&o.length+a.length-u<=r?a.splice(u+1,0,l):a[u+1]=`${l} ${a[u+1]}`:a.push(l)));return o.forEach((e,t,n)=>{n[t]=e.trim()}),o.length>r?(o=o.splice(0,r),o[o.length-1]=MI.truncate(o[o.length-1],t,n,i).text):(c=o[o.length-1],c&&c.length>1&&MI.measureTextWidth(c)>t&&(o[o.length-1]=MI.truncate(c,t,n,i).text)),o},truncate(e,t,n,r="…"){SI();let i,o,a,s,l=e;const c=MI.measureTextWidth("i"),u=Math.ceil(t/c);if(n&&(wI.font=n),e&&t){if(MI.measureTextWidth(l)>t){for(i=Math.min(u,l.length);i>0;i--)if(o=l.substring(0,i-1),a=o.trim()+r,MI.measureTextWidth(a)<=t){s=l.substring(i-1),l=a;break}i||(s=l,l="…")}}else s=void 0;return{text:l,rest:s}},isNumber:e=>"number"==typeof e&&Number.isFinite(e),explodeWord(e,t,n,r){let i;SI();let o,a=e,s="",l=[];if(MI.isNumber(n)&&n<=1)return[e];const c=Math.ceil(t/r);for(i=Math.min(e.length,c);i>0&&(a=e.substring(0,i),o=e.substring(i-1,i)," "===o?a=e.substring(0,i-1):a+="-",s=e.substring(i),!(MI.measureTextWidth(a)<=t));i--);return(!i&&!a||MI.measureTextWidth(a)>t)&&(a=e.substring(0,1),s=e.substring(1)),l.push(a),s?(MI.measureTextWidth(s)>t?(s=MI.explodeWord(s,t,n-1,r),l=l.concat(s)):l.push(s),l.filter(e=>""!==e.trim())):l},splitWord:(e,t,n,r)=>(SI(),e&&t?(n&&(wI.font=n),MI.explodeWord(e,t,r,Math.max(1,MI.measureTextWidth("i")))):[]),wrapText(e,t,n,r,i){let o;return Number.isNaN(t)||!t?[e]:(o=r>1?MI.lineWrap(e,t,n,r):[e],o=MI.wordWrap(o,t,n,r,i),o)},getFontHeight:e=>(SI(),e&&(wI.font=e),1.5*MI.measureTextWidth("m")),tokenize(e,t,n,r,i,o,a=1){SI(),t&&(wI.font=t);const s=MI.getFontHeight(),l=a*s;let c=[],u=0,d=[];if(o<s)return[];const f=o?Math.max(1,Math.floor(o/l)):r||1;return Array.isArray(r)?(r.forEach(e=>{u+=Number.isNaN(e)||e<=0||!e?0:e}),r.forEach(e=>{c.push(Number.isNaN(e)||e<=0||!e?f-u:e)})):c=[Number.isNaN(r)||r<=0||!r?f:Math.min(f,r)],Array.isArray(e)?e.forEach((e,n)=>{d.length<f&&(d=d.concat(MI.wrapText(e,i,t,c[n])))}):d=MI.wrapText(e,i,t,c[0],n),d}};function kI(e){return e.showValue?`… ${e.valueString}`:"…"}function EI(e,t,n,r){for(let i=0;i<e.length;i++){const o=e[i];o.lines=MI.tokenize(o.title,t,kI(o),r,n),o.maxNumLines=o.lines.length}}const CI={getLabelTooltip({title:e,font:t,ellipsis:n,maxNumLines:r,maxWidth:i}){const o=MI.tokenize(e,t,n,r,i),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n${o[e]}`}return s},getOobsTooltip({oobs:e,font:t,ellipsis:n,maxNumLines:r,maxWidth:i}){const o=e.map(e=>CI.getLabelTooltip({title:e.title,font:t,ellipsis:`${n} ${e.valueString}`,maxNumLines:r,maxWidth:i})),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n\n${o[e]}`}return s}};function AI(e){const{fontFamily:t,fontSize:n,gap:r,maxWidth:i,maxNumLines:o,padding:a}=e,s=`normal ${n} ${t}`;return{fontFamily:t,fontSize:n,font:s,lineHeight:MI.getFontHeight(s),gap:r||12,maxLabelWidth:i||75,maxNumLines:o||1,padding:{top:a.top||0,bottom:a.bottom||0,left:a.left||0,right:a.right||0}}}var DI,qI;var _I=function(){if(qI)return DI;qI=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},o=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,i=e.call(n,"constructor"),o=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!i&&!o)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return DI=function e(){var t,n,r,l,c,u,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(h&&l&&(o(l)||(c=i(l)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&o(r)?r:{},a(d,{name:n,newValue:e(h,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},DI}(),TI=jM(_I);const NI={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,majorAxis:r,rendWidth:i,rendHeight:o,symbol:a}){let s,l,c;return"x"===r?(0===t?(s=e.size/2,c=180):(s=i-e.size/2,c=0),l=o*n):(0===t?(l=o-e.size/2,c=-90):(l=e.size/2,c=90),s=i*n),a(TI({},e,{x:s,y:l,startAngle:c}))}},OI={filterOobLabels({labels:e,minValue:t,maxValue:n,slopeEnabled:r}){let i=e.filter(e=>e.value>=t);if(i=i.filter(e=>e.value<=n),!r){const r=e.filter(e=>e.value<t),o=e.filter(e=>e.value>n);return{filteredLabels:i,lowerOobs:r,upperOobs:o,numLowerOobs:r.length,numUpperOobs:o.length}}return{filteredLabels:i}},getOobSizes(e){let t,n=0;for(let r=1;r<10;r++)t=e(r),n=Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height));return t=e("9+"),[n,Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height))]},getCircleSize:(e,t)=>e>9?t[1]:t[0],createOobsInfo({labels:e,minValue:t,maxValue:n,orientation:r,style:i,padding:o,measureText:a}){const{lowerOobs:s,upperOobs:l,numLowerOobs:c,numUpperOobs:u,filteredLabels:d}=OI.filterOobLabels({labels:e,minValue:t,maxValue:n,slopeEnabled:!1}),f=OI.getOobSizes(a),p=OI.getCircleSize(c,f),h=OI.getCircleSize(u,f),[m,g]="vertical"===r?[o.top,o.bottom]:[o.left,o.right];return{filteredLabels:d,lowerOobs:s,upperOobs:l,lowerCircleSize:p,upperCircleSize:h,lowerOobSpace:c>0?m+i.oob.size+p:0,upperOobSpace:u>0?g+i.oob.size+h:0}},createOobs({alignment:e,dockValue:t,oobs:n,style:r,rect:i,symbol:o,position:a,area:s,radius:l,font:c}){const u=n?n.length:0;if(u<1)return[];const{majorAxis:d,minorAxis:f,minorDimension:p}=s,h=i[p];return[NI.createOob({oob:NI.getDefaultSettings({size:r.size,fill:r.fill,alignment:e}),dockValue:t,boxCenter:.5,majorAxis:d,rendWidth:i.width,rendHeight:i.height,symbol:o}),{type:"circle",r:l,stroke:"transparent",fill:r.text.background.fill,strokeWidth:0,[`c${f}`]:h/2,[`c${d}`]:a},{type:"text",text:u>9?"9+":u,title:CI.getOobsTooltip({oobs:n,font:c,ellipsis:"…"}),dx:0,dy:0,maxWidth:h,width:h,fontSize:r.text.fontSize,fontFamily:r.text.fontFamily,fill:r.text.fill,baseline:"central",anchor:"middle",[f]:h/2,[d]:a}]}};var II={require:["renderer","symbol"],defaultSettings:{layout:{displayOrder:0,prioOrder:0}},measureText(e){return this.renderer.measureText({text:e,fontSize:this.settings.style.label.fontSize,fontFamily:this.settings.style.label.fontFamily})},preferredSize(){const{scale:e}=this,{style:t,localeInfo:n}=this.settings,r=xI(e),i=bI.resolveLabels(this.settings.labels);bI.addLabelTitles(i,r,n);const o=AI(t.label),{dock:a}=this.settings.layout,{filteredLabels:s}=OI.filterOobLabels({labels:i,minValue:e.domain()[0],maxValue:e.domain()[1],slopeEnabled:!0});if(s){bI.addLabelWidth(s,this.measureText);const e=function(e,t,n){if("left"===t||"right"===t){const{padding:t,maxLabelWidth:r}=n,i=Math.max(...e.map(e=>e.totalWidth));return Math.min(r,i)+t.left+t.right}const{padding:r,maxLabelWidth:i,maxNumLines:o,font:a,lineHeight:s}=n;let l=1;return Math.max(...e.map(e=>e.totalWidth))>i&&(EI(e,a,i,o),l=Math.max(...e.map(e=>e.lines.length))),l*s+r.top+r.bottom}(s,a,o);return e}return 0},render(){const{scale:e,rect:t}=this,n=bI.resolveLabels(this.settings.labels);if(e.domain().length<=0||n.length<=0)return!1;const{dock:r}=this.settings.layout,{style:i,localeInfo:o}=this.settings,{fontSize:a,fontFamily:s,font:l,lineHeight:c,gap:u,maxLabelWidth:d,maxNumLines:f,padding:p}=AI(i.label),h=xI(e),{filteredLabels:m}=OI.filterOobLabels({labels:n,minValue:e.domain()[0],maxValue:e.domain()[1],slopeEnabled:!0});if(m.length>0){const n=function(e,t,n){return"left"===t||"right"===t?{orientation:"vertical",majorAxis:"y",majorDimension:"height",majorSize:e.height,minorAxis:"x",minorDimension:"width",minorCenter:(e.width-n.right-n.left)/2+n.left}:{orientation:"horizontal",majorAxis:"x",majorDimension:"width",majorSize:e.width,minorAxis:"y",minorDimension:"height",minorCenter:(e.height-n.top-n.bottom)/2+n.top}}(t,r,p),{orientation:i,majorAxis:g,majorDimension:y,majorSize:v,minorAxis:b,minorCenter:x}=n;bI.addLabelTitles(m,h,o),bI.addLabelPositions(m,e,v);const[w,S]=[0,v];EI(m,l,d,f),"vertical"===i&&(bI.reduceMaxNumLines({labels:m,min:w,max:S,gap:u,lineHeight:c,epsilon:.05*u}),function(e,t,n){for(let r=0;r<e.length;r++){const i=e[r];i.lines.length>i.maxNumLines&&(i.lines=MI.tokenize(i.title,t,kI(i),i.maxNumLines,n))}}(m,l,d)),bI.addLabelSizes(m,d,c,this.measureText),bI.addLabelSegments(m,y);const M=vI.createLayout(m,w,S,u);let k=[];return M?.forEach((e,t)=>{const{lines:n}=e,r=n.length,i=n.map((n,i)=>{const o={fontSize:a,fontFamily:s,type:"text",text:n,title:CI.getLabelTooltip({title:e.title,font:l,ellipsis:kI(e),maxNumLines:f,maxWidth:d}),dx:0,dy:0,maxWidth:d,width:d,fill:e.labelStroke??e.fill,baseline:"central",anchor:"middle",[b]:x,[g]:e.segment.position,labelID:`${g}-${t}`};return o.y+=(i-(r-1)/2)*c,o});if(e.labelStroke){const t={type:"rect",[b]:x,[g]:e.segment.position,rx:3,ry:3,maxWidth:d,width:e.width+4,height:c*r+4,stroke:e.fill,fill:e.fill};t.x-=e.width/2+2,t.y-=r*c/2+2,k.push(t)}k=k.concat(i)}),k}return!1}};function LI(e,t){return e.x1<=t.x2&&t.x1<=e.x2&&e.y1<=t.y2&&t.y1<=e.y2}function PI(e,t){let{bounds:n}=t;const{x:r,y:i,r:o}=t,a=o*o;return n||(n={x1:r-o,x2:r+o,y1:i-o,y2:i+o},t.bounds=n),!!LI(e,n)&&(!!function(e,t){const{x1:n,x2:r,y1:i,y2:o}=e,{x:a,y:s}=t;return n<=a&&r>=a&&i<=s&&o>=s}(e,t)||(function(e,t){const{x1:n,x2:r,y1:i,y2:o}=t;return function(e,t,n){const r=(e.x-t.x)**2;return n.y<e.y?(n.y-e.y)**2+r:t.y>e.y?(t.y-e.y)**2+r:r}(e,{x:Math.abs(n-e.x)<Math.abs(r-e.x)?n:r,y:i},{y:o})}(t,e)<a||function(e,t){const{x1:n,x2:r,y1:i,y2:o}=t;return function(e,t,n){const r=(e.y-t.y)**2;return n.x<e.x?(n.x-e.x)**2+r:t.x>e.x?(t.x-e.x)**2+r:r}(e,{x:n,y:Math.abs(i-e.y)<Math.abs(o-e.y)?i:o},{x:r})}(t,e)<a))}function RI({text:e,textWidth:t,maxWidth:n,measureText:r}){if(e="string"==typeof e?e:`${e}`,void 0===n)return e;if(t<=n)return e;let i=0,o=e.length-1;for(;i<=o;){const t=Math.floor((i+o)/2);r(e.substr(0,t)+"…").width<=n?i=t+1:o=t-1}return e.substr(0,o)+"…"}function zI({measureText:e,nodes:t,label:n,component:r}){const{width:i}=r.rect;return t.map(t=>{const r=n(t),o=e(r).width,{localBounds:a}=t,{x:s,y:l,width:c}=a,u=s+c/2,d=l-6;return{ellipsed:RI({text:r,textWidth:o,maxWidth:2*Math.min(u,i-u),measureText:e}),cx:u,topRect:{y2:d},pointValue:t.data.value}})}function FI({measureText:e,mode:t,nodes:n,label:r,labelHeight:i,component:o}){if(2===t)return{topLabels:zI({measureText:e,nodes:n,label:r,component:o}),bottomLabels:[]};const a=[],s=[],l=[],{width:c,height:u}=o.rect,d=n.map(t=>{const n=r(t),o=e(n).width,{localBounds:a}=t,{x:s,y:l,width:u,height:d}=a,f=s+u/2,p=2*Math.min(f,c-f),h=Math.min(o,p),m=f-h/2,g=f+h/2,y=l-i-6,v=l-6,b=RI({text:n,textWidth:o,maxWidth:p,measureText:e});return{text:n,cx:f,topRect:{x1:m,y1:y,x2:g,y2:v},textWidth:o,maxWidth:p,ellipsed:b,isEllipsisChar:"…"===b,circle:{x:f,y:l+d/2,r:d/2,height:d},pointValue:t.data.value}});return d.forEach(e=>{e.isEllipsisChar||((e=>{const{topRect:t}=e;return t.y1<0||a.some(e=>LI(t,e.topRect))||d.some(e=>PI(t,e.circle))})(e)?l.push(e):a.push(e))}),l.forEach(e=>{const{x1:t,x2:n,y1:r,y2:o}=e.topRect,l=e.circle.height+12+i;e.bottomRect={x1:t,x2:n,y1:r+l,y2:o+l};const c=(e=>{const{bottomRect:t}=e;return t.y2>u||a.some(e=>LI(t,e.topRect))||s.some(e=>LI(t,e.bottomRect))||d.some(e=>PI(t,e.circle))})(e);c||s.push(e)}),{topLabels:a,bottomLabels:s}}var jI={require:["chart","renderer"],defaultSettings:{settings:{rtl:!1,label:()=>{},showLabel:()=>!0,target:{point:"point-component"},mode:1},style:{fontFamily:"QlikView Sans, sans-serif",fontSize:"12px",fill:"#333",backgroundColor:"yellow"}},preferredSize:()=>({edgeBleed:{top:0,bottom:0,right:0,left:0}}),render(){const{settings:e}=this.settings,{target:t,label:n,showLabel:r,mode:i,debugMode:o,maxVisibleBubblesForLabeling:a}=e,s=t.point,l=this.chart.component(s);if(!l||0===i)return[];const{rendererSettings:c={}}=l.settings,u="function"==typeof c.progressive&&c.progressive();if(u&&!u.isLast)return[];const d=(e=>[...e.findShapes("circle"),...e.findShapes("path")])(this.chart).filter(e=>e.key===s&&r(e)).reverse();if(!d.length||d.length>a)return[];const{fontSize:f,fontFamily:p,fill:h,backgroundColor:m}=this.style,g=e=>this.renderer.measureText({text:e,fontSize:f,fontFamily:p}),y=g("M").height-2,{topLabels:v,bottomLabels:b}=FI({measureText:g,mode:i,nodes:d,label:n,labelHeight:y,component:l}),x=v.map(e=>({type:"text",text:e.ellipsed,x:e.cx,y:e.topRect.y2,fontSize:f,fontFamily:p,fill:h,baseline:"text-after-edge",anchor:"middle",pointValue:e.pointValue})),w=2!==i&&o?v.map(e=>({type:"rect",x:e.topRect.x1,y:e.topRect.y1,width:e.textWidth,height:y,fill:m,pointValue:e.pointValue})):[],S=v.map(e=>({type:"line",x1:e.cx,x2:e.cx,y1:e.topRect.y2,y2:e.topRect.y2+5,stroke:h,strokeWidth:1,pointValue:e.pointValue})),M=b.map(e=>({type:"text",text:e.ellipsed,x:e.cx,y:e.bottomRect.y1,fontSize:f,fontFamily:p,fill:h,baseline:"text-before-edge",anchor:"middle",pointValue:e.pointValue})),k=2!==i&&o?b.map(e=>({type:"rect",x:e.bottomRect.x1,y:e.bottomRect.y1,width:e.textWidth,height:y,fill:m,pointValue:e.pointValue})):[],E=b.map(e=>({type:"line",x1:e.cx,x2:e.cx,y1:e.bottomRect.y1-5,y2:e.bottomRect.y1,stroke:h,strokeWidth:1,pointValue:e.pointValue}));return[...w,...k,...x,...M,...S,...E]}};function VI({fill:e,path:t,width:n}){const r={fontSize:"28px",display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",padding:(n-parseInt(28,10))/2+"px"};return zC.jsx("i",{style:r,children:zC.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",fill:e?e():"currentColor",pointerEvents:"none",children:zC.jsx("path",{d:t})})})}var HI={DRILL_DOWN:"M15.9993744,3 L15.9993744,5 L4.99937445,5 L4.99937445,3 L15.9993744,3 Z M8.99937445,7 L15.9993744,7 L15.9993744,9 L8.99937445,9 L8.99937445,7 Z M11.9993744,11 L15.9993744,11 L15.9993744,13 L11.9993744,13 L11.9993744,11 Z M2.2,11 L7,11 L7,9.00369263 C7,8.89323568 7.08954305,8.80369263 7.2,8.80369263 C7.2549016,8.80369263 7.30738916,8.82626165 7.34515712,8.86610844 L10.1852182,11.8624926 C10.2583124,11.93961 10.258346,12.0604218 10.1852948,12.13758 L7.34523376,15.1373102 C7.2692928,15.2175206 7.14270711,15.2209817 7.06249671,15.1450407 C7.02260076,15.1072683 7,15.0547472 7,14.9998069 L7,12.9043747 C4.79351111,12.9043747 2.8018683,12.9266213 1.02507156,12.9711145 L1.02507252,12.9711526 C0.472939773,12.9849787 0.014139487,12.5485949 0.000313396522,11.9964622 C0.000104473692,11.988119 -1.32268838e-12,11.9797736 -1.3231638e-12,11.9714278 L-1.83320026e-12,3 L2,3 L2,10.8 C2,10.9104569 2.08954305,11 2.2,11 Z",LOCK:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z",TICK:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",TRIANGLE_DOWN:"M2.4,4 L13.6,4 C13.7104569,4 13.8,4.08954305 13.8,4.2 C13.8,4.24327404 13.7859644,4.28538077 13.76,4.32 L8.16,11.7866667 C8.09372583,11.8750322 7.96836556,11.8929408 7.88,11.8266667 C7.86483887,11.8152958 7.85137085,11.8018278 7.84,11.7866667 L2.24,4.32 C2.17372583,4.23163444 2.19163444,4.10627417 2.28,4.04 C2.31461923,4.01403557 2.35672596,4 2.4,4 Z",TRIANGLE_RIGHT:"M4,13.6 L4,2.4 C4,2.28954305 4.08954305,2.2 4.2,2.2 C4.24327404,2.2 4.28538077,2.21403557 4.32,2.24 L11.7866667,7.84 C11.8750322,7.90627417 11.8929408,8.03163444 11.8266667,8.12 C11.8152958,8.13516113 11.8018278,8.14862915 11.7866667,8.16 L4.32,13.76 C4.23163444,13.8262742 4.10627417,13.8083656 4.04,13.72 C4.01403557,13.6853808 4,13.643274 4,13.6 Z",HOME:"m 6.9922481,16.023902 0.026486,3.628553 3.7874679,0.02649 0.02648,-3.708011 z M 4.4496124,22.19509 4.5025844,12.024548 12.051034,6.3830749 19.49354,11.998062 19.52003,22.19509 h -2.383721 v -6.250646 l -3.760982,-0.02649 -0.07946,6.303617 z M 1.8540052,10.197028 12.104005,2.0129199 l 3.602067,2.9399225 0.05297,-1.748062 2.569121,0.026486 v 3.9728682 l 3.655039,2.9399224 -1.085917,1.218346 -8.819768,-6.8068472 -8.7932813,6.9657622 z",LEFT:"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z",RIGHT:"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z",UP:"M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z",DOWN:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z",ZOOM_IN:"M15.5,14L20.5,19L19,20.5L14,15.5V14.71L13.73,14.43C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.43,13.73L14.71,14H15.5M9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14M12,10H10V12H9V10H7V9H9V7H10V9H12V10Z",ZOOM_OUT:"M15.5,14H14.71L14.43,13.73C15.41,12.59 16,11.11 16,9.5A6.5,6.5 0 0,0 9.5,3A6.5,6.5 0 0,0 3,9.5A6.5,6.5 0 0,0 9.5,16C11.11,16 12.59,15.41 13.73,14.43L14,14.71V15.5L19,20.5L20.5,19L15.5,14M9.5,14C7,14 5,12 5,9.5C5,7 7,5 9.5,5C12,5 14,7 14,9.5C14,12 12,14 9.5,14M7,9H12V10H7V9Z"};const BI=u_(jT,{})(({presentation:e})=>{const{rtl:t,vertical:n,horizontal:r,width:i}=e,o=t?"left":"right";return{position:"absolute",borderRadius:"2px",width:`${i}px`,height:`${i}px`,top:`${n}px`,[o]:`${r}px`,pointerEvents:"auto",color:"rgba(0, 0, 0, 0.54)","&:focus":{color:"#1A1A1A"}}});function $I({callback:e,title:t,disabled:n,presentation:r}){return zC.jsx(BI,{"aria-label":t,disabled:n(),onClick:()=>e(),onTouchEnd:()=>e(),presentation:r,title:t,children:zC.jsx(VI,{fill:()=>n()?"#E6E6E6":"currentColor",path:HI[r.icon],width:r.width})})}var WI={renderer:"react-qcm",disableTriggers:!0,render(){const{callback:e,disabled:t,presentation:n,title:r,show:i}=this.settings.settings;return!(i&&!i())&&zC.jsx($I,{callback:e,title:r,disabled:t,presentation:n})}},UI={require:["renderer"],defaultSettings:{style:{borderColor:"black",background:"red",borderRadius:"0px"},settings:{rect:{x:()=>100,y:()=>100,width:()=>100,height:()=>100}}},renderer:"dom",render(e){const{x:t,y:n,width:r,height:i}=this.settings.settings.rect,{borderColor:o,background:a,borderRadius:s}=this.settings.style;return[e("div",{style:{position:"relative",left:`${t()}px`,top:`${n()}px`,width:`${r()}px`,height:`${i()}px`,"background-color":a,"border-style":"solid","border-color":o,"border-width":"1px","border-radius":s}})]}},YI={DATA:{MAIN:"qHyperCube",BIN:"binData"},SCALE:{COLOR:"color",X:"x",Y:"y",BIN_X:"binX",BIN_Y:"binY",HEAT_MAP_COLOR:"heat-map-color"},COMPONENT:{GRID_LINES:"grid-lines",REFERENCE_LINES_X:"reference-lines-x",REFERENCE_LINES_Y:"reference-lines-y",REFERENCE_LINE_LABELS_X:"reference-line-labels-x",REFERENCE_LINE_LABELS_Y:"reference-line-labels-y",POINT:"point-component",TOOLTIP:"tooltip",POINT_LABELS:"point-labels",LEGEND:"legend-color",LEGEND_CATEGORICAL:"legend-color-cat",LEGEND_CAT_TOOLTIP:"legend-cat-tooltip",LEGEND_HEAT_MAP:"legend-heat-map",X_AXIS:"x-axis",Y_AXIS:"y-axis",X_AXIS_TITLE:"x-axis-title",Y_AXIS_TITLE:"y-axis-title",HEAT_MAP:"heat-map",HEAT_MAP_LABELS:"heat-map-labels",HEAT_MAP_HIGHLIGHT:"heat-map-highlight",MINI_CHART_BACKGROUND:"mini-chart-background-rect",MINI_CHART_NAVIGATION:"mini-chart-navigation-rect",MINI_CHART_POINT:"mini-chart-points",OUT_OF_BOUNDS:"out-of-bounds",TRENDLINES:"trend-lines",NAVIGATION_PANEL:{HOME:"home-button",UP:"up-button",LEFT:"left-button",RIGHT:"right-button",DOWN:"down-button",ZOOM_IN:"zoom-in-button",ZOOM_OUT:"zoom-out-button"}},COLLECTION:{MAIN:"main-collection"},FORMATTER:{X:"x",Y:"y"},FIELDS:{DIM:"qDimensionInfo/0",X:"qMeasureInfo/0",Y:"qMeasureInfo/1",SIZE:"qMeasureInfo/2",BIN:"bin",BIN_X:"binX",BIN_Y:"binY",BIN_DENSITY:"binDensity"},BRUSH:{X_RANGE:"x-range-brush",Y_RANGE:"y-range-brush",BIN_X_RANGE:"bin-x-range-brush",BIN_Y_RANGE:"bin-y-range-brush"},REJECTION_TOKEN:"rejected"};var XI={require:["renderer","chart"],renderer:"canvas",render(){const{element:e}=this.chart,t=e.querySelector(`[data-key=${YI.COMPONENT.HEAT_MAP}]`),n=this.renderer.element();if(!t||!n)return;const{width:r,height:i}=this.rect,o={x:0,y:0,w:r,h:i},{actions:a,dataView:s,rtl:l}=this.settings.settings,c=t.getContext("2d"),u=function(e={}){const t=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/t}(c);let d;const f=n.getContext("2d");f.clearRect(0,0,r*u,i*u);const p=(e,t)=>{if(!d)return;f.clearRect(0,0,r*u,i*u);const{x:n,y:a,w:c,h:p}=function(e,t,n,r,i,o,a){let{x:s,y:l,w:c,h:u}=r;const{xAxisMin:d,xAxisMax:f,yAxisMin:p,yAxisMax:h}=n(),{min:m,max:g}=e;return"x"===t?(s=Number(a?(Math.abs((f-g)/(f-d))*i).toFixed(2):(Math.abs((m-d)/(f-d))*i).toFixed(2)),c=Number((Math.abs((g-m)/(f-d))*i).toFixed(2))):(l=Number((Math.abs((h-g)/(h-p))*o).toFixed(2)),u=Number((Math.abs((g-m)/(h-p))*o).toFixed(2))),{x:s,y:l,w:c,h:u}}(e,t,s,o,r,i,l);o.x=n,o.y=a,o.w=c,o.h=p,f.drawImage(d,n*u,a*u,c*u,p*u,n*u,a*u,c*u,p*u)};a.select.removeAllListeners("selectionStart"),a.select.removeAllListeners("binXRange"),a.select.removeAllListeners("binYRange"),a.select.removeAllListeners("binRangeHighlightClear"),a.select.removeAllListeners("binsRangeSelectionClear"),a.select.on("selectionStart",async()=>{if(!d){t.style.opacity=1;const e=c.getImageData(0,0,t.width,t.height),n=e.data;for(let e=3,r=t.width*t.height*4;e<r;e+=4)n[e]=0===n[e]?0:255;d=await createImageBitmap(e)}}),a.select.on("binXRange",e=>{p(e,"x")}),a.select.on("binYRange",e=>{p(e,"y")}),a.select.on("binRangeHighlightClear",()=>{d=void 0,f.clearRect(0,0,r*u,i*u)}),a.select.on("binsRangeSelectionClear",()=>{f.clearRect(0,0,r*u,i*u),o.x=0,o.y=0,o.w=r,o.h=i})}};function GI(){const e=Xw();return e.use(PM),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",FM(e))};e.interaction("hammer",FM(Hammer))}(YM)),e.renderer("react-qcm",yI),e.component("axis-title",uI),e.component("reference-line-labels",II),e.component("point-label",jI),e.component("disclaimer",fI),e.component("mini-chart-window",UI),e.component("button",WI),e.component("heat-map-highlight",XI),e.component("point-label-plugin",qe),e}var KI={REF_LABELS:{MAX_WIDTH:{X:100,Y:70},PADDING:{TOP:2,BOTTOM:2,START:4,END:2},GAP:{X:16,Y:10},MAX_NUM_LINES:3,OOB:{SIZE:8}},AXIS:{X:{PADDING:{END:4}},Y:{PADDING:{END:24}}},GRID_DISTANCE:{NARROW:50,MEDIUM:100,WIDE:200,FALLBACK:100},LEGEND_CAT:{SYMBOL:{SIZE:10}},LAYOUT_MODES:{FULL:{width:550,height:450},MEDIUM:{width:400,height:220},MEDIUM_NAV:{width:400,height:400},SMALL:{width:300,height:150},XSMALL:{width:150,height:75},SPARK:{width:0,height:0}},MAX_NR_SCATTER:1e3,LARGE_NUM_DATA_POINTS:5e3,DEFAULT_VISIBLE_BUBBLES:2500,MAX_VISIBLE_BUBBLES:5e4,CHUNK_SIZE:3e3,MINI_CHART:{RATIO:.15,PADDING:10},MAX_NR_ANIMATION:1e3,NAVIGATION_PANEL:{BUTTON_WIDTH:45},WINDOW_SIZE_BASE:300,DIAMETER_OVER_RADIUS:2,OOB_SPACE:10,OOB_SIZE:6};function ZI(e,t){return function({layout:e}){const n=!!e.snapshotData,r=!!ar(e.qHyperCube,"qMeasureInfo.2"),i=ar(e.qHyperCube,"qSize.qcy"),o=!t?.some(e=>"binningData"===e),a=void 0===e.maxVisibleBubbles||e.maxVisibleBubbles<=0?KI.MAX_NR_SCATTER:Math.min(KI.MAX_VISIBLE_BUBBLES,Math.max(KI.MAX_NR_SCATTER,Math.ceil(e.maxVisibleBubbles))),s=o&&i>a,l=!t?.some(e=>"rangeSelections"===e),c=Math.min(KI.LARGE_NUM_DATA_POINTS,a);return{isSnapshot:n,hasSizeMeasure:r,isBigData:s,isContinuous:!0,isRangeSelectionsSupported:l,isLargeNumDataPoints:!s&&i>c,maxVisibleBubbles:a,largeNumDataPoints:c,numDataPoints:i}}}function JI(e,t,n,r,i){let o;return o=Math.abs(t-e)*i,Math.abs(n-e)<=o&&Math.abs(r-t)<=o}var QI={dataRelatedPropertiesPaths:["qHyperCube.qGrandTotalRow","qHyperCube.qHasOtherValues","qHyperCube.qSize","qHyperCube.qDimensionInfo[].qAttrDimInfo","qHyperCube.qDimensionInfo[].qAttrExprInfo","qHyperCube.qDimensionInfo[].qCardinalities","qHyperCube.qDimensionInfo[].qMax","qHyperCube.qDimensionInfo[].qMin","qHyperCube.qDimensionInfo[].qStateCounts","qHyperCube.qMeasureInfo[].qApprMaxGlyphCount","qHyperCube.qMeasureInfo[].qAttrExprInfo","qHyperCube.qMeasureInfo[].qMax","qHyperCube.qMeasureInfo[].qMin","qHyperCube.qMeasureInfo[].qTrendLines","qHyperCube.qTreeNodesOnDim"]};function eL(e){const{qHyperCube:t,...n}=e,{qDataPages:r,qStackedDataPages:i,qTreeDataPages:o,...a}=t,s=TI(!0,{},{...n,qHyperCube:{...a,qDataPages:null,qStackedDataPages:null,qTreeDataPages:null}}),{dataRelatedPropertiesPaths:l}=QI;return l.forEach(e=>{const t=e.split("[");if(1===t.length)void 0!==ar(s,e)&&lr(s,e,null);else{const e=t[0],n=t[1].split("].")[1];ar(s,e,[]).forEach(e=>{void 0!==ar(e,n)&&lr(e,n,null)})}}),s}function tL({viewCache:e,layout:t}){const n=eL(t);e.set("dataIndependentProperties",JSON.stringify(n))}function nL({chart:e,localeInfo:t,layoutService:n,largeDataService:r,colorService:i,viewState:o,viewCache:a,extremumModel:s,dataHandler:l,trendLinesService:c,actions:u,progressive:d,getCurrentYTicks:f,getYTicks:p,options:h}){const m=[YI.COMPONENT.X_AXIS_TITLE,YI.COMPONENT.Y_AXIS_TITLE,YI.COMPONENT.MINI_CHART_POINT],g=[YI.COMPONENT.X_AXIS_TITLE,YI.COMPONENT.Y_AXIS_TITLE,YI.COMPONENT.MINI_CHART_POINT,YI.COMPONENT.POINT_LABELS,YI.COMPONENT.X_AXIS,YI.COMPONENT.Y_AXIS,YI.COMPONENT.GRID_LINES],y=function({viewState:e,extremumModel:t}){const{xAxisMax:n,xAxisMin:r}=t.query.getXExtrema(),{yAxisMax:i,yAxisMin:o}=t.query.getYExtrema(),a={homeStateDataView:{xAxisMax:n,xAxisMin:r,yAxisMax:i,yAxisMin:o},scale:1,maxScale:2**4.1,minScale:2**-20.1,checkScale:2**-9.1,isHomeState:!0};let s=!1;const l={getDataView:()=>e.get("dataView"),setDataView(n){const{xAxisMin:r,xAxisMax:i,yAxisMin:o,yAxisMax:s}=n,{xAxisMin:l,xAxisMax:c,yAxisMin:u,yAxisMax:d}=a.homeStateDataView,f=1e-4;JI(r,i,l,c,f)&&JI(o,s,u,d,f)?(a.isHomeState=!0,t.command.updateExtrema(a.homeStateDataView,a.isHomeState),a.scale=1,e.set("dataView",a.homeStateDataView)):(a.isHomeState=!1,t.command.updateExtrema(n,a.isHomeState),a.scale=(i-r)/(c-l),e.set("dataView",n))},getMeta:()=>a,setMeta(e){TI(!0,a,e)},setInteractionInProgress:e=>{s=e},getInteractionInProgress:()=>s,transform:()=>{if(s){const{deltaX:e,deltaY:t,scale:n}=l.getDataView();return{horizontalScaling:n||1,verticalScaling:n||1,horizontalSkewing:0,verticalSkewing:0,horizontalMoving:e,verticalMoving:t}}return!1}};return l}({extremumModel:s,viewState:o}),v={key:YI.DATA.MAIN,data:n.getHyperCube(),config:{localeInfo:t}},b={isPrelayout:!0,isPartialUpdating:void 0,isSizeChanging:void 0,isDataViewUnchanged:void 0,progressive:!1};let x=[];function w(){x=n.getDataPages(),n.setDataPages([])}function S(){n.setDataPages(x)}function M(){b.visiblePoints=function({layoutService:e,viewHandler:t}){const{xAxisMin:n,xAxisMax:r,yAxisMin:i,yAxisMax:o}=t.getDataView(),a=e.getDataPages(),{qMatrix:s}=a[0]||{};if(!s)return[];const l=s.filter(e=>{const t=e[1].qNum,a=e[2].qNum;return t>=n&&t<=r&&a>=i&&a<=o});return l}({layoutService:n,viewHandler:y}),b.numVisiblePoints=b.visiblePoints.length,b.isLargeNumVisibleBubbles=b.numVisiblePoints>n.meta.largeNumDataPoints}function k(){null!==d.timer&&(cancelAnimationFrame(d.timer),d.timer=null,d.renderPromise?.resolve(),d.renderPromise=null)}function E(){u.setProgressive(!1),b.progressive=!1,k(),e.update({partialData:!0,excludeFromUpdate:m}),M()}const C=t=>{k(),d.renderPromise={resolve:t},u.setProgressive(!1);const r=n.getDataPages();if(!r.length)return;const i=r[0].qMatrix.length,o=Math.ceil(i/KI.CHUNK_SIZE);if(o<=1)return E(),void t();u.setProgressive(!0),M();let a=0;const s=()=>{d.timer=requestAnimationFrame(()=>{if(!e?.update)return void k();w();const r=a*KI.CHUNK_SIZE,l=Math.min(i,(a+1)*KI.CHUNK_SIZE);b.progressive={start:r,end:l,isFirst:0===a,isLast:a===o-1};const c=[{...x[0],qMatrix:x[0].qMatrix.slice(r,l)}];n.setDataPages(c),e.update({partialData:!0,excludeFromUpdate:0===a||a===o-1?m:g}),S(),a++,a<o?s():requestAnimationFrame(()=>{b.progressive=!1,u.setProgressive(!1),d.timer=null,t()})})};s()};function A(e=!1){return b.isPartialUpdating=!0,c.update(),e||!r.shouldUseProgressive()?(E(),Promise.resolve()):new Promise(e=>{C(e)})}const D=()=>[{type:"q",...v},...l.getMeta().isBinnedData?[{key:YI.DATA.BIN,type:"matrix",data:l.binArray,config:{parse:{fields:()=>[{key:YI.FIELDS.BIN,title:"Bin"},{key:YI.FIELDS.BIN_X,title:"X"},{key:YI.FIELDS.BIN_Y,title:"Y"},{key:YI.FIELDS.BIN_DENSITY,title:"Density"}],row:e=>({bin:e.qElemNumber,binX:(e.qText[0]+e.qText[2])/2,binY:(e.qText[1]+e.qText[3])/2,binDensity:e.qNum})}}}]:[],...i.getData(),...c.getData()],q=({settings:t}={})=>(k(),b.progressive=!1,b.isPartialUpdating=void 0===t,c.update(),r.shouldUseProgressive()?(w(),e.update({data:D(),settings:t}),S(),a.set("isBigData",n.meta.isBigData),tL({viewCache:a,layout:n.getLayout()}),new Promise(e=>{C(e)})):(e.update({data:D(),settings:t}),M(),a.set("isBigData",n.meta.isBigData),tL({viewCache:a,layout:n.getLayout()}),Promise.resolve()));let _=!1;const T=()=>{const e=y.getDataView(),{xAxisMin:t,xAxisMax:n,yAxisMin:r,yAxisMax:i}=y.getMeta().homeStateDataView,o=n-.1*(n-t),a=t+.1*(n-t),s=i-.1*(i-r),l=r+.1*(i-r);return e.xAxisMax<=o||e.xAxisMin>=a||e.yAxisMax<=s||e.yAxisMin>=l};let N=!1;const O=[];o.onChanged("dataView",()=>{if(N=((e,t,n)=>{if("function"==typeof t&&n){const r=e.formatters()[YI.SCALE.Y],i=t()?.filter(e=>!e.isMinor);if(!i)return!1;const o=n().filter(e=>!e.isMinor),a=Math.max(...i.map(e=>r(e.value).toString().length)),s=Math.max(...o.map(e=>r(e.value).toString().length));return s>a}return!1})(e,f,p),y.getInteractionInProgress())return O.push(N),void A(!0);const t=N||O.filter(e=>e).length>0,n=l.getMeta().isBinnedData;l.fetch().catch(()=>{}).finally(()=>{const r=e.component(YI.COMPONENT.MINI_CHART_POINT)&&T(),i=!_&&r||_&&!r;_=r,n!==l.getMeta().isBinnedData||i||t||y.getMeta().isHomeState?q():A(!1)}),O.length=0});const I={query:{getViewState:()=>o,getViewHandler:()=>y,getDataHandler:()=>l,getLocaleInfo:()=>t,getAutoFormatPattern:e=>function(e,t,n){if(!n)return"";let r,i;if(e===YI.SCALE.X?({xAxisMin:r,xAxisMax:i}=t.getMeta().homeStateDataView):({yAxisMin:r,yAxisMax:i}=t.getMeta().homeStateDataView),!Number.isFinite(r)||!Number.isFinite(i))return!1;let o="";const a=Math.floor(Math.log10(Math.abs(r))),s=Math.floor(Math.log10(Math.abs(i))),l=Math.min(Math.abs(a),Math.abs(s)),c=Math.abs(i-r),u=Math.floor(Math.log10(Math.abs(c/50)));let d=Math.abs(u);const f=n.qThousandSep||!1,p=n.qDecimalSep||".";if(0===c)return"0".concat(p,"##");let h;if(u>=0?d=Math.max(2,l-u):(h=(l-l%3)*(s<0?1:-1),d-=h),o+=f?"#".concat(f,"##0"):"0",d){o+=p;for(let e=0;e<d;e++)o+="#"}return o}(e,y,t),getMeta:()=>b,animationsEnabled:()=>{const e=y.getInteractionInProgress(),t=n.getHyperCubeValue("qSize.qcy",0);return!(!1===h.chartAnimations||e||b.isPartialUpdating||b.isSizeChanging||b.isDataViewUnchanged||r.shouldUseProgressive()||n.meta.isBigData!==a.get("isBigData")||!n.meta.isBigData&&t>KI.MAX_NR_ANIMATION||function({viewCache:e,layout:t}){const n=eL(t);return e.get("dataIndependentProperties")!==JSON.stringify(n)}({viewCache:a,layout:n.getLayout()}))},miniChartEnabled:T,getChart:()=>e,areSameVisiblePoints:()=>function(e){if(!e)return!1;if(e.length<2)return!0;const t=e[0],n=t[1].qNum,r=t[2].qNum;return e.every(e=>e[1].qNum===n&&e[2].qNum===r)}(b.visiblePoints)},command:{setMeta(e){TI(b,e)},layoutComponents:({settings:t}={})=>{e.layoutComponents({data:D(),settings:t}),b.isPrelayout=!1},update:q,brush:({render:t,nodes:n})=>{k();const r=Math.ceil(n.length/KI.CHUNK_SIZE);if(r<=1)return void t(n);let i=0;const o=()=>{d.timer=requestAnimationFrame(()=>{if(!e?.update)return void k();const a=i*KI.CHUNK_SIZE,s=Math.min(n.length,(i+1)*KI.CHUNK_SIZE);b.progressive={start:a,end:s,isFirst:0===i,isLast:i===r-1},t(n.slice(a,s)),i++,i<r?o():(b.progressive=!1,d.timer=null)})};o()}}};return I}function rL(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function iL(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function oL(e){let t,n,r;function i(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<0?i=t+1:o=t}while(i<o)}return i}return 2!==e.length?(t=rL,n=(t,n)=>rL(e(t),n),r=(t,n)=>e(t)-n):(t=e===rL||e===iL?e:aL,n=e,r=e),{left:i,center:function(e,t,n=0,o=e.length){const a=i(e,t,n,o-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,i=0,o=e.length){if(i<o){if(0!==t(r,r))return o;do{const t=i+o>>>1;n(e[t],r)<=0?i=t+1:o=t}while(i<o)}return i}}}function aL(){return 0}const sL=oL(rL).right;oL(function(e){return null===e?NaN:+e}).center;const lL=Math.sqrt(50),cL=Math.sqrt(10),uL=Math.sqrt(2);function dL(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=lL?10:o>=cL?5:o>=uL?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?dL(e,t,2*n):[s,l,c]}function fL(e,t,n){return dL(e=+e,t=+t,n=+n)[2]}function pL(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function hL(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function mL(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function gL(){}var yL=.7,vL=1/yL,bL="\\s*([+-]?\\d+)\\s*",xL="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",wL="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",SL=/^#([0-9a-f]{3,8})$/,ML=new RegExp(`^rgb\\(${bL},${bL},${bL}\\)$`),kL=new RegExp(`^rgb\\(${wL},${wL},${wL}\\)$`),EL=new RegExp(`^rgba\\(${bL},${bL},${bL},${xL}\\)$`),CL=new RegExp(`^rgba\\(${wL},${wL},${wL},${xL}\\)$`),AL=new RegExp(`^hsl\\(${xL},${wL},${wL}\\)$`),DL=new RegExp(`^hsla\\(${xL},${wL},${wL},${xL}\\)$`),qL={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 _L(){return this.rgb().formatHex()}function TL(){return this.rgb().formatRgb()}function NL(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=SL.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?OL(t):3===n?new RL(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?IL(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?IL(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=ML.exec(e))?new RL(t[1],t[2],t[3],1):(t=kL.exec(e))?new RL(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=EL.exec(e))?IL(t[1],t[2],t[3],t[4]):(t=CL.exec(e))?IL(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=AL.exec(e))?BL(t[1],t[2]/100,t[3]/100,1):(t=DL.exec(e))?BL(t[1],t[2]/100,t[3]/100,t[4]):qL.hasOwnProperty(e)?OL(qL[e]):"transparent"===e?new RL(NaN,NaN,NaN,0):null}function OL(e){return new RL(e>>16&255,e>>8&255,255&e,1)}function IL(e,t,n,r){return r<=0&&(e=t=n=NaN),new RL(e,t,n,r)}function LL(e){return e instanceof gL||(e=NL(e)),e?new RL((e=e.rgb()).r,e.g,e.b,e.opacity):new RL}function PL(e,t,n,r){return 1===arguments.length?LL(e):new RL(e,t,n,null==r?1:r)}function RL(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function zL(){return`#${HL(this.r)}${HL(this.g)}${HL(this.b)}`}function FL(){const e=jL(this.opacity);return`${1===e?"rgb(":"rgba("}${VL(this.r)}, ${VL(this.g)}, ${VL(this.b)}${1===e?")":`, ${e})`}`}function jL(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function VL(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function HL(e){return((e=VL(e))<16?"0":"")+e.toString(16)}function BL(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new WL(e,t,n,r)}function $L(e){if(e instanceof WL)return new WL(e.h,e.s,e.l,e.opacity);if(e instanceof gL||(e=NL(e)),!e)return new WL;if(e instanceof WL)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new WL(a,s,l,e.opacity)}function WL(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function UL(e){return(e=(e||0)%360)<0?e+360:e}function YL(e){return Math.max(0,Math.min(1,e||0))}function XL(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}hL(gL,NL,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:_L,formatHex:_L,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return $L(this).formatHsl()},formatRgb:TL,toString:TL}),hL(RL,PL,mL(gL,{brighter(e){return e=null==e?vL:Math.pow(vL,e),new RL(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?yL:Math.pow(yL,e),new RL(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new RL(VL(this.r),VL(this.g),VL(this.b),jL(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:zL,formatHex:zL,formatHex8:function(){return`#${HL(this.r)}${HL(this.g)}${HL(this.b)}${HL(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:FL,toString:FL})),hL(WL,function(e,t,n,r){return 1===arguments.length?$L(e):new WL(e,t,n,null==r?1:r)},mL(gL,{brighter(e){return e=null==e?vL:Math.pow(vL,e),new WL(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?yL:Math.pow(yL,e),new WL(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new RL(XL(e>=240?e-240:e+120,i,r),XL(e,i,r),XL(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new WL(UL(this.h),YL(this.s),YL(this.l),jL(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=jL(this.opacity);return`${1===e?"hsl(":"hsla("}${UL(this.h)}, ${100*YL(this.s)}%, ${100*YL(this.l)}%${1===e?")":`, ${e})`}`}}));const GL=Math.PI/180,KL=180/Math.PI,ZL=.96422,JL=.82521,QL=4/29,eP=6/29,tP=3*eP*eP,nP=eP*eP*eP;function rP(e){if(e instanceof iP)return new iP(e.l,e.a,e.b,e.opacity);if(e instanceof uP)return dP(e);e instanceof RL||(e=LL(e));var t,n,r=lP(e.r),i=lP(e.g),o=lP(e.b),a=oP((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?t=n=a:(t=oP((.4360747*r+.3850649*i+.1430804*o)/ZL),n=oP((.0139322*r+.0971045*i+.7141733*o)/JL)),new iP(116*a-16,500*(t-a),200*(a-n),e.opacity)}function iP(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function oP(e){return e>nP?Math.pow(e,1/3):e/tP+QL}function aP(e){return e>eP?e*e*e:tP*(e-QL)}function sP(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function lP(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function cP(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof uP)return new uP(e.h,e.c,e.l,e.opacity);if(e instanceof iP||(e=rP(e)),0===e.a&&0===e.b)return new uP(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*KL;return new uP(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new uP(e,t,n,null==r?1:r)}function uP(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function dP(e){if(isNaN(e.h))return new iP(e.l,0,0,e.opacity);var t=e.h*GL;return new iP(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}hL(iP,function(e,t,n,r){return 1===arguments.length?rP(e):new iP(e,t,n,null==r?1:r)},mL(gL,{brighter(e){return new iP(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new iP(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new RL(sP(3.1338561*(t=ZL*aP(t))-1.6168667*(e=1*aP(e))-.4906146*(n=JL*aP(n))),sP(-.9787684*t+1.9161415*e+.033454*n),sP(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),hL(uP,cP,mL(gL,{brighter(e){return new uP(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new uP(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return dP(this).rgb()}}));var fP=e=>()=>e;function pP(e){return 1===(e=+e)?hP:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):fP(isNaN(t)?n:t)}}function hP(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):fP(isNaN(e)?t:e)}var mP=function e(t){var n=pP(t);function r(e,t){var r=n((e=PL(e)).r,(t=PL(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=hP(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function gP(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function yP(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=kP(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function vP(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function bP(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function xP(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=kP(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var wP=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,SP=new RegExp(wP.source,"g");function MP(e,t){var n,r,i,o=wP.lastIndex=SP.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=wP.exec(e))&&(r=SP.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:bP(n,r)})),o=SP.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function kP(e,t){var n,r=typeof t;return null==t||"boolean"===r?fP(t):("number"===r?bP:"string"===r?(n=NL(t))?(t=n,mP):MP:t instanceof NL?mP:t instanceof Date?vP:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?gP:Array.isArray(t)?yP:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?xP:bP)(e,t)}function EP(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function CP(e){return+e}var AP=[0,1];function DP(e){return e}function qP(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function _P(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=qP(i,r),o=n(a,o)):(r=qP(r,i),o=n(o,a)),function(e){return o(r(e))}}function TP(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=qP(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=sL(e,t,1,r)-1;return o[n](i[n](t))}}function NP(){var e,t,n,r,i,o,a=AP,s=AP,l=kP,c=DP;function u(){var e=Math.min(a.length,s.length);return c!==DP&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?TP:_P,i=o=null,d}function d(t){return null==t||isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((o||(o=r(s,a.map(e),bP)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,CP),u()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=EP,u()},d.clamp=function(e){return arguments.length?(c=!!e||DP,u()):c!==DP},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function OP(e,t){if(!isFinite(e)||0===e)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function IP(e){return(e=OP(Math.abs(e)))?e[1]:NaN}var LP,PP=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function RP(e){if(!(t=PP.exec(e)))throw new Error("invalid format: "+e);var t;return new zP({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function zP(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function FP(e,t){var n=OP(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}RP.prototype=zP.prototype,zP.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 jP={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>FP(100*e,t),r:FP,s:function(e,t){var n=OP(e,t);if(!n)return LP=void 0,e.toPrecision(t);var r=n[0],i=n[1],o=i-(LP=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+OP(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function VP(e){return e}var HP,BP,$P,WP=Array.prototype.map,UP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function YP(e){var t=void 0===e.grouping||void 0===e.thousands?VP:function(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}(WP.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",i=void 0===e.decimal?".":e.decimal+"",o=void 0===e.numerals?VP:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(WP.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",s=void 0===e.minus?"−":e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function c(e,c){var u=(e=RP(e)).fill,d=e.align,f=e.sign,p=e.symbol,h=e.zero,m=e.width,g=e.comma,y=e.precision,v=e.trim,b=e.type;"n"===b?(g=!0,b="g"):jP[b]||(void 0===y&&(y=12),v=!0,b="g"),(h||"0"===u&&"="===d)&&(h=!0,u="0",d="=");var x=(c&&void 0!==c.prefix?c.prefix:"")+("$"===p?n:"#"===p&&/[boxX]/.test(b)?"0"+b.toLowerCase():""),w=("$"===p?r:/[%p]/.test(b)?a:"")+(c&&void 0!==c.suffix?c.suffix:""),S=jP[b],M=/[defgprs%]/.test(b);function k(e){var n,r,a,c=x,p=w;if("c"===b)p=S(e)+p,e="";else{var k=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:S(Math.abs(e),y),v&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(!+e[r])break e;i>0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),k&&0===+e&&"+"!==f&&(k=!1),c=(k?"("===f?f:s:"-"===f||"("===f?"":f)+c,p=("s"!==b||isNaN(e)||void 0===LP?"":UP[8+LP/3])+p+(k&&"("===f?")":""),M)for(n=-1,r=e.length;++n<r;)if(48>(a=e.charCodeAt(n))||a>57){p=(46===a?i+e.slice(n+1):e.slice(n))+p,e=e.slice(0,n);break}}g&&!h&&(e=t(e,1/0));var E=c.length+e.length+p.length,C=E<m?new Array(m-E+1).join(u):"";switch(g&&h&&(e=t(C+e,C.length?m-p.length:1/0),C=""),d){case"<":e=c+e+p+C;break;case"=":e=c+C+e+p;break;case"^":e=C.slice(0,E=C.length>>1)+c+e+p+C.slice(E);break;default:e=C+c+e+p}return o(e)}return y=void 0===y?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),k.toString=function(){return e+""},k}return{format:c,formatPrefix:function(e,t){var n=3*Math.max(-8,Math.min(8,Math.floor(IP(t)/3))),r=Math.pow(10,-n),i=c(((e=RP(e)).type="f",e),{suffix:UP[8+n/3]});return function(e){return i(r*e)}}}}function XP(e,t,n,r){var i,o=function(e,t,n){n=+n;const r=(t=+t)<(e=+e),i=r?fL(t,e,n):fL(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}(e,t,n);switch((r=RP(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(IP(t)/3)))-IP(Math.abs(e)))}(o,a))||(r.precision=i),$P(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,IP(t)-IP(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-IP(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return BP(r)}function GP(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const r=t<e,[i,o,a]=r?dL(t,e,n):dL(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let e=0;e<s;++e)l[e]=(o-e)/-a;else for(let e=0;e<s;++e)l[e]=(o-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(i+e)/-a;else for(let e=0;e<s;++e)l[e]=(i+e)*a;return l}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return XP(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i,o=t(),a=0,s=o.length-1,l=o[a],c=o[s],u=10;for(c<l&&(i=l,l=c,c=i,i=a,a=s,s=i);u-- >0;){if((i=fL(l,c,n))===r)return o[a]=l,o[s]=c,t(o);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return e},e}function KP(){var e=NP()(DP,DP);return e.copy=function(){return t=e,KP().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},pL.apply(e,arguments),GP(e)}!function(e){HP=YP(e),BP=HP.format,$P=HP.formatPrefix}({thousands:",",grouping:[3],currency:["$",""]});const ZP={getTicksAndMinMax(e,t,n,r,i){t&&e.nice(n).nice(n);let o=e.ticks(n),[a,s]=e.domain();if(1===o.length)if(t)e.domain([r,i]).nice(2).nice(2),[a,s]=e.domain(),a*s>=0?o=[a,s]:Math.abs(s)>Math.abs(a)||Math.abs(s)===Math.abs(a)&&Math.abs(i)>Math.abs(r)?(a=r,o=[0,s]):(s=i,o=[a,0]);else{let t=2;for(;1===o.length;)o=e.ticks(t++)}return{ticks:o,min:a,max:s}},valid({ticks:e,scale:t,distance:n,size:r,formatter:i,measure:o}){const a=e.length<=4?.5:.8;if((t(e[1])-t(e[0]))*r<n*a)return!1;const s=e.map(i),l=function(e){for(let t=1;t<e.length;t++)if(e[t]===e[t-1])return!0;return!1}(s);if(l)return!1;const c=r/e.length;return Math.max(...s.map(o))<=c},getDistance(e){switch(e){case.5:return KI.GRID_DISTANCE.NARROW;case 1:return KI.GRID_DISTANCE.MEDIUM;case 2:return KI.GRID_DISTANCE.WIDE;default:return KI.GRID_DISTANCE.FALLBACK}},getSize(e,t,n,r,i){if(i.meta.isSnapshot||t.query.getMeta().isPrelayout)return e.meta.chart.size[r];const o=n.component(YI.COMPONENT.POINT)?.rect.computedPhysical[r],a=n.component(YI.COMPONENT.HEAT_MAP)?.rect.computedPhysical[r];return Math.max(...[o,a].filter(Number.isFinite))}};function JP({layoutService:e,dockService:t,extremumModel:n,themeService:r,chartModel:i,chart:o}){let a;const s={[YI.SCALE.X]:void 0,[YI.SCALE.Y]:void 0};function l(l,c){if(!s[l]){const t=l===YI.SCALE.X?"qMeasureInfo.0":"qMeasureInfo.1";e.getHyperCubeValue(`${t}.qIsAutoFormat`,!1)&&(s[l]=i.query.getAutoFormatPattern(l))}if(s[l]){const e=o.formatters();"function"==typeof e[l].pattern&&e[l].pattern(s[l])}const{min:u,max:d,explicitType:f,distance:p,size:h,measure:m}=function(a){let s,l,c,u,d;a===YI.SCALE.X?(({xAxisMin:s,xAxisMax:l,xAxisExplicitType:c}=n.query.getXExtrema()),d="width",u=e.getLayoutValue("xAxis.spacing",1)):(({yAxisMin:s,yAxisMax:l,yAxisExplicitType:c}=n.query.getYExtrema()),d="height",u=e.getLayoutValue("yAxis.spacing",1));const f=ZP.getSize(t,i,o,d,e),p=ZP.getDistance(u),{measureText:h}=Xw.renderer("svg")(),m=r.getStyles();return{min:s,max:l,explicitType:c,distance:p,size:f,measure:e=>h({text:e,fontFamily:m.axis.label.name.fontFamily,fontSize:m.axis.label.name.fontSize})[d]}}(l),g=function({scale:e,explicitType:t,distance:n,size:r,measure:i,formatter:o}){const[a,s]=e.domain(),l="minMax"!==t,c=Math.max(2,Math.round(r/n));let{ticks:u,min:d,max:f}=ZP.getTicksAndMinMax(e,l,c,a,s);for(let t=c-1;t>0&&!ZP.valid({scale:e,ticks:u,distance:n,size:r,measure:i,formatter:o});t--)({ticks:u,min:d,max:f}=ZP.getTicksAndMinMax(e,l,t,a,s));const p=function({majorTicks:e,count:t}){const n=[];for(let r=0;r<e.length-1;r++){const i=e[r],o=(e[r+1]-i)/(t+1);for(let e=1;e<=t;e++)n.push(i+o*e)}return n}({majorTicks:u,count:1}),h=[...u.map(e=>({value:e,isMinor:!1})),...p.map(e=>({value:e,isMinor:!0}))].sort((e,t)=>e.value-t.value);return"min"===t&&(d=a),"max"===t&&(f=s),{ticks:h,minMax:[d,f]}}({scale:KP().domain([u,d]),explicitType:f,distance:p,size:h,measure:m,formatter:o.formatters()[l]});return"ticks"===c&&l===YI.SCALE.Y&&(a=g.ticks),"ticks"===c?g.ticks:g.minMax}return{query:{getXTicks:()=>l(YI.SCALE.X,"ticks"),getYTicks:()=>l(YI.SCALE.Y,"ticks"),getXMinMax:()=>l(YI.SCALE.X,"minMax"),getYMinMax:()=>l(YI.SCALE.Y,"minMax"),getCurrentYTicks:()=>a}}}const QP=(e,t)=>{t.length=0;const n=e[0].qMatrix;let r;if(e[0].reformatted)for(r=1;r<n.length;r++)try{t.push(n[r][0])}catch{}else{for(r=1;r<n.length;r++)try{n[r][0].qText=JSON.parse(n[r][0].qText),t.push(n[r][0])}catch{}e[0].reformatted=!0}return t};function eR(e,t){if(0===e.length)return[];const n=e.length,r=[];let i,o,a=0;const s="x"===t?"y":"x",l=`${t}Min`,c=`${t}Max`,u=`${s}Min`,d=`${s}Max`;e.sort((e,t)=>e[l]>t[l]?1:e[l]!==t[l]?-1:e[l]===t[l]?e[u]-t[u]:void 0),i=e[0],o={xMin:i.xMin,xMax:i.xMax,yMin:i.yMin,yMax:i.yMax},r[a]=o;for(let t=1;t<n;t++)i=e[t],o[l]===i[l]&&o[c]===i[c]&&o[d]===i[u]?o[d]=i[d]:(a++,o={xMin:i.xMin,xMax:i.xMax,yMin:i.yMin,yMax:i.yMax},r[a]=o);return r}function tR({layout:e,values:t}){const n=function({layout:e,values:t}){const n=QP([e.dataPages[0]],[]),r=[];return t.forEach(e=>{const t=n.find(({qElemNumber:t})=>t===e);t&&r.push(t)}),r}({layout:e,values:t});let r=n?n.length:0;const i=new Array(r),o=[];let a,s,l,c,u,d,f;for(let e=0;e<r;e++)a=n[e].qText,s=Math.min(a[0],a[2]),c=Math.min(a[1],a[3]),l=Math.max(a[0],a[2]),u=Math.max(a[1],a[3]),i[e]={xMin:s,xMax:l,yMin:c,yMax:u};const p=eR(eR(i,"x"),"y"),h=eR(eR(i,"y"),"x"),m=p.length>h.length?h:p;r=m.length;for(let e=0;e<r;e++)a=m[e],d={idx:0,range:{max:a.xMax,min:a.xMin},type:"measure"},f={idx:1,range:{max:a.yMax,min:a.yMin},type:"measure"},o[e]=[d,f];return o}const nR=/\/?binData/;function rR(e,t,n={}){const r=[],i={},o=e.isActive();let a=!1;return e.brushes().forEach(e=>{const n=function(e){let t=e,n=-1,r=-1;if(nR.test(e)){const e=t.substring(t.lastIndexOf("/")+1);"binX"===e?n=0:"binY"===e?n=1:r=2,t="/qHyperCubeDef"}return{measureIdx:n,measureCount:r,path:t}}(e.id);if("range"===e.type&&n.measureIdx>-1){const t=e.brush.ranges();t.length&&(a=!0,i.rangeSelectHyperCubeValues||(i.rangeSelectHyperCubeValues={path:n.path,ranges:[]}),t.forEach(e=>i.rangeSelectHyperCubeValues.ranges.push({qMeasureIx:n.measureIdx,qRange:{qMin:e.min,qMax:e.max,qMinInclEq:!0,qMaxInclEq:!0}})))}if("value"===e.type&&2===n.measureCount){const r=e.brush.values();if(r.length){a=!0;const e=tR({layout:t,values:r});i.multiRangeSelectHyperCubeValues||(i.multiRangeSelectHyperCubeValues={path:n.path,ranges:[]}),e.forEach(e=>{const t=e[0],n=e[1];i.multiRangeSelectHyperCubeValues.ranges.push({qRanges:[{qMeasureIx:t.idx,qRange:{qMin:t.range.min,qMax:t.range.max,qMinInclEq:!1!==t.range.minInclEq,qMaxInclEq:!1!==t.range.maxInclEq}},{qMeasureIx:n.idx,qRange:{qMin:n.range.min,qMax:n.range.max,qMinInclEq:!1!==n.range.minInclEq,qMaxInclEq:!1!==n.range.maxInclEq}}]})})}}}),!a&&o?[{method:"resetMadeSelections",params:[]}]:(i.rangeSelectHyperCubeValues&&r.push({method:"rangeSelectHyperCubeValues",params:[i.rangeSelectHyperCubeValues.path,i.rangeSelectHyperCubeValues.ranges,[],n.orMode??!0]}),i.multiRangeSelectHyperCubeValues&&r.push({method:"multiRangeSelectHyperCubeValues",params:[i.multiRangeSelectHyperCubeValues.path,i.multiRangeSelectHyperCubeValues.ranges]}),r)}function iR({chart:e,actions:t,selections:n}){const r=[...Array(15)].map((e,t)=>`qHyperCube/qMeasureInfo/${t}`);r.push("binData/binX"),r.push("binData/binY");const i=wo({chart:e,actions:t,selections:n,config:{brushEvents:{update:({selectionInfo:n})=>{if("binXRange"===n.event||"binYRange"===n.event){const r=e.brush("selection").brushes();if(r?.length&&t?.select?.emit){const e="binXRange"===n.event?r.filter(e=>"binData/binX"===e.id):r.filter(e=>"binData/binY"===e.id);e?.length&&t.select.emit(n.event,e[0].brush.ranges()[0])}}}},allowSimultaneous:r,selectionActions:{clear:({clearMinor:n,clearLegend:r,selectionInfo:i,cleared:o})=>{const a=["xRange","yRange","binXRange","binYRange"].includes(i.event),s=["binXRange","binYRange"].includes(i.event),l=[YI.BRUSH.X_RANGE,YI.BRUSH.Y_RANGE,YI.BRUSH.BIN_X_RANGE,YI.BRUSH.BIN_Y_RANGE].some(e=>document.querySelector(`[data-key='${e}-edge-0']`));!o&&a||(n({eventName:"xRange",componentName:YI.BRUSH.X_RANGE}),n({eventName:"yRange",componentName:YI.BRUSH.Y_RANGE}),n({eventName:"binXRange",componentName:YI.BRUSH.BIN_X_RANGE}),n({eventName:"binYRange",componentName:YI.BRUSH.BIN_Y_RANGE}),s&&t.select.emit("binsRangeSelectionClear")),(o||l||a||s)&&e.brush("lazySelection").clear(),r()}},selectionsFn:(e,t,n)=>n.qHyperCube.qDataPages.length?PM.selections(e,t,n):rR(e,n,t)}}),o=e.brush("lazySelection"),a={activate:()=>{},deactivated:()=>o.end(),cleared:()=>o.clear(),canceled:()=>o.end()};var s,l;return l=a,(s=n)&&Object.keys(l).forEach(e=>{s.on(e,l[e])}),i.destroyLazySelection=()=>{((e,t)=>{e&&Object.keys(t).forEach(n=>{e.removeListener(n,t[n])})})(n,a)},i}const oR={CUSTOM:{EXPRESSION:"customTooltipExpression",TITLE:"customTooltipTitle",DESCRIPTION:"customTooltipDescription",QUARANTINE:"customTooltip",IMAGES:"customTooltipImages"},CHART:{CONTAINER_ID:"tooltipContainerId",STATE:"customTooltipSessionState",CHART_OBJECT_ID:"customTooltipSessionObjectId",CHART_PARENT_TYPE:"TooltipChartParent",CHART_CHILD_TYPE:"TooltipChart",STYLE:{small:"140px",medium:"200px",large:"340px"}}},aR=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼ‎ⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗＡ-Ｚａ-ｚｦ-ￜ]"),sR=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞‏יִײַ-ﬨשׁ-ﭏ]"),lR=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),cR={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>aR.test(e),isRtlChar:e=>sR.test(e)||lR.test(e),detectTextDirection(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],cR.isLtrChar(r))return"ltr";if(cR.isRtlChar(r))return"rtl"}return"ltr"}};function uR(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const dR={getImageSize(e,t){let n;function r(){n&&(clearTimeout(n),n=null)}function i(e){const t=e;t.onload=null,t.onerror=null,r()}const o={small:50,medium:200,large:340,original:340};return new Promise(a=>{const s=new Image;s.referrerPolicy="no-referrer",s.onload=()=>{let e;const{height:n,width:l}=s,c=o[t]*(n>l?1:n/l),u=o[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},i(s)):"original"===t?(e={height:Math.min(c,n),width:Math.min(u,l)},r()):(e={height:c,width:u},r()),a(e)},s.onerror=()=>{i(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout(()=>{i(s),a({height:20,width:20,imageError:!0})},3e3)})}};async function fR(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const i=function(e){let t,n,r,i,o,a;if(e&&(e.session?.options||e.enigmaModel?.session?.sessionConfig||e.session?.config?.url)){if(t=e.session.options||e.enigmaModel?.session.sessionConfig,!t){t=e.session?.config;const n=new URL(t.url);t.host=n.hostname,t.port=n.port,t.isSecure="wss:"===n.protocol}return a=void 0!==t.secure?t.secure:t.isSecure,n=a?"https://":"http://",r=t.host||"localhost",i=t.port?`:${t.port}`:"",o=t.prefix?t.prefix:"/","/"!==o[o.length-1]&&(o=`${o}/`),n+r+i+o}return""}(n);i&&(!function(e,t){const n=e.replace(t,"").replace(/^\.\.\//i,"/");n[0]}(r,i),r=r.replace(/"/g,'\\"'),r=r.replace(/'/g,"\\'"),r=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(r,i));const{height:o,width:a,imageError:s}=await dR.getImageSize(r,t);return{src:r,size:t,height:o,width:a,imageError:s}}async function pR(e,t,n,r){const{app:i,flags:o}=t,a=e.layout?.tooltip?.imageComponents;if(!a)return[];const[s]=a,l=s.size||"small",c=s.type||"media";let u=-1;for(let e=0;e<n.length;e++)if(n[e].cId===s.cId){u=e;break}const d=r.data?.customTooltipAttrExps?.value||[];let f;if(-1!==u&&d[u]&&(f=d[u]),"media"===c&&s.ref?.qStaticContentUrl?.qUrl)return fR(s,l,i);if("url"===c)return async function(e,t,n,r,i){let o,a=n.ref;if(i&&i.label&&(a=i.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&e?.getImage&&uR(a))try{const t=`data:image/png;base64, ${await e.getImage(a)}`,{height:n,width:i,imageError:s}=await dR.getImageSize(t,r);o={src:t,size:r,height:n,width:i,imageError:s}}catch{}else{const{height:e,width:t,imageError:n}=await dR.getImageSize(a,r);o={src:a,size:r,height:e,width:t,imageError:n}}return o}(i,o,s,l,f);if(o.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===c&&f&&f.label){return async function(e,t,n,r){let i;const o=r.label,a=`qmem://${t.qFallbackTitle}/${o}`;if(uR(a))try{const t=await e.getImage(a);if(t){const e=`data:image/png;base64, ${t}`,{height:r,width:o,imageError:a}=await dR.getImageSize(e,n);i={src:e,size:n,height:r,width:o,imageError:a}}}catch{}return i}(i,n[u],l,f)}return[]}const hR={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const i=t,o=[];for(let t=0;t<i.length;t++)o.push(pR(e,r,n,i[t]));const a=await Promise.all(o);for(let e=0;e<i.length;e++)i[e].data.customTooltipImages=[a[e]];return i},checkIfPromisesExist({customTooltipModel:e}){const t=e.layout?.tooltip?.imageComponents;return!!t&&t.length>0}},mR={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let i=t;return i=await hR.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),i},checkIfPromisesExist:({customTooltipModel:e})=>hR.checkIfPromisesExist({customTooltipModel:e})};const gR=(e,t)=>{const n=e?.qHyperCubeDef?.qDimensions,r=e?.qHyperCubeDef?.qMeasures,i=e?.qHyperCubeDef?.qInterColumnSortOrder,o=t;return{qInfo:{qType:oR.CHART.CHART_PARENT_TYPE,qId:oR.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:n,qMeasures:r,qInterColumnSortOrder:i,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:o}},yR=e=>{const t=e.tooltip?.chart?.object?.refId;return{qInfo:{qType:oR.CHART.CHART_CHILD_TYPE},qExtendsId:t}};const vR={createContainer:({ctx:e,layout:t})=>{if(!(t.qHyperCube?.qDimensionInfo?.length<=0))return function(e,t){const n=t.tooltip?.chart?.style?.size??"medium",r=oR.CHART.STYLE[n];return[{content:[e.h("div",{style:{display:"flex",width:r,height:r,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:oR.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":r}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:r,customTooltipModel:i,rtl:o})=>{const a=i,s=t?.tooltip?.chart?.object?.refId;if(a?.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&s&&!(t.qHyperCubeDef.qDimensions.length<=0)){await vR.hide({app:e,customTooltipModel:i});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,i=oR.CHART.STATE,o=t.qStateName;r.miniChartToken.alternateState||(r.miniChartToken.alternateState=i,await e.addSessionAlternateState(i,o),r.miniChartToken.alternateState=i)}({app:e,properties:t,customTooltipModel:i});const s=await async function({app:e,properties:t,customTooltipModel:n}){const r=n;r.miniChartToken.sessionObj?.id&&await e.destroySessionObject(r.miniChartToken.sessionObj.id);const i=oR.CHART.STATE,o=gR(t,i),a=await e.createSessionObject(o),s=yR(t);if(a.id!==oR.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(a.id);r.miniChartToken.sessionObj=a;const l=await a.createChild(s);if(r.miniChartToken.sessionObj&&r.miniChartToken.sessionObj.id===a.id)return r.miniChartToken.model=l,l;e.destroySessionObject(a.id)}({app:e,properties:t,customTooltipModel:i});if(a.miniChartToken.alternateState&&a.miniChartToken.sessionObj&&s){const e=n.length>0&&void 0!==n[0].data?.value?[n[0].data?.value]:[],s=void 0!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){const e=n[0].data.selectionOuterDimension??n[0].data.selectionDimension;if(e?.source?.field){const t=e?.source?.field.split("/"),n=t[t.length-1],r=void 0!==e.value?[e.value]:[];r.length>0&&void 0!==n&&a.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),r,!1)}}e.length>0&&a.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",s,e,!1);const l=document.getElementById(oR.CHART.CONTAINER_ID),c={direction:o?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};a.miniChartToken.vis=await i.embed.render({element:l,model:a.miniChartToken.model,options:c,id:a.miniChartToken.model?.id,type:a.miniChartToken.model?.genericType})}}catch{await vR.hide({app:e,customTooltipModel:i})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;n?.embed&&(vR.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(oR.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=oR.CHART.STATE;n.miniChartToken.alternateState=void 0,await e.removeSessionAlternateState(r)}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{const t=e;"function"==typeof t.miniChartToken?.vis?.destroy&&(t.miniChartToken.vis.destroy(),t.miniChartToken.vis=void 0)}};function bR(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function xR(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=oR.CUSTOM,i={};return i[e]=!0,i[t]=!0,i[n]=!0,i[r]=!0,i}function wR(e){const t=xR();return e.filter(e=>t[e.id])}const SR={getNodes(e,t){const n=function(e,t){const n=void 0===e.clientX?Math.floor(e.srcEvent.clientX):e.clientX,r=void 0===e.clientY?Math.floor(e.srcEvent.clientY):e.clientY,i=t.element.getBoundingClientRect();return{cx:n-i.left,cy:r-i.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,r=[];const i={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach(t=>{const o=t.data?.selectionDimension??t.data;if(!o||t.data?.customTooltipAttrExps||i[t.type]){if(t.data?.customTooltipAttrExps&&!t.data.customTooltipImages){const e=t;e.data.customTooltipImages=[],r.push(e)}}else{n||(n=[],Object.keys(i).forEach(t=>{n=n.concat(e.findShapes(t).filter(e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&i[t][e.key]))}));const t=n.filter(e=>{const t=e.data.stack??e.data.selectionOuterDimension??e.data.selectionDimension;return t&&t.value===o.value&&t.label===o.label});t.length>0&&(r=r.concat(t[0]))}}),r},displayTooltip(e,t,{nodes:n,opts:r={},customTooltipModel:i,extractedNodes:o=[],hide:a}){if(i&&!a){const{layout:a,chart:s}=i,{attrExps:l}=SR.getAttrExprData(a);o.length||n.length?mR.handlePromises({customTooltipModel:i,nodes:SR.getDataNodes(s,o.length>0?o:n),attrExps:l,opts:r}).then(()=>{t.emit("show",e,n.length?{nodes:n}:void 0)}):t.emit("show",e,n.length?{nodes:n}:void 0)}else i?.miniChartToken?.alternateState&&vR.hide({app:r.app,customTooltipModel:i}),t.emit("hide")},checkIfPromisesExist:({customTooltipModel:e})=>mR.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){const n=t,r=e.qHyperCubeDef?.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return n[r]||(n[r]=[]),n[r]},getAttrExprData(e){let t=[],n="";const r=e.qHyperCube?.qDimensionInfo||[];if(r.length>0){const i=r.length-1;t=e.qHyperCube?.qDimensionInfo?.[i]?.qAttrExprInfo||[],n=`qDimensionInfo/${i}/qAttrExprInfo`}return{attrExps:t,fieldPath:n}},quarantineCustomTooltipAttrs(e,t={}){const n=e.qLayoutExclude?.quarantine?.[oR.CUSTOM.QUARANTINE];if(!n){!function(e,t){const n=t;let r=n.qLayoutExclude;r||(n.qLayoutExclude={quarantine:{}},r=n.qLayoutExclude),r.quarantine||(r.quarantine={}),r.quarantine[oR.CUSTOM.QUARANTINE]=[],e.forEach(e=>{r.quarantine[oR.CUSTOM.QUARANTINE].push(e)}),n.qLayoutExclude=r}(wR(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){const t=e,n=e.qLayoutExclude?.quarantine?.[oR.CUSTOM.QUARANTINE];n&&delete t.qLayoutExclude.quarantine[oR.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=bR(e);if(!n)return;const r=void 0!==t?t:n.length-1;if(!n[r])return;const i=this.getAttrExps(e,n[r]);if(0===wR(i).length){const t=e.qLayoutExclude?.quarantine?.customTooltip||[],n=[...i,...t],o=e;o.qHyperCubeDef?o.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:o.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={}){let n=[];const r=bR(e)||[];[...r,t].forEach(e=>{const t=wR(e.qAttributeExpressions||[]);t.length>0&&(n=t)});const i=xR(),o=r.map(e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter(e=>!i[e.id]),t}),a=o.length-1;o.length>0&&(o[a].qAttributeExpressions=o[a].qAttributeExpressions.concat(n));const s=e;e.qHyperCubeDef?s.qHyperCubeDef.qDimensions=o:s.qHyperCube.qDimensionInfo=o},addCallbackCustomTooltip(e){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e):(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},moveCallbackCustomTooltip(e,t){1===e.qHyperCubeDef.qDimensions.length&&(this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e)),e.qHyperCubeDef.qDimensions.length>1&&this.moveCustomTooltipAttrs(e,t)},removeCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>0?this.moveCustomTooltipAttrs(e,t):this.quarantineCustomTooltipAttrs(e,t)},replaceCallbackCustomTooltip(e,t){e.qHyperCubeDef.qDimensions.length>1?this.moveCustomTooltipAttrs(e,t):(this.quarantineCustomTooltipAttrs(e,t),this.setAttrsFromQuarantine(e),this.unquarantineCustomTooltipAttrs(e))},shouldIgnoreDefaultRows:e=>e.tooltip?.hideBasic||0,DEBOUNCE_THRESHOLD:50,getFooterRow:(e,t)=>[{content:e,style:{"font-style":"italic","font-size":"12px","line-height":"16px",color:"rgba(255, 255, 255, 0.6)","text-align":t?"right":"left",direction:cR.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=cR.detectTextDirection(e.src),r=[],i={style:{display:"block","margin-left":"auto","margin-right":"auto",overflow:"hidden",width:e.width,height:e.height}};if("original"===e.size||e.imageError){r.push(t.h("span",{style:{display:"inline-block",height:"100%","vertical-align":"middle"}}));const n=e.imageError?`${e.src}?${Math.random()}`:e.src;r.push(t.h("img",{style:{"max-width":e.width,"max-height":e.height,"vertical-align":"middle"},src:n,referrerpolicy:"no-referrer"})),i.style["text-align"]="center",i.style["white-space"]="nowrap"}else i.style["background-size"]="contain",i.style["background-repeat"]="no-repeat",i.style["background-position"]="center",i.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",i,r),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};const MR={getCustomAttrExps(e,t,n){const r={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},i=t.data?.customTooltipAttrExps?.value||[];if(Number.isNaN(i))return r;return function(e,t,n,r){const i={[oR.CUSTOM.TITLE]:!0,[oR.CUSTOM.DESCRIPTION]:!0},{attrExps:o,fieldPath:a}=SR.getAttrExprData(e);return 0===t.length||0===o.length||""===a||o.forEach((e,o)=>{const s=t[o];if(e.id===oR.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,i="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${o}`).formatter()(s.value);r.customTooltipAttrExpsArr.push({label:t,value:i})}else if(i[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&r.customTooltipInfoAttrExpsArr.push({...e.id===oR.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}}),r}(n,i.map(t=>{const n=function(e,t){return{label:`${e(t.source.key).field(t.source.field).title()}`,value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}}(e,t);return n}),e,r)}};function kR({nodes:e,layout:t,dataset:n}){const r=function(e,t,n){const r=[];return e.forEach(e=>{r.push(MR.getCustomAttrExps(n,e,t))}),r}(e,t,n);return r.reduce((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)}),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}const{CUSTOM:ER}=oR;function CR({flags:e,layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l,options:c}){const u=function({layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:r,chart:i,translator:o,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:SR,miniChartToken:{},embed:s}}({layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l}),d="rtl"===c.direction,f=!(!t.tooltip||t.tooltip.auto),p=f&&ar(t,"tooltip.hideBasic",!1),h=!!(f&&t.tooltip?.chart?.object?.refId&&l&&"function"==typeof r?.getEffectiveProperties);return{isEnabled:()=>f,hideBasic:()=>p,getAttributes:({dataset:e,nodes:n})=>{const r=kR({dataset:e,nodes:n,layout:t});return{title:r.customTooltipInfoAttrExpsArr.find(e=>e.id===ER.TITLE)?.title,description:r.customTooltipInfoAttrExpsArr.find(e=>e.id===ER.DESCRIPTION)?.value,measures:r.customTooltipAttrExpsArr}},hasImages:()=>SR.checkIfPromisesExist({customTooltipModel:u}),createImageRow:({value:e,h:t})=>SR.getImageRow(e,{h:t,rtl:d}),addImages:({nodes:r})=>{const i=SR.getDataNodes(o,r),{attrExps:a}=SR.getAttrExprData(t);return mR.handlePromises({customTooltipModel:u,nodes:i,attrExps:a,opts:{flags:e,app:n}})},chart:{isEnabled:()=>h,hasLimitation:()=>!!n?.isInModalSelection?.(),createContainer:({h:e})=>vR.createContainer({layout:t,ctx:{h:e,rtl:d}}),createLimitationRow:()=>SR.getFooterRow(a.get("properties.tooltip.notselectedmessage"),d),show:({nodes:e,properties:t})=>vR.show({app:n,properties:t,selectedNodes:e,customTooltipModel:u,rtl:d}),hasAlternateState:()=>!!u.miniChartToken?.alternateState,hide:()=>vR.hide({app:n,customTooltipModel:u}),destroy:()=>vR.destroyVisualization({customTooltipModel:u})}}}function AR({dataset:e,data:t}){const{source:n,label:r,value:i}=t,o=e(n.key).field(n.field),a=o.raw();return!a.isCustomFormatted&&(a.qIsAutoFormat||"U"===a.qNumFormat.qType)?""===i||Number.isNaN(i)||"NaN"===i?"-":o.formatter()(i):r}function DR({dataset:e,value:t,measureIndex:n}){return e(YI.DATA.MAIN).field(`qMeasureInfo/${n}`).formatter()(t)}function qR(e,t,n){const r=function(e){const t=e("line",{x1:"0px",y1:"16px",x2:"16px",y2:"0px","stroke-width":"3px"});return e("svg",{xlms:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 16 16"},t)}(e),i=t.query.getLabel(n),o=t.query.getType(n);return[{content:r,style:{stroke:t.query.getStroke(n),width:"16px","vertical-align":"middle","stroke-dasharray":t.query.getLineDash(n)}},{content:e("div",{style:{display:"flex","flex-direction":"column"}},[e("span",{style:{"font-weight":"bold"}},i),e("span",null,o)]),style:{}}]}function _R({translator:e,custom:t,measureProperties:n,h:r,nodes:i,dataset:o,meta:a,create:s,util:l,trendLinesService:c}){if(a.triggerer===YI.COMPONENT.TRENDLINES)return function({dataset:e,translator:t,nodes:n,create:r,h:i,trendLinesService:o}){const a=o.getModel(),[s]=n,l=s.data.layer,c=DR({dataset:e,value:s.data.x,measureIndex:0}),u=DR({dataset:e,value:s.data.y,measureIndex:1}),d=r.raw({value:qR(i,a,l)}),f=r.text({value:a.query.getExpression(l)});return[d,r.measure({label:t.get("x"),value:c}),r.measure({label:t.get("y"),value:u}),f]}({dataset:o,translator:e,nodes:i,create:s,h:r,trendLinesService:c});const[u]=i;if(a.triggerer===YI.COMPONENT.HEAT_MAP)return[s.measure({label:e.get("properties.compression.density"),value:u.data.binDensity.label,style:{label:{bold:!0},value:{bold:!0}}})];const{title:d,description:f,measures:p}=t.isEnabled()?t.getAttributes({dataset:o,nodes:i}):{},h=[];d&&h.push(s.text({value:d,style:{bold:!0}})),f&&h.push(s.text({value:f}));const m=t.hideBasic();m&&!p.length&&(d||f)||h.push(s.text({value:u.data.label,style:{bold:!0}})),m||(h.push(s.color({nodes:i,property:"color"})),h.push(...i.map(e=>n.map(t=>{const n=e.data[t],{key:r,field:i}=n.source;return s.measure({label:l.dataset.title(r,i),value:AR({dataset:o,data:n})})}).flat()).flat())),p&&h.push(...p.map(e=>s.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}}))),t.chart.isEnabled()&&(t.chart.hasLimitation()?(t.chart.destroy(),h.push(s.raw({value:t.chart.createLimitationRow()}))):h.push(s.raw({value:t.chart.createContainer({h:r})})));const{customTooltipImages:g}=u.data;return t.isEnabled()&&g&&h.push(...g.map(e=>s.raw({value:t.createImageRow({value:e,h:r})}))),h}function TR({layout:e,options:t}){return e.snapshotData&&!t.freeResize?{width:e.snapshotData.content.size.w,height:e.snapshotData.content.size.h}:void 0}function NR(e){const t=e.getDataPages();if(t.length){const{qMatrix:e,qArea:n}=t[0],{qLeft:r,qTop:i,qWidth:o,qHeight:a}=n;return!(1!==t.length||e.length||r||i||o||a)}return!0}function OR(e,t={}){function n(n){const r=n===YI.SCALE.X?"qMeasureInfo.0":"qMeasureInfo.1",i=n===YI.SCALE.X?0:1;let o=e.getHyperCubeValue(`${r}.qMin`,0),a=e.getHyperCubeValue(`${r}.qMax`,1);const s=e.getLayoutValue("dataPages");if(o===a&&NR(e)&&s?.length){let{min:t,max:r}=function({layoutService:e,scaleName:t}){const n=e.getLayoutValue("dataPages"),r=t===YI.SCALE.X?0:1,i=r+2,{qMatrix:o}=n[0];let a=Number.MAX_VALUE,s=-Number.MAX_VALUE;for(let e=1;e<o.length;e++){const{qText:t}=o[e][0];a=Math.min(a,t[r],t[i]),s=Math.max(s,t[r],t[i])}return{min:a,max:s}}({layoutService:e,scaleName:n});const i=15*(r-t);r!==o&&(r+=i),t!==o&&(t-=i),o=Math.min(o,t),a=Math.max(a,r)}let l="none";const c=n===YI.SCALE.X?"xAxis":"yAxis",{autoMinMax:u,minMax:d,min:f,max:p}=e.getLayoutValue(c);if(!u)switch(l=d,d){case"min":o=f,a=Math.max(o,a);break;case"max":a=p,o=Math.min(o,a);break;default:o=Math.min(f,p),a=Math.max(f,p)}const h=e.meta.isSnapshot?e.getLayoutValue("snapshotData.content.chartData",{}):t;let m="number"==typeof h[`${c}Min`]?h[`${c}Min`]:o,g="number"==typeof h[`${c}Max`]?h[`${c}Max`]:a;if("number"==typeof h[`${c}Min`]&&"number"==typeof h[`${c}Max`])l="minMax";else if("number"==typeof h[`${c}Min`])switch(l){case"max":case"minMax":l="minMax";break;default:l="min"}else if("number"==typeof h[`${c}Max`])switch(l){case"min":case"minMax":l="minMax";break;default:l="max"}let y=(g-m)/20;switch(0===y&&(y=Math.abs(m)>0?Math.abs(m)/10:10),l){case"minMax":m===g&&(y=function({layoutService:e,value:t,measureIndex:n}){const r=n+1,i=e.getHyperCubeValue("qDataPages.0.qMatrix",[]);let o=Number.MAX_VALUE;return i.forEach(e=>{e[r].qNum!==t&&(o=Math.min(o,Math.abs(e[r].qNum-t)))}),o===Number.MAX_VALUE?0===t?10:t/10:o/2}({layoutService:e,value:m,measureIndex:i}),m-=y,g+=y);break;case"min":g+=y;break;case"max":m-=y;break;case"none":m-=y,g+=y}return{[`${c}Min`]:m,[`${c}Max`]:g,[`${c}ExplicitType`]:l}}let r=n(YI.SCALE.X),i=n(YI.SCALE.Y);return{query:{getXExtrema:()=>r,getYExtrema:()=>i},command:{updateExtrema:(e,t)=>{const{xAxisMin:n,xAxisMax:o,yAxisMin:a,yAxisMax:s}=e;r.xAxisMin=n,r.xAxisMax=o,i.yAxisMin=a,i.yAxisMax=s,t||(r.xAxisExplicitType="minMax",i.yAxisExplicitType="minMax")},resetExtrema:()=>{r=n(YI.SCALE.X),i=n(YI.SCALE.Y)}}}}function IR({layoutService:e}){return function(e){var t,n=e.layout,r=e.config,i=void 0===r?{}:r,o={disclaimer:void 0,isSuppressing:!1,showDisclaimer:null!==(t=i.args)&&void 0!==t&&t.layoutService?i.args.layoutService.getLayoutValue("showDisclaimer"):null==n?void 0:n.showDisclaimer};return{initialize:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).args;o.disclaimer=function(e){var t=e.args,n=e.disclaimers,r=[];return Object.keys(n).forEach(function(e){var i=Xn[e],o=n[e];o&&(o.condition||(null==i?void 0:i.condition)||Gn)(t)&&r.push({key:(null==i?void 0:i.translationKey)||(null==i?void 0:i.key)||e,alignment:o.alignment||(null==i?void 0:i.alignment)||Yn})}),r.find(function(e){return e.alignment===Un})||r[0]}({args:S(S({layout:n},i.args),e),disclaimers:i.disclaimers||{}}),o.isSuppressing=!(!o.disclaimer||o.disclaimer.alignment!==Un)},getDisclaimer:function(){return o.isSuppressing?o.disclaimer:!1===o.showDisclaimer?void 0:o.disclaimer},getHasSuppressingDisclaimer:function(){return o.isSuppressing}}}({config:{args:{layoutService:e},disclaimers:{NoDataExist:!0,OnlyNanData:{alignment:"center",condition:()=>e.getHyperCubeValue("qMeasureInfo").slice(0,2).some(e=>e.qMax<e.qMin||"NaN"===e.qMax)},LimitedData:{condition:()=>e.getHyperCubeValue("qSize.qcy",0)>e.meta.maxVisibleBubbles&&!e.meta.isBigData},OverviewData:{condition:()=>e.meta.isBigData}}}})}function LR({model:e,layoutService:t}){const n={properties:void 0};return{query:{getProperties:()=>n.properties},command:{initialize:()=>(({layout:e,model:t})=>ar(e,"snapshotData")?Promise.resolve(null):t.getEffectiveProperties().then(e=>({properties:e})))({layout:t.getLayout(),model:e}).then(e=>{const{properties:t}=e??{};n.properties=t})}}}function PR({layoutService:e,extremumModel:t,model:n}){const r=[];let i,o,a=0;const s={get binArray(){return r},get maxBinDensity(){return a},fetch:()=>{if(e.meta.isSnapshot){const t=e.getLayoutValue("dataPages");return t[1]&&(QP(t,r),a=t[0].qMatrix[0][0].qNum),Promise.resolve(t)}if(o)return new Promise((e,t)=>{i&&i.reject(YI.REJECTION_TOKEN),i={resolve:e,reject:t}});const{xAxisMin:l,xAxisMax:c}=t.query.getXExtrema(),{yAxisMin:u,yAxisMax:d}=t.query.getYExtrema(),{qMin:f,qMax:p}=e.getHyperCubeValue("qMeasureInfo.1",{}),h=Math.floor(Math.sqrt((p-f)/(d-u)));return o=((t,i,o,s,l)=>{const c=e.getLayout(),u=c?.compressionResolution||5,d=l?l-1:0,f=Math.min(u+d,19);return n.getHyperCubeBinnedData("/qHyperCubeDef",void 0===c?void 0:[{qTop:0,qLeft:0,qWidth:c.qHyperCube.qSize.qcx,qHeight:c.qHyperCube.qSize.qcy}],{width:0,height:0},[{qLeft:t,qTop:i,qWidth:o,qHeight:s}],e.meta.maxVisibleBubbles,f,0).then(t=>{t[0].qMatrix?.length?(e.setLayoutValue("dataPages",t),e.setDataPages([]),QP([t[0]],r),a=t[0].qMatrix[0][0].qNum):(e.setLayoutValue("dataPages",void 0),e.setDataPages([t[1]]))})})(l,d,c-l,d-u,h),o.then(()=>{if(o=null,i){const e=i;i=null,e.resolve(s.fetch())}}),o}};return s}function RR({layoutService:e,model:t,extremumModel:n}){const r=function({layoutService:e,model:t}){let n;const r={fetch(){if(e.meta.isSnapshot)return Promise.resolve(e.getDataPages());const r=2500,i=Math.min(e.meta.maxVisibleBubbles,e.meta.size.y||0),o=Math.ceil(i/r),a=[];for(let e=0;e<o;e++)a[e]={qTop:e*r,qLeft:0,qWidth:4,qHeight:r};const s=JSON.stringify(a[0]);if(n===s)return Promise.reject(YI.REJECTION_TOKEN);n=s;const l=a.map(e=>t.getHyperCubeData("/qHyperCubeDef",[e]));return Promise.all(l).then(t=>{if(t.some(e=>!e.length))return Promise.reject(YI.REJECTION_TOKEN);const n=[{qArea:{qLeft:0,qTop:0,qWidth:t[t.length-1][0].qArea.qWidth,qHeight:i},qMatrix:[],qTails:t[0][0].qTails}];return t.forEach(e=>n[0].qMatrix.push(...e[0].qMatrix)),e.setLayoutValue("dataPages",void 0),e.setDataPages(n),n})}};return r}({layoutService:e,model:t}),i=PR({layoutService:e,extremumModel:n,model:t}),o={};let a,s;const l={getMeta:()=>o,getHomeStateBins:e=>(e&&(s=i.binArray.slice()),s),get binArray(){return i.binArray},get maxBinDensity(){return i.maxBinDensity},fetch:()=>(a=e.meta.isBigData?i.fetch():r.fetch(),a.then(()=>{o.isBinnedData=NR(e),o.isLargeNumBubblesFromBigData=function(e){const t=e.getDataPages();if(t.length){const{qMatrix:n,qArea:r}=t[0],{qLeft:i,qTop:o,qWidth:a,qHeight:s}=r;return!!(1!==t.length||n.length||i||o||a||s)&&n.length>e.meta.largeNumDataPoints}return!1}(e),function({layoutService:e}){const t=e.getDataPages(),n=e.getLayoutValue("plugins",[]);if(!n||0===n.length)return;let r=[];n.forEach(e=>{const{type:n}=e;r="point"===n?[e]:e.points||[],r.forEach(e=>{(({point:e,dataPages:t})=>{["x","y"].forEach(n=>{const r=e[`${n}DimensionValue`],i=e[`${n}MeasureValue`];if(void 0!==i)e[`${n}Value`]=i;else if(t.length>0){const i=t[0].qMatrix.find(e=>e[0].qText===r);e[`${n}Value`]=i?"x"===n?i[1].qNum:i[2].qNum:null}else e[`${n}Value`]=null})})({point:e,dataPages:t})})})}({layoutService:e})}).catch(e=>{if(e!==YI.REJECTION_TOKEN)throw e}),a)};return l}var zR={STROKE:{COLOR:"#ffffff",ALPHA:"1",WIDTH:{DEFAULT:.5,NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}};const FR=({core:t,flags:n})=>{const r=e.useStaleLayout(),i=e.useTheme(),o=e.useModel(),a=e.useTranslator(),s=e.useOptions(),l=e.useRect(),c=e.useSelections(),u=e.useApp(),{qLocaleInfo:d,qUnsupportedFeatures:f}=e.useAppLayout(),p=e.usePlugins(),[h,m]=e.useState(),[g,y]=e.useState(),v=e.useEmbed();return e.useConstraints(),e.useEffect(()=>{if(!t)return()=>{};const{chart:e,actions:n}=t,r=iR({chart:e,actions:n,selections:c});return m(r),()=>{r.destroy(),r.destroyLazySelection()}},[t]),e.useEffect(()=>{if(!r||!h)return;const{picassoInstance:e,chart:c,actions:m,viewState:g,viewCache:x,progressive:w}=t,M="rtl"===s.direction,E=function(e){var t=e.source,n=e.metaAdditionsFn,r=e.experimental,i=void 0===r?{filter:!1}:r,o=ct(!0,{},t),a=i.filter?function(e){var t=e.qHyperCube,n=fr(t,dr.DIMENSION),r=n.reduced,i=n.filtered;t[dr.DIMENSION]=r;var o=fr(t,dr.MEASURE),a=o.reduced,s=o.filtered;return t[dr.MEASURE]=a,{dimensions:i,measures:s}}(o):{dimensions:[],measures:[]},s=hr(o),l=function(){var e=function(e){var t=e.layout,n=e.additionsFn,r=void 0===n?function(){return{}}:n,i=e.additionsProps,o=void 0===i?{}:i,a=t.qHyperCube,s=a.qDimensionInfo,l=a.qMeasureInfo,c=a.qMode,u=s.length,d=l.length,f=S({mode:{S:"S"===c,P:"P"===c,K:"K"===c,T:"T"===c},dimensionCount:u,measureCount:d,hasMultipleDimensions:u>1,hasMultipleMeasures:d>1,isOneDimensional:1===u,isTwoDimensional:2===u},o);return S(S({},f),r({layout:t,meta:f}))}({layout:o,additionsFn:n,additionsProps:{size:s.size}});return e.filteredFields=a,e},c={refs:S({},s.refs),meta:l(),getLayout:function(){return o},getLayoutValue:function(e,t){return ar(o,e,t)},setLayoutValue:function(e,t){lr(o,e,t),s=hr(o),c.meta=l()},getHyperCube:function(){return o.qHyperCube},getHyperCubeValue:function(e,t){return ar(o.qHyperCube,e,t)},setHyperCubeValue:function(e,t){lr(o.qHyperCube,e,t),s=hr(o),c.meta=l()},getDataPages:function(){return ar(o,s.refs.dataPages)},setDataPages:function(e){lr(o,s.refs.dataPages,e),c.meta=l()}};return c}({source:r,metaAdditionsFn:ZI(0,f)}),q=function(e){var t,n=e.app,r=e.translator,i={initialized:!1,dimensions:[],measures:[]};return{initialize:(t=b(k().m(function e(t){var o,a,s,l,c,u,d;return k().w(function(e){for(;;)switch(e.n){case 0:if(o=t.properties,!i.initialized){e.n=1;break}return e.a(2);case 1:return s=[rt(a={app:n,translator:r,properties:o}),at(a)],e.n=2,Promise.all(s);case 2:l=e.v,c=C(l,2),u=c[0],d=c[1],i.dimensions=u,i.measures=d,i.initialized=!0;case 3:return e.a(2)}},e)})),function(e){return t.apply(this,arguments)}),getAlternatives:function(){return{dimensions:A(i.dimensions),measures:A(i.measures)}}}}({app:u,translator:a}),_=function({layoutService:e,options:t}){return{shouldUseProgressive:()=>!1!==t?.progressiveRendering&&(e=>{const{isBigData:t,largeNumDataPoints:n,isLargeNumDataPoints:r}=e.meta;return t?(e=>{const t=e.getDataPages();if(t.length){const{qMatrix:e,qArea:n}=t[0],{qLeft:r,qTop:i,qWidth:o,qHeight:a}=n;return 1!==t.length||e.length||r||i||o||a?e.length:0}return 0})(e)>n:r})(e)}}({layoutService:E,options:s}),T=TR({layout:E.getLayout(),options:s}),N=or({chart:c,layoutService:E,config:{logicalSize:T||l,rtl:M},typeConfig:{type:"x-y"}}),O=function(e){var t=e.theme,n=e.config,r=void 0===n?{}:n,i=r.id,o=r.resolve,a=void 0===o?[]:o,s=r.transform,l=void 0===s?[]:s,c=r.extend,u=void 0===c?[]:c,d={theme:t,matrix:Do(a),styles:void 0};return d.styles=To({theme:t,id:i,transform:l,extend:u,matrix:d.matrix}),{getStyles:function(){return d.styles},getTheme:function(){return d.theme},setTheme:function(e){d.theme=e,d.styles=To({theme:e,id:i,transform:l,extend:u,matrix:d.matrix})}}}({theme:i,config:{id:"scatterPlot",resolve:[["object","plugins.label","fontFamily",'"Source Sans Pro", "Arial", "sans-serif"'],["object","plugins.label","fontSize","12px"]]}}),I=function(e){return{layout:e.getLayout(),keys:{SCALE:{X:YI.SCALE.X,Y:YI.SCALE.Y},COMPONENT:{X_AXIS:YI.COMPONENT.X_AXIS,Y_AXIS:YI.COMPONENT.Y_AXIS,POINT:YI.COMPONENT.POINT}}}}(E),L=function(e){var t=e.picassoInstance,n=e.plugins,r=e.pluginArgs,i=void 0===r?{}:r,o={initialized:!1,definitions:[]};return{initialize:function(){return b(k().m(function e(){var r,a,s,l;return k().w(function(e){for(;;)switch(e.n){case 0:if(!o.initialized){e.n=1;break}return e.a(2);case 1:return a=Promise.all(n.filter(function(e){return"custom-component"===e.info.type}).map(function(){var e=b(k().m(function e(n){var r;return k().w(function(e){for(;;)switch(e.n){case 0:if(n.info.componentName){e.n=1;break}throw new Error("plugin-service: Custom component is missing componentName");case 1:return e.n=2,n.fn(S({},i));case 2:if("object"===D(r=e.v)){e.n=3;break}throw new Error("plugin-service: Custom component needs to be an object");case 3:t.component(n.info.componentName,r);case 4:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}())),s=Promise.all(n.filter(function(e){return"component-definition"===e.info.type}).map(function(e){return e.fn(S({},i))})),e.n=2,Promise.all([a,s]);case 2:l=e.v,o.initialized=!0,(r=o.definitions).push.apply(r,A(l[1]));case 3:return e.a(2)}},e)}))()},extendComponents:function(e){return o.initialized?(o.definitions.filter(Boolean).forEach(function(t){var n=C(e.filter(function(e){return e.key&&e.key===t.key}),1)[0];if(n){var r=ct(!0,{},n.brush);ct(!0,n,t),t.brush&&(n.brush=function(e,t){return"object"===D(e)&&Object.keys(e).length?(Array.isArray(t.consume)&&(e.consume=mr({originalArray:e.consume,newArray:t.consume,matchKey:"context"})),Array.isArray(t.trigger)&&(e.trigger=mr({originalArray:e.trigger,newArray:t.trigger,matchKey:"on"})),e):t}(r,t.brush))}else e.push(t)}),e):e}}}({picassoInstance:e,plugins:p,pluginArgs:I}),P=OR(E,s.viewState),R=RR({layoutService:E,model:o,extremumModel:P}),z=function({localeInfo:e,app:t,chart:n,theme:r,translator:i,model:o,layoutService:a,picasso:s,dataHandler:l}){let c;const u=a.getHyperCube(),d=u.qDimensionInfo.some(e=>e.baseColor||e.coloring&&e.coloring.baseColor),f=d?"dimension":void 0,p=a.getLayoutValue("legend.show",!0);return c=Wn({picasso:s,model:o,app:t,translator:i,layoutService:a,createConfig:()=>({theme:r,colorProps:{measureOverrides:void 0,useBaseColors:"dimension"===a.getLayoutValue("color.useBaseColors")&&d?"dimension":"off"},legendProps:{...a.getLayoutValue("legend"),show:()=>p&&!l.getMeta().isBinnedData},hc:u,key:YI.SCALE.COLOR}),config:{localeInfo:e,auto:()=>({mode:"primary",useBaseColors:f??"off",paletteColor:null})},custom:{updateBrushAliases:()=>{const e=c.getSettings().field,t=n.brush("selection");/qAttrDimInfo/.test(e)&&(t.removeKeyAlias(`${YI.DATA.LEGEND}/${e}`),t.removeKeyAlias("attrDim/qDimensionInfo/0"),t.addKeyAlias("attrDim/qDimensionInfo/0",`qHyperCube/${e}`))}}}),c}({localeInfo:d,app:u,chart:c,theme:i,translator:a,model:o,layoutService:E,picasso:e,dataHandler:R}),F=function({layoutService:e,themeService:t,flags:n,colorService:r}){const i=t.getStyles(),o=t=>n.isEnabled("CLIENT_IM_3050")||n.isEnabled("CLIENT_IM_3051")?e.getLayoutValue("components",[])?.find(e=>e.key===t):void 0;return{query:{outline:{getStyle:()=>({strokeWidth:o("outline")?.strokeWidth?zR.STROKE.WIDTH[o("outline")?.strokeWidth.toUpperCase()]:zR.STROKE.WIDTH.DEFAULT,strokeColor:o("outline")?.strokeColor?r?.getPaletteColor(o("outline")?.strokeColor):zR.STROKE.COLOR,strokeOpacity:o("outline")?.strokeColor?o("outline")?.strokeColor.alpha:zR.STROKE.ALPHA})},referenceLine:{label:{getStyle:()=>({fill:i.referenceLine.label.name.color,fontSize:i.referenceLine.label.name.fontSize,fontFamily:i.referenceLine.label.name.fontFamily})}},axis:{title:{getStyle:()=>({fontFamily:o("axis")?.axis?.title?.fontFamily??i.axis.title.fontFamily,fontSize:o("axis")?.axis?.title?.fontSize??i.axis.title.fontSize,color:o("axis")?.axis?.title?.color?r?.getPaletteColor(o("axis")?.axis?.title?.color):i.axis.title.color})},label:{getStyle:()=>({fill:o("axis")?.axis?.label?.name?.color?r?.getPaletteColor(o("axis")?.axis?.label?.name?.color):i.axis.label.name.color,fontSize:o("axis")?.axis?.label?.name?.fontSize??i.axis.label.name.fontSize,fontFamily:o("axis")?.axis?.label?.name?.fontFamily??i.axis.label.name.fontFamily})}},label:{getStyle:()=>({fill:o("label")?.label?.value?.color?r?.getPaletteColor(o("label")?.label?.value?.color):i.label.value.color,fontSize:o("label")?.label?.value?.fontSize??i.label.value.fontSize,fontFamily:o("label")?.label?.value?.fontFamily??i.label.value.fontFamily})},legend:{title:{getStyle:()=>({fontFamily:o("legend")?.legend?.title?.fontFamily??i.legend.title.fontFamily,fontSize:o("legend")?.legend?.title?.fontSize??i.legend.title.fontSize,color:o("legend")?.legend?.title?.color?r?.getPaletteColor(o("legend")?.legend?.title?.color):i.legend.title.color})},label:{getStyle:()=>({fontFamily:o("legend")?.legend?.label?.fontFamily??i.legend.label.fontFamily,fontSize:o("legend")?.legend?.label?.fontSize??i.legend.label.fontSize,color:o("legend")?.legend?.label?.color?r?.getPaletteColor(o("legend")?.legend?.label?.color):i.legend.label.color})}}}}}({layoutService:E,themeService:O,flags:n,colorService:z});let j,V;const H=function({chart:e,colorService:t,animationsEnabled:n,layoutService:r,translator:i,viewState:o}){return Ta({layoutService:r,getMinMax:({measureIndex:e})=>{const{xAxisMin:t,xAxisMax:n,yAxisMin:r,yAxisMax:i}=o.get("dataView");return 1===e?{min:t,max:n}:{min:r,max:i}},colorService:t,chart:e,translator:i,orientation:"horizontal",keys:{majorScale:YI.SCALE.X,minorScale:YI.SCALE.Y,trendlines:YI.COMPONENT.TRENDLINES},isEnabled:()=>!0,animations:{enabled:n,trackBy:e=>e.data.layer.value,compensateForLayoutChanges({currentNodes:e,currentRect:t,previousRect:n}){if(t.x!==n.x){const r=t.x-n.x,i=t.y-n.y;e.forEach(e=>{const t="x"===e.major.p?r/e.major.size:i/e.major.size,n="y"===e.minor.p?i/e.minor.size:r/e.minor.size;e.points.forEach(e=>{e.modified||(e.major-=t,e.minor-=n,e.minor0-=n,e.modified=!0)})})}}}})}({chart:c,colorService:z,animationsEnabled:()=>j.query.animationsEnabled(),layoutService:E,translator:a,viewState:g}),B=LR({model:o,layoutService:E}),$=CR({flags:n,layout:r,app:u,model:o,picasso:e,chart:c,translator:a,embed:v,options:s});j=nL({chart:c,localeInfo:d,layoutService:E,largeDataService:_,viewState:g,viewCache:x,colorService:z,extremumModel:P,dataHandler:R,trendLinesService:H,actions:m,progressive:w,getCurrentYTicks:()=>V.query.getCurrentYTicks(),getYTicks:()=>V.query.getYTicks(),options:s});const W=function({chart:e,actions:t,translator:n,rtl:r,layoutService:i,colorService:o,themeService:a,trendLinesService:s,propertiesModel:l,chartModel:c,custom:u}){const{fontFamily:d}=a.getStyles(),f=["x","y",!!i.meta.hasSizeMeasure&&"size"].filter(Boolean),p=c.query.getViewHandler();return ua({chart:e,translator:n,config:{rtl:r,enable:()=>t.tooltip.enabled()&&!p.getInteractionInProgress(),getColorSettings:()=>o.getSettings(),style:{fontFamily:d},main:{key:YI.COMPONENT.TOOLTIP,getGroupByValue:({data:e})=>e.value,collectibles:[{key:YI.COMPONENT.POINT,type:"point"},{key:YI.COMPONENT.HEAT_MAP,type:"point"}],triggers:[{keys:[YI.COMPONENT.POINT],distance:3,collect:{from:"radius",distance:3},placement:"collectible"},{keys:[YI.COMPONENT.HEAT_MAP],distance:1,collect:{from:"single"},placement:"collectible"},{keys:[YI.COMPONENT.TRENDLINES],distance:3,collect:{from:e=>s.collectNodes(e)},placement:({collected:e})=>e[0]}],section:({h:e,nodes:t,dataset:r,meta:i,create:o,util:a})=>_R({translator:n,custom:u,measureProperties:f,h:e,nodes:t,dataset:r,meta:i,create:o,util:a,trendLinesService:s}),layout:{grouping:!0,single:({meta:e})=>!(e.triggerer!==YI.COMPONENT.POINT||!(u.isEnabled()&&u.hasImages()||u.chart.isEnabled()))},events:{tooltip:{beforeShow:({collectNodes:e,meta:t})=>t.triggerer===YI.COMPONENT.POINT&&u.isEnabled()&&u.hasImages()?u.addImages({nodes:e()}):Promise.resolve(),afterShow:({nodes:e,meta:t})=>{t.triggerer===YI.COMPONENT.POINT&&u.chart.isEnabled()&&!u.chart.hasLimitation()&&u.chart.show({nodes:e,properties:l.query.getProperties()})}},interaction:{mouseleave:()=>{u.chart.isEnabled()&&u.chart.hasAlternateState()&&u.chart.hide()}}}},legend:{keys:{tooltip:YI.COMPONENT.LEGEND_CAT_TOOLTIP,component:YI.COMPONENT.LEGEND_CATEGORICAL}}}})}({chart:c,actions:m,translator:a,rtl:M,layoutService:E,colorService:z,themeService:O,trendLinesService:H,propertiesModel:B,chartModel:j,custom:$});V=JP({layoutService:E,dockService:N,extremumModel:P,themeService:O,chartModel:j,chart:c});const U=IR({layoutService:E});h.setLayout(E.getLayout()),y({alternativeService:q,layoutService:E,largeDataService:_,tickModel:V,chartModel:j,dockService:N,selectionService:h,themeService:O,pluginService:L,disclaimerService:U,colorService:z,extremumModel:P,tooltipService:W,propertiesModel:B,trendLinesService:H,app:u,styleModel:F})},[o,u,h,r,i.name(),a.language(),s.direction,s.viewState,f]),g};function jR(e){const t=oR.CUSTOM.EXPRESSION,{qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}=e.qDef;return e.qLibraryId?{qLibraryId:e.qLibraryId,id:t,qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}:{qExpression:e.qDef.qDef,id:t,qNumFormat:n,qLabel:r,qLabelExpression:i,cId:o}}function VR(e){const t=e.qHyperCubeDef?.qDimensions;return t[t.length-1].qAttributeExpressions||[]}const HR={migrateProperties(e){const t=TI(!0,{},e),n=t.tooltip?.data?.qHyperCubeDef?.qMeasures||[];let r=VR(t);return r=function(e,t){return t.concat(e.map(e=>jR(e)))}(n,r),function(e,t){const n=t.qHyperCubeDef?.qDimensions;n[n.length-1].qAttributeExpressions=e}(r,t),delete t.tooltip?.data,t},getPatches(e){const t=e.tooltip?.data?.qHyperCubeDef?.qMeasures||[],n=e.qHyperCubeDef.qDimensions.length-1,r=function(e,t,n){let r=e.length;const i=[];return t.forEach(e=>{const t=jR(e),o=JSON.stringify(t);i.push({qPath:`/qHyperCubeDef/qDimensions/${n}/qAttributeExpressions/${r}`,qOp:"add",qValue:o}),r++}),i.push({qPath:"/tooltip/data",qOp:"remove"}),i}(VR(e),t,n);return r},checkForBackwardCompatibility:(e,t)=>(e.qMeasureInfo||[]).length>0&&t.length>0,updateProperties(e,t){const n=new Promise(n=>{const r=t.qHyperCube?.qDimensionInfo||[],i=t.tooltip?.data?.qHyperCube||{},o=t.qMeta?.privileges?.includes("update");e&&e.getEffectiveProperties&&this.checkForBackwardCompatibility(i,r)&&e.getEffectiveProperties().then(t=>{if(o){const r=this.migrateProperties(t);e.setProperties(r).then(()=>{e.app.clearUndoBuffer(),n(!0)})}else{const r=this.getPatches(t);e.applyPatches(r,!0).then(()=>{e.app.clearUndoBuffer(),n(!0)})}}),n(!1)});return n}};var BR={attrExpr:HR};function $R(e,t,n,r){const i=t.qHyperCube?.[n]?.[r]?.qAttrExprInfo||[],o=[],a=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return a?(i.forEach((e,t)=>{const i=a.qValues&&a.qValues[t]?a.qValues[t]:void 0,s=void 0===i?"NaN":function(e,t){let n;switch(e.id){case oR.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case oR.CUSTOM.TITLE:case oR.CUSTOM.DESCRIPTION:case oR.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,i);o.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:s,value:"value"})}),o):o}const WR={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>$R(t,e,r,n)}}};var UR={X:"XSMALL",Y:"XSMALL"},YR={X:"SMALL",Y:"SMALL"},XR="XSMALL",GR="XSMALL",KR="XSMALL",ZR="SPARK",JR="XSMALL",QR="MEDIUM",ez="SMALL";const tz=0,nz=1,rz=3;function iz(e,t){const{layoutService:n,themeService:r}=e,{auto:i,spacing:o}=n.getLayoutValue("gridLine",{});if(!i&&o===tz)return!1;const{line:a}=r.getStyles().grid,s={key:YI.COMPONENT.GRID_LINES,type:"grid-line",x:{scale:YI.SCALE.X},y:{scale:YI.SCALE.Y},layout:{minimumLayoutMode:KR},preferredSize:()=>({edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!(!i&&o===nz)||((e,t)=>0===e?.datum?.value||t%2==0),stroke:e=>0===e?.datum?.value?a.highContrast.color:a.major.color,strokeWidth:1},minorTicks:{show:!i&&o===rz,stroke:a.minor.color,strokeWidth:1},animations:{enabled:t,trackBy:e=>`${e.dir}: ${e.value}`,compensateForLayoutChanges({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;e.forEach(e=>{e.y1===e.y2?(e.x2=e.x1+t.width,e.y1-=i,e.y2-=i):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=r,e.x2-=r)})}}};return s}function oz(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?void 0:"svg"}function az({models:e,animationsEnabled:t}){const{layoutService:n,dockService:r,themeService:i,chartModel:o,styleModel:a}=e,{xAxis:s,yAxis:l}=n.getLayout(),c=i.getStyles(),u=a.query.axis.label.getStyle(),d=o.query.getViewHandler(),f=(e,t)=>0===t?"axis":"text"===e.type?`label: ${e.tickValue}`:`mark: ${e.tickValue}`,p=oz(),h=!(!s||"none"===s.show)&&{type:"axis",key:YI.COMPONENT.X_AXIS,renderer:p,scale:YI.SCALE.X,layout:{dock:r.meta.x.dock,minimumLayoutMode:UR.X},settings:{labels:{show:"title"!==s.show,fontFamily:u.fontFamily,fontSize:u.fontSize,fill:u.fill},line:{stroke:c.axis.line.major.color},ticks:{stroke:c.axis.line.major.color},minorTicks:{stroke:c.axis.line.minor.color},paddingEnd:KI.AXIS.X.PADDING.END},animations:{enabled:t,trackBy:f,compensateForLayoutChanges({currentNodes:e,currentRect:t,previousRect:n}){if(t.width!==n.width){const r=t.x-n.x,i=t.width-n.width;e[0].x1+=r,e[0].x2+=r+i}}}},m=!(!l||"none"===l.show)&&{type:"axis",key:YI.COMPONENT.Y_AXIS,renderer:p,scale:YI.SCALE.Y,layout:{dock:r.meta.y.dock,minimumLayoutMode:UR.Y},settings:{labels:{show:"title"!==l.show,fontFamily:u.fontFamily,fontSize:u.fontSize,fill:u.fill},line:{stroke:c.axis.line.major.color},ticks:{stroke:c.axis.line.major.color,show:"title"!==l.show},minorTicks:{stroke:c.axis.line.minor.color},paddingEnd:()=>"title"===l.show||!1===d.getMeta().isHomeState?0:KI.AXIS.Y.PADDING.END},animations:{enabled:t,trackBy:f,compensateForLayoutChanges({currentNodes:e,currentRect:t,previousRect:n}){if("right"===r.meta.y.dock)return;const i=t.width-n.width;e.forEach(e=>{"line"===e.type?(e.x1+=i,e.x2+=i,e.x1===e.x2&&(e.y1=t.y,e.y2=e.y1+t.height)):"text"===e.type&&(e.x+=i)})}}};return[h,m]}function sz({alternativeService:e,app:t,constraints:n,dockService:r,layoutService:i,model:o,rtl:a,selectionService:s,styleModel:l,translator:c,viewCache:u}){const d=i.getLayoutValue("xAxis");if(!d)return!1;const{show:f}=d;if("all"!==f&&"title"!==f)return!1;const p=e.getAlternatives(),h=l.query.axis.title.getStyle();return{type:"axis-title",key:YI.COMPONENT.X_AXIS_TITLE,renderer:"react-qcm",layout:{dock:r.meta.x.dock,minimumLayoutMode:YR.X},data:{infos:[{...i.getHyperCubeValue("qMeasureInfo.0"),explicitColumn:0}],alternatives:p.measures},resources:{app:t,cache:u,model:o,selections:s.getSelectionsObject(),translator:c},callbacks:{onChange:()=>{}},settings:{isDisabled:()=>n.active,isRTL:a,isSnapshot:i.meta.isSnapshot,noModelDependencies:!0,skipAttributeExpressions:!1,type:"measure"},style:{title:{color:h.color,fontFamily:h.fontFamily,fontSize:h.fontSize}}}}function lz({alternativeService:e,app:t,constraints:n,dockService:r,layoutService:i,model:o,rtl:a,selectionService:s,styleModel:l,translator:c,viewCache:u}){const d=i.getLayoutValue("yAxis");if(!d)return!1;const{show:f}=d;if("all"!==f&&"title"!==f)return!1;const p=e.getAlternatives(),h=l.query.axis.title.getStyle();return{type:"axis-title",key:YI.COMPONENT.Y_AXIS_TITLE,renderer:"react-qcm",layout:{dock:r.meta.y.dock,minimumLayoutMode:YR.Y},data:{infos:[{...i.getHyperCubeValue("qMeasureInfo.1"),explicitColumn:1}],alternatives:p.measures},resources:{app:t,cache:u,model:o,selections:s.getSelectionsObject(),translator:c},callbacks:{onChange:()=>{}},settings:{isDisabled:()=>n.active,isRTL:a,isSnapshot:i.meta.isSnapshot,noModelDependencies:!0,skipAttributeExpressions:!1,type:"measure"},style:{title:{color:h.color,fontFamily:h.fontFamily,fontSize:h.fontSize}}}}function cz({core:e,models:t,context:n}){const{viewCache:r}=e,{alternativeService:i,app:o,layoutService:a,dockService:s,selectionService:l,styleModel:c}=t,{translator:u,constraints:d,rtl:f,model:p}=n,h={alternativeService:i,app:o,constraints:d,dockService:s,layoutService:a,model:p,rtl:f,selectionService:l,styleModel:c,translator:u,viewCache:r};return[sz(h),lz(h)]}var uz={getDotRadius({sizeDataMin:e,minDotSize:t,sizeDataMax:n,maxDotSize:r,value:i}){if(Number.isNaN(+i)||null===i)return NaN;if(e===n)return(t+r)/2;if(i<=e)return t;if(i>=n)return r;const o=(i-e)/(n-e);return t+(r-t)*Math.sqrt(o)},getDotMeasureSize({sizeDataMin:e,minDotSize:t,sizeDataMax:n,maxDotSize:r,value:i,windowSizeMultiplier:o}){const a=this.getDotRadius({sizeDataMin:e,minDotSize:t,sizeDataMax:n,maxDotSize:r,value:i});return`${Math.ceil(a*o*KI.DIAMETER_OVER_RADIUS)}px`},getDotSize:({dotSize:e,windowSizeMultiplier:t})=>`${Math.ceil(e*t*KI.DIAMETER_OVER_RADIUS)}px`};function dz(e){const{qMin:t,qMax:n}=e.getHyperCubeValue("qMeasureInfo.2",{}),[r,i]=e.getLayoutValue("dataPoint.rangeBubbleSizes")||[],o=e.getLayoutValue("dataPoint.bubbleSizes");return e.meta.hasSizeMeasure?(e,o)=>{const{value:a}=e.datum?.size||e.size||{};if("NaN"!==a&&void 0!==a)return uz.getDotMeasureSize({sizeDataMin:t,sizeDataMax:n,minDotSize:r,maxDotSize:i,value:a,windowSizeMultiplier:o})}:(e,t)=>uz.getDotSize({dotSize:o,windowSizeMultiplier:t})}const fz=e=>e.meta.isBigData||e.meta.isLargeNumDataPoints?"lazySelection":"selection";function pz({layoutService:e,largeDataService:t,chartModel:n}){const r=(e,t)=>{return n=t.length,Math.max(.2,2-Math.max(0,(n||0)-1e3)/2e3);var n},i=(e,t)=>{return n=t.length,`#000000${Math.floor(255*Math.max(.3,1-Math.max(0,(n||0)-1e3)/5e3)).toString(16)}`;var n};return{consume:[{data:({brush:e})=>e.brushes().length>1?["x","y"]:void 0,context:fz(e),mode:"and",style:{inactive:{opacity:.3},active:{stroke:e.meta.isBigData||e.meta.isLargeNumDataPoints?i:"#000",strokeWidth:e.meta.isBigData||e.meta.isLargeNumDataPoints?r:2}}}],sortNodes:({nodes:t,config:n})=>{const r=n.consume[0]?.style?.active?.opacity||1,i=t.filter(e=>e.opacity===r),o=t.filter(e=>e.opacity!==r);return e.meta.hasSizeMeasure&&(i.sort((e,t)=>t.r-e.r),o.sort((e,t)=>t.r-e.r)),o.concat(i)},customRender:({render:e,nodes:r})=>{t.shouldUseProgressive()?n.command.brush({render:e,nodes:r}):e(r)}}}function hz({nodeData:e,compSize:t,chart:n,sizeScaleFn:r,viewHandler:i}){const o=t||n.component(YI.COMPONENT.POINT).rect;if(!o)return!0;const{height:a,width:s}=o,l=Math.min(a,s)/KI.WINDOW_SIZE_BASE,c=parseInt(r(e,l)||"8px",10),{xAxisMin:u,xAxisMax:d,yAxisMin:f,yAxisMax:p}=i.getDataView(),h=c*(d-u)/(2*s),m=c*(p-f)/(2*a);return e.x.value<u-h||e.x.value>d+h||e.y.value<f-m||e.y.value>p+m}function mz({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{switch(e.type){case"circle":e.cx-=r,e.cy-=i;break;case"path":e.d=function(e,t,n,r=!0){const i=e.replace(/[MLZ]/g,"").split(" ").filter(e=>e.length>0).map(parseFloat),o=[];for(let e=0;e<i.length/2;e++)o.push({x:i[2*e],y:i[2*e+1]});o.forEach(e=>{e.x+=t,e.y+=n});let a="";for(let e=0;e<o.length;e++){const t=o[e];a+=0===e?`M${t.x} ${t.y}`:`L${t.x} ${t.y}`,a+=" "}return r&&(a+="Z"),a}(e.d,-r,-i);break;case"rect":e.x-=r,e.y-=i}})}function gz(e,t){const n=e.replace("#","");return`rgb(${parseInt(n.substring(0,2),16)},${parseInt(n.substring(2,4),16)},${parseInt(n.substring(4,6),16)},${t})`}function yz({models:e,chart:t,animationsEnabled:n}){const{layoutService:r,largeDataService:i,colorService:o,chartModel:a,styleModel:s}=e;let l,c;const u=dz(r),d=a.query.getViewHandler(),f=a.query.getDataHandler(),{transform:p}=d,h=s.query.outline.getStyle();return{key:YI.COMPONENT.POINT,type:"point",data:{collection:YI.COLLECTION.MAIN},show:()=>!f.getMeta().isBinnedData,brush:pz({layoutService:r,largeDataService:i,chartModel:a}),settings:{show:e=>!hz({nodeData:e.datum,compSize:l,chart:t,sizeScaleFn:u,viewHandler:d}),x:{scale:YI.SCALE.X},y:{scale:YI.SCALE.Y},size:e=>u(e,c)||"8px",fill:o.getColor(),strokeWidth:h.strokeWidth,stroke:gz(h.strokeColor,h.strokeOpacity),shape:e=>u(e,c)?"circle":"saltire"},beforeRender:({size:e})=>{l=e,c=Math.min(e.height,e.width)/KI.WINDOW_SIZE_BASE},animations:{enabled:n,isMainComponent:!0,compensateForLayoutChanges:mz},rendererSettings:{transform:p,canvasBufferSize:e=>({width:e.computedPhysical.width+100,height:e.computedPhysical.height+100}),progressive:()=>a.query.getMeta().progressive}}}function vz(){let e;return{consume:[{data:({brush:t})=>{const n=t.brushes();return e="range"===n[0]?.type,n.length>1?["x","y"]:void 0},context:"selection",mode:"and",style:{inactive:{opacity:.3},active:{strokeWidth:()=>e?0:2,stroke:()=>e?void 0:"#000",opacity:()=>e?.3:1}}}]}}function bz(e,t){const n=e.query.getViewHandler(),{transform:r}=n,i=e.query.getDataHandler();let o,a;return{key:YI.COMPONENT.HEAT_MAP,type:"point",data:{extract:{source:YI.DATA.BIN,field:YI.FIELDS.BIN,props:{x:{field:YI.FIELDS.BIN_X},y:{field:YI.FIELDS.BIN_Y},binDensity:{field:YI.FIELDS.BIN_DENSITY},selectionDimension:{field:YI.FIELDS.BIN}}}},show:()=>i.getMeta().isBinnedData,brush:vz(),settings:{x:{scale:YI.SCALE.BIN_X},y:{scale:YI.SCALE.BIN_Y},fill:{scale:YI.SCALE.HEAT_MAP_COLOR,fn:e=>e.scale(e.datum.binDensity.value)},strokeWidth:0,shape:()=>({type:"rect",width:o,height:a})},beforeRender:({size:e})=>{const t=n.getDataView(),r=i.binArray;if(r.length){const n=r[0],i=Math.abs(n.qText[0]-n.qText[2]),s=Math.abs(n.qText[1]-n.qText[3]);o=Math.max(1,i*e.width/(t.xAxisMax-t.xAxisMin)),a=Math.max(1,s*e.height/(t.yAxisMax-t.yAxisMin))}},animations:{enabled:t,isMainComponent:!0,trackBy:()=>Math.random(),compensateForLayoutChanges:mz},rendererSettings:{transform:r,canvasBufferSize:e=>({width:e.computedPhysical.width+100,height:e.computedPhysical.height+100})}}}function xz({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach(e=>{switch(e.type){case"text":case"rect":e.x-=r,e.y-=i;break;case"line":e.x1-=r,e.x2-=r,e.y1-=i,e.y2-=i}})}function wz({themeService:e,chartModel:t,picasso:n,context:r,animationsEnabled:i}){const o=n.formatter("q-number"),a=e.getStyles(),{fontFamily:s,numFontSize:l}=a.label?.value||{},c=t.query.getViewHandler(),{transform:u}=c,d={type:"labels",key:YI.COMPONENT.HEAT_MAP_LABELS,renderer:oz(),layout:{minimumLayoutMode:GR},settings:{sources:[{component:YI.COMPONENT.HEAT_MAP,selector:"rect",strategy:{type:"bar",settings:{direction:"up",orientation:"horizontal",fontSize:l,fontFamily:s,labels:[{label:({node:e})=>o("#.#",void 0,void 0,"U")(e.data.binDensity.value),placements:[{position:"inside",fill:({node:e})=>r.theme.getContrastingColorTo(e.attrs.fill),onBackground:!1,justify:.5}]}]}}}]},animations:{enabled:i,trackBy:()=>Math.random(),compensateForLayoutChanges:xz},rendererSettings:{transform:u,canvasBufferSize:e=>({width:e.computedPhysical.width+100,height:e.computedPhysical.height+100})}};return d}const Sz="#E6E6E6",Mz="#595959";function kz(e){return function(e){return cP(e).l<70}(e)?{backgroundColor:Mz,color:Sz}:{backgroundColor:Sz,color:Mz}}const Ez={referenceLine:{label:{name:{fontFamily:"Source Sans Pro, sans-serif",fontSize:"12px"}},outOfBounds:{backgroundColor:"#737373",color:"#e6e6e6",fontFamily:"Source Sans Pro, sans-serif",fontSize:"10px"}}};function Cz({models:e,context:t,scale:n,key:r,minimumLayoutMode:i,animationsEnabled:o}){const{colorService:a,layoutService:s,themeService:l,styleModel:c}=e,{rtl:u}=t,d=l.getTheme(),f=l.getStyles(),p=n===YI.SCALE.X?"refLine.refLinesX":"refLine.refLinesY",h=s.getLayoutValue(p).filter(e=>!1!==e.show&&0!==e.show&&"0"!==e.show);if(!h.length)return!1;const m=TI(!0,{},Ez,f),g=c.query.referenceLine.label.getStyle(),y=((e,t)=>t.getStyle("object","referenceLine","outOfBounds")?e.referenceLine.outOfBounds:kz(t.getStyle("object","","color")))(m,d),v={resolveUIColor:a.getPaletteColor},b={key:r,type:"ref-line",renderer:"svg",layout:{minimumLayoutMode:i},lines:{y:[],x:[]},style:{label:{fontFamily:g.fontFamily,fontSize:g.fontSize},oob:{width:KI.REF_LABELS.OOB.SIZE,fill:y.backgroundColor,text:{fontFamily:m.referenceLine.outOfBounds.fontFamily,fontSize:m.referenceLine.outOfBounds.fontSize,fill:y.color,background:{fill:y.backgroundColor}},padding:{x:7,y:5}}},animations:{enabled:o,compensateForLayoutChanges({currentNodes:e,currentRect:t,previousRect:r}){switch(n){case YI.SCALE.X:if(t.x!==r.x){const n=t.x-r.x;e.forEach(e=>{e.x1-=n,e.x2-=n})}break;case YI.SCALE.Y:if(t.width!==r.width){const n=t.width-r.width;e.forEach(e=>{e.x2+=n})}}}}};return h.forEach(e=>{const t=!(n!==YI.SCALE.Y||!e.slope),r=v.resolveUIColor(e.paletteColor||{index:e.color}),i="none"===r?"#000000":r;b.lines[n].push({line:{stroke:i,strokeWidth:e.style?.lineThickness||2,strokeDasharray:e.style?.lineType},label:{stroke:e.coloredBackground?d.getContrastingColorTo(i):void 0,text:e.label,show:t&&!1!==e.showLabel,showValue:t&&!1!==e.showValue},value:e.refLineExpr.value,scale:n,slope:t?e.slope:void 0,isRtl:u})}),b}function Az({models:e,context:t,scale:n,key:r,dock:i,minimumLayoutMode:o,animationsEnabled:a,flags:s}){const{colorService:l,layoutService:c,themeService:u,styleModel:d}=e,{rtl:f,localeInfo:p}=t,h=u.getTheme(),m=((e,t)=>{const n=t.getLayoutValue(e).filter(e=>!1!==e.show&&0!==e.show&&"0"!==e.show),r=[];return"refLine.refLinesY"===e?(n.forEach(e=>{void 0!==e?.slope&&0!==e?.slope||r.push(e)}),r):n})(n===YI.SCALE.X?"refLine.refLinesX":"refLine.refLinesY",c);if(!m.length)return!1;const g={resolveUIColor:l.getPaletteColor},y=d.query.referenceLine.label.getStyle(),v=!!c.getLayoutValue("components",[])?.find(e=>"referenceLine"===e.key)?.referenceLine?.label?.name?.color?.color,b={key:r,type:"reference-line-labels",renderer:"svg",labels:m.map(e=>{const t=g.resolveUIColor(e.paletteColor||{index:e.color}),r="none"===t?"#000000":t;return{text:e.label,fill:v?y.fill:r,showValue:!1!==e.showValue,showLabel:!1!==e.showLabel,value:e.refLineExpr.value,valueLabel:e.refLineExpr.label,scale:n,slope:n===YI.SCALE.Y?e.slope:void 0,labelStroke:e.coloredBackground?h.getContrastingColorTo(r):void 0}}),scale:n,localeInfo:p,flags:s,layout:{dock:i,minimumLayoutMode:o,rtl:f},style:{label:{fontFamily:y.fontFamily,fontSize:y.fontSize,padding:{top:KI.REF_LABELS.PADDING.TOP,bottom:KI.REF_LABELS.PADDING.BOTTOM,left:f?KI.REF_LABELS.PADDING.END:KI.REF_LABELS.PADDING.START,right:f?KI.REF_LABELS.PADDING.START:KI.REF_LABELS.PADDING.END},maxWidth:"left"===i||"right"===i?KI.REF_LABELS.MAX_WIDTH.Y:KI.REF_LABELS.MAX_WIDTH.X,maxNumLines:KI.REF_LABELS.MAX_NUM_LINES,gap:"left"===i||"right"===i?KI.REF_LABELS.GAP.Y:KI.REF_LABELS.GAP.X}},animations:{enabled:a,trackBy:e=>`${e.labelID}: ${e.text}`,compensateForLayoutChanges({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;e.forEach(e=>{e.x-=r})}}};return b}function Dz({models:e,context:t,animationsEnabled:n,flags:r}){const{dockService:i}=e;return[Cz({models:e,context:t,scale:YI.SCALE.X,key:YI.COMPONENT.REFERENCE_LINES_X,minimumLayoutMode:ZR,animationsEnabled:n}),Cz({models:e,context:t,scale:YI.SCALE.Y,key:YI.COMPONENT.REFERENCE_LINES_Y,minimumLayoutMode:ZR,animationsEnabled:n}),Az({models:e,context:t,scale:YI.SCALE.X,key:YI.COMPONENT.REFERENCE_LINE_LABELS_X,dock:i.meta.x.opposite,minimumLayoutMode:JR,animationsEnabled:n,flags:r}),Az({models:e,context:t,scale:YI.SCALE.Y,key:YI.COMPONENT.REFERENCE_LINE_LABELS_Y,dock:i.meta.y.opposite,minimumLayoutMode:JR,animationsEnabled:n,flags:r})]}const qz=0;function _z({models:e,animationsEnabled:t}){const{layoutService:n,themeService:r,chartModel:i,styleModel:o}=e,a=n.getLayoutValue("labels",{});if(a.mode===qz)return!1;const s=r.getStyles(),l=o.query.label.getStyle(),c=i.query.getViewHandler(),{transform:u}=c,d={type:"point-label",key:YI.COMPONENT.POINT_LABELS,renderer:oz(),layout:{minimumLayoutMode:XR},settings:{label:e=>e.data.label,mode:a.mode,maxVisibleBubblesForLabeling:KI.LARGE_NUM_DATA_POINTS},style:{fontFamily:l.fontFamily,fontSize:l.fontSize,fill:l.fill,backgroundColor:s.backgroundColor},animations:{enabled:t,trackBy:e=>`${e.type} ${e.pointValue}`,compensateForLayoutChanges:xz},rendererSettings:{transform:u,canvasBufferSize:e=>({width:e.computedPhysical.width+100,height:e.computedPhysical.height+100})}};return d}function Tz({models:e}){const{dockService:t}=e,n=e=>({key:`${YI.COMPONENT.OUT_OF_BOUNDS}-space-${e}`,type:"container",layout:{dock:e},preferredSize:()=>KI.OOB_SPACE});return[n(t.meta.x.opposite),n(t.meta.y.opposite)]}function Nz({models:e,context:t,chart:n}){const{chartModel:r,colorService:i,layoutService:o}=e,a=r.query.getViewHandler(),{rtl:s}=t,l=dz(o),c={xMin:-.005,xMax:1.005,yMin:1.005,yMax:-.005};let u,d=0;return o.meta.isBigData||o.meta.isLargeNumDataPoints?void 0:{key:YI.COMPONENT.OUT_OF_BOUNDS,type:"point",data:{collection:YI.COLLECTION.MAIN,filter:e=>hz({nodeData:e,compSize:u,chart:n,sizeScaleFn:l,viewHandler:a})},settings:{x:{scale:YI.SCALE.X,fn:({datum:e})=>{const{xAxisMin:t,xAxisMax:n}=a.getDataView();return e.x.value<t?s?c.xMax:c.xMin:e.x.value>n?s?c.xMin:c.xMax:s?(e.x.value-n)/(t-n):(e.x.value-t)/(n-t)}},y:{scale:YI.SCALE.Y,fn:({datum:e})=>{const{yAxisMin:t,yAxisMax:n}=a.getDataView();return e.y.value<t?c.yMin:e.y.value>n?c.yMax:1-(e.y.value-t)/(n-t)}},size:()=>`${Math.min(Math.ceil(KI.OOB_SIZE*d*KI.DIAMETER_OVER_RADIUS),KI.OOB_SIZE)}px`,fill:i.getColor()},preferredSize:()=>({edgeBleed:{top:KI.OOB_SPACE,bottom:KI.OOB_SPACE,left:KI.OOB_SPACE,right:KI.OOB_SPACE}}),beforeRender:({size:e})=>{c.xMin=-10/(1.5*e.width),c.xMax=1-c.xMin,c.yMax=-10/(1.5*e.height),c.yMin=1-c.yMax,d=Math.min(e.height,e.width)/KI.WINDOW_SIZE_BASE,u=n.component(YI.COMPONENT.POINT).rect}}}const Oz=({dock:e,chart:t,rtl:n})=>{if("auto"!==e)return e||"right";if(t){const e=t.element.getBoundingClientRect();if(e.height>e.width)return"bottom"}return n?"left":"right"},Iz=({models:e,context:t,chart:n})=>{const{themeService:r,layoutService:i,chartModel:o}=e,a=o.query.getDataHandler(),{translator:s,rtl:l,theme:c}=t,{fontFamily:u}=r.getStyles().axis.label.name,d=c.getStyle("object","","legend")?.title||{fontSize:"15px",color:"#333333"},f=c.getStyle("object","","legend")?.label||{fontSize:"13px",color:"#595959"},{show:p,dock:h,showTitle:m}=i.getLayoutValue("legend",{show:!0,dock:"auto",showTitle:!0}),g=Oz({dock:h,chart:n,rtl:l});return{key:YI.COMPONENT.LEGEND_HEAT_MAP,type:"legend-seq",dock:g,minimumLayoutMode:QR,settings:{length:1,fill:YI.SCALE.HEAT_MAP_COLOR,major:YI.SCALE.HEAT_MAP_COLOR,title:{text:s.get("properties.compression.density"),fontFamily:u,fontSize:d.fontSize,fill:d.color,padding:10,anchor:"top"!==g&&"bottom"!==g||!l?"left":"right",show:m},tick:{label:(e,t)=>[0,a.maxBinDensity][t%2],fontFamily:u,fontSize:f.fontSize,fill:f.color}},show:()=>p&&a.getMeta().isBinnedData}};function Lz({viewHandler:e,direction:t,percent:n,rtl:r}){const{xAxisMax:i,xAxisMin:o,yAxisMax:a,yAxisMin:s}=e.getDataView();let l=0,c=0;"x"===t?l=(i-o)*n/100:c=(a-s)*n/100;const u={xAxisMin:r?o-l:o+l,xAxisMax:r?i-l:i+l,yAxisMax:a+c,yAxisMin:s+c};e.setDataView(u)}const Pz=2**.5;function Rz(e,t,n,r){const i=n-t,o=t+i*e-i*e*r;return[o,o+i*r]}function zz({e:e,chart:t,componentSize:n,viewHandler:r,pinchZoomFactor:i,buttonZoomDirection:o,models:a}){const{scale:s,maxScale:l,minScale:c,checkScale:u}=r.getMeta(),{xAxisMin:d,xAxisMax:f,yAxisMin:p,yAxisMax:h}=r.getDataView();let m,g,y;if(o)m="out"===o?Pz:1/Pz,g={normX:.5,normY:.5};else{m=i||(e.deltaY>0?Pz:1/Pz),y=function(e,t,n){const r=function(e,t){const n=t.element.getBoundingClientRect();return e.center?{x:e.center.x-n.left,y:e.center.y-n.top}:{x:e.clientX-n.left,y:e.clientY-n.top}}(e,t),{x:i,y:o}=n;return{x:r.x-i,y:r.y-o}}(e,t,n);const{width:r,height:o}=n;g={normX:y.x/r,normY:y.y/o}}const v=m*s;if(v>l||v<c)return;if(v<s&&v<u){const{chartModel:e}=a;if(!e.query.getDataHandler().getMeta().isBinnedData&&e.query.areSameVisiblePoints())return}const[b,x]=Rz(g.normX,d,f,m),[w,S]=Rz(g.normY,h,p,m),M=Math.abs(f-d)/Math.abs(x-b);r.setDataView({xAxisMin:b,xAxisMax:x,yAxisMin:S,yAxisMax:w,deltaX:y?(1-M)*y.x:0,deltaY:y?(1-M)*y.y:0,scale:M||1})}function Fz({chart:e,actions:t}){(function(e){const t=e.brush("selection").brushes();return!(!t?.length||"binData/binX"!==t[0]?.id&&"binData/binY"!==t[0]?.id)})(e)&&(t.select.emit("start"),t.select.emit("binRangeHighlightClear"))}function jz({models:e,chart:t,actions:n,context:r}){const{layoutService:i,chartModel:o}=e;if(i.meta.isSnapshot)return[];const a=KI.NAVIGATION_PANEL.BUTTON_WIDTH,s=o.query.getViewHandler(),{rtl:l,translator:c,model:u,constraints:d}=r,{element:f}=t,p=!!i.getLayoutValue("navigation"),h=p&&f.clientWidth>=KI.LAYOUT_MODES.MEDIUM_NAV.width&&f.clientHeight>=KI.LAYOUT_MODES.MEDIUM_NAV.height,m=()=>d.active||!u;return[{key:YI.COMPONENT.NAVIGATION_PANEL.UP,type:"button",show:h,settings:{title:c.get("Object.Navigation.PanUp"),disabled:m,callback:()=>{Fz({chart:t,actions:n}),Lz({viewHandler:s,direction:"y",percent:10})},presentation:{icon:"UP",width:a,vertical:0,horizontal:a,rtl:l}}},{key:YI.COMPONENT.NAVIGATION_PANEL.LEFT,type:"button",show:h,settings:{title:c.get("Object.Navigation.PanLeft"),disabled:m,callback:()=>{Fz({chart:t,actions:n}),Lz({viewHandler:s,direction:"x",percent:-10,rtl:l})},presentation:{icon:"LEFT",width:a,vertical:a,horizontal:l?0:2*a,rtl:l}}},{key:YI.COMPONENT.NAVIGATION_PANEL.HOME,type:"button",settings:{title:c.get("Object.Navigation.ResetZoom"),show:()=>p||!s.getMeta().isHomeState,disabled:()=>s.getMeta().isHomeState||d.active||!u,callback:()=>{Fz({chart:t,actions:n}),s.setDataView(s.getMeta().homeStateDataView)},presentation:{icon:"HOME",width:a,vertical:h?a:0,horizontal:h?a:0,rtl:l}}},{key:YI.COMPONENT.NAVIGATION_PANEL.RIGHT,type:"button",show:h,settings:{title:c.get("Object.Navigation.PanRight"),disabled:m,callback:()=>{Fz({chart:t,actions:n}),Lz({viewHandler:s,direction:"x",percent:10,rtl:l})},presentation:{icon:"RIGHT",width:a,vertical:a,horizontal:l?2*a:0,rtl:l}}},{key:YI.COMPONENT.NAVIGATION_PANEL.DOWN,type:"button",show:h,settings:{title:c.get("Object.Navigation.PanDown"),disabled:m,callback:()=>{Fz({chart:t,actions:n}),Lz({viewHandler:s,direction:"y",percent:-10})},presentation:{icon:"DOWN",width:a,vertical:2*a,horizontal:a,rtl:l}}},{key:YI.COMPONENT.NAVIGATION_PANEL.ZOOM_IN,type:"button",show:h,settings:{title:c.get("Object.Navigation.ZoomIn"),disabled:m,callback:()=>{Fz({chart:t,actions:n}),zz({viewHandler:s,buttonZoomDirection:"in",models:e})},presentation:{icon:"ZOOM_IN",width:a,vertical:3*a,horizontal:a,rtl:l}}},{key:YI.COMPONENT.NAVIGATION_PANEL.ZOOM_OUT,type:"button",show:h,settings:{title:c.get("Object.Navigation.ZoomOut"),disabled:m,callback:()=>{Fz({chart:t,actions:n}),zz({viewHandler:s,buttonZoomDirection:"out",models:e})},presentation:{icon:"ZOOM_OUT",width:a,vertical:4*a,horizontal:a,rtl:l}}}]}function Vz(e,t){const{RATIO:n,PADDING:r}=KI.MINI_CHART;let i,o,a;const s=e.query.getViewHandler();return{key:YI.COMPONENT.MINI_CHART_NAVIGATION,type:"mini-chart-window",layout:{minimumLayoutMode:ez},style:{borderColor:"#DC423F",background:"rgba(0, 0, 0, 0.05)",borderRadius:"0px"},show:()=>e.query.miniChartEnabled(),settings:{rect:{x:()=>t?r+a.x:o.width*(1-n)-r+a.x,y:()=>o.height*(1-n)-r+a.y,width:()=>a.width,height:()=>a.height}},beforeRender:({size:e})=>{o=e;const{xAxisMin:r,xAxisMax:l,yAxisMin:c,yAxisMax:u}=s.getMeta().homeStateDataView;i=s.getDataView(),a={width:o.width*n*(i.xAxisMax-i.xAxisMin)/(l-r),height:o.height*n*(i.yAxisMax-i.yAxisMin)/(u-c),x:t?o.width*n*(-i.xAxisMax+l)/(l-r):o.width*n*(i.xAxisMin-r)/(l-r),y:o.height*n*(u-i.yAxisMax)/(u-c)},(({nav:e,point:t})=>{e.x<=0&&(e.x+e.width<=0?e.width=0:e.width+=e.x,e.x=0),e.x+e.width>=t.width*n&&(e.x>=t.width*n?(e.x=t.width*n,e.width=0):e.width=t.width*n-e.x),e.y<=0&&(e.y+e.height<=0?e.height=0:e.height+=e.y,e.y=0),e.y+e.height>=t.height*n&&(e.y>=t.height*n?(e.y=t.height*n,e.height=0):e.height=t.height*n-e.y)})({nav:a,point:o})}}}function Hz({models:e,context:t}){const{layoutService:n,chartModel:r}=e;if(!n.meta.isBigData||n.meta.isSnapshot)return[];const{rtl:i}=t,o=function(e,t){const{RATIO:n,PADDING:r}=KI.MINI_CHART;let i,o;return{key:YI.COMPONENT.MINI_CHART_BACKGROUND,type:"mini-chart-window",layout:{minimumLayoutMode:ez},show:()=>e.query.miniChartEnabled(),style:{borderColor:"#B3B3B3",background:"rgba(255, 255, 255, 0.7)",borderRadius:"4px"},settings:{rect:{x:()=>t?r:i*(1-n)-r,y:()=>o*(1-n)-r,width:()=>i*n,height:()=>o*n}},beforeRender:({size:e})=>{({width:i,height:o}=e)}}}(r,i),a=Vz(r,i),s=function(e,t){const{RATIO:n,PADDING:r}=KI.MINI_CHART,i={x:0,y:0};let o;const a={width:{value:0,px:0},height:{value:0,px:0}},s=e.query.getViewHandler(),l=e.query.getDataHandler().getHomeStateBins(s.getMeta().isHomeState);if(l.length){const e=l[0];a.width.value=Math.abs(e.qText[0]-e.qText[2]),a.height.value=Math.abs(e.qText[1]-e.qText[3])}return{key:YI.COMPONENT.MINI_CHART_POINT,type:"point",layout:{minimumLayoutMode:ez},data:{items:l},show:()=>e.query.miniChartEnabled(),settings:{x:e=>{const{xAxisMin:r,xAxisMax:a}=o,s=Math.max(e.datum.value.qText[0],r),l=Math.min(e.datum.value.qText[2],a);if(l<s)return!1;const c=(s+l)/2;return t?(1-(c-r)/(a-r))*n+i.x:(c-r)/(a-r)*n+(1-n)-i.x},y:e=>{const{yAxisMin:t,yAxisMax:r}=o,a=Math.max(e.datum.value.qText[3],t),s=Math.min(e.datum.value.qText[1],r);return!(s<a)&&(r-(a+s)/2)/(r-t)*n+(1-n)-i.y},fill:{scale:YI.SCALE.HEAT_MAP_COLOR,fn:e=>e.scale(e.datum.value.qNum)},shape:e=>{const{xAxisMin:t,xAxisMax:n,yAxisMin:r,yAxisMax:i}=o,s=Math.max(e.datum.value.qText[0],t),l=Math.min(e.datum.value.qText[2],n)-s;let c;c=l<0?0:Math.min(a.width.px,l/a.width.value*a.width.px);const u=Math.max(e.datum.value.qText[3],r),d=Math.min(e.datum.value.qText[1],i)-u;let f;return f=d<0?0:Math.min(a.height.px,d/a.height.value*a.height.px),{type:"rect",width:c,height:f}}},beforeRender:({size:e})=>{({homeStateDataView:o}=s.getMeta());const{width:l,height:c}=e,{xAxisMin:u,xAxisMax:d,yAxisMin:f,yAxisMax:p}=o;a.width.px=a.width.value*l/(d-u)*n,a.height.px=a.height.value*c/(p-f)*n,i.x=t?(r+1)/l:(r-1)/l,i.y=(r-1)/c}}}(r,i);return[o,s,a]}function Bz({chartModel:e,layoutService:t,actions:n,context:r}){if(!t.meta.isBigData||t.meta.isSnapshot)return!1;const i=e.query.getViewHandler();return{key:YI.COMPONENT.HEAT_MAP_HIGHLIGHT,type:"heat-map-highlight",settings:{actions:n,dataView:()=>i.getDataView(),rtl:r.rtl}}}function $z({color:e,colorModel:t}){if(!e)return;const n=t.resolveUIColor(e);if("none"===n)return"transparent";const r=g(n);return r.setAlpha(e?.alpha>=0?e.alpha:1),r.isInvalid()?void 0:r.getRGBA()}const Wz=[{index:6,color:"#006580",alpha:.33},{index:7,color:"#87205d",alpha:.33},{index:11,color:"#e0bd8d",alpha:.33},{index:5,color:"#10cfc9",alpha:.33}],Uz={index:6,color:"#006580"},Yz={index:7,color:"#87205d"},Xz={index:5,color:"#10cfc9"},Gz={index:-1,color:"#595959"},Kz={index:-1,color:"#595959"},Zz={point:{showPointLabels:!0},line:{titleTranslation:"properties.plugins.Points",showPointLabels:!0},polygon:{titleTranslation:"properties.plugins.Points",showPointLabels:!0},twoZones:{titleTranslation:"properties.plugins.twoZones.Points",fixedPointNames:["properties.plugins.twoZones.Point1","properties.plugins.twoZones.Point2"],maxNumberOfPoints:2},quadrants:{titleTranslation:"properties.plugins.quadrants.Points",fixedPointNames:["properties.plugins.quadrants.Origin"],maxNumberOfPoints:1},fourZones:{titleTranslation:"properties.plugins.fourZones.Points",fixedPointNames:["properties.plugins.fourZones.Intersection","properties.plugins.fourZones.Point1","properties.plugins.fourZones.Point2"],maxNumberOfPoints:3}},Jz={polygon:["properties.plugins.polygon.Color"],twoZones:["properties.plugins.twoZones.Color1","properties.plugins.twoZones.Color2"],quadrants:["properties.plugins.quadrants.Color1","properties.plugins.quadrants.Color2","properties.plugins.quadrants.Color3","properties.plugins.quadrants.Color4"],fourZones:["properties.plugins.fourZones.Color1","properties.plugins.fourZones.Color2","properties.plugins.fourZones.Color3","properties.plugins.fourZones.Color4"]};function Qz({chart:e,animationsEnabled:t,colorService:n,themeService:r,layoutService:i,data:o,key:a,flags:s}){const l={resolveUIColor:n.getPaletteColor},c=r.getTheme(),u=function({layout:e,colorModel:t}){const n=e?.components?.find(e=>"general"===e.key);if(n?.bgColor?.useColorExpression){const e=g(n?.bgColor?.colorExpression);return e.isInvalid()?void 0:e.getRGBA()}const r=n?.bgColor?.color;return $z({color:r,colorModel:t})}({layout:i.getLayout(),colorModel:l})??c.getStyle("object","","backgroundColor"),d=o;d.forEach(e=>{const t=$z({colorModel:l,color:e.style?.label?.color||Kz}),n=!!e.style?.label?.coloredBackground;e.labelBackgroundColor=n?t:void 0,e.labelColor=n?r.getTheme().getContrastingColorTo(t):t,e.hasBackground=n,e.maxLabelWidth=100});const f={scale:YI.SCALE.X,fn:({datum:t})=>e.scale(YI.SCALE.X)(t.value.xValue)},p={scale:YI.SCALE.Y,fn:({datum:t})=>e.scale(YI.SCALE.Y)(t.value.yValue)},h=s?.isEnabled("TLV_1804_DEFAULT_CHART_SETTINGS"),m=h?12:10,y=h?3:2,v={key:a,type:"point",data:d,settings:{x:f,y:p,strokeWidth:({datum:e})=>e.value.style?.lineThickness??y,stroke:({datum:e})=>$z({colorModel:l,color:e.value.style?.lineColor?.color?e.value.style?.lineColor:{index:-1,color:"#000"}}),fill:({datum:e})=>e.value.style?.fill?.color?$z({colorModel:l,color:e.value.style?.fill}):u,size:({datum:e})=>`${e.value.style?.dataPointSize??m}px`,shape:({datum:e})=>e.value.style?.symbol||"circle"},animations:{enabled:t,trackBy:e=>`point-${e.data.value.cId}`,compensateForLayoutChanges:mz}};return v}function eF({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;e.forEach(e=>{if(void 0!==e.x1&&void 0!==e.y1)e.y1===e.y2?(e.x2=e.x1+t.width,e.y1-=i,e.y2-=i):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=r,e.x2-=r);else{const t="x"===e.major.p?r/e.major.size:i/e.major.size,n="y"===e.minor.p?i/e.minor.size:r/e.minor.size;e.points.forEach(e=>{e.modified||(e.major-=t,e.minor-=n,e.minor0-=n,e.modified=!0)})}})}function tF(){return Math.random()}function nF({points:e,key:t,major:n,minor:r,colorService:i,layer:o,areaColorKey:a,fillColor:s,animationsEnabled:l,flags:c}){const u={resolveUIColor:i.getPaletteColor},d=c?.isEnabled("TLV_1804_DEFAULT_CHART_SETTINGS"),f=d?3:2,p=d?"monotone":"linear",h={key:t,type:"line",data:e,settings:{connect:!0,coordinates:{major:n,minor:r,layerId:({datum:e})=>e.value.lineId},layers:{curve:({datum:e})=>e.value.lineStyle?.lineCurve??p,line:o.includes("line")?{strokeWidth:({datum:e})=>{const{lineStyle:t,showLines:n}=e.value;return!1===n?0:t?.lineThickness??f},stroke:({datum:e})=>$z({colorModel:u,color:e.value.lineStyle?.lineColor?.color?e.value.lineStyle?.lineColor:{index:-1,color:"#000"}}),strokeDasharray:({datum:e})=>e.value.lineStyle?.lineType}:{show:!1},area:o.includes("area")?{fill:({datum:e})=>$z({colorModel:u,color:s||(e.value.areaColors[a]?.color?e.value.areaColors[a]:{index:-1,color:"#000"})}),opacity:s?.2:void 0,strokeWidth:0}:void 0}},animations:{enabled:l,trackBy:tF,compensateForLayoutChanges:eF}};return h}const rF={getChar(e){let t=e,n=-1;return t>9?(n=65+t-10,n>90&&(n+=6)):t=`${t}`.charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?this.getChar(t+1):String.fromCharCode(n)},base62(e){const t=this.getChar(e%62),n=Math.floor(e/62);return n>0?this.base62(n)+t:t},id(){return this.base62(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function iF(e){e.forEach(e=>{e&&!e.cId&&(e.cId=rF.id)})}function oF(e){const t=[];return e.forEach(e=>{e?.type!==t[t.length-1]?.[0]?.type||"point"!==e?.type&&("line"!==e?.type||e?.showPoints||t[t.length-1]?.[0]?.showPoints)?t.push([e]):t[t.length-1].push(e)}),t}function aF({chart:e,models:t,animationsEnabled:n,context:r,flags:i}){const{themeService:o,colorService:a,layoutService:s}=t,l=s.getLayoutValue("plugins",[]).filter(e=>["point","line","polygon"].includes(e.type));if(!Array.isArray(l)||0===l.length)return[];iF(l);const c=[],u=oF(l),{rtl:d}=r,f=[];return u.forEach((t,r)=>{const l=`shape-addon-${r}`,u=({shape:t,points:r,subIndex:u})=>{if(t?.showPoints&&r){const t=`points-${u}-for-${l}`;f.push(Qz({chart:e,animationsEnabled:n,colorService:a,themeService:o,layoutService:s,flags:i,data:r,key:t})),c.push({key:t,labels:!0})}};switch(t[0]?.type){case"point":f.push(Qz({chart:e,animationsEnabled:n,themeService:o,colorService:a,layoutService:s,flags:i,data:t,key:l})),c.push({key:l,labels:!0,lines:!1});break;case"line":f.push(function({chart:e,animationsEnabled:t,colorService:n,data:r,key:i}){const o=[];r.forEach((e,t)=>{const n=(e?.points??[]).map((n,r)=>({...n,lineId:t,lineStyle:0===r?e.lineStyle:void 0}));o.push(...n)});const a={scale:YI.SCALE.X,fn:({datum:t})=>e.scale(YI.SCALE.X)(t.value.xValue)},s={scale:YI.SCALE.Y,fn:({datum:t})=>e.scale(YI.SCALE.Y)(t.value.yValue)};return nF({points:o,key:i,major:a,minor:s,colorService:n,animationsEnabled:t,layer:"lineOnly"})}({chart:e,animationsEnabled:n,colorService:a,data:t,key:l})),t.forEach((e,t)=>{u({shape:e,points:e?.points,subIndex:t})});break;case"polygon":f.push(function({chart:e,animationsEnabled:t,colorService:n,data:r,key:i}){const o=[];r.forEach((e,t)=>{const n=(e?.points??[]).map((n,r)=>({...n,lineId:t,lineStyle:0===r?e.lineStyle:void 0,areaColors:0===r?e.areaColors:void 0,showLines:0===r?e.showLines:void 0}));o.push(...n),o.push(n[0])});const a={scale:YI.SCALE.X,fn:({datum:t})=>e.scale(a.scale)(t.value.xValue)},s={scale:YI.SCALE.Y,fn:({datum:t})=>e.scale(s.scale)(t.value.yValue)};return nF({points:o,key:i,major:a,minor:s,colorService:n,animationsEnabled:t,layer:"line-area",areaColorKey:"color1"})}({chart:e,animationsEnabled:n,colorService:a,data:t,key:l})),t.forEach((e,t)=>{u({shape:e,points:e?.points,subIndex:t})})}}),f.push(function({layoutService:e,rtl:t,animationsEnabled:n,themeService:r,configs:i}){const o=e.getLayoutValue("plugins",[]);if(!Array.isArray(o)||0===o.length)return!1;const a=r.getStyles();return{type:"point-label-plugin",key:"plugins-point-labels",renderer:oz(),settings:{all:!0,configs:i,label:e=>e.value?.label?.value?e.value?.label?.value:"",lineId:({data:e})=>{for(let t=0;t<o.length;t++){const n=o[t];switch(n.type){case"point":if(n.cId===e.value.cId)return n.cId;break;case"line":if(n.points.some(t=>t.cId===e.value.cId))return n.cId}}return e.value.cId||e.line.value},majorValue:e=>e.value.xValue,pointValue:e=>e.value.yValue,rtl:t},style:a.plugins.label,animations:{enabled:n,trackBy:e=>`${e.type}-${e.data.cId}`,compensateForLayoutChanges:xz}}}({layoutService:s,rtl:d,animationsEnabled:n,themeService:o,configs:c})),f}function sF({chart:e,models:t,animationsEnabled:n,flags:r}){const{themeService:i,colorService:o,layoutService:a,chartModel:s}=t,l=a.getLayoutValue("plugins",[]).filter(e=>["twoZones","quadrants","fourZones","horizontalParallelZones"].includes(e.type));if(!Array.isArray(l)||0===l.length)return[];iF(l);const c=oF(l),u=[];return c.forEach((t,l)=>{const c=`partition-addon-${l}`,d=({partition:t,points:s,subIndex:l})=>{if(t?.showPoints&&s){const t=`points-${l}-for-${c}`;u.push(Qz({chart:e,animationsEnabled:n,colorService:o,themeService:i,layoutService:a,flags:r,data:s,key:t}))}};switch(t[0]?.type){case"twoZones":u.push(...function({chart:e,animationsEnabled:t,colorService:n,chartModel:r,data:i,key:o}){const a=[],s=[],l=[];i.forEach((e,t)=>{const n=e?.points??[];if(n.length<2)return;let r=0;n[1].yValue!==n[0].yValue&&(r=(n[1].yValue-n[0].yValue)/(n[1].xValue-n[0].xValue));const i=n[0].yValue-r*n[0].xValue,o=n[0].xValue,c=t,{showLines:u,lineStyle:d,areaColors:f}=e,p={id:"interceptLeft",slope:r,yIntercept:i,lineId:c,showLines:u,lineStyle:d,areaColors:f},h={id:"interceptRight",slope:r,yIntercept:i,lineId:c},m={id:"interceptTop",xIntercept:o,lineId:c,showLines:u,lineStyle:d,areaColors:f},g={id:"interceptBottom",xIntercept:o,lineId:c},y={id:"bottomLeft",lineId:c},v={id:"bottomRight",lineId:c},b={id:"topRight",lineId:c},x={id:"topLeft",lineId:c};r===1/0||r===-1/0?(a.push(m,g,v,b,m),s.push(m,g,y,x,m),l.push(m,g)):(a.push(p,h,b,x,p),s.push(p,h,v,y,p),l.push(p,h))});const c={scale:YI.SCALE.X,fn:({datum:t})=>{const n=e.scale(YI.SCALE.X),i=r.query.getViewState(),{xAxisMin:o,xAxisMax:a}=i.get("dataView"),{id:s,xIntercept:l}=t.value;let c;switch(s){case"interceptLeft":case"bottomLeft":case"topLeft":c=o;break;case"interceptRight":case"bottomRight":case"topRight":c=a;break;case"interceptTop":case"interceptBottom":c=l}return n(c)}},u={scale:YI.SCALE.Y,fn:({datum:t})=>{const n=e.scale(YI.SCALE.Y),i=r.query.getViewState(),{xAxisMin:o,xAxisMax:a,yAxisMin:s,yAxisMax:l}=i.get("dataView"),{id:c,slope:u,yIntercept:d}=t.value;let f;switch(c){case"bottomLeft":case"bottomRight":case"interceptBottom":f=s;break;case"topLeft":case"topRight":case"interceptTop":f=l;break;case"interceptLeft":f=u*o+d;break;case"interceptRight":f=u*a+d}return n(f)}},d=nF({points:l,key:`${o}-border-line`,major:c,minor:u,colorService:n,animationsEnabled:t,layer:"line-only"}),f=[a,s].map((e,r)=>nF({points:e,key:`${o}-${0===r?"upper":"lower"}`,major:c,minor:u,colorService:n,animationsEnabled:t,layer:"area-only",areaColorKey:0===r?"color1":"color2"}));return[...f,d]}({chart:e,animationsEnabled:n,colorService:o,chartModel:s,data:t,key:c})),t.forEach((e,t)=>{d({partition:e,points:e?.points,subIndex:t})});break;case"quadrants":case"fourZones":u.push(...function({chart:e,animationsEnabled:t,colorService:n,chartModel:r,data:i,key:o}){const a=[],s=[],l=[],c=[],u=[];i.forEach((e,t)=>{let n=[];if("fourZones"===e.type&&(n=[...e.points],n.length<3))return;if("quadrants"===e.type){if(n=[...e.points],n.length<1)return;const{xValue:t,yValue:r}=n[0];n.push({xValue:t+1,yValue:r},{xValue:t,yValue:r+1})}const{xValue:r,yValue:i}=n[0];let{xValue:o,yValue:d}=n[1],{xValue:f,yValue:p}=n[2];o===r&&d===i?[o,d]=[f,p]:f===r&&p===i&&([f,p]=[o,d]);const h=[0,0];d!==i&&(h[0]=(d-i)/(o-r)),p!==i&&(h[1]=(p-i)/(f-r));const m=[i-h[0]*r,i-h[1]*r];(h[0]===1/0||h[0]===-1/0||h[1]!==1/0&&h[1]!==-1/0&&h[0]<h[1])&&([h[0],h[1]]=[h[1],h[0]],[m[0],m[1]]=[m[1],m[0]]);const g=t,{showLines:y,lineStyle:v,areaColors:b}=e,x={showLines:y,lineStyle:v,areaColors:b},w={slopes:h,yIntercepts:m,xOrigin:r,yOrigin:i,lineId:g},S={id:"origin",...w,...x},M={id:"interceptLeft1",...w,...x},k={id:"interceptRight1",...w},E={id:"interceptLeft2",...w,...x},C={id:"interceptRight2",...w},A={id:"interceptTop",...w,...x},D={id:"interceptBottom",...w},q={id:"topRight",...w},_={id:"topLeft",...w},T={id:"bottomLeft",...w},N={id:"bottomRight",...w};h[1]===1/0||h[1]===-1/0?h[0]===1/0||h[0]===-1/0?(a.push(A,q,N,D,A),s.push(A,_,T,D,A),u.push([A,D])):(a.push(S,k,q,A,S),s.push(S,A,_,M,S),l.push(S,M,T,D,S),c.push(S,D,N,k,S),u.push([M,k],[A,D])):(a.push(S,k,q,_,E,S),s.push(S,E,_,T,M,S),l.push(S,M,T,N,C,S),c.push(S,C,N,q,k,S),u.push([M,k],[E,C]))});const d={scale:YI.SCALE.X,fn:({datum:t})=>{const n=e.scale(YI.SCALE.X),i=r.query.getViewState(),{xAxisMin:o,xAxisMax:a}=i.get("dataView"),{id:s,xOrigin:l}=t.value;let c;switch(s){case"interceptLeft1":case"interceptLeft2":case"bottomLeft":case"topLeft":c=o;break;case"interceptRight1":case"interceptRight2":case"bottomRight":case"topRight":c=a;break;case"origin":case"interceptTop":case"interceptBottom":c=l}return n(c)}},f={scale:YI.SCALE.Y,fn:({datum:t})=>{const n=e.scale(YI.SCALE.Y),i=r.query.getViewState(),{xAxisMin:o,xAxisMax:a,yAxisMin:s,yAxisMax:l}=i.get("dataView"),{id:c,slopes:u,yIntercepts:d,yOrigin:f}=t.value;let p;switch(c){case"bottomLeft":case"bottomRight":case"interceptBottom":p=s;break;case"topLeft":case"topRight":case"interceptTop":p=l;break;case"interceptLeft1":p=u[0]*o+d[0];break;case"interceptLeft2":p=u[1]*o+d[1];break;case"interceptRight1":p=u[0]*a+d[0];break;case"interceptRight2":p=u[1]*a+d[1];break;case"origin":p=f}return n(p)}},p=[a,s,l,c].map((e,r)=>nF({points:e,key:`${o}-zone-${r+1}`,major:d,minor:f,colorService:n,layer:"area-only",areaColorKey:`color${r+1}`,animationsEnabled:t})),h=u.map((e,r)=>nF({points:e,key:`${o}-zone-lines-${r}`,major:d,minor:f,colorService:n,layer:"line-only",animationsEnabled:t}));return[...p,...h]}({chart:e,animationsEnabled:n,colorService:o,chartModel:s,data:t,key:c})),t.forEach((e,t)=>{d({partition:e,points:e?.points,subIndex:t})});break;case"horizontalParallelZones":u.push(...function({chart:e,animationsEnabled:t,colorService:n,chartModel:r,data:i,key:o,flags:a}){const s=[],l=[];i.forEach((e,t)=>{const n=t,{showLines:r,lineStyle:i}=e,{limits:o,paletteColors:a}=e.yLimits,c=o.map(e=>e.value);a.forEach((e,t)=>{const a=t>0?c[t-1]:void 0,u=t<o.length?c[t]:void 0;s.push({points:[{id:"bottomLeft",yMin:a,yMax:u,lineId:n,showLines:r,lineStyle:i},{id:"bottomRight",yMin:a,yMax:u,lineId:n},{id:"topRight",yMin:a,yMax:u,lineId:n},{id:"topLeft",yMin:a,yMax:u,lineId:n}],fillColor:e||{index:-1,color:"#000"}}),void 0!==a&&l.push([{id:"bottomLeft",yMin:a,yMax:u,lineId:n,showLines:r,lineStyle:i},{id:"bottomRight",yMin:a,yMax:u,lineId:n}])})});const c={scale:YI.SCALE.X,fn:({datum:t})=>{const n=e.scale(YI.SCALE.X),i=r.query.getViewState(),{xAxisMin:o,xAxisMax:a}=i.get("dataView"),{id:s}=t.value;let l;switch(s){case"bottomLeft":case"topLeft":l=o;break;case"topRight":case"bottomRight":l=a}return n(l)}},u={scale:YI.SCALE.Y,fn:({datum:t})=>{const n=e.scale(YI.SCALE.Y),i=r.query.getViewState(),{yAxisMin:o,yAxisMax:a}=i.get("dataView"),{id:s,yMax:l,yMin:c}=t.value;let u;switch(s){case"topLeft":case"topRight":u=l??a;break;case"bottomLeft":case"bottomRight":u=c??o}return n(u)}},d=s.map((e,r)=>nF({points:e.points,key:`${o}-zone-y-${r}`,major:c,minor:u,colorService:n,layer:"area-only",fillColor:e.fillColor,animationsEnabled:t,flags:a})),f=l.map((e,r)=>nF({points:e,key:`${o}-border-line-y-${r}`,major:c,minor:u,colorService:n,layer:"line.only",animationsEnabled:t,flags:a}));return[...d,...f]}({chart:e,animationsEnabled:n,colorService:o,chartModel:s,data:t,key:c,flags:r}))}}),u}function lF({models:e,viewState:t,options:n,theme:r,rtl:i,chart:o}){const{tickModel:a,colorService:s,disclaimerService:l,layoutService:c,chartModel:u}=e,d=u.query.getDataHandler();if(l.getHasSuppressingDisclaimer())return{};const f=c.getLayoutValue("legend.dock","auto"),p=r.getStyle("object","","dataColors").primaryColor,h=function(e){const t=cP(e);return t.l<30?t.l+=30:t.l<50?t.l+=10:t.l+=5,t.toString()}(p),m=function(e){const t=cP(e);return t.l-=40,t.toString()}(p),g=Oz({dock:f,chart:o,rtl:i});return{x:{data:{field:YI.FIELDS.X},min:()=>t.get("dataView").xAxisMin,max:()=>t.get("dataView").xAxisMax,invert:"rtl"===n.direction,ticks:{values:()=>a.query.getXTicks()}},y:{data:{extract:{field:YI.FIELDS.Y}},min:()=>t.get("dataView").yAxisMin,max:()=>t.get("dataView").yAxisMax,invert:!0,ticks:{values:()=>a.query.getYTicks()}},[YI.SCALE.BIN_X]:{data:{extract:{source:YI.DATA.BIN,field:YI.FIELDS.BIN_X}},min:()=>t.get("dataView").xAxisMin,max:()=>t.get("dataView").xAxisMax,invert:"rtl"===n.direction,ticks:{values:()=>a.query.getXTicks()}},[YI.SCALE.BIN_Y]:{data:{extract:{source:YI.DATA.BIN,field:YI.FIELDS.BIN_Y}},min:()=>t.get("dataView").yAxisMin,max:()=>t.get("dataView").yAxisMax,invert:!0,ticks:{values:()=>a.query.getYTicks()}},...s.getScales(),[YI.SCALE.HEAT_MAP_COLOR]:{type:"sequential-color",min:0,max:()=>d.maxBinDensity,invert:i||!("top"===g||"bottom"===g),range:i||"top"!==g&&"bottom"!==g?[m,h]:[h,m]}}}function cF(e){const t=e.brush("selection").brushes();return!(!t?.length||"value"!==t[0]?.type||"binData/bin"!==t[0]?.id)}function uF({chart:e,actions:t,viewHandler:n,models:r}){let i,o;function a(){o&&(clearTimeout(o),o=null)}return{type:"native",events:{wheel(s){const l={x:s.clientX,y:s.clientY};let c;if(!cF(e)){if(t.zoom.enabled()&&([c]=e.componentsFromPoint(l).filter(e=>e.key===YI.COMPONENT.POINT||e.key===YI.COMPONENT.HEAT_MAP),c)){Fz({chart:e,actions:t});const l=c.rect?.computedPhysical;l?.height&&l?.width&&(i={...l});const u=((e,t=0)=>{const{layoutService:n,chartModel:r}=e,{meta:i}=n;if(i.isBigData){const e=n.getDataPages();if(e.length){const{qMatrix:n,qArea:r}=e[0],{qLeft:i,qTop:o,qWidth:a,qHeight:s}=r;return!(1!==e.length||n.length||i||o||a||s)||n.length>t}}if(i.numDataPoints<=t)return!1;const{numVisiblePoints:o=0}=r.query.getMeta()||{};return o>t})(r,KI.LARGE_NUM_DATA_POINTS);n.setInteractionInProgress(u),zz({e:s,chart:e,componentSize:i,viewHandler:n,models:r}),s.preventDefault(),o&&a(),u&&(o=setTimeout(()=>{n.setInteractionInProgress(!1);const e=n.getDataView();n.setDataView({xAxisMin:e.xAxisMin,xAxisMax:e.xAxisMax,yAxisMin:e.yAxisMin,yAxisMax:e.yAxisMax,deltaX:0,deltaY:0,scale:1}),a()},200))}t.interact.enabled()&&([c]=e.componentsFromPoint(l).filter(e=>e.key===YI.COMPONENT.LEGEND_CATEGORICAL),c&&(!function(e,t){const n=(Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY)>=0?"next":"prev";t.emit(n)}(s,c),s.preventDefault()))}}}}}function dF({e:e,chart:t,rtl:n}){if(!t.component(YI.COMPONENT.MINI_CHART_POINT))return null;const{x:r,y:i,width:o,height:a}=t.component(YI.COMPONENT.MINI_CHART_POINT).rect.computedPhysical,s=t.element.getBoundingClientRect(),l=e.center.x-s.left-r-e.deltaX,c=e.center.y-s.top-i-e.deltaY,{RATIO:u,PADDING:d}=KI.MINI_CHART,f=l-(n?d:o*(1-u)-d),p=c-(a*(1-u)-d);return t.component(YI.COMPONENT.MINI_CHART_POINT).show()&&(f>=0&&f<=o*u&&p>=0&&p<=a*u)?{x:f,y:p}:null}const{RATIO:fF}=KI.MINI_CHART;function pF({viewHandler:e,e:t,chart:n,rtl:r}){const{scale:i,homeStateDataView:o}=e.getMeta(),a=dF({e:t,chart:n,rtl:r}),s=n.component(YI.COMPONENT.MINI_CHART_POINT).rect.computedPhysical.width*fF,l=n.component(YI.COMPONENT.MINI_CHART_POINT).rect.computedPhysical.height*fF,{xAxisMin:c,xAxisMax:u,yAxisMin:d,yAxisMax:f}=o,p=r?u-a.x*(u-c)/s:c+a.x*(u-c)/s,h=f-a.y*(f-d)/l,m=(u-c)*i,g=(f-d)*i,y={xAxisMin:p-.5*m,xAxisMax:p+.5*m,yAxisMin:h-.5*g,yAxisMax:h+.5*g,deltaX:0,deltaY:0};e.setDataView(y)}const hF="areaPan";let mF;const gF=({event:e,props:t,viewHandler:n,rtl:r})=>{const{componentSize:i,xAxisMin:o,xAxisMax:a,yAxisMax:s,yAxisMin:l,miniChart:c}=t;let u=(a-o)*(e.deltaX/i.width),d=(s-l)*(e.deltaY/i.height),{deltaX:f,deltaY:p}=e;if(c.panInMiniChart){const{navWindowScale:e}=c;u/=-e,d/=-e,f/=-e,p/=-e}const h={xAxisMin:r?o+u:o-u,xAxisMax:r?a+u:a-u,yAxisMin:l+d,yAxisMax:s+d,deltaX:f,deltaY:p};n.setDataView(h)},yF=({chart:e,actions:t,viewHandler:n,rtl:r})=>({type:"Pan",key:"panorama",options:{event:hF,pointers:1,threshold:10,enable(n,r){if(this.started===hF||!r)return!0;const i=t.lasso.enabled()&&t.lasso.active();if(t.getProgressive()&&i)return!1;if(!t.zoom.enabled())return!1;if(cF(e))return!1;if(this.area=e.componentsFromPoint({x:r.center.x,y:r.center.y}).filter(e=>e.key===YI.COMPONENT.POINT||e.key===YI.COMPONENT.HEAT_MAP),!this.area.length)return!1;const o=this.area[0]?.rect?.computedPhysical;return o?.height&&o?.width&&(mF={...o}),this.componentSize=mF,!0}},events:{areaPanstart(i){Fz({chart:e,actions:t}),i.preventDefault(),n.setInteractionInProgress(!0),this.started=hF;let o=!1;null!==dF({e:i,chart:e,rtl:r})&&(pF({e:i,chart:e,viewHandler:n,rtl:r}),o=!0);const{scale:a}=n.getMeta(),s=a*KI.MINI_CHART.RATIO,l=n.getDataView();this[hF]={componentSize:this.componentSize,...l,miniChart:{panInMiniChart:o,navWindowScale:s}}},areaPanmove(e){this.started&&(e.preventDefault(),gF({event:e,props:this[hF],viewHandler:n,rtl:r}))},areaPanend(e){this.started&&(e.preventDefault(),n.setInteractionInProgress(!1),gF({event:e,props:this[hF],viewHandler:n,rtl:r}),this.started=!1)},areaPancancel(e){e.preventDefault(),this.started=!1}}}),vF="zoom";let bF,xF=0;const wF=({chart:e,actions:t,viewHandler:n,rtl:r,models:i})=>({type:"Pinch",key:"pinchZoom",options:{event:vF,pointers:2,threshold:0,enable(n,r){if(this.started===vF||!r)return!0;if(!t.zoom.enabled())return!1;if(cF(e))return!1;if(this.area=e.componentsFromPoint({x:r.center.x,y:r.center.y}).filter(e=>e.key===YI.COMPONENT.POINT||e.key===YI.COMPONENT.HEAT_MAP),!this.area.length)return!1;const i=this.area[0]?.rect?.computedPhysical;return i?.height&&i?.width&&(bF={...i}),this.componentSize=bF,!0}},events:{zoomstart(r){Fz({chart:e,actions:t}),r.preventDefault(),xF=r.scale,this.started=vF;const i=n.getDataView();this[vF]={componentSize:this.componentSize,...i}},zoommove(t){if(t.preventDefault(),t.scale>1.1||t.scale<.9){(function(e){return Math.abs(e)>.01})(t.scale-xF)&&(zz({e:t,chart:e,componentSize:this.componentSize,viewHandler:n,pinchZoomFactor:xF/t.scale,models:i}),xF=t.scale)}else{const{componentSize:e,xAxisMin:i,xAxisMax:o,yAxisMax:a,yAxisMin:s}=this[vF],l=(o-i)*(t.deltaX/e.width),c=(a-s)*(t.deltaY/e.height),u={xAxisMin:r?i+l:i-l,xAxisMax:r?o+l:o-l,yAxisMin:s+c,yAxisMax:a+c};n.setDataView(u)}},zoomend(e){e.preventDefault(),this.started=!1},zoomcancel(e){e.preventDefault(),this.started=!1}}}),SF=({eventName:e="tap-button"})=>({key:"event:tap-button",type:"Tap",options:{event:e,interval:10,pointers:1,enable:(e,t)=>!t||"I"===t.target.tagName},events:{[e](){}}}),MF=({eventName:e="tap-mini-chart",viewHandler:t,rtl:n})=>({key:"event:tap-mini-chart",type:"Tap",options:{event:e,interval:10,pointers:1,enable(e,t){return!t||null!==dF({e:t,chart:this.chart,rtl:n})}},events:{[e](e){e.preventDefault(),pF({e:e,viewHandler:t,chart:this.chart,rtl:n})}}});function kF({chart:e,actions:t,viewHandler:n,gestures:r,legend:i,models:o,rtl:a}){const{tooltipService:s}=o,l=s.getInteractions(),c={type:"hammer",enable:!0,gestures:[...i.gestures,SF({}),MF({viewHandler:n,rtl:a}),...[...r].sort((e,t)=>(t.prio||0)-(e.prio||0)),yF({chart:e,actions:t,viewHandler:n,rtl:a}),wF({chart:e,actions:t,viewHandler:n,rtl:a,models:o}),...l.gestures]};return[uF({chart:e,actions:t,viewHandler:n,models:o}),l.native,c]}const EF=({layoutService:e,chart:t})=>{const n=e?.meta||{};(n.isBigData||n.isLargeNumDataPoints)&&t.brush("lazySelection")._state(t.brush("selection")._state())},CF=({layoutService:e,chartModel:t,chart:n})=>{const r=e?.meta||{};if(r.isBigData){const e=t?.query.getDataHandler(),{isLargeNumBubblesFromBigData:r}=e?.getMeta()||{};r||n.brush("lazySelection")._state(n.brush("selection")._state())}else if(r.isLargeNumDataPoints){const{isLargeNumVisibleBubbles:e}=t?.query.getMeta()||{};e||n.brush("lazySelection")._state(n.brush("selection")._state())}},AF="lasso",DF=({key:e,componentTargetKeys:t,requireFailure:n,recognizeWith:r},i)=>({key:`event:${e}`,type:"Pan",requireFailure:n,recognizeWith:r,options:{event:AF,enable(e,n){if(this.started===AF||!n)return!0;if(!i.actions.select.enabled()||!i.actions.lasso.enabled()||!i.actions.lasso.active())return!1;return this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter(e=>-1!==t.indexOf(e.key))}},events:{lassostart(t){t.preventDefault(),this.started!==AF&&(i.actions.select.emit("binsRangeSelectionClear"),i.actions.select.emit("selectionStart"),i.actions.select.emit("start",AF),this.chart.component(e).emit("lassoStart",t),this.started=AF)},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t),CF({...i,chart:this.chart})},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),i.actions.select.emit("end",AF),EF({layoutService:i.layoutService,chart:this.chart})}}});const qF=({targets:e,requireFailure:t,recognizeWith:n,components:r,eventName:i="tap"},o)=>{let a;return{key:"event:tap",type:"Tap",requireFailure:t,recognizeWith:n,options:{event:i,interval:10,pointers:1,enable(t,n){return!n||!!o.actions.select.enabled()&&(a=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter(t=>-1!==e.indexOf(t.key)),a.length>0)}},events:{[i](t){t.preventDefault();const n=function(e,t){const n=t.element.getBoundingClientRect(),r=void 0===e.clientX?Math.floor(e.srcEvent.clientX):e.clientX,i=void 0===e.clientY?Math.floor(e.srcEvent.clientY):e.clientY;return{x:r-n.left,y:i-n.top}}(t,this.chart),s=o.hitRadius?o.hitRadius(a):0,l=s>0?{cx:n.x,cy:n.y,r:s}:n,c=o.shapesAt?o.shapesAt(l):this.chart.shapesAt(l,{components:e.map(e=>({key:e}))});if(!o.isLocked(a)&&o.actions.select.enabled()){const e=this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}),n=e.some(e=>"legend-cat"===e.type);if(!c.length&&n||(this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1,o.actions.select.emit("binsRangeSelectionClear"),o.actions.select.emit("selectionStart"),o.actions.select.emit("start",i,e)),c.length&&r){this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1;const e="function"==typeof r?r(t,c):r;this.chart.brushFromShapes(c,{components:e}),o.actions.select.emit("end",i),EF({layoutService:o.layoutService,chart:this.chart})}}}}}};const _F=({eventName:e,key:t,fillTargets:n=[],requireFailure:r,recognizeWith:i,enableInteraction:o},a)=>({key:`event:${t}`,type:"Pan",requireFailure:r,recognizeWith:i,options:{event:e,enable(r,i){if(!o())return!1;if(this.started===e||!i)return!0;if(!a.actions.select.enabled())return!1;const s=this.chart.componentsFromPoint({x:i.center.x,y:i.center.y}).filter(e=>-1!==n.indexOf(e.key)),l=0===s.length&&function(e,t){const{target:n}=e.srcEvent;return!(!n||0!==(n.getAttribute("data-key")||"").indexOf(`${t}-`))}(i,t);return l?(this.started=e,!0):s.length>0}},events:{[`${e}start`](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,a.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),["binXRange","binYRange"].indexOf(e)>-1&&a.actions.select.emit("selectionStart"),a.actions.select.emit("start",e),this.chart.component(t).emit("rangeStart",n),this.started=e},[`${e}move`](e){e.preventDefault(),this.chart.component(t).emit("rangeMove",e),CF({...a,chart:this.chart})},[`${e}end`](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,a.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),this.chart.component(t).emit("rangeEnd",n),a.actions.select.emit("end",e),this.started=!1,EF({layoutService:a.layoutService,chart:this.chart})}}}),TF=({key:e,requireFailure:t,recognizeWith:n,eventName:r="tap"},i)=>({prio:1,key:`event:${e}-tap`,type:"Tap",requireFailure:t,recognizeWith:n,options:{event:`${r}-${e}-tap`,interval:10,pointers:1,enable:(t,n)=>!!n&&(!!i.actions.select.enabled()&&(!(!n.target||"INPUT"!==n.target.nodeName)||!(!n.target||!n.target.hasAttribute("data-other-value"))&&(n.target.getAttribute("data-key")||"").split("-bubble")[0]===e))},events:{[`${r}-${e}-tap`](t){(t.target.getAttribute("data-key")||"").split("-bubble")[0]&&(t.preventDefault(),this.chart.component(e).emit("bubbleStart",t))}}});function NF(e,t){const n=function(e){const{key:t,targets:n,fillTargets:r,targetSelector:i,targetFillSelector:o,dock:a,scale:s,bubblesPlacement:l="inside",observeBrush:c=!1,multiple:u=!1,toLabel:d,onEdited:f}=e;return{key:t,type:"brush-range",layout:{dock:n.map(e=>`@${e}`).join(",")},on:f?{bubbleEnd(){f()}}:{},settings:{brush:c?{context:"selection",observe:!0}:"selection",scale:s,multiple:u,direction:"left"===a||"right"===a?"vertical":"horizontal",bubbles:{align:"left"===a||"top"===a?"end":"start",placement:l,label:d},target:{components:r,selector:i,fillSelector:o,fill:"rgba(82,204,82,0.2)"}}}}(e);return{interactions:[_F(e,t),e.onEdited?TF(e,t):null].filter(Boolean),components:[n]}}function OF({models:e,actions:t,flags:n}){const{selectionService:r,colorService:i,customTooltipModel:o,layoutService:a,chartModel:s}=e,l=[YI.COMPONENT.POINT,YI.COMPONENT.LEGEND_CATEGORICAL,YI.COMPONENT.HEAT_MAP],c=a.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),u=(e,t)=>{const[n]=t,{key:r}=n,i={key:r,action:e.srcEvent.ctrlKey||c?"set":"toggle",contexts:["selection"]};if(r===YI.COMPONENT.LEGEND_CATEGORICAL)return[i];return(r!==YI.COMPONENT.POINT||!n.data.null?.value)&&(i.data=["selectionDimension"],[i])},d={targets:l,components:u},f=function({selectionService:e,colorService:t}){return n=>{e.getIsSelectionLocked(n);const{key:r}=n[0],i=e.getIsDimensionLocked();return r===YI.COMPONENT.LEGEND_CATEGORICAL?t.isSelectionLocked({isMeasureSelectionLocked:i}):i}}({selectionService:r,colorService:i}),p=e=>e.some(e=>e.key===YI.COMPONENT.POINT)?3:e.some(e=>e.key===YI.COMPONENT.HEAT_MAP)?1:0,h={debouncer:ur,flags:n,customTooltipModel:o,actions:t,isLocked:f,hitRadius:e=>p(e),layoutService:a,chartModel:s};return n.isEnabled("VIZ_398_CHART_INTERACTION_REFACTOR")?function(e){var t=function(){var e,t,n,r,i,o,a,s,l,c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{actions:null!==(e=c.actions)&&void 0!==e?e:Re.ACTIONS,components:null!==(t=c.components)&&void 0!==t?t:Re.COMPONENTS,events:{onSelectStart:null!==(n=null===(r=c.events)||void 0===r?void 0:r.onSelectStart)&&void 0!==n?n:Re.EVENTS,onSelectEnd:null!==(i=null===(o=c.events)||void 0===o?void 0:o.onSelectEnd)&&void 0!==i?i:Re.EVENTS},hitRadius:null!==(a=c.hitRadius)&&void 0!==a?a:Re.HIT_RADIUS,isLocked:null!==(s=c.isLocked)&&void 0!==s?s:Re.IS_LOCKED,shapesAt:c.shapesAt,targets:null!==(l=c.targets)&&void 0!==l?l:Re.TARGETS}}(e);return{interactions:[Fe(t)],components:[]}}({actions:t,components:u,events:{onSelectStart:()=>{t.select.emit("binsRangeSelectionClear"),t.select.emit("selectionStart")},onSelectEnd:({chart:e})=>{EF({chart:e,layoutService:a})}},hitRadius:p,isLocked:f,targets:l}):function(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[qF(e,t)],components:[]}}(d,h)}const IF={components:[],interactions:[]};function LF({models:e,actions:t,legend:n,scales:r,chart:i,flags:o}){const{selectionService:a,dockService:s,layoutService:l,chartModel:c}=e,u=l.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),{isRangeSelectionsSupported:d}=l.meta;if(u)return{components:[],interactions:[]};const f=c.query.getDataHandler(),p=function({actions:e,selectionService:t,dockService:n,enableInteraction:r,isRangeSelectionsSupported:i,layoutService:o,chartModel:a,flags:s}){return!(t.getIsDimensionLocked()||!i)&&(s.isEnabled("VIZ_398_CHART_INTERACTION_REFACTOR")?Ie({actions:e,componentKey:YI.BRUSH.X_RANGE,dock:n.meta.x.dock,enable:r,eventKey:"xRange",events:{onRangeMove:({chart:e})=>{CF({chart:e,chartModel:a,layoutService:o})},onRangeEnd:({chart:e})=>{EF({chart:e,layoutService:o})}},fillTargets:[YI.COMPONENT.X_AXIS],onEdited:()=>{e.select.emit("end","xRange"),EF({chart:a.query.getChart(),layoutService:o})},scale:YI.SCALE.X,targets:[YI.COMPONENT.X_AXIS,YI.COMPONENT.POINT]}):NF({eventName:"xRange",key:YI.BRUSH.X_RANGE,targets:[YI.COMPONENT.X_AXIS,YI.COMPONENT.POINT],fillTargets:[YI.COMPONENT.X_AXIS],dock:n.meta.x.dock,scale:YI.SCALE.X,onEdited(){e.select.emit("end","xRange"),EF({layoutService:o,chart:a.query.getChart()})},enableInteraction:r},{actions:e,layoutService:o,chartModel:a}))}({actions:t,selectionService:a,dockService:s,enableInteraction:()=>!f.getMeta().isBinnedData,isRangeSelectionsSupported:d,layoutService:l,chartModel:c,flags:o})||IF,h=function({chart:e,actions:t,selectionService:n,dockService:r,enableInteraction:i,isRangeSelectionsSupported:o,layoutService:a,chartModel:s,flags:l}){return!(n.getIsDimensionLocked()||!o)&&(l.isEnabled("VIZ_398_CHART_INTERACTION_REFACTOR")?Ie({actions:t,componentKey:YI.BRUSH.BIN_X_RANGE,dock:r.meta.x.dock,enable:i,eventKey:"binXRange",events:{onRangeStart:()=>{t.select.emit("selectionStart")},onRangeMove:({chart:e})=>{CF({chart:e,chartModel:s,layoutService:a})},onRangeEnd:({chart:e})=>{EF({chart:e,layoutService:a})}},fillTargets:[YI.COMPONENT.X_AXIS],onEdited:()=>{t.select.emit("end","binXRange")},scale:YI.SCALE.BIN_X,targets:[YI.COMPONENT.X_AXIS,YI.COMPONENT.HEAT_MAP],toLabel:({datum:t})=>e.formatter(YI.FORMATTER.X)(t)}):NF({eventName:"binXRange",key:YI.BRUSH.BIN_X_RANGE,targets:[YI.COMPONENT.X_AXIS,YI.COMPONENT.HEAT_MAP],fillTargets:[YI.COMPONENT.X_AXIS],dock:r.meta.x.dock,scale:YI.SCALE.BIN_X,onEdited(){t.select.emit("end","binXRange")},toLabel:({datum:t})=>e.formatter(YI.FORMATTER.X)(t),enableInteraction:i},{actions:t,layoutService:a,chartModel:s}))}({actions:t,selectionService:a,dockService:s,chart:i,enableInteraction:()=>f.getMeta().isBinnedData,isRangeSelectionsSupported:d,layoutService:l,chartModel:c,flags:o})||IF,m=function({actions:e,selectionService:t,dockService:n,enableInteraction:r,isRangeSelectionsSupported:i,layoutService:o,chartModel:a,flags:s}){return!(t.getIsDimensionLocked()||!i)&&(s.isEnabled("VIZ_398_CHART_INTERACTION_REFACTOR")?Ie({actions:e,componentKey:YI.BRUSH.Y_RANGE,dock:n.meta.y.dock,enable:r,eventKey:"yRange",events:{onRangeMove:({chart:e})=>{CF({chart:e,chartModel:a,layoutService:o})},onRangeEnd:({chart:e})=>{EF({chart:e,layoutService:o})}},fillTargets:[YI.COMPONENT.Y_AXIS],onEdited:()=>{e.select.emit("end","yRange"),EF({chart:a.query.getChart(),layoutService:o})},scale:YI.SCALE.Y,targets:[YI.COMPONENT.Y_AXIS,YI.COMPONENT.POINT]}):NF({eventName:"yRange",key:YI.BRUSH.Y_RANGE,targets:[YI.COMPONENT.Y_AXIS,YI.COMPONENT.POINT],fillTargets:[YI.COMPONENT.Y_AXIS],dock:n.meta.y.dock,scale:YI.SCALE.Y,onEdited(){e.select.emit("end","yRange"),EF({layoutService:o,chart:a.query.getChart()})},enableInteraction:r},{actions:e,layoutService:o,chartModel:a}))}({actions:t,selectionService:a,dockService:s,enableInteraction:()=>!f.getMeta().isBinnedData,isRangeSelectionsSupported:d,layoutService:l,chartModel:c,flags:o})||IF,g=function({actions:e,selectionService:t,dockService:n,chart:r,enableInteraction:i,isRangeSelectionsSupported:o,layoutService:a,chartModel:s,flags:l}){return!(t.getIsDimensionLocked()||!o)&&(l.isEnabled("VIZ_398_CHART_INTERACTION_REFACTOR")?Ie({actions:e,componentKey:YI.BRUSH.BIN_Y_RANGE,dock:n.meta.y.dock,enable:i,eventKey:"binYRange",events:{onRangeStart:()=>{e.select.emit("selectionStart")},onRangeMove:({chart:e})=>{CF({chart:e,chartModel:s,layoutService:a})},onRangeEnd:({chart:e})=>{EF({chart:e,layoutService:a})}},fillTargets:[YI.COMPONENT.Y_AXIS],onEdited:()=>{e.select.emit("end","binYRange")},scale:YI.SCALE.BIN_Y,targets:[YI.COMPONENT.Y_AXIS,YI.COMPONENT.HEAT_MAP],toLabel:({datum:e})=>r.formatter(YI.FORMATTER.Y)(e)}):NF({eventName:"binYRange",key:YI.BRUSH.BIN_Y_RANGE,targets:[YI.COMPONENT.Y_AXIS,YI.COMPONENT.HEAT_MAP],fillTargets:[YI.COMPONENT.Y_AXIS],dock:n.meta.y.dock,scale:YI.SCALE.BIN_Y,onEdited(){e.select.emit("end","binYRange")},toLabel:({datum:e})=>r.formatter(YI.FORMATTER.Y)(e),enableInteraction:i},{actions:e,layoutService:a,chartModel:s}))}({actions:t,selectionService:a,dockService:s,chart:i,enableInteraction:()=>f.getMeta().isBinnedData,isRangeSelectionsSupported:d,layoutService:l,chartModel:c,flags:o})||IF,y=function({actions:e,selectionService:t,scales:n,legend:r,enableInteraction:i,layoutService:o,chartModel:a,flags:s}){const[l]=r?.components||[];if(!l)return!1;const{type:c,key:u}=l,{colorRange:d}=n;return!(t.getIsDimensionLocked()||"legend-seq"!==c||!d||d.min>=d.max)&&(s.isEnabled("VIZ_398_CHART_INTERACTION_REFACTOR")?Ie({actions:e,bubblesPlacement:"outside",componentKey:"legend-range-brush",dock:l.layout.dock,enable:i,eventKey:"legendRange",fillTargets:[u],onEdited:()=>{e.select.emit("end","legendRange"),EF({chart:a.query.getChart(),layoutService:o})},scale:"colorRange",targetFillSelector:'[id="legend-seq-ticks"]',targets:[u],targetSelector:'[id="legend-seq-target"]'}):NF({eventName:"legendRange",key:"legend-range-brush",targets:[u],fillTargets:[u],targetSelector:'[id="legend-seq-target"]',targetFillSelector:'[id="legend-seq-ticks"]',dock:l.layout.dock,scale:"colorRange",bubblesPlacement:"outside",onEdited:()=>{e.select.emit("end","legendRange"),EF({layoutService:o,chart:a.query.getChart()})},enableInteraction:i},{actions:e,layoutService:o,chartModel:a}))}({actions:t,selectionService:a,scales:r,legend:n,enableInteraction:()=>!0,layoutService:l,chartModel:c,flags:o})||IF;return{components:[...p.components,...m.components,...h.components,...g.components,...y.components],interactions:[...p.interactions,...m.interactions,...h.interactions,...g.interactions,...y.interactions]}}function PF({models:e,actions:t,flags:n}){const{selectionService:r,layoutService:i,chartModel:o}=e,a=r.getIsDimensionLocked(),s=i.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),l=[YI.COMPONENT.POINT,YI.COMPONENT.HEAT_MAP];if(a||s)return!1;const c={key:"lasso",componentTargetKeys:l,components:l.map(e=>({key:e,action:"add",contexts:["selection"]}))},u={actions:t,layoutService:i,chartModel:o};return n.isEnabled("VIZ_398_CHART_INTERACTION_REFACTOR")?function(e){var t=function(){var e,t,n,r,i,o,a,s,l,c,u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{actions:null!==(e=u.actions)&&void 0!==e?e:Le.ACTIONS,componentKey:null!==(t=u.componentKey)&&void 0!==t?t:Le.COMPONENT_KEY,components:null!==(n=u.components)&&void 0!==n?n:Le.COMPONENTS,events:{onLassoStart:null!==(r=null===(i=u.events)||void 0===i?void 0:i.onLassoStart)&&void 0!==r?r:Le.EVENTS,onLassoMove:null!==(o=null===(a=u.events)||void 0===a?void 0:a.onLassoMove)&&void 0!==o?o:Le.EVENTS,onLassoEnd:null!==(s=null===(l=u.events)||void 0===l?void 0:l.onLassoEnd)&&void 0!==s?s:Le.EVENTS},targetKeys:null!==(c=u.targetKeys)&&void 0!==c?c:Le.TARGET_KEYS}}(e),n=function(e){var t=e.actions,n=e.componentKey,r=e.events,i=e.targetKeys;return{key:"event:lasso",type:"Pan",requireFailure:void 0,recognizeWith:void 0,options:{event:Pe,enable:function(e,n){return this.started===Pe||!n||!!(t.select.enabled()&&t.lasso.enabled()&&t.lasso.active())&&this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some(function(e){return-1!==i.indexOf(e.key)})}},events:x(x(x({},"".concat(Pe,"start"),function(e){e.preventDefault(),this.started!==Pe&&(t.select.emit("start",Pe),this.chart.component(n).emit("lassoStart",e),this.started=Pe,r.onLassoStart({chart:this.chart}))}),"".concat(Pe,"move"),function(e){e.preventDefault(),this.chart.component(n).emit("lassoMove",e),r.onLassoMove({chart:this.chart})}),"".concat(Pe,"end"),function(e){e.preventDefault(),this.started=Pe,this.chart.component(n).emit("lassoEnd",e),t.select.emit("end",Pe),r.onLassoEnd({chart:this.chart})})}}(t),r=function(e){return{key:"lasso",type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:e.components},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.7},startPoint:{r:10,stroke:"rgba(77, 192, 78, 1)",strokeWidth:0,opacity:1}}}}(t);return{interactions:[n],components:[r]}}({actions:t,componentKey:"lasso",components:l.map(e=>({key:e,action:"add",contexts:["selection"]})),events:{onLassoStart:()=>{t.select.emit("binsRangeSelectionClear"),t.select.emit("selectionStart")},onLassoMove:({chart:e})=>{CF({chart:e,chartModel:o,layoutService:i})},onLassoEnd:({chart:e})=>{EF({chart:e,layoutService:i})}},targetKeys:l}):function(e,t){if(!e.componentTargetKeys.length)throw new Error("Missing 'componentTargetKey' property");const n={key:"lasso",...e},r=(({key:e,components:t})=>({key:e,type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:t},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.7},startPoint:{r:10,stroke:"rgba(77, 192, 78, 1)",strokeWidth:0,opacity:1}}}))(n);return{interactions:[DF(n,t)],components:[r]}}(c,u)}const RF={components:[],interactions:[]};function zF({colorService:e}){const{type:t}=e.getSettings();if("categorical"===t)return{item:{shape:{type:"circle",size:KI.LEGEND_CAT.SYMBOL.SIZE},label:{wordBreak:"break-word",maxLines:2}}}}function FF({core:e,models:t,model:n,theme:r,options:i,constraints:o,translator:a,logicalSize:s,flags:l,animationsEnabled:c}){const{chart:u,actions:d,picasso:f}=e,{chartModel:p,colorService:h,pluginService:m,styleModel:g}=t,y=p.query.getViewHandler(),v=p.query.getViewState(),b=p.query.getLocaleInfo(),x={rtl:"rtl"===i.direction,theme:r,translator:a,constraints:o,model:n,localeInfo:b},w=function({viewState:e,chart:t,options:n,colorService:r,actions:i,styleModel:o}){const a="rtl"===n.direction,s={eventName:"legend-c",key:YI.COMPONENT.LEGEND,viewState:e,chart:t,styleReference:"object.scatterPlot",styleOverrides:{title:o.query.legend.title.getStyle(),label:o.query.legend.label.getStyle()},rtl:a,settings:zF({colorService:r})},{components:l,interactions:c}=r.getLegend(s,{actions:i,navigationDisabled:!i.interact.enabled()}),u=r.getScales()[`${YI.SCALE.COLOR}Range`],[d]=l,f=d&&d.layout.dock;return u&&(u.invert="right"===f||"left"===f||a),{components:[...l],gestures:[...c]}}({viewState:v,chart:u,options:i,colorService:h,actions:d,styleModel:g}),S=lF({models:t,viewState:v,options:i,theme:r,rtl:x.rtl,chart:u}),M=function({layoutService:e,colorService:t}){return[{key:YI.COLLECTION.MAIN,data:{extract:{field:YI.FIELDS.DIM,props:{x:{field:YI.FIELDS.X},y:{field:YI.FIELDS.Y},size:e.meta.hasSizeMeasure?{field:YI.FIELDS.SIZE}:void 0,selectionDimension:{field:YI.FIELDS.DIM},...t.getDatumProps(0),customTooltipAttrExps:WR.getNode(e.getLayout(),{dimensionCount:1})}}}}]}(t),k=function({core:e,context:t,models:n,picasso:r,chart:i,actions:o,animationsEnabled:a,legend:s,flags:l}){const{disclaimerService:c,layoutService:u,themeService:d,chartModel:f,trendLinesService:p,tooltipService:h,styleModel:m}=n,g=function({disclaimerService:e,context:t,layoutService:n,themeService:r,picasso:i}){const o=e.getDisclaimer(),a=i.formatter("q-number");if(!o)return!1;const{rtl:s,translator:l}=t,{fontFamily:c}=r.getStyles();return{key:"disclaimer",type:"disclaimer",renderer:"react-qcm",layout:{dock:o.alignment},resize:({outer:e})=>e,settings:{label:"OverviewData"===o.key?l.get("properties.compression.providingOverviewOf",a("#.#",void 0,void 0,"U")(n.getHyperCubeValue("qSize.qcy",0))):l.get(`Object.Disclaimer.${o.key}`),isRTL:s},style:{fontFamily:c}}}({disclaimerService:c,context:t,layoutService:u,themeService:d,picasso:r});return c.getHasSuppressingDisclaimer()?[g]:[...Tz({models:n}),iz(n,a),...Dz({models:n,context:t,animationsEnabled:a,flags:l}),...sF({chart:i,models:n,animationsEnabled:a,flags:l}),...aF({chart:i,models:n,animationsEnabled:a,context:t,flags:l}),yz({models:n,chart:i,animationsEnabled:a}),bz(f,a),Bz({chartModel:f,layoutService:u,actions:o,context:t}),...p.getComponents(),...az({models:n,animationsEnabled:a}),...cz({core:e,models:n,context:t}),_z({models:n,animationsEnabled:a}),Nz({models:n,context:t,chart:i}),...s.components,Iz({models:n,context:t,chart:i}),g,wz({themeService:d,chartModel:f,picasso:r,context:t,animationsEnabled:a}),...jz({models:n,chart:i,actions:o,context:t}),...Hz({models:n,context:t}),...h.getComponents()].filter(Boolean)}({core:e,models:t,context:x,picasso:f,chart:u,actions:d,animationsEnabled:c,legend:w,flags:l}),E=function({models:e,actions:t,legend:n,scales:r,flags:i,chart:o}){const a=OF({models:e,actions:t,flags:i})||RF,s=LF({models:e,actions:t,legend:n,scales:r,chart:o,flags:i})||RF,l=PF({models:e,actions:t,flags:i})||RF;return{components:[...a.components,...s.components,...l.components],gestures:[...a.interactions,...s.interactions,...l.interactions]}}({models:t,actions:d,legend:w,scales:S,flags:l,chart:u}),C=[...k,...E.components];return{interactions:kF({chart:u,actions:d,viewHandler:y,gestures:[...E.gestures],legend:w,models:t,rtl:x.rtl}),scales:S,components:m.extendComponents(C),collections:M,palettes:h.getPalettes(),strategy:{layoutModes:KI.LAYOUT_MODES,center:{minWidthRatio:0,minHeightRatio:0},logicalSize:s},formatters:{[YI.FORMATTER.X]:{data:{fields:[YI.FIELDS.X]}},[YI.FORMATTER.Y]:{data:{fields:[YI.FIELDS.Y]}}}}}function jF({viewState:e,viewStateOptions:t={},models:n}){const{layoutService:r,tickModel:i,chartModel:o,extremumModel:a}=n,s=r.meta.isSnapshot?r.getLayoutValue("snapshotData.content.chartData",{}):t,l=o.query.getViewHandler();l.getMeta().isHomeState&&a.command.resetExtrema();const[c,u]=i.query.getXMinMax(),[d,f]=i.query.getYMinMax();e.preventSet("legendScrollOffset",s.legendScrollOffset||0);const p=JSON.stringify(e.get("dataView"))===JSON.stringify({xAxisMin:c,xAxisMax:u,yAxisMin:d,yAxisMax:f});n.chartModel.command.setMeta({isDataViewUnchanged:p}),e.preventSet("dataView",{xAxisMin:c,xAxisMax:u,yAxisMin:d,yAxisMax:f}),l.getMeta().isHomeState&&l.setMeta({homeStateDataView:e.get("dataView")})}const VF=({core:t,models:n,flags:r})=>{const i=e.useRect(),[o,a]=e.useState(),s=e.useModel(),l=e.useTheme(),c=e.useOptions(),u=e.useConstraints(),d=e.useTranslator();e.useSelections();const f=e=>FF({core:t,models:n,model:s,theme:l,options:c,constraints:u,translator:d,logicalSize:e,flags:r,animationsEnabled:n.chartModel.query.animationsEnabled});return e.usePromise(async()=>{if(!n)return Promise.resolve();const{alternativeService:e,disclaimerService:r,layoutService:i,chartModel:o,colorService:l,pluginService:u,propertiesModel:d}=n;BR.attrExpr.updateProperties(s,i.getLayout());const{viewState:p}=t,h=TR({layout:i.getLayout(),options:c}),m=o.query.getDataHandler();return await m.fetch().catch(()=>{}),await u.initialize(),await d.command.initialize(),await e.initialize({properties:d.query.getProperties()||{}}),r.initialize(),l.initialize().finally(()=>{l.custom.updateBrushAliases();const e=f(h);o.command.layoutComponents({settings:e}),function({viewState:e,viewStateOptions:t={},models:n}){const{disclaimerService:r,chartModel:i}=n;if(r.getHasSuppressingDisclaimer())return;i.query.getViewHandler().setMeta({isHomeState:!0}),jF({viewState:e,viewStateOptions:t,models:n})}({viewState:p,viewStateOptions:c.viewState,models:n}),a(e)})},[n]),e.useEffect(()=>{if(!n||!n?.colorService.isInitialized())return;const{layoutService:e,chartModel:r,dockService:o}=n,{viewState:s}=t,l=TR({layout:e.getLayout(),options:c});o.update(l||i);const u=f(l||i);r.command.setMeta({isSizeChanging:!0}),r.command.layoutComponents({settings:u}),r.command.setMeta({isSizeChanging:void 0}),jF({viewState:s,viewStateOptions:c.viewState,models:n}),a(u)},[i.width,i.height]),o};function HF(e){const t=e?.getMeasures()||[];2===t.length?e.setSorting([2,1,0]):3===t.length&&e.setSorting([3,2,1,0])}function BF({translator:e}){return{dimensions:{min:1,max:1,description:()=>e.get("Visualizations.Descriptions.Bubble")},measures:{min:2,max:3,description(t,n){let r;return r=0===n?"properties.xAxis":1===n?"properties.yAxis":2===n?"Visualizations.Descriptions.Size":"Visualizations.Descriptions.Color",e.get(r)},add(e,t,n){HF(n),e.qSortBy.qSortByNumeric=-1},remove(e,t,n){HF(n),function(e,t){const n=t?.getMeasures()||[],{mode:r}=e.color;"byExpression"===r&&0===n.length&&(e.color.mode="primary")}(t,n)}}}}function $F(e){return{properties:{version:"3.60.1",color:{auto:!0,mode:"primary",formatting:{numFormatFromTemplate:!0},useBaseColors:"off",paletteColor:{index:6},useDimColVal:!0,useMeasureGradient:!0,persistent:!1,expressionIsColor:!0,expressionLabel:"",measureScheme:"sg",reverseScheme:!1,dimensionScheme:"12",autoMinMax:!0,measureMin:0,measureMax:10,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0},dataPoint:{bubbleSizes:5,rangeBubbleSizes:[2,8],compressionResolution:5},disableNavMenu:!1,footnote:"",labels:{mode:1},gridLine:{auto:!0,spacing:2},legend:{dock:"auto",show:!0,showTitle:!0},maxVisibleBubbles:2500,navigation:!1,qHyperCubeDef:{qDimensions:[],qMeasures:[],qSuppressMissing:!0},refLine:{refLinesX:[],refLinesY:[]},trendLines:[],showDetails:!1,showDisclaimer:!0,showTitles:!0,subtitle:"",title:"",tooltip:{auto:!0,hideBasic:!1,title:"",description:"",chart:void 0,imageComponents:void 0},xAxis:{show:"all",dock:"near",spacing:1,autoMinMax:!0,minMax:"min",min:0,max:10},yAxis:{show:"all",dock:"near",spacing:1,autoMinMax:!0,minMax:"min",min:0,max:10},components:[]},data:{targets:[{path:"/qHyperCubeDef",...BF(e)}]}}}var WF,UF={exports:{}};var YF=(WF||(WF=1,function(e){self,e.exports=(()=>{var e={909:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,c,u,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(h&&i&&(a(i)||(c=o(i)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(h,u,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}},8:(e,t)=>{(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,i=t.call(e,"constructor"),o=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!i&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)},s=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(i)return i(e,n).value}return e[n]};e.exports=function e(){var t,n,r,i,c,u,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=l(d,n),d!==(i=l(t,n))&&(h&&i&&(a(i)||(c=o(i)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(h,u,i)})):void 0!==i&&s(d,{name:n,newValue:i}));return d}}},n={};function r(t){var i=n[t];if(void 0!==i)return i.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};(()=>{r.r(i),r.d(i,{default:()=>Te});var e=r(229),t=r.n(e);const n=function(e,t,n){if(!t)return!1;var r,i=t.split("."),o=i[i.length-1],a=e;for(r=0;r<i.length-1;++r)void 0===a[i[r]]&&(a[i[r]]=Number.isNaN(+i[r+1])?{}:[]),a=a[i[r]];if(void 0!==n){var s=a[o];return a[o]=n,{updated:n,previous:s}}return delete a[o],!1},o=function(e,t,n){var r,i=t.split("."),o=e;if(void 0===o)return n;for(r=0;r<i.length;++r){if(void 0===o[i[r]])return n;o=o[i[r]]}return o},a={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var s="".concat(" ","(").concat("　"),l="".concat("　",")").concat(" ");function c(e){return s+e+l}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,i=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===i)return r;if(r.qDerivedFieldData)for(var o=0;o<r.qDerivedFieldData.qDerivedFieldLists.length;++o)for(var a=r.qDerivedFieldData.qDerivedFieldLists[o],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===i)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function d(e){return!(!e.fullAccumulation&&!e.fullRange)}function f(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function p(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),n=t.trim();return"="===n.substring(0,1)?n.substring(1).trim():n}function h(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function m(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function y(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function v(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(y("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(y("MaxString(".concat(t,")")),")'\"}")}function b(e){var t=e.modifier,n=void 0===t?{}:t,r=e.dimensions,i=e.dimensionAndFieldList,o=e.funcComp,a=void 0===o?"Sum":o,s=e.valueComp,l=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var c=v(u(r[0],i),h(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(r&&2===r.length){var d=u(r[0],i),f=u(r[1],i),p=h(0),m=h(1),g=v(d,p),y=v(f,m);return"".concat(a,"({1<").concat(g,",").concat(y,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function x(e){return"".concat(e,"(")}function w(e){var t=e.properties,n=e.layout;return o(t,"qHyperCubeDef.qDimensions",o(n,"qHyperCube.qDimensionInfo",[])).length}const S={isFullRange:d,getNumDimensions:w,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,i=e.dimensionAndFieldList,o=e.treatMissingAsNull,a=c(p(t));if(!n.showExcludedValues)return a;var s=b({modifier:n,dimensions:r,dimensionAndFieldList:i}),l=o?"":", 0";if(r&&1===r.length){var u=h(0);return"If(Count(".concat(u,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var d=h(0),f=h(1);return"If(Count(".concat(d,") * Count(").concat(f,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:f,getNumStepComp:function(e,t){if(!d(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return f(e,t)},getAboveCompPrefix:m,getAboveCompSuffix:g,getAboveComp:function(e,t,n,r){return m(e,t)+n+g(r)},getFunctionPrefix:x,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return x(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:b,needDimension:function(e){var t=e.modifier,n=e.properties,r=e.layout,i=function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t);return 0===i&&2===w({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=h(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var i=["Descending","Ascending"],o=n.qSortByNumeric?"(Numeric, ".concat(i[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(i[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(o,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(o,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:p,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(s);if(-1!==n){var r=t.indexOf(l);if(-1!==r)return t.substring(n+s.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach(function(n){void 0===e[n]&&(e[n]=t[n])})},isNumeric:u,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,i=void 0===r?1:r,o=e.maxDimensions,a=void 0===o?2:o;if(!t&&!n)return!0;var s=w({properties:t,layout:n});return s>=i&&s<=a},getExpressionWithMarkers:c,canExtract:function(e){var t=e.indexOf(s),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:h,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,n){var r=t||e.outputExpression;if(e.base&&e.base.qDef&&(r=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var i=n.qHyperCubeDef.qMeasures.find(function(t){return t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null});i&&t!==i.qDef.qLabel&&(r=i.qLibraryId||i.qDef.base.qLibraryId?"[".concat(i.qDef.qLabel,"]"):i.qDef.base.qDef);var o=function(e){var t=a.OPTIONS.find(function(t){return t.value===e.decomposition});return t?a.EXPRESSIONS[t.value]:""}(e);r=r.startsWith("=")?r.substr(1):r,r="".concat(o,"(").concat(r,", ").concat(e.steps,")")}return r},getDecomposition:function(e){var t="observed";return Object.values(a.EXPRESSIONS).find(function(n){var r=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return a.EXPRESSIONS[n]&&r.includes(a.EXPRESSIONS[n].toLowerCase())&&(t=n),n}),t}};function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}var E=t().bind(null,!0),C={},A=Array.isArray;function D(e){return null!=e&&!Array.isArray(e)&&"object"===k(e)}function q(e){return void 0===e}function _(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function T(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach(function(t,i){if(i!==r.length){n=+t;var o=Number.isNaN(n)?{}:[];e[n||t]=q(e[n||t])?o:e[t],e=e[n||t]}}),e}function N(e,t){var n=!0;if(D(e)&&D(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach(function(r){N(e[r],t[r])||(n=!1)}),n);if(A(e)&&A(t)){if(e.length!==t.length)return!1;for(var r=0,i=e.length;r<i;r+=1)if(!N(e[r],t[r]))return!1;return!0}return e===t}C.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach(function(i){var o=function(e){return e?E({},{val:e}).val:e}(t[i]),a=e[i],s="".concat(n,"/").concat(i);N(o,a)||_(t,i)||(q(a)?r.push({op:"add",path:s,value:o}):D(o)&&D(a)?r=r.concat(C.generate(a,o,s)):A(o)&&A(a)?r=r.concat(function(e,t,n){var r=[],i=e.slice(),o=-1;function a(e,t,n){if(e[n]&&q(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,i=e.length;r<i;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(N(t,i))return r;if(!q(t[0])&&q(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=i.length-1;s>=0;s-=1)-1===(o=a(t,i[s].qInfo&&i[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),i.splice(s,1)):r=r.concat(C.generate(i[s],t[o],"".concat(n,"/").concat(s)));for(var l=0,c=t.length;l<c;l+=1)-1===(o=a(i,t[l].qInfo&&t[l].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(l),value:t[l]}),i.splice(l,0,t[l])):o!==l&&(r.push({op:"move",path:"".concat(n,"/").concat(l),from:"".concat(n,"/").concat(o)}),i.splice(l,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:"".concat(n,"/").concat(i),value:o}))}),Object.keys(e).forEach(function(i){q(t[i])&&!_(e,i)&&r.push({op:"remove",path:"".concat(n,"/").concat(i)})}),r},C.apply=function(e,t){t.forEach(function(t){var n,r,i=T(e,t.path),o=t.path.split("/").splice(-1)[0],a=o&&Number.isNaN(+o)?i[o]:i[+o]||i,s=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(i=null,a=e),"add"===t.op||"replace"===t.op)if(A(i))"-"===o&&(o=i.length),i.splice(+o,"add"===t.op?0:1,t.value);else if(A(a)&&A(t.value)){var l,c=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return M(e)}(r=c)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}(r)||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.")}())}else if(D(a)&&D(t.value))n=a,Object.keys(n).forEach(function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!_(n,e)&&delete n[e]}),E(a,t.value);else{if(!i)throw new Error("Patchee is not an object we can patch");i[o]=t.value}else if("move"===t.op){var u=T(e,t.from);A(i)?i.splice(+o,0,u.splice(+s,1)[0]):(i[o]=u[s],delete u[s])}else"remove"===t.op&&(A(i)?i.splice(+o,1):delete i[o])})},C.clone=function(e){return E({},e)},C.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},C.updateObject=function(e,t){Object.keys(e).length?C.apply(e,C.generate(e,t)):E(e,t)};const O=C,I=function(e,n,r){if(!e)return Promise.resolve();var i=O.generate(n,r);return t()(!0,n,r),i&&i.length?(i=i.map(function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}}),e.applyPatches(i,!0)):Promise.resolve()};var L="accumulation";function P(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===L)return n[r]}function R(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===L)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var z={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const F={translationKey:"properties.modifier.accumulation",needDimension:S.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return S.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=S.getNumDimensions({properties:r,layout:i}));var c=o(r,"qHyperCubeDef.qDimensions",[]),u=S.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=S.getNumStepComp(n,l),f=S.getAboveComp(n,l,u,d),p=S.getRangeComp("RangeSum",f);if(S.needDimension({modifier:n,properties:r,layout:i})){var h=S.getDimComp(c,1),m=S.getDimComp(c,0),g=S.getAggrComp(p,h,m);p=n.showExcludedValues?S.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,valueComp:g}):g}return p},extractInputExpression:S.extractInputExpression,initModifier:function(e){S.initModifier(e,z)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!S.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(R(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(R(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(R(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(R(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=P(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=P(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(R(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return S.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(L))return!1;var o=P(t,e);return o&&!o.disabled}};return n}};var j="movingAverage";function V(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===j)return n[r]}function H(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===j)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var B={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const $={translationKey:"properties.modifier.movingAverage",needDimension:S.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return S.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,i=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var c=s;void 0===c&&(c=S.getNumDimensions({properties:i,layout:a}));var u=o(i,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,f=S.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:u,dimensionAndFieldList:l,treatMissingAsNull:d}),p=S.getNumStepComp(r,c),h=S.getAboveComp(r,c,f,p);if(r.nullSuppression)t=S.getRangeComp("RangeAvg",h);else{var m=S.getRangeComp("RangeSum",h),g=function(e,t){var n=S.getRowNoComp(e,t);if(!S.isFullRange(e)){var r=e.steps,i="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(i,", ").concat(n,")")}return n}(r,c);t="".concat(m," / ").concat(g)}var y=t;if(S.needDimension({modifier:r,properties:i,layout:a})){var v=S.getDimComp(u,1),b=S.getDimComp(u,0),x=S.getAggrComp(y,v,b);y=r.showExcludedValues?S.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return y},extractInputExpression:S.extractInputExpression,initModifier:function(e){S.initModifier(e,B)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!S.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(H(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(H(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(H(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(H(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=V(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=V(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat(H(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat(H(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return S.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(j))return!1;var o=V(t,e);return o&&!o.disabled}};return n}};var W="timeSeriesDecomposition";function U(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===W)return n[r]}function Y(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===W)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var X={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const G={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:S.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return S.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties;return n?S.generateTSDExpression(n,t,r):t},extractInputExpression:S.extractInputExpression,initModifier:function(e,t){S.initModifier(e,X),""===e.decomposition&&t&&(e.decomposition=S.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!S.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(Y(t,e),".decomposition")},type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:a.OPTIONS},steps:{refFn:function(t){return"".concat(Y(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,n){var r=U(t,e);if(r){var i=r.steps;r.steps="number"!=typeof i||Number.isNaN(i)?2:Math.abs(i),n.properties.qHyperCubeDef.qMeasures=n.properties.qHyperCubeDef.qMeasures.map(function(e){return e.qDef.modifiers.map(function(e){return"timeSeriesDecomposition"===e.type?e.steps=i:e.steps=e.steps,e}),e})}},show:function(t){var n=U(t,e);return n&&!n.fullRange}}},show:function(e,t){return S.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(W))return!1;var o=U(t,e);return o&&!o.disabled}};return n}};var K="difference";function Z(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===K)return n[r]}function J(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===K)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Q={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:S.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return S.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:S.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=S.getNumDimensions({properties:r,layout:i}));var c=o(r,"qHyperCubeDef.qDimensions",[]),u=S.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=S.getAboveComp(n,l,u),f="".concat(u," - ").concat(d);if(S.needDimension({modifier:n,properties:r,layout:i})){var p=S.getDimComp(c,1),h=S.getDimComp(c,0),m=S.getAggrComp(f,p,h);f=n.showExcludedValues?S.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,funcComp:"Only",valueComp:m}):m}return f},initModifier:function(e){Object.keys(Q).forEach(function(t){void 0===e[t]&&(e[t]=Q[t])})},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!S.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(J(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(J(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(J(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return S.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(K))return!1;var o=Z(t,e);return o&&!o.disabled}};return n}};var te="normalization";function ne(e,t){var n=o(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===te)return n[r]}function re(e,t){var n=function(e,t){var n=o(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===te)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function ie(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}var oe={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function ae(e){return 2===e?"{1}":""}function se(e,t,n){return 1===e?"{$<".concat(S.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ce(e,t,n){return 0===e&&t>1?"<".concat(S.getDimDefWithWrapper(n),">"):""}const ue={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return S.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:S.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,i=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=S.getNumDimensions({properties:r,layout:i}));var c=o(r,"qHyperCubeDef.qDimensions",[]),u=S.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=n.selectionScope,f=n.dimensionalScope;return function(e,t,n,r,i,o,a){var s=ae(t),l=se(t,n,r),c=""===s&&""===l?"":s||l,u=le(i,o),d=ce(i,o,a),f=function(e){for(var t=[],n=0;n<e;n++)t[n]=S.getDimDefWithWrapper(n);return t.join(", ")}(o);return"".concat(e,"/ Sum(").concat(c," ").concat(u).concat(d," Aggr(").concat(c," ").concat(e,", ").concat(f,"))")}(u,d,n.field,n.value,f,l,n.primaryDimension)},initModifier:function(e){Object.keys(oe).forEach(function(t){void 0===e[t]&&(e[t]=oe[t])})},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!S.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(re(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(n){return function(e,t,n){var r=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return r=function(e,t){if(1===e){var n=ie(t,0);t.splice(n,1)}return t}(ne(e,n).dimensionalScope,r),r}(n,t,e)}},field:{refFn:function(t){return"".concat(re(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,n){return n.app.getFieldList().then(function(e){return e.map(function(e){return{label:e.qName,value:e.qName}})})},show:function(t){return 1===ne(t,e).selectionScope}},value:{refFn:function(t){return"".concat(re(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===ne(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(re(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(n,r){return function(e,t,n,r){var i=t.layout.qHyperCube.qDimensionInfo.length,o=[{value:0,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===i?"disregardAllDimensions":"disregardDimension",".tooltip")}];return o=function(e,t){if(e<2){var n=ie(t,0);t.splice(n,1)}return t}(i,o),o=function(e,t){if(0===e){var n=ie(t,1);t.splice(n,1)}return t}(ne(e,r).selectionScope,o),o}(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(re(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(t,n){return 0===(ne(t,e).dimensionalScope||0)&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return S.isApplicable({properties:t.properties})}}},show:function(t,n,r){var i=r.ext.support.modifiers;if(!Array.isArray(i)||-1===i.indexOf(te))return!1;var o=ne(t,e);return o&&!o.disabled}};return n},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ce};var de="qDef.base",fe="qDef.qDef",pe="qDef.base.qDef",he="qLibraryId",me="qDef.base.qLibraryId";const ge={getExpression:function(e){var t=o(e,pe);return void 0!==t?t:o(e,fe)},getExpressionRef:function(e){return void 0!==o(e,pe)?pe:fe},getLibraryIdRef:function(e){return o(e,me)?me:he},getLibraryId:function(e){return o(e,me)||o(e,he)},getLabelRef:function(e){return o(e,de)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return o(e,de)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var ye="qDef.qDef",ve="qDef.base.qDef",be="qLibraryId",xe="qDef.base.qLibraryId",we="qDef.qLabel",Se="qDef.qLabelExpression",Me="qDef.base.qLabel",ke="qDef.base.qLabelExpression",Ee="qDef.qAggrFunc",Ce="qDef.base.qAggrFunc",Ae={initBase:function(e,t){(t||Ae.isValid(e))&&(n(e,ve,o(e,ye)),n(e,xe,o(e,be)),n(e,Me,o(e,we)),n(e,ke,o(e,Se)))},restoreBase:function(e){Ae.isValid(e)&&(n(e,ye,o(e,ve)),n(e,be,o(e,xe)),n(e,we,o(e,Me)),n(e,Se,o(e,ke)),o(e,Ee)&&o(e,Ce)&&n(e,Ee,o(e,Ce)),delete e.qDef.base)},isValid:function(e){var t=o(e,ve),n=o(e,xe);return void 0!==t||void 0!==n}};const De=Ae;function qe(e){return qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qe(e)}var _e={accumulation:F,movingAverage:$,difference:ee,normalization:ue,timeSeriesDecomposition:G};const Te={modifiers:_e,apply:Oe,applyModifiers:Ie,cleanUpMeasure:Le,destroy:function(e){e&&Ne[e.id]&&Ne[e.id].masterItemSubscriber&&(Ne[e.id].masterItemSubscriber&&Ne[e.id].masterItemSubscriber.unsubscribe(),delete Ne[e.id])},hasActiveModifiers:Pe,getActiveModifier:Re,initBase:De.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some(function(e){return _e[e]})},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return _e[e]&&_e[e].isApplicable({properties:n,layout:r})})},measureBase:ge,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,i=!1,o=!1;return t.forEach(function(e){var t=je(e);Ye({modifiers:t,properties:n,layout:r})&&(i=!0,o=o||Je({modifiers:t,properties:n,layout:r}))}),i&&!o},ifEnableTotalsFunction:ze};var Ne={};function Oe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.model,r=e.properties,i=e.isSnapshot,a=void 0!==i&&i,s=e.masterItem,l=!1;Ne[n.id]=Ne[n.id]||{isFirstTime:!0};var c=Ne[n.id].isFirstTime;if(Ne[n.id].isFirstTime=!1,r&&"object"===qe(r))return Ie({model:n,properties:r});var u=n?n.layout:void 0,d=o(u,"qSelectionInfo.qInSelections");if(a||d)return Promise.resolve(l);var f=o(u,"qHyperCube.qMeasureInfo"),p=Ne[n.id].lastReloadTime;if(Ne[n.id].lastReloadTime=o(n,"app.layout.qLastReloadTime"),Pe({measures:f,layout:u})){var h=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return o(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ue({measure:e,properties:n,layout:r})})}({measures:t,layout:n})}({measures:f,layout:u,model:n,lastReloadTime:p});return h||function(e){var t=e.measures,n=e.layout,r=e.masterItem,i=e.isFirstTime;return!!Array.isArray(t)&&(i||r||t.some(function(e){return function(e){var t=e.measure,n=e.layout;return Ye({modifiers:je(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})}))}({measures:f,layout:u,masterItem:s,isFirstTime:c})?n.getEffectiveProperties().then(function(e){var r=t()(!0,{},e);He(r);var i=Qe(r);return Xe({model:n}).then(function(t){return Ge({libraryIds:i,model:n}).then(function(i){return h&&function(e){var t=e.properties;Fe(t).forEach(function(e){return function(e){var t=e.measure;if(Ue({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach(function(e){if("object"===qe(e)&&!e.disabled){if(n++,"object"!==qe(_e[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(n>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var r=_e[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&$e(t)&&S.simplifyExpression(t.qDef.base.qDef)!==S.simplifyExpression(r)&&(t.qDef.base.qDef=r)}})}}({measure:e,properties:t})})}({properties:r}),Ie({model:n,oldProperties:e,properties:r,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:i,dimensionAndFieldList:t})})})}):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some(function(e){return"object"===qe(e.base)})}(f)?n.getEffectiveProperties().then(function(e){return function(e){var n=e.model,r=e.properties,i=Qe(r);return et({model:n,libraryIds:i}).then(function(){var e=t()(!0,{},r);return Fe(r).forEach(function(e){return Le(e)}),Ze({oldProperties:e,newProperties:r,model:n})})}({model:n,properties:e})}):Promise.resolve(l)}function Ie(e){var n=e.model,r=e.oldProperties,i=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===r&&(r=l?t()(!0,{},i):i),He(i);var f=Qe(i);return et({model:n,libraryIds:f,masterItem:c}).then(function(){return function(e){var n=e.measures,r=e.properties,i=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(n||(n=Fe(r)),!n.length)return Promise.resolve();if(!Pe({measures:n,properties:r}))return n.forEach(function(e){return Le(e)}),Promise.resolve();var l=a?void 0:Qe(r);return Xe({model:i,dimensionAndFieldList:s}).then(function(e){return Ge({libraryIds:l,model:i,libraryItemsProps:a}).then(function(i){n.forEach(function(n){Ye({modifiers:n.qDef.modifiers,properties:r})?(function(e){var n=e.measure,r=e.properties,i=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;De.isValid(n)||De.initBase(n,!0);var l=n.qDef,c=l.modifiers,u=l.base;Array.isArray(c)&&c.forEach(function(e){if("object"===qe(e)&&!e.disabled){if(s++,"object"!==qe(_e[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");_e[e.type].initModifier(e,n);var l=n.qLibraryId||u&&u.qLibraryId;l?function(e){var n=e.measure,r=e.modifier,i=e.properties,o=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:_e[r.type].generateExpression({expression:s,modifier:r,properties:i,dimensionAndFieldList:o});r.outputExpression=l,n.qDef.qDef=r.outputExpression,(n.qDef.qLabel||a.qMeasure.qLabel)&&(n.qDef.qLabel=a.qMeasure.qLabel),(n.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(n.qDef.qLabelExpression=a.qMeasure.qLabelExpression),n.qDef.quarantine&&n.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(n.qDef.qNumFormat=a.qMeasure.qNumFormat,n.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete n.qLibraryId,n.qDef.coloring=a.qMeasure.coloring,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,libraryId:l,properties:r,libraryItemsProps:i,dimensionAndFieldList:a}):function(e){var n=e.measure,r=e.modifier,i=e.properties,o=e.dimensionAndFieldList;"function"==typeof _e[r.type].updateModifier&&_e[r.type].updateModifier(r,i.qHyperCubeDef);var a=ge.getExpression(n),s=""===a?a:_e[r.type].generateExpression({expression:a,modifier:r,properties:i,dimensionAndFieldList:o});r.outputExpression=s,n.qDef.qDef=r.outputExpression,n.qDef.base.qLabelExpression?n.qDef.qLabelExpression=n.qDef.base.qLabelExpression:n.qDef.qLabel=n.qDef.base.qLabel||a,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,properties:r,dimensionAndFieldList:a}),function(e){var t=o(e,"qDef.qAggrFunc");"Expr"!==t||ze(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&ze(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(n)}})}({measure:n,properties:r,libraryItemsProps:i,dimensionAndFieldList:e}),Be(n)):Le(n)})})})}({measures:a,properties:i,model:n,libraryItemsProps:u,dimensionAndFieldList:d}).then(function(){return l?Ze({oldProperties:r,newProperties:i,model:n}):Promise.resolve(!1)})})}function Le(e){!function(e){var t=je(e);return Array.isArray(t)&&t.some(function(e){return"object"===qe(e)&&!e.disabled&&!_e[e.type]})}(e)?De.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Be(e)}function Pe(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ye({modifiers:je(e),properties:n,layout:r})})}function Re(e){var t=je(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(_e[r.type]&&!r.disabled)return r}}function ze(e){var t=Re(e);return!t||_e[t.type].enableTotalsFunction(e)}function Fe(e){return o(e,"qHyperCubeDef.qMeasures",[]).concat(o(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function je(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function Ve(e){return o(e,"outputExpression.qValueExpression.qExpr")||o(e,"outputExpression")}function He(e){Fe(e).forEach(function(e){return function(e){var n=Re(e);n&&(void 0!==n.outputExpression&&Ve(n)!==e.qDef.qDef?delete e.qDef.base:!De.isValid(e)&&n.base&&(e.qDef.base=t()(!0,{},n.base)))}(e)})}function Be(e){var t=je(e);Array.isArray(t)&&t.forEach(function(t){"object"===qe(t)&&(t.disabled||!_e[t.type]&&Ve(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)})}function $e(e){return e.base||e.qDef&&e.qDef.base}function We(e){var t=$e(e);return e.qLibraryId||t&&t.qLibraryId}function Ue(e){var t=e.measure,n=e.properties,r=e.layout;return!We(t)&&Ye({modifiers:je(t),properties:n,layout:r})}function Ye(e){var t=e.modifiers,n=e.properties,r=e.layout,i={};return Array.isArray(t)&&t.some(function(e){return!("object"!==qe(e)||e.disabled||!_e[e.type])&&(void 0===i[e.type]&&(i[e.type]=_e[e.type].isApplicable({properties:n,layout:r})),i[e.type])})}function Xe(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],i={},o=t.app.getDimensionList().then(function(e){i.dimensionList=e});r.push(o);var a=t.app.getFieldList().then(function(e){i.fieldList=e});return r.push(a),Promise.all(r).then(function(){return i})}function Ge(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var i=t.measureLibraryIds,o=t.dimensionLibraryIds,a={},s=[];return i.forEach(function(e){var t=n.app.getMeasure(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),o.forEach(function(e){var t=n.app.getDimension(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),Promise.all(s).then(function(){return a})}function Ke(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Ze(e){var t=e.oldProperties,n=e.newProperties,r=e.model,i=JSON.stringify(o(t,"qHyperCubeDef.qMeasures"),Ke)!==JSON.stringify(o(n,"qHyperCubeDef.qMeasures"),Ke)||JSON.stringify(o(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ke)!==JSON.stringify(o(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Ke);return i?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,i=t.layout;return i&&!i.qHasSoftPatches&&!i.qExtendsId&&o(i,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):I(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then(function(){return i}):Promise.resolve(i)}function Je(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return"object"===qe(e)&&!e.disabled&&_e[e.type]&&_e[e.type].needDimension({modifier:e,properties:n,layout:r})})}function Qe(e){var t=Fe(e),n=[],r=[],i=!1;return t.forEach(function(t){var r=je(t);if(Ye({modifiers:r,properties:e})){var o=We(t);o&&n.push(o),i=i||Je({modifiers:r,properties:e})}}),o(e,"qHyperCubeDef.qDimensions",[]).forEach(function(e){var t=e.qLibraryId;t&&r.push(t)}),{measureLibraryIds:n,dimensionLibraryIds:r}}function et(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(Ne[t.id].masterItemSubscriber=Ne[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},i={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=o(e,"qInfo.qType");return n&&s[n]&&s[n].forEach(function(n){t[n]=o(e,n)}),JSON.stringify(t)}function c(e){var t=e.qInfo.qId;if(r[t]){var i=l(e);r[t].properties!==i&&(r[t].properties=i,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function u(e,n){return t.app[n](e).then(function(t){r[e]={listener:t.layoutSubscribe(c),enabled:!1,properties:l(t.layout)}})}return{subscribe:function(e){var n=e.measureLibraryIds,o=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;i={},e.measureLibraryIds.forEach(function(e){i[e]=!0}),a={},t.forEach(function(e){a[e]=!0})}({measureLibraryIds:n,dimensionLibraryIds:o}),Object.keys(r).forEach(function(e){i[e]||a[e]||(r[e].listener.dispose(),delete r[e])}),t.app&&(Object.keys(i).forEach(function(e){i[e]&&!r[e]&&s.push(u(e,"getMeasure"))}),Object.keys(a).forEach(function(e){a[e]&&!r[e]&&s.push(u(e,"getDimension"))})),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach(function(e){r[e].listener.dispose()}),r={}}}}({model:t,callback:function(e){return Oe({model:t,masterItem:e}).then(function(){return t.app.clearUndoBuffer()})}}),Ne[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}})(),t.default=i.default,Object.defineProperty(t,"__esModule",{value:!0})})()}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r={};return(()=>{function e(t){var n,r=t;return r>9?(n=65+r-10)>90&&(n+=6):r="".concat(r).charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?e(r+1):String.fromCharCode(n)}function t(n){var r=e(n%62),i=Math.floor(n/62);return i>0?t(i)+r:r}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}n.d(r,{default:()=>He});const o={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),i=e,o=0;o<r.length;++o){var a=r[o];if(""!==a){if(void 0===i[a]||null===i[a])return n;i=i[a]}}return i},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),i=r[r.length-1],o=e,a=0;a<r.length-1;++a){var s=r[a];void 0!==o[s]&&null!==o[s]||(o[s]=Number.isNaN(+r[a+1])?{}:[]),o=o[s]}void 0!==n?o[i]=n:delete o[i]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(i(e))},generateId:function(){return t(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e)||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 s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e)||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 c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}return-1}const d={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var n=e.indexOf(t[0]);if(-1!==n){for(var r=0;r<t.length;r++){var i=e.indexOf(t[r]);if(n>i)return!1;n=i}return!0}return!1},indexAdded:function(e,t){var n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){var n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r},findItemByPropertyValue:function(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return e[r];return null}return null},findIndexByPropertyValue:u};var f=n(8),p=n.n(f);const h=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.dimensions).push.apply(t,a(r.qDimensions));var s,l=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=i.excludedDimensions).push.apply(s,a(l))},m=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,i=n.data[0];(t=i.measures).push.apply(t,l(r.qMeasures));var a,s=o.getValue(r,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=i.excludedMeasures).push.apply(a,l(s))},g=function(e){var t=e.exportFormat,n=e.qHyperCubeDef,r=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),r.interColumnSortOrder=n.qInterColumnSortOrder.concat();var i=o.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");i&&d.isOrderedSubset(i,r.interColumnSortOrder)&&(r.interColumnSortOrder=i.concat())},y=function(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach(function(e){t.properties[e]=n[e]})},v=function(e){var t=e.exportFormat,n=e.properties;n.qLayoutExclude||(n.qLayoutExclude={}),n.qLayoutExclude.disabled&&(Object.keys(n.qLayoutExclude.disabled).forEach(function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=n.qLayoutExclude.disabled[e])}),delete n.qLayoutExclude.disabled),n.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach(function(t){e.qLayoutExclude.changed[t].to===o.getValue(e,t)&&o.setValue(e,t,e.qLayoutExclude.changed[t].from)})}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!o.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},b=function(e){e.forEach(function(e){p().cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)})};function x(e,t,n){var r,i,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=o.getValue(e,t);if(!o.isAtomicValue(s))try{if((i=(i=(r=JSON.stringify(s)).match(/:\{/g))?i.length:0)>2&&!a)return;s=JSON.parse(r)}catch(e){return}o.getValue(e,"qLayoutExclude.quarantine")||o.setValue(e,"qLayoutExclude.quarantine",{});var l=o.getValue(e,"qLayoutExclude.quarantine");l[n]||(l[n]={}),l[n][t]=s}var w=n(909),S=n.n(w);function M(e,t){var n=S()(!0,{},t,e);return o.getValue(n,"qOtherTotalSpec.qOtherCounted")||o.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),o.getValue(n,"qOtherTotalSpec.qOtherLimit")||o.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function k(e,t){return S()(!0,{},t,e)}function E(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var C=Math.pow(2,53)-1;function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const q=function(e,t,n){var r="masterobject"===o.getValue(t,"properties.qInfo.qType")?"masterobject":o.getValue(n,"qInfo.qType");o.setValue(e,"qInfo.qType",r),e.visualization=n.visualization},_=function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},T=function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},N=function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},O=function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},I=function(e){var t,n=e.exportFormat,r=e.maxDimensions,i=e.minDimensions,o=e.newHyperCubeDef,a=e.defaultDimension,s=n.data[0];for(t=0;t<s.dimensions.length;++t){var l=M(s.dimensions[t],a);o.qDimensions.length<r?o.qDimensions.push(l):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var c=M(s.excludedDimensions[t],a);o.qDimensions.length<i?o.qDimensions.push(c):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(c)}},L=function(e){var t,n=e.exportFormat,r=e.maxMeasures,i=e.minMeasures,o=e.newHyperCubeDef,a=e.defaultMeasure,s=n.data[0];for(t=0;t<s.measures.length;++t){var l=k(s.measures[t],a);o.qMeasures.length<r?o.qMeasures.push(l):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var c=k(s.excludedMeasures[t],a);o.qMeasures.length<i?o.qMeasures.push(c):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(c)}},P=function(e){var t=e.exportFormat,n=e.dataDefinition,r=void 0===n?{}:n,i=t.data[0],o=r.dimensions||{max:0},a=r.measures||{max:0},s=E(a.max,i.dimensions.length,C),l=E(a.min,i.dimensions.length,0);return{maxDimensions:E(o.max,s,C),minDimensions:E(o.min,l,0),maxMeasures:s,minMeasures:l}},R=function(e){var t=e.exportFormat,n=e.newHyperCubeDef,r=t.data[0],i=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();var o=n.qInterColumnSortOrder.length;if(o!==i)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());o!==i;)o<i?(d.indexAdded(n.qInterColumnSortOrder,o),++o):(--o,d.indexRemoved(n.qInterColumnSortOrder,o))},z=function(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,i={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach(function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(i.qLayoutExclude.quarantine=S()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?o.setValue(i,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some(function(e){return"general"===e.key})}(t.properties,e)?i[e]=t.properties[e]:i.qLayoutExclude.disabled[e]=t.properties[e]}),null===(i=S()(!0,{},n,i)).components&&(i.components=[]),i},F=function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>i&&i>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>o||!i&&a.measures.length>0||!n&&a.dimensions.length>0},j=function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,i=e.maxMeasures,o=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>i&&i>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>o)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!i&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},V=function(e){var t,n=e.newProperties,r=e.dataDefinition,i=e.hypercubePath;if(r.dimensions&&"function"==typeof r.dimensions.added){var a=o.getValue(n,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return A(e)}(t=a.qDimensions)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):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.")}();a.qDimensions=[],s.forEach(function(e){a.qDimensions.push(e),r.dimensions.added(e,n)})}},H=function(e){var t,n=e.newProperties,r=e.dataDefinition,i=e.hypercubePath;if(r.measures&&"function"==typeof r.measures.added){var a=o.getValue(n,i||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return D(e)}(t=a.qMeasures)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D(e,t):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.")}();a.qMeasures=[],s.forEach(function(e){a.qMeasures.push(e),r.measures.added(e,n)})}},B=function(e){var t=e.measures,n=e.modifierTypes;t&&n&&p().isSupportedModifiers(n)&&t.forEach(function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store})};function $(e,t){var n=o.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach(function(t){o.setValue(e,t,n[t])}),delete e.qLayoutExclude.quarantine[t],!0)}const W={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=o.getValue(a,n||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),h({exportFormat:i,qHyperCubeDef:l}),m({exportFormat:i,qHyperCubeDef:l}),g({exportFormat:i,qHyperCubeDef:l}),delete l.qLayoutExclude,y({exportFormat:i,properties:a}),n&&(i.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),v({exportFormat:i,properties:a}),r||b(i.properties.qHyperCubeDef.qMeasures),Array.isArray(i.properties.filters)&&(x(i.properties,"filters","storedFilters",!0),delete i.properties.filters),i.properties.qHyperCubeDef.qContextSetExpression&&(x(i.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),i.properties.qHyperCubeDef.qContextSetExpression=""),i.properties.qHyperCubeDef.qDynamicScript&&i.properties.qHyperCubeDef.qDynamicScript.length&&(x(i.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),i.properties.qHyperCubeDef.qDynamicScript=[]),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=void 0===n?{}:n,i=e.dataDefinition,a=void 0===i?{}:i,s=e.defaultPropertyValues,l=void 0===s?{}:s,c=e.hypercubePath,u=e.extension,d=e.supportedFilters,f=void 0===d||d,p=e.isHCModifierSupported,h=void 0===p||p,m={qChildren:[]},g=z({exportFormat:t,initialProperties:r,hypercubePath:c}),y=o.getValue(r,c||"").qHyperCubeDef,v=o.getValue(g,c||"").qHyperCubeDef,b=P({exportFormat:t,dataDefinition:a}),x=b.maxDimensions,w=b.minDimensions,S=b.maxMeasures,M=b.minMeasures,k=l.defaultDimension,E=void 0===k?N():k,C=l.defaultMeasure,A=void 0===C?O():C;v.qDimensions.length=0,v.qMeasures.length=0,F({exportFormat:t,maxDimensions:x,minDimensions:w,maxMeasures:S,minMeasures:M})&&j({exportFormat:t,maxDimensions:x,minDimensions:w,maxMeasures:S,minMeasures:M,newHyperCubeDef:v}),I({exportFormat:t,maxDimensions:x,minDimensions:w,newHyperCubeDef:v,defaultDimension:E}),L({exportFormat:t,maxMeasures:S,minMeasures:M,newHyperCubeDef:v,defaultMeasure:A}),V({newProperties:g,dataDefinition:a,hypercubePath:c}),H({newProperties:g,dataDefinition:a,hypercubePath:c}),R({exportFormat:t,newHyperCubeDef:v}),_("qMaxStackedCells",y,v),_("qNoOfLeftDims",y,v),T("qInitialDataFetch",y,v,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),T("qMode",y,v,"S"),T("qReductionMode",y,v,"N"),T("qSortbyYValue",y,v),T("qIndentMode",y,v),T("qShowTotalsAbove",y,v),q(g,t,r),m.qProperty=g;var D=o.getValue(u||{},"support.modifiers");return B({measures:v.qMeasures,modifierTypes:D}),f&&$(m.qProperty,"storedFilters"),"S"===v.qMode&&h&&$(m.qProperty,"dynamicScript"),m}};var U={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function Y(e,t,n,r){t=t||[];var i=u(e,r,n),o=u(t,r,n);if(-1!==i&&-1===o){var a=e.splice(i,1);t.push(a[0])}return t}function X(e,t){return e.length!==t}const G={create:function(e,t){if(!e||!U[e])throw new Error("Attribute Expressions Util: ID required");var n={};return t&&Object.keys(t).forEach(function(e){n[e]=t[e]}),n.id=e,n.qAttribute=!0,n},moveByIdFromGroup:function(e,t,n,r,i){n=n||"qAttributeExpressions",i=i||"id";for(var o=0;o<e.length;o++){var a=e[o][n],s=t.length;if(Y(a,t,r,i),X(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},K={getNumDimensions:function(e){return o.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return o.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},Z={colorModeOptions:{primary:function(){return!0},dimension:function(e){return K.getNumDimensions(e)>0&&K.getNumMeasures(e)<=1},multiColor:function(e){return K.getNumMeasures(e)>1},measure:function(e){return K.getNumDimensions(e)>0},expression:function(e){return K.getNumMeasures(e)>=1}}},J={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return K.getNumMeasures(e)>=1}}};var Q={scatterplot:J,"sn-scatter-plot":J,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return K.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return K.getNumDimensions(e)>1},multiColor:function(e){return K.getNumMeasures(e)>1},measure:function(e){return K.getNumDimensions(e)<=1},expression:function(e){return K.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return K.getNumDimensions(e)>=1},multiColor:function(e){return K.getNumMeasures(e)>1},measure:function(e){return K.getNumDimensions(e)>=1},expression:function(e){return K.getNumDimensions(e)>=1}}},distributionplot:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return K.getNumDimensions(e)>=1}}}};function ee(e,t,n){if(Array.isArray(e[t])){var r=d.findIndexByPropertyValue(e[t],"id",n);r>=0&&e[t].splice(r,1)}else e[t]=[]}function te(e,t){var n=G.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach(function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)}),t.forEach(function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)})}function ne(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function re(e){var t=e.properties,n=e.isDimension,r=e.dimensions,i=e.excludedDimensions,a=e.measures,s=e.label;te(r,i);var l=r[r.length-1];if(l){var c=n?o.getValue(t,"color.byDimDef"):o.getValue(t,"color.byMeasureDef"),u=o.getValue(t,"color.formatting.qNumFormat"),f=o.getValue(t,"color.formatting.isCustomFormatted");if(c){var p=G.create(G.IDMAP.COLOR_BY_ALTERNATIVE);switch(c.type){case"expression":!function(e){var t=e.attributeExpression,n=e.label,r=e.item,i=e.isDimension,o=e.qNumFormat,a=e.isCustomFormatted;t.label=n||r.label,i?t.qDef=r.key:(t.qExpression=r.key,o&&(t.qNumFormat=o,t.isCustomFormatted=a)),t.matchMeasure=r.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:p,label:s,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:f});break;case"libraryItem":!function(e){var t=e.attributeExpression,n=e.measures,r=e.item,i=e.qNumFormat,o=e.isCustomFormatted;e.isDimension||(t.matchMeasure=d.findIndexByPropertyValue(n,"qLibraryId",r.key),i&&(t.qNumFormat=i,t.isCustomFormatted=o)),void 0!==r.expression?t.qExpression=r.expression:t.qLibraryId=r.key,t.colorMapRef=r.key}({attributeExpression:p,measures:a,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:f})}n?(p.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(p)):l.qAttributeExpressions.push(p)}}}function ie(e,t,n,r){var i,o,a,s={};switch(e){case"dimension":n.qLibraryId?(s.type="dimension",s.name=n.qLibraryId,s.id=n.qLibraryId):(s.type="field",t?(s.name=n.label||n.qDef,s.id=n.qDef):(s.name=n.qDef.qFieldDefs[0],s.label=(a=n.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":i=function(e,t){return t?e.qLibraryId:p().measureBase.getLibraryId(e)}(n,t),i?(s.type="measure",s.name=i,s.id=i,o=function(e,t){return p().hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(n,r),o&&(s.expression=o)):(s.type="expression",t?(s.name=n.label||n.qExpression,s.id=n.qExpression):(s.name=n.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(n)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}const oe={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function ae(e,t,n,r){var i=t.type,o=e.color,a=o.mode,s=K.getItemLabel(t);switch(ne(e,s||""),i){case"field":a="byDimension",o.byDimDef={label:t.label||K.wrapFieldName(t.name),key:K.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",o.byMeasureDef={label:s,key:t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",o.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",o.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},o.formatting&&oe.useMasterNumberFormat(o.formatting)}o.auto=!1,o.mode=a}function se(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byDimDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"color.byDimDef");r.activeDimensionIndex=Math.min(r.activeDimensionIndex,n.length-1);var i=ie("dimension",!1,n[r.activeDimensionIndex]);i.activeDimensionIndex=r.activeDimensionIndex,ae(e,i)}(e,t);else if(function(e){return!e||!e.key}(a)&&function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=n[function(e,t,n){var r=o.getValue(t,"visualization"),i=n.split("."),a=Number(i[1]),s=o.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===r&&"point"===s}(n,e,t)?0:n.length-1],i=G.IDMAP.COLOR_BY_ALTERNATIVE,a=d.findItemByPropertyValue(r.qAttributeDimensions,"id",i);return ae(e,ie("dimension",!!a,a||r)),!!a}(e,t))return;re({properties:e,isDimension:!0,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byDimDef.label")})}const le=function(e,t,n){o.setValue(e,t,n),o.isAtomicValue(n)&&function(e,t,n){var r=e.qLayoutExclude;r&&(r.changed||(r.changed={}),r.changed[t]={from:o.getValue(e,t),to:n})}(e,t,n)},ce=function(e,t){var n={primary:!0};if(e){var r=(Q[t]||Z).colorModeOptions||Z.colorModeOptions;n.byDimension=r.dimension(e),n.byMeasure=r.measure(e),n.byMultiple=r.multiColor(e),n.byExpression=r.expression(e)}return n},ue=function(e){var t=e.canColorBy,n=e.autoColor,r=e.colorMode,i=e.dimensions;return!(t[r]&&!n&&("byDimension"!==r&&"byMeasure"!==r||!i.length))},de=function(e,t){var n,r=o.getValue(e,"color.mode"),i=o.getValue(e,"color.auto"),a=o.getValue(e,"".concat(t,"qDimensions"),[]),s=o.getValue(e,"".concat(t,"qMeasures"),[]),l=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);i?te(a,l):!(n={auto:i,colorMode:r,dimensions:a}).auto&&"byDimension"===n.colorMode&&n.dimensions.length>0?se(e,t):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions,i=e.measures,a=e.properties,s=o.getValue(a,"visualization");return!(t||"byMeasure"!==n||!r.length||"map"!==s&&!i.length)}({auto:i,colorMode:r,dimensions:a,measures:s,properties:e})?function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=o.getValue(e,"color.byMeasureDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var n=o.getValue(e,"".concat(t,"qMeasures"),[]),r=o.getValue(e,"color.byMeasureDef");if(r.activeMeasureIndex=Math.min(r.activeMeasureIndex,n.length-1),r.activeMeasureIndex>-1){var i=ie("measure",!1,n[r.activeMeasureIndex],!0);i.activeMeasureIndex=r.activeMeasureIndex,ae(e,i)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,r)&&function(e,t){var n=o.getValue(e,"".concat(t,"qDimensions"),[]),r=o.getValue(e,"".concat(t,"qMeasures"),[]),i=n[n.length-1],a=G.IDMAP.COLOR_BY_ALTERNATIVE,s=d.findItemByPropertyValue(i.qAttributeExpressions,"id",a);return ae(e,ie("measure",!!s,s||r[0])),!!s}(e,t))return;re({properties:e,isDimension:!1,dimensions:n,excludedDimensions:i,measures:r,label:o.getValue(e,"color.byMeasureDef.label")})}(e,t):function(e,t){var n=o.getValue(e,"color.mode"),r=o.getValue(e,"".concat(t,"qDimensions"),[]),i=o.getValue(e,"".concat(t,"qMeasures"),[]),a=o.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&i.length<2&&o.setValue(e,"color.mode","primary"),te(r,a)}(e,t)},fe=function(e){e.forEach(function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode})},pe=function(e){var t=e.shouldUpdateColorBy,n=e.properties,r=o.getValue(n,"qHyperCubeDef.qMeasures",[]),i=o.getValue(n,"color.mode","");return!t&&"byExpression"===i&&r.length>0},he=function(e){var t=o.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=o.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),o.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},me=function(e){o.setValue(e,"color.mode","primary"),o.setValue(e,"color.auto",!0)},ge=function(e){var t=o.getValue(e,"qHyperCubeDef.qDimensions",[]),n=o.getValue(e,"color.persistent",!1);return t.length>1&&!n},ye={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=W.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),o=i.data[0],a=o.dimensions.concat(o.excludedDimensions),s=o.measures.concat(o.excludedMeasures),l=G.IDMAP,c=l.COLOR_BY_ALTERNATIVE,u=l.COLOR_BY_EXPRESSION;return G.moveByIdFromGroup(a,[],"qAttributeDimensions",c),G.moveByIdFromGroup(a,[],"qAttributeExpressions",c),G.moveByIdFromGroup(s,[],"qAttributeExpressions",u),i},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=W.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty,f=o.getValue(d,"visualization"),p=o.getValue(d,"qHyperCubeDef.qDimensions",[]),h=o.getValue(d,"color.mode",""),m=o.getValue(d,"color.auto",""),g=ce(d,f),y=ue({canColorBy:g,autoColor:m,colorMode:h,dimensions:p});return g[h]?pe({shouldUpdateColorBy:y,properties:d})&&he(d):me(d),y&&de(d,"qHyperCubeDef."),ge(d)&&le(d,"color.persistent",!0),fe(p),u}};var ve=["bar","marker","line"];const be=function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?$(n,"unsupportedAutoMinMax")||S()(n.measureAxis,t.measureAxis):$(n,"supportedAutoMinMax")||S()(n.measureAxis,t.measureAxis)},xe=function(e){var t,n=e.exportFormat,r=e.initialProperties,i=e.properties,o=e.measureType,a=i.qHyperCubeDef,s=i.measureAxis;if(function(e){var t=e.initialProperties;return!(!e.exportFormat.properties.measureAxes||t.measureAxes||!t.measureAxis||void 0===t.measureAxis.autoMinMax)}({exportFormat:n,initialProperties:r})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach(function(e){if(e.qDef.series){var n=e.qDef.series,r=n.type,i=n.axis;t[i]||(t[i]={axis:i,type:{line:0,marker:0,bar:0,total:0}}),ve.includes(r)&&t[i].type[r]++,t[i].type.total++}}),t}(a);l.length?(o&&(t=l.filter(function(e){return e.type[o]>0}).sort(function(e,t){return t.type[o]-e.type[o]})),t&&t.length||(t=l.sort(function(e,t){return t.type.total-e.type.total})),t&&t[0]&&S()(s,n.properties.measureAxes[t[0].axis])):S()(s,n.properties.measureAxes[0])}},we=function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var n=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=n}}},Se={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,i=e.supportedAutoMinMax,o=void 0===i||i,a=ye.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),s=a.properties;return o?(x(s,"measureAxis.min","supportedAutoMinMax"),x(s,"measureAxis.max","supportedAutoMinMax")):(x(s,"measureAxis.min","unsupportedAutoMinMax"),x(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,i=e.defaultPropertyValues,o=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=ye.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:i,hypercubePath:o,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty;return be({initialProperties:n,properties:d}),xe({exportFormat:t,initialProperties:n,properties:d,measureType:a}),we(d.qHyperCubeDef),d.qHyperCubeDef.qColumnOrder=[],d.qHyperCubeDef.columnOrder=[],u}};function Me(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function ke(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach(function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,a);if(void 0!==s){var l=o.getValue(i,"qDef.cId");l||(l=o.generateId(),o.setValue(i,"qDef.cId",l));var c=Me(n,r,l);o.setValue(t,c,s),o.setValue(i,a,void 0)}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})})}function Ee(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,i=e.arrayName,a=e.itemPath;o.getValue(t,n,[]).forEach(function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,i=e.item,a=e.itemPath,s=o.getValue(i,"qDef.cId");if(s){var l=Me(n,r,s),c=o.getValue(t,l);void 0!==c&&(o.setValue(i,a,c),o.setValue(t,l,void 0))}}({properties:t,quarantineName:r,arrayName:i,item:e,itemPath:a})})}var Ce="qHyperCubeDef.qMeasures",Ae="conditionalColoring",De="measures",qe="qDef.conditionalColoring";const _e={quarantine:function(e){ke({properties:e,arrayPath:Ce,quarantineName:Ae,arrayName:De,itemPath:qe})},unquarantine:function(e){Ee({properties:e,arrayPath:Ce,itemPath:qe,arrayName:De,quarantineName:Ae})}};var Te="qHyperCubeDef.qMeasures",Ne="measures",Oe="qHyperCubeDef.qDimensions",Ie="dimensions",Le="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",Pe="alternativeMeasures",Re="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",ze="alternativeDimensions",Fe="qCalcCondition",je="conditionalShowHide";const Ve={quarantine:function(e){ke({properties:e,arrayPath:Te,quarantineName:je,arrayName:Ne,itemPath:Fe}),ke({properties:e,arrayPath:Oe,quarantineName:je,arrayName:Ie,itemPath:Fe})},unquarantine:function(e){Ee({properties:e,arrayPath:Te,quarantineName:je,arrayName:Ne,itemPath:Fe}),Ee({properties:e,arrayPath:Oe,quarantineName:je,arrayName:Ie,itemPath:Fe})},quarantineAlternative:function(e){ke({properties:e,arrayPath:Le,quarantineName:je,arrayName:Pe,itemPath:Fe}),ke({properties:e,arrayPath:Re,quarantineName:je,arrayName:ze,itemPath:Fe})},unquarantineAlternative:function(e){Ee({properties:e,arrayPath:Le,quarantineName:je,arrayName:Pe,itemPath:Fe}),Ee({properties:e,arrayPath:Re,quarantineName:je,arrayName:ze,itemPath:Fe})}},He={hypercube:W,colorChart:ye,axisChart:Se,quarantineProperty:x,unquarantineProperty:$,quarantineArrayProp:ke,unquarantineArrayProp:Ee,conditionalColoring:_e,conditionalShow:Ve}})(),r.default})()}(UF)),UF.exports),XF=jM(YF);function GF(e){e.qHyperCubeDef?.qMeasures?.length>=2&&(e.qHyperCubeDef.qMeasures[0].qTrendLines=[],e.qHyperCubeDef.qMeasures[1].qTrendLines=[],e.trendLines?.forEach(t=>{t.flipXY?(t.qXColIx=2,e.qHyperCubeDef.qMeasures[0].qTrendLines.push(t)):(t.qXColIx=1,e.qHyperCubeDef.qMeasures[1].qTrendLines.push(t))}))}function KF(e){e.qHyperCubeDef?.qMeasures?.forEach(e=>{e.qTrendLines=[]})}function ZF(e,t){const n=Math.max(1e3,t?.maxVisibleBubbles||1e3),r=e.qHyperCube.qDimensionInfo[0];return r?.qCardinal>n}function JF(e){const t=[{value:"primary",translation:"properties.colorMode.primary"},{value:"byDimension",translation:"properties.colorMode.byDimension"},{value:"byMeasure",translation:"properties.colorMode.byMeasure"}];return e?.qHyperCubeDef?.qMeasures?.length>0&&t.push({value:"byExpression",translation:"properties.colorMode.byExpression"}),t}function QF(e){return void 0===ar(e,"color.useDimColVal")&&lr(e,"color.useDimColVal",!1),!ar(e,"color.auto")&&"byDimension"===ar(e,"color.mode")&&"libraryItem"===ar(e,"color.byDimDef.type")}var ej={component:"text",translation:"properties.compression.willNotAffect",show:(e,t)=>ZF(t.layout)};const tj=(e,t,n)=>{const r=`${e}.fontFamily`,i=`${e}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:r,options:()=>t.getOptions(r),defaultValue:()=>t.getDefaultValue(r)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:i,options:()=>t.getOptions(i),defaultValue:()=>t.getDefaultValue(i)},fontColorItem:{component:"color-picker",width:!1,ref:`${e}.color`,defaultValue:()=>({color:n.getStyle("object.scatterPlot",e,"color")})}}}}},nj=[{translation:"Common.None",value:"none"},{translation:"Common.Small",value:"small"},{translation:"Common.Medium",value:"medium"},{translation:"Common.Large",value:"large"}],rj=(e,t,n)=>{const r={},i=function(e){var t=e.theme,n=e.translator,r=e.config,i=void 0===r?{}:r,o=e.flags,a=function(e){var t=e.config,n=void 0===t?{}:t,r=n.id,i=n.paths;return{id:void 0===r?je:"".concat(je,".").concat(r),paths:Array.isArray(i)?i:[]}}({config:i}),s=a.id,l=a.paths,c={};l.forEach(function(e){var r=e.split(".");Qe(r);for(var i=c,a=0;a<r.length;a++){var l=r[a];a===r.length-1?i[l]=Ge({theme:t,translator:n,id:s,path:e,flags:o}):void 0===i[l]&&(i[l]={}),i=i[l]}});var u=function(e){var t=e.split(".");Qe(t);for(var n=c,r=0;r<t.length;r++){var i=t[r];if(void 0===n[i])throw new Error("font-resolver: Path '".concat(e,"' could not be resolved."));n=n[i]}return n};return c.getDefaultValue=function(e){return u(e).getDefaultValue()},c.getOptions=function(e){return u(e).getOptions()},c}({theme:n,translator:t,flags:e,config:{id:"scatterPlot",paths:["axis.title","axis.label.name","label.value","referenceLine.label.name","legend.label","legend.title"]}});return r.outlineSection={translation:"properties.bubbleOutline",component:"panel-section",items:{wrapperItem:{component:"items",ref:"components",key:"outline",items:{bubbleStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"strokeWidth",width:!0,component:"dropdown",options:Object.keys(nj).map(e=>nj[e]),defaultValue:nj[1].value,schemaIgnore:!0},strokeColor:{ref:"strokeColor",defaultValue:{color:"#ffffff",alpha:"1"},schemaIgnore:!0,width:"auto",showAlpha:e.isEnabled("IM_3964_BG_OPACITY"),component:"color-picker"}}}}}}},e?.isEnabled("CLIENT_IM_3050")&&(r.axisTitleSection={translation:"properties.axis.title",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"axis",items:tj("axis.title",i,n)}}},r.axisLabelSection={translation:"properties.axis.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"axis",items:tj("axis.label.name",i,n)}}},r.labelValueSection={translation:"properties.value.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"label",items:tj("label.value",i,n)}}}),e.isEnabled("CLIENT_IM_3051")&&(r.legendTitleSection={translation:"properties.legend.title",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"legend",items:tj("legend.title",i,n)}}},r.legendLabelSection={translation:"properties.legend.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"legend",items:tj("legend.label",i,n)}}}),Object.keys(r).length>0?r:void 0},ij=(e,t,n,r)=>({component:"styling-panel",chartTitle:"Object.ScatterPlot",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:e,items:rj(t,n,r)}),oj=!0,aj=!1,sj={ref:"showPoints",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!0},lj={ref:"showLines",translation:"properties.plugins.showLines",type:"boolean",defaultValue:!0,show:e=>"line"!==e.type},cj=e=>{const t=(e?.qHyperCubeDef?.qDimensions||[]).length,n=(e?.qHyperCubeDef?.qMeasures||[]).length;return t>=1&&n>=2};function uj(e,t){if(void 0===t||t<=0)return Math.round(e);const n=Math.ceil(-Math.log10(t)),r=Math.round(e*10**n)*10**-n;return n>=0?Number(r.toFixed(n)):r}function dj({x:e,y:t,xSpan:n,ySpan:r,fill:i,newDefaultStyle:o}){return{xMeasureValue:uj(e,n/10),yMeasureValue:uj(t,r/10),style:{symbol:"circle",fill:i||Yz,lineColor:Gz,label:{color:Kz,coloredBackground:!1},lineThickness:o?2:1,dataPointSize:o?12:10},label:{placement:"auto"},cId:rF.id()}}function fj(e,t,n){const{qMax:r,qMin:i}=n.layout.qHyperCube.qMeasureInfo[0],{qMax:o,qMin:a}=n.layout.qHyperCube.qMeasureInfo[1],s=r-i,l=o-a;e.xMeasureValue=uj(i+s/4+Math.random()*(s/2),s/10),e.yMeasureValue=uj(a+l/4+Math.random()*(l/2),l/10)}const pj=({translator:e,axis:t})=>({[`${t}Input`]:{type:"number",component:"dropdown",translation:e.get(`properties.plugins.${t}.inputType`),convertFunctions:{get:(e,n,r,i)=>void 0===i[`${t}MeasureValue`]?1:0,set(e,n,r,i,o){0===e?(o[`${t}MeasureValue`]=0,delete o[`${t}DimensionValue`]):(o[`${t}DimensionValue`]="",delete o[`${t}MeasureValue`])}},options:[{value:0,translation:e.get("properties.plugins.measureInputType.measureValue")},{value:1,translation:e.get("properties.dimensionReferenceLines.dimensionValue")}]},[`${t}MeasureValue`]:{ref:`${t}MeasureValue`,translation:e.get(`properties.plugins.${t}.measureValue`),type:"number",expressionType:"ValueExpression",expression:"optional",show:e=>void 0!==e[`${t}MeasureValue`]},[`${t}DimensionValue`]:{ref:`${t}DimensionValue`,translation:e.get(`properties.plugins.${t}.dimensionValue`),type:"string",expressionType:"StringExpression",expression:"optional",show:e=>void 0===e[`${t}MeasureValue`]}}),hj=({translator:e})=>({...pj({translator:e,axis:"x"}),...pj({translator:e,axis:"y"})}),mj=({showPointLabels:e,newDefaultStyle:t})=>({symbol:{type:"string",component:"dropdown",ref:"style.symbol",translation:"Object.GridChart.Symbol",options:[{value:"circle",translation:"Object.GridChart.Symbol.Circle"},{value:"cross",translation:"Object.GridChart.Symbol.Cross"},{value:"diamond",translation:"Object.GridChart.Symbol.Diamond"},{value:"saltire",translation:"Object.GridChart.Symbol.Saltire"},{value:"square",translation:"Object.GridChart.Symbol.Square"},{value:"star",translation:"Object.GridChart.Symbol.Star"},{value:"triangle",translation:"Object.GridChart.Symbol.Triangle"}]},labelPlacement:e?{type:"string",component:"dropdown",ref:"label.placement",translation:"geo.properties.labelPosition",options:[{value:"auto",translation:"properties.axis.displaymode.auto"},{value:"top",translation:"geo.properties.labelPosition.above"},{value:"bottom",translation:"geo.properties.labelPosition.below"}]}:void 0,fillColor:{ref:"style.fill",translation:"properties.distributionPlot.pointColor",type:"object",component:"color-picker",disableNone:aj,showAlpha:oj,defaultValue:Yz},lineColor:{ref:"style.lineColor",translation:"LayerStyleEditor.style.strokeColor",type:"object",component:"color-picker",disableNone:aj,showAlpha:oj,defaultValue:Gz},labelColor:e?{ref:"style.label.color",translation:"properties.plugins.label.color",type:"object",component:"color-picker",disableNone:aj,showAlpha:oj,defaultValue:Kz}:void 0,colorBackground:e?{ref:"style.label.coloredBackground",translation:"properties.referenceLines.coloredBackground",type:"boolean",defaultValue:!1}:void 0,lineThickness:{component:"slider",type:"number",expression:"optional",ref:"style.lineThickness",translation:"LayerStyleEditor.style.strokeWidth",defaultValue:t?2:1,min:1,max:6,step:1},dataPointSize:{component:"slider",type:"number",expression:"optional",ref:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",defaultValue:t?12:10,min:3,max:30,step:1}}),gj=({type:e,newDefaultStyle:t})=>{const n="line"!==e;return{component:"items",show:e=>"line"===e.type||e.showLines,items:{lineColor:{ref:"lineStyle.lineColor",translation:"Object.Table.Representation.MiniChart.Colors.Line",type:"object",component:"color-picker",disableNone:aj,showAlpha:oj,defaultValue:Gz},lineThickness:{component:"slider",type:"number",expression:"optional",ref:"lineStyle.lineThickness",translation:"LayerStyleEditor.style.lineThickness",defaultValue:t?3:2,min:1,max:6,step:1},lineType:{component:"dropdown",type:"string",expression:"optional",ref:"lineStyle.lineType",translation:"LayerStyleEditor.style.lineType",defaultValue:"",options:[{value:"",translation:"LayerStyleEditor.style.solid"},{value:"8 4",translation:"LayerStyleEditor.style.dashed"}],convertFunctions:{get(e,t){const n=e(t.type);return void 0===n||""===n?"":"8 4"}}},lineCurve:n?void 0:{translation:"LayerStyleEditor.style.lineCurve",type:"string",ref:"lineStyle.lineCurve",component:"dropdown",defaultValue:"linear",expression:"optional",options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}]}}}},yj=({type:e,index:t})=>{if((["twoZones","quadrants","fourZones"].includes(e)||!(t>0))&&(["quadrants","fourZones"].includes(e)||!(t>1))&&!(t>3))return{component:"color-picker",ref:`areaColors.color${t+1}`,translation:Jz[e][t],type:"object",disableNone:aj,showAlpha:oj,defaultValue:Wz[t]}},vj=({type:e})=>({component:"items",ref:"areaColors",items:{color1:yj({type:e,index:0}),color2:yj({type:e,index:1}),color3:yj({type:e,index:2}),color4:yj({type:e,index:3})}}),bj=({type:e,translator:t,flags:n})=>{const{titleTranslation:r,fixedPointNames:i,maxNumberOfPoints:o,showPointLabels:a}=Zz[e]||{},s=n?.isEnabled("TLV_1804_DEFAULT_CHART_SETTINGS");return{type:"items",show:t=>t.type===e,items:{label:{ref:"label.value",translation:"Common.Label",component:"string",expression:"optional",defaultValue:""},pointDataSection:"point"===e?{component:"items",items:hj({translator:t})}:void 0,pointStyleSection:"point"===e?{component:"items",items:mj({showPointLabels:a,newDefaultStyle:s})}:void 0,points:["point","horizontalParallelZones"].includes(e)?void 0:{type:"array",ref:"points",titleTranslation:r,itemTitleRef:(e,n)=>i&&i[n]?t.get(i[n]):t.get("properties.plugins.Points.Point",n+1)+(e.label?.value?`: ${e.label.value}`:""),allowAdd:!0,allowRemove:!0,allowMove:!0,allowDuplicate:!0,addTranslation:"properties.plugins.Points.addPoint",add:fj,max:o,items:{label:a?{ref:"label.value",translation:"Common.Label",component:"string",expression:"optional",defaultValue:""}:void 0,dataSection:{component:"items",items:hj({translator:t})},styleSection:{component:"items",items:mj({showPointLabels:a,newDefaultStyle:s}),show:(e,t,n)=>((e,t)=>{if(!t)return null;for(let n=0;n<t.length;n+=1){const{points:r}=t[n];if(r&&r.includes(e))return t[n]}return null})(e,n.properties.plugins)?.showPoints}}},yLimits:"horizontalParallelZones"===e?{type:"items",ref:"yLimits",component:"color-scale-creator",disableNone:aj,showAlpha:oj,translation:"properties.plugins.horizontalParallelZones.yLimits",show:(e,t,n)=>{const{layout:r}=n;if(!r.measureAxis){const e=ar(r,"qHyperCube.qMeasureInfo.1",{}),{qMin:t,qMax:n}=e;if(void 0!==t&&void 0!==n){let e=n-t;0===e&&(e=Math.abs(t)>0?.4*Math.abs(t):40);lr(r,"measureAxis",{min:t-.5*e,max:n+.5*e})}}return"horizontalParallelZones"===e.type},showMeasureValue:()=>!1,showGradient:!1,items:{limits:{type:"array",ref:"yLimits.limits",defaultValue:[],items:{value:{ref:"value",type:"number",defaultValue:1}}},paletteColors:{type:"array",ref:"yLimits.paletteColors",defaultValue:[Uz],items:{color:{ref:"color",type:"string"},index:{ref:"index",type:"integer"}}}}}:void 0,showPoints:["point","horizontalParallelZones"].includes(e)?void 0:sj,showLines:"point"===e?void 0:lj,lineStyle:"point"===e?void 0:gj({type:e,newDefaultStyle:s}),areaColors:["point","line","horizontalParallelZones"].includes(e)?void 0:vj({type:e})}}},xj=({translator:e,pluginOptions:t,flags:n})=>({type:"array",ref:"plugins",filter:e=>e.filter(e=>t.map(e=>e.value).includes(e.type)),translation:"point"===t[0].value?"properties.shapes":"properties.partitions",show:cj,itemTitleRef:e=>((e,t)=>t.filter(t=>t.value===e.type)[0].translation+(e.label?.value?`: ${e.label.value}`:""))(e,t),allowAdd:!0,allowRemove:!0,allowMove:!0,allowDuplicate:!0,dialog:{ref:"type",options:t},addTranslation:"point"===t[0].value?"properties.shapes.addShape":"properties.partitions.addPartition",add:(e,t,r)=>function(e,t,n,r){const i=r?.isEnabled("TLV_1804_DEFAULT_CHART_SETTINGS"),{type:o}=e,{qMax:a,qMin:s}=n.layout.qHyperCube.qMeasureInfo[0],{qMax:l,qMin:c}=n.layout.qHyperCube.qMeasureInfo[1],u=a-s,d=l-c;switch(o){case"point":e.xMeasureValue=uj(s+u/2,u/10),e.yMeasureValue=uj(c+d/2,d/10);break;case"line":e.points=[dj({x:s+u/3,y:c+d/2,xSpan:u,ySpan:d,newDefaultStyle:i}),dj({x:a-u/3,y:c+d/2,xSpan:u,ySpan:d,newDefaultStyle:i})];break;case"polygon":e.points=[dj({x:s+u/3,y:c+d/3,xSpan:u,ySpan:d,newDefaultStyle:i}),dj({x:s+u/2,y:l-d/3,xSpan:u,ySpan:d,newDefaultStyle:i}),dj({x:a-u/3,y:c+d/3,xSpan:u,ySpan:d,newDefaultStyle:i})];break;case"twoZones":e.points=[dj({x:s+u/3,y:c+d/3,xSpan:u,ySpan:d,newDefaultStyle:i}),dj({x:a-u/3,y:l-d/3,xSpan:u,ySpan:d,newDefaultStyle:i})];break;case"quadrants":e.points=[dj({x:s+u/2,y:c+d/2,xSpan:u,ySpan:d,newDefaultStyle:i})];break;case"fourZones":e.points=[dj({x:s+u/2,y:c+d/2,xSpan:u,ySpan:d,fill:Xz,newDefaultStyle:i}),dj({x:a-u/3,y:l-d/3,xSpan:u,ySpan:d,newDefaultStyle:i}),dj({x:a-u/3,y:c+d/3,xSpan:u,ySpan:d,newDefaultStyle:i})]}(e=>{switch(e.type){case"point":delete e.points,delete e.yLimits,delete e.showPoints,delete e.showLines,delete e.areaColors,delete e.lineStyle;break;case"line":delete e.style,delete e.xMeasureValue,delete e.xDimensionValue,delete e.yMeasureValue,delete e.yDimensionValue,delete e.areaColors;break;case"polygon":delete e.style,delete e.xMeasureValue,delete e.xDimensionValue,delete e.yMeasureValue,delete e.yDimensionValue;break;case"twoZones":case"quadrants":case"fourZones":delete e.yLimits;break;case"horizontalParallelZones":delete e.points,delete e.showPoints,delete e.areaColors}})(e)}(e,0,r,n),items:Object.fromEntries(t.map(t=>[t.value,bj({type:t.value,translator:e,flags:n})]))}),{MAX_NR_SCATTER:wj,DEFAULT_VISIBLE_BUBBLES:Sj,MAX_VISIBLE_BUBBLES:Mj}=KI,kj=e=>!ar(e,"color.auto")&&"byDimension"===ar(e,"color.mode");function Ej(e){const{flags:t,translator:n,sense:r}=e,i=r?.theme,o=t.isEnabled("SENSECLIENT_IM_2206_STYLINGPANEL_SCATTERPLOT"),a=t.isEnabled("SENSECLIENT_IM_2206_SCATTERPLOT_BG"),s=function(e){const{translator:t,anything:n}=e;if(n?.sense?.isUnsupportedFeature?.("trendlines"))return;const r=Ta.propertyPanelProperties({translator:t});return r.translation="properties.regressionline",r.titleTranslation=void 0,r.addTranslation="properties.regressionline.add",r.ref="trendLines",r.globalChange=GF,r.items.type.defaultValue="LINEAR",r.items.flipXY={type:"boolean",defaultValue:!1,ref:"flipXY",translation:"properties.regressionline.direction",component:"dropdown",options:[{value:!1,translation:"properties.regressionline.direction.normal"},{value:!0,translation:"properties.regressionline.direction.alternative"}]},r}(e),l=(t,n)=>{let r;const i="x"===n?t.getMeasureLayouts()[0]:t.getMeasureLayouts()[1];return r=i&&!i.qError?e.translator.get(`properties.${n}AxisWithInfo`,[i.qFallbackTitle]):e.translator.get(`properties.${n}Axis`),r},c={items:{simpleItems:{items:{autoColor:{label:t=>t.color?.auto?e.translator.get("Simple.Color.Auto",e.translator.get("properties.colorMode.primary")):e.translator.get("Common.Custom"),change:e=>{e.color?.auto||(lr(e,"color.mode","primary"),lr(e,"color.useBaseColors","off"))}},colorMode:{options:e=>{const t=[{value:"primary",translation:"properties.colorMode.primary"},{value:"byDimension",translation:"properties.colorMode.byDimension"}];switch(e.color?.mode){case"byMeasure":t.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"});break;case"byExpression":t.push({value:"byExpression",translation:"properties.colorMode.byExpression"})}return t}}}}}},u={items:{labels:{items:{header:{show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length>=2},labels:{component:"checkbox",ref:"labels.mode",type:"number",translation:"Simple.Label.Show",defaultValue:1,show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length>=2,convertFunctions:{get:(e,t,n,r)=>r.labels.mode,set(e,t,n,r,i){i.labels.mode=e?1:0}}},xAxisTitle:{component:"checkbox",ref:"xAxis.show",type:"string",translation:"Simple.Label.XAxis.Hide",defaultValue:"all",show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length>=2,convertFunctions:{get:(e,t,n,r)=>"labels"===r.xAxis.show||"none"===r.xAxis.show,set(e,t,n,r,i){i.xAxis.show=e?"labels":"all"}}},yAxisTitle:{component:"checkbox",ref:"yAxis.show",type:"string",translation:"Simple.Label.YAxis.Hide",defaultValue:"all",show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length>=2,convertFunctions:{get:(e,t,n,r)=>"labels"===r.yAxis.show||"none"===r.yAxis.show,set(e,t,n,r,i){i.yAxis.show=e?"labels":"all"}}}}}}},d={uses:"settings",items:{simpleLabels:u,general:{items:{showDisclaimer:{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}}},presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{styleEditor:o&&ij(a,t,n,i),showNavigation:{ref:"navigation",type:"boolean",translation:"Common.Navigation",component:"switch",defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},bubbleSizeItems:{type:"items",items:{bubbleSizes:{type:"integer",component:"slider",ref:"dataPoint.bubbleSizes",translation:"properties.dataPoints.bubbleSizes",min:1,max:20,step:1,defaultValue:5,show:e=>e.qHyperCubeDef.qMeasures.length<3},rangeBubbleSizes:{type:"array",component:"slider",ref:"dataPoint.rangeBubbleSizes",translation:"properties.dataPoints.bubbleSizes",min:1,max:20,step:1,defaultValue:[2,8],show:e=>e.qHyperCubeDef.qMeasures.length>=3},rangeBubbleCompressionNote:ej}},label:{type:"items",items:{labelMode:{ref:"labels.mode",translation:"properties.labels",type:"string",component:"dropdown",defaultValue:1,options:[{value:1,translation:"Common.Auto"},{value:2,translation:"Common.All"},{value:0,translation:"Common.None"}],snapshot:{tid:"property-labels"}},labelModeCompressionNote:ej}},queryLevel:{type:"integer",component:"slider",ref:"compressionResolution",translation:"properties.compression.resolution",min:4,max:8,step:1,defaultValue:5,show:(e,t)=>ZF(t.layout,e)},maxVisibleBubbles:{type:"integer",expression:"optional",ref:"maxVisibleBubbles",translation:"properties.dataPoints.maxVisibleBubbles",defaultValue:Sj,min:wj,max:Mj},gridLines:{type:"items",snapshot:{tid:"property-gridLines"},items:{showGridLines:{ref:"gridLine.auto",type:"boolean",translation:"properties.gridLine.spacing",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},gridSpacing:{ref:"gridLine.spacing",type:"number",component:"dropdown",defaultValue:2,options:[{value:0,translation:"properties.gridLine.noLines"},{value:1,translation:"properties.gridLine.wide"},{value:2,translation:"properties.gridLine.medium"},{value:3,translation:"properties.gridLine.narrow"}],show:e=>!e.gridLine.auto}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:{items:{colorsAnLegendCompressionNote:ej,colorMode:{options:JF},persistentColors:{show:e=>QF(e)?kj(e)&&!ar(e,"color.useDimColVal"):kj(e)}}},simpleColors:c,legend:{show(e){const{auto:t,mode:n,expressionIsColor:r}=e.color;return!(t||"primary"===n||"byExpression"===n&&r)}}}},xAxis:{type:"items",uses:"axis.measureAxis",label:(e,t)=>l(t,"x"),items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,t)=>l(t,"x"),classification:{section:"axis",tags:["simple"],exclusive:!0}},show:{ref:"xAxis.show",snapshot:{title:"properties.xAxis",tid:"property-xAxis"}},dock:{ref:"xAxis.dock",show:e=>"none"!==e.xAxis.show,options:[{value:"near",translation:"Common.Bottom"},{value:"far",translation:"Common.Top"}]},spacing:{ref:"xAxis.spacing",show:e=>"none"!==e.xAxis.show}}},minMax:{type:"items",items:{autoMinMax:{ref:"xAxis.autoMinMax"},minMax:{ref:"xAxis.minMax",show:e=>!e.xAxis.autoMinMax},min:{ref:"xAxis.min",show:e=>["min","minMax"].includes(e.xAxis.minMax)&&!e.xAxis.autoMinMax,invalid:e=>"minMax"===e.xAxis.minMax&&e.xAxis.min>=e.xAxis.max},max:{ref:"xAxis.max",show:e=>["max","minMax"].includes(e.xAxis.minMax)&&!e.xAxis.autoMinMax,invalid:e=>"minMax"===e.xAxis.minMax&&e.xAxis.min>=e.xAxis.max}}},startAt:{type:"string",component:"dropdown",translation:"properties.axis.startAt",readOnly:e=>!(e.xAxis.autoMinMax||"min"===e.xAxis.minMax&&0===e.xAxis.min),options:[{value:"zero",translation:"properties.axis.startAt.zero"},{value:"lowest",translation:"properties.axis.startAt.lowest"}],defaultValue:"lowest",convertFunctions:{get(e,t,n,r){const{autoMinMax:i,minMax:o,min:a}=r?.xAxis||{};return!0===i?"lowest":i||"min"!==o||0!==a?e(t.type):"zero"},set(e,t,n,r,i){"zero"===e?(lr(i,"xAxis.autoMinMax",!1),lr(i,"xAxis.minMax","min"),lr(i,"xAxis.min",0)):lr(i,"xAxis.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},yAxis:{type:"items",uses:"axis.measureAxis",label:(e,t)=>l(t,"y"),items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,t)=>l(t,"y"),classification:{section:"axis",tags:["simple"],exclusive:!0}},show:{ref:"yAxis.show",snapshot:{title:"properties.yAxis",tid:"property-yAxis"}},dock:{ref:"yAxis.dock",show:e=>"none"!==e.yAxis.show,options:(e,t,n)=>[{value:"near",translation:n.yMirrorMode?"properties.dock.right":"properties.dock.left"},{value:"far",translation:n.yMirrorMode?"properties.dock.left":"properties.dock.right"}]},spacing:{ref:"yAxis.spacing",show:e=>"none"!==e.yAxis.show}}},minMax:{type:"items",items:{autoMinMax:{ref:"yAxis.autoMinMax"},minMax:{ref:"yAxis.minMax",show:e=>!e.yAxis.autoMinMax},min:{ref:"yAxis.min",show:e=>["min","minMax"].includes(e.yAxis.minMax)&&!e.yAxis.autoMinMax,invalid:e=>"minMax"===e.yAxis.minMax&&e.yAxis.min>=e.yAxis.max},max:{ref:"yAxis.max",show:e=>["max","minMax"].includes(e.yAxis.minMax)&&!e.yAxis.autoMinMax,invalid:e=>"minMax"===e.yAxis.minMax&&e.yAxis.min>=e.yAxis.max}}},startAt:{type:"string",component:"dropdown",translation:"properties.axis.startAt",readOnly:e=>!(e.yAxis.autoMinMax||"min"===e.yAxis.minMax&&0===e.yAxis.min),options:[{value:"zero",translation:"properties.axis.startAt.zero"},{value:"lowest",translation:"properties.axis.startAt.lowest"}],defaultValue:"lowest",convertFunctions:{get(e,t,n,r){const{autoMinMax:i,minMax:o,min:a}=r?.yAxis||{};return!0===i?"lowest":i||"min"!==o||0!==a?e(t.type):"zero"},set(e,t,n,r,i){"zero"===e?(lr(i,"yAxis.autoMinMax",!1),lr(i,"yAxis.minMax","min"),lr(i,"yAxis.min",0)):lr(i,"yAxis.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},tooltips:{uses:"tooltip"}}};return{type:"items",component:"accordion",items:{data:{uses:"data"},addons:{type:"items",component:"expandable-items",translation:"properties.addons",items:{refLinesX:{uses:"reflines",ref:"refLine.refLinesX",translation:"properties.referenceLinesX",items:{colorBackground:{show:!0}}},refLinesY:{uses:"reflines",ref:"refLine.refLinesY",translation:"properties.referenceLinesY",items:{colorBackground:{show:!0},slope:{show:!0}}},dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}},trendlines:s,shapes:xj({translator:n,pluginOptions:[{value:"point",translation:n.get("Visualizations.Descriptions.Point")},{value:"line",translation:n.get("Visualizations.Descriptions.Line")},{value:"polygon",translation:n.get("Polygon")}],flags:t}),partitions:xj({translator:n,pluginOptions:[{value:"twoZones",translation:n.get("properties.plugins.twoZones")},{value:"quadrants",translation:n.get("properties.plugins.quadrants")},{value:"fourZones",translation:n.get("properties.plugins.fourZones")},{value:"horizontalParallelZones",translation:n.get("properties.plugins.horizontalParallelZones")}],flags:t})}},settings:d}}}function Cj(e){return e?.qHyperCubeDef?.qMeasures?.length||0}function Aj(e){return Cj(e)<3}function Dj(e){return Cj(e)>2}function qj(){return[{value:"auto",translation:"Common.Auto"},{value:"primary",translation:"properties.colorMode.primary"},{value:"byDimension",translation:"properties.colorMode.byDimension"},{value:"byMeasure",translation:"properties.colorMode.byMeasure"}]}function _j(e){return!(e.color&&"byDimension"===e.color.mode&&e.color.useDimColVal&&QF(e))}function Tj(e,t){const n=(e=>e?.qHyperCube?.qDimensionInfo||[])(t)[0];return!(n&&n.qCardinal<=12)&&_j(e)}const Nj=e=>!!((e?.qHyperCube?.qSize?.qcy||0)>0);function Oj(e){return{definition:Ej(e),softDefinition:{type:"items",component:"accordion",items:{data:{uses:"data"},presentation:{uses:"presentation",items:{showNavigation:{type:"boolean",translation:"Common.Navigation",component:"switch",ref:"navigation",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},showLabels:{type:"number",translation:"properties.labels",component:"radio-list",ref:"labels.mode",options:()=>[{value:1,translation:"Common.Auto"},{value:2,translation:"Common.All"},{value:0,translation:"Common.None"}]},bubbleSizes:{type:"integer",translation:"properties.dataPoints.bubbleSizes",component:"slider",ref:"dataPoint.bubbleSizes",min:1,max:20,step:1,show:Aj},rangeBubbleSizes:{type:"array",translation:"properties.dataPoints.bubbleSizes",component:"slider",ref:"dataPoint.rangeBubbleSizes",min:1,max:20,step:1,show:Dj},queryLevel:{type:"integer",translation:"properties.compression.resolution",component:"slider",ref:"compressionResolution",min:4,max:8,step:1,show:(e,t)=>ZF(t,e)}}},color:{uses:"color",items:{mode:{options:qj},dimension:{items:{colorScheme:{show:Tj},persistentColors:{show:_j}}}}}}},support:{snapshot:Nj,export:!0,exportData:!0,sharing:!1,viewData:!0},importProperties:(t,n,r)=>{const i=XF.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:BF(e),defaultPropertyValues:{defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()}}),o=i.qProperty;return KF(o),GF(o),i},exportProperties:e=>(KF(e.qProperty),XF.colorChart.exportProperties({propertyTree:e}))}}var Ij={properties_dataPoints_labelmode_share:{id:"properties.dataPoints.labelmode.share",locale:{"en-US":"Share","zh-TW":"佔有率","zh-CN":"份额","tr-TR":"Pay","sv-SE":"Andel","it-IT":"Percentuale","es-ES":"Cuota","de-DE":"Anteil","pl-PL":"Udział","nl-NL":"Aandeel","ko-KR":"공유","pt-BR":"Percentual","fr-FR":"Part","ja-JP":"割合","ru-RU":"Доля"}},Tooltip_selections_locked:{id:"Tooltip.selections.locked",locale:{"en-US":"Selections on this dimension are locked","zh-TW":"已鎖定此維度上的選項","zh-CN":"相关维度的选择已锁定","tr-TR":"Bu boyuttaki seçimler kilitli","sv-SE":"Urval i den här dimensionen är låsta","it-IT":"Le selezioni in questa dimensione sono bloccate","es-ES":"Las selecciones de esta dimensión están bloqueadas.","de-DE":"Auswahlen sind für diese Dimension gesperrt","pl-PL":"Selekcje dotyczące tego wymiaru są zablokowane","nl-NL":"Selecties voor deze dimensie zijn vergrendeld","ko-KR":"이 차원의 선택은 잠겨 있습니다.","pt-BR":"Seleções estão bloqueadas nesta dimensão","fr-FR":"Sélections verrouillées pour cette dimension","ja-JP":"この軸での選択はロックされています","ru-RU":"Выборки для данного измерения заблокированы"}},Tooltip_dimensions_drilldown:{id:"Tooltip.dimensions.drilldown",locale:{"en-US":"Drill-down dimension","zh-TW":"向下探查維度","zh-CN":"下钻维度","tr-TR":"Detaya inme boyutu","sv-SE":"Hierarkisk dimension","it-IT":"Dimensione di drill-down","es-ES":"Dimensión jerárquica","de-DE":"Drilldown-Dimension:","pl-PL":"Wymiar hierarchiczny","nl-NL":"Drill-downdimensie","ko-KR":"드릴다운 차원","pt-BR":"Dimensão da hierarquia","fr-FR":"Descendre dans la hiérarchie de la dimension","ja-JP":"軸のドリルダウン","ru-RU":"Измерение с детализацией"}},Object_ErrorMessage_MissingDimension:{id:"Object.ErrorMessage.MissingDimension",locale:{"en-US":"Dimension not found","zh-TW":"找不到維度","zh-CN":"未找到维度","tr-TR":"Boyut bulunamadı","sv-SE":"Dimensionen hittades inte","it-IT":"Dimensione non trovata","es-ES":"No se ha encontrado la dimensión","de-DE":"Dimension nicht gefunden","pl-PL":"Wymiar nie został znaleziony","nl-NL":"Dimensie niet gevonden","ko-KR":"차원을 찾지 못했습니다.","pt-BR":"Dimensão não encontrada","fr-FR":"Dimension introuvable","ja-JP":"軸が見つかりません","ru-RU":"Измерение не найдено"}},Object_ErrorMessage_MissingMeasure:{id:"Object.ErrorMessage.MissingMeasure",locale:{"en-US":"Measure not found","zh-TW":"找不到量值","zh-CN":"未找到度量","tr-TR":"Hesaplama bulunamadı","sv-SE":"Måttet hittades inte","it-IT":"Misura non trovata","es-ES":"No se ha encontrado la medida","de-DE":"Kennzahl nicht gefunden","pl-PL":"Miara nie została znaleziona","nl-NL":"Meting niet gevonden","ko-KR":"측정값을 찾지 못했습니다.","pt-BR":"Medida não encontrada","fr-FR":"Mesure introuvable","ja-JP":"メジャーが見つかりません","ru-RU":"Мера не найдена"}},Object_Disclaimer_LimitedData:{id:"Object.Disclaimer.LimitedData",locale:{"en-US":"Currently showing a limited data set.","zh-TW":"目前顯示的是有限的資料集。","zh-CN":"当前正显示有限的数据集。","tr-TR":"Şu anda sınırlı bir veri kümesi gösteriliyor.","sv-SE":"Just nu visas en begränsad uppsättning data.","it-IT":"Attualmente viene visualizzata una serie di dati limitata.","es-ES":"Mostrando actualmente un conjunto limitado de datos.","de-DE":"Zurzeit wird nur ein beschränkter Datensatz angezeigt.","pl-PL":"Aktualnie przedstawiany jest ograniczony zestaw danych.","nl-NL":"Momenteel wordt een beperkte gegevensverzameling getoond.","ko-KR":"현재 제한된 데이터 집합을 표시하고 있습니다.","pt-BR":"Mostrando um conjunto de dados limitado.","fr-FR":"Affichage d'un ensemble de données limité pour l'instant.","ja-JP":"現在、限定的なデータ セットを表示しています。","ru-RU":"В настоящее время отображается ограниченный набор данных."}},"properties.compression.providingOverviewOf":{id:"properties.compression.providingOverviewOf",locale:{"en-US":"Providing overview of {0} dimension values.","zh-TW":"正在提供 {0} 個維度值的概述。","zh-CN":"提供 {0} 维度值的概述。","tr-TR":"{0} boyut değerine genel bakış sağlanıyor.","sv-SE":"Ger en översikt av {0} dimensionsvärden.","it-IT":"Fornita panoramica di {0} valori di dimensione.","es-ES":"Se ofrece una vista general de {0} valores de dimensión.","de-DE":"Bietet einen Überblick über {0} Dimensionswerte.","pl-PL":"Udostępnianie przeglądu wartości wymiaru {0}.","nl-NL":"Er wordt een overzicht van {0} dimensiewaarden verstrekt.","ko-KR":"{0}차원 값의 개요 제공.","pt-BR":"Fornecendo visão geral de {0} valores de dimensão.","fr-FR":"Offre une vue d'ensemble de {0} valeurs de dimension.","ja-JP":"{0} 軸値の概要を提供","ru-RU":"Обеспечение обзора значений измерения в следующем количестве: {0}."}},Object_Disclaimer_OnlyNegativeOrZeroValues:{id:"Object.Disclaimer.OnlyNegativeOrZeroValues",locale:{"en-US":"The chart is not displayed because it contains only negative or zero values.","zh-TW":"系統不會顯示圖表，因為該圖表僅包含負值或零值。","zh-CN":"未显示图表，因为它仅包含负值或零值。","tr-TR":"Yalnızca negatif veya sıfır değerlerini içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller negativa eller nollvärden","it-IT":"Il grafico non viene visualizzato poiché contiene solo valori negativi o uguali a zero.","es-ES":"El gráfico no se muestra porque sólo contiene valores negativos o valores cero.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur negative oder 0-Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości ujemne lub zerowe.","nl-NL":"De grafiek wordt niet weergegeven omdat het alleen negatieve waarden of nulwaarden bevat.","ko-KR":"음수 또는 zero 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores negativos ou zero.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs négatives ou égales à zéro.","ja-JP":"チャートは負の値またはゼロ値しか含まれていないため、表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только отрицательные или нулевые значения."}},Object_Disclaimer_NegativeOrZeroValues:{id:"Object.Disclaimer.NegativeOrZeroValues",locale:{"en-US":"The data set contains negative or zero values that cannot be shown in this chart.","zh-TW":"資料集包含無法在此圖表中顯示的負值或零值。","zh-CN":"数据集中包含无法在此图表中显示的负值或零值。","tr-TR":"Veri kümesi, bu grafikte gösterilemeyen negatif veya sıfır değerlerini içeriyor.","sv-SE":"Datauppsättningen innehåller negativa värden eller nollvärden som inte kan visas i detta diagram.","it-IT":"La serie di dati contiene valori negativi o uguali a zero che non possono essere visualizzati in questo grafico.","es-ES":"El conjunto de datos contiene valores negativos o cero que no se pueden mostrar en este gráfico.","de-DE":"Die in den Datensätzen enthaltenen negativen oder 0-Werte können nicht in diesem Diagramm dargestellt werden.","pl-PL":"Zestaw danych zawiera wartości ujemne lub zerowe, których nie można przedstawić w tym wykresie.","nl-NL":"De gegevensverzameling bevat negatieve waarden of nulwaarden die niet kunnen worden weergegeven in deze grafiek.","ko-KR":"데이터 집합에 해당 차트에 표시할 수 없는 음수 값 또는 zero 값이 포함되어 있습니다.","pt-BR":"O conjunto de dados contém valores negativos ou iguais a zero que não podem ser mostrados neste gráfico.","fr-FR":"L'ensemble de données contient des valeurs négatives ou égales à zéro impossibles à afficher dans ce graphique.","ja-JP":"データ セットには、本チャートに表示できない負の値またはゼロ値が含まれています。","ru-RU":"Набор данных содержит отрицательные или нулевые значения, которые невозможно показать в этой диаграмме."}},Object_Disclaimer_DataRangeIncludingZero:{id:"Object.Disclaimer.DataRangeIncludingZero",locale:{"en-US":"The logarithmic scale has been replaced by a linear scale because the data range includes zero.","zh-TW":"對數刻度已遭線性刻度取代，因為資料範圍包含零。","zh-CN":"对数刻度已替换为线性刻度，因为该数据范围包括零。","tr-TR":"Veri aralığı sıfır değerini içerdiğinden, logaritmik ölçek yerine doğrusal ölçek kullanıldı.","sv-SE":"Den logaritmiska skalan har ersatts av en linjär skala eftersom dataintervallet innehåller värdet noll.","it-IT":"La scala logaritmica è stata sostituita da una scala lineare perché l'intervallo di dati include zero.","es-ES":"La escala logarítmica ha sido reemplazada por una escala lineal porque el rango de datos incluye cero.","de-DE":"Die logarithmische Skala wurde durch die lineare Skala ersetzt, weil der Datenbereich NULL enthält.","pl-PL":"Skala logarytmiczna została zastąpiona liniową, ponieważ zakres danych zawiera zero.","nl-NL":"De logaritmische schaal is vervangen door een lineaire schaal omdat het gegevensbereik nullen bevat.","ko-KR":"데이터 범위에 0이 포함되어 있으므로 로그 눈금이 선형 눈금으로 바뀌었습니다.","pt-BR":"A escala logarítmica foi substituída por uma escala linear, pois o intervalo de dados inclui zero.","fr-FR":"L'échelle logarithmique a été remplacée par une échelle linéaire, car la plage de données comprend la valeur zéro.","ja-JP":"データ範囲にゼロが含まれるため、Log スケールは Linear スケールで置換されています。","ru-RU":"Логарифмический масштаб заменен линейным масштабом, поскольку диапазон данных включает ноль."}},Object_Disclaimer_NoDataExist:{id:"Object.Disclaimer.NoDataExist",locale:{"en-US":"The selections generated no data for this chart.","zh-TW":"此選項無法產生任何適用於此圖表的資料。","zh-CN":"选择未生成此图表的数据。","tr-TR":"Seçimler bu grafik için hiç veri oluşturmadı.","sv-SE":"Urvalen genererade inga data för detta diagram.","it-IT":"Le selezioni non hanno generato dati per questo grafico.","es-ES":"Las selecciones no han generado datos para este gráfico.","de-DE":"Die Auswahlen haben für dieses Diagramm keine Daten generiert.","pl-PL":"Selekcje nie spowodowały wygenerowania danych dla tego wykresu.","nl-NL":"De selecties hebben geen gegevens voor de grafiek gegenereerd.","ko-KR":"선택 내용으로 해당 차트에 대한 데이터가 생성되지 않았습니다.","pt-BR":"As seleções não geraram dados para este gráfico.","fr-FR":"Les sélections n'ont pas généré de données pour ce graphique.","ja-JP":"このチャートには選択からデータが生成されませんでした。","ru-RU":"В результате выборок данные для этой диаграммы не созданы."}},Object_Disclaimer_OnlyNanData:{id:"Object.Disclaimer.OnlyNanData",locale:{"en-US":"The chart is not displayed because it contains only undefined values.","zh-TW":"系統不會顯示圖表，因為該圖表僅包含未定義的值。","zh-CN":"未显示图表，因为它仅包含未定义的值。","tr-TR":"Yalnızca tanımsız değerleri içermesi nedeniyle grafik görüntülenmiyor.","sv-SE":"Diagrammet visas inte eftersom det enbart innehåller odefinierade värden.","it-IT":"Il grafico non è visualizzato poiché contiene solo valori non definiti.","es-ES":"El gráfico no se muestra porque solo contiene valores indefinidos.","de-DE":"Das Diagramm wird nicht angezeigt, da es nur nicht definierte Werte enthält.","pl-PL":"Wykres nie jest wyświetlany, ponieważ zawiera wartości niezdefiniowane.","nl-NL":"De grafiek wordt niet weergegeven omdat deze alleen ongedefinieerde waarden bevat.","ko-KR":"정의되지 않은 값만 포함되어 있으므로 차트가 표시되지 않습니다.","pt-BR":"O gráfico não foi exibido, porque contém apenas valores não definidos.","fr-FR":"Le graphique n'est pas affiché, car il contient uniquement des valeurs non définies.","ja-JP":"未定義の値しか含まれていないため、チャートは表示されていません。","ru-RU":"Диаграмма не отображается, поскольку она содержит только неопределенные значения."}},Object_ChartTooltip_NMore:{id:"Object.ChartTooltip.NMore",locale:{"en-US":"+{0} more","zh-TW":"再加 {0} 個","zh-CN":"+{0} 个","tr-TR":"+{0} öğe daha","sv-SE":"+{0} till","it-IT":"Altre +{0}","es-ES":"+{0} más","de-DE":"+{0} mehr","pl-PL":"+ {0} więcej","nl-NL":"+ {0} meer","ko-KR":"+추가 {0}개","pt-BR":"+{0} mais","fr-FR":"+ {0} de plus","ja-JP":"さらに {0}","ru-RU":"+ дополнительно: {0}"}},Object_ChartTooltip_sumOfPositives:{id:"Object.ChartTooltip.sumOfPositives",locale:{"en-US":"Sum of positives","zh-TW":"正數總和","zh-CN":"正值总和","tr-TR":"Pozitif değerlerin toplamı","sv-SE":"Summan av positiva","it-IT":"Somma valori positivi","es-ES":"Suma de positivos","de-DE":"Summe positiver Werte","pl-PL":"Suma dodatnich","nl-NL":"Som positieven","ko-KR":"양수 합계","pt-BR":"Soma de positivos","fr-FR":"Sommes des valeurs positives","ja-JP":"正の合計","ru-RU":"Сумма положительных значений"}},Object_ChartTooltip_sumOfNegatives:{id:"Object.ChartTooltip.sumOfNegatives",locale:{"en-US":"Sum of negatives","zh-TW":"負數總和","zh-CN":"负值总和","tr-TR":"Negatif değerlerin toplamı","sv-SE":"Summan av negativa","it-IT":"Somma valori negativi","es-ES":"Suma de negativos","de-DE":"Summe negativer Werte","pl-PL":"Suma ujemnych","nl-NL":"Som negatieven","ko-KR":"음수 합계","pt-BR":"Soma de negativos","fr-FR":"Somme des valeurs négatives","ja-JP":"負の合計","ru-RU":"Сумма отрицательных значений"}},Object_ChartTooltip_ColorExpression:{id:"Object.ChartTooltip.ColorExpression",locale:{"en-US":"Color expression","zh-TW":"色彩運算式","zh-CN":"颜色表达式","tr-TR":"Renk ifadesi","sv-SE":"Färguttryck","it-IT":"Espressione colore","es-ES":"Expresión de color","de-DE":"Farbformel","pl-PL":"Wyrażenie koloru","nl-NL":"Kleuruitdrukking","ko-KR":"색상 표현식","pt-BR":"Expressão de cor","fr-FR":"Expression de couleur","ja-JP":"カラー表現","ru-RU":"Выражение для цвета"}},Object_Disclaimer_OnlyNanColor:{id:"Object.Disclaimer.OnlyNanColor",locale:{"en-US":"The data used to color this visualization only contains undefined values.","zh-TW":"用以定義此視覺化的色彩的資料只包含未定義的值。","zh-CN":"用于将该可视化着色的数据仅包含未定义的值。","tr-TR":"Bu görselleştirmeyi renklendirmek için kullanılan veriler yalnızca tanımlanmamış değerler içeriyor.","sv-SE":"Data som används för att färgsätta denna visualisering innehåller enbart odefinierade värden.","it-IT":"I dati utilizzati per colorare questa visualizzazione contengono solo valori non definiti.","es-ES":"Los datos utilizados para colorear esta visualización solo contienen valores indefinidos.","de-DE":"Die verwendeten Daten für die Farbgebung dieser Visualisierung enthalten undefinierte Werte.","pl-PL":"Dane używane do kolorowania tej wizualizacji zawierają wyłącznie niezdefiniowane wartości.","nl-NL":"De gegevens die worden gebruikt om deze visualisatie kleur te geven bevatten uitsluitend ongedefinieerde waarden.","ko-KR":"이 시각화에 색을 지정하는 데 사용된 데이터에는 정의되지 않은 값만 포함되어 있습니다.","pt-BR":"Os dados usados para colorir esse visualização contém somente valores indefinidos.","fr-FR":"Les données utilisées pour colorer cette visualisation ne comportent que des valeurs non définies.","ja-JP":"このビジュアライゼーションの色の割り当てに使用したデータには、未定義の値が含まれています。","ru-RU":"Данные, используемые для выбора цвета визуализации, содержат только неопределенные значения."}},properties_trendlines_types_average:{id:"properties.trendlines.types.average",locale:{"en-US":"Average","zh-TW":"平均值","zh-CN":"平均值","tr-TR":"Ortalama","sv-SE":"Medel","it-IT":"Media","es-ES":"Media","de-DE":"Durchschnitt","pl-PL":"Średnia","nl-NL":"Gemiddelde","ko-KR":"평균","pt-BR":"Média","fr-FR":"Moyenne","ja-JP":"平均値","ru-RU":"Среднее"}},properties_trendlines_types_linear:{id:"properties.trendlines.types.linear",locale:{"en-US":"Linear","zh-TW":"線性","zh-CN":"线性","tr-TR":"Doğrusal","sv-SE":"Linjär","it-IT":"Lineare","es-ES":"Lineal","de-DE":"Linear","pl-PL":"Liniowa","nl-NL":"Lineair","ko-KR":"선형","pt-BR":"Linear","fr-FR":"Linéaire","ja-JP":"線形","ru-RU":"Линейный"}},properties_trendlines_types_polynomial2:{id:"properties.trendlines.types.polynomial2",locale:{"en-US":"Second degree polynomial","zh-TW":"第二度多項式","zh-CN":"二次多项式","tr-TR":"İkinci derece polinom","sv-SE":"Polynomial, andra graden","it-IT":"Polinomio di secondo grado","es-ES":"Polinómica de segundo grado","de-DE":"Polynom zweiten Grades","pl-PL":"Wielomianowa drugiego stopnia","nl-NL":"Tweedegraadspolynoom","ko-KR":"2차 다항식","pt-BR":"Polinômio de segundo grau","fr-FR":"Polynomial du 2ème degré","ja-JP":"2 番目の角度の多項式近似","ru-RU":"Полиномиальный второй степени"}},properties_trendlines_types_polynomial3:{id:"properties.trendlines.types.polynomial3",locale:{"en-US":"Third degree polynomial","zh-TW":"第三度多項式","zh-CN":"三次多项式","tr-TR":"Üçüncü derece polinom","sv-SE":"Polynomial, tredje graden","it-IT":"Polinomio di terzo grado","es-ES":"Polinómica de tercer grado","de-DE":"Polynom dritten Grades","pl-PL":"Wielomianowa trzeciego stopnia","nl-NL":"Derdegraadspolynoom","ko-KR":"3차 다항식","pt-BR":"Polinômio de terceiro grau","fr-FR":"Polynomial du 3ème degré","ja-JP":"3 番目の角度の多項式近似","ru-RU":"Полиномиальный третьей степени"}},properties_trendlines_types_polynomial4:{id:"properties.trendlines.types.polynomial4",locale:{"en-US":"Fourth degree polynomial","zh-TW":"第四度多項式","zh-CN":"四次多项式","tr-TR":"Dördüncü derece polinom","sv-SE":"Polynomial, fjärde graden","it-IT":"Polinomio di quarto grado","es-ES":"Polinómica de cuarto grado","de-DE":"Polynom vierten Grades","pl-PL":"Wielomianowa czwartego stopnia","nl-NL":"Vierdegraadspolynoom","ko-KR":"4차 다항식","pt-BR":"Polinômio de quarto grau","fr-FR":"Polynomial du 4ème degré","ja-JP":"4 番目の角度の多項式近似","ru-RU":"Полиномиальный четвертой степени"}},properties_trendlines_types_exponential:{id:"properties.trendlines.types.exponential",locale:{"en-US":"Exponential","zh-TW":"指數","zh-CN":"指数","tr-TR":"Üstel","sv-SE":"Exponentiell","it-IT":"Esponenziale","es-ES":"Exponencial","de-DE":"Exponentiell","pl-PL":"Wykładnicze","nl-NL":"Exponentieel","ko-KR":"지수","pt-BR":"Exponencial","fr-FR":"Exponentiel","ja-JP":"指数","ru-RU":"Экспоненциальный"}},properties_trendlines_types_logarithmic:{id:"properties.trendlines.types.logarithmic",locale:{"en-US":"Logarithmic","zh-TW":"對數","zh-CN":"对数","tr-TR":"Logaritmik","sv-SE":"Logaritmisk","it-IT":"Logaritmica","es-ES":"Logarítmica","de-DE":"Logarithmisch","pl-PL":"Logarytmiczna","nl-NL":"Logaritmisch","ko-KR":"로그","pt-BR":"Logarítmico","fr-FR":"Logarithmique","ja-JP":"対数","ru-RU":"Логарифмический"}},properties_trendlines_types_power:{id:"properties.trendlines.types.power",locale:{"en-US":"Power","zh-TW":"乘冪","zh-CN":"幂","tr-TR":"Üs","sv-SE":"Potens","it-IT":"Potenza","es-ES":"Potencia","de-DE":"Potenz","pl-PL":"Potęgowa","nl-NL":"Macht","ko-KR":"거듭제곱","pt-BR":"Potência","fr-FR":"Puissance","ja-JP":"累乗","ru-RU":"Силовой"}},Common_Measures:{id:"Common.Measures",locale:{"en-US":"Measures","de-DE":"Kennzahlen","fr-FR":"Mesures","it-IT":"Misure","ja-JP":"メジャー","ko-KR":"측정값","es-ES":"Medidas","nl-NL":"Metingen","pl-PL":"Miary","pt-BR":"Medidas","sv-SE":"Mått","tr-TR":"Hesaplamalar","zh-CN":"度量","zh-TW":"量值","ru-RU":"Меры"}},"properties.compression.density":{id:"properties.compression.density",locale:{"en-US":"Density","de-DE":"Dichte","fr-FR":"Densité","it-IT":"Densità","ja-JP":"密度","ko-KR":"밀도","es-ES":"Densidad","nl-NL":"Dichtheid","pl-PL":"Gęstość","pt-BR":"Densidade","sv-SE":"Täthet","tr-TR":"Yoğunluk","zh-CN":"密度","zh-TW":"密度","ru-RU":"Плотность"}},"Object.Navigation.PanUp":{id:"Object.Navigation.PanUp",locale:{"en-US":"Pan up","de-DE":"Nach oben schwenken","fr-FR":"Panoramique vers le haut","it-IT":"Panoramica su","ja-JP":"上にパン","ko-KR":"위로 이동","es-ES":"Desplazar arriba","nl-NL":"Omhoog schuiven","pl-PL":"Przesuń w górę","pt-BR":"Mover para cima","sv-SE":"Panorera uppåt","tr-TR":"Yukarı kaydır","zh-CN":"向上平移","zh-TW":"向上平移","ru-RU":"Панорамирование снизу вверх"}},"Object.Navigation.PanDown":{id:"Object.Navigation.PanDown",locale:{"en-US":"Pan down","de-DE":"Nach unten schwenken","fr-FR":"Panoramique vers le bas","it-IT":"Panoramica giù","ja-JP":"下にパン","ko-KR":"아래로 이동","es-ES":"Desplazar abajo","nl-NL":"Omlaag schuiven","pl-PL":"Przesuń w dół","pt-BR":"Mover para baixo","sv-SE":"Panorera nedåt","tr-TR":"Aşağı kaydır","zh-CN":"向下平移","zh-TW":"向下平移","ru-RU":"Панорамирование сверху вниз"}},"Object.Navigation.PanLeft":{id:"Object.Navigation.PanLeft",locale:{"en-US":"Pan left","de-DE":"Nach links schwenken","fr-FR":"Panoramique à gauche","it-IT":"Panoramica sinistra","ja-JP":"左にパン","ko-KR":"왼쪽으로 이동","es-ES":"Desplazar a la izquierda","nl-NL":"Naar links schuiven","pl-PL":"Przesuń w lewo","pt-BR":"Mover para a esquerda","sv-SE":"Panorera vänster","tr-TR":"Sola kaydır","zh-CN":"向左平移","zh-TW":"向左平移","ru-RU":"Панорамирование влево"}},"Object.Navigation.PanRight":{id:"Object.Navigation.PanRight",locale:{"en-US":"Pan right","de-DE":"Nach rechts schwenken","fr-FR":"Panoramique à droite","it-IT":"Panoramica destra","ja-JP":"右にパン","ko-KR":"오른쪽으로 이동","es-ES":"Desplazar a la derecha","nl-NL":"Naar rechts schuiven","pl-PL":"Przesuń w prawo","pt-BR":"Mover para a direita","sv-SE":"Panorera höger","tr-TR":"Sağa kaydır","zh-CN":"向右平移","zh-TW":"向右平移","ru-RU":"Панорамирование вправо"}},"Object.Navigation.ResetZoom":{id:"Object.Navigation.ResetZoom",locale:{"en-US":"Reset zoom","de-DE":"Zoom zurücksetzen","fr-FR":"Réinitialiser le zoom","it-IT":"Reimposta zoom","ja-JP":"ズームのリセット","ko-KR":"확대/축소 다시 설정","es-ES":"Restablecer zoom","nl-NL":"Zoom herstellen","pl-PL":"Resetuj powiększenie","pt-BR":"Restaurar zoom","sv-SE":"Återställ zoom","tr-TR":"Yakınlaştırmayı sıfırla","zh-CN":"重置缩放","zh-TW":"重設縮放比例","ru-RU":"Сброс настроек по увеличению/уменьшению"}},"Object.Navigation.ZoomIn":{id:"Object.Navigation.ZoomIn",locale:{"en-US":"Zoom in","de-DE":"Vergrößern","fr-FR":"Zoom avant","it-IT":"Zoom avanti","ja-JP":"ズームイン","ko-KR":"확대","es-ES":"Acercar","nl-NL":"Inzoomen","pl-PL":"Powiększ","pt-BR":"Mais zoom","sv-SE":"Zooma in","tr-TR":"Yakınlaştır","zh-CN":"放大","zh-TW":"放大","ru-RU":"Увеличение"}},"Object.Navigation.ZoomOut":{id:"Object.Navigation.ZoomOut",locale:{"en-US":"Zoom out","de-DE":"Verkleinern","fr-FR":"Zoom arrière","it-IT":"Zoom indietro","ja-JP":"ズームアウト","ko-KR":"축소","es-ES":"Alejar","nl-NL":"Uitzoomen","pl-PL":"Zmniejsz","pt-BR":"Menos zoom","sv-SE":"Zooma ut","tr-TR":"Uzaklaştır","zh-CN":"缩小","zh-TW":"縮小","ru-RU":"Уменьшение"}},Tooltip_ToggleOnLassoSelection:{id:"Tooltip.ToggleOnLassoSelection",locale:{"en-US":"Turn on lasso selection","de-DE":"Lasso-Auswahl aktivieren","fr-FR":"Activer la sélection au lasso","it-IT":"Attiva selezione lazo","ja-JP":"囲み選択をオンにする","ko-KR":"올가미 선택 켜기","es-ES":"Activar la selección de contorno","nl-NL":"Lassoselectie inschakelen","pl-PL":"Włącz zaznaczenie lasso","pt-BR":"Ativar seleção de laço","sv-SE":"Slå på lassourval","tr-TR":"Serbest seçimi aç","zh-CN":"开启套索选择方法","zh-TW":"開啟套索選取","ru-RU":"Включить выбор лассо"}},Tooltip_ToggleOffLassoSelection:{id:"Tooltip.ToggleOffLassoSelection",locale:{"en-US":"Turn off lasso selection","de-DE":"Lasso-Auswahl deaktivieren","fr-FR":"Désactiver la sélection au lasso","it-IT":"Disattiva selezione lazo","ja-JP":"囲み選択をオフにする","ko-KR":"올가미 선택 끄기","es-ES":"Desactivar la selección de contorno","nl-NL":"Lassoselectie uitschakelen","pl-PL":"Wyłącz zaznaczenie lasso","pt-BR":"Desativar seleção de laço","sv-SE":"Stäng av lassourval","tr-TR":"Serbest seçimi kapat","zh-CN":"关闭套索选择方法","zh-TW":"關閉套索選取","ru-RU":"Выключить выбор лассо"}}};return function(t){const{flags:n}=t;return function(e){if(e&&e.get&&e.add){const t="properties.compression.providingOverviewOf";if(e.get(t)!==t)return;Object.keys(Ij).forEach(t=>{e.add(Ij[t])})}}(t.translator),{qae:$F(t),ext:Oj(t),component(){const t=(()=>{const t=e.useElement(),n=e.useOptions(),i=r(),{viewState:o,viewCache:a}=Na(),[s,l]=e.useState();return e.useEffect(()=>{if(!o)return;t.style.overflow="hidden";const e=GI(),r=e({renderer:{prio:[n.renderer||"canvas"]}}),s=r.chart({element:t,data:[],settings:{}});return l({picassoInstance:r,chart:s,actions:i,viewState:o,viewCache:a,picasso:e,progressive:{timer:null,renderPromise:null}}),()=>{s.destroy()}},[o]),s})(),i=FR({core:t,flags:n});(({settings:t,models:n})=>{const[,r]=e.usePromise(()=>{if(!t)return Promise.resolve();const{chartModel:e}=n;return e.command.update({settings:t})},[t]);if(r)throw r})({settings:VF({core:t,models:i,flags:n}),models:i}),(({core:t,models:n})=>{e.onTakeSnapshot(e=>{if(!n)return;const{layoutService:r,dockService:i,colorService:o,chartModel:a}=n,s=a.query.getViewState(),l=a.query.getDataHandler(),{isBinnedData:c}=l.getMeta(),u=c?r.getLayoutValue("dataPages"):e.qHyperCube.qDataPages,d=c?r.getLayoutValue("dataPages"):r.getDataPages();TI(!0,u,d);const{width:f,height:p}=i.meta.chart.size;if(e.snapshotData=e.snapshotData||{},e.dataPages=d,e.snapshotData.content={size:{w:f,h:p}},r.meta.isSnapshot)return Promise.resolve();const h=t.chart.component(YI.COMPONENT.LEGEND_CATEGORICAL),m=h&&h._DO_NOT_USE_getInfo&&h._DO_NOT_USE_getInfo().offset,{xAxisMin:g,xAxisMax:y,yAxisMin:v,yAxisMax:b}=s.get("dataView");return e.snapshotData.content.chartData={xAxisMin:g,xAxisMax:y,yAxisMin:v,yAxisMax:b,legendScrollOffset:m},o.getSnapshotData().then(t=>{e.snapshotData.content.chartData={...e.snapshotData.content.chartData,...t}}).catch(()=>{})}),e.useImperativeHandle(()=>({getViewState(){if(!n)return;const e=t.chart.component(YI.COMPONENT.LEGEND_CATEGORICAL),r=e&&e._DO_NOT_USE_getInfo&&e._DO_NOT_USE_getInfo().offset,i=n.chartModel.query.getViewState(),{xAxisMin:o,xAxisMax:a,yAxisMin:s,yAxisMax:l}=i.get("dataView");return{xAxisMin:o,xAxisMax:a,yAxisMin:s,yAxisMax:l,legendScrollOffset:r}}}),[n])})({core:t,models:i})}}}});
