@nebula.js/sn-pie-chart 1.26.7 → 1.26.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api-specifications/plugins.json +1 -1
- package/api-specifications/properties.json +1 -1
- package/core/esm/index.js +3 -3
- package/dist/sn-pie-chart.js +8 -8
- package/dist/sn-pie-chart.systemjs.js +2 -2
- package/package.json +1 -1
- package/sn-pie-chart-ext/dist/sn-pie-chart.js +8 -8
- package/sn-pie-chart-ext/sn-pie-chart.qext +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/sn-pie-chart v1.26.
|
|
2
|
+
* @nebula.js/sn-pie-chart v1.26.9
|
|
3
3
|
* Copyright (c) 2024 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
@@ -11,4 +11,4 @@ System.register(["hammerjs","picasso.js","picasso-plugin-q","qlik-chart-modules"
|
|
|
11
11
|
* @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
|
|
12
12
|
* @website https://github.com/cssinjs/jss
|
|
13
13
|
* @license MIT
|
|
14
|
-
*/fs();var ys=Date.now(),vs="fnValues"+ys,bs="fnStyle"+ ++ys,xs=function(){return{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=la(e,{},n);return r[bs]=t,r},onProcessStyle:function(e,t){if(vs in t||bs in t)return e;var n={};for(var r in e){var i=e[r];"function"==typeof i&&(delete e[r],n[r]=i)}return t[vs]=n,e},onUpdate:function(e,t,n,r){var i=t,o=i[bs];o&&(i.style=o(e)||{});var a=i[vs];if(a)for(var s in a)i.prop(s,a[s](e),r)}}},ws="@global",Ss="@global ",Cs=function(){function e(e,t,n){for(var r in this.type="global",this.at=ws,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new Ba(uo({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(e){return this.rules.toString(e)},e}(),Es=function(){function e(e,t,n){this.type="global",this.at=ws,this.isProcessed=!1,this.key=e,this.options=n;var r=e.substr(Ss.length);this.rule=n.jss.createRule(r,t,uo({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),ks=/\s*,\s*/g;function Ts(e,t){for(var n=e.split(ks),r="",i=0;i<n.length;i++)r+=t+" "+n[i].trim(),n[i+1]&&(r+=", ");return r}function Rs(){return{onCreateRule:function(e,t,n){if(!e)return null;if(e===ws)return new Cs(e,t,n);if("@"===e[0]&&e.substr(0,Ss.length)===Ss)return new Es(e,t,n);var r=n.parent;return r&&("global"===r.type||r.options.parent&&"global"===r.options.parent.type)&&(n.scoped=!1),n.selector||!1!==n.scoped||(n.selector=e),null},onProcessRule:function(e,t){"style"===e.type&&t&&(function(e,t){var n=e.options,r=e.style,i=r?r[ws]:null;if(i){for(var o in i)t.addRule(o,i[o],uo({},n,{selector:Ts(o,e.selector)}));delete r[ws]}}(e,t),function(e,t){var n=e.options,r=e.style;for(var i in r)if("@"===i[0]&&i.substr(0,ws.length)===ws){var o=Ts(i.substr(ws.length),e.selector);t.addRule(o,r[i],uo({},n,{selector:o})),delete r[i]}}(e,t))}}}var Ds=/\s*,\s*/g,Ms=/&/g,qs=/\$([\w-]+)/g;function Ps(){function e(e,t){return function(n,r){var i=e.getRule(r)||t&&t.getRule(r);return i?i.selector:r}}function t(e,t){for(var n=t.split(Ds),r=e.split(Ds),i="",o=0;o<n.length;o++)for(var a=n[o],s=0;s<r.length;s++){var l=r[s];i&&(i+=", "),i+=-1!==l.indexOf("&")?l.replace(Ms,a):a+" "+l}return i}function n(e,t,n){if(n)return uo({},n,{index:n.index+1});var r=e.options.nestingLevel;r=void 0===r?1:r+1;var i=uo({},e.options,{nestingLevel:r,index:t.indexOf(e)+1});return delete i.name,i}return{onProcessStyle:function(r,i,o){if("style"!==i.type)return r;var a,s,l=i,u=l.options.parent;for(var c in r){var d=-1!==c.indexOf("&"),p="@"===c[0];if(d||p){if(a=n(l,u,a),d){var h=t(c,l.selector);s||(s=e(u,o)),h=h.replace(qs,s);var f=l.key+"-"+c;"replaceRule"in u?u.replaceRule(f,r[c],uo({},a,{selector:h})):u.addRule(f,r[c],uo({},a,{selector:h}))}else p&&u.addRule(c,{},a).addRule(l.key,r[c],{selector:l.selector});delete r[c]}}return r}}}var Ns=/[A-Z]/g,Ls=/^ms-/,Is={};function As(e){return"-"+e.toLowerCase()}function Os(e){if(Is.hasOwnProperty(e))return Is[e];var t=e.replace(Ns,As);return Is[e]=Ls.test(t)?"-"+t:t}function zs(e){var t={};for(var n in e){t[0===n.indexOf("--")?n:Os(n)]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(zs):t.fallbacks=zs(e.fallbacks)),t}var js=ms&&CSS?CSS.px:"px",Fs=ms&&CSS?CSS.ms:"ms",Hs=ms&&CSS?CSS.percent:"%";function $s(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},r={};for(var i in e)r[i]=e[i],r[i.replace(t,n)]=e[i];return r}var _s=$s({"animation-delay":Fs,"animation-duration":Fs,"background-position":js,"background-position-x":js,"background-position-y":js,"background-size":js,border:js,"border-bottom":js,"border-bottom-left-radius":js,"border-bottom-right-radius":js,"border-bottom-width":js,"border-left":js,"border-left-width":js,"border-radius":js,"border-right":js,"border-right-width":js,"border-top":js,"border-top-left-radius":js,"border-top-right-radius":js,"border-top-width":js,"border-width":js,"border-block":js,"border-block-end":js,"border-block-end-width":js,"border-block-start":js,"border-block-start-width":js,"border-block-width":js,"border-inline":js,"border-inline-end":js,"border-inline-end-width":js,"border-inline-start":js,"border-inline-start-width":js,"border-inline-width":js,"border-start-start-radius":js,"border-start-end-radius":js,"border-end-start-radius":js,"border-end-end-radius":js,margin:js,"margin-bottom":js,"margin-left":js,"margin-right":js,"margin-top":js,"margin-block":js,"margin-block-end":js,"margin-block-start":js,"margin-inline":js,"margin-inline-end":js,"margin-inline-start":js,padding:js,"padding-bottom":js,"padding-left":js,"padding-right":js,"padding-top":js,"padding-block":js,"padding-block-end":js,"padding-block-start":js,"padding-inline":js,"padding-inline-end":js,"padding-inline-start":js,"mask-position-x":js,"mask-position-y":js,"mask-size":js,height:js,width:js,"min-height":js,"max-height":js,"min-width":js,"max-width":js,bottom:js,left:js,top:js,right:js,inset:js,"inset-block":js,"inset-block-end":js,"inset-block-start":js,"inset-inline":js,"inset-inline-end":js,"inset-inline-start":js,"box-shadow":js,"text-shadow":js,"column-gap":js,"column-rule":js,"column-rule-width":js,"column-width":js,"font-size":js,"font-size-delta":js,"letter-spacing":js,"text-decoration-thickness":js,"text-indent":js,"text-stroke":js,"text-stroke-width":js,"word-spacing":js,motion:js,"motion-offset":js,outline:js,"outline-offset":js,"outline-width":js,perspective:js,"perspective-origin-x":Hs,"perspective-origin-y":Hs,"transform-origin":Hs,"transform-origin-x":Hs,"transform-origin-y":Hs,"transform-origin-z":Hs,"transition-delay":Fs,"transition-duration":Fs,"vertical-align":js,"flex-basis":js,"shape-margin":js,size:js,gap:js,grid:js,"grid-gap":js,"row-gap":js,"grid-row-gap":js,"grid-column-gap":js,"grid-template-rows":js,"grid-template-columns":js,"grid-auto-rows":js,"grid-auto-columns":js,"box-shadow-x":js,"box-shadow-y":js,"box-shadow-blur":js,"box-shadow-spread":js,"font-line-height":js,"text-shadow-x":js,"text-shadow-y":js,"text-shadow-blur":js});function Us(e,t,n){if(null==t)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=Us(e,t[r],n);else if("object"==typeof t)if("fallbacks"===e)for(var i in t)t[i]=Us(i,t[i],n);else for(var o in t)t[o]=Us(e+"-"+o,t[o],n);else if("number"==typeof t&&!1===isNaN(t)){var a=n[e]||_s[e];return!a||0===t&&a===js?t.toString():"function"==typeof a?a(t).toString():""+t+a}return t}function Vs(e){void 0===e&&(e={});var t=$s(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=Us(r,e[r],t);return e},onChangeValue:function(e,n){return Us(n,e,t)}}}var Ws="",Bs="",Ys="",Ks="",Gs=ea&&"ontouchstart"in document.documentElement;if(ea){var Js={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},Zs=document.createElement("p").style;for(var Xs in Js)if(Xs+"Transform"in Zs){Ws=Xs,Bs=Js[Xs];break}"Webkit"===Ws&&"msHyphens"in Zs&&(Ws="ms",Bs=Js.ms,Ks="edge"),"Webkit"===Ws&&"-apple-trailing-word"in Zs&&(Ys="apple")}var Qs={js:Ws,css:Bs,vendor:Ys,browser:Ks,isTouch:Gs};var el={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===Qs.js?"-webkit-"+e:Qs.css+e)}},tl={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===Qs.js?Qs.css+"print-"+e:e)}},nl=/[-\s]+(.)?/g;function rl(e,t){return t?t.toUpperCase():""}function il(e){return e.replace(nl,rl)}function ol(e){return il("-"+e)}var al,sl={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===Qs.js){var n="mask-image";if(il(n)in t)return e;if(Qs.js+ol(n)in t)return Qs.css+e}return e}},ll={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==Qs.vendor||Qs.isTouch?e:Qs.css+e)}},ul={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:Qs.css+e)}},cl={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:Qs.css+e)}},dl={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===Qs.js||"ms"===Qs.js&&"edge"!==Qs.browser?Qs.css+e:e)}},pl={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===Qs.js||"ms"===Qs.js||"apple"===Qs.vendor?Qs.css+e:e)}},hl={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===Qs.js?"WebkitColumn"+ol(e)in t&&Qs.css+"column-"+e:"Moz"===Qs.js&&("page"+ol(e)in t&&"page-"+e))}},fl={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===Qs.js)return e;var n=e.replace("-inline","");return Qs.js+ol(n)in t&&Qs.css+n}},ml={supportedProperty:function(e,t){return il(e)in t&&e}},gl={supportedProperty:function(e,t){var n=ol(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:Qs.js+n in t?Qs.css+e:"Webkit"!==Qs.js&&"Webkit"+n in t&&"-webkit-"+e}},yl={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===Qs.js?""+Qs.css+e:e)}},vl={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===Qs.js?Qs.css+"scroll-chaining":e)}},bl={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},xl={supportedProperty:function(e,t){var n=bl[e];return!!n&&(Qs.js+ol(n)in t&&Qs.css+n)}},wl={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},Sl=Object.keys(wl),Cl=function(e){return Qs.css+e},El={supportedProperty:function(e,t,n){var r=n.multiple;if(Sl.indexOf(e)>-1){var i=wl[e];if(!Array.isArray(i))return Qs.js+ol(i)in t&&Qs.css+i;if(!r)return!1;for(var o=0;o<i.length;o++)if(!(Qs.js+ol(i[0])in t))return!1;return i.map(Cl)}return!1}},kl=[el,tl,sl,ll,ul,cl,dl,pl,hl,fl,ml,gl,yl,vl,xl,El],Tl=kl.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),Rl=kl.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,Ho(t.noPrefill)),e}),[]),Dl={};if(ea){al=document.createElement("p");var Ml=window.getComputedStyle(document.documentElement,"");for(var ql in Ml)isNaN(ql)||(Dl[Ml[ql]]=Ml[ql]);Rl.forEach((function(e){return delete Dl[e]}))}function Pl(e,t){if(void 0===t&&(t={}),!al)return e;if(null!=Dl[e])return Dl[e];"transition"!==e&&"transform"!==e||(t[e]=e in al.style);for(var n=0;n<Tl.length&&(Dl[e]=Tl[n](e,al.style,t),!Dl[e]);n++);try{al.style[e]=""}catch(e){return!1}return Dl[e]}var Nl,Ll={},Il={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},Al=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function Ol(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var r=t?Pl(t):", "+Pl(n);return r||(t||n)}function zl(e,t){var n=t;if(!Nl||"content"===e)return t;if("string"!=typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=Ll[r])return Ll[r];try{Nl.style[e]=n}catch(e){return Ll[r]=!1,!1}if(Il[e])n=n.replace(Al,Ol);else if(""===Nl.style[e]&&("-ms-flex"===(n=Qs.css+n)&&(Nl.style[e]="-ms-flexbox"),Nl.style[e]=n,""===Nl.style[e]))return Ll[r]=!1,!1;return Nl.style[e]="",Ll[r]=n,Ll[r]}function jl(){function e(t){for(var n in t){var r=t[n];if("fallbacks"===n&&Array.isArray(r))t[n]=r.map(e);else{var i=!1,o=Pl(n);o&&o!==n&&(i=!0);var a=!1,s=zl(o,ca(r));s&&s!==r&&(a=!0),(i||a)&&(i&&delete t[n],t[o||n]=s||r)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at=function(e){return"-"===e[1]||"ms"===Qs.js?e:"@"+Qs.css+"keyframes"+e.substr(10)}(t.at)}},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return zl(t,ca(e))||e}}}function Fl(){return{plugins:[xs(),Rs(),Ps(),{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=zs(e[t]);return e}return zs(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var r=Os(t);return t===r?e:(n.prop(r,e),null)}},Vs(),"undefined"==typeof window?null:jl(),(e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length},{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},i=Object.keys(t).sort(e),o=0;o<i.length;o++)r[i[o]]=t[i[o]];return r}})]};var e}function Hl(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;if(e.Component,!n)return t;var r=uo({},t);return Object.keys(n).forEach((function(e){n[e]&&(r[e]="".concat(t[e]," ").concat(n[e]))})),r}ea&&(Nl=document.createElement("p"));var $l={set:function(e,t,n,r){var i=e.get(t);i||(i=new Map,e.set(t,i)),i.set(n,r)},get:function(e,t,n){var r=e.get(t);return r?r.get(n):void 0},delete:function(e,t,n){e.get(t).delete(n)}},_l=$l,Ul=m.createContext(null);function Vl(){return m.useContext(Ul)}var Wl,Bl=fs(Fl()),Yl={disableGeneration:!1,generateClassName:Zo(),jss:Bl,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},Kl=m.createContext(Yl);function Gl(e){var t=e.children,n=e.injectFirst,r=void 0!==n&&n,i=e.disableGeneration,o=void 0!==i&&i,a=Co(e,["children","injectFirst","disableGeneration"]),s=uo({},m.useContext(Kl),{disableGeneration:o},a);if(!s.jss.options.insertionPoint&&r&&"undefined"!=typeof window){if(!Wl){var l=document.head;Wl=document.createComment("mui-inject-first"),l.insertBefore(Wl,l.firstChild)}s.jss=fs({plugins:Fl().plugins,insertionPoint:Wl})}return m.createElement(Kl.Provider,{value:s},t)}var Jl=-1e9;var Zl={};function Xl(e,t){var n=e.state,r=e.theme,i=e.stylesOptions,o=e.stylesCreator,a=e.name;if(!i.disableGeneration){var s=_l.get(i.sheetsManager,o,r);s||(s={refs:0,staticSheet:null,dynamicStyles:null},_l.set(i.sheetsManager,o,r,s));var l=uo({},o.options,i,{theme:r,flip:"boolean"==typeof i.flip?i.flip:"rtl"===r.direction});l.generateId=l.serverGenerateClassName||l.generateClassName;var u=i.sheetsRegistry;if(0===s.refs){var c;i.sheetsCache&&(c=_l.get(i.sheetsCache,o,r));var d=o.create(r,a);c||((c=i.jss.createStyleSheet(d,uo({link:!1},l))).attach(),i.sheetsCache&&_l.set(i.sheetsCache,o,r,c)),u&&u.add(c),s.staticSheet=c,s.dynamicStyles=gs(d)}if(s.dynamicStyles){var p=i.jss.createStyleSheet(s.dynamicStyles,uo({link:!0},l));p.update(t),p.attach(),n.dynamicSheet=p,n.classes=Hl({baseClasses:s.staticSheet.classes,newClasses:p.classes}),u&&u.add(p)}else n.classes=s.staticSheet.classes;s.refs+=1}}function Ql(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,r=t.classNamePrefix,i=t.Component,o=t.defaultTheme,a=void 0===o?Zl:o,s=Co(t,["name","classNamePrefix","Component","defaultTheme"]),l=function(e){var t="function"==typeof e;return{create:function(n,r){var i;try{i=t?e(n):e}catch(e){throw e}if(!r||!n.overrides||!n.overrides[r])return i;var o=n.overrides[r],a=uo({},i);return Object.keys(o).forEach((function(e){a[e]=ho(a[e],o[e])})),a},options:{}}}(e),u=n||r||"makeStyles";l.options={index:Jl+=1,name:n,meta:u,classNamePrefix:u};return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Vl()||a,r=uo({},m.useContext(Kl),s),o=m.useRef(),u=m.useRef();!function(e,t){var n,r=m.useRef([]),i=m.useMemo((function(){return{}}),t);r.current!==i&&(r.current=i,n=e()),m.useEffect((function(){return function(){n&&n()}}),[i])}((function(){var i={name:n,state:{},stylesCreator:l,stylesOptions:r,theme:t};return Xl(i,e),u.current=!1,o.current=i,function(){!function(e){var t=e.state,n=e.theme,r=e.stylesOptions,i=e.stylesCreator;if(!r.disableGeneration){var o=_l.get(r.sheetsManager,i,n);o.refs-=1;var a=r.sheetsRegistry;0===o.refs&&(_l.delete(r.sheetsManager,i,n),r.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}(i)}}),[t,l]),m.useEffect((function(){u.current&&function(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}(o.current,e),u.current=!0}));var c=function(e,t,n){var r=e.state;if(e.stylesOptions.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var i=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,i=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,i=!0),i&&(r.cacheClasses.value=Hl({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}(o.current,e.classes,i);return c}}function eu(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=eu(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function tu(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=eu(e))&&(r&&(r+=" "),r+=t);return r}var nu={exports:{}},ru={},iu="function"==typeof Symbol&&Symbol.for,ou=iu?Symbol.for("react.element"):60103,au=iu?Symbol.for("react.portal"):60106,su=iu?Symbol.for("react.fragment"):60107,lu=iu?Symbol.for("react.strict_mode"):60108,uu=iu?Symbol.for("react.profiler"):60114,cu=iu?Symbol.for("react.provider"):60109,du=iu?Symbol.for("react.context"):60110,pu=iu?Symbol.for("react.async_mode"):60111,hu=iu?Symbol.for("react.concurrent_mode"):60111,fu=iu?Symbol.for("react.forward_ref"):60112,mu=iu?Symbol.for("react.suspense"):60113,gu=iu?Symbol.for("react.suspense_list"):60120,yu=iu?Symbol.for("react.memo"):60115,vu=iu?Symbol.for("react.lazy"):60116,bu=iu?Symbol.for("react.block"):60121,xu=iu?Symbol.for("react.fundamental"):60117,wu=iu?Symbol.for("react.responder"):60118,Su=iu?Symbol.for("react.scope"):60119;function Cu(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case ou:switch(e=e.type){case pu:case hu:case su:case uu:case lu:case mu:return e;default:switch(e=e&&e.$$typeof){case du:case fu:case vu:case yu:case cu:return e;default:return t}}case au:return t}}}function Eu(e){return Cu(e)===hu}ru.AsyncMode=pu,ru.ConcurrentMode=hu,ru.ContextConsumer=du,ru.ContextProvider=cu,ru.Element=ou,ru.ForwardRef=fu,ru.Fragment=su,ru.Lazy=vu,ru.Memo=yu,ru.Portal=au,ru.Profiler=uu,ru.StrictMode=lu,ru.Suspense=mu,ru.isAsyncMode=function(e){return Eu(e)||Cu(e)===pu},ru.isConcurrentMode=Eu,ru.isContextConsumer=function(e){return Cu(e)===du},ru.isContextProvider=function(e){return Cu(e)===cu},ru.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===ou},ru.isForwardRef=function(e){return Cu(e)===fu},ru.isFragment=function(e){return Cu(e)===su},ru.isLazy=function(e){return Cu(e)===vu},ru.isMemo=function(e){return Cu(e)===yu},ru.isPortal=function(e){return Cu(e)===au},ru.isProfiler=function(e){return Cu(e)===uu},ru.isStrictMode=function(e){return Cu(e)===lu},ru.isSuspense=function(e){return Cu(e)===mu},ru.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===su||e===hu||e===uu||e===lu||e===mu||e===gu||"object"==typeof e&&null!==e&&(e.$$typeof===vu||e.$$typeof===yu||e.$$typeof===cu||e.$$typeof===du||e.$$typeof===fu||e.$$typeof===xu||e.$$typeof===wu||e.$$typeof===Su||e.$$typeof===bu)},ru.typeOf=Cu,nu.exports=ru;var ku=nu.exports,Tu={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Ru={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Du={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Mu={};function qu(e){return ku.isMemo(e)?Du:Mu[e.$$typeof]||Tu}Mu[ku.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Mu[ku.Memo]=Du;var Pu=Object.defineProperty,Nu=Object.getOwnPropertyNames,Lu=Object.getOwnPropertySymbols,Iu=Object.getOwnPropertyDescriptor,Au=Object.getPrototypeOf,Ou=Object.prototype;var zu=function e(t,n,r){if("string"!=typeof n){if(Ou){var i=Au(n);i&&i!==Ou&&e(t,i,r)}var o=Nu(n);Lu&&(o=o.concat(Lu(n)));for(var a=qu(t),s=qu(n),l=0;l<o.length;++l){var u=o[l];if(!(Ru[u]||r&&r[u]||s&&s[u]||a&&a[u])){var c=Iu(n,u);try{Pu(t,u,c)}catch(e){}}}}return t},ju=K(zu);function Fu(e){return function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.name,o=Co(r,["name"]),a=i,s="function"==typeof t?function(e){return{root:function(n){return t(uo({theme:e},n))}}}:{root:t},l=Ql(s,uo({Component:e,name:i||e.displayName,classNamePrefix:a},o));t.filterProps&&(n=t.filterProps,delete t.filterProps),t.propTypes&&(t.propTypes,delete t.propTypes);var u=m.forwardRef((function(t,r){var i,o,a,s=t.children,u=t.className,c=t.clone,d=t.component,p=Co(t,["children","className","clone","component"]),h=tu(l(t).root,u),f=p;if(n&&(i=f,o=n,a={},Object.keys(i).forEach((function(e){-1===o.indexOf(e)&&(a[e]=i[e])})),f=a),c)return m.cloneElement(s,uo({className:tu(s.props.className,h)},f));if("function"==typeof s)return s(uo({className:h},f));var g=d||e;return m.createElement(g,uo({ref:r,className:h},f),s)}));return ju(u,e),u}}function Hu(e){var t=e.children,n=e.theme,r=Vl(),i=m.useMemo((function(){var e=null===r?n:function(e,t){return"function"==typeof t?t(e):uo({},e,t)}(r,n);return null!=e&&(e[Go]=null!==r),e}),[n,r]);return m.createElement(Ul.Provider,{value:i},t)}var $u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=t.defaultTheme,i=t.withTheme,o=void 0!==i&&i,a=t.name,s=Co(t,["defaultTheme","withTheme","name"]),l=a,u=Ql(e,uo({defaultTheme:r,Component:n,name:a||n.displayName,classNamePrefix:l},s)),c=m.forwardRef((function(e,t){e.classes;var i,s=e.innerRef,l=Co(e,["classes","innerRef"]),c=u(uo({},n.defaultProps,e)),d=l;return("string"==typeof a||o)&&(i=Vl()||r,a&&(d=Xo({theme:i,name:a,props:l})),o&&!d.theme&&(d.theme=i)),m.createElement(n,uo({ref:s||t,classes:c},d))}));return ju(c,n),c}},_u=Ko(),Uu=function(e){var t=Fu(e);return function(e,n){return t(e,uo({defaultTheme:_u},n))}};function Vu(e,t){return $u(e,uo({defaultTheme:_u},t))}function Wu(e){if("string"!=typeof e)throw new Error(go(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Bu(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return null==t?e:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r),t.apply(this,r)}}),(function(){}))}function Yu(e){return e&&e.ownerDocument||document}function Ku(e){return Yu(e).defaultView||window}function Gu(e,t){"function"==typeof e?e(t):e&&(e.current=t)}var Ju="undefined"!=typeof window?g.useLayoutEffect:g.useEffect;function Zu(e){var t=g.useRef(e);return Ju((function(){t.current=e})),g.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}function Xu(e,t){return g.useMemo((function(){return null==e&&null==t?null:function(n){Gu(e,n),Gu(t,n)}}),[e,t])}var Qu=!0,ec=!1,tc=null,nc={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 rc(e){e.metaKey||e.altKey||e.ctrlKey||(Qu=!0)}function ic(){Qu=!1}function oc(){"hidden"===this.visibilityState&&ec&&(Qu=!0)}function ac(e){var t,n,r,i=e.target;try{return i.matches(":focus-visible")}catch(e){}return Qu||(n=(t=i).type,!("INPUT"!==(r=t.tagName)||!nc[n]||t.readOnly)||"TEXTAREA"===r&&!t.readOnly||!!t.isContentEditable)}function sc(){ec=!0,window.clearTimeout(tc),tc=window.setTimeout((function(){ec=!1}),100)}function lc(){return{isFocusVisible:ac,onBlurVisible:sc,ref:g.useCallback((function(e){var t,n=x.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",rc,!0),t.addEventListener("mousedown",ic,!0),t.addEventListener("pointerdown",ic,!0),t.addEventListener("touchstart",ic,!0),t.addEventListener("visibilitychange",oc,!0))}),[])}}var uc=!1,cc=m.createContext(null),dc="unmounted",pc="exited",hc="entering",fc="entered",mc="exiting",gc=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=pc,r.appearStatus=hc):i=fc:i=t.unmountOnExit||t.mountOnEnter?dc:pc,r.state={status:i},r.nextCallback=null,r}ia(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===dc?{status:pc}: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!==hc&&n!==fc&&(t=hc):n!==hc&&n!==fc||(t=mc)}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===hc){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:w.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===pc&&this.setState({status:dc})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[w.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||uc?this.safeSetState({status:fc},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:hc},(function(){t.props.onEntering(o,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:fc},(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:w.findDOMNode(this);t&&!uc?(this.props.onExit(r),this.safeSetState({status:mc},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:pc},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:pc},(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:w.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===dc)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=So(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return m.createElement(cc.Provider,{value:null},"function"==typeof n?n(e,r):m.cloneElement(m.Children.only(n),r))},t}(m.Component);function yc(){}gc.contextType=cc,gc.propTypes={},gc.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:yc,onEntering:yc,onEntered:yc,onExit:yc,onExiting:yc,onExited:yc},gc.UNMOUNTED=dc,gc.EXITED=pc,gc.ENTERING=hc,gc.ENTERED=fc,gc.EXITING=mc;var vc=gc;function bc(e,t){var n=Object.create(null);return e&&y.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&v(e)?t(e):e}(e)})),n}function xc(e,t,n){return null!=n[t]?n[t]:e.props[t]}function wc(e,t,n){var r=bc(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 u=i[l][r];s[i[l][r]]=n(u)}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(v(a)){var s=o in t,l=o in r,u=t[o],c=v(u)&&!u.props.in;!l||s&&!c?l||!s||c?l&&s&&v(u)&&(i[o]=b(a,{onExited:n.bind(null,a),in:u.props.in,exit:xc(a,"exit",e),enter:xc(a,"enter",e)})):i[o]=b(a,{in:!1}):i[o]=b(a,{onExited:n.bind(null,a),in:!0,exit:xc(a,"exit",e),enter:xc(a,"enter",e)})}})),i}var Sc=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},Cc=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(oa(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}ia(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,bc(n.children,(function(e){return b(e,{onExited:r.bind(null,e),in:!0,appear:xc(e,"appear",n),enter:xc(e,"enter",n),exit:xc(e,"exit",n)})}))):wc(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=bc(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=uo({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=So(e,["component","childFactory"]),i=this.state.contextValue,o=Sc(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?m.createElement(cc.Provider,{value:i},o):m.createElement(cc.Provider,{value:i},m.createElement(t,r,o))},t}(m.Component);Cc.propTypes={},Cc.defaultProps={component:"div",childFactory:function(e){return e}};var Ec=Cc;function kc(e,t){var n=e.timeout,r=e.style,i=void 0===r?{}:r;return{duration:i.transitionDuration||"number"==typeof n?n:n[t.mode]||0,delay:i.transitionDelay}}var Tc=g.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"div":i,a=e.square,s=void 0!==a&&a,l=e.elevation,u=void 0===l?1:l,c=e.variant,d=void 0===c?"elevation":c,p=Co(e,["classes","className","component","square","elevation","variant"]);return g.createElement(o,uo({className:tu(n.root,r,"outlined"===d?n.outlined:n["elevation".concat(u)],!s&&n.rounded),ref:t},p))})),Rc=Vu((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),uo({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(Tc),Dc="undefined"==typeof window?g.useEffect:g.useLayoutEffect;function Mc(e){var t=e.classes,n=e.pulsate,r=void 0!==n&&n,i=e.rippleX,o=e.rippleY,a=e.rippleSize,s=e.in,l=e.onExited,u=void 0===l?function(){}:l,c=e.timeout,d=g.useState(!1),p=d[0],h=d[1],f=tu(t.ripple,t.rippleVisible,r&&t.ripplePulsate),m={width:a,height:a,top:-a/2+o,left:-a/2+i},y=tu(t.child,p&&t.childLeaving,r&&t.childPulsate),v=Zu(u);return Dc((function(){if(!s){h(!0);var e=setTimeout(v,c);return function(){clearTimeout(e)}}}),[v,s,c]),g.createElement("span",{className:f,style:m},g.createElement("span",{className:y}))}var qc=g.forwardRef((function(e,t){var n=e.center,r=void 0!==n&&n,i=e.classes,o=e.className,a=Co(e,["center","classes","className"]),s=g.useState([]),l=s[0],u=s[1],c=g.useRef(0),d=g.useRef(null);g.useEffect((function(){d.current&&(d.current(),d.current=null)}),[l]);var p=g.useRef(!1),h=g.useRef(null),f=g.useRef(null),m=g.useRef(null);g.useEffect((function(){return function(){clearTimeout(h.current)}}),[]);var y=g.useCallback((function(e){var t=e.pulsate,n=e.rippleX,r=e.rippleY,o=e.rippleSize,a=e.cb;u((function(e){return[].concat(Ho(e),[g.createElement(Mc,{key:c.current,classes:i,timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o})])})),c.current+=1,d.current=a}),[i]),v=g.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,i=t.pulsate,o=void 0!==i&&i,a=t.center,s=void 0===a?r||t.pulsate:a,l=t.fakeElement,u=void 0!==l&&l;if("mousedown"===e.type&&p.current)p.current=!1;else{"touchstart"===e.type&&(p.current=!0);var c,d,g,v=u?null:m.current,b=v?v.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(b.width/2),d=Math.round(b.height/2);else{var x=e.touches?e.touches[0]:e,w=x.clientX,S=x.clientY;c=Math.round(w-b.left),d=Math.round(S-b.top)}if(s)(g=Math.sqrt((2*Math.pow(b.width,2)+Math.pow(b.height,2))/3))%2==0&&(g+=1);else{var C=2*Math.max(Math.abs((v?v.clientWidth:0)-c),c)+2,E=2*Math.max(Math.abs((v?v.clientHeight:0)-d),d)+2;g=Math.sqrt(Math.pow(C,2)+Math.pow(E,2))}e.touches?null===f.current&&(f.current=function(){y({pulsate:o,rippleX:c,rippleY:d,rippleSize:g,cb:n})},h.current=setTimeout((function(){f.current&&(f.current(),f.current=null)}),80)):y({pulsate:o,rippleX:c,rippleY:d,rippleSize:g,cb:n})}}),[r,y]),b=g.useCallback((function(){v({},{pulsate:!0})}),[v]),x=g.useCallback((function(e,t){if(clearTimeout(h.current),"touchend"===e.type&&f.current)return e.persist(),f.current(),f.current=null,void(h.current=setTimeout((function(){x(e,t)})));f.current=null,u((function(e){return e.length>0?e.slice(1):e})),d.current=t}),[]);return g.useImperativeHandle(t,(function(){return{pulsate:b,start:v,stop:x}}),[b,v,x]),g.createElement("span",uo({className:tu(i.root,o),ref:m},a),g.createElement(Ec,{component:null,exit:!0},l))})),Pc=Vu((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(g.memo(qc)),Nc=g.forwardRef((function(e,t){var n=e.action,r=e.buttonRef,i=e.centerRipple,o=void 0!==i&&i,a=e.children,s=e.classes,l=e.className,u=e.component,c=void 0===u?"button":u,d=e.disabled,p=void 0!==d&&d,h=e.disableRipple,f=void 0!==h&&h,m=e.disableTouchRipple,y=void 0!==m&&m,v=e.focusRipple,b=void 0!==v&&v,w=e.focusVisibleClassName,S=e.onBlur,C=e.onClick,E=e.onFocus,k=e.onFocusVisible,T=e.onKeyDown,R=e.onKeyUp,D=e.onMouseDown,M=e.onMouseLeave,q=e.onMouseUp,P=e.onTouchEnd,N=e.onTouchMove,L=e.onTouchStart,I=e.onDragLeave,A=e.tabIndex,O=void 0===A?0:A,z=e.TouchRippleProps,j=e.type,F=void 0===j?"button":j,H=Co(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),$=g.useRef(null);var _=g.useRef(null),U=g.useState(!1),V=U[0],W=U[1];p&&V&&W(!1);var B=lc(),Y=B.isFocusVisible,K=B.onBlurVisible,G=B.ref;function J(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:y;return Zu((function(r){return t&&t(r),!n&&_.current&&_.current[e](r),!0}))}g.useImperativeHandle(n,(function(){return{focusVisible:function(){W(!0),$.current.focus()}}}),[]),g.useEffect((function(){V&&b&&!f&&_.current.pulsate()}),[f,b,V]);var Z=J("start",D),X=J("stop",I),Q=J("stop",q),ee=J("stop",(function(e){V&&e.preventDefault(),M&&M(e)})),te=J("start",L),ne=J("stop",P),re=J("stop",N),ie=J("stop",(function(e){V&&(K(e),W(!1)),S&&S(e)}),!1),oe=Zu((function(e){$.current||($.current=e.currentTarget),Y(e)&&(W(!0),k&&k(e)),E&&E(e)})),ae=function(){var e=x.findDOMNode($.current);return c&&"button"!==c&&!("A"===e.tagName&&e.href)},se=g.useRef(!1),le=Zu((function(e){b&&!se.current&&V&&_.current&&" "===e.key&&(se.current=!0,e.persist(),_.current.stop(e,(function(){_.current.start(e)}))),e.target===e.currentTarget&&ae()&&" "===e.key&&e.preventDefault(),T&&T(e),e.target===e.currentTarget&&ae()&&"Enter"===e.key&&!p&&(e.preventDefault(),C&&C(e))})),ue=Zu((function(e){b&&" "===e.key&&_.current&&V&&!e.defaultPrevented&&(se.current=!1,e.persist(),_.current.stop(e,(function(){_.current.pulsate(e)}))),R&&R(e),C&&e.target===e.currentTarget&&ae()&&" "===e.key&&!e.defaultPrevented&&C(e)})),ce=c;"button"===ce&&H.href&&(ce="a");var de={};"button"===ce?(de.type=F,de.disabled=p):("a"===ce&&H.href||(de.role="button"),de["aria-disabled"]=p);var pe=Xu(r,t),he=Xu(G,$),fe=Xu(pe,he),me=g.useState(!1),ge=me[0],ye=me[1];g.useEffect((function(){ye(!0)}),[]);var ve=ge&&!f&&!p;return g.createElement(ce,uo({className:tu(s.root,l,V&&[s.focusVisible,w],p&&s.disabled),onBlur:ie,onClick:C,onFocus:oe,onKeyDown:le,onKeyUp:ue,onMouseDown:Z,onMouseLeave:ee,onMouseUp:Q,onDragLeave:X,onTouchEnd:ne,onTouchMove:re,onTouchStart:te,ref:fe,tabIndex:p?-1:O},de,H),a,ve?g.createElement(Pc,uo({ref:_,center:o},z)):null)})),Lc=Vu({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(Nc),Ic={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},Ac=g.forwardRef((function(e,t){var n=e.align,r=void 0===n?"inherit":n,i=e.classes,o=e.className,a=e.color,s=void 0===a?"initial":a,l=e.component,u=e.display,c=void 0===u?"initial":u,d=e.gutterBottom,p=void 0!==d&&d,h=e.noWrap,f=void 0!==h&&h,m=e.paragraph,y=void 0!==m&&m,v=e.variant,b=void 0===v?"body1":v,x=e.variantMapping,w=void 0===x?Ic:x,S=Co(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),C=l||(y?"p":w[b]||Ic[b])||"span";return g.createElement(C,uo({className:tu(i.root,o,"inherit"!==b&&i[b],"initial"!==s&&i["color".concat(Wu(s))],f&&i.noWrap,p&&i.gutterBottom,y&&i.paragraph,"inherit"!==r&&i["align".concat(Wu(r))],"initial"!==c&&i["display".concat(Wu(c))]),ref:t},S))})),Oc=Vu((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(Ac),zc=g.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.color,a=void 0===o?"default":o,s=e.component,l=void 0===s?"button":s,u=e.disabled,c=void 0!==u&&u,d=e.disableElevation,p=void 0!==d&&d,h=e.disableFocusRipple,f=void 0!==h&&h,m=e.endIcon,y=e.focusVisibleClassName,v=e.fullWidth,b=void 0!==v&&v,x=e.size,w=void 0===x?"medium":x,S=e.startIcon,C=e.type,E=void 0===C?"button":C,k=e.variant,T=void 0===k?"text":k,R=Co(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),D=S&&g.createElement("span",{className:tu(r.startIcon,r["iconSize".concat(Wu(w))])},S),M=m&&g.createElement("span",{className:tu(r.endIcon,r["iconSize".concat(Wu(w))])},m);return g.createElement(Lc,uo({className:tu(r.root,r[T],i,"inherit"===a?r.colorInherit:"default"!==a&&r["".concat(T).concat(Wu(a))],"medium"!==w&&[r["".concat(T,"Size").concat(Wu(w))],r["size".concat(Wu(w))]],p&&r.disableElevation,c&&r.disabled,b&&r.fullWidth),component:l,disabled:c,focusRipple:!f,focusVisibleClassName:tu(r.focusVisible,y),ref:t,type:E},R),g.createElement("span",{className:r.label},D,n,M))})),jc=Vu((function(e){return{root:uo({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:wo(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:wo(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:wo(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(wo(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:wo(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(wo(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:wo(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(zc);var Fc="undefined"!=typeof window?g.useLayoutEffect:g.useEffect,Hc=g.forwardRef((function(e,t){var n=e.children,r=e.container,i=e.disablePortal,o=void 0!==i&&i,a=e.onRendered,s=g.useState(null),l=s[0],u=s[1],c=Xu(g.isValidElement(n)?n.ref:null,t);return Fc((function(){o||u(function(e){return e="function"==typeof e?e():e,x.findDOMNode(e)}(r)||document.body)}),[r,o]),Fc((function(){if(l&&!o)return Gu(t,l),function(){Gu(t,null)}}),[t,l,o]),Fc((function(){a&&(l||o)&&a()}),[a,l,o]),o?g.isValidElement(n)?g.cloneElement(n,{ref:c}):n:l?x.createPortal(n,l):l})),$c=Hc;function _c(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Uc(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function Vc(e,t,n){var r=arguments.length>4?arguments[4]:void 0,i=[t,n].concat(Ho(arguments.length>3&&void 0!==arguments[3]?arguments[3]:[])),o=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===i.indexOf(e)&&-1===o.indexOf(e.tagName)&&_c(e,r)}))}function Wc(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function Bc(e,t){var n,r=[],i=[],o=e.container;if(!t.disableScrollLock){if(function(e){var t=Yu(e);return t.body===e?Ku(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(o)){var a=function(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}();r.push({value:o.style.paddingRight,key:"padding-right",el:o}),o.style["padding-right"]="".concat(Uc(o)+a,"px"),n=Yu(o).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){i.push(e.style.paddingRight),e.style.paddingRight="".concat(Uc(e)+a,"px")}))}var s=o.parentElement,l="HTML"===s.nodeName&&"scroll"===window.getComputedStyle(s)["overflow-y"]?s:o;r.push({value:l.style.overflow,key:"overflow",el:l}),l.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){i[t]?e.style.paddingRight=i[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var Yc=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modals=[],this.containers=[]}return na(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&_c(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);Vc(t,e.mountNode,e.modalRef,r,!0);var i=Wc(this.containers,(function(e){return e.container===t}));return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=Wc(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=Bc(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=Wc(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&_c(e.modalRef,!0),Vc(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var i=r.modals[r.modals.length-1];i.modalRef&&_c(i.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();function Kc(e){var t=e.children,n=e.disableAutoFocus,r=void 0!==n&&n,i=e.disableEnforceFocus,o=void 0!==i&&i,a=e.disableRestoreFocus,s=void 0!==a&&a,l=e.getDoc,u=e.isEnabled,c=e.open,d=g.useRef(),p=g.useRef(null),h=g.useRef(null),f=g.useRef(),m=g.useRef(null),y=g.useCallback((function(e){m.current=x.findDOMNode(e)}),[]),v=Xu(t.ref,y),b=g.useRef();return g.useEffect((function(){b.current=c}),[c]),!b.current&&c&&"undefined"!=typeof window&&(f.current=l().activeElement),g.useEffect((function(){if(c){var e=Yu(m.current);r||!m.current||m.current.contains(e.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex",-1),m.current.focus());var t=function(){null!==m.current&&(e.hasFocus()&&!o&&u()&&!d.current?m.current&&!m.current.contains(e.activeElement)&&m.current.focus():d.current=!1)},n=function(t){!o&&u()&&9===t.keyCode&&e.activeElement===m.current&&(d.current=!0,t.shiftKey?h.current.focus():p.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var i=setInterval((function(){t()}),50);return function(){clearInterval(i),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),s||(f.current&&f.current.focus&&f.current.focus(),f.current=null)}}}),[r,o,s,u,c]),g.createElement(g.Fragment,null,g.createElement("div",{tabIndex:0,ref:p,"data-test":"sentinelStart"}),g.cloneElement(t,{ref:v}),g.createElement("div",{tabIndex:0,ref:h,"data-test":"sentinelEnd"}))}var Gc={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},Jc=g.forwardRef((function(e,t){var n=e.invisible,r=void 0!==n&&n,i=e.open,o=Co(e,["invisible","open"]);return i?g.createElement("div",uo({"aria-hidden":!0,ref:t},o,{style:uo({},Gc.root,r?Gc.invisible:{},o.style)})):null}));var Zc=new Yc,Xc=g.forwardRef((function(e,t){var n=Vl(),r=Xo({name:"MuiModal",props:uo({},e),theme:n}),i=r.BackdropComponent,o=void 0===i?Jc:i,a=r.BackdropProps,s=r.children,l=r.closeAfterTransition,u=void 0!==l&&l,c=r.container,d=r.disableAutoFocus,p=void 0!==d&&d,h=r.disableBackdropClick,f=void 0!==h&&h,m=r.disableEnforceFocus,y=void 0!==m&&m,v=r.disableEscapeKeyDown,b=void 0!==v&&v,w=r.disablePortal,S=void 0!==w&&w,C=r.disableRestoreFocus,E=void 0!==C&&C,k=r.disableScrollLock,T=void 0!==k&&k,R=r.hideBackdrop,D=void 0!==R&&R,M=r.keepMounted,q=void 0!==M&&M,P=r.manager,N=void 0===P?Zc:P,L=r.onBackdropClick,I=r.onClose,A=r.onEscapeKeyDown,O=r.onRendered,z=r.open,j=Co(r,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),F=g.useState(!0),H=F[0],$=F[1],_=g.useRef({}),U=g.useRef(null),V=g.useRef(null),W=Xu(V,t),B=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(r),Y=function(){return Yu(U.current)},K=function(){return _.current.modalRef=V.current,_.current.mountNode=U.current,_.current},G=function(){N.mount(K(),{disableScrollLock:T}),V.current.scrollTop=0},J=Zu((function(){var e=function(e){return e="function"==typeof e?e():e,x.findDOMNode(e)}(c)||Y().body;N.add(K(),e),V.current&&G()})),Z=g.useCallback((function(){return N.isTopModal(K())}),[N]),X=Zu((function(e){U.current=e,e&&(O&&O(),z&&Z()?G():_c(V.current,!0))})),Q=g.useCallback((function(){N.remove(K())}),[N]);if(g.useEffect((function(){return function(){Q()}}),[Q]),g.useEffect((function(){z?J():B&&u||Q()}),[z,Q,B,u,J]),!q&&!z&&(!B||H))return null;var ee=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:Yo}),te={};return void 0===s.props.tabIndex&&(te.tabIndex=s.props.tabIndex||"-1"),B&&(te.onEnter=Bu((function(){$(!1)}),s.props.onEnter),te.onExited=Bu((function(){$(!0),u&&Q()}),s.props.onExited)),g.createElement($c,{ref:X,container:c,disablePortal:S},g.createElement("div",uo({ref:W,onKeyDown:function(e){"Escape"===e.key&&Z()&&(A&&A(e),b||(e.stopPropagation(),I&&I(e,"escapeKeyDown")))},role:"presentation"},j,{style:uo({},ee.root,!z&&H?ee.hidden:{},j.style)}),D?null:g.createElement(o,uo({open:z,onClick:function(e){e.target===e.currentTarget&&(L&&L(e),!f&&I&&I(e,"backdropClick"))}},a)),g.createElement(Kc,{disableEnforceFocus:y,disableAutoFocus:p,disableRestoreFocus:E,getDoc:Y,isEnabled:Z,open:z},g.cloneElement(s,te))))})),Qc=Xc;function ed(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var td={entering:{opacity:1,transform:ed(1)},entered:{opacity:1,transform:"none"}},nd=g.forwardRef((function(e,t){var n=e.children,r=e.disableStrictModeCompat,i=void 0!==r&&r,o=e.in,a=e.onEnter,s=e.onEntered,l=e.onEntering,u=e.onExit,c=e.onExited,d=e.onExiting,p=e.style,h=e.timeout,f=void 0===h?"auto":h,m=e.TransitionComponent,y=void 0===m?vc:m,v=Co(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),b=g.useRef(),x=g.useRef(),w=Vl()||_u,S=w.unstable_strictMode&&!i,C=g.useRef(null),E=Xu(n.ref,t),k=Xu(S?C:void 0,E),T=function(e){return function(t,n){if(e){var r=$o(S?[C.current,t]:[t,n],2),i=r[0],o=r[1];void 0===o?e(i):e(i,o)}}},R=T(l),D=T((function(e,t){!function(e){e.scrollTop}(e);var n,r=kc({style:p,timeout:f},{mode:"enter"}),i=r.duration,o=r.delay;"auto"===f?(n=w.transitions.getAutoHeightDuration(e.clientHeight),x.current=n):n=i,e.style.transition=[w.transitions.create("opacity",{duration:n,delay:o}),w.transitions.create("transform",{duration:.666*n,delay:o})].join(","),a&&a(e,t)})),M=T(s),q=T(d),P=T((function(e){var t,n=kc({style:p,timeout:f},{mode:"exit"}),r=n.duration,i=n.delay;"auto"===f?(t=w.transitions.getAutoHeightDuration(e.clientHeight),x.current=t):t=r,e.style.transition=[w.transitions.create("opacity",{duration:t,delay:i}),w.transitions.create("transform",{duration:.666*t,delay:i||.333*t})].join(","),e.style.opacity="0",e.style.transform=ed(.75),u&&u(e)})),N=T(c);return g.useEffect((function(){return function(){clearTimeout(b.current)}}),[]),g.createElement(y,uo({appear:!0,in:o,nodeRef:S?C:void 0,onEnter:D,onEntered:M,onEntering:R,onExit:P,onExited:N,onExiting:q,addEndListener:function(e,t){var n=S?e:t;"auto"===f&&(b.current=setTimeout(n,x.current||0))},timeout:"auto"===f?null:f},v),(function(e,t){return g.cloneElement(n,uo({style:uo({opacity:0,transform:ed(.75),visibility:"exited"!==e||o?void 0:"hidden"},td[e],p,n.props.style),ref:k},t))}))}));nd.muiSupportAuto=!0;var rd=nd,id=g.createContext({}),od=g.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.component,a=void 0===o?"ul":o,s=e.dense,l=void 0!==s&&s,u=e.disablePadding,c=void 0!==u&&u,d=e.subheader,p=Co(e,["children","classes","className","component","dense","disablePadding","subheader"]),h=g.useMemo((function(){return{dense:l}}),[l]);return g.createElement(id.Provider,{value:h},g.createElement(a,uo({className:tu(r.root,i,l&&r.dense,!c&&r.padding,d&&r.subheader),ref:t},p),d,n))})),ad=Vu({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(od),sd="undefined"==typeof window?g.useEffect:g.useLayoutEffect,ld=g.forwardRef((function(e,t){var n=e.alignItems,r=void 0===n?"center":n,i=e.autoFocus,o=void 0!==i&&i,a=e.button,s=void 0!==a&&a,l=e.children,u=e.classes,c=e.className,d=e.component,p=e.ContainerComponent,h=void 0===p?"li":p,f=e.ContainerProps,m=(f=void 0===f?{}:f).className,y=Co(f,["className"]),v=e.dense,b=void 0!==v&&v,w=e.disabled,S=void 0!==w&&w,C=e.disableGutters,E=void 0!==C&&C,k=e.divider,T=void 0!==k&&k,R=e.focusVisibleClassName,D=e.selected,M=void 0!==D&&D,q=Co(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),P=g.useContext(id),N={dense:b||P.dense||!1,alignItems:r},L=g.useRef(null);sd((function(){o&&L.current&&L.current.focus()}),[o]);var I,A,O=g.Children.toArray(l),z=O.length&&(I=O[O.length-1],A=["ListItemSecondaryAction"],g.isValidElement(I)&&-1!==A.indexOf(I.type.muiName)),j=Xu(g.useCallback((function(e){L.current=x.findDOMNode(e)}),[]),t),F=uo({className:tu(u.root,c,N.dense&&u.dense,!E&&u.gutters,T&&u.divider,S&&u.disabled,s&&u.button,"center"!==r&&u.alignItemsFlexStart,z&&u.secondaryAction,M&&u.selected),disabled:S},q),H=d||"li";return s&&(F.component=d||"div",F.focusVisibleClassName=tu(u.focusVisible,R),H=Lc),z?(H=F.component||d?H:"div","li"===h&&("li"===H?H="div":"li"===F.component&&(F.component="div")),g.createElement(id.Provider,{value:N},g.createElement(h,uo({className:tu(u.container,m),ref:j},y),g.createElement(H,F,O),O.pop()))):g.createElement(id.Provider,{value:N},g.createElement(H,uo({ref:j},F),O))})),ud=Vu((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})(ld),cd=g.forwardRef((function(e,t){var n=e.classes,r=e.className,i=Co(e,["classes","className"]),o=g.useContext(id);return g.createElement("div",uo({className:tu(n.root,r,"flex-start"===o.alignItems&&n.alignItemsFlexStart),ref:t},i))})),dd=Vu((function(e){return{root:{minWidth:56,color:e.palette.action.active,flexShrink:0,display:"inline-flex"},alignItemsFlexStart:{marginTop:8}}}),{name:"MuiListItemIcon"})(cd),pd=g.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.disableTypography,a=void 0!==o&&o,s=e.inset,l=void 0!==s&&s,u=e.primary,c=e.primaryTypographyProps,d=e.secondary,p=e.secondaryTypographyProps,h=Co(e,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),f=g.useContext(id).dense,m=null!=u?u:n;null==m||m.type===Oc||a||(m=g.createElement(Oc,uo({variant:f?"body2":"body1",className:r.primary,component:"span",display:"block"},c),m));var y=d;return null==y||y.type===Oc||a||(y=g.createElement(Oc,uo({variant:"body2",className:r.secondary,color:"textSecondary",display:"block"},p),y)),g.createElement("div",uo({className:tu(r.root,i,f&&r.dense,l&&r.inset,m&&y&&r.multiline),ref:t},h),m,y)})),hd=Vu({root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},{name:"MuiListItemText"})(pd);function fd(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function md(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function gd(e){return[e.horizontal,e.vertical].map((function(e){return"number"==typeof e?"".concat(e,"px"):e})).join(" ")}function yd(e){return"function"==typeof e?e():e}var vd=g.forwardRef((function(e,t){var n=e.action,r=e.anchorEl,i=e.anchorOrigin,o=void 0===i?{vertical:"top",horizontal:"left"}:i,a=e.anchorPosition,s=e.anchorReference,l=void 0===s?"anchorEl":s,u=e.children,c=e.classes,d=e.className,p=e.container,h=e.elevation,f=void 0===h?8:h,m=e.getContentAnchorEl,y=e.marginThreshold,v=void 0===y?16:y,b=e.onEnter,w=e.onEntered,S=e.onEntering,C=e.onExit,E=e.onExited,k=e.onExiting,T=e.open,R=e.PaperProps,D=void 0===R?{}:R,M=e.transformOrigin,q=void 0===M?{vertical:"top",horizontal:"left"}:M,P=e.TransitionComponent,N=void 0===P?rd:P,L=e.transitionDuration,I=void 0===L?"auto":L,A=e.TransitionProps,O=void 0===A?{}:A,z=Co(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),j=g.useRef(),F=g.useCallback((function(e){if("anchorPosition"===l)return a;var t=yd(r),n=(t&&1===t.nodeType?t:Yu(j.current).body).getBoundingClientRect(),i=0===e?o.vertical:"center";return{top:n.top+fd(n,i),left:n.left+md(n,o.horizontal)}}),[r,o.horizontal,o.vertical,a,l]),H=g.useCallback((function(e){var t=0;if(m&&"anchorEl"===l){var n=m(e);if(n&&e.contains(n)){var r=function(e,t){for(var n=t,r=0;n&&n!==e;)r+=(n=n.parentElement).scrollTop;return r}(e,n);t=n.offsetTop+n.clientHeight/2-r||0}}return t}),[o.vertical,l,m]),$=g.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:fd(e,q.vertical)+t,horizontal:md(e,q.horizontal)}}),[q.horizontal,q.vertical]),_=g.useCallback((function(e){var t=H(e),n={width:e.offsetWidth,height:e.offsetHeight},i=$(n,t);if("none"===l)return{top:null,left:null,transformOrigin:gd(i)};var o=F(t),a=o.top-i.vertical,s=o.left-i.horizontal,u=a+n.height,c=s+n.width,d=Ku(yd(r)),p=d.innerHeight-v,h=d.innerWidth-v;if(a<v){var f=a-v;a-=f,i.vertical+=f}else if(u>p){var m=u-p;a-=m,i.vertical+=m}if(s<v){var g=s-v;s-=g,i.horizontal+=g}else if(c>h){var y=c-h;s-=y,i.horizontal+=y}return{top:"".concat(Math.round(a),"px"),left:"".concat(Math.round(s),"px"),transformOrigin:gd(i)}}),[r,l,F,H,$,v]),U=g.useCallback((function(){var e=j.current;if(e){var t=_(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[_]),V=g.useCallback((function(e){j.current=x.findDOMNode(e)}),[]);g.useEffect((function(){T&&U()})),g.useImperativeHandle(n,(function(){return T?{updatePosition:function(){U()}}:null}),[T,U]),g.useEffect((function(){if(T){var e=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=this;clearTimeout(t),t=setTimeout((function(){e.apply(a,i)}),n)}return r.clear=function(){clearTimeout(t)},r}((function(){U()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[T,U]);var W=I;"auto"!==I||N.muiSupportAuto||(W=void 0);var B=p||(r?Yu(yd(r)).body:void 0);return g.createElement(Qc,uo({container:B,open:T,ref:t,BackdropProps:{invisible:!0},className:tu(c.root,d)},z),g.createElement(N,uo({appear:!0,in:T,onEnter:b,onEntered:w,onExit:C,onExited:E,onExiting:k,timeout:W},O,{onEntering:Bu((function(e,t){S&&S(e,t),U()}),O.onEntering)}),g.createElement(Rc,uo({elevation:f,ref:V},D,{className:tu(c.paper,D.className)}),u)))})),bd=Vu({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(vd);function xd(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function wd({d:e,size:t,style:n={},viewBox:r="0 0 16 16"}){const i={fontSize:xd(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return m.createElement("i",{style:i},m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},m.createElement("path",{d:e})))}const Sd={d:"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"},Cd={d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"},Ed={d:"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"},kd={d:"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"},Td={N:void 0,H:{path:{d:"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"},tooltip:"Tooltip.dimensions.drilldown"},C:{path:{d:"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"},tooltip:"Tooltip.dimensions.cyclicGroup"}},Rd={single:"N",drillDown:"H",cyclicGroup:"C"};function Dd(e,t,n){(function({model:e,properties:t}){return e.modifiers?e.modifiers.apply({model:e,properties:t}):Promise.resolve()})({model:e,properties:n}).then((()=>{e.colorSupport&&e.colorSupport.colorByUpdater(n,"qHyperCubeDef.");let r=Oi.generate(t,n);r&&r.length&&(r=r.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.applyPatches(r,!0))}))}function Md(e,t,n,r,i,o){e.getEffectiveProperties().then((a=>{const s=a.qHyperCubeDef[r].findIndex((e=>e.qDef.cId===t)),l=a.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r].findIndex((e=>e.qDef.cId===n)),u=ie(!0,{},a),c=u.qHyperCubeDef[r][s],d=u.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l];d.qAttributeDimensions=c.qAttributeDimensions,c.qAttributeDimensions=[],o||(d.qAttributeExpressions=c.qAttributeExpressions,c.qAttributeExpressions=[]),u.qHyperCubeDef[r][s]=d,u.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l]=c,i&&i({oldItem:c,newItem:d,oldProperties:a,newProperties:u,model:e}),Dd(e,a,u)}))}const qd=(e,t)=>{const n=[],r=[];return t.forEach((t=>{t.qCalcCondition.qCond.qv&&r.push(e.evaluate(t.qCalcCondition.qCond.qv).then((e=>{"0"===e&&n.push(t.qDef.cId)})))})),Promise.all(r).then((()=>n))};function Pd({dir:e,dock:t,altList:n,model:r,translator:i,app:o,onChange:a}){return 0===n.length?null:{dir:e,dock:t,getAlternatives(){const e=qd(o,n).then((e=>Promise.all(n.filter((t=>!e.includes(t.qDef.cId))).map((e=>function(e,t,n){if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?e.qDim.qGrouping===Rd.single&&e.qDim.qLabelExpression?e.qDim.qLabelExpression:e.qDim.title:n.get("Object.ErrorMessage.MissingDimension")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const i=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(i)}(e,o,i).then((t=>({id:e.qDef.cId,selected:!1,title:t}))))))));return e},changeTo(e,t){Md(r,e,t,"qDimensions",a)}}}function Nd(e,t,n,r="/qHyperCubeDef"){return{breadcrumbs:e.qGrouping===Rd.drillDown?e.qGroupFallbackTitles.slice(0,e.qGroupPos):[],icon:Td[e.qGrouping],index:t,locked:!!e.qLocked,text:e.qGrouping===Rd.single?e.qFallbackTitle:e.qGroupFallbackTitles[e.qGroupPos],popoverText:(i=e,i.qGrouping===Rd.single?i.qFallbackTitle||"":i.title||""),drillUp(e){n.drillUp(r,t,e)},id:e.cId};var i}function Ld({altList:e,app:t,dir:n,dock:r,model:i,onChange:o,skipAttributeExpressions:a,translator:s}){return 0===e.length?null:{dir:n,dock:r,getAlternatives(){const n=qd(t,e).then((n=>Promise.all(e.filter((e=>!n.includes(e.qDef.cId))).map((e=>function(e,t,n){if(e.qLibraryId)return t.getMeasure(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?e.qMeasure.qLabelExpression?e.qMeasure.qLabelExpression:e.qMeasure.qLabel||e.qMeasure.qDef:n.get("Object.ErrorMessage.MissingMeasure")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const i=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(i)}(e,t,s).then((t=>({id:e.qDef.cId,selected:!1,title:t}))))))));return n},changeTo(e,t){Md(i,e,t,"qMeasures",o,a)}}}function Id(e,t){return{breadcrumbs:[],index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle,id:e.cId}}const Ad={bottom:{anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},top:{anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}},left:{anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}},right:{anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}}},Od={menuItem:"alternative-menu-item",titleButton:"title-button",activeTitleButton:"active-title-button"},zd=Uu(ud)((()=>({textAlign:"start","&:focus":{boxShadow:"inset 0 0 0 2px #177FE6 !important"}}))),jd=Uu((({children:e,...t})=>m.createElement(jc,Y({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e)))((()=>({"&:focus":{boxShadow:"inset 0 0 0 2px #177FE6 !important"}})));function Fd(e){const t=e=>{if("Tab"===e.key){const t=document.querySelectorAll(`.${Od.menuItem}`);let n;e.shiftKey?null!=t&&t.length&&t[0]===e.target&&(n=t[t.length-1]):null!=t&&t.length&&t[t.length-1]===e.target&&([n]=t),n&&setTimeout((()=>{n.focus()}),50)}};function n({title:e,selected:n,onClick:r}){const i=ve.detectTextDirection(e);return m.createElement(zd,{role:"menuitem",button:!0,onClick:r,className:Od.menuItem,onKeyDown:t},m.createElement(dd,{style:{minWidth:32}},m.createElement(wd,{d:n?Cd.d:""})),m.createElement(hd,{primaryTypographyProps:{dir:i}},e))}function r({alignTo:e,changeTo:t,current:r,dir:i,dock:o,list:a,onClose:s,show:l,instruction:u}){const c=a.map((e=>m.createElement(n,{key:e.id,title:e.title,onClick:()=>t(e.id)})));return m.createElement(bd,Y({anchorEl:e,open:l,onClose:s},Ad[o],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),m.createElement(ad,{dense:!0,dir:i,"aria-label":u,component:"nav"},m.createElement(n,{title:r,selected:!0,onClick:s}),c))}n.propTypes={title:eo.string.isRequired,selected:eo.bool,onClick:eo.func.isRequired},n.defaultProps={selected:!1},r.propTypes={alignTo:eo.any,changeTo:eo.func.isRequired,current:eo.string.isRequired,dir:eo.string.isRequired,dock:eo.string.isRequired,list:eo.array,onClose:eo.func.isRequired,show:eo.bool.isRequired,instruction:eo.string.isRequired},r.defaultProps={list:[],alignTo:null};class i extends m.Component{constructor(e){super(e),this.state={open:!1,inSelection:e.selections&&e.selections.isActive(),hasValidAlternatives:!1},this.openPopover=this.openPopover.bind(this),this.closePopover=this.closePopover.bind(this),this.changeTo=this.changeTo.bind(this),this.alignToRef=m.createRef()}componentDidMount(){const{popover:e,selections:t,supportConditional:n}=this.props;t&&(this.onSelectionsActivated=()=>this.setState({inSelection:!0}),this.onSelectionsDeactivated=()=>this.setState({inSelection:!1}),t.addListener("activated",this.onSelectionsActivated),t.addListener("deactivated",this.onSelectionsDeactivated),t.addListener("canceled",this.onSelectionsDeactivated)),e&&n&&e.getAlternatives().then((e=>{this.setState({hasValidAlternatives:0!==e.length})}))}componentDidUpdate(e,t){const{popover:n,supportConditional:r}=this.props;n&&r&&n.getAlternatives().then((e=>{t.hasValidAlternatives!==(0!==e.length)&&this.setState({hasValidAlternatives:0!==e.length})}))}componentWillUnmount(){const{selections:e}=this.props;e&&(e.removeListener("activated",this.onSelectionsActivated),e.removeListener("deactivated",this.onSelectionsDeactivated),e.removeListener("canceled",this.onSelectionsDeactivated))}changeTo(e){this.props.popover.changeTo(this.props.titleData.id,e),this.closePopover(e)}openPopover(e){if(!(this.state.closeTime&&Date.now()-this.state.closeTime<20)){if(e.target){const t=e.target.closest(`.${Od.titleButton}`);t&&t.classList.add(Od.activeTitleButton)}this.props.popover.getAlternatives().then((e=>{this.setState({open:!0,alternatives:e});document.querySelector(`.${Od.menuItem}`).focus()}))}}closePopover(e){if(this.setState({open:!1,closeTime:Date.now()}),"string"==typeof e)setTimeout((()=>{const t=document.querySelector(`.${Od.titleButton}[data-id="${e}"]`);t&&t.focus()}),1e3);else{const e=document.querySelector(`.${Od.activeTitleButton}`);e&&(e.classList.remove(Od.activeTitleButton),setTimeout((()=>{e.focus()}),50))}}render(){const{titleData:e,popover:t,translator:n,disabled:i,isDimension:o,padding:a,minWidth:s,hasAlternative:l,supportConditional:u}=this.props,c={flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal",lineHeight:"normal",...this.props.style},d=e.breadcrumbs.length,p=i||this.state.inSelection,h=e.breadcrumbs.map(((t,n)=>m.createElement(jd,{style:{display:"flex",alignItems:"center",color:p&&"rgba(89, 89, 89, 0.8)",pointerEvents:p?"none":"auto",paddingTop:0,paddingBottom:0,height:"100%"},key:n,onClick:()=>p?void 0:e.drillUp(d-n),title:t},m.createElement("span",{style:c},t),m.createElement(wd,Y({},kd,{size:"small",style:{margin:"0 8px"}}))))),f=u?this.state.hasValidAlternatives:l,g=t&&!this.state.open?this.openPopover:this.closePopover,y=!t||i||this.state.inSelection,v={display:"flex",alignItems:"center",width:"100%",color:y&&"rgba(89, 89, 89, 0.8)",height:"100%",border:!o&&y&&"none",paddingTop:0,paddingBottom:0};this.state.open&&(v.background="rgba(0,0,0,0.08)");a&&(v.padding=a),s&&(v.minWidth=s);const b=ve.detectTextDirection(e.text),x=m.createElement(jd,{"aria-label":n.get(`Accessibility.${t&&f?"Alternative":"Normal"}.Instructions`,[e.text]),style:v,onClick:y?void 0:g,title:e.text,tabIndex:y?-1:0,onFocus:y?void 0:e=>{e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px"},onBlur:y?void 0:e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"},onMouseDown:e=>{e.preventDefault()},className:`${Od.titleButton} ${e.id}`,"data-id":e.id},e.locked&&m.createElement(wd,Y({},Sd,{size:"small",title:n.get("Tooltip.selections.locked")})),m.createElement("span",{style:c,dir:b},e.text),t&&f&&m.createElement(wd,Y({},Ed,{size:"small",style:{margin:"0 8px"}})));return m.createElement(m.Fragment,null,e.icon&&m.createElement(wd,Y({},e.icon.path,{size:"small",title:n.get(e.icon.tooltip),style:{margin:"0 4px 0 0"}})),h,m.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:f?"auto":"none",height:"100%"}},x),t&&f&&m.createElement(r,{dock:t.dock,dir:t.dir,current:e.popoverText,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.alternatives,onClose:this.closePopover,changeTo:this.changeTo,instruction:n.get("Accessibility.Popover.Instructions")}))}}function o(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function a(e){return!e.isDimension&&he.getValue(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return i.propTypes={disabled:eo.bool.isRequired,padding:eo.string,minWidth:eo.string,titleData:eo.shape({breadcrumbs:eo.arrayOf(eo.string).isRequired,icon:eo.shape({path:eo.string.isRequired,tooltip:eo.string.isRequired}),index:eo.number.isRequired,locked:eo.bool.isRequired,text:eo.string.isRequired,popoverText:eo.string.isRequired,drillUp:eo.func,id:eo.string.isRequired}).isRequired,popover:eo.shape({dir:eo.string.isRequired,dock:eo.string.isRequired,changeTo:eo.func.isRequired,getAlternatives:eo.func.isRequired}),translator:eo.shape({get:eo.func.isRequired}).isRequired,selections:eo.shape({isActive:eo.func,addListener:eo.func,removeListener:eo.func}),style:eo.shape({fontSize:eo.string,color:eo.string,fontFamily:eo.string}).isRequired,isDimension:eo.bool.isRequired,hasAlternative:eo.bool.isRequired,supportConditional:eo.bool.isRequired},i.defaultProps={popover:null,selections:null,padding:"",minWidth:""},{renderer:"react",disableTriggers:!0,preferredSize:function(){const{height:t}=e.measureText({text:"M",fontSize:this.style.fontSize,fontFamily:this.style.fontFamily});return this.settings.settings.isDimension||a(this.settings.settings)?Math.max(28,t):Math.max(20,t)},render(){const{settings:{app:e,disabled:t,explicitItemInfos:n,hyperCube:r,hyperCubeDef:s,isDimension:l,minWidth:u,model:c,onChangeToAlternative:d,padding:p,rtl:h,selections:f,skipAttributeExpressions:g,translator:y,supportConditional:v=!1},layout:{dock:b}}=this.settings,x="top"!==b&&"bottom"!==b||!h?"ltr":"rtl",w=function(e,t){const n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",height:"100%"};return"left"===e?(n.width=`${t.height}px`,n.height=`${t.width}px`,n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left"):"right"===e&&(n.width=`${t.height}px`,n.height=`${t.width}px`,n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left"),n}(b,this.rect),S=s&&s.qLayoutExclude&&s.qLayoutExclude.qHyperCubeDef,C=S&&S[l?"qDimensions":"qMeasures"]||[],E=n||r[l?"qDimensionInfo":"qMeasureInfo"],k=l?Pd:Ld,T=l?Nd:Id,R=c&&c.colorSupport&&c.modifiers&&k({altList:C,app:e,dir:h?"rtl":"ltr",dock:o(b),model:c,onChange:d,skipAttributeExpressions:g,translator:y}),D=(M=this.settings.settings).isDimension&&he.getValue(M,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||a(this.settings.settings);var M;const q=E.map(((e,n)=>{const r="number"==typeof e.explicitColumn?e.explicitColumn:n,o=T(e,r,c),a=n===E.length-1;return m.createElement(m.Fragment,{key:e.cId},m.createElement(i,{popover:R,titleData:o,model:c,translator:y,selections:f,disabled:t(),style:this.style,isDimension:l,padding:p,minWidth:u,hasAlternative:D,supportConditional:v}),!a&&m.createElement("span",{style:{lineHeight:"normal",...this.style}},", "))}));return m.createElement("div",{style:w,dir:x},q)}}}const Hd=function(){return Ko.apply(void 0,arguments)}({palette:{text:{primary:"rgba(89, 89, 89, 0.8)",secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)"},action:{disabled:"rgba(0, 0, 0, 0.3)"}},typography:{fontFamily:'"Source Sans Pro", "Arial", "sans-serif"',button:{textTransform:"initial",fontWeight:400}},shape:{borderRadius:2},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)"],props:{MuiButtonBase:{disableRipple:!0}}});const $d=Zo({productionPrefix:"q5460",disableGlobal:!0,seed:""});function _d(){function e({x:e,y:t,width:n,height:r,scaleRatio:i,margin:o}={}){const a={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}};return a.x=Number.isNaN(e)?a.x:e,a.y=Number.isNaN(t)?a.y:t,a.width=Number.isNaN(n)?a.width:n,a.height=Number.isNaN(r)?a.height:r,void 0!==i&&(a.scaleRatio.x=Number.isNaN(i.x)?a.scaleRatio.x:i.x,a.scaleRatio.y=Number.isNaN(i.y)?a.scaleRatio.y:i.y),void 0!==o&&(a.margin.left=Number.isNaN(o.left)?0:o.left,a.margin.top=Number.isNaN(o.top)?0:o.top),a}return function(t={}){const{createElement:n=document.createElement.bind(document)}=t;let r,i=e();const o={element:()=>r,root:()=>r,appendTo:e=>(r||(r=n("div"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none"),e.appendChild(r),r),render(e){if(!r)return!1;const t=i.scaleRatio.x,n=i.scaleRatio.y;return r.style.left=`${Math.round(i.margin.left+i.x*t)}px`,r.style.top=`${Math.round(i.margin.top+i.y*n)}px`,r.style.width=`${Math.round(i.width)}px`,r.style.height=`${Math.round(i.height)}px`,r.style.transform=`scale(${t}, ${n})`,r.style.transformOrigin="top left",w.render(function(e,t){return m.createElement(Gl,{generateClassName:t},m.createElement(Hu,{theme:Hd},e))}(e,$d),r),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(r&&w.unmountComponentAtNode(r),o),destroy(){r&&r.parentElement&&(w.unmountComponentAtNode(r),r.parentElement.removeChild(r)),r=null},size:t=>(t&&(i=e(t)),i)};return o}}function Ud(){return function(e){e.renderer("react",_d()),e.component("data-title",Fd(e.renderer("svg")())),e.component("disclaimer",function(){class e extends m.Component{render(){const{label:e,spanStyle:t}=this.props;return m.createElement(m.Fragment,null,m.createElement("span",{ref:this.alignToRef,style:t,title:e},e))}}return e.propTypes={label:eo.string.isRequired,spanStyle:eo.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render(){const{settings:{label:t,rtl:n},layout:{dock:r},style:i={}}=this.settings,o="top"!==r&&"bottom"!==r||!n?"ltr":"rtl",a=function(e,t,n){const r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px",fontFamily:e.fontFamily||'"Source Sans Pro", "Arial", "sans-serif"'};switch(t){case"left":r.width=`${n.height}px`,r.transform=`rotate(-90deg) translate(-${n.height}px, 0)`,r.transformOrigin="top left";break;case"right":r.width=`${n.height}px`,r.transform=`rotate(90deg) translate(0, -${n.width}px)`,r.transformOrigin="top left";break;case"center":r.width=`${n.width}px`,r.height=`${n.height}px`,r.color="#595959",r.fontStyle="normal",r.fontSize="1.2em",r.textAlign="center";break;default:r.justifyContent="flex-start",r.alignItems="flex-start"}return r}(i,r,this.rect),s="center"===r?t:`* ${t}`,l="center"!==r?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return m.createElement("div",{style:a,dir:o},m.createElement(m.Fragment,null,m.createElement(e,{label:s,spanStyle:l})))}}}())}}function Vd(e){return vt(e).l<70}function Wd(e,t){const n=vt(e).l/100,r=vt(t).l/100;return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}function Bd(e,t){return{x:t.x+e.r*Math.sin(e.a),y:t.y-e.r*Math.cos(e.a)}}var Yd={require:["chart","settings"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){const n=e.component(t.component);if(!n)return[];const r=e.findShapes(t.selector).filter((e=>e.key===t.component));if(r.length<2)return[];if(n.settings.settings.slice.cornerRadius>0||n.settings.settings.slice.strokeWidth>0)return[];const i=[];let o=r[r.length-1];for(let e=0;e<r.length;e+=1){const t=r[e],n=o.attrs.fill,a=t.attrs.fill;if(Wd(a,n)<=1.2){const{start:e,offset:n}=t.desc.slice;let{innerRadius:r,outerRadius:s}=t.desc.slice;if(r=Math.max(r,o.desc.slice.innerRadius),s=Math.min(s,o.desc.slice.outerRadius),s>r){const t=Bd({r:s,a:e},n),o=Bd({r:r,a:e},n);i.push({type:"line",x1:t.x,y1:t.y,x2:o.x,y2:o.y,strokeWidth:1,opacity:.4,stroke:Vd(a)?"#ccc":"#333"})}}o=t}return i}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function Kd(e,t=!0){let n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?`M${r.x} ${r.y}`:`L${r.x} ${r.y}`,n+=" "}return t&&(n+="Z"),n}function Gd(e){const{size:t,angle:n}=e,r={x:e.x,y:e.y},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}];return s=s.map((e=>function(e,t,n={x:0,y:0}){const r=Math.cos(t),i=Math.sin(t),o=(s=n,{x:(a=e).x-s.x,y:a.y-s.y});var a,s;return function(e,t){return{x:e.x+t.x,y:e.y+t.y}}({x:r*o.x-i*o.y,y:i*o.x+r*o.y},n)}(e,n,r))),{type:"path",fill:e.fill,d:Kd(s)}}var Jd={require:["chart"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){if(!e.component(t.component))return[];const n=e.findShapes(t.selector).filter((e=>e.key===t.component));if(n.length<2)return[];const r=[];for(let e=0;e<n.length;e+=1){const a=n[e];if(a.data.radius.value<0){const{start:e,end:n,offset:s}=a.desc.slice,l=(e+n)/2,u=(i={r:t.offset,a:l},{x:(o=s).x+i.r*Math.sin(i.a),y:o.y-i.r*Math.cos(i.a)}),c=Gd({size:t.size,fill:t.fill,angle:l+Math.PI,...u});c.data={...a.data,_share:a.desc.share,_fillColor:a.attrs.fill},r.push(c)}}var i,o;return r}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function Zd(){const e=n();return e.use(r),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",B(e))};e.interaction("hammer",B(Hammer))}(t)),e.use(Ud()),e.component("pie-dividers",Yd),e.component("negative-indicators",Jd),e}var Xd={};function Qd(){Qd.init.call(this)}Xd.isObject=function(e){return"object"==typeof e&&null!==e},Xd.isNumber=function(e){return"number"==typeof e},Xd.isUndefined=function(e){return void 0===e},Xd.isFunction=function(e){return"function"==typeof e};var ep=Qd;Qd.EventEmitter=Qd,Qd.prototype._events=void 0,Qd.prototype._maxListeners=void 0,Qd.defaultMaxListeners=10,Qd.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},Qd.prototype.setMaxListeners=function(e){if(!Xd.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},Qd.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],Xd.isUndefined(n))return!1;if(Xd.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(Xd.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},Qd.prototype.addListener=function(e,t){var n;if(!Xd.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,Xd.isFunction(t.listener)?t.listener:t),this._events[e]?Xd.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,Xd.isObject(this._events[e])&&!this._events[e].warned)&&((n=Xd.isUndefined(this._maxListeners)?Qd.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,Xd.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),Xd.isFunction(console.trace)&&console.trace()));return this},Qd.prototype.on=Qd.prototype.addListener,Qd.prototype.once=function(e,t){if(!Xd.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},Qd.prototype.removeListener=function(e,t){var n,r,i,o;if(!Xd.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||Xd.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(Xd.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},Qd.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],Xd.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},Qd.prototype.listeners=function(e){return this._events&&this._events[e]?Xd.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},Qd.listenerCount=function(e,t){return e._events&&e._events[t]?Xd.isFunction(e._events[t])?1:e._events[t].length:0};var tp=K(ep);const np=e=>(Object.keys(tp.prototype).forEach((t=>{e[t]=tp.prototype[t]})),tp.init(e),e);function rp({picasso:e}){var t;const n=S(),r=C(),i=E(),[o,u]=k(),c=function(){const e={};return np(e),e.lasso={active:()=>!1},e.select={on:e.on,removeListener:e.removeListener},e}(),d=T(),p=R(),h=!(null===(t=d.qSelectionInfo)||void 0===t||!t.qInSelections),[f,m]=k(!1);return c.lasso=function({layout:e,isInSelections:t,isLassoActionActive:n,setIsLassoActionActive:r,translator:i}){var o;return{active:n,label:i.get(n?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),hidden:!t||!(null===(o=e.qHyperCube)||void 0===o||null===(o=o.qDimensionInfo)||void 0===o||null===(o=o[0])||void 0===o||!o.qIsOneAndOnlyOne),action(e){r("boolean"==typeof e?e:!n)},icon:{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"}}]}}}({layout:d,isInSelections:h,isLassoActionActive:f,setIsLassoActionActive:m,translator:p}),D((()=>(o&&(o.interactions.lasso.active=()=>f),{...c.lasso})),[o,f,h,p.language()]),M((()=>{r.style.overflow="hidden";const t=e({renderer:{prio:[n.renderer||"canvas"]}}),o=t.chart({element:r,data:[],settings:{}}),p=a({chart:o,actions:c,selections:i,config:{selectionActions:!1}});p.setLayout(d),p.setBrushAliases({colorField:"qDimensionInfo/0/qAttrDimInfo/0"});const h=s({legendScrollOffset:0,rotation:0});h.intercept("rotation",(e=>(h.get("rotation")+e)%(2*Math.PI))),h.onChanged("rotation",(()=>{o.update({partialData:!0})}));const f=l();return c.on("selections-start",(()=>{o.brush("selection").start()})),u({picasso:t,chart:o,selectionService:p,viewState:h,viewCache:f,interactions:c}),()=>{p.destroy(),o.destroy(),c.removeAllListeners(),delete c.select,h.intercept("rotation",void 0),h.onChanged("rotation",void 0)}}),[]),o}const ip={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"}}};function op(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const ap={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,u=o[t]*(n>l?1:n/l),c=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(u,n),width:Math.min(c,l)},r()):(e={height:u,width:c},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 sp(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const i=function(e){var t,n,r;let i,o,a,s,l,u;if(e&&(null!==(t=e.session)&&void 0!==t&&t.options||null!==(n=e.enigmaModel)&&void 0!==n&&null!==(n=n.session)&&void 0!==n&&n.sessionConfig||null!==(r=e.session)&&void 0!==r&&null!==(r=r.config)&&void 0!==r&&r.url)){var c;if(i=e.session.options||(null===(c=e.enigmaModel)||void 0===c?void 0:c.session.sessionConfig),!i){var d;i=null===(d=e.session)||void 0===d?void 0:d.config;const t=new URL(i.url);i.host=t.hostname,i.port=t.port,i.isSecure="wss:"===t.protocol}return u=void 0!==i.secure?i.secure:i.isSecure,o=u?"https://":"http://",a=i.host||"localhost",s=i.port?`:${i.port}`:"",l=i.prefix?i.prefix:"/","/"!==l[l.length-1]&&(l=`${l}/`),o+a+s+l}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 ap.getImageSize(r,t);return{src:r,size:t,height:o,width:a,imageError:s}}async function lp(e,t,n,r){var i,o,a;const{app:s,flags:l}=t,u=null===(i=e.layout)||void 0===i||null===(i=i.tooltip)||void 0===i?void 0:i.imageComponents;if(!u)return[];const[c]=u,d=c.size||"small",p=c.type||"media";let h=-1;for(let e=0;e<n.length;e++)if(n[e].cId===c.cId){h=e;break}const f=(null===(o=r.data)||void 0===o||null===(o=o.customTooltipAttrExps)||void 0===o?void 0:o.value)||[];let m;if(-1!==h&&f[h]&&(m=f[h]),"media"===p&&null!==(a=c.ref)&&void 0!==a&&null!==(a=a.qStaticContentUrl)&&void 0!==a&&a.qUrl)return sp(c,d,s);if("url"===p)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")&&null!=e&&e.getImage&&op(a))try{const t=`data:image/png;base64, ${await e.getImage(a)}`,{height:n,width:i,imageError:s}=await ap.getImageSize(t,r);o={src:t,size:r,height:n,width:i,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await ap.getImageSize(a,r);o={src:a,size:r,height:e,width:t,imageError:n}}return o}(s,l,c,d,m);if(l.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===p&&m&&m.label){return async function(e,t,n,r){let i;const o=r.label,a=`qmem://${t.qFallbackTitle}/${o}`;if(op(a))try{const t=await e.getImage(a);if(t){const e=`data:image/png;base64, ${t}`,{height:r,width:o,imageError:a}=await ap.getImageSize(e,n);i={src:e,size:n,height:r,width:o,imageError:a}}}catch(e){}return i}(s,n[h],d,m)}return[]}const up={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const i=t,o=[];for(let t=0;t<i.length;t++)o.push(lp(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}){var t;const n=null===(t=e.layout)||void 0===t||null===(t=t.tooltip)||void 0===t?void 0:t.imageComponents;return!!n&&n.length>0}},cp={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let i=t;return i=await up.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),i},checkIfPromisesExist:({customTooltipModel:e})=>up.checkIfPromisesExist({customTooltipModel:e})};const dp=(e,t)=>{var n,r,i;const o=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions,a=null==e||null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qMeasures,s=null==e||null===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qInterColumnSortOrder,l=t;return{qInfo:{qType:ip.CHART.CHART_PARENT_TYPE,qId:ip.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:o,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},pp=e=>{var t;const n=null===(t=e.tooltip)||void 0===t||null===(t=t.chart)||void 0===t||null===(t=t.object)||void 0===t?void 0:t.refId;return{qInfo:{qType:ip.CHART.CHART_CHILD_TYPE},qExtendsId:n}};const hp={createContainer:({ctx:e,layout:t})=>{var n;if(!((null===(n=t.qHyperCube)||void 0===n||null===(n=n.qDimensionInfo)||void 0===n?void 0:n.length)<=0))return function(e,t){var n,r;const i=null!==(n=null===(r=t.tooltip)||void 0===r||null===(r=r.chart)||void 0===r||null===(r=r.style)||void 0===r?void 0:r.size)&&void 0!==n?n:"medium",o=ip.CHART.STYLE[i];return[{content:[e.h("div",{style:{display:"flex",width:o,height:o,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:ip.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":o,width:"100%"}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:r,customTooltipModel:i,rtl:o})=>{var a;const s=i,l=null==t||null===(a=t.tooltip)||void 0===a||null===(a=a.chart)||void 0===a||null===(a=a.object)||void 0===a?void 0:a.refId;if(null!=s&&s.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&l&&!(t.qHyperCubeDef.qDimensions.length<=0)){await hp.hide({app:e,customTooltipModel:i});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,i=ip.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 a=await async function({app:e,properties:t,customTooltipModel:n}){var r;const i=n;null!==(r=i.miniChartToken.sessionObj)&&void 0!==r&&r.id&&await e.destroySessionObject(i.miniChartToken.sessionObj.id);const o=ip.CHART.STATE,a=dp(t,o),s=await e.createSessionObject(a),l=pp(t);if(s.id!==ip.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);i.miniChartToken.sessionObj=s;const u=await s.createChild(l);if(i.miniChartToken.sessionObj&&i.miniChartToken.sessionObj.id===s.id)return i.miniChartToken.model=u,u;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:i});if(s.miniChartToken.alternateState&&s.miniChartToken.sessionObj&&a){var u,c,d,p;const e=n.length>0&&void 0!==(null===(u=n[0].data)||void 0===u?void 0:u.value)?[null===(c=n[0].data)||void 0===c?void 0:c.value]:[],a=void 0!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){var h,f;const e=null!==(h=n[0].data.selectionOuterDimension)&&void 0!==h?h:n[0].data.selectionDimension;if(null!=e&&null!==(f=e.source)&&void 0!==f&&f.field){var m;const t=null==e||null===(m=e.source)||void 0===m?void 0:m.field.split("/"),n=t[t.length-1],r=void 0!==e.value?[e.value]:[];r.length>0&&void 0!==n&&s.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),r,!1)}}e.length>0&&s.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const l=document.getElementById(ip.CHART.CONTAINER_ID),g={direction:o?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};s.miniChartToken.vis=await i.embed.render({element:l,model:s.miniChartToken.model,options:g,id:null===(d=s.miniChartToken.model)||void 0===d?void 0:d.id,type:null===(p=s.miniChartToken.model)||void 0===p?void 0:p.genericType})}}catch(t){await hp.hide({app:e,customTooltipModel:i})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(hp.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(ip.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=ip.CHART.STATE;n.miniChartToken.alternateState=void 0,await e.removeSessionAlternateState(r)}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{var t;const n=e;"function"==typeof(null===(t=n.miniChartToken)||void 0===t||null===(t=t.vis)||void 0===t?void 0:t.destroy)&&(n.miniChartToken.vis.destroy(),n.miniChartToken.vis=void 0)}};function fp(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function mp(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=ip.CUSTOM,i={};return i[e]=!0,i[t]=!0,i[n]=!0,i[r]=!0,i}function gp(e){const t=mp();return e.filter((e=>t[e.id]))}const yp={getNodes(e,t){const n=function(e,t){let n=0,r=0;e.center?(n+=e.center.x,r+=e.center.y):(n+=e.clientX,r+=e.clientY);const 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=>{var o,a,s,l;const u=null!==(o=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==o?o:t.data;if(!u||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||i[t.type]){if(null!==(l=t.data)&&void 0!==l&&l.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=>{var t,n;const r=null!==(t=null!==(n=e.data.stack)&&void 0!==n?n:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return r&&r.value===u.value&&r.label===u.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}=yp.getAttrExprData(a);o.length||n.length?cp.handlePromises({customTooltipModel:i,nodes:yp.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{var s;null!=i&&null!==(s=i.miniChartToken)&&void 0!==s&&s.alternateState&&hp.hide({app:r.app,customTooltipModel:i}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>cp.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const r=t,i=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return r[i]||(r[i]=[]),r[i]},getAttrExprData(e){var t;let n=[],r="";const i=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(i.length>0){var o;const t=i.length-1;n=(null===(o=e.qHyperCube)||void 0===o||null===(o=o.qDimensionInfo)||void 0===o||null===(o=o[t])||void 0===o?void 0:o.qAttrExprInfo)||[],r=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:n,fieldPath:r}},quarantineCustomTooltipAttrs(e,t={}){var n;if(!(null===(n=e.qLayoutExclude)||void 0===n||null===(n=n.quarantine)||void 0===n?void 0:n[ip.CUSTOM.QUARANTINE])){!function(e,t){const n=t;let r=n.qLayoutExclude;r||(n.qLayoutExclude={quarantine:{}},r=n.qLayoutExclude),r.quarantine||(r.quarantine={}),r.quarantine[ip.CUSTOM.QUARANTINE]=[],e.forEach((e=>{r.quarantine[ip.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}(gp(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){var t;const n=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(t=t.quarantine)||void 0===t?void 0:t[ip.CUSTOM.QUARANTINE])&&delete n.qLayoutExclude.quarantine[ip.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=fp(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===gp(i).length){var o;const t=(null===(o=e.qLayoutExclude)||void 0===o||null===(o=o.quarantine)||void 0===o?void 0:o.customTooltip)||[],n=[...i,...t],a=e;a.qHyperCubeDef?a.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:a.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n){let r=[];const i=fp(e)||[];[...i,t].forEach((e=>{const t=gp(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));const o=mp(),a=i.map((e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter((e=>!o[e.id])),t})),s=void 0!==n?n:a.length-1;a.length>0&&(a[s].qAttributeExpressions=a[s].qAttributeExpressions.concat(r));const l=e;e.qHyperCubeDef?l.qHyperCubeDef.qDimensions=a:l.qHyperCube.qDimensionInfo=a},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){var t;return(null===(t=e.tooltip)||void 0===t?void 0:t.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:ve.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=ve.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},{}]}};function vp(e,t,n,r){var i;const o=(null===(i=t.qHyperCube)||void 0===i||null===(i=i[n])||void 0===i||null===(i=i[r])||void 0===i?void 0:i.qAttrExprInfo)||[],a=[],s=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return s?(o.forEach(((e,t)=>{const i=s.qValues&&s.qValues[t]?s.qValues[t]:void 0,o=void 0===i?"NaN":function(e,t){let n;switch(e.id){case ip.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case ip.CUSTOM.TITLE:case ip.CUSTOM.DESCRIPTION:case ip.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,i);a.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:o,value:"value"})})),a):a}const bp={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>vp(t,e,r,n)}}};const xp={getCustomAttrExps(e,t,n){var r;const i={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},o=(null===(r=t.data)||void 0===r||null===(r=r.customTooltipAttrExps)||void 0===r?void 0:r.value)||[];if(Number.isNaN(o))return i;return function(e,t,n,r){const i={[ip.CUSTOM.TITLE]:!0,[ip.CUSTOM.DESCRIPTION]:!0},{attrExps:o,fieldPath:a}=yp.getAttrExprData(e);return 0===t.length||0===o.length||""===a||o.forEach(((e,o)=>{const s=t[o];if(e.id===ip.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===ip.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),r}(n,o.map((t=>be.getMeasure(e,t))),e,i)}};function wp({nodes:e,layout:t,dataset:n}){const r=function(e,t,n){const r=[];return e.forEach((e=>{r.push(xp.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:[]})}function Sp(e){const t=ip.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 Cp(e){var t;const n=null===(t=e.qHyperCubeDef)||void 0===t?void 0:t.qDimensions;return n[n.length-1].qAttributeExpressions||[]}var Ep={attrExpr:{migrateProperties(e){var t,n;const r=ie(!0,{},e),i=(null===(t=r.tooltip)||void 0===t||null===(t=t.data)||void 0===t||null===(t=t.qHyperCubeDef)||void 0===t?void 0:t.qMeasures)||[];let o=Cp(r);return o=function(e,t){return t.concat(e.map((e=>Sp(e))))}(i,o),function(e,t){var n;const r=null===(n=t.qHyperCubeDef)||void 0===n?void 0:n.qDimensions;r[r.length-1].qAttributeExpressions=e}(o,r),null===(n=r.tooltip)||void 0===n||delete n.data,r},getPatches(e){var t,n;const r=(null===(t=e.tooltip)||void 0===t||null===(t=t.data)||void 0===t||null===(t=t.qHyperCubeDef)||void 0===t?void 0:t.qMeasures)||[],i=(null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions.length)-1,o=function(e,t,n){let r=e.length;const i=[];return t.forEach((e=>{const t=Sp(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}(Cp(e),r,i);return o},checkForBackwardCompatibility:(e,t)=>(e.qMeasureInfo||[]).length>0&&t.length>0,updateProperties(e,t){return new Promise((n=>{var r,i,o;const a=(null===(r=t.qHyperCube)||void 0===r?void 0:r.qDimensionInfo)||[],s=(null===(i=t.tooltip)||void 0===i||null===(i=i.data)||void 0===i?void 0:i.qHyperCube)||{},l=null===(o=t.qMeta)||void 0===o||null===(o=o.privileges)||void 0===o?void 0:o.includes("update");e&&e.getEffectiveProperties&&this.checkForBackwardCompatibility(s,a)&&e.getEffectiveProperties().then((t=>{if(l){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)}))}}};const{CUSTOM:kp}=ip;function Tp({flags:e,layout:t,app:n,model:r,picasso:o,chart:a,translator:s,localeInfo:l,embed:u,options:c}){const d={properties:void 0},p=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:yp,miniChartToken:{},embed:s}}({layout:t,app:n,model:r,picasso:o,chart:a,translator:s,localeInfo:l,embed:u}),h="rtl"===c.direction,f=()=>{var e;const n=!(null===(e=d.properties)||void 0===e||null===(e=e.qHyperCubeDef)||void 0===e||!e.qDimensions.some((e=>{var t;return null===(t=e.qCalcCondition)||void 0===t||null===(t=t.qCond)||void 0===t?void 0:t.qv})));return!(!t.tooltip||t.tooltip.auto||n)};return{setProperties:e=>{d.properties=e},isEnabled:()=>f(),hideBasic:()=>f()&&i(t,"tooltip.hideBasic",!1),getAttributes:({dataset:e,nodes:n})=>{var r,i;const o=wp({dataset:e,nodes:n,layout:t});return{title:null===(r=o.customTooltipInfoAttrExpsArr.find((e=>e.id===kp.TITLE)))||void 0===r?void 0:r.title,description:null===(i=o.customTooltipInfoAttrExpsArr.find((e=>e.id===kp.DESCRIPTION)))||void 0===i?void 0:i.value,measures:o.customTooltipAttrExpsArr}},hasImages:()=>yp.checkIfPromisesExist({customTooltipModel:p}),createImageRow:({value:e,h:t})=>yp.getImageRow(e,{h:t,rtl:h}),addImages:({nodes:r})=>{const i=yp.getDataNodes(a,r),{attrExps:o}=yp.getAttrExprData(t);return cp.handlePromises({customTooltipModel:p,nodes:i,attrExps:o,opts:{flags:e,app:n}})},chart:{isEnabled:()=>{return!!(f()&&null!==(e=t.tooltip)&&void 0!==e&&null!==(e=e.chart)&&void 0!==e&&null!==(e=e.object)&&void 0!==e&&e.refId&&u&&"function"==typeof(null==r?void 0:r.getEffectiveProperties));var e},hasLimitation:()=>{var e;return!(null==n||null===(e=n.isInModalSelection)||void 0===e||!e.call(n))},createContainer:({h:e})=>hp.createContainer({layout:t,ctx:{h:e,rtl:h}}),createLimitationRow:()=>yp.getFooterRow(s.get("properties.tooltip.notselectedmessage"),h),show:({nodes:e,properties:t})=>hp.show({app:n,properties:t,selectedNodes:e,customTooltipModel:p,rtl:h}),hasAlternateState:()=>{var e;return!(null===(e=p.miniChartToken)||void 0===e||!e.alternateState)},hide:()=>hp.hide({app:n,customTooltipModel:p}),destroy:()=>hp.destroyVisualization({customTooltipModel:p})}}}function Rp(e){return{layout:e,keys:{SCALE:{FILL:"fill"},COMPONENT:{DIMENSION_TITLE:"dimension-title",SLICES:"slices",PIE_LABELS:"pie-labels"}}}}function Dp({chart:e,translator:t,layout:n,constraints:r,options:i,themeService:o,colorService:a,custom:s}){const l=n.qHyperCube.qMeasureInfo.length>1,c="rtl"===i.direction,{fontFamily:d}=o.getStyles();return u({chart:e,translator:t,config:{rtl:c,enable:()=>!r.passive,getColorSettings:()=>a.getSettings(),style:{fontFamily:d},main:{key:"tooltip",getGroupByValue:({data:e})=>e.value,collectibles:[{key:"slices",type:"slice",major:({data:e})=>e.value}],triggers:[{keys:["slices"],collect:{from:"single"},placement:"collectible"},{keys:["pie-labels","negative-indicators"],collect:{from:"dimension",by:({data:e})=>e.value},placement:"trigger"}],placement:({meta:e})=>({type:"slices"===e.triggerer?"slice":"bounds"}),section:({h:e,nodes:n,dataset:r,formatter:i,create:o,util:a})=>{const[u]=n,{title:c,description:d,measures:p}=s.isEnabled()?s.getAttributes({dataset:r,nodes:n}):{},h=[];c&&h.push(o.text({value:c,style:{bold:!0}})),d&&h.push(o.text({value:d}));const f=s.hideBasic();if(f&&!p.length&&(c||d)||h.push(o.text({value:u.data.label,style:{bold:!0}})),!f){h.push(o.color({nodes:n,property:"fill"}));const{num:e}=u.data;if(h.push(o.measure({label:a.dataset.title(e.source.key,e.source.field),value:e.label})),l){const{radius:e}=u.data;h.push(o.measure({label:a.dataset.title(e.source.key,e.source.field),value:e.label}))}h.push(o.measure({label:t?t.get("properties.dataPoints.labelmode.share"):"Share",value:i("share")(u.desc.share)}))}p&&h.push(...p.map((e=>o.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}})))),s.chart.isEnabled()&&(s.chart.hasLimitation()?(s.chart.destroy(),h.push(o.raw({value:s.chart.createLimitationRow()}))):h.push(o.raw({value:s.chart.createContainer({h:e})})));const{customTooltipImages:m}=u.data;return s.isEnabled()&&m&&h.push(...m.map((t=>o.raw({value:s.createImageRow({value:t,h:e})})))),h},layout:{grouping:!0},events:{tooltip:{beforeShow:({collectNodes:e})=>s.isEnabled()&&s.hasImages()?s.addImages({nodes:e()}):Promise.resolve(),afterShow:({expando:e,nodes:t})=>{s.chart.isEnabled()&&!s.chart.hasLimitation()&&s.chart.show({nodes:t,properties:e.get("properties")})}},interaction:{mouseleave:()=>{s.chart.isEnabled()&&s.chart.hasAlternateState()&&s.chart.hide()}}}},legend:{keys:{tooltip:"legend-color-cat",component:"legend-cat"}}}})}function Mp({scaleKey:e,legend:t,onEdited:n}){const{layout:r}=t,{dock:i}=r||{};return{type:"brush-range",key:"legendRangeBrush",layout:{dock:"@legend-seq"},on:n?{bubbleEnd(){n()}}:{},settings:{brush:"selection",scale:`${e}Range`,direction:"left"===i||"right"===i?"vertical":"horizontal",bubbles:{align:"left"===i||"top"===i?"end":"start",placement:"outside"},target:{selector:'[id="legend-seq-target"]',fillSelector:'[id="legend-seq-ticks"]',fill:"rgba(82,204,82,0.2)"}}}}const qp=.8,Pp=.55,Np=.3,Lp={CORNER_RADIUS:0,INNER_RADIUS:Pp,STROKE:{COLOR:"#FFFFFF",WIDTH:{NONE:0,SMALL:2,MEDIUM:4,LARGE:6}}},Ip=({layout:e},t,n)=>t.encodings.slice.outerRadius?{scale:"radius",fn:t=>{var r,i;let o=qp,a=0;const s=null!==(r=null==n||null===(i=n.style)||void 0===i?void 0:i.innerRadius)&&void 0!==r?r:Pp;e.donut.showAsDonut&&(o=qp-s,a=s);return t.scale(Math.max(0,t.datum.radius.value))*o+a}}:qp,Ap=({layout:e},t,n)=>{var r,i;if(!e.donut.showAsDonut)return 0;const o=null!==(r=null==n||null===(i=n.style)||void 0===i?void 0:i.innerRadius)&&void 0!==r?r:Pp;return t.encodings.slice.outerRadius?{scale:"radius",fn:e=>{const t=qp-o,n=o;return e.scale(Math.min(0,e.datum.radius.value))*t+n}}:o},Op=({layout:e},t)=>{var n,r,i,o,a;const s=t.colorService.getDatumProps(),l=s[Object.keys(s)[0]],u=l&&l.field?l.field:void 0,c="qDimensionInfo/0"===u,d=u?t.ds.field(u).raw():null,p=d&&(d.label||d.title||d.qFallbackTitle)||"",h=t.encodings.slice.outerRadius,{formatter:f}=t.chart,m=he.getValue(e,"qHyperCube.qDimensionInfo",[]).length;function g(e,n){const r=t.ds.field(e).raw();return{field:e,label:!r.isCustomFormatted&&(r.qIsAutoFormat||"U"===r.qNumFormat.qType)?e=>f(n)(e.qNum):e=>e.qText}}const y=(e.components||[]).filter((e=>"slices"===e.key))[0];return{type:"pie",key:"slices",data:{extract:{field:"qDimensionInfo/0",props:{...s,num:g(t.encodings.slice.arc,"arc"),fillTooltip:u?{field:u,label:p,value:e=>c?e.qText||"-":void 0!==e.qNum&&"NaN"!==e.qNum?e.qText?e.qText:e.qNum:e.qText||"-"}:void 0,customTooltipAttrExps:0!==m?bp.getNode(e,{dimensionCount:m}):void 0,radius:h?g(h,"outerRadius"):void 0}}},brush:{consume:[{context:"selection",data:["","fill"],style:{inactive:{opacity:.3},active:{stroke:"rgba(52, 52, 52, 0.7)",strokeWidth:2}}},{context:"highlight",data:[""],style:{inactive:{fill:"#BFDAD9"},active:{fill:"#68B2AF"}}}]},settings:{startAngle:()=>t.viewState.get("rotation"),endAngle:()=>t.viewState.get("rotation")+2*Math.PI,slice:{arc:{ref:"num"},innerRadius:Ap({layout:e},t,y),fill:t.colorService.getColor(),strokeWidth:null!=y&&null!==(n=y.style)&&void 0!==n&&n.strokeWidth?Lp.STROKE.WIDTH[y.style.strokeWidth.toUpperCase()]:Lp.STROKE.WIDTH.NONE,stroke:null!==(r=null==y||null===(i=y.style)||void 0===i||null===(i=i.strokeColor)||void 0===i?void 0:i.color)&&void 0!==r?r:Lp.STROKE.COLOR,outerRadius:Ip({layout:e},t,y),cornerRadius:null!==(o=null==y||null===(a=y.style)||void 0===a?void 0:a.cornerRadius)&&void 0!==o?o:0}},animations:{enabled:t.animations.enabled,isMainComponent:!0}}};function zp({layout:e},t){var n,r;const i=(e.components||[]).filter((e=>"slices"===e.key))[0],o=null!==(n=null==i||null===(r=i.style)||void 0===r?void 0:r.innerRadius)&&void 0!==n?n:Pp,a=t.encodings.slice.outerRadius,s=t.themeService.getStyles();return!(!e.donut.showAsDonut||!a)&&{type:"pie",key:"zeroLine",data:{items:[1]},settings:{slice:{arc:1,fill:"transparent",innerRadius:0,strokeWidth:1,stroke:s.label.name.color,outerRadius:{scale:"radius",fn:e=>{const t=qp-o,n=o;return e.scale(0)*t+n}}}},animations:{enabled:t.animations.enabled}}}function jp(e){return{type:"pie-dividers",key:"pie-dividers",layout:{displayOrder:2},settings:{component:"slices",selector:"path"},brush:{consume:[{context:"selection",style:{inactive:{opacity:.2}}}]},animations:{enabled:e.animations.enabled,trackBy:()=>Math.random()}}}function Fp({layout:e},t){if(e.donut.showAsDonut||!t.encodings.slice.outerRadius)return!1;return{type:"negative-indicators",key:"negative-indicators",layout:{displayOrder:2},settings:{component:"slices",selector:"path",offset:5,size:4,fill:t.themeService.getStyles().label.name.color},brush:{consume:[{context:"selection",style:{inactive:{opacity:.2}}}]},animations:{enabled:t.animations.enabled}}}const Hp=()=>({key:"area",type:"brush-area",settings:{brush:{components:[{key:"slices",contexts:["selection"],action:"add"}]}},style:{area:{fill:"transparent",strokeWidth:2,stroke:"black",strokeDasharray:"5 5",opacity:.7}}}),$p=()=>({key:"lasso",type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:[{key:"slices",contexts:["selection"]}]},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}}});function _p(e){const t=e.node.desc&&e.node.desc.share;return t?e.formatter("share")(t):""}function Up(e){return e.node.data.num.label}function Vp(e){return e.node.data.radius.label}function Wp(e,t,n){if(e.dataPoint.auto)return n?Up:_p;if("share"===e.dataPoint.labelMode)return _p;if("value"===e.dataPoint.labelMode){return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?Vp:Up}return null}function Bp({data:e}){return e?e.label:""}function Yp(e){const t=parseInt(e,10);if(!isNaN(t))return t}const Kp=e=>t=>e.getContrastingColorTo(t.node.attrs.fill);function Gp(e){var t,n;const r=((e&&e.components?e.components:void 0)||[]).filter((e=>"slices"===e.key))[0];return(null!==(t=null==r||null===(n=r.style)||void 0===n?void 0:n.innerRadius)&&void 0!==t?t:Pp)>Np}function Jp({node:e,data:t}){return ie({_share:e.desc.share,_fillColor:e.attrs.fill},t)}function Zp(e,t,n){const r=t.styleService.label.name.getStyle(),i=[{padding:10,direction:t.encodings.slice.outerRadius?"rotate":"horizontal",placements:[{position:"outside",padding:t.encodings.slice.outerRadius?4:2,fill:r.fill}],fontSize:Yp(r.fontSize),fontFamily:r.fontFamily,label:Bp,linkData:({node:e,data:t})=>ie({_share:e.desc.share,_fillColor:e.attrs.fill,_showTooltip:!0},t)}];if(Wp(e,t,!1)){const r=function(e,t,n){return{label:Wp(e,t,!1),simplifiedPlacements:[{position:e.donut.showAsDonut&&Gp(e)?"inside":"into",onBackground:e.donut.showAsDonut&&Gp(e),padding:4}],theme:n.theme,themeId:"object.pieChart"}}(e,t,n),o=Se(ie(t,r),n.theme);o.linkData=Jp,i.push(o)}return{key:"pie-labels",type:"labels",renderer:Ji(t.flags),layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"slice",settings:{labels:i}}}]},brush:{consume:[{context:"selection",data:["","fill"],style:{inactive:{opacity:.3}}}]},animations:{enabled:t.animations.enabled,trackBy:()=>Math.random()}}}function Xp({layout:e,context:t},n){return!1!==e.dataPoint.show&&(1===n.dataRowCount?function(e,t,n){const r=Wp(e,t,!0),i=Kp(n.theme),o=t.themeService.getStyles(),a=t.styleService.label.name.getStyle(),s=t.styleService.label.value.getStyle(),l=a.fill===o.label.name.color,u=s.fill===o.label.value.color;return{key:"pie-labels",type:"labels",renderer:Ji(t.flags),layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"rows",settings:{align:.5,justify:.5,padding:10,labels:[{fontSize:Yp(a.fontSize),fontFamily:a.fontFamily,fill:l&&!e.donut.showAsDonut?i:a.fill,label:Bp,linkData:({data:e})=>e},{fontSize:Yp(s.fontSize),fontFamily:s.fontFamily,fill:u&&!e.donut.showAsDonut?i:s.fill,label:r,linkData:({data:e})=>e}]}}}]},animations:{enabled:t.animations.enabled,trackBy:()=>Math.random()}}}(e,n,t):Zp(e,n,t))}const Qp=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"legendRange",enable(t,n){if(this.started||!n)return!0;if(e.constraints.select||e.constraints.active)return!1;const r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>"legend-seq"===e.type)),i=(r||function(e){const{target:t}=e.srcEvent;return!(!t||!(t.hasAttribute("data-other-value")&&t.hasAttribute("data-idx")||"INPUT"===t.nodeName))}(n))&&!e.isLocked([this.chart.component("slices")]);return i||this.chart.component("legendRangeBrush").emit("rangeClear"),i}},events:{legendRangestart(t){t.preventDefault(),e.interactions.emit("selections-start"),this.chart.component("legendRangeBrush").emit("rangeStart",t),this.started=!0},legendRangemove(e){e.preventDefault(),this.chart.component("legendRangeBrush").emit("rangeMove",e)},legendRangeend(t){t.preventDefault(),this.chart.component("legendRangeBrush").emit("rangeEnd",t),e.onSelect(),this.started=!1}}});function eh(e,t){const n=t.element.getBoundingClientRect();let r,i;return e.center?(({x:r}=e.center),({y:i}=e.center)):(r=e.clientX,i=e.clientY),{x:r-n.left,y:i-n.top}}function th(e,t){const n=t.component("slices");if(!n)return!1;const{x:r,y:i}=eh(e,t),o=n.rect.x+n.rect.margin.left+n.rect.width/2,a=n.rect.y+n.rect.margin.top+n.rect.height/2,s=Math.min(n.rect.width,n.rect.height)/2*qp;return(o-r)**2+(a-i)**2<=s**2}const nh=(e,t,{requireFailure:n,recognizeWith:r}={})=>({type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"tap",interval:10,pointers:1,enable(t,n){return!n||!e.constraints.select&&!e.constraints.active&&(this.components=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((e=>"slices"===e.key||"legend-cat"===e.key||"pie-labels"===e.key)),this.components.length)}},events:{tap(n){n.preventDefault();const{target:r}=n.srcEvent;if(r&&("INPUT"===r.nodeName||r.hasAttribute("data-other-value")))return void this.chart.component("legendRangeBrush").emit("bubbleStart",n);if(r&&r.hasAttribute("data-action")&&r.hasAttribute("data-component-key"))return void this.chart.component(r.getAttribute("data-component-key")).emit(r.getAttribute("data-action"));if(r&&r.children&&r.children[0]&&"legend-cat"===r.children[0].getAttribute("data-component-key"))return;if(e.isLocked(this.components))return;e.interactions.emit("selections-start");let i=eh(n,this.chart);this.components.some((e=>"legend-cat"===e.key))&&(i={cx:i.x,cy:i.y,r:5});const o=this.chart.shapesAt(i,{components:[{key:"slices",propagation:"stop"},{key:"legend-cat",propagation:"stop"},{key:"pie-labels",propagation:"stop"}],propagation:"stop"});o.length&&(this.chart.brushFromShapes(o,{components:[{key:o[0].key,action:n.srcEvent.ctrlKey||t?"set":"toggle",contexts:["selection"]}]}),e.onSelect())}}}),rh=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"lasso",enable(t,n){if(this.isStarted||!n)return!0;if(e.constraints.active||e.constraints.select||!e.interactions.lasso.active())return!1;const r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y});return!e.isLocked(r)&&r.some((e=>"slices"===e.key))}},events:{lassostart(t){t.preventDefault(),e.constraints.select||e.constraints.active||this.isStarted||(e.interactions.emit("selections-start"),this.chart.component("lasso").emit("lassoStart",t),this.isStarted=!0)},lassomove(e){e.preventDefault(),this.chart.component("lasso").emit("lassoMove",e)},lassoend(t){t.preventDefault(),this.isStarted=!1,this.chart.component("lasso").emit("lassoEnd",t),e.onSelect()}}}),ih=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Tap",requireFailure:t,recognizeWith:n,options:{event:"areatap",pointers:2,enable(t,n){if(this.started||!n)return!0;if(e.constraints.active||e.constraints.select)return!1;const r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y});return r.some((e=>"slices"===e.key))&&!e.isLocked(r)}},events:{areatap(t){const n=this.chart.component("area");n&&!this.started&&(e.interactions.emit("selections-start"),n.emit("areaStart",t.pointers[0]),n.emit("areaMove",t.pointers[1]),this.started=!0,setTimeout((()=>{n.emit("areaEnd"),e.onSelect(),this.started=!1}),100)),t.preventDefault()}}});function oh(e){return{type:"native",key:"theusual",events:{wheel(t){let n=!1;if(!e.constraints.active&&th(t,this.chart)){const r=Math.sign(-t.deltaY);e.viewState.set("rotation",r*(Math.PI/12)),n=!0}else if(!e.constraints.select&&!e.constraints.active){const e=this.chart.componentsFromPoint(t).filter((e=>"legend-cat"===e.key))[0];e&&(n=!0,function(e,t){const n=(Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY)>=0?"next":"prev";t.emit(n)}(t,e))}n&&t.preventDefault()}}}}const ah=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"rotate",pointers:1,threshold:10,enable(t,n){return!(!this.started&&n)||!e.constraints.active&&!e.interactions.lasso.active()&&th(n,this.chart)}},events:{rotatestart(e){e.preventDefault();const t=this.chart.component("slices").rect,n=this.chart.element.getBoundingClientRect();this.pieCenter={x:n.left+t.x+t.width/2,y:n.top+t.y+t.height/2},this.prevAngle=Math.atan2(e.center.y-this.pieCenter.y,e.center.x-this.pieCenter.x),this.started=!0},rotatemove(t){t.preventDefault();const n=Math.atan2(t.center.y-this.pieCenter.y,t.center.x-this.pieCenter.x);e.viewState.set("rotation",n-this.prevAngle),this.prevAngle=n},rotateend(e){e.preventDefault(),this.started=!1},rotatecancel(e){e.preventDefault(),this.started=!1}}}),sh=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"legendPan",pointers:1,threshold:10,enable(t,n){return!(!this.isStarted&&n)||!e.constraints.active&&this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>"legend-cat"===e.type))}},events:{legendPanstart(e){if(e.preventDefault(),!this.isStarted){this.components=this.chart.componentsFromPoint({x:e.center.x,y:e.center.y}),this.components.forEach((t=>{t.emit("panstart",e)})),this.isStarted=!0;const t=this.chart.component("tooltip");t&&t.show&&t.emit("hide")}},legendPanmove(e){this.components.forEach((t=>{t.emit("panmove",e)})),e.preventDefault()},legendPanend(e){e.preventDefault(),this.components.forEach((t=>{t.emit("panend",e)})),this.isStarted=!1}}}),lh=(e,t,n)=>({key:"hammered",type:"hammer",enable:!0,gestures:t?[ah(e,{}),nh(e,t,{}),...n]:[Qp(e,{}),ih(e,{}),ah(e,{}),rh(e,{}),sh(e,{}),nh(e,t,{}),...n]});function uh(e,t,n){const r=e.getIsSingleSelect(0),{constraints:i}=n;if(i.active&&i.passive)return[];const o=t.tooltipService.getInteractions();return[lh(t,r,o.gestures),oh(t),o.native]}function ch({settings:e},t){const n={share:{type:"d3-number",format:".1%"},arc:{data:{field:t.encodings.slice.arc}},fill:e.scales.fill&&e.scales.fill.data&&e.scales.fill.data.field?{data:{field:e.scales.fill.data.field}}:{}};return t.encodings.slice.outerRadius&&(n.outerRadius={data:{field:t.encodings.slice.outerRadius}}),n}function dh({layout:e},t,n){if(!e.dimensionTitle)return!1;const r=t.properties,i=t.styleService.axis.title.getStyle();return{key:"dimension-title",type:"data-title",layout:{minimumLayoutMode:"SMALL",dock:"top"},settings:{hyperCube:e.qHyperCube,hyperCubeDef:r&&r.qHyperCubeDef,isDimension:!0,disabled:()=>n.constraints.active||!n.model,model:t.model,app:t.app,translator:t.translator,rtl:n.rtl,selections:t.selections},style:{fontFamily:i.fontFamily,fontSize:i.fontSize,color:i.color}}}function ph({layout:e},t,n){const r=function(e,t){const n={field:"qDimensionInfo/0",props:{num:{field:t.encodings.slice.arc}}};t.encodings.slice.outerRadius&&(n.props.radius={field:t.encodings.slice.outerRadius});let r=t.ds.extract(n);if(0===r.length)return"NoDataExist";const i=he.getValue(e,"qHyperCube.qSize.qcy");if(he.getValue(e,"qHyperCube.qDataPages.0.qArea.qHeight")<i)return"LimitedData";if(r=t.encodings.slice.outerRadius?r.filter((e=>"NaN"!==e.num.value&&"NaN"!==e.radius.value)):r.filter((e=>"NaN"!==e.num.value)),0===r.length)return"OnlyNanData";const o=r;return r=t.encodings.slice.outerRadius&&!e.donut.showAsDonut?r.filter((e=>e.num.value>0&&e.radius.value>0)):r.filter((e=>e.num.value>0)),0===r.length?"OnlyNegativeOrZeroValues":o.length!==r.length&&"NegativeOrZeroValues"}(e,t),{fontFamily:i}=t.themeService.getStyles();return function(e,t,n,r={}){if(!e)return!1;const{translator:i}=t,{rtl:o}=n;return{key:"disclaimer",type:"disclaimer",layout:{dock:se[e].alignment},settings:{label:i.get(`Object.Disclaimer.${e}`),rtl:o},style:r}}(r,t,n,{fontFamily:i})}function hh({layout:e,context:t,selectionService:n},r={}){const i=function({layout:e}={},t={}){const n={};return ie(n,t.colorService.getScales()),t.encodings.slice.outerRadius&&ie(n,function({layout:e},t){const n={radius:{type:"linear",include:[0],data:{extract:{field:t.encodings.slice.outerRadius}}}};return e.donut.showAsDonut||(n.radius.min=0),n}({layout:e},t)),n}({layout:e},r),o={scales:i};let a=[];const s=ph({layout:e},r,t);if(s&&"center"===s.layout.dock)return{components:[s]};const l=t.constraints.select||t.constraints.active,u=r.colorService.getLegend({eventName:"legend",key:"legend",viewState:r.viewState,chart:r.chart,styleReference:"object.pieChart",styleOverrides:{title:r.styleService.legend.title.getStyle(),label:r.styleService.legend.label.getStyle()},rtl:t.rtl},{navigationDisabled:l});return i.fillRange&&u.components[0]&&("right"===u.components[0].layout.dock||"left"===u.components[0].layout.dock||t.rtl)&&(i.fillRange.invert=!0),a=[Op({layout:e,settings:o},r),zp({layout:e},r),jp(r),Fp({layout:e},r),dh({layout:e},r,t),...u.components,Mp({settings:o,scaleKey:"fill",legend:u.components[0]||{},onEdited:r.onSelect}),$p(),Hp(),Xp({layout:{components:e.components,dataPoint:ie({},e.dataPoint,{show:!(e.effectPath&&e.snapshotData&&!1===e.dataPoint.show)}),donut:e.donut},context:t},r),...r.tooltipService.getComponents(),(!1!==e.showDisclaimer||!r.flags.isEnabled("SHOW_DISCLAIMER"))&&s],a=a.filter((e=>!1!==e)),{interactions:uh(n,r,t),scales:i,components:r.pluginService.extendComponents(a),palettes:r.colorService.getPalettes(),formatters:ch({settings:o},r),strategy:de(0,r)}}function fh({instance:e,services:t,picasso:n,flags:i}){const o=S(),a=q(),s=P(),l=R(),u=A(),c=N(),d=E(),p=I(),{qLocaleInfo:f}=O(),[m]=j((()=>{if(!t)return Promise.resolve();Ep.attrExpr.updateProperties(a,c);return Promise.all([t.colorService.initialize({createConfig:({getUseBaseColors:e})=>({theme:u,legendProps:c.legend,layout:c,localeInfo:f,hc:c.qHyperCube,colorProps:{...c.color,useBaseColors:e(c)}})}),a&&!c.snapshotData?a.getEffectiveProperties():Promise.resolve({}),t.pluginService.initialize()])}),[t]);M((()=>{null!=e&&e.selectionService&&e.selectionService.setLayout(c)}),[c]),M((()=>{if(!e||!m)return;const{chart:g,viewState:y,interactions:v,viewCache:b}=e,{colorService:x,pluginService:w,themeService:S,tooltipService:C,styleService:E}=t,k=o.viewState||{};c.snapshotData||(y.preventSet("legendScrollOffset",k.legendScrollOffset||0),y.preventSet("rotation",k.rotation||0)),function(e,t){e&&e.snapshotData&&e.snapshotData.content&&e.snapshotData.content.chartData&&(t.preventSet("legendScrollOffset",e.snapshotData.content.chartData.legendScrollOffset),t.preventSet("rotation",e.snapshotData.content.chartData.rotation))}(c,y),C.expando.set("properties",m[1]);const T=n.data("q")({key:"qHyperCube",data:c.qHyperCube,config:{localeInfo:f}}),R=[{type:"q",key:"qHyperCube",data:c.qHyperCube,config:{localeInfo:f}},...x.getData()],D={slice:{arc:"qMeasureInfo/0"}};c.qHyperCube.qMeasureInfo.length>1&&(D.slice.outerRadius="qMeasureInfo/1");const M=function(e,t){if(t.slice.outerRadius)return e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc},radius:{field:t.slice.outerRadius}}}).filter((e=>e.num.value>0&&"NaN"!==e.radius.value)).length;return e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc}}}).filter((e=>e.num.value>0)).length}(n.data("q")({data:c.qHyperCube,config:{localeInfo:f}}),D),q=d?()=>{const e=g.brush("selection");r.selections(e,{},c).forEach((e=>{d.select(e)}))}:()=>{},P=c.snapshotData&&!o.freeResize?{width:(c.snapshotData.content.size||c.snapshotData.object.size).w,height:(c.snapshotData.content.size||c.snapshotData.object.size).h}:void 0,N=t=>e.selectionService.getIsSelectionLocked(t),L=()=>hh({layout:c,context:{rtl:"rtl"===o.direction,theme:u,translator:l,constraints:p,model:a},selectionService:e.selectionService},{picasso:n,ds:T,model:a,app:s,chart:g,onSelect:q,isLocked:N,interactions:v,constraints:p,translator:l,viewState:y,dataRowCount:M,encodings:D,colorService:x,pluginService:w,themeService:S,styleService:E,tooltipService:C,debouncer:h,properties:m[1],logicalSize:P,flags:i,animations:{enabled:()=>function({viewState:e,options:t,viewCache:n,layout:r,chart:i}){return!1!==t.chartAnimations&&n.get("chartWidth")===i.element.clientWidth&&n.get("chartHeight")===i.element.clientHeight&&n.get("hasZeroLine")===!!i.component("zeroLine")&&0===e.get("rotation")&&!Gi.propertiesHaveChanged({viewCache:n,layout:r})}({viewState:y,options:o,layout:c,viewCache:b,chart:g})}});e.generateSettings=L;const I=L();g.update({data:R,settings:I}),b.set("chartWidth",g.element.clientWidth),b.set("chartHeight",g.element.clientHeight),b.set("hasZeroLine",I.components.filter((e=>"zeroLine"===e.key)).length>0),Gi.cacheProperties({viewCache:b,layout:c}),o.effect&&c.effectProperties?o.effect.update(c,g,{encodings:D}):c.effectPath||g.brush("highlight").end()}),[e,m,o.direction,o.effectProperties,p,u.name(),l.language()])}const mh="legend-cat";function gh({instance:e,services:t}){const n=C(),r=N();H((i=>{if(!(r.snapshotData&&r.snapshotData.content&&r.snapshotData.content.chartData)&&(function(e,t){const n=t.getBoundingClientRect();e.snapshotData=e.snapshotData||{},e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.size=e.snapshotData.content.size||{w:n.width,h:n.height}}(i,n),e&&t))return function({layout:e,chart:t,viewState:n,colorService:r}){return e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.chartData={legendScrollOffset:fe(t,mh),rotation:n.get("rotation")},r.getSnapshotData().then((t=>{e.snapshotData.content.chartData={...e.snapshotData.content.chartData,...t}})).catch((()=>{}))}({layout:i,chart:e.chart,colorService:t.colorService,viewState:e.viewState})})),$((()=>({getViewState:()=>({rotation:e.viewState.get("rotation"),legendScrollOffset:fe(e.chart,"legend-cat")})})),[e])}const yh={setValue(e,t,n){if(!t)return;const r=t.split(".");let i=e;const o=r[r.length-1];let a;for(a=0;a<r.length-1;++a)null==i[r[a]]&&(i[r[a]]=Number.isNaN(+r[a+1])?{}:[]),i=i[r[a]];void 0!==n?i[o]=n:delete i[o]},getValue(e,t,n){const r=t.split(".");let i,o=e;if(void 0===o)return n;for(i=0;i<r.length;++i){if(null==o[r[i]])return n;o=o[r[i]]}return o}},vh={getDimensions:e=>yh.getValue(e,"qHyperCubeDef.qDimensions",[]),getNumDimensions:e=>yh.getValue(e,"qHyperCubeDef.qDimensions.length",0),getMeasures:e=>yh.getValue(e,"qHyperCubeDef.qMeasures",[]),getNumMeasures:e=>yh.getValue(e,"qHyperCubeDef.qMeasures.length",0),getDimensionLayouts(e,t){const n=yh.getValue(e,t?`${t}.qHyperCube`:"qHyperCube",null);return n?n.qDimensionInfo:[]},getDimensionLayout(e,t,n){return this.getDimensionLayouts(t,n).filter((t=>e===t.cId))[0]},getMeasureLayouts(e,t){const n=yh.getValue(e,t?`${t}.qHyperCube`:"qHyperCube",null);return n?n.qMeasureInfo:[]},getMeasureLayout(e,t,n){return this.getMeasureLayouts(t,n).filter((t=>e===t.cId))[0]}};const bh={colorModeOptions:{primary:()=>!0,dimension:()=>!0,multiColor:()=>!1,measure:()=>!0,expression:e=>vh.getNumMeasures(e)>=1},showLegend:e=>{const t=yh.getValue(e,"color.auto"),n=yh.getValue(e,"color.expressionIsColor"),r=yh.getValue(e,"color.mode");return!(!t&&"primary"===r||!t&&"byExpression"===r&&(n||void 0===n))},persistentColorsShow:e=>!yh.getValue(e,"color.auto")&&"byDimension"===yh.getValue(e,"color.mode"),useDimValColShow:e=>(void 0===yh.getValue(e,"color.useDimColVal")&&yh.setValue(e,"color.useDimColVal",!1),!yh.getValue(e,"color.auto")&&"byDimension"===yh.getValue(e,"color.mode")&&"libraryItem"===yh.getValue(e,"color.byDimDef.type"))},xh=function(e){const{colorModeOptions:t,persistentColorsShow:n,useDimValColShow:r,showLegend:i}=bh;this.color={colorMode:{options(n){const r=[];return"explore"===e&&r.push({value:"auto",translation:"Common.Auto"}),t.primary(n)&&r.push({value:"primary",translation:"properties.colorMode.primary"}),t.multiColor(n)&&r.push({value:"byMultiple",translation:"properties.colorMode.multicolored"}),t.dimension(n)&&r.push({value:"byDimension",translation:"properties.colorMode.byDimension"}),t.measure(n)&&r.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"}),t.expression(n)&&"explore"!==e&&r.push({value:"byExpression",translation:"properties.colorMode.byExpression"}),r}},persistentColors:{show:e=>r(e)?n(e)&&!yh.getValue(e,"color.useDimColVal"):n(e)},useDimColVal:{show:r}},this.legend={show:i,showTitle:{show(e){const t=yh.getValue(e,"color.auto");return yh.getValue(e,"legend.show")&&i(e)&&(t||!function(e){return"byExpression"===yh.getValue(e,"color.mode")&&!0===yh.getValue(e,"color.expressionIsColor")}(e))}},dock:{show:e=>yh.getValue(e,"legend.show")&&i(e)}}};function wh(e){return new xh(e)}const Sh={classification:{section:"styling",tags:["simple"],exclusive:!0},component:"items",show:!0,chartType:"piechart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.PieChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,items:{strokeSection:{translation:"properties.Outline",component:"items",items:{strokeItem:{component:"items",ref:"components",key:"slices",items:{strokeWrapper:{component:"inline-wrapper",items:{strokeWidth:{translation:"LayerStyleEditor.style.strokeWidth",ref:"style.strokeWidth",width:9,show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"Common.None"},{value:"small",translation:"Common.Small"},{value:"medium",translation:"Common.Medium"},{value:"large",translation:"Common.Large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",defaultValue:{color:"#FFFFFF"},schemaIgnore:!0,width:3,component:"color-picker"}}}}}}},cornerRadius:{component:"items",translation:"LayerStyleEditor.style.cornerRadius",items:{cornerRadiusItem:{component:"items",ref:"components",key:"slices",items:{cornerRadiusSlider:{ref:"style.cornerRadius",translation:"LayerStyleEditor.style.cornerRadius",component:"slider",min:0,max:40,step:.05,width:12,defaultValue:0,schemaIgnore:!0}}}}},innerRadius:{translation:"LayerStyleEditor.style.innerRadius",component:"items",show:e=>e.donut.showAsDonut,items:{innerRadiusItem:{component:"items",ref:"components",key:"slices",items:{innerRadiusSlider:{ref:"style.innerRadius",translation:"LayerStyleEditor.style.innerRadius",component:"slider",min:.05,max:.75,step:.01,width:12,defaultValue:.55,schemaIgnore:!0}}}}}}},Ch=(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.pieChart",e,"color")})}}}}},Eh={component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:"slices",ref:"components",defaultValues:{key:"slices",style:{strokeColor:{index:-1,color:"#FFFFFF"},strokeWidth:"none",cornerRadius:0,innerRadius:.55}},items:{slices:{components:"items",type:"items",uses:"styling.slice",items:{strokeWidth:{show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"LayerStyleEditor.style.strokeWidth.none"},{value:"small",translation:"LayerStyleEditor.style.strokeWidth.small"},{value:"medium",translation:"LayerStyleEditor.style.strokeWidth.medium"},{value:"large",translation:"LayerStyleEditor.style.strokeWidth.large"}],defaultValue:"none"},strokeColor:{show:e=>"none"!==e.style.strokeWidth},cornerRadius:{component:"slider",min:0,max:40,step:.05,defaultValue:0,show:!0},innerRadius:{component:"slider",min:.05,max:.75,step:.01,defaultValue:.55,show:(e,t,n)=>n.layout.donut.showAsDonut}}}}},kh=(e,t,n,r)=>{const i=f({theme:r,translator:n,flags:t,config:{id:"pieChart",paths:["axis.title","label.name","label.value","legend.title","legend.label"]}});return{component:"styling-panel",chartTitle:"Object.PieChart",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:e,items:{strokeSection:{translation:"properties.Outline",component:"panel-section",items:{strokeItem:{component:"items",ref:"components",key:"slices",items:{strokeWrapper:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:9,show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"Common.None"},{value:"small",translation:"Common.Small"},{value:"medium",translation:"Common.Medium"},{value:"large",translation:"Common.Large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",defaultValue:{color:"#FFFFFF"},schemaIgnore:!0,width:3,component:"color-picker"}}}}}}},cornerRadius:{translation:"LayerStyleEditor.style.cornerRadius",component:"panel-section",items:{cornerRadiusItem:{component:"items",ref:"components",key:"slices",items:{cornerRadiusSlider:{ref:"style.cornerRadius",component:"slider",min:0,max:40,step:.05,width:12,defaultValue:0,schemaIgnore:!0}}}}},innerRadius:{translation:"LayerStyleEditor.style.innerRadius",component:"panel-section",show:e=>e.donut.showAsDonut,items:{innerRadiusItem:{component:"items",ref:"components",key:"slices",items:{innerRadiusSlider:{ref:"style.innerRadius",component:"slider",min:.05,max:.75,step:.01,width:12,defaultValue:.55,schemaIgnore:!0}}}}},axisTitleSection:null!=t&&t.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.dimensionlabels",component:"panel-section",items:{axisTitleItems:{component:"items",ref:"components",key:"axis",items:Ch("axis.title",i,r)}}}:void 0,labelNameSection:null!=t&&t.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.dimensionValueLabel",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"label",items:Ch("label.name",i,r)}}}:void 0,labelValueSection:null!=t&&t.isEnabled("CLIENT_IM_3050")?{translation:"properties.value.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"label",items:Ch("label.value",i,r)}}}:void 0,legendTitleSection:null!=t&&t.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.title",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"legend",items:Ch("legend.title",i,r)}}}:void 0,legendLabelSection:null!=t&&t.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"legend",items:Ch("legend.label",i,r)}}}:void 0}}},Th=wh("hard");const Rh=e=>{var t;null!==(t=e.color)&&void 0!==t&&t.auto||(o(e,"color.mode","byDimension"),o(e,"color.byDimDef.activeDimensionIndex",0),o(e,"color.persistent",!1))},Dh=e=>{var t;const n=[{value:"primary",translation:"properties.colorMode.primary"},{value:"byDimension",translation:"properties.colorMode.byDimension"}];switch(null===(t=e.color)||void 0===t?void 0:t.mode){case"byMultiple":n.push({value:"byMultiple",translation:"properties.colorMode.multicolored"});break;case"byMeasure":n.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"});break;case"byExpression":n.push({value:"byExpression",translation:"properties.colorMode.byExpression"})}return n},Mh=e=>{var t;const{flags:n,translator:r}=e||{},i=null==e||null===(t=e.sense)||void 0===t?void 0:t.theme,a=null==n?void 0:n.isEnabled("SENSECLIENT_IM_2429_PIECHART_BG"),s={items:{simpleItems:{items:{autoColor:{label:e=>{var t;return null!==(t=e.color)&&void 0!==t&&t.auto?r.get("Simple.Color.Auto",r.get("properties.colorMode.byDimension")):r.get("Common.Custom")},change:Rh},colorMode:{options:Dh}}}}},l={items:{labels:{items:{header:{show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length},pointLabels:{component:"checkbox",ref:"dataPoint.auto",type:"boolean",defaultValue:!0,translation:"Simple.Label.Value",show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length,change(e){e.dataPoint.auto||o(e,"dataPoint.labelMode","none")}},dimensionTitle:{component:"checkbox",ref:"dimensionTitle",type:"string",translation:"Simple.Label.Dimension.Hide",defaultValue:"all",show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length,convertFunctions:{get:(e,t,n,r)=>!r.dimensionTitle,set(e,t,n,r,i){i.dimensionTitle=!e}}}}}}},u={uses:"settings",items:{simpleStyling:null!=n&&n.isEnabled("PIECHART_SIMPLE_STYLING")?Sh:void 0,simpleLabels:l,general:{items:{showDisclaimer:null!=n&&n.isEnabled("SHOW_DISCLAIMER")?{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}:void 0}},presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{sliceStyling:null!=n&&n.isEnabled("SENSECLIENT_PS_17478_STYLINGPANEL_PIECHART")?kh(a,n,r,i):Eh,showAsDonut:{ref:"donut.showAsDonut",type:"boolean",component:"item-selection-list",defaultValue:!1,horizontal:!0,items:[{icon:"pie_chart_pie",component:"icon-item",labelPlacement:"bottom",translation:"properties.pie",value:!1},{icon:"pie_chart_donut",component:"icon-item",labelPlacement:"bottom",translation:"properties.donut",value:!0}]},labels:{type:"items",snapshot:{tid:"property-labels"},items:{dimensionTitle:{ref:"dimensionTitle",type:"boolean",component:"switch",translation:"properties.dataPoints.dimensionlabels",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},valuesAuto:{ref:"dataPoint.auto",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},labelMode:{ref:"dataPoint.labelMode",type:"string",component:"dropdown",options:[{value:"none",translation:"Common.None"},{value:"share",translation:"properties.dataPoints.labelmode.share"},{value:"value",translation:"properties.dataPoints.labelmode.value"}],defaultValue:"share",show:e=>!e.dataPoint.auto},labelValueMode:{ref:"dataPoint.labelValueMode",type:"string",component:"dropdown",translation:"properties.dataPoints.labelvaluemode",options:[{value:"arc",translation:"Visualizations.Descriptions.Angle"},{value:"radius",translation:"Visualizations.Descriptions.Radius"}],defaultValue:"arc",show:e=>!e.dataPoint.auto&&function(e){return e.qHyperCubeDef&&e.qHyperCubeDef.qMeasures.length>1||e.qHyperCube&&e.qHyperCube.qMeasureInfo.length>1}(e)&&"value"===e.dataPoint.labelMode}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:{items:{colorMode:{options:Th.color.colorMode.options},persistentColors:{show:Th.color.persistentColors.show}}},simpleColors:s,legend:{show:Th.legend.show,items:{show:{defaultValue:!1,snapshot:{tid:"property-legend"}},showTitle:{show:Th.legend.showTitle.show},dock:{show:Th.legend.dock.show}}}}},tooltip:{uses:"tooltip"}}};return u},qh={uses:"data",items:{dimensions:{uses:"dimensions"},measures:{uses:"measures",items:{numberFormatting:{items:{percentOfPieMessage:{component:"text",translation:"properties.numberFormatting.pieMessage",show:(e,t,{properties:n}={})=>n&&(n.dataPoint.auto||"share"!==n.dataPoint.labelMode)}}}}}}},Ph={uses:"sorting",items:{interColumnSorting:{reset:e=>{const{qDimensions:t,qMeasures:n,qInterColumnSortOrder:r}=e.qHyperCubeDef;if(1===t.length&&n.length>=1){const t=r.length,n=[...Array(t).keys()];[n[0],n[1]]=[n[1],n[0]],e.qHyperCubeDef.qInterColumnSortOrder=n}}}}},Nh={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{suppressZero:null,calcCond:{uses:"calcCond"}}}}};function Lh(e){return{type:"items",component:"accordion",items:{data:qh,sorting:Ph,addons:Nh,settings:Mh(e)}}}const Ih=wh("explore"),Ah=Lh();var Oh={type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sort"},presentation:{uses:"presentation",items:{showAsDonut:Ah.items.settings.items.presentation.items.showAsDonut,labelMode:{type:"items",items:{labelMode:{type:"string",component:"radio-list",translation:"properties.dataPoints.labelmode",diffs:["dataPoint.auto:false","dataPoint.labelMode"],options:Ah.items.settings.items.presentation.items.labels.items.labelMode.options,setPropertyValue(e,t){e.dataPoint.auto=!1,e.dataPoint.labelMode=t},getValue:e=>e.dataPoint.auto?"":e.dataPoint.labelMode}}}}},color:{uses:"color",items:{mode:{options:Ih.color.colorMode.options},dimension:{items:{persistentColors:{show:e=>!(e.color&&"byDimension"===e.color.mode&&e.color.useDimColVal&&Ih.color.useDimColVal.show(e))}}}}}}};const zh="slices";function jh(e,t){const n=e&&e.desc&&void 0!==e.desc.share?e.desc.share:void 0;return t("share")(n)}function Fh(e){return e.data.num.label}function Hh(e){return e.data.radius.label}function $h(e,t,n,r){return function(e,t){if(e.dataPoint.auto)return 1===e.qHyperCube.qSize.qcy?Fh:jh;if("share"===e.dataPoint.labelMode)return jh;if("value"===e.dataPoint.labelMode)return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?Hh:Fh;return Fh}(n,r)(e,t)}function _h(e){let t;return t=e.data.label?function(e,t){let n=e;return n.length>t&&(n=`${n.substr(0,t-3)}...`),n}(e.data.label,20):"",t}class Uh{constructor({element:e,properties:t,effectHelper:n,Flag:r}){this.element=e,this.Flag=r,n.initFade(this.element);const i=e.find(".effectLayer");i.length>0&&i.remove(),e.append('<div class="effectLayer"></div>'),this.effectLayer=e.find(".effectLayer"),this._effectProperties=t,this.selectedIndex=t.selectedIndex,this.hasPropertiesPanel=!1,this.effectApplied=!0,n.fadeIn(this.element)}updateOrigSettings(e){return{dataPoint:e.dataPoint,legend:e.legend,dimensionTitle:e.dimensionTitle}}updateFlags(e,t){const n=this.chart.getAffectedShapes("highlight"),r=this.effectLayer[0].getBoundingClientRect(),i=n.map((n=>{const{start:i,end:o,outerRadius:a,offset:s}=n.desc.slice,{scaleRatio:l}=this.chart.component(n.key).rect,u=n.element.getBoundingClientRect(),c=(i+o)/2,d=u.left-r.left+l.x*(s.x+a*Math.sin(c)),p=u.top-r.top+l.y*(s.y-a*Math.cos(c)),h=Math.cos(c)>0?"top":"bottom",f=Math.sin(c)>0?"right":"left";return{title:_h(n),label:$h(n,this.chart.formatter,e,t),orientation:`${h}${f}`,position:{x:d,y:p}}}));this.Flag.show(this.effectLayer,i)}init(e,t,n,r){return t.getProperties().then((e=>{if(!e.originalModelSettings){const t=ie(!0,{},e);e.originalModelSettings=this.updateOrigSettings(t)}e.effectProperties=r,e.effectPath=n,e.dataPoint.show=!1,e.legend.show=!1,e.dimensionTitle=!1,t.setProperties(e)}))}remove(e,t,n){return e.options=ie(e.options,{effect:null}),n?t.getProperties().then((e=>ie(e,{effectPath:null,effectProperties:null,dataPoint:ie(!0,{},e.originalModelSettings.dataPoint),legend:ie(!0,{},e.originalModelSettings.legend),dimensionTitle:e.originalModelSettings.dimensionTitle}))):Promise.resolve()}}class Vh extends Uh{init(e,t,n,r){return e.options=ie(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.max===r.max?Promise.resolve():super.init(e,t,n,r)}update(e,t,n){this.chart=t,this.updateHighlight(e),this.updateFlags(e,n)}updateHighlight(e){const t=this.chart.component(zh).data.items,n=e.effectProperties.min,r=e.effectProperties.max,i=[];let o=[1/0,-1],a=[-1/0,-1];t.forEach(((e,t)=>{const i=e.num.value;n&&i<o[0]&&(o=[i,t]),r&&i>a[0]&&(a=[i,t])})),-1!==o[1]&&i.push(t[o[1]].value),-1!==a[1]&&i.push(t[a[1]].value),i.length&&this.chart.brush("highlight").setValues(i.map((e=>({key:"qHyperCube/qDimensionInfo/0",value:e}))))}}class Wh extends Uh{constructor(e){super(e),this.hasPropertiesPanel=!0,this.propsTemplate=e.highlightValuePropsTemplate,this.effectHelper=e.effectHelper}onClick(e){if(!this.chart)return;const t=this.chart.shapesAt(function(e,t){const n=t.element.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}(e,this.chart),{propagation:"stop"});if(1!==t.length)return;const n=t[0],r=this.chart.component(zh).data.items.map((e=>e.value)),i=r.indexOf(n.data.value);-1!==i&&(this.selectedIndex=i,this.effectHelper.updateSelectedPointIndex(this))}update(e,t,n){this.chart=t,this.updateHighlight(e),this.updateDataPoints(e,n),this.updateFlags(e,n)}updateHighlight(e){const t=this.chart.component(zh).data.items[e.effectProperties.selectedIndex];this.chart.brush("highlight").setValues([{key:"qHyperCube/qDimensionInfo/0",value:t.value}])}updateDataPoints(e,t){this.dataPoints=this.chart.findShapes("path").filter((e=>e.key===zh)).map(((n,r)=>{const i=$h(n,this.chart.formatter,e,t);return{text:`${_h(n)} (${i})`,value:r}}))}init(e,t,n,r){return e.options=ie(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.selectedIndex===r.selectedIndex?Promise.resolve():super.init(e,t,n,r)}}const Bh="/effects/highlight-value",Yh="/effects/maxmin";var Kh={isCompatible:({effectPath:e})=>e===Yh||e===Bh,create:e=>e.effectPath===Yh?new Vh(e):e.effectPath===Bh?new Wh(e):null};function Gh(e){const t={},{components:n,tooltip:r}=e,i=n?n.filter((e=>"slices"===e.key))[0]:void 0;if(i&&i.style&&Object.keys(i.style).forEach((e=>{t[`chart_style_${e}`]=i.style[e]})),r){var o;t.chart_tooltip_custom=!r.auto;const e=null===(o=r.chart)||void 0===o||null===(o=o.object)||void 0===o?void 0:o.refId;!r.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}function Jh(e){if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures;1===t.length&&1===n.length&&(n[0].qSortBy.qSortByNumeric=-1,e.qHyperCubeDef.qInterColumnSortOrder.splice(0,e.qHyperCubeDef.qInterColumnSortOrder.length,1,0))}function Zh(e){e.qOtherTotalSpec.qOtherMode="OTHER_COUNTED",e.qOtherTotalSpec.qOtherCounted={qv:"10"}}function Xh({translator:e}){return{dimensions:{min:1,max:1,description:()=>e.get("Visualizations.Descriptions.Slice"),add(e,t){Zh(e),Jh(t),yp.addCallbackCustomTooltip(t)},move(e,t){Zh(e),Jh(t),yp.moveCallbackCustomTooltip(t,e)},remove(e,t){yp.removeCallbackCustomTooltip(t,e)},replace(e,t,n,r){Zh(e),Jh(r),yp.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:2,description:(t,n)=>e.get(0===n?"Visualizations.Descriptions.Angle":"Visualizations.Descriptions.Radius"),add(e,t){Jh(t)},remove(e,t){!function(e){if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qMeasures,{mode:n}=e.color;"byExpression"===n&&0===t.length&&(e.color.mode="primary")}(t)}}}}const Qh=e=>e.qMax<=0,ef=e=>!(!(e&&e.qHyperCube.qSize.qcy>0)||e.qHyperCube.qMeasureInfo.every(Qh));function tf(e){return{definition:Lh(e),softDefinition:Oh,support:{snapshot:ef,export:ef,exportData:!0,sharing:ef,viewData:!0,effects:!0},effects:Kh,extendMetrics:Gh,importProperties:(t,n,r,i)=>{const o={layout:{templateId:n.templateId}};r.mapProperties(o);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=_.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:Xh(e),defaultPropertyValues:a,hypercubePath:i});return s.qProperty.dataPoint&&!1===s.qProperty.dataPoint.show&&delete s.qProperty.dataPoint.show,s},exportProperties:(e,t,n)=>_.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:n})}}function nf(e){return{properties:{version:"1.26.7",color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",formatting:{numFormatFromTemplate:!0,isCustomFormatted:void 0},measureMin:void 0,measureMax:void 0,measureScheme:"sg",mode:"primary",paletteColor:{index:6},persistent:!1,reverseScheme:!1,singleColor:void 0,useBaseColors:"off",useDimColVal:!0,useMeasureGradient:!0},components:[{key:"slices",style:{strokeWidth:"none",strokeColor:{index:-1,color:Lp.STROKE.COLOR},cornerRadius:Lp.CORNER_RADIUS,innerRadius:Lp.INNER_RADIUS}}],dataPoint:{auto:!0,labelMode:"share",labelValueMode:"arc"},dimensionTitle:!0,donut:{showAsDonut:!1},footnote:"",legend:{dock:"auto",show:!0,showTitle:!0},qHyperCubeDef:{qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:10,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1,qMode:"S"},showDetails:!0,showDisclaimer:!0,showTitles:!0,subtitle:"",title:"",tooltip:{auto:!0,hideBasic:!1,data:{qHyperCubeDef:void 0},chart:void 0,imageComponents:void 0}},data:{targets:[Xh(e)]},importProperties:({exportFormat:t,initialProperties:n,hypercubePath:r})=>{const i=_.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:Xh(e),hypercubePath:r});return i.qProperty.dataPoint&&!1===i.qProperty.dataPoint.show&&delete i.qProperty.dataPoint.show,i},exportProperties:({propertyTree:e,hypercubePath:t,viewDataMode:n})=>_.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:n})}}e("default",(e=>{const{flags:t}=e;!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(U).forEach((t=>{e.add(U[t])}))}}(e.translator);const n=Zd();return{qae:nf(e),ext:tf(e),component(){const e=rp({picasso:n}),r=function({flags:e,picasso:t,instance:n}){const r=q(),i=P(),o=R(),a=C(),[s,l]=k(),u=N(),h=L(),f=I(),m=S(),g=A(),{qLocaleInfo:y}=O(),v=z();return M((()=>{if(!n)return;a.style.overflow="hidden";const s=c({picasso:n.picasso,model:r,app:i,translator:o,config:{auto:!1,key:"fill"}}),b=d({picassoInstance:n.picasso,plugins:h,pluginArgs:Rp(u)}),x=Tp({flags:e,layout:u,app:i,model:r,picasso:t,chart:n.chart,translator:o,localeInfo:y,embed:v,options:m}),w=p({theme:g,config:{id:"pieChart",resolve:[["object","label.name","color","#595959"],["object","label.name","fontFamily"],["object","label.name","fontSize","12px"]]}}),S=Dp({app:i,chart:n.chart,translator:o,layout:u,constraints:f,options:m,themeService:w,colorService:s,custom:x}),C=function({layout:e,themeService:t,flags:n}){const r=t.getStyles(),i=t=>{var r;return n.isEnabled("CLIENT_IM_3050")?null===(r=e.components)||void 0===r?void 0:r.find((e=>e.key===t)):void 0};return{axis:{title:{getStyle:()=>{var e,t,n,o,a,s;return{fontFamily:null!==(e=null===(t=i("axis"))||void 0===t||null===(t=t.axis)||void 0===t||null===(t=t.title)||void 0===t?void 0:t.fontFamily)&&void 0!==e?e:r.axis.title.fontFamily,fontSize:null!==(n=null===(o=i("axis"))||void 0===o||null===(o=o.axis)||void 0===o||null===(o=o.title)||void 0===o?void 0:o.fontSize)&&void 0!==n?n:r.axis.title.fontSize,color:null!==(a=null===(s=i("axis"))||void 0===s||null===(s=s.axis)||void 0===s||null===(s=s.title)||void 0===s||null===(s=s.color)||void 0===s?void 0:s.color)&&void 0!==a?a:r.axis.title.color}}}},label:{name:{getStyle:()=>{var e,t,n,o,a,s;return{fill:null!==(e=null===(t=i("label"))||void 0===t||null===(t=t.label)||void 0===t||null===(t=t.name)||void 0===t||null===(t=t.color)||void 0===t?void 0:t.color)&&void 0!==e?e:r.label.name.color,fontSize:null!==(n=null===(o=i("label"))||void 0===o||null===(o=o.label)||void 0===o||null===(o=o.name)||void 0===o?void 0:o.fontSize)&&void 0!==n?n:r.label.name.fontSize,fontFamily:null!==(a=null===(s=i("label"))||void 0===s||null===(s=s.label)||void 0===s||null===(s=s.name)||void 0===s?void 0:s.fontFamily)&&void 0!==a?a:r.label.name.fontFamily}}},value:{getStyle:()=>{var e,t,n,o,a,s;return{fill:null!==(e=null===(t=i("label"))||void 0===t||null===(t=t.label)||void 0===t||null===(t=t.value)||void 0===t||null===(t=t.color)||void 0===t?void 0:t.color)&&void 0!==e?e:r.label.value.color,fontSize:null!==(n=null===(o=i("label"))||void 0===o||null===(o=o.label)||void 0===o||null===(o=o.value)||void 0===o?void 0:o.fontSize)&&void 0!==n?n:r.label.value.fontSize,fontFamily:null!==(a=null===(s=i("label"))||void 0===s||null===(s=s.label)||void 0===s||null===(s=s.value)||void 0===s?void 0:s.fontFamily)&&void 0!==a?a:r.label.value.fontFamily}}}},legend:{title:{getStyle:()=>{var e,t,n,o,a,s;return{fontFamily:null!==(e=null===(t=i("legend"))||void 0===t||null===(t=t.legend)||void 0===t||null===(t=t.title)||void 0===t?void 0:t.fontFamily)&&void 0!==e?e:r.legend.title.fontFamily,fontSize:null!==(n=null===(o=i("legend"))||void 0===o||null===(o=o.legend)||void 0===o||null===(o=o.title)||void 0===o?void 0:o.fontSize)&&void 0!==n?n:r.legend.title.fontSize,color:null!==(a=null===(s=i("legend"))||void 0===s||null===(s=s.legend)||void 0===s||null===(s=s.title)||void 0===s||null===(s=s.color)||void 0===s?void 0:s.color)&&void 0!==a?a:r.legend.title.color}}},label:{getStyle:()=>{var e,t,n,o,a,s;return{fontFamily:null!==(e=null===(t=i("legend"))||void 0===t||null===(t=t.legend)||void 0===t||null===(t=t.label)||void 0===t?void 0:t.fontFamily)&&void 0!==e?e:r.legend.label.fontFamily,fontSize:null!==(n=null===(o=i("legend"))||void 0===o||null===(o=o.legend)||void 0===o||null===(o=o.label)||void 0===o?void 0:o.fontSize)&&void 0!==n?n:r.legend.label.fontSize,color:null!==(a=null===(s=i("legend"))||void 0===s||null===(s=s.legend)||void 0===s||null===(s=s.label)||void 0===s||null===(s=s.color)||void 0===s?void 0:s.color)&&void 0!==a?a:r.legend.label.color}}}}}}({layout:u,themeService:w,flags:e});l({colorService:s,pluginService:b,themeService:w,tooltipService:S,styleService:C})}),[r,i,n,u,o.language(),f,m.direction,g.name()]),s}({flags:t,picasso:n,instance:e});fh({instance:e,services:r,picasso:n,flags:t}),function({instance:e}){const t=N(),n=S(),r=F();M((()=>{if(!e||!e.generateSettings)return;const{viewCache:r,chart:i,generateSettings:o}=e;i.update({settings:o()}),r.set("chartWidth",i.element.clientWidth),r.set("chartHeight",i.element.clientHeight),n.effect&&n.effect.update(t,i)}),[r.width,r.height])}({instance:e}),gh({instance:e,services:r})}}}))}}}));
|
|
14
|
+
*/fs();var ys=Date.now(),vs="fnValues"+ys,bs="fnStyle"+ ++ys,xs=function(){return{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=la(e,{},n);return r[bs]=t,r},onProcessStyle:function(e,t){if(vs in t||bs in t)return e;var n={};for(var r in e){var i=e[r];"function"==typeof i&&(delete e[r],n[r]=i)}return t[vs]=n,e},onUpdate:function(e,t,n,r){var i=t,o=i[bs];o&&(i.style=o(e)||{});var a=i[vs];if(a)for(var s in a)i.prop(s,a[s](e),r)}}},ws="@global",Ss="@global ",Cs=function(){function e(e,t,n){for(var r in this.type="global",this.at=ws,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new Ba(uo({},n,{parent:this})),t)this.rules.add(r,t[r]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(e){return this.rules.toString(e)},e}(),Es=function(){function e(e,t,n){this.type="global",this.at=ws,this.isProcessed=!1,this.key=e,this.options=n;var r=e.substr(Ss.length);this.rule=n.jss.createRule(r,t,uo({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),ks=/\s*,\s*/g;function Ts(e,t){for(var n=e.split(ks),r="",i=0;i<n.length;i++)r+=t+" "+n[i].trim(),n[i+1]&&(r+=", ");return r}function Rs(){return{onCreateRule:function(e,t,n){if(!e)return null;if(e===ws)return new Cs(e,t,n);if("@"===e[0]&&e.substr(0,Ss.length)===Ss)return new Es(e,t,n);var r=n.parent;return r&&("global"===r.type||r.options.parent&&"global"===r.options.parent.type)&&(n.scoped=!1),n.selector||!1!==n.scoped||(n.selector=e),null},onProcessRule:function(e,t){"style"===e.type&&t&&(function(e,t){var n=e.options,r=e.style,i=r?r[ws]:null;if(i){for(var o in i)t.addRule(o,i[o],uo({},n,{selector:Ts(o,e.selector)}));delete r[ws]}}(e,t),function(e,t){var n=e.options,r=e.style;for(var i in r)if("@"===i[0]&&i.substr(0,ws.length)===ws){var o=Ts(i.substr(ws.length),e.selector);t.addRule(o,r[i],uo({},n,{selector:o})),delete r[i]}}(e,t))}}}var Ds=/\s*,\s*/g,Ms=/&/g,qs=/\$([\w-]+)/g;function Ps(){function e(e,t){return function(n,r){var i=e.getRule(r)||t&&t.getRule(r);return i?i.selector:r}}function t(e,t){for(var n=t.split(Ds),r=e.split(Ds),i="",o=0;o<n.length;o++)for(var a=n[o],s=0;s<r.length;s++){var l=r[s];i&&(i+=", "),i+=-1!==l.indexOf("&")?l.replace(Ms,a):a+" "+l}return i}function n(e,t,n){if(n)return uo({},n,{index:n.index+1});var r=e.options.nestingLevel;r=void 0===r?1:r+1;var i=uo({},e.options,{nestingLevel:r,index:t.indexOf(e)+1});return delete i.name,i}return{onProcessStyle:function(r,i,o){if("style"!==i.type)return r;var a,s,l=i,u=l.options.parent;for(var c in r){var d=-1!==c.indexOf("&"),p="@"===c[0];if(d||p){if(a=n(l,u,a),d){var h=t(c,l.selector);s||(s=e(u,o)),h=h.replace(qs,s);var f=l.key+"-"+c;"replaceRule"in u?u.replaceRule(f,r[c],uo({},a,{selector:h})):u.addRule(f,r[c],uo({},a,{selector:h}))}else p&&u.addRule(c,{},a).addRule(l.key,r[c],{selector:l.selector});delete r[c]}}return r}}}var Ns=/[A-Z]/g,Ls=/^ms-/,Is={};function As(e){return"-"+e.toLowerCase()}function Os(e){if(Is.hasOwnProperty(e))return Is[e];var t=e.replace(Ns,As);return Is[e]=Ls.test(t)?"-"+t:t}function zs(e){var t={};for(var n in e){t[0===n.indexOf("--")?n:Os(n)]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(zs):t.fallbacks=zs(e.fallbacks)),t}var js=ms&&CSS?CSS.px:"px",Fs=ms&&CSS?CSS.ms:"ms",Hs=ms&&CSS?CSS.percent:"%";function $s(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},r={};for(var i in e)r[i]=e[i],r[i.replace(t,n)]=e[i];return r}var _s=$s({"animation-delay":Fs,"animation-duration":Fs,"background-position":js,"background-position-x":js,"background-position-y":js,"background-size":js,border:js,"border-bottom":js,"border-bottom-left-radius":js,"border-bottom-right-radius":js,"border-bottom-width":js,"border-left":js,"border-left-width":js,"border-radius":js,"border-right":js,"border-right-width":js,"border-top":js,"border-top-left-radius":js,"border-top-right-radius":js,"border-top-width":js,"border-width":js,"border-block":js,"border-block-end":js,"border-block-end-width":js,"border-block-start":js,"border-block-start-width":js,"border-block-width":js,"border-inline":js,"border-inline-end":js,"border-inline-end-width":js,"border-inline-start":js,"border-inline-start-width":js,"border-inline-width":js,"border-start-start-radius":js,"border-start-end-radius":js,"border-end-start-radius":js,"border-end-end-radius":js,margin:js,"margin-bottom":js,"margin-left":js,"margin-right":js,"margin-top":js,"margin-block":js,"margin-block-end":js,"margin-block-start":js,"margin-inline":js,"margin-inline-end":js,"margin-inline-start":js,padding:js,"padding-bottom":js,"padding-left":js,"padding-right":js,"padding-top":js,"padding-block":js,"padding-block-end":js,"padding-block-start":js,"padding-inline":js,"padding-inline-end":js,"padding-inline-start":js,"mask-position-x":js,"mask-position-y":js,"mask-size":js,height:js,width:js,"min-height":js,"max-height":js,"min-width":js,"max-width":js,bottom:js,left:js,top:js,right:js,inset:js,"inset-block":js,"inset-block-end":js,"inset-block-start":js,"inset-inline":js,"inset-inline-end":js,"inset-inline-start":js,"box-shadow":js,"text-shadow":js,"column-gap":js,"column-rule":js,"column-rule-width":js,"column-width":js,"font-size":js,"font-size-delta":js,"letter-spacing":js,"text-decoration-thickness":js,"text-indent":js,"text-stroke":js,"text-stroke-width":js,"word-spacing":js,motion:js,"motion-offset":js,outline:js,"outline-offset":js,"outline-width":js,perspective:js,"perspective-origin-x":Hs,"perspective-origin-y":Hs,"transform-origin":Hs,"transform-origin-x":Hs,"transform-origin-y":Hs,"transform-origin-z":Hs,"transition-delay":Fs,"transition-duration":Fs,"vertical-align":js,"flex-basis":js,"shape-margin":js,size:js,gap:js,grid:js,"grid-gap":js,"row-gap":js,"grid-row-gap":js,"grid-column-gap":js,"grid-template-rows":js,"grid-template-columns":js,"grid-auto-rows":js,"grid-auto-columns":js,"box-shadow-x":js,"box-shadow-y":js,"box-shadow-blur":js,"box-shadow-spread":js,"font-line-height":js,"text-shadow-x":js,"text-shadow-y":js,"text-shadow-blur":js});function Us(e,t,n){if(null==t)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=Us(e,t[r],n);else if("object"==typeof t)if("fallbacks"===e)for(var i in t)t[i]=Us(i,t[i],n);else for(var o in t)t[o]=Us(e+"-"+o,t[o],n);else if("number"==typeof t&&!1===isNaN(t)){var a=n[e]||_s[e];return!a||0===t&&a===js?t.toString():"function"==typeof a?a(t).toString():""+t+a}return t}function Vs(e){void 0===e&&(e={});var t=$s(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=Us(r,e[r],t);return e},onChangeValue:function(e,n){return Us(n,e,t)}}}var Ws="",Bs="",Ys="",Ks="",Gs=ea&&"ontouchstart"in document.documentElement;if(ea){var Js={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},Zs=document.createElement("p").style;for(var Xs in Js)if(Xs+"Transform"in Zs){Ws=Xs,Bs=Js[Xs];break}"Webkit"===Ws&&"msHyphens"in Zs&&(Ws="ms",Bs=Js.ms,Ks="edge"),"Webkit"===Ws&&"-apple-trailing-word"in Zs&&(Ys="apple")}var Qs={js:Ws,css:Bs,vendor:Ys,browser:Ks,isTouch:Gs};var el={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===Qs.js?"-webkit-"+e:Qs.css+e)}},tl={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===Qs.js?Qs.css+"print-"+e:e)}},nl=/[-\s]+(.)?/g;function rl(e,t){return t?t.toUpperCase():""}function il(e){return e.replace(nl,rl)}function ol(e){return il("-"+e)}var al,sl={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===Qs.js){var n="mask-image";if(il(n)in t)return e;if(Qs.js+ol(n)in t)return Qs.css+e}return e}},ll={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==Qs.vendor||Qs.isTouch?e:Qs.css+e)}},ul={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:Qs.css+e)}},cl={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:Qs.css+e)}},dl={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===Qs.js||"ms"===Qs.js&&"edge"!==Qs.browser?Qs.css+e:e)}},pl={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===Qs.js||"ms"===Qs.js||"apple"===Qs.vendor?Qs.css+e:e)}},hl={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===Qs.js?"WebkitColumn"+ol(e)in t&&Qs.css+"column-"+e:"Moz"===Qs.js&&("page"+ol(e)in t&&"page-"+e))}},fl={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===Qs.js)return e;var n=e.replace("-inline","");return Qs.js+ol(n)in t&&Qs.css+n}},ml={supportedProperty:function(e,t){return il(e)in t&&e}},gl={supportedProperty:function(e,t){var n=ol(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:Qs.js+n in t?Qs.css+e:"Webkit"!==Qs.js&&"Webkit"+n in t&&"-webkit-"+e}},yl={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===Qs.js?""+Qs.css+e:e)}},vl={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===Qs.js?Qs.css+"scroll-chaining":e)}},bl={"flex-grow":"flex-positive","flex-shrink":"flex-negative","flex-basis":"flex-preferred-size","justify-content":"flex-pack",order:"flex-order","align-items":"flex-align","align-content":"flex-line-pack"},xl={supportedProperty:function(e,t){var n=bl[e];return!!n&&(Qs.js+ol(n)in t&&Qs.css+n)}},wl={flex:"box-flex","flex-grow":"box-flex","flex-direction":["box-orient","box-direction"],order:"box-ordinal-group","align-items":"box-align","flex-flow":["box-orient","box-direction"],"justify-content":"box-pack"},Sl=Object.keys(wl),Cl=function(e){return Qs.css+e},El={supportedProperty:function(e,t,n){var r=n.multiple;if(Sl.indexOf(e)>-1){var i=wl[e];if(!Array.isArray(i))return Qs.js+ol(i)in t&&Qs.css+i;if(!r)return!1;for(var o=0;o<i.length;o++)if(!(Qs.js+ol(i[0])in t))return!1;return i.map(Cl)}return!1}},kl=[el,tl,sl,ll,ul,cl,dl,pl,hl,fl,ml,gl,yl,vl,xl,El],Tl=kl.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),Rl=kl.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,Ho(t.noPrefill)),e}),[]),Dl={};if(ea){al=document.createElement("p");var Ml=window.getComputedStyle(document.documentElement,"");for(var ql in Ml)isNaN(ql)||(Dl[Ml[ql]]=Ml[ql]);Rl.forEach((function(e){return delete Dl[e]}))}function Pl(e,t){if(void 0===t&&(t={}),!al)return e;if(null!=Dl[e])return Dl[e];"transition"!==e&&"transform"!==e||(t[e]=e in al.style);for(var n=0;n<Tl.length&&(Dl[e]=Tl[n](e,al.style,t),!Dl[e]);n++);try{al.style[e]=""}catch(e){return!1}return Dl[e]}var Nl,Ll={},Il={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},Al=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function Ol(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var r=t?Pl(t):", "+Pl(n);return r||(t||n)}function zl(e,t){var n=t;if(!Nl||"content"===e)return t;if("string"!=typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=Ll[r])return Ll[r];try{Nl.style[e]=n}catch(e){return Ll[r]=!1,!1}if(Il[e])n=n.replace(Al,Ol);else if(""===Nl.style[e]&&("-ms-flex"===(n=Qs.css+n)&&(Nl.style[e]="-ms-flexbox"),Nl.style[e]=n,""===Nl.style[e]))return Ll[r]=!1,!1;return Nl.style[e]="",Ll[r]=n,Ll[r]}function jl(){function e(t){for(var n in t){var r=t[n];if("fallbacks"===n&&Array.isArray(r))t[n]=r.map(e);else{var i=!1,o=Pl(n);o&&o!==n&&(i=!0);var a=!1,s=zl(o,ca(r));s&&s!==r&&(a=!0),(i||a)&&(i&&delete t[n],t[o||n]=s||r)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at=function(e){return"-"===e[1]||"ms"===Qs.js?e:"@"+Qs.css+"keyframes"+e.substr(10)}(t.at)}},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return zl(t,ca(e))||e}}}function Fl(){return{plugins:[xs(),Rs(),Ps(),{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=zs(e[t]);return e}return zs(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var r=Os(t);return t===r?e:(n.prop(r,e),null)}},Vs(),"undefined"==typeof window?null:jl(),(e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length},{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},i=Object.keys(t).sort(e),o=0;o<i.length;o++)r[i[o]]=t[i[o]];return r}})]};var e}function Hl(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.baseClasses,n=e.newClasses;if(e.Component,!n)return t;var r=uo({},t);return Object.keys(n).forEach((function(e){n[e]&&(r[e]="".concat(t[e]," ").concat(n[e]))})),r}ea&&(Nl=document.createElement("p"));var $l={set:function(e,t,n,r){var i=e.get(t);i||(i=new Map,e.set(t,i)),i.set(n,r)},get:function(e,t,n){var r=e.get(t);return r?r.get(n):void 0},delete:function(e,t,n){e.get(t).delete(n)}},_l=$l,Ul=m.createContext(null);function Vl(){return m.useContext(Ul)}var Wl,Bl=fs(Fl()),Yl={disableGeneration:!1,generateClassName:Zo(),jss:Bl,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},Kl=m.createContext(Yl);function Gl(e){var t=e.children,n=e.injectFirst,r=void 0!==n&&n,i=e.disableGeneration,o=void 0!==i&&i,a=Co(e,["children","injectFirst","disableGeneration"]),s=uo({},m.useContext(Kl),{disableGeneration:o},a);if(!s.jss.options.insertionPoint&&r&&"undefined"!=typeof window){if(!Wl){var l=document.head;Wl=document.createComment("mui-inject-first"),l.insertBefore(Wl,l.firstChild)}s.jss=fs({plugins:Fl().plugins,insertionPoint:Wl})}return m.createElement(Kl.Provider,{value:s},t)}var Jl=-1e9;var Zl={};function Xl(e,t){var n=e.state,r=e.theme,i=e.stylesOptions,o=e.stylesCreator,a=e.name;if(!i.disableGeneration){var s=_l.get(i.sheetsManager,o,r);s||(s={refs:0,staticSheet:null,dynamicStyles:null},_l.set(i.sheetsManager,o,r,s));var l=uo({},o.options,i,{theme:r,flip:"boolean"==typeof i.flip?i.flip:"rtl"===r.direction});l.generateId=l.serverGenerateClassName||l.generateClassName;var u=i.sheetsRegistry;if(0===s.refs){var c;i.sheetsCache&&(c=_l.get(i.sheetsCache,o,r));var d=o.create(r,a);c||((c=i.jss.createStyleSheet(d,uo({link:!1},l))).attach(),i.sheetsCache&&_l.set(i.sheetsCache,o,r,c)),u&&u.add(c),s.staticSheet=c,s.dynamicStyles=gs(d)}if(s.dynamicStyles){var p=i.jss.createStyleSheet(s.dynamicStyles,uo({link:!0},l));p.update(t),p.attach(),n.dynamicSheet=p,n.classes=Hl({baseClasses:s.staticSheet.classes,newClasses:p.classes}),u&&u.add(p)}else n.classes=s.staticSheet.classes;s.refs+=1}}function Ql(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,r=t.classNamePrefix,i=t.Component,o=t.defaultTheme,a=void 0===o?Zl:o,s=Co(t,["name","classNamePrefix","Component","defaultTheme"]),l=function(e){var t="function"==typeof e;return{create:function(n,r){var i;try{i=t?e(n):e}catch(e){throw e}if(!r||!n.overrides||!n.overrides[r])return i;var o=n.overrides[r],a=uo({},i);return Object.keys(o).forEach((function(e){a[e]=ho(a[e],o[e])})),a},options:{}}}(e),u=n||r||"makeStyles";l.options={index:Jl+=1,name:n,meta:u,classNamePrefix:u};return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Vl()||a,r=uo({},m.useContext(Kl),s),o=m.useRef(),u=m.useRef();!function(e,t){var n,r=m.useRef([]),i=m.useMemo((function(){return{}}),t);r.current!==i&&(r.current=i,n=e()),m.useEffect((function(){return function(){n&&n()}}),[i])}((function(){var i={name:n,state:{},stylesCreator:l,stylesOptions:r,theme:t};return Xl(i,e),u.current=!1,o.current=i,function(){!function(e){var t=e.state,n=e.theme,r=e.stylesOptions,i=e.stylesCreator;if(!r.disableGeneration){var o=_l.get(r.sheetsManager,i,n);o.refs-=1;var a=r.sheetsRegistry;0===o.refs&&(_l.delete(r.sheetsManager,i,n),r.jss.removeStyleSheet(o.staticSheet),a&&a.remove(o.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}(i)}}),[t,l]),m.useEffect((function(){u.current&&function(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}(o.current,e),u.current=!0}));var c=function(e,t,n){var r=e.state;if(e.stylesOptions.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var i=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,i=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,i=!0),i&&(r.cacheClasses.value=Hl({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}(o.current,e.classes,i);return c}}function eu(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=eu(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function tu(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=eu(e))&&(r&&(r+=" "),r+=t);return r}var nu={exports:{}},ru={},iu="function"==typeof Symbol&&Symbol.for,ou=iu?Symbol.for("react.element"):60103,au=iu?Symbol.for("react.portal"):60106,su=iu?Symbol.for("react.fragment"):60107,lu=iu?Symbol.for("react.strict_mode"):60108,uu=iu?Symbol.for("react.profiler"):60114,cu=iu?Symbol.for("react.provider"):60109,du=iu?Symbol.for("react.context"):60110,pu=iu?Symbol.for("react.async_mode"):60111,hu=iu?Symbol.for("react.concurrent_mode"):60111,fu=iu?Symbol.for("react.forward_ref"):60112,mu=iu?Symbol.for("react.suspense"):60113,gu=iu?Symbol.for("react.suspense_list"):60120,yu=iu?Symbol.for("react.memo"):60115,vu=iu?Symbol.for("react.lazy"):60116,bu=iu?Symbol.for("react.block"):60121,xu=iu?Symbol.for("react.fundamental"):60117,wu=iu?Symbol.for("react.responder"):60118,Su=iu?Symbol.for("react.scope"):60119;function Cu(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case ou:switch(e=e.type){case pu:case hu:case su:case uu:case lu:case mu:return e;default:switch(e=e&&e.$$typeof){case du:case fu:case vu:case yu:case cu:return e;default:return t}}case au:return t}}}function Eu(e){return Cu(e)===hu}ru.AsyncMode=pu,ru.ConcurrentMode=hu,ru.ContextConsumer=du,ru.ContextProvider=cu,ru.Element=ou,ru.ForwardRef=fu,ru.Fragment=su,ru.Lazy=vu,ru.Memo=yu,ru.Portal=au,ru.Profiler=uu,ru.StrictMode=lu,ru.Suspense=mu,ru.isAsyncMode=function(e){return Eu(e)||Cu(e)===pu},ru.isConcurrentMode=Eu,ru.isContextConsumer=function(e){return Cu(e)===du},ru.isContextProvider=function(e){return Cu(e)===cu},ru.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===ou},ru.isForwardRef=function(e){return Cu(e)===fu},ru.isFragment=function(e){return Cu(e)===su},ru.isLazy=function(e){return Cu(e)===vu},ru.isMemo=function(e){return Cu(e)===yu},ru.isPortal=function(e){return Cu(e)===au},ru.isProfiler=function(e){return Cu(e)===uu},ru.isStrictMode=function(e){return Cu(e)===lu},ru.isSuspense=function(e){return Cu(e)===mu},ru.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===su||e===hu||e===uu||e===lu||e===mu||e===gu||"object"==typeof e&&null!==e&&(e.$$typeof===vu||e.$$typeof===yu||e.$$typeof===cu||e.$$typeof===du||e.$$typeof===fu||e.$$typeof===xu||e.$$typeof===wu||e.$$typeof===Su||e.$$typeof===bu)},ru.typeOf=Cu,nu.exports=ru;var ku=nu.exports,Tu={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Ru={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Du={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Mu={};function qu(e){return ku.isMemo(e)?Du:Mu[e.$$typeof]||Tu}Mu[ku.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Mu[ku.Memo]=Du;var Pu=Object.defineProperty,Nu=Object.getOwnPropertyNames,Lu=Object.getOwnPropertySymbols,Iu=Object.getOwnPropertyDescriptor,Au=Object.getPrototypeOf,Ou=Object.prototype;var zu=function e(t,n,r){if("string"!=typeof n){if(Ou){var i=Au(n);i&&i!==Ou&&e(t,i,r)}var o=Nu(n);Lu&&(o=o.concat(Lu(n)));for(var a=qu(t),s=qu(n),l=0;l<o.length;++l){var u=o[l];if(!(Ru[u]||r&&r[u]||s&&s[u]||a&&a[u])){var c=Iu(n,u);try{Pu(t,u,c)}catch(e){}}}}return t},ju=K(zu);function Fu(e){return function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.name,o=Co(r,["name"]),a=i,s="function"==typeof t?function(e){return{root:function(n){return t(uo({theme:e},n))}}}:{root:t},l=Ql(s,uo({Component:e,name:i||e.displayName,classNamePrefix:a},o));t.filterProps&&(n=t.filterProps,delete t.filterProps),t.propTypes&&(t.propTypes,delete t.propTypes);var u=m.forwardRef((function(t,r){var i,o,a,s=t.children,u=t.className,c=t.clone,d=t.component,p=Co(t,["children","className","clone","component"]),h=tu(l(t).root,u),f=p;if(n&&(i=f,o=n,a={},Object.keys(i).forEach((function(e){-1===o.indexOf(e)&&(a[e]=i[e])})),f=a),c)return m.cloneElement(s,uo({className:tu(s.props.className,h)},f));if("function"==typeof s)return s(uo({className:h},f));var g=d||e;return m.createElement(g,uo({ref:r,className:h},f),s)}));return ju(u,e),u}}function Hu(e){var t=e.children,n=e.theme,r=Vl(),i=m.useMemo((function(){var e=null===r?n:function(e,t){return"function"==typeof t?t(e):uo({},e,t)}(r,n);return null!=e&&(e[Go]=null!==r),e}),[n,r]);return m.createElement(Ul.Provider,{value:i},t)}var $u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=t.defaultTheme,i=t.withTheme,o=void 0!==i&&i,a=t.name,s=Co(t,["defaultTheme","withTheme","name"]),l=a,u=Ql(e,uo({defaultTheme:r,Component:n,name:a||n.displayName,classNamePrefix:l},s)),c=m.forwardRef((function(e,t){e.classes;var i,s=e.innerRef,l=Co(e,["classes","innerRef"]),c=u(uo({},n.defaultProps,e)),d=l;return("string"==typeof a||o)&&(i=Vl()||r,a&&(d=Xo({theme:i,name:a,props:l})),o&&!d.theme&&(d.theme=i)),m.createElement(n,uo({ref:s||t,classes:c},d))}));return ju(c,n),c}},_u=Ko(),Uu=function(e){var t=Fu(e);return function(e,n){return t(e,uo({defaultTheme:_u},n))}};function Vu(e,t){return $u(e,uo({defaultTheme:_u},t))}function Wu(e){if("string"!=typeof e)throw new Error(go(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Bu(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce((function(e,t){return null==t?e:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];e.apply(this,r),t.apply(this,r)}}),(function(){}))}function Yu(e){return e&&e.ownerDocument||document}function Ku(e){return Yu(e).defaultView||window}function Gu(e,t){"function"==typeof e?e(t):e&&(e.current=t)}var Ju="undefined"!=typeof window?g.useLayoutEffect:g.useEffect;function Zu(e){var t=g.useRef(e);return Ju((function(){t.current=e})),g.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}function Xu(e,t){return g.useMemo((function(){return null==e&&null==t?null:function(n){Gu(e,n),Gu(t,n)}}),[e,t])}var Qu=!0,ec=!1,tc=null,nc={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 rc(e){e.metaKey||e.altKey||e.ctrlKey||(Qu=!0)}function ic(){Qu=!1}function oc(){"hidden"===this.visibilityState&&ec&&(Qu=!0)}function ac(e){var t,n,r,i=e.target;try{return i.matches(":focus-visible")}catch(e){}return Qu||(n=(t=i).type,!("INPUT"!==(r=t.tagName)||!nc[n]||t.readOnly)||"TEXTAREA"===r&&!t.readOnly||!!t.isContentEditable)}function sc(){ec=!0,window.clearTimeout(tc),tc=window.setTimeout((function(){ec=!1}),100)}function lc(){return{isFocusVisible:ac,onBlurVisible:sc,ref:g.useCallback((function(e){var t,n=x.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",rc,!0),t.addEventListener("mousedown",ic,!0),t.addEventListener("pointerdown",ic,!0),t.addEventListener("touchstart",ic,!0),t.addEventListener("visibilitychange",oc,!0))}),[])}}var uc=!1,cc=m.createContext(null),dc="unmounted",pc="exited",hc="entering",fc="entered",mc="exiting",gc=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=pc,r.appearStatus=hc):i=fc:i=t.unmountOnExit||t.mountOnEnter?dc:pc,r.state={status:i},r.nextCallback=null,r}ia(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===dc?{status:pc}: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!==hc&&n!==fc&&(t=hc):n!==hc&&n!==fc||(t=mc)}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===hc){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:w.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===pc&&this.setState({status:dc})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[w.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||uc?this.safeSetState({status:fc},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:hc},(function(){t.props.onEntering(o,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:fc},(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:w.findDOMNode(this);t&&!uc?(this.props.onExit(r),this.safeSetState({status:mc},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:pc},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:pc},(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:w.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===dc)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=So(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return m.createElement(cc.Provider,{value:null},"function"==typeof n?n(e,r):m.cloneElement(m.Children.only(n),r))},t}(m.Component);function yc(){}gc.contextType=cc,gc.propTypes={},gc.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:yc,onEntering:yc,onEntered:yc,onExit:yc,onExiting:yc,onExited:yc},gc.UNMOUNTED=dc,gc.EXITED=pc,gc.ENTERING=hc,gc.ENTERED=fc,gc.EXITING=mc;var vc=gc;function bc(e,t){var n=Object.create(null);return e&&y.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&v(e)?t(e):e}(e)})),n}function xc(e,t,n){return null!=n[t]?n[t]:e.props[t]}function wc(e,t,n){var r=bc(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 u=i[l][r];s[i[l][r]]=n(u)}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(v(a)){var s=o in t,l=o in r,u=t[o],c=v(u)&&!u.props.in;!l||s&&!c?l||!s||c?l&&s&&v(u)&&(i[o]=b(a,{onExited:n.bind(null,a),in:u.props.in,exit:xc(a,"exit",e),enter:xc(a,"enter",e)})):i[o]=b(a,{in:!1}):i[o]=b(a,{onExited:n.bind(null,a),in:!0,exit:xc(a,"exit",e),enter:xc(a,"enter",e)})}})),i}var Sc=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},Cc=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(oa(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}ia(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,bc(n.children,(function(e){return b(e,{onExited:r.bind(null,e),in:!0,appear:xc(e,"appear",n),enter:xc(e,"enter",n),exit:xc(e,"exit",n)})}))):wc(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=bc(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=uo({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=So(e,["component","childFactory"]),i=this.state.contextValue,o=Sc(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?m.createElement(cc.Provider,{value:i},o):m.createElement(cc.Provider,{value:i},m.createElement(t,r,o))},t}(m.Component);Cc.propTypes={},Cc.defaultProps={component:"div",childFactory:function(e){return e}};var Ec=Cc;function kc(e,t){var n=e.timeout,r=e.style,i=void 0===r?{}:r;return{duration:i.transitionDuration||"number"==typeof n?n:n[t.mode]||0,delay:i.transitionDelay}}var Tc=g.forwardRef((function(e,t){var n=e.classes,r=e.className,i=e.component,o=void 0===i?"div":i,a=e.square,s=void 0!==a&&a,l=e.elevation,u=void 0===l?1:l,c=e.variant,d=void 0===c?"elevation":c,p=Co(e,["classes","className","component","square","elevation","variant"]);return g.createElement(o,uo({className:tu(n.root,r,"outlined"===d?n.outlined:n["elevation".concat(u)],!s&&n.rounded),ref:t},p))})),Rc=Vu((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),uo({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius},outlined:{border:"1px solid ".concat(e.palette.divider)}},t)}),{name:"MuiPaper"})(Tc),Dc="undefined"==typeof window?g.useEffect:g.useLayoutEffect;function Mc(e){var t=e.classes,n=e.pulsate,r=void 0!==n&&n,i=e.rippleX,o=e.rippleY,a=e.rippleSize,s=e.in,l=e.onExited,u=void 0===l?function(){}:l,c=e.timeout,d=g.useState(!1),p=d[0],h=d[1],f=tu(t.ripple,t.rippleVisible,r&&t.ripplePulsate),m={width:a,height:a,top:-a/2+o,left:-a/2+i},y=tu(t.child,p&&t.childLeaving,r&&t.childPulsate),v=Zu(u);return Dc((function(){if(!s){h(!0);var e=setTimeout(v,c);return function(){clearTimeout(e)}}}),[v,s,c]),g.createElement("span",{className:f,style:m},g.createElement("span",{className:y}))}var qc=g.forwardRef((function(e,t){var n=e.center,r=void 0!==n&&n,i=e.classes,o=e.className,a=Co(e,["center","classes","className"]),s=g.useState([]),l=s[0],u=s[1],c=g.useRef(0),d=g.useRef(null);g.useEffect((function(){d.current&&(d.current(),d.current=null)}),[l]);var p=g.useRef(!1),h=g.useRef(null),f=g.useRef(null),m=g.useRef(null);g.useEffect((function(){return function(){clearTimeout(h.current)}}),[]);var y=g.useCallback((function(e){var t=e.pulsate,n=e.rippleX,r=e.rippleY,o=e.rippleSize,a=e.cb;u((function(e){return[].concat(Ho(e),[g.createElement(Mc,{key:c.current,classes:i,timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o})])})),c.current+=1,d.current=a}),[i]),v=g.useCallback((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,i=t.pulsate,o=void 0!==i&&i,a=t.center,s=void 0===a?r||t.pulsate:a,l=t.fakeElement,u=void 0!==l&&l;if("mousedown"===e.type&&p.current)p.current=!1;else{"touchstart"===e.type&&(p.current=!0);var c,d,g,v=u?null:m.current,b=v?v.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(b.width/2),d=Math.round(b.height/2);else{var x=e.touches?e.touches[0]:e,w=x.clientX,S=x.clientY;c=Math.round(w-b.left),d=Math.round(S-b.top)}if(s)(g=Math.sqrt((2*Math.pow(b.width,2)+Math.pow(b.height,2))/3))%2==0&&(g+=1);else{var C=2*Math.max(Math.abs((v?v.clientWidth:0)-c),c)+2,E=2*Math.max(Math.abs((v?v.clientHeight:0)-d),d)+2;g=Math.sqrt(Math.pow(C,2)+Math.pow(E,2))}e.touches?null===f.current&&(f.current=function(){y({pulsate:o,rippleX:c,rippleY:d,rippleSize:g,cb:n})},h.current=setTimeout((function(){f.current&&(f.current(),f.current=null)}),80)):y({pulsate:o,rippleX:c,rippleY:d,rippleSize:g,cb:n})}}),[r,y]),b=g.useCallback((function(){v({},{pulsate:!0})}),[v]),x=g.useCallback((function(e,t){if(clearTimeout(h.current),"touchend"===e.type&&f.current)return e.persist(),f.current(),f.current=null,void(h.current=setTimeout((function(){x(e,t)})));f.current=null,u((function(e){return e.length>0?e.slice(1):e})),d.current=t}),[]);return g.useImperativeHandle(t,(function(){return{pulsate:b,start:v,stop:x}}),[b,v,x]),g.createElement("span",uo({className:tu(i.root,o),ref:m},a),g.createElement(Ec,{component:null,exit:!0},l))})),Pc=Vu((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(g.memo(qc)),Nc=g.forwardRef((function(e,t){var n=e.action,r=e.buttonRef,i=e.centerRipple,o=void 0!==i&&i,a=e.children,s=e.classes,l=e.className,u=e.component,c=void 0===u?"button":u,d=e.disabled,p=void 0!==d&&d,h=e.disableRipple,f=void 0!==h&&h,m=e.disableTouchRipple,y=void 0!==m&&m,v=e.focusRipple,b=void 0!==v&&v,w=e.focusVisibleClassName,S=e.onBlur,C=e.onClick,E=e.onFocus,k=e.onFocusVisible,T=e.onKeyDown,R=e.onKeyUp,D=e.onMouseDown,M=e.onMouseLeave,q=e.onMouseUp,P=e.onTouchEnd,N=e.onTouchMove,L=e.onTouchStart,I=e.onDragLeave,A=e.tabIndex,O=void 0===A?0:A,z=e.TouchRippleProps,j=e.type,F=void 0===j?"button":j,H=Co(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),$=g.useRef(null);var _=g.useRef(null),U=g.useState(!1),V=U[0],W=U[1];p&&V&&W(!1);var B=lc(),Y=B.isFocusVisible,K=B.onBlurVisible,G=B.ref;function J(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:y;return Zu((function(r){return t&&t(r),!n&&_.current&&_.current[e](r),!0}))}g.useImperativeHandle(n,(function(){return{focusVisible:function(){W(!0),$.current.focus()}}}),[]),g.useEffect((function(){V&&b&&!f&&_.current.pulsate()}),[f,b,V]);var Z=J("start",D),X=J("stop",I),Q=J("stop",q),ee=J("stop",(function(e){V&&e.preventDefault(),M&&M(e)})),te=J("start",L),ne=J("stop",P),re=J("stop",N),ie=J("stop",(function(e){V&&(K(e),W(!1)),S&&S(e)}),!1),oe=Zu((function(e){$.current||($.current=e.currentTarget),Y(e)&&(W(!0),k&&k(e)),E&&E(e)})),ae=function(){var e=x.findDOMNode($.current);return c&&"button"!==c&&!("A"===e.tagName&&e.href)},se=g.useRef(!1),le=Zu((function(e){b&&!se.current&&V&&_.current&&" "===e.key&&(se.current=!0,e.persist(),_.current.stop(e,(function(){_.current.start(e)}))),e.target===e.currentTarget&&ae()&&" "===e.key&&e.preventDefault(),T&&T(e),e.target===e.currentTarget&&ae()&&"Enter"===e.key&&!p&&(e.preventDefault(),C&&C(e))})),ue=Zu((function(e){b&&" "===e.key&&_.current&&V&&!e.defaultPrevented&&(se.current=!1,e.persist(),_.current.stop(e,(function(){_.current.pulsate(e)}))),R&&R(e),C&&e.target===e.currentTarget&&ae()&&" "===e.key&&!e.defaultPrevented&&C(e)})),ce=c;"button"===ce&&H.href&&(ce="a");var de={};"button"===ce?(de.type=F,de.disabled=p):("a"===ce&&H.href||(de.role="button"),de["aria-disabled"]=p);var pe=Xu(r,t),he=Xu(G,$),fe=Xu(pe,he),me=g.useState(!1),ge=me[0],ye=me[1];g.useEffect((function(){ye(!0)}),[]);var ve=ge&&!f&&!p;return g.createElement(ce,uo({className:tu(s.root,l,V&&[s.focusVisible,w],p&&s.disabled),onBlur:ie,onClick:C,onFocus:oe,onKeyDown:le,onKeyUp:ue,onMouseDown:Z,onMouseLeave:ee,onMouseUp:Q,onDragLeave:X,onTouchEnd:ne,onTouchMove:re,onTouchStart:te,ref:fe,tabIndex:p?-1:O},de,H),a,ve?g.createElement(Pc,uo({ref:_,center:o},z)):null)})),Lc=Vu({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(Nc),Ic={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},Ac=g.forwardRef((function(e,t){var n=e.align,r=void 0===n?"inherit":n,i=e.classes,o=e.className,a=e.color,s=void 0===a?"initial":a,l=e.component,u=e.display,c=void 0===u?"initial":u,d=e.gutterBottom,p=void 0!==d&&d,h=e.noWrap,f=void 0!==h&&h,m=e.paragraph,y=void 0!==m&&m,v=e.variant,b=void 0===v?"body1":v,x=e.variantMapping,w=void 0===x?Ic:x,S=Co(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),C=l||(y?"p":w[b]||Ic[b])||"span";return g.createElement(C,uo({className:tu(i.root,o,"inherit"!==b&&i[b],"initial"!==s&&i["color".concat(Wu(s))],f&&i.noWrap,p&&i.gutterBottom,y&&i.paragraph,"inherit"!==r&&i["align".concat(Wu(r))],"initial"!==c&&i["display".concat(Wu(c))]),ref:t},S))})),Oc=Vu((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(Ac),zc=g.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.color,a=void 0===o?"default":o,s=e.component,l=void 0===s?"button":s,u=e.disabled,c=void 0!==u&&u,d=e.disableElevation,p=void 0!==d&&d,h=e.disableFocusRipple,f=void 0!==h&&h,m=e.endIcon,y=e.focusVisibleClassName,v=e.fullWidth,b=void 0!==v&&v,x=e.size,w=void 0===x?"medium":x,S=e.startIcon,C=e.type,E=void 0===C?"button":C,k=e.variant,T=void 0===k?"text":k,R=Co(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),D=S&&g.createElement("span",{className:tu(r.startIcon,r["iconSize".concat(Wu(w))])},S),M=m&&g.createElement("span",{className:tu(r.endIcon,r["iconSize".concat(Wu(w))])},m);return g.createElement(Lc,uo({className:tu(r.root,r[T],i,"inherit"===a?r.colorInherit:"default"!==a&&r["".concat(T).concat(Wu(a))],"medium"!==w&&[r["".concat(T,"Size").concat(Wu(w))],r["size".concat(Wu(w))]],p&&r.disableElevation,c&&r.disabled,b&&r.fullWidth),component:l,disabled:c,focusRipple:!f,focusVisibleClassName:tu(r.focusVisible,y),ref:t,type:E},R),g.createElement("span",{className:r.label},D,n,M))})),jc=Vu((function(e){return{root:uo({},e.typography.button,{boxSizing:"border-box",minWidth:64,padding:"6px 16px",borderRadius:e.shape.borderRadius,color:e.palette.text.primary,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none",backgroundColor:wo(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"},"&$disabled":{backgroundColor:"transparent"}},"&$disabled":{color:e.palette.action.disabled}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},text:{padding:"6px 8px"},textPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:wo(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:wo(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlined:{padding:"5px 15px",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"&$disabled":{border:"1px solid ".concat(e.palette.action.disabledBackground)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(wo(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:wo(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(wo(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:wo(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{border:"1px solid ".concat(e.palette.action.disabled)}},contained:{color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],boxShadow:e.shadows[2],"&:hover":{backgroundColor:e.palette.grey.A100,boxShadow:e.shadows[4],"@media (hover: none)":{boxShadow:e.shadows[2],backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},"&$focusVisible":{boxShadow:e.shadows[6]},"&:active":{boxShadow:e.shadows[8]},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}},containedPrimary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},containedSecondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},disableElevation:{boxShadow:"none","&:hover":{boxShadow:"none"},"&$focusVisible":{boxShadow:"none"},"&:active":{boxShadow:"none"},"&$disabled":{boxShadow:"none"}},focusVisible:{},disabled:{},colorInherit:{color:"inherit",borderColor:"currentColor"},textSizeSmall:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},textSizeLarge:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},outlinedSizeSmall:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},outlinedSizeLarge:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},containedSizeSmall:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},containedSizeLarge:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},sizeSmall:{},sizeLarge:{},fullWidth:{width:"100%"},startIcon:{display:"inherit",marginRight:8,marginLeft:-4,"&$iconSizeSmall":{marginLeft:-2}},endIcon:{display:"inherit",marginRight:-4,marginLeft:8,"&$iconSizeSmall":{marginRight:-2}},iconSizeSmall:{"& > *:first-child":{fontSize:18}},iconSizeMedium:{"& > *:first-child":{fontSize:20}},iconSizeLarge:{"& > *:first-child":{fontSize:22}}}}),{name:"MuiButton"})(zc);var Fc="undefined"!=typeof window?g.useLayoutEffect:g.useEffect,Hc=g.forwardRef((function(e,t){var n=e.children,r=e.container,i=e.disablePortal,o=void 0!==i&&i,a=e.onRendered,s=g.useState(null),l=s[0],u=s[1],c=Xu(g.isValidElement(n)?n.ref:null,t);return Fc((function(){o||u(function(e){return e="function"==typeof e?e():e,x.findDOMNode(e)}(r)||document.body)}),[r,o]),Fc((function(){if(l&&!o)return Gu(t,l),function(){Gu(t,null)}}),[t,l,o]),Fc((function(){a&&(l||o)&&a()}),[a,l,o]),o?g.isValidElement(n)?g.cloneElement(n,{ref:c}):n:l?x.createPortal(n,l):l})),$c=Hc;function _c(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Uc(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function Vc(e,t,n){var r=arguments.length>4?arguments[4]:void 0,i=[t,n].concat(Ho(arguments.length>3&&void 0!==arguments[3]?arguments[3]:[])),o=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===i.indexOf(e)&&-1===o.indexOf(e.tagName)&&_c(e,r)}))}function Wc(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function Bc(e,t){var n,r=[],i=[],o=e.container;if(!t.disableScrollLock){if(function(e){var t=Yu(e);return t.body===e?Ku(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(o)){var a=function(){var e=document.createElement("div");e.style.width="99px",e.style.height="99px",e.style.position="absolute",e.style.top="-9999px",e.style.overflow="scroll",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}();r.push({value:o.style.paddingRight,key:"padding-right",el:o}),o.style["padding-right"]="".concat(Uc(o)+a,"px"),n=Yu(o).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){i.push(e.style.paddingRight),e.style.paddingRight="".concat(Uc(e)+a,"px")}))}var s=o.parentElement,l="HTML"===s.nodeName&&"scroll"===window.getComputedStyle(s)["overflow-y"]?s:o;r.push({value:l.style.overflow,key:"overflow",el:l}),l.style.overflow="hidden"}return function(){n&&[].forEach.call(n,(function(e,t){i[t]?e.style.paddingRight=i[t]:e.style.removeProperty("padding-right")})),r.forEach((function(e){var t=e.value,n=e.el,r=e.key;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}var Yc=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.modals=[],this.containers=[]}return na(e,[{key:"add",value:function(e,t){var n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&_c(e.modalRef,!1);var r=function(e){var t=[];return[].forEach.call(e.children,(function(e){e.getAttribute&&"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);Vc(t,e.mountNode,e.modalRef,r,!0);var i=Wc(this.containers,(function(e){return e.container===t}));return-1!==i?(this.containers[i].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=Wc(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=Bc(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=Wc(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];if(r.modals.splice(r.modals.indexOf(e),1),this.modals.splice(t,1),0===r.modals.length)r.restore&&r.restore(),e.modalRef&&_c(e.modalRef,!0),Vc(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var i=r.modals[r.modals.length-1];i.modalRef&&_c(i.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();function Kc(e){var t=e.children,n=e.disableAutoFocus,r=void 0!==n&&n,i=e.disableEnforceFocus,o=void 0!==i&&i,a=e.disableRestoreFocus,s=void 0!==a&&a,l=e.getDoc,u=e.isEnabled,c=e.open,d=g.useRef(),p=g.useRef(null),h=g.useRef(null),f=g.useRef(),m=g.useRef(null),y=g.useCallback((function(e){m.current=x.findDOMNode(e)}),[]),v=Xu(t.ref,y),b=g.useRef();return g.useEffect((function(){b.current=c}),[c]),!b.current&&c&&"undefined"!=typeof window&&(f.current=l().activeElement),g.useEffect((function(){if(c){var e=Yu(m.current);r||!m.current||m.current.contains(e.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex",-1),m.current.focus());var t=function(){null!==m.current&&(e.hasFocus()&&!o&&u()&&!d.current?m.current&&!m.current.contains(e.activeElement)&&m.current.focus():d.current=!1)},n=function(t){!o&&u()&&9===t.keyCode&&e.activeElement===m.current&&(d.current=!0,t.shiftKey?h.current.focus():p.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var i=setInterval((function(){t()}),50);return function(){clearInterval(i),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),s||(f.current&&f.current.focus&&f.current.focus(),f.current=null)}}}),[r,o,s,u,c]),g.createElement(g.Fragment,null,g.createElement("div",{tabIndex:0,ref:p,"data-test":"sentinelStart"}),g.cloneElement(t,{ref:v}),g.createElement("div",{tabIndex:0,ref:h,"data-test":"sentinelEnd"}))}var Gc={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},invisible:{backgroundColor:"transparent"}},Jc=g.forwardRef((function(e,t){var n=e.invisible,r=void 0!==n&&n,i=e.open,o=Co(e,["invisible","open"]);return i?g.createElement("div",uo({"aria-hidden":!0,ref:t},o,{style:uo({},Gc.root,r?Gc.invisible:{},o.style)})):null}));var Zc=new Yc,Xc=g.forwardRef((function(e,t){var n=Vl(),r=Xo({name:"MuiModal",props:uo({},e),theme:n}),i=r.BackdropComponent,o=void 0===i?Jc:i,a=r.BackdropProps,s=r.children,l=r.closeAfterTransition,u=void 0!==l&&l,c=r.container,d=r.disableAutoFocus,p=void 0!==d&&d,h=r.disableBackdropClick,f=void 0!==h&&h,m=r.disableEnforceFocus,y=void 0!==m&&m,v=r.disableEscapeKeyDown,b=void 0!==v&&v,w=r.disablePortal,S=void 0!==w&&w,C=r.disableRestoreFocus,E=void 0!==C&&C,k=r.disableScrollLock,T=void 0!==k&&k,R=r.hideBackdrop,D=void 0!==R&&R,M=r.keepMounted,q=void 0!==M&&M,P=r.manager,N=void 0===P?Zc:P,L=r.onBackdropClick,I=r.onClose,A=r.onEscapeKeyDown,O=r.onRendered,z=r.open,j=Co(r,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),F=g.useState(!0),H=F[0],$=F[1],_=g.useRef({}),U=g.useRef(null),V=g.useRef(null),W=Xu(V,t),B=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(r),Y=function(){return Yu(U.current)},K=function(){return _.current.modalRef=V.current,_.current.mountNode=U.current,_.current},G=function(){N.mount(K(),{disableScrollLock:T}),V.current.scrollTop=0},J=Zu((function(){var e=function(e){return e="function"==typeof e?e():e,x.findDOMNode(e)}(c)||Y().body;N.add(K(),e),V.current&&G()})),Z=g.useCallback((function(){return N.isTopModal(K())}),[N]),X=Zu((function(e){U.current=e,e&&(O&&O(),z&&Z()?G():_c(V.current,!0))})),Q=g.useCallback((function(){N.remove(K())}),[N]);if(g.useEffect((function(){return function(){Q()}}),[Q]),g.useEffect((function(){z?J():B&&u||Q()}),[z,Q,B,u,J]),!q&&!z&&(!B||H))return null;var ee=function(e){return{root:{position:"fixed",zIndex:e.zIndex.modal,right:0,bottom:0,top:0,left:0},hidden:{visibility:"hidden"}}}(n||{zIndex:Yo}),te={};return void 0===s.props.tabIndex&&(te.tabIndex=s.props.tabIndex||"-1"),B&&(te.onEnter=Bu((function(){$(!1)}),s.props.onEnter),te.onExited=Bu((function(){$(!0),u&&Q()}),s.props.onExited)),g.createElement($c,{ref:X,container:c,disablePortal:S},g.createElement("div",uo({ref:W,onKeyDown:function(e){"Escape"===e.key&&Z()&&(A&&A(e),b||(e.stopPropagation(),I&&I(e,"escapeKeyDown")))},role:"presentation"},j,{style:uo({},ee.root,!z&&H?ee.hidden:{},j.style)}),D?null:g.createElement(o,uo({open:z,onClick:function(e){e.target===e.currentTarget&&(L&&L(e),!f&&I&&I(e,"backdropClick"))}},a)),g.createElement(Kc,{disableEnforceFocus:y,disableAutoFocus:p,disableRestoreFocus:E,getDoc:Y,isEnabled:Z,open:z},g.cloneElement(s,te))))})),Qc=Xc;function ed(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var td={entering:{opacity:1,transform:ed(1)},entered:{opacity:1,transform:"none"}},nd=g.forwardRef((function(e,t){var n=e.children,r=e.disableStrictModeCompat,i=void 0!==r&&r,o=e.in,a=e.onEnter,s=e.onEntered,l=e.onEntering,u=e.onExit,c=e.onExited,d=e.onExiting,p=e.style,h=e.timeout,f=void 0===h?"auto":h,m=e.TransitionComponent,y=void 0===m?vc:m,v=Co(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),b=g.useRef(),x=g.useRef(),w=Vl()||_u,S=w.unstable_strictMode&&!i,C=g.useRef(null),E=Xu(n.ref,t),k=Xu(S?C:void 0,E),T=function(e){return function(t,n){if(e){var r=$o(S?[C.current,t]:[t,n],2),i=r[0],o=r[1];void 0===o?e(i):e(i,o)}}},R=T(l),D=T((function(e,t){!function(e){e.scrollTop}(e);var n,r=kc({style:p,timeout:f},{mode:"enter"}),i=r.duration,o=r.delay;"auto"===f?(n=w.transitions.getAutoHeightDuration(e.clientHeight),x.current=n):n=i,e.style.transition=[w.transitions.create("opacity",{duration:n,delay:o}),w.transitions.create("transform",{duration:.666*n,delay:o})].join(","),a&&a(e,t)})),M=T(s),q=T(d),P=T((function(e){var t,n=kc({style:p,timeout:f},{mode:"exit"}),r=n.duration,i=n.delay;"auto"===f?(t=w.transitions.getAutoHeightDuration(e.clientHeight),x.current=t):t=r,e.style.transition=[w.transitions.create("opacity",{duration:t,delay:i}),w.transitions.create("transform",{duration:.666*t,delay:i||.333*t})].join(","),e.style.opacity="0",e.style.transform=ed(.75),u&&u(e)})),N=T(c);return g.useEffect((function(){return function(){clearTimeout(b.current)}}),[]),g.createElement(y,uo({appear:!0,in:o,nodeRef:S?C:void 0,onEnter:D,onEntered:M,onEntering:R,onExit:P,onExited:N,onExiting:q,addEndListener:function(e,t){var n=S?e:t;"auto"===f&&(b.current=setTimeout(n,x.current||0))},timeout:"auto"===f?null:f},v),(function(e,t){return g.cloneElement(n,uo({style:uo({opacity:0,transform:ed(.75),visibility:"exited"!==e||o?void 0:"hidden"},td[e],p,n.props.style),ref:k},t))}))}));nd.muiSupportAuto=!0;var rd=nd,id=g.createContext({}),od=g.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.component,a=void 0===o?"ul":o,s=e.dense,l=void 0!==s&&s,u=e.disablePadding,c=void 0!==u&&u,d=e.subheader,p=Co(e,["children","classes","className","component","dense","disablePadding","subheader"]),h=g.useMemo((function(){return{dense:l}}),[l]);return g.createElement(id.Provider,{value:h},g.createElement(a,uo({className:tu(r.root,i,l&&r.dense,!c&&r.padding,d&&r.subheader),ref:t},p),d,n))})),ad=Vu({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(od),sd="undefined"==typeof window?g.useEffect:g.useLayoutEffect,ld=g.forwardRef((function(e,t){var n=e.alignItems,r=void 0===n?"center":n,i=e.autoFocus,o=void 0!==i&&i,a=e.button,s=void 0!==a&&a,l=e.children,u=e.classes,c=e.className,d=e.component,p=e.ContainerComponent,h=void 0===p?"li":p,f=e.ContainerProps,m=(f=void 0===f?{}:f).className,y=Co(f,["className"]),v=e.dense,b=void 0!==v&&v,w=e.disabled,S=void 0!==w&&w,C=e.disableGutters,E=void 0!==C&&C,k=e.divider,T=void 0!==k&&k,R=e.focusVisibleClassName,D=e.selected,M=void 0!==D&&D,q=Co(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),P=g.useContext(id),N={dense:b||P.dense||!1,alignItems:r},L=g.useRef(null);sd((function(){o&&L.current&&L.current.focus()}),[o]);var I,A,O=g.Children.toArray(l),z=O.length&&(I=O[O.length-1],A=["ListItemSecondaryAction"],g.isValidElement(I)&&-1!==A.indexOf(I.type.muiName)),j=Xu(g.useCallback((function(e){L.current=x.findDOMNode(e)}),[]),t),F=uo({className:tu(u.root,c,N.dense&&u.dense,!E&&u.gutters,T&&u.divider,S&&u.disabled,s&&u.button,"center"!==r&&u.alignItemsFlexStart,z&&u.secondaryAction,M&&u.selected),disabled:S},q),H=d||"li";return s&&(F.component=d||"div",F.focusVisibleClassName=tu(u.focusVisible,R),H=Lc),z?(H=F.component||d?H:"div","li"===h&&("li"===H?H="div":"li"===F.component&&(F.component="div")),g.createElement(id.Provider,{value:N},g.createElement(h,uo({className:tu(u.container,m),ref:j},y),g.createElement(H,F,O),O.pop()))):g.createElement(id.Provider,{value:N},g.createElement(H,uo({ref:j},F),O))})),ud=Vu((function(e){return{root:{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,"&$focusVisible":{backgroundColor:e.palette.action.selected},"&$selected, &$selected:hover":{backgroundColor:e.palette.action.selected},"&$disabled":{opacity:.5}},container:{position:"relative"},focusVisible:{},dense:{paddingTop:4,paddingBottom:4},alignItemsFlexStart:{alignItems:"flex-start"},disabled:{},divider:{borderBottom:"1px solid ".concat(e.palette.divider),backgroundClip:"padding-box"},gutters:{paddingLeft:16,paddingRight:16},button:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:e.palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}},secondaryAction:{paddingRight:48},selected:{}}}),{name:"MuiListItem"})(ld),cd=g.forwardRef((function(e,t){var n=e.classes,r=e.className,i=Co(e,["classes","className"]),o=g.useContext(id);return g.createElement("div",uo({className:tu(n.root,r,"flex-start"===o.alignItems&&n.alignItemsFlexStart),ref:t},i))})),dd=Vu((function(e){return{root:{minWidth:56,color:e.palette.action.active,flexShrink:0,display:"inline-flex"},alignItemsFlexStart:{marginTop:8}}}),{name:"MuiListItemIcon"})(cd),pd=g.forwardRef((function(e,t){var n=e.children,r=e.classes,i=e.className,o=e.disableTypography,a=void 0!==o&&o,s=e.inset,l=void 0!==s&&s,u=e.primary,c=e.primaryTypographyProps,d=e.secondary,p=e.secondaryTypographyProps,h=Co(e,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),f=g.useContext(id).dense,m=null!=u?u:n;null==m||m.type===Oc||a||(m=g.createElement(Oc,uo({variant:f?"body2":"body1",className:r.primary,component:"span",display:"block"},c),m));var y=d;return null==y||y.type===Oc||a||(y=g.createElement(Oc,uo({variant:"body2",className:r.secondary,color:"textSecondary",display:"block"},p),y)),g.createElement("div",uo({className:tu(r.root,i,f&&r.dense,l&&r.inset,m&&y&&r.multiline),ref:t},h),m,y)})),hd=Vu({root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},{name:"MuiListItemText"})(pd);function fd(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function md(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function gd(e){return[e.horizontal,e.vertical].map((function(e){return"number"==typeof e?"".concat(e,"px"):e})).join(" ")}function yd(e){return"function"==typeof e?e():e}var vd=g.forwardRef((function(e,t){var n=e.action,r=e.anchorEl,i=e.anchorOrigin,o=void 0===i?{vertical:"top",horizontal:"left"}:i,a=e.anchorPosition,s=e.anchorReference,l=void 0===s?"anchorEl":s,u=e.children,c=e.classes,d=e.className,p=e.container,h=e.elevation,f=void 0===h?8:h,m=e.getContentAnchorEl,y=e.marginThreshold,v=void 0===y?16:y,b=e.onEnter,w=e.onEntered,S=e.onEntering,C=e.onExit,E=e.onExited,k=e.onExiting,T=e.open,R=e.PaperProps,D=void 0===R?{}:R,M=e.transformOrigin,q=void 0===M?{vertical:"top",horizontal:"left"}:M,P=e.TransitionComponent,N=void 0===P?rd:P,L=e.transitionDuration,I=void 0===L?"auto":L,A=e.TransitionProps,O=void 0===A?{}:A,z=Co(e,["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","classes","className","container","elevation","getContentAnchorEl","marginThreshold","onEnter","onEntered","onEntering","onExit","onExited","onExiting","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"]),j=g.useRef(),F=g.useCallback((function(e){if("anchorPosition"===l)return a;var t=yd(r),n=(t&&1===t.nodeType?t:Yu(j.current).body).getBoundingClientRect(),i=0===e?o.vertical:"center";return{top:n.top+fd(n,i),left:n.left+md(n,o.horizontal)}}),[r,o.horizontal,o.vertical,a,l]),H=g.useCallback((function(e){var t=0;if(m&&"anchorEl"===l){var n=m(e);if(n&&e.contains(n)){var r=function(e,t){for(var n=t,r=0;n&&n!==e;)r+=(n=n.parentElement).scrollTop;return r}(e,n);t=n.offsetTop+n.clientHeight/2-r||0}}return t}),[o.vertical,l,m]),$=g.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:fd(e,q.vertical)+t,horizontal:md(e,q.horizontal)}}),[q.horizontal,q.vertical]),_=g.useCallback((function(e){var t=H(e),n={width:e.offsetWidth,height:e.offsetHeight},i=$(n,t);if("none"===l)return{top:null,left:null,transformOrigin:gd(i)};var o=F(t),a=o.top-i.vertical,s=o.left-i.horizontal,u=a+n.height,c=s+n.width,d=Ku(yd(r)),p=d.innerHeight-v,h=d.innerWidth-v;if(a<v){var f=a-v;a-=f,i.vertical+=f}else if(u>p){var m=u-p;a-=m,i.vertical+=m}if(s<v){var g=s-v;s-=g,i.horizontal+=g}else if(c>h){var y=c-h;s-=y,i.horizontal+=y}return{top:"".concat(Math.round(a),"px"),left:"".concat(Math.round(s),"px"),transformOrigin:gd(i)}}),[r,l,F,H,$,v]),U=g.useCallback((function(){var e=j.current;if(e){var t=_(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[_]),V=g.useCallback((function(e){j.current=x.findDOMNode(e)}),[]);g.useEffect((function(){T&&U()})),g.useImperativeHandle(n,(function(){return T?{updatePosition:function(){U()}}:null}),[T,U]),g.useEffect((function(){if(T){var e=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=this;clearTimeout(t),t=setTimeout((function(){e.apply(a,i)}),n)}return r.clear=function(){clearTimeout(t)},r}((function(){U()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[T,U]);var W=I;"auto"!==I||N.muiSupportAuto||(W=void 0);var B=p||(r?Yu(yd(r)).body:void 0);return g.createElement(Qc,uo({container:B,open:T,ref:t,BackdropProps:{invisible:!0},className:tu(c.root,d)},z),g.createElement(N,uo({appear:!0,in:T,onEnter:b,onEntered:w,onExit:C,onExited:E,onExiting:k,timeout:W},O,{onEntering:Bu((function(e,t){S&&S(e,t),U()}),O.onEntering)}),g.createElement(Rc,uo({elevation:f,ref:V},D,{className:tu(c.paper,D.className)}),u)))})),bd=Vu({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(vd);function xd(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function wd({d:e,size:t,style:n={},viewBox:r="0 0 16 16"}){const i={fontSize:xd(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return m.createElement("i",{style:i},m.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},m.createElement("path",{d:e})))}const Sd={d:"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"},Cd={d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"},Ed={d:"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"},kd={d:"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"},Td={N:void 0,H:{path:{d:"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"},tooltip:"Tooltip.dimensions.drilldown"},C:{path:{d:"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"},tooltip:"Tooltip.dimensions.cyclicGroup"}},Rd={single:"N",drillDown:"H",cyclicGroup:"C"};function Dd(e,t,n){(function({model:e,properties:t}){return e.modifiers?e.modifiers.apply({model:e,properties:t}):Promise.resolve()})({model:e,properties:n}).then((()=>{e.colorSupport&&e.colorSupport.colorByUpdater(n,"qHyperCubeDef.");let r=Oi.generate(t,n);r&&r.length&&(r=r.map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}))),e.applyPatches(r,!0))}))}function Md(e,t,n,r,i,o){e.getEffectiveProperties().then((a=>{const s=a.qHyperCubeDef[r].findIndex((e=>e.qDef.cId===t)),l=a.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r].findIndex((e=>e.qDef.cId===n)),u=ie(!0,{},a),c=u.qHyperCubeDef[r][s],d=u.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l];d.qAttributeDimensions=c.qAttributeDimensions,c.qAttributeDimensions=[],o||(d.qAttributeExpressions=c.qAttributeExpressions,c.qAttributeExpressions=[]),u.qHyperCubeDef[r][s]=d,u.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l]=c,i&&i({oldItem:c,newItem:d,oldProperties:a,newProperties:u,model:e}),Dd(e,a,u)}))}const qd=(e,t)=>{const n=[],r=[];return t.forEach((t=>{t.qCalcCondition.qCond.qv&&r.push(e.evaluate(t.qCalcCondition.qCond.qv).then((e=>{"0"===e&&n.push(t.qDef.cId)})))})),Promise.all(r).then((()=>n))};function Pd({dir:e,dock:t,altList:n,model:r,translator:i,app:o,onChange:a}){return 0===n.length?null:{dir:e,dock:t,getAlternatives(){const e=qd(o,n).then((e=>Promise.all(n.filter((t=>!e.includes(t.qDef.cId))).map((e=>function(e,t,n){if(e.qLibraryId)return t.getDimension(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?e.qDim.qGrouping===Rd.single&&e.qDim.qLabelExpression?e.qDim.qLabelExpression:e.qDim.title:n.get("Object.ErrorMessage.MissingDimension")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const i=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(i)}(e,o,i).then((t=>({id:e.qDef.cId,selected:!1,title:t}))))))));return e},changeTo(e,t){Md(r,e,t,"qDimensions",a)}}}function Nd(e,t,n,r="/qHyperCubeDef"){return{breadcrumbs:e.qGrouping===Rd.drillDown?e.qGroupFallbackTitles.slice(0,e.qGroupPos):[],icon:Td[e.qGrouping],index:t,locked:!!e.qLocked,text:e.qGrouping===Rd.single?e.qFallbackTitle:e.qGroupFallbackTitles[e.qGroupPos],popoverText:(i=e,i.qGrouping===Rd.single?i.qFallbackTitle||"":i.title||""),drillUp(e){n.drillUp(r,t,e)},id:e.cId};var i}function Ld({altList:e,app:t,dir:n,dock:r,model:i,onChange:o,skipAttributeExpressions:a,translator:s}){return 0===e.length?null:{dir:n,dock:r,getAlternatives(){const n=qd(t,e).then((n=>Promise.all(e.filter((e=>!n.includes(e.qDef.cId))).map((e=>function(e,t,n){if(e.qLibraryId)return t.getMeasure(e.qLibraryId).then((e=>e.getLayout())).catch((()=>null)).then((e=>e?e.qMeasure.qLabelExpression?e.qMeasure.qLabelExpression:e.qMeasure.qLabel||e.qMeasure.qDef:n.get("Object.ErrorMessage.MissingMeasure")));const r=e.qDef.qLabelExpression;if(r)return t.evaluate(r);const i=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(i)}(e,t,s).then((t=>({id:e.qDef.cId,selected:!1,title:t}))))))));return n},changeTo(e,t){Md(i,e,t,"qMeasures",o,a)}}}function Id(e,t){return{breadcrumbs:[],index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle,id:e.cId}}const Ad={bottom:{anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},top:{anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}},left:{anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}},right:{anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}}},Od={menuItem:"alternative-menu-item",titleButton:"title-button",activeTitleButton:"active-title-button"},zd=Uu(ud)((()=>({textAlign:"start","&:focus":{boxShadow:"inset 0 0 0 2px #177FE6 !important"}}))),jd=Uu((({children:e,...t})=>m.createElement(jc,Y({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e)))((()=>({"&:focus":{boxShadow:"inset 0 0 0 2px #177FE6 !important"}})));function Fd(e){const t=e=>{if("Tab"===e.key){const t=document.querySelectorAll(`.${Od.menuItem}`);let n;e.shiftKey?null!=t&&t.length&&t[0]===e.target&&(n=t[t.length-1]):null!=t&&t.length&&t[t.length-1]===e.target&&([n]=t),n&&setTimeout((()=>{n.focus()}),50)}};function n({title:e,selected:n,onClick:r}){const i=ve.detectTextDirection(e);return m.createElement(zd,{role:"menuitem",button:!0,onClick:r,className:Od.menuItem,onKeyDown:t},m.createElement(dd,{style:{minWidth:32}},m.createElement(wd,{d:n?Cd.d:""})),m.createElement(hd,{primaryTypographyProps:{dir:i}},e))}function r({alignTo:e,changeTo:t,current:r,dir:i,dock:o,list:a,onClose:s,show:l,instruction:u}){const c=a.map((e=>m.createElement(n,{key:e.id,title:e.title,onClick:()=>t(e.id)})));return m.createElement(bd,Y({anchorEl:e,open:l,onClose:s},Ad[o],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),m.createElement(ad,{dense:!0,dir:i,"aria-label":u,component:"nav"},m.createElement(n,{title:r,selected:!0,onClick:s}),c))}n.propTypes={title:eo.string.isRequired,selected:eo.bool,onClick:eo.func.isRequired},n.defaultProps={selected:!1},r.propTypes={alignTo:eo.any,changeTo:eo.func.isRequired,current:eo.string.isRequired,dir:eo.string.isRequired,dock:eo.string.isRequired,list:eo.array,onClose:eo.func.isRequired,show:eo.bool.isRequired,instruction:eo.string.isRequired},r.defaultProps={list:[],alignTo:null};class i extends m.Component{constructor(e){super(e),this.state={open:!1,inSelection:e.selections&&e.selections.isActive(),hasValidAlternatives:!1},this.openPopover=this.openPopover.bind(this),this.closePopover=this.closePopover.bind(this),this.changeTo=this.changeTo.bind(this),this.alignToRef=m.createRef()}componentDidMount(){const{popover:e,selections:t,supportConditional:n}=this.props;t&&(this.onSelectionsActivated=()=>this.setState({inSelection:!0}),this.onSelectionsDeactivated=()=>this.setState({inSelection:!1}),t.addListener("activated",this.onSelectionsActivated),t.addListener("deactivated",this.onSelectionsDeactivated),t.addListener("canceled",this.onSelectionsDeactivated)),e&&n&&e.getAlternatives().then((e=>{this.setState({hasValidAlternatives:0!==e.length})}))}componentDidUpdate(e,t){const{popover:n,supportConditional:r}=this.props;n&&r&&n.getAlternatives().then((e=>{t.hasValidAlternatives!==(0!==e.length)&&this.setState({hasValidAlternatives:0!==e.length})}))}componentWillUnmount(){const{selections:e}=this.props;e&&(e.removeListener("activated",this.onSelectionsActivated),e.removeListener("deactivated",this.onSelectionsDeactivated),e.removeListener("canceled",this.onSelectionsDeactivated))}changeTo(e){this.props.popover.changeTo(this.props.titleData.id,e),this.closePopover(e)}openPopover(e){if(!(this.state.closeTime&&Date.now()-this.state.closeTime<20)){if(e.target){const t=e.target.closest(`.${Od.titleButton}`);t&&t.classList.add(Od.activeTitleButton)}this.props.popover.getAlternatives().then((e=>{this.setState({open:!0,alternatives:e});document.querySelector(`.${Od.menuItem}`).focus()}))}}closePopover(e){if(this.setState({open:!1,closeTime:Date.now()}),"string"==typeof e)setTimeout((()=>{const t=document.querySelector(`.${Od.titleButton}[data-id="${e}"]`);t&&t.focus()}),1e3);else{const e=document.querySelector(`.${Od.activeTitleButton}`);e&&(e.classList.remove(Od.activeTitleButton),setTimeout((()=>{e.focus()}),50))}}render(){const{titleData:e,popover:t,translator:n,disabled:i,isDimension:o,padding:a,minWidth:s,hasAlternative:l,supportConditional:u}=this.props,c={flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal",lineHeight:"normal",...this.props.style},d=e.breadcrumbs.length,p=i||this.state.inSelection,h=e.breadcrumbs.map(((t,n)=>m.createElement(jd,{style:{display:"flex",alignItems:"center",color:p&&"rgba(89, 89, 89, 0.8)",pointerEvents:p?"none":"auto",paddingTop:0,paddingBottom:0,height:"100%"},key:n,onClick:()=>p?void 0:e.drillUp(d-n),title:t},m.createElement("span",{style:c},t),m.createElement(wd,Y({},kd,{size:"small",style:{margin:"0 8px"}}))))),f=u?this.state.hasValidAlternatives:l,g=t&&!this.state.open?this.openPopover:this.closePopover,y=!t||i||this.state.inSelection,v={display:"flex",alignItems:"center",width:"100%",color:y&&"rgba(89, 89, 89, 0.8)",height:"100%",border:!o&&y&&"none",paddingTop:0,paddingBottom:0};this.state.open&&(v.background="rgba(0,0,0,0.08)");a&&(v.padding=a),s&&(v.minWidth=s);const b=ve.detectTextDirection(e.text),x=m.createElement(jd,{"aria-label":n.get(`Accessibility.${t&&f?"Alternative":"Normal"}.Instructions`,[e.text]),style:v,onClick:y?void 0:g,title:e.text,tabIndex:y?-1:0,onFocus:y?void 0:e=>{e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px"},onBlur:y?void 0:e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"},onMouseDown:e=>{e.preventDefault()},className:`${Od.titleButton} ${e.id}`,"data-id":e.id},e.locked&&m.createElement(wd,Y({},Sd,{size:"small",title:n.get("Tooltip.selections.locked")})),m.createElement("span",{style:c,dir:b},e.text),t&&f&&m.createElement(wd,Y({},Ed,{size:"small",style:{margin:"0 8px"}})));return m.createElement(m.Fragment,null,e.icon&&m.createElement(wd,Y({},e.icon.path,{size:"small",title:n.get(e.icon.tooltip),style:{margin:"0 4px 0 0"}})),h,m.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:f?"auto":"none",height:"100%"}},x),t&&f&&m.createElement(r,{dock:t.dock,dir:t.dir,current:e.popoverText,alignTo:this.alignToRef.current,show:this.state.open,list:this.state.alternatives,onClose:this.closePopover,changeTo:this.changeTo,instruction:n.get("Accessibility.Popover.Instructions")}))}}function o(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function a(e){return!e.isDimension&&he.getValue(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return i.propTypes={disabled:eo.bool.isRequired,padding:eo.string,minWidth:eo.string,titleData:eo.shape({breadcrumbs:eo.arrayOf(eo.string).isRequired,icon:eo.shape({path:eo.string.isRequired,tooltip:eo.string.isRequired}),index:eo.number.isRequired,locked:eo.bool.isRequired,text:eo.string.isRequired,popoverText:eo.string.isRequired,drillUp:eo.func,id:eo.string.isRequired}).isRequired,popover:eo.shape({dir:eo.string.isRequired,dock:eo.string.isRequired,changeTo:eo.func.isRequired,getAlternatives:eo.func.isRequired}),translator:eo.shape({get:eo.func.isRequired}).isRequired,selections:eo.shape({isActive:eo.func,addListener:eo.func,removeListener:eo.func}),style:eo.shape({fontSize:eo.string,color:eo.string,fontFamily:eo.string}).isRequired,isDimension:eo.bool.isRequired,hasAlternative:eo.bool.isRequired,supportConditional:eo.bool.isRequired},i.defaultProps={popover:null,selections:null,padding:"",minWidth:""},{renderer:"react",disableTriggers:!0,preferredSize:function(){const{height:t}=e.measureText({text:"M",fontSize:this.style.fontSize,fontFamily:this.style.fontFamily});return this.settings.settings.isDimension||a(this.settings.settings)?Math.max(28,t):Math.max(20,t)},render(){const{settings:{app:e,disabled:t,explicitItemInfos:n,hyperCube:r,hyperCubeDef:s,isDimension:l,minWidth:u,model:c,onChangeToAlternative:d,padding:p,rtl:h,selections:f,skipAttributeExpressions:g,translator:y,supportConditional:v=!1},layout:{dock:b}}=this.settings,x="top"!==b&&"bottom"!==b||!h?"ltr":"rtl",w=function(e,t){const n={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",height:"100%"};return"left"===e?(n.width=`${t.height}px`,n.height=`${t.width}px`,n.transform=`rotate(-90deg) translate(-${t.height}px, 0)`,n.transformOrigin="top left"):"right"===e&&(n.width=`${t.height}px`,n.height=`${t.width}px`,n.transform=`rotate(90deg) translate(0, -${t.width}px)`,n.transformOrigin="top left"),n}(b,this.rect),S=s&&s.qLayoutExclude&&s.qLayoutExclude.qHyperCubeDef,C=S&&S[l?"qDimensions":"qMeasures"]||[],E=n||r[l?"qDimensionInfo":"qMeasureInfo"],k=l?Pd:Ld,T=l?Nd:Id,R=c&&c.colorSupport&&c.modifiers&&k({altList:C,app:e,dir:h?"rtl":"ltr",dock:o(b),model:c,onChange:d,skipAttributeExpressions:g,translator:y}),D=(M=this.settings.settings).isDimension&&he.getValue(M,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||a(this.settings.settings);var M;const q=E.map(((e,n)=>{const r="number"==typeof e.explicitColumn?e.explicitColumn:n,o=T(e,r,c),a=n===E.length-1;return m.createElement(m.Fragment,{key:e.cId},m.createElement(i,{popover:R,titleData:o,model:c,translator:y,selections:f,disabled:t(),style:this.style,isDimension:l,padding:p,minWidth:u,hasAlternative:D,supportConditional:v}),!a&&m.createElement("span",{style:{lineHeight:"normal",...this.style}},", "))}));return m.createElement("div",{style:w,dir:x},q)}}}const Hd=function(){return Ko.apply(void 0,arguments)}({palette:{text:{primary:"rgba(89, 89, 89, 0.8)",secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)"},action:{disabled:"rgba(0, 0, 0, 0.3)"}},typography:{fontFamily:'"Source Sans Pro", "Arial", "sans-serif"',button:{textTransform:"initial",fontWeight:400}},shape:{borderRadius:2},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)"],props:{MuiButtonBase:{disableRipple:!0}}});const $d=Zo({productionPrefix:"qb616",disableGlobal:!0,seed:""});function _d(){function e({x:e,y:t,width:n,height:r,scaleRatio:i,margin:o}={}){const a={x:0,y:0,width:0,height:0,scaleRatio:{x:1,y:1},margin:{left:0,top:0}};return a.x=Number.isNaN(e)?a.x:e,a.y=Number.isNaN(t)?a.y:t,a.width=Number.isNaN(n)?a.width:n,a.height=Number.isNaN(r)?a.height:r,void 0!==i&&(a.scaleRatio.x=Number.isNaN(i.x)?a.scaleRatio.x:i.x,a.scaleRatio.y=Number.isNaN(i.y)?a.scaleRatio.y:i.y),void 0!==o&&(a.margin.left=Number.isNaN(o.left)?0:o.left,a.margin.top=Number.isNaN(o.top)?0:o.top),a}return function(t={}){const{createElement:n=document.createElement.bind(document)}=t;let r,i=e();const o={element:()=>r,root:()=>r,appendTo:e=>(r||(r=n("div"),r.style.position="absolute",r.style["-webkit-font-smoothing"]="antialiased",r.style["-moz-osx-font-smoothing"]="antialiased",r.style.pointerEvents="none"),e.appendChild(r),r),render(e){if(!r)return!1;const t=i.scaleRatio.x,n=i.scaleRatio.y;return r.style.left=`${Math.round(i.margin.left+i.x*t)}px`,r.style.top=`${Math.round(i.margin.top+i.y*n)}px`,r.style.width=`${Math.round(i.width)}px`,r.style.height=`${Math.round(i.height)}px`,r.style.transform=`scale(${t}, ${n})`,r.style.transformOrigin="top left",w.render(function(e,t){return m.createElement(Gl,{generateClassName:t},m.createElement(Hu,{theme:Hd},e))}(e,$d),r),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(r&&w.unmountComponentAtNode(r),o),destroy(){r&&r.parentElement&&(w.unmountComponentAtNode(r),r.parentElement.removeChild(r)),r=null},size:t=>(t&&(i=e(t)),i)};return o}}function Ud(){return function(e){e.renderer("react",_d()),e.component("data-title",Fd(e.renderer("svg")())),e.component("disclaimer",function(){class e extends m.Component{render(){const{label:e,spanStyle:t}=this.props;return m.createElement(m.Fragment,null,m.createElement("span",{ref:this.alignToRef,style:t,title:e},e))}}return e.propTypes={label:eo.string.isRequired,spanStyle:eo.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render(){const{settings:{label:t,rtl:n},layout:{dock:r},style:i={}}=this.settings,o="top"!==r&&"bottom"!==r||!n?"ltr":"rtl",a=function(e,t,n){const r={pointerEvents:"auto",display:"flex",justifyContent:"center",alignItems:"center",color:"#7b7a78",fontStyle:"italic",fontSize:"13px",fontFamily:e.fontFamily||'"Source Sans Pro", "Arial", "sans-serif"'};switch(t){case"left":r.width=`${n.height}px`,r.transform=`rotate(-90deg) translate(-${n.height}px, 0)`,r.transformOrigin="top left";break;case"right":r.width=`${n.height}px`,r.transform=`rotate(90deg) translate(0, -${n.width}px)`,r.transformOrigin="top left";break;case"center":r.width=`${n.width}px`,r.height=`${n.height}px`,r.color="#595959",r.fontStyle="normal",r.fontSize="1.2em",r.textAlign="center";break;default:r.justifyContent="flex-start",r.alignItems="flex-start"}return r}(i,r,this.rect),s="center"===r?t:`* ${t}`,l="center"!==r?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return m.createElement("div",{style:a,dir:o},m.createElement(m.Fragment,null,m.createElement(e,{label:s,spanStyle:l})))}}}())}}function Vd(e){return vt(e).l<70}function Wd(e,t){const n=vt(e).l/100,r=vt(t).l/100;return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}function Bd(e,t){return{x:t.x+e.r*Math.sin(e.a),y:t.y-e.r*Math.cos(e.a)}}var Yd={require:["chart","settings"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){const n=e.component(t.component);if(!n)return[];const r=e.findShapes(t.selector).filter((e=>e.key===t.component));if(r.length<2)return[];if(n.settings.settings.slice.cornerRadius>0||n.settings.settings.slice.strokeWidth>0)return[];const i=[];let o=r[r.length-1];for(let e=0;e<r.length;e+=1){const t=r[e],n=o.attrs.fill,a=t.attrs.fill;if(Wd(a,n)<=1.2){const{start:e,offset:n}=t.desc.slice;let{innerRadius:r,outerRadius:s}=t.desc.slice;if(r=Math.max(r,o.desc.slice.innerRadius),s=Math.min(s,o.desc.slice.outerRadius),s>r){const t=Bd({r:s,a:e},n),o=Bd({r:r,a:e},n);i.push({type:"line",x1:t.x,y1:t.y,x2:o.x,y2:o.y,strokeWidth:1,opacity:.4,stroke:Vd(a)?"#ccc":"#333"})}}o=t}return i}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function Kd(e,t=!0){let n="";for(let t=0;t<e.length;t++){const r=e[t];n+=0===t?`M${r.x} ${r.y}`:`L${r.x} ${r.y}`,n+=" "}return t&&(n+="Z"),n}function Gd(e){const{size:t,angle:n}=e,r={x:e.x,y:e.y},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}];return s=s.map((e=>function(e,t,n={x:0,y:0}){const r=Math.cos(t),i=Math.sin(t),o=(s=n,{x:(a=e).x-s.x,y:a.y-s.y});var a,s;return function(e,t){return{x:e.x+t.x,y:e.y+t.y}}({x:r*o.x-i*o.y,y:i*o.x+r*o.y},n)}(e,n,r))),{type:"path",fill:e.fill,d:Kd(s)}}var Jd={require:["chart"],defaultSettings:{settings:{},style:{}},render(){return function({chart:e,settings:t}){if(!e.component(t.component))return[];const n=e.findShapes(t.selector).filter((e=>e.key===t.component));if(n.length<2)return[];const r=[];for(let e=0;e<n.length;e+=1){const a=n[e];if(a.data.radius.value<0){const{start:e,end:n,offset:s}=a.desc.slice,l=(e+n)/2,u=(i={r:t.offset,a:l},{x:(o=s).x+i.r*Math.sin(i.a),y:o.y-i.r*Math.cos(i.a)}),c=Gd({size:t.size,fill:t.fill,angle:l+Math.PI,...u});c.data={...a.data,_share:a.desc.share,_fillColor:a.attrs.fill},r.push(c)}}var i,o;return r}({chart:this.chart,rect:this.rect,style:this.style,settings:this.settings.settings})}};function Zd(){const e=n();return e.use(r),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",B(e))};e.interaction("hammer",B(Hammer))}(t)),e.use(Ud()),e.component("pie-dividers",Yd),e.component("negative-indicators",Jd),e}var Xd={};function Qd(){Qd.init.call(this)}Xd.isObject=function(e){return"object"==typeof e&&null!==e},Xd.isNumber=function(e){return"number"==typeof e},Xd.isUndefined=function(e){return void 0===e},Xd.isFunction=function(e){return"function"==typeof e};var ep=Qd;Qd.EventEmitter=Qd,Qd.prototype._events=void 0,Qd.prototype._maxListeners=void 0,Qd.defaultMaxListeners=10,Qd.init=function(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0},Qd.prototype.setMaxListeners=function(e){if(!Xd.isNumber(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},Qd.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],Xd.isUndefined(n))return!1;if(Xd.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(Xd.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},Qd.prototype.addListener=function(e,t){var n;if(!Xd.isFunction(t))throw TypeError("listener must be a function");(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,Xd.isFunction(t.listener)?t.listener:t),this._events[e]?Xd.isObject(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,Xd.isObject(this._events[e])&&!this._events[e].warned)&&((n=Xd.isUndefined(this._maxListeners)?Qd.defaultMaxListeners:this._maxListeners)&&n>0&&this._events[e].length>n&&(this._events[e].warned=!0,Xd.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),Xd.isFunction(console.trace)&&console.trace()));return this},Qd.prototype.on=Qd.prototype.addListener,Qd.prototype.once=function(e,t){if(!Xd.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},Qd.prototype.removeListener=function(e,t){var n,r,i,o;if(!Xd.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||Xd.isFunction(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(Xd.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},Qd.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],Xd.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},Qd.prototype.listeners=function(e){return this._events&&this._events[e]?Xd.isFunction(this._events[e])?[this._events[e]]:this._events[e].slice():[]},Qd.listenerCount=function(e,t){return e._events&&e._events[t]?Xd.isFunction(e._events[t])?1:e._events[t].length:0};var tp=K(ep);const np=e=>(Object.keys(tp.prototype).forEach((t=>{e[t]=tp.prototype[t]})),tp.init(e),e);function rp({picasso:e}){var t;const n=S(),r=C(),i=E(),[o,u]=k(),c=function(){const e={};return np(e),e.lasso={active:()=>!1},e.select={on:e.on,removeListener:e.removeListener},e}(),d=T(),p=R(),h=!(null===(t=d.qSelectionInfo)||void 0===t||!t.qInSelections),[f,m]=k(!1);return c.lasso=function({layout:e,isInSelections:t,isLassoActionActive:n,setIsLassoActionActive:r,translator:i}){var o;return{active:n,label:i.get(n?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),hidden:!t||!(null===(o=e.qHyperCube)||void 0===o||null===(o=o.qDimensionInfo)||void 0===o||null===(o=o[0])||void 0===o||!o.qIsOneAndOnlyOne),action(e){r("boolean"==typeof e?e:!n)},icon:{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"}}]}}}({layout:d,isInSelections:h,isLassoActionActive:f,setIsLassoActionActive:m,translator:p}),D((()=>(o&&(o.interactions.lasso.active=()=>f),{...c.lasso})),[o,f,h,p.language()]),M((()=>{r.style.overflow="hidden";const t=e({renderer:{prio:[n.renderer||"canvas"]}}),o=t.chart({element:r,data:[],settings:{}}),p=a({chart:o,actions:c,selections:i,config:{selectionActions:!1}});p.setLayout(d),p.setBrushAliases({colorField:"qDimensionInfo/0/qAttrDimInfo/0"});const h=s({legendScrollOffset:0,rotation:0});h.intercept("rotation",(e=>(h.get("rotation")+e)%(2*Math.PI))),h.onChanged("rotation",(()=>{o.update({partialData:!0})}));const f=l();return c.on("selections-start",(()=>{o.brush("selection").start()})),u({picasso:t,chart:o,selectionService:p,viewState:h,viewCache:f,interactions:c}),()=>{p.destroy(),o.destroy(),c.removeAllListeners(),delete c.select,h.intercept("rotation",void 0),h.onChanged("rotation",void 0)}}),[]),o}const ip={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"}}};function op(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const ap={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,u=o[t]*(n>l?1:n/l),c=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(u,n),width:Math.min(c,l)},r()):(e={height:u,width:c},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 sp(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const i=function(e){var t,n,r;let i,o,a,s,l,u;if(e&&(null!==(t=e.session)&&void 0!==t&&t.options||null!==(n=e.enigmaModel)&&void 0!==n&&null!==(n=n.session)&&void 0!==n&&n.sessionConfig||null!==(r=e.session)&&void 0!==r&&null!==(r=r.config)&&void 0!==r&&r.url)){var c;if(i=e.session.options||(null===(c=e.enigmaModel)||void 0===c?void 0:c.session.sessionConfig),!i){var d;i=null===(d=e.session)||void 0===d?void 0:d.config;const t=new URL(i.url);i.host=t.hostname,i.port=t.port,i.isSecure="wss:"===t.protocol}return u=void 0!==i.secure?i.secure:i.isSecure,o=u?"https://":"http://",a=i.host||"localhost",s=i.port?`:${i.port}`:"",l=i.prefix?i.prefix:"/","/"!==l[l.length-1]&&(l=`${l}/`),o+a+s+l}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 ap.getImageSize(r,t);return{src:r,size:t,height:o,width:a,imageError:s}}async function lp(e,t,n,r){var i,o,a;const{app:s,flags:l}=t,u=null===(i=e.layout)||void 0===i||null===(i=i.tooltip)||void 0===i?void 0:i.imageComponents;if(!u)return[];const[c]=u,d=c.size||"small",p=c.type||"media";let h=-1;for(let e=0;e<n.length;e++)if(n[e].cId===c.cId){h=e;break}const f=(null===(o=r.data)||void 0===o||null===(o=o.customTooltipAttrExps)||void 0===o?void 0:o.value)||[];let m;if(-1!==h&&f[h]&&(m=f[h]),"media"===p&&null!==(a=c.ref)&&void 0!==a&&null!==(a=a.qStaticContentUrl)&&void 0!==a&&a.qUrl)return sp(c,d,s);if("url"===p)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")&&null!=e&&e.getImage&&op(a))try{const t=`data:image/png;base64, ${await e.getImage(a)}`,{height:n,width:i,imageError:s}=await ap.getImageSize(t,r);o={src:t,size:r,height:n,width:i,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await ap.getImageSize(a,r);o={src:a,size:r,height:e,width:t,imageError:n}}return o}(s,l,c,d,m);if(l.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===p&&m&&m.label){return async function(e,t,n,r){let i;const o=r.label,a=`qmem://${t.qFallbackTitle}/${o}`;if(op(a))try{const t=await e.getImage(a);if(t){const e=`data:image/png;base64, ${t}`,{height:r,width:o,imageError:a}=await ap.getImageSize(e,n);i={src:e,size:n,height:r,width:o,imageError:a}}}catch(e){}return i}(s,n[h],d,m)}return[]}const up={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const i=t,o=[];for(let t=0;t<i.length;t++)o.push(lp(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}){var t;const n=null===(t=e.layout)||void 0===t||null===(t=t.tooltip)||void 0===t?void 0:t.imageComponents;return!!n&&n.length>0}},cp={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let i=t;return i=await up.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),i},checkIfPromisesExist:({customTooltipModel:e})=>up.checkIfPromisesExist({customTooltipModel:e})};const dp=(e,t)=>{var n,r,i;const o=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions,a=null==e||null===(r=e.qHyperCubeDef)||void 0===r?void 0:r.qMeasures,s=null==e||null===(i=e.qHyperCubeDef)||void 0===i?void 0:i.qInterColumnSortOrder,l=t;return{qInfo:{qType:ip.CHART.CHART_PARENT_TYPE,qId:ip.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:o,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},pp=e=>{var t;const n=null===(t=e.tooltip)||void 0===t||null===(t=t.chart)||void 0===t||null===(t=t.object)||void 0===t?void 0:t.refId;return{qInfo:{qType:ip.CHART.CHART_CHILD_TYPE},qExtendsId:n}};const hp={createContainer:({ctx:e,layout:t})=>{var n;if(!((null===(n=t.qHyperCube)||void 0===n||null===(n=n.qDimensionInfo)||void 0===n?void 0:n.length)<=0))return function(e,t){var n,r;const i=null!==(n=null===(r=t.tooltip)||void 0===r||null===(r=r.chart)||void 0===r||null===(r=r.style)||void 0===r?void 0:r.size)&&void 0!==n?n:"medium",o=ip.CHART.STYLE[i];return[{content:[e.h("div",{style:{display:"flex",width:o,height:o,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:ip.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":o,width:"100%"}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:r,customTooltipModel:i,rtl:o})=>{var a;const s=i,l=null==t||null===(a=t.tooltip)||void 0===a||null===(a=a.chart)||void 0===a||null===(a=a.object)||void 0===a?void 0:a.refId;if(null!=s&&s.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&l&&!(t.qHyperCubeDef.qDimensions.length<=0)){await hp.hide({app:e,customTooltipModel:i});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,i=ip.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 a=await async function({app:e,properties:t,customTooltipModel:n}){var r;const i=n;null!==(r=i.miniChartToken.sessionObj)&&void 0!==r&&r.id&&await e.destroySessionObject(i.miniChartToken.sessionObj.id);const o=ip.CHART.STATE,a=dp(t,o),s=await e.createSessionObject(a),l=pp(t);if(s.id!==ip.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);i.miniChartToken.sessionObj=s;const u=await s.createChild(l);if(i.miniChartToken.sessionObj&&i.miniChartToken.sessionObj.id===s.id)return i.miniChartToken.model=u,u;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:i});if(s.miniChartToken.alternateState&&s.miniChartToken.sessionObj&&a){var u,c,d,p;const e=n.length>0&&void 0!==(null===(u=n[0].data)||void 0===u?void 0:u.value)?[null===(c=n[0].data)||void 0===c?void 0:c.value]:[],a=void 0!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){var h,f;const e=null!==(h=n[0].data.selectionOuterDimension)&&void 0!==h?h:n[0].data.selectionDimension;if(null!=e&&null!==(f=e.source)&&void 0!==f&&f.field){var m;const t=null==e||null===(m=e.source)||void 0===m?void 0:m.field.split("/"),n=t[t.length-1],r=void 0!==e.value?[e.value]:[];r.length>0&&void 0!==n&&s.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),r,!1)}}e.length>0&&s.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const l=document.getElementById(ip.CHART.CONTAINER_ID),g={direction:o?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};s.miniChartToken.vis=await i.embed.render({element:l,model:s.miniChartToken.model,options:g,id:null===(d=s.miniChartToken.model)||void 0===d?void 0:d.id,type:null===(p=s.miniChartToken.model)||void 0===p?void 0:p.genericType})}}catch(t){await hp.hide({app:e,customTooltipModel:i})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(hp.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(ip.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=ip.CHART.STATE;n.miniChartToken.alternateState=void 0,await e.removeSessionAlternateState(r)}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{var t;const n=e;"function"==typeof(null===(t=n.miniChartToken)||void 0===t||null===(t=t.vis)||void 0===t?void 0:t.destroy)&&(n.miniChartToken.vis.destroy(),n.miniChartToken.vis=void 0)}};function fp(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function mp(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=ip.CUSTOM,i={};return i[e]=!0,i[t]=!0,i[n]=!0,i[r]=!0,i}function gp(e){const t=mp();return e.filter((e=>t[e.id]))}const yp={getNodes(e,t){const n=function(e,t){let n=0,r=0;e.center?(n+=e.center.x,r+=e.center.y):(n+=e.clientX,r+=e.clientY);const 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=>{var o,a,s,l;const u=null!==(o=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==o?o:t.data;if(!u||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||i[t.type]){if(null!==(l=t.data)&&void 0!==l&&l.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=>{var t,n;const r=null!==(t=null!==(n=e.data.stack)&&void 0!==n?n:e.data.selectionOuterDimension)&&void 0!==t?t:e.data.selectionDimension;return r&&r.value===u.value&&r.label===u.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}=yp.getAttrExprData(a);o.length||n.length?cp.handlePromises({customTooltipModel:i,nodes:yp.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{var s;null!=i&&null!==(s=i.miniChartToken)&&void 0!==s&&s.alternateState&&hp.hide({app:r.app,customTooltipModel:i}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>cp.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const r=t,i=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return r[i]||(r[i]=[]),r[i]},getAttrExprData(e){var t;let n=[],r="";const i=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(i.length>0){var o;const t=i.length-1;n=(null===(o=e.qHyperCube)||void 0===o||null===(o=o.qDimensionInfo)||void 0===o||null===(o=o[t])||void 0===o?void 0:o.qAttrExprInfo)||[],r=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:n,fieldPath:r}},quarantineCustomTooltipAttrs(e,t={}){var n;if(!(null===(n=e.qLayoutExclude)||void 0===n||null===(n=n.quarantine)||void 0===n?void 0:n[ip.CUSTOM.QUARANTINE])){!function(e,t){const n=t;let r=n.qLayoutExclude;r||(n.qLayoutExclude={quarantine:{}},r=n.qLayoutExclude),r.quarantine||(r.quarantine={}),r.quarantine[ip.CUSTOM.QUARANTINE]=[],e.forEach((e=>{r.quarantine[ip.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}(gp(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){var t;const n=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(t=t.quarantine)||void 0===t?void 0:t[ip.CUSTOM.QUARANTINE])&&delete n.qLayoutExclude.quarantine[ip.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=fp(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===gp(i).length){var o;const t=(null===(o=e.qLayoutExclude)||void 0===o||null===(o=o.quarantine)||void 0===o?void 0:o.customTooltip)||[],n=[...i,...t],a=e;a.qHyperCubeDef?a.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:a.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n){let r=[];const i=fp(e)||[];[...i,t].forEach((e=>{const t=gp(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));const o=mp(),a=i.map((e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter((e=>!o[e.id])),t})),s=void 0!==n?n:a.length-1;a.length>0&&(a[s].qAttributeExpressions=a[s].qAttributeExpressions.concat(r));const l=e;e.qHyperCubeDef?l.qHyperCubeDef.qDimensions=a:l.qHyperCube.qDimensionInfo=a},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){var t;return(null===(t=e.tooltip)||void 0===t?void 0:t.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:ve.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=ve.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},{}]}};function vp(e,t,n,r){var i;const o=(null===(i=t.qHyperCube)||void 0===i||null===(i=i[n])||void 0===i||null===(i=i[r])||void 0===i?void 0:i.qAttrExprInfo)||[],a=[],s=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return s?(o.forEach(((e,t)=>{const i=s.qValues&&s.qValues[t]?s.qValues[t]:void 0,o=void 0===i?"NaN":function(e,t){let n;switch(e.id){case ip.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case ip.CUSTOM.TITLE:case ip.CUSTOM.DESCRIPTION:case ip.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,i);a.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:o,value:"value"})})),a):a}const bp={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>vp(t,e,r,n)}}};const xp={getCustomAttrExps(e,t,n){var r;const i={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},o=(null===(r=t.data)||void 0===r||null===(r=r.customTooltipAttrExps)||void 0===r?void 0:r.value)||[];if(Number.isNaN(o))return i;return function(e,t,n,r){const i={[ip.CUSTOM.TITLE]:!0,[ip.CUSTOM.DESCRIPTION]:!0},{attrExps:o,fieldPath:a}=yp.getAttrExprData(e);return 0===t.length||0===o.length||""===a||o.forEach(((e,o)=>{const s=t[o];if(e.id===ip.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===ip.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),r}(n,o.map((t=>be.getMeasure(e,t))),e,i)}};function wp({nodes:e,layout:t,dataset:n}){const r=function(e,t,n){const r=[];return e.forEach((e=>{r.push(xp.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:[]})}function Sp(e){const t=ip.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 Cp(e){var t;const n=null===(t=e.qHyperCubeDef)||void 0===t?void 0:t.qDimensions;return n[n.length-1].qAttributeExpressions||[]}var Ep={attrExpr:{migrateProperties(e){var t,n;const r=ie(!0,{},e),i=(null===(t=r.tooltip)||void 0===t||null===(t=t.data)||void 0===t||null===(t=t.qHyperCubeDef)||void 0===t?void 0:t.qMeasures)||[];let o=Cp(r);return o=function(e,t){return t.concat(e.map((e=>Sp(e))))}(i,o),function(e,t){var n;const r=null===(n=t.qHyperCubeDef)||void 0===n?void 0:n.qDimensions;r[r.length-1].qAttributeExpressions=e}(o,r),null===(n=r.tooltip)||void 0===n||delete n.data,r},getPatches(e){var t,n;const r=(null===(t=e.tooltip)||void 0===t||null===(t=t.data)||void 0===t||null===(t=t.qHyperCubeDef)||void 0===t?void 0:t.qMeasures)||[],i=(null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qDimensions.length)-1,o=function(e,t,n){let r=e.length;const i=[];return t.forEach((e=>{const t=Sp(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}(Cp(e),r,i);return o},checkForBackwardCompatibility:(e,t)=>(e.qMeasureInfo||[]).length>0&&t.length>0,updateProperties(e,t){return new Promise((n=>{var r,i,o;const a=(null===(r=t.qHyperCube)||void 0===r?void 0:r.qDimensionInfo)||[],s=(null===(i=t.tooltip)||void 0===i||null===(i=i.data)||void 0===i?void 0:i.qHyperCube)||{},l=null===(o=t.qMeta)||void 0===o||null===(o=o.privileges)||void 0===o?void 0:o.includes("update");e&&e.getEffectiveProperties&&this.checkForBackwardCompatibility(s,a)&&e.getEffectiveProperties().then((t=>{if(l){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)}))}}};const{CUSTOM:kp}=ip;function Tp({flags:e,layout:t,app:n,model:r,picasso:o,chart:a,translator:s,localeInfo:l,embed:u,options:c}){const d={properties:void 0},p=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:yp,miniChartToken:{},embed:s}}({layout:t,app:n,model:r,picasso:o,chart:a,translator:s,localeInfo:l,embed:u}),h="rtl"===c.direction,f=()=>{var e;const n=!(null===(e=d.properties)||void 0===e||null===(e=e.qHyperCubeDef)||void 0===e||!e.qDimensions.some((e=>{var t;return null===(t=e.qCalcCondition)||void 0===t||null===(t=t.qCond)||void 0===t?void 0:t.qv})));return!(!t.tooltip||t.tooltip.auto||n)};return{setProperties:e=>{d.properties=e},isEnabled:()=>f(),hideBasic:()=>f()&&i(t,"tooltip.hideBasic",!1),getAttributes:({dataset:e,nodes:n})=>{var r,i;const o=wp({dataset:e,nodes:n,layout:t});return{title:null===(r=o.customTooltipInfoAttrExpsArr.find((e=>e.id===kp.TITLE)))||void 0===r?void 0:r.title,description:null===(i=o.customTooltipInfoAttrExpsArr.find((e=>e.id===kp.DESCRIPTION)))||void 0===i?void 0:i.value,measures:o.customTooltipAttrExpsArr}},hasImages:()=>yp.checkIfPromisesExist({customTooltipModel:p}),createImageRow:({value:e,h:t})=>yp.getImageRow(e,{h:t,rtl:h}),addImages:({nodes:r})=>{const i=yp.getDataNodes(a,r),{attrExps:o}=yp.getAttrExprData(t);return cp.handlePromises({customTooltipModel:p,nodes:i,attrExps:o,opts:{flags:e,app:n}})},chart:{isEnabled:()=>{return!!(f()&&null!==(e=t.tooltip)&&void 0!==e&&null!==(e=e.chart)&&void 0!==e&&null!==(e=e.object)&&void 0!==e&&e.refId&&u&&"function"==typeof(null==r?void 0:r.getEffectiveProperties));var e},hasLimitation:()=>{var e;return!(null==n||null===(e=n.isInModalSelection)||void 0===e||!e.call(n))},createContainer:({h:e})=>hp.createContainer({layout:t,ctx:{h:e,rtl:h}}),createLimitationRow:()=>yp.getFooterRow(s.get("properties.tooltip.notselectedmessage"),h),show:({nodes:e,properties:t})=>hp.show({app:n,properties:t,selectedNodes:e,customTooltipModel:p,rtl:h}),hasAlternateState:()=>{var e;return!(null===(e=p.miniChartToken)||void 0===e||!e.alternateState)},hide:()=>hp.hide({app:n,customTooltipModel:p}),destroy:()=>hp.destroyVisualization({customTooltipModel:p})}}}function Rp(e){return{layout:e,keys:{SCALE:{FILL:"fill"},COMPONENT:{DIMENSION_TITLE:"dimension-title",SLICES:"slices",PIE_LABELS:"pie-labels"}}}}function Dp({chart:e,translator:t,layout:n,constraints:r,options:i,themeService:o,colorService:a,custom:s}){const l=n.qHyperCube.qMeasureInfo.length>1,c="rtl"===i.direction,{fontFamily:d}=o.getStyles();return u({chart:e,translator:t,config:{rtl:c,enable:()=>!r.passive,getColorSettings:()=>a.getSettings(),style:{fontFamily:d},main:{key:"tooltip",getGroupByValue:({data:e})=>e.value,collectibles:[{key:"slices",type:"slice",major:({data:e})=>e.value}],triggers:[{keys:["slices"],collect:{from:"single"},placement:"collectible"},{keys:["pie-labels","negative-indicators"],collect:{from:"dimension",by:({data:e})=>e.value},placement:"trigger"}],placement:({meta:e})=>({type:"slices"===e.triggerer?"slice":"bounds"}),section:({h:e,nodes:n,dataset:r,formatter:i,create:o,util:a})=>{const[u]=n,{title:c,description:d,measures:p}=s.isEnabled()?s.getAttributes({dataset:r,nodes:n}):{},h=[];c&&h.push(o.text({value:c,style:{bold:!0}})),d&&h.push(o.text({value:d}));const f=s.hideBasic();if(f&&!p.length&&(c||d)||h.push(o.text({value:u.data.label,style:{bold:!0}})),!f){h.push(o.color({nodes:n,property:"fill"}));const{num:e}=u.data;if(h.push(o.measure({label:a.dataset.title(e.source.key,e.source.field),value:e.label})),l){const{radius:e}=u.data;h.push(o.measure({label:a.dataset.title(e.source.key,e.source.field),value:e.label}))}h.push(o.measure({label:t?t.get("properties.dataPoints.labelmode.share"):"Share",value:i("share")(u.desc.share)}))}p&&h.push(...p.map((e=>o.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}})))),s.chart.isEnabled()&&(s.chart.hasLimitation()?(s.chart.destroy(),h.push(o.raw({value:s.chart.createLimitationRow()}))):h.push(o.raw({value:s.chart.createContainer({h:e})})));const{customTooltipImages:m}=u.data;return s.isEnabled()&&m&&h.push(...m.map((t=>o.raw({value:s.createImageRow({value:t,h:e})})))),h},layout:{grouping:!0},events:{tooltip:{beforeShow:({collectNodes:e})=>s.isEnabled()&&s.hasImages()?s.addImages({nodes:e()}):Promise.resolve(),afterShow:({expando:e,nodes:t})=>{s.chart.isEnabled()&&!s.chart.hasLimitation()&&s.chart.show({nodes:t,properties:e.get("properties")})}},interaction:{mouseleave:()=>{s.chart.isEnabled()&&s.chart.hasAlternateState()&&s.chart.hide()}}}},legend:{keys:{tooltip:"legend-color-cat",component:"legend-cat"}}}})}function Mp({scaleKey:e,legend:t,onEdited:n}){const{layout:r}=t,{dock:i}=r||{};return{type:"brush-range",key:"legendRangeBrush",layout:{dock:"@legend-seq"},on:n?{bubbleEnd(){n()}}:{},settings:{brush:"selection",scale:`${e}Range`,direction:"left"===i||"right"===i?"vertical":"horizontal",bubbles:{align:"left"===i||"top"===i?"end":"start",placement:"outside"},target:{selector:'[id="legend-seq-target"]',fillSelector:'[id="legend-seq-ticks"]',fill:"rgba(82,204,82,0.2)"}}}}const qp=.8,Pp=.55,Np=.3,Lp={CORNER_RADIUS:0,INNER_RADIUS:Pp,STROKE:{COLOR:"#FFFFFF",WIDTH:{NONE:0,SMALL:2,MEDIUM:4,LARGE:6}}},Ip=({layout:e},t,n)=>t.encodings.slice.outerRadius?{scale:"radius",fn:t=>{var r,i;let o=qp,a=0;const s=null!==(r=null==n||null===(i=n.style)||void 0===i?void 0:i.innerRadius)&&void 0!==r?r:Pp;e.donut.showAsDonut&&(o=qp-s,a=s);return t.scale(Math.max(0,t.datum.radius.value))*o+a}}:qp,Ap=({layout:e},t,n)=>{var r,i;if(!e.donut.showAsDonut)return 0;const o=null!==(r=null==n||null===(i=n.style)||void 0===i?void 0:i.innerRadius)&&void 0!==r?r:Pp;return t.encodings.slice.outerRadius?{scale:"radius",fn:e=>{const t=qp-o,n=o;return e.scale(Math.min(0,e.datum.radius.value))*t+n}}:o},Op=({layout:e},t)=>{var n,r,i,o,a;const s=t.colorService.getDatumProps(),l=s[Object.keys(s)[0]],u=l&&l.field?l.field:void 0,c="qDimensionInfo/0"===u,d=u?t.ds.field(u).raw():null,p=d&&(d.label||d.title||d.qFallbackTitle)||"",h=t.encodings.slice.outerRadius,{formatter:f}=t.chart,m=he.getValue(e,"qHyperCube.qDimensionInfo",[]).length;function g(e,n){const r=t.ds.field(e).raw();return{field:e,label:!r.isCustomFormatted&&(r.qIsAutoFormat||"U"===r.qNumFormat.qType)?e=>f(n)(e.qNum):e=>e.qText}}const y=(e.components||[]).filter((e=>"slices"===e.key))[0];return{type:"pie",key:"slices",data:{extract:{field:"qDimensionInfo/0",props:{...s,num:g(t.encodings.slice.arc,"arc"),fillTooltip:u?{field:u,label:p,value:e=>c?e.qText||"-":void 0!==e.qNum&&"NaN"!==e.qNum?e.qText?e.qText:e.qNum:e.qText||"-"}:void 0,customTooltipAttrExps:0!==m?bp.getNode(e,{dimensionCount:m}):void 0,radius:h?g(h,"outerRadius"):void 0}}},brush:{consume:[{context:"selection",data:["","fill"],style:{inactive:{opacity:.3},active:{stroke:"rgba(52, 52, 52, 0.7)",strokeWidth:2}}},{context:"highlight",data:[""],style:{inactive:{fill:"#BFDAD9"},active:{fill:"#68B2AF"}}}]},settings:{startAngle:()=>t.viewState.get("rotation"),endAngle:()=>t.viewState.get("rotation")+2*Math.PI,slice:{arc:{ref:"num"},innerRadius:Ap({layout:e},t,y),fill:t.colorService.getColor(),strokeWidth:null!=y&&null!==(n=y.style)&&void 0!==n&&n.strokeWidth?Lp.STROKE.WIDTH[y.style.strokeWidth.toUpperCase()]:Lp.STROKE.WIDTH.NONE,stroke:null!==(r=null==y||null===(i=y.style)||void 0===i||null===(i=i.strokeColor)||void 0===i?void 0:i.color)&&void 0!==r?r:Lp.STROKE.COLOR,outerRadius:Ip({layout:e},t,y),cornerRadius:null!==(o=null==y||null===(a=y.style)||void 0===a?void 0:a.cornerRadius)&&void 0!==o?o:0}},animations:{enabled:t.animations.enabled,isMainComponent:!0}}};function zp({layout:e},t){var n,r;const i=(e.components||[]).filter((e=>"slices"===e.key))[0],o=null!==(n=null==i||null===(r=i.style)||void 0===r?void 0:r.innerRadius)&&void 0!==n?n:Pp,a=t.encodings.slice.outerRadius,s=t.themeService.getStyles();return!(!e.donut.showAsDonut||!a)&&{type:"pie",key:"zeroLine",data:{items:[1]},settings:{slice:{arc:1,fill:"transparent",innerRadius:0,strokeWidth:1,stroke:s.label.name.color,outerRadius:{scale:"radius",fn:e=>{const t=qp-o,n=o;return e.scale(0)*t+n}}}},animations:{enabled:t.animations.enabled}}}function jp(e){return{type:"pie-dividers",key:"pie-dividers",layout:{displayOrder:2},settings:{component:"slices",selector:"path"},brush:{consume:[{context:"selection",style:{inactive:{opacity:.2}}}]},animations:{enabled:e.animations.enabled,trackBy:()=>Math.random()}}}function Fp({layout:e},t){if(e.donut.showAsDonut||!t.encodings.slice.outerRadius)return!1;return{type:"negative-indicators",key:"negative-indicators",layout:{displayOrder:2},settings:{component:"slices",selector:"path",offset:5,size:4,fill:t.themeService.getStyles().label.name.color},brush:{consume:[{context:"selection",style:{inactive:{opacity:.2}}}]},animations:{enabled:t.animations.enabled}}}const Hp=()=>({key:"area",type:"brush-area",settings:{brush:{components:[{key:"slices",contexts:["selection"],action:"add"}]}},style:{area:{fill:"transparent",strokeWidth:2,stroke:"black",strokeDasharray:"5 5",opacity:.7}}}),$p=()=>({key:"lasso",type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:[{key:"slices",contexts:["selection"]}]},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}}});function _p(e){const t=e.node.desc&&e.node.desc.share;return t?e.formatter("share")(t):""}function Up(e){return e.node.data.num.label}function Vp(e){return e.node.data.radius.label}function Wp(e,t,n){if(e.dataPoint.auto)return n?Up:_p;if("share"===e.dataPoint.labelMode)return _p;if("value"===e.dataPoint.labelMode){return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?Vp:Up}return null}function Bp({data:e}){return e?e.label:""}function Yp(e){const t=parseInt(e,10);if(!isNaN(t))return t}const Kp=e=>t=>e.getContrastingColorTo(t.node.attrs.fill);function Gp(e){var t,n;const r=((e&&e.components?e.components:void 0)||[]).filter((e=>"slices"===e.key))[0];return(null!==(t=null==r||null===(n=r.style)||void 0===n?void 0:n.innerRadius)&&void 0!==t?t:Pp)>Np}function Jp({node:e,data:t}){return ie({_share:e.desc.share,_fillColor:e.attrs.fill},t)}function Zp(e,t,n){const r=t.styleService.label.name.getStyle(),i=[{padding:10,direction:t.encodings.slice.outerRadius?"rotate":"horizontal",placements:[{position:"outside",padding:t.encodings.slice.outerRadius?4:2,fill:r.fill}],fontSize:Yp(r.fontSize),fontFamily:r.fontFamily,label:Bp,linkData:({node:e,data:t})=>ie({_share:e.desc.share,_fillColor:e.attrs.fill,_showTooltip:!0},t)}];if(Wp(e,t,!1)){const r=function(e,t,n){return{label:Wp(e,t,!1),simplifiedPlacements:[{position:e.donut.showAsDonut&&Gp(e)?"inside":"into",onBackground:e.donut.showAsDonut&&Gp(e),padding:4}],theme:n.theme,themeId:"object.pieChart"}}(e,t,n),o=Se(ie(t,r),n.theme);o.linkData=Jp,i.push(o)}return{key:"pie-labels",type:"labels",renderer:Ji(t.flags),layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"slice",settings:{labels:i}}}]},brush:{consume:[{context:"selection",data:["","fill"],style:{inactive:{opacity:.3}}}]},animations:{enabled:t.animations.enabled,trackBy:()=>Math.random()}}}function Xp({layout:e,context:t},n){return!1!==e.dataPoint.show&&(1===n.dataRowCount?function(e,t,n){const r=Wp(e,t,!0),i=Kp(n.theme),o=t.themeService.getStyles(),a=t.styleService.label.name.getStyle(),s=t.styleService.label.value.getStyle(),l=a.fill===o.label.name.color,u=s.fill===o.label.value.color;return{key:"pie-labels",type:"labels",renderer:Ji(t.flags),layout:{displayOrder:2,minimumLayoutMode:"XSMALL"},settings:{sources:[{component:"slices",selector:"path",strategy:{type:"rows",settings:{align:.5,justify:.5,padding:10,labels:[{fontSize:Yp(a.fontSize),fontFamily:a.fontFamily,fill:l&&!e.donut.showAsDonut?i:a.fill,label:Bp,linkData:({data:e})=>e},{fontSize:Yp(s.fontSize),fontFamily:s.fontFamily,fill:u&&!e.donut.showAsDonut?i:s.fill,label:r,linkData:({data:e})=>e}]}}}]},animations:{enabled:t.animations.enabled,trackBy:()=>Math.random()}}}(e,n,t):Zp(e,n,t))}const Qp=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"legendRange",enable(t,n){if(this.started||!n)return!0;if(e.constraints.select||e.constraints.active)return!1;const r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>"legend-seq"===e.type)),i=(r||function(e){const{target:t}=e.srcEvent;return!(!t||!(t.hasAttribute("data-other-value")&&t.hasAttribute("data-idx")||"INPUT"===t.nodeName))}(n))&&!e.isLocked([this.chart.component("slices")]);return i||this.chart.component("legendRangeBrush").emit("rangeClear"),i}},events:{legendRangestart(t){t.preventDefault(),e.interactions.emit("selections-start"),this.chart.component("legendRangeBrush").emit("rangeStart",t),this.started=!0},legendRangemove(e){e.preventDefault(),this.chart.component("legendRangeBrush").emit("rangeMove",e)},legendRangeend(t){t.preventDefault(),this.chart.component("legendRangeBrush").emit("rangeEnd",t),e.onSelect(),this.started=!1}}});function eh(e,t){const n=t.element.getBoundingClientRect();let r,i;return e.center?(({x:r}=e.center),({y:i}=e.center)):(r=e.clientX,i=e.clientY),{x:r-n.left,y:i-n.top}}function th(e,t){const n=t.component("slices");if(!n)return!1;const{x:r,y:i}=eh(e,t),o=n.rect.x+n.rect.margin.left+n.rect.width/2,a=n.rect.y+n.rect.margin.top+n.rect.height/2,s=Math.min(n.rect.width,n.rect.height)/2*qp;return(o-r)**2+(a-i)**2<=s**2}const nh=(e,t,{requireFailure:n,recognizeWith:r}={})=>({type:"Tap",requireFailure:n,recognizeWith:r,options:{event:"tap",interval:10,pointers:1,enable(t,n){return!n||!e.constraints.select&&!e.constraints.active&&(this.components=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((e=>"slices"===e.key||"legend-cat"===e.key||"pie-labels"===e.key)),this.components.length)}},events:{tap(n){n.preventDefault();const{target:r}=n.srcEvent;if(r&&("INPUT"===r.nodeName||r.hasAttribute("data-other-value")))return void this.chart.component("legendRangeBrush").emit("bubbleStart",n);if(r&&r.hasAttribute("data-action")&&r.hasAttribute("data-component-key"))return void this.chart.component(r.getAttribute("data-component-key")).emit(r.getAttribute("data-action"));if(r&&r.children&&r.children[0]&&"legend-cat"===r.children[0].getAttribute("data-component-key"))return;if(e.isLocked(this.components))return;e.interactions.emit("selections-start");let i=eh(n,this.chart);this.components.some((e=>"legend-cat"===e.key))&&(i={cx:i.x,cy:i.y,r:5});const o=this.chart.shapesAt(i,{components:[{key:"slices",propagation:"stop"},{key:"legend-cat",propagation:"stop"},{key:"pie-labels",propagation:"stop"}],propagation:"stop"});o.length&&(this.chart.brushFromShapes(o,{components:[{key:o[0].key,action:n.srcEvent.ctrlKey||t?"set":"toggle",contexts:["selection"]}]}),e.onSelect())}}}),rh=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"lasso",enable(t,n){if(this.isStarted||!n)return!0;if(e.constraints.active||e.constraints.select||!e.interactions.lasso.active())return!1;const r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y});return!e.isLocked(r)&&r.some((e=>"slices"===e.key))}},events:{lassostart(t){t.preventDefault(),e.constraints.select||e.constraints.active||this.isStarted||(e.interactions.emit("selections-start"),this.chart.component("lasso").emit("lassoStart",t),this.isStarted=!0)},lassomove(e){e.preventDefault(),this.chart.component("lasso").emit("lassoMove",e)},lassoend(t){t.preventDefault(),this.isStarted=!1,this.chart.component("lasso").emit("lassoEnd",t),e.onSelect()}}}),ih=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Tap",requireFailure:t,recognizeWith:n,options:{event:"areatap",pointers:2,enable(t,n){if(this.started||!n)return!0;if(e.constraints.active||e.constraints.select)return!1;const r=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y});return r.some((e=>"slices"===e.key))&&!e.isLocked(r)}},events:{areatap(t){const n=this.chart.component("area");n&&!this.started&&(e.interactions.emit("selections-start"),n.emit("areaStart",t.pointers[0]),n.emit("areaMove",t.pointers[1]),this.started=!0,setTimeout((()=>{n.emit("areaEnd"),e.onSelect(),this.started=!1}),100)),t.preventDefault()}}});function oh(e){return{type:"native",key:"theusual",events:{wheel(t){let n=!1;if(!e.constraints.active&&th(t,this.chart)){const r=Math.sign(-t.deltaY);e.viewState.set("rotation",r*(Math.PI/12)),n=!0}else if(!e.constraints.select&&!e.constraints.active){const e=this.chart.componentsFromPoint(t).filter((e=>"legend-cat"===e.key))[0];e&&(n=!0,function(e,t){const n=(Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY)>=0?"next":"prev";t.emit(n)}(t,e))}n&&t.preventDefault()}}}}const ah=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"rotate",pointers:1,threshold:10,enable(t,n){return!(!this.started&&n)||!e.constraints.active&&!e.interactions.lasso.active()&&th(n,this.chart)}},events:{rotatestart(e){e.preventDefault();const t=this.chart.component("slices").rect,n=this.chart.element.getBoundingClientRect();this.pieCenter={x:n.left+t.x+t.width/2,y:n.top+t.y+t.height/2},this.prevAngle=Math.atan2(e.center.y-this.pieCenter.y,e.center.x-this.pieCenter.x),this.started=!0},rotatemove(t){t.preventDefault();const n=Math.atan2(t.center.y-this.pieCenter.y,t.center.x-this.pieCenter.x);e.viewState.set("rotation",n-this.prevAngle),this.prevAngle=n},rotateend(e){e.preventDefault(),this.started=!1},rotatecancel(e){e.preventDefault(),this.started=!1}}}),sh=(e,{requireFailure:t,recognizeWith:n}={})=>({type:"Pan",requireFailure:t,recognizeWith:n,options:{event:"legendPan",pointers:1,threshold:10,enable(t,n){return!(!this.isStarted&&n)||!e.constraints.active&&this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).some((e=>"legend-cat"===e.type))}},events:{legendPanstart(e){if(e.preventDefault(),!this.isStarted){this.components=this.chart.componentsFromPoint({x:e.center.x,y:e.center.y}),this.components.forEach((t=>{t.emit("panstart",e)})),this.isStarted=!0;const t=this.chart.component("tooltip");t&&t.show&&t.emit("hide")}},legendPanmove(e){this.components.forEach((t=>{t.emit("panmove",e)})),e.preventDefault()},legendPanend(e){e.preventDefault(),this.components.forEach((t=>{t.emit("panend",e)})),this.isStarted=!1}}}),lh=(e,t,n)=>({key:"hammered",type:"hammer",enable:!0,gestures:t?[ah(e,{}),nh(e,t,{}),...n]:[Qp(e,{}),ih(e,{}),ah(e,{}),rh(e,{}),sh(e,{}),nh(e,t,{}),...n]});function uh(e,t,n){const r=e.getIsSingleSelect(0),{constraints:i}=n;if(i.active&&i.passive)return[];const o=t.tooltipService.getInteractions();return[lh(t,r,o.gestures),oh(t),o.native]}function ch({settings:e},t){const n={share:{type:"d3-number",format:".1%"},arc:{data:{field:t.encodings.slice.arc}},fill:e.scales.fill&&e.scales.fill.data&&e.scales.fill.data.field?{data:{field:e.scales.fill.data.field}}:{}};return t.encodings.slice.outerRadius&&(n.outerRadius={data:{field:t.encodings.slice.outerRadius}}),n}function dh({layout:e},t,n){if(!e.dimensionTitle)return!1;const r=t.properties,i=t.styleService.axis.title.getStyle();return{key:"dimension-title",type:"data-title",layout:{minimumLayoutMode:"SMALL",dock:"top"},settings:{hyperCube:e.qHyperCube,hyperCubeDef:r&&r.qHyperCubeDef,isDimension:!0,disabled:()=>n.constraints.active||!n.model,model:t.model,app:t.app,translator:t.translator,rtl:n.rtl,selections:t.selections},style:{fontFamily:i.fontFamily,fontSize:i.fontSize,color:i.color}}}function ph({layout:e},t,n){const r=function(e,t){const n={field:"qDimensionInfo/0",props:{num:{field:t.encodings.slice.arc}}};t.encodings.slice.outerRadius&&(n.props.radius={field:t.encodings.slice.outerRadius});let r=t.ds.extract(n);if(0===r.length)return"NoDataExist";const i=he.getValue(e,"qHyperCube.qSize.qcy");if(he.getValue(e,"qHyperCube.qDataPages.0.qArea.qHeight")<i)return"LimitedData";if(r=t.encodings.slice.outerRadius?r.filter((e=>"NaN"!==e.num.value&&"NaN"!==e.radius.value)):r.filter((e=>"NaN"!==e.num.value)),0===r.length)return"OnlyNanData";const o=r;return r=t.encodings.slice.outerRadius&&!e.donut.showAsDonut?r.filter((e=>e.num.value>0&&e.radius.value>0)):r.filter((e=>e.num.value>0)),0===r.length?"OnlyNegativeOrZeroValues":o.length!==r.length&&"NegativeOrZeroValues"}(e,t),{fontFamily:i}=t.themeService.getStyles();return function(e,t,n,r={}){if(!e)return!1;const{translator:i}=t,{rtl:o}=n;return{key:"disclaimer",type:"disclaimer",layout:{dock:se[e].alignment},settings:{label:i.get(`Object.Disclaimer.${e}`),rtl:o},style:r}}(r,t,n,{fontFamily:i})}function hh({layout:e,context:t,selectionService:n},r={}){const i=function({layout:e}={},t={}){const n={};return ie(n,t.colorService.getScales()),t.encodings.slice.outerRadius&&ie(n,function({layout:e},t){const n={radius:{type:"linear",include:[0],data:{extract:{field:t.encodings.slice.outerRadius}}}};return e.donut.showAsDonut||(n.radius.min=0),n}({layout:e},t)),n}({layout:e},r),o={scales:i};let a=[];const s=ph({layout:e},r,t);if(s&&"center"===s.layout.dock)return{components:[s]};const l=t.constraints.select||t.constraints.active,u=r.colorService.getLegend({eventName:"legend",key:"legend",viewState:r.viewState,chart:r.chart,styleReference:"object.pieChart",styleOverrides:{title:r.styleService.legend.title.getStyle(),label:r.styleService.legend.label.getStyle()},rtl:t.rtl},{navigationDisabled:l});return i.fillRange&&u.components[0]&&("right"===u.components[0].layout.dock||"left"===u.components[0].layout.dock||t.rtl)&&(i.fillRange.invert=!0),a=[Op({layout:e,settings:o},r),zp({layout:e},r),jp(r),Fp({layout:e},r),dh({layout:e},r,t),...u.components,Mp({settings:o,scaleKey:"fill",legend:u.components[0]||{},onEdited:r.onSelect}),$p(),Hp(),Xp({layout:{components:e.components,dataPoint:ie({},e.dataPoint,{show:!(e.effectPath&&e.snapshotData&&!1===e.dataPoint.show)}),donut:e.donut},context:t},r),...r.tooltipService.getComponents(),(!1!==e.showDisclaimer||!r.flags.isEnabled("SHOW_DISCLAIMER"))&&s],a=a.filter((e=>!1!==e)),{interactions:uh(n,r,t),scales:i,components:r.pluginService.extendComponents(a),palettes:r.colorService.getPalettes(),formatters:ch({settings:o},r),strategy:de(0,r)}}function fh({instance:e,services:t,picasso:n,flags:i}){const o=S(),a=q(),s=P(),l=R(),u=A(),c=N(),d=E(),p=I(),{qLocaleInfo:f}=O(),[m]=j((()=>{if(!t)return Promise.resolve();Ep.attrExpr.updateProperties(a,c);return Promise.all([t.colorService.initialize({createConfig:({getUseBaseColors:e})=>({theme:u,legendProps:c.legend,layout:c,localeInfo:f,hc:c.qHyperCube,colorProps:{...c.color,useBaseColors:e(c)}})}),a&&!c.snapshotData?a.getEffectiveProperties():Promise.resolve({}),t.pluginService.initialize()])}),[t]);M((()=>{null!=e&&e.selectionService&&e.selectionService.setLayout(c)}),[c]),M((()=>{if(!e||!m)return;const{chart:g,viewState:y,interactions:v,viewCache:b}=e,{colorService:x,pluginService:w,themeService:S,tooltipService:C,styleService:E}=t,k=o.viewState||{};c.snapshotData||(y.preventSet("legendScrollOffset",k.legendScrollOffset||0),y.preventSet("rotation",k.rotation||0)),function(e,t){e&&e.snapshotData&&e.snapshotData.content&&e.snapshotData.content.chartData&&(t.preventSet("legendScrollOffset",e.snapshotData.content.chartData.legendScrollOffset),t.preventSet("rotation",e.snapshotData.content.chartData.rotation))}(c,y),C.expando.set("properties",m[1]);const T=n.data("q")({key:"qHyperCube",data:c.qHyperCube,config:{localeInfo:f}}),R=[{type:"q",key:"qHyperCube",data:c.qHyperCube,config:{localeInfo:f}},...x.getData()],D={slice:{arc:"qMeasureInfo/0"}};c.qHyperCube.qMeasureInfo.length>1&&(D.slice.outerRadius="qMeasureInfo/1");const M=function(e,t){if(t.slice.outerRadius)return e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc},radius:{field:t.slice.outerRadius}}}).filter((e=>e.num.value>0&&"NaN"!==e.radius.value)).length;return e.extract({field:"qDimensionInfo/0",props:{num:{field:t.slice.arc}}}).filter((e=>e.num.value>0)).length}(n.data("q")({data:c.qHyperCube,config:{localeInfo:f}}),D),q=d?()=>{const e=g.brush("selection");r.selections(e,{},c).forEach((e=>{d.select(e)}))}:()=>{},P=c.snapshotData&&!o.freeResize?{width:(c.snapshotData.content.size||c.snapshotData.object.size).w,height:(c.snapshotData.content.size||c.snapshotData.object.size).h}:void 0,N=t=>e.selectionService.getIsSelectionLocked(t),L=()=>hh({layout:c,context:{rtl:"rtl"===o.direction,theme:u,translator:l,constraints:p,model:a},selectionService:e.selectionService},{picasso:n,ds:T,model:a,app:s,chart:g,onSelect:q,isLocked:N,interactions:v,constraints:p,translator:l,viewState:y,dataRowCount:M,encodings:D,colorService:x,pluginService:w,themeService:S,styleService:E,tooltipService:C,debouncer:h,properties:m[1],logicalSize:P,flags:i,animations:{enabled:()=>function({viewState:e,options:t,viewCache:n,layout:r,chart:i}){return!1!==t.chartAnimations&&n.get("chartWidth")===i.element.clientWidth&&n.get("chartHeight")===i.element.clientHeight&&n.get("hasZeroLine")===!!i.component("zeroLine")&&0===e.get("rotation")&&!Gi.propertiesHaveChanged({viewCache:n,layout:r})}({viewState:y,options:o,layout:c,viewCache:b,chart:g})}});e.generateSettings=L;const I=L();g.update({data:R,settings:I}),b.set("chartWidth",g.element.clientWidth),b.set("chartHeight",g.element.clientHeight),b.set("hasZeroLine",I.components.filter((e=>"zeroLine"===e.key)).length>0),Gi.cacheProperties({viewCache:b,layout:c}),o.effect&&c.effectProperties?o.effect.update(c,g,{encodings:D}):c.effectPath||g.brush("highlight").end()}),[e,m,o.direction,o.effectProperties,p,u.name(),l.language()])}const mh="legend-cat";function gh({instance:e,services:t}){const n=C(),r=N();H((i=>{if(!(r.snapshotData&&r.snapshotData.content&&r.snapshotData.content.chartData)&&(function(e,t){const n=t.getBoundingClientRect();e.snapshotData=e.snapshotData||{},e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.size=e.snapshotData.content.size||{w:n.width,h:n.height}}(i,n),e&&t))return function({layout:e,chart:t,viewState:n,colorService:r}){return e.snapshotData.content=e.snapshotData.content||{},e.snapshotData.content.chartData={legendScrollOffset:fe(t,mh),rotation:n.get("rotation")},r.getSnapshotData().then((t=>{e.snapshotData.content.chartData={...e.snapshotData.content.chartData,...t}})).catch((()=>{}))}({layout:i,chart:e.chart,colorService:t.colorService,viewState:e.viewState})})),$((()=>({getViewState:()=>({rotation:e.viewState.get("rotation"),legendScrollOffset:fe(e.chart,"legend-cat")})})),[e])}const yh={setValue(e,t,n){if(!t)return;const r=t.split(".");let i=e;const o=r[r.length-1];let a;for(a=0;a<r.length-1;++a)null==i[r[a]]&&(i[r[a]]=Number.isNaN(+r[a+1])?{}:[]),i=i[r[a]];void 0!==n?i[o]=n:delete i[o]},getValue(e,t,n){const r=t.split(".");let i,o=e;if(void 0===o)return n;for(i=0;i<r.length;++i){if(null==o[r[i]])return n;o=o[r[i]]}return o}},vh={getDimensions:e=>yh.getValue(e,"qHyperCubeDef.qDimensions",[]),getNumDimensions:e=>yh.getValue(e,"qHyperCubeDef.qDimensions.length",0),getMeasures:e=>yh.getValue(e,"qHyperCubeDef.qMeasures",[]),getNumMeasures:e=>yh.getValue(e,"qHyperCubeDef.qMeasures.length",0),getDimensionLayouts(e,t){const n=yh.getValue(e,t?`${t}.qHyperCube`:"qHyperCube",null);return n?n.qDimensionInfo:[]},getDimensionLayout(e,t,n){return this.getDimensionLayouts(t,n).filter((t=>e===t.cId))[0]},getMeasureLayouts(e,t){const n=yh.getValue(e,t?`${t}.qHyperCube`:"qHyperCube",null);return n?n.qMeasureInfo:[]},getMeasureLayout(e,t,n){return this.getMeasureLayouts(t,n).filter((t=>e===t.cId))[0]}};const bh={colorModeOptions:{primary:()=>!0,dimension:()=>!0,multiColor:()=>!1,measure:()=>!0,expression:e=>vh.getNumMeasures(e)>=1},showLegend:e=>{const t=yh.getValue(e,"color.auto"),n=yh.getValue(e,"color.expressionIsColor"),r=yh.getValue(e,"color.mode");return!(!t&&"primary"===r||!t&&"byExpression"===r&&(n||void 0===n))},persistentColorsShow:e=>!yh.getValue(e,"color.auto")&&"byDimension"===yh.getValue(e,"color.mode"),useDimValColShow:e=>(void 0===yh.getValue(e,"color.useDimColVal")&&yh.setValue(e,"color.useDimColVal",!1),!yh.getValue(e,"color.auto")&&"byDimension"===yh.getValue(e,"color.mode")&&"libraryItem"===yh.getValue(e,"color.byDimDef.type"))},xh=function(e){const{colorModeOptions:t,persistentColorsShow:n,useDimValColShow:r,showLegend:i}=bh;this.color={colorMode:{options(n){const r=[];return"explore"===e&&r.push({value:"auto",translation:"Common.Auto"}),t.primary(n)&&r.push({value:"primary",translation:"properties.colorMode.primary"}),t.multiColor(n)&&r.push({value:"byMultiple",translation:"properties.colorMode.multicolored"}),t.dimension(n)&&r.push({value:"byDimension",translation:"properties.colorMode.byDimension"}),t.measure(n)&&r.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"}),t.expression(n)&&"explore"!==e&&r.push({value:"byExpression",translation:"properties.colorMode.byExpression"}),r}},persistentColors:{show:e=>r(e)?n(e)&&!yh.getValue(e,"color.useDimColVal"):n(e)},useDimColVal:{show:r}},this.legend={show:i,showTitle:{show(e){const t=yh.getValue(e,"color.auto");return yh.getValue(e,"legend.show")&&i(e)&&(t||!function(e){return"byExpression"===yh.getValue(e,"color.mode")&&!0===yh.getValue(e,"color.expressionIsColor")}(e))}},dock:{show:e=>yh.getValue(e,"legend.show")&&i(e)}}};function wh(e){return new xh(e)}const Sh={classification:{section:"styling",tags:["simple"],exclusive:!0},component:"items",show:!0,chartType:"piechart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.PieChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,items:{strokeSection:{translation:"properties.Outline",component:"items",items:{strokeItem:{component:"items",ref:"components",key:"slices",items:{strokeWrapper:{component:"inline-wrapper",items:{strokeWidth:{translation:"LayerStyleEditor.style.strokeWidth",ref:"style.strokeWidth",width:9,show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"Common.None"},{value:"small",translation:"Common.Small"},{value:"medium",translation:"Common.Medium"},{value:"large",translation:"Common.Large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",defaultValue:{color:"#FFFFFF"},schemaIgnore:!0,width:3,component:"color-picker"}}}}}}},cornerRadius:{component:"items",translation:"LayerStyleEditor.style.cornerRadius",items:{cornerRadiusItem:{component:"items",ref:"components",key:"slices",items:{cornerRadiusSlider:{ref:"style.cornerRadius",translation:"LayerStyleEditor.style.cornerRadius",component:"slider",min:0,max:40,step:.05,width:12,defaultValue:0,schemaIgnore:!0}}}}},innerRadius:{translation:"LayerStyleEditor.style.innerRadius",component:"items",show:e=>e.donut.showAsDonut,items:{innerRadiusItem:{component:"items",ref:"components",key:"slices",items:{innerRadiusSlider:{ref:"style.innerRadius",translation:"LayerStyleEditor.style.innerRadius",component:"slider",min:.05,max:.75,step:.01,width:12,defaultValue:.55,schemaIgnore:!0}}}}}}},Ch=(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.pieChart",e,"color")})}}}}},Eh={component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:"slices",ref:"components",defaultValues:{key:"slices",style:{strokeColor:{index:-1,color:"#FFFFFF"},strokeWidth:"none",cornerRadius:0,innerRadius:.55}},items:{slices:{components:"items",type:"items",uses:"styling.slice",items:{strokeWidth:{show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"LayerStyleEditor.style.strokeWidth.none"},{value:"small",translation:"LayerStyleEditor.style.strokeWidth.small"},{value:"medium",translation:"LayerStyleEditor.style.strokeWidth.medium"},{value:"large",translation:"LayerStyleEditor.style.strokeWidth.large"}],defaultValue:"none"},strokeColor:{show:e=>"none"!==e.style.strokeWidth},cornerRadius:{component:"slider",min:0,max:40,step:.05,defaultValue:0,show:!0},innerRadius:{component:"slider",min:.05,max:.75,step:.01,defaultValue:.55,show:(e,t,n)=>n.layout.donut.showAsDonut}}}}},kh=(e,t,n,r)=>{const i=f({theme:r,translator:n,flags:t,config:{id:"pieChart",paths:["axis.title","label.name","label.value","legend.title","legend.label"]}});return{component:"styling-panel",chartTitle:"Object.PieChart",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:e,items:{strokeSection:{translation:"properties.Outline",component:"panel-section",items:{strokeItem:{component:"items",ref:"components",key:"slices",items:{strokeWrapper:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:9,show:!0,component:"dropdown",type:"string",options:[{value:"none",translation:"Common.None"},{value:"small",translation:"Common.Small"},{value:"medium",translation:"Common.Medium"},{value:"large",translation:"Common.Large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",defaultValue:{color:"#FFFFFF"},schemaIgnore:!0,width:3,component:"color-picker"}}}}}}},cornerRadius:{translation:"LayerStyleEditor.style.cornerRadius",component:"panel-section",items:{cornerRadiusItem:{component:"items",ref:"components",key:"slices",items:{cornerRadiusSlider:{ref:"style.cornerRadius",component:"slider",min:0,max:40,step:.05,width:12,defaultValue:0,schemaIgnore:!0}}}}},innerRadius:{translation:"LayerStyleEditor.style.innerRadius",component:"panel-section",show:e=>e.donut.showAsDonut,items:{innerRadiusItem:{component:"items",ref:"components",key:"slices",items:{innerRadiusSlider:{ref:"style.innerRadius",component:"slider",min:.05,max:.75,step:.01,width:12,defaultValue:.55,schemaIgnore:!0}}}}},axisTitleSection:null!=t&&t.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.dimensionlabels",component:"panel-section",items:{axisTitleItems:{component:"items",ref:"components",key:"axis",items:Ch("axis.title",i,r)}}}:void 0,labelNameSection:null!=t&&t.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.dimensionValueLabel",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"label",items:Ch("label.name",i,r)}}}:void 0,labelValueSection:null!=t&&t.isEnabled("CLIENT_IM_3050")?{translation:"properties.value.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"label",items:Ch("label.value",i,r)}}}:void 0,legendTitleSection:null!=t&&t.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.title",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"legend",items:Ch("legend.title",i,r)}}}:void 0,legendLabelSection:null!=t&&t.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"legend",items:Ch("legend.label",i,r)}}}:void 0}}},Th=wh("hard");const Rh=e=>{var t;null!==(t=e.color)&&void 0!==t&&t.auto||(o(e,"color.mode","byDimension"),o(e,"color.byDimDef.activeDimensionIndex",0),o(e,"color.persistent",!1))},Dh=e=>{var t;const n=[{value:"primary",translation:"properties.colorMode.primary"},{value:"byDimension",translation:"properties.colorMode.byDimension"}];switch(null===(t=e.color)||void 0===t?void 0:t.mode){case"byMultiple":n.push({value:"byMultiple",translation:"properties.colorMode.multicolored"});break;case"byMeasure":n.push({value:"byMeasure",translation:"properties.colorMode.byMeasure"});break;case"byExpression":n.push({value:"byExpression",translation:"properties.colorMode.byExpression"})}return n},Mh=e=>{var t;const{flags:n,translator:r}=e||{},i=null==e||null===(t=e.sense)||void 0===t?void 0:t.theme,a=null==n?void 0:n.isEnabled("SENSECLIENT_IM_2429_PIECHART_BG"),s={items:{simpleItems:{items:{autoColor:{label:e=>{var t;return null!==(t=e.color)&&void 0!==t&&t.auto?r.get("Simple.Color.Auto",r.get("properties.colorMode.byDimension")):r.get("Common.Custom")},change:Rh},colorMode:{options:Dh}}}}},l={items:{labels:{items:{header:{show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length},pointLabels:{component:"checkbox",ref:"dataPoint.auto",type:"boolean",defaultValue:!0,translation:"Simple.Label.Value",show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length,change(e){e.dataPoint.auto||o(e,"dataPoint.labelMode","none")}},dimensionTitle:{component:"checkbox",ref:"dimensionTitle",type:"string",translation:"Simple.Label.Dimension.Hide",defaultValue:"all",show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length,convertFunctions:{get:(e,t,n,r)=>!r.dimensionTitle,set(e,t,n,r,i){i.dimensionTitle=!e}}}}}}},u={uses:"settings",items:{simpleStyling:null!=n&&n.isEnabled("PIECHART_SIMPLE_STYLING")?Sh:void 0,simpleLabels:l,general:{items:{showDisclaimer:null!=n&&n.isEnabled("SHOW_DISCLAIMER")?{translation:"properties.showDisclaimer",type:"boolean",ref:"showDisclaimer",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Show"},{value:!1,translation:"properties.hide"}]}:void 0}},presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{sliceStyling:null!=n&&n.isEnabled("SENSECLIENT_PS_17478_STYLINGPANEL_PIECHART")?kh(a,n,r,i):Eh,showAsDonut:{ref:"donut.showAsDonut",type:"boolean",component:"item-selection-list",defaultValue:!1,horizontal:!0,items:[{icon:"pie_chart_pie",component:"icon-item",labelPlacement:"bottom",translation:"properties.pie",value:!1},{icon:"pie_chart_donut",component:"icon-item",labelPlacement:"bottom",translation:"properties.donut",value:!0}]},labels:{type:"items",snapshot:{tid:"property-labels"},items:{dimensionTitle:{ref:"dimensionTitle",type:"boolean",component:"switch",translation:"properties.dataPoints.dimensionlabels",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]},valuesAuto:{ref:"dataPoint.auto",type:"boolean",translation:"properties.dataPoints.labelmode",component:"switch",defaultValue:!0,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}]},labelMode:{ref:"dataPoint.labelMode",type:"string",component:"dropdown",options:[{value:"none",translation:"Common.None"},{value:"share",translation:"properties.dataPoints.labelmode.share"},{value:"value",translation:"properties.dataPoints.labelmode.value"}],defaultValue:"share",show:e=>!e.dataPoint.auto},labelValueMode:{ref:"dataPoint.labelValueMode",type:"string",component:"dropdown",translation:"properties.dataPoints.labelvaluemode",options:[{value:"arc",translation:"Visualizations.Descriptions.Angle"},{value:"radius",translation:"Visualizations.Descriptions.Radius"}],defaultValue:"arc",show:e=>!e.dataPoint.auto&&function(e){return e.qHyperCubeDef&&e.qHyperCubeDef.qMeasures.length>1||e.qHyperCube&&e.qHyperCube.qMeasureInfo.length>1}(e)&&"value"===e.dataPoint.labelMode}}}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:{items:{colorMode:{options:Th.color.colorMode.options},persistentColors:{show:Th.color.persistentColors.show}}},simpleColors:s,legend:{show:Th.legend.show,items:{show:{defaultValue:!1,snapshot:{tid:"property-legend"}},showTitle:{show:Th.legend.showTitle.show},dock:{show:Th.legend.dock.show}}}}},tooltip:{uses:"tooltip"}}};return u},qh={uses:"data",items:{dimensions:{uses:"dimensions"},measures:{uses:"measures",items:{numberFormatting:{items:{percentOfPieMessage:{component:"text",translation:"properties.numberFormatting.pieMessage",show:(e,t,{properties:n}={})=>n&&(n.dataPoint.auto||"share"!==n.dataPoint.labelMode)}}}}}}},Ph={uses:"sorting",items:{interColumnSorting:{reset:e=>{const{qDimensions:t,qMeasures:n,qInterColumnSortOrder:r}=e.qHyperCubeDef;if(1===t.length&&n.length>=1){const t=r.length,n=[...Array(t).keys()];[n[0],n[1]]=[n[1],n[0]],e.qHyperCubeDef.qInterColumnSortOrder=n}}}}},Nh={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{suppressZero:null,calcCond:{uses:"calcCond"}}}}};function Lh(e){return{type:"items",component:"accordion",items:{data:qh,sorting:Ph,addons:Nh,settings:Mh(e)}}}const Ih=wh("explore"),Ah=Lh();var Oh={type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sort"},presentation:{uses:"presentation",items:{showAsDonut:Ah.items.settings.items.presentation.items.showAsDonut,labelMode:{type:"items",items:{labelMode:{type:"string",component:"radio-list",translation:"properties.dataPoints.labelmode",diffs:["dataPoint.auto:false","dataPoint.labelMode"],options:Ah.items.settings.items.presentation.items.labels.items.labelMode.options,setPropertyValue(e,t){e.dataPoint.auto=!1,e.dataPoint.labelMode=t},getValue:e=>e.dataPoint.auto?"":e.dataPoint.labelMode}}}}},color:{uses:"color",items:{mode:{options:Ih.color.colorMode.options},dimension:{items:{persistentColors:{show:e=>!(e.color&&"byDimension"===e.color.mode&&e.color.useDimColVal&&Ih.color.useDimColVal.show(e))}}}}}}};const zh="slices";function jh(e,t){const n=e&&e.desc&&void 0!==e.desc.share?e.desc.share:void 0;return t("share")(n)}function Fh(e){return e.data.num.label}function Hh(e){return e.data.radius.label}function $h(e,t,n,r){return function(e,t){if(e.dataPoint.auto)return 1===e.qHyperCube.qSize.qcy?Fh:jh;if("share"===e.dataPoint.labelMode)return jh;if("value"===e.dataPoint.labelMode)return t.encodings.slice.outerRadius&&"radius"===e.dataPoint.labelValueMode?Hh:Fh;return Fh}(n,r)(e,t)}function _h(e){let t;return t=e.data.label?function(e,t){let n=e;return n.length>t&&(n=`${n.substr(0,t-3)}...`),n}(e.data.label,20):"",t}class Uh{constructor({element:e,properties:t,effectHelper:n,Flag:r}){this.element=e,this.Flag=r,n.initFade(this.element);const i=e.find(".effectLayer");i.length>0&&i.remove(),e.append('<div class="effectLayer"></div>'),this.effectLayer=e.find(".effectLayer"),this._effectProperties=t,this.selectedIndex=t.selectedIndex,this.hasPropertiesPanel=!1,this.effectApplied=!0,n.fadeIn(this.element)}updateOrigSettings(e){return{dataPoint:e.dataPoint,legend:e.legend,dimensionTitle:e.dimensionTitle}}updateFlags(e,t){const n=this.chart.getAffectedShapes("highlight"),r=this.effectLayer[0].getBoundingClientRect(),i=n.map((n=>{const{start:i,end:o,outerRadius:a,offset:s}=n.desc.slice,{scaleRatio:l}=this.chart.component(n.key).rect,u=n.element.getBoundingClientRect(),c=(i+o)/2,d=u.left-r.left+l.x*(s.x+a*Math.sin(c)),p=u.top-r.top+l.y*(s.y-a*Math.cos(c)),h=Math.cos(c)>0?"top":"bottom",f=Math.sin(c)>0?"right":"left";return{title:_h(n),label:$h(n,this.chart.formatter,e,t),orientation:`${h}${f}`,position:{x:d,y:p}}}));this.Flag.show(this.effectLayer,i)}init(e,t,n,r){return t.getProperties().then((e=>{if(!e.originalModelSettings){const t=ie(!0,{},e);e.originalModelSettings=this.updateOrigSettings(t)}e.effectProperties=r,e.effectPath=n,e.dataPoint.show=!1,e.legend.show=!1,e.dimensionTitle=!1,t.setProperties(e)}))}remove(e,t,n){return e.options=ie(e.options,{effect:null}),n?t.getProperties().then((e=>ie(e,{effectPath:null,effectProperties:null,dataPoint:ie(!0,{},e.originalModelSettings.dataPoint),legend:ie(!0,{},e.originalModelSettings.legend),dimensionTitle:e.originalModelSettings.dimensionTitle}))):Promise.resolve()}}class Vh extends Uh{init(e,t,n,r){return e.options=ie(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.max===r.max?Promise.resolve():super.init(e,t,n,r)}update(e,t,n){this.chart=t,this.updateHighlight(e),this.updateFlags(e,n)}updateHighlight(e){const t=this.chart.component(zh).data.items,n=e.effectProperties.min,r=e.effectProperties.max,i=[];let o=[1/0,-1],a=[-1/0,-1];t.forEach(((e,t)=>{const i=e.num.value;n&&i<o[0]&&(o=[i,t]),r&&i>a[0]&&(a=[i,t])})),-1!==o[1]&&i.push(t[o[1]].value),-1!==a[1]&&i.push(t[a[1]].value),i.length&&this.chart.brush("highlight").setValues(i.map((e=>({key:"qHyperCube/qDimensionInfo/0",value:e}))))}}class Wh extends Uh{constructor(e){super(e),this.hasPropertiesPanel=!0,this.propsTemplate=e.highlightValuePropsTemplate,this.effectHelper=e.effectHelper}onClick(e){if(!this.chart)return;const t=this.chart.shapesAt(function(e,t){const n=t.element.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}(e,this.chart),{propagation:"stop"});if(1!==t.length)return;const n=t[0],r=this.chart.component(zh).data.items.map((e=>e.value)),i=r.indexOf(n.data.value);-1!==i&&(this.selectedIndex=i,this.effectHelper.updateSelectedPointIndex(this))}update(e,t,n){this.chart=t,this.updateHighlight(e),this.updateDataPoints(e,n),this.updateFlags(e,n)}updateHighlight(e){const t=this.chart.component(zh).data.items[e.effectProperties.selectedIndex];this.chart.brush("highlight").setValues([{key:"qHyperCube/qDimensionInfo/0",value:t.value}])}updateDataPoints(e,t){this.dataPoints=this.chart.findShapes("path").filter((e=>e.key===zh)).map(((n,r)=>{const i=$h(n,this.chart.formatter,e,t);return{text:`${_h(n)} (${i})`,value:r}}))}init(e,t,n,r){return e.options=ie(!0,e.options,{effect:this}),t.layout.effectProperties&&t.layout.effectPath===n&&t.layout.effectProperties.selectedIndex===r.selectedIndex?Promise.resolve():super.init(e,t,n,r)}}const Bh="/effects/highlight-value",Yh="/effects/maxmin";var Kh={isCompatible:({effectPath:e})=>e===Yh||e===Bh,create:e=>e.effectPath===Yh?new Vh(e):e.effectPath===Bh?new Wh(e):null};function Gh(e){const t={},{components:n,tooltip:r}=e,i=n?n.filter((e=>"slices"===e.key))[0]:void 0;if(i&&i.style&&Object.keys(i.style).forEach((e=>{t[`chart_style_${e}`]=i.style[e]})),r){var o;t.chart_tooltip_custom=!r.auto;const e=null===(o=r.chart)||void 0===o||null===(o=o.object)||void 0===o?void 0:o.refId;!r.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}function Jh(e){if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qDimensions,n=e.qHyperCubeDef.qMeasures;1===t.length&&1===n.length&&(n[0].qSortBy.qSortByNumeric=-1,e.qHyperCubeDef.qInterColumnSortOrder.splice(0,e.qHyperCubeDef.qInterColumnSortOrder.length,1,0))}function Zh(e){e.qOtherTotalSpec.qOtherMode="OTHER_COUNTED",e.qOtherTotalSpec.qOtherCounted={qv:"10"}}function Xh({translator:e}){return{dimensions:{min:1,max:1,description:()=>e.get("Visualizations.Descriptions.Slice"),add(e,t){Zh(e),Jh(t),yp.addCallbackCustomTooltip(t)},move(e,t){Zh(e),Jh(t),yp.moveCallbackCustomTooltip(t,e)},remove(e,t){yp.removeCallbackCustomTooltip(t,e)},replace(e,t,n,r){Zh(e),Jh(r),yp.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:2,description:(t,n)=>e.get(0===n?"Visualizations.Descriptions.Angle":"Visualizations.Descriptions.Radius"),add(e,t){Jh(t)},remove(e,t){!function(e){if(!e.qHyperCubeDef)return;const t=e.qHyperCubeDef.qMeasures,{mode:n}=e.color;"byExpression"===n&&0===t.length&&(e.color.mode="primary")}(t)}}}}const Qh=e=>e.qMax<=0,ef=e=>!(!(e&&e.qHyperCube.qSize.qcy>0)||e.qHyperCube.qMeasureInfo.every(Qh));function tf(e){return{definition:Lh(e),softDefinition:Oh,support:{snapshot:ef,export:ef,exportData:!0,sharing:ef,viewData:!0,effects:!0},effects:Kh,extendMetrics:Gh,importProperties:(t,n,r,i)=>{const o={layout:{templateId:n.templateId}};r.mapProperties(o);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=_.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:Xh(e),defaultPropertyValues:a,hypercubePath:i});return s.qProperty.dataPoint&&!1===s.qProperty.dataPoint.show&&delete s.qProperty.dataPoint.show,s},exportProperties:(e,t,n)=>_.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:n})}}function nf(e){return{properties:{version:"1.26.9",color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",formatting:{numFormatFromTemplate:!0,isCustomFormatted:void 0},measureMin:void 0,measureMax:void 0,measureScheme:"sg",mode:"primary",paletteColor:{index:6},persistent:!1,reverseScheme:!1,singleColor:void 0,useBaseColors:"off",useDimColVal:!0,useMeasureGradient:!0},components:[{key:"slices",style:{strokeWidth:"none",strokeColor:{index:-1,color:Lp.STROKE.COLOR},cornerRadius:Lp.CORNER_RADIUS,innerRadius:Lp.INNER_RADIUS}}],dataPoint:{auto:!0,labelMode:"share",labelValueMode:"arc"},dimensionTitle:!0,donut:{showAsDonut:!1},footnote:"",legend:{dock:"auto",show:!0,showTitle:!0},qHyperCubeDef:{qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:10,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1,qMode:"S"},showDetails:!0,showDisclaimer:!0,showTitles:!0,subtitle:"",title:"",tooltip:{auto:!0,hideBasic:!1,data:{qHyperCubeDef:void 0},chart:void 0,imageComponents:void 0}},data:{targets:[Xh(e)]},importProperties:({exportFormat:t,initialProperties:n,hypercubePath:r})=>{const i=_.colorChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:Xh(e),hypercubePath:r});return i.qProperty.dataPoint&&!1===i.qProperty.dataPoint.show&&delete i.qProperty.dataPoint.show,i},exportProperties:({propertyTree:e,hypercubePath:t,viewDataMode:n})=>_.colorChart.exportProperties({propertyTree:e,hypercubePath:t,viewDataMode:n})}}e("default",(e=>{const{flags:t}=e;!function(e){if(e&&e.get&&e.add){const t="Object.Disclaimer.LimitedData";if(e.get(t)!==t)return;Object.keys(U).forEach((t=>{e.add(U[t])}))}}(e.translator);const n=Zd();return{qae:nf(e),ext:tf(e),component(){const e=rp({picasso:n}),r=function({flags:e,picasso:t,instance:n}){const r=q(),i=P(),o=R(),a=C(),[s,l]=k(),u=N(),h=L(),f=I(),m=S(),g=A(),{qLocaleInfo:y}=O(),v=z();return M((()=>{if(!n)return;a.style.overflow="hidden";const s=c({picasso:n.picasso,model:r,app:i,translator:o,config:{auto:!1,key:"fill"}}),b=d({picassoInstance:n.picasso,plugins:h,pluginArgs:Rp(u)}),x=Tp({flags:e,layout:u,app:i,model:r,picasso:t,chart:n.chart,translator:o,localeInfo:y,embed:v,options:m}),w=p({theme:g,config:{id:"pieChart",resolve:[["object","label.name","color","#595959"],["object","label.name","fontFamily"],["object","label.name","fontSize","12px"]]}}),S=Dp({app:i,chart:n.chart,translator:o,layout:u,constraints:f,options:m,themeService:w,colorService:s,custom:x}),C=function({layout:e,themeService:t,flags:n}){const r=t.getStyles(),i=t=>{var r;return n.isEnabled("CLIENT_IM_3050")?null===(r=e.components)||void 0===r?void 0:r.find((e=>e.key===t)):void 0};return{axis:{title:{getStyle:()=>{var e,t,n,o,a,s;return{fontFamily:null!==(e=null===(t=i("axis"))||void 0===t||null===(t=t.axis)||void 0===t||null===(t=t.title)||void 0===t?void 0:t.fontFamily)&&void 0!==e?e:r.axis.title.fontFamily,fontSize:null!==(n=null===(o=i("axis"))||void 0===o||null===(o=o.axis)||void 0===o||null===(o=o.title)||void 0===o?void 0:o.fontSize)&&void 0!==n?n:r.axis.title.fontSize,color:null!==(a=null===(s=i("axis"))||void 0===s||null===(s=s.axis)||void 0===s||null===(s=s.title)||void 0===s||null===(s=s.color)||void 0===s?void 0:s.color)&&void 0!==a?a:r.axis.title.color}}}},label:{name:{getStyle:()=>{var e,t,n,o,a,s;return{fill:null!==(e=null===(t=i("label"))||void 0===t||null===(t=t.label)||void 0===t||null===(t=t.name)||void 0===t||null===(t=t.color)||void 0===t?void 0:t.color)&&void 0!==e?e:r.label.name.color,fontSize:null!==(n=null===(o=i("label"))||void 0===o||null===(o=o.label)||void 0===o||null===(o=o.name)||void 0===o?void 0:o.fontSize)&&void 0!==n?n:r.label.name.fontSize,fontFamily:null!==(a=null===(s=i("label"))||void 0===s||null===(s=s.label)||void 0===s||null===(s=s.name)||void 0===s?void 0:s.fontFamily)&&void 0!==a?a:r.label.name.fontFamily}}},value:{getStyle:()=>{var e,t,n,o,a,s;return{fill:null!==(e=null===(t=i("label"))||void 0===t||null===(t=t.label)||void 0===t||null===(t=t.value)||void 0===t||null===(t=t.color)||void 0===t?void 0:t.color)&&void 0!==e?e:r.label.value.color,fontSize:null!==(n=null===(o=i("label"))||void 0===o||null===(o=o.label)||void 0===o||null===(o=o.value)||void 0===o?void 0:o.fontSize)&&void 0!==n?n:r.label.value.fontSize,fontFamily:null!==(a=null===(s=i("label"))||void 0===s||null===(s=s.label)||void 0===s||null===(s=s.value)||void 0===s?void 0:s.fontFamily)&&void 0!==a?a:r.label.value.fontFamily}}}},legend:{title:{getStyle:()=>{var e,t,n,o,a,s;return{fontFamily:null!==(e=null===(t=i("legend"))||void 0===t||null===(t=t.legend)||void 0===t||null===(t=t.title)||void 0===t?void 0:t.fontFamily)&&void 0!==e?e:r.legend.title.fontFamily,fontSize:null!==(n=null===(o=i("legend"))||void 0===o||null===(o=o.legend)||void 0===o||null===(o=o.title)||void 0===o?void 0:o.fontSize)&&void 0!==n?n:r.legend.title.fontSize,color:null!==(a=null===(s=i("legend"))||void 0===s||null===(s=s.legend)||void 0===s||null===(s=s.title)||void 0===s||null===(s=s.color)||void 0===s?void 0:s.color)&&void 0!==a?a:r.legend.title.color}}},label:{getStyle:()=>{var e,t,n,o,a,s;return{fontFamily:null!==(e=null===(t=i("legend"))||void 0===t||null===(t=t.legend)||void 0===t||null===(t=t.label)||void 0===t?void 0:t.fontFamily)&&void 0!==e?e:r.legend.label.fontFamily,fontSize:null!==(n=null===(o=i("legend"))||void 0===o||null===(o=o.legend)||void 0===o||null===(o=o.label)||void 0===o?void 0:o.fontSize)&&void 0!==n?n:r.legend.label.fontSize,color:null!==(a=null===(s=i("legend"))||void 0===s||null===(s=s.legend)||void 0===s||null===(s=s.label)||void 0===s||null===(s=s.color)||void 0===s?void 0:s.color)&&void 0!==a?a:r.legend.label.color}}}}}}({layout:u,themeService:w,flags:e});l({colorService:s,pluginService:b,themeService:w,tooltipService:S,styleService:C})}),[r,i,n,u,o.language(),f,m.direction,g.name()]),s}({flags:t,picasso:n,instance:e});fh({instance:e,services:r,picasso:n,flags:t}),function({instance:e}){const t=N(),n=S(),r=F();M((()=>{if(!e||!e.generateSettings)return;const{viewCache:r,chart:i,generateSettings:o}=e;i.update({settings:o()}),r.set("chartWidth",i.element.clientWidth),r.set("chartHeight",i.element.clientHeight),n.effect&&n.effect.update(t,i)}),[r.width,r.height])}({instance:e}),gh({instance:e,services:r})}}}))}}}));
|