@nebula.js/sn-combo-chart 1.23.7 → 1.24.1
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 -12
- package/dist/sn-combo-chart.js +19 -49
- package/dist/sn-combo-chart.systemjs.js +10 -34
- package/package.json +1 -1
- package/sn-combo-chart-ext/dist/sn-combo-chart.js +19 -49
- package/sn-combo-chart-ext/sn-combo-chart.qext +1 -1
|
@@ -1,47 +1,23 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/sn-combo-chart v1.
|
|
2
|
+
* @nebula.js/sn-combo-chart v1.24.1
|
|
3
3
|
* Copyright (c) 2023 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
System.register(["@nebula.js/stardust","qlik-chart-modules","hammerjs","picasso.js","picasso-plugin-q","react","react-dom","qlik-object-conversion"],(function(e){"use strict";var t,n,r,o,i,a,s,l,c,u,d,p,m,f,h,g,v,y,b,x,S,E,M,C,w,k,N,T,O,R,A,L,I,P,D,q,z,$,B,F,H,j,V,W;return{setters:[function(e){t=e.useElement,n=e.useState,r=e.useEffect,o=e.useRect,i=e.usePromise,a=e.useStaleLayout,s=e.useModel,l=e.useApp,c=e.useAppLayout,u=e.usePlugins,d=e.useEmbed,p=e.useOptions,m=e.useTranslator,f=e.useTheme,h=e.useDeviceType,g=e.useConstraints,v=e.useLayout,y=e.useAction,b=e.useSelections,x=e.onTakeSnapshot,S=e.useImperativeHandle},function(e){E=e.getValue,M=e.setValue,C=e.cache,w=e.debouncer,k=e.throttler,N=e.colorService,T=e.tooltipService,O=e.layoutService,R=e.dockService,A=e.themeService,L=e.pluginService,I=e.storage,P=e.selectionService,D=e.fontResolver},function(e){q=e.default},function(e){z=e.default},function(e){$=e.default},function(e){B=e.default,F=e.Children,H=e.isValidElement,j=e.cloneElement},function(e){V=e.default},function(e){W=e.default}],execute:function(){e("default",(function(e){var b,M;const{flags:w}=e,N=null===(b=e.anything)||void 0===b||null===(M=b.sense)||void 0===M?void 0:M.isUnsupportedFeature,T=(()=>{const e=z();return e.use($),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",Sp(e))};return void e.interaction("hammer",Sp(Hammer))}(q)),e.use(_w),e.use(function(){return function(e){e.renderer("react",function(){function e({x:e,y:t,width:n,height:r,scaleRatio:o,margin:i}={}){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!==o&&(a.scaleRatio.x=Number.isNaN(o.x)?a.scaleRatio.x:o.x,a.scaleRatio.y=Number.isNaN(o.y)?a.scaleRatio.y:o.y),void 0!==i&&(a.margin.left=Number.isNaN(i.left)?0:i.left,a.margin.top=Number.isNaN(i.top)?0:i.top),a}return function(t={}){const{createElement:n=document.createElement.bind(document)}=t;let r,o=e();const i={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=o.scaleRatio.x,n=o.scaleRatio.y;return r.style.left=Math.round(o.margin.left+o.x*t)+"px",r.style.top=Math.round(o.margin.top+o.y*n)+"px",r.style.width=Math.round(o.width)+"px",r.style.height=Math.round(o.height)+"px",r.style.transform=`scale(${t}, ${n})`,r.style.transformOrigin="top left",V.render(function(e,t){return B.createElement(Hg,{generateClassName:t},B.createElement(hv,{theme:jw},e))}(e,Vw),r),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(r&&V.unmountComponentAtNode(r),i),destroy(){r&&r.parentElement&&(V.unmountComponentAtNode(r),r.parentElement.removeChild(r)),r=null},size:t=>(t&&(o=e(t)),o)};return i}}()),e.component("data-title",function(e){function t({title:e,selected:t,onClick:n}){const r=Se.detectTextDirection(e);return B.createElement(BS,{role:"menuitem",button:!0,onClick:n,style:{textAlign:"start"}},B.createElement(jS,{style:{minWidth:32}},B.createElement(Nw,{d:t?Rw:""})),B.createElement(_S,{primaryTypographyProps:{dir:r}},e))}function n({alignTo:e,changeTo:n,current:r,dir:o,dock:i,list:a,onClose:s,show:l,instruction:c}){const u=a.map((e=>B.createElement(t,{key:e.id,title:e.title,onClick:()=>n(e.id)})));return B.createElement(ZS,Ep({anchorEl:e,open:l,onClose:s},Fw[i],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),B.createElement(qS,{dense:!0,dir:o,"aria-label":c,component:"nav"},B.createElement(t,{title:r,selected:!0,onClick:s}),u))}t.propTypes={title:Mp.exports.string.isRequired,selected:Mp.exports.bool,onClick:Mp.exports.func.isRequired},t.defaultProps={selected:!1},n.propTypes={alignTo:Mp.exports.any,changeTo:Mp.exports.func.isRequired,current:Mp.exports.string.isRequired,dir:Mp.exports.string.isRequired,dock:Mp.exports.string.isRequired,list:Mp.exports.array,onClose:Mp.exports.func.isRequired,show:Mp.exports.bool.isRequired,instruction:Mp.exports.string.isRequired},n.defaultProps={list:[],alignTo:null};class r extends B.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=B.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()}openPopover(){this.state.closeTime&&Date.now()-this.state.closeTime<20||this.props.popover.getAlternatives().then((e=>{this.setState({open:!0,alternatives:e})}))}closePopover(){this.setState({open:!1,closeTime:Date.now()})}render(){const{titleData:e,popover:t,translator:r,disabled:o,isDimension:i,padding:a,minWidth:s,hasAlternative:l,supportConditional:c}=this.props,u={flex:"1 1 auto",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:"normal",lineHeight:"normal",...this.props.style},d=e.breadcrumbs.length,p=o||this.state.inSelection,m=e.breadcrumbs.map(((t,n)=>B.createElement(Hw,{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},B.createElement("span",{style:u},t),B.createElement(Nw,Ep({},Lw,{size:"small",style:{margin:"0 8px"}}))))),f=c?this.state.hasValidAlternatives:l,h=t&&!this.state.open?this.openPopover:this.closePopover,g=!t||o||this.state.inSelection,v={display:"flex",alignItems:"center",width:"100%",color:g&&"rgba(89, 89, 89, 0.8)",height:"100%",border:!i&&g&&"none",paddingTop:0,paddingBottom:0};this.state.open&&(v.background="rgba(0,0,0,0.08)");const y=e=>{e.currentTarget.style.boxShadow="0px 0px 0px 2px #177FE6 inset",e.currentTarget.style.borderRadius="2px"},b=e=>{e.currentTarget.style.boxShadow="none",e.currentTarget.style.borderRadius="0px"};a&&(v.padding=a),s&&(v.minWidth=s);const x=Se.detectTextDirection(e.text),S=B.createElement(Hw,{"aria-label":r.get("Accessibility.Alternative.Instructions",[e.text]),style:v,onClick:g?void 0:h,title:e.text,tabIndex:g?-1:0,onFocus:g?void 0:y,onBlur:g?void 0:b,onMouseDown:e=>{e.preventDefault()}},e.locked&&B.createElement(Nw,Ep({},Ow,{size:"small",title:r.get("Tooltip.selections.locked")})),B.createElement("span",{style:u,dir:x},e.text),t&&f&&B.createElement(Nw,Ep({},Aw,{size:"small",style:{margin:"0 8px"}})));return B.createElement(B.Fragment,null,e.drilldown&&B.createElement(Nw,Ep({},Tw,{size:"small",title:r.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),m,B.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:f?"auto":"none",height:"100%"}},S),t&&f&&B.createElement(n,{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:r.get("Accessibility.Popover.Instructions")}))}}function o(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}function i(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function a(e){return!e.isDimension&&ce(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}function s(e){return e.isDimension&&ce(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0}return r.propTypes={disabled:Mp.exports.bool.isRequired,padding:Mp.exports.string,minWidth:Mp.exports.string,titleData:Mp.exports.shape({breadcrumbs:Mp.exports.arrayOf(Mp.exports.string).isRequired,drilldown:Mp.exports.bool.isRequired,index:Mp.exports.number.isRequired,locked:Mp.exports.bool.isRequired,text:Mp.exports.string.isRequired,popoverText:Mp.exports.string.isRequired,drillUp:Mp.exports.func,id:Mp.exports.string.isRequired}).isRequired,popover:Mp.exports.shape({dir:Mp.exports.string.isRequired,dock:Mp.exports.string.isRequired,changeTo:Mp.exports.func.isRequired,getAlternatives:Mp.exports.func.isRequired}),translator:Mp.exports.shape({get:Mp.exports.func.isRequired}).isRequired,selections:Mp.exports.shape({isActive:Mp.exports.func,addListener:Mp.exports.func,removeListener:Mp.exports.func}),style:Mp.exports.shape({fontSize:Mp.exports.string,color:Mp.exports.string,fontFamily:Mp.exports.string}).isRequired,isDimension:Mp.exports.bool.isRequired,hasAlternative:Mp.exports.bool.isRequired,supportConditional:Mp.exports.bool.isRequired},r.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:l,hyperCubeDef:c,isDimension:u,minWidth:d,model:p,onChangeToAlternative:m,padding:f,rtl:h,selections:g,skipAttributeExpressions:v,translator:y,supportConditional:b=!1},layout:{dock:x}}=this.settings,S="top"!==x&&"bottom"!==x||!h?"ltr":"rtl",E=o(x,this.rect),M=c&&c.qLayoutExclude&&c.qLayoutExclude.qHyperCubeDef,C=M&&M[u?"qDimensions":"qMeasures"]||[],w=n||l[u?"qDimensionInfo":"qMeasureInfo"],k=u?qw:$w,N=u?zw:Bw,T=p&&p.colorSupport&&p.modifiers&&k({altList:C,app:e,dir:h?"rtl":"ltr",dock:i(x),model:p,onChange:m,skipAttributeExpressions:v,translator:y}),O=s(this.settings.settings)||a(this.settings.settings),R=w.map(((e,n)=>{const o="number"==typeof e.explicitColumn?e.explicitColumn:n,i=N(e,o,p),a=n===w.length-1;return B.createElement(B.Fragment,{key:e.cId},B.createElement(r,{popover:T,titleData:i,model:p,translator:y,selections:g,disabled:t(),style:this.style,isDimension:u,padding:f,minWidth:d,hasAlternative:O,supportConditional:b}),!a&&B.createElement("span",{style:{lineHeight:"normal",...this.style}},", "))}));return B.createElement("div",{style:E,dir:S},R)}}}(e.renderer("svg")())),e.component("disclaimer",function(){class e extends B.Component{render(){const{label:e,spanStyle:t}=this.props;return B.createElement(B.Fragment,null,B.createElement("span",{ref:this.alignToRef,style:t,title:e},e))}}function t(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:case"top":case"bottom":r.justifyContent="flex-start",r.alignItems="flex-start"}return r}return e.propTypes={label:Mp.exports.string.isRequired,spanStyle:Mp.exports.shape().isRequired},{renderer:"react",disableTriggers:!0,preferredSize:function(){return 22},render(){const{settings:{label:n,rtl:r},layout:{dock:o},style:i={}}=this.settings,a="top"!==o&&"bottom"!==o||!r?"ltr":"rtl",s=t(i,o,this.rect),l="center"===o?n:"* "+n,c="center"!==o?{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}:{};return B.createElement("div",{style:s,dir:a},B.createElement(B.Fragment,null,B.createElement(e,{label:l,spanStyle:c})))}}}())}}()),e.component("scrollbar",ll),e.component("point-label",rN),e.component("label-space",oN),e.component("time-axis",Zd.picassoComponents.timeAxis),e.component("axis-overlay",Zd.picassoComponents.axisOverlay),e.component("reference-line-labels",ja),e.component("box-sliced-hat",tk),e.component("box-out-of-bounds",Xw),e.component("data-out-of-bounds-marker",iN),e.component("scroll-hint",_i),e.component("brush-highlighter",gN),e.scale("time",Zd.picassoScales.time),e.symbol("line-point",aN),e})();return{qae:cA(e),ext:PA(e),component(){const e=function(){const[e,t]=n();return r((()=>t(C())),[]),e}(),b=function(){const[e,t]=n();return r((()=>{t(I({viewRange:[0,1],scrollOffset:void 0}))}),[]),e}(),M=function(){const e=p(),t=m(),o=d(),i=f(),[a,s]=n(),l=h();return r((()=>{s({options:{direction:"ltr",...e},translator:t,theme:i,embed:o,deviceType:l})}),[e.direction,e.freeResize,t.language(),i.name(),l]),a}(),P=function(){const e=g(),[t,o]=n(!1),[i,a]=n(!1),[s,l]=n(!1),c=function(){const e=g(),[t,o]=n(!1),[i,a]=n({}),[s,l]=n();return r((()=>()=>{a({})}),[]),r((()=>{e&&o(!e.select&&!e.active)}),[e]),{enabled:()=>t,emit:(e,...t)=>i[e].forEach((e=>e(...t))),removeListener:(e,t)=>{var n;const r=null===(n=i[e])||void 0===n?void 0:n.indexOf(t);r>-1&&i[e].splice(r,1)},on:(e,t)=>{Array.isArray(i[e])?i[e].push(t):i[e]=[t]},get brushSelectionIncludeMax(){return s},set brushSelectionIncludeMax(e){l(e)},getBrushOptions:void 0}}(),u=function(){var e,t,o;const i=g(),[a,s]=n(!1),[l,c]=n(!1),u=v(),d=m(),p=!!u.qSelectionInfo.qInSelections,f=!(null===(e=u.qHyperCube)||void 0===e||null===(t=e.qDimensionInfo)||void 0===t||null===(o=t[0])||void 0===o||!o.qIsOneAndOnlyOne);r((()=>{i&&s(!i.select&&!i.active)}),[i]);const h=e=>{c("boolean"==typeof e?e:!l)};return y((()=>({key:"lasso",label:d.get(l?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),icon:QR,hidden:!a||!p||f,active:l,action:h})),[p,f,l,a,d.language()]),{action:h,enabled:()=>a,active:()=>l}}();let d=eA;r((()=>{e&&(o(!e.active),a(!e.active),l(!e.passive))}),[e]);const[p]=n({});return p.scroll={enabled:()=>t&&d.query.getCanScroll(),attachDiscreteModel:e=>{d=e||eA}},p.interact={enabled:()=>i},p.tooltip={enabled:()=>s},p.lasso=u,p.select=c,p}(),D=function({picasso:e,environment:o}){const i=t(),[a,s]=n();return r((()=>{if(!o)return;i.style.overflow="hidden";const t=e({renderer:{prio:[o.options.renderer||"canvas"]}}).chart({element:i,data:[],settings:{}});s(t);const{destroy:n}=t;return()=>{n()}}),[o]),a}({picasso:T,environment:M}),q=rA({chart:D,actions:P}),z=(({picasso:e,chart:t,environment:p,flags:m,viewState:f,viewCache:h,actions:g,selectionService:v})=>{const y=a(),{width:b,height:x}=o(),[S,M]=n(),[w,N]=n(),T=s(),I=l(),P=c(),D=u(),q=d();r((()=>{if(!(y&&null!=t&&t.update&&p&&f))return;const n=O({source:y,metaAdditionsFn:XO()}),{options:r,translator:o}=p,{direction:i,viewState:a={}}=r,s="rtl"===i,{legendScrollOffset:l,scrollOffset:c}=n.meta.isSnapshot?n.getLayoutValue("snapshotData.content.chartData",{}):a;f.preventSet("scrollOffset",c),f.preventSet("legendScrollOffset",l),f.preventSet("title",n.getLayoutValue("title"));const u=function({genericObjectModel:e,layoutService:t}){const n={cube:void 0,on:!1},r=function({genericObjectModel:e,layoutService:t}){const{isSnapshot:n,isContinuous:r}=t.meta;if(n)return function({layoutService:e}){return function(){return Promise.resolve({reducedCube:e.getLayoutValue("reducedHyperCube")||e.getHyperCube()})}}({layoutService:t});if(r)return function({layoutService:e}){return function(){const t=e.getHyperCube();return Promise.resolve({reducedCube:{...t,qDataPages:[...t.qDataPages]}})}}({layoutService:t});return function({genericObjectModel:e,layoutService:t}){return function(){return function(e,t,n){return e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).catch(he).then((e=>{var n;const r=t.getHyperCubeValue("qMode"),o=t.getHyperCubeValue("qDimensionInfo"),i="K"===r&&o.length>1&&(null===(n=e[0])||void 0===n?void 0:n.qIsReduced),a=e.slice(),s=t.getHyperCubeValue("qMeasureInfo"),l=i?[]:t.getHyperCubeValue("qColumnOrder");return{reducedCube:{qDataPages:a,qDimensionInfo:o.slice(),qEffectiveInterColumnSortOrder:[1,0],qMeasureInfo:i?[s[0],s[0]]:s.slice(),qStackedDataPages:[],qMode:"S",qHasOtherValues:t.getHyperCubeValue("qHasOtherValues"),qSize:t.getHyperCubeValue("qSize"),qColumnOrder:l}}}))}(e,t,{path:"/qHyperCubeDef",rect:JO({layoutService:t}),zoomLevel:-1,filter:"D1"})}}({genericObjectModel:e,layoutService:t})}({genericObjectModel:e,layoutService:t});return{query:{getCube:()=>n.cube,getIsReduced:()=>n.on},command:{initialize:()=>r().then((({reducedCube:e})=>{n.cube=e,n.on=!!(n.cube&&n.cube.qDataPages[0]&&n.cube.qDataPages[0].qIsReduced)})),setSnapshotData:e=>{e.reducedHyperCube=n.cube}}}}({genericObjectModel:T,layoutService:n}),d=R({chart:t,layoutService:n,config:{logicalSize:{width:b,height:x},rtl:s},typeConfig:{type:"major-minor",fallback:"vertical",invert:!0,measureAxes:[{ref:"measureAxes.0",name:"minor"},{ref:"measureAxes.1",name:"minorSecondary"}]}}),S=(({layoutService:e})=>{const t=!KO(e.getLayoutValue("version")),n=e.getHyperCubeValue("qMeasureInfo").map(((e,t)=>{const n={[es.BAR]:0,[es.LINE]:0,[es.MARKER]:0};return({series:r=ns},o)=>{const i=SN(r,t),a=hu(r);return{id:o,type:a,typeIndex:n[a]++,ref:"qMeasureInfo/"+o,refIndex:o,isPrimary:i,scale:i?Qa.SCALE.MINOR.PRIMARY:Qa.SCALE.MINOR.SECONDARY,collection:i?Qa.COLLECTION.PRIMARY:Qa.COLLECTION.SECONDARY,options:xN({series:r,layoutService:e})}}})(e,t)),r=(e,t)=>e.filter((e=>hu(e)===t)).length,o=n.filter((e=>e.isPrimary)),i=n.filter((e=>!e.isPrimary)),a=[!!o.length&&o[0],!!i.length&&i[0]].filter((e=>!!e)),s=r(n,es.BAR),l=r(o,es.BAR),c=r(i,es.BAR),u=e=>n.filter((t=>hu(t)===e)),d=u(es.LINE).map((e=>$l(Qa.COMPONENT.POINT,e))),p=u(es.MARKER).map((e=>({key:$l(Qa.COMPONENT.MARKER,e),type:e.options.marker}))),m=p.map((e=>e.key)),f=[];l>0&&f.push(`${Qa.COMPONENT.BAR}-${ts.PRIMARY}`);c>0&&f.push(`${Qa.COMPONENT.BAR}-${ts.SECONDARY}`);const h=[...f,...d,...m],{MINI_CHART:g}=Qa.COMPONENT,v=u(es.LINE).map((e=>$l(g.LINE,e))),y=u(es.MARKER).map((e=>$l(g.MARKER,e))),b=e.meta.isContinuous?[`${g.BAR}-${ts.PRIMARY}`,`${g.BAR}-${ts.SECONDARY}`,...v,...y]:[];return{meta:{allSeries:n,primarySeries:o,secondarySeries:i,barSeriesCount:s,primaryBarSeriesCount:l,secondaryBarSeriesCount:c,measureAxes:a,pointComponentKeys:d,markerComponentKeys:m,barComponentKeys:f,seriesComponentKeys:h,miniComponentKeys:b,markers:p},query:{all:()=>n,seriesByAxis:e=>e?o:i,series:u,isPrimary:SN}}})({layoutService:n,flags:m}),w=n.meta.isDiscrete?function({chart:e,genericObjectModel:t,layoutService:n,dockService:r,seriesModel:o,viewState:i,rtl:a,actions:s,picasso:l}){const c=Qd(o);return function({chart:e,actions:t,componentKey:n,enigmaModel:r,layoutService:o,dockService:i,trendLineModel:a,itemWidths:s,viewState:l,rtl:c,options:{definitionPath:u="/qHyperCubeDef",getRect:d,axisKey:p,renderer:m,areaBuffer:f,processDataPage:h=(()=>{})}={}}){const g=C(),v=function({qMode:e}){switch(e){case"S":default:return NR;case"K":return TR;case"T":return OR}}({qMode:o.getHyperCubeValue("qMode")}),y=function({state:e,contains:t}){return e.set(RR,[]),{add:t=>{const n=e.get(RR);n.length=0,n.push(t)},getCurrent:()=>e.get(RR)[0],getAll:()=>e.get(RR),contains:n=>t(e.get(RR)[0],n)}}({state:g,contains:v.contains});!function({layoutService:e,dataStore:t,composition:n}){const r=e.getDataPages()[0];if(!r)return;const o=n.patcher({layoutService:e});o.should(r)&&o(r);t.add(r)}({layoutService:o,dataStore:y,composition:v});const b=function({buffer:e}){return void 0===e?void 0:2*Math.round(e/2)}({buffer:f}),x=function({dataStore:e,composition:t,enigmaModel:n,layoutService:r,trendLineModel:o=zR,definitionPath:i,processDataPage:a}){const{slicer:s,cacheWarden:l,request:c}=t,u=function({dataStore:e,slice:t,warden:n,expand:r,request:o,process:i,connectionless:a,processDataPage:s}){return(l,{onProcessing:c}={})=>{if(e.contains(l)){const r=e.getCurrent();if(a)return Promise.resolve(t(r,l));const o=n.release(r.qArea,l),s=i.isProcessing();if(!o&&s&&i.cancel(),!o||s)return Promise.resolve(t(r,l))}if(a)return Promise.resolve(e.getCurrent());i.isProcessing()&&c&&c();const u=r(l);return i(o(u)).then((n=>(s(n),e.add(n),t(n,l))))}}({dataStore:e,slice:s,warden:l({bounds:{width:r.meta.size.x,height:r.meta.size.y}}),expand:DR({layoutService:r}),request:c({layoutService:r,definitionPath:i}),process:qR(n),connectionless:r.meta.isSnapshot,processDataPage:a}),d=k(((e,{onProcessing:t,onData:n})=>{u(e,{onProcessing:t}).then((e=>n(e))).catch((e=>{if(e!==xR)throw e}))}),50);return function(e,{onProcessing:t=SR,onDataPage:n=SR}={}){d(e,{onProcessing:t,onData:e=>{r.setDataPages(e?[e]:[]),o.command.update(),n(e)}})}}({dataStore:y,composition:v,enigmaModel:r,layoutService:o,trendLineModel:a,definitionPath:u,processDataPage:h}),S=function({chart:e,componentKey:t,state:n,dataStore:r,pageData:o,layoutService:i,dockService:a,itemWidths:s,getRect:l,axisKey:c,renderer:u,areaBuffer:d,viewState:p,rtl:m}){n.set("rect",{width:0,height:0}),n.set("itemWidths",{}),n.set("itemSize",0),n.set("items",{}),n.set("offsets",{}),n.set("finished",0),n.set("scaleRange",[0,1]);const f=function({chart:e,getRect:t,getDataPages:n,layoutService:r,dockService:o,getItemWidths:i,axisKey:a,renderer:s,areaBuffer:l,rtl:c}){const{inTotal:u,area:d,scaleRange:p}=function({layoutService:e}){const{isDimensionless:t,isGrouped:n,isGroupedByMeasure:r}=e.meta;if(t)return $R;if(!n)return BR;return r?VR:UR}({layoutService:r}),m=()=>"horizontal"===o.meta.major.orientation?t().width:t().height,f=e=>e?m()/e:0,h=(e,t)=>-(e-t)*f(t);return{getItems(){const n=r.getLayoutValue("dimensionAxis"),l=u({layoutService:r});return{inTotal:l,inView:YR({chart:e,rect:t(),dockService:o,itemWidths:i(),axisKey:a,renderer:s,isGrouped:r.meta.isGrouped,dimensionAxis:n,inTotal:l,isMajorLabelless:"none"===n.show||"title"===n.show,maxDataRows:Math.floor(ER/(r.meta.dimensionCount+r.meta.measureCount))})}},getItemSize({items:e}){const{inView:t}=e;return f(t)},getOffsets({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t,o=Math.min(0,Math.max(e,h(n,r))),i=r?Math.abs(r*o/m()):0;return{start:{pixel:o,item:i},end:{item:Math.min(i+(r||0),n)}}},getUpperBound({items:e}){const{inTotal:t,inView:n}=e;return h(t,n)},getViewRange({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return function({viewSize:e,inTotal:t,inView:n,pixelOffset:r}){const o=e/n*t,i=Math.abs(r)/o;return[i,i+e/o]}({viewSize:m(),inTotal:n,inView:r,pixelOffset:e})},getArea:({itemOffset:e,items:t})=>d({getDataPages:n,layoutService:r,itemOffset:e,inView:t.inView,areaBuffer:l}),getScaleRange({offsets:e,items:t}){const i=p({getDataPages:n,layoutService:r,offsets:e,items:t,viewSize:m(),upperBound:h(t.inTotal,t.inView)});return"horizontal"===o.meta.major.orientation&&c?function(e){return[1-e[1],1-e[0]]}(i):i},validate:{offset({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return e<=0&&e>=h(n,r)}},convert:{itemToPixelOffset({itemOffset:e,items:t}){const{inView:n}=t,r=e*f(n);return Number.isFinite(r)?-r:0},relativeToPixelOffset({relativeOffset:e,items:t}){const{inTotal:n,inView:r}=t;return-e*(f(r)*n)}}}}({chart:e,getRect:()=>n.get("rect"),getDataPages:r.getCurrent,layoutService:i,dockService:a,getItemWidths:()=>n.get("itemWidths"),axisKey:c,renderer:u,areaBuffer:d,rtl:m}),h=()=>{const e=f.getItems();return n.set("items",e),e},g=({pixelOffset:e,items:t})=>{const r=f.getOffsets({pixelOffset:e,items:t});return n.set("offsets",r),r},v=({items:e})=>{const t=i.getLayoutValue("scrollStartPos"),n=p.get("scrollOffset");if(void 0===n)return 1===t?f.getUpperBound({items:e}):0;if("number"==typeof n)return f.convert.itemToPixelOffset({itemOffset:n,items:e});const{start:r,end:o}=n,a=1===t&&o?o-e.inView:r;return f.convert.itemToPixelOffset({itemOffset:a,items:e})},y=e=>{const[{qArea:t}]=i.getDataPages();return!!t&&Object.keys(e).every((n=>e[n]===t[n]))},b=e=>{const t=Date.now(),r=h(),i=g({pixelOffset:e,items:r}),a=f.getArea({itemOffset:i.start.item,items:r});if(y(a))return void((f.validate.offset({pixelOffset:e,items:r})||p.get("scrollOffset").start!==i.start.item)&&(n.set("finished",t),n.set("scaleRange",f.getScaleRange({offsets:i.start,items:r})),p.preventSet("viewRange",f.getViewRange({pixelOffset:i.start.pixel,items:r})),p.set("scrollOffset",{start:i.start.item,end:i.end.item})));p.preventSet("viewRange",f.getViewRange({pixelOffset:i.start.pixel,items:r}));const s=()=>{n.get("finished")>t||(n.set("finished",t),n.set("scaleRange",f.getScaleRange({offsets:i.start,items:r})),p.set("scrollOffset",{start:i.start.item,end:i.end.item}))};o(a,{onProcessing:s,onDataPage:s})};return{enabled(){const{inTotal:e,inView:t}=n.get("items");return e>t},itemSize:()=>n.get("itemSize"),scaleRange:()=>n.get("scaleRange"),initialize(){const r=e.component(t);if(!r)return Promise.resolve();n.set("rect","function"==typeof l?l():r.rect),n.set("itemWidths","function"==typeof s?s():s);const i=h();n.set("itemSize",f.getItemSize({items:i}));const a=v({items:i}),c=g({pixelOffset:a,items:i});p.preventSet("viewRange",f.getViewRange({pixelOffset:c.start.pixel,items:i}));const u=f.getArea({itemOffset:c.start.item,items:i});return new Promise((e=>{o(u,{onDataPage:()=>{n.set("scaleRange",f.getScaleRange({offsets:c.start,items:i})),p.preventSet("scrollOffset",{start:c.start.item,end:c.end.item}),e()}})}))},scroll(e){const t=n.get("offsets").start.pixel+e;b(t)},scrollToRelative(e){const t=n.get("items"),r=f.convert.relativeToPixelOffset({relativeOffset:e,items:t});b(r)}}}({chart:e,componentKey:n,state:g,dataStore:y,pageData:x,layoutService:o,dockService:i,itemWidths:s,getRect:d,axisKey:p,renderer:m,areaBuffer:b,viewState:l,rtl:c}),M=function({layoutService:e,dataStore:t}){return function(n){const r=E(n,""+e.refs.dataPages);r.length=0,r.push(t.getCurrent())}}({layoutService:o,dataStore:y});return{interactions:PR({chart:e,actions:t,componentKey:n,dockService:i,rtl:c,scroller:S}),query:{getCanScroll:()=>S.enabled(),getItemSize:()=>S.itemSize(),getScaleRange:()=>S.scaleRange(),getCurrentDataPage:()=>y.getCurrent()},command:{initialize:()=>S.initialize(),scrollTo:e=>S.scrollToRelative(e),setSnapshotData:e=>M(e)}}}({chart:e,actions:s,componentKey:c,enigmaModel:t,layoutService:n,dockService:r,viewState:i,rtl:a,itemWidths:GR,options:{axisKey:Qa.COMPONENT.AXIS.MAJOR,renderer:l.renderer("svg")()}})}({chart:t,genericObjectModel:T,layoutService:n,dockService:d,seriesModel:S,viewState:f,rtl:"rtl"===p.options.direction,actions:g,picasso:e}):void 0,N=n.meta.isContinuous?ZR({model:T,layoutService:n,viewState:f,viewCache:h}):void 0,z=bR({actions:g,appLayoutModel:P,appModel:I,chart:t,environment:p,flags:m,genericObjectModel:T,layoutService:n,picasso:e,seriesModel:S,viewState:f}),$=A({theme:p.theme,config:{id:"comboChart",resolve:[["object","label.value","numFontSize","12px",e=>parseInt(e,10)]]}}),B=function({layoutService:e,seriesModel:t}){const{isContinuous:n}=e.meta,r="qDimensionInfo/0",o=r+":numeric",i=t.meta.primarySeries.map((e=>e.ref)),a=t.meta.secondarySeries.map((e=>e.ref)),s=n?[{key:o,from:r,override:{value:e=>e.qNum}}]:void 0;return{main:{major:r,majorNumeric:o,minorsPrimary:i,minorsSecondary:a},virtuals:s}}({layoutService:n,seriesModel:S}),F=tR({isPrimary:!0,layoutService:n,reducedModel:u,seriesModel:S,continuousModel:N,flags:m}),H=tR({isPrimary:!1,layoutService:n,reducedModel:u,seriesModel:S,continuousModel:N,flags:m}),j=gR({config:{measureAxesRef:"measureAxes.0",formatter:Qa.FORMATTER.PRIMARY},chart:t,layoutService:n,extremumModel:F,dockService:d,seriesModel:S,themeService:$}),V=gR({config:{measureAxesRef:"measureAxes.1",formatter:Qa.FORMATTER.SECONDARY},chart:t,layoutService:n,extremumModel:H,dockService:d,seriesModel:S,themeService:$}),W=function({genericObjectModel:e,layoutService:t}){const n={properties:void 0};return{query:{getProperties:()=>n.properties},command:{initialize:()=>function({layout:e,model:t}){if(me.snapshot(e))return Promise.resolve(null);return t.getEffectiveProperties().then((e=>({properties:e})))}({layout:t.getLayout(),model:e}).then((e=>{const{properties:t}=null!=e?e:{};n.properties=t}))}}}({genericObjectModel:T,layoutService:n}),_=Es({flags:m,layout:y,app:I,model:T,picasso:e,chart:t,translator:o,localeInfo:P.qLocaleInfo,embed:q,options:r}),U=JR({chart:t,actions:g,translator:o,rtl:s,dockService:d,seriesModel:S,colorService:z,themeService:$,propertiesModel:W,custom:_}),Y=function({layoutService:e,dockService:t,themeService:n,flags:r}){const{BAR:o,LINE:i,POINT:a}=Gl,s=n.getStyles(),l=KR({layoutService:e,key:"bar"}),c=KR({layoutService:e,key:"line"}),u=()=>l({property:"width",defaultValue:.7}),d=()=>{const e=l({property:"strokeWidth",defaultValue:"none"});return e?o.STROKE.WIDTH[e.toUpperCase()]:0},p=t=>r.isEnabled("CLIENT_IM_3050")?e.getLayoutValue("components",[]).find((e=>e.key===t)):void 0;return{query:{bar:{getHasStyling:()=>!!e.getLayoutValue("components",[]).filter((e=>"bar"===e.key)).length,getWidthFn:()=>()=>u(),getHasStrokeWidth:()=>!!d(),getStrokeWidth:()=>d(),getStrokeColor:()=>l({property:"strokeColor",defaultValue:{index:-1,color:o.STROKE.COLOR}}).color,label:{getStyle:()=>{var e,t,n,r,o,i,a,l,c,u,d,m,f,h,g,v;return{fill:null!==(e=null===(t=p("bar"))||void 0===t||null===(n=t.bar)||void 0===n||null===(r=n.label)||void 0===r||null===(o=r.value)||void 0===o||null===(i=o.color)||void 0===i?void 0:i.color)&&void 0!==e?e:s.label.value.color,fontSize:null!==(a=null===(l=p("bar"))||void 0===l||null===(c=l.bar)||void 0===c||null===(u=c.label)||void 0===u||null===(d=u.value)||void 0===d?void 0:d.fontSize)&&void 0!==a?a:s.label.value.numFontSize,fontFamily:null!==(m=null===(f=p("bar"))||void 0===f||null===(h=f.bar)||void 0===h||null===(g=h.label)||void 0===g||null===(v=g.value)||void 0===v?void 0:v.fontFamily)&&void 0!==m?m:s.label.value.fontFamily}}}},line:{getCurveFn:()=>(e,t)=>c({property:"lineCurve",defaultValue:i.CURVE.LINEAR,index:t}),getStrokeWidthFn:()=>(e,n)=>c({property:"lineThickness",defaultValue:"FULL"===t.meta.chart.mode?i.WIDTH.FULL.DEFAULT:i.WIDTH.LESS.DEFAULT,index:n}),getStrokeDasharrayFn:()=>(e,t)=>{const n=c({property:"lineType",defaultValue:i.TYPE.SOLID,index:t});return n&&i.TYPE[n.toUpperCase()]}},point:{getSize:e=>c({property:"dataPointSize",defaultValue:a.SIZE.DEFAULT,index:e}),label:{getStyle:()=>{var e,t,n,r,o,i,a,l,c,u,d,m,f,h,g,v;return{fill:null!==(e=null===(t=p("line"))||void 0===t||null===(n=t.line)||void 0===n||null===(r=n.label)||void 0===r||null===(o=r.value)||void 0===o||null===(i=o.color)||void 0===i?void 0:i.color)&&void 0!==e?e:s.label.value.color,fontSize:null!==(a=null===(l=p("line"))||void 0===l||null===(c=l.line)||void 0===c||null===(u=c.label)||void 0===u||null===(d=u.value)||void 0===d?void 0:d.fontSize)&&void 0!==a?a:s.label.value.fontSize,fontFamily:null!==(m=null===(f=p("line"))||void 0===f||null===(h=f.line)||void 0===h||null===(g=h.label)||void 0===g||null===(v=g.value)||void 0===v?void 0:v.fontFamily)&&void 0!==m?m:s.label.value.fontFamily}}}},axis:{title:{getStyle:()=>{var e,t,n,r,o,i,a,l,c,u,d,m,f;return{fontFamily:null!==(e=null===(t=p("axis"))||void 0===t||null===(n=t.axis)||void 0===n||null===(r=n.title)||void 0===r?void 0:r.fontFamily)&&void 0!==e?e:s.axis.title.fontFamily,fontSize:null!==(o=null===(i=p("axis"))||void 0===i||null===(a=i.axis)||void 0===a||null===(l=a.title)||void 0===l?void 0:l.fontSize)&&void 0!==o?o:s.axis.title.fontSize,color:null!==(c=null===(u=p("axis"))||void 0===u||null===(d=u.axis)||void 0===d||null===(m=d.title)||void 0===m||null===(f=m.color)||void 0===f?void 0:f.color)&&void 0!==c?c:s.axis.title.color}}},label:{getStyle:()=>{var e,t,n,r,o,i,a,l,c,u,d,m,f,h,g,v;return{fill:null!==(e=null===(t=p("axis"))||void 0===t||null===(n=t.axis)||void 0===n||null===(r=n.label)||void 0===r||null===(o=r.name)||void 0===o||null===(i=o.color)||void 0===i?void 0:i.color)&&void 0!==e?e:s.axis.label.name.color,fontSize:null!==(a=null===(l=p("axis"))||void 0===l||null===(c=l.axis)||void 0===c||null===(u=c.label)||void 0===u||null===(d=u.name)||void 0===d?void 0:d.fontSize)&&void 0!==a?a:s.axis.label.name.fontSize,fontFamily:null!==(m=null===(f=p("axis"))||void 0===f||null===(h=f.axis)||void 0===h||null===(g=h.label)||void 0===g||null===(v=g.name)||void 0===v?void 0:v.fontFamily)&&void 0!==m?m:s.axis.label.name.fontFamily}}}}}}}({layoutService:n,dockService:d,themeService:$,flags:m}),G=function({layoutService:e,discreteModel:t}){const{isContinuous:n,canBeContinuous:r,isGroupedByDimension:o}=e.meta,i=e.getLayout(),a="K"===i.qHyperCube.qMode,s=me.dimensionless(i),l=Ma.getMeasureRefLines(i),c=Ma.getDimensionRefLines(i,s),u=Ma.getMeasureRefLineLabels(i),d=Ma.getDimensionRefLineLabels(i,s);let p={},m={};const f=t=>{if(r){const n=e.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:r,qMax:o}=n;return Ma.isOutOfRange({value:t,qMin:r,qMax:o})}return!1},h=t=>{if(!m[t])return!1;if(!n&&o){const n={valueInfo:m[t]},r="S"===e.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",o=e.getHyperCubeValue(r);return Ma.isOutOfDataPages({label:n,dataPages:o})}return!0},g=()=>!(!c||!c.length)&&!c.every((t=>{const n=Ma.getInputValue({refLineLayout:t,layoutService:e});return f(n)||h(n)})),v={isKMode:a,canBeContinuous:r,measureRefLines:l,dimensionRefLines:c,measureRefLineLabels:u,dimensionRefLineLabels:d,dimensionRefLineInfo:m,dimensionValuesInfo:p,query:{getRefLines:e=>Ma.getRefLines(i,e),getRefLineLabels:e=>Ma.getRefLineLabels(i,e)},update:()=>{m=v.dimensionRefLineInfo,g()&&(p=Ma.getDimensionValuesInfo({layout:i,canBeContinuous:r,discreteModel:t,layoutService:e}),v.dimensionValuesInfo=p,c.forEach((t=>{const n=Ma.getInputValue({refLineLayout:t,layoutService:e});p[n]&&(m[n]?(m[n].innerValues=p[n].innerValues,m[n].minOrder=Math.min(m[n].minOrder,p[n].minOrder),m[n].maxOrder=Math.max(m[n].maxOrder,p[n].maxOrder),m[n].isMinOrderOk=m[n].isMinOrderOk||p[n].isMinOrderOk,m[n].isMaxOrderOk=m[n].isMaxOrderOk||p[n].isMaxOrderOk):m[n]={id:p[n].id,qText:p[n].qText,innerValues:p[n].innerValues,minOrder:p[n].minOrder,maxOrder:p[n].maxOrder,isMinOrderOk:p[n].isMinOrderOk,isMaxOrderOk:p[n].isMaxOrderOk},m[n].numInnerValues=(m[n].maxOrder||0)-(m[n].minOrder||0)+1)})))}};return v.update(),v}({layoutService:n,discreteModel:w}),K=function(e){return{layout:e.getLayout(),keys:{SCALE:{MAJOR:Qa.SCALE.MAJOR,MAJOR_INNER:Qa.SCALE.MAJOR_INNER,MINOR:{PRIMARY:Qa.SCALE.MINOR.PRIMARY,SECONDARY:Qa.SCALE.MINOR.SECONDARY}},COMPONENT:{BAR_PRIMARY:`${Qa.COMPONENT.BAR}-${ts.PRIMARY}`,BAR_SECONDARY:`${Qa.COMPONENT.BAR}-${ts.SECONDARY}`,AXIS:{MAJOR:Qa.COMPONENT.AXIS.MAJOR,MAJOR_CONTINUOUS:Qa.COMPONENT.AXIS.MAJOR_CONTINUOUS,TIME_INNER:Qa.COMPONENT.AXIS.TIME_INNER,MINOR:{PRIMARY:Qa.COMPONENT.AXIS.MINOR.PRIMARY,SECONDARY:Qa.COMPONENT.AXIS.MINOR.SECONDARY}},AXIS_TITLE:{MAJOR:Qa.COMPONENT.AXIS_TITLE.MAJOR,MINOR:{PRIMARY:Qa.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,SECONDARY:Qa.COMPONENT.AXIS_TITLE.MINOR.SECONDARY}}},COLLECTION:{MAIN:Qa.COLLECTION.MAIN}}}}(n),X=L({picassoInstance:e,plugins:D,pluginArgs:K});M({selectionService:v,genericObjectModel:T,appModel:I,dockService:d,styleModel:Y,layoutService:n,fieldModel:B,seriesModel:S,reducedModel:u,primaryExtremumModel:F,secondaryExtremumModel:H,primaryTickModel:j,secondaryTickModel:V,propertiesModel:W,colorService:z,themeService:$,appLayoutModel:P,tooltipService:U,flags:m,...w&&{discreteModel:w},...N&&{continuousModel:N},refLineModel:G,pluginService:X})}),[y,T,I,P,p,null==t?void 0:t.update,f]);const[,z]=i((()=>{if(!S)return Promise.resolve();const{layoutService:e,colorService:t,reducedModel:n,primaryExtremumModel:r,secondaryExtremumModel:o,propertiesModel:i,continuousModel:a,discreteModel:s,pluginService:l}=S,c=a?()=>{var t,n;a.update(e.getLayout());const r=a.initialFetch(),o=!e.meta.isSnapshot&&(null==p||null===(t=p.options)||void 0===t||null===(n=t.viewState)||void 0===n?void 0:n.zoom);return o&&f.preventSet("zoom",o),r}:()=>Promise.resolve(),u=t.initialize().then((()=>{const e=t.getSettings().field;v&&v.setBrushAliases({colorField:e}),t.custom.updateLegend()})),d=()=>Promise.all([r.command.initialize(),o.command.initialize()]).then((()=>N(S)));return(()=>Promise.all([l.initialize(),n.command.initialize(),T?i.command.initialize():Promise.resolve(),u,c(),g.scroll.attachDiscreteModel(s)]))().then((()=>d()))}),[S]);if(z)throw z;return w})({picasso:T,chart:D,environment:M,flags:w,viewState:b,viewCache:e,actions:P,selectionService:q});(({picasso:e,chart:t,models:n,environment:o,viewState:a,viewCache:s,actions:l})=>{(({chart:e,models:t,viewState:n,viewCache:o})=>{const{event:{onZoomIntercept:i,onZoomChange:a}}=Zd;r((()=>{if(!t||!n||!o)return;const{layoutService:r,continuousModel:s,refLineModel:l,seriesModel:c}=t,{miniComponentKeys:u}=c.meta,d=()=>{l&&l.update(),e.update({partialData:!0,excludeFromUpdate:[...yp,...u]})};n.onChanged("scrollOffset",d),r.meta.isContinuous&&(n.onChanged("zoom",a({layoutService:r,continuousDataModel:s},d)),n.intercept("zoom",i({viewCache:o})))}),[t,n,o])})({chart:t,models:n,viewState:a,viewCache:s}),(({picasso:e,chart:t,models:n,environment:r,viewState:o,viewCache:a,actions:s})=>{const[,l]=i((async()=>{if(null==t||!t.update||!n||!r)return;const{layoutService:i,colorService:l,discreteModel:c}=n;function u(i=!1){t.update({settings:hp({picasso:e,chart:t,models:n,environment:r,viewState:o,viewCache:a,actions:s}),data:i&&[gp({models:n}),...vp({models:n}),...l.getData()]})}const d=i.getDataPages();i.setDataPages([]),u(!0),i.setDataPages(d),i.meta.isContinuous||await c.command.initialize(),u(!1)}),[null==t?void 0:t.update,n,r]);if(l)throw l})({picasso:e,chart:t,models:n,environment:o,viewState:a,viewCache:s,actions:l})})({picasso:T,chart:D,models:z,environment:M,viewState:b,viewCache:e,actions:P}),(({picasso:e,chart:t,models:n,environment:r,viewState:a,viewCache:s,actions:l,isUnsupportedFeature:c})=>{const{width:u,height:d}=o(),[,p]=i((async()=>{if(!(null!=t&&t.update&&n&&r&&a))return;const{colorService:o,discreteModel:i,dockService:p,layoutService:m,refLineModel:f}=n;function h(){t.update({settings:hp({picasso:e,chart:t,models:n,environment:r,viewState:a,viewCache:s,actions:l,isUnsupportedFeature:c})})}p.update({width:u,height:d}),o.custom.updateLegend(),f.update({picasso:e,chart:t,models:n,environment:r,viewState:a,viewCache:s,actions:l});const g=m.getDataPages();m.setDataPages([]),h(),m.setDataPages(g),m.meta.isContinuous||await i.command.initialize(),h()}),[u,d]);if(p)throw p})({picasso:T,chart:D,models:z,environment:M,viewState:b,viewCache:e,actions:P,isUnsupportedFeature:N}),(({models:e,chart:t,viewState:n})=>{x((r=>{if(!e)return;const{layoutService:o,dockService:i,colorService:a,discreteModel:s,continuousModel:l,reducedModel:c}=e,{width:u,height:d}=i.meta.chart.size;return r.snapshotData=r.snapshotData||{},r.snapshotData.content={size:{w:u,h:d}},o.meta.isSnapshot?Promise.resolve():(r.snapshotData.content.chartData={scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:fe(t,Qa.COMPONENT.LEGEND_CATEGORICAL)},o.meta.isDiscrete?(s.command.setSnapshotData(r),c.command.setSnapshotData(r)):l.setSnapshotData(r),a.getSnapshotData().then((e=>{r.snapshotData.content.chartData={...r.snapshotData.content.chartData,...e}})).catch((()=>{})))})),S((()=>({getViewState(){if(n&&t)return{scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:fe(t,Qa.COMPONENT.LEGEND_CATEGORICAL)}}})),[n,t])})({models:z,chart:D,viewState:b})}}}));var _=Object.prototype.hasOwnProperty,U=Object.prototype.toString,Y=Object.defineProperty,G=Object.getOwnPropertyDescriptor,K=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===U.call(e)},X=function(e){if(!e||"[object Object]"!==U.call(e))return!1;var t,n=_.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&_.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||_.call(e,t)},J=function(e,t){Y&&"__proto__"===t.name?Y(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},Z=function(e,t){if("__proto__"===t){if(!_.call(e,t))return;if(G)return G(e,t).value}return e[t]},Q=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=Z(s,n),s!==(o=Z(t,n))&&(u&&o&&(X(o)||(i=K(o)))?(i?(i=!1,a=r&&K(r)?r:[]):a=r&&X(r)?r:{},J(s,{name:n,newValue:e(u,a,o)})):void 0!==o&&J(s,{name:n,newValue:o}));return s};const ee="center",te="bottom";var ne={NoDataExist:{label:"NoDataExist",alignment:ee,default:!0},OnlyNanData:{label:"OnlyNanData",alignment:ee,default:!0},OnlyNegativeOrZeroValues:{label:"OnlyNegativeOrZeroValues",alignment:ee,default:!1},LimitedData:{label:"LimitedData",alignment:te,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:te,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:te,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:te,default:!1}};const re=[["FULL",{width:550,height:450}],["MEDIUM",{width:400,height:220}],["SMALL",{width:300,height:150}],["XSMALL",{width:150,height:75}],["SPARK",{width:0,height:0}]],oe={};re.forEach((([e,{width:t,height:n}])=>{oe[e]={width:t,height:n}}));const ie={getLayoutModes:()=>oe,getLayoutMode(e,t){let n;for(n=0;n<re.length;++n)if(e>=re[n][1].width&&t>=re[n][1].height)return re[n][0];return"SPARK"}};const ae=["$date","$timestamp","$time"],se=["D","TS","T"],le={hasTimeTag:e=>!!(e&&e.qTags&&e.qTags.some((e=>ae.some((t=>t===e))))),hasUnknownFormat:e=>!(!e||!e.qNumFormat||"U"!==e.qNumFormat.qType),hasTimeFormat:e=>!!(e&&e.qNumFormat&&se.some((t=>t===e.qNumFormat.qType))),isTimeDimension:(e,t)=>!!(e&&t&&(le.hasTimeTag(t)&&le.hasUnknownFormat(t)||le.hasTimeFormat(t))),isTime:(e,t)=>!!(t&&t.qHyperCube.qDimensionInfo&&t.qHyperCube.qDimensionInfo.length)&&(e&&le.isTimeDimension(e,t.qHyperCube.qDimensionInfo[0])),canBeContinuousDimension(e){if(!e)return!1;const t=e.qTags||[];return!(!e.qContinuousAxes||!t.some((e=>"$numeric"===e)))},canBeContinuous(e){var t,n,r;const o=null==e||null===(t=e.qHyperCube)||void 0===t||null===(n=t.qDimensionInfo)||void 0===n?void 0:n.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)}));return!((null!==(r=null==o?void 0:o.length)&&void 0!==r?r:0)<1)&&le.canBeContinuousDimension(o[0])},maxNumberOfLines:12},ce=(e,t,n)=>{const r=t.split(".");let o,i=e;if(void 0===i)return n;for(o=0;o<r.length;++o){if(void 0===i[r[o]])return n;i=i[r[o]]}return i},ue=e=>ce(e,"qHyperCube.qDimensionInfo",[]),de=e=>ce(e,"qHyperCube.qMeasureInfo",[]),pe=e=>ce(e,"barGrouping.grouping"),me={continuous:(e,t=!1)=>!!le.canBeContinuous(e)&&(ce(e,"dimensionAxis.continuousAuto")?"function"==typeof t?t():t:!!e.preferContinuousAxis),dimensionless:e=>!ue(e).length,grouped(e){return!this.dimensionless(e)&&"grouped"===pe(e)&&(ue(e).length>1||de(e).length>1)&&!this.continuous(e)},groupedByDimension(e){return this.grouped(e)&&ue(e).length>1&&1===de(e).length},groupedByMeasure(e){return this.grouped(e)&&1===ue(e).length&&de(e).length>1},stacked(e){return(!this.dimensionless(e)&&"grouped"!==pe(e)||this.continuous(e))&&(ue(e).length>1||de(e).length>1)},stackedByDimension(e){return this.stacked(e)&&ue(e).length>1&&1===de(e).length},stackedByMeasure(e){return this.stacked(e)&&1===ue(e).length&&de(e).length>1},simple:e=>0===ue(e).length||1===ue(e).length&&1===de(e).length,snapshot:e=>!!ce(e,"snapshotData")};function fe(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const he=e=>{throw e.isHandled=!0,e};const ge={getDockValue:e=>"near"===e||"left"===e||"top"===e?0:1,getOppositeDock(e){switch(e){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top";case"near":return"far";case"far":return"near";default:return"far"}},getHorizontalDock:e=>"near"===e||"left"===e?"left":"right",getVerticalDock:e=>"near"===e||"bottom"===e?"bottom":"top",getDock:(e,t,n)=>"vertical"===e||"y"===e?ge.getVerticalDock(t):n?ge.getOppositeDock(ge.getHorizontalDock(t)):ge.getHorizontalDock(t),getInvertedOrientation:e=>"vertical"===e?"horizontal":"vertical",getMinorScaleAxis:e=>"vertical"===e?"y":"x",getMajorScaleAxis:e=>"vertical"===e?"x":"y",getAlignment(e,t){switch(e){case"vertical":return"near"===t||"bottom"===t?1:0;default:return"near"===t||"left"===t?0:1}},getMeasureScaleInvert:(e,t)=>"vertical"===e||t,getDimensionScaleInvert:(e,t)=>"horizontal"===e&&t,getSize:(e,{width:t,height:n})=>"vertical"===e?t:n},ve={stringWidthOverMWidth:e=>(12*Math.min(e,3)+6.384615384615385*Math.max(e-3,0))/11,getCharacterRatios(e){if(!e)return{latin:0,cjk:0};let t=e.match(/[\u4E00-\u9FFF]/g),n=e.match(/[\u3040-\u309F]/g),r=e.match(/[\u30A0-\u30FF]/g);t=t?t.length:0,n=n?n.length:0,r=r?r.length:0;const o=t+n+r;return{latin:e.length-o,cjk:o}},getTotalCharacterRatios(e,t,n="qText"){if(!e)return{latinRatio:1,cjkRatio:0};const r={latin:0,cjk:0};let o;void 0===t?e.forEach((e=>{o=ve.getCharacterRatios(e[n]),r.latin+=o.latin,r.cjk+=o.cjk})):e.forEach((e=>{o=ve.getCharacterRatios(e[t][n]),r.latin+=o.latin,r.cjk+=o.cjk}));const i=Math.max(1,r.latin+r.cjk);return r.latinRatio=r.latin/i,r.cjkRatio=r.cjk/i,r},getAdjustedMaxGlyphCount(e,t,n,r="qText"){const o=ve.getTotalCharacterRatios(t,n,r),i=o.latinRatio*e,a=o.cjkRatio*e;return Math.ceil(ve.stringWidthOverMWidth(i)+1.0909090909090908*a)}},ye=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),be=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),xe=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),Se={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>ye.test(e),isRtlChar:e=>be.test(e)||xe.test(e),detectTextDirection(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],Se.isLtrChar(r))return"ltr";if(Se.isRtlChar(r))return"rtl"}return"ltr"}},Ee={getColorSymbol:(e,t)=>e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}}),getNodeFillColor:e=>e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0,getColor(e,t,n){const r=t.data,o=e.resources.formatter,i=e.resources.dataset,a={};if(n.coloring.label&&(a.label=""+n.coloring.label),"color"!==n.coloring.type&&r.fillTooltip){const e=o("fill"),t="measure"===n.coloring.fieldType;if(a.value=t&&e?e(r.fillTooltip.value):r.fillTooltip.label?r.fillTooltip.label:r.fillTooltip.value,!n.coloring.label){const e=i(r.fillTooltip.source.key).field(r.fillTooltip.source.field).title();a.label=""+e}}return a.fill=void 0===r._fillColor?Ee.getNodeFillColor(t):r._fillColor,a},getMeasure:(e,t)=>({label:""+e(t.source.key).field(t.source.field).title(),value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}),hideColorRow:(e,t)=>void 0===e.color.value||e.measures.some((e=>e.field===t.coloring.field)),getTitleRow(e,t){const n=Se.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:n},colspan:2},{}]},getDescriptionRow(e,t){const n=Se.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n},colspan:2},{}]},getNMoreRow(e,t,n){const r=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:r,style:{"font-weight":"bold","text-align":n?"right":"left",direction:Se.detectTextDirection(r)},colspan:2},{}]},getSeparatorRow:()=>[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}],getColorRow(e,t,n){const r=Se.detectTextDirection(t.color.label),o=n?[":",t.color.label]:[t.color.label,":"],i=Se.detectTextDirection(t.color.value);return[{content:o,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,Ee.getColorSymbol(e,t)]:[Ee.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:i,"vertical-align":"middle"}}]},getMeasureRow(e,t,n,r,o=!1){const i=Se.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=Se.detectTextDirection(e.value);let l;return l=o?r?[e.value,Ee.getColorSymbol(t,n)]:[Ee.getColorSymbol(t,n),e.value]:[e.value],[{content:a,style:{"text-align":r?"right":"left",direction:i}},{content:l,style:{"text-align":r?"left":"right",direction:s,"vertical-align":"middle"}}]}};function Me(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ce(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function we(){}var ke=.7,Ne=1/ke,Te="\\s*([+-]?\\d+)\\s*",Oe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Re="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ae=/^#([0-9a-f]{3,8})$/,Le=new RegExp(`^rgb\\(${Te},${Te},${Te}\\)$`),Ie=new RegExp(`^rgb\\(${Re},${Re},${Re}\\)$`),Pe=new RegExp(`^rgba\\(${Te},${Te},${Te},${Oe}\\)$`),De=new RegExp(`^rgba\\(${Re},${Re},${Re},${Oe}\\)$`),qe=new RegExp(`^hsl\\(${Oe},${Re},${Re}\\)$`),ze=new RegExp(`^hsla\\(${Oe},${Re},${Re},${Oe}\\)$`),$e={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Be(){return this.rgb().formatHex()}function Fe(){return this.rgb().formatRgb()}function He(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ae.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?je(t):3===n?new Ue(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Ve(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Ve(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Le.exec(e))?new Ue(t[1],t[2],t[3],1):(t=Ie.exec(e))?new Ue(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Pe.exec(e))?Ve(t[1],t[2],t[3],t[4]):(t=De.exec(e))?Ve(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=qe.exec(e))?Ze(t[1],t[2]/100,t[3]/100,1):(t=ze.exec(e))?Ze(t[1],t[2]/100,t[3]/100,t[4]):$e.hasOwnProperty(e)?je($e[e]):"transparent"===e?new Ue(NaN,NaN,NaN,0):null}function je(e){return new Ue(e>>16&255,e>>8&255,255&e,1)}function Ve(e,t,n,r){return r<=0&&(e=t=n=NaN),new Ue(e,t,n,r)}function We(e){return e instanceof we||(e=He(e)),e?new Ue((e=e.rgb()).r,e.g,e.b,e.opacity):new Ue}function _e(e,t,n,r){return 1===arguments.length?We(e):new Ue(e,t,n,null==r?1:r)}function Ue(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Ye(){return`#${Je(this.r)}${Je(this.g)}${Je(this.b)}`}function Ge(){const e=Ke(this.opacity);return`${1===e?"rgb(":"rgba("}${Xe(this.r)}, ${Xe(this.g)}, ${Xe(this.b)}${1===e?")":`, ${e})`}`}function Ke(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Xe(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Je(e){return((e=Xe(e))<16?"0":"")+e.toString(16)}function Ze(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new et(e,t,n,r)}function Qe(e){if(e instanceof et)return new et(e.h,e.s,e.l,e.opacity);if(e instanceof we||(e=He(e)),!e)return new et;if(e instanceof et)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new et(a,s,l,e.opacity)}function et(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function tt(e){return(e=(e||0)%360)<0?e+360:e}function nt(e){return Math.max(0,Math.min(1,e||0))}function rt(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Me(we,He,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Be,formatHex:Be,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Qe(this).formatHsl()},formatRgb:Fe,toString:Fe}),Me(Ue,_e,Ce(we,{brighter(e){return e=null==e?Ne:Math.pow(Ne,e),new Ue(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?ke:Math.pow(ke,e),new Ue(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ue(Xe(this.r),Xe(this.g),Xe(this.b),Ke(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ye,formatHex:Ye,formatHex8:function(){return`#${Je(this.r)}${Je(this.g)}${Je(this.b)}${Je(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Ge,toString:Ge})),Me(et,(function(e,t,n,r){return 1===arguments.length?Qe(e):new et(e,t,n,null==r?1:r)}),Ce(we,{brighter(e){return e=null==e?Ne:Math.pow(Ne,e),new et(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?ke:Math.pow(ke,e),new et(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Ue(rt(e>=240?e-240:e+120,o,r),rt(e,o,r),rt(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new et(tt(this.h),nt(this.s),nt(this.l),Ke(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ke(this.opacity);return`${1===e?"hsl(":"hsla("}${tt(this.h)}, ${100*nt(this.s)}%, ${100*nt(this.l)}%${1===e?")":`, ${e})`}`}}));const ot=Math.PI/180,it=180/Math.PI,at=.96422,st=.82521,lt=4/29,ct=6/29,ut=3*ct*ct;function dt(e){if(e instanceof pt)return new pt(e.l,e.a,e.b,e.opacity);if(e instanceof bt)return xt(e);e instanceof Ue||(e=We(e));var t,n,r=gt(e.r),o=gt(e.g),i=gt(e.b),a=mt((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=mt((.4360747*r+.3850649*o+.1430804*i)/at),n=mt((.0139322*r+.0971045*o+.7141733*i)/st)),new pt(116*a-16,500*(t-a),200*(a-n),e.opacity)}function pt(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function mt(e){return e>.008856451679035631?Math.pow(e,1/3):e/ut+lt}function ft(e){return e>ct?e*e*e:ut*(e-lt)}function ht(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function gt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function vt(e){if(e instanceof bt)return new bt(e.h,e.c,e.l,e.opacity);if(e instanceof pt||(e=dt(e)),0===e.a&&0===e.b)return new bt(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*it;return new bt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function yt(e,t,n,r){return 1===arguments.length?vt(e):new bt(e,t,n,null==r?1:r)}function bt(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function xt(e){if(isNaN(e.h))return new pt(e.l,0,0,e.opacity);var t=e.h*ot;return new pt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Me(pt,(function(e,t,n,r){return 1===arguments.length?dt(e):new pt(e,t,n,null==r?1:r)}),Ce(we,{brighter(e){return new pt(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new pt(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new Ue(ht(3.1338561*(t=at*ft(t))-1.6168667*(e=1*ft(e))-.4906146*(n=st*ft(n))),ht(-.9787684*t+1.9161415*e+.033454*n),ht(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Me(bt,yt,Ce(we,{brighter(e){return new bt(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new bt(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return xt(this).rgb()}}));var St=-.14861,Et=1.78277,Mt=-.29227,Ct=-.90649,wt=1.97294,kt=wt*Ct,Nt=wt*Et,Tt=Et*Mt-Ct*St;function Ot(e){if(e instanceof Rt)return new Rt(e.h,e.s,e.l,e.opacity);e instanceof Ue||(e=We(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(Tt*r+kt*t-Nt*n)/-5.9615122912,i=r-o,a=(wt*(n-o)-Mt*i)/Ct,s=Math.sqrt(a*a+i*i)/(wt*o*(1-o)),l=s?Math.atan2(a,i)*it-120:NaN;return new Rt(l<0?l+360:l,s,o,e.opacity)}function Rt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Me(Rt,(function(e,t,n,r){return 1===arguments.length?Ot(e):new Rt(e,t,n,null==r?1:r)}),Ce(we,{brighter(e){return e=null==e?Ne:Math.pow(Ne,e),new Rt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?ke:Math.pow(ke,e),new Rt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*ot,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),o=Math.sin(e);return new Ue(255*(t+n*(St*r+Et*o)),255*(t+n*(Mt*r+Ct*o)),255*(t+n*(wt*r)),this.opacity)}}));var At={isDark:function(e){return yt(e).l<70}};function Lt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function It(e){return 1===e.length&&(e=function(e){return function(t,n){return Lt(e(t),n)}}(e)),{left:function(t,n,r,o){for(null==r&&(r=0),null==o&&(o=t.length);r<o;){var i=r+o>>>1;e(t[i],n)<0?r=i+1:o=i}return r},right:function(t,n,r,o){for(null==r&&(r=0),null==o&&(o=t.length);r<o;){var i=r+o>>>1;e(t[i],n)>0?o=i:r=i+1}return r}}}var Pt=It(Lt).right,Dt=Math.sqrt(50),qt=Math.sqrt(10),zt=Math.sqrt(2);function $t(e,t,n){var r=(t-e)/Math.max(0,n),o=Math.floor(Math.log(r)/Math.LN10),i=r/Math.pow(10,o);return o>=0?(i>=Dt?10:i>=qt?5:i>=zt?2:1)*Math.pow(10,o):-Math.pow(10,-o)/(i>=Dt?10:i>=qt?5:i>=zt?2:1)}function Bt(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),o=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),i=r/o;return i>=Dt?o*=10:i>=qt?o*=5:i>=zt&&(o*=2),t<e?-o:o}function Ft(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var Ht="$";function jt(){}function Vt(e,t){var n=new jt;if(e instanceof jt)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,o=-1,i=e.length;if(null==t)for(;++o<i;)n.set(o,e[o]);else for(;++o<i;)n.set(t(r=e[o],o,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function Wt(){}jt.prototype=Vt.prototype={constructor:jt,has:function(e){return Ht+e in this},get:function(e){return this[Ht+e]},set:function(e,t){return this[Ht+e]=t,this},remove:function(e){var t=Ht+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===Ht&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===Ht&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===Ht&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===Ht&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===Ht&&++e;return e},empty:function(){for(var e in this)if(e[0]===Ht)return!1;return!0},each:function(e){for(var t in this)t[0]===Ht&&e(this[t],t.slice(1),this)}};var _t=Vt.prototype;Wt.prototype={constructor:Wt,has:_t.has,add:function(e){return this[Ht+(e+="")]=e,this},remove:_t.remove,clear:_t.clear,values:_t.keys,size:_t.size,empty:_t.empty,each:_t.each};var Ut=Array.prototype,Yt=Ut.map,Gt=Ut.slice;function Kt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Xt(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Jt(){}var Zt=.7,Qt=1/Zt,en="\\s*([+-]?\\d+)\\s*",tn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",nn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",rn=/^#([0-9a-f]{3})$/,on=/^#([0-9a-f]{6})$/,an=new RegExp("^rgb\\("+[en,en,en]+"\\)$"),sn=new RegExp("^rgb\\("+[nn,nn,nn]+"\\)$"),ln=new RegExp("^rgba\\("+[en,en,en,tn]+"\\)$"),cn=new RegExp("^rgba\\("+[nn,nn,nn,tn]+"\\)$"),un=new RegExp("^hsl\\("+[tn,nn,nn]+"\\)$"),dn=new RegExp("^hsla\\("+[tn,nn,nn,tn]+"\\)$"),pn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function mn(e){var t;return e=(e+"").trim().toLowerCase(),(t=rn.exec(e))?new yn((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=on.exec(e))?fn(parseInt(t[1],16)):(t=an.exec(e))?new yn(t[1],t[2],t[3],1):(t=sn.exec(e))?new yn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=ln.exec(e))?hn(t[1],t[2],t[3],t[4]):(t=cn.exec(e))?hn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=un.exec(e))?xn(t[1],t[2]/100,t[3]/100,1):(t=dn.exec(e))?xn(t[1],t[2]/100,t[3]/100,t[4]):pn.hasOwnProperty(e)?fn(pn[e]):"transparent"===e?new yn(NaN,NaN,NaN,0):null}function fn(e){return new yn(e>>16&255,e>>8&255,255&e,1)}function hn(e,t,n,r){return r<=0&&(e=t=n=NaN),new yn(e,t,n,r)}function gn(e){return e instanceof Jt||(e=mn(e)),e?new yn((e=e.rgb()).r,e.g,e.b,e.opacity):new yn}function vn(e,t,n,r){return 1===arguments.length?gn(e):new yn(e,t,n,null==r?1:r)}function yn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function bn(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function xn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new En(e,t,n,r)}function Sn(e){if(e instanceof En)return new En(e.h,e.s,e.l,e.opacity);if(e instanceof Jt||(e=mn(e)),!e)return new En;if(e instanceof En)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new En(a,s,l,e.opacity)}function En(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Mn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Kt(Jt,mn,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),Kt(yn,vn,Xt(Jt,{brighter:function(e){return e=null==e?Qt:Math.pow(Qt,e),new yn(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?Zt:Math.pow(Zt,e),new yn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+bn(this.r)+bn(this.g)+bn(this.b)},toString:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}})),Kt(En,(function(e,t,n,r){return 1===arguments.length?Sn(e):new En(e,t,n,null==r?1:r)}),Xt(Jt,{brighter:function(e){return e=null==e?Qt:Math.pow(Qt,e),new En(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Zt:Math.pow(Zt,e),new En(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new yn(Mn(e>=240?e-240:e+120,o,r),Mn(e,o,r),Mn(e<120?e+240:e-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var Cn=Math.PI/180,wn=180/Math.PI,kn=.96422,Nn=.82521,Tn=4/29,On=6/29,Rn=3*On*On;function An(e){if(e instanceof Ln)return new Ln(e.l,e.a,e.b,e.opacity);if(e instanceof $n){if(isNaN(e.h))return new Ln(e.l,0,0,e.opacity);var t=e.h*Cn;return new Ln(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof yn||(e=gn(e));var n,r,o=qn(e.r),i=qn(e.g),a=qn(e.b),s=In((.2225045*o+.7168786*i+.0606169*a)/1);return o===i&&i===a?n=r=s:(n=In((.4360747*o+.3850649*i+.1430804*a)/kn),r=In((.0139322*o+.0971045*i+.7141733*a)/Nn)),new Ln(116*s-16,500*(n-s),200*(s-r),e.opacity)}function Ln(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function In(e){return e>.008856451679035631?Math.pow(e,1/3):e/Rn+Tn}function Pn(e){return e>On?e*e*e:Rn*(e-Tn)}function Dn(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function qn(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function zn(e){if(e instanceof $n)return new $n(e.h,e.c,e.l,e.opacity);if(e instanceof Ln||(e=An(e)),0===e.a&&0===e.b)return new $n(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*wn;return new $n(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function $n(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}Kt(Ln,(function(e,t,n,r){return 1===arguments.length?An(e):new Ln(e,t,n,null==r?1:r)}),Xt(Jt,{brighter:function(e){return new Ln(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new Ln(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new yn(Dn(3.1338561*(t=kn*Pn(t))-1.6168667*(e=1*Pn(e))-.4906146*(n=Nn*Pn(n))),Dn(-.9787684*t+1.9161415*e+.033454*n),Dn(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Kt($n,(function(e,t,n,r){return 1===arguments.length?zn(e):new $n(e,t,n,null==r?1:r)}),Xt(Jt,{brighter:function(e){return new $n(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new $n(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return An(this).rgb()}}));var Bn=-.14861,Fn=1.78277,Hn=-.29227,jn=-.90649,Vn=1.97294,Wn=Vn*jn,_n=Vn*Fn,Un=Fn*Hn-jn*Bn;function Yn(e){if(e instanceof Kn)return new Kn(e.h,e.s,e.l,e.opacity);e instanceof yn||(e=gn(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(Un*r+Wn*t-_n*n)/(Un+Wn-_n),i=r-o,a=(Vn*(n-o)-Hn*i)/jn,s=Math.sqrt(a*a+i*i)/(Vn*o*(1-o)),l=s?Math.atan2(a,i)*wn-120:NaN;return new Kn(l<0?l+360:l,s,o,e.opacity)}function Gn(e,t,n,r){return 1===arguments.length?Yn(e):new Kn(e,t,n,null==r?1:r)}function Kn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Xn(e){return function(){return e}}function Jn(e,t){return function(n){return e+n*t}}function Zn(e){return 1==(e=+e)?Qn:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Xn(isNaN(t)?n:t)}}function Qn(e,t){var n=t-e;return n?Jn(e,n):Xn(isNaN(e)?t:e)}Kt(Kn,Gn,Xt(Jt,{brighter:function(e){return e=null==e?Qt:Math.pow(Qt,e),new Kn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Zt:Math.pow(Zt,e),new Kn(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*Cn,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),o=Math.sin(e);return new yn(255*(t+n*(Bn*r+Fn*o)),255*(t+n*(Hn*r+jn*o)),255*(t+n*(Vn*r)),this.opacity)}}));var er=function e(t){var n=Zn(t);function r(e,t){var r=n((e=vn(e)).r,(t=vn(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=Qn(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function tr(e,t){var n,r=t?t.length:0,o=e?Math.min(r,e.length):0,i=new Array(o),a=new Array(r);for(n=0;n<o;++n)i[n]=lr(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<o;++n)a[n]=i[n](e);return a}}function nr(e,t){var n=new Date;return t-=e=+e,function(r){return n.setTime(e+t*r),n}}function rr(e,t){return t-=e=+e,function(n){return e+t*n}}function or(e,t){var n,r={},o={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=lr(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}var ir=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ar=new RegExp(ir.source,"g");function sr(e,t){var n,r,o,i=ir.lastIndex=ar.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=ir.exec(e))&&(r=ar.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:rr(n,r)})),i=ar.lastIndex;return i<t.length&&(o=t.slice(i),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function lr(e,t){var n,r=typeof t;return null==t||"boolean"===r?Xn(t):("number"===r?rr:"string"===r?(n=mn(t))?(t=n,er):sr:t instanceof mn?er:t instanceof Date?nr:Array.isArray(t)?tr:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?or:rr)(e,t)}function cr(e,t){return t-=e=+e,function(n){return Math.round(e+t*n)}}function ur(e){return function t(n){function r(t,r){var o=e((t=Gn(t)).h,(r=Gn(r)).h),i=Qn(t.s,r.s),a=Qn(t.l,r.l),s=Qn(t.opacity,r.opacity);return function(e){return t.h=o(e),t.s=i(e),t.l=a(Math.pow(e,n)),t.opacity=s(e),t+""}}return n=+n,r.gamma=t,r}(1)}function dr(e){return+e}ur((function(e,t){var n=t-e;return n?Jn(e,n>180||n<-180?n-360*Math.round(n/360):n):Xn(isNaN(e)?t:e)})),ur(Qn);var pr=[0,1];function mr(e){return e}function fr(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function hr(e){var t,n=e[0],r=e[e.length-1];return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function gr(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=fr(o,r),i=n(a,i)):(r=fr(r,o),i=n(i,a)),function(e){return i(r(e))}}function vr(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),i=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)o[a]=fr(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(t){var n=Pt(e,t,1,r)-1;return i[n](o[n](t))}}function yr(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function br(e,t){return function(){var e,t,n,r,o,i,a=pr,s=pr,l=lr,c=mr;function u(){return r=Math.min(a.length,s.length)>2?vr:gr,o=i=null,d}function d(t){return isNaN(t=+t)?n:(o||(o=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((i||(i=r(s,a.map(e),rr)))(n)))},d.domain=function(e){return arguments.length?(a=Yt.call(e,dr),c===mr||(c=hr(a)),u()):a.slice()},d.range=function(e){return arguments.length?(s=Gt.call(e),u()):s.slice()},d.rangeRound=function(e){return s=Gt.call(e),l=cr,u()},d.clamp=function(e){return arguments.length?(c=e?hr(a):mr,d):c!==mr},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}()(e,t)}function xr(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Sr(e){return(e=xr(Math.abs(e)))?e[1]:NaN}var Er,Mr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Cr(e){return new wr(e)}function wr(e){if(!(t=Mr.exec(e)))throw new Error("invalid format: "+e);var t;this.fill=t[1]||" ",this.align=t[2]||">",this.sign=t[3]||"-",this.symbol=t[4]||"",this.zero=!!t[5],this.width=t[6]&&+t[6],this.comma=!!t[7],this.precision=t[8]&&+t[8].slice(1),this.trim=!!t[9],this.type=t[10]||""}function kr(e,t){var n=xr(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}Cr.prototype=wr.prototype,wr.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Nr={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return kr(100*e,t)},r:kr,s:function(e,t){var n=xr(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(Er=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+xr(e,Math.max(0,t+i-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function Tr(e){return e}var Or,Rr,Ar,Lr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ir(e){var t,n,r=e.grouping&&e.thousands?(t=e.grouping,n=e.thousands,function(e,r){for(var o=e.length,i=[],a=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(e.substring(o-=s,o+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return i.reverse().join(n)}):Tr,o=e.currency,i=e.decimal,a=e.numerals?function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(e.numerals):Tr,s=e.percent||"%";function l(e){var t=(e=Cr(e)).fill,n=e.align,l=e.sign,c=e.symbol,u=e.zero,d=e.width,p=e.comma,m=e.precision,f=e.trim,h=e.type;"n"===h?(p=!0,h="g"):Nr[h]||(null==m&&(m=12),f=!0,h="g"),(u||"0"===t&&"="===n)&&(u=!0,t="0",n="=");var g="$"===c?o[0]:"#"===c&&/[boxX]/.test(h)?"0"+h.toLowerCase():"",v="$"===c?o[1]:/[%p]/.test(h)?s:"",y=Nr[h],b=/[defgprs%]/.test(h);function x(e){var o,s,c,x=g,S=v;if("c"===h)S=y(e)+S,e="";else{var E=(e=+e)<0;if(e=y(Math.abs(e),m),f&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(o>0){if(!+e[r])break e;o=0}}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),E&&0==+e&&(E=!1),x=(E?"("===l?l:"-":"-"===l||"("===l?"":l)+x,S=("s"===h?Lr[8+Er/3]:"")+S+(E&&"("===l?")":""),b)for(o=-1,s=e.length;++o<s;)if(48>(c=e.charCodeAt(o))||c>57){S=(46===c?i+e.slice(o+1):e.slice(o))+S,e=e.slice(0,o);break}}p&&!u&&(e=r(e,1/0));var M=x.length+e.length+S.length,C=M<d?new Array(d-M+1).join(t):"";switch(p&&u&&(e=r(C+e,C.length?d-S.length:1/0),C=""),n){case"<":e=x+e+S+C;break;case"=":e=x+C+e+S;break;case"^":e=C.slice(0,M=C.length>>1)+x+e+S+C.slice(M);break;default:e=C+x+e+S}return a(e)}return m=null==m?6:/[gprs]/.test(h)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),x.toString=function(){return e+""},x}return{format:l,formatPrefix:function(e,t){var n=l(((e=Cr(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Sr(t)/3))),o=Math.pow(10,-r),i=Lr[8+r/3];return function(e){return n(o*e)+i}}}}function Pr(e,t,n,r){var o,i=Bt(e,t,n);switch((r=Cr(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Sr(t)/3)))-Sr(Math.abs(e)))}(i,a))||(r.precision=o),Ar(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Sr(t)-Sr(e))+1}(i,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=o-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(o=function(e){return Math.max(0,-Sr(Math.abs(e)))}(i))||(r.precision=o-2*("%"===r.type))}return Rr(r)}function Dr(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var r,o,i,a,s=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t<e)&&(o=e,e=t,t=o),0===(a=$t(e,t,n))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),i=new Array(o=Math.ceil(t-e+1));++s<o;)i[s]=(e+s)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),i=new Array(o=Math.ceil(e-t+1));++s<o;)i[s]=(e-s)/a;return r&&i.reverse(),i}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return Pr(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,o=t(),i=0,a=o.length-1,s=o[i],l=o[a];return l<s&&(r=s,s=l,l=r,r=i,i=a,a=r),(r=$t(s,l,n))>0?r=$t(s=Math.floor(s/r)*r,l=Math.ceil(l/r)*r,n):r<0&&(r=$t(s=Math.ceil(s*r)/r,l=Math.floor(l*r)/r,n)),r>0?(o[i]=Math.floor(s/r)*r,o[a]=Math.ceil(l/r)*r,t(o)):r<0&&(o[i]=Math.ceil(s*r)/r,o[a]=Math.floor(l*r)/r,t(o)),e},e}function qr(){var e=br(mr,mr);return e.copy=function(){return yr(e,qr())},Ft.apply(e,arguments),Dr(e)}Or=Ir({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),Rr=Or.format,Ar=Or.formatPrefix;var zr=new Date,$r=new Date;function Br(e,t,n,r){function o(t){return e(t=new Date(+t)),t}return o.floor=o,o.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},o.round=function(e){var t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},o.range=function(n,r,i){var a,s=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return s;do{s.push(a=new Date(+n)),t(n,i),e(n)}while(a<n&&n<r);return s},o.filter=function(n){return Br((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(o.count=function(t,r){return zr.setTime(+t),$r.setTime(+r),e(zr),e($r),Math.floor(n(zr,$r))},o.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?function(t){return r(t)%e==0}:function(t){return o.count(0,t)%e==0}):o:null}),o}var Fr=Br((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));Fr.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?Br((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):Fr:null},Fr.range;var Hr=1e3,jr=6e4,Vr=36e5,Wr=864e5,_r=6048e5,Ur=Br((function(e){e.setTime(Math.floor(e/Hr)*Hr)}),(function(e,t){e.setTime(+e+t*Hr)}),(function(e,t){return(t-e)/Hr}),(function(e){return e.getUTCSeconds()}));Ur.range,Br((function(e){e.setTime(Math.floor(e/jr)*jr)}),(function(e,t){e.setTime(+e+t*jr)}),(function(e,t){return(t-e)/jr}),(function(e){return e.getMinutes()})).range,Br((function(e){var t=e.getTimezoneOffset()*jr%Vr;t<0&&(t+=Vr),e.setTime(Math.floor((+e-t)/Vr)*Vr+t)}),(function(e,t){e.setTime(+e+t*Vr)}),(function(e,t){return(t-e)/Vr}),(function(e){return e.getHours()})).range;var Yr=Br((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*jr)/Wr}),(function(e){return e.getDate()-1}));function Gr(e){return Br((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*jr)/_r}))}Yr.range;var Kr=Gr(0),Xr=Gr(1),Jr=Gr(2),Zr=Gr(3),Qr=Gr(4),eo=Gr(5),to=Gr(6);Kr.range,Xr.range,Jr.range,Zr.range,Qr.range,eo.range,to.range,Br((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()})).range;var no=Br((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));no.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Br((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null},no.range;var ro=Br((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*jr)}),(function(e,t){return(t-e)/jr}),(function(e){return e.getUTCMinutes()}));ro.range;var oo=Br((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*Vr)}),(function(e,t){return(t-e)/Vr}),(function(e){return e.getUTCHours()}));oo.range;var io=Br((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/Wr}),(function(e){return e.getUTCDate()-1}));function ao(e){return Br((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/_r}))}io.range;var so=ao(0),lo=ao(1),co=ao(2),uo=ao(3),po=ao(4),mo=ao(5),fo=ao(6);so.range,lo.range,co.range,uo.range,po.range,mo.range,fo.range;var ho=Br((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()}));ho.range;var go=Br((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));function vo(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function yo(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function bo(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}go.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Br((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null},go.range;var xo,So,Eo,Mo={"-":"",_:" ",0:"0"},Co=/^\s*\d+/,wo=/^%/,ko=/[\\^$*+?|[\]().{}]/g;function No(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function To(e){return e.replace(ko,"\\$&")}function Oo(e){return new RegExp("^(?:"+e.map(To).join("|")+")","i")}function Ro(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function Ao(e,t,n){var r=Co.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Lo(e,t,n){var r=Co.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Io(e,t,n){var r=Co.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Po(e,t,n){var r=Co.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Do(e,t,n){var r=Co.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function qo(e,t,n){var r=Co.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function zo(e,t,n){var r=Co.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function $o(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Bo(e,t,n){var r=Co.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Fo(e,t,n){var r=Co.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Ho(e,t,n){var r=Co.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function jo(e,t,n){var r=Co.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Vo(e,t,n){var r=Co.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Wo(e,t,n){var r=Co.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function _o(e,t,n){var r=Co.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Uo(e,t,n){var r=Co.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Yo(e,t,n){var r=wo.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Go(e,t,n){var r=Co.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Ko(e,t,n){var r=Co.exec(t.slice(n));return r?(e.Q=1e3*+r[0],n+r[0].length):-1}function Xo(e,t){return No(e.getDate(),t,2)}function Jo(e,t){return No(e.getHours(),t,2)}function Zo(e,t){return No(e.getHours()%12||12,t,2)}function Qo(e,t){return No(1+Yr.count(no(e),e),t,3)}function ei(e,t){return No(e.getMilliseconds(),t,3)}function ti(e,t){return ei(e,t)+"000"}function ni(e,t){return No(e.getMonth()+1,t,2)}function ri(e,t){return No(e.getMinutes(),t,2)}function oi(e,t){return No(e.getSeconds(),t,2)}function ii(e){var t=e.getDay();return 0===t?7:t}function ai(e,t){return No(Kr.count(no(e),e),t,2)}function si(e,t){var n=e.getDay();return e=n>=4||0===n?Qr(e):Qr.ceil(e),No(Qr.count(no(e),e)+(4===no(e).getDay()),t,2)}function li(e){return e.getDay()}function ci(e,t){return No(Xr.count(no(e),e),t,2)}function ui(e,t){return No(e.getFullYear()%100,t,2)}function di(e,t){return No(e.getFullYear()%1e4,t,4)}function pi(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+No(t/60|0,"0",2)+No(t%60,"0",2)}function mi(e,t){return No(e.getUTCDate(),t,2)}function fi(e,t){return No(e.getUTCHours(),t,2)}function hi(e,t){return No(e.getUTCHours()%12||12,t,2)}function gi(e,t){return No(1+io.count(go(e),e),t,3)}function vi(e,t){return No(e.getUTCMilliseconds(),t,3)}function yi(e,t){return vi(e,t)+"000"}function bi(e,t){return No(e.getUTCMonth()+1,t,2)}function xi(e,t){return No(e.getUTCMinutes(),t,2)}function Si(e,t){return No(e.getUTCSeconds(),t,2)}function Ei(e){var t=e.getUTCDay();return 0===t?7:t}function Mi(e,t){return No(so.count(go(e),e),t,2)}function Ci(e,t){var n=e.getUTCDay();return e=n>=4||0===n?po(e):po.ceil(e),No(po.count(go(e),e)+(4===go(e).getUTCDay()),t,2)}function wi(e){return e.getUTCDay()}function ki(e,t){return No(lo.count(go(e),e),t,2)}function Ni(e,t){return No(e.getUTCFullYear()%100,t,2)}function Ti(e,t){return No(e.getUTCFullYear()%1e4,t,4)}function Oi(){return"+0000"}function Ri(){return"%"}function Ai(e){return+e}function Li(e){return Math.floor(+e/1e3)}!function(e){(xo=function(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=Oo(o),u=Ro(o),d=Oo(i),p=Ro(i),m=Oo(a),f=Ro(a),h=Oo(s),g=Ro(s),v=Oo(l),y=Ro(l),b={a:function(e){return a[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:Xo,e:Xo,f:ti,H:Jo,I:Zo,j:Qo,L:ei,m:ni,M:ri,p:function(e){return o[+(e.getHours()>=12)]},Q:Ai,s:Li,S:oi,u:ii,U:ai,V:si,w:li,W:ci,x:null,X:null,y:ui,Y:di,Z:pi,"%":Ri},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:mi,e:mi,f:yi,H:fi,I:hi,j:gi,L:vi,m:bi,M:xi,p:function(e){return o[+(e.getUTCHours()>=12)]},Q:Ai,s:Li,S:Si,u:Ei,U:Mi,V:Ci,w:wi,W:ki,x:null,X:null,y:Ni,Y:Ti,Z:Oi,"%":Ri},S={a:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.w=f[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=p[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=v.exec(t.slice(n));return r?(e.m=y[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return C(e,t,n,r)},d:Fo,e:Fo,f:Uo,H:jo,I:jo,j:Ho,L:_o,m:Bo,M:Vo,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u[r[0].toLowerCase()],n+r[0].length):-1},Q:Go,s:Ko,S:Wo,u:Lo,U:Io,V:Po,w:Ao,W:Do,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:zo,Y:qo,Z:$o,"%":Yo};function E(e,t){return function(n){var r,o,i,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(o=Mo[r=e.charAt(++s)])?r=e.charAt(++s):o="e"===r?" ":"0",(i=t[r])&&(r=i(n,o)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function M(e,t){return function(n){var r,o,i=bo(1900);if(C(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("p"in i&&(i.H=i.H%12+12*i.p),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(o=(r=yo(bo(i.y))).getUTCDay(),r=o>4||0===o?lo.ceil(r):lo(r),r=io.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(o=(r=t(bo(i.y))).getDay(),r=o>4||0===o?Xr.ceil(r):Xr(r),r=Yr.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),o="Z"in i?yo(bo(i.y)).getUTCDay():t(bo(i.y)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(o+5)%7:i.w+7*i.U-(o+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,yo(i)):t(i)}}function C(e,t,n,r){for(var o,i,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(i=S[o in Mo?t.charAt(a++):o])||(r=i(e,n,r))<0)return-1}else if(o!=n.charCodeAt(r++))return-1}return r}return b.x=E(n,b),b.X=E(r,b),b.c=E(t,b),x.x=E(n,x),x.X=E(r,x),x.c=E(t,x),{format:function(e){var t=E(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=M(e+="",vo);return t.toString=function(){return e},t},utcFormat:function(e){var t=E(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=M(e,yo);return t.toString=function(){return e},t}}}(e)).format,xo.parse,So=xo.utcFormat,Eo=xo.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var Ii="%Y-%m-%dT%H:%M:%S.%LZ";Date.prototype.toISOString||So(Ii),+new Date("2000-01-01T00:00:00.000Z")||Eo(Ii);var Pi=1e3,Di=6e4,qi=36e5,zi=864e5,$i=2592e6,Bi=31536e6;function Fi(e){return new Date(e)}function Hi(e){return e instanceof Date?+e:+new Date(+e)}function ji(e,t,n,r,o,i,a,s,l){var c=br(mr,mr),u=c.invert,d=c.domain,p=l(".%L"),m=l(":%S"),f=l("%I:%M"),h=l("%I %p"),g=l("%a %d"),v=l("%b %d"),y=l("%B"),b=l("%Y"),x=[[a,1,Pi],[a,5,5e3],[a,15,15e3],[a,30,3e4],[i,1,Di],[i,5,3e5],[i,15,9e5],[i,30,18e5],[o,1,qi],[o,3,108e5],[o,6,216e5],[o,12,432e5],[r,1,zi],[r,2,1728e5],[n,1,6048e5],[t,1,$i],[t,3,7776e6],[e,1,Bi]];function S(s){return(a(s)<s?p:i(s)<s?m:o(s)<s?f:r(s)<s?h:t(s)<s?n(s)<s?g:v:e(s)<s?y:b)(s)}function E(t,n,r,o){if(null==t&&(t=10),"number"==typeof t){var i=Math.abs(r-n)/t,a=It((function(e){return e[2]})).right(x,i);a===x.length?(o=Bt(n/Bi,r/Bi,t),t=e):a?(o=(a=x[i/x[a-1][2]<x[a][2]/i?a-1:a])[1],t=a[0]):(o=Math.max(Bt(n,r,t),1),t=s)}return null==o?t:t.every(o)}return c.invert=function(e){return new Date(u(e))},c.domain=function(e){return arguments.length?d(Yt.call(e,Hi)):d().map(Fi)},c.ticks=function(e,t){var n,r=d(),o=r[0],i=r[r.length-1],a=i<o;return a&&(n=o,o=i,i=n),n=(n=E(e,o,i,t))?n.range(o,i+1):[],a?n.reverse():n},c.tickFormat=function(e,t){return null==t?S:l(t)},c.nice=function(e,t){var n=d();return(e=E(e,n[0],n[n.length-1],t))?d(function(e,t){var n,r=0,o=(e=e.slice()).length-1,i=e[r],a=e[o];return a<i&&(n=r,r=o,o=n,n=i,i=a,a=n),e[r]=t.floor(i),e[o]=t.ceil(a),e}(n,e)):c},c.copy=function(){return yr(c,ji(e,t,n,r,o,i,a,s,l))},c}const Vi={horizontal:{major:"width",minor:"height",start:"left",end:"right",shadow:{startOffset:"12px 0",endOffset:"-12px 0"}},vertical:{major:"height",minor:"width",start:"top",end:"bottom",shadow:{startOffset:"0 12px",endOffset:"0 -12px"}}},Wi=e=>e+" 12px -12px inset rgba(0, 0, 0, 0.0625)";var _i={defaultSettings:{settings:{orientation:"horizontal",rtl:!1,range:()=>[0,1]}},renderer:"dom",render(e){const{range:t,orientation:n,rtl:r}=this.settings.settings,[o,i]=t(),a=Math.abs(o)<1e-15,s=Math.abs(i-1)<1e-15,l=(e=>{const t=Vi[e];return{base:{position:"absolute",[t.major]:12,[t.minor]:"100%"},towardsStart:{[t.start]:0,[t.end]:"auto",boxShadow:Wi(t.shadow.startOffset)},towardsEnd:{[t.start]:"auto",[t.end]:0,boxShadow:Wi(t.shadow.endOffset)}}})(n),c="horizontal"===n&&r,u=[];return a||u.push(e("div",{style:{...l.base,...c?l.towardsEnd:l.towardsStart},class:"scroll-hint--towards-start"})),s||u.push(e("div",{style:{...l.base,...c?l.towardsStart:l.towardsEnd},class:"scroll-hint--towards-end"})),u}};function Ui({viewState:e,viewCache:t,layoutService:n,dockService:r,rtl:o}){return!n.meta.isSnapshot&&{key:"scroll-hint",type:"scroll-hint",settings:{orientation:r.meta.major.orientation,rtl:o,range:()=>function({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),o=t.get("continuousMax");return[(n.min-r)/(o-r),(n.max-r)/(o-r)]}(t,n):function(e){return e.get("viewRange")}(t)}({layoutService:n,viewState:e,viewCache:t})}}}let Yi;function Gi(){Yi=Yi||document.createElement("canvas").getContext("2d")}const Ki={measureTextWidth(e){Gi();const{width:t}=Yi.measureText(e);return t},lineWrap(e,t,n,r){let o,i;Gi();const a=e?e.split(/\n+|\r+|\r\n/):[],s=[];let l,c,u,d,p=e?e.split(/\s+/):[],m=a[0];if("number"!=typeof t||t<=0)return[e];if("number"==typeof r&&a.length>=r)return a.slice(0,r);for(n&&(Yi.font=n),i=0;i<a.length;i++){for(d=a[i]||"",p=d.split(/\s+/),[m]=p,u="",o=1;o<p.length;o++)if(l=`${m} ${p[o]}`,c=Ki.measureTextWidth(l),c>t&&("number"!=typeof r||r>s.length)?(s.push(m),m=p[o]):m=l,"number"==typeof r&&s.length>=r){u=p.slice(o+1).join(" ");break}"number"!=typeof r||s.length<r?s.push(m):s[Math.max(0,s.length-1)]=`${s[Math.max(0,s.length-1)]||""} ${m} ${u}`}return s},wordWrap(e,t,n,r,o){if(Gi(),!e||!e.length)return[];n&&(Yi.font=n);let i=[];const a=e.slice();let s,l,c,u;if(a.filter((e=>!!e)),"number"!=typeof t||t<0)return e.slice();for(u=0;u<a.length;u++)c=a[u],l=null,c&&(c.length<=1||Ki.measureTextWidth(c)<=t?i.push(c):(s=Ki.splitWord(c,t,void 0,r-i.length),s.length<=1?i.push(s[0]):(l=s.pop(),i=i.concat(s),a[u+1]?Ki.measureTextWidth(`${l} ${a[u+1]}`)>t&&i.length+a.length-u<=r?a.splice(u+1,0,l):a[u+1]=`${l} ${a[u+1]}`:a.push(l))));return i.forEach(((e,t,n)=>{n[t]=e?e.trim():e})),i.length>r?(i=i.splice(0,r),i[i.length-1]=Ki.truncate(i[i.length-1],t,n,o).text):(c=i[i.length-1],c&&c.length>1&&Ki.measureTextWidth(c)>t&&(i[i.length-1]=Ki.truncate(c,t,n,o).text)),i},truncate(e,t,n,r="…"){Gi();let o,i,a,s,l=e;const c=Ki.measureTextWidth("i"),u=Math.ceil(t/c);if(n&&(Yi.font=n),e&&t){if(Ki.measureTextWidth(l)>t){for(o=Math.min(u,l.length);o>0;o--)if(i=l.substring(0,o-1),a=i.trim()+r,Ki.measureTextWidth(a)<=t){s=l.substring(o-1),l=a;break}o||(s=l,l="…")}}else s=void 0;return{text:l,rest:s}},isNumber:e=>"number"==typeof e&&Number.isFinite(e),explodeWord(e,t,n,r){let o;Gi();let i,a=e,s="",l=[];if(Ki.isNumber(n)&&n<=1)return[e];const c=Math.ceil(t/r);for(o=Math.min(e.length,c);o>0&&(a=e.substring(0,o),i=e.substring(o-1,o)," "===i?a=e.substring(0,o-1):a+="-",s=e.substring(o),!(Ki.measureTextWidth(a)<=t));o--);return(!o&&!a||Ki.measureTextWidth(a)>t)&&(a=e.substring(0,1),s=e.substring(1)),l.push(a),s?(Ki.measureTextWidth(s)>t?(s=Ki.explodeWord(s,t,n-1,r),l=l.concat(s)):l.push(s),l.filter((e=>""!==e.trim()))):l},splitWord:(e,t,n,r)=>(Gi(),e&&t?(n&&(Yi.font=n),Ki.explodeWord(e,t,r,Math.max(1,Ki.measureTextWidth("i")))):[]),wrapText(e,t,n,r,o){let i;return Number.isNaN(t)?[e]:(i=r>1?Ki.lineWrap(e,t,n,r):[e],i=Ki.wordWrap(i,t,n,r,o),i)},getFontHeight:e=>(Gi(),e&&(Yi.font=e),1.5*Ki.measureTextWidth("m")),tokenize(e,t,n,r,o,i,a=1){Gi(),t&&(Yi.font=t);const s=Ki.getFontHeight(),l=a*s;let c=[],u=0,d=[];if(i<s)return[];const p=i?Math.max(1,Math.floor(i/l)):r||1;return Array.isArray(r)?(r.forEach((e=>{u+=Number.isNaN(e)||e<=0?0:e})),r.forEach((e=>{c.push(Number.isNaN(e)||e<=0?p-u:e)}))):c=[Number.isNaN(r)||r<=0?p:Math.min(p,r)],Array.isArray(e)?e.forEach(((e,n)=>{d.length<p&&(d=d.concat(Ki.wrapText(e,o,t,c[n])))})):d=Ki.wrapText(e,o,t,c[0],n),d}},Xi={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:o,flipXY:i,symbol:a}){let s="x",l="y",c=r,u=o,d=t<.5?90:-90;return i&&(s="y",l="x",c=o,u=r,d=t<.5?180:0),a(Q({},e,{[s]:n*c,[l]:Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:d}))}},Ji=Q.bind(null,!0),Zi={},{isArray:Qi}=Array;function ea(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function ta(e){return void 0===e}function na(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function ra(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach(((t,o)=>{if(o===n.length)return;r=+t;const i=isNaN(r)?{}:[];e[r||t]=ta(e[r||t])?i:e[t],e=e[r||t]})),e}function oa(e,t){let n=!0;if(ea(e)&&ea(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((r=>{oa(e[r],t[r])||(n=!1)})),n);if(Qi(e)&&Qi(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!oa(e[n],t[n]))return!1;return!0}return e===t}Zi.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((o=>{const i=function(e){return e?Ji({},{val:e}).val:e}(t[o]),a=e[o],s=`${n}/${o}`;oa(i,a)||na(t,o)||(ta(a)?r.push({op:"add",path:s,value:i}):ea(i)&&ea(a)?r=r.concat(Zi.generate(a,i,s)):Qi(i)&&Qi(a)?r=r.concat(function(e,t,n){let r=[];const o=e.slice();let i=-1;function a(e,t,n){if(e[n]&&ta(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(let n=0,r=e.length;n<r;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(oa(t,o))return r;if(!ta(t[0])&&ta(t[0].qInfo)||0===t.length)return r.push({op:"replace",path:n,value:t}),r;for(let e=o.length-1;e>=0;e-=1)i=a(t,o[e].qInfo&&o[e].qInfo.qId,e),-1===i?(r.push({op:"remove",path:`${n}/${e}`}),o.splice(e,1)):r=r.concat(Zi.generate(o[e],t[i],`${n}/${e}`));for(let e=0,s=t.length;e<s;e+=1)i=a(o,t[e].qInfo&&t[e].qInfo.qId),-1===i?(r.push({op:"add",path:`${n}/${e}`,value:t[e]}),o.splice(e,0,t[e])):i!==e&&(r.push({op:"move",path:`${n}/${e}`,from:`${n}/${i}`}),o.splice(e,0,o.splice(i,1)[0]));return r}(a,i,s)):r.push({op:"replace",path:`${n}/${o}`,value:i}))})),Object.keys(e).forEach((o=>{ta(t[o])&&!na(e,o)&&r.push({op:"remove",path:`${n}/${o}`})})),r},Zi.apply=function(e,t){t.forEach((t=>{let n=ra(e,t.path),r=t.path.split("/").splice(-1)[0],o=r&&isNaN(+r)?n[r]:n[+r]||n;const i=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,o=e),"add"===t.op||"replace"===t.op)if(Qi(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(Qi(o)&&Qi(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if(ea(o)&&ea(t.value))a=o,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!na(a,e)&&delete a[e]})),Ji(o,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[r]=t.value}else if("move"===t.op){const o=ra(e,t.from);Qi(n)?n.splice(+r,0,o.splice(+i,1)[0]):(n[r]=o[i],delete o[i])}else"remove"===t.op&&(Qi(n)?n.splice(+r,1):delete n[r]);var a}))},Zi.clone=function(e){return Ji({},e)},Zi.createPatch=function(e,t,n){const r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},Zi.updateObject=function(e,t){Object.keys(e).length?Zi.apply(e,Zi.generate(e,t)):Ji(e,t)};const ia=[[2,4,6],[2,4],[3]],aa=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function sa(e,t,n){const r=e?e.length:0;let o,i=void 0===t?Number.MAX_VALUE:e[0]/t;for(o=1;o<r;o++)i=Math.min(i,e[o]/e[o-1]);void 0!==n&&(i=Math.min(i,n/e[r-1])),e.splice(0,0,i)}function la(e,t,n){let r;const o=e?e.length:0;for(r=0;r<o;r++)sa(e[r],t,n)}!function(){let e,t;for(la(ia,1,10),e=0;e<aa.length;e++)if(aa[e])for(t=0;t<aa[e].length;t++)Array.isArray(aa[e][t])&&la(aa[e][t])}();const ca={isInside(e,t,n,r){if(!r)return!0;const o=e.position-e.radius,i=e.position+e.radius;return o>=t&&i<=n},getCenterDistance:(e,t)=>Math.abs(e.center-t.center),getGap(e,t){const n=e.position<t.position?e:t,r=e.position<t.position?t:e;return r.position-r.radius-(n.position+n.radius)},findSegmentPositionMeetMax(e,t){const n=Math.max(0,e.max-t);return e.center-n},findSegmentPositionMeetMin(e,t){const n=Math.max(0,t-e.min);return e.center+n},findSegmentPositionMeetMinThenMax(e,t,n){const r=ca.findSegmentPositionMeetMin(e,t);return ca.findSegmentPositionMeetMax({center:r,max:r+e.radius},n)},findSegmentPositionMeetMaxThenMin(e,t,n){const r=ca.findSegmentPositionMeetMax(e,n);return ca.findSegmentPositionMeetMin({center:r,min:r-e.radius},t)},layoutPositionFromMin(e,t,n,r=0){const o=e.length-1;let i,a,s=t;for(let t=0;t<o;t++)i=e[t],a=e[t+1],i.position=ca.findSegmentPositionMeetMaxThenMin(i,s,(i.center+a.center-r)/2),s=i.position+i.radius+r/2;a.position=ca.findSegmentPositionMeetMaxThenMin(a,s,n)},adjustPositionFromMax(e,t,n,r=0){const o=e.length-1;let i,a,s;const l=Math.max(0,e[o].position+e[o].radius-n);if(0===l)return;let c,u=0;for(i=o;i>0&&(a=e[i],s=e[i-1],c=Math.max(0,ca.getGap(s,a)-r),c-=Math.max(0,u+c-l),u+=c,a.move=c,!(u>=l));i--);for(u<l&&(c=Math.max(0,s.position-s.radius-t),c-=Math.max(0,u+c-l),u+=c,s.move=c),u=0,i=0;i<=o;i++)a=e[i],u+=a.move||0,a.move=u,a.position-=u},layout(e,t,n,r=0){const o=e.length-1;if(!(o<0))if(0!==o)ca.layoutPositionFromMin(e,t,n,r),ca.adjustPositionFromMax(e,t,n,r);else{const r=e[0];r.position=ca.findSegmentPositionMeetMaxThenMin(r,t,n)}}},ua=(e,t,n,r=1)=>{const o=e.bandwidth();return n?"start"===t?o:"end"===t?o*(1-r):o*(2-r)/2:"start"===t?0:"end"===t?o*r:o*r/2},da=e=>!1!==e.show&&0!==e.show&&"0"!==e.show,pa=e=>e.filter(da),ma=(e,t)=>pa(ce(e,t,[])),fa=e=>da(e)&&(!1!==e.showValue||!1!==e.showLabel),ha=e=>e.filter(fa),ga=(e,t)=>ha(ce(e,t,[])),va=({refLineLayout:e,layoutService:t})=>t.meta.canBeContinuous?e.refLineExpr.value:e.refLineExpr.stringValue,ya=(e,t,n)=>{const{dimensionRefLineInfo:r}=t;if(r[e])return r[e][n]},ba=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:o}=n;return void 0!==r&&void 0!==o&&void 0!==e.valueInfo&&e.valueInfo.maxOrder<r},xa=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:o}=n;return void 0!==r&&void 0!==o&&void 0!==e.valueInfo&&e.valueInfo.minOrder>=r+o},Sa=({value:e,qMin:t})=>"NaN"!==t&&e<t,Ea=({value:e,qMax:t})=>"NaN"!==t&&e>t,Ma={isRefLineVisible:da,getVisibleRefLines:pa,getRefLines:ma,getMeasureRefLines:e=>ma(e,"refLine.refLines"),getDimensionRefLines:(e,t)=>t?[]:ma(e,"refLine.dimRefLines"),isRefLineLabelVisible:fa,getVisibleRefLineLabels:ha,getRefLineLabels:ga,getMeasureRefLineLabels:e=>ga(e,"refLine.refLines"),getDimensionRefLineLabels:(e,t)=>t?[]:ga(e,"refLine.dimRefLines"),getScaledPosition:({scale:e,size:t,value:n,valueInfo:r,align:o,invert:i=!1,layoutService:a,isContinuous:s})=>{if(!s){const s=e.pxScale(t);let l;if(a.meta.isGroupedByMeasure)return l=ua(s,o,i,a.meta.measureCount),s([n,0])+l;if(a.meta.isGroupedByDimension){if(!r)return NaN;const{innerValues:e,numInnerValues:t,minOrder:a}=r;let c;return l=ua(s,o,i,t),e&&e.length&&(c=(({pxScale:e,value:t,innerValues:n,invert:r,minOrder:o})=>{const i=(({pxScale:e,invert:t})=>e.bandwidth()*(t?-1:1))({pxScale:e,invert:r});for(let r=0;r<n.length;r++){const{id:a,order:s}=n[r],l=e([t,a]);if(void 0!==l)return l-i*(s-o)}})({pxScale:s,value:n,innerValues:e,invert:i,minOrder:a})),(void 0===c?s(n):c)+l}return l=ua(s,o,i),s(n)+l}return e(n)},getDimensionValuesInfo:({layout:e,canBeContinuous:t,discreteModel:n,layoutService:r})=>{const{isGroupedByDimension:o}=r.meta,i={},a=ce(e,"qHyperCube"),s="K"===a.qMode,l=n?n.query.getCurrentDataPage():ce(a,"S"===a.qMode?"qDataPages.0":"qStackedDataPages.0",[]);const c=ce(l,s?"qData.0.qSubNodes":"qMatrix",[]),u=((e,t)=>e?t?"qValue":"qNum":"qText")(t,s),d=(e=>e.qArea.qTop)(l);return s?(()=>{for(let e=0;e<c.length;e++){const t=c[e],n=e+d,r=t[u];i[r]||(i[r]={id:t.qElemNo,qText:t.qText,minOrder:n,maxOrder:n})}})():o?(()=>{let e;for(let t=0;t<c.length;t++){const n=c[t][0],r=c[t][1],o=t+d,a=n[u];i[a]?(i[a].minOrder=Math.min(i[a].minOrder,o),i[a].maxOrder=Math.max(i[a].maxOrder,o),i[a].innerValues[i[a].innerValues.length]={id:r.qElemNumber,order:o}):i[a]={id:n.qElemNumber,qText:n.qText,minOrder:o,maxOrder:o,innerValues:[{id:r.qElemNumber,order:o}]},0===t?0===o&&(i[a].isMinOrderOk=!0):a!==e&&(i[a].isMinOrderOk=!0,i[e].isMaxOrderOk=!0),e=a}})():(()=>{for(let e=0;e<c.length;e++){const t=c[e][0],n=e+d,r=t[u];i[r]||(i[r]={id:t.qElemNumber,qText:t.qText,minOrder:n,maxOrder:n})}})(),i},getInputValue:va,extractInfoFromInputValue:ya,resolveValue:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=va({refLineLayout:e,layoutService:n});return ya(r,t,"id")},isDiscreteMinOutOfBounds:ba,isDiscreteMaxOutOfBounds:xa,isContinuousMinOutOfBounds:Sa,isContinuousMaxOutOfBounds:Ea,isOutOfRange:({value:e,qMin:t,qMax:n})=>Sa({value:e,qMin:t})||Ea({value:e,qMax:n}),isOutOfDataPages:({label:e,dataPages:t})=>e.valueInfo.isMinOrderOk&&xa({label:e,dataPages:t})||e.valueInfo.isMaxOrderOk&&ba({label:e,dataPages:t}),getInvert:({orientation:e,rtl:t,isContinuous:n})=>"horizontal"===e?t:n};function Ca(e,t,n=70){for(let r=0;r<e.length;r++){const o=e[r];o.lines=Ki.tokenize(o.title,t,"… "+o.valueString,3,n),o.maxNumLines=o.lines.length}}function wa({title:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:o=200}){const i=Ki.tokenize(e,t,n,r,o),a=i.length;let s="";if(a){[s]=i;for(let e=1;e<a;e++)s=`${s}\n${i[e]}`}return s}function ka({oobs:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:o=200}){const i=e.map((e=>wa({title:e.title,font:t,ellipsis:`${n} ${e.valueString}`,maxNumLines:r,maxWidth:o}))),a=i.length;let s="";if(a){[s]=i;for(let e=1;e<a;e++)s=`${s}\n\n${i[e]}`}return s}function Na(e,t="value"){e.sort(((e,n)=>e[t]-n[t]))}const Ta=3,Oa=2;function Ra({inputValue:e,inputValueLabel:t,localeInfo:n}){if(void 0===e||void 0===t||e.toString()===t)return!1;if(!n)return!0;const r=`+-${n.qDecimalSep||""}${n.qThousandSep||""}`.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&");return t.replace(new RegExp(`[0-9e${r}]`,"g"),"").length>0||function(e){if(e.indexOf("e")>-1)return!1;const t=e.indexOf("-");return-1!==t&&(e.lastIndexOf("-")!==t||0!==t)}(t)}const Aa=({label:e,dataPages:t,qMin:n,qMax:r})=>{if(void 0!==n&&void 0!==r){const{inputValue:t}=e;if(Ma.isContinuousMaxOutOfBounds({value:t,qMax:r}))return 1;if(Ma.isContinuousMinOutOfBounds({value:t,qMin:n}))return-1}return Ma.isDiscreteMaxOutOfBounds({label:e,dataPages:t})?1:Ma.isDiscreteMinOutOfBounds({label:e,dataPages:t})?-1:0},La={hasEngineFormat:Ra,calculateLabelPositions({labels:e,scale:t,size:n,layoutService:r,orientation:o,rtl:i,isContinuous:a,isDimension:s}){const l=Ma.getInvert({orientation:o,rtl:i,isContinuous:a}),c="S"===r.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",u=r.getHyperCubeValue(c),{canBeContinuous:d}=r.meta;let p,m;if(s&&d){const e=r.getLayoutValue("qHyperCube.qDimensionInfo.0");p=e.qMin,m=e.qMax}for(let o=0;o<e.length;o++){const i=e[o],{value:s,align:c,valueInfo:d}=i,f=Aa({label:i,dataPages:u,qMin:p,qMax:m});i.scaledValue=1===f?l?-.1:1.1:-1===f?l?1.1:-.1:Ma.getScaledPosition({scale:t,size:n,value:s,valueInfo:d,align:c,invert:l,layoutService:r,isContinuous:a}),i.center=i.scaledValue*n}},getTitle:e=>!1!==e.showValue?!1!==e.showLabel?`${e.text} ${e.valueString}`:e.valueString:!1!==e.showLabel?e.text:"",addLabelTitles({labels:e,formatter:t,isContinuous:n,canBeContinuous:r,localeInfo:o}){let i;if(n)for(let n=0;n<e.length;n++){const r=e[n],{value:a,inputValue:s,inputValueLabel:l}=r;i=Ra({inputValue:s,inputValueLabel:l,localeInfo:o})?l:t?t(a):a,r.valueString=`${Se.lrm}(${i})${Se.lrm}`,r.title=La.getTitle(r)}else if(r)for(let t=0;t<e.length;t++){const n=e[t],{valueText:r,inputValue:a,inputValueLabel:s}=n;i=Ra({inputValue:a,inputValueLabel:s,localeInfo:o})?s:r,n.valueString=`${Se.lrm}(${i})${Se.lrm}`,n.title=La.getTitle(n)}else for(let t=0;t<e.length;t++){const n=e[t];i=n.valueText,n.valueString=`${Se.lrm}(${i})${Se.lrm}`,n.title=La.getTitle(n)}},measureLabelsWidth(e,t){for(let n=0;n<e.length;n++){const r=e[n];r.totalWidth=t(r.title).width}},measureLabelMaxLineWidth:(e,t)=>Math.max(...e.lines.map((e=>t(e).width))),getMaxTextWidth(e){const t=e.map((e=>e.totalWidth));return Math.max(...t)},addLabelsNeighborInfo(e,t,n,r=0){const o=e.length-1;if(o<0)return;let i,a;if([i]=e,i.cMin=t,0!==o){for(let t=0;t<o;t++)i=e[t],a=e[t+1],i.cMax=(i.center+a.center-r)/2,a.cMin=i.cMax+r;a.cMax=n}else i.cMax=n},getTotalNumLines(e){let t=0;return e.forEach((e=>{t+=e.maxNumLines})),t},reduceLabelsHavingMaxNumLines(e,t,n){const r=t-1,o=e.filter((e=>e.maxNumLines===t)),i=Math.min(n,o.length);for(let e=o.length-1;e>=o.length-i;e--)o[e].maxNumLines=r},reduceTotalMaxNumLines(e,t,n){const r=Math.floor(n/t);let o=3;do{const t=La.getTotalNumLines(e)-r;if(t<=0)return;La.reduceLabelsHavingMaxNumLines(e,o,t),o--}while(o>1)},reduceMaxNumLines(e,t,n=0){for(let r=0;r<e.length;r++){const o=e[r];o.maxNumLines=Math.max(1,Math.min(o.maxNumLines,Math.floor((Math.max(0,o.cMax-o.cMin)+n)/t)))}},addLabelsSize(e,t,n=15,r){for(let o=0;o<e.length;o++){const i=e[o];i.width=Math.min(t,La.measureLabelMaxLineWidth(i,r)),i.height=i.lines.length*n}},addLabelSegments(e,t){for(let n=0;n<e.length;n++){const r=e[n],{center:o}=r,i=r[t],a=i/2;r.segment={center:o,range:i,min:o-a,max:o+a,radius:a}}},addLabelsInfo({labels:e,scale:t,majorSize:n,lowerLimit:r,upperLimit:o,gap:i,font:a,maxLabelWidth:s,lineHeight:l,majorDimension:c,orientation:u,measureText:d,rtl:p,layoutService:m,isContinuous:f,isDimension:h}){const g=e.map((e=>e)),v=n;La.calculateLabelPositions({labels:e,scale:t,size:v,layoutService:m,orientation:u,rtl:p,isContinuous:f,isDimension:h}),Na(e,"center"),La.addLabelsNeighborInfo(e,r,o,i),Ca(e,a,s),La.reduceTotalMaxNumLines(g,l,o-(g.length-1)*i),"vertical"===u&&(La.reduceMaxNumLines(e,l,.05*i),function(e,t,n=70){for(let r=0;r<e.length;r++){const o=e[r];o.lines.length>o.maxNumLines&&(o.lines=Ki.tokenize(o.title,t,"… "+o.valueString,o.maxNumLines,n))}}(e,a,s)),La.addLabelsSize(e,s,l,d),La.addLabelSegments(e,c)},createLabels({labels:e,style:t,maxLabelWidth:n,areaProps:r,area:o,lineHeight:i=15,font:a}){const{majorAxis:s,minorAxis:l,dock:c}=r,{minorCenter:u}=o,{fontSize:d,fontFamily:p,background:m}=t;let f=[];return e.forEach((e=>{const{lines:t}=e,r=t.length,o=t.map(((t,o)=>{const m={type:"text",text:t,title:wa({title:e.title,font:a,ellipsis:"… "+e.valueString}),dx:0,dy:0,maxWidth:n,width:n,fontSize:d,fontFamily:p,fill:e.fill,baseline:"central",anchor:"middle",value:e.value,dock:c};return m[l]=u,m[s]=e.segment.position,m.y+=(o-(r-1)/2)*i,m}));e.background&&f.push(function({minorCenter:e,majorAxis:t,minorAxis:n,dock:r,label:o,lineHeight:i,background:a}){const{lines:s}=o,{borderRadius:l=Ta,padding:c={}}=a,{top:u=Oa,bottom:d=Oa,left:p=Oa,right:m=Oa}=c,f=s.length,h={type:"rect",rx:l,ry:l,fill:o.background.fill,width:o.width+(p+m),height:o.height+(u+d),value:o.value,dock:r};return h[n]=e,h[t]=o.segment.position,h.x-=o.width/2+p,h.y-=f*i/2+u,h}({minorCenter:u,majorAxis:s,minorAxis:l,dock:c,label:e,lineHeight:i,background:m})),f=f.concat(o)})),f}};function Ia(e,t,n){let r;const o=typeof t;if("string"===o||"object"===o)r=e.formatter(t);else if(void 0!==n&&n.data){const e=n.data()&&n.data().fields;r=e&&e[0]?e[0].formatter():null}return r}function Pa(e,t,n){return"top"===e||"bottom"===e?function(e,t){const{font:n,lineHeight:r,top:o,bottom:i,maxLabelWidth:a}=t;let s=1;return La.getMaxTextWidth(e)>a&&(Ca(e,n,a),s=Math.max(...e.map((e=>e.lines.length)))),s*r+o+i}(t,n):function(e,t){const{left:n,right:r,maxLabelWidth:o}=t;return Math.min(o,La.getMaxTextWidth(e))+n+r}(t,n)}function Da(e,t){return t?e.domain():[0,1]}function qa(e,t,n,r="value"){let o=e.filter((e=>e[r]>=t));o=o.filter((e=>e[r]<=n));const i=e.filter((e=>e[r]<t)),a=e.filter((e=>e[r]>n));return{filteredLabels:o,minOobs:i,maxOobs:a,numMinOobs:i.length,numMaxOobs:a.length}}function za(e){let t,n=0;for(let r=1;r<10;r++)t=e(r),n=Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height));return t=e("9+"),[n,Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height))]}function $a(e,t){return e>9?t[1]:t[0]}function Ba({alignment:e,dockValue:t,oobs:n,style:r,rect:o,symbol:i,position:a,areaProps:s,radius:l,font:c}){const u=n?n.length:0;if(u<1)return[];const{flipXY:d,majorAxis:p,minorAxis:m,minorDimension:f,dock:h}=s,g=o[f],v=Xi.createOob({oob:Xi.getDefaultSettings({size:r.size,fill:r.fill,alignment:e}),dockValue:t,boxCenter:.5,rendWidth:o.width,rendHeight:o.height,flipXY:d,symbol:i});v.dock=h;const y="c"+p,b="c"+m,x={type:"circle",r:l,stroke:"transparent",fill:r.text.background.fill,strokeWidth:0,dock:h};x[b]=g/2,x[y]=a;const S={type:"text",text:u>9?"9+":u,title:ka({oobs:n,font:c,ellipsis:"…"}),dx:0,dy:0,maxWidth:g,width:g,fontSize:r.text.fontSize,fontFamily:r.text.fontFamily,fill:r.text.fill,baseline:"central",anchor:"middle",dock:h};return S[m]=g/2,S[p]=a,[v,x,S]}function Fa(e){const t=`normal ${e.fontSize} '${e.fontFamily}'`;return{font:t,lineHeight:Ki.getFontHeight(t)*(e.lineHeightMultiplicator||1),gap:e.gap||12,maxLabelWidth:e.maxWidth||75,top:e.padding.top||0,bottom:e.padding.bottom||0,left:e.padding.left||0,right:e.padding.right||0}}const Ha=e=>e.map((e=>({...e,value:"function"==typeof e.value?e.value():e.value,valueText:"function"==typeof e.valueText?e.valueText():e.valueText,valueInfo:"function"==typeof e.valueInfo?e.valueInfo():e.valueInfo})));var ja={require:["renderer","chart","symbol"],defaultSettings:{layout:{displayOrder:0,prioOrder:0}},preferredSize(){const{scale:e}=this,{style:t,layoutService:n,isContinuous:r,localeInfo:o}=this.settings,i=!!r||n.meta.canBeContinuous,a=Ha(this.settings.labels),s=Ia(this.chart,this.settings.formatter,e);La.addLabelTitles({labels:a,formatter:s,isContinuous:r,canBeContinuous:i,localeInfo:o});const{numMaxOobs:l,numMinOobs:c,filteredLabels:u}=(({labels:e,scale:t,isContinuous:n,canBeContinuous:r,layoutService:o})=>{if(n){const[r,o]=Da(t,n);return qa(e,r,o)}if(r){const t=o.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:n,qMax:r}=t;if("NaN"!==n&&"NaN"!==r)return qa(e,n,r,"inputValue")}return{filteredLabels:e}})({labels:a,scale:e,isContinuous:r,canBeContinuous:i,layoutService:n});let d;if(this.measureText=e=>this.renderer.measureText({text:e,fontSize:t.label.fontSize,fontFamily:t.label.fontFamily}),u&&u.length){const e=Fa(t.label),{dock:n}=this.settings.layout;return La.measureLabelsWidth(u,this.measureText),d=Pa(n,u,e),d}const p=za(this.measureText),m=l?$a(l,p):0,f=c?$a(c,p):0;return d=Math.max(m,f),d},render(){const{scale:e}=this;if(!e.domain().length)return;const{symbol:t}=this,{style:n,layoutService:r,theme:o,isContinuous:i,isDimension:a,localeInfo:s}=this.settings,l=!!i||r.meta.canBeContinuous,c=Ha(this.settings.labels),{dock:u,rtl:d}=this.settings.layout,{padding:p}=n.label,m=function(e){return"left"===e||"right"===e?(e=>({dock:e,orientation:"vertical",majorAxis:"y",minorAxis:"x",majorDimension:"height",minorDimension:"width",flipXY:!1}))(e):(e=>({dock:e,orientation:"horizontal",majorAxis:"x",minorAxis:"y",majorDimension:"width",minorDimension:"height",flipXY:!0}))(e)}(u),f=function(e,t,n){const r=e[t.minorDimension];return{minorSize:r,majorSize:e[t.majorDimension],minorCenter:"vertical"===t.orientation?(r-n.right-n.left)/2+n.left:(r-n.top-n.bottom)/2+n.top}}(this.rect,m,p),{orientation:h,majorDimension:g}=m,{majorSize:v}=f,{font:y,lineHeight:b,gap:x,maxLabelWidth:S}=Fa(n.label),E=Ia(this.chart,this.settings.formatter,e),M=v;La.addLabelTitles({labels:c,formatter:E,isContinuous:i,canBeContinuous:l,localeInfo:s}),La.calculateLabelPositions({labels:c,scale:e,size:M,layoutService:r,orientation:h,rtl:d,isContinuous:i,isDimension:a});const[C,w]=Da(e,i),{filteredLabels:k,lowerOobs:N,upperOobs:T,lowerCircleSize:O,upperCircleSize:R,lowerOobSpace:A,upperOobSpace:L}=function({labels:e,minValue:t,maxValue:n,orientation:r,rtl:o,isContinuous:i,style:a,padding:s,measureText:l,prop:c="value"}){const{maxOobs:u,minOobs:d,filteredLabels:p}=qa(e,t,n,c),m="scaledValue"!==c&&Ma.getInvert({orientation:r,rtl:o,isContinuous:i}),f=function(e,t,n){return n?t:e}(d,u,m),h=function(e,t,n){return n?e:t}(d,u,m),g=f.length,v=h.length,y=za(l),b=$a(g,y),x=$a(v,y);return{filteredLabels:p,lowerOobs:f,upperOobs:h,lowerCircleSize:b,upperCircleSize:x,lowerOobSpace:function(e,t,n,r,o){return("vertical"===r?o.top:o.left)+(e>0?t+n:0)}(g,a.oob.size,b,r,s),upperOobSpace:function(e,t,n,r,o){return("vertical"===r?o.bottom:o.right)+(e>0?t+n:0)}(v,a.oob.size,x,r,s)}}({labels:c,minValue:C,maxValue:w,orientation:h,rtl:d,isContinuous:i,style:n,padding:p,measureText:this.measureText,prop:i?"value":"scaledValue"}),I=A,P=v-L;Na(N),Na(T);const D=Ba({alignment:0,dockValue:0,oobs:N,style:n.oob,rect:this.rect,symbol:t,position:n.oob.size+O/2,areaProps:m,radius:O/2,font:y}),q=Ba({alignment:1,dockValue:1,oobs:T,style:n.oob,rect:this.rect,symbol:t,position:v-(n.oob.size+R/2),areaProps:m,radius:R/2,font:y});La.addLabelsInfo({labels:k,scale:e,majorSize:v,lowerLimit:I,upperLimit:P,font:y,lineHeight:b,gap:x,maxLabelWidth:S,majorDimension:g,orientation:h,measureText:this.measureText,rtl:d,layoutService:r,isContinuous:i,isDimension:a}),ca.layout(k.map((e=>e.segment)),I,P,n.label.gap);const z=k.filter((e=>ca.isInside(e.segment,I,P,i)));return La.createLabels({labels:z,style:n.label,maxLabelWidth:S,areaProps:m,area:f,lineHeight:b,font:y,theme:o}).concat([...D,...q])}};var Va={dataRelatedPropertiesPaths:["qHyperCube.qGrandTotalRow","qHyperCube.qHasOtherValues","qHyperCube.qSize","qHyperCube.qDimensionInfo[].qAttrDimInfo","qHyperCube.qDimensionInfo[].qCardinalities","qHyperCube.qDimensionInfo[].qMax","qHyperCube.qDimensionInfo[].qMin","qHyperCube.qDimensionInfo[].qStateCounts","qHyperCube.qMeasureInfo[].qApprMaxGlyphCount","qHyperCube.qMeasureInfo[].qAttrExprInfo","qHyperCube.qMeasureInfo[].qMax","qHyperCube.qMeasureInfo[].qMin","qHyperCube.qMeasureInfo[].qTrendLines","qHyperCube.qTreeNodesOnDim","qSelectionInfo"]};function Wa(e){const{qHyperCube:t,...n}=e,{qAxisData:r,qDataPages:o,qStackedDataPages:i,qTreeDataPages:a,...s}=t,l=Q(!0,{},{...n,qHyperCube:{...s,qAxisData:null,qDataPages:null,qStackedDataPages:null,qTreeDataPages:null}}),{dataRelatedPropertiesPaths:c}=Va;return c.forEach((e=>{const t=e.split("[");if(1===t.length)void 0!==E(l,e)&&M(l,e,null);else{const e=t[0],n=t[1].split("].")[1];E(l,e,[]).forEach((e=>{void 0!==E(e,n)&&M(e,n,null)}))}})),l}var _a={axes:{trackBy:function({isTime:e,isContinuous:t,isMeasure:n,isMajor:r}){return o=>{if(e||t||n){var i;if("line"===o.type)return null!==(i=o.tickValue)&&void 0!==i?i:"axis";if("text"===o.type)return`${o.tickValue} ${o.text}`;if("container"===o.type){const e=o.children.filter((e=>"text"===e.type)).map((e=>e.text));return`${o.data.value} ${e.join("")}`}return Math.random()}if(r){if("line"===o.type&&void 0===o.tickValue)return"axis";const e=o.transform&&o.transform.match(/rotate/gi)?"rotated":"horizontal";return`${o.data.group?o.data.group.value+" ":""}${o.data.value} ${o.text} ${e}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:e,isTime:t,isContinuous:n,isHorizontal:r,dock:o}){return({currentNodes:i,currentRect:a,previousRect:s})=>{const l=a.x-s.x,c=a.y-s.y,u=a.width-s.width,d=a.height-s.height;e?("left"===o&&i.forEach((e=>{"line"===e.type?(e.x1+=u,e.x2+=u):"text"===e.type&&(e.x+=u)})),"left"!==o&&"right"!==o||i.forEach((e=>{var t;("line"===e.type&&(e.x1===e.x2?(e.y1=a.y,e.y2=e.y1+a.height):(Math.round(e.y1)<a.y||e.y1>a.y+a.height)&&(e.strokeWidth=0)),"text"===e.type)&&((e.y<a.y||e.y>a.y+a.height)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))})),"top"!==o&&"bottom"!==o||i.forEach((e=>{var t;("line"===e.type&&(e.y1===e.y2?(e.x1=a.x,e.x2=e.x1+a.width):(Math.round(e.x1)<a.x||e.x1>a.x+a.width)&&(e.strokeWidth=0)),"text"===e.type)&&((e.x<a.x||e.x>a.x+a.width)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))}))):t?i.forEach((e=>{"line"===e.type?e.y1===e.y2?e.x2+=u:e.x1===e.x2&&(e.x1-=l,e.x2-=l):"text"===e.type&&(e.x-=l)})):n||r?i.forEach((e=>{"line"===e.type&&e.y1===e.y2&&(e.x1+=l,e.x2+=l+u)})):i.forEach((e=>{"line"===e.type&&e.x1===e.x2&&(e.y1+=c,e.y2+=c+d)}))}}},bars:{trackBy:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:""+e.data.value},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,o=t.y-n.y;0===r&&0===o||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{void 0!==e.x&&void 0!==e.y?(e.x-=r,e.y-=o):e.transform=`translate(${-r}, ${-o})`}))}))}},barOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{e.opacity=0}))}))}},labels:{trackBy:function(e){if("rect"===e.type)return"-3"===e.data?Math.random():`${e.type} ${e.data} ${e.rotation}`;const t=e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal";return`${e.type} ${e.data} ${e.text} ${t}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,o=t.y-n.y;0===r&&0===o||e.forEach((e=>{e.transform&&e.transform.match(/rotate\(-90/gi)?(e.x+=o,e.y-=r):(e.x-=r,e.y-=o)}))},linkData:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:""+e.data.value}},lines:{trackBy:function(e){var t;return"line"===e.type?null!==(t=e.value)&&void 0!==t?t:Math.random():"path"===e.type?`${e.generatorType} ${e.layerObj.id} ${e.data.source.key}`:Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,o=t.y-n.y;e.forEach((e=>{if(void 0!==e.x1&&void 0!==e.y1)e.y1===e.y2?(e.x2=e.x1+t.width,e.y1-=o,e.y2-=o):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=r,e.x2-=r);else{const t="x"===e.major.p?r/e.major.size:o/e.major.size,n="y"===e.minor.p?o/e.minor.size:r/e.minor.size;e.points.forEach((e=>{e.modified||(e.major-=t,e.minor-=n,e.minor0-=n,e.modified=!0)}))}}))}},lineOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach((e=>{e.opacity=0}))}},points:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:""+e.data.major.value},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,o=t.y-n.y;0===r&&0===o||e.forEach((e=>{e.cx-=r,e.cy-=o}))}},refLineLabels:{trackBy:function(e){if(void 0!==e.value){if("rect"===e.type)return""+e.value;if("text"===e.type)return`${e.value} ${e.text}`}return Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,o=t.y-n.y,i=t.width-n.width,a=t.height-n.height;let s=-r,l=-o;e.forEach((e=>{switch(e.dock){case"right":r>0&&(s=t.width);break;case"left":i<0&&(s=-n.width);break;case"top":a<0&&(l=-n.height);break;case"bottom":o>0&&(l=t.height)}switch(e.type){case"text":case"rect":e.x+=s,e.y+=l;break;case"circle":e.cx+=s,e.cy+=l;break;case"path":e.transform=`translate(${s}, ${l})`}}))}},shadowBars:{trackBy:function(){return Math.random()}},cacheProperties:function({viewCache:e,layout:t}){const n=Wa(t);e.set("dataIndependentProperties",JSON.stringify(n))},propertiesHaveChanged:function({viewCache:e,layout:t}){const n=Wa(t);return e.get("dataIndependentProperties")!==JSON.stringify(n)},nonUpdatingNode:{trackBy:function(){return Math.random()}}};const{getInputValue:Ua,extractInfoFromInputValue:Ya,resolveValue:Ga}=Ma;var Ka={resolveValue:Ga,resolveInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.isGroupedByDimension){const r=Ua({refLineLayout:e,layoutService:n});return Ya(r,t,"innerValues")}},resolveNumInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.mode.K)return 0;const r=Ua({refLineLayout:e,layoutService:n});return Ya(r,t,"numInnerValues")||0},resolveValueText:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const{dimensionValuesInfo:r}=t,{canBeContinuous:o}=n.meta,i=Ua({refLineLayout:e,layoutService:n});return r[i]&&o?r[i].qText:i},resolveValueInfo:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=Ua({refLineLayout:e,layoutService:n}),{dimensionRefLineInfo:o}=t;return o[r]}};function Xa({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,dockService:o,animationsEnabled:i,chart:a,scale:s,axis:l,rtl:c,key:u,mainComponentKey:d,path:p,minimumLayoutMode:m}){const f=e?t.dimensionRefLines:p?t.query.getRefLines(p):t.measureRefLines;if(!f.length)return!1;const h={key:u,type:"ref-line",layout:{minimumLayoutMode:m},lines:{y:[],x:[]},style:{oob:{show:!1}},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),animations:{enabled:i,trackBy:_a.lines.trackBy,compensateForLayoutChanges:_a.lines.compensateForLayoutChanges}},g=!(!e||"horizontal"!==o.meta.major.orientation||!c),v=!e||n.meta.isContinuous;return f.forEach((i=>{h.lines[l].push((({isDimension:e,refLineLayout:t,refLineModel:n,layoutService:r,colorModel:o,dockService:i,chart:a,scale:s,axis:l,invert:c,component:u,isContinuous:d})=>{var p,m;const f={dir:l,line:{strokeWidth:(null==t||null===(p=t.style)||void 0===p?void 0:p.lineThickness)||2,strokeDasharray:null==t||null===(m=t.style)||void 0===m?void 0:m.lineType,stroke:o.resolveUIColor(t.paletteColor||{index:t.color})}};return!e||r.meta.isContinuous?(f.scale=s,f.value=t.refLineExpr.value):(f.valueInfo=Ka.resolveValueInfo({refLineLayout:t,refLineModel:n,layoutService:r}),f.value=()=>{var e;const o=Ma.getScaledPosition({scale:a.scale(s),value:Ka.resolveValue({refLineLayout:t,refLineModel:n,layoutService:r}),valueInfo:f.valueInfo,size:null===(e=a.component(u))||void 0===e?void 0:e.rect["horizontal"===i.meta.major.orientation?"width":"height"],align:t.align,invert:c,layoutService:r,isContinuous:d});return Number.isNaN(o)?void 0:o}),f})({isDimension:e,refLineLayout:i,refLineModel:t,layoutService:n,colorModel:r,dockService:o,chart:a,scale:s,axis:l,invert:g,component:d,isContinuous:v}))})),h}const Ja={referenceLine:{label:{name:{fontFamily:"Source Sans Pro, sans-serif",fontSize:"12px"}},outOfBounds:{backgroundColor:"#737373",color:"#e6e6e6",fontFamily:"Source Sans Pro, sans-serif",fontSize:"10px"}}};function Za({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,animationsEnabled:o,dock:i,scale:a,style:s,formatter:l,theme:c,localeInfo:u,rtl:d,key:p,path:m}){const f=e?t.dimensionRefLineLabels:m?t.query.getRefLineLabels(m):t.measureRefLineLabels;if(!f.length)return[];const h=[],g=!e||n.meta.isContinuous,v=f.map((e=>(({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:o,theme:i,isContinuous:a})=>{const s=r.resolveUIColor(e.paletteColor||{index:e.color}),l={align:e.align,text:e.label,fill:e.coloredBackground?i.getContrastingColorTo(s):s,showValue:!1!==e.showValue,showLabel:!1!==e.showLabel,inputValue:e.refLineExpr.value,inputValueLabel:e.refLineExpr.label};return e.coloredBackground&&(l.background={fill:s}),a?(l.scale=o,l.value=e.refLineExpr.value):(l.value=()=>Ka.resolveValue({refLineLayout:e,refLineModel:t,layoutService:n}),l.valueText=()=>Ka.resolveValueText({refLineLayout:e,refLineModel:t,layoutService:n}),l.valueInfo=()=>Ka.resolveValueInfo({refLineLayout:e,refLineModel:t,layoutService:n})),l})({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:a,theme:c,isContinuous:g})));return h.push((({isDimension:e,layoutService:t,animationsEnabled:n,style:r,labels:o,scale:i,formatter:a,dock:s,key:l,rtl:c,theme:u,isContinuous:d,localeInfo:p})=>({key:l,type:"reference-line-labels",renderer:"svg",labels:o,formatter:a,scale:i,layoutService:t,layout:{dock:s,rtl:c},theme:u,isContinuous:d,isDimension:e,localeInfo:p,style:{label:{fontFamily:r.referenceLine.label.name.fontFamily,fontSize:r.referenceLine.label.name.fontSize,padding:{top:2,bottom:2,left:c?2:4,right:c?4:2},background:{padding:{top:1,bottom:1,left:2,right:2}},maxWidth:100,gap:"left"===s||"right"===s?10:16},oob:{size:8,fill:r.referenceLine.outOfBounds.backgroundColor,text:{fontFamily:r.referenceLine.outOfBounds.fontFamily,fontSize:r.referenceLine.outOfBounds.fontSize,fill:r.referenceLine.outOfBounds.color,background:{fill:r.referenceLine.outOfBounds.backgroundColor}}}},animations:{enabled:n,trackBy:_a.refLineLabels.trackBy,compensateForLayoutChanges:_a.refLineLabels.compensateForLayoutChanges}}))({isDimension:e,rtl:d,style:Q(!0,Ja,s),dock:i,key:p,labels:v,scale:a,formatter:l,layoutService:n,animationsEnabled:o,theme:c,isContinuous:g,localeInfo:u})),h}var Qa={DATA:{MAIN:"qHyperCube",REDUCED:"reduced-data"},SCALE:{MAJOR:"main-major",MAJOR_INNER:"major-inner",MINOR:{PRIMARY:"minor-primary",SECONDARY:"minor-secondary",REDUCED_PRIMARY:"reduced-minor-primary",REDUCED_SECONDARY:"reduced-minor-secondary"},COLOR:"color",REDUCED:"reduced-major"},COMPONENT:{BAR:"bar-series",BAR_LABEL:"bar-label",BAR_OOB_LABEL:"bar-oob-label",STACK_BAR:"stack-bar",STACK_BAR_LABEL:"stack-bar-label",AXIS:{MAJOR:"major-axis",MAJOR_CONTINUOUS:"major-axis-continuous",TIME_INNER:"major-axis-time-inner",TIME_OUTER:"major-axis-time-outer",MINOR:{PRIMARY:"minor-primary-axis",SECONDARY:"minor-secondary-axis"}},AXIS_OVERLAY:{TIME_INNER:"axis-overlay-time-inner",TIME_OUTER:"axis-overlay-time-outer",CONTINUOUS:"axis-overlay-continuous"},AXIS_TITLE:{MAJOR:"major-axis-title",MINOR:{PRIMARY:"minor-primary-axis-title",SECONDARY:"minor-secondary-axis-title"}},MARKER:"marker-series",LINE:"line-series",POINT:"point-component",LABEL_SPACE:"label-space-component",POINT_LABEL:"point-label",GRID_LINE:"grid-line",ZERO_LINE:"zero-line",LEGEND:"legend",LEGEND_CATEGORICAL:"legend-cat",LEGEND_TOOLTIP:"legend-tooltip",TOOLTIP:"tooltip-qcm",MINI_CHART:{BAR:"mini-chart-bar-series",LINE:"mini-chart-line-series",MARKER:"mini-chart-marker-series"},BAR_OOB:"bar-oob",GHOST_BAR_OOB:"ghost-bar-oob",SLICED_HAT:"sliced-hat",DATA_OOB_MARKER:"data-out-of-bounds-marker",PRIMARY_MEASURE_AXIS_REF_LINE:"primary-mes-axis-ref-line",SECONDARY_MEASURE_AXIS_REF_LINE:"secondary-mes-axis-ref-line",DIMENSION_REF_LINE:"dim-ref-line",PRIMARY_MEASURE_AXIS_REF_LINE_LABEL:"primary-mes-ref-line-label",SECONDARY_MEASURE_AXIS_REF_LINE_LABEL:"secondary-mes-ref-line-label",DIMENSION_REF_LINE_LABEL:"dim-ref-line-label"},COLLECTION:{PRIMARY:"primary-collection",SECONDARY:"secondary-collection",STACKED_PRIMARY:"stacked-collection-primary",STACKED_SECONDARY:"stacked-collection-secondary",STACKED_TOTAL_PRIMARY:"stacked-total-collection-primary",STACKED_TOTAL_SECONDARY:"stacked-total-collection-secondary",REDUCED:"reduced-collection",REDUCED_PRIMARY:"reduced-collection-primary",REDUCED_SECONDARY:"reduced-collection-secondary",REDUCED_STACKED_PRIMARY:"reduced-collection-stacked-primary",REDUCED_STACKED_SECONDARY:"reduced-collection-stacked-secondary",LINE:"line-collection"},FORMATTER:{PRIMARY:"primary-formatter",SECONDARY:"secondary-formatter"}},es={LINE:"line",BAR:"bar",MARKER:"marker"},ts={PRIMARY:0,SECONDARY:1},ns={type:"bar",axis:0};const rs={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 os(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const is={getImageSize(e,t){let n;function r(){n&&(clearTimeout(n),n=null)}function o(e){const t=e;t.onload=null,t.onerror=null,r()}const i={small:50,medium:200,large:340,original:340};return new Promise((a=>{const s=new Image;s.referrerPolicy="no-referrer",s.onload=()=>{let e;const{height:n,width:l}=s,c=i[t]*(n>l?1:n/l),u=i[t]*(l>n?1:l/n);!n||!l||0===n&&0===l?(e={height:20,width:20,imageError:!0},o(s)):"original"===t?(e={height:Math.min(c,n),width:Math.min(u,l)},r()):(e={height:c,width:u},r()),a(e)},s.onerror=()=>{o(s),a({height:20,width:20,imageError:!0})},s.src=e,n=setTimeout((()=>{o(s),a({height:20,width:20,imageError:!0})}),3e3)}))}};async function as(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const o=function(e){var t,n,r,o,i;let a,s,l,c,u,d;if(e&&(null!==(t=e.session)&&void 0!==t&&t.options||null!==(n=e.enigmaModel)&&void 0!==n&&null!==(r=n.session)&&void 0!==r&&r.sessionConfig||null!==(o=e.session)&&void 0!==o&&null!==(i=o.config)&&void 0!==i&&i.url)){var p;if(a=e.session.options||(null===(p=e.enigmaModel)||void 0===p?void 0:p.session.sessionConfig),!a){var m;a=null===(m=e.session)||void 0===m?void 0:m.config;const t=new URL(a.url);a.host=t.hostname,a.port=t.port,a.isSecure="wss:"===t.protocol}return d=void 0!==a.secure?a.secure:a.isSecure,s=d?"https://":"http://",l=a.host||"localhost",c=a.port?":"+a.port:"",u=a.prefix?a.prefix:"/","/"!==u[u.length-1]&&(u+="/"),s+l+c+u}return""}(n);o&&(!function(e,t){const n=e.replace(t,"").replace(/^\.\.\//i,"/");n[0]}(r,o),r=r.replace(/"/g,'\\"'),r=r.replace(/'/g,"\\'"),r=function(e,t){return t+("/"===e[0]?e.substr(1):e)}(r,o));const{height:i,width:a,imageError:s}=await is.getImageSize(r,t);return{src:r,size:t,height:i,width:a,imageError:s}}async function ss(e,t,n,r){var o,i,a,s,l,c;const{app:u,flags:d}=t,p=null===(o=e.layout)||void 0===o||null===(i=o.tooltip)||void 0===i?void 0:i.imageComponents;if(!p)return[];const[m]=p,f=m.size||"small",h=m.type||"media";let g=-1;for(let e=0;e<n.length;e++)if(n[e].cId===m.cId){g=e;break}const v=(null===(a=r.data)||void 0===a||null===(s=a.customTooltipAttrExps)||void 0===s?void 0:s.value)||[];let y;if(-1!==g&&v[g]&&(y=v[g]),"media"===h&&null!==(l=m.ref)&&void 0!==l&&null!==(c=l.qStaticContentUrl)&&void 0!==c&&c.qUrl)return as(m,f,u);if("url"===h)return async function(e,t,n,r,o){let i,a=n.ref;if(o&&o.label&&(a=o.label),t.isEnabled("IMAGE_BUNDLE_LOAD")&&null!=e&&e.getImage&&os(a))try{const t="data:image/png;base64, "+await e.getImage(a),{height:n,width:o,imageError:s}=await is.getImageSize(t,r);i={src:t,size:r,height:n,width:o,imageError:s}}catch(e){}else{const{height:e,width:t,imageError:n}=await is.getImageSize(a,r);i={src:a,size:r,height:e,width:t,imageError:n}}return i}(u,d,m,f,y);if(d.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===h&&y&&y.label){return async function(e,t,n,r){let o;const i=r.label,a=`qmem://${t.qFallbackTitle}/${i}`;if(os(a))try{const t=await e.getImage(a);if(t){const e="data:image/png;base64, "+t,{height:r,width:i,imageError:a}=await is.getImageSize(e,n);o={src:e,size:n,height:r,width:i,imageError:a}}}catch(e){}return o}(u,n[g],f,y)}return[]}const ls={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const o=t,i=[];for(let t=0;t<o.length;t++)i.push(ss(e,r,n,o[t]));const a=await Promise.all(i);for(let e=0;e<o.length;e++)o[e].data.customTooltipImages=[a[e]];return o},checkIfPromisesExist({customTooltipModel:e}){var t,n;const r=null===(t=e.layout)||void 0===t||null===(n=t.tooltip)||void 0===n?void 0:n.imageComponents;return!!r&&r.length>0}},cs={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let o=t;return o=await ls.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),o},checkIfPromisesExist:({customTooltipModel:e})=>ls.checkIfPromisesExist({customTooltipModel:e})};const us=(e,t)=>{var n,r,o;const i=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===(o=e.qHyperCubeDef)||void 0===o?void 0:o.qInterColumnSortOrder,l=t;return{qInfo:{qType:rs.CHART.CHART_PARENT_TYPE,qId:rs.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:i,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},ds=e=>{var t,n,r;const o=null===(t=e.tooltip)||void 0===t||null===(n=t.chart)||void 0===n||null===(r=n.object)||void 0===r?void 0:r.refId;return{qInfo:{qType:rs.CHART.CHART_CHILD_TYPE},qExtendsId:o}};const ps={createContainer:({ctx:e,layout:t})=>{var n,r;if(!((null===(n=t.qHyperCube)||void 0===n||null===(r=n.qDimensionInfo)||void 0===r?void 0:r.length)<=0))return function(e,t){var n,r,o,i;const a=null!==(n=null===(r=t.tooltip)||void 0===r||null===(o=r.chart)||void 0===o||null===(i=o.style)||void 0===i?void 0:i.size)&&void 0!==n?n:"medium",s=rs.CHART.STYLE[a];return[{content:[e.h("div",{style:{display:"flex",width:s,height:s,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:rs.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":s,width:"100%"}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:r,customTooltipModel:o,rtl:i})=>{var a,s,l;const c=o,u=null==t||null===(a=t.tooltip)||void 0===a||null===(s=a.chart)||void 0===s||null===(l=s.object)||void 0===l?void 0:l.refId;if(null!=c&&c.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&u&&!(t.qHyperCubeDef.qDimensions.length<=0)){await ps.hide({app:e,customTooltipModel:o});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,o=rs.CHART.STATE,i=t.qStateName;r.miniChartToken.alternateState||(r.miniChartToken.alternateState=o,await e.addSessionAlternateState(o,i),r.miniChartToken.alternateState=o)}({app:e,properties:t,customTooltipModel:o});const a=await async function({app:e,properties:t,customTooltipModel:n}){var r;const o=n;null!==(r=o.miniChartToken.sessionObj)&&void 0!==r&&r.id&&await e.destroySessionObject(o.miniChartToken.sessionObj.id);const i=rs.CHART.STATE,a=us(t,i),s=await e.createSessionObject(a),l=ds(t);if(s.id!==rs.CHART.CHART_OBJECT_ID)return void e.destroySessionObject(s.id);o.miniChartToken.sessionObj=s;const c=await s.createChild(l);if(o.miniChartToken.sessionObj&&o.miniChartToken.sessionObj.id===s.id)return o.miniChartToken.model=c,c;e.destroySessionObject(s.id)}({app:e,properties:t,customTooltipModel:o});if(c.miniChartToken.alternateState&&c.miniChartToken.sessionObj&&a){var d,p,m,f;const e=n.length>0&&void 0!==(null===(d=n[0].data)||void 0===d?void 0:d.value)?[null===(p=n[0].data)||void 0===p?void 0:p.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,g;const e=null!==(h=n[0].data.selectionOuterDimension)&&void 0!==h?h:n[0].data.selectionDimension;if(null!=e&&null!==(g=e.source)&&void 0!==g&&g.field){var v;const t=null==e||null===(v=e.source)||void 0===v?void 0:v.field.split("/"),n=t[t.length-1],r=void 0!==e.value?[e.value]:[];r.length>0&&void 0!==n&&c.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),r,!1)}}e.length>0&&c.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const s=document.getElementById(rs.CHART.CONTAINER_ID),l={direction:i?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};c.miniChartToken.vis=await o.embed.render({element:s,model:c.miniChartToken.model,options:l,id:null===(m=c.miniChartToken.model)||void 0===m?void 0:m.id,type:null===(f=c.miniChartToken.model)||void 0===f?void 0:f.genericType})}}catch(t){await ps.hide({app:e,customTooltipModel:o})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(ps.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(rs.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=rs.CHART.STATE;n.miniChartToken.alternateState=void 0,await e.removeSessionAlternateState(r)}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{var t,n;const r=e;"function"==typeof(null===(t=r.miniChartToken)||void 0===t||null===(n=t.vis)||void 0===n?void 0:n.destroy)&&(r.miniChartToken.vis.destroy(),r.miniChartToken.vis=void 0)}};function ms(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function fs(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=rs.CUSTOM,o={};return o[e]=!0,o[t]=!0,o[n]=!0,o[r]=!0,o}function hs(e){const t=fs();return e.filter((e=>t[e.id]))}const gs={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 o=t.element.getBoundingClientRect();return{cx:n-o.left,cy:r-o.top}}(e,t);return t.shapesAt({x:n.cx,y:n.cy})},getDataNodes(e,t){let n,r=[];const o={container:{bar:!0,"bullet-axis":!0},circle:{"point-component":!0}};return t.forEach((t=>{var i,a,s,l;const c=null!==(i=null===(a=t.data)||void 0===a?void 0:a.selectionDimension)&&void 0!==i?i:t.data;if(!c||null!==(s=t.data)&&void 0!==s&&s.customTooltipAttrExps||o[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(o).forEach((t=>{n=n.concat(e.findShapes(t).filter((e=>e.data&&e.data.customTooltipAttrExps&&!e.data.customTooltipImages&&o[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===c.value&&r.label===c.label}));t.length>0&&(r=r.concat(t[0]))}})),r},displayTooltip(e,t,{nodes:n,opts:r={},customTooltipModel:o,extractedNodes:i=[],hide:a}){if(o&&!a){const{layout:a,chart:s}=o,{attrExps:l}=gs.getAttrExprData(a);i.length||n.length?cs.handlePromises({customTooltipModel:o,nodes:gs.getDataNodes(s,i.length>0?i: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!=o&&null!==(s=o.miniChartToken)&&void 0!==s&&s.alternateState&&ps.hide({app:r.app,customTooltipModel:o}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>cs.checkIfPromisesExist({customTooltipModel:e}),getAttrExps(e,t){var n;const r=t,o=null!==(n=e.qHyperCubeDef)&&void 0!==n&&n.qDimensions?"qAttributeExpressions":"qAttrExprInfo";return r[o]||(r[o]=[]),r[o]},getAttrExprData(e){var t;let n=[],r="";const o=(null===(t=e.qHyperCube)||void 0===t?void 0:t.qDimensionInfo)||[];if(o.length>0){var i,a,s;const t=o.length-1;n=(null===(i=e.qHyperCube)||void 0===i||null===(a=i.qDimensionInfo)||void 0===a||null===(s=a[t])||void 0===s?void 0:s.qAttrExprInfo)||[],r=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:n,fieldPath:r}},quarantineCustomTooltipAttrs(e,t={}){var n,r;if(!(null===(n=e.qLayoutExclude)||void 0===n||null===(r=n.quarantine)||void 0===r?void 0:r[rs.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[rs.CUSTOM.QUARANTINE]=[],e.forEach((e=>{r.quarantine[rs.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}(hs(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){var t,n;const r=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(n=t.quarantine)||void 0===n?void 0:n[rs.CUSTOM.QUARANTINE])&&delete r.qLayoutExclude.quarantine[rs.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=ms(e);if(!n)return;const r=void 0!==t?t:n.length-1;if(!n[r])return;const o=this.getAttrExps(e,n[r]);if(0===hs(o).length){var i,a;const t=(null===(i=e.qLayoutExclude)||void 0===i||null===(a=i.quarantine)||void 0===a?void 0:a.customTooltip)||[],n=[...o,...t],s=e;s.qHyperCubeDef?s.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:s.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n){let r=[];const o=ms(e)||[];[...o,t].forEach((e=>{const t=hs(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));const i=fs(),a=o.map((e=>{const t=e,n=e.qAttributeExpressions||[];return t.qAttributeExpressions=n.filter((e=>!i[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:Se.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=Se.detectTextDirection(e.src),r=[],o={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"})),o.style["text-align"]="center",o.style["white-space"]="nowrap"}else o.style["background-size"]="contain",o.style["background-repeat"]="no-repeat",o.style["background-position"]="center",o.style["background-image"]=`url('${e.src}')`;return[{content:[t.h("div",o,r),""],style:{"text-align":t.rtl?"right":"left",direction:n,"max-width":e.width},colspan:2},{}]}};function vs(e,t,n,r){var o,i,a;const s=(null===(o=t.qHyperCube)||void 0===o||null===(i=o[n])||void 0===i||null===(a=i[r])||void 0===a?void 0:a.qAttrExprInfo)||[],l=[],c=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return c?(s.forEach(((e,t)=>{const o=c.qValues&&c.qValues[t]?c.qValues[t]:void 0,i=void 0===o?"NaN":function(e,t){let n;switch(e.id){case rs.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case rs.CUSTOM.TITLE:case rs.CUSTOM.DESCRIPTION:case rs.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,o);l.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:i,value:"value"})})),l):l}const ys={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>vs(t,e,r,n)}}};const bs={getCustomAttrExps(e,t,n){var r,o;const i={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},a=(null===(r=t.data)||void 0===r||null===(o=r.customTooltipAttrExps)||void 0===o?void 0:o.value)||[];if(Number.isNaN(a))return i;return function(e,t,n,r){const o={[rs.CUSTOM.TITLE]:!0,[rs.CUSTOM.DESCRIPTION]:!0},{attrExps:i,fieldPath:a}=gs.getAttrExprData(e);return 0===t.length||0===i.length||""===a||i.forEach(((e,i)=>{const s=t[i];if(e.id===rs.CUSTOM.EXPRESSION&&s){const t=e.qFallbackTitle,o="NaN"===s.value||e.isCustomFormatted?s.value:n("qHyperCube").field(`${a}/${i}`).formatter()(s.value);r.customTooltipAttrExpsArr.push({label:t,value:o})}else if(o[e.id]&&s){const t="-"!==s.value&&"NaN"!==s.value?s.value:s.label;t&&"undefined"!==t&&r.customTooltipInfoAttrExpsArr.push({...e.id===rs.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),r}(n,a.map((t=>Ee.getMeasure(e,t))),e,i)}};function xs({nodes:e,layout:t,dataset:n}){return function(e,t,n){const r=[];return e.forEach((e=>{r.push(bs.getCustomAttrExps(n,e,t))})),r}(e,t,n).reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}const{CUSTOM:Ss}=rs;function Es({flags:e,layout:t,app:n,model:r,picasso:o,chart:i,translator:a,localeInfo:s,embed:l,options:c}){var u,d,p;const m=function({layout:e,app:t,picasso:n,model:r,chart:o,translator:i,localeInfo:a,embed:s}){return{layout:e,app:t,picasso:n,model:r,chart:o,translator:i,localeInfo:a,useCustomTooltip:e.tooltip&&!e.tooltip.auto,utils:gs,miniChartToken:{},embed:s}}({layout:t,app:n,model:r,picasso:o,chart:i,translator:a,localeInfo:s,embed:l}),f="rtl"===c.direction,h=!(!t.tooltip||t.tooltip.auto),g=h&&E(t,"tooltip.hideBasic",!1),v=!!(h&&null!==(u=t.tooltip)&&void 0!==u&&null!==(d=u.chart)&&void 0!==d&&null!==(p=d.object)&&void 0!==p&&p.refId&&l&&"function"==typeof(null==r?void 0:r.getEffectiveProperties));return{isEnabled:()=>h,hideBasic:()=>g,getAttributes:({dataset:e,nodes:n})=>{var r,o;const i=xs({dataset:e,nodes:n,layout:t});return{title:null===(r=i.customTooltipInfoAttrExpsArr.find((e=>e.id===Ss.TITLE)))||void 0===r?void 0:r.title,description:null===(o=i.customTooltipInfoAttrExpsArr.find((e=>e.id===Ss.DESCRIPTION)))||void 0===o?void 0:o.value,measures:i.customTooltipAttrExpsArr}},hasImages:()=>gs.checkIfPromisesExist({customTooltipModel:m}),createImageRow:({value:e,h:t})=>gs.getImageRow(e,{h:t,rtl:f}),addImages:({nodes:r})=>{const o=gs.getDataNodes(i,r),{attrExps:a}=gs.getAttrExprData(t);return cs.handlePromises({customTooltipModel:m,nodes:o,attrExps:a,opts:{flags:e,app:n}})},chart:{isEnabled:()=>v,hasLimitation:()=>{var e;return!(null==n||null===(e=n.isInModalSelection)||void 0===e||!e.call(n))},createContainer:({h:e})=>ps.createContainer({layout:t,ctx:{h:e,rtl:f}}),createLimitationRow:()=>gs.getFooterRow(a.get("properties.tooltip.notselectedmessage"),f),show:({nodes:e,properties:t})=>ps.show({app:n,properties:t,selectedNodes:e,customTooltipModel:m,rtl:f}),hasAlternateState:()=>{var e;return!(null===(e=m.miniChartToken)||void 0===e||!e.alternateState)},hide:()=>ps.hide({app:n,customTooltipModel:m}),destroy:()=>ps.destroyVisualization({customTooltipModel:m})}}}function Ms({key:e,source:t,layoutService:n,fieldModel:r,colorService:o,series:i}){const{meta:a}=n;if(a.isBarSeriesStacked){const{major:a,majorNumeric:s}=r.main,l=i.filter((e=>e.type===es.BAR)),c=n.meta.isContinuous?s:a,u=e=>"NaN"!==e.qNum?e.qNum:0;return[{key:e,data:{extract:l.map((({ref:e,typeIndex:r,refIndex:i})=>({source:t,field:a,value:n.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:c},selectionDimension:{field:a},segment:{field:e,value:u,reduceLabel:"none"},end:{field:e,value:u,reduceLabel:"none"},null:{fields:l.map((e=>({field:e.ref}))),value:e=>Array.isArray(e)&&e.every((e=>"NaN"===e)),reduceLabel:"none"},typeIndex:r,...o.getDatumProps(i),customTooltipAttrExps:ys.getNode(n.getLayout(),n.meta),sumOfPositives:{fields:l.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t>0?e+t:e),0),reduceLabel:"none"},sumOfNegatives:{fields:l.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t<0?e+t:e),0),reduceLabel:"none"}}}))),stack:{stackKey:e=>e.value,value:e=>e.end.value,offset:"diverging"}}}]}return[]}function Cs({key:e,series:t,source:n,fieldModel:r,colorService:o,layoutService:i,forceCreate:a=!1}){if(t.length||a){const{major:a,majorNumeric:s}=r.main,l=e=>"NaN"!==e.qNum?e.qNum:0,c=i.meta.isContinuous?s:a;return[{key:e,data:{extract:t.map((({ref:e,refIndex:t,typeIndex:r,options:s},u)=>({source:n,field:a,value:i.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:c},selectionDimension:{field:a},end:{field:e,value:s.showAsZeros?l:void 0,reduceLabel:"none"},start:0,line:u,typeIndex:r,null:{field:e,value:e=>"NaN"===e.qNum,reduceLabel:"none"},customTooltipAttrExps:ys.getNode(i.getLayout(),i.meta),...o.getDatumProps(t)}})))}}]}return[]}function ws({key:e,layoutService:t,fieldModel:n,series:r}){const{meta:o}=t;if(o.isBarSeriesStacked){const{major:t,majorNumeric:i}=n.main,a=r.filter((e=>e.type===es.BAR)),s=o.isContinuous?{field:i,value:e=>e.qNum,reduceLabel:"none"}:[];return[{key:e,data:{extract:{field:0,props:{major:{field:o.isContinuous?i:t},null:{fields:a.map((e=>({field:e.ref}))),value:e=>Array.isArray(e)&&e.every((e=>"NaN"===e)),reduceLabel:"none"},sumOfPositives:{fields:a.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t>0?e+t:e),0),reduceLabel:"none"},sumOfNegatives:{fields:a.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t<0?e+t:e),0),reduceLabel:"none"},timeStart:s,timeEnd:s},value:o.isContinuous?e=>e.qNum:void 0}}}]}return[]}const ks={MINI_CHART:{value:"miniChart",translation:"properties.scrollbar.miniChart"},BAR:{value:"bar",translation:"properties.scrollbar.bar"},NONE:{value:"none",translation:"properties.scrollbar.none"}};var Ns={OPTIONS:ks,DEFAULT:ks.MINI_CHART};function Ts({layoutService:e,discrete:t}){return({h:n,rect:r,orientation:o,minThumbSize:i})=>{const a=t.query.getCurrentDataPage(),s=e.meta.size.y,l="horizontal"===o,c=r[l?"width":"height"];let u=a.qArea.qTop/s*c,d=a.qArea.qHeight/s*c;if(d<i){const e=(i-d)/2;u=u-e+(Math.max(0,0-(u-e))-Math.max(0,u+d+e-c)),d=i}return n("div",{style:{position:"absolute",right:0,bottom:0,background:"red",opacity:.2,...l?{top:0,left:u,width:d}:{top:u,left:0,height:d}}})}}function Os({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),o=t.get("continuousMax");return[(n.min-r)/(o-r),(n.max-r)/(o-r)]}(t,n):function(e){return e.get("viewRange")}(t)}const Rs=e=>({miniChart:e===Ns.OPTIONS.MINI_CHART.value,bar:e===Ns.OPTIONS.BAR.value,none:e===Ns.OPTIONS.NONE.value});function As({layoutService:e,override:t}){const n=(({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return Rs(t);const n=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===n)return Rs(Ns.DEFAULT.value);const r=e.getLayoutValue("dimensionAxis.continuousAuto"),o=e.getLayoutValue("preferContinuousAxis");return Rs(!n&&(r||!r&&o)?Ns.OPTIONS.NONE.value:Ns.OPTIONS.MINI_CHART.value)})({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:n})&&(n.miniChart=t.value===Ns.OPTIONS.MINI_CHART.value,n.bar=t.value===Ns.OPTIONS.BAR.value,n.none=t.value===Ns.OPTIONS.NONE.value),n}function Ls({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:o,dockService:i,rtl:a}){return s=>{const{x:l,y:c}=s.center,u=t.element.getBoundingClientRect(),d=t.component(e),p="horizontal"===i.meta.major.orientation,m=p?l-u.left-d.rect.computedInner.x:c-u.top-d.rect.computedInner.y,f=p?d.rect.computedInner.width:d.rect.computedInner.height,h=p&&a?f-m:m,g=Math.max(0,Math.min(h/f,1)),[v,y]=Os({layoutService:o,viewState:n,viewCache:r}),b=g<v,x=g>y,S=!b&&!x;return{pixel:h,relative:g,thumb:S?h-v*f:0,beforeThumb:b,afterThumb:x,onThumb:S}}}function Is({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:o,dockService:i}){return()=>{const a=t.component(e),{orientation:s}=i.meta.major,{width:l,height:c}=a.rect.computedInner,u="horizontal"===s?l:c,[d,p]=Os({layoutService:o,viewState:n,viewCache:r});return{size:u,thumbSize:(p-d)*u}}}function Ps({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}){const c=Ls({componentKey:e,chart:t,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:l}),u=Is({componentKey:e,chart:t,viewState:r,viewCache:o,layoutService:i,dockService:a});return{type:"Tap",options:{event:"scrollbarTap",enable:(r,o)=>!o||!!n.scroll.enabled()&&t.componentsFromPoint({x:o.center.x,y:o.center.y}).some((t=>t.key===e))},events:{scrollbarTap(n){n.preventDefault();const a=c(n);if(i.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=o.get("continuousMin"),i=o.get("continuousMax"),s=n+(i-n)*a.relative;r.set("zoom",{min:Math.min(s-t/2,i-t),max:Math.max(s+t/2,n+t)})}else{const e=u(),t=a.pixel-e.thumbSize/2,n=Math.max(0,t/e.size);s.command.scrollTo(n)}t.component(e).emit("render")}}}}const Ds="data-scrollbar-handle";function qs({e:e}){return(e.srcEvent||e).srcElement.getAttribute(Ds)||""}const zs="scrollbarResize";function $s({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:s}){const l=Ls({componentKey:e,chart:t,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:s});return{type:"Pan",key:"event:scrollbarResize",options:{event:zs,threshold:0,enable(e,t){return!(!i.meta.isContinuous||!n.scroll.enabled())&&(!t||(this[zs]=this[zs]||{},(e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)})(t)&&qs({e:t})&&(this[zs].panningEvent=t.srcEvent),!!this[zs].panningEvent))}},events:{scrollbarResizestart(n){n.preventDefault(),this[zs]=this[zs]||{},this[zs].panningEvent&&t.component(e).emit("dragStart",this[zs].panningEvent)},scrollbarResizemove(n){if(n.preventDefault(),this[zs]=this[zs]||{},!this[zs].panningEvent)return;const i=r.get("zoom"),a=o.get("continuousMin"),s=o.get("continuousMax"),c=o.get("minimiumZoomSpan"),u=(s-a)*l(n).relative+a,d=qs({e:this[zs].panningEvent});let p="start"===d?Math.min(u,i.max):i.min,m="end"===d?Math.max(u,i.min):i.max;p===m&&(p-="start"===d?c:0,m+="end"===d?c:0),r.set("zoom",{min:p,max:m}),t.component(e).emit("render")},scrollbarResizeend(n){n.preventDefault(),this[zs]=this[zs]||{},delete this[zs].panningEvent,t.component(e).emit("dragEnd")},scrollbarResizecancel(n){n.preventDefault(),this[zs]=this[zs]||{},delete this[zs].panningEvent,t.component(e).emit("dragEnd")}}}}const Bs="scrollbarPan";function Fs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}){const c=Ls({componentKey:e,chart:t,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:l}),u=Is({componentKey:e,chart:t,viewState:r,viewCache:o,layoutService:i,dockService:a});return{type:"Pan",key:"event:scrollbarPan",options:{event:Bs,threshold:0,enable(r,o){return this[Bs]=this[Bs]||{},!(o&&!this[Bs].isPanning)||!!n.scroll.enabled()&&((!o||o.target===t.element)&&t.componentsFromPoint({x:o.center.x,y:o.center.y}).some((t=>t.key===e)))}},events:{scrollbarPanstart(n){n.preventDefault();const a=c(n);if(this[Bs]=this[Bs]||{},this[Bs].isPanning=!0,t.component(e).emit("lockState"),i.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=o.get("continuousMin"),i=o.get("continuousMax"),s=n+(i-n)*a.relative;s<e.min?r.set("zoom",{min:Math.min(s,i-t),max:Math.max(s+t,n+t)}):s>e.max&&r.set("zoom",{min:Math.min(s-t,i-t),max:Math.max(s,n+t)}),this[Bs].relative=a.relative,this[Bs].zoom=r.get("zoom"),this[Bs].zoom.span=this[Bs].zoom.max-this[Bs].zoom.min,this[Bs].zoom.fullSpan=i-n}else if(a.onThumb)this[Bs].offset=a.thumb;else{const e=u();this[Bs].offset=a.beforeThumb?0:e.thumbSize}},scrollbarPanmove(n){n.preventDefault();const a=c(n);if(this[Bs]=this[Bs]||{},i.meta.isContinuous){const e=a.relative-this[Bs].relative,{fullSpan:t,span:n,min:i,max:s}=this[Bs].zoom,l=o.get("continuousMin"),c=o.get("continuousMax");r.set("zoom",{min:Math.min(i+e*t,c-n),max:Math.max(s+e*t,l+n)})}else{const e=a.pixel-(this[Bs].offset||0),t=u(),n=Math.max(0,e/t.size);s.command.scrollTo(n)}t.component(e).emit("render")},scrollbarPanend(n){n.preventDefault(),this[Bs]=this[Bs]||{},this[Bs].isPanning=!1,t.component(e).emit("unlockState")},scrollbarPancancel(n){n.preventDefault(),this[Bs]=this[Bs]||{},this[Bs].isPanning=!1,t.component(e).emit("unlockState")}}}}function Hs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}){return[Ps({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}),$s({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,rtl:l}),Fs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l})]}function js({componentKey:e,chart:t,actions:n,layoutService:r}){const o=(o,i)=>{if(!r.meta.isContinuous)return;const a=t.component(e);a&&a.emit&&n.scroll.enabled()&&a.emit(o,i)};return{type:"native",events:{mousemove:e=>o("hover",e),mouseleave:()=>o("leave")}}}const Vs={background:"rgba(0, 0, 0, 0.1)"},Ws={top:-1,bottom:-1,width:6},_s={width:2,background:"#595959"};var Us={before:Vs,after:Vs,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:Ws,endHandle:Ws,startHandleBorder:_s,endHandleBorder:_s};const Ys={background:"rgba(0, 0, 0, 0.1)"},Gs={top:-1,bottom:-1,width:6},Ks={width:2,background:"#595959"};var Xs={before:Ys,after:Ys,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:Gs,endHandle:Gs,startHandleBorder:Ks,endHandleBorder:Ks};const Js={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},Zs={pointerEvents:"initial"},Qs={pointerEvents:"none"};const el="ew-resize",tl="default";function nl(){const{rect:e}=this,{settings:t}=this.settings,n="horizontal"===t.orientation,r=n?e.computedInner.width:e.computedInner.height,o=t.range(),i=n&&t.rtl;return{size:r,start:(i?1-o[1]:o[0])*r,end:(i?1-o[0]:o[1])*r}}function rl(){const e=this.state.hover.start||this.state.hover.end||this.state.drag.start||this.state.drag.end;this.renderer.element().ownerDocument.body.style.cursor=e?el:tl}function ol(e,t,n){const{min:r}=this.settings.settings.size.thumb;if(n-t<r){const o=(r-(n-t))/2,i=Math.max(0,0-(t-o))-Math.max(0,n+o-e);return{size:e,start:t-o+i,end:n+o+i}}return{size:e,start:t,end:n}}function il(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function al(){const{size:e,start:t,end:n}=nl.call(this);this.renderer.render(this.elements(this.h,ol.call(this,e,t,n)))}function sl(){const{state:e,settings:t,style:n}=this,r=t.settings.style;return e.style[r]||(e.style[r]=function({id:e,style:t}){const n="slim"===e?Xs:Us;return{container:{...Js},before:{...Js,...n.before,...t.before},after:{...Js,...n.after,...t.after},thumb:{...Js,...n.thumb,...t.thumb},startHandle:{...Js,...Zs,...n.startHandle},endHandle:{...Js,...Zs,...n.endHandle},startHandleBorder:{...Js,...Qs,...n.startHandleBorder},endHandleBorder:{...Js,...Qs,...n.endHandleBorder}}}({id:t.settings.style,style:n[r]})),e.style[r]}var ll={require:["renderer"],defaultSettings:{settings:{style:"standard",size:{area:{min:30,max:40,ratio:1/8},thumb:{min:4}},orientation:"horizontal",rtl:!1,isContinuous:!1,range:()=>[0,1],injections:()=>[]},style:{standard:{before:{},thumb:{},after:{}},slim:{before:{},thumb:{},after:{}}}},renderer:"dom",on:{render(){al.call(this)},lockState(){this.state.locked=!0},unlockState(){this.state.locked=!1},hover(e){if(this.state.locked||this.state.drag.start||this.state.drag.end||!il.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=qs({e:e});t&&(this.state.hover[t]=!0),rl.call(this),al.call(this)},leave(){this.state.locked||(this.state.hover.reset(),rl.call(this),al.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=qs({e:e});t&&(this.state.drag[t]=!0),rl.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),rl.call(this),al.call(this))}},preferredSize({outer:e}){const{min:t,max:n,ratio:r}=this.settings.settings.size.area,o="horizontal"===this.settings.settings.orientation?"height":"width";return Math.max(t,Math.min(n,e[o]*r))},created(){this.state={style:{},locked:!1,hover:{start:!1,end:!1,reset(){this.start=!1,this.end=!1},isPristine(){return!this.start&&!this.end}},drag:{start:!1,end:!1,reset(){this.start=!1,this.end=!1}}}},render(e){this.h=e;const{size:t,start:n,end:r}=nl.call(this);return this.elements(e,ol.call(this,t,n,r))},properties(){return"horizontal"===this.settings.settings.orientation?{start:"left",end:"right"}:{start:"top",end:"bottom"}},elements(e,{size:t,start:n,end:r}){const{settings:o}=this.settings,i=o.injections().map((t=>t({h:e,rect:this.rect,orientation:o.orientation,minThumbSize:o.size.thumb.min})));return function({h:e,size:t,start:n,end:r,properties:o,startHandleActive:i,endHandleActive:a,style:s,continuous:l,invert:c,injections:u}){const d={[o.end]:t-n},p={[o.start]:r},m={left:-3},f={left:1},h={right:-3,left:"auto"},g={left:3},v=e("div",{style:{...s.before,...c?p:d},class:"scrollbar--before"}),y=e("div",{style:{...s.after,...c?d:p},class:"scrollbar--after"}),b=[];if(l){const t=e("div",{style:{...s.startHandle,...c?h:m},class:"scrollbar--start-handle",[Ds]:"start"},i?e("div",{style:{...s.startHandleBorder,...c?g:f}}):void 0);b.push(t);const n=e("div",{style:{...s.endHandle,...c?m:h},class:"scrollbar--end-handle",[Ds]:"end"},a?e("div",{style:{...s.endHandleBorder,...c?f:g}}):void 0);b.push(n)}const x=e("div",{style:{...s.thumb,[o.start]:n,[o.end]:t-r},class:"scrollbar--thumb"},b);return e("div",{style:{...s.container}},[v,x,y,...u])}({h:e,size:t,start:n,end:r,properties:this.properties(),startHandleActive:this.state.hover.start||this.state.drag.start,endHandleActive:this.state.hover.end||this.state.drag.end,style:sl.call(this),continuous:o.isContinuous,invert:"horizontal"===o.orientation&&o.rtl,injections:i})}};function cl({layoutService:e}){return e.meta.isContinuous&&As({layoutService:e}).miniChart}function ul({models:e}){const{layoutService:t,fieldModel:n,seriesModel:r,colorService:o}=e,{primarySeries:i,secondarySeries:a}=r.meta,s=r.query.series(es.LINE),l=[...Cs({forceCreate:!0,key:Qa.COLLECTION.PRIMARY,series:i,fieldModel:n,colorService:o,layoutService:t}),...Cs({key:Qa.COLLECTION.SECONDARY,series:a,fieldModel:n,colorService:o,layoutService:t}),...Cs({key:Qa.COLLECTION.LINE,series:s,fieldModel:n,colorService:o,layoutService:t}),...Ms({key:Qa.COLLECTION.STACKED_PRIMARY,layoutService:t,fieldModel:n,colorService:o,series:i}),...Ms({key:Qa.COLLECTION.STACKED_SECONDARY,layoutService:t,fieldModel:n,colorService:o,series:a}),...ws({key:Qa.COLLECTION.STACKED_TOTAL_PRIMARY,layoutService:t,fieldModel:n,series:i}),...ws({key:Qa.COLLECTION.STACKED_TOTAL_SECONDARY,layoutService:t,fieldModel:n,series:a})];return cl(e)&&(l.push(...Cs({key:Qa.COLLECTION.REDUCED,source:Qa.DATA.REDUCED,series:r.query.all(),fieldModel:n,colorService:o,layoutService:t})),l.push(...Cs({key:Qa.COLLECTION.REDUCED_PRIMARY,source:Qa.DATA.REDUCED,series:i,fieldModel:n,colorService:o,layoutService:t})),l.push(...Cs({key:Qa.COLLECTION.REDUCED_SECONDARY,source:Qa.DATA.REDUCED,series:a,fieldModel:n,colorService:o,layoutService:t})),l.push(...Ms({key:Qa.COLLECTION.REDUCED_STACKED_PRIMARY,source:Qa.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.primarySeries.filter((e=>e.type===es.BAR)),colorService:o})),l.push(...Ms({key:Qa.COLLECTION.REDUCED_STACKED_SECONDARY,source:Qa.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.secondarySeries.filter((e=>e.type===es.BAR)),colorService:o}))),l}const dl=({layoutService:e,dockService:t})=>"custom"!==e.getLayoutValue("dimensionAxis.axisDisplayMode")?Math.min(200,t.meta.chart.size["horizontal"===t.meta.major.orientation?"height":"width"]/4):void 0;function pl({models:e}){const{dockService:t,seriesModel:n,layoutService:r}=e,o=2===n.meta.measureAxes.length;if(o)return.5;const i=n.meta.measureAxes[0].isPrimary?t.meta.minor.dock:t.meta.minorSecondary.dock;if(!o){const e=n.meta.measureAxes[0].isPrimary?0:1;if("none"===r.getLayoutValue(`measureAxes.${e}.show`))return.5}return"horizontal"===t.meta.minor.orientation?"near"===i||"bottom"===i?1:0:"near"===i||"left"===i?0:1}const ml=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:r,layoutService:o,dockService:i}=e,{orientation:a}=i.meta.major;return{data:{extract:{field:n.main.major,props:{selectionDimension:{field:n.main.major}}}},maxPxStep:dl({layoutService:o,dockService:i}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:pl({models:e})}},fl=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:r,layoutService:o,dockService:i}=e,{orientation:a}=i.meta.major;return{type:"group-by-measure",data:{extract:{field:n.main.major}},measureCount:o.meta.groupSize,maxPxStep:dl({layoutService:o,dockService:i}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:pl({models:e})}};function hl({viewState:e,models:t,environment:n}){const{fieldModel:r,dockService:o}=t,{orientation:i}=o.meta.major;return{type:"linear",invert:"horizontal"===i&&"rtl"===n.options.direction,data:{extract:{field:r.main.majorNumeric}},ticks:{forceBounds:!0,count:e.get("zoom").min===e.get("zoom").max?1:void 0},minorTicks:{count:1},min:()=>e.get("zoom").min,max:()=>e.get("zoom").max}}function gl({viewCache:e,mainMajor:t}){return Q(!0,{},t,{min:()=>e.get("continuousMin"),max:()=>e.get("continuousMax")})}function vl({viewState:e,viewCache:t,layoutService:n}){return t.set("qTimeAxisCache",[]),{get:(e,n=0)=>{const r=t.get("qTimeAxisCache");return r[n]&&r[n][0]===e?r[n][1]:void 0},set:(e,n,r=0)=>{t.get("qTimeAxisCache")[r]=[e,n]},key:({distance:r})=>{const{min:o,max:i}=e.get("zoom"),a=(i-o)/(t.get("continuousMax")-t.get("continuousMin")),s=n.getHyperCubeValue("qAxisData.qAxis",[]).map((e=>e.qName));return[r,Number.parseFloat(a).toFixed(12),...s].toString()}}}function yl({picasso:e,viewState:t,viewCache:n,models:r,environment:o}){const{layoutService:i,fieldModel:a,appLayoutModel:s,themeService:l}=r,{measureText:c}=e.renderer("svg")(),{majorNumeric:u}=a.main,d=l.getStyles(),p={type:"time",data:{field:u},qAxis:()=>i.getHyperCubeValue("qAxisData.qAxis",[]),field:u,min:()=>t.get("zoom").min,max:()=>t.get("zoom").max,invert:"rtl"===o.options.direction,formatter:{fn:e.formatter("q-time"),localeInfo:s.qLocaleInfo,qNumFormat:i.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:e=>c({text:e,fontFamily:d.axis.label.name.fontFamily,fontSize:d.axis.label.name.fontSize})},ticks:{generator:{type:"d3",initialMin:t.get("zoom").min},anchor:"start",clamp:!0},cache:vl({viewState:t,viewCache:n,layoutService:i})};return{[Qa.SCALE.MAJOR]:Q(!0,{},p,{ticks:{level:"outer"}}),[Qa.SCALE.MAJOR_INNER]:Q(!0,{},p,{ticks:{level:"inner"}})}}function bl({picasso:e,models:t,viewState:n,viewCache:r,environment:o}){const{meta:i}=t.layoutService,a=i.isTime?{...yl({picasso:e,viewState:n,viewCache:r,models:t,environment:o})}:i.isContinuous?{[Qa.SCALE.MAJOR]:hl({models:t,viewState:n,environment:o})}:i.isBarSeriesGrouped?{[Qa.SCALE.MAJOR]:fl({models:t,environment:o})}:{[Qa.SCALE.MAJOR]:i.isBarSeriesStackedInBothAxis?fl({models:t,environment:o}):ml({models:t,environment:o})};return cl(t)?{...a,[Qa.SCALE.REDUCED]:gl({viewCache:r,mainMajor:a[Qa.SCALE.MAJOR]})}:a}function xl({fields:e,tickModel:t,dockService:n,environment:r}){const o="rtl"===r.options.direction,{orientation:i}=n.meta.minor;return{data:{source:"qHyperCube",fields:e},invert:"vertical"===i||o,ticks:{values:t.query.getValues},min:t.query.getMin,max:t.query.getMax}}function Sl({layoutService:e,tickModel:t,dockService:n,environment:r}){if(!cl({layoutService:e}))return;const o="rtl"===r.options.direction,{orientation:i}=n.meta.minor;return{type:"linear",invert:"vertical"===i||o,min:t.query.getMin,max:t.query.getMax}}function El({picasso:e,models:t,viewState:n,viewCache:r,environment:o}){const{layoutService:i,fieldModel:a,primaryTickModel:s,secondaryTickModel:l,colorService:c,dockService:u}=t;return{...bl({picasso:e,models:t,viewState:n,viewCache:r,environment:o}),[Qa.SCALE.MINOR.PRIMARY]:xl({fields:a.main.minorsPrimary,tickModel:s,dockService:u,environment:o}),[Qa.SCALE.MINOR.SECONDARY]:xl({fields:a.main.minorsSecondary,tickModel:l,dockService:u,environment:o}),[Qa.SCALE.MINOR.REDUCED_PRIMARY]:Sl({layoutService:i,tickModel:s,dockService:u,environment:o}),[Qa.SCALE.MINOR.REDUCED_SECONDARY]:Sl({layoutService:i,tickModel:l,dockService:u,environment:o}),...c.custom.wrappedScales()}}var Ml={AXIS:{MAJOR:{HORIZONTAL:{width:"XSMALL",height:"SMALL"},VERTICAL:{width:"SMALL",height:"XSMALL"}},MINOR:"XSMALL"},AXIS_TITLE:{MAJOR:{HORIZONTAL:{width:"XSMALL",height:"MEDIUM"},VERTICAL:{width:"MEDIUM",height:"XSMALL"}},MINOR:"SMALL"},GRID_LINE:"XSMALL",VALUE_LABEL:"XSMALL",LABEL_SPACE:"XSMALL",OUT_OF_BOUNDS_MARKER:"XSMALL",REFERENCE_LINE:"SPARK"};const Cl=["all","labels"];function wl({models:e}){const{layoutService:t,dockService:n,seriesModel:r,themeService:o,styleModel:i}=e,a=t.getLayoutValue("measureAxes");if(!a||!a.length)return[];const s=o.getStyles(),l=i.query.axis.label.getStyle(),{measureAxes:c}=r.meta;return c.filter((e=>{const t=e.isPrimary?0:1;return Cl.some((e=>a[t].show===e))})).map((e=>({type:"axis",key:e.isPrimary?Qa.COMPONENT.AXIS.MINOR.PRIMARY:Qa.COMPONENT.AXIS.MINOR.SECONDARY,scale:e.scale,layout:{dock:e.isPrimary?n.meta.minor.dock:n.meta.minorSecondary.dock,minimumLayoutMode:Ml.AXIS.MINOR},settings:{labels:{show:!0,fontFamily:l.fontFamily,fontSize:l.fontSize,fill:l.fill},line:{stroke:s.axis.line.major.color},ticks:{stroke:s.axis.line.major.color},minorTicks:{stroke:s.axis.line.minor.color}}})))}var kl=.5,Nl=3,Tl=13;function Ol({models:e,environment:t}){const{layoutService:n,dockService:r,styleModel:o}=e,i="rtl"===t.options.direction,a=n.getLayoutValue("dimensionAxis"),s=o.query.axis.label.getStyle(),l=(({layoutService:e})=>{const t=e.getHyperCubeValue("qDimensionInfo.0.qApprMaxGlyphCount"),[n]=e.getDataPages(),r=n?n.qMatrix:[];return ve.getAdjustedMaxGlyphCount(t,r,0,"qText")})({layoutService:n}),{orientation:c}=r.meta.major,u="horizontal"===c?a.label:"auto";return{type:"axis",key:Qa.COMPONENT.AXIS.MAJOR,scale:Qa.SCALE.MAJOR,layout:{dock:r.meta.major.dock,minimumLayoutMode:Ml.AXIS.MAJOR[c.toUpperCase()]},settings:{labels:{mode:a.label,tiltAngle:i?-40:40,maxEdgeBleed:50,maxLengthPx:"horizontal"===u?void 0:r.meta.minor.size/4,maxGlyphCount:l,tiltThreshold:l>Nl&&l<Tl?1:void 0,fontFamily:s.fontFamily,fontSize:s.fontSize,fill:s.fill},line:{show:!1},paddingEnd:4},brush:{consume:[{context:"selection",style:{inactive:{opacity:kl}}}]}}}function Rl({models:e}){const{dockService:t,styleModel:n}=e,{orientation:r}=t.meta.major,o=n.query.axis.label.getStyle();return{type:"axis",key:Qa.COMPONENT.AXIS.MAJOR_CONTINUOUS,scale:Qa.SCALE.MAJOR,layout:{dock:t.meta.major.dock,minimumLayoutMode:Ml.AXIS.MAJOR[r.toUpperCase()]},settings:{labels:{align:0,offset:4,fontFamily:o.fontFamily,fontSize:o.fontSize,fill:o.fill},line:{show:!1}}}}function Al({models:e,environment:t}){const{layoutService:n}=e,r=n.getLayoutValue("dimensionAxis");if(!r)return[];const{show:o}=r;return"none"===o||"title"===o?[]:n.meta.isTime?function({models:e,environment:t}){const{dockService:n,themeService:r,styleModel:o}=e,i="rtl"===t.options.direction,{orientation:a}=n.meta.major,s="bottom"===n.meta.major.dock?0:1,l=r.getStyles(),c=o.query.axis.label.getStyle(),u=i?1:0,d={type:"time-axis",renderer:"svg",layout:{dock:n.meta.major.dock,minimumLayoutMode:Ml.AXIS.MAJOR[a]},preferredSize:()=>({size:2*parseFloat(c.fontSize),edgeBleed:{left:1,right:1}}),settings:{anchor:i?"end":"start",label:{align:s,justify:u},guideLine:{major:{justify:u},minor:{align:s}},line:{show:!1}},style:{label:{fontFamily:c.fontFamily,fontSize:c.fontSize,fill:c.fill},majorGuideLine:{stroke:l.axis.line.major.color},minorGuideLine:{stroke:l.axis.line.minor.color}}};return[Q(!0,{},d,{key:Qa.COMPONENT.AXIS.TIME_INNER,scale:Qa.SCALE.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}}},style:{majorGuideLine:{stroke:l.axis.line.minor.color},minorGuideLine:{stroke:l.axis.line.major.color}}}),Q(!0,{},d,{key:Qa.COMPONENT.AXIS.TIME_OUTER,scale:Qa.SCALE.MAJOR,settings:{guideLine:{minor:{show:!1}}}})]}({models:e,environment:t}):n.meta.isContinuous?[Rl({models:e})]:[Ol({models:e,environment:t})]}const Ll=({layoutService:e,axis:t})=>e.meta.isBarSeriesGrouped?({scale:e,datum:t})=>e([t.value,t.typeIndex.value])+e.bandwidth()/2:e.meta.isBarSeriesStackedInBothAxis?({scale:e,datum:n})=>e([n.value,t])+e.bandwidth()/2:null,Il=({layoutService:e,seriesModel:t,rtl:n,orientation:r})=>e.meta.isContinuous?null:e.meta.isBarSeriesGrouped?({scale:e,datum:o})=>e([o.value,n&&"horizontal"===r?t.meta.barSeriesCount-1:0])+e.bandwidth()*t.meta.barSeriesCount/2:e.meta.isBarSeriesStackedInBothAxis?({scale:e,datum:t})=>e([t.value,n&&"horizontal"===r?1:0])+e.bandwidth():null;function Pl({layoutService:e,active:t={},inactive:n={}}){return{consume:[{context:"selection",data:["selectionDimension","end","color","major"],style:{active:{strokeWidth:e.meta.isContinuous?0:2,stroke:"#000",opacity:e=>{var t,n;return!0===(null===(t=e.data)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)?0:1},...t},inactive:{opacity:e=>{var t,n;return!0===(null===(t=e.data)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)?0:kl},...n}}}]}}var Dl="max",ql="min";function zl(e,t){return function(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r}(e,t)||function(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r}(e,t)}const $l=(e,t)=>`${e}-${t.id}`,Bl=4,Fl=12,Hl=4;function jl({chart:e,layoutService:t,dockService:n,markerKey:r,markerType:o}){if(t.meta.isContinuous)return()=>Hl+"px";const i={size:void 0},a="horizontal"===n.meta.major.orientation?"width":"height";return t=>{if(!i.size){const n=e.component(r),s=t.resources.scale(Qa.SCALE.MAJOR),l=n.rect[a]*s.bandwidth()*.25,c=Math.max(Bl,Math.min(Fl,l));i.size=("bar"===o?2*c:c)+"px"}return i.size}}const{isDark:Vl}=At;const Wl=({chart:e,models:t,series:n,environment:r})=>{const{layoutService:o,seriesModel:i,colorService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c}=t,u=a.getColor(),{fill:d,marker:p}=n.options,{isContinuous:m}=o.meta,f="rtl"===r.options.direction,{orientation:h}=s.meta.major,g="horizontal"===h,v=(n.isPrimary?l:c).query.getExtrema(),y=({end:e})=>{const{value:t}=e;return zl(t,v)},b=$l(Qa.COMPONENT.MARKER,n);return{type:"point",key:b,data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{[g?"x":"y"]:{scale:Qa.SCALE.MAJOR,fn:Il({layoutService:o,seriesModel:i,rtl:f,orientation:h}),ref:m?"major":void 0},[g?"y":"x"]:{scale:n.scale,ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?e.scale.min():e.datum.end.value;return function(e){return Math.min(Math.max(0,e),1)}(e.scale(n))}},fill:d||"bar"===p?u:"none",opacity:e=>{var t;return!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)||y(e.datum)?0:1},stroke:e=>{const t=u(e);return d?Vl(t)?function(e){return _e(e).brighter(.5).toString()}(t):function(e){return _e(e).darker().toString()}(t):t},size:jl({chart:e,layoutService:o,dockService:s,markerKey:b,markerType:p}),shape:()=>(({marker:e,horizontal:t,rtl:n})=>{let r;return"triangle"!==e||t||(r=n?"left":"right"),"bar"===e&&(r=t?"horizontal":"vertical"),r?{type:e,direction:r}:{type:e}})({marker:p,horizontal:g,rtl:f})},brush:Pl({layoutService:o,active:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||y(e.data)?0:1}},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||y(e.data)?0:kl}}})}};function _l({property:e="end",isHorizontal:t,isColor:n,fallback:r,rtl:o}){return function(i){const{datum:a,resources:{scale:s}}=i,l=s(Qa.SCALE.MAJOR),c=s(Qa.SCALE.COLOR),u=t&&o?[...a.points].reverse():a.points,d=u.reduce(((t,n,r)=>{const o="NaN"===n[e].value||Number.isNaN(n[e].value),i=u[r+1],a=i&&"NaN"!==i[e].value&&!Number.isNaN(i[e].value);return o?t.length&&a&&t.push(n):t.push(n),t}),[]),p="group-by-measure"===l.type?e=>l([e.major.value,e.typeIndex.value]):e=>l(e.major.value),m=d.map(p),f=Math.min(...m),h=Math.max(...m)-f,g=0===h?1:h,v=m.map(((e,t)=>0===t?0:t===m.length-1?1:(e-f)/g)),y=[];for(let t=0;t<d.length;t++){const o=d[t],i=o.color&&o.color.value,a=n?i||r:c(i)||r,s=0===t,l=t===d.length-1,u=v[t];if("NaN"===o[e].value||Number.isNaN(o[e].value))y[t-1].virtual||y.push({virtual:!0});else{const n=d[t-1];n&&"NaN"!==n[e].value&&!Number.isNaN(n[e].value)?y.push({color:a,offset:s?0:Math.max(0,parseFloat((u-(u-v[t-1])/2).toFixed(5)))}):y.push({color:a,offset:u});const r=d[t+1];r&&"NaN"!==r[e].value&&!Number.isNaN(r[e].value)?y.push({color:a,offset:l?1:Math.max(0,parseFloat((u+(v[t+1]-u)/2).toFixed(5)))}):y.push({color:a,offset:u})}}const b=y.reduce(((e,t,n)=>{if(t.virtual){const t=y[n-1],r=y[n+1],o=t.offset+(r.offset-t.offset)/2;e.push({color:t.color,offset:o},{color:r.color,offset:o})}else e.push(t);return e}),[]);return{type:"gradient",x1:0,x2:t?1:0,y1:0,y2:t?0:1,stops:b}}}function Ul({environment:e,models:t,measureIndex:n}){const{layoutService:r,colorService:o,dockService:i}=t,a="rtl"===e.options.direction,{hasMultipleMeasures:s}=r.meta,{mode:l,type:c,nil:u}=o.getSettingsForMeasure(n),d="horizontal"===i.meta.major.orientation;if(!l||"constant"===c)return o.getColor();if("measure"===l&&"categorical"===c)return o.getColor();const p=r.getHyperCubeValue(`qMeasureInfo.${n}.color`);if(null!=p&&p.on)return"byExpression"===p.mode?_l({isHorizontal:d,isColor:!0,fallback:u,rtl:a}):o.getColor();const m=r.getLayoutValue("color",{}),f=!m.auto&&"byExpression"===m.mode,h=!!m.colorExpression;if(f&&!h)return u;const g=!m.auto&&"byMeasure"===m.mode&&m.byMeasureDef&&void 0!==m.byMeasureDef.activeMeasureIndex;return s||!g?_l({isHorizontal:d,isColor:"color"===c,fallback:u,rtl:a}):"continuous"===c?function({isHorizontal:e,rtl:t}){return function(n){const{datum:{points:r},resources:{scale:o}}=n,i=o(Qa.SCALE.COLOR),a=r.map((e=>e.end.value)).filter((e=>"NaN"!==e&&!Number.isNaN(e))),s=Math.min(...a),l=Math.max(...a),c=l-s,u=0===c?1:c,d=i.domain().map((e=>({color:i(Math.min(l,Math.max(s,e))),offset:Math.min(1,Math.max(0,(e-s)/u))})));return{type:"gradient",x1:!e&&t?1:0,x2:e||t?0:1,y1:e?1:0,y2:0,stops:d}}}({isHorizontal:d,rtl:a}):function({isHorizontal:e,isArea:t,fallback:n,rtl:r}){return function(o){const{datum:{points:i},resources:{scale:a}}=o,s=a(Qa.SCALE.COLOR),l=i.map((e=>e.end.value)).filter((e=>"NaN"!==e&&!Number.isNaN(e))),c=Math.min(...l),u=Math.max(...l),d=t?Math.min(0,c):c,p=(t?Math.max(0,u):u)-d,m=0===p?1:p,f=s.domain(),h=[];for(let e=0;e<f.length-1;e++){const t=f[e],r=s(t)||n;h.push({color:r,offset:Math.min(1,Math.max(0,(t-d)/m))});const o=f[e+1];h.push({color:r,offset:Math.min(1,Math.max(0,(o-d)/m))})}return{type:"gradient",x1:!e&&r?1:0,x2:e||r?0:1,y1:e?1:0,y2:0,stops:h}}}({isHorizontal:d,fallback:u,rtl:a})}const Yl=({models:e,environment:t,series:n})=>{const{layoutService:r,seriesModel:o,dockService:i,styleModel:a}=e,s="rtl"===t.options.direction,{orientation:l}=i.meta.major,c=Il({layoutService:r,seriesModel:o,rtl:s,orientation:l});return{key:$l(Qa.COMPONENT.LINE,n),type:"line",data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{coordinates:{major:{scale:Qa.SCALE.MAJOR,fn:c},minor:{scale:n.scale,ref:"end"}},layers:{curve:a.query.line.getCurveFn(),line:{stroke:Ul({models:e,environment:t,measureIndex:n.refIndex}),strokeWidth:a.query.line.getStrokeWidthFn(),strokeDasharray:a.query.line.getStrokeDasharrayFn(),strokeLinejoin:"round"}},connect:n.options.showAsConnections,orientation:i.meta.major.orientation},brush:Pl({layoutService:r,active:{stroke:void 0,strokeWidth:void 0,opacity:kl},inactive:{opacity:kl}})}};var Gl={BAR:{STROKE:{COLOR:"#205891",WIDTH:{NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}},LINE:{CURVE:{LINEAR:"linear",MONOTONE:"monotone",STEP:"step"},WIDTH:{FULL:{DEFAULT:2,ACTIVE:2},LESS:{DEFAULT:1,ACTIVE:1}},TYPE:{SOLID:void 0,DASHED:"5, 5"}},POINT:{SIZE:{DEFAULT:6,ACTIVE:4}}};function Kl({series:e,layoutService:t}){const{showAsConnections:n}=e.options,r=function({layoutService:e}){const{isDiscrete:t}=e.meta;return({item:e})=>{if(e.dummy)return t;const{value:n}=e.end;return"NaN"===n||Number.isNaN(n)}}({layoutService:t}),o=n?(e,t)=>0!==e&&t.slice(0,e).reverse().some((e=>!r({item:e}))):(e,t)=>0!==e&&!r({item:t[e-1]}),i=n?(e,t)=>e!==t.length-1&&t.slice(e+1,t.length).some((e=>!r({item:e}))):(e,t)=>e!==t.length-1&&!r({item:t[e+1]});return({index:e,items:t})=>({before:o(e,t),after:i(e,t)})}const Xl=3,Jl=20;function Zl({models:e,series:t,environment:n}){const{layoutService:r,colorService:o,seriesModel:i,dockService:a,styleModel:s,primaryExtremumModel:l,secondaryExtremumModel:c,selectionService:u}=e,d=r.getLayoutValue("dataPoint.show",!1),{orientation:p}=a.meta.major,m="horizontal"===p,f="SPARK"===a.meta.chart.mode,h=o.getColor(),{POINT:g}=Gl,v=function({layoutService:e,series:t}){const n={key:void 0,map:void 0},r=Kl({series:t,layoutService:e});return({item:e,items:t})=>{n.key!==t&&(n.key=t,n.map=function({items:e}){return e.reduce(((e,t)=>{const{value:n}=t.line;return e[n]||(e[n]={items:[],keys:[]}),e[n].items.push(t),e[n].keys.push(`${t.major.value}-${t.line.value}`),e}),{})}({items:t}));const{value:o}=e.line,i=n.map[o],a=`${e.major.value}-${o}`,s=i.keys.indexOf(a),{before:l,after:c}=r({index:s,items:i.items});return!l&&!c}}({series:t,layoutService:r}),y="rtl"===n.options.direction,b=(t.isPrimary?l:c).query.getExtrema(),{isContinuous:x}=r.meta,S=({end:e})=>{const{value:t}=e;return zl(t,b)};return{type:"point",key:$l(Qa.COMPONENT.POINT,t),data:{filter:e=>t.ref===e.end.source.field,collection:t.collection},preferredSize:()=>({edgeBleed:{top:m?g.SIZE.DEFAULT/2:0}}),settings:{[m?"y":"x"]:{scale:t.scale,ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?e.scale.min():e.datum.end.value;return function(e){return Math.min(Math.max(0,e),1)}(e.scale(n))}},[m?"x":"y"]:{scale:Qa.SCALE.MAJOR,fn:Il({layoutService:r,seriesModel:i,rtl:y,orientation:p}),ref:"major"},sizeLimits:{minPx:Xl,maxPx:Jl},size:e=>{const{value:t}=e.datum.line;return s.query.point.getSize(t)+"px"},fill:h,opacity:({datum:e,data:t})=>{var n;return null!==(n=e.null)&&void 0!==n&&n.value||S(e)?0:f?v({item:e,items:t.items})?1:0:d||v({item:e,items:t.items})?1:0}},brush:Pl({layoutService:r,active:{r:e=>e.r+Gl.POINT.SIZE.ACTIVE/2,strokeWidth:1.5,stroke:"#FFFFFF",opacity:e=>{var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||S(e.data))return 0;if(!x||d)return 1;const{event:n,components:r=[]}=(null==u?void 0:u.getSelectionInfo())||{};if("continuousRange"===n)return 0;if("tap"!==n)return 1;return[Qa.COMPONENT.AXIS_OVERLAY.CONTINUOUS,Qa.COMPONENT.AXIS_OVERLAY.TIME_INNER,Qa.COMPONENT.AXIS_OVERLAY.TIME_OUTER].some((e=>r.indexOf(e)>=0))?0:1}},inactive:{opacity:e=>1===e.opacity?.5:0}})}}const Ql=(e,{dataset:t})=>{var n;if(null!==(n=e.null)&&void 0!==n&&n.value)return"-";const{value:r,label:o,source:i}=e.end,a=t(i.key).field(i.field);return a.raw().isCustomFormatted?o:a.formatter()(r)};function ec({chart:e,models:t,environment:n,series:r,lineSeries:o}){const{layoutService:i,dockService:a,styleModel:s,primaryExtremumModel:l,secondaryExtremumModel:c}=t,{id:u}=r,d="rtl"===n.options.direction,p=i.getLayoutValue("dataPoint");if(!p)return!1;if(!p.show||!p.showLineLabels)return!1;const m=(r.isPrimary?l:c).query.getExtrema(),f=s.query.point.label.getStyle();return{type:"point-label",key:`${Qa.COMPONENT.POINT_LABEL}-${u}`,layout:{displayOrder:2,minimumLayoutMode:Ml.VALUE_LABEL},settings:{orientation:a.meta.major.orientation,rtl:d,connect:r.options.showAsConnections,label:t=>Ql(t,e),pointValue:e=>e.end.value,majorValue:e=>e.value,target:{point:`${Qa.COMPONENT.POINT}-${u}`,allPoints:o.map((e=>`${Qa.COMPONENT.POINT}-${e.id}`))},lineIndex:"typeIndex",showLabel:e=>!(({end:e})=>zl(e.value,m))(e.data),labelSpace:{use:()=>{const t=e.component(Qa.COMPONENT.LABEL_SPACE);return!(null==t||!t.preferredSize())},size:10}},style:{fontFamily:f.fontFamily,fontSize:f.fontSize,fill:f.fill}}}const tc=({chart:e,dock:t})=>{let n=t;const r=e.component(`${Qa.COMPONENT.SLICED_HAT}-${Dl}`),o=e.component(`${Qa.COMPONENT.SLICED_HAT}-${Dl}-${ts.PRIMARY}`),i=e.component(`${Qa.COMPONENT.SLICED_HAT}-${Dl}-${ts.SECONDARY}`);return r?n=`@${Qa.COMPONENT.SLICED_HAT}-${Dl}`:o?n=`@${Qa.COMPONENT.SLICED_HAT}-${Dl}-${ts.PRIMARY}`:i&&(n=`@${Qa.COMPONENT.SLICED_HAT}-${Dl}-${ts.SECONDARY}`),n},nc=({dockPosition:e,orientation:t,rtl:n})=>{let r=1;return e!==`@${Qa.COMPONENT.SLICED_HAT}-${Dl}`&&e!==`@${Qa.COMPONENT.SLICED_HAT}-${Dl}-${ts.PRIMARY}`&&e!==`@${Qa.COMPONENT.SLICED_HAT}-${Dl}-${ts.SECONDARY}`||!("horizontal"===t||"vertical"===t&&n)||(r=4),e!==`@${Qa.COMPONENT.SLICED_HAT}-${ql}`&&e!==`@${Qa.COMPONENT.SLICED_HAT}-${ql}-${ts.PRIMARY}`&&e!==`@${Qa.COMPONENT.SLICED_HAT}-${ql}-${ts.SECONDARY}`||"vertical"!==t||n||(r=4),r};function rc({chart:e,models:t,environment:n,lineSeries:r}){const{layoutService:o,dockService:i,primaryExtremumModel:a,secondaryExtremumModel:s}=t,l=o.getLayoutValue("dataPoint",{}),c="rtl"===n.options.direction;if(!r.length)return!1;if(!l.show||!l.showLineLabels)return!1;const u="horizontal"===i.meta.major.orientation,{show:d}=o.getLayoutValue("dimensionAxis",{});if("none"!==d){const{dock:e}=i.meta.major;if(u&&"top"===e)return!1;if(!u&&e===(c?"left":"right"))return!1}const p=c?"left":"right";return{type:"label-space",key:Qa.COMPONENT.LABEL_SPACE,layout:{minimumLayoutMode:Ml.LABEL_SPACE,dock:tc({chart:e,dock:u?"top":p})},settings:{size:10},preferredSize:()=>{const t=e.component(`${Qa.COMPONENT.LINE}-${r[0].id}`);if(null==t||!t.rect)return 0;const n=(u?17:34)/t.rect[u?"height":"width"],o=a.query.getExtrema(),i=e.scale(Qa.SCALE.MINOR.PRIMARY)(o.implicit.line.max),l=u||c?i:1-i,d=r.filter((e=>e.isPrimary)).length>0,p=s.query.getExtrema(),m=e.scale(Qa.SCALE.MINOR.SECONDARY)(p.implicit.line.max),f=u||c?m:1-m,h=r.filter((e=>!e.isPrimary)).length>0;return d&&l<n||h&&f<n?10:0}}}const oc={min:"Min",max:"Max"};function ic(e,t,n){const{hasExplicitMax:r}=n.meta,{max:o}=n.explicit;return!!r&&Math.max(e,t)>o&&o<=Math.min(e,t)}function ac(e,t,n){const{hasExplicitMin:r}=n.meta,{min:o}=n.explicit;return!!r&&Math.min(e,t)<o&&o>=Math.max(e,t)}function sc(e,t,n){return ic(e,t,n)||ac(e,t,n)}function lc(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r&&r<=0}function cc(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r&&r>=0}function uc(e,t){return lc(e,t)||cc(e,t)}function dc({extrema:e,type:t}){return!(function({extrema:e,type:t}){return!e.meta["hasExplicit"+oc[t]]}({extrema:e,type:t})||function({extrema:e,type:t}){const n=t===Dl?e.implicit.bar.max:e.implicit.bar.min,r=Number(n.toFixed(13));return t===Dl?!lc(r,e):!cc(r,e)}({extrema:e,type:t}))}var pc=Object.freeze({__proto__:null,isSegmentMaxOutOfBounds:ic,isSegmentMinOutOfBounds:ac,isSegmentOutOfBounds:sc,isMaxOutOfBounds:lc,isMinOutOfBounds:cc,isOutOfBounds:uc,shouldShowOob:dc});const mc={min:"Min",max:"Max"},fc=({chart:e,models:t,markerSeries:n,lineSeries:r,barSeries:o,environment:i,type:a})=>{const{dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,primaryTickModel:u,secondaryTickModel:d,layoutService:p,seriesModel:m,themeService:f,fieldModel:h}=t,g="rtl"===i.options.direction,{dock:v,opposite:y,orientation:b}=s.meta.major,x=l.query.getExtrema(),S=c.query.getExtrema(),E=a===Dl,{isBarSeriesGrouped:M}=p.meta,C=(({chart:e,type:t,opposite:n,dock:r})=>{let o=t===Dl?n:r;const i=e.component(`${Qa.COMPONENT.SLICED_HAT}-${t}`),a=e.component(`${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.PRIMARY}`),s=e.component(`${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.SECONDARY}`),l=e.component(Qa.COMPONENT.LABEL_SPACE),c=e.component(`${Qa.COMPONENT.BAR_OOB}-${t}`),u=e.component(`${Qa.COMPONENT.BAR_OOB}-${t}-${ts.PRIMARY}`),d=e.component(`${Qa.COMPONENT.BAR_OOB}-${t}-${ts.SECONDARY}`);return i?o=`@${Qa.COMPONENT.SLICED_HAT}-${t}`:a?o=`@${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.PRIMARY}`:s?o=`@${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.SECONDARY}`:c||u||d?l&&t===Dl?o="@"+Qa.COMPONENT.LABEL_SPACE:c?o=`@${Qa.COMPONENT.BAR_OOB}-${t}`:u?o=`@${Qa.COMPONENT.BAR_OOB}-${t}-${ts.PRIMARY}`:d&&(o=`@${Qa.COMPONENT.BAR_OOB}-${t}-${ts.SECONDARY}`):l&&t===Dl&&(o="@"+Qa.COMPONENT.LABEL_SPACE),o})({chart:e,type:a,opposite:y,dock:v}),w=Il({layoutService:p,seriesModel:m,rtl:g,orientation:b}),k=r.concat(n);if(!k.length)return!1;const N=E?x.implicit.bar.max:x.implicit.bar.min,T=Number(N.toFixed(13));if(!M&&o.length&&pc[`is${mc[a]}OutOfBounds`](T,x))return!1;if(!x.meta.hasExplicit&&!S.meta.hasExplicit)return!1;const O=E?"max":"min",R=Math[O](Number(x.implicit.line[O].toFixed(13)),Number(x.implicit.marker[O].toFixed(13))),A=Math[O](Number(S.implicit.line[O].toFixed(13)),Number(S.implicit.marker[O].toFixed(13))),L=k.filter((e=>e.isPrimary)),I=k.filter((e=>!e.isPrimary)),P=L.length>0,D=I.length>0,{major:q,majorNumeric:z}=h.main,$=e=>"NaN"!==e.qNum?e.qNum:0,B=p.meta.isContinuous?z:q;return{type:"data-out-of-bounds-marker",key:`${Qa.COMPONENT.DATA_OOB_MARKER}-${a}`,layout:{dock:C,minimumLayoutMode:Ml.OUT_OF_BOUNDS_MARKER},data:{extract:k.map((({ref:e,typeIndex:t,options:n})=>({field:q,value:p.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:B},end:{field:e,value:n.showAsZeros?$:void 0},typeIndex:t,null:{field:e,value:e=>"NaN"===e.qNum}}})))},settings:{type:a,primaryExtremum:E?()=>u.query.getMax():()=>u.query.getMin(),secondaryExtremum:E?()=>d.query.getMax():()=>d.query.getMin(),primarySeries:L,secondarySeries:I,orientation:b,rtl:g,major:{scale:Qa.SCALE.MAJOR,fn:w},markerOffset:nc({dockPosition:C,orientation:b,rtl:g})},brush:Pl({layoutService:p}),show:()=>{if(E){if(P&&R>u.query.getMax())return!0;if(D&&A>d.query.getMax())return!0}if(!E){if(P&&R<u.query.getMin())return!0;if(D&&A<d.query.getMin())return!0}return!1},style:{fill:f.getStyles().outOfRange.color}}},hc={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function gc({chart:e,models:t,viewState:n,viewCache:r,axis:o}){const i=C(),{dockService:a}=t;return({data:t})=>(({items:t})=>{const{rect:n}=e.component(`${Qa.COMPONENT.BAR}-${o}`)||{};return(!t.length||!n)&&2})(t)||(()=>{const{min:e,max:t}=n.get("zoom");return i.get([e,t])||i.empty()&&!1})()||(()=>{const e=hc[a.meta.chart.mode];return 0===Math.abs(r.get("continuousMax")-r.get("continuousMin"))&&e})()||(()=>{const{min:e,max:t}=n.get("zoom"),o=Math.abs(r.get("continuousMax")-r.get("continuousMin")),s=Math.abs(t-e),l=hc[a.meta.chart.mode],c=function(e,t,n){return e*(1-n)+t*n}(2,l,1-Math.min(s/o/.2,1));return i.set([e,t],Math.max(2,Math.min(l,c)))})()}const vc=({isContinuous:e,isBarSeriesGrouped:t,styleModel:n,discreteModel:r,isBarSeriesStackedInBothAxis:o})=>e?1:n.query.bar.getHasStyling()?n.query.bar.getHasStrokeWidth()?function(){const e=n.query.bar.getStrokeWidth()/r.query.getItemSize(),t=n.query.bar.getWidthFn()(),o=t+e;return o>1?t-(o-1):t}:n.query.bar.getWidthFn():t||o?.9:.7;function yc(e){return Math.min(Math.max(0,e),1)}const bc=({chart:e,models:t,viewState:n,viewCache:r,isPrimary:o})=>{const{layoutService:i,dockService:a,colorService:s,seriesModel:l,styleModel:c,discreteModel:u,primaryExtremumModel:d,secondaryExtremumModel:p}=t,{isContinuous:m,isBarSeriesStacked:f,isBarSeriesGrouped:h,isBarSeriesStackedInBothAxis:g}=i.meta,v=e=>e.datum.start?e.datum.start.value:e.scale.min(),y=o?ts.PRIMARY:ts.SECONDARY,b=o?Qa.SCALE.MINOR.PRIMARY:Qa.SCALE.MINOR.SECONDARY;if(!(o?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount))return!1;const x=f?{scale:b,start:{ref:"start",fn:e=>{const t=v(e);return yc(e.scale(t))}},end:{ref:"end",fn:e=>{const t=(e=>e.datum.end?e.datum.end.value:v(e))(e);return yc(e.scale(t))}}}:{scale:b,start:{ref:"start",fn:e=>{const t=v(e);return yc(e.scale(t))}},end:{ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?v(e):e.datum.end.value;return yc(e.scale(n))}}},S=(o?d:p).query.getExtrema(),E=f?({start:e,end:t})=>sc(e.value,t.value,S):({end:e})=>uc(e.value,S);return{type:"box",key:`${Qa.COMPONENT.BAR}-${y}`,data:{filter:(()=>{if(f)return;const e=l.query.series(es.BAR).filter((e=>e.isPrimary===o)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:f?o?Qa.COLLECTION.STACKED_PRIMARY:Qa.COLLECTION.STACKED_SECONDARY:o?Qa.COLLECTION.PRIMARY:Qa.COLLECTION.SECONDARY},preferredSize:m?()=>({size:0,edgeBleed:{left:1,right:1}}):void 0,settings:{orientation:a.meta.minor.orientation,major:{scale:Qa.SCALE.MAJOR,fn:Ll({layoutService:i,axis:y}),ref:m?{start:"major",end:"major"}:void 0},minor:x,box:{width:vc({isContinuous:m,isBarSeriesGrouped:h,styleModel:c,discreteModel:u,isBarSeriesStackedInBothAxis:g}),minWidthPx:m?gc({chart:e,models:t,viewState:n,viewCache:r,axis:y}):void 0,fill:s.getColor(),strokeWidth:c.query.bar.getStrokeWidth(),stroke:c.query.bar.getStrokeColor(),minHeightPx:.3,opacity:e=>{var t,n;return!0===(null===(t=e.datum)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)||E(e.datum)?0:1}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},brush:Pl({layoutService:i,active:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||E(e.data)?0:1}},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||E(e.data)?0:kl}}})}},xc=({chart:e,models:t,viewState:n,viewCache:r,isPrimary:o})=>{const{layoutService:i,dockService:a,colorService:s,seriesModel:l,styleModel:c,discreteModel:u}=t,{isBarSeriesStacked:d,isContinuous:p,isBarSeriesGrouped:m,isBarSeriesStackedInBothAxis:f}=i.meta,h=o?ts.PRIMARY:ts.SECONDARY,g=o?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount;if(!d||0===g)return!1;return{key:`${Qa.COMPONENT.STACK_BAR}-${h}`,type:"box",data:{collection:o?Qa.COLLECTION.STACKED_TOTAL_PRIMARY:Qa.COLLECTION.STACKED_TOTAL_SECONDARY},settings:{major:{scale:Qa.SCALE.MAJOR,fn:Ll({layoutService:i,axis:h}),ref:p?{start:"timeStart",end:"timeEnd"}:void 0},minor:{scale:o?Qa.SCALE.MINOR.PRIMARY:Qa.SCALE.MINOR.SECONDARY,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:a.meta.minor.orientation,box:{width:vc({isContinuous:p,isBarSeriesGrouped:m,styleModel:c,discreteModel:u,isBarSeriesStackedInBothAxis:f}),minWidthPx:p?gc({chart:e,models:t,viewState:n,viewCache:r,axis:h}):2,opacity:0,fill:s.getColor()},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function Sc(e,t){const n="horizontal"===e.dockService.meta.major.orientation,{style:r}=t,o=e.styleModel.query.bar.label.getStyle(),i=o.fill===r.color;return{placements:t.simplifiedPlacements.map((e=>function({simplifiedPlacement:e,fill:t,isHorizontal:n}){const r=e.padding||{left:n?0:4,right:n?0:4,top:n?4:0,bottom:n?4:0};return{position:e.position,justify:e.justify,fill:t,overflow:e.overflow,background:e.background,padding:r}}({simplifiedPlacement:e,fill:i&&!e.onBackground?function({style:e,simplifiedPlacement:t}){return n=>At.isDark(t.background?t.background.fill:n.node.attrs.fill)?e.lightColor:e.darkColor}({style:r,simplifiedPlacement:e}):o.fill,isHorizontal:n}))),label:t.label}}function Ec(e,t,n,r){const o=function(e,t){return function(e,t){if(t&&0===e){const{min:e,max:n}=t;return 0===n&&0===e?1:n<=0?-1:e>=0||n>=-e?1:-1}return e>=0?1:-1}(e,t)}(e,r);let i="up";return"vertical"===t&&o<0?i="down":"horizontal"===t&&(i=o>=0&&!n||o<0&&n?"right":"left"),i}const Mc=(e,t)=>{if(!e)return!1;const{isBarSeriesStacked:n,isContinuous:r}=t;return!n||!r},Cc=(e,t)=>{if(!e)return!1;const{isBarSeriesStacked:n,isContinuous:r}=t;return!!n&&(!!r||!1!==e)};function wc(e,t,n,r){const o=[];return void 0!==e&&(o[e]={position:"outside",onBackground:!0,justify:0,overflow:r}),void 0!==t&&(o[t]={position:"inside",onBackground:!1,justify:n}),o}const kc=({models:e,environment:t,isPrimary:n})=>{const{layoutService:r,seriesModel:o,styleModel:i,themeService:a}=e,{meta:s}=r,l="rtl"===t.options.direction,c=a.getStyles(),u=i.query.bar.label.getStyle(),d=e.layoutService.getLayoutValue("dataPoint.showBarLabels",!1),p=n?ts.PRIMARY:ts.SECONDARY;if(!(n?o.meta.primaryBarSeriesCount:o.meta.secondaryBarSeriesCount)||!Mc(d,s))return!1;let m;!s.isBarSeriesStacked&&(m=s.isBarSeriesStacked?1:0);const f={label:e=>Ql(e.data,e),simplifiedPlacements:wc(m,0===m?1:0,s.isBarSeriesStacked?.5:1,s.isContinuous),style:c.label.value},h=[Sc(e,f)],g=[{component:`${Qa.COMPONENT.BAR}-${p}`,selector:"rect",strategy:{type:"bar",settings:{direction:t=>Ec(t.data.end.value,e.dockService.meta.minor.orientation,l,0),labels:h,fontSize:parseInt(u.fontSize,10),fontFamily:u.fontFamily}}}];return{type:"labels",key:`${Qa.COMPONENT.BAR_LABEL}-${p}`,layout:{minimumLayoutMode:Ml.VALUE_LABEL},settings:{sources:g}}};function Nc(e,t,n){const r=[{position:e,onBackground:!0,justify:0,overflow:n}];return t&&r.push({position:"inside",onBackground:!1,justify:"outside"===e?1:0,background:{fill:"#cce6e6e6",padding:{left:2,right:2,top:2,bottom:2}}}),r}function Tc({chart:e,models:t,environment:n,isPrimary:r}){const{meta:o}=t.layoutService,i="rtl"===n.options.direction,a=t.themeService.getStyles(),s=t.styleModel.query.bar.label.getStyle(),l=t.layoutService.getLayoutValue("dataPoint.showBarLabels",!1),c=r?ts.PRIMARY:ts.SECONDARY;if(0===(r?t.seriesModel.meta.primaryBarSeriesCount:t.seriesModel.meta.secondaryBarSeriesCount)||!Cc(l,o))return!1;const u=e.formatter(r?Qa.FORMATTER.PRIMARY:Qa.FORMATTER.SECONDARY)||(e=>e),d=e=>0===e?"":u(e),p={label:e=>d(e.data.sumOfPositives.value),simplifiedPlacements:Nc("outside",true,o.isContinuous),style:a.label.value},m={label:e=>d(e.data.sumOfNegatives.value),simplifiedPlacements:Nc("opposite",true,o.isContinuous),style:a.label.value},f=[Sc(t,p),Sc(t,m)];return{type:"labels",key:`${Qa.COMPONENT.STACK_BAR_LABEL}-${c}`,layout:{displayOrder:2,minimumLayoutMode:Ml.VALUE_LABEL},settings:{sources:[{component:`${Qa.COMPONENT.STACK_BAR}-${c}`,selector:"rect",strategy:{type:"bar",settings:{direction:e=>Ec(e.data.sumOfPositives.value,t.dockService.meta.minor.orientation,i),labels:f,fontSize:parseInt(s.fontSize,10),fontFamily:s.fontFamily}}}]}}}var Oc=Object.freeze({__proto__:null,hasMaxHat:function(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r&&r>0},hasMinHat:function(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r&&r<0}});const Rc={min:"Min",max:"Max"};function Ac({chart:e,models:t,type:n,viewCache:r,viewState:o,isPrimary:i}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,styleModel:u,discreteModel:d}=t,{isBarSeriesStacked:p,isContinuous:m,isBarSeriesGrouped:f,isBarSeriesStackedInBothAxis:h}=a.meta,g=p?xc({chart:e,models:t,viewCache:r,viewState:o,isPrimary:i}):bc({chart:e,models:t,viewCache:r,viewState:o,isPrimary:i}),v=i?l.query.getExtrema():c.query.getExtrema(),y=n===Dl,b=i?ts.PRIMARY:ts.SECONDARY;if(!g)return!1;if(function(e,t){return!e.meta["hasExplicit"+Rc[t]]}(v,n)||function(e,t,n){const r=n?e.implicit.bar.max:e.implicit.bar.min,o=Number(r.toFixed(13));return!Oc[`has${Rc[t]}Hat`](o,e)}(v,n,y)||function(e,t,n){const r=n?e=>e<0:e=>e>0;return e.meta["hasExplicit"+Rc[t]]&&r(e.explicit[t])}(v,n,y))return!1;let x="end";p&&(x=y?"sumOfPositives":"sumOfNegatives");const S=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>e.scale(i?Qa.SCALE.MINOR.PRIMARY:Qa.SCALE.MINOR.SECONDARY)[n]()));const E=(({chart:e,type:t,isPrimary:n,dock:r})=>{let o=r;const i=e.component(`${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.PRIMARY}`),a=e.component(`${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.SECONDARY}`);return i&&a&&(o=n?r:`@${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.PRIMARY}`),o})({chart:e,type:n,isPrimary:i,dock:y?s.meta.minor.end:s.meta.minor.start});return{type:"box-sliced-hat",key:`${Qa.COMPONENT.SLICED_HAT}-${n}-${b}`,layout:{dock:E},data:g.data,settings:{orientation:g.settings.orientation,major:g.settings.major,minor:g.settings.minor,hat:Q({},g.settings.box,{fill:p?"#999":g.settings.box.fill,alignment:1,opacity:1,show:function(e){const t=S(),n=function(e){if("number"!=typeof e)return e;const t=Math.round(e);return Math.abs(e-t)<1e-12?t:e}(e.datum[x].value);return y?n>t:n<t},width:vc({isContinuous:m,isBarSeriesGrouped:f,styleModel:u,discreteModel:d,isBarSeriesStackedInBothAxis:h}),strokeWidth:u.query.bar.getStrokeWidth(),stroke:u.query.bar.getStrokeColor()})},brush:Pl({layoutService:a})}}const Lc={min:"Min",max:"Max"},Ic={sumOfPositives:"sumOfNegatives",sumOfNegatives:"sumOfPositives"};function Pc({chart:e,models:t,type:n,viewCache:r,viewState:o,isPrimary:i}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:c,themeService:u}=t,{end:d,start:p}=s.meta.minor,{isBarSeriesStacked:m}=a.meta,f=m?xc({chart:e,models:t,viewCache:r,viewState:o,isPrimary:i}):bc({chart:e,models:t,viewCache:r,viewState:o,isPrimary:i}),h=i?l.query.getExtrema():c.query.getExtrema(),g=n===Dl?h.implicit.bar.max:h.implicit.bar.min,v=Number(g.toFixed(13)),y=i?ts.PRIMARY:ts.SECONDARY;if(!f)return!1;if(!pc[`is${Lc[n]}OutOfBounds`](v,h))return!1;const b=(({chart:e,type:t,end:n,start:r,isPrimary:o})=>{let i=t===Dl?n:r;const a=e.component(Qa.COMPONENT.LABEL_SPACE),s=e.component(`${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.PRIMARY}`),l=e.component(`${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.SECONDARY}`),c=e.component(`${Qa.COMPONENT.BAR_OOB}-${t}-${ts.PRIMARY}`),u=e.component(`${Qa.COMPONENT.BAR_OOB}-${t}-${ts.SECONDARY}`);return s?i=`@${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.PRIMARY}`:l?i=`@${Qa.COMPONENT.SLICED_HAT}-${t}-${ts.SECONDARY}`:c&&u&&!o?i=`@${Qa.COMPONENT.BAR_OOB}-${t}-${ts.PRIMARY}`:a&&t===Dl&&(i="@"+Qa.COMPONENT.LABEL_SPACE),i})({chart:e,type:n,end:d,start:p,isPrimary:i});let x="end";m&&(x=n===Dl?"sumOfPositives":"sumOfNegatives");return{type:"box-out-of-bounds",key:`${Qa.COMPONENT.BAR_OOB}-${n}-${y}`,layout:{dock:b},data:f.data,settings:{orientation:f.settings.orientation,major:f.settings.major,minor:f.settings.minor,dockValue:ge.getDockValue(n===Dl?d:p),oob:Q({},f.settings.box,{fill:u.getStyles().outOfRange.color,alignment:1,opacity:1,show:function(e){var t;if(!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value))return!1;const r=m&&0===e.datum[x].value,o=pc[`is${Lc[n]}OutOfBounds`](e.datum[x].value,h,n);return(!r||function({type:e,item:t,prop:n,extrema:r}){const o=t.datum[Ic[n]].value;return 0!==o&&pc[`is${Lc[e]}OutOfBounds`](o,r,e)}({type:n,item:e,prop:x,extrema:h}))&&o}})},brush:Pl({layoutService:a})}}function Dc(e){return Math.min(Math.max(0,e),1)}const qc=({chart:e,models:t,type:n,isPrimary:r})=>{const{discreteModel:o,styleModel:i,seriesModel:a,layoutService:s}=t;if(!(r?a.meta.primaryBarSeriesCount:a.meta.secondaryBarSeriesCount))return!1;const{isBarSeriesStacked:l,isContinuous:c,isBarSeriesGrouped:u,isBarSeriesStackedInBothAxis:d}=s.meta,p=e.scale(r?Qa.SCALE.MINOR.PRIMARY:Qa.SCALE.MINOR.SECONDARY),m=r?ts.PRIMARY:ts.SECONDARY,f=r?t.primaryExtremumModel.query.getExtrema():t.secondaryExtremumModel.query.getExtrema(),h=n===Dl;if(!dc({extrema:f,type:n}))return!1;const g=e=>e.datum.start?e.datum.start.value:e.scale.min(),v=(e,t="end")=>e.datum[t]?e.datum[t].value:g(e);return{type:"box",key:`${Qa.COMPONENT.GHOST_BAR_OOB}-${n}-${m}`,data:{filter:(()=>{if(l)return;const e=a.query.series(es.BAR).filter((e=>e.isPrimary===r)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:l?r?Qa.COLLECTION.STACKED_TOTAL_PRIMARY:Qa.COLLECTION.STACKED_TOTAL_SECONDARY:r?Qa.COLLECTION.PRIMARY:Qa.COLLECTION.SECONDARY},settings:{orientation:t.dockService.meta.minor.orientation,major:{scale:Qa.SCALE.MAJOR,fn:Ll({layoutService:s,axis:m}),ref:c?{start:"major",end:"major"}:void 0},minor:{scale:r?Qa.SCALE.MINOR.PRIMARY:Qa.SCALE.MINOR.SECONDARY,start:{ref:"start",fn:e=>{const t=g(e);return Dc(e.scale(t))}},end:l?"max"===n?{ref:"sumOfPositives",fn:e=>{const t=v(e,"sumOfPositives");return Dc(e.scale(t))}}:{ref:"sumOfNegatives",fn:e=>{const t=v(e,"sumOfNegatives");return Dc(e.scale(t))}}:{ref:"end",fn:e=>{const t=v(e);return Dc(e.scale(t))}}},box:{width:vc({isContinuous:c,isBarSeriesGrouped:u,styleModel:i,discreteModel:o,isBarSeriesStackedInBothAxis:d}),stroke:"transparent",fill:"none",opacity:0,show:e=>{let t="end";l&&(t=h?"sumOfPositives":"sumOfNegatives");const n=e.datum[t]?e.datum[t].value:p.max();return h?n>p.max():n<p.min()}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function zc(e,t,n,r,o){const i=[{position:e,justify:0,overflow:n,background:{padding:{left:1,right:1,top:1,bottom:1}}}];return t&&i.push({position:"inside",onBackground:!1,justify:r||o?0:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),i}const $c=({chart:e,models:t,type:n,environment:r,isPrimary:o})=>{const{layoutService:i,dockService:a,primaryExtremumModel:s,secondaryExtremumModel:l,styleModel:c,seriesModel:u,themeService:d}=t,p=d.getStyles(),m=c.query.bar.label.getStyle(),{meta:f}=i,{isBarSeriesStacked:h}=f,g=e.formatter(o?Qa.FORMATTER.PRIMARY:Qa.FORMATTER.SECONDARY),v=i.getLayoutValue("dataPoint.showBarLabels",!1),y="horizontal"===a.meta.major.orientation,b="rtl"===r.options.direction;if(!(o?u.meta.primaryBarSeriesCount:u.meta.secondaryBarSeriesCount)||!h&&!Mc(v,f)||h&&!Cc(v,f))return!1;const x=o?s.query.getExtrema():l.query.getExtrema();if(!x.meta.hasExplicit)return!1;const S=n===Dl?x.implicit.bar.max:x.implicit.bar.min;if(!(n===Dl?lc(S,x):cc(S,x)))return!1;let E=e=>Ql(e.data,e);f.isBarSeriesStacked&&(E=n===Dl?function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(lc(e.data.sumOfPositives.value,x)){const t=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value;return g?g(t):t}return""}:function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(cc(e.data.sumOfNegatives.value,x)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value;return g?g(t):t}return""});const M={label:E,simplifiedPlacements:zc("outside",true,f.isContinuous,y,b),style:p.label.value},C={label:E,simplifiedPlacements:zc("opposite",true,f.isContinuous,y,b),style:p.label.value},w=[Sc(t,M),Sc(t,C)],k=o?ts.PRIMARY:ts.SECONDARY,N="horizontal"===a.meta.major.orientation?"down":"right",T=[{component:`${Qa.COMPONENT.GHOST_BAR_OOB}-${n}-${k}`,selector:"rect",strategy:{type:"bar",settings:{direction:N,labels:w,fontSize:parseInt(m.fontSize,10),fontFamily:m.fontFamily}}}];return{key:`${Qa.COMPONENT.BAR_OOB_LABEL}-${n}-${k}`,type:"labels",layout:{minimumLayoutMode:Ml.VALUE_LABEL},settings:{sources:T}}},Bc=({chart:e,models:t,viewState:n,viewCache:r})=>[bc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),bc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],Fc=({chart:e,models:t,viewState:n,viewCache:r})=>[xc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),xc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],Hc=({chart:e,models:t,environment:n})=>{const{isBarSeriesStacked:r}=t.layoutService.meta;if(r){return[Tc({chart:e,models:t,environment:n,isPrimary:!0}),Tc({chart:e,models:t,environment:n,isPrimary:!1})]}return[kc({models:t,environment:n,isPrimary:!0}),kc({models:t,environment:n,isPrimary:!1})]},jc=({chart:e,models:t,viewCache:n,viewState:r})=>[Ac({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),Ac({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),Ac({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),Ac({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],Vc=({chart:e,models:t,viewCache:n,viewState:r})=>[Pc({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),Pc({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),Pc({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),Pc({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],Wc=({chart:e,models:t})=>[qc({chart:e,models:t,type:"max",isPrimary:!0}),qc({chart:e,models:t,type:"min",isPrimary:!0}),qc({chart:e,models:t,type:"max",isPrimary:!1}),qc({chart:e,models:t,type:"min",isPrimary:!1})],_c=({chart:e,models:t,environment:n})=>[$c({chart:e,models:t,type:"max",environment:n,isPrimary:!0}),$c({chart:e,models:t,type:"min",environment:n,isPrimary:!0}),$c({chart:e,models:t,type:"max",environment:n,isPrimary:!1}),$c({chart:e,models:t,type:"min",environment:n,isPrimary:!1})],Uc=({chart:e,environment:t,models:n,viewState:r,viewCache:o})=>{const{seriesModel:i}=n,a=i.query.series(es.BAR).slice(-1),s=i.query.series(es.LINE),l=i.query.series(es.MARKER);return[...Bc({chart:e,models:n,viewState:r,viewCache:o}),...Fc({chart:e,models:n,viewState:r,viewCache:o}),...s.map((e=>Yl({models:n,environment:t,series:e}))),...s.map((e=>Zl({models:n,series:e,environment:t}))),...l.map((r=>Wl({chart:e,models:n,series:r,environment:t}))),...s.map((r=>ec({chart:e,models:n,environment:t,series:r,lineSeries:s}))),...Hc({chart:e,models:n,environment:t}),...jc({chart:e,models:n,viewCache:o,viewState:r}),...Vc({chart:e,models:n,viewCache:o,viewState:r}),...Wc({chart:e,models:n}),..._c({chart:e,models:n,environment:t}),fc({chart:e,models:n,markerSeries:l,lineSeries:s,barSeries:a,environment:t,type:"max"}),fc({chart:e,models:n,markerSeries:l,lineSeries:s,barSeries:a,environment:t,type:"min"}),rc({chart:e,models:n,environment:t,lineSeries:s})]},Yc=0,Gc=1,Kc=3;function Xc({models:e}){const{dockService:t,seriesModel:n,layoutService:r,themeService:o}=e,{auto:i,spacing:a}=r.getLayoutValue("gridLine",{});if(!i&&a===Yc)return!1;const s=o.getStyles(),l=n.meta.primarySeries.length>0;return{key:Qa.COMPONENT.GRID_LINE,type:"grid-line",layout:{minimumLayoutMode:Ml.GRID_LINE},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!(!i&&a===Gc)||((e,t)=>t%2==0),stroke:s.grid.line.major.color},minorTicks:{show:!i&&a===Kc,stroke:s.grid.line.minor.color},["horizontal"===t.meta.major.orientation?"y":"x"]:l?Qa.SCALE.MINOR.PRIMARY:Qa.SCALE.MINOR.SECONDARY}}function Jc({models:e}){const{primaryExtremumModel:t,primaryTickModel:n,themeService:r,dockService:o,seriesModel:i}=e,a=t.query.getExtrema();return!!(i.meta.primarySeries.length>0&&a.meta.includesZero)&&{key:Qa.COMPONENT.ZERO_LINE,type:"ref-line",layout:{minimumLayoutMode:Ml.GRID_LINE},show:()=>n.query.getMin()<=0&&n.query.getMax()>=0,lines:{["horizontal"===o.meta.minor.orientation?"x":"y"]:[{value:0,scale:Qa.SCALE.MINOR.PRIMARY,line:{stroke:r.getStyles().grid.line.highContrast.color}}]}}}function Zc({models:e}){const{layoutService:t,themeService:n}=e,{isContinuous:r,isTime:o}=t.meta;if(!r)return[];const i=n.getStyles(),a={type:"grid-line",layout:{minimumLayoutMode:Ml.GRID_LINE},ticks:{stroke:i.grid.line.major.color},minorTicks:{show:!1,stroke:i.grid.line.minor.color}};return o?[Q(!0,{},a,{key:"time-inner-grid",x:{scale:Qa.SCALE.MAJOR_INNER},ticks:{stroke:i.grid.line.minor.color}}),Q(!0,{},a,{key:"time-outer-grid",x:{scale:Qa.SCALE.MAJOR}})]:[Q(!0,{},a,{key:"continuous-grid",x:{scale:Qa.SCALE.MAJOR},minorTicks:{show:!0}})]}function Qc({models:e}){return[Xc({models:e}),Jc({models:e}),...Zc({models:e})]}function eu({models:e,environment:t,actions:n}){const{layoutService:r,dockService:o,propertiesModel:i,appModel:a,genericObjectModel:s,styleModel:l}=e,c=i.query.getProperties(),u=r.getLayoutValue("dimensionAxis");if(!u)return!1;const{show:d}=u;if("all"!==d&&"title"!==d)return!1;const{orientation:p}=o.meta.major,m=l.query.axis.title.getStyle();return{type:"data-title",key:Qa.COMPONENT.AXIS_TITLE.MAJOR,layout:{dock:o.meta.major.dock,minimumLayoutMode:Ml.AXIS_TITLE.MAJOR[p.toUpperCase()]},settings:{hyperCube:r.getHyperCube(),hyperCubeDef:c&&c.qHyperCubeDef,isDimension:!0,disabled:()=>!n.interact.enabled(),model:s,app:a,translator:t.translator,rtl:"rtl"===t.options.direction,selections:void 0},style:{fontFamily:m.fontFamily,fontSize:m.fontSize,color:m.color}}}const tu=(e,t,n)=>e.query.seriesByAxis(n).map((e=>({...t[e.refIndex],explicitColumn:e.refIndex})));function nu({models:e,environment:t,actions:n}){const{layoutService:r,dockService:o,seriesModel:i,propertiesModel:a,appModel:s,genericObjectModel:l,styleModel:c}=e,u=a.query.getProperties(),d=r.getLayoutValue("measureAxes");if(!d||!d.length)return[];const p=c.query.axis.title.getStyle(),{measureAxes:m}=i.meta;return m.filter((e=>e.isPrimary?"all"===d[0].show||"title"===d[0].show:"all"===d[1].show||"title"===d[1].show)).map((e=>{const a=r.getHyperCube(),{isPrimary:c}=e,d=i.query.seriesByAxis(c).length>1,m={type:"data-title",key:c?Qa.COMPONENT.AXIS_TITLE.MINOR.PRIMARY:Qa.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,layout:{dock:c?o.meta.minor.dock:o.meta.minorSecondary.dock,minimumLayoutMode:Ml.AXIS_TITLE.MINOR},settings:{hyperCube:a,hyperCubeDef:u&&u.qHyperCubeDef,isDimension:!1,explicitItemInfos:tu(i,a.qMeasureInfo,c),onChangeToAlternative:({oldItem:e,newItem:t})=>{t.qDef.series=e.qDef.series;const n=e.qAttributeExpressions.findIndex((e=>"colorByExpression"===e.id));if(-1!==n){const r=e.qAttributeExpressions.splice(n,1)[0];t.qAttributeExpressions.unshift(r)}},disabled:()=>!n.interact.enabled(),model:l,app:s,translator:t.translator,rtl:"rtl"===t.options.direction,selections:void 0,skipAttributeExpressions:!0},style:{fontFamily:p.fontFamily,fontSize:p.fontSize,color:p.color}};return d&&(m.settings.padding="0",m.settings.minWidth="auto"),m}))}function ru({models:e,environment:t,actions:n}){return[eu({models:e,environment:t,actions:n}),...nu({models:e,environment:t,actions:n})]}function ou({models:e,environment:t,viewState:n,viewCache:r}){const{discreteModel:o,layoutService:i,dockService:a,continuousModel:s,themeService:l}=e,{isSnapshot:c,isDiscrete:u,isContinuous:d}=i.meta,p="rtl"===t.options.direction;return!(c&&!d)&&function({layoutService:e,dockService:t,discrete:n,continuousDataModel:r,viewState:o,viewCache:i,themeService:a,rtl:s,scrollbarOverride:l,visualizeCache:c=!1,deviceType:u}){const d=As({layoutService:e,override:l});if(d.none)return!1;const{orientation:p}=t.meta.major,m={key:"scrollbar",type:"scrollbar",layout:{dock:"horizontal"===p?t.meta.minor.start:t.meta.minor.end,minimumLayoutMode:"XSMALL"},show:()=>e.meta.isContinuous?r.getDimensionCardinality()>1:n.query.getCanScroll(),settings:{orientation:p,rtl:s,isContinuous:e.meta.isContinuous,range:()=>Os({layoutService:e,viewState:o,viewCache:i})}};d.bar&&(m.settings.style="slim",m.settings.size={area:"touch"===u?{max:16,min:16}:{max:8,min:8}},e.meta.isContinuous||(m.settings.size.thumb={min:4}));const f=a.getStyles();return f.color&&(m.style={standard:{thumb:{"border-color":f.color,opacity:.4},before:{background:f.color,opacity:.1},after:{background:f.color,opacity:.1}}}),e.meta.isDiscrete&&c&&(m.settings.injections=()=>[Ts({layoutService:e,discrete:n})]),m}({viewState:n,viewCache:r,discrete:o,continuousDataModel:s,layoutService:i,dockService:a,themeService:l,rtl:p,scrollbarOverride:{predicate:()=>u,value:Ns.OPTIONS.BAR.value},deviceType:t.deviceType})}function iu({chart:e,models:t,viewState:n,viewCache:r,isPrimary:o}){const{layoutService:i}=t,a=bc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:o});if(!a)return!1;const s=o?ts.PRIMARY:ts.SECONDARY;return a.key=`${Qa.COMPONENT.MINI_CHART.BAR}-${s}`,a.data.collection=i.meta.isBarSeriesStacked?o?Qa.COLLECTION.REDUCED_STACKED_PRIMARY:Qa.COLLECTION.REDUCED_STACKED_SECONDARY:o?Qa.COLLECTION.REDUCED_PRIMARY:Qa.COLLECTION.REDUCED_SECONDARY,a.settings.box.minWidthPx=void 0,a.settings.minor.scale=o?Qa.SCALE.MINOR.REDUCED_PRIMARY:Qa.SCALE.MINOR.REDUCED_SECONDARY,a.settings.major.scale=Qa.SCALE.REDUCED,a.layout={dock:"@scrollbar"},a}function au({environment:e,models:t}){const n=t.styleModel.query.line.getStrokeDasharrayFn();return t.seriesModel.query.series(es.LINE).map((r=>{const o=Yl({models:t,environment:e,series:r});return o.key=$l(Qa.COMPONENT.MINI_CHART.LINE,r),o.data.collection=Qa.COLLECTION.REDUCED,o.settings.coordinates.minor.scale=r.isPrimary?Qa.SCALE.MINOR.REDUCED_PRIMARY:Qa.SCALE.MINOR.REDUCED_SECONDARY,o.settings.coordinates.major.scale=Qa.SCALE.REDUCED,o.settings.layers.line.strokeWidth=1,o.settings.layers.line.strokeDasharray=(...e)=>void 0===n(...e)?void 0:"1, 1",o.layout={dock:"@scrollbar"},o}))}function su({models:e,environment:t}){return e.seriesModel.query.series(es.MARKER).map((n=>{const r=Wl({models:e,environment:t,series:n});return r.key=$l(Qa.COMPONENT.MINI_CHART.MARKER,n),r.data.collection=Qa.COLLECTION.REDUCED,r.settings.y.scale=n.isPrimary?Qa.SCALE.MINOR.REDUCED_PRIMARY:Qa.SCALE.MINOR.REDUCED_SECONDARY,r.settings.x.scale=Qa.SCALE.REDUCED,r.layout={dock:"@scrollbar"},r}))}function lu({chart:e,models:t,viewState:n,viewCache:r,environment:o}){return cl(t)?[iu({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),iu({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1}),...au({environment:o,models:t}),...su({models:t,environment:o})]:[]}function cu({models:e}){const{layoutService:t,dockService:n}=e,{isContinuous:r,isTime:o}=t.meta,i=t.getLayoutValue("dimensionAxis");if(!i||"none"===i.show||"title"===i.show)return[!1];if(!r)return[!1];const a=Ml.AXIS.MAJOR[n.meta.major.orientation.toUpperCase()];return o?[{type:"axis-overlay",key:Qa.COMPONENT.AXIS_OVERLAY.TIME_INNER,scale:Qa.SCALE.MAJOR_INNER,layout:{dock:"@"+Qa.COMPONENT.AXIS.TIME_INNER,minimumLayoutMode:a}},{type:"axis-overlay",key:Qa.COMPONENT.AXIS_OVERLAY.TIME_OUTER,scale:Qa.SCALE.MAJOR,layout:{dock:"@"+Qa.COMPONENT.AXIS.TIME_OUTER,minimumLayoutMode:a}}]:[{type:"axis-overlay",key:Qa.COMPONENT.AXIS_OVERLAY.CONTINUOUS,scale:Qa.SCALE.MAJOR,layout:{dock:"@"+Qa.COMPONENT.AXIS.MAJOR_CONTINUOUS,minimumLayoutMode:a}}]}function uu({chart:e,models:t,environment:n}){const{refLineModel:r,layoutService:o,colorService:i,dockService:a,themeService:s,appLayoutModel:l,seriesModel:c}=t,u=l.qLocaleInfo,{options:d,theme:p}=n,m="rtl"===d.direction,f=c.query.series(es.BAR).filter((e=>e.isPrimary)),h=c.query.series(es.BAR).filter((e=>!e.isPrimary)),g=c.query.series(es.LINE),v=c.query.series(es.MARKER),y=c.query.all(),b=y.some((e=>e.isPrimary)),x=y.some((e=>!e.isPrimary)),S=b&&x,E={resolveUIColor:i.getPaletteColor},M=b?Za({refLineModel:r,layoutService:o,colorModel:E,dock:S?a.meta.minor.dock:a.meta.minor.opposite,scale:Qa.SCALE.MINOR.PRIMARY,style:s.getStyles(),formatter:Qa.FORMATTER.PRIMARY,theme:p,localeInfo:u,rtl:m,key:Qa.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE_LABEL}):[],C=x?Za({refLineModel:r,layoutService:o,colorModel:E,dock:S?a.meta.minor.opposite:a.meta.minor.dock,scale:Qa.SCALE.MINOR.SECONDARY,style:s.getStyles(),formatter:Qa.FORMATTER.SECONDARY,theme:p,localeInfo:u,rtl:m,key:Qa.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE_LABEL,path:"refLine.refLines2"}):[];return[!!b&&Xa({refLineModel:r,layoutService:o,colorModel:E,dockService:a,chart:e,scale:Qa.SCALE.MINOR.PRIMARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:Qa.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE,minimumLayoutMode:Ml.REFERENCE_LINE}),!!x&&Xa({refLineModel:r,layoutService:o,colorModel:E,dockService:a,chart:e,scale:Qa.SCALE.MINOR.SECONDARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:Qa.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE,path:"refLine.refLines2",minimumLayoutMode:Ml.REFERENCE_LINE}),Xa({isDimension:!0,refLineModel:r,layoutService:o,colorModel:E,dockService:a,chart:e,scale:Qa.SCALE.MAJOR,axis:"horizontal"===a.meta.major.orientation?"x":"y",rtl:m,key:Qa.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:f.length?`${Qa.COMPONENT.BAR}-${ts.PRIMARY}`:h.length?`${Qa.COMPONENT.BAR}-${ts.SECONDARY}`:g.length?`${Qa.COMPONENT.LINE}-${g[0].id}`:v.length?`${Qa.COMPONENT.MARKER}-${v[0].id}`:`${Qa.COMPONENT.BAR}-${ts.PRIMARY}`,minimumLayoutMode:Ml.REFERENCE_LINE}),...M,...C,...Za({isDimension:!0,refLineModel:r,layoutService:o,colorModel:E,dock:a.meta.major.opposite,scale:Qa.SCALE.MAJOR,style:s.getStyles(),theme:p,localeInfo:u,rtl:m,key:Qa.COMPONENT.DIMENSION_REF_LINE_LABEL})]}function du(e){return"NaN"===e.qMin&&"NaN"===e.qMax}var pu=[{key:"NoDataExist",alignment:"center",condition:({layoutService:e})=>{const{x:t,y:n}=e.meta.size;return t*n==0}},{key:"OnlyNanData",alignment:"center",condition:({layoutService:e})=>{const{isContinuous:t}=e.meta;if(!t)return!1;const n=e.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNanData",alignment:"center",condition:({layoutService:e})=>e.getHyperCubeValue("qMeasureInfo").every(du)},{key:"DataRangeIncludingZero",alignment:"bottom",condition:({layoutService:e,primaryExtremumModel:t,secondaryExtremumModel:n,flags:r})=>{if(!1===e.getLayout().showDisclaimer&&r.isEnabled("SHOW_DISCLAIMER"))return!1;const o=e.getLayoutValue("measureAxis.logarithmic",!1),i=t.query.getExtrema(),a=n.query.getExtrema();return o&&(i.meta.includesZero||a.meta.includesZero)}}];function mu({environment:e,models:t}){const{flags:n,translator:r,options:o}=e,{layoutService:i,primaryExtremumModel:a,secondaryExtremumModel:s,themeService:l}=t,c=function({layoutService:e,primaryExtremumModel:t,secondaryExtremumModel:n,flags:r}){let o,i;for(let a=0,s=pu.length;a<s;a++){o=pu[a];try{i=o.condition({layoutService:e,primaryExtremumModel:t,secondaryExtremumModel:n,flags:r})}catch(e){throw Error("failing disclaimer condition",e)}if(i)return o}return!1}({layoutService:i,primaryExtremumModel:a,secondaryExtremumModel:s,flags:n});if(!c)return!1;const{fontFamily:u}=l.getStyles();return function(e,t,n,r={}){if(!e)return!1;const{translator:o}=t,{rtl:i}=n;return{key:"disclaimer",type:"disclaimer",layout:{dock:ne[e].alignment},settings:{label:o.get("Object.Disclaimer."+e),rtl:i},style:r}}(c.key,{translator:r},{rtl:"rtl"===o.direction},{fontFamily:u})}function fu({layoutService:e}){return!!cl({layoutService:e})&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:Qa.SCALE.REDUCED,brush:"selection",fill:"#6CB33F",opacity:.2}}}function hu(e){return(null==e?void 0:e.type)||es.BAR}function gu({models:e,environment:t}){const{layoutService:n,colorService:r,dockService:o,seriesModel:i,selectionService:a}=e,{hasLineSeries:s,isContinuous:l,hasMultipleMeasures:c,isGroupedByMeasure:u}=n.meta;if(!s)return!1;const{options:d}=t,p=n.getLayoutValue("color",{}),m=e=>e.filter((e=>hu(e)===es.LINE)).map((e=>({key:$l(Qa.COMPONENT.LINE,e),typeIndex:e.typeIndex}))),f=!p.auto&&"byMeasure"===p.mode&&p.byMeasureDef&&void 0!==p.byMeasureDef.activeMeasureIndex,h=n.getHyperCubeValue("qMeasureInfo").map((e=>{var t;return null===(t=e.color)||void 0===t?void 0:t.on}));return{type:"brush-highlighter",key:"brush-highlighter",data:{collection:Qa.COLLECTION.LINE},settings:{getSelectionInfo:()=>{var e;return(null==a||null===(e=a.getSelectionInfo)||void 0===e?void 0:e.call(a))||{}},seriesInfo:{primary:m(i.meta.primarySeries),secondary:m(i.meta.secondarySeries)},selectionValues:{"qHyperCube/qDimensionInfo/0":l?e=>e.value:e=>e.major.value,"qHyperCube/qDimensionInfo/0:numeric":e=>e.major.value,"qHyperCube/qDimensionInfo/0/qAttrExprInfo/0":e=>e.end.value,"qHyperCube/qMeasureInfo/X":e=>e.end.value},colorSettings:e=>r.getSettingsForMeasure(e),colorByData:e=>!h[e]&&f,hasMultipleMeasures:c,groupedByMeasure:u,itemsPerGroup:i.meta.barSeriesCount,orientation:o.meta.major.orientation,rtl:"rtl"===d.direction}}}function vu({models:{fieldModel:e}}){return{[Qa.FORMATTER.PRIMARY]:{data:{fields:e.main.minorsPrimary}},[Qa.FORMATTER.SECONDARY]:{data:{fields:e.main.minorsSecondary}}}}var yu={MAX_NUM_POINTS:5e4,DEFAULT_NUM_POINTS:2e3,DEFAULT_NUM_LINES:12};const{DEFAULT_NUM_POINTS:bu}=yu;function xu({layoutService:e,largeDataService:t}){const{maxNumPoints:n=bu}=(null==t?void 0:t.meta)||{},{qHyperCube:r}=e.getLayout();return r.qSize.qcy*r.qMeasureInfo.length>n}const{DEFAULT_NUM_LINES:Su}=yu,Eu=({layoutService:e,largeDataService:t})=>{const{maxNumLines:n=Su}=(null==t?void 0:t.meta)||{},{qHyperCube:r}=e.getLayout();return r.qDimensionInfo.length>1&&!xu({layoutService:e,largeDataService:t})?e.meta.size.dimensions[1]+1:n},{DEFAULT_NUM_POINTS:Mu}=yu,{MAX_NUM_POINTS:Cu,DEFAULT_NUM_POINTS:wu,DEFAULT_NUM_LINES:ku}=yu,{DEFAULT_NUM_POINTS:Nu}=yu,Tu=({layoutService:e,largeDataService:t})=>{if(!xu({layoutService:e,largeDataService:t})){const{maxNumPoints:e=Nu}=(null==t?void 0:t.meta)||{};return e}const{dimensionCount:n}=e.meta;return n>1?(({layoutService:e,largeDataService:t})=>{var n;const{dimensions:r=[]}=(null==e||null===(n=e.meta)||void 0===n?void 0:n.size)||{},{maxNumLines:o=ku,maxNumPoints:i=wu,hasInjectedData:a=!1}=(null==t?void 0:t.meta)||{};if(Eu({layoutService:e,largeDataService:t})*r[0]<=i)return r[0];const s=Math.max(1,Math.min(o,r[1])),l=i/s,c=Math.floor(r[0]<=l?l:l/4),u=2*s*(s+1);return a&&(s>ku||i>wu)?Math.min(c,Math.ceil(Cu/u)):c})({layoutService:e,largeDataService:t}):(({layoutService:e,largeDataService:t})=>{const{maxNumPoints:n=Mu}=(null==t?void 0:t.meta)||{},{measureCount:r=1}=(null==e?void 0:e.meta)||{},o=4+2*(r-1);return Math.floor(n/(r*o))})({layoutService:e,largeDataService:t})};function Ou({model:e,layoutService:t,largeDataService:n,definitionPath:r="/qHyperCubeDef"}){return{shouldFetchReduced:()=>xu({layoutService:t,largeDataService:n}),computeNbrOfBins:()=>Tu({layoutService:t,largeDataService:n}),computeMaxNumberLines:()=>Eu({layoutService:t,largeDataService:n}),fetch:(o,i)=>(({start:e,end:t,model:n,layoutService:r,largeDataService:o,definitionPath:i})=>{const a={qStart:e,qEnd:t,qNbrPoints:Tu({layoutService:r,largeDataService:o}),qMaxNbrTicks:300,qMaxNumberLines:Eu({layoutService:r,largeDataService:o})};return n.getHyperCubeContinuousData(i,a,!1)})({start:o,end:i,model:e,layoutService:t,largeDataService:n,definitionPath:r})}}function Ru(e={}){const{cache:t={}}=e;return{fetch:()=>Promise.resolve(t.merged)}}function Au({layoutService:e,viewCache:t}){return{fetch:()=>{const{qAxisData:t,qDataPages:n}=e.getHyperCube();return Promise.resolve({qAxisData:t,qDataPages:n})},getSnapshotData(){const n=e.getLayoutValue("snapshotData.content.chartData",{});return"zoom"in n&&"min"in n.zoom&&"max"in n.zoom?function({zoom:e}){return{zoom:e}}(n):function({scrollOffset:e=0,viewRange:t=0},n){let r=n+e,o=r+t;return 1===t&&0===e&&(r=n-.5,o=n+.5),{zoom:{min:r,max:o}}}(n,t.get("continuousMin"))}}}function Lu(){const e=()=>{},t=[],n={};return e.set=(e,r)=>{const o=t.indexOf(e);o>-1&&t.splice(o,1),t.push(e),n[e]=r},e.forEach=e=>{t.forEach(((t,r)=>e(n[t],r)))},e.has=e=>e in n,e}function Iu(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function({start:e,end:t,matrix:n}){const r=[],o=Lu(),i=Lu();for(let a=0;a<n.length;a++){const s=n[a],l=s[1].qElemNumber.toString();s[0].qNum<e?o.set(l,s):s[0].qNum>t&&(i.has(l)||i.set(l,s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return o.forEach(((e,t)=>r.splice(t,0,e))),i.forEach((e=>r.push(e))),r}({start:e,end:t,matrix:n}):function({start:e,end:t,matrix:n}){const r=[];let o,i;for(let a=0;a<n.length;a++){const s=n[a];s[0].qNum<e?o=s:s[0].qNum>t&&(i||(i=s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return o&&r.unshift(o),i&&r.push(i),r}({start:e,end:t,matrix:n})}function Pu(e,t){return{...e,qWidth:t[0]?t[0].length:0,qHeight:t.length}}function Du(e,t,n){const r={qDataPages:(n.qDataPages||[]).map((n=>{const r=Iu(e,t,n.qMatrix),o=Pu(n.qArea,r);return{...n,qArea:o,qMatrix:r}}))};return n.qAxisData&&n.qAxisData.qAxis&&(r.qAxisData=function(e,t,n){return{qAxis:n.qAxis.map((n=>({qName:n.qName,qTags:n.qTags,qTicks:n.qTicks.reduce(((n,r)=>((r.qStart>=e&&r.qStart<=t||r.qEnd>=e&&r.qEnd<=t||r.qStart<e&&r.qEnd>t)&&n.push(r),n)),[])})))}}(e,t,n.qAxisData)),r}const qu=2**.5,zu=1/qu;function $u(e){return e.qIsOtherCell}function Bu({qDataPages:e=[]}={},t={}){const n=e.length?e[0].qMatrix:[];return t.isStackedByDimension?function(e){const t={};return e.forEach((e=>{if(!e.some($u)){const n=e[0].qElemNumber;t[n]=void 0}})),Object.keys(t).length}(n):function(e){let t=0;return e.forEach((e=>{e.some($u)||t++})),t}(n)}const Fu={query:{getShouldProcess:()=>!1},command:{processDataPage:()=>{}}};var Hu={created(){this.state={}},beforeUpdate(){this.state={}},beforeRender({size:e}){this.state.ticks=this.scale.ticks({distance:e.width}).filter((e=>!e.isMinor)),"linear"===this.scale.type&&function(e,t){const[,n]=e.domain();for(let e=0;e<t.length;e++){const r=t[e],o=t[e+1];r.data={},o||1===r.end?o?(r.data.start=r.value,r.data.end=o.value,r.end=o.position):(r.data.start=r.value,r.data.end=r.value):(r.data.start=r.value,r.data.end=n,r.end=1)}}(this.scale,this.state.ticks)},render(){const e=this.scale.data().fields.length?this.scale.data().fields[0].id():"",{ticks:t}=this.state,n=t.map((t=>({type:"rect",fill:"none",data:{source:{field:e},value:[t.data.start,t.data.end]},x:t.start*this.rect.width,y:0,width:(t.end-t.start)*this.rect.width,height:this.rect.height})));if(t.length&&t[0].start>0){const r=t[0];n.unshift({type:"rect",fill:"none",data:{source:{field:e},value:[this.scale.domain()[0],r.data.start]},x:0,y:0,width:r.start*this.rect.width,height:this.rect.height})}return n}};function ju(e,t=1){if(t%2==0)return e;let n=Math.round(e);return e-n>0?n+=.5:n-=.5,n}function Vu(e,t){const{localProps:{size:n},props:{anchor:r}}=t,o=function({props:e,localProps:{size:t},style:n,renderer:r}){const o=e.label.padding,i=Math.max(0,Math.min(e.label.justify,1)),a=Math.max(0,Math.min(e.label.align,1)),s=e=>r.measureText({text:e,fontSize:n.label.fontSize,fontFamily:n.label.fontFamily});return{resolve:(e,r)=>{const l="string"==typeof e.label?e.label:"",c=s(l);let{x:u,width:d}=r;e.start===e.end&&(d=c.width+2*o,1===e.end&&(u-=d));const p={x:u+o,y:o,width:d-2*o,height:t.height-2*o},m=s(l[0]+"…").width,f=Math.max(0,p.width-c.width),h=Math.max(0,p.height-c.height),g=i*f,v=a*h;return{show:p.width>=Math.min(m,c.width),text:l,dx:g,dy:v,rect:p,style:n.label,segment:{x:u+g,width:c.width+2*o},tickValue:e.value}}}}(t),i=function({localProps:{size:e},style:t,scale:n,props:r}){const[o,i]=n.domain(),a=Math.max(0,Math.min(1,r.guideLine.major.justify));return{resolve:(n,r)=>{const s=a*r.width,l=ju(r.x+s,t.majorGuideLine.strokeWidth);return{show:n.value>=o&&n.value<=i,x1:l,y1:0,x2:l,y2:ju(e.height,t.majorGuideLine.strokeWidth),style:t.majorGuideLine,tickValue:n.value}}}}(t),a=e.map((e=>{const t=function(e,t,n){const r=Math.abs(Math.max(e.start,0)-Math.min(e.end,1))*t.width;return{x:Math.max(e[n],0)*t.width,y:0,width:r,height:t.height}}(e,n,r);return{rect:t,label:o.resolve(e,t),guideLine:i.resolve(e,t)}}));return function(e,t){const n=e.length;if(n<2)return;const r=e[n-1],o=t[n-1].label;if(r&&r.start===r.end)for(let e=n-2;e>-1;e--){const n=t[e].label;n.show=n.show&&(i=n.segment,a=o.segment,!(i.x<a.x?i.x+i.width>=a.x:a.x+a.width>=i.x))}var i,a}(e,a),a}function Wu(e,t){const n=function({localProps:{size:e},props:t,style:n}){return{resolve:r=>{const o=Math.max(e.height-t.guideLine.minor.size,0)*Math.max(0,Math.min(t.guideLine.minor.align,1)),i=ju(r.position*e.width,n.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:i,y1:ju(o,n.minorGuideLine.strokeWidth),x2:i,y2:ju(t.guideLine.minor.size+o,n.minorGuideLine.strokeWidth),style:n.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function _u(e){return e.filter((e=>e.show)).map((e=>Q({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,tickValue:e.tickValue})))}var Uu={require:["renderer"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{anchor:"start",label:{show:!0,padding:4,align:0,justify:0},line:{show:!0},guideLine:{major:{justify:0},minor:{show:!0,size:4,align:0}}},style:{label:"$label",line:"$guide-line",majorGuideLine:"$guide-line",minorGuideLine:"$guide-line"}},preferredSize:()=>({size:30,edgeBleed:{left:1,right:1}}),init(){this.props=this.settings.settings,this.localProps={},this.state={major:[],minor:[]}},created(){this.init()},beforeUpdate(){this.init()},beforeRender({size:e}){this.localProps.size=e;const t=this.scale.ticks({distance:e.width}),n=t.filter((e=>!e.isMinor)),r=t.filter((e=>e.isMinor));this.state.line=function({localProps:{size:e},style:t,props:n}){const r=ju(1,t.line.strokeWidth);return{show:n.line.show,x1:ju(0,t.line.strokeWidth),y1:r,x2:ju(e.width,t.line.strokeWidth),y2:r,style:t.line}}(this),this.state.major=Vu(n,this),this.state.minor=Wu(r,this)},render(){return[..._u([this.state.line]),...(e=this.state.major.map((e=>e.label)),e.filter((e=>e.show)).map((e=>Q({},e.style,{type:"text",x:e.rect.x,y:e.rect.y,dx:e.dx,dy:e.dy,maxWidth:e.rect.width,text:e.text,title:e.text,baseline:"text-before-edge",tickValue:e.tickValue})))),..._u(this.state.major.map((e=>e.guideLine))),..._u(this.state.minor.map((e=>e.guideLine)))];var e}};function Yu(e,t){return e&&t&&e.qTicks.length===t.qTicks.length&&e.qTicks.every(((e,n)=>e.qStart===t.qTicks[n].qStart&&e.qEnd===t.qTicks[n].qEnd))}function Gu(e){return e.qTags.indexOf("$qualified")>-1}function Ku({qAxis:e}){const t=[],n=[];for(let r=0;r<e.length;r++){const o=r+1,i=e[r],a=e[o];Yu(i,a)?(Gu(a)?(t.push(o),n.push(r)):(t.push(r),n.push(o)),r++):(t.push(r),n.push(r))}return{qualified:t,nonQualified:n}}function Xu({qualifiedMeta:e,nonQualifiedMeta:t}){return{resolve(n){let r,o=NaN,i=NaN,a=NaN,s=!1;for(let l=e.length-1;l>=0;l--){const c=e[l];if(c.queries.outer(n)){const e=t[l+1];if(o=c.index,r=l,c.attrs.isDayOrShorter()&&c.queries.canFitHalfDayTicks(n)){i="auto",s=!0;break}if(e&&e.queries.inner(n)){i=e.index;const r=t[l+2];r&&r.queries.minor(n)&&(a=r.index);break}}}if(!Number.isNaN(o)&&Number.isNaN(i)&&"auto"!==i){i=o,o=NaN;const e=t[r+1];e&&e.queries.minor(n)&&(a=e.index)}else Number.isNaN(o)&&(o="auto",i="auto");return{outer:o,inner:i,minor:a,isDayOrShorter:s}}}}function Ju({qTicks:e,measureText:t=(()=>({width:0})),cache:n={},scale:r}){const o=n;return{isDayOrShorter:()=>(o.isDayOrShorter=e.length>0&&Math.abs(e[0].qStart-e[0].qEnd)<=1,o.isDayOrShorter),count:()=>e.length,maxRange:()=>(o.maxRange=e.length?Math.max(...e.map((e=>Math.abs(r(e.qStart)-r(e.qEnd))))):0,o.maxRange),rangeAndWidth(){const n=r.clamp();return r.clamp(!1),o.rangeAndWidth=e.map((e=>({range:Math.abs(r(e.qStart)-r(e.qEnd)),width:t(""+e.qText).width+16}))),r.clamp(n),o.rangeAndWidth}}}function Zu({attrs:e,reqAutoFitWidth:t}){return{outer:t=>!e.rangeAndWidth().some((({width:e,range:n})=>e>n*t)),inner:t=>!e.rangeAndWidth().some((({width:e,range:n})=>e>n*t)),minor:t=>e.maxRange()*t>=6,canFitHalfDayTicks:n=>n>=t*e.count()}}function Qu({qualified:e,nonQualified:t,qAxis:n,measureText:r,reqAutoFitWidth:o,scale:i},{attributesFactory:a=Ju,queryFactory:s=Zu}={attributesFactory:Ju,queryFactory:Zu}){const l=n.map(((e,t)=>function(e,t){const{qTicks:n}=e,l=a({qTicks:n,measureText:r,scale:i});return{data:e,index:t,attrs:l,queries:s({attrs:l,reqAutoFitWidth:o})}}(e,t))),c=e.map((e=>l[e])),u=t.map((e=>l[e]));return{qAxisMeta:l,qualifiedMeta:c,nonQualifiedMeta:u}}function ed({qAxis:e=[],measureText:t=(()=>({width:0})),cache:n={},reqAutoFitWidth:r=0,scale:o},{metaFactory:i=Qu,mapper:a=Ku,resolver:s=Xu}={metaFactory:Qu,mapper:Ku,resolver:Xu}){const{qualified:l,nonQualified:c}=a({qAxis:e}),{qualifiedMeta:u,nonQualifiedMeta:d}=i({qAxis:e,qualified:l,nonQualified:c,measureText:t,reqAutoFitWidth:r,scale:o}),p=s({qualifiedMeta:u,nonQualifiedMeta:d});return{resolve:t=>{const r=n.key({distance:t});if(n.get(r))return n.get(r);if(function(e){return!Array.isArray(e)||0===e.length||e.every((e=>0===e.qTicks.length))}(e))return{outer:"auto",inner:"auto",minor:NaN,isDayOrShorter:!1};const o=p.resolve(t);return n.set(r,o),o}}}function td(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(864e5*(e-Math.floor(e)))))}const nd=td(0).getTime();function rd(e){return(e.getTime()-nd)/86400/1e3}var od=new Date,id=new Date;function ad(e,t,n,r){function o(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return o.floor=function(t){return e(t=new Date(+t)),t},o.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},o.round=function(e){var t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},o.range=function(n,r,i){var a,s=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return s;do{s.push(a=new Date(+n)),t(n,i),e(n)}while(a<n&&n<r);return s},o.filter=function(n){return ad((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(o.count=function(t,r){return od.setTime(+t),id.setTime(+r),e(od),e(id),Math.floor(n(od,id))},o.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?function(t){return r(t)%e==0}:function(t){return o.count(0,t)%e==0}):o:null}),o}var sd=ad((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));sd.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?ad((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):sd:null},sd.range;var ld=1e3,cd=6e4,ud=36e5,dd=864e5,pd=6048e5,md=ad((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+t*ld)}),(function(e,t){return(t-e)/ld}),(function(e){return e.getUTCSeconds()}));function fd(e){return ad((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*cd)/pd}))}md.range,ad((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*ld)}),(function(e,t){e.setTime(+e+t*cd)}),(function(e,t){return(t-e)/cd}),(function(e){return e.getMinutes()})).range,ad((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*ld-e.getMinutes()*cd)}),(function(e,t){e.setTime(+e+t*ud)}),(function(e,t){return(t-e)/ud}),(function(e){return e.getHours()})).range,ad((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*cd)/dd}),(function(e){return e.getDate()-1})).range;var hd=fd(0),gd=fd(1),vd=fd(2),yd=fd(3),bd=fd(4),xd=fd(5),Sd=fd(6);hd.range,gd.range,vd.range,yd.range,bd.range,xd.range,Sd.range,ad((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()})).range;var Ed=ad((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));Ed.every=function(e){return isFinite(e=Math.floor(e))&&e>0?ad((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null},Ed.range;var Md=ad((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*cd)}),(function(e,t){return(t-e)/cd}),(function(e){return e.getUTCMinutes()}));Md.range;var Cd=ad((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*ud)}),(function(e,t){return(t-e)/ud}),(function(e){return e.getUTCHours()}));Cd.range;var wd=ad((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/dd}),(function(e){return e.getUTCDate()-1}));function kd(e){return ad((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/pd}))}wd.range;var Nd=kd(0),Td=kd(1),Od=kd(2),Rd=kd(3),Ad=kd(4),Ld=kd(5),Id=kd(6);Nd.range,Td.range,Od.range,Rd.range,Ad.range,Ld.range,Id.range;var Pd=ad((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()}));Pd.range;var Dd=ad((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));Dd.every=function(e){return isFinite(e=Math.floor(e))&&e>0?ad((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null},Dd.range;const qd=1,zd=2,$d=3,Bd=4,Fd=5,Hd=6;function jd({timeScale:e,labels:t,distance:n,isDayOrShorter:r,cache:o,timeOnly:i,initialMin:a}){const[s,l]=e.domain(),c=o.key({distance:n});let u;o.get(c,1)?u=o.get(c,1):(u=function(e,t,n,r,o,i){function a(e){return Dd.filter((t=>(t.getUTCFullYear()-i.getUTCFullYear())%e==0))}const s=md.count(e,t),l=Md.count(e,t),c=Cd.count(e,t),u=wd.count(e,t),d=Nd.count(e,t),p=Pd.count(e,t),m=Dd.count(e,t),f=n/r.second.width-1,h=n/r.minute.width-1,g=n/r.date.width-1,v=n/r.year.width-1,y={type:"year",desc:"year",count:m,interval:Dd.every(1),formatter:r.year.formatter,offset:e=>Dd.offset(e,-1),floor:Dd.floor};if(s<=f)y.type=qd,y.desc="second",y.count=s,y.interval=md.every(1),y.formatter=r.second.formatter,y.offset=e=>md.offset(e,-1),y.floor=md.floor;else if(s/2<=f)y.type=qd,y.desc="every other second",y.count=s/2,y.interval=md.every(2),y.formatter=r.second.formatter,y.offset=e=>md.offset(e,-2),y.floor=md.floor;else if(s/5<=f)y.type=qd,y.desc="every 5 second",y.count=s/5,y.interval=md.every(5),y.formatter=r.second.formatter,y.offset=e=>md.offset(e,-5),y.floor=md.floor;else if(s/15<=f)y.type=qd,y.desc="every 15 second",y.count=s/15,y.interval=md.every(15),y.formatter=r.second.formatter,y.offset=e=>md.offset(e,-15),y.floor=md.floor;else if(s/30<=f)y.type=qd,y.desc="every 30 second",y.count=s/30,y.interval=md.every(30),y.formatter=r.second.formatter,y.offset=e=>md.offset(e,-30),y.floor=md.floor;else if(l<=h)y.type=zd,y.desc="minute",y.count=l,y.interval=Md.every(1),y.formatter=r.minute.formatter,y.offset=e=>Md.offset(e,-1),y.floor=Md.floor;else if(l/2<=h)y.type=zd,y.desc="every 2 minute",y.count=l/2,y.interval=Md.every(2),y.formatter=r.minute.formatter,y.offset=e=>Md.offset(e,-2),y.floor=Md.floor;else if(l/5<=h)y.type=zd,y.desc="every 5 minute",y.count=l/5,y.interval=Md.every(5),y.formatter=r.minute.formatter,y.offset=e=>Md.offset(e,-5),y.floor=Md.floor;else if(l/10<=h)y.type=zd,y.desc="every 10 minute",y.count=l/10,y.interval=Md.every(10),y.formatter=r.minute.formatter,y.offset=e=>Md.offset(e,-10),y.floor=Md.floor;else if(l/15<=h)y.type=zd,y.desc="every 15 minute",y.count=l/15,y.interval=Md.every(15),y.formatter=r.minute.formatter,y.offset=e=>Md.offset(e,-15),y.floor=Md.floor;else if(l/30<=h)y.type=zd,y.desc="every 30 minute",y.count=l/30,y.interval=Md.every(30),y.formatter=r.minute.formatter,y.offset=e=>Md.offset(e,-30),y.floor=Md.floor;else if(c<=h)y.type=$d,y.desc="hour",y.count=c,y.interval=Cd.every(1),y.formatter=r.minute.formatter,y.offset=e=>Cd.offset(e,-1),y.floor=Cd.floor;else if(c/2<=h)y.type=$d,y.desc="every 2 hour",y.count=c/2,y.interval=Cd.every(2),y.formatter=r.minute.formatter,y.offset=e=>Cd.offset(e,-2),y.floor=Cd.floor;else if(c/3<=h)y.type=$d,y.desc="every 3 hour",y.count=c/3,y.interval=Cd.every(3),y.formatter=r.minute.formatter,y.offset=e=>Cd.offset(e,-3),y.floor=Cd.floor;else if(c/6<=h)y.type=$d,y.desc="every 6 hour",y.count=c/6,y.interval=Cd.every(6),y.formatter=r.minute.formatter,y.offset=e=>Cd.offset(e,-6),y.floor=Cd.floor;else if(c/12<=h||o)y.type=$d,y.desc="every 12 hour",y.count=c/12,y.interval=Cd.every(12),y.formatter=r.minute.formatter,y.offset=e=>Cd.offset(e,-12),y.floor=Cd.floor;else if(u<=g)y.type=Bd,y.desc="day",y.count=u,y.interval=wd.every(1),y.formatter=r.date.formatter,y.offset=e=>wd.offset(e,-1),y.floor=wd.floor;else if(u/2<=g)y.type=Bd,y.desc="every 2 day",y.count=u/2,y.interval=wd.every(2),y.formatter=r.date.formatter,y.offset=e=>wd.offset(e,-2),y.floor=wd.floor;else if(u/3<=g)y.type=Bd,y.desc="every 3 day",y.count=u/3,y.interval=wd.every(3),y.formatter=r.date.formatter,y.offset=e=>wd.offset(e,-3),y.floor=wd.floor;else if(d<=g)y.type=Bd,y.desc="week",y.count=d,y.interval=Nd.every(1),y.formatter=r.date.formatter,y.offset=e=>Nd.offset(e,-1),y.floor=wd.floor;else if(d/2<=g)y.type=Bd,y.desc="every 2 week",y.count=d/2,y.interval=Nd.every(2),y.formatter=r.date.formatter,y.offset=e=>Nd.offset(e,-2),y.floor=wd.floor;else if(p<=g)y.type=Fd,y.desc="month",y.count=p,y.interval=Pd.every(1),y.formatter=r.date.formatter,y.offset=e=>Pd.offset(e,-1),y.floor=wd.floor;else if(p/3<=g)y.type=Fd,y.desc="quarter",y.count=p/3,y.interval=Pd.every(3),y.formatter=r.date.formatter,y.offset=e=>Pd.offset(e,-3),y.floor=wd.floor;else if(p/6<=g)y.type=Fd,y.desc="half year",y.count=p/6,y.interval=Pd.every(6),y.formatter=r.date.formatter,y.offset=e=>Pd.offset(e,-6),y.floor=wd.floor;else if(m<=v)y.type=Hd,y.desc="year",y.count=m,y.interval=Dd.every(1),y.formatter=r.year.formatter,y.offset=e=>Dd.offset(e,-1),y.floor=Dd.floor;else if(m/2<=v)y.type=Hd,y.desc="every 2 year",y.count=m/2,y.interval=a(2),y.formatter=r.year.formatter,y.offset=e=>Dd.offset(e,-2),y.floor=Dd.floor;else if(m/5<=v)y.type=Hd,y.desc="every 5 year",y.count=m/5,y.interval=a(5),y.formatter=r.year.formatter,y.offset=e=>Dd.offset(e,-5),y.floor=Dd.floor;else if(m/10<=v)y.type=Hd,y.desc="every 10 year",y.count=m/10,y.interval=a(10),y.formatter=r.year.formatter,y.offset=e=>Dd.offset(e,-10),y.floor=Dd.floor;else{const e=Math.floor(m/v);y.type=Hd,y.desc="every nth year",y.count=e,y.interval=a(e),y.formatter=r.year.formatter,y.offset=t=>Dd.offset(t,-e),y.floor=Dd.floor}return y}(s,l,n,t.all(),r,a),o.set(c,u,1));const d=e.ticks(u.interval);d.length?s.getTime()!==d[0].getTime()&&d.unshift(u.offset(d[0])):d.push(u.floor(s));const p=d.map(((e,t,n)=>{const r=n[t+1]?n[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+r),formatter:u.formatter}}));let m=[];if(!i&&u.type<=$d){const n=t.getFormat("date"),r=e.ticks(wd.every(1));r.length&&s.getUTCDate()!==r[0].getUTCDate()&&r.unshift(wd.offset(r[0],-1)),m=(r.length?r:[wd.floor(s)]).map(((e,t,r)=>{const o=r[t+1]?r[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+o),formatter:n.formatter}}))}return{inner:p,outer:m}}const Vd=86400,Wd=1440,_d={};function Ud(e,t,n,r){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...n)),formatter:r}}function Yd(e,t,n){const{generator:r,anchor:o,clamp:i,level:a}=t.ticks,{qNumFormat:s}=t.formatter;e.clamp(i);const[l,c]=e.domain(),u=function(){return Ft.apply(ji(go,ho,so,io,oo,ro,Ur,Fr,So).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}().domain([td(l),td(c)]);u.clamp(i),u.range(t.invert?[1,0]:[0,1]);const d="object"==typeof r?r:{type:r};let p;p="d3"===d.type?(e,o)=>jd({timeScale:u,labels:n,distance:e,isDayOrShorter:o,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===d.initialMin?u.domain()[0]:td(r.initialMin)}):e=>function(e,t,n,r,o,i=!1){if(_d[[t,n,r,r,i]])return _d[[t,n,r,r,i]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=td(n),l=s.getFullYear(),c=s.getMonth(),u=s.getDate(),d=r-n,p=t/(o-r),m=p/1440,f=p/Vd,h=366*p,g=3*p*30,v=a.second.width/f,y=a.minute.width/m,b=a.date.width/g,x=a.year.width/h;let S,E,M,C=0,w=0,k=null,N=null,T=null,O=null,R=null,A=null;const L={outer:[],inner:[]};for(v<1?(k=1,w=1/Vd):v<2?(k=2,w=1/Vd*2):v<5?(k=5,w=1/Vd*5):v<10?(k=10,w=1/Vd*10):v<30?(k=30,w=1/Vd*30):y<1?(N=1,w=1/Wd):y<2?(N=2,w=1/Wd*2):y<5?(N=5,w=1/Wd*5):y<10?(N=10,w=.006944444444444445):y<30?(N=30,w=.020833333333333336):y<60?(T=1,w=1/24):y<120?(T=2,w=2/24):y<360?(T=6,w=.25):y<720?(T=12,w=.5):b<1/90?(w=1,O=1):b<2/90?(w=2,O=2):b<7/90?(w=7,O=7):b<31/90?(R=1,w=31):b<1?(R=3,w=90):x<1?(A=1,w=366):x<2?(A=2,w=732):x<5?(A=5,w=1826.25):(A=10,w=3652.5),E=Math.floor((d+n%1)/w);C<o;){M=E+1,S=A?Ud("year",[l+E*A,0,1],[l+M*A,0,1],a.year.formatter):R?Ud("month",[l,c+E*R,1],[l,c+M*R,1],a.date.formatter):O?Ud("day",[l,c,u+E*O],[l,c,u+M*O],a.date.formatter):T?Ud("hour",[l,c,u,0+E*T],[l,c,u,0+M*T],a.minute.formatter):N?Ud("minute",[l,c,u,0,0+E*N],[l,c,u,0,0+M*N],a.minute.formatter):Ud("second",[l,c,u,0,0,0+E*k],[l,c,u,0,0,0+M*k],a.second.formatter),C=rd(S.start),L.inner.push(S);const e=Math.floor(C);if(!(i||A||R||O)){const t={type:"day",start:td(e),end:td(e+1),formatter:a.date.formatter,qStart:e};L.outer[L.outer.length-1]&&L.outer[L.outer.length-1].qStart===t.qStart||L.outer.push(t)}E++}return L.min=r,L.max=o,_d[[t,n,r,r,i]]=L,L}(n,e,d.min,l,c,"T"===s.qType);const m={transform:(t=[],{isMinor:n=!1}={})=>t.map((t=>{let r;r="start"===o?t.qStart:"end"===o?t.qEnd:(t.qStart+t.qEnd)/2;const i=e.clamp();n&&e.clamp(!1);const a=e(r),s=e(t.qStart),l=e(t.qEnd);return e.clamp(i),{value:r,position:a,start:s,end:l,label:t.qText,isMinor:n,data:n?void 0:{start:t.qStart,end:t.qEnd,scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1)),generate:(t=100,n)=>p(t,n)[a].map((t=>{let n;return n="start"===o?rd(t.start):"end"===o?rd(t.end):(rd(t.start)+rd(t.end))/2,{position:u(t.start),start:u(t.start),end:u(t.end),value:n,label:t.formatter(n),isMinor:!1,data:{start:rd(t.start),end:rd(t.end),scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1))};return m}const Gd=/t+/i;const Kd={min:NaN,max:NaN,invert:!1,qAxis:[],field:void 0,formatter:{fn:()=>e=>e,measureText:()=>({width:0,height:0}),localeInfo:{},qNumFormat:{}},ticks:{generator:"d3",level:"outer",anchor:void 0,clamp:!1},cache:{get:()=>!1,set:()=>{},key:()=>""}};function Xd(e,t){e.instance||(e.instance=t.copy(),e.instance.domain(t.domain()),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}const Jd="continuousPan";var Zd={model:function({model:e,layoutService:t,largeDataService:n,dataProcessorModel:r=Fu,viewCache:o,viewState:i,definitionPath:a},s={}){const{engineFetcherFactory:l=Ou,snapshotFetcherFactory:c=Au,cacheFetcherFactory:u=Ru,cache:d={initial:{},merged:{}}}=s,p=l({model:e,layoutService:t,largeDataService:n,definitionPath:a}),m=c({layoutService:t,viewCache:o}),f=u({cache:d}),h=e=>{throw e.isHandled=!0,e};let g,v,y;return{update(e){var n,r;({initialMin:v,initialMax:y}=function(e={}){let{qMin:t,qMax:n}=e;return t=Number.isNaN(+t)?0:t,n=Number.isNaN(+n)?0:n,{initialMin:t,initialMax:n}}(e.qHyperCube.qDimensionInfo[0])),o.set("continuousMin",v),o.set("continuousMax",y),o.set("minimiumZoomSpan",(n=v,r=y,Math.max(1e-6,2.3841857910156157e-7*(r-n)))),g=t.meta.isSnapshot?m:p,t.meta.isSnapshot&&({zoom:{min:v,max:y}}=m.getSnapshotData()),i.preventSet("zoom",{min:v,max:y})},updateLayout(e){const{qDataPages:n,qAxisData:r}=e;return t.setHyperCubeValue("qDataPages",n),t.setHyperCubeValue("qAxisData",r),t.setHyperCubeValue("qMode","S"),t.setHyperCubeValue("qColumnOrder",[]),e},initialFetch(){return g.fetch(v,y).then((e=>{const t=function(e){return{qDataPages:e.qDataPages.map((e=>{const t=Pu(e.qArea,e.qMatrix);return{...e,qArea:t}})),qAxisData:e.qAxisData}}(e);return r.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),d.initial=t,d.merged=t,e})).then((e=>Du(v,y,e))).then((e=>this.updateLayout(e))).catch(h)},fetch:(e,t)=>g.fetch(e,t).then((e=>function(e,t){const n={};return n.qDataPages=(e.qDataPages||[]).map(((e,n)=>{const r=function(e,t){if(!t||!t.length||!t[0].length)return e;const n=t[0][0].qNum,r=t[t.length-1][0].qNum,o=[],i=[];for(let t=0,a=e.length;t<a;t++){const a=e[t][0];a.qNum<n?o.push(e[t]):a.qNum>r&&i.push(e[t])}return[...o,...t,...i]}(e.qMatrix,t.qDataPages[n].qMatrix),o=Pu(e.qArea,r);return{...e,qArea:o,qMatrix:r}})),e.qAxisData&&e.qAxisData.qAxis&&(n.qAxisData=function(e,t){if(!t||!t.qAxis.length||t.qAxis.every((e=>!e.qTicks.length)))return e;const n=t.qAxis.map((e=>e.qName)),r=t.qAxis.map((e=>({start:e.qTicks[0].qStart,end:e.qTicks[e.qTicks.length-1].qStart}))),o=t.qAxis.map((e=>({qName:e.qName,qTags:[...e.qTags],qTicks:[...e.qTicks]})));for(let t=0,i=e.qAxis.length;t<i;t++){const i=e.qAxis[t],a=n.indexOf(i.qName),s=[],l=[];if(a>-1){const{start:e,end:t}=r[a];for(let n=0,r=i.qTicks.length;n<r;n++){const r=i.qTicks[n];r.qStart<e?s.push(r):r.qStart>t&&l.push(r)}o[a].qTicks=[...s,...o[a].qTicks,...l]}}return{qAxis:o}}(e.qAxisData,t.qAxisData)),n}(d.initial,e))).then((e=>(r.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),d.merged=e,e))).then((n=>Du(e,t,n))).catch(h),fetchFromCache:(e,t)=>f.fetch(e,t).then((n=>Du(e,t,n))),fetchMinMaxData:()=>Promise.resolve(d.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return Q({},e,{...d.initial})},getInitialLayout(){const e=this.getInitialCube();return Q({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>Bu(d.initial,t.meta),setSnapshotData(e){const{qHyperCube:t}=e,n=r.query.getShouldProcess()?[r.query.getFilteredDataPage({dataPage:d.merged.qDataPages[0]})]:d.merged.qDataPages;t.qDataPages=n,t.qAxisData=d.merged.qAxisData}}},event:{onZoomChange:function(e,t){const{layoutService:n,continuousDataModel:r}=e;function o(e,n,o){return r[e](n,o).then((e=>(r.updateLayout(e),t(),e)))}const i=w(((e,t)=>o("fetch",e,t)),50);return({min:e,max:t},{min:r,max:a})=>!n.meta.isContinuous||e===r&&t===a?Promise.resolve(null):o("fetchFromCache",e,t).then((n=>(i(e,t),n)))},onZoomIntercept:function({viewCache:e}){let t=NaN,n=NaN,r=NaN;return(o,i)=>(t=e.get("continuousMin"),n=e.get("continuousMax"),r=e.get("minimiumZoomSpan"),Math.abs(o.max-o.min)<r?i:{min:Math.min(o.max,Math.max(t,o.min)),max:Math.max(o.min,Math.min(n,o.max))})},onZoom:function({viewCache:e,viewState:t,chart:n},{threshold:r=50,rtl:o=!1,targetKey:i}){const a=e.get("continuousMin"),s=e.get("continuousMax");return k(((e,r)=>{const l=(e=>n.componentsFromPoint(e).filter((e=>e.key===i))[0])(e);if(l){const i=function(e,t,n){let{x:r}=e;return r-=t.element.getBoundingClientRect().left,r-=n.rect.x,Math.max(0,Math.min(1,r/n.rect.width))}(e,n,l),c=o?1-i:i,{min:u,max:d}=t.get("zoom"),p=Math.abs(d-u),m=p-(r>0?zu:qu)*p,f=u+m*c,h=d-m*(1-c),g=f<a?a-f:0,v=h>s?h-s:0;t.set("zoom",{min:Math.max(f-v,a),max:Math.min(h+g,s)})}}),r)}},interactions:{areaPan:function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:o}){return{type:"Pan",key:"continuous:pan",options:{event:Jd,pointers:1,threshold:10,enable(r,o){return this.started===Jd||!o||!!n.scroll.enabled()&&t.componentsFromPoint({x:o.center.x,y:o.center.y}).some((t=>t.key===e))}},events:{continuousPanstart(n){n.preventDefault(),this.started=Jd;const{min:o,max:i}=r.get("zoom");this[Jd]={min:o,max:i,size:t.component(e).rect.computedInner.width,span:i-o}},continuousPanmove(e){e.preventDefault();const{span:t,min:n,max:i,size:a}=this[Jd],s=-e.deltaX/a;r.set("zoom",{min:Math.min(n+s*t,o.get("continuousMax")-t),max:Math.max(i+s*t,o.get("continuousMin")+t)})},continuousPanend(e){e.preventDefault(),this.started=!1},continuousPancancel(e){e.preventDefault(),this.started=!1}}}}},picassoComponents:{axisOverlay:Hu,timeAxis:Uu},picassoScales:{time:function e(t,n={}){const r=function(e,t,n){const r={};return Object.keys(t).forEach((o=>{const i=e[o],a=typeof i;"function"===a?r[o]=i(n):"object"!==a||Array.isArray(i)?r[o]="undefined"===a?t[o]:i:r[o]=Q(!0,{},t[o],i)})),r}(t,Kd,n),{qAxis:o}=r,i=qr(),a={instance:null,invert:!1},{min:s,max:l}=function(e,t){let n=+e.min,r=+e.max;return Number.isNaN(n)&&Number.isNaN(r)&&Array.isArray(t)&&t.length&&(n=Math.min(...t[t.length-1].qTicks.map((e=>e.qStart))),r=Math.max(...t[t.length-1].qTicks.map((e=>e.qEnd)))),n===r&&(n-=.5,r+=.5),{min:Number.isNaN(+n)?0:n,max:Number.isNaN(+r)?1:r}}(r,o);let c,u,d=[];const p=function(e){return Number.isNaN(+e)?NaN:i(e)};p.ticks=({distance:e,resolve:t=c.resolve}={})=>{const n=t(e),i=n[r.ticks.level];if(Number.isNaN(+i)||(d=u.transform(o[i].qTicks,{isMinor:!1})),!Number.isNaN(+n.minor)){const e=u.transform(o[n.minor].qTicks,{isMinor:!0});d=d.concat(e)}return"auto"===i&&(d=u.generate(e,n.isDayOrShorter)),d},p.invert=e=>i.invert(e),p.domain=e=>Array.isArray(e)?i.domain(e):i.domain(),p.range=e=>Array.isArray(e)?i.range(e):i.range(),p.norm=e=>(Xd(a,p),a.instance(e)),p.normInvert=e=>(Xd(a,p),a.instance.invert(e)),p.copy=()=>e(t,n),p.clamp=(e=!0)=>(i.clamp(e),i.clamp()),p.min=()=>Math.min(s,l),p.max=()=>Math.max(s,l),i.range(r.invert?[1,0]:[0,1]),i.domain([s,l]),a.invert=r.invert;const m=function(e){const t={},{measureText:n,fn:r,localeInfo:o}=e.formatter,i={second:{type:"second",pattern:"hh:mm:ss",width:60,formatter:void 0},minute:{type:"minute",pattern:"hh:mm",width:60,formatter:void 0},date:{type:"date",pattern:"YYYY-MM-DD",width:60,formatter:void 0},year:{type:"year",pattern:"YYYY",width:60,formatter:void 0}};return o&&Gd.test(o.qTimestampFmt)&&(i.minute.pattern+=" tt",i.second.pattern+=" tt"),i.date.pattern=o&&o.qDateFmt?o.qDateFmt:i.date.pattern,Object.keys(i).forEach((e=>{i[e].formatter=r(i[e].pattern),i[e].width=Math.max(i[e].width,n(i[e].formatter(41000.2343433)).width+16)})),t.getFormat=e=>i[e],t.all=()=>i,t.getFormatFromTicks=e=>{const t=e.filter((e=>!e.isMinor)),{length:n}=t;if(!n)return i.date;const r=td(t[0].data.start),o=td(t[n-1].data.start);return wd.count(r,o)/n>=1?i.date:Cd.count(r,o)/n>0?i.minute:Md.count(r,o)/n>0?i.second:i.date},t}(r);return u=Yd(i.copy(),r,m),c=ed({qAxis:o,measureText:r.formatter.measureText,reqAutoFitWidth:2*m.getFormat("minute").width,cache:r.cache,scale:p}),p.data=()=>({fields:[{formatter:p.formatter,id:()=>"qHyperCube/"+r.field,key:()=>r.field,raw:E(n,"fields.0.raw",(()=>({})))}]}),p.formatter=()=>m.getFormatFromTicks(d).formatter,p}}};const Qd=e=>e.meta.seriesComponentKeys[0];function ep({chart:e,models:t,actions:n,viewState:r,viewCache:o,environment:i}){const{event:{onZoom:a}}=Zd,{layoutService:s,seriesModel:l}=t,c=Qd(l),u=s.meta.isContinuous?a({chart:e,viewState:r,viewCache:o},{rtl:"rtl"===i.options.direction,threshold:50,targetKey:c}):()=>{};return{type:"native",events:{wheel(t){const r={x:t.clientX,y:t.clientY},o=e.componentsFromPoint(r);if(n.interact.enabled()){const[e]=o.filter((e=>e.key===Qa.COMPONENT.LEGEND_CATEGORICAL));((e,t)=>{if(t){const n=Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY;t.emit(n>=0?"next":"prev"),e.preventDefault()}})(t,e)}if(n.scroll.enabled()){const[e]=o.filter((e=>e.key===c));e&&(u(r,Math.sign(-t.deltaY)),t.preventDefault())}}}}}const tp="continuousPinchZoom";function np({chart:e,models:t,environment:n,viewState:r,viewCache:o,actions:i,selectables:a}){const s=Zd.interactions.areaPan,{layoutService:l,dockService:c,discreteModel:u,colorService:d,tooltipService:p}=t,m="rtl"===n.options.direction,f=p.getInteractions(),h=function({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l}){return{gestures:[...Hs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:o,layoutService:i,dockService:a,discrete:s,rtl:l})],native:js({componentKey:e,chart:t,actions:n,layoutService:i})}}({componentKey:"scrollbar",chart:e,actions:i,viewState:r,viewCache:o,discrete:u,layoutService:l,dockService:c,rtl:m}),g={type:"hammer",enable:!0,gestures:[...d.custom.legendInteractions(),...a.gestures.sort(((e,t)=>(t.prio||0)-(e.prio||0))),...h.gestures,...f.gestures]},v=[ep({chart:e,models:t,actions:i,viewState:r,viewCache:o,environment:n}),h.native,f.native];return l.meta.isDiscrete&&(g.gestures.push(...u.interactions.gestures),v.push(u.interactions.native)),l.meta.isContinuous&&g.gestures.push(s({targetKey:Qd(t.seriesModel),chart:e,actions:i,viewState:r,viewCache:o}),function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:o,rtl:i}){const a={last:0,diff:0},s=Zd.event.onZoom({viewCache:o,viewState:r,chart:t},{threshold:100,rtl:i,targetKey:e});return{type:"Pinch",key:"continuous:pinch-zoom",options:{event:tp,pointers:2,threshold:0,enable:(r,o)=>!o||!!n.scroll.enabled()&&t.componentsFromPoint({x:o.center.x,y:o.center.y}).some((t=>t.key===e))},events:{[tp+"start"](e){a.last=e.scale,e.preventDefault()},[tp+"move"](e){const t=e.scale-a.last;Math.abs(t)>.01&&s(e.center,t>0?1:-1),a.last=e.scale,e.preventDefault()}}}}({targetKey:Qd(t.seriesModel),chart:e,actions:i,viewState:r,viewCache:o,rtl:m})),[g,...v]}const rp="lasso",op=({key:e,componentTargetKey:t,requireFailure:n,recognizeWith:r},o)=>({key:"event:"+e,type:"Pan",requireFailure:n,recognizeWith:r,options:{event:rp,enable(e,n){if(this.started===rp||!n)return!0;if(!o.actions.select.enabled()||!o.actions.lasso.enabled()||!o.actions.lasso.active())return!1;return this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((e=>e.key===t)).length>0}},events:{lassostart(t){t.preventDefault(),this.started!==rp&&(o.actions.select.emit("start",rp),this.chart.component(e).emit("lassoStart",t),this.started=rp)},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t),"function"==typeof o.updateOnMove&&o.updateOnMove(this.chart)},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),o.actions.select.emit("end",rp),"function"==typeof o.updateOnEnd&&o.updateOnEnd()}}});const ip=({targets:e,requireFailure:t,recognizeWith:n,components:r,eventName:o="tap"},i)=>{let a;const s=i.customTooltipModel?i.customTooltipModel.utils:void 0,l=s?i.debouncer(s.displayTooltip,s.DEBOUNCE_THRESHOLD):void 0;return{key:"event:tap",type:"Tap",requireFailure:t,recognizeWith:n,options:{event:o,interval:10,pointers:1,enable(t,n){return!n||!(!i.actions.select.enabled()&&!i.actions.tooltip.enabled())&&(a=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((t=>-1!==e.indexOf(t.key))),a.length>0)}},events:{[o](t){t.preventDefault();const n=function(e,t){const n=t.element.getBoundingClientRect();let r,o;return e.center?(({x:r}=e.center),({y:o}=e.center)):(r=e.clientX,o=e.clientY),{x:r-n.left,y:o-n.top}}(t,this.chart),c=i.hitRadius?i.hitRadius(a):0,u=c>0?{cx:n.x,cy:n.y,r:c}:n,d=i.shapesAt?i.shapesAt(u):this.chart.shapesAt(u,{components:e.map((e=>({key:e,propagation:"stop"}))),propagation:"stop"}),p=this.chart.component("tooltip"),m="mouse"!==t.pointerType&&p&&p.show;if(!i.isLocked(a)&&!i.tooltipOnly&&i.actions.select.enabled()){const e=this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}),n=e.some((e=>"legend-cat"===e.type));if(!d.length&&n||(this.chart.brushSelectionIncludeMax=!1,i.actions.select.brushSelectionIncludeMax=!1,i.actions.select.emit("start",o,e)),d.length&&r){this.chart.brushSelectionIncludeMax=!1,i.actions.select.brushSelectionIncludeMax=!1;const e="function"==typeof r?r(t,d):r;this.chart.brushFromShapes(d,{components:e}),i.actions.select.emit("end",o),(({largeDataService:e,chart:t})=>{((null==e?void 0:e.meta)||{}).isLargeNumPoints&&t.brush("lazySelection")._state(t.brush("selection")._state())})({largeDataService:i.largeDataService,chart:this.chart})}}if(p&&i.actions.tooltip.enabled())if(d.length){const{customTooltipModel:e}=i;if(null!=e&&e.useCustomTooltip&&s.checkIfPromisesExist({customTooltipModel:e})){const n=s.getNodes(t,this.chart);l(t,p,{nodes:n,opts:i,customTooltipModel:e})}else p.emit("show",t,{nodes:d})}else m&&p.emit("hide")}}}};const ap=({key:e,requireFailure:t,recognizeWith:n,eventName:r="tap"},o)=>({prio:1,key:`event:${e}-tap`,type:"Tap",requireFailure:t,recognizeWith:n,options:{event:`${r}-${e}-tap`,interval:10,pointers:1,enable:(t,n)=>!!n&&(!!o.actions.select.enabled()&&(!(!n.target||"INPUT"!==n.target.nodeName)||!(!n.target||!n.target.hasAttribute("data-other-value"))&&(n.target.getAttribute("data-key")||"").split("-bubble")[0]===e))},events:{[`${r}-${e}-tap`](t){(t.target.getAttribute("data-key")||"").split("-bubble")[0]&&(t.preventDefault(),this.chart.component(e).emit("bubbleStart",t))}}});const sp=({eventName:e,key:t,fillTargets:n=[],requireFailure:r,recognizeWith:o},i,a)=>({key:"event:"+t,type:"Pan",requireFailure:r,recognizeWith:o,options:{event:e,enable(r,o){if(this.started===e||!o)return!0;if(!i.actions.select.enabled())return!1;const a=this.chart.componentsFromPoint({x:o.center.x,y:o.center.y}).filter((e=>-1!==n.indexOf(e.key)));return 0===a.length&&function(e,t){const{target:n}=e.srcEvent;return!(!n||0!==(n.getAttribute("data-key")||"").indexOf(t+"-"))}(o,t)?(this.started=e,!0):a.length>0}},events:{[e+"start"](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,i.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),i.actions.select.emit("start",e),this.chart.component(t).emit(a+"Start",n),this.started=e},[e+"move"](e){e.preventDefault(),this.chart.component(t).emit(a+"Move",e),"function"==typeof i.updateOnMove&&i.updateOnMove(this.chart)},[e+"end"](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,i.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),this.chart.component(t).emit(a+"End",n),i.actions.select.emit("end",e),this.started=!1,"function"==typeof i.updateOnEnd&&i.updateOnEnd()}}});function lp(e,t){const n=function(e){const{key:t,targets:n,fillTargets:r,targetSelector:o,targetFillSelector:i,dock:a,scale:s,bubblesPlacement:l="inside",observeBrush:c=!1,multiple:u=!1,toLabel:d,onEdited:p}=e;return{key:t,type:"brush-range",layout:{dock:n.map((e=>"@"+e)).join(",")},on:p?{bubbleEnd(){p()}}:{},settings:{brush:c?{context:"selection",observe:!0}:"selection",scale:s,multiple:u,direction:"left"===a||"right"===a?"vertical":"horizontal",bubbles:{align:"left"===a||"top"===a?"end":"start",placement:l,label:d},target:{components:r,selector:o,fillSelector:i,fill:"rgba(82,204,82,0.2)"}}}}(e),r=sp(e,t,"range");return{interactions:[e.onEdited?ap(e,t):null,r].filter(Boolean),components:[n]}}const cp=/axis|legend/;function up({actions:e,models:t}){const{seriesModel:n,layoutService:r,colorService:o,flags:i}=t,a=r.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1);return function(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[ip(e,t)],components:[]}}({targets:[`${Qa.COMPONENT.BAR}-${ts.PRIMARY}`,`${Qa.COMPONENT.BAR}-${ts.SECONDARY}`,...n.query.series(es.MARKER).map((e=>$l(Qa.COMPONENT.MARKER,e))),...n.query.series(es.LINE).map((e=>$l(Qa.COMPONENT.POINT,e))),Qa.COMPONENT.AXIS.MAJOR,Qa.COMPONENT.AXIS_OVERLAY.TIME_INNER,Qa.COMPONENT.AXIS_OVERLAY.TIME_OUTER,Qa.COMPONENT.AXIS_OVERLAY.CONTINUOUS,Qa.COMPONENT.LEGEND_CATEGORICAL],components:(e,t)=>{const[n]=t,{key:r}=n,o={key:r,action:e.srcEvent.ctrlKey||a?"set":"toggle",contexts:["selection"]};return-1===[Qa.COMPONENT.AXIS.MAJOR,Qa.COMPONENT.AXIS_OVERLAY.TIME_INNER,Qa.COMPONENT.AXIS_OVERLAY.TIME_OUTER,Qa.COMPONENT.AXIS_OVERLAY.CONTINUOUS,Qa.COMPONENT.LEGEND_CATEGORICAL].indexOf(r)&&(o.data=["selectionDimension"]),[o]}},{actions:e,isLocked:e=>e.some((e=>"legend-cat"===e.type))?o.isSelectionLocked({isMeasureSelectionLocked:r.meta.isDimensionLocked}):r.meta.isDimensionLocked,hitRadius:e=>(e=>e.some((e=>cp.test(e.type))))(e)?0:3,debouncer:w,flags:i})}function dp({actions:e,models:t}){const{layoutService:n,dockService:r,seriesModel:o}=t,{isDiscrete:i,isDimensionLocked:a}=n.meta;if(!i||a)return!1;const s=[...o.meta.seriesComponentKeys,Qa.COMPONENT.AXIS.MAJOR];return function(e,t){const n=function(e){const{key:t,targets:n,components:r,fillTargets:o,dock:i}=e;return{key:t,type:"brush-area-dir",layout:{dock:n.map((e=>"@"+e)).join(",")},settings:{multiple:!0,brush:{components:r},direction:"left"===i||"right"===i?"vertical":"horizontal",bubbles:{align:"left"===i||"top"===i?"end":"start",placement:"inside"},target:{components:o,fill:"rgba(82,204,82,0.2)"}}}}(e);return{interactions:[sp(e,t,"area")],components:[n]}}({eventName:"discreteRange",key:"discrete-range-brush",components:[{key:s[0],contexts:["selection"],action:"set",data:["selectionDimension"]}],targets:s,fillTargets:[Qa.COMPONENT.AXIS.MAJOR],dock:r.meta.major.dock},{actions:e})}const pp={components:[],interactions:[]};function mp({actions:e,chart:t,models:n,isUnsupportedFeature:r}){const o=function({actions:e,models:t,isUnsupportedFeature:n}){const{dockService:r,seriesModel:o,layoutService:i}=t;return!(i.meta.isDimensionLocked||i.meta.isBarSeriesStacked||null!=n&&n("rangeSelections"))&&lp({eventName:"minorRange",key:"minor-range-brush",targets:[Qa.COMPONENT.AXIS.MINOR.PRIMARY,`${Qa.COMPONENT.BAR}-${ts.PRIMARY}`,...o.query.series(es.MARKER).filter((e=>e.isPrimary)).map((e=>$l(Qa.COMPONENT.MARKER,e))),...o.query.series(es.LINE).filter((e=>e.isPrimary)).map((e=>$l(Qa.COMPONENT.POINT,e)))],fillTargets:[Qa.COMPONENT.AXIS.MINOR.PRIMARY],dock:r.meta.minor.dock,scale:Qa.SCALE.MINOR.PRIMARY,onEdited(){e.select.emit("end","minorRange")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:r})||pp,i=function({actions:e,models:t,isUnsupportedFeature:n}){const{dockService:r,seriesModel:o,layoutService:i}=t;return!(i.meta.isDimensionLocked||i.meta.isBarSeriesStacked||null!=n&&n("rangeSelections"))&&lp({eventName:"minorRange-secondary",key:"minor-secondary-range-brush",targets:[Qa.COMPONENT.AXIS.MINOR.SECONDARY,`${Qa.COMPONENT.BAR}-${ts.SECONDARY}`,...o.query.series(es.MARKER).filter((e=>!e.isPrimary)).map((e=>$l(Qa.COMPONENT.MARKER,e))),...o.query.series(es.LINE).filter((e=>!e.isPrimary)).map((e=>$l(Qa.COMPONENT.POINT,e)))],fillTargets:[Qa.COMPONENT.AXIS.MINOR.SECONDARY],dock:r.meta.minorSecondary.dock,scale:Qa.SCALE.MINOR.SECONDARY,onEdited(){e.select.emit("end","minorRange-secondary")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:r})||pp,a=dp({actions:e,models:n})||pp,s=function({actions:e,chart:t,models:n}){const{layoutService:r,dockService:o,seriesModel:i}=n,{isContinuous:a,isTime:s}=r.meta;if(!a)return!1;const l=s?[Qa.COMPONENT.AXIS_OVERLAY.TIME_INNER,Qa.COMPONENT.AXIS_OVERLAY.TIME_OUTER]:[Qa.COMPONENT.AXIS_OVERLAY.CONTINUOUS];return lp({eventName:"continuousRange",key:"continuous-range-brush",targets:[`${Qa.COMPONENT.BAR}-${ts.PRIMARY}`,`${Qa.COMPONENT.BAR}-${ts.SECONDARY}`,...i.query.series(es.MARKER).map((e=>$l(Qa.COMPONENT.MARKER,e))),...i.query.series(es.LINE).map((e=>$l(Qa.COMPONENT.POINT,e))),...l],fillTargets:l,dock:o.meta.major.dock,scale:s?Qa.SCALE.MAJOR_INNER:Qa.SCALE.MAJOR,observeBrush:!0,multiple:!0,toLabel({datum:e,data:n,scale:r}){const o=s?r.formatter():t.formatter(Qa.FORMATTER.PRIMARY),i=t.scale(Qa.SCALE.MAJOR).max(),a=t.brushSelectionIncludeMax&&e===i;return`${e!==Math.max(...n)||a?"":"<"}${o(e)}`}},{actions:e})}({actions:e,chart:t,models:n})||pp,l=function({actions:e,models:t}){const{colorService:n,layoutService:r}=t,[o]=n.custom.legendComponents(),i=n.custom.wrappedScales(),{isDimensionLocked:a}=r.meta;if(a||!o)return!1;const s=Qa.SCALE.COLOR+"Range",{type:l,key:c}=o,u=i[s];return!("legend-seq"!==l||!u||u.min>=u.max)&&lp({eventName:"legendRange",key:"legend-range-brush",targets:[c],fillTargets:[c],targetSelector:'[id="legend-seq-target"]',targetFillSelector:'[id="legend-seq-ticks"]',dock:o.layout.dock,scale:s,bubblesPlacement:"outside",onEdited:()=>{e.select.emit("end","legendRange")}},{actions:e})}({actions:e,models:n})||pp;return{components:[...o.components,...i.components,...a.components,...s.components,...l.components],interactions:[...o.interactions,...i.interactions,...a.interactions,...s.interactions,...l.interactions]}}function fp({actions:e,models:t}){const{layoutService:n,seriesModel:r}=t,{seriesComponentKeys:o}=r.meta;if(n.meta.isDimensionLocked)return{components:[],interactions:[]};return function(e,t){if(!e.componentTargetKey)throw new Error("Missing 'componentTargetKey' property");const n={key:"lasso",...e},r=(({key:e,components:t})=>({key:e,type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:t},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.7},startPoint:{r:10,stroke:"rgba(77, 192, 78, 1)",strokeWidth:0,opacity:1}}}))(n);return{interactions:[op(n,t)],components:[r]}}({key:"lasso",componentTargetKey:o[0],components:o.map((e=>({key:e,action:"add",contexts:["selection"],data:["selectionDimension"]})))},{actions:e})}function hp({picasso:e,chart:t,models:n,environment:r,viewState:o,viewCache:i,actions:a,isUnsupportedFeature:s}){const{colorService:l,pluginService:c}=n,u=n.layoutService.getLayout(),{options:d}=r,p=function(e,t){return{layoutModes:ie.getLayoutModes(),center:void 0!==t.minCenterRatio?{minWidthRatio:t.minCenterRatio,minHeightRatio:t.minCenterRatio}:void 0,logicalSize:t.logicalSize?{align:.5,preserveAspectRatio:!0,...t.logicalSize}:void 0}}(0,{logicalSize:function({layout:e,options:t={}}){return!(null==e||!e.snapshotData||t.freeResize)&&{width:e.snapshotData.content.size.w,height:e.snapshotData.content.size.h}}({layout:u,options:d}),minCenterRatio:0}),m=function({chart:e,models:t,environment:n,viewState:r,viewCache:o,actions:i}){var a;const{colorService:s,layoutService:l,dockService:c,tooltipService:u}=t,d=mu({environment:n,models:t});return"center"===(null==d||null===(a=d.layout)||void 0===a?void 0:a.dock)?[d]:[...Qc({models:t}),...wl({models:t}),...Uc({chart:e,models:t,environment:n,viewState:r,viewCache:o}),gu({models:t,environment:n}),...Al({models:t,environment:n}),...ru({models:t,environment:n,actions:i}),Ui({viewState:r,viewCache:o,layoutService:l,dockService:c}),...cu({models:t}),...uu({chart:e,models:t,environment:n}),ou({models:t,environment:n,viewState:r,viewCache:o}),...s.custom.legendComponents(),fu(t),...lu({chart:e,models:t,viewState:r,viewCache:o,environment:n}),...u.getComponents(),d].filter(Boolean)}({chart:t,models:n,environment:r,viewState:o,viewCache:i,actions:a}),f=function({actions:e,chart:t,models:n,isUnsupportedFeature:r}){const{layoutService:o}=n,i=o.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),a=up({actions:e,models:n});if(i)return{components:[...a.components],gestures:[...a.interactions]};const s=mp({actions:e,chart:t,models:n,isUnsupportedFeature:r}),l=fp({actions:e,models:n});return{components:[...a.components,...s.components,...l.components],gestures:[...a.interactions,...s.interactions,...l.interactions]}}({actions:a,chart:t,models:n,isUnsupportedFeature:s}),h=c.extendComponents([...m,...f.components]);return{collections:ul({models:n}),scales:El({picasso:e,models:n,viewState:o,viewCache:i,environment:r}),components:h,formatters:vu({models:n}),interactions:np({chart:t,models:n,environment:r,viewState:o,viewCache:i,actions:a,selectables:f}),strategy:p,palettes:l.getPalettes()}}const gp=({models:{layoutService:e,fieldModel:t,appLayoutModel:n}})=>({type:"q",key:Qa.DATA.MAIN,data:e.getHyperCube(),config:{virtualFields:t.virtuals,localeInfo:n.qLocaleInfo}}),vp=({models:{layoutService:e,fieldModel:t,continuousModel:n,appLayoutModel:r}})=>e.meta.isContinuous?[{type:"q",key:Qa.DATA.REDUCED,data:n.getInitialCube(),config:{virtualFields:t.virtuals,localeInfo:r.qLocaleInfo}}]:[],yp=[Qa.COMPONENT.AXIS_TITLE.MAJOR,Qa.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,Qa.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,Qa.COMPONENT.GRID_LINE,Qa.COMPONENT.ZERO_LINE],bp={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function xp(e){return bp[e]||e}function Sp(e){return function(t,n,r){let o,i,a,s,l=[],c=!0;function u(){"function"==typeof o.enable&&(o.enable=o.enable.bind(i)()),o.enable&&(o.gestures.forEach((t=>{t.options=t.options||{},void 0===t.options.enable&&(t.options.enable=!0),"function"==typeof t.options.enable&&(t.options.enable=t.options.enable.bind(i));const n=xp(t.type);e&&e[n]&&(t.options.event=t.options.event||t.type.toLowerCase(),a=a||new e.Manager(r),a.add(new e[n](t.options)),Object.keys(t.events).forEach((e=>{t.events[e]=t.events[e].bind(i),a.on(e,t.events[e])})),l.push(t))})),o.gestures.forEach((t=>{const n=xp(t.type);e&&e[n]&&(t.recognizeWith&&a.get(t.options.event).recognizeWith(t.recognizeWith.split(" ").filter((e=>""!==e))),t.requireFailure&&a.get(t.options.event).requireFailure(t.requireFailure.split(" ").filter((e=>""!==e))))})))}function d(){l.forEach((e=>{Object.keys(e.events).forEach((t=>{a.off(t,e.events[t])})),a.remove(e.options.event)})),l=[]}return{get key(){return s},set(e){!function(e){s=e.key,o=e,i={chart:t,mediator:n,settings:o},o.gestures=o.gestures||[],void 0===o.enable&&(o.enable=!0)}(e),d(),c&&u()},off(){c=!1,d()},on(){c=!0,0===l.length&&u()},destroy(){d(),a&&a.destroy(),a=null,i=null,o=null}}}}function Ep(){return(Ep=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Mp={exports:{}};function Cp(){}function wp(){}wp.resetWarningCache=Cp;Mp.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:wp,resetWarningCache:Cp};return n.PropTypes=n,n}();var kp={black:"#000",white:"#fff"},Np="#e57373",Tp="#f44336",Op="#d32f2f",Rp="#ff4081",Ap="#f50057",Lp="#c51162",Ip="#7986cb",Pp="#3f51b5",Dp="#303f9f",qp={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"};function zp(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return e<t?t:e>n?n:e}function $p(e){if(e.type)return e;if("#"===e.charAt(0))return $p(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length/3,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb(".concat(n.map((function(e){return parseInt(e,16)})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(["Material-UI: unsupported `".concat(e,"` color."),"We support the following formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()."].join("\n"));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function Bp(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function Fp(e){var t="hsl"===(e=$p(e)).type?$p(function(e){var t=(e=$p(e)).values,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),Bp({type:s,values:l})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Hp(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return Fp(e)>.5?Vp(e,t):Wp(e,t)}function jp(e,t){return e=$p(e),t=zp(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,Bp(e)}function Vp(e,t){if(e=$p(e),t=zp(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return Bp(e)}function Wp(e,t){if(e=$p(e),t=zp(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return Bp(e)}function _p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Up(){return(Up=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Yp(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}function Gp(e,t){if(null==e)return{};var n,r,o=Yp(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Kp(e){return(Kp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xp(e){return(Xp="function"==typeof Symbol&&"symbol"===Kp(Symbol.iterator)?function(e){return Kp(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":Kp(e)})(e)}function Jp(e){return e&&"object"===Xp(e)&&!Array.isArray(e)}function Zp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?Up({},e):e;return Jp(e)&&Jp(t)&&Object.keys(t).forEach((function(o){"__proto__"!==o&&(Jp(t[o])&&o in e?r[o]=Zp(e[o],t[o],n):r[o]=t[o])})),r}(Mp.exports.element,function(){return null}).isRequired=(Mp.exports.element.isRequired,function(){return null});var Qp={exports:{}},em={};
|
|
8
|
-
/** @license React v16.11.0
|
|
9
|
-
* react-is.production.min.js
|
|
10
|
-
*
|
|
11
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
12
|
-
*
|
|
13
|
-
* This source code is licensed under the MIT license found in the
|
|
14
|
-
* LICENSE file in the root directory of this source tree.
|
|
15
|
-
*/
|
|
16
|
-
Object.defineProperty(em,"__esModule",{value:!0});var tm="function"==typeof Symbol&&Symbol.for,nm=tm?Symbol.for("react.element"):60103,rm=tm?Symbol.for("react.portal"):60106,om=tm?Symbol.for("react.fragment"):60107,im=tm?Symbol.for("react.strict_mode"):60108,am=tm?Symbol.for("react.profiler"):60114,sm=tm?Symbol.for("react.provider"):60109,lm=tm?Symbol.for("react.context"):60110,cm=tm?Symbol.for("react.async_mode"):60111,um=tm?Symbol.for("react.concurrent_mode"):60111,dm=tm?Symbol.for("react.forward_ref"):60112,pm=tm?Symbol.for("react.suspense"):60113,mm=tm?Symbol.for("react.suspense_list"):60120,fm=tm?Symbol.for("react.memo"):60115,hm=tm?Symbol.for("react.lazy"):60116,gm=tm?Symbol.for("react.fundamental"):60117,vm=tm?Symbol.for("react.responder"):60118,ym=tm?Symbol.for("react.scope"):60119;function bm(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case nm:switch(e=e.type){case cm:case um:case om:case am:case im:case pm:return e;default:switch(e=e&&e.$$typeof){case lm:case dm:case sm:return e;default:return t}}case hm:case fm:case rm:return t}}}function xm(e){return bm(e)===um}em.typeOf=bm,em.AsyncMode=cm,em.ConcurrentMode=um,em.ContextConsumer=lm,em.ContextProvider=sm,em.Element=nm,em.ForwardRef=dm,em.Fragment=om,em.Lazy=hm,em.Memo=fm,em.Portal=rm,em.Profiler=am,em.StrictMode=im,em.Suspense=pm,em.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===om||e===um||e===am||e===im||e===pm||e===mm||"object"==typeof e&&null!==e&&(e.$$typeof===hm||e.$$typeof===fm||e.$$typeof===sm||e.$$typeof===lm||e.$$typeof===dm||e.$$typeof===gm||e.$$typeof===vm||e.$$typeof===ym)},em.isAsyncMode=function(e){return xm(e)||bm(e)===cm},em.isConcurrentMode=xm,em.isContextConsumer=function(e){return bm(e)===lm},em.isContextProvider=function(e){return bm(e)===sm},em.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===nm},em.isForwardRef=function(e){return bm(e)===dm},em.isFragment=function(e){return bm(e)===om},em.isLazy=function(e){return bm(e)===hm},em.isMemo=function(e){return bm(e)===fm},em.isPortal=function(e){return bm(e)===rm},em.isProfiler=function(e){return bm(e)===am},em.isStrictMode=function(e){return bm(e)===im},em.isSuspense=function(e){return bm(e)===pm},Qp.exports=em,"undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),Mp.exports.oneOfType([Mp.exports.func,Mp.exports.PropTypes.object]);var Sm=["xs","sm","md","lg","xl"];function Em(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,o=void 0===r?"px":r,i=e.step,a=void 0===i?5:i,s=Gp(e,["values","unit","step"]);function l(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(o,")")}function c(e,t){var r=Sm.indexOf(t)+1;return r===Sm.length?l(e):"@media (min-width:".concat(n[e]).concat(o,") and ")+"(max-width:".concat(n[Sm[r]]-a/100).concat(o,")")}return Up({keys:Sm,values:n,up:l,down:function(e){var t=Sm.indexOf(e)+1,r=n[Sm[t]];return t===Sm.length?l("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-a/100).concat(o,")")},between:c,only:function(e){return c(e,e)},width:function(e){return n[e]}},s)}function Mm(e,t,n){var r;return Up({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Up({paddingLeft:t(2),paddingRight:t(2)},n,_p({},e.up("sm"),Up({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(r={minHeight:56},_p(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),_p(r,e.up("sm"),{minHeight:64}),r)},n)}var Cm={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:kp.white,default:qp[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.08)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.14)",disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)"}},wm={text:{primary:kp.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:qp[800],default:"#303030"},action:{active:kp.white,hover:"rgba(255, 255, 255, 0.1)",hoverOpacity:.1,selected:"rgba(255, 255, 255, 0.2)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)"}};function km(e,t,n,r){e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=Wp(e.main,r):"dark"===t&&(e.dark=Vp(e.main,1.5*r)))}function Nm(e){var t=e.primary,n=void 0===t?{light:Ip,main:Pp,dark:Dp}:t,r=e.secondary,o=void 0===r?{light:Rp,main:Ap,dark:Lp}:r,i=e.error,a=void 0===i?{light:Np,main:Tp,dark:Op}:i,s=e.type,l=void 0===s?"light":s,c=e.contrastThreshold,u=void 0===c?3:c,d=e.tonalOffset,p=void 0===d?.2:d,m=Gp(e,["primary","secondary","error","type","contrastThreshold","tonalOffset"]);function f(e){return function(e,t){var n=Fp(e),r=Fp(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,wm.text.primary)>=u?wm.text.primary:Cm.text.primary}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;return!(e=Up({},e)).main&&e[t]&&(e.main=e[t]),km(e,"light",n,p),km(e,"dark",r,p),e.contrastText||(e.contrastText=f(e.main)),e}var g={dark:wm,light:Cm};return Zp(Up({common:kp,type:l,primary:h(n),secondary:h(o,"A400","A200","A700"),error:h(a),grey:qp,contrastThreshold:u,getContrastText:f,augmentColor:h,tonalOffset:p},g[l]),m,{clone:!1})}function Tm(e){return Math.round(1e5*e)/1e5}var Om={textTransform:"uppercase"},Rm='"Roboto", "Helvetica", "Arial", sans-serif';function Am(e,t){var n="function"==typeof t?t(e):t,r=n.fontFamily,o=void 0===r?Rm:r,i=n.fontSize,a=void 0===i?14:i,s=n.fontWeightLight,l=void 0===s?300:s,c=n.fontWeightRegular,u=void 0===c?400:c,d=n.fontWeightMedium,p=void 0===d?500:d,m=n.fontWeightBold,f=void 0===m?700:m,h=n.htmlFontSize,g=void 0===h?16:h,v=n.allVariants,y=n.pxToRem,b=Gp(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),x=a/14,S=y||function(e){return"".concat(e/g*x,"rem")},E=function(e,t,n,r,i){return Up({fontFamily:o,fontWeight:e,fontSize:S(t),lineHeight:n},o===Rm?{letterSpacing:"".concat(Tm(r/t),"em")}:{},{},i,{},v)},M={h1:E(l,96,1,-1.5),h2:E(l,60,1,-.5),h3:E(u,48,1.04,0),h4:E(u,34,1.17,.25),h5:E(u,24,1.33,0),h6:E(p,20,1.6,.15),subtitle1:E(u,16,1.75,.15),subtitle2:E(p,14,1.57,.1),body1:E(u,16,1.5,.15),body2:E(u,14,1.43,.15),button:E(p,14,1.75,.4,Om),caption:E(u,12,1.66,.4),overline:E(u,12,2.66,1,Om)};return Zp(Up({htmlFontSize:g,pxToRem:S,round:Tm,fontFamily:o,fontSize:a,fontWeightLight:l,fontWeightRegular:u,fontWeightMedium:p,fontWeightBold:f},M),b,{clone:!1})}function Lm(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var Im=["none",Lm(0,2,1,-1,0,1,1,0,0,1,3,0),Lm(0,3,1,-2,0,2,2,0,0,1,5,0),Lm(0,3,3,-2,0,3,4,0,0,1,8,0),Lm(0,2,4,-1,0,4,5,0,0,1,10,0),Lm(0,3,5,-1,0,5,8,0,0,1,14,0),Lm(0,3,5,-1,0,6,10,0,0,1,18,0),Lm(0,4,5,-2,0,7,10,1,0,2,16,1),Lm(0,5,5,-3,0,8,10,1,0,3,14,2),Lm(0,5,6,-3,0,9,12,1,0,3,16,2),Lm(0,6,6,-3,0,10,14,1,0,4,18,3),Lm(0,6,7,-4,0,11,15,1,0,4,20,3),Lm(0,7,8,-4,0,12,17,2,0,5,22,4),Lm(0,7,8,-4,0,13,19,2,0,5,24,4),Lm(0,7,9,-4,0,14,21,2,0,5,26,4),Lm(0,8,9,-5,0,15,22,2,0,6,28,5),Lm(0,8,10,-5,0,16,24,2,0,6,30,5),Lm(0,8,11,-5,0,17,26,2,0,6,32,5),Lm(0,9,11,-5,0,18,28,2,0,7,34,6),Lm(0,9,12,-6,0,19,29,2,0,7,36,6),Lm(0,10,13,-6,0,20,31,3,0,8,38,7),Lm(0,10,13,-6,0,21,33,3,0,8,40,7),Lm(0,10,14,-6,0,22,35,3,0,8,42,7),Lm(0,11,14,-7,0,23,36,3,0,9,44,8),Lm(0,11,15,-7,0,24,38,3,0,9,46,8)],Pm={borderRadius:4};function Dm(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;e="function"==typeof t?t:function(e){return t*e};var n=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return 0===n.length?e(1):1===n.length?e(n[0]):n.map((function(t){var n=e(t);return"number"==typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return t}}),n.mui=!0,n}var qm={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},zm={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195},$m=function(e){return"".concat(Math.round(e),"ms")},Bm={easing:qm,duration:zm,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,r=void 0===n?zm.standard:n,o=t.easing,i=void 0===o?qm.easeInOut:o,a=t.delay,s=void 0===a?0:a;return Gp(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof r?r:$m(r)," ").concat(i," ").concat("string"==typeof s?s:$m(s))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},Fm={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Hm(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,o=void 0===r?{}:r,i=e.palette,a=void 0===i?{}:i,s=e.shadows,l=e.spacing,c=e.typography,u=void 0===c?{}:c,d=Gp(e,["breakpoints","mixins","palette","shadows","spacing","typography"]),p=Nm(a),m=Em(n),f=Dm(l),h=Up({breakpoints:m,direction:"ltr",mixins:Mm(m,f,o),overrides:{},palette:p,props:{},shadows:s||Im,typography:Am(p,u),spacing:f},Zp({shape:Pm,transitions:Bm,zIndex:Fm},d));return h}var jm="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__",Vm=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function Wm(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,r=e.productionPrefix,o=void 0===r?"jss":r,i=e.seed,a=void 0===i?"":i,s=""===a?"":"".concat(a,"-"),l=0;return function(e,t){l+=1;var r=t.options.name;if(r&&0===r.indexOf("Mui")&&!t.options.link&&!n){if(-1!==Vm.indexOf(e.key))return"Mui-".concat(e.key);var i="".concat(s).concat(r,"-").concat(e.key);return t.options.theme[jm]&&""===a?"".concat(i,"-").concat(l):i}return"".concat(s).concat(o).concat(l)}}function _m(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.props||!t.props[n])return r;var o,i=t.props[n];for(o in i)void 0===r[o]&&(r[o]=i[o]);return r}var Um="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ym="object"===("undefined"==typeof window?"undefined":Um(window))&&"object"===("undefined"==typeof document?"undefined":Um(document))&&9===document.nodeType;function Gm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Km(e,t,n){return t&&Gm(e.prototype,t),n&&Gm(e,n),e}function Xm(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Jm(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Zm={}.constructor;function Qm(e){if(null==e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(Qm);if(e.constructor!==Zm)return e;var t={};for(var n in e)t[n]=Qm(e[n]);return t}function ef(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,o=Qm(t),i=r.plugins.onCreateRule(e,o,n);return i||(e[0],null)}var tf=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n};function nf(e,t){if(void 0===t&&(t=!1),!Array.isArray(e))return e;var n="";if(Array.isArray(e[0]))for(var r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=", "),n+=tf(e[r]," ");else n=tf(e,", ");return t||"!important"!==e[e.length-1]||(n+=" !important"),n}function rf(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function of(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var o=n.indent,i=void 0===o?0:o,a=t.fallbacks;if(e&&i++,a)if(Array.isArray(a))for(var s=0;s<a.length;s++){var l=a[s];for(var c in l){var u=l[c];null!=u&&(r&&(r+="\n"),r+=""+rf(c+": "+nf(u)+";",i))}}else for(var d in a){var p=a[d];null!=p&&(r&&(r+="\n"),r+=""+rf(d+": "+nf(p)+";",i))}for(var m in t){var f=t[m];null!=f&&"fallbacks"!==m&&(r&&(r+="\n"),r+=""+rf(m+": "+nf(f)+";",i))}return(r||n.allowEmpty)&&e?(r&&(r="\n"+r+"\n"),rf(e+" {"+r,--i)+rf("}",i)):r}var af=/([[\].#*$><+~=|^:(),"'`\s])/g,sf="undefined"!=typeof CSS&&CSS.escape,lf=function(e){return sf?sf(e):e.replace(af,"\\$1")},cf=function(){function e(e,t,n){this.type="style",this.key=void 0,this.isProcessed=!1,this.style=void 0,this.renderer=void 0,this.renderable=void 0,this.options=void 0;var r=n.sheet,o=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:o&&(this.renderer=new o)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var o=t;n&&!1===n.process||(o=this.options.jss.plugins.onChangeValue(t,e,this));var i=null==o||!1===o,a=e in this.style;if(i&&!a&&!r)return this;var s=i&&a;if(s?delete this.style[e]:this.style[e]=o,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,o),this;var l=this.options.sheet;return l&&l.attached,this},e}(),uf=function(e){function t(t,n,r){var o;(o=e.call(this,t,n,r)||this).selectorText=void 0,o.id=void 0,o.renderable=void 0;var i=r.selector,a=r.scoped,s=r.sheet,l=r.generateId;return i?o.selectorText=i:!1!==a&&(o.id=l(Jm(Jm(o)),s),o.selectorText="."+lf(o.id)),o}Xm(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!=typeof n?e[t]=n:Array.isArray(n)&&(e[t]=nf(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?Up({},e,{allowEmpty:!0}):e;return of(this.selectorText,this.style,n)},Km(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(cf),df={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new uf(e,t,n)}},pf={indent:1,children:!0},mf=/@([\w-]+)/,ff=function(){function e(e,t,n){this.type="conditional",this.at=void 0,this.key=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e;var r=e.match(mf);for(var o in this.at=r?r[1]:"unknown",this.options=n,this.rules=new qf(Up({},n,{parent:this})),t)this.rules.add(o,t[o]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.toString=function(e){if(void 0===e&&(e=pf),null==e.indent&&(e.indent=pf.indent),null==e.children&&(e.children=pf.children),!1===e.children)return this.key+" {}";var t=this.rules.toString(e);return t?this.key+" {\n"+t+"\n}":""},e}(),hf=/@media|@supports\s+/,gf={onCreateRule:function(e,t,n){return hf.test(e)?new ff(e,t,n):null}},vf={indent:1,children:!0},yf=/@keyframes\s+([\w-]+)/,bf=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.key=void 0,this.name=void 0,this.id=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0;var r=e.match(yf);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var o=n.scoped,i=n.sheet,a=n.generateId;for(var s in this.id=!1===o?this.name:lf(a(this,i)),this.rules=new qf(Up({},n,{parent:this})),t)this.rules.add(s,t[s],Up({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){if(void 0===e&&(e=vf),null==e.indent&&(e.indent=vf.indent),null==e.children&&(e.children=vf.children),!1===e.children)return this.at+" "+this.id+" {}";var t=this.rules.toString(e);return t&&(t="\n"+t+"\n"),this.at+" "+this.id+" {"+t+"}"},e}(),xf=/@keyframes\s+/,Sf=/\$([\w-]+)/g,Ef=function(e,t){return"string"==typeof e?e.replace(Sf,(function(e,n){return n in t?t[n]:e})):e},Mf=function(e,t,n){var r=e[t],o=Ef(r,n);o!==r&&(e[t]=o)},Cf={onCreateRule:function(e,t,n){return"string"==typeof e&&xf.test(e)?new bf(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&Mf(e,"animation-name",n.keyframes),"animation"in e&&Mf(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return Ef(e,r.keyframes);default:return e}}},wf=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).renderable=void 0,t}return Xm(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?Up({},e,{allowEmpty:!0}):e;return of(this.key,this.style,n)},t}(cf),kf={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new wf(e,t,n):null}},Nf=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.style)){for(var t="",n=0;n<this.style.length;n++)t+=of(this.key,this.style[n]),this.style[n+1]&&(t+="\n");return t}return of(this.key,this.style,e)},e}(),Tf={onCreateRule:function(e,t,n){return"@font-face"===e?new Nf(e,t,n):null}},Of=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.key=void 0,this.style=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return of(this.key,this.style,e)},e}(),Rf={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new Of(e,t,n):null}},Af=function(){function e(e,t,n){this.type="simple",this.key=void 0,this.value=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),Lf={"@charset":!0,"@import":!0,"@namespace":!0},If=[df,gf,Cf,kf,Tf,Rf,{onCreateRule:function(e,t,n){return e in Lf?new Af(e,t,n):null}}],Pf={process:!0},Df={force:!0,process:!0},qf=function(){function e(e){this.map={},this.raw={},this.index=[],this.options=void 0,this.classes=void 0,this.keyframes=void 0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,n){var r=this.options,o=r.parent,i=r.sheet,a=r.jss,s=r.Renderer,l=r.generateId,c=r.scoped,u=Up({classes:this.classes,parent:o,sheet:i,jss:a,Renderer:s,generateId:l,scoped:c},n);this.raw[e]=t,e in this.classes&&(u.selector="."+lf(this.classes[e]));var d=ef(e,t,u);if(!d)return null;this.register(d);var p=void 0===u.index?this.index.length:u.index;return this.index.splice(p,0,d),d},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof uf?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof bf&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof uf?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof bf&&delete this.keyframes[e.name]},t.update=function(){var e,t,n;if("string"==typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.onUpdate(t,this.get(e),n);else for(var r=0;r<this.index.length;r++)this.onUpdate(t,this.index[r],n)},t.onUpdate=function(t,n,r){void 0===r&&(r=Pf);var o=this.options,i=o.jss.plugins,a=o.sheet;if(n.rules instanceof e)n.rules.update(t,r);else{var s=n,l=s.style;if(i.onUpdate(t,n,a,r),r.process&&l&&l!==s.style){for(var c in i.onProcessStyle(s.style,s,a),s.style){var u=s.style[c];u!==l[c]&&s.prop(c,u,Df)}for(var d in l){var p=s.style[d],m=l[d];null==p&&p!==m&&s.prop(d,null,Df)}}}},t.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,o=0;o<this.index.length;o++){var i=this.index[o].toString(e);(i||r)&&(t&&(t+="\n"),t+=i)}return t},e}(),zf=function(){function e(e,t){for(var n in this.options=void 0,this.deployed=void 0,this.attached=void 0,this.rules=void 0,this.renderer=void 0,this.classes=void 0,this.keyframes=void 0,this.queue=void 0,this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=Up({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new qf(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var o=this.rules.add(e,t,n);return o?(this.options.jss.plugins.onProcessRule(o),this.attached?this.deployed?(r?r.push(o):(this.insertRule(o),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),o):o:(this.deployed=!1,o)):null},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var o=this.addRule(r,e[r],t);o&&n.push(o)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t=this.rules.get(e);return!!t&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.toString=function(e){return this.rules.toString(e)},e}(),$f=function(){function e(){this.plugins={internal:[],external:[]},this.registry=void 0}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var o=this.registry.onCreateRule[r](e,t,n);if(o)return o}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var o=0;o<this.registry.onUpdate.length;o++)this.registry.onUpdate[o](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,o=0;o<this.registry.onChangeValue.length;o++)r=this.registry.onChangeValue[o](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),Bf=new(function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=Yp(t,["attached"]),o="",i=0;i<this.registry.length;i++){var a=this.registry[i];null!=n&&a.attached!==n||(o&&(o+="\n"),o+=a.toString(r))}return o},Km(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}()),Ff="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),Hf="2f1acc6c3a606b082e5eef5e54414ffb";null==Ff[Hf]&&(Ff[Hf]=0);var jf=Ff[Hf]++,Vf=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var o="",i="";return r&&(r.options.classNamePrefix&&(i=r.options.classNamePrefix),null!=r.options.jss.id&&(o=String(r.options.jss.id))),e.minify?""+(i||"c")+jf+o+t:i+n.key+"-"+jf+(o?"-"+o:"")+"-"+t}},Wf=function(e){var t;return function(){return t||(t=e()),t}};function _f(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(e){return""}}function Uf(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=nf(n,!0),"!important"===n[n.length-1]))return e.style.setProperty(t,r,"important"),!0;e.attributeStyleMap?e.attributeStyleMap.set(t,r):e.style.setProperty(t,r)}catch(e){return!1}return!0}function Yf(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(e){}}function Gf(e,t){return e.selectorText=t,e.selectorText===t}var Kf=Wf((function(){return document.querySelector("head")}));function Xf(e){var t=Bf.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if((n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e))&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"==typeof r){var o=function(e){for(var t=Kf(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(o)return{parent:o.parentNode,node:o.nextSibling}}return!1}var Jf=Wf((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),Zf=function(e,t,n){var r=e.cssRules.length;(void 0===n||n>r)&&(n=r);try{if("insertRule"in e)e.insertRule(t,n);else if("appendRule"in e){e.appendRule(t)}}catch(e){return!1}return e.cssRules[n]},Qf=function(){function e(e){this.getPropertyValue=_f,this.setProperty=Uf,this.removeProperty=Yf,this.setSelector=Gf,this.element=void 0,this.sheet=void 0,this.hasInsertedRules=!1,e&&Bf.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,o=t.element;this.element=o||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var i=Jf();i&&this.element.setAttribute("nonce",i)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=Xf(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"==typeof n.nodeType){var o=n,i=o.parentNode;i&&i.insertBefore(e,o.nextSibling)}else Kf().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){var e=this.element.parentNode;e&&e.removeChild(this.element)},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,o=n;return("conditional"!==e.type&&"keyframes"!==e.type||!1!==(o=Zf(n,r.toString({children:!1}),t)))&&(this.insertRules(r.rules,o),o)}if(e.renderable&&e.renderable.parentStyleSheet===this.element.sheet)return e.renderable;var i=e.toString();if(!i)return!1;var a=Zf(n,i,t);return!1!==a&&(this.hasInsertedRules=!0,e.renderable=a,a)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),!0)},t.indexOf=function(e){for(var t=this.element.sheet.cssRules,n=0;n<t.length;n++)if(e===t[n])return n;return-1},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),eh=0,th=function(){function e(e){this.id=eh++,this.version="10.0.0",this.plugins=new $f,this.options={id:{minify:!1},createGenerateId:Vf,Renderer:Ym?Qf:null,plugins:[]},this.generateId=Vf({minify:!1});for(var t=0;t<If.length;t++)this.plugins.use(If[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=Up({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!=typeof n&&(n=0===Bf.index?0:Bf.index+1);var r=new zf(e,Up({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r},t.removeStyleSheet=function(e){return e.detach(),Bf.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"==typeof e)return this.createRule(void 0,e,t);var r=Up({},n,{jss:this,Renderer:this.options.Renderer});r.generateId||(r.generateId=this.generateId),r.classes||(r.classes={}),r.keyframes||(r.keyframes={});var o=ef(e,t,r);return o&&this.plugins.onProcessRule(o),o},t.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e.plugins.use(t)})),this},e}();function nh(e){var t=null;for(var n in e){var r=e[n],o=typeof r;if("function"===o)t||(t={}),t[n]=r;else if("object"===o&&null!==r&&!Array.isArray(r)){var i=nh(r);i&&(t||(t={}),t[n]=i)}}return t}
|
|
7
|
+
System.register(["@nebula.js/stardust","qlik-chart-modules","hammerjs","picasso.js","picasso-plugin-q","react","react-dom","qlik-object-conversion"],(function(e){"use strict";var t,n,r,i,o,a,s,l,u,c,d,m,h,f,p,y,g,v,x,b,S,E,M,C,A,O,T,N,w,R,I,k,L,P,q,D,$,z,_,H,B,F,j,V,U,Y;return{setters:[function(e){t=e.useElement,n=e.useState,r=e.useEffect,i=e.useRect,o=e.usePromise,a=e.useStaleLayout,s=e.useModel,l=e.useApp,u=e.useAppLayout,c=e.usePlugins,d=e.useEmbed,m=e.useOptions,h=e.useTranslator,f=e.useTheme,p=e.useDeviceType,y=e.useConstraints,g=e.useLayout,v=e.useAction,x=e.useSelections,b=e.onTakeSnapshot,S=e.useImperativeHandle},function(e){E=e.getValue,M=e.setValue,C=e.cache,A=e.debouncer,O=e.throttler,T=e.colorService,N=e.tooltipService,w=e.layoutService,R=e.dockService,I=e.themeService,k=e.pluginService,L=e.storage,P=e.selectionService,q=e.fontResolver},function(e){D=e.default},function(e){$=e.default},function(e){z=e.default},function(e){_=e.default,H=e,B=e.Children,F=e.isValidElement,j=e.cloneElement},function(e){V=e,U=e.default},function(e){Y=e.default}],execute:function(){function W(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}e("default",(function(e){var i,o;const{flags:a}=e,s=null===(i=e.anything)||void 0===i||null===(o=i.sense)||void 0===o?void 0:o.isUnsupportedFeature,l=Ab();return{qae:LC(e),ext:aA(e),component(){const e=function(){const[e,t]=n();return r((()=>t(C())),[]),e}(),i=function(){const[e,t]=n();return r((()=>{t(L({viewRange:[0,1],scrollOffset:void 0}))}),[]),e}(),o=function(){const e=m(),t=h(),i=d(),o=f(),[a,s]=n(),l=p();return r((()=>{s({options:{direction:"ltr",...e},translator:t,theme:o,embed:i,deviceType:l})}),[e.direction,e.freeResize,t.language(),o.name(),l]),a}(),u=function(){const e=y(),[t,i]=n(!1),[o,a]=n(!1),[s,l]=n(!1),u=function(){const e=y(),[t,i]=n(!1),[o,a]=n({}),[s,l]=n();return r((()=>()=>{a({})}),[]),r((()=>{e&&i(!e.select&&!e.active)}),[e]),{enabled:()=>t,emit:(e,...t)=>o[e].forEach((e=>e(...t))),removeListener:(e,t)=>{var n;const r=null===(n=o[e])||void 0===n?void 0:n.indexOf(t);r>-1&&o[e].splice(r,1)},on:(e,t)=>{Array.isArray(o[e])?o[e].push(t):o[e]=[t]},get brushSelectionIncludeMax(){return s},set brushSelectionIncludeMax(e){l(e)},getBrushOptions:void 0}}(),c=function(){var e,t,i;const o=y(),[a,s]=n(!1),[l,u]=n(!1),c=g(),d=h(),m=!!c.qSelectionInfo.qInSelections,f=!(null===(e=c.qHyperCube)||void 0===e||null===(t=e.qDimensionInfo)||void 0===t||null===(i=t[0])||void 0===i||!i.qIsOneAndOnlyOne);r((()=>{o&&s(!o.select&&!o.active)}),[o]);const p=e=>{u("boolean"==typeof e?e:!l)};return v((()=>({key:"lasso",label:d.get(l?"Tooltip.ToggleOffLassoSelection":"Tooltip.ToggleOnLassoSelection"),icon:MC,hidden:!a||!m||f,active:l,action:p})),[m,f,l,a,d.language()]),{action:p,enabled:()=>a,active:()=>l}}();let d=CC;r((()=>{e&&(i(!e.active),a(!e.active),l(!e.passive))}),[e]);const[m]=n({});return m.scroll={enabled:()=>t&&d.query.getCanScroll(),attachDiscreteModel:e=>{d=e||CC}},m.interact={enabled:()=>o},m.tooltip={enabled:()=>s},m.lasso=c,m.select=u,m}(),c=function({picasso:e,environment:i}){const o=t(),[a,s]=n();return r((()=>{if(!i)return;o.style.overflow="hidden";const t=e({renderer:{prio:[i.options.renderer||"canvas"]}}).chart({element:o,data:[],settings:{}});s(t);const{destroy:n}=t;return()=>{n()}}),[i]),a}({picasso:l,environment:o}),x=TC({chart:c,actions:u}),b=EC({picasso:l,chart:c,environment:o,flags:a,viewState:i,viewCache:e,actions:u,selectionService:x});Om({picasso:l,chart:c,models:b,environment:o,viewState:i,viewCache:e,actions:u}),Em({picasso:l,chart:c,models:b,environment:o,viewState:i,viewCache:e,actions:u,isUnsupportedFeature:s}),PC({models:b,chart:c,viewState:i})}}}));var X=Object.prototype.hasOwnProperty,G=Object.prototype.toString,K=Object.defineProperty,J=Object.getOwnPropertyDescriptor,Z=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===G.call(e)},Q=function(e){if(!e||"[object Object]"!==G.call(e))return!1;var t,n=X.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&X.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||X.call(e,t)},ee=function(e,t){K&&"__proto__"===t.name?K(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},te=function(e,t){if("__proto__"===t){if(!X.call(e,t))return;if(J)return J(e,t).value}return e[t]},ne=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<u;++l)if(null!=(t=arguments[l]))for(n in t)r=te(s,n),s!==(i=te(t,n))&&(c&&i&&(Q(i)||(o=Z(i)))?(o?(o=!1,a=r&&Z(r)?r:[]):a=r&&Q(r)?r:{},ee(s,{name:n,newValue:e(c,a,i)})):void 0!==i&&ee(s,{name:n,newValue:i}));return s},re=W(ne);const ie="center",oe="bottom";var ae={NoDataExist:{label:"NoDataExist",alignment:ie,default:!0},OnlyNanData:{label:"OnlyNanData",alignment:ie,default:!0},OnlyNegativeOrZeroValues:{label:"OnlyNegativeOrZeroValues",alignment:ie,default:!1},LimitedData:{label:"LimitedData",alignment:oe,default:!1},OnlyNanColor:{label:"OnlyNanColor",alignment:oe,default:!1},NegativeOrZeroValues:{label:"NegativeOrZeroValues",alignment:oe,default:!1},DataRangeIncludingZero:{label:"DataRangeIncludingZero",alignment:oe,default:!1}};const se=[["FULL",{width:550,height:450}],["MEDIUM",{width:400,height:220}],["SMALL",{width:300,height:150}],["XSMALL",{width:150,height:75}],["SPARK",{width:0,height:0}]],le={};se.forEach((([e,{width:t,height:n}])=>{le[e]={width:t,height:n}}));const ue={getLayoutModes:()=>le,getLayoutMode(e,t){let n;for(n=0;n<se.length;++n)if(e>=se[n][1].width&&t>=se[n][1].height)return se[n][0];return"SPARK"}};const ce=["$date","$timestamp","$time"],de=["D","TS","T"],me={hasTimeTag:e=>!!(e&&e.qTags&&e.qTags.some((e=>ce.some((t=>t===e))))),hasUnknownFormat:e=>!(!e||!e.qNumFormat||"U"!==e.qNumFormat.qType),hasTimeFormat:e=>!!(e&&e.qNumFormat&&de.some((t=>t===e.qNumFormat.qType))),isTimeDimension:(e,t)=>!!(e&&t&&(me.hasTimeTag(t)&&me.hasUnknownFormat(t)||me.hasTimeFormat(t))),isTime:(e,t)=>!!(t&&t.qHyperCube.qDimensionInfo&&t.qHyperCube.qDimensionInfo.length)&&(e&&me.isTimeDimension(e,t.qHyperCube.qDimensionInfo[0])),canBeContinuousDimension(e){if(!e)return!1;const t=e.qTags||[];return!(!e.qContinuousAxes||!t.some((e=>"$numeric"===e)))},canBeContinuous(e){var t,n,r;const i=null==e||null===(t=e.qHyperCube)||void 0===t||null===(n=t.qDimensionInfo)||void 0===n?void 0:n.filter((e=>{var t;return 7005!==(null===(t=e.qError)||void 0===t?void 0:t.qErrorCode)}));return!((null!==(r=null==i?void 0:i.length)&&void 0!==r?r:0)<1)&&me.canBeContinuousDimension(i[0])},maxNumberOfLines:12},he=/^[A-Z][A-z0-9_]*$/i,fe={setValue:(e,t,n)=>{if(!t)return!1;const r=t.split("."),i=r[r.length-1];let o,a=e;for(o=0;o<r.length-1;++o)void 0===a[r[o]]&&(a[r[o]]=Number.isNaN(+r[o+1])?{}:[]),a=a[r[o]];if(void 0!==n){const e=a[i];return a[i]=n,{updated:n,previous:e}}return delete a[i],!1},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(void 0===o[r[i]])return n;o=o[r[i]]}return o},moveArrayElement:(e,t,n)=>{if(n>=e.length){let t=n-e.length;for(;1+t--;)e.push(void 0)}e.splice(n,0,e.splice(t,1)[0])},escapeField:e=>{let t;return t=!e||"]"===e||he.test(e)?e:`[${e.replace(/\]/g,"]]")}]`,t},deleteUndefinedProperties:e=>{Object.keys(e).forEach((t=>{void 0===e[t]&&delete e[t]}))}},pe=e=>fe.getValue(e,"qHyperCube.qDimensionInfo",[]),ye=e=>fe.getValue(e,"qHyperCube.qMeasureInfo",[]),ge=e=>fe.getValue(e,"barGrouping.grouping"),ve={continuous:(e,t=!1)=>!!me.canBeContinuous(e)&&(fe.getValue(e,"dimensionAxis.continuousAuto")?"function"==typeof t?t():t:!!e.preferContinuousAxis),dimensionless:e=>!pe(e).length,grouped(e){return!this.dimensionless(e)&&"grouped"===ge(e)&&(pe(e).length>1||ye(e).length>1)&&!this.continuous(e)},groupedByDimension(e){return this.grouped(e)&&pe(e).length>1&&1===ye(e).length},groupedByMeasure(e){return this.grouped(e)&&1===pe(e).length&&ye(e).length>1},stacked(e){return(!this.dimensionless(e)&&"grouped"!==ge(e)||this.continuous(e))&&(pe(e).length>1||ye(e).length>1)},stackedByDimension(e){return this.stacked(e)&&pe(e).length>1&&1===ye(e).length},stackedByMeasure(e){return this.stacked(e)&&1===pe(e).length&&ye(e).length>1},simple:e=>0===pe(e).length||1===pe(e).length&&1===ye(e).length,snapshot:e=>!!fe.getValue(e,"snapshotData")};function xe(e,t){const n=e.component(t);return n&&n._DO_NOT_USE_getInfo&&n._DO_NOT_USE_getInfo().offset}const be=e=>{throw e.isHandled=!0,e};const Se={getDockValue:e=>"near"===e||"left"===e||"top"===e?0:1,getOppositeDock(e){switch(e){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top";case"near":default:return"far";case"far":return"near"}},getHorizontalDock:e=>"near"===e||"left"===e?"left":"right",getVerticalDock:e=>"near"===e||"bottom"===e?"bottom":"top",getDock:(e,t,n)=>"vertical"===e||"y"===e?Se.getVerticalDock(t):n?Se.getOppositeDock(Se.getHorizontalDock(t)):Se.getHorizontalDock(t),getInvertedOrientation:e=>"vertical"===e?"horizontal":"vertical",getMinorScaleAxis:e=>"vertical"===e?"y":"x",getMajorScaleAxis:e=>"vertical"===e?"x":"y",getAlignment:(e,t)=>"vertical"===e?"near"===t||"bottom"===t?1:0:"near"===t||"left"===t?0:1,getMeasureScaleInvert:(e,t)=>"vertical"===e||t,getDimensionScaleInvert:(e,t)=>"horizontal"===e&&t,getSize:(e,{width:t,height:n})=>"vertical"===e?t:n},Ee={stringWidthOverMWidth:e=>(12*Math.min(e,3)+6.384615384615385*Math.max(e-3,0))/11,getCharacterRatios(e){if(!e)return{latin:0,cjk:0};let t=e.match(/[\u4E00-\u9FFF]/g),n=e.match(/[\u3040-\u309F]/g),r=e.match(/[\u30A0-\u30FF]/g);t=t?t.length:0,n=n?n.length:0,r=r?r.length:0;const i=t+n+r;return{latin:e.length-i,cjk:i}},getTotalCharacterRatios(e,t,n="qText"){if(!e)return{latinRatio:1,cjkRatio:0};const r={latin:0,cjk:0};let i;void 0===t?e.forEach((e=>{i=Ee.getCharacterRatios(e[n]),r.latin+=i.latin,r.cjk+=i.cjk})):e.forEach((e=>{i=Ee.getCharacterRatios(e[t][n]),r.latin+=i.latin,r.cjk+=i.cjk}));const o=Math.max(1,r.latin+r.cjk);return r.latinRatio=r.latin/o,r.cjkRatio=r.cjk/o,r},getAdjustedMaxGlyphCount(e,t,n,r="qText"){const i=Ee.getTotalCharacterRatios(t,n,r),o=i.latinRatio*e,a=i.cjkRatio*e;return Math.ceil(Ee.stringWidthOverMWidth(o)+1.0909090909090908*a)}},Me=new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ʸʻ-ˁː-ˑˠ-ˤˮͰ-ͳͶ-ͽΆΈ-ϵϷ-҂Ҋ-։ः-हऻऽ-ीॉ-ौॎ-ॐक़-ॡ।-ॿং-হঽ-ীে-ৌৎ-ৡ০-ৱ৴-৺ਃ-ਹਾ-ੀਖ਼-੯ੲ-ੴઃ-હઽ-ીૉ-ૌૐ-ૡ૦-૯ଂ-ହଽ-ାୀେ-ୌୗ-ୡ୦-୷ஃ-ிு-ௌௐ-௲ఁ-ఽు-ౄౘ-ౡ౦-౯౿-ಹಽ-ೋೕ-ೡ೦-ീെ-ൌൎ-ൡ൦-ෆා-ෑෘ-ะา-ำเ-ๆ๏-ະາ-ຳຽ-ໆ໐-༗༚-༴༶༸༾-ཬཿ྅ྈ-ྌ྾-࿅࿇-ာေးျ-ြဿ-ၗၚ-ၝၡ-ၰၵ-ႁႃ-ႄႇ-ႌႎ-ႜ႞-ፚ፠-ᎏᎠ-Ᏼᐁ-ᙿᚁ-ᚚᚠ-ᜑᜠ-ᜱ᜵-ᝑᝠ-ᝰក-ាើ-ៅះ-ៈ។-៚ៜ០-៩᠐-ᢨᢪ-ᤜᤣ-ᤦᤩ-ᤱᤳ-ᤸ᥆-᧚ᨀ-ᨖᨙ-ᩕᩗᩡᩣ-ᩤᩭ-ᩲ᪀-᪭ᬄ-ᬳᬵᬻᬽ-ᭁᭃ-᭪᭴-᭼ᮂ-ᮡᮦ-ᮧ᮪-ᯥᯧᯪ-ᯬᯮ᯲-ᰫᰴ-ᰵ᰻-᱿᳓᳡ᳩ-ᳬᳮ-ᶿḀ-ᾼιῂ-ῌῐ-Ίῠ-Ῥῲ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎ-⅏Ⅰ-ↈ⌶-⍺⎕⒜-ⓩ⚬⠀-⣿Ⰰ-ⳤⳫ-ⳮⴀ-⵰ⶀ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ㆺㇰ-㈜㈠-㉏㉠-㉻㉿-㊰㋀-㋋㋐-㍶㍻-㏝㏠-㏾㐀-䶵一-ꒌꓐ-ꘌꘐ-ꙮꚀ-ꛯ꛲-꛷Ꜣ-ꞇ꞉-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠤꠧ꠰-꠷ꡀ-ꡳꢀ-ꣃ꣎-꣙ꣲ-ꤥ꤮-ꥆꥒ-ꥼꦃ-ꦲꦴ-ꦵꦺ-ꦻꦽ-ꨨꨯ-ꨰꨳ-ꨴꩀ-ꩂꩄ-ꩋꩍ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂ-ꯤꯦ-ꯧꯩ-꯬꯰-ﬗA-Za-zヲ-ᅵ]"),Ce=new RegExp("[־׀׃׆א-״߀-ߪߴ-ߵߺ-ࠕࠚࠤࠨ࠰-ࡘ࡞יִײַ-ﬨשׁ-ﭏ]"),Ae=new RegExp("[؈؋؍؛-ي٭-ٯٱ-ەۥ-ۦۮ-ۯۺ-܍ܐܒ-ܯݍ-ޥޱﭐ-ﴽﵐ-﷼ﹰ-ﻼ]"),Oe={lrm:String.fromCharCode(8206),rlm:String.fromCharCode(8207),isLtrChar:e=>Me.test(e),isRtlChar:e=>Ce.test(e)||Ae.test(e),detectTextDirection(e){const t=e?e.length:0;let n,r;for(n=0;n<t;n++){if(r=e[n],Oe.isLtrChar(r))return"ltr";if(Oe.isRtlChar(r))return"rtl"}return"ltr"}},Te={getColorSymbol:(e,t)=>e.h("div",{style:{display:"inline-block",width:"10px",height:"10px","background-color":t.color.fill,margin:"0 8px"}}),getNodeFillColor:e=>e.attrs&&void 0!==e.attrs.fill?e.attrs.fill:e.children&&e.children[0]&&e.children[0].attrs&&void 0!==e.children[0].attrs.fill?e.children[0].attrs.fill:void 0,getColor(e,t,n){const r=t.data,i=e.resources.formatter,o=e.resources.dataset,a={};if(n.coloring.label&&(a.label=`${n.coloring.label}`),"color"!==n.coloring.type&&r.fillTooltip){const e=i("fill"),t="measure"===n.coloring.fieldType;if(a.value=t&&e?e(r.fillTooltip.value):r.fillTooltip.label?r.fillTooltip.label:r.fillTooltip.value,!n.coloring.label){const e=o(r.fillTooltip.source.key).field(r.fillTooltip.source.field).title();a.label=`${e}`}}return a.fill=void 0===r._fillColor?Te.getNodeFillColor(t):r._fillColor,a},getMeasure:(e,t)=>({label:`${e(t.source.key).field(t.source.field).title()}`,value:""===t.label||"NaN"===t.label?"-":t.label,field:t.source.field}),hideColorRow:(e,t)=>void 0===e.color.value||e.measures.some((e=>e.field===t.coloring.field)),getTitleRow(e,t){const n=Oe.detectTextDirection(e.title);return[{content:e.title,style:{"font-weight":"bold","text-align":t?"right":"left",direction:n},colspan:2},{}]},getDescriptionRow(e,t){const n=Oe.detectTextDirection(e.value);return[{content:e.value,style:{"text-align":t?"right":"left",direction:n},colspan:2},{}]},getNMoreRow(e,t,n){const r=t?t.get("Object.ChartTooltip.NMore",e):`+${e} more`;return[{content:r,style:{"font-weight":"bold","text-align":n?"right":"left",direction:Oe.detectTextDirection(r)},colspan:2},{}]},getSeparatorRow:()=>[{content:"",style:{"background-image":"linear-gradient(transparent 8px, rgba(255, 255, 255, 0.4) 8px, rgba(255, 255, 255, 0.4) 9.2px, transparent 9.2px)",height:"17px"},colspan:2},{}],getColorRow(e,t,n){const r=Oe.detectTextDirection(t.color.label),i=n?[":",t.color.label]:[t.color.label,":"],o=Oe.detectTextDirection(t.color.value);return[{content:i,style:{"text-align":n?"right":"left",direction:r}},{content:n?[t.color.value,Te.getColorSymbol(e,t)]:[Te.getColorSymbol(e,t),t.color.value],style:{"text-align":n?"left":"right",direction:o,"vertical-align":"middle"}}]},getMeasureRow(e,t,n,r,i=!1){const o=Oe.detectTextDirection(e.label),a=r?[":",e.label]:[e.label,":"],s=Oe.detectTextDirection(e.value);let l;return l=i?r?[e.value,Te.getColorSymbol(t,n)]:[Te.getColorSymbol(t,n),e.value]:[e.value],[{content:a,style:{"text-align":r?"right":"left",direction:o}},{content:l,style:{"text-align":r?"left":"right",direction:s,"vertical-align":"middle"}}]}};function Ne(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function we(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Re(){}var Ie=.7,ke=1/Ie,Le="\\s*([+-]?\\d+)\\s*",Pe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qe="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",De=/^#([0-9a-f]{3,8})$/,$e=new RegExp(`^rgb\\(${Le},${Le},${Le}\\)$`),ze=new RegExp(`^rgb\\(${qe},${qe},${qe}\\)$`),_e=new RegExp(`^rgba\\(${Le},${Le},${Le},${Pe}\\)$`),He=new RegExp(`^rgba\\(${qe},${qe},${qe},${Pe}\\)$`),Be=new RegExp(`^hsl\\(${Pe},${qe},${qe}\\)$`),Fe=new RegExp(`^hsla\\(${Pe},${qe},${qe},${Pe}\\)$`),je={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ve(){return this.rgb().formatHex()}function Ue(){return this.rgb().formatRgb()}function Ye(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=De.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?We(t):3===n?new Je(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Xe(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Xe(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=$e.exec(e))?new Je(t[1],t[2],t[3],1):(t=ze.exec(e))?new Je(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=_e.exec(e))?Xe(t[1],t[2],t[3],t[4]):(t=He.exec(e))?Xe(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Be.exec(e))?rt(t[1],t[2]/100,t[3]/100,1):(t=Fe.exec(e))?rt(t[1],t[2]/100,t[3]/100,t[4]):je.hasOwnProperty(e)?We(je[e]):"transparent"===e?new Je(NaN,NaN,NaN,0):null}function We(e){return new Je(e>>16&255,e>>8&255,255&e,1)}function Xe(e,t,n,r){return r<=0&&(e=t=n=NaN),new Je(e,t,n,r)}function Ge(e){return e instanceof Re||(e=Ye(e)),e?new Je((e=e.rgb()).r,e.g,e.b,e.opacity):new Je}function Ke(e,t,n,r){return 1===arguments.length?Ge(e):new Je(e,t,n,null==r?1:r)}function Je(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Ze(){return`#${nt(this.r)}${nt(this.g)}${nt(this.b)}`}function Qe(){const e=et(this.opacity);return`${1===e?"rgb(":"rgba("}${tt(this.r)}, ${tt(this.g)}, ${tt(this.b)}${1===e?")":`, ${e})`}`}function et(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function tt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function nt(e){return((e=tt(e))<16?"0":"")+e.toString(16)}function rt(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ot(e,t,n,r)}function it(e){if(e instanceof ot)return new ot(e.h,e.s,e.l,e.opacity);if(e instanceof Re||(e=Ye(e)),!e)return new ot;if(e instanceof ot)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new ot(a,s,l,e.opacity)}function ot(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function at(e){return(e=(e||0)%360)<0?e+360:e}function st(e){return Math.max(0,Math.min(1,e||0))}function lt(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Ne(Re,Ye,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ve,formatHex:Ve,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return it(this).formatHsl()},formatRgb:Ue,toString:Ue}),Ne(Je,Ke,we(Re,{brighter(e){return e=null==e?ke:Math.pow(ke,e),new Je(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Ie:Math.pow(Ie,e),new Je(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Je(tt(this.r),tt(this.g),tt(this.b),et(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ze,formatHex:Ze,formatHex8:function(){return`#${nt(this.r)}${nt(this.g)}${nt(this.b)}${nt(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Qe,toString:Qe})),Ne(ot,(function(e,t,n,r){return 1===arguments.length?it(e):new ot(e,t,n,null==r?1:r)}),we(Re,{brighter(e){return e=null==e?ke:Math.pow(ke,e),new ot(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Ie:Math.pow(Ie,e),new ot(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Je(lt(e>=240?e-240:e+120,i,r),lt(e,i,r),lt(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new ot(at(this.h),st(this.s),st(this.l),et(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=et(this.opacity);return`${1===e?"hsl(":"hsla("}${at(this.h)}, ${100*st(this.s)}%, ${100*st(this.l)}%${1===e?")":`, ${e})`}`}}));const ut=Math.PI/180,ct=180/Math.PI,dt=.96422,mt=1,ht=.82521,ft=4/29,pt=6/29,yt=3*pt*pt,gt=pt*pt*pt;function vt(e){if(e instanceof xt)return new xt(e.l,e.a,e.b,e.opacity);if(e instanceof At)return Ot(e);e instanceof Je||(e=Ge(e));var t,n,r=Mt(e.r),i=Mt(e.g),o=Mt(e.b),a=bt((.2225045*r+.7168786*i+.0606169*o)/mt);return r===i&&i===o?t=n=a:(t=bt((.4360747*r+.3850649*i+.1430804*o)/dt),n=bt((.0139322*r+.0971045*i+.7141733*o)/ht)),new xt(116*a-16,500*(t-a),200*(a-n),e.opacity)}function xt(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function bt(e){return e>gt?Math.pow(e,1/3):e/yt+ft}function St(e){return e>pt?e*e*e:yt*(e-ft)}function Et(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Mt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Ct(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof At)return new At(e.h,e.c,e.l,e.opacity);if(e instanceof xt||(e=vt(e)),0===e.a&&0===e.b)return new At(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*ct;return new At(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new At(e,t,n,null==r?1:r)}function At(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Ot(e){if(isNaN(e.h))return new xt(e.l,0,0,e.opacity);var t=e.h*ut;return new xt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Ne(xt,(function(e,t,n,r){return 1===arguments.length?vt(e):new xt(e,t,n,null==r?1:r)}),we(Re,{brighter(e){return new xt(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new xt(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new Je(Et(3.1338561*(t=dt*St(t))-1.6168667*(e=mt*St(e))-.4906146*(n=ht*St(n))),Et(-.9787684*t+1.9161415*e+.033454*n),Et(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Ne(At,Ct,we(Re,{brighter(e){return new At(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new At(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return Ot(this).rgb()}}));var Tt={isDark:function(e){return Ct(e).l<70}};function Nt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function wt(e){return 1===e.length&&(e=function(e){return function(t,n){return Nt(e(t),n)}}(e)),{left:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}var Rt=wt(Nt).right,It=Math.sqrt(50),kt=Math.sqrt(10),Lt=Math.sqrt(2);function Pt(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=It?10:o>=kt?5:o>=Lt?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=It?10:o>=kt?5:o>=Lt?2:1)}function qt(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=It?i*=10:o>=kt?i*=5:o>=Lt&&(i*=2),t<e?-i:i}function Dt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var $t="$";function zt(){}function _t(e,t){var n=new zt;if(e instanceof zt)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,i=-1,o=e.length;if(null==t)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t(r=e[i],i,e),r)}else if(e)for(var a in e)n.set(a,e[a]);return n}function Ht(){}zt.prototype=_t.prototype={constructor:zt,has:function(e){return $t+e in this},get:function(e){return this[$t+e]},set:function(e,t){return this[$t+e]=t,this},remove:function(e){var t=$t+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===$t&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===$t&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===$t&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===$t&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===$t&&++e;return e},empty:function(){for(var e in this)if(e[0]===$t)return!1;return!0},each:function(e){for(var t in this)t[0]===$t&&e(this[t],t.slice(1),this)}};var Bt=_t.prototype;Ht.prototype={constructor:Ht,has:Bt.has,add:function(e){return this[$t+(e+="")]=e,this},remove:Bt.remove,clear:Bt.clear,values:Bt.keys,size:Bt.size,empty:Bt.empty,each:Bt.each};var Ft=Array.prototype,jt=Ft.map,Vt=Ft.slice;function Ut(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Yt(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Wt(){}var Xt=.7,Gt=1/Xt,Kt="\\s*([+-]?\\d+)\\s*",Jt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Zt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Qt=/^#([0-9a-f]{3})$/,en=/^#([0-9a-f]{6})$/,tn=new RegExp("^rgb\\("+[Kt,Kt,Kt]+"\\)$"),nn=new RegExp("^rgb\\("+[Zt,Zt,Zt]+"\\)$"),rn=new RegExp("^rgba\\("+[Kt,Kt,Kt,Jt]+"\\)$"),on=new RegExp("^rgba\\("+[Zt,Zt,Zt,Jt]+"\\)$"),an=new RegExp("^hsl\\("+[Jt,Zt,Zt]+"\\)$"),sn=new RegExp("^hsla\\("+[Jt,Zt,Zt,Jt]+"\\)$"),ln={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function un(e){var t;return e=(e+"").trim().toLowerCase(),(t=Qt.exec(e))?new fn((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=en.exec(e))?cn(parseInt(t[1],16)):(t=tn.exec(e))?new fn(t[1],t[2],t[3],1):(t=nn.exec(e))?new fn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=rn.exec(e))?dn(t[1],t[2],t[3],t[4]):(t=on.exec(e))?dn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=an.exec(e))?yn(t[1],t[2]/100,t[3]/100,1):(t=sn.exec(e))?yn(t[1],t[2]/100,t[3]/100,t[4]):ln.hasOwnProperty(e)?cn(ln[e]):"transparent"===e?new fn(NaN,NaN,NaN,0):null}function cn(e){return new fn(e>>16&255,e>>8&255,255&e,1)}function dn(e,t,n,r){return r<=0&&(e=t=n=NaN),new fn(e,t,n,r)}function mn(e){return e instanceof Wt||(e=un(e)),e?new fn((e=e.rgb()).r,e.g,e.b,e.opacity):new fn}function hn(e,t,n,r){return 1===arguments.length?mn(e):new fn(e,t,n,null==r?1:r)}function fn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function pn(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function yn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new gn(e,t,n,r)}function gn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function vn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Ut(Wt,un,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),Ut(fn,hn,Yt(Wt,{brighter:function(e){return e=null==e?Gt:Math.pow(Gt,e),new fn(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?Xt:Math.pow(Xt,e),new fn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+pn(this.r)+pn(this.g)+pn(this.b)},toString:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}})),Ut(gn,(function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof gn)return new gn(e.h,e.s,e.l,e.opacity);if(e instanceof Wt||(e=un(e)),!e)return new gn;if(e instanceof gn)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new gn(a,s,l,e.opacity)}(e):new gn(e,t,n,null==r?1:r)}),Yt(Wt,{brighter:function(e){return e=null==e?Gt:Math.pow(Gt,e),new gn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Xt:Math.pow(Xt,e),new gn(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new fn(vn(e>=240?e-240:e+120,i,r),vn(e,i,r),vn(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var xn=Math.PI/180,bn=180/Math.PI,Sn=.96422,En=1,Mn=.82521,Cn=4/29,An=6/29,On=3*An*An,Tn=An*An*An;function Nn(e){if(e instanceof wn)return new wn(e.l,e.a,e.b,e.opacity);if(e instanceof Pn){if(isNaN(e.h))return new wn(e.l,0,0,e.opacity);var t=e.h*xn;return new wn(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof fn||(e=mn(e));var n,r,i=Ln(e.r),o=Ln(e.g),a=Ln(e.b),s=Rn((.2225045*i+.7168786*o+.0606169*a)/En);return i===o&&o===a?n=r=s:(n=Rn((.4360747*i+.3850649*o+.1430804*a)/Sn),r=Rn((.0139322*i+.0971045*o+.7141733*a)/Mn)),new wn(116*s-16,500*(n-s),200*(s-r),e.opacity)}function wn(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function Rn(e){return e>Tn?Math.pow(e,1/3):e/On+Cn}function In(e){return e>An?e*e*e:On*(e-Cn)}function kn(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Ln(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Pn(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}Ut(wn,(function(e,t,n,r){return 1===arguments.length?Nn(e):new wn(e,t,n,null==r?1:r)}),Yt(Wt,{brighter:function(e){return new wn(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new wn(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new fn(kn(3.1338561*(t=Sn*In(t))-1.6168667*(e=En*In(e))-.4906146*(n=Mn*In(n))),kn(-.9787684*t+1.9161415*e+.033454*n),kn(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Ut(Pn,(function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Pn)return new Pn(e.h,e.c,e.l,e.opacity);if(e instanceof wn||(e=Nn(e)),0===e.a&&0===e.b)return new Pn(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*bn;return new Pn(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new Pn(e,t,n,null==r?1:r)}),Yt(Wt,{brighter:function(e){return new Pn(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new Pn(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return Nn(this).rgb()}}));var qn=-.14861,Dn=1.78277,$n=-.29227,zn=-.90649,_n=1.97294,Hn=_n*zn,Bn=_n*Dn,Fn=Dn*$n-zn*qn;function jn(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof Vn)return new Vn(e.h,e.s,e.l,e.opacity);e instanceof fn||(e=mn(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(Fn*r+Hn*t-Bn*n)/(Fn+Hn-Bn),o=r-i,a=(_n*(n-i)-$n*o)/zn,s=Math.sqrt(a*a+o*o)/(_n*i*(1-i)),l=s?Math.atan2(a,o)*bn-120:NaN;return new Vn(l<0?l+360:l,s,i,e.opacity)}(e):new Vn(e,t,n,null==r?1:r)}function Vn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Un(e){return function(){return e}}function Yn(e,t){return function(n){return e+n*t}}function Wn(e){return 1==(e=+e)?Xn:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Un(isNaN(t)?n:t)}}function Xn(e,t){var n=t-e;return n?Yn(e,n):Un(isNaN(e)?t:e)}Ut(Vn,jn,Yt(Wt,{brighter:function(e){return e=null==e?Gt:Math.pow(Gt,e),new Vn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?Xt:Math.pow(Xt,e),new Vn(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*xn,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new fn(255*(t+n*(qn*r+Dn*i)),255*(t+n*($n*r+zn*i)),255*(t+n*(_n*r)),this.opacity)}}));var Gn=function e(t){var n=Wn(t);function r(e,t){var r=n((e=hn(e)).r,(t=hn(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=Xn(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Kn(e,t){var n,r=t?t.length:0,i=e?Math.min(r,e.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=rr(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<i;++n)a[n]=o[n](e);return a}}function Jn(e,t){var n=new Date;return t-=e=+e,function(r){return n.setTime(e+t*r),n}}function Zn(e,t){return t-=e=+e,function(n){return e+t*n}}function Qn(e,t){var n,r={},i={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=rr(e[n],t[n]):i[n]=t[n];return function(e){for(n in r)i[n]=r[n](e);return i}}var er=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,tr=new RegExp(er.source,"g");function nr(e,t){var n,r,i,o=er.lastIndex=tr.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=er.exec(e))&&(r=tr.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Zn(n,r)})),o=tr.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function rr(e,t){var n,r=typeof t;return null==t||"boolean"===r?Un(t):("number"===r?Zn:"string"===r?(n=un(t))?(t=n,Gn):nr:t instanceof un?Gn:t instanceof Date?Jn:Array.isArray(t)?Kn:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?Qn:Zn)(e,t)}function ir(e,t){return t-=e=+e,function(n){return Math.round(e+t*n)}}function or(e){return function t(n){function r(t,r){var i=e((t=jn(t)).h,(r=jn(r)).h),o=Xn(t.s,r.s),a=Xn(t.l,r.l),s=Xn(t.opacity,r.opacity);return function(e){return t.h=i(e),t.s=o(e),t.l=a(Math.pow(e,n)),t.opacity=s(e),t+""}}return n=+n,r.gamma=t,r}(1)}function ar(e){return+e}or((function(e,t){var n=t-e;return n?Yn(e,n>180||n<-180?n-360*Math.round(n/360):n):Un(isNaN(e)?t:e)})),or(Xn);var sr=[0,1];function lr(e){return e}function ur(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function cr(e){var t,n=e[0],r=e[e.length-1];return n>r&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function dr(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=ur(i,r),o=n(a,o)):(r=ur(r,i),o=n(o,a)),function(e){return o(r(e))}}function mr(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=ur(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(t){var n=Rt(e,t,1,r)-1;return o[n](i[n](t))}}function hr(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function fr(e,t){return function(){var e,t,n,r,i,o,a=sr,s=sr,l=rr,u=lr;function c(){return r=Math.min(a.length,s.length)>2?mr:dr,i=o=null,d}function d(t){return isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(u(t)))}return d.invert=function(n){return u(t((o||(o=r(s,a.map(e),Zn)))(n)))},d.domain=function(e){return arguments.length?(a=jt.call(e,ar),u===lr||(u=cr(a)),c()):a.slice()},d.range=function(e){return arguments.length?(s=Vt.call(e),c()):s.slice()},d.rangeRound=function(e){return s=Vt.call(e),l=ir,c()},d.clamp=function(e){return arguments.length?(u=e?cr(a):lr,d):u!==lr},d.interpolate=function(e){return arguments.length?(l=e,c()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,c()}}()(e,t)}function pr(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function yr(e){return(e=pr(Math.abs(e)))?e[1]:NaN}var gr,vr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function xr(e){return new br(e)}function br(e){if(!(t=vr.exec(e)))throw new Error("invalid format: "+e);var t;this.fill=t[1]||" ",this.align=t[2]||">",this.sign=t[3]||"-",this.symbol=t[4]||"",this.zero=!!t[5],this.width=t[6]&&+t[6],this.comma=!!t[7],this.precision=t[8]&&+t[8].slice(1),this.trim=!!t[9],this.type=t[10]||""}function Sr(e,t){var n=pr(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}xr.prototype=br.prototype,br.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Er={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return Sr(100*e,t)},r:Sr,s:function(e,t){var n=pr(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(gr=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+pr(e,Math.max(0,t+o-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function Mr(e){return e}var Cr,Ar,Or,Tr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Nr(e){var t,n,r=e.grouping&&e.thousands?(t=e.grouping,n=e.thousands,function(e,r){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}):Mr,i=e.currency,o=e.decimal,a=e.numerals?function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(e.numerals):Mr,s=e.percent||"%";function l(e){var t=(e=xr(e)).fill,n=e.align,l=e.sign,u=e.symbol,c=e.zero,d=e.width,m=e.comma,h=e.precision,f=e.trim,p=e.type;"n"===p?(m=!0,p="g"):Er[p]||(null==h&&(h=12),f=!0,p="g"),(c||"0"===t&&"="===n)&&(c=!0,t="0",n="=");var y="$"===u?i[0]:"#"===u&&/[boxX]/.test(p)?"0"+p.toLowerCase():"",g="$"===u?i[1]:/[%p]/.test(p)?s:"",v=Er[p],x=/[defgprs%]/.test(p);function b(e){var i,s,u,b=y,S=g;if("c"===p)S=v(e)+S,e="";else{var E=(e=+e)<0;if(e=v(Math.abs(e),h),f&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r<n;++r)switch(e[r]){case".":i=t=r;break;case"0":0===i&&(i=r),t=r;break;default:if(i>0){if(!+e[r])break e;i=0}}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),E&&0==+e&&(E=!1),b=(E?"("===l?l:"-":"-"===l||"("===l?"":l)+b,S=("s"===p?Tr[8+gr/3]:"")+S+(E&&"("===l?")":""),x)for(i=-1,s=e.length;++i<s;)if(48>(u=e.charCodeAt(i))||u>57){S=(46===u?o+e.slice(i+1):e.slice(i))+S,e=e.slice(0,i);break}}m&&!c&&(e=r(e,1/0));var M=b.length+e.length+S.length,C=M<d?new Array(d-M+1).join(t):"";switch(m&&c&&(e=r(C+e,C.length?d-S.length:1/0),C=""),n){case"<":e=b+e+S+C;break;case"=":e=b+C+e+S;break;case"^":e=C.slice(0,M=C.length>>1)+b+e+S+C.slice(M);break;default:e=C+b+e+S}return a(e)}return h=null==h?6:/[gprs]/.test(p)?Math.max(1,Math.min(21,h)):Math.max(0,Math.min(20,h)),b.toString=function(){return e+""},b}return{format:l,formatPrefix:function(e,t){var n=l(((e=xr(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(yr(t)/3))),i=Math.pow(10,-r),o=Tr[8+r/3];return function(e){return n(i*e)+o}}}}function wr(e,t,n,r){var i,o=qt(e,t,n);switch((r=xr(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(yr(t)/3)))-yr(Math.abs(e)))}(o,a))||(r.precision=i),Or(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,yr(t)-yr(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(e){return Math.max(0,-yr(Math.abs(e)))}(o))||(r.precision=i-2*("%"===r.type))}return Ar(r)}function Rr(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var r,i,o,a,s=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t<e)&&(i=e,e=t,t=i),0===(a=Pt(e,t,n))||!isFinite(a))return[];if(a>0)for(e=Math.ceil(e/a),t=Math.floor(t/a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(e+s)*a;else for(e=Math.floor(e*a),t=Math.ceil(t*a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(e-s)/a;return r&&o.reverse(),o}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return wr(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i=t(),o=0,a=i.length-1,s=i[o],l=i[a];return l<s&&(r=s,s=l,l=r,r=o,o=a,a=r),(r=Pt(s,l,n))>0?r=Pt(s=Math.floor(s/r)*r,l=Math.ceil(l/r)*r,n):r<0&&(r=Pt(s=Math.ceil(s*r)/r,l=Math.floor(l*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(l/r)*r,t(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(l*r)/r,t(i)),e},e}function Ir(){var e=fr(lr,lr);return e.copy=function(){return hr(e,Ir())},Dt.apply(e,arguments),Rr(e)}Cr=Nr({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),Ar=Cr.format,Or=Cr.formatPrefix;var kr=new Date,Lr=new Date;function Pr(e,t,n,r){function i(t){return e(t=new Date(+t)),t}return i.floor=i,i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return s},i.filter=function(n){return Pr((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(i.count=function(t,r){return kr.setTime(+t),Lr.setTime(+r),e(kr),e(Lr),Math.floor(n(kr,Lr))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e==0}:function(t){return i.count(0,t)%e==0}):i:null}),i}var qr=Pr((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));qr.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?Pr((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,n){t.setTime(+t+n*e)}),(function(t,n){return(n-t)/e})):qr:null},qr.range;var Dr=1e3,$r=6e4,zr=36e5,_r=864e5,Hr=6048e5,Br=Pr((function(e){e.setTime(Math.floor(e/Dr)*Dr)}),(function(e,t){e.setTime(+e+t*Dr)}),(function(e,t){return(t-e)/Dr}),(function(e){return e.getUTCSeconds()}));Br.range;var Fr=Pr((function(e){e.setTime(Math.floor(e/$r)*$r)}),(function(e,t){e.setTime(+e+t*$r)}),(function(e,t){return(t-e)/$r}),(function(e){return e.getMinutes()}));Fr.range;var jr=Pr((function(e){var t=e.getTimezoneOffset()*$r%zr;t<0&&(t+=zr),e.setTime(Math.floor((+e-t)/zr)*zr+t)}),(function(e,t){e.setTime(+e+t*zr)}),(function(e,t){return(t-e)/zr}),(function(e){return e.getHours()}));jr.range;var Vr=Pr((function(e){e.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*$r)/_r}),(function(e){return e.getDate()-1}));function Ur(e){return Pr((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*$r)/Hr}))}Vr.range;var Yr=Ur(0),Wr=Ur(1),Xr=Ur(2),Gr=Ur(3),Kr=Ur(4),Jr=Ur(5),Zr=Ur(6);Yr.range,Wr.range,Xr.range,Gr.range,Kr.range,Jr.range,Zr.range;var Qr=Pr((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()}));Qr.range;var ei=Pr((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()}));ei.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Pr((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n*e)})):null},ei.range;var ti=Pr((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*$r)}),(function(e,t){return(t-e)/$r}),(function(e){return e.getUTCMinutes()}));ti.range;var ni=Pr((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*zr)}),(function(e,t){return(t-e)/zr}),(function(e){return e.getUTCHours()}));ni.range;var ri=Pr((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/_r}),(function(e){return e.getUTCDate()-1}));function ii(e){return Pr((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/Hr}))}ri.range;var oi=ii(0),ai=ii(1),si=ii(2),li=ii(3),ui=ii(4),ci=ii(5),di=ii(6);oi.range,ai.range,si.range,li.range,ui.range,ci.range,di.range;var mi=Pr((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()}));mi.range;var hi=Pr((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));function fi(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function pi(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function yi(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}hi.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Pr((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null},hi.range;var gi,vi,xi,bi={"-":"",_:" ",0:"0"},Si=/^\s*\d+/,Ei=/^%/,Mi=/[\\^$*+?|[\]().{}]/g;function Ci(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function Ai(e){return e.replace(Mi,"\\$&")}function Oi(e){return new RegExp("^(?:"+e.map(Ai).join("|")+")","i")}function Ti(e){for(var t={},n=-1,r=e.length;++n<r;)t[e[n].toLowerCase()]=n;return t}function Ni(e,t,n){var r=Si.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function wi(e,t,n){var r=Si.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Ri(e,t,n){var r=Si.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Ii(e,t,n){var r=Si.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function ki(e,t,n){var r=Si.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Li(e,t,n){var r=Si.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Pi(e,t,n){var r=Si.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function qi(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Di(e,t,n){var r=Si.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function $i(e,t,n){var r=Si.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function zi(e,t,n){var r=Si.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function _i(e,t,n){var r=Si.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Hi(e,t,n){var r=Si.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Bi(e,t,n){var r=Si.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Fi(e,t,n){var r=Si.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function ji(e,t,n){var r=Si.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Vi(e,t,n){var r=Ei.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Ui(e,t,n){var r=Si.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Yi(e,t,n){var r=Si.exec(t.slice(n));return r?(e.Q=1e3*+r[0],n+r[0].length):-1}function Wi(e,t){return Ci(e.getDate(),t,2)}function Xi(e,t){return Ci(e.getHours(),t,2)}function Gi(e,t){return Ci(e.getHours()%12||12,t,2)}function Ki(e,t){return Ci(1+Vr.count(ei(e),e),t,3)}function Ji(e,t){return Ci(e.getMilliseconds(),t,3)}function Zi(e,t){return Ji(e,t)+"000"}function Qi(e,t){return Ci(e.getMonth()+1,t,2)}function eo(e,t){return Ci(e.getMinutes(),t,2)}function to(e,t){return Ci(e.getSeconds(),t,2)}function no(e){var t=e.getDay();return 0===t?7:t}function ro(e,t){return Ci(Yr.count(ei(e),e),t,2)}function io(e,t){var n=e.getDay();return e=n>=4||0===n?Kr(e):Kr.ceil(e),Ci(Kr.count(ei(e),e)+(4===ei(e).getDay()),t,2)}function oo(e){return e.getDay()}function ao(e,t){return Ci(Wr.count(ei(e),e),t,2)}function so(e,t){return Ci(e.getFullYear()%100,t,2)}function lo(e,t){return Ci(e.getFullYear()%1e4,t,4)}function uo(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ci(t/60|0,"0",2)+Ci(t%60,"0",2)}function co(e,t){return Ci(e.getUTCDate(),t,2)}function mo(e,t){return Ci(e.getUTCHours(),t,2)}function ho(e,t){return Ci(e.getUTCHours()%12||12,t,2)}function fo(e,t){return Ci(1+ri.count(hi(e),e),t,3)}function po(e,t){return Ci(e.getUTCMilliseconds(),t,3)}function yo(e,t){return po(e,t)+"000"}function go(e,t){return Ci(e.getUTCMonth()+1,t,2)}function vo(e,t){return Ci(e.getUTCMinutes(),t,2)}function xo(e,t){return Ci(e.getUTCSeconds(),t,2)}function bo(e){var t=e.getUTCDay();return 0===t?7:t}function So(e,t){return Ci(oi.count(hi(e),e),t,2)}function Eo(e,t){var n=e.getUTCDay();return e=n>=4||0===n?ui(e):ui.ceil(e),Ci(ui.count(hi(e),e)+(4===hi(e).getUTCDay()),t,2)}function Mo(e){return e.getUTCDay()}function Co(e,t){return Ci(ai.count(hi(e),e),t,2)}function Ao(e,t){return Ci(e.getUTCFullYear()%100,t,2)}function Oo(e,t){return Ci(e.getUTCFullYear()%1e4,t,4)}function To(){return"+0000"}function No(){return"%"}function wo(e){return+e}function Ro(e){return Math.floor(+e/1e3)}!function(e){gi=function(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,u=Oi(i),c=Ti(i),d=Oi(o),m=Ti(o),h=Oi(a),f=Ti(a),p=Oi(s),y=Ti(s),g=Oi(l),v=Ti(l),x={a:function(e){return a[e.getDay()]},A:function(e){return o[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:Wi,e:Wi,f:Zi,H:Xi,I:Gi,j:Ki,L:Ji,m:Qi,M:eo,p:function(e){return i[+(e.getHours()>=12)]},Q:wo,s:Ro,S:to,u:no,U:ro,V:io,w:oo,W:ao,x:null,X:null,y:so,Y:lo,Z:uo,"%":No},b={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:co,e:co,f:yo,H:mo,I:ho,j:fo,L:po,m:go,M:vo,p:function(e){return i[+(e.getUTCHours()>=12)]},Q:wo,s:Ro,S:xo,u:bo,U:So,V:Eo,w:Mo,W:Co,x:null,X:null,y:Ao,Y:Oo,Z:To,"%":No},S={a:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=f[r[0].toLowerCase()],n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=m[r[0].toLowerCase()],n+r[0].length):-1},b:function(e,t,n){var r=g.exec(t.slice(n));return r?(e.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.m=y[r[0].toLowerCase()],n+r[0].length):-1},c:function(e,n,r){return C(e,t,n,r)},d:$i,e:$i,f:ji,H:_i,I:_i,j:zi,L:Fi,m:Di,M:Hi,p:function(e,t,n){var r=u.exec(t.slice(n));return r?(e.p=c[r[0].toLowerCase()],n+r[0].length):-1},Q:Ui,s:Yi,S:Bi,u:wi,U:Ri,V:Ii,w:Ni,W:ki,x:function(e,t,r){return C(e,n,t,r)},X:function(e,t,n){return C(e,r,t,n)},y:Pi,Y:Li,Z:qi,"%":Vi};function E(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,u=e.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=bi[r=e.charAt(++s)])?r=e.charAt(++s):i="e"===r?" ":"0",(o=t[r])&&(r=o(n,i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function M(e,t){return function(n){var r,i,o=yi(1900);if(C(o,e,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("p"in o&&(o.H=o.H%12+12*o.p),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=pi(yi(o.y))).getUTCDay(),r=i>4||0===i?ai.ceil(r):ai(r),r=ri.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=t(yi(o.y))).getDay(),r=i>4||0===i?Wr.ceil(r):Wr(r),r=Vr.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?pi(yi(o.y)).getUTCDay():t(yi(o.y)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,pi(o)):t(o)}}function C(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=S[i in bi?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return x.x=E(n,x),x.X=E(r,x),x.c=E(t,x),b.x=E(n,b),b.X=E(r,b),b.c=E(t,b),{format:function(e){var t=E(e+="",x);return t.toString=function(){return e},t},parse:function(e){var t=M(e+="",fi);return t.toString=function(){return e},t},utcFormat:function(e){var t=E(e+="",b);return t.toString=function(){return e},t},utcParse:function(e){var t=M(e,pi);return t.toString=function(){return e},t}}}(e),gi.format,gi.parse,vi=gi.utcFormat,xi=gi.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var Io="%Y-%m-%dT%H:%M:%S.%LZ";Date.prototype.toISOString||vi(Io),+new Date("2000-01-01T00:00:00.000Z")||xi(Io);var ko=1e3,Lo=60*ko,Po=60*Lo,qo=24*Po,Do=7*qo,$o=30*qo,zo=365*qo;function _o(e){return new Date(e)}function Ho(e){return e instanceof Date?+e:+new Date(+e)}function Bo(e,t,n,r,i,o,a,s,l){var u=fr(lr,lr),c=u.invert,d=u.domain,m=l(".%L"),h=l(":%S"),f=l("%I:%M"),p=l("%I %p"),y=l("%a %d"),g=l("%b %d"),v=l("%B"),x=l("%Y"),b=[[a,1,ko],[a,5,5*ko],[a,15,15*ko],[a,30,30*ko],[o,1,Lo],[o,5,5*Lo],[o,15,15*Lo],[o,30,30*Lo],[i,1,Po],[i,3,3*Po],[i,6,6*Po],[i,12,12*Po],[r,1,qo],[r,2,2*qo],[n,1,Do],[t,1,$o],[t,3,3*$o],[e,1,zo]];function S(s){return(a(s)<s?m:o(s)<s?h:i(s)<s?f:r(s)<s?p:t(s)<s?n(s)<s?y:g:e(s)<s?v:x)(s)}function E(t,n,r,i){if(null==t&&(t=10),"number"==typeof t){var o=Math.abs(r-n)/t,a=wt((function(e){return e[2]})).right(b,o);a===b.length?(i=qt(n/zo,r/zo,t),t=e):a?(i=(a=b[o/b[a-1][2]<b[a][2]/o?a-1:a])[1],t=a[0]):(i=Math.max(qt(n,r,t),1),t=s)}return null==i?t:t.every(i)}return u.invert=function(e){return new Date(c(e))},u.domain=function(e){return arguments.length?d(jt.call(e,Ho)):d().map(_o)},u.ticks=function(e,t){var n,r=d(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=E(e,i,o,t))?n.range(i,o+1):[],a?n.reverse():n},u.tickFormat=function(e,t){return null==t?S:l(t)},u.nice=function(e,t){var n=d();return(e=E(e,n[0],n[n.length-1],t))?d(function(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}(n,e)):u},u.copy=function(){return hr(u,Bo(e,t,n,r,i,o,a,s,l))},u}function Fo(){return Dt.apply(Bo(hi,mi,oi,ri,ni,ti,Br,qr,vi).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}const jo={horizontal:{major:"width",minor:"height",start:"left",end:"right",shadow:{startOffset:"12px 0",endOffset:"-12px 0"}},vertical:{major:"height",minor:"width",start:"top",end:"bottom",shadow:{startOffset:"0 12px",endOffset:"0 -12px"}}},Vo=e=>`${e} 12px -12px inset rgba(0, 0, 0, 0.0625)`;var Uo={defaultSettings:{settings:{orientation:"horizontal",rtl:!1,range:()=>[0,1]}},renderer:"dom",render(e){const{range:t,orientation:n,rtl:r}=this.settings.settings,[i,o]=t(),a=Math.abs(i)<1e-15,s=Math.abs(o-1)<1e-15,l=(e=>{const t=jo[e];return{base:{position:"absolute",[t.major]:12,[t.minor]:"100%"},towardsStart:{[t.start]:0,[t.end]:"auto",boxShadow:Vo(t.shadow.startOffset)},towardsEnd:{[t.start]:"auto",[t.end]:0,boxShadow:Vo(t.shadow.endOffset)}}})(n),u="horizontal"===n&&r,c=[];return a||c.push(e("div",{style:{...l.base,...u?l.towardsEnd:l.towardsStart},class:"scroll-hint--towards-start"})),s||c.push(e("div",{style:{...l.base,...u?l.towardsStart:l.towardsEnd},class:"scroll-hint--towards-end"})),c}};function Yo({viewState:e,viewCache:t,layoutService:n,dockService:r,rtl:i}){return!n.meta.isSnapshot&&{key:"scroll-hint",type:"scroll-hint",settings:{orientation:r.meta.major.orientation,rtl:i,range:()=>function({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(t,n):function(e){return e.get("viewRange")}(t)}({layoutService:n,viewState:e,viewCache:t})}}}let Wo;function Xo(){Wo=Wo||document.createElement("canvas").getContext("2d")}const Go={measureTextWidth(e){Xo();const{width:t}=Wo.measureText(e);return t},lineWrap(e,t,n,r){let i,o;Xo();const a=e?e.split(/\n+|\r+|\r\n/):[],s=[];let l,u,c,d,m=e?e.split(/\s+/):[],h=a[0];if("number"!=typeof t||t<=0)return[e];if("number"==typeof r&&a.length>=r)return a.slice(0,r);for(n&&(Wo.font=n),o=0;o<a.length;o++){for(d=a[o]||"",m=d.split(/\s+/),[h]=m,c="",i=1;i<m.length;i++)if(l=`${h} ${m[i]}`,u=Go.measureTextWidth(l),u>t&&("number"!=typeof r||r>s.length)?(s.push(h),h=m[i]):h=l,"number"==typeof r&&s.length>=r){c=m.slice(i+1).join(" ");break}"number"!=typeof r||s.length<r?s.push(h):s[Math.max(0,s.length-1)]=`${s[Math.max(0,s.length-1)]||""} ${h} ${c}`}return s},wordWrap(e,t,n,r,i){if(Xo(),!e||!e.length)return[];n&&(Wo.font=n);let o=[];const a=e.slice();let s,l,u,c;if(a.filter((e=>!!e)),"number"!=typeof t||t<0)return e.slice();for(c=0;c<a.length;c++)u=a[c],l=null,u&&(u.length<=1||Go.measureTextWidth(u)<=t?o.push(u):(s=Go.splitWord(u,t,void 0,r-o.length),s.length<=1?o.push(s[0]):(l=s.pop(),o=o.concat(s),a[c+1]?Go.measureTextWidth(`${l} ${a[c+1]}`)>t&&o.length+a.length-c<=r?a.splice(c+1,0,l):a[c+1]=`${l} ${a[c+1]}`:a.push(l))));return o.forEach(((e,t,n)=>{n[t]=e?e.trim():e})),o.length>r?(o=o.splice(0,r),o[o.length-1]=Go.truncate(o[o.length-1],t,n,i).text):(u=o[o.length-1],u&&u.length>1&&Go.measureTextWidth(u)>t&&(o[o.length-1]=Go.truncate(u,t,n,i).text)),o},truncate(e,t,n,r="…"){Xo();let i,o,a,s,l=e;const u=Go.measureTextWidth("i"),c=Math.ceil(t/u);if(n&&(Wo.font=n),e&&t){if(Go.measureTextWidth(l)>t){for(i=Math.min(c,l.length);i>0;i--)if(o=l.substring(0,i-1),a=o.trim()+r,Go.measureTextWidth(a)<=t){s=l.substring(i-1),l=a;break}i||(s=l,l="…")}}else s=void 0;return{text:l,rest:s}},isNumber:e=>"number"==typeof e&&Number.isFinite(e),explodeWord(e,t,n,r){let i;Xo();let o,a=e,s="",l=[];if(Go.isNumber(n)&&n<=1)return[e];const u=Math.ceil(t/r);for(i=Math.min(e.length,u);i>0&&(a=e.substring(0,i),o=e.substring(i-1,i)," "===o?a=e.substring(0,i-1):a+="-",s=e.substring(i),!(Go.measureTextWidth(a)<=t));i--);return(!i&&!a||Go.measureTextWidth(a)>t)&&(a=e.substring(0,1),s=e.substring(1)),l.push(a),s?(Go.measureTextWidth(s)>t?(s=Go.explodeWord(s,t,n-1,r),l=l.concat(s)):l.push(s),l.filter((e=>""!==e.trim()))):l},splitWord:(e,t,n,r)=>(Xo(),e&&t?(n&&(Wo.font=n),Go.explodeWord(e,t,r,Math.max(1,Go.measureTextWidth("i")))):[]),wrapText(e,t,n,r,i){let o;return Number.isNaN(t)?[e]:(o=r>1?Go.lineWrap(e,t,n,r):[e],o=Go.wordWrap(o,t,n,r,i),o)},getFontHeight:e=>(Xo(),e&&(Wo.font=e),1.5*Go.measureTextWidth("m")),tokenize(e,t,n,r,i,o,a=1){Xo(),t&&(Wo.font=t);const s=Go.getFontHeight(),l=a*s;let u=[],c=0,d=[];if(o<s)return[];const m=o?Math.max(1,Math.floor(o/l)):r||1;return Array.isArray(r)?(r.forEach((e=>{c+=Number.isNaN(e)||e<=0?0:e})),r.forEach((e=>{u.push(Number.isNaN(e)||e<=0?m-c:e)}))):u=[Number.isNaN(r)||r<=0?m:Math.min(m,r)],Array.isArray(e)?e.forEach(((e,n)=>{d.length<m&&(d=d.concat(Go.wrapText(e,i,t,u[n])))})):d=Go.wrapText(e,i,t,u[0],n),d}},Ko={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:i,flipXY:o,symbol:a}){let s="x",l="y",u=r,c=i,d=t<.5?90:-90;return o&&(s="y",l="x",u=i,c=r,d=t<.5?180:0),a(re({},e,{[s]:n*u,[l]:Math.max(e.size/2,Math.min(t*c,c-e.size/2)),startAngle:d}))}},Jo=re.bind(null,!0),Zo={},{isArray:Qo}=Array;function ea(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function ta(e){return void 0===e}function na(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function ra(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach(((t,i)=>{if(i===n.length)return;r=+t;const o=isNaN(r)?{}:[];e[r||t]=ta(e[r||t])?o:e[t],e=e[r||t]})),e}function ia(e,t){let n=!0;if(ea(e)&&ea(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((r=>{ia(e[r],t[r])||(n=!1)})),n);if(Qo(e)&&Qo(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!ia(e[n],t[n]))return!1;return!0}return e===t}Zo.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((i=>{const o=function(e){return e?Jo({},{val:e}).val:e}(t[i]),a=e[i],s=`${n}/${i}`;ia(o,a)||na(t,i)||(ta(a)?r.push({op:"add",path:s,value:o}):ea(o)&&ea(a)?r=r.concat(Zo.generate(a,o,s)):Qo(o)&&Qo(a)?r=r.concat(function(e,t,n){let r=[];const i=e.slice();let o=-1;function a(e,t,n){if(e[n]&&ta(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(let n=0,r=e.length;n<r;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(ia(t,i))return r;if(!ta(t[0])&&ta(t[0].qInfo)||0===t.length)return r.push({op:"replace",path:n,value:t}),r;for(let e=i.length-1;e>=0;e-=1)o=a(t,i[e].qInfo&&i[e].qInfo.qId,e),-1===o?(r.push({op:"remove",path:`${n}/${e}`}),i.splice(e,1)):r=r.concat(Zo.generate(i[e],t[o],`${n}/${e}`));for(let e=0,s=t.length;e<s;e+=1)o=a(i,t[e].qInfo&&t[e].qInfo.qId),-1===o?(r.push({op:"add",path:`${n}/${e}`,value:t[e]}),i.splice(e,0,t[e])):o!==e&&(r.push({op:"move",path:`${n}/${e}`,from:`${n}/${o}`}),i.splice(e,0,i.splice(o,1)[0]));return r}(a,o,s)):r.push({op:"replace",path:`${n}/${i}`,value:o}))})),Object.keys(e).forEach((i=>{ta(t[i])&&!na(e,i)&&r.push({op:"remove",path:`${n}/${i}`})})),r},Zo.apply=function(e,t){t.forEach((t=>{let n=ra(e,t.path),r=t.path.split("/").splice(-1)[0],i=r&&isNaN(+r)?n[r]:n[+r]||n;const o=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,i=e),"add"===t.op||"replace"===t.op)if(Qo(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(Qo(i)&&Qo(t.value)){const e=t.value.slice();i.length=0,i.push(...e)}else if(ea(i)&&ea(t.value))a=i,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!na(a,e)&&delete a[e]})),Jo(i,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[r]=t.value}else if("move"===t.op){const i=ra(e,t.from);Qo(n)?n.splice(+r,0,i.splice(+o,1)[0]):(n[r]=i[o],delete i[o])}else"remove"===t.op&&(Qo(n)?n.splice(+r,1):delete n[r]);var a}))},Zo.clone=function(e){return Jo({},e)},Zo.createPatch=function(e,t,n){const r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},Zo.updateObject=function(e,t){Object.keys(e).length?Zo.apply(e,Zo.generate(e,t)):Jo(e,t)};const oa=[[2,4,6],[2,4],[3]],aa=[,[,,[[1,2]],[[1,2,3],[1,3]],[[1,2,4],[1,4]],[[1,2,4],[1,5]],[[1,2,4,6],[2,4,6],[1,3,6],[1,6]],[[1,2,4,6],[2,4,6],[1,3,6],[1,7]],[[1,2,4,8],[2,4,8],[1,8]],[[1,2,4,8],[2,4,8],[1,3,9],[1,9]],[[1,2,4,6,10],[1,2,4,10],[1,3,10],[3,10],[1,10]]],[,,,[[2,3]],[[2,3,4],[2,4]],[[2,3,4],[2,4],[2,5]],[[2,4,6],[2,6]],[[2,4,6],[2,6],[2,7]],[[2,4,8],[2,8]],[[2,4,8],[2,8],[2,9]],[[2,4,6,10],[2,4,10],[5,10],[3,10]]],[,,,,[[3,4]],[[3,4,5],[3,5]],[[3,4,5,6],[3,6]],[[3,4,5,6],[3,5,7],[3,7]],[[3,4,5,6,8],[3,5,7],[4,8],[3,8]],[[3,4,5,6,8],[3,4,6,9],[3,4,6,8],[3,6,9],[4,8],[3,9]],[[4,6,10],[5,10],[3,10]]],[,,,,,[[4,5]],[[4,5,6],[4,6]],[[4,5,6,7],[4,5,6],[4,6]],[[4,5,6,7,8],[4,5,6,7],[4,6,8],[4,8]],[[4,5,6,7,8],[4,6,9],[4,6,8],[4,8]],[[4,6,10],[5,7,9],[5,10],[4,10]]],[,,,,,,[[5,6]],[[5,6,7],[5,7]],[[5,6,7,8],[5,6,7],[6,8]],[[5,6,7,8,9],[5,6,7,8],[5,7,9],[5,9]],[[6,8,10],[5,10]]],[,,,,,,,[[6,7]],[[6,7,8],[6,8]],[[6,7,8,9],[6,7,8],[6,9]],[[6,7,8,9,10],[6,8,10],[6,10]]],[,,,,,,,,[[7,8]],[[7,8,9],[7,9]],[[7,8,9,10],[8,10],[7,10],[7,9]]],[,,,,,,,,,[[8,9]],[[8,9,10],[8,10]]],[,,,,,,,,,,[[9,10]]]];function sa(e,t,n){const r=e?e.length:0;let i,o=void 0===t?Number.MAX_VALUE:e[0]/t;for(i=1;i<r;i++)o=Math.min(o,e[i]/e[i-1]);void 0!==n&&(o=Math.min(o,n/e[r-1])),e.splice(0,0,o)}function la(e,t,n){let r;const i=e?e.length:0;for(r=0;r<i;r++)sa(e[r],t,n)}!function(){let e,t;for(la(oa,1,10),e=0;e<aa.length;e++)if(aa[e])for(t=0;t<aa[e].length;t++)Array.isArray(aa[e][t])&&la(aa[e][t])}();const ua={isInside(e,t,n,r){if(!r)return!0;const i=e.position-e.radius,o=e.position+e.radius;return i>=t&&o<=n},getCenterDistance:(e,t)=>Math.abs(e.center-t.center),getGap(e,t){const n=e.position<t.position?e:t,r=e.position<t.position?t:e;return r.position-r.radius-(n.position+n.radius)},findSegmentPositionMeetMax(e,t){const n=Math.max(0,e.max-t);return e.center-n},findSegmentPositionMeetMin(e,t){const n=Math.max(0,t-e.min);return e.center+n},findSegmentPositionMeetMinThenMax(e,t,n){const r=ua.findSegmentPositionMeetMin(e,t);return ua.findSegmentPositionMeetMax({center:r,max:r+e.radius},n)},findSegmentPositionMeetMaxThenMin(e,t,n){const r=ua.findSegmentPositionMeetMax(e,n);return ua.findSegmentPositionMeetMin({center:r,min:r-e.radius},t)},layoutPositionFromMin(e,t,n,r=0){const i=e.length-1;let o,a,s=t;for(let t=0;t<i;t++)o=e[t],a=e[t+1],o.position=ua.findSegmentPositionMeetMaxThenMin(o,s,(o.center+a.center-r)/2),s=o.position+o.radius+r/2;a.position=ua.findSegmentPositionMeetMaxThenMin(a,s,n)},adjustPositionFromMax(e,t,n,r=0){const i=e.length-1;let o,a,s;const l=Math.max(0,e[i].position+e[i].radius-n);if(0===l)return;let u,c=0;for(o=i;o>0&&(a=e[o],s=e[o-1],u=Math.max(0,ua.getGap(s,a)-r),u-=Math.max(0,c+u-l),c+=u,a.move=u,!(c>=l));o--);for(c<l&&(u=Math.max(0,s.position-s.radius-t),u-=Math.max(0,c+u-l),c+=u,s.move=u),c=0,o=0;o<=i;o++)a=e[o],c+=a.move||0,a.move=c,a.position-=c},layout(e,t,n,r=0){const i=e.length-1;if(!(i<0))if(0!==i)ua.layoutPositionFromMin(e,t,n,r),ua.adjustPositionFromMax(e,t,n,r);else{const r=e[0];r.position=ua.findSegmentPositionMeetMaxThenMin(r,t,n)}}},ca=(e,t,n,r=1)=>{const i=e.bandwidth();return n?"start"===t?i:"end"===t?i*(1-r):i*(2-r)/2:"start"===t?0:"end"===t?i*r:i*r/2},da=e=>!1!==e.show&&0!==e.show&&"0"!==e.show,ma=e=>e.filter(da),ha=(e,t)=>ma(fe.getValue(e,t,[])),fa=e=>da(e)&&(!1!==e.showValue||!1!==e.showLabel),pa=e=>e.filter(fa),ya=(e,t)=>pa(fe.getValue(e,t,[])),ga=({refLineLayout:e,layoutService:t})=>t.meta.canBeContinuous?e.refLineExpr.value:e.refLineExpr.stringValue,va=(e,t,n)=>{const{dimensionRefLineInfo:r}=t;if(r[e])return r[e][n]},xa=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:i}=n;return void 0!==r&&void 0!==i&&void 0!==e.valueInfo&&e.valueInfo.maxOrder<r},ba=({label:e,dataPages:t})=>{const{qArea:n={}}=t||{},{qTop:r,qHeight:i}=n;return void 0!==r&&void 0!==i&&void 0!==e.valueInfo&&e.valueInfo.minOrder>=r+i},Sa=({value:e,qMin:t})=>"NaN"!==t&&e<t,Ea=({value:e,qMax:t})=>"NaN"!==t&&e>t,Ma={isRefLineVisible:da,getVisibleRefLines:ma,getRefLines:ha,getMeasureRefLines:e=>ha(e,"refLine.refLines"),getDimensionRefLines:(e,t)=>t?[]:ha(e,"refLine.dimRefLines"),isRefLineLabelVisible:fa,getVisibleRefLineLabels:pa,getRefLineLabels:ya,getMeasureRefLineLabels:e=>ya(e,"refLine.refLines"),getDimensionRefLineLabels:(e,t)=>t?[]:ya(e,"refLine.dimRefLines"),getScaledPosition:({scale:e,size:t,value:n,valueInfo:r,align:i,invert:o=!1,layoutService:a,isContinuous:s})=>{if(!s){const s=e.pxScale(t);let l;if(a.meta.isGroupedByMeasure)return l=ca(s,i,o,a.meta.measureCount),s([n,0])+l;if(a.meta.isGroupedByDimension){if(!r)return NaN;const{innerValues:e,numInnerValues:t,minOrder:a}=r;let u;return l=ca(s,i,o,t),e&&e.length&&(u=(({pxScale:e,value:t,innerValues:n,invert:r,minOrder:i})=>{const o=(({pxScale:e,invert:t})=>e.bandwidth()*(t?-1:1))({pxScale:e,invert:r});for(let r=0;r<n.length;r++){const{id:a,order:s}=n[r],l=e([t,a]);if(void 0!==l)return l-o*(s-i)}})({pxScale:s,value:n,innerValues:e,invert:o,minOrder:a})),(void 0===u?s(n):u)+l}return l=ca(s,i,o),s(n)+l}return e(n)},getDimensionValuesInfo:({layout:e,canBeContinuous:t,discreteModel:n,layoutService:r})=>{const{isGroupedByDimension:i}=r.meta,o={},a=fe.getValue(e,"qHyperCube"),s="K"===a.qMode,l=n?n.query.getCurrentDataPage():fe.getValue(a,"S"===a.qMode?"qDataPages.0":"qStackedDataPages.0",[]);const u=s?"qData.0.qSubNodes":"qMatrix",c=fe.getValue(l,u,[]),d=((e,t)=>e?t?"qValue":"qNum":"qText")(t,s),m=(e=>e.qArea.qTop)(l);return s?(()=>{for(let e=0;e<c.length;e++){const t=c[e],n=e+m,r=t[d];o[r]||(o[r]={id:t.qElemNo,qText:t.qText,minOrder:n,maxOrder:n})}})():i?(()=>{let e;for(let t=0;t<c.length;t++){const n=c[t][0],r=c[t][1],i=t+m,a=n[d];o[a]?(o[a].minOrder=Math.min(o[a].minOrder,i),o[a].maxOrder=Math.max(o[a].maxOrder,i),o[a].innerValues[o[a].innerValues.length]={id:r.qElemNumber,order:i}):o[a]={id:n.qElemNumber,qText:n.qText,minOrder:i,maxOrder:i,innerValues:[{id:r.qElemNumber,order:i}]},0===t?0===i&&(o[a].isMinOrderOk=!0):a!==e&&(o[a].isMinOrderOk=!0,o[e].isMaxOrderOk=!0),e=a}})():(()=>{for(let e=0;e<c.length;e++){const t=c[e][0],n=e+m,r=t[d];o[r]||(o[r]={id:t.qElemNumber,qText:t.qText,minOrder:n,maxOrder:n})}})(),o},getInputValue:ga,extractInfoFromInputValue:va,resolveValue:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=ga({refLineLayout:e,layoutService:n});return va(r,t,"id")},isDiscreteMinOutOfBounds:xa,isDiscreteMaxOutOfBounds:ba,isContinuousMinOutOfBounds:Sa,isContinuousMaxOutOfBounds:Ea,isOutOfRange:({value:e,qMin:t,qMax:n})=>Sa({value:e,qMin:t})||Ea({value:e,qMax:n}),isOutOfDataPages:({label:e,dataPages:t})=>e.valueInfo.isMinOrderOk&&ba({label:e,dataPages:t})||e.valueInfo.isMaxOrderOk&&xa({label:e,dataPages:t}),getInvert:({orientation:e,rtl:t,isContinuous:n})=>"horizontal"===e?t:n},Ca="…";function Aa(e,t,n=70){for(let r=0;r<e.length;r++){const i=e[r];i.lines=Go.tokenize(i.title,t,`${Ca} ${i.valueString}`,3,n),i.maxNumLines=i.lines.length}}function Oa({title:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:i=200}){const o=Go.tokenize(e,t,n,r,i),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n${o[e]}`}return s}function Ta({oobs:e,font:t,ellipsis:n,maxNumLines:r=5,maxWidth:i=200}){const o=e.map((e=>Oa({title:e.title,font:t,ellipsis:`${n} ${e.valueString}`,maxNumLines:r,maxWidth:i}))),a=o.length;let s="";if(a){[s]=o;for(let e=1;e<a;e++)s=`${s}\n\n${o[e]}`}return s}function Na(e,t="value"){e.sort(((e,n)=>e[t]-n[t]))}const wa=3,Ra=2;function Ia({inputValue:e,inputValueLabel:t,localeInfo:n}){if(void 0===e||void 0===t||e.toString()===t)return!1;if(!n)return!0;const r=`+-${n.qDecimalSep||""}${n.qThousandSep||""}`.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&");return t.replace(new RegExp(`[0-9e${r}]`,"g"),"").length>0||function(e){if(e.indexOf("e")>-1)return!1;const t=e.indexOf("-");return-1!==t&&(e.lastIndexOf("-")!==t||0!==t)}(t)}const ka=({label:e,dataPages:t,qMin:n,qMax:r})=>{if(void 0!==n&&void 0!==r){const{inputValue:t}=e;if(Ma.isContinuousMaxOutOfBounds({value:t,qMax:r}))return 1;if(Ma.isContinuousMinOutOfBounds({value:t,qMin:n}))return-1}return Ma.isDiscreteMaxOutOfBounds({label:e,dataPages:t})?1:Ma.isDiscreteMinOutOfBounds({label:e,dataPages:t})?-1:0},La={hasEngineFormat:Ia,calculateLabelPositions({labels:e,scale:t,size:n,layoutService:r,orientation:i,rtl:o,isContinuous:a,isDimension:s}){const l=Ma.getInvert({orientation:i,rtl:o,isContinuous:a}),u="S"===r.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",c=r.getHyperCubeValue(u),{canBeContinuous:d}=r.meta;let m,h;if(s&&d){const e=r.getLayoutValue("qHyperCube.qDimensionInfo.0");m=e.qMin,h=e.qMax}for(let i=0;i<e.length;i++){const o=e[i],{value:s,align:u,valueInfo:d}=o,f=ka({label:o,dataPages:c,qMin:m,qMax:h});o.scaledValue=1===f?l?-.1:1.1:-1===f?l?1.1:-.1:Ma.getScaledPosition({scale:t,size:n,value:s,valueInfo:d,align:u,invert:l,layoutService:r,isContinuous:a}),o.center=o.scaledValue*n}},getTitle:e=>!1!==e.showValue?!1!==e.showLabel?`${e.text} ${e.valueString}`:e.valueString:!1!==e.showLabel?e.text:"",addLabelTitles({labels:e,formatter:t,isContinuous:n,canBeContinuous:r,localeInfo:i}){let o;if(n)for(let n=0;n<e.length;n++){const r=e[n],{value:a,inputValue:s,inputValueLabel:l}=r;o=Ia({inputValue:s,inputValueLabel:l,localeInfo:i})?l:t?t(a):a,r.valueString=`${Oe.lrm}(${o})${Oe.lrm}`,r.title=La.getTitle(r)}else if(r)for(let t=0;t<e.length;t++){const n=e[t],{valueText:r,inputValue:a,inputValueLabel:s}=n;o=Ia({inputValue:a,inputValueLabel:s,localeInfo:i})?s:r,n.valueString=`${Oe.lrm}(${o})${Oe.lrm}`,n.title=La.getTitle(n)}else for(let t=0;t<e.length;t++){const n=e[t];o=n.valueText,n.valueString=`${Oe.lrm}(${o})${Oe.lrm}`,n.title=La.getTitle(n)}},measureLabelsWidth(e,t){for(let n=0;n<e.length;n++){const r=e[n];r.totalWidth=t(r.title).width}},measureLabelMaxLineWidth:(e,t)=>Math.max(...e.lines.map((e=>t(e).width))),getMaxTextWidth(e){const t=e.map((e=>e.totalWidth));return Math.max(...t)},addLabelsNeighborInfo(e,t,n,r=0){const i=e.length-1;if(i<0)return;let o,a;if([o]=e,o.cMin=t,0!==i){for(let t=0;t<i;t++)o=e[t],a=e[t+1],o.cMax=(o.center+a.center-r)/2,a.cMin=o.cMax+r;a.cMax=n}else o.cMax=n},getTotalNumLines(e){let t=0;return e.forEach((e=>{t+=e.maxNumLines})),t},reduceLabelsHavingMaxNumLines(e,t,n){const r=t-1,i=e.filter((e=>e.maxNumLines===t)),o=Math.min(n,i.length);for(let e=i.length-1;e>=i.length-o;e--)i[e].maxNumLines=r},reduceTotalMaxNumLines(e,t,n){const r=Math.floor(n/t);let i=3;do{const t=La.getTotalNumLines(e)-r;if(t<=0)return;La.reduceLabelsHavingMaxNumLines(e,i,t),i--}while(i>1)},reduceMaxNumLines(e,t,n=0){for(let r=0;r<e.length;r++){const i=e[r];i.maxNumLines=Math.max(1,Math.min(i.maxNumLines,Math.floor((Math.max(0,i.cMax-i.cMin)+n)/t)))}},addLabelsSize(e,t,n=15,r){for(let i=0;i<e.length;i++){const o=e[i];o.width=Math.min(t,La.measureLabelMaxLineWidth(o,r)),o.height=o.lines.length*n}},addLabelSegments(e,t){for(let n=0;n<e.length;n++){const r=e[n],{center:i}=r,o=r[t],a=o/2;r.segment={center:i,range:o,min:i-a,max:i+a,radius:a}}},addLabelsInfo({labels:e,scale:t,majorSize:n,lowerLimit:r,upperLimit:i,gap:o,font:a,maxLabelWidth:s,lineHeight:l,majorDimension:u,orientation:c,measureText:d,rtl:m,layoutService:h,isContinuous:f,isDimension:p}){const y=e.map((e=>e)),g=n;La.calculateLabelPositions({labels:e,scale:t,size:g,layoutService:h,orientation:c,rtl:m,isContinuous:f,isDimension:p}),Na(e,"center"),La.addLabelsNeighborInfo(e,r,i,o),Aa(e,a,s),La.reduceTotalMaxNumLines(y,l,i-(y.length-1)*o),"vertical"===c&&(La.reduceMaxNumLines(e,l,.05*o),function(e,t,n=70){for(let r=0;r<e.length;r++){const i=e[r];i.lines.length>i.maxNumLines&&(i.lines=Go.tokenize(i.title,t,`${Ca} ${i.valueString}`,i.maxNumLines,n))}}(e,a,s)),La.addLabelsSize(e,s,l,d),La.addLabelSegments(e,u)},createLabels({labels:e,style:t,maxLabelWidth:n,areaProps:r,area:i,lineHeight:o=15,font:a}){const{majorAxis:s,minorAxis:l,dock:u}=r,{minorCenter:c}=i,{fontSize:d,fontFamily:m,background:h}=t;let f=[];return e.forEach((e=>{const{lines:t}=e,r=t.length,i=t.map(((t,i)=>{const h={type:"text",text:t,title:Oa({title:e.title,font:a,ellipsis:`… ${e.valueString}`}),dx:0,dy:0,maxWidth:n,width:n,fontSize:d,fontFamily:m,fill:e.fill,baseline:"central",anchor:"middle",value:e.value,dock:u};return h[l]=c,h[s]=e.segment.position,h.y+=(i-(r-1)/2)*o,h}));e.background&&f.push(function({minorCenter:e,majorAxis:t,minorAxis:n,dock:r,label:i,lineHeight:o,background:a}){const{lines:s}=i,{borderRadius:l=wa,padding:u={}}=a,{top:c=Ra,bottom:d=Ra,left:m=Ra,right:h=Ra}=u,f=s.length,p={type:"rect",rx:l,ry:l,fill:i.background.fill,width:i.width+(m+h),height:i.height+(c+d),value:i.value,dock:r};return p[n]=e,p[t]=i.segment.position,p.x-=i.width/2+m,p.y-=f*o/2+c,p}({minorCenter:c,majorAxis:s,minorAxis:l,dock:u,label:e,lineHeight:o,background:h})),f=f.concat(i)})),f}};function Pa(e,t,n){let r;const i=typeof t;if("string"===i||"object"===i)r=e.formatter(t);else if(void 0!==n&&n.data){const e=n.data()&&n.data().fields;r=e&&e[0]?e[0].formatter():null}return r}function qa(e,t,n){return"top"===e||"bottom"===e?function(e,t){const{font:n,lineHeight:r,top:i,bottom:o,maxLabelWidth:a}=t;let s=1;return La.getMaxTextWidth(e)>a&&(Aa(e,n,a),s=Math.max(...e.map((e=>e.lines.length)))),s*r+i+o}(t,n):function(e,t){const{left:n,right:r,maxLabelWidth:i}=t;return Math.min(i,La.getMaxTextWidth(e))+n+r}(t,n)}function Da(e,t){return t?e.domain():[0,1]}function $a(e,t,n,r="value"){let i=e.filter((e=>e[r]>=t));i=i.filter((e=>e[r]<=n));const o=e.filter((e=>e[r]<t)),a=e.filter((e=>e[r]>n));return{filteredLabels:i,minOobs:o,maxOobs:a,numMinOobs:o.length,numMaxOobs:a.length}}function za(e){let t,n=0;for(let r=1;r<10;r++)t=e(r),n=Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height));return t=e("9+"),[n,Math.max(n,Math.sqrt(t.width*t.width+t.height*t.height))]}function _a(e,t){return e>9?t[1]:t[0]}function Ha({alignment:e,dockValue:t,oobs:n,style:r,rect:i,symbol:o,position:a,areaProps:s,radius:l,font:u}){const c=n?n.length:0;if(c<1)return[];const{flipXY:d,majorAxis:m,minorAxis:h,minorDimension:f,dock:p}=s,y=i[f],g=Ko.createOob({oob:Ko.getDefaultSettings({size:r.size,fill:r.fill,alignment:e}),dockValue:t,boxCenter:.5,rendWidth:i.width,rendHeight:i.height,flipXY:d,symbol:o});g.dock=p;const v=`c${m}`,x=`c${h}`,b={type:"circle",r:l,stroke:"transparent",fill:r.text.background.fill,strokeWidth:0,dock:p};b[x]=y/2,b[v]=a;const S={type:"text",text:c>9?"9+":c,title:Ta({oobs:n,font:u,ellipsis:"…"}),dx:0,dy:0,maxWidth:y,width:y,fontSize:r.text.fontSize,fontFamily:r.text.fontFamily,fill:r.text.fill,baseline:"central",anchor:"middle",dock:p};return S[h]=y/2,S[m]=a,[g,b,S]}function Ba(e){const t=`normal ${e.fontSize} '${e.fontFamily}'`;return{font:t,lineHeight:Go.getFontHeight(t)*(e.lineHeightMultiplicator||1),gap:e.gap||12,maxLabelWidth:e.maxWidth||75,top:e.padding.top||0,bottom:e.padding.bottom||0,left:e.padding.left||0,right:e.padding.right||0}}const Fa=e=>e.map((e=>({...e,value:"function"==typeof e.value?e.value():e.value,valueText:"function"==typeof e.valueText?e.valueText():e.valueText,valueInfo:"function"==typeof e.valueInfo?e.valueInfo():e.valueInfo})));var ja={require:["renderer","chart","symbol"],defaultSettings:{layout:{displayOrder:0,prioOrder:0}},preferredSize(){const{scale:e}=this,{style:t,layoutService:n,isContinuous:r,localeInfo:i}=this.settings,o=!!r||n.meta.canBeContinuous,a=Fa(this.settings.labels),s=Pa(this.chart,this.settings.formatter,e);La.addLabelTitles({labels:a,formatter:s,isContinuous:r,canBeContinuous:o,localeInfo:i});const{numMaxOobs:l,numMinOobs:u,filteredLabels:c}=(({labels:e,scale:t,isContinuous:n,canBeContinuous:r,layoutService:i})=>{if(n){const[r,i]=Da(t,n);return $a(e,r,i)}if(r){const t=i.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:n,qMax:r}=t;if("NaN"!==n&&"NaN"!==r)return $a(e,n,r,"inputValue")}return{filteredLabels:e}})({labels:a,scale:e,isContinuous:r,canBeContinuous:o,layoutService:n});let d;if(this.measureText=e=>this.renderer.measureText({text:e,fontSize:t.label.fontSize,fontFamily:t.label.fontFamily}),c&&c.length){const e=Ba(t.label),{dock:n}=this.settings.layout;return La.measureLabelsWidth(c,this.measureText),d=qa(n,c,e),d}const m=za(this.measureText),h=l?_a(l,m):0,f=u?_a(u,m):0;return d=Math.max(h,f),d},render(){const{scale:e}=this;if(!e.domain().length)return;const{symbol:t}=this,{style:n,layoutService:r,theme:i,isContinuous:o,isDimension:a,localeInfo:s}=this.settings,l=!!o||r.meta.canBeContinuous,u=Fa(this.settings.labels),{dock:c,rtl:d}=this.settings.layout,{padding:m}=n.label,h=function(e){return"left"===e||"right"===e?(e=>({dock:e,orientation:"vertical",majorAxis:"y",minorAxis:"x",majorDimension:"height",minorDimension:"width",flipXY:!1}))(e):(e=>({dock:e,orientation:"horizontal",majorAxis:"x",minorAxis:"y",majorDimension:"width",minorDimension:"height",flipXY:!0}))(e)}(c),f=function(e,t,n){const r=e[t.minorDimension];return{minorSize:r,majorSize:e[t.majorDimension],minorCenter:"vertical"===t.orientation?(r-n.right-n.left)/2+n.left:(r-n.top-n.bottom)/2+n.top}}(this.rect,h,m),{orientation:p,majorDimension:y}=h,{majorSize:g}=f,{font:v,lineHeight:x,gap:b,maxLabelWidth:S}=Ba(n.label),E=Pa(this.chart,this.settings.formatter,e),M=g;La.addLabelTitles({labels:u,formatter:E,isContinuous:o,canBeContinuous:l,localeInfo:s}),La.calculateLabelPositions({labels:u,scale:e,size:M,layoutService:r,orientation:p,rtl:d,isContinuous:o,isDimension:a});const[C,A]=Da(e,o),{filteredLabels:O,lowerOobs:T,upperOobs:N,lowerCircleSize:w,upperCircleSize:R,lowerOobSpace:I,upperOobSpace:k}=function({labels:e,minValue:t,maxValue:n,orientation:r,rtl:i,isContinuous:o,style:a,padding:s,measureText:l,prop:u="value"}){const{maxOobs:c,minOobs:d,filteredLabels:m}=$a(e,t,n,u),h="scaledValue"!==u&&Ma.getInvert({orientation:r,rtl:i,isContinuous:o}),f=function(e,t,n){return n?t:e}(d,c,h),p=function(e,t,n){return n?e:t}(d,c,h),y=f.length,g=p.length,v=za(l),x=_a(y,v),b=_a(g,v),S=function(e,t,n,r,i){return("vertical"===r?i.top:i.left)+(e>0?t+n:0)}(y,a.oob.size,x,r,s),E=function(e,t,n,r,i){return("vertical"===r?i.bottom:i.right)+(e>0?t+n:0)}(g,a.oob.size,b,r,s);return{filteredLabels:m,lowerOobs:f,upperOobs:p,lowerCircleSize:x,upperCircleSize:b,lowerOobSpace:S,upperOobSpace:E}}({labels:u,minValue:C,maxValue:A,orientation:p,rtl:d,isContinuous:o,style:n,padding:m,measureText:this.measureText,prop:o?"value":"scaledValue"}),L=I,P=g-k;Na(T),Na(N);const q=Ha({alignment:0,dockValue:0,oobs:T,style:n.oob,rect:this.rect,symbol:t,position:n.oob.size+w/2,areaProps:h,radius:w/2,font:v}),D=Ha({alignment:1,dockValue:1,oobs:N,style:n.oob,rect:this.rect,symbol:t,position:g-(n.oob.size+R/2),areaProps:h,radius:R/2,font:v});La.addLabelsInfo({labels:O,scale:e,majorSize:g,lowerLimit:L,upperLimit:P,font:v,lineHeight:x,gap:b,maxLabelWidth:S,majorDimension:y,orientation:p,measureText:this.measureText,rtl:d,layoutService:r,isContinuous:o,isDimension:a}),ua.layout(O.map((e=>e.segment)),L,P,n.label.gap);const $=O.filter((e=>ua.isInside(e.segment,L,P,o)));return La.createLabels({labels:$,style:n.label,maxLabelWidth:S,areaProps:h,area:f,lineHeight:x,font:v,theme:i}).concat([...q,...D])}};var Va={dataRelatedPropertiesPaths:["qHyperCube.qGrandTotalRow","qHyperCube.qHasOtherValues","qHyperCube.qSize","qHyperCube.qDimensionInfo[].qAttrDimInfo","qHyperCube.qDimensionInfo[].qCardinalities","qHyperCube.qDimensionInfo[].qMax","qHyperCube.qDimensionInfo[].qMin","qHyperCube.qDimensionInfo[].qStateCounts","qHyperCube.qMeasureInfo[].qApprMaxGlyphCount","qHyperCube.qMeasureInfo[].qAttrExprInfo","qHyperCube.qMeasureInfo[].qMax","qHyperCube.qMeasureInfo[].qMin","qHyperCube.qMeasureInfo[].qTrendLines","qHyperCube.qTreeNodesOnDim","qSelectionInfo"]};function Ua(e){const{qHyperCube:t,...n}=e,{qAxisData:r,qDataPages:i,qStackedDataPages:o,qTreeDataPages:a,...s}=t,l=re(!0,{},{...n,qHyperCube:{...s,qAxisData:null,qDataPages:null,qStackedDataPages:null,qTreeDataPages:null}}),{dataRelatedPropertiesPaths:u}=Va;return u.forEach((e=>{const t=e.split("[");if(1===t.length)void 0!==E(l,e)&&M(l,e,null);else{const e=t[0],n=t[1].split("].")[1];E(l,e,[]).forEach((e=>{void 0!==E(e,n)&&M(e,n,null)}))}})),l}var Ya={axes:{trackBy:function({isTime:e,isContinuous:t,isMeasure:n,isMajor:r}){return i=>{if(e||t||n){var o;if("line"===i.type)return null!==(o=i.tickValue)&&void 0!==o?o:"axis";if("text"===i.type)return`${i.tickValue} ${i.text}`;if("container"===i.type){const e=i.children.filter((e=>"text"===e.type)).map((e=>e.text));return`${i.data.value} ${e.join("")}`}return Math.random()}if(r){if("line"===i.type&&void 0===i.tickValue)return"axis";const e=i.transform&&i.transform.match(/rotate/gi)?"rotated":"horizontal";return`${i.data.group?`${i.data.group.value} `:""}${i.data.value} ${i.text} ${e}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:e,isTime:t,isContinuous:n,isHorizontal:r,dock:i}){return({currentNodes:o,currentRect:a,previousRect:s})=>{const l=a.x-s.x,u=a.y-s.y,c=a.width-s.width,d=a.height-s.height;e?("left"===i&&o.forEach((e=>{"line"===e.type?(e.x1+=c,e.x2+=c):"text"===e.type&&(e.x+=c)})),"left"!==i&&"right"!==i||o.forEach((e=>{var t;("line"===e.type&&(e.x1===e.x2?(e.y1=a.y,e.y2=e.y1+a.height):(Math.round(e.y1)<a.y||e.y1>a.y+a.height)&&(e.strokeWidth=0)),"text"===e.type)&&((e.y<a.y||e.y>a.y+a.height)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))})),"top"!==i&&"bottom"!==i||o.forEach((e=>{var t;("line"===e.type&&(e.y1===e.y2?(e.x1=a.x,e.x2=e.x1+a.width):(Math.round(e.x1)<a.x||e.x1>a.x+a.width)&&(e.strokeWidth=0)),"text"===e.type)&&((e.x<a.x||e.x>a.x+a.width)&&(e.fontSize="1px","#"===(null===(t=e.fill)||void 0===t?void 0:t[0])&&(e.fill=`${e.fill.slice(0,1)}00${e.fill.slice(1)}`)))}))):t?o.forEach((e=>{"line"===e.type?e.y1===e.y2?e.x2+=c:e.x1===e.x2&&(e.x1-=l,e.x2-=l):"text"===e.type&&(e.x-=l)})):n||r?o.forEach((e=>{"line"===e.type&&e.y1===e.y2&&(e.x1+=l,e.x2+=l+c)})):o.forEach((e=>{"line"===e.type&&e.x1===e.x2&&(e.y1+=u,e.y2+=u+d)}))}}},bars:{trackBy:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{void 0!==e.x&&void 0!==e.y?(e.x-=r,e.y-=i):e.transform=`translate(${-r}, ${-i})`}))}))}},barOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach((e=>{e.children&&e.children.length>0&&e.children.forEach((e=>{e.opacity=0}))}))}},labels:{trackBy:function(e){if("rect"===e.type)return"-3"===e.data?Math.random():`${e.type} ${e.data} ${e.rotation}`;const t=e.transform&&e.transform.match(/rotate/gi)?"rotated":"horizontal";return`${e.type} ${e.data} ${e.text} ${t}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.transform&&e.transform.match(/rotate\(-90/gi)?(e.x+=i,e.y-=r):(e.x-=r,e.y-=i)}))},linkData:function(e){return e.data.measureIndex?`${e.data.value} ${e.data.measureIndex.value}`:e.data.group?`${e.data.value} ${e.data.group.value}`:e.data.stack?`${e.data.value} ${e.data.stack.value}`:`${e.data.value}`}},lines:{trackBy:function(e){var t;return"line"===e.type?null!==(t=e.value)&&void 0!==t?t:Math.random():"path"===e.type?`${e.generatorType} ${e.layerObj.id} ${e.data.source.key}`:Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;e.forEach((e=>{if(void 0!==e.x1&&void 0!==e.y1)e.y1===e.y2?(e.x2=e.x1+t.width,e.y1-=i,e.y2-=i):e.x1===e.x2&&(e.y2=e.y1+t.height,e.x1-=r,e.x2-=r);else{const t="x"===e.major.p?r/e.major.size:i/e.major.size,n="y"===e.minor.p?i/e.minor.size:r/e.minor.size;e.points.forEach((e=>{e.modified||(e.major-=t,e.minor-=n,e.minor0-=n,e.modified=!0)}))}}))}},lineOobs:{compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x;0===t.y-n.y&&0===r||e.forEach((e=>{e.opacity=0}))}},points:{trackBy:function(e){return e.data.line?`${e.data.line.value} ${e.data.major.value}`:`${e.data.major.value}`},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y;0===r&&0===i||e.forEach((e=>{e.cx-=r,e.cy-=i}))}},refLineLabels:{trackBy:function(e){if(void 0!==e.value){if("rect"===e.type)return`${e.value}`;if("text"===e.type)return`${e.value} ${e.text}`}return Math.random()},compensateForLayoutChanges:function({currentNodes:e,currentRect:t,previousRect:n}){const r=t.x-n.x,i=t.y-n.y,o=t.width-n.width,a=t.height-n.height;let s=-r,l=-i;e.forEach((e=>{switch(e.dock){case"right":r>0&&(s=t.width);break;case"left":o<0&&(s=-n.width);break;case"top":a<0&&(l=-n.height);break;case"bottom":i>0&&(l=t.height)}switch(e.type){case"text":case"rect":e.x+=s,e.y+=l;break;case"circle":e.cx+=s,e.cy+=l;break;case"path":e.transform=`translate(${s}, ${l})`}}))}},shadowBars:{trackBy:function(){return Math.random()}},cacheProperties:function({viewCache:e,layout:t}){const n=Ua(t);e.set("dataIndependentProperties",JSON.stringify(n))},propertiesHaveChanged:function({viewCache:e,layout:t}){const n=Ua(t);return e.get("dataIndependentProperties")!==JSON.stringify(n)},nonUpdatingNode:{trackBy:function(){return Math.random()}}};const{getInputValue:Wa,extractInfoFromInputValue:Xa,resolveValue:Ga}=Ma;var Ka={resolveValue:Ga,resolveInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.isGroupedByDimension){const r=Wa({refLineLayout:e,layoutService:n});return Xa(r,t,"innerValues")}},resolveNumInnerValues:({refLineLayout:e,refLineModel:t,layoutService:n})=>{if(n.meta.mode.K)return 0;const r=Wa({refLineLayout:e,layoutService:n});return Xa(r,t,"numInnerValues")||0},resolveValueText:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const{dimensionValuesInfo:r}=t,{canBeContinuous:i}=n.meta,o=Wa({refLineLayout:e,layoutService:n});return r[o]&&i?r[o].qText:o},resolveValueInfo:({refLineLayout:e,refLineModel:t,layoutService:n})=>{const r=Wa({refLineLayout:e,layoutService:n}),{dimensionRefLineInfo:i}=t;return i[r]}};const Ja=({isDimension:e,refLineLayout:t,refLineModel:n,layoutService:r,colorModel:i,dockService:o,chart:a,scale:s,axis:l,invert:u,component:c,isContinuous:d})=>{var m,h;const f={dir:l,line:{strokeWidth:(null==t||null===(m=t.style)||void 0===m?void 0:m.lineThickness)||2,strokeDasharray:null==t||null===(h=t.style)||void 0===h?void 0:h.lineType,stroke:i.resolveUIColor(t.paletteColor||{index:t.color})}};return!e||r.meta.isContinuous?(f.scale=s,f.value=t.refLineExpr.value):(f.valueInfo=Ka.resolveValueInfo({refLineLayout:t,refLineModel:n,layoutService:r}),f.value=()=>{var e;const i=Ma.getScaledPosition({scale:a.scale(s),value:Ka.resolveValue({refLineLayout:t,refLineModel:n,layoutService:r}),valueInfo:f.valueInfo,size:null===(e=a.component(c))||void 0===e?void 0:e.rect["horizontal"===o.meta.major.orientation?"width":"height"],align:t.align,invert:u,layoutService:r,isContinuous:d});return Number.isNaN(i)?void 0:i}),f};function Za({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,dockService:i,animationsEnabled:o,chart:a,scale:s,axis:l,rtl:u,key:c,mainComponentKey:d,path:m,minimumLayoutMode:h}){const f=e?t.dimensionRefLines:m?t.query.getRefLines(m):t.measureRefLines;if(!f.length)return!1;const p={key:c,type:"ref-line",layout:{minimumLayoutMode:h},lines:{y:[],x:[]},style:{oob:{show:!1}},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),animations:{enabled:o,trackBy:Ya.lines.trackBy,compensateForLayoutChanges:Ya.lines.compensateForLayoutChanges}},y=!(!e||"horizontal"!==i.meta.major.orientation||!u),g=!e||n.meta.isContinuous;return f.forEach((o=>{p.lines[l].push(Ja({isDimension:e,refLineLayout:o,refLineModel:t,layoutService:n,colorModel:r,dockService:i,chart:a,scale:s,axis:l,invert:y,component:d,isContinuous:g}))})),p}const Qa={referenceLine:{label:{name:{fontFamily:"Source Sans Pro, sans-serif",fontSize:"12px"}},outOfBounds:{backgroundColor:"#737373",color:"#e6e6e6",fontFamily:"Source Sans Pro, sans-serif",fontSize:"10px"}}},es=({isDimension:e,layoutService:t,animationsEnabled:n,style:r,labels:i,scale:o,formatter:a,dock:s,key:l,rtl:u,theme:c,isContinuous:d,localeInfo:m})=>({key:l,type:"reference-line-labels",renderer:"svg",labels:i,formatter:a,scale:o,layoutService:t,layout:{dock:s,rtl:u},theme:c,isContinuous:d,isDimension:e,localeInfo:m,style:{label:{fontFamily:r.referenceLine.label.name.fontFamily,fontSize:r.referenceLine.label.name.fontSize,padding:{top:2,bottom:2,left:u?2:4,right:u?4:2},background:{padding:{top:1,bottom:1,left:2,right:2}},maxWidth:100,gap:"left"===s||"right"===s?10:16},oob:{size:8,fill:r.referenceLine.outOfBounds.backgroundColor,text:{fontFamily:r.referenceLine.outOfBounds.fontFamily,fontSize:r.referenceLine.outOfBounds.fontSize,fill:r.referenceLine.outOfBounds.color,background:{fill:r.referenceLine.outOfBounds.backgroundColor}}}},animations:{enabled:n,trackBy:Ya.refLineLabels.trackBy,compensateForLayoutChanges:Ya.refLineLabels.compensateForLayoutChanges}}),ts=({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:i,theme:o,isContinuous:a})=>{const s=r.resolveUIColor(e.paletteColor||{index:e.color}),l={align:e.align,text:e.label,fill:e.coloredBackground?o.getContrastingColorTo(s):s,showValue:!1!==e.showValue,showLabel:!1!==e.showLabel,inputValue:e.refLineExpr.value,inputValueLabel:e.refLineExpr.label};return e.coloredBackground&&(l.background={fill:s}),a?(l.scale=i,l.value=e.refLineExpr.value):(l.value=()=>Ka.resolveValue({refLineLayout:e,refLineModel:t,layoutService:n}),l.valueText=()=>Ka.resolveValueText({refLineLayout:e,refLineModel:t,layoutService:n}),l.valueInfo=()=>Ka.resolveValueInfo({refLineLayout:e,refLineModel:t,layoutService:n})),l};function ns({isDimension:e,refLineModel:t={},layoutService:n,colorModel:r,animationsEnabled:i,dock:o,scale:a,style:s,formatter:l,theme:u,localeInfo:c,rtl:d,key:m,path:h}){const f=e?t.dimensionRefLineLabels:h?t.query.getRefLineLabels(h):t.measureRefLineLabels;if(!f.length)return[];const p=[],y=!e||n.meta.isContinuous,g=f.map((e=>ts({refLineLayout:e,refLineModel:t,layoutService:n,colorModel:r,scale:a,theme:u,isContinuous:y})));return p.push(es({isDimension:e,rtl:d,style:re(!0,Qa,s),dock:o,key:m,labels:g,scale:a,formatter:l,layoutService:n,animationsEnabled:i,theme:u,isContinuous:y,localeInfo:c})),p}function rs({layoutService:e,discreteModel:t}){const{isContinuous:n,canBeContinuous:r,isGroupedByDimension:i}=e.meta,o=e.getLayout(),a="K"===o.qHyperCube.qMode,s=ve.dimensionless(o),l=Ma.getMeasureRefLines(o),u=Ma.getDimensionRefLines(o,s),c=Ma.getMeasureRefLineLabels(o),d=Ma.getDimensionRefLineLabels(o,s);let m={},h={};const f=()=>!(!u||!u.length)&&!u.every((t=>{const o=Ma.getInputValue({refLineLayout:t,layoutService:e});return(t=>{if(r){const n=e.getLayoutValue("qHyperCube.qDimensionInfo.0"),{qMin:r,qMax:i}=n;return Ma.isOutOfRange({value:t,qMin:r,qMax:i})}return!1})(o)||(t=>{if(!h[t])return!1;if(!n&&i){const n={valueInfo:h[t]},r="S"===e.getHyperCubeValue("qMode")?"qDataPages.0":"qStackedDataPages.0",i=e.getHyperCubeValue(r);return Ma.isOutOfDataPages({label:n,dataPages:i})}return!0})(o)})),p={isKMode:a,canBeContinuous:r,measureRefLines:l,dimensionRefLines:u,measureRefLineLabels:c,dimensionRefLineLabels:d,dimensionRefLineInfo:h,dimensionValuesInfo:m,query:{getRefLines:e=>Ma.getRefLines(o,e),getRefLineLabels:e=>Ma.getRefLineLabels(o,e)},update:()=>{h=p.dimensionRefLineInfo,f()&&(m=Ma.getDimensionValuesInfo({layout:o,canBeContinuous:r,discreteModel:t,layoutService:e}),p.dimensionValuesInfo=m,u.forEach((t=>{const n=Ma.getInputValue({refLineLayout:t,layoutService:e});m[n]&&(h[n]?(h[n].innerValues=m[n].innerValues,h[n].minOrder=Math.min(h[n].minOrder,m[n].minOrder),h[n].maxOrder=Math.max(h[n].maxOrder,m[n].maxOrder),h[n].isMinOrderOk=h[n].isMinOrderOk||m[n].isMinOrderOk,h[n].isMaxOrderOk=h[n].isMaxOrderOk||m[n].isMaxOrderOk):h[n]={id:m[n].id,qText:m[n].qText,innerValues:m[n].innerValues,minOrder:m[n].minOrder,maxOrder:m[n].maxOrder,isMinOrderOk:m[n].isMinOrderOk,isMaxOrderOk:m[n].isMaxOrderOk},h[n].numInnerValues=(h[n].maxOrder||0)-(h[n].minOrder||0)+1)})))}};return p.update(),p}var is={DATA:{MAIN:"qHyperCube",REDUCED:"reduced-data"},SCALE:{MAJOR:"main-major",MAJOR_INNER:"major-inner",MINOR:{PRIMARY:"minor-primary",SECONDARY:"minor-secondary",REDUCED_PRIMARY:"reduced-minor-primary",REDUCED_SECONDARY:"reduced-minor-secondary"},COLOR:"color",REDUCED:"reduced-major"},COMPONENT:{BAR:"bar-series",BAR_LABEL:"bar-label",BAR_OOB_LABEL:"bar-oob-label",STACK_BAR:"stack-bar",STACK_BAR_LABEL:"stack-bar-label",AXIS:{MAJOR:"major-axis",MAJOR_CONTINUOUS:"major-axis-continuous",TIME_INNER:"major-axis-time-inner",TIME_OUTER:"major-axis-time-outer",MINOR:{PRIMARY:"minor-primary-axis",SECONDARY:"minor-secondary-axis"}},AXIS_OVERLAY:{TIME_INNER:"axis-overlay-time-inner",TIME_OUTER:"axis-overlay-time-outer",CONTINUOUS:"axis-overlay-continuous"},AXIS_TITLE:{MAJOR:"major-axis-title",MINOR:{PRIMARY:"minor-primary-axis-title",SECONDARY:"minor-secondary-axis-title"}},MARKER:"marker-series",LINE:"line-series",POINT:"point-component",LABEL_SPACE:"label-space-component",POINT_LABEL:"point-label",GRID_LINE:"grid-line",ZERO_LINE:"zero-line",LEGEND:"legend",LEGEND_CATEGORICAL:"legend-cat",LEGEND_TOOLTIP:"legend-tooltip",TOOLTIP:"tooltip-qcm",MINI_CHART:{BAR:"mini-chart-bar-series",LINE:"mini-chart-line-series",MARKER:"mini-chart-marker-series"},BAR_OOB:"bar-oob",GHOST_BAR_OOB:"ghost-bar-oob",SLICED_HAT:"sliced-hat",DATA_OOB_MARKER:"data-out-of-bounds-marker",PRIMARY_MEASURE_AXIS_REF_LINE:"primary-mes-axis-ref-line",SECONDARY_MEASURE_AXIS_REF_LINE:"secondary-mes-axis-ref-line",DIMENSION_REF_LINE:"dim-ref-line",PRIMARY_MEASURE_AXIS_REF_LINE_LABEL:"primary-mes-ref-line-label",SECONDARY_MEASURE_AXIS_REF_LINE_LABEL:"secondary-mes-ref-line-label",DIMENSION_REF_LINE_LABEL:"dim-ref-line-label"},COLLECTION:{PRIMARY:"primary-collection",SECONDARY:"secondary-collection",STACKED_PRIMARY:"stacked-collection-primary",STACKED_SECONDARY:"stacked-collection-secondary",STACKED_TOTAL_PRIMARY:"stacked-total-collection-primary",STACKED_TOTAL_SECONDARY:"stacked-total-collection-secondary",REDUCED:"reduced-collection",REDUCED_PRIMARY:"reduced-collection-primary",REDUCED_SECONDARY:"reduced-collection-secondary",REDUCED_STACKED_PRIMARY:"reduced-collection-stacked-primary",REDUCED_STACKED_SECONDARY:"reduced-collection-stacked-secondary",LINE:"line-collection"},FORMATTER:{PRIMARY:"primary-formatter",SECONDARY:"secondary-formatter"}},os={TYPE:{LINE:"line",BAR:"bar",MARKER:"marker"},AXIS:{PRIMARY:0,SECONDARY:1},NOPE_SERIES:{type:"bar",axis:0}};const as={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 ss(e){const t=e.split("/");return"qmem:"===t[0]&&""===t[1]}const ls={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 us(e,t,n){let r=e.ref.qStaticContentUrl.qUrl;const i=function(e){var t,n,r,i,o;let a,s,l,u,c,d;if(e&&(null!==(t=e.session)&&void 0!==t&&t.options||null!==(n=e.enigmaModel)&&void 0!==n&&null!==(r=n.session)&&void 0!==r&&r.sessionConfig||null!==(i=e.session)&&void 0!==i&&null!==(o=i.config)&&void 0!==o&&o.url)){var m;if(a=e.session.options||(null===(m=e.enigmaModel)||void 0===m?void 0:m.session.sessionConfig),!a){var h;a=null===(h=e.session)||void 0===h?void 0:h.config;const t=new URL(a.url);a.host=t.hostname,a.port=t.port,a.isSecure="wss:"===t.protocol}return d=void 0!==a.secure?a.secure:a.isSecure,s=d?"https://":"http://",l=a.host||"localhost",u=a.port?`:${a.port}`:"",c=a.prefix?a.prefix:"/","/"!==c[c.length-1]&&(c=`${c}/`),s+l+u+c}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 ls.getImageSize(r,t);return{src:r,size:t,height:o,width:a,imageError:s}}async function cs(e,t,n,r){var i,o,a,s,l,u;const{app:c,flags:d}=t,m=null===(i=e.layout)||void 0===i||null===(o=i.tooltip)||void 0===o?void 0:o.imageComponents;if(!m)return[];const[h]=m,f=h.size||"small",p=h.type||"media";let y=-1;for(let e=0;e<n.length;e++)if(n[e].cId===h.cId){y=e;break}const g=(null===(a=r.data)||void 0===a||null===(s=a.customTooltipAttrExps)||void 0===s?void 0:s.value)||[];let v;if(-1!==y&&g[y]&&(v=g[y]),"media"===p&&null!==(l=h.ref)&&void 0!==l&&null!==(u=l.qStaticContentUrl)&&void 0!==u&&u.qUrl)return us(h,f,c);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&&ss(a))try{const t=`data:image/png;base64, ${await e.getImage(a)}`,{height:n,width:i,imageError:s}=await ls.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 ls.getImageSize(a,r);o={src:a,size:r,height:e,width:t,imageError:n}}return o}(c,d,h,f,v);if(d.isEnabled("IMAGE_BUNDLE_LOAD")&&"field"===p&&v&&v.label){return async function(e,t,n,r){let i;const o=r.label,a=`qmem://${t.qFallbackTitle}/${o}`;if(ss(a))try{const t=await e.getImage(a);if(t){const e=`data:image/png;base64, ${t}`,{height:r,width:o,imageError:a}=await ls.getImageSize(e,n);i={src:e,size:n,height:r,width:o,imageError:a}}}catch(e){}return i}(c,n[y],f,v)}return[]}const ds={async addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){const i=t,o=[];for(let t=0;t<i.length;t++)o.push(cs(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,n;const r=null===(t=e.layout)||void 0===t||null===(n=t.tooltip)||void 0===n?void 0:n.imageComponents;return!!r&&r.length>0}},ms={async handlePromises({customTooltipModel:e,nodes:t,attrExps:n,opts:r}){let i=t;return i=await ds.addImagesToTheNodes({customTooltipModel:e,nodes:t,attrExps:n,opts:r}),i},checkIfPromisesExist:({customTooltipModel:e})=>ds.checkIfPromisesExist({customTooltipModel:e})};const hs=(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:as.CHART.CHART_PARENT_TYPE,qId:as.CHART.CHART_OBJECT_ID},qHyperCubeDef:{qDimensions:o,qMeasures:a,qInterColumnSortOrder:s,qInitialDataFetch:[{qWidth:0,qHeight:0}]},qStateName:l}},fs=e=>{var t,n,r;const i=null===(t=e.tooltip)||void 0===t||null===(n=t.chart)||void 0===n||null===(r=n.object)||void 0===r?void 0:r.refId;return{qInfo:{qType:as.CHART.CHART_CHILD_TYPE},qExtendsId:i}};const ps={createContainer:({ctx:e,layout:t})=>{var n,r;if(!((null===(n=t.qHyperCube)||void 0===n||null===(r=n.qDimensionInfo)||void 0===r?void 0:r.length)<=0))return function(e,t){var n,r,i,o;const a=null!==(n=null===(r=t.tooltip)||void 0===r||null===(i=r.chart)||void 0===i||null===(o=i.style)||void 0===o?void 0:o.size)&&void 0!==n?n:"medium",s=as.CHART.STYLE[a];return[{content:[e.h("div",{style:{display:"flex",width:s,height:s,backgroundColor:"#FFFFFF",borderRadius:"5px",padding:"2px",color:"#595959"},colspan:2,id:as.CHART.CONTAINER_ID})],colspan:2,style:{"text-align":e.rtl?"right":"left","max-width":s,width:"100%"}},{}]}(e,t)},show:async({app:e,properties:t,selectedNodes:n,dimIndex:r,customTooltipModel:i,rtl:o})=>{var a,s,l;const u=i,c=null==t||null===(a=t.tooltip)||void 0===a||null===(s=a.chart)||void 0===s||null===(l=s.object)||void 0===l?void 0:l.refId;if(null!=u&&u.embed&&e.removeSessionAlternateState&&e.addSessionAlternateState&&c&&!(t.qHyperCubeDef.qDimensions.length<=0)){await ps.hide({app:e,customTooltipModel:i});try{await async function({app:e,properties:t,customTooltipModel:n}){const r=n,i=as.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=as.CHART.STATE,a=hs(t,o),s=await e.createSessionObject(a),l=fs(t);if(s.id!==as.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(u.miniChartToken.alternateState&&u.miniChartToken.sessionObj&&a){var d,m,h,f;const e=n.length>0&&void 0!==(null===(d=n[0].data)||void 0===d?void 0:d.value)?[null===(m=n[0].data)||void 0===m?void 0:m.value]:[],a=void 0!==r?r:t.qHyperCubeDef.qDimensions.length-1;if(2===t.qHyperCubeDef.qDimensions.length&&void 0===r&&n.length>0){var p,y;const e=null!==(p=n[0].data.selectionOuterDimension)&&void 0!==p?p:n[0].data.selectionDimension;if(null!=e&&null!==(y=e.source)&&void 0!==y&&y.field){var g;const t=null==e||null===(g=e.source)||void 0===g?void 0:g.field.split("/"),n=t[t.length-1],r=void 0!==e.value?[e.value]:[];r.length>0&&void 0!==n&&u.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",Number(n),r,!1)}}e.length>0&&u.miniChartToken.sessionObj.selectHyperCubeValues("/qHyperCubeDef",a,e,!1);const s=document.getElementById(as.CHART.CONTAINER_ID),l={direction:o?"rtl":"ltr",isReadonly:!0,isPopover:!0,navigation:!1,selections:!1};u.miniChartToken.vis=await i.embed.render({element:s,model:u.miniChartToken.model,options:l,id:null===(h=u.miniChartToken.model)||void 0===h?void 0:h.id,type:null===(f=u.miniChartToken.model)||void 0===f?void 0:f.genericType})}}catch(t){await ps.hide({app:e,customTooltipModel:i})}}},hide:async({app:e,customTooltipModel:t})=>{const n=t;null!=n&&n.embed&&(ps.destroyVisualization({customTooltipModel:t}),await e.destroySessionObject(as.CHART.CHART_OBJECT_ID),n.miniChartToken.sessionObj=void 0,await async function({app:e,customTooltipModel:t}){const n=t,r=as.CHART.STATE;n.miniChartToken.alternateState=void 0,await e.removeSessionAlternateState(r)}({app:e,customTooltipModel:t}))},destroyVisualization:({customTooltipModel:e})=>{var t,n;const r=e;"function"==typeof(null===(t=r.miniChartToken)||void 0===t||null===(n=t.vis)||void 0===n?void 0:n.destroy)&&(r.miniChartToken.vis.destroy(),r.miniChartToken.vis=void 0)}};function ys(e){const t=e.qHyperCubeDef?e.qHyperCubeDef.qDimensions:e.qHyperCube.qDimensionInfo;if(t&&t.length>0)return t}function gs(){const{EXPRESSION:e,TITLE:t,DESCRIPTION:n,IMAGES:r}=as.CUSTOM,i={};return i[e]=!0,i[t]=!0,i[n]=!0,i[r]=!0,i}function vs(e){const t=gs();return e.filter((e=>t[e.id]))}const xs={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}=xs.getAttrExprData(a);o.length||n.length?ms.handlePromises({customTooltipModel:i,nodes:xs.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&&ps.hide({app:r.app,customTooltipModel:i}),t.emit("hide")}},checkIfPromisesExist:({customTooltipModel:e})=>ms.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,a,s;const t=i.length-1;n=(null===(o=e.qHyperCube)||void 0===o||null===(a=o.qDimensionInfo)||void 0===a||null===(s=a[t])||void 0===s?void 0:s.qAttrExprInfo)||[],r=`qDimensionInfo/${t}/qAttrExprInfo`}return{attrExps:n,fieldPath:r}},quarantineCustomTooltipAttrs(e,t={}){var n,r;if(!(null===(n=e.qLayoutExclude)||void 0===n||null===(r=n.quarantine)||void 0===r?void 0:r[as.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[as.CUSTOM.QUARANTINE]=[],e.forEach((e=>{r.quarantine[as.CUSTOM.QUARANTINE].push(e)})),n.qLayoutExclude=r}(vs(t.qAttributeExpressions||[]),e)}},unquarantineCustomTooltipAttrs(e){var t,n;const r=e;(null===(t=e.qLayoutExclude)||void 0===t||null===(n=t.quarantine)||void 0===n?void 0:n[as.CUSTOM.QUARANTINE])&&delete r.qLayoutExclude.quarantine[as.CUSTOM.QUARANTINE]},setAttrsFromQuarantine(e,t){const n=ys(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===vs(i).length){var o,a;const t=(null===(o=e.qLayoutExclude)||void 0===o||null===(a=o.quarantine)||void 0===a?void 0:a.customTooltip)||[],n=[...i,...t],s=e;s.qHyperCubeDef?s.qHyperCubeDef.qDimensions[r].qAttributeExpressions=n:s.qHyperCube.qDimensionInfo[r].qAttrExprInfo=n}},moveCustomTooltipAttrs(e,t={},n){let r=[];const i=ys(e)||[];[...i,t].forEach((e=>{const t=vs(e.qAttributeExpressions||[]);t.length>0&&(r=t)}));const o=gs(),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:Oe.detectTextDirection(e)},colspan:2},{}],getImageRow(e,t){const n=Oe.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 bs(e,t,n,r){var i,o,a;const s=(null===(i=t.qHyperCube)||void 0===i||null===(o=i[n])||void 0===o||null===(a=o[r])||void 0===a?void 0:a.qAttrExprInfo)||[],l=[],u=e.qSubNodes&&e.qSubNodes[r]?e.qSubNodes[r].qAttrExps:e.qAttrExps;return u?(s.forEach(((e,t)=>{const i=u.qValues&&u.qValues[t]?u.qValues[t]:void 0,o=void 0===i?"NaN":function(e,t){let n;switch(e.id){case as.CUSTOM.EXPRESSION:n="NaN"===t.qNum||e.isCustomFormatted?void 0===t.qText?"NaN":t.qText:t.qNum;break;case as.CUSTOM.TITLE:case as.CUSTOM.DESCRIPTION:case as.CUSTOM.IMAGES:n=void 0===t.qText?e.qFallbackTitle:t.qText;break;default:n="NaN"}return n}(e,i);l.push({source:{key:"qHyperCube",field:`${n}/${r}/qAttrExprInfo/${t}`},label:o,value:"value"})})),l):l}const Ss={getNode(e,{dimensionCount:t}){if(!t||t<1)return;const n=t-1,r="qDimensionInfo";return{field:`${r}/${n}`,value:t=>bs(t,e,r,n)}}};const Es={getCustomAttrExps(e,t,n){var r,i;const o={customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]},a=(null===(r=t.data)||void 0===r||null===(i=r.customTooltipAttrExps)||void 0===i?void 0:i.value)||[];if(Number.isNaN(a))return o;return function(e,t,n,r){const i={[as.CUSTOM.TITLE]:!0,[as.CUSTOM.DESCRIPTION]:!0},{attrExps:o,fieldPath:a}=xs.getAttrExprData(e);return 0===t.length||0===o.length||""===a||o.forEach(((e,o)=>{const s=t[o];if(e.id===as.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===as.CUSTOM.TITLE&&{title:t},value:t,id:e.id})}})),r}(n,a.map((t=>Te.getMeasure(e,t))),e,o)}};function Ms({nodes:e,layout:t,dataset:n}){const r=function(e,t,n){const r=[];return e.forEach((e=>{r.push(Es.getCustomAttrExps(n,e,t))})),r}(e,t,n);return r.reduce(((e,t)=>({customTooltipAttrExpsArr:e.customTooltipAttrExpsArr.concat(t.customTooltipAttrExpsArr),customTooltipInfoAttrExpsArr:e.customTooltipInfoAttrExpsArr.concat(t.customTooltipInfoAttrExpsArr)})),{customTooltipAttrExpsArr:[],customTooltipInfoAttrExpsArr:[]})}const{CUSTOM:Cs}=as;function As({flags:e,layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l,options:u}){var c,d,m;const h=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:xs,miniChartToken:{},embed:s}}({layout:t,app:n,model:r,picasso:i,chart:o,translator:a,localeInfo:s,embed:l}),f="rtl"===u.direction,p=!(!t.tooltip||t.tooltip.auto),y=p&&E(t,"tooltip.hideBasic",!1),g=!!(p&&null!==(c=t.tooltip)&&void 0!==c&&null!==(d=c.chart)&&void 0!==d&&null!==(m=d.object)&&void 0!==m&&m.refId&&l&&"function"==typeof(null==r?void 0:r.getEffectiveProperties));return{isEnabled:()=>p,hideBasic:()=>y,getAttributes:({dataset:e,nodes:n})=>{var r,i;const o=Ms({dataset:e,nodes:n,layout:t});return{title:null===(r=o.customTooltipInfoAttrExpsArr.find((e=>e.id===Cs.TITLE)))||void 0===r?void 0:r.title,description:null===(i=o.customTooltipInfoAttrExpsArr.find((e=>e.id===Cs.DESCRIPTION)))||void 0===i?void 0:i.value,measures:o.customTooltipAttrExpsArr}},hasImages:()=>xs.checkIfPromisesExist({customTooltipModel:h}),createImageRow:({value:e,h:t})=>xs.getImageRow(e,{h:t,rtl:f}),addImages:({nodes:r})=>{const i=xs.getDataNodes(o,r),{attrExps:a}=xs.getAttrExprData(t);return ms.handlePromises({customTooltipModel:h,nodes:i,attrExps:a,opts:{flags:e,app:n}})},chart:{isEnabled:()=>g,hasLimitation:()=>{var e;return!(null==n||null===(e=n.isInModalSelection)||void 0===e||!e.call(n))},createContainer:({h:e})=>ps.createContainer({layout:t,ctx:{h:e,rtl:f}}),createLimitationRow:()=>xs.getFooterRow(a.get("properties.tooltip.notselectedmessage"),f),show:({nodes:e,properties:t})=>ps.show({app:n,properties:t,selectedNodes:e,customTooltipModel:h,rtl:f}),hasAlternateState:()=>{var e;return!(null===(e=h.miniChartToken)||void 0===e||!e.alternateState)},hide:()=>ps.hide({app:n,customTooltipModel:h}),destroy:()=>ps.destroyVisualization({customTooltipModel:h})}}}function Os({key:e,source:t,layoutService:n,fieldModel:r,colorService:i,series:o}){const{meta:a}=n;if(a.isBarSeriesStacked){const{major:a,majorNumeric:s}=r.main,l=o.filter((e=>e.type===os.TYPE.BAR)),u=n.meta.isContinuous?s:a,c=e=>"NaN"!==e.qNum?e.qNum:0;return[{key:e,data:{extract:l.map((({ref:e,typeIndex:r,refIndex:o})=>({source:t,field:a,value:n.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:u},selectionDimension:{field:a},segment:{field:e,value:c,reduceLabel:"none"},end:{field:e,value:c,reduceLabel:"none"},null:{fields:l.map((e=>({field:e.ref}))),value:e=>Array.isArray(e)&&e.every((e=>"NaN"===e)),reduceLabel:"none"},typeIndex:r,...i.getDatumProps(o),customTooltipAttrExps:Ss.getNode(n.getLayout(),n.meta),sumOfPositives:{fields:l.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t>0?e+t:e),0),reduceLabel:"none"},sumOfNegatives:{fields:l.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t<0?e+t:e),0),reduceLabel:"none"}}}))),stack:{stackKey:e=>e.value,value:e=>e.end.value,offset:"diverging"}}}]}return[]}function Ts({key:e,series:t,source:n,fieldModel:r,colorService:i,layoutService:o,forceCreate:a=!1}){if(t.length||a){const{major:a,majorNumeric:s}=r.main,l=e=>"NaN"!==e.qNum?e.qNum:0,u=o.meta.isContinuous?s:a;return[{key:e,data:{extract:t.map((({ref:e,refIndex:t,typeIndex:r,options:s},c)=>({source:n,field:a,value:o.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:u},selectionDimension:{field:a},end:{field:e,value:s.showAsZeros?l:void 0,reduceLabel:"none"},start:0,line:c,typeIndex:r,null:{field:e,value:e=>"NaN"===e.qNum,reduceLabel:"none"},customTooltipAttrExps:Ss.getNode(o.getLayout(),o.meta),...i.getDatumProps(t)}})))}}]}return[]}function Ns({key:e,layoutService:t,fieldModel:n,series:r}){const{meta:i}=t;if(i.isBarSeriesStacked){const{major:t,majorNumeric:o}=n.main,a=r.filter((e=>e.type===os.TYPE.BAR)),s=i.isContinuous?{field:o,value:e=>e.qNum,reduceLabel:"none"}:[];return[{key:e,data:{extract:{field:0,props:{major:{field:i.isContinuous?o:t},null:{fields:a.map((e=>({field:e.ref}))),value:e=>Array.isArray(e)&&e.every((e=>"NaN"===e)),reduceLabel:"none"},sumOfPositives:{fields:a.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t>0?e+t:e),0),reduceLabel:"none"},sumOfNegatives:{fields:a.map((e=>({field:e.ref}))),value:e=>e.reduce(((e,t)=>t<0?e+t:e),0),reduceLabel:"none"},timeStart:s,timeEnd:s},value:i.isContinuous?e=>e.qNum:void 0}}}]}return[]}const ws={MINI_CHART:{value:"miniChart",translation:"properties.scrollbar.miniChart"},BAR:{value:"bar",translation:"properties.scrollbar.bar"},NONE:{value:"none",translation:"properties.scrollbar.none"}};var Rs={OPTIONS:ws,DEFAULT:ws.MINI_CHART};function Is({layoutService:e,discrete:t}){return({h:n,rect:r,orientation:i,minThumbSize:o})=>{const a=t.query.getCurrentDataPage(),s=e.meta.size.y,l="horizontal"===i,u=r[l?"width":"height"];let c=a.qArea.qTop/s*u,d=a.qArea.qHeight/s*u;if(d<o){const e=(o-d)/2;c=c-e+(Math.max(0,0-(c-e))-Math.max(0,c+d+e-u)),d=o}return n("div",{style:{position:"absolute",right:0,bottom:0,background:"red",opacity:.2,...l?{top:0,left:c,width:d}:{top:c,left:0,height:d}}})}}function ks({layoutService:e,viewState:t,viewCache:n}){return e.meta.isContinuous?function(e,t){const n=e.get("zoom"),r=t.get("continuousMin"),i=t.get("continuousMax");return[(n.min-r)/(i-r),(n.max-r)/(i-r)]}(t,n):function(e){return e.get("viewRange")}(t)}const Ls=e=>({miniChart:e===Rs.OPTIONS.MINI_CHART.value,bar:e===Rs.OPTIONS.BAR.value,none:e===Rs.OPTIONS.NONE.value}),Ps=({layoutService:e})=>{const t=e.getLayoutValue("scrollbar");if(t)return Ls(t);const n=e.getLayoutValue("showMiniChartForContinuousAxis");if(void 0===n)return Ls(Rs.DEFAULT.value);const r=e.getLayoutValue("dimensionAxis.continuousAuto"),i=e.getLayoutValue("preferContinuousAxis");return Ls(!n&&(r||!r&&i)?Rs.OPTIONS.NONE.value:Rs.OPTIONS.MINI_CHART.value)};function qs({layoutService:e,override:t}){const n=Ps({layoutService:e});return t&&t.predicate({layoutService:e,scrollbar:n})&&(n.miniChart=t.value===Rs.OPTIONS.MINI_CHART.value,n.bar=t.value===Rs.OPTIONS.BAR.value,n.none=t.value===Rs.OPTIONS.NONE.value),n}function Ds({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o,rtl:a}){return s=>{const{x:l,y:u}=s.center,c=t.element.getBoundingClientRect(),d=t.component(e),m="horizontal"===o.meta.major.orientation,h=m?l-c.left-d.rect.computedInner.x:u-c.top-d.rect.computedInner.y,f=m?d.rect.computedInner.width:d.rect.computedInner.height,p=m&&a?f-h:h,y=Math.max(0,Math.min(p/f,1)),[g,v]=ks({layoutService:i,viewState:n,viewCache:r}),x=y<g,b=y>v,S=!x&&!b;return{pixel:p,relative:y,thumb:S?p-g*f:0,beforeThumb:x,afterThumb:b,onThumb:S}}}function $s({componentKey:e,chart:t,viewState:n,viewCache:r,layoutService:i,dockService:o}){return()=>{const a=t.component(e),{orientation:s}=o.meta.major,{width:l,height:u}=a.rect.computedInner,c="horizontal"===s?l:u,[d,m]=ks({layoutService:i,viewState:n,viewCache:r});return{size:c,thumbSize:(m-d)*c}}}function zs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const u=Ds({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),c=$s({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Tap",options:{event:"scrollbarTap",enable:(r,i)=>!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e))},events:{scrollbarTap(n){n.preventDefault();const a=u(n);if(o.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=i.get("continuousMin"),o=i.get("continuousMax"),s=n+(o-n)*a.relative;r.set("zoom",{min:Math.min(s-t/2,o-t),max:Math.max(s+t/2,n+t)})}else{const e=c(),t=a.pixel-e.thumbSize/2,n=Math.max(0,t/e.size);s.command.scrollTo(n)}t.component(e).emit("render")}}}}const _s="data-scrollbar-handle";function Hs({e:e}){return(e.srcEvent||e).srcElement.getAttribute(_s)||""}const Bs="scrollbarResize",Fs=e=>{const[t]=e.changedPointers;return t&&("pointerdown"===t.type||"mousedown"===t.type)};function js({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s}){const l=Ds({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:s});return{type:"Pan",key:`event:${Bs}`,options:{event:Bs,threshold:0,enable(e,t){return!(!o.meta.isContinuous||!n.scroll.enabled())&&(!t||(this[Bs]=this[Bs]||{},Fs(t)&&Hs({e:t})&&(this[Bs].panningEvent=t.srcEvent),!!this[Bs].panningEvent))}},events:{[`${Bs}start`](n){n.preventDefault(),this[Bs]=this[Bs]||{},this[Bs].panningEvent&&t.component(e).emit("dragStart",this[Bs].panningEvent)},[`${Bs}move`](n){if(n.preventDefault(),this[Bs]=this[Bs]||{},!this[Bs].panningEvent)return;const o=r.get("zoom"),a=i.get("continuousMin"),s=i.get("continuousMax"),u=i.get("minimiumZoomSpan"),c=(s-a)*l(n).relative+a,d=Hs({e:this[Bs].panningEvent});let m="start"===d?Math.min(c,o.max):o.min,h="end"===d?Math.max(c,o.min):o.max;m===h&&(m-="start"===d?u:0,h+="end"===d?u:0),r.set("zoom",{min:m,max:h}),t.component(e).emit("render")},[`${Bs}end`](n){n.preventDefault(),this[Bs]=this[Bs]||{},delete this[Bs].panningEvent,t.component(e).emit("dragEnd")},[`${Bs}cancel`](n){n.preventDefault(),this[Bs]=this[Bs]||{},delete this[Bs].panningEvent,t.component(e).emit("dragEnd")}}}}const Vs="scrollbarPan";function Us({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){const u=Ds({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),c=$s({componentKey:e,chart:t,viewState:r,viewCache:i,layoutService:o,dockService:a});return{type:"Pan",key:`event:${Vs}`,options:{event:Vs,threshold:0,enable(r,i){return this[Vs]=this[Vs]||{},!(i&&!this[Vs].isPanning)||!!n.scroll.enabled()&&((!i||i.target===t.element)&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e)))}},events:{[`${Vs}start`](n){n.preventDefault();const a=u(n);if(this[Vs]=this[Vs]||{},this[Vs].isPanning=!0,t.component(e).emit("lockState"),o.meta.isContinuous){const e=r.get("zoom"),t=e.max-e.min,n=i.get("continuousMin"),o=i.get("continuousMax"),s=n+(o-n)*a.relative;s<e.min?r.set("zoom",{min:Math.min(s,o-t),max:Math.max(s+t,n+t)}):s>e.max&&r.set("zoom",{min:Math.min(s-t,o-t),max:Math.max(s,n+t)}),this[Vs].relative=a.relative,this[Vs].zoom=r.get("zoom"),this[Vs].zoom.span=this[Vs].zoom.max-this[Vs].zoom.min,this[Vs].zoom.fullSpan=o-n}else if(a.onThumb)this[Vs].offset=a.thumb;else{const e=c();this[Vs].offset=a.beforeThumb?0:e.thumbSize}},[`${Vs}move`](n){n.preventDefault();const a=u(n);if(this[Vs]=this[Vs]||{},o.meta.isContinuous){const e=a.relative-this[Vs].relative,{fullSpan:t,span:n,min:o,max:s}=this[Vs].zoom,l=i.get("continuousMin"),u=i.get("continuousMax");r.set("zoom",{min:Math.min(o+e*t,u-n),max:Math.max(s+e*t,l+n)})}else{const e=a.pixel-(this[Vs].offset||0),t=c(),n=Math.max(0,e/t.size);s.command.scrollTo(n)}t.component(e).emit("render")},[`${Vs}end`](n){n.preventDefault(),this[Vs]=this[Vs]||{},this[Vs].isPanning=!1,t.component(e).emit("unlockState")},[`${Vs}cancel`](n){n.preventDefault(),this[Vs]=this[Vs]||{},this[Vs].isPanning=!1,t.component(e).emit("unlockState")}}}}function Ys({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return[zs({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}),js({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,rtl:l}),Us({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})]}function Ws({componentKey:e,chart:t,actions:n,layoutService:r}){const i=(i,o)=>{if(!r.meta.isContinuous)return;const a=t.component(e);a&&a.emit&&n.scroll.enabled()&&a.emit(i,o)};return{type:"native",events:{mousemove:e=>i("hover",e),mouseleave:()=>i("leave")}}}const Xs={background:"rgba(0, 0, 0, 0.1)"},Gs={top:-1,bottom:-1,width:6},Ks={width:2,background:"#595959"};var Js={before:Xs,after:Xs,thumb:{background:"transparent",border:"1px solid rgba(68, 68, 68, 0.4)"},startHandle:Gs,endHandle:Gs,startHandleBorder:Ks,endHandleBorder:Ks};const Zs={background:"rgba(0, 0, 0, 0.1)"},Qs={top:-1,bottom:-1,width:6},el={width:2,background:"#595959"};var tl={before:Zs,after:Zs,thumb:{background:"#B0AFAE",border:"transparent"},startHandle:Qs,endHandle:Qs,startHandleBorder:el,endHandleBorder:el};const nl={position:"absolute",top:0,right:0,bottom:0,left:0,boxSizing:"border-box"},rl={pointerEvents:"initial"},il={pointerEvents:"none"};const ol="ew-resize",al="default";function sl(){const{rect:e}=this,{settings:t}=this.settings,n="horizontal"===t.orientation,r=n?e.computedInner.width:e.computedInner.height,i=t.range(),o=n&&t.rtl;return{size:r,start:(o?1-i[1]:i[0])*r,end:(o?1-i[0]:i[1])*r}}function ll(){const e=this.state.hover.start||this.state.hover.end||this.state.drag.start||this.state.drag.end;this.renderer.element().ownerDocument.body.style.cursor=e?ol:al}function ul(e,t,n){const{min:r}=this.settings.settings.size.thumb;if(n-t<r){const i=(r-(n-t))/2,o=Math.max(0,0-(t-i))-Math.max(0,n+i-e);return{size:e,start:t-i+o,end:n+i+o}}return{size:e,start:t,end:n}}function cl(e){const t=(e.srcEvent||e).srcElement;return this.renderer.element().contains(t)}function dl(){const{size:e,start:t,end:n}=sl.call(this);this.renderer.render(this.elements(this.h,ul.call(this,e,t,n)))}function ml(){const{state:e,settings:t,style:n}=this,r=t.settings.style;return e.style[r]||(e.style[r]=function({id:e,style:t}){const n="slim"===e?tl:Js;return{container:{...nl},before:{...nl,...n.before,...t.before},after:{...nl,...n.after,...t.after},thumb:{...nl,...n.thumb,...t.thumb},startHandle:{...nl,...rl,...n.startHandle},endHandle:{...nl,...rl,...n.endHandle},startHandleBorder:{...nl,...il,...n.startHandleBorder},endHandleBorder:{...nl,...il,...n.endHandleBorder}}}({id:t.settings.style,style:n[r]})),e.style[r]}var hl={require:["renderer"],defaultSettings:{settings:{style:"standard",size:{area:{min:30,max:40,ratio:1/8},thumb:{min:4}},orientation:"horizontal",rtl:!1,isContinuous:!1,range:()=>[0,1],injections:()=>[]},style:{standard:{before:{},thumb:{},after:{}},slim:{before:{},thumb:{},after:{}}}},renderer:"dom",on:{render(){dl.call(this)},lockState(){this.state.locked=!0},unlockState(){this.state.locked=!1},hover(e){if(this.state.locked||this.state.drag.start||this.state.drag.end||!cl.call(this,e)&&this.state.hover.isPristine())return;this.state.hover.reset();const t=Hs({e:e});t&&(this.state.hover[t]=!0),ll.call(this),dl.call(this)},leave(){this.state.locked||(this.state.hover.reset(),ll.call(this),dl.call(this))},dragStart(e){if(this.state.locked)return;this.state.drag.reset();const t=Hs({e:e});t&&(this.state.drag[t]=!0),ll.call(this)},dragEnd(){this.state.locked||(this.state.drag.reset(),ll.call(this),dl.call(this))}},preferredSize({outer:e}){const{min:t,max:n,ratio:r}=this.settings.settings.size.area,i="horizontal"===this.settings.settings.orientation?"height":"width";return Math.max(t,Math.min(n,e[i]*r))},created(){this.state={style:{},locked:!1,hover:{start:!1,end:!1,reset(){this.start=!1,this.end=!1},isPristine(){return!this.start&&!this.end}},drag:{start:!1,end:!1,reset(){this.start=!1,this.end=!1}}}},render(e){this.h=e;const{size:t,start:n,end:r}=sl.call(this);return this.elements(e,ul.call(this,t,n,r))},properties(){return"horizontal"===this.settings.settings.orientation?{start:"left",end:"right"}:{start:"top",end:"bottom"}},elements(e,{size:t,start:n,end:r}){const{settings:i}=this.settings,o=i.injections().map((t=>t({h:e,rect:this.rect,orientation:i.orientation,minThumbSize:i.size.thumb.min})));return function({h:e,size:t,start:n,end:r,properties:i,startHandleActive:o,endHandleActive:a,style:s,continuous:l,invert:u,injections:c}){const d={[i.end]:t-n},m={[i.start]:r},h={left:-3},f={left:1},p={right:-3,left:"auto"},y={left:3},g=e("div",{style:{...s.before,...u?m:d},class:"scrollbar--before"}),v=e("div",{style:{...s.after,...u?d:m},class:"scrollbar--after"}),x=[];if(l){const t=e("div",{style:{...s.startHandle,...u?p:h},class:"scrollbar--start-handle",[_s]:"start"},o?e("div",{style:{...s.startHandleBorder,...u?y:f}}):void 0);x.push(t);const n=e("div",{style:{...s.endHandle,...u?h:p},class:"scrollbar--end-handle",[_s]:"end"},a?e("div",{style:{...s.endHandleBorder,...u?f:y}}):void 0);x.push(n)}const b=e("div",{style:{...s.thumb,[i.start]:n,[i.end]:t-r},class:"scrollbar--thumb"},x);return e("div",{style:{...s.container}},[g,b,v,...c])}({h:e,size:t,start:n,end:r,properties:this.properties(),startHandleActive:this.state.hover.start||this.state.drag.start,endHandleActive:this.state.hover.end||this.state.drag.end,style:ml.call(this),continuous:i.isContinuous,invert:"horizontal"===i.orientation&&i.rtl,injections:o})}};function fl({layoutService:e}){return e.meta.isContinuous&&qs({layoutService:e}).miniChart}function pl({models:e}){const{layoutService:t,fieldModel:n,seriesModel:r,colorService:i}=e,{primarySeries:o,secondarySeries:a}=r.meta,s=r.query.series(os.TYPE.LINE),l=[...Ts({forceCreate:!0,key:is.COLLECTION.PRIMARY,series:o,fieldModel:n,colorService:i,layoutService:t}),...Ts({key:is.COLLECTION.SECONDARY,series:a,fieldModel:n,colorService:i,layoutService:t}),...Ts({key:is.COLLECTION.LINE,series:s,fieldModel:n,colorService:i,layoutService:t}),...Os({key:is.COLLECTION.STACKED_PRIMARY,layoutService:t,fieldModel:n,colorService:i,series:o}),...Os({key:is.COLLECTION.STACKED_SECONDARY,layoutService:t,fieldModel:n,colorService:i,series:a}),...Ns({key:is.COLLECTION.STACKED_TOTAL_PRIMARY,layoutService:t,fieldModel:n,series:o}),...Ns({key:is.COLLECTION.STACKED_TOTAL_SECONDARY,layoutService:t,fieldModel:n,series:a})];return fl(e)&&(l.push(...Ts({key:is.COLLECTION.REDUCED,source:is.DATA.REDUCED,series:r.query.all(),fieldModel:n,colorService:i,layoutService:t})),l.push(...Ts({key:is.COLLECTION.REDUCED_PRIMARY,source:is.DATA.REDUCED,series:o,fieldModel:n,colorService:i,layoutService:t})),l.push(...Ts({key:is.COLLECTION.REDUCED_SECONDARY,source:is.DATA.REDUCED,series:a,fieldModel:n,colorService:i,layoutService:t})),l.push(...Os({key:is.COLLECTION.REDUCED_STACKED_PRIMARY,source:is.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.primarySeries.filter((e=>e.type===os.TYPE.BAR)),colorService:i})),l.push(...Os({key:is.COLLECTION.REDUCED_STACKED_SECONDARY,source:is.DATA.REDUCED,layoutService:t,fieldModel:n,series:r.meta.secondarySeries.filter((e=>e.type===os.TYPE.BAR)),colorService:i}))),l}const yl=({layoutService:e,dockService:t})=>"custom"!==e.getLayoutValue("dimensionAxis.axisDisplayMode")?Math.min(200,t.meta.chart.size["horizontal"===t.meta.major.orientation?"height":"width"]/4):void 0;function gl({models:e}){const{dockService:t,seriesModel:n,layoutService:r}=e,i=2===n.meta.measureAxes.length;if(i)return.5;const o=n.meta.measureAxes[0].isPrimary?t.meta.minor.dock:t.meta.minorSecondary.dock;if(!i){const e=n.meta.measureAxes[0].isPrimary?0:1;if("none"===r.getLayoutValue(`measureAxes.${e}.show`))return.5}return"horizontal"===t.meta.minor.orientation?"near"===o||"bottom"===o?1:0:"near"===o||"left"===o?0:1}const vl=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:r,layoutService:i,dockService:o}=e,{orientation:a}=o.meta.major;return{data:{extract:{field:n.main.major,props:{selectionDimension:{field:n.main.major}}}},maxPxStep:yl({layoutService:i,dockService:o}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:gl({models:e})}},xl=({models:e,environment:t})=>{const{fieldModel:n,discreteModel:r,layoutService:i,dockService:o}=e,{orientation:a}=o.meta.major;return{type:"group-by-measure",data:{extract:{field:n.main.major}},measureCount:i.meta.groupSize,maxPxStep:yl({layoutService:i,dockService:o}),invert:"horizontal"===a&&"rtl"===t.options.direction,range:r.query.getScaleRange,align:gl({models:e})}};function bl({viewState:e,models:t,environment:n}){const{fieldModel:r,dockService:i}=t,{orientation:o}=i.meta.major;return{type:"linear",invert:"horizontal"===o&&"rtl"===n.options.direction,data:{extract:{field:r.main.majorNumeric}},ticks:{forceBounds:!0,count:e.get("zoom").min===e.get("zoom").max?1:void 0},minorTicks:{count:1},min:()=>e.get("zoom").min,max:()=>e.get("zoom").max}}function Sl({viewCache:e,mainMajor:t}){return re(!0,{},t,{min:()=>e.get("continuousMin"),max:()=>e.get("continuousMax")})}function El({viewState:e,viewCache:t,layoutService:n}){return t.set("qTimeAxisCache",[]),{get:(e,n=0)=>{const r=t.get("qTimeAxisCache");return r[n]&&r[n][0]===e?r[n][1]:void 0},set:(e,n,r=0)=>{t.get("qTimeAxisCache")[r]=[e,n]},key:({distance:r})=>{const{min:i,max:o}=e.get("zoom"),a=(o-i)/(t.get("continuousMax")-t.get("continuousMin")),s=n.getHyperCubeValue("qAxisData.qAxis",[]).map((e=>e.qName));return[r,Number.parseFloat(a).toFixed(12),...s].toString()}}}function Ml({picasso:e,viewState:t,viewCache:n,models:r,environment:i}){const{layoutService:o,fieldModel:a,appLayoutModel:s,themeService:l}=r,{measureText:u}=e.renderer("svg")(),{majorNumeric:c}=a.main,d=l.getStyles(),m={type:"time",data:{field:c},qAxis:()=>o.getHyperCubeValue("qAxisData.qAxis",[]),field:c,min:()=>t.get("zoom").min,max:()=>t.get("zoom").max,invert:"rtl"===i.options.direction,formatter:{fn:e.formatter("q-time"),localeInfo:s.qLocaleInfo,qNumFormat:o.getHyperCubeValue("qDimensionInfo.0",{}).qNumFormat,measureText:e=>u({text:e,fontFamily:d.axis.label.name.fontFamily,fontSize:d.axis.label.name.fontSize})},ticks:{generator:{type:"d3",initialMin:t.get("zoom").min},anchor:"start",clamp:!0},cache:El({viewState:t,viewCache:n,layoutService:o})};return{[is.SCALE.MAJOR]:re(!0,{},m,{ticks:{level:"outer"}}),[is.SCALE.MAJOR_INNER]:re(!0,{},m,{ticks:{level:"inner"}})}}function Cl({picasso:e,models:t,viewState:n,viewCache:r,environment:i}){const{meta:o}=t.layoutService,a=o.isTime?{...Ml({picasso:e,viewState:n,viewCache:r,models:t,environment:i})}:o.isContinuous?{[is.SCALE.MAJOR]:bl({models:t,viewState:n,environment:i})}:o.isBarSeriesGrouped?{[is.SCALE.MAJOR]:xl({models:t,environment:i})}:{[is.SCALE.MAJOR]:o.isBarSeriesStackedInBothAxis?xl({models:t,environment:i}):vl({models:t,environment:i})};return fl(t)?{...a,[is.SCALE.REDUCED]:Sl({viewCache:r,mainMajor:a[is.SCALE.MAJOR]})}:a}function Al({fields:e,tickModel:t,dockService:n,environment:r}){const i="rtl"===r.options.direction,{orientation:o}=n.meta.minor;return{data:{source:"qHyperCube",fields:e},invert:"vertical"===o||i,ticks:{values:t.query.getValues},min:t.query.getMin,max:t.query.getMax}}function Ol({layoutService:e,tickModel:t,dockService:n,environment:r}){if(!fl({layoutService:e}))return;const i="rtl"===r.options.direction,{orientation:o}=n.meta.minor;return{type:"linear",invert:"vertical"===o||i,min:t.query.getMin,max:t.query.getMax}}function Tl({picasso:e,models:t,viewState:n,viewCache:r,environment:i}){const{layoutService:o,fieldModel:a,primaryTickModel:s,secondaryTickModel:l,colorService:u,dockService:c}=t;return{...Cl({picasso:e,models:t,viewState:n,viewCache:r,environment:i}),[is.SCALE.MINOR.PRIMARY]:Al({fields:a.main.minorsPrimary,tickModel:s,dockService:c,environment:i}),[is.SCALE.MINOR.SECONDARY]:Al({fields:a.main.minorsSecondary,tickModel:l,dockService:c,environment:i}),[is.SCALE.MINOR.REDUCED_PRIMARY]:Ol({layoutService:o,tickModel:s,dockService:c,environment:i}),[is.SCALE.MINOR.REDUCED_SECONDARY]:Ol({layoutService:o,tickModel:l,dockService:c,environment:i}),...u.custom.wrappedScales()}}var Nl={AXIS:{MAJOR:{HORIZONTAL:{width:"XSMALL",height:"SMALL"},VERTICAL:{width:"SMALL",height:"XSMALL"}},MINOR:"XSMALL"},AXIS_TITLE:{MAJOR:{HORIZONTAL:{width:"XSMALL",height:"MEDIUM"},VERTICAL:{width:"MEDIUM",height:"XSMALL"}},MINOR:"SMALL"},GRID_LINE:"XSMALL",VALUE_LABEL:"XSMALL",LABEL_SPACE:"XSMALL",OUT_OF_BOUNDS_MARKER:"XSMALL",REFERENCE_LINE:"SPARK"};const wl=["all","labels"];function Rl({models:e}){const{layoutService:t,dockService:n,seriesModel:r,themeService:i,styleModel:o}=e,a=t.getLayoutValue("measureAxes");if(!a||!a.length)return[];const s=i.getStyles(),l=o.query.axis.label.getStyle(),{measureAxes:u}=r.meta;return u.filter((e=>{const t=e.isPrimary?0:1;return wl.some((e=>a[t].show===e))})).map((e=>({type:"axis",key:e.isPrimary?is.COMPONENT.AXIS.MINOR.PRIMARY:is.COMPONENT.AXIS.MINOR.SECONDARY,scale:e.scale,layout:{dock:e.isPrimary?n.meta.minor.dock:n.meta.minorSecondary.dock,minimumLayoutMode:Nl.AXIS.MINOR},settings:{labels:{show:!0,fontFamily:l.fontFamily,fontSize:l.fontSize,fill:l.fill},line:{stroke:s.axis.line.major.color},ticks:{stroke:s.axis.line.major.color},minorTicks:{stroke:s.axis.line.minor.color}}})))}var Il={INACTIVE:.5},kl={LOWER:3,UPPER:13};const Ll=({layoutService:e})=>{const t=e.getHyperCubeValue("qDimensionInfo.0.qApprMaxGlyphCount"),[n]=e.getDataPages(),r=n?n.qMatrix:[];return Ee.getAdjustedMaxGlyphCount(t,r,0,"qText")};function Pl({models:e,environment:t}){const{layoutService:n,dockService:r,styleModel:i}=e,o="rtl"===t.options.direction,a=n.getLayoutValue("dimensionAxis"),s=i.query.axis.label.getStyle(),l=Ll({layoutService:n}),{orientation:u}=r.meta.major,c="horizontal"===u?a.label:"auto";return{type:"axis",key:is.COMPONENT.AXIS.MAJOR,scale:is.SCALE.MAJOR,layout:{dock:r.meta.major.dock,minimumLayoutMode:Nl.AXIS.MAJOR[u.toUpperCase()]},settings:{labels:{mode:a.label,tiltAngle:o?-40:40,maxEdgeBleed:50,maxLengthPx:"horizontal"===c?void 0:r.meta.minor.size/4,maxGlyphCount:l,tiltThreshold:l>kl.LOWER&&l<kl.UPPER?1:void 0,fontFamily:s.fontFamily,fontSize:s.fontSize,fill:s.fill},line:{show:!1},paddingEnd:4},brush:{consume:[{context:"selection",style:{inactive:{opacity:Il.INACTIVE}}}]}}}function ql({models:e}){const{dockService:t,styleModel:n}=e,{orientation:r}=t.meta.major,i=n.query.axis.label.getStyle();return{type:"axis",key:is.COMPONENT.AXIS.MAJOR_CONTINUOUS,scale:is.SCALE.MAJOR,layout:{dock:t.meta.major.dock,minimumLayoutMode:Nl.AXIS.MAJOR[r.toUpperCase()]},settings:{labels:{align:0,offset:4,fontFamily:i.fontFamily,fontSize:i.fontSize,fill:i.fill},line:{show:!1}}}}function Dl({models:e,environment:t}){const{layoutService:n}=e,r=n.getLayoutValue("dimensionAxis");if(!r)return[];const{show:i}=r;return"none"===i||"title"===i?[]:n.meta.isTime?function({models:e,environment:t}){const{dockService:n,themeService:r,styleModel:i}=e,o="rtl"===t.options.direction,{orientation:a}=n.meta.major,s="bottom"===n.meta.major.dock?0:1,l=r.getStyles(),u=i.query.axis.label.getStyle(),c=o?1:0,d={type:"time-axis",renderer:"svg",layout:{dock:n.meta.major.dock,minimumLayoutMode:Nl.AXIS.MAJOR[a]},preferredSize:()=>({size:2*parseFloat(u.fontSize),edgeBleed:{left:1,right:1}}),settings:{anchor:o?"end":"start",label:{align:s,justify:c},guideLine:{major:{justify:c},minor:{align:s}},line:{show:!1}},style:{label:{fontFamily:u.fontFamily,fontSize:u.fontSize,fill:u.fill},majorGuideLine:{stroke:l.axis.line.major.color},minorGuideLine:{stroke:l.axis.line.minor.color}}};return[re(!0,{},d,{key:is.COMPONENT.AXIS.TIME_INNER,scale:is.SCALE.MAJOR_INNER,settings:{guideLine:{minor:{show:!0}}},style:{majorGuideLine:{stroke:l.axis.line.minor.color},minorGuideLine:{stroke:l.axis.line.major.color}}}),re(!0,{},d,{key:is.COMPONENT.AXIS.TIME_OUTER,scale:is.SCALE.MAJOR,settings:{guideLine:{minor:{show:!1}}}})]}({models:e,environment:t}):n.meta.isContinuous?[ql({models:e})]:[Pl({models:e,environment:t})]}const $l=({layoutService:e,axis:t})=>e.meta.isBarSeriesGrouped?({scale:e,datum:t})=>e([t.value,t.typeIndex.value])+e.bandwidth()/2:e.meta.isBarSeriesStackedInBothAxis?({scale:e,datum:n})=>e([n.value,t])+e.bandwidth()/2:null,zl=({layoutService:e,seriesModel:t,rtl:n,orientation:r})=>e.meta.isContinuous?null:e.meta.isBarSeriesGrouped?({scale:e,datum:i})=>e([i.value,n&&"horizontal"===r?t.meta.barSeriesCount-1:0])+e.bandwidth()*t.meta.barSeriesCount/2:e.meta.isBarSeriesStackedInBothAxis?({scale:e,datum:t})=>e([t.value,n&&"horizontal"===r?1:0])+e.bandwidth():null;function _l({layoutService:e,active:t={},inactive:n={}}){return{consume:[{context:"selection",data:["selectionDimension","end","color","major"],style:{active:{strokeWidth:e.meta.isContinuous?0:2,stroke:"#000",opacity:e=>{var t,n;return!0===(null===(t=e.data)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)?0:1},...t},inactive:{opacity:e=>{var t,n;return!0===(null===(t=e.data)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)?0:Il.INACTIVE},...n}}}]}}var Hl={MAX:"max",MIN:"min"};function Bl(e,t){return function(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r}(e,t)||function(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r}(e,t)}const Fl=(e,t)=>`${e}-${t.id}`,jl=4,Vl=12,Ul=4;function Yl({chart:e,layoutService:t,dockService:n,markerKey:r,markerType:i}){if(t.meta.isContinuous)return()=>`${Ul}px`;const o={size:void 0},a="horizontal"===n.meta.major.orientation?"width":"height";return t=>{if(!o.size){const n=e.component(r),s=t.resources.scale(is.SCALE.MAJOR),l=n.rect[a]*s.bandwidth()*.25,u=Math.max(jl,Math.min(Vl,l));o.size=`${"bar"===i?2*u:u}px`}return o.size}}const{isDark:Wl}=Tt;const Xl=({chart:e,models:t,series:n,environment:r})=>{const{layoutService:i,seriesModel:o,colorService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u}=t,c=a.getColor(),{fill:d,marker:m}=n.options,{isContinuous:h}=i.meta,f="rtl"===r.options.direction,{orientation:p}=s.meta.major,y="horizontal"===p,g=(n.isPrimary?l:u).query.getExtrema(),v=({end:e})=>{const{value:t}=e;return Bl(t,g)},x=Fl(is.COMPONENT.MARKER,n);return{type:"point",key:x,data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{[y?"x":"y"]:{scale:is.SCALE.MAJOR,fn:zl({layoutService:i,seriesModel:o,rtl:f,orientation:p}),ref:h?"major":void 0},[y?"y":"x"]:{scale:n.scale,ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?e.scale.min():e.datum.end.value;return function(e){return Math.min(Math.max(0,e),1)}(e.scale(n))}},fill:d||"bar"===m?c:"none",opacity:e=>{var t;return!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)||v(e.datum)?0:1},stroke:e=>{const t=c(e);return d?Wl(t)?function(e){return Ke(e).brighter(.5).toString()}(t):function(e){return Ke(e).darker().toString()}(t):t},size:Yl({chart:e,layoutService:i,dockService:s,markerKey:x,markerType:m}),shape:()=>(({marker:e,horizontal:t,rtl:n})=>{let r;return"triangle"!==e||t||(r=n?"left":"right"),"bar"===e&&(r=t?"horizontal":"vertical"),r?{type:e,direction:r}:{type:e}})({marker:m,horizontal:y,rtl:f})},brush:_l({layoutService:i,active:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||v(e.data)?0:1}},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||v(e.data)?0:Il.INACTIVE}}})}};function Gl({property:e="end",isHorizontal:t,isColor:n,fallback:r,rtl:i}){return function(o){const{datum:a,resources:{scale:s}}=o,l=s(is.SCALE.MAJOR),u=s(is.SCALE.COLOR),c=t&&i?[...a.points].reverse():a.points,d=c.reduce(((t,n,r)=>{const i="NaN"===n[e].value||Number.isNaN(n[e].value),o=c[r+1],a=o&&"NaN"!==o[e].value&&!Number.isNaN(o[e].value);return i?t.length&&a&&t.push(n):t.push(n),t}),[]),m="group-by-measure"===l.type?e=>l([e.major.value,e.typeIndex.value]):e=>l(e.major.value),h=d.map(m),f=Math.min(...h),p=Math.max(...h)-f,y=0===p?1:p,g=h.map(((e,t)=>0===t?0:t===h.length-1?1:(e-f)/y)),v=[];for(let t=0;t<d.length;t++){const i=d[t],o=i.color&&i.color.value,a=n?o||r:u(o)||r,s=0===t,l=t===d.length-1,c=g[t];if("NaN"===i[e].value||Number.isNaN(i[e].value))v[t-1].virtual||v.push({virtual:!0});else{const n=d[t-1];n&&"NaN"!==n[e].value&&!Number.isNaN(n[e].value)?v.push({color:a,offset:s?0:Math.max(0,parseFloat((c-(c-g[t-1])/2).toFixed(5)))}):v.push({color:a,offset:c});const r=d[t+1];r&&"NaN"!==r[e].value&&!Number.isNaN(r[e].value)?v.push({color:a,offset:l?1:Math.max(0,parseFloat((c+(g[t+1]-c)/2).toFixed(5)))}):v.push({color:a,offset:c})}}const x=v.reduce(((e,t,n)=>{if(t.virtual){const t=v[n-1],r=v[n+1],i=t.offset+(r.offset-t.offset)/2;e.push({color:t.color,offset:i},{color:r.color,offset:i})}else e.push(t);return e}),[]);return{type:"gradient",x1:0,x2:t?1:0,y1:0,y2:t?0:1,stops:x}}}function Kl({environment:e,models:t,measureIndex:n}){const{layoutService:r,colorService:i,dockService:o}=t,a="rtl"===e.options.direction,{hasMultipleMeasures:s}=r.meta,{mode:l,type:u,nil:c}=i.getSettingsForMeasure(n),d="horizontal"===o.meta.major.orientation;if(!l||"constant"===u)return i.getColor();if("measure"===l&&"categorical"===u)return i.getColor();const m=r.getHyperCubeValue(`qMeasureInfo.${n}.color`);if(null!=m&&m.on)return"byExpression"===m.mode?Gl({isHorizontal:d,isColor:!0,fallback:c,rtl:a}):i.getColor();const h=r.getLayoutValue("color",{}),f=!h.auto&&"byExpression"===h.mode,p=!!h.colorExpression;if(f&&!p)return c;const y=!h.auto&&"byMeasure"===h.mode&&h.byMeasureDef&&void 0!==h.byMeasureDef.activeMeasureIndex;return s||!y?Gl({isHorizontal:d,isColor:"color"===u,fallback:c,rtl:a}):"continuous"===u?function({isHorizontal:e,rtl:t}){return function(n){const{datum:{points:r},resources:{scale:i}}=n,o=i(is.SCALE.COLOR),a=r.map((e=>e.end.value)).filter((e=>"NaN"!==e&&!Number.isNaN(e))),s=Math.min(...a),l=Math.max(...a),u=l-s,c=0===u?1:u,d=o.domain().map((e=>({color:o(Math.min(l,Math.max(s,e))),offset:Math.min(1,Math.max(0,(e-s)/c))})));return{type:"gradient",x1:!e&&t?1:0,x2:e||t?0:1,y1:e?1:0,y2:0,stops:d}}}({isHorizontal:d,rtl:a}):function({isHorizontal:e,isArea:t,fallback:n,rtl:r}){return function(i){const{datum:{points:o},resources:{scale:a}}=i,s=a(is.SCALE.COLOR),l=o.map((e=>e.end.value)).filter((e=>"NaN"!==e&&!Number.isNaN(e))),u=Math.min(...l),c=Math.max(...l),d=t?Math.min(0,u):u,m=(t?Math.max(0,c):c)-d,h=0===m?1:m,f=s.domain(),p=[];for(let e=0;e<f.length-1;e++){const t=f[e],r=s(t)||n;p.push({color:r,offset:Math.min(1,Math.max(0,(t-d)/h))});const i=f[e+1];p.push({color:r,offset:Math.min(1,Math.max(0,(i-d)/h))})}return{type:"gradient",x1:!e&&r?1:0,x2:e||r?0:1,y1:e?1:0,y2:0,stops:p}}}({isHorizontal:d,fallback:c,rtl:a})}const Jl=({models:e,environment:t,series:n})=>{const{layoutService:r,seriesModel:i,dockService:o,styleModel:a}=e,s="rtl"===t.options.direction,{orientation:l}=o.meta.major,u=zl({layoutService:r,seriesModel:i,rtl:s,orientation:l});return{key:Fl(is.COMPONENT.LINE,n),type:"line",data:{filter:e=>n.ref===e.end.source.field,collection:n.collection},settings:{coordinates:{major:{scale:is.SCALE.MAJOR,fn:u},minor:{scale:n.scale,ref:"end"}},layers:{curve:a.query.line.getCurveFn(),line:{stroke:Kl({models:e,environment:t,measureIndex:n.refIndex}),strokeWidth:a.query.line.getStrokeWidthFn(),strokeDasharray:a.query.line.getStrokeDasharrayFn(),strokeLinejoin:"round"}},connect:n.options.showAsConnections,orientation:o.meta.major.orientation},brush:_l({layoutService:r,active:{stroke:void 0,strokeWidth:void 0,opacity:Il.INACTIVE},inactive:{opacity:Il.INACTIVE}})}};var Zl={BAR:{STROKE:{COLOR:"#205891",WIDTH:{NONE:0,SMALL:1,MEDIUM:2,LARGE:4}}},LINE:{CURVE:{LINEAR:"linear",MONOTONE:"monotone",STEP:"step"},WIDTH:{FULL:{DEFAULT:2,ACTIVE:2},LESS:{DEFAULT:1,ACTIVE:1}},TYPE:{SOLID:void 0,DASHED:"5, 5"}},POINT:{SIZE:{DEFAULT:6,ACTIVE:4}}};function Ql({series:e,layoutService:t}){const{showAsConnections:n}=e.options,r=function({layoutService:e}){const{isDiscrete:t}=e.meta;return({item:e})=>{if(e.dummy)return t;const{value:n}=e.end;return"NaN"===n||Number.isNaN(n)}}({layoutService:t}),i=n?(e,t)=>0!==e&&t.slice(0,e).reverse().some((e=>!r({item:e}))):(e,t)=>0!==e&&!r({item:t[e-1]}),o=n?(e,t)=>e!==t.length-1&&t.slice(e+1,t.length).some((e=>!r({item:e}))):(e,t)=>e!==t.length-1&&!r({item:t[e+1]});return({index:e,items:t})=>({before:i(e,t),after:o(e,t)})}const eu=3,tu=20;function nu({models:e,series:t,environment:n}){const{layoutService:r,colorService:i,seriesModel:o,dockService:a,styleModel:s,primaryExtremumModel:l,secondaryExtremumModel:u,selectionService:c}=e,d=r.getLayoutValue("dataPoint.show",!1),{orientation:m}=a.meta.major,h="horizontal"===m,f="SPARK"===a.meta.chart.mode,p=i.getColor(),{POINT:y}=Zl,g=function({layoutService:e,series:t}){const n={key:void 0,map:void 0},r=Ql({series:t,layoutService:e});return({item:e,items:t})=>{n.key!==t&&(n.key=t,n.map=function({items:e}){const t=e.reduce(((e,t)=>{const{value:n}=t.line;return e[n]||(e[n]={items:[],keys:[]}),e[n].items.push(t),e[n].keys.push(`${t.major.value}-${t.line.value}`),e}),{});return t}({items:t}));const{value:i}=e.line,o=n.map[i],a=`${e.major.value}-${i}`,s=o.keys.indexOf(a),{before:l,after:u}=r({index:s,items:o.items});return!l&&!u}}({series:t,layoutService:r}),v="rtl"===n.options.direction,x=(t.isPrimary?l:u).query.getExtrema(),{isContinuous:b}=r.meta,S=({end:e})=>{const{value:t}=e;return Bl(t,x)};return{type:"point",key:Fl(is.COMPONENT.POINT,t),data:{filter:e=>t.ref===e.end.source.field,collection:t.collection},preferredSize:()=>({edgeBleed:{top:h?y.SIZE.DEFAULT/2:0}}),settings:{[h?"y":"x"]:{scale:t.scale,ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?e.scale.min():e.datum.end.value;return function(e){return Math.min(Math.max(0,e),1)}(e.scale(n))}},[h?"x":"y"]:{scale:is.SCALE.MAJOR,fn:zl({layoutService:r,seriesModel:o,rtl:v,orientation:m}),ref:"major"},sizeLimits:{minPx:eu,maxPx:tu},size:e=>{const{value:t}=e.datum.line;return`${s.query.point.getSize(t)}px`},fill:p,opacity:({datum:e,data:t})=>{var n;return null!==(n=e.null)&&void 0!==n&&n.value||S(e)?0:f?g({item:e,items:t.items})?1:0:d||g({item:e,items:t.items})?1:0}},brush:_l({layoutService:r,active:{r:e=>e.r+Zl.POINT.SIZE.ACTIVE/2,strokeWidth:1.5,stroke:"#FFFFFF",opacity:e=>{var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||S(e.data))return 0;if(!b||d)return 1;const{event:n,components:r=[]}=(null==c?void 0:c.getSelectionInfo())||{};if("continuousRange"===n)return 0;if("tap"!==n)return 1;const i=[is.COMPONENT.AXIS_OVERLAY.CONTINUOUS,is.COMPONENT.AXIS_OVERLAY.TIME_INNER,is.COMPONENT.AXIS_OVERLAY.TIME_OUTER].some((e=>r.indexOf(e)>=0));return i?0:1}},inactive:{opacity:e=>1===e.opacity?.5:0}})}}const ru=(e,{dataset:t})=>{var n;if(null!==(n=e.null)&&void 0!==n&&n.value)return"-";const{value:r,label:i,source:o}=e.end,a=t(o.key).field(o.field);return a.raw().isCustomFormatted?i:a.formatter()(r)};function iu({chart:e,models:t,environment:n,series:r,lineSeries:i}){const{layoutService:o,dockService:a,styleModel:s,primaryExtremumModel:l,secondaryExtremumModel:u}=t,{id:c}=r,d="rtl"===n.options.direction,m=o.getLayoutValue("dataPoint");if(!m)return!1;if(!m.show||!m.showLineLabels)return!1;const h=(r.isPrimary?l:u).query.getExtrema(),f=s.query.point.label.getStyle();return{type:"point-label",key:`${is.COMPONENT.POINT_LABEL}-${c}`,layout:{displayOrder:2,minimumLayoutMode:Nl.VALUE_LABEL},settings:{orientation:a.meta.major.orientation,rtl:d,connect:r.options.showAsConnections,label:t=>ru(t,e),pointValue:e=>e.end.value,majorValue:e=>e.value,target:{point:`${is.COMPONENT.POINT}-${c}`,allPoints:i.map((e=>`${is.COMPONENT.POINT}-${e.id}`))},lineIndex:"typeIndex",showLabel:e=>!(({end:e})=>Bl(e.value,h))(e.data),labelSpace:{use:()=>{const t=e.component(is.COMPONENT.LABEL_SPACE);return!(null==t||!t.preferredSize())},size:10}},style:{fontFamily:f.fontFamily,fontSize:f.fontSize,fill:f.fill}}}const ou=({chart:e,dock:t})=>{let n=t;const r=e.component(`${is.COMPONENT.SLICED_HAT}-${Hl.MAX}`),i=e.component(`${is.COMPONENT.SLICED_HAT}-${Hl.MAX}-${os.AXIS.PRIMARY}`),o=e.component(`${is.COMPONENT.SLICED_HAT}-${Hl.MAX}-${os.AXIS.SECONDARY}`);return r?n=`@${is.COMPONENT.SLICED_HAT}-${Hl.MAX}`:i?n=`@${is.COMPONENT.SLICED_HAT}-${Hl.MAX}-${os.AXIS.PRIMARY}`:o&&(n=`@${is.COMPONENT.SLICED_HAT}-${Hl.MAX}-${os.AXIS.SECONDARY}`),n},au=({dockPosition:e,orientation:t,rtl:n})=>{let r=1;return e!==`@${is.COMPONENT.SLICED_HAT}-${Hl.MAX}`&&e!==`@${is.COMPONENT.SLICED_HAT}-${Hl.MAX}-${os.AXIS.PRIMARY}`&&e!==`@${is.COMPONENT.SLICED_HAT}-${Hl.MAX}-${os.AXIS.SECONDARY}`||!("horizontal"===t||"vertical"===t&&n)||(r=4),e!==`@${is.COMPONENT.SLICED_HAT}-${Hl.MIN}`&&e!==`@${is.COMPONENT.SLICED_HAT}-${Hl.MIN}-${os.AXIS.PRIMARY}`&&e!==`@${is.COMPONENT.SLICED_HAT}-${Hl.MIN}-${os.AXIS.SECONDARY}`||"vertical"!==t||n||(r=4),r};function su({chart:e,models:t,environment:n,lineSeries:r}){const{layoutService:i,dockService:o,primaryExtremumModel:a,secondaryExtremumModel:s}=t,l=i.getLayoutValue("dataPoint",{}),u="rtl"===n.options.direction;if(!r.length)return!1;if(!l.show||!l.showLineLabels)return!1;const c="horizontal"===o.meta.major.orientation,{show:d}=i.getLayoutValue("dimensionAxis",{});if("none"!==d){const{dock:e}=o.meta.major;if(c&&"top"===e)return!1;if(!c&&e===(u?"left":"right"))return!1}const m=u?"left":"right";return{type:"label-space",key:is.COMPONENT.LABEL_SPACE,layout:{minimumLayoutMode:Nl.LABEL_SPACE,dock:ou({chart:e,dock:c?"top":m})},settings:{size:10},preferredSize:()=>{const t=e.component(`${is.COMPONENT.LINE}-${r[0].id}`);if(null==t||!t.rect)return 0;const n=(c?17:34)/t.rect[c?"height":"width"],i=a.query.getExtrema(),o=e.scale(is.SCALE.MINOR.PRIMARY)(i.implicit.line.max),l=c||u?o:1-o,d=r.filter((e=>e.isPrimary)).length>0,m=s.query.getExtrema(),h=e.scale(is.SCALE.MINOR.SECONDARY)(m.implicit.line.max),f=c||u?h:1-h,p=r.filter((e=>!e.isPrimary)).length>0;return d&&l<n||p&&f<n?10:0}}}const lu={min:"Min",max:"Max"};function uu(e,t,n){const{hasExplicitMax:r}=n.meta,{max:i}=n.explicit;return!!r&&Math.max(e,t)>i&&i<=Math.min(e,t)}function cu(e,t,n){const{hasExplicitMin:r}=n.meta,{min:i}=n.explicit;return!!r&&Math.min(e,t)<i&&i>=Math.max(e,t)}function du(e,t,n){return uu(e,t,n)||cu(e,t,n)}function mu(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r&&r<=0}function hu(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r&&r>=0}function fu(e,t){return mu(e,t)||hu(e,t)}function pu({extrema:e,type:t}){return!(function({extrema:e,type:t}){return!e.meta[`hasExplicit${lu[t]}`]}({extrema:e,type:t})||function({extrema:e,type:t}){const n=t===Hl.MAX?e.implicit.bar.max:e.implicit.bar.min,r=Number(n.toFixed(13));return t===Hl.MAX?!mu(r,e):!hu(r,e)}({extrema:e,type:t}))}var yu=Object.freeze({__proto__:null,isMaxOutOfBounds:mu,isMinOutOfBounds:hu,isOutOfBounds:fu,isSegmentMaxOutOfBounds:uu,isSegmentMinOutOfBounds:cu,isSegmentOutOfBounds:du,shouldShowOob:pu});const gu={min:"Min",max:"Max"},vu=({chart:e,models:t,markerSeries:n,lineSeries:r,barSeries:i,environment:o,type:a})=>{const{dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,primaryTickModel:c,secondaryTickModel:d,layoutService:m,seriesModel:h,themeService:f,fieldModel:p}=t,y="rtl"===o.options.direction,{dock:g,opposite:v,orientation:x}=s.meta.major,b=l.query.getExtrema(),S=u.query.getExtrema(),E=a===Hl.MAX,{isBarSeriesGrouped:M}=m.meta,C=(({chart:e,type:t,opposite:n,dock:r})=>{let i=t===Hl.MAX?n:r;const o=e.component(`${is.COMPONENT.SLICED_HAT}-${t}`),a=e.component(`${is.COMPONENT.SLICED_HAT}-${t}-${os.AXIS.PRIMARY}`),s=e.component(`${is.COMPONENT.SLICED_HAT}-${t}-${os.AXIS.SECONDARY}`),l=e.component(is.COMPONENT.LABEL_SPACE),u=e.component(`${is.COMPONENT.BAR_OOB}-${t}`),c=e.component(`${is.COMPONENT.BAR_OOB}-${t}-${os.AXIS.PRIMARY}`),d=e.component(`${is.COMPONENT.BAR_OOB}-${t}-${os.AXIS.SECONDARY}`);return o?i=`@${is.COMPONENT.SLICED_HAT}-${t}`:a?i=`@${is.COMPONENT.SLICED_HAT}-${t}-${os.AXIS.PRIMARY}`:s?i=`@${is.COMPONENT.SLICED_HAT}-${t}-${os.AXIS.SECONDARY}`:u||c||d?l&&t===Hl.MAX?i=`@${is.COMPONENT.LABEL_SPACE}`:u?i=`@${is.COMPONENT.BAR_OOB}-${t}`:c?i=`@${is.COMPONENT.BAR_OOB}-${t}-${os.AXIS.PRIMARY}`:d&&(i=`@${is.COMPONENT.BAR_OOB}-${t}-${os.AXIS.SECONDARY}`):l&&t===Hl.MAX&&(i=`@${is.COMPONENT.LABEL_SPACE}`),i})({chart:e,type:a,opposite:v,dock:g}),A=zl({layoutService:m,seriesModel:h,rtl:y,orientation:x}),O=r.concat(n);if(!O.length)return!1;const T=E?b.implicit.bar.max:b.implicit.bar.min,N=Number(T.toFixed(13));if(!M&&i.length&&yu[`is${gu[a]}OutOfBounds`](N,b))return!1;if(!b.meta.hasExplicit&&!S.meta.hasExplicit)return!1;const w=E?"max":"min",R=Math[w](Number(b.implicit.line[w].toFixed(13)),Number(b.implicit.marker[w].toFixed(13))),I=Math[w](Number(S.implicit.line[w].toFixed(13)),Number(S.implicit.marker[w].toFixed(13))),k=O.filter((e=>e.isPrimary)),L=O.filter((e=>!e.isPrimary)),P=k.length>0,q=L.length>0,{major:D,majorNumeric:$}=p.main,z=e=>"NaN"!==e.qNum?e.qNum:0,_=m.meta.isContinuous?$:D;return{type:"data-out-of-bounds-marker",key:`${is.COMPONENT.DATA_OOB_MARKER}-${a}`,layout:{dock:C,minimumLayoutMode:Nl.OUT_OF_BOUNDS_MARKER},data:{extract:O.map((({ref:e,typeIndex:t,options:n})=>({field:D,value:m.meta.isContinuous?e=>e.qNum:void 0,props:{major:{field:_},end:{field:e,value:n.showAsZeros?z:void 0},typeIndex:t,null:{field:e,value:e=>"NaN"===e.qNum}}})))},settings:{type:a,primaryExtremum:E?()=>c.query.getMax():()=>c.query.getMin(),secondaryExtremum:E?()=>d.query.getMax():()=>d.query.getMin(),primarySeries:k,secondarySeries:L,orientation:x,rtl:y,major:{scale:is.SCALE.MAJOR,fn:A},markerOffset:au({dockPosition:C,orientation:x,rtl:y})},brush:_l({layoutService:m}),show:()=>{if(E){if(P&&R>c.query.getMax())return!0;if(q&&I>d.query.getMax())return!0}if(!E){if(P&&R<c.query.getMin())return!0;if(q&&I<d.query.getMin())return!0}return!1},style:{fill:f.getStyles().outOfRange.color}}},xu={FULL:16,MEDIUM:14,SMALL:12,XSMALL:8,SPARK:4};function bu({chart:e,models:t,viewState:n,viewCache:r,axis:i}){const o=C(),{dockService:a}=t;return({data:t})=>(({items:t})=>{const{rect:n}=e.component(`${is.COMPONENT.BAR}-${i}`)||{};return(!t.length||!n)&&2})(t)||(()=>{const{min:e,max:t}=n.get("zoom");return o.get([e,t])||o.empty()&&!1})()||(()=>{const e=xu[a.meta.chart.mode];return 0===Math.abs(r.get("continuousMax")-r.get("continuousMin"))&&e})()||(()=>{const{min:e,max:t}=n.get("zoom"),i=Math.abs(r.get("continuousMax")-r.get("continuousMin")),s=Math.abs(t-e),l=xu[a.meta.chart.mode],u=function(e,t,n){return e*(1-n)+t*n}(2,l,1-Math.min(s/i/.2,1));return o.set([e,t],Math.max(2,Math.min(l,u)))})()}const Su=({isContinuous:e,isBarSeriesGrouped:t,styleModel:n,discreteModel:r,isBarSeriesStackedInBothAxis:i})=>e?1:n.query.bar.getHasStyling()?n.query.bar.getHasStrokeWidth()?function(){const e=n.query.bar.getStrokeWidth()/r.query.getItemSize(),t=n.query.bar.getWidthFn()(),i=t+e;return i>1?t-(i-1):t}:n.query.bar.getWidthFn():t||i?.9:.7;function Eu(e){return Math.min(Math.max(0,e),1)}const Mu=({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i})=>{const{layoutService:o,dockService:a,colorService:s,seriesModel:l,styleModel:u,discreteModel:c,primaryExtremumModel:d,secondaryExtremumModel:m}=t,{isContinuous:h,isBarSeriesStacked:f,isBarSeriesGrouped:p,isBarSeriesStackedInBothAxis:y}=o.meta,g=e=>e.datum.start?e.datum.start.value:e.scale.min(),v=i?os.AXIS.PRIMARY:os.AXIS.SECONDARY,x=i?is.SCALE.MINOR.PRIMARY:is.SCALE.MINOR.SECONDARY;if(!(i?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount))return!1;const b=f?{scale:x,start:{ref:"start",fn:e=>{const t=g(e);return Eu(e.scale(t))}},end:{ref:"end",fn:e=>{const t=(e=>e.datum.end?e.datum.end.value:g(e))(e);return Eu(e.scale(t))}}}:{scale:x,start:{ref:"start",fn:e=>{const t=g(e);return Eu(e.scale(t))}},end:{ref:"end",fn:e=>{var t;const n=!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value)?g(e):e.datum.end.value;return Eu(e.scale(n))}}},S=(i?d:m).query.getExtrema(),E=f?({start:e,end:t})=>du(e.value,t.value,S):({end:e})=>fu(e.value,S);return{type:"box",key:`${is.COMPONENT.BAR}-${v}`,data:{filter:(()=>{if(f)return;const e=l.query.series(os.TYPE.BAR).filter((e=>e.isPrimary===i)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:f?i?is.COLLECTION.STACKED_PRIMARY:is.COLLECTION.STACKED_SECONDARY:i?is.COLLECTION.PRIMARY:is.COLLECTION.SECONDARY},preferredSize:h?()=>({size:0,edgeBleed:{left:1,right:1}}):void 0,settings:{orientation:a.meta.minor.orientation,major:{scale:is.SCALE.MAJOR,fn:$l({layoutService:o,axis:v}),ref:h?{start:"major",end:"major"}:void 0},minor:b,box:{width:Su({isContinuous:h,isBarSeriesGrouped:p,styleModel:u,discreteModel:c,isBarSeriesStackedInBothAxis:y}),minWidthPx:h?bu({chart:e,models:t,viewState:n,viewCache:r,axis:v}):void 0,fill:s.getColor(),strokeWidth:u.query.bar.getStrokeWidth(),stroke:u.query.bar.getStrokeColor(),minHeightPx:.3,opacity:e=>{var t,n;return!0===(null===(t=e.datum)||void 0===t||null===(n=t.null)||void 0===n?void 0:n.value)||E(e.datum)?0:1}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}},brush:_l({layoutService:o,active:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||E(e.data)?0:1}},inactive:{opacity:e=>{var t;return!0===(null===(t=e.data.null)||void 0===t?void 0:t.value)||E(e.data)?0:Il.INACTIVE}}})}},Cu=({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i})=>{const{layoutService:o,dockService:a,colorService:s,seriesModel:l,styleModel:u,discreteModel:c}=t,{isBarSeriesStacked:d,isContinuous:m,isBarSeriesGrouped:h,isBarSeriesStackedInBothAxis:f}=o.meta,p=i?os.AXIS.PRIMARY:os.AXIS.SECONDARY,y=i?l.meta.primaryBarSeriesCount:l.meta.secondaryBarSeriesCount;if(!d||0===y)return!1;return{key:`${is.COMPONENT.STACK_BAR}-${p}`,type:"box",data:{collection:i?is.COLLECTION.STACKED_TOTAL_PRIMARY:is.COLLECTION.STACKED_TOTAL_SECONDARY},settings:{major:{scale:is.SCALE.MAJOR,fn:$l({layoutService:o,axis:p}),ref:m?{start:"timeStart",end:"timeEnd"}:void 0},minor:{scale:i?is.SCALE.MINOR.PRIMARY:is.SCALE.MINOR.SECONDARY,start:{ref:"sumOfNegatives"},end:{ref:"sumOfPositives"}},orientation:a.meta.minor.orientation,box:{width:Su({isContinuous:m,isBarSeriesGrouped:h,styleModel:u,discreteModel:c,isBarSeriesStackedInBothAxis:f}),minWidthPx:m?bu({chart:e,models:t,viewState:n,viewCache:r,axis:p}):2,opacity:0,fill:s.getColor()},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}}};function Au(e,t){const n="horizontal"===e.dockService.meta.major.orientation,{style:r}=t,i=e.styleModel.query.bar.label.getStyle(),o=i.fill===r.color;return{placements:t.simplifiedPlacements.map((e=>{const t=o&&!e.onBackground?function({style:e,simplifiedPlacement:t}){return n=>Tt.isDark(t.background?t.background.fill:n.node.attrs.fill)?e.lightColor:e.darkColor}({style:r,simplifiedPlacement:e}):i.fill;return function({simplifiedPlacement:e,fill:t,isHorizontal:n}){const r=e.padding||{left:n?0:4,right:n?0:4,top:n?4:0,bottom:n?4:0};return{position:e.position,justify:e.justify,fill:t,overflow:e.overflow,background:e.background,padding:r}}({simplifiedPlacement:e,fill:t,isHorizontal:n})})),label:t.label}}const Ou="vertical",Tu="horizontal";function Nu(e,t,n,r){const i=function(e,t){return function(e,t){if(t&&0===e){const{min:e,max:n}=t;return 0===n&&0===e?1:n<=0?-1:e>=0||n>=-e?1:-1}return e>=0?1:-1}(e,t)}(e,r);let o="up";return t===Ou&&i<0?o="down":t===Tu&&(o=i>=0&&!n||i<0&&n?"right":"left"),o}const wu=(e,t)=>{if(!e)return!1;const{isBarSeriesStacked:n,isContinuous:r}=t;return!n||!r},Ru=(e,t)=>{if(!e)return!1;const{isBarSeriesStacked:n,isContinuous:r}=t;return!!n&&(!!r||!1!==e)};function Iu(e,t,n,r){const i=[];return void 0!==e&&(i[e]={position:"outside",onBackground:!0,justify:0,overflow:r}),void 0!==t&&(i[t]={position:"inside",onBackground:!1,justify:n}),i}const ku=({models:e,environment:t,isPrimary:n})=>{const{layoutService:r,seriesModel:i,styleModel:o,themeService:a}=e,{meta:s}=r,l="rtl"===t.options.direction,u=a.getStyles(),c=o.query.bar.label.getStyle(),d=e.layoutService.getLayoutValue("dataPoint.showBarLabels",!1),m=n?os.AXIS.PRIMARY:os.AXIS.SECONDARY;if(!(n?i.meta.primaryBarSeriesCount:i.meta.secondaryBarSeriesCount)||!wu(d,s))return!1;let h;!s.isBarSeriesStacked&&(h=s.isBarSeriesStacked?1:0);const f={label:e=>ru(e.data,e),simplifiedPlacements:Iu(h,0===h?1:0,s.isBarSeriesStacked?.5:1,s.isContinuous),style:u.label.value},p=[Au(e,f)],y={component:`${is.COMPONENT.BAR}-${m}`,selector:"rect",strategy:{type:"bar",settings:{direction:t=>Nu(t.data.end.value,e.dockService.meta.minor.orientation,l,0),labels:p,fontSize:parseInt(c.fontSize,10),fontFamily:c.fontFamily}}},g=[y];return{type:"labels",key:`${is.COMPONENT.BAR_LABEL}-${m}`,layout:{minimumLayoutMode:Nl.VALUE_LABEL},settings:{sources:g}}};function Lu(e,t,n){const r=[{position:e,onBackground:!0,justify:0,overflow:n}];return t&&r.push({position:"inside",onBackground:!1,justify:"outside"===e?1:0,background:{fill:"#cce6e6e6",padding:{left:2,right:2,top:2,bottom:2}}}),r}function Pu({chart:e,models:t,environment:n,isPrimary:r}){const{meta:i}=t.layoutService,o="rtl"===n.options.direction,a=t.themeService.getStyles(),s=t.styleModel.query.bar.label.getStyle(),l=t.layoutService.getLayoutValue("dataPoint.showBarLabels",!1),u=r?os.AXIS.PRIMARY:os.AXIS.SECONDARY;if(0===(r?t.seriesModel.meta.primaryBarSeriesCount:t.seriesModel.meta.secondaryBarSeriesCount)||!Ru(l,i))return!1;const c=e.formatter(r?is.FORMATTER.PRIMARY:is.FORMATTER.SECONDARY)||(e=>e),d=e=>0===e?"":c(e),m={label:e=>d(e.data.sumOfPositives.value),simplifiedPlacements:Lu("outside",true,i.isContinuous),style:a.label.value},h={label:e=>d(e.data.sumOfNegatives.value),simplifiedPlacements:Lu("opposite",true,i.isContinuous),style:a.label.value},f=[Au(t,m),Au(t,h)];return{type:"labels",key:`${is.COMPONENT.STACK_BAR_LABEL}-${u}`,layout:{displayOrder:2,minimumLayoutMode:Nl.VALUE_LABEL},settings:{sources:[{component:`${is.COMPONENT.STACK_BAR}-${u}`,selector:"rect",strategy:{type:"bar",settings:{direction:e=>Nu(e.data.sumOfPositives.value,t.dockService.meta.minor.orientation,o),labels:f,fontSize:parseInt(s.fontSize,10),fontFamily:s.fontFamily}}}]}}}var qu=Object.freeze({__proto__:null,hasMaxHat:function(e,t){const{hasExplicitMax:n}=t.meta,{max:r}=t.explicit;return!!n&&e>r&&r>0},hasMinHat:function(e,t){const{hasExplicitMin:n}=t.meta,{min:r}=t.explicit;return!!n&&e<r&&r<0}});const Du={min:"Min",max:"Max"},$u=1e-12;function zu({chart:e,models:t,type:n,viewCache:r,viewState:i,isPrimary:o}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,styleModel:c,discreteModel:d}=t,{isBarSeriesStacked:m,isContinuous:h,isBarSeriesGrouped:f,isBarSeriesStackedInBothAxis:p}=a.meta,y=m?Cu({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}):Mu({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}),g=o?l.query.getExtrema():u.query.getExtrema(),v=n===Hl.MAX,x=o?os.AXIS.PRIMARY:os.AXIS.SECONDARY;if(!y)return!1;if(function(e,t){return!e.meta[`hasExplicit${Du[t]}`]}(g,n)||function(e,t,n){const r=n?e.implicit.bar.max:e.implicit.bar.min,i=Number(r.toFixed(13));return!qu[`has${Du[t]}Hat`](i,e)}(g,n,v)||function(e,t,n){const r=n?e=>e<0:e=>e>0;return e.meta[`hasExplicit${Du[t]}`]&&r(e.explicit[t])}(g,n,v))return!1;let b="end";m&&(b=v?"sumOfPositives":"sumOfNegatives");const S=function(e){let t;return()=>(void 0===t&&(t=e()),t)}((()=>e.scale(o?is.SCALE.MINOR.PRIMARY:is.SCALE.MINOR.SECONDARY)[n]()));const E=(({chart:e,type:t,isPrimary:n,dock:r})=>{let i=r;const o=e.component(`${is.COMPONENT.SLICED_HAT}-${t}-${os.AXIS.PRIMARY}`),a=e.component(`${is.COMPONENT.SLICED_HAT}-${t}-${os.AXIS.SECONDARY}`);return o&&a&&(i=n?r:`@${is.COMPONENT.SLICED_HAT}-${t}-${os.AXIS.PRIMARY}`),i})({chart:e,type:n,isPrimary:o,dock:v?s.meta.minor.end:s.meta.minor.start}),M={type:"box-sliced-hat",key:`${is.COMPONENT.SLICED_HAT}-${n}-${x}`,layout:{dock:E},data:y.data,settings:{orientation:y.settings.orientation,major:y.settings.major,minor:y.settings.minor,hat:re({},y.settings.box,{fill:m?"#999":y.settings.box.fill,alignment:1,opacity:1,show:function(e){const t=S(),n=function(e){if("number"!=typeof e)return e;const t=Math.round(e);return Math.abs(e-t)<$u?t:e}(e.datum[b].value);return v?n>t:n<t},width:Su({isContinuous:h,isBarSeriesGrouped:f,styleModel:c,discreteModel:d,isBarSeriesStackedInBothAxis:p}),strokeWidth:c.query.bar.getStrokeWidth(),stroke:c.query.bar.getStrokeColor()})},brush:_l({layoutService:a})};return M}const _u={min:"Min",max:"Max"},Hu={sumOfPositives:"sumOfNegatives",sumOfNegatives:"sumOfPositives"};function Bu({chart:e,models:t,type:n,viewCache:r,viewState:i,isPrimary:o}){const{layoutService:a,dockService:s,primaryExtremumModel:l,secondaryExtremumModel:u,themeService:c}=t,{end:d,start:m}=s.meta.minor,{isBarSeriesStacked:h}=a.meta,f=h?Cu({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}):Mu({chart:e,models:t,viewCache:r,viewState:i,isPrimary:o}),p=o?l.query.getExtrema():u.query.getExtrema(),y=n===Hl.MAX?p.implicit.bar.max:p.implicit.bar.min,g=Number(y.toFixed(13)),v=o?os.AXIS.PRIMARY:os.AXIS.SECONDARY;if(!f)return!1;if(!yu[`is${_u[n]}OutOfBounds`](g,p))return!1;const x=(({chart:e,type:t,end:n,start:r,isPrimary:i})=>{let o=t===Hl.MAX?n:r;const a=e.component(is.COMPONENT.LABEL_SPACE),s=e.component(`${is.COMPONENT.SLICED_HAT}-${t}-${os.AXIS.PRIMARY}`),l=e.component(`${is.COMPONENT.SLICED_HAT}-${t}-${os.AXIS.SECONDARY}`),u=e.component(`${is.COMPONENT.BAR_OOB}-${t}-${os.AXIS.PRIMARY}`),c=e.component(`${is.COMPONENT.BAR_OOB}-${t}-${os.AXIS.SECONDARY}`);return s?o=`@${is.COMPONENT.SLICED_HAT}-${t}-${os.AXIS.PRIMARY}`:l?o=`@${is.COMPONENT.SLICED_HAT}-${t}-${os.AXIS.SECONDARY}`:u&&c&&!i?o=`@${is.COMPONENT.BAR_OOB}-${t}-${os.AXIS.PRIMARY}`:a&&t===Hl.MAX&&(o=`@${is.COMPONENT.LABEL_SPACE}`),o})({chart:e,type:n,end:d,start:m,isPrimary:o});let b="end";h&&(b=n===Hl.MAX?"sumOfPositives":"sumOfNegatives");const S={type:"box-out-of-bounds",key:`${is.COMPONENT.BAR_OOB}-${n}-${v}`,layout:{dock:x},data:f.data,settings:{orientation:f.settings.orientation,major:f.settings.major,minor:f.settings.minor,dockValue:Se.getDockValue(n===Hl.MAX?d:m),oob:re({},f.settings.box,{fill:c.getStyles().outOfRange.color,alignment:1,opacity:1,show:function(e){var t;if(!0===(null===(t=e.datum.null)||void 0===t?void 0:t.value))return!1;const r=h&&0===e.datum[b].value,i=yu[`is${_u[n]}OutOfBounds`](e.datum[b].value,p,n),o=(!r||function({type:e,item:t,prop:n,extrema:r}){const i=t.datum[Hu[n]].value;return 0!==i&&yu[`is${_u[e]}OutOfBounds`](i,r,e)}({type:n,item:e,prop:b,extrema:p}))&&i;return o}})},brush:_l({layoutService:a})};return S}function Fu(e){return Math.min(Math.max(0,e),1)}const ju=({chart:e,models:t,type:n,isPrimary:r})=>{const{discreteModel:i,styleModel:o,seriesModel:a,layoutService:s}=t;if(!(r?a.meta.primaryBarSeriesCount:a.meta.secondaryBarSeriesCount))return!1;const{isBarSeriesStacked:l,isContinuous:u,isBarSeriesGrouped:c,isBarSeriesStackedInBothAxis:d}=s.meta,m=e.scale(r?is.SCALE.MINOR.PRIMARY:is.SCALE.MINOR.SECONDARY),h=r?os.AXIS.PRIMARY:os.AXIS.SECONDARY,f=r?t.primaryExtremumModel.query.getExtrema():t.secondaryExtremumModel.query.getExtrema(),p=n===Hl.MAX;if(!pu({extrema:f,type:n}))return!1;const y=e=>e.datum.start?e.datum.start.value:e.scale.min(),g=(e,t="end")=>e.datum[t]?e.datum[t].value:y(e),v={type:"box",key:`${is.COMPONENT.GHOST_BAR_OOB}-${n}-${h}`,data:{filter:(()=>{if(l)return;const e=a.query.series(os.TYPE.BAR).filter((e=>e.isPrimary===r)).map((e=>e.ref));return t=>e.some((e=>e===t.end.source.field))})(),collection:l?r?is.COLLECTION.STACKED_TOTAL_PRIMARY:is.COLLECTION.STACKED_TOTAL_SECONDARY:r?is.COLLECTION.PRIMARY:is.COLLECTION.SECONDARY},settings:{orientation:t.dockService.meta.minor.orientation,major:{scale:is.SCALE.MAJOR,fn:$l({layoutService:s,axis:h}),ref:u?{start:"major",end:"major"}:void 0},minor:{scale:r?is.SCALE.MINOR.PRIMARY:is.SCALE.MINOR.SECONDARY,start:{ref:"start",fn:e=>{const t=y(e);return Fu(e.scale(t))}},end:l?"max"===n?{ref:"sumOfPositives",fn:e=>{const t=g(e,"sumOfPositives");return Fu(e.scale(t))}}:{ref:"sumOfNegatives",fn:e=>{const t=g(e,"sumOfNegatives");return Fu(e.scale(t))}}:{ref:"end",fn:e=>{const t=g(e);return Fu(e.scale(t))}}},box:{width:Su({isContinuous:u,isBarSeriesGrouped:c,styleModel:o,discreteModel:i,isBarSeriesStackedInBothAxis:d}),stroke:"transparent",fill:"none",opacity:0,show:e=>{let t="end";l&&(t=p?"sumOfPositives":"sumOfNegatives");const n=e.datum[t]?e.datum[t].value:m.max();return p?n>m.max():n<m.min()}},oob:{show:!1},whisker:{show:!1},median:{show:!1},line:{show:!1}}};return v};function Vu(e,t,n,r,i){const o=[{position:e,justify:0,overflow:n,background:{padding:{left:1,right:1,top:1,bottom:1}}}];return t&&o.push({position:"inside",onBackground:!1,justify:r||i?0:1,background:{padding:{left:2,right:2,top:2,bottom:2}}}),o}const Uu=({chart:e,models:t,type:n,environment:r,isPrimary:i})=>{const{layoutService:o,dockService:a,primaryExtremumModel:s,secondaryExtremumModel:l,styleModel:u,seriesModel:c,themeService:d}=t,m=d.getStyles(),h=u.query.bar.label.getStyle(),{meta:f}=o,{isBarSeriesStacked:p}=f,y=e.formatter(i?is.FORMATTER.PRIMARY:is.FORMATTER.SECONDARY),g=o.getLayoutValue("dataPoint.showBarLabels",!1),v="horizontal"===a.meta.major.orientation,x="rtl"===r.options.direction;if(!(i?c.meta.primaryBarSeriesCount:c.meta.secondaryBarSeriesCount)||!p&&!wu(g,f)||p&&!Ru(g,f))return!1;const b=i?s.query.getExtrema():l.query.getExtrema();if(!b.meta.hasExplicit)return!1;const S=n===Hl.MAX?b.implicit.bar.max:b.implicit.bar.min;if(!(n===Hl.MAX?mu(S,b):hu(S,b)))return!1;let E=e=>ru(e.data,e);f.isBarSeriesStacked&&(E=n===Hl.MAX?function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(mu(e.data.sumOfPositives.value,b)){const t=0===e.data.sumOfNegatives.value?e.data.sumOfPositives.value:e.data.sumOfNegatives.value;return y?y(t):t}return""}:function(e){var t;if(!0===(null===(t=e.data.null)||void 0===t?void 0:t.value))return"";if(hu(e.data.sumOfNegatives.value,b)){const t=0===e.data.sumOfPositives.value?e.data.sumOfNegatives.value:e.data.sumOfPositives.value;return y?y(t):t}return""});const M={label:E,simplifiedPlacements:Vu("outside",true,f.isContinuous,v,x),style:m.label.value},C={label:E,simplifiedPlacements:Vu("opposite",true,f.isContinuous,v,x),style:m.label.value},A=[Au(t,M),Au(t,C)],O=i?os.AXIS.PRIMARY:os.AXIS.SECONDARY,T="horizontal"===a.meta.major.orientation?"down":"right",N=[{component:`${is.COMPONENT.GHOST_BAR_OOB}-${n}-${O}`,selector:"rect",strategy:{type:"bar",settings:{direction:T,labels:A,fontSize:parseInt(h.fontSize,10),fontFamily:h.fontFamily}}}];return{key:`${is.COMPONENT.BAR_OOB_LABEL}-${n}-${O}`,type:"labels",layout:{minimumLayoutMode:Nl.VALUE_LABEL},settings:{sources:N}}},Yu=({chart:e,models:t,viewState:n,viewCache:r})=>[Mu({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),Mu({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],Wu=({chart:e,models:t,viewState:n,viewCache:r})=>[Cu({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),Cu({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1})],Xu=({chart:e,models:t,environment:n})=>{const{isBarSeriesStacked:r}=t.layoutService.meta;if(r){return[Pu({chart:e,models:t,environment:n,isPrimary:!0}),Pu({chart:e,models:t,environment:n,isPrimary:!1})]}return[ku({models:t,environment:n,isPrimary:!0}),ku({models:t,environment:n,isPrimary:!1})]},Gu=({chart:e,models:t,viewCache:n,viewState:r})=>[zu({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),zu({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),zu({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),zu({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],Ku=({chart:e,models:t,viewCache:n,viewState:r})=>[Bu({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!0}),Bu({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!0}),Bu({chart:e,models:t,type:"max",viewCache:n,viewState:r,isPrimary:!1}),Bu({chart:e,models:t,type:"min",viewCache:n,viewState:r,isPrimary:!1})],Ju=({chart:e,models:t})=>[ju({chart:e,models:t,type:"max",isPrimary:!0}),ju({chart:e,models:t,type:"min",isPrimary:!0}),ju({chart:e,models:t,type:"max",isPrimary:!1}),ju({chart:e,models:t,type:"min",isPrimary:!1})],Zu=({chart:e,models:t,environment:n})=>[Uu({chart:e,models:t,type:"max",environment:n,isPrimary:!0}),Uu({chart:e,models:t,type:"min",environment:n,isPrimary:!0}),Uu({chart:e,models:t,type:"max",environment:n,isPrimary:!1}),Uu({chart:e,models:t,type:"min",environment:n,isPrimary:!1})],Qu=({chart:e,environment:t,models:n,viewState:r,viewCache:i})=>{const{seriesModel:o}=n,a=o.query.series(os.TYPE.BAR).slice(-1),s=o.query.series(os.TYPE.LINE),l=o.query.series(os.TYPE.MARKER);return[...Yu({chart:e,models:n,viewState:r,viewCache:i}),...Wu({chart:e,models:n,viewState:r,viewCache:i}),...s.map((e=>Jl({models:n,environment:t,series:e}))),...s.map((e=>nu({models:n,series:e,environment:t}))),...l.map((r=>Xl({chart:e,models:n,series:r,environment:t}))),...s.map((r=>iu({chart:e,models:n,environment:t,series:r,lineSeries:s}))),...Xu({chart:e,models:n,environment:t}),...Gu({chart:e,models:n,viewCache:i,viewState:r}),...Ku({chart:e,models:n,viewCache:i,viewState:r}),...Ju({chart:e,models:n}),...Zu({chart:e,models:n,environment:t}),vu({chart:e,models:n,markerSeries:l,lineSeries:s,barSeries:a,environment:t,type:"max"}),vu({chart:e,models:n,markerSeries:l,lineSeries:s,barSeries:a,environment:t,type:"min"}),su({chart:e,models:n,environment:t,lineSeries:s})]},ec={NONE:0,WIDE:1,MEDIUM:2,NARROW:3};function tc({models:e}){const{dockService:t,seriesModel:n,layoutService:r,themeService:i}=e,{auto:o,spacing:a}=r.getLayoutValue("gridLine",{});if(!o&&a===ec.NONE)return!1;const s=i.getStyles(),l=n.meta.primarySeries.length>0;return{key:is.COMPONENT.GRID_LINE,type:"grid-line",layout:{minimumLayoutMode:Nl.GRID_LINE},preferredSize:()=>({size:0,edgeBleed:{left:1,right:1,top:1,bottom:1}}),ticks:{show:!(!o&&a===ec.WIDE)||((e,t)=>t%2==0),stroke:s.grid.line.major.color},minorTicks:{show:!o&&a===ec.NARROW,stroke:s.grid.line.minor.color},["horizontal"===t.meta.major.orientation?"y":"x"]:l?is.SCALE.MINOR.PRIMARY:is.SCALE.MINOR.SECONDARY}}function nc({models:e}){const{primaryExtremumModel:t,primaryTickModel:n,themeService:r,dockService:i,seriesModel:o}=e,a=t.query.getExtrema();return!!(o.meta.primarySeries.length>0&&a.meta.includesZero)&&{key:is.COMPONENT.ZERO_LINE,type:"ref-line",layout:{minimumLayoutMode:Nl.GRID_LINE},show:()=>n.query.getMin()<=0&&n.query.getMax()>=0,lines:{["horizontal"===i.meta.minor.orientation?"x":"y"]:[{value:0,scale:is.SCALE.MINOR.PRIMARY,line:{stroke:r.getStyles().grid.line.highContrast.color}}]}}}function rc({models:e}){const{layoutService:t,themeService:n}=e,{isContinuous:r,isTime:i}=t.meta;if(!r)return[];const o=n.getStyles(),a={type:"grid-line",layout:{minimumLayoutMode:Nl.GRID_LINE},ticks:{stroke:o.grid.line.major.color},minorTicks:{show:!1,stroke:o.grid.line.minor.color}};return i?[re(!0,{},a,{key:"time-inner-grid",x:{scale:is.SCALE.MAJOR_INNER},ticks:{stroke:o.grid.line.minor.color}}),re(!0,{},a,{key:"time-outer-grid",x:{scale:is.SCALE.MAJOR}})]:[re(!0,{},a,{key:"continuous-grid",x:{scale:is.SCALE.MAJOR},minorTicks:{show:!0}})]}function ic({models:e}){return[tc({models:e}),nc({models:e}),...rc({models:e})]}function oc({models:e,environment:t,actions:n}){const{layoutService:r,dockService:i,propertiesModel:o,appModel:a,genericObjectModel:s,styleModel:l}=e,u=o.query.getProperties(),c=r.getLayoutValue("dimensionAxis");if(!c)return!1;const{show:d}=c;if("all"!==d&&"title"!==d)return!1;const{orientation:m}=i.meta.major,h=l.query.axis.title.getStyle();return{type:"data-title",key:is.COMPONENT.AXIS_TITLE.MAJOR,layout:{dock:i.meta.major.dock,minimumLayoutMode:Nl.AXIS_TITLE.MAJOR[m.toUpperCase()]},settings:{hyperCube:r.getHyperCube(),hyperCubeDef:u&&u.qHyperCubeDef,isDimension:!0,disabled:()=>!n.interact.enabled(),model:s,app:a,translator:t.translator,rtl:"rtl"===t.options.direction,selections:void 0},style:{fontFamily:h.fontFamily,fontSize:h.fontSize,color:h.color}}}const ac=(e,t,n)=>e.query.seriesByAxis(n).map((e=>({...t[e.refIndex],explicitColumn:e.refIndex})));function sc({models:e,environment:t,actions:n}){const{layoutService:r,dockService:i,seriesModel:o,propertiesModel:a,appModel:s,genericObjectModel:l,styleModel:u}=e,c=a.query.getProperties(),d=r.getLayoutValue("measureAxes");if(!d||!d.length)return[];const m=u.query.axis.title.getStyle(),{measureAxes:h}=o.meta;return h.filter((e=>e.isPrimary?"all"===d[0].show||"title"===d[0].show:"all"===d[1].show||"title"===d[1].show)).map((e=>{const a=r.getHyperCube(),{isPrimary:u}=e,d=o.query.seriesByAxis(u).length>1,h={type:"data-title",key:u?is.COMPONENT.AXIS_TITLE.MINOR.PRIMARY:is.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,layout:{dock:u?i.meta.minor.dock:i.meta.minorSecondary.dock,minimumLayoutMode:Nl.AXIS_TITLE.MINOR},settings:{hyperCube:a,hyperCubeDef:c&&c.qHyperCubeDef,isDimension:!1,explicitItemInfos:ac(o,a.qMeasureInfo,u),onChangeToAlternative:({oldItem:e,newItem:t})=>{t.qDef.series=e.qDef.series;const n=e.qAttributeExpressions.findIndex((e=>"colorByExpression"===e.id));if(-1!==n){const r=e.qAttributeExpressions.splice(n,1)[0];t.qAttributeExpressions.unshift(r)}},disabled:()=>!n.interact.enabled(),model:l,app:s,translator:t.translator,rtl:"rtl"===t.options.direction,selections:void 0,skipAttributeExpressions:!0},style:{fontFamily:m.fontFamily,fontSize:m.fontSize,color:m.color}};return d&&(h.settings.padding="0",h.settings.minWidth="auto"),h}))}function lc({models:e,environment:t,actions:n}){return[oc({models:e,environment:t,actions:n}),...sc({models:e,environment:t,actions:n})]}function uc({models:e,environment:t,viewState:n,viewCache:r}){const{discreteModel:i,layoutService:o,dockService:a,continuousModel:s,themeService:l}=e,{isSnapshot:u,isDiscrete:c,isContinuous:d}=o.meta,m="rtl"===t.options.direction;return!(u&&!d)&&function({layoutService:e,dockService:t,discrete:n,continuousDataModel:r,viewState:i,viewCache:o,themeService:a,rtl:s,scrollbarOverride:l,visualizeCache:u=!1,deviceType:c}){const d=qs({layoutService:e,override:l});if(d.none)return!1;const{orientation:m}=t.meta.major,h={key:"scrollbar",type:"scrollbar",layout:{dock:"horizontal"===m?t.meta.minor.start:t.meta.minor.end,minimumLayoutMode:"XSMALL"},show:()=>e.meta.isContinuous?r.getDimensionCardinality()>1:n.query.getCanScroll(),settings:{orientation:m,rtl:s,isContinuous:e.meta.isContinuous,range:()=>ks({layoutService:e,viewState:i,viewCache:o})}};d.bar&&(h.settings.style="slim",h.settings.size={area:"touch"===c?{max:16,min:16}:{max:8,min:8}},e.meta.isContinuous||(h.settings.size.thumb={min:4}));const f=a.getStyles();return f.color&&(h.style={standard:{thumb:{"border-color":f.color,opacity:.4},before:{background:f.color,opacity:.1},after:{background:f.color,opacity:.1}}}),e.meta.isDiscrete&&u&&(h.settings.injections=()=>[Is({layoutService:e,discrete:n})]),h}({viewState:n,viewCache:r,discrete:i,continuousDataModel:s,layoutService:o,dockService:a,themeService:l,rtl:m,scrollbarOverride:{predicate:()=>c,value:Rs.OPTIONS.BAR.value},deviceType:t.deviceType})}function cc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i}){const{layoutService:o}=t,a=Mu({chart:e,models:t,viewState:n,viewCache:r,isPrimary:i});if(!a)return!1;const s=i?os.AXIS.PRIMARY:os.AXIS.SECONDARY;return a.key=`${is.COMPONENT.MINI_CHART.BAR}-${s}`,a.data.collection=o.meta.isBarSeriesStacked?i?is.COLLECTION.REDUCED_STACKED_PRIMARY:is.COLLECTION.REDUCED_STACKED_SECONDARY:i?is.COLLECTION.REDUCED_PRIMARY:is.COLLECTION.REDUCED_SECONDARY,a.settings.box.minWidthPx=void 0,a.settings.minor.scale=i?is.SCALE.MINOR.REDUCED_PRIMARY:is.SCALE.MINOR.REDUCED_SECONDARY,a.settings.major.scale=is.SCALE.REDUCED,a.layout={dock:"@scrollbar"},a}function dc({environment:e,models:t}){const n=t.styleModel.query.line.getStrokeDasharrayFn();return t.seriesModel.query.series(os.TYPE.LINE).map((r=>{const i=Jl({models:t,environment:e,series:r});return i.key=Fl(is.COMPONENT.MINI_CHART.LINE,r),i.data.collection=is.COLLECTION.REDUCED,i.settings.coordinates.minor.scale=r.isPrimary?is.SCALE.MINOR.REDUCED_PRIMARY:is.SCALE.MINOR.REDUCED_SECONDARY,i.settings.coordinates.major.scale=is.SCALE.REDUCED,i.settings.layers.line.strokeWidth=1,i.settings.layers.line.strokeDasharray=(...e)=>void 0===n(...e)?void 0:"1, 1",i.layout={dock:"@scrollbar"},i}))}function mc({models:e,environment:t}){return e.seriesModel.query.series(os.TYPE.MARKER).map((n=>{const r=Xl({models:e,environment:t,series:n});return r.key=Fl(is.COMPONENT.MINI_CHART.MARKER,n),r.data.collection=is.COLLECTION.REDUCED,r.settings.y.scale=n.isPrimary?is.SCALE.MINOR.REDUCED_PRIMARY:is.SCALE.MINOR.REDUCED_SECONDARY,r.settings.x.scale=is.SCALE.REDUCED,r.layout={dock:"@scrollbar"},r}))}function hc({chart:e,models:t,viewState:n,viewCache:r,environment:i}){return fl(t)?[cc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!0}),cc({chart:e,models:t,viewState:n,viewCache:r,isPrimary:!1}),...dc({environment:i,models:t}),...mc({models:t,environment:i})]:[]}function fc({models:e}){const{layoutService:t,dockService:n}=e,{isContinuous:r,isTime:i}=t.meta,o=t.getLayoutValue("dimensionAxis");if(!o||"none"===o.show||"title"===o.show)return[!1];if(!r)return[!1];const a=Nl.AXIS.MAJOR[n.meta.major.orientation.toUpperCase()];return i?[{type:"axis-overlay",key:is.COMPONENT.AXIS_OVERLAY.TIME_INNER,scale:is.SCALE.MAJOR_INNER,layout:{dock:`@${is.COMPONENT.AXIS.TIME_INNER}`,minimumLayoutMode:a}},{type:"axis-overlay",key:is.COMPONENT.AXIS_OVERLAY.TIME_OUTER,scale:is.SCALE.MAJOR,layout:{dock:`@${is.COMPONENT.AXIS.TIME_OUTER}`,minimumLayoutMode:a}}]:[{type:"axis-overlay",key:is.COMPONENT.AXIS_OVERLAY.CONTINUOUS,scale:is.SCALE.MAJOR,layout:{dock:`@${is.COMPONENT.AXIS.MAJOR_CONTINUOUS}`,minimumLayoutMode:a}}]}function pc({chart:e,models:t,environment:n}){const{refLineModel:r,layoutService:i,colorService:o,dockService:a,themeService:s,appLayoutModel:l,seriesModel:u}=t,c=l.qLocaleInfo,{options:d,theme:m}=n,h="rtl"===d.direction,f=u.query.series(os.TYPE.BAR).filter((e=>e.isPrimary)),p=u.query.series(os.TYPE.BAR).filter((e=>!e.isPrimary)),y=u.query.series(os.TYPE.LINE),g=u.query.series(os.TYPE.MARKER),v=u.query.all(),x=v.some((e=>e.isPrimary)),b=v.some((e=>!e.isPrimary)),S=x&&b,E={resolveUIColor:o.getPaletteColor},M=x?ns({refLineModel:r,layoutService:i,colorModel:E,dock:S?a.meta.minor.dock:a.meta.minor.opposite,scale:is.SCALE.MINOR.PRIMARY,style:s.getStyles(),formatter:is.FORMATTER.PRIMARY,theme:m,localeInfo:c,rtl:h,key:is.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE_LABEL}):[],C=b?ns({refLineModel:r,layoutService:i,colorModel:E,dock:S?a.meta.minor.opposite:a.meta.minor.dock,scale:is.SCALE.MINOR.SECONDARY,style:s.getStyles(),formatter:is.FORMATTER.SECONDARY,theme:m,localeInfo:c,rtl:h,key:is.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE_LABEL,path:"refLine.refLines2"}):[];return[!!x&&Za({refLineModel:r,layoutService:i,colorModel:E,dockService:a,chart:e,scale:is.SCALE.MINOR.PRIMARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:is.COMPONENT.PRIMARY_MEASURE_AXIS_REF_LINE,minimumLayoutMode:Nl.REFERENCE_LINE}),!!b&&Za({refLineModel:r,layoutService:i,colorModel:E,dockService:a,chart:e,scale:is.SCALE.MINOR.SECONDARY,axis:"horizontal"===a.meta.major.orientation?"y":"x",key:is.COMPONENT.SECONDARY_MEASURE_AXIS_REF_LINE,path:"refLine.refLines2",minimumLayoutMode:Nl.REFERENCE_LINE}),Za({isDimension:!0,refLineModel:r,layoutService:i,colorModel:E,dockService:a,chart:e,scale:is.SCALE.MAJOR,axis:"horizontal"===a.meta.major.orientation?"x":"y",rtl:h,key:is.COMPONENT.DIMENSION_REF_LINE,mainComponentKey:f.length?`${is.COMPONENT.BAR}-${os.AXIS.PRIMARY}`:p.length?`${is.COMPONENT.BAR}-${os.AXIS.SECONDARY}`:y.length?`${is.COMPONENT.LINE}-${y[0].id}`:g.length?`${is.COMPONENT.MARKER}-${g[0].id}`:`${is.COMPONENT.BAR}-${os.AXIS.PRIMARY}`,minimumLayoutMode:Nl.REFERENCE_LINE}),...M,...C,...ns({isDimension:!0,refLineModel:r,layoutService:i,colorModel:E,dock:a.meta.major.opposite,scale:is.SCALE.MAJOR,style:s.getStyles(),theme:m,localeInfo:c,rtl:h,key:is.COMPONENT.DIMENSION_REF_LINE_LABEL})]}function yc(e){return"NaN"===e.qMin&&"NaN"===e.qMax}var gc=[{key:"NoDataExist",alignment:"center",condition:({layoutService:e})=>{const{x:t,y:n}=e.meta.size;return t*n==0}},{key:"OnlyNanData",alignment:"center",condition:({layoutService:e})=>{const{isContinuous:t}=e.meta;if(!t)return!1;const n=e.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNanData",alignment:"center",condition:({layoutService:e})=>e.getHyperCubeValue("qMeasureInfo").every(yc)},{key:"DataRangeIncludingZero",alignment:"bottom",condition:({layoutService:e,primaryExtremumModel:t,secondaryExtremumModel:n,flags:r})=>{if(!1===e.getLayout().showDisclaimer&&r.isEnabled("SHOW_DISCLAIMER"))return!1;const i=e.getLayoutValue("measureAxis.logarithmic",!1),o=t.query.getExtrema(),a=n.query.getExtrema();return i&&(o.meta.includesZero||a.meta.includesZero)}}];function vc({environment:e,models:t}){const{flags:n,translator:r,options:i}=e,{layoutService:o,primaryExtremumModel:a,secondaryExtremumModel:s,themeService:l}=t,u=function({layoutService:e,primaryExtremumModel:t,secondaryExtremumModel:n,flags:r}){let i,o;for(let a=0,s=gc.length;a<s;a++){i=gc[a];try{o=i.condition({layoutService:e,primaryExtremumModel:t,secondaryExtremumModel:n,flags:r})}catch(e){throw Error("failing disclaimer condition",e)}if(o)return i}return!1}({layoutService:o,primaryExtremumModel:a,secondaryExtremumModel:s,flags:n});if(!u)return!1;const{fontFamily:c}=l.getStyles(),d=function(e,t,n,r={}){if(!e)return!1;const{translator:i}=t,{rtl:o}=n;return{key:"disclaimer",type:"disclaimer",layout:{dock:ae[e].alignment},settings:{label:i.get(`Object.Disclaimer.${e}`),rtl:o},style:r}}(u.key,{translator:r},{rtl:"rtl"===i.direction},{fontFamily:c});return d}function xc({layoutService:e}){return!!fl({layoutService:e})&&{type:"range",key:"range-brush-highlighter",layout:{dock:"@scrollbar"},settings:{scale:is.SCALE.REDUCED,brush:"selection",fill:"#6CB33F",opacity:.2}}}function bc(e){return(null==e?void 0:e.type)||os.TYPE.BAR}function Sc({models:e,environment:t}){const{layoutService:n,colorService:r,dockService:i,seriesModel:o,selectionService:a}=e,{hasLineSeries:s,isContinuous:l,hasMultipleMeasures:u,isGroupedByMeasure:c}=n.meta;if(!s)return!1;const{options:d}=t,m=n.getLayoutValue("color",{}),h=e=>e.filter((e=>bc(e)===os.TYPE.LINE)).map((e=>({key:Fl(is.COMPONENT.LINE,e),typeIndex:e.typeIndex}))),f=!m.auto&&"byMeasure"===m.mode&&m.byMeasureDef&&void 0!==m.byMeasureDef.activeMeasureIndex,p=n.getHyperCubeValue("qMeasureInfo").map((e=>{var t;return null===(t=e.color)||void 0===t?void 0:t.on}));return{type:"brush-highlighter",key:"brush-highlighter",data:{collection:is.COLLECTION.LINE},settings:{getSelectionInfo:()=>{var e;return(null==a||null===(e=a.getSelectionInfo)||void 0===e?void 0:e.call(a))||{}},seriesInfo:{primary:h(o.meta.primarySeries),secondary:h(o.meta.secondarySeries)},selectionValues:{"qHyperCube/qDimensionInfo/0":l?e=>e.value:e=>e.major.value,"qHyperCube/qDimensionInfo/0:numeric":e=>e.major.value,"qHyperCube/qDimensionInfo/0/qAttrExprInfo/0":e=>e.end.value,"qHyperCube/qMeasureInfo/X":e=>e.end.value},colorSettings:e=>r.getSettingsForMeasure(e),colorByData:e=>!p[e]&&f,hasMultipleMeasures:u,groupedByMeasure:c,itemsPerGroup:o.meta.barSeriesCount,orientation:i.meta.major.orientation,rtl:"rtl"===d.direction}}}function Ec({models:{fieldModel:e}}){return{[is.FORMATTER.PRIMARY]:{data:{fields:e.main.minorsPrimary}},[is.FORMATTER.SECONDARY]:{data:{fields:e.main.minorsSecondary}}}}var Mc={MAX_NUM_POINTS:5e4,DEFAULT_NUM_POINTS:2e3,DEFAULT_NUM_LINES:12};const{DEFAULT_NUM_POINTS:Cc}=Mc;function Ac({layoutService:e,largeDataService:t}){const{maxNumPoints:n=Cc}=(null==t?void 0:t.meta)||{},{qHyperCube:r}=e.getLayout();return r.qSize.qcy*r.qMeasureInfo.length>n}const{DEFAULT_NUM_LINES:Oc}=Mc,Tc=({layoutService:e,largeDataService:t})=>{const{maxNumLines:n=Oc}=(null==t?void 0:t.meta)||{},{qHyperCube:r}=e.getLayout();return r.qDimensionInfo.length>1&&!Ac({layoutService:e,largeDataService:t})?e.meta.size.dimensions[1]+1:n},{DEFAULT_NUM_POINTS:Nc}=Mc,{MAX_NUM_POINTS:wc,DEFAULT_NUM_POINTS:Rc,DEFAULT_NUM_LINES:Ic}=Mc,{DEFAULT_NUM_POINTS:kc}=Mc,Lc=({layoutService:e,largeDataService:t})=>{if(!Ac({layoutService:e,largeDataService:t})){const{maxNumPoints:e=kc}=(null==t?void 0:t.meta)||{};return e}const{dimensionCount:n}=e.meta;return n>1?(({layoutService:e,largeDataService:t})=>{var n;const{dimensions:r=[]}=(null==e||null===(n=e.meta)||void 0===n?void 0:n.size)||{},{maxNumLines:i=Ic,maxNumPoints:o=Rc,hasInjectedData:a=!1}=(null==t?void 0:t.meta)||{};if(Tc({layoutService:e,largeDataService:t})*r[0]<=o)return r[0];const s=Math.max(1,Math.min(i,r[1])),l=o/s,u=Math.floor(r[0]<=l?l:l/4),c=2*s*(s+1);return a&&(s>Ic||o>Rc)?Math.min(u,Math.ceil(wc/c)):u})({layoutService:e,largeDataService:t}):(({layoutService:e,largeDataService:t})=>{const{maxNumPoints:n=Nc}=(null==t?void 0:t.meta)||{},{measureCount:r=1}=(null==e?void 0:e.meta)||{},i=4+2*(r-1);return Math.floor(n/(r*i))})({layoutService:e,largeDataService:t})},Pc=({start:e,end:t,model:n,layoutService:r,largeDataService:i,definitionPath:o})=>{const a={qStart:e,qEnd:t,qNbrPoints:Lc({layoutService:r,largeDataService:i}),qMaxNbrTicks:300,qMaxNumberLines:Tc({layoutService:r,largeDataService:i})};return n.getHyperCubeContinuousData(o,a,!1)};function qc({model:e,layoutService:t,largeDataService:n,definitionPath:r="/qHyperCubeDef"}){return{shouldFetchReduced:()=>Ac({layoutService:t,largeDataService:n}),computeNbrOfBins:()=>Lc({layoutService:t,largeDataService:n}),computeMaxNumberLines:()=>Tc({layoutService:t,largeDataService:n}),fetch:(i,o)=>Pc({start:i,end:o,model:e,layoutService:t,largeDataService:n,definitionPath:r})}}function Dc(e={}){const{cache:t={}}=e;return{fetch:()=>Promise.resolve(t.merged)}}function $c({layoutService:e,viewCache:t}){return{fetch:()=>{const{qAxisData:t,qDataPages:n}=e.getHyperCube();return Promise.resolve({qAxisData:t,qDataPages:n})},getSnapshotData(){const n=e.getLayoutValue("snapshotData.content.chartData",{});return"zoom"in n&&"min"in n.zoom&&"max"in n.zoom?function({zoom:e}){return{zoom:e}}(n):function({scrollOffset:e=0,viewRange:t=0},n){let r=n+e,i=r+t;return 1===t&&0===e&&(r=n-.5,i=n+.5),{zoom:{min:r,max:i}}}(n,t.get("continuousMin"))}}}function zc(){const e=()=>{},t=[],n={};return e.set=(e,r)=>{const i=t.indexOf(e);i>-1&&t.splice(i,1),t.push(e),n[e]=r},e.forEach=e=>{t.forEach(((t,r)=>e(n[t],r)))},e.has=e=>e in n,e}function _c(e,t,n){return n[0]&&n[0][1]&&n[0][1].qElemNumber>-1?function({start:e,end:t,matrix:n}){const r=[],i=zc(),o=zc();for(let a=0;a<n.length;a++){const s=n[a],l=s[1].qElemNumber.toString();s[0].qNum<e?i.set(l,s):s[0].qNum>t&&(o.has(l)||o.set(l,s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return i.forEach(((e,t)=>r.splice(t,0,e))),o.forEach((e=>r.push(e))),r}({start:e,end:t,matrix:n}):function({start:e,end:t,matrix:n}){const r=[];let i,o;for(let a=0;a<n.length;a++){const s=n[a];s[0].qNum<e?i=s:s[0].qNum>t&&(o||(o=s)),s[0].qNum>=e&&s[0].qNum<=t&&r.push(s)}return i&&r.unshift(i),o&&r.push(o),r}({start:e,end:t,matrix:n})}function Hc(e,t){return{...e,qWidth:t[0]?t[0].length:0,qHeight:t.length}}function Bc(e,t,n){const r={qDataPages:(n.qDataPages||[]).map((n=>{const r=_c(e,t,n.qMatrix),i=Hc(n.qArea,r);return{...n,qArea:i,qMatrix:r}}))};return n.qAxisData&&n.qAxisData.qAxis&&(r.qAxisData=function(e,t,n){return{qAxis:n.qAxis.map((n=>({qName:n.qName,qTags:n.qTags,qTicks:n.qTicks.reduce(((n,r)=>((r.qStart>=e&&r.qStart<=t||r.qEnd>=e&&r.qEnd<=t||r.qStart<e&&r.qEnd>t)&&n.push(r),n)),[])})))}}(e,t,n.qAxisData)),r}const Fc=2**.5,jc=1/Fc,Vc=1e-6,Uc=jc**44;function Yc(e){return e.qIsOtherCell}function Wc({qDataPages:e=[]}={},t={}){const n=e.length?e[0].qMatrix:[];return t.isStackedByDimension?function(e){const t={};return e.forEach((e=>{if(!e.some(Yc)){const n=e[0].qElemNumber;t[n]=void 0}})),Object.keys(t).length}(n):function(e){let t=0;return e.forEach((e=>{e.some(Yc)||t++})),t}(n)}const Xc={query:{getShouldProcess:()=>!1},command:{processDataPage:()=>{}}};var Gc={created(){this.state={}},beforeUpdate(){this.state={}},beforeRender({size:e}){this.state.ticks=this.scale.ticks({distance:e.width}).filter((e=>!e.isMinor)),"linear"===this.scale.type&&function(e,t){const[,n]=e.domain();for(let e=0;e<t.length;e++){const r=t[e],i=t[e+1];r.data={},i||1===r.end?i?(r.data.start=r.value,r.data.end=i.value,r.end=i.position):(r.data.start=r.value,r.data.end=r.value):(r.data.start=r.value,r.data.end=n,r.end=1)}}(this.scale,this.state.ticks)},render(){const e=this.scale.data().fields.length?this.scale.data().fields[0].id():"",{ticks:t}=this.state,n=t.map((t=>({type:"rect",fill:"none",data:{source:{field:e},value:[t.data.start,t.data.end]},x:t.start*this.rect.width,y:0,width:(t.end-t.start)*this.rect.width,height:this.rect.height})));if(t.length&&t[0].start>0){const r=t[0];n.unshift({type:"rect",fill:"none",data:{source:{field:e},value:[this.scale.domain()[0],r.data.start]},x:0,y:0,width:r.start*this.rect.width,height:this.rect.height})}return n}};const Kc="…";function Jc(e,t=1){if(t%2==0)return e;let n=Math.round(e);return e-n>0?n+=.5:n-=.5,n}function Zc(e,t){const{localProps:{size:n},props:{anchor:r}}=t,i=function({props:e,localProps:{size:t},style:n,renderer:r}){const i=e.label.padding,o=Math.max(0,Math.min(e.label.justify,1)),a=Math.max(0,Math.min(e.label.align,1)),s=e=>r.measureText({text:e,fontSize:n.label.fontSize,fontFamily:n.label.fontFamily});return{resolve:(e,r)=>{const l="string"==typeof e.label?e.label:"",u=s(l);let{x:c,width:d}=r;e.start===e.end&&(d=u.width+2*i,1===e.end&&(c-=d));const m={x:c+i,y:i,width:d-2*i,height:t.height-2*i},h=s(`${l[0]}${Kc}`).width,f=Math.max(0,m.width-u.width),p=Math.max(0,m.height-u.height),y=o*f,g=a*p;return{show:m.width>=Math.min(h,u.width),text:l,dx:y,dy:g,rect:m,style:n.label,segment:{x:c+y,width:u.width+2*i},tickValue:e.value}}}}(t),o=function({localProps:{size:e},style:t,scale:n,props:r}){const[i,o]=n.domain(),a=Math.max(0,Math.min(1,r.guideLine.major.justify));return{resolve:(n,r)=>{const s=a*r.width,l=Jc(r.x+s,t.majorGuideLine.strokeWidth);return{show:n.value>=i&&n.value<=o,x1:l,y1:0,x2:l,y2:Jc(e.height,t.majorGuideLine.strokeWidth),style:t.majorGuideLine,tickValue:n.value}}}}(t),a=e.map((e=>{const t=function(e,t,n){const r=Math.abs(Math.max(e.start,0)-Math.min(e.end,1))*t.width;return{x:Math.max(e[n],0)*t.width,y:0,width:r,height:t.height}}(e,n,r);return{rect:t,label:i.resolve(e,t),guideLine:o.resolve(e,t)}}));return function(e,t){const n=e.length;if(n<2)return;const r=e[n-1],i=t[n-1].label;if(r&&r.start===r.end)for(let e=n-2;e>-1;e--){const n=t[e].label;n.show=n.show&&(o=n.segment,a=i.segment,!(o.x<a.x?o.x+o.width>=a.x:a.x+a.width>=o.x))}var o,a}(e,a),a}function Qc(e,t){const n=function({localProps:{size:e},props:t,style:n}){return{resolve:r=>{const i=Math.max(e.height-t.guideLine.minor.size,0)*Math.max(0,Math.min(t.guideLine.minor.align,1)),o=Jc(r.position*e.width,n.minorGuideLine.strokeWidth);return{guideLine:{show:!0,x1:o,y1:Jc(i,n.minorGuideLine.strokeWidth),x2:o,y2:Jc(t.guideLine.minor.size+i,n.minorGuideLine.strokeWidth),style:n.minorGuideLine}}}}}(t);return t.props.guideLine.minor.show?e.map(n.resolve):[]}function ed(e){return e.filter((e=>e.show)).map((e=>re({strokeWidth:1},e.style,{type:"line",x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,tickValue:e.tickValue})))}var td={require:["renderer"],defaultSettings:{layout:{displayOrder:0,prioOrder:0},settings:{anchor:"start",label:{show:!0,padding:4,align:0,justify:0},line:{show:!0},guideLine:{major:{justify:0},minor:{show:!0,size:4,align:0}}},style:{label:"$label",line:"$guide-line",majorGuideLine:"$guide-line",minorGuideLine:"$guide-line"}},preferredSize:()=>({size:30,edgeBleed:{left:1,right:1}}),init(){this.props=this.settings.settings,this.localProps={},this.state={major:[],minor:[]}},created(){this.init()},beforeUpdate(){this.init()},beforeRender({size:e}){this.localProps.size=e;const t=this.scale.ticks({distance:e.width}),n=t.filter((e=>!e.isMinor)),r=t.filter((e=>e.isMinor));this.state.line=function({localProps:{size:e},style:t,props:n}){const r=Jc(1,t.line.strokeWidth);return{show:n.line.show,x1:Jc(0,t.line.strokeWidth),y1:r,x2:Jc(e.width,t.line.strokeWidth),y2:r,style:t.line}}(this),this.state.major=Zc(n,this),this.state.minor=Qc(r,this)},render(){return[...ed([this.state.line]),...(e=this.state.major.map((e=>e.label)),e.filter((e=>e.show)).map((e=>re({},e.style,{type:"text",x:e.rect.x,y:e.rect.y,dx:e.dx,dy:e.dy,maxWidth:e.rect.width,text:e.text,title:e.text,baseline:"text-before-edge",tickValue:e.tickValue})))),...ed(this.state.major.map((e=>e.guideLine))),...ed(this.state.minor.map((e=>e.guideLine)))];var e}};function nd(e,t){return e&&t&&e.qTicks.length===t.qTicks.length&&e.qTicks.every(((e,n)=>e.qStart===t.qTicks[n].qStart&&e.qEnd===t.qTicks[n].qEnd))}function rd(e){return e.qTags.indexOf("$qualified")>-1}function id({qAxis:e}){const t=[],n=[];for(let r=0;r<e.length;r++){const i=r+1,o=e[r],a=e[i];nd(o,a)?(rd(a)?(t.push(i),n.push(r)):(t.push(r),n.push(i)),r++):(t.push(r),n.push(r))}return{qualified:t,nonQualified:n}}function od({qualifiedMeta:e,nonQualifiedMeta:t}){return{resolve(n){let r,i=NaN,o=NaN,a=NaN,s=!1;for(let l=e.length-1;l>=0;l--){const u=e[l];if(u.queries.outer(n)){const e=t[l+1];if(i=u.index,r=l,u.attrs.isDayOrShorter()&&u.queries.canFitHalfDayTicks(n)){o="auto",s=!0;break}if(e&&e.queries.inner(n)){o=e.index;const r=t[l+2];r&&r.queries.minor(n)&&(a=r.index);break}}}if(!Number.isNaN(i)&&Number.isNaN(o)&&"auto"!==o){o=i,i=NaN;const e=t[r+1];e&&e.queries.minor(n)&&(a=e.index)}else Number.isNaN(i)&&(i="auto",o="auto");return{outer:i,inner:o,minor:a,isDayOrShorter:s}}}}const ad=16;function sd({qTicks:e,measureText:t=(()=>({width:0})),cache:n={},scale:r}){const i=n;return{isDayOrShorter:()=>(i.isDayOrShorter=e.length>0&&Math.abs(e[0].qStart-e[0].qEnd)<=1,i.isDayOrShorter),count:()=>e.length,maxRange:()=>(i.maxRange=e.length?Math.max(...e.map((e=>Math.abs(r(e.qStart)-r(e.qEnd))))):0,i.maxRange),rangeAndWidth(){const n=r.clamp();return r.clamp(!1),i.rangeAndWidth=e.map((e=>({range:Math.abs(r(e.qStart)-r(e.qEnd)),width:t(`${e.qText}`).width+ad}))),r.clamp(n),i.rangeAndWidth}}}const ld=6;function ud({attrs:e,reqAutoFitWidth:t}){return{outer:t=>!e.rangeAndWidth().some((({width:e,range:n})=>e>n*t)),inner:t=>!e.rangeAndWidth().some((({width:e,range:n})=>e>n*t)),minor:t=>e.maxRange()*t>=ld,canFitHalfDayTicks:n=>n>=t*e.count()}}function cd({qualified:e,nonQualified:t,qAxis:n,measureText:r,reqAutoFitWidth:i,scale:o},{attributesFactory:a=sd,queryFactory:s=ud}={attributesFactory:sd,queryFactory:ud}){const l=n.map(((e,t)=>function(e,t){const{qTicks:n}=e,l=a({qTicks:n,measureText:r,scale:o});return{data:e,index:t,attrs:l,queries:s({attrs:l,reqAutoFitWidth:i})}}(e,t))),u=e.map((e=>l[e])),c=t.map((e=>l[e]));return{qAxisMeta:l,qualifiedMeta:u,nonQualifiedMeta:c}}function dd({qAxis:e=[],measureText:t=(()=>({width:0})),cache:n={},reqAutoFitWidth:r=0,scale:i},{metaFactory:o=cd,mapper:a=id,resolver:s=od}={metaFactory:cd,mapper:id,resolver:od}){const{qualified:l,nonQualified:u}=a({qAxis:e}),{qualifiedMeta:c,nonQualifiedMeta:d}=o({qAxis:e,qualified:l,nonQualified:u,measureText:t,reqAutoFitWidth:r,scale:i}),m=s({qualifiedMeta:c,nonQualifiedMeta:d});return{resolve:t=>{const r=n.key({distance:t});if(n.get(r))return n.get(r);if(function(e){return!Array.isArray(e)||0===e.length||e.every((e=>0===e.qTicks.length))}(e))return{outer:"auto",inner:"auto",minor:NaN,isDayOrShorter:!1};const i=m.resolve(t);return n.set(r,i),i}}}const md=86400,hd=864e5;function fd(e){return new Date(Date.UTC(1899,11,30+Math.floor(e),0,0,0,Math.round(hd*(e-Math.floor(e)))))}const pd=fd(0).getTime();function yd(e){return(e.getTime()-pd)/md/1e3}var gd=new Date,vd=new Date;function xd(e,t,n,r){function i(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return i.floor=function(t){return e(t=new Date(+t)),t},i.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},i.range=function(n,r,o){var a,s=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return s;do{s.push(a=new Date(+n)),t(n,o),e(n)}while(a<n&&n<r);return s},i.filter=function(n){return xd((function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),(function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}))},n&&(i.count=function(t,r){return gd.setTime(+t),vd.setTime(+r),e(gd),e(vd),Math.floor(n(gd,vd))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e==0}:function(t){return i.count(0,t)%e==0}):i:null}),i}var bd=36e5,Sd=xd((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+1e3*t)}),(function(e,t){return(t-e)/1e3}),(function(e){return e.getUTCSeconds()})),Ed=Sd;Sd.range;var Md=xd((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+6e4*t)}),(function(e,t){return(t-e)/6e4}),(function(e){return e.getUTCMinutes()})),Cd=Md;Md.range;var Ad=xd((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*bd)}),(function(e,t){return(t-e)/bd}),(function(e){return e.getUTCHours()})),Od=Ad;Ad.range;var Td=xd((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/864e5}),(function(e){return e.getUTCDate()-1})),Nd=Td;function wd(e){return xd((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/6048e5}))}Td.range;var Rd=wd(0),Id=wd(1),kd=wd(2),Ld=wd(3),Pd=wd(4),qd=wd(5),Dd=wd(6);Rd.range,Id.range,kd.range,Ld.range,Pd.range,qd.range,Dd.range;var $d=xd((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()})),zd=$d;$d.range;var _d=xd((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));_d.every=function(e){return isFinite(e=Math.floor(e))&&e>0?xd((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null};var Hd=_d;_d.range;const Bd={second:1,minute:2,hour:3,day:4,month:5,year:6};function Fd({timeScale:e,labels:t,distance:n,isDayOrShorter:r,cache:i,timeOnly:o,initialMin:a}){const[s,l]=e.domain(),u=i.key({distance:n});let c;i.get(u,1)?c=i.get(u,1):(c=function(e,t,n,r,i,o){function a(e){return Hd.filter((t=>(t.getUTCFullYear()-o.getUTCFullYear())%e==0))}const s=Ed.count(e,t),l=Cd.count(e,t),u=Od.count(e,t),c=Nd.count(e,t),d=Rd.count(e,t),m=zd.count(e,t),h=Hd.count(e,t),f=n/r.second.width-1,p=n/r.minute.width-1,y=n/r.date.width-1,g=n/r.year.width-1,v={type:"year",desc:"year",count:h,interval:Hd.every(1),formatter:r.year.formatter,offset:e=>Hd.offset(e,-1),floor:Hd.floor};if(s<=f)v.type=Bd.second,v.desc="second",v.count=s,v.interval=Ed.every(1),v.formatter=r.second.formatter,v.offset=e=>Ed.offset(e,-1),v.floor=Ed.floor;else if(s/2<=f)v.type=Bd.second,v.desc="every other second",v.count=s/2,v.interval=Ed.every(2),v.formatter=r.second.formatter,v.offset=e=>Ed.offset(e,-2),v.floor=Ed.floor;else if(s/5<=f)v.type=Bd.second,v.desc="every 5 second",v.count=s/5,v.interval=Ed.every(5),v.formatter=r.second.formatter,v.offset=e=>Ed.offset(e,-5),v.floor=Ed.floor;else if(s/15<=f)v.type=Bd.second,v.desc="every 15 second",v.count=s/15,v.interval=Ed.every(15),v.formatter=r.second.formatter,v.offset=e=>Ed.offset(e,-15),v.floor=Ed.floor;else if(s/30<=f)v.type=Bd.second,v.desc="every 30 second",v.count=s/30,v.interval=Ed.every(30),v.formatter=r.second.formatter,v.offset=e=>Ed.offset(e,-30),v.floor=Ed.floor;else if(l<=p)v.type=Bd.minute,v.desc="minute",v.count=l,v.interval=Cd.every(1),v.formatter=r.minute.formatter,v.offset=e=>Cd.offset(e,-1),v.floor=Cd.floor;else if(l/2<=p)v.type=Bd.minute,v.desc="every 2 minute",v.count=l/2,v.interval=Cd.every(2),v.formatter=r.minute.formatter,v.offset=e=>Cd.offset(e,-2),v.floor=Cd.floor;else if(l/5<=p)v.type=Bd.minute,v.desc="every 5 minute",v.count=l/5,v.interval=Cd.every(5),v.formatter=r.minute.formatter,v.offset=e=>Cd.offset(e,-5),v.floor=Cd.floor;else if(l/10<=p)v.type=Bd.minute,v.desc="every 10 minute",v.count=l/10,v.interval=Cd.every(10),v.formatter=r.minute.formatter,v.offset=e=>Cd.offset(e,-10),v.floor=Cd.floor;else if(l/15<=p)v.type=Bd.minute,v.desc="every 15 minute",v.count=l/15,v.interval=Cd.every(15),v.formatter=r.minute.formatter,v.offset=e=>Cd.offset(e,-15),v.floor=Cd.floor;else if(l/30<=p)v.type=Bd.minute,v.desc="every 30 minute",v.count=l/30,v.interval=Cd.every(30),v.formatter=r.minute.formatter,v.offset=e=>Cd.offset(e,-30),v.floor=Cd.floor;else if(u<=p)v.type=Bd.hour,v.desc="hour",v.count=u,v.interval=Od.every(1),v.formatter=r.minute.formatter,v.offset=e=>Od.offset(e,-1),v.floor=Od.floor;else if(u/2<=p)v.type=Bd.hour,v.desc="every 2 hour",v.count=u/2,v.interval=Od.every(2),v.formatter=r.minute.formatter,v.offset=e=>Od.offset(e,-2),v.floor=Od.floor;else if(u/3<=p)v.type=Bd.hour,v.desc="every 3 hour",v.count=u/3,v.interval=Od.every(3),v.formatter=r.minute.formatter,v.offset=e=>Od.offset(e,-3),v.floor=Od.floor;else if(u/6<=p)v.type=Bd.hour,v.desc="every 6 hour",v.count=u/6,v.interval=Od.every(6),v.formatter=r.minute.formatter,v.offset=e=>Od.offset(e,-6),v.floor=Od.floor;else if(u/12<=p||i)v.type=Bd.hour,v.desc="every 12 hour",v.count=u/12,v.interval=Od.every(12),v.formatter=r.minute.formatter,v.offset=e=>Od.offset(e,-12),v.floor=Od.floor;else if(c<=y)v.type=Bd.day,v.desc="day",v.count=c,v.interval=Nd.every(1),v.formatter=r.date.formatter,v.offset=e=>Nd.offset(e,-1),v.floor=Nd.floor;else if(c/2<=y)v.type=Bd.day,v.desc="every 2 day",v.count=c/2,v.interval=Nd.every(2),v.formatter=r.date.formatter,v.offset=e=>Nd.offset(e,-2),v.floor=Nd.floor;else if(c/3<=y)v.type=Bd.day,v.desc="every 3 day",v.count=c/3,v.interval=Nd.every(3),v.formatter=r.date.formatter,v.offset=e=>Nd.offset(e,-3),v.floor=Nd.floor;else if(d<=y)v.type=Bd.day,v.desc="week",v.count=d,v.interval=Rd.every(1),v.formatter=r.date.formatter,v.offset=e=>Rd.offset(e,-1),v.floor=Nd.floor;else if(d/2<=y)v.type=Bd.day,v.desc="every 2 week",v.count=d/2,v.interval=Rd.every(2),v.formatter=r.date.formatter,v.offset=e=>Rd.offset(e,-2),v.floor=Nd.floor;else if(m<=y)v.type=Bd.month,v.desc="month",v.count=m,v.interval=zd.every(1),v.formatter=r.date.formatter,v.offset=e=>zd.offset(e,-1),v.floor=Nd.floor;else if(m/3<=y)v.type=Bd.month,v.desc="quarter",v.count=m/3,v.interval=zd.every(3),v.formatter=r.date.formatter,v.offset=e=>zd.offset(e,-3),v.floor=Nd.floor;else if(m/6<=y)v.type=Bd.month,v.desc="half year",v.count=m/6,v.interval=zd.every(6),v.formatter=r.date.formatter,v.offset=e=>zd.offset(e,-6),v.floor=Nd.floor;else if(h<=g)v.type=Bd.year,v.desc="year",v.count=h,v.interval=Hd.every(1),v.formatter=r.year.formatter,v.offset=e=>Hd.offset(e,-1),v.floor=Hd.floor;else if(h/2<=g)v.type=Bd.year,v.desc="every 2 year",v.count=h/2,v.interval=a(2),v.formatter=r.year.formatter,v.offset=e=>Hd.offset(e,-2),v.floor=Hd.floor;else if(h/5<=g)v.type=Bd.year,v.desc="every 5 year",v.count=h/5,v.interval=a(5),v.formatter=r.year.formatter,v.offset=e=>Hd.offset(e,-5),v.floor=Hd.floor;else if(h/10<=g)v.type=Bd.year,v.desc="every 10 year",v.count=h/10,v.interval=a(10),v.formatter=r.year.formatter,v.offset=e=>Hd.offset(e,-10),v.floor=Hd.floor;else{const e=Math.floor(h/g);v.type=Bd.year,v.desc="every nth year",v.count=e,v.interval=a(e),v.formatter=r.year.formatter,v.offset=t=>Hd.offset(t,-e),v.floor=Hd.floor}return v}(s,l,n,t.all(),r,a),i.set(u,c,1));const d=e.ticks(c.interval);d.length?s.getTime()!==d[0].getTime()&&d.unshift(c.offset(d[0])):d.push(c.floor(s));const m=d.map(((e,t,n)=>{const r=n[t+1]?n[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+r),formatter:c.formatter}}));let h=[];if(!o&&c.type<=Bd.hour){const n=t.getFormat("date"),r=e.ticks(Nd.every(1));r.length&&s.getUTCDate()!==r[0].getUTCDate()&&r.unshift(Nd.offset(r[0],-1)),h=(r.length?r:[Nd.floor(s)]).map(((e,t,r)=>{const i=r[t+1]?r[t+1]-e:l-e;return{start:e,end:new Date(e.getTime()+i),formatter:n.formatter}}))}return{inner:m,outer:h}}const jd=86400,Vd=1440,Ud={};function Yd(e,t,n,r){return{type:e,start:new Date(Date.UTC(...t)),end:new Date(Date.UTC(...n)),formatter:r}}function Wd(e,t,n){const{generator:r,anchor:i,clamp:o,level:a}=t.ticks,{qNumFormat:s}=t.formatter;e.clamp(o);const[l,u]=e.domain(),c=Fo().domain([fd(l),fd(u)]);c.clamp(o),c.range(t.invert?[1,0]:[0,1]);const d="object"==typeof r?r:{type:r};let m;m="d3"===d.type?(e,i)=>Fd({timeScale:c,labels:n,distance:e,isDayOrShorter:i,cache:t.cache,timeOnly:"T"===s.qType,initialMin:void 0===d.initialMin?c.domain()[0]:fd(r.initialMin)}):e=>function(e,t,n,r,i,o=!1){if(Ud[[t,n,r,r,o]])return Ud[[t,n,r,r,o]];const a={year:e.getFormat("year"),date:e.getFormat("date"),minute:e.getFormat("minute"),second:e.getFormat("second")},s=fd(n),l=s.getFullYear(),u=s.getMonth(),c=s.getDate(),d=r-n,m=t/(i-r),h=m/1440,f=m/jd,p=366*m,y=3*m*30,g=a.second.width/f,v=a.minute.width/h,x=a.date.width/y,b=a.year.width/p;let S,E,M,C=0,A=0,O=null,T=null,N=null,w=null,R=null,I=null;const k={outer:[],inner:[]};for(g<1?(O=1,A=1/jd):g<2?(O=2,A=1/jd*2):g<5?(O=5,A=1/jd*5):g<10?(O=10,A=1/jd*10):g<30?(O=30,A=1/jd*30):v<1?(T=1,A=1/Vd):v<2?(T=2,A=1/Vd*2):v<5?(T=5,A=1/Vd*5):v<10?(T=10,A=1/Vd*10):v<30?(T=30,A=1/Vd*30):v<60?(N=1,A=1/24):v<120?(N=2,A=2/24):v<360?(N=6,A=.25):v<720?(N=12,A=.5):x<1/90?(A=1,w=1):x<2/90?(A=2,w=2):x<7/90?(A=7,w=7):x<31/90?(R=1,A=31):x<1?(R=3,A=90):b<1?(I=1,A=366):b<2?(I=2,A=732):b<5?(I=5,A=1826.25):(I=10,A=3652.5),E=Math.floor((d+n%1)/A);C<i;){M=E+1,S=I?Yd("year",[l+E*I,0,1],[l+M*I,0,1],a.year.formatter):R?Yd("month",[l,u+E*R,1],[l,u+M*R,1],a.date.formatter):w?Yd("day",[l,u,c+E*w],[l,u,c+M*w],a.date.formatter):N?Yd("hour",[l,u,c,0+E*N],[l,u,c,0+M*N],a.minute.formatter):T?Yd("minute",[l,u,c,0,0+E*T],[l,u,c,0,0+M*T],a.minute.formatter):Yd("second",[l,u,c,0,0,0+E*O],[l,u,c,0,0,0+M*O],a.second.formatter),C=yd(S.start),k.inner.push(S);const e=Math.floor(C);if(!(o||I||R||w)){const t={type:"day",start:fd(e),end:fd(e+1),formatter:a.date.formatter,qStart:e};k.outer[k.outer.length-1]&&k.outer[k.outer.length-1].qStart===t.qStart||k.outer.push(t)}E++}return k.min=r,k.max=i,Ud[[t,n,r,r,o]]=k,k}(n,e,d.min,l,u,"T"===s.qType);const h={transform:(t=[],{isMinor:n=!1}={})=>t.map((t=>{let r;r="start"===i?t.qStart:"end"===i?t.qEnd:(t.qStart+t.qEnd)/2;const o=e.clamp();n&&e.clamp(!1);const a=e(r),s=e(t.qStart),l=e(t.qEnd);return e.clamp(o),{value:r,position:a,start:s,end:l,label:t.qText,isMinor:n,data:n?void 0:{start:t.qStart,end:t.qEnd,scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1)),generate:(t=100,n)=>m(t,n)[a].map((t=>{let n;return n="start"===i?yd(t.start):"end"===i?yd(t.end):(yd(t.start)+yd(t.end))/2,{position:c(t.start),start:c(t.start),end:c(t.end),value:n,label:t.formatter(n),isMinor:!1,data:{start:yd(t.start),end:yd(t.end),scaleStart:e.domain()[0]}}})).filter((e=>e.position>=0&&e.position<=1))};return h}const Xd=41000.2343433,Gd=/t+/i,Kd=16,Jd=60;const Zd={min:NaN,max:NaN,invert:!1,qAxis:[],field:void 0,formatter:{fn:()=>e=>e,measureText:()=>({width:0,height:0}),localeInfo:{},qNumFormat:{}},ticks:{generator:"d3",level:"outer",anchor:void 0,clamp:!1},cache:{get:()=>!1,set:()=>{},key:()=>""}};function Qd(e,t){e.instance||(e.instance=t.copy(),e.instance.domain(t.domain()),e.instance.clamp(!0),e.instance.range(e.invert?[1,0]:[0,1]))}const em="continuousPan";var tm={model:function({model:e,layoutService:t,largeDataService:n,dataProcessorModel:r=Xc,viewCache:i,viewState:o,definitionPath:a},s={}){const{engineFetcherFactory:l=qc,snapshotFetcherFactory:u=$c,cacheFetcherFactory:c=Dc,cache:d={initial:{},merged:{}}}=s,m=l({model:e,layoutService:t,largeDataService:n,definitionPath:a}),h=u({layoutService:t,viewCache:i}),f=c({cache:d}),p=e=>{throw e.isHandled=!0,e};let y,g,v;return{update(e){var n,r;({initialMin:g,initialMax:v}=function(e={}){let{qMin:t,qMax:n}=e;return t=Number.isNaN(+t)?0:t,n=Number.isNaN(+n)?0:n,{initialMin:t,initialMax:n}}(e.qHyperCube.qDimensionInfo[0])),i.set("continuousMin",g),i.set("continuousMax",v),i.set("minimiumZoomSpan",(n=g,r=v,Math.max(Vc,(r-n)*Uc))),y=t.meta.isSnapshot?h:m,t.meta.isSnapshot&&({zoom:{min:g,max:v}}=h.getSnapshotData()),o.preventSet("zoom",{min:g,max:v})},updateLayout(e){const{qDataPages:n,qAxisData:r}=e;return t.setHyperCubeValue("qDataPages",n),t.setHyperCubeValue("qAxisData",r),t.setHyperCubeValue("qMode","S"),t.setHyperCubeValue("qColumnOrder",[]),e},initialFetch(){return y.fetch(g,v).then((e=>{const t=function(e){return{qDataPages:e.qDataPages.map((e=>{const t=Hc(e.qArea,e.qMatrix);return{...e,qArea:t}})),qAxisData:e.qAxisData}}(e);return r.command.processDataPage({dataPage:t.qDataPages.length?t.qDataPages[0]:[]}),d.initial=t,d.merged=t,e})).then((e=>Bc(g,v,e))).then((e=>this.updateLayout(e))).catch(p)},fetch:(e,t)=>y.fetch(e,t).then((e=>function(e,t){const n={};return n.qDataPages=(e.qDataPages||[]).map(((e,n)=>{const r=function(e,t){if(!t||!t.length||!t[0].length)return e;const n=t[0][0].qNum,r=t[t.length-1][0].qNum,i=[],o=[];for(let t=0,a=e.length;t<a;t++){const a=e[t][0];a.qNum<n?i.push(e[t]):a.qNum>r&&o.push(e[t])}return[...i,...t,...o]}(e.qMatrix,t.qDataPages[n].qMatrix),i=Hc(e.qArea,r);return{...e,qArea:i,qMatrix:r}})),e.qAxisData&&e.qAxisData.qAxis&&(n.qAxisData=function(e,t){if(!t||!t.qAxis.length||t.qAxis.every((e=>!e.qTicks.length)))return e;const n=t.qAxis.map((e=>e.qName)),r=t.qAxis.map((e=>({start:e.qTicks[0].qStart,end:e.qTicks[e.qTicks.length-1].qStart}))),i=t.qAxis.map((e=>({qName:e.qName,qTags:[...e.qTags],qTicks:[...e.qTicks]})));for(let t=0,o=e.qAxis.length;t<o;t++){const o=e.qAxis[t],a=n.indexOf(o.qName),s=[],l=[];if(a>-1){const{start:e,end:t}=r[a];for(let n=0,r=o.qTicks.length;n<r;n++){const r=o.qTicks[n];r.qStart<e?s.push(r):r.qStart>t&&l.push(r)}i[a].qTicks=[...s,...i[a].qTicks,...l]}}return{qAxis:i}}(e.qAxisData,t.qAxisData)),n}(d.initial,e))).then((e=>(r.command.processDataPage({dataPage:e.qDataPages.length?e.qDataPages[0]:[]}),d.merged=e,e))).then((n=>Bc(e,t,n))).catch(p),fetchFromCache:(e,t)=>f.fetch(e,t).then((n=>Bc(e,t,n))),fetchMinMaxData:()=>Promise.resolve(d.initial.qDataPages||[]),getInitialCube(){const e=t.getHyperCube();return re({},e,{...d.initial})},getInitialLayout(){const e=this.getInitialCube();return re({},t.getLayout(),{qHyperCube:e})},getDimensionCardinality:()=>Wc(d.initial,t.meta),setSnapshotData(e){const{qHyperCube:t}=e,n=r.query.getShouldProcess()?[r.query.getFilteredDataPage({dataPage:d.merged.qDataPages[0]})]:d.merged.qDataPages;t.qDataPages=n,t.qAxisData=d.merged.qAxisData}}},event:{onZoomChange:function(e,t){const{layoutService:n,continuousDataModel:r}=e;function i(e,n,i){return r[e](n,i).then((e=>(r.updateLayout(e),t(),e)))}const o=A(((e,t)=>i("fetch",e,t)),50);return({min:e,max:t},{min:r,max:a})=>!n.meta.isContinuous||e===r&&t===a?Promise.resolve(null):i("fetchFromCache",e,t).then((n=>(o(e,t),n)))},onZoomIntercept:function({viewCache:e}){let t=NaN,n=NaN,r=NaN;return(i,o)=>(t=e.get("continuousMin"),n=e.get("continuousMax"),r=e.get("minimiumZoomSpan"),Math.abs(i.max-i.min)<r?o:{min:Math.min(i.max,Math.max(t,i.min)),max:Math.max(i.min,Math.min(n,i.max))})},onZoom:function({viewCache:e,viewState:t,chart:n},{threshold:r=50,rtl:i=!1,targetKey:o}){const a=e.get("continuousMin"),s=e.get("continuousMax");return O(((e,r)=>{const l=(e=>n.componentsFromPoint(e).filter((e=>e.key===o))[0])(e);if(l){const o=function(e,t,n){let{x:r}=e;return r-=t.element.getBoundingClientRect().left,r-=n.rect.x,Math.max(0,Math.min(1,r/n.rect.width))}(e,n,l),u=i?1-o:o,{min:c,max:d}=t.get("zoom"),m=Math.abs(d-c),h=m-(r>0?jc:Fc)*m,f=c+h*u,p=d-h*(1-u),y=f<a?a-f:0,g=p>s?p-s:0;t.set("zoom",{min:Math.max(f-g,a),max:Math.min(p+y,s)})}}),r)}},interactions:{areaPan:function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:i}){return{type:"Pan",key:"continuous:pan",options:{event:em,pointers:1,threshold:10,enable(r,i){return this.started===em||!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e))}},events:{[`${em}start`](n){n.preventDefault(),this.started=em;const{min:i,max:o}=r.get("zoom");this[em]={min:i,max:o,size:t.component(e).rect.computedInner.width,span:o-i}},[`${em}move`](e){e.preventDefault();const{span:t,min:n,max:o,size:a}=this[em],s=-e.deltaX/a;r.set("zoom",{min:Math.min(n+s*t,i.get("continuousMax")-t),max:Math.max(o+s*t,i.get("continuousMin")+t)})},[`${em}end`](e){e.preventDefault(),this.started=!1},[`${em}cancel`](e){e.preventDefault(),this.started=!1}}}}},picassoComponents:{axisOverlay:Gc,timeAxis:td},picassoScales:{time:function e(t,n={}){const r=function(e,t,n){const r={};return Object.keys(t).forEach((i=>{const o=e[i],a=typeof o;"function"===a?r[i]=o(n):"object"!==a||Array.isArray(o)?r[i]="undefined"===a?t[i]:o:r[i]=re(!0,{},t[i],o)})),r}(t,Zd,n),{qAxis:i}=r,o=Ir(),a={instance:null,invert:!1},{min:s,max:l}=function(e,t){let n=+e.min,r=+e.max;return Number.isNaN(n)&&Number.isNaN(r)&&Array.isArray(t)&&t.length&&(n=Math.min(...t[t.length-1].qTicks.map((e=>e.qStart))),r=Math.max(...t[t.length-1].qTicks.map((e=>e.qEnd)))),n===r&&(n-=.5,r+=.5),{min:Number.isNaN(+n)?0:n,max:Number.isNaN(+r)?1:r}}(r,i);let u,c,d=[];const m=function(e){return Number.isNaN(+e)?NaN:o(e)};m.ticks=({distance:e,resolve:t=u.resolve}={})=>{const n=t(e),o=n[r.ticks.level];if(Number.isNaN(+o)||(d=c.transform(i[o].qTicks,{isMinor:!1})),!Number.isNaN(+n.minor)){const e=c.transform(i[n.minor].qTicks,{isMinor:!0});d=d.concat(e)}return"auto"===o&&(d=c.generate(e,n.isDayOrShorter)),d},m.invert=e=>o.invert(e),m.domain=e=>Array.isArray(e)?o.domain(e):o.domain(),m.range=e=>Array.isArray(e)?o.range(e):o.range(),m.norm=e=>(Qd(a,m),a.instance(e)),m.normInvert=e=>(Qd(a,m),a.instance.invert(e)),m.copy=()=>e(t,n),m.clamp=(e=!0)=>(o.clamp(e),o.clamp()),m.min=()=>Math.min(s,l),m.max=()=>Math.max(s,l),o.range(r.invert?[1,0]:[0,1]),o.domain([s,l]),a.invert=r.invert;const h=function(e){const t={},{measureText:n,fn:r,localeInfo:i}=e.formatter,o={second:{type:"second",pattern:"hh:mm:ss",width:Jd,formatter:void 0},minute:{type:"minute",pattern:"hh:mm",width:Jd,formatter:void 0},date:{type:"date",pattern:"YYYY-MM-DD",width:Jd,formatter:void 0},year:{type:"year",pattern:"YYYY",width:Jd,formatter:void 0}};return i&&Gd.test(i.qTimestampFmt)&&(o.minute.pattern+=" tt",o.second.pattern+=" tt"),o.date.pattern=i&&i.qDateFmt?i.qDateFmt:o.date.pattern,Object.keys(o).forEach((e=>{o[e].formatter=r(o[e].pattern),o[e].width=Math.max(o[e].width,n(o[e].formatter(Xd)).width+Kd)})),t.getFormat=e=>o[e],t.all=()=>o,t.getFormatFromTicks=e=>{const t=e.filter((e=>!e.isMinor)),{length:n}=t;if(!n)return o.date;const r=fd(t[0].data.start),i=fd(t[n-1].data.start);return Nd.count(r,i)/n>=1?o.date:Od.count(r,i)/n>0?o.minute:Cd.count(r,i)/n>0?o.second:o.date},t}(r);return c=Wd(o.copy(),r,h),u=dd({qAxis:i,measureText:r.formatter.measureText,reqAutoFitWidth:2*h.getFormat("minute").width,cache:r.cache,scale:m}),m.data=()=>({fields:[{formatter:m.formatter,id:()=>`qHyperCube/${r.field}`,key:()=>r.field,raw:E(n,"fields.0.raw",(()=>({})))}]}),m.formatter=()=>h.getFormatFromTicks(d).formatter,m}}};const nm=e=>e.meta.seriesComponentKeys[0],rm=(e,t)=>{if(t){const n=Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY;t.emit(n>=0?"next":"prev"),e.preventDefault()}};function im({chart:e,models:t,actions:n,viewState:r,viewCache:i,environment:o}){const{event:{onZoom:a}}=tm,{layoutService:s,seriesModel:l}=t,u=nm(l),c=s.meta.isContinuous?a({chart:e,viewState:r,viewCache:i},{rtl:"rtl"===o.options.direction,threshold:50,targetKey:u}):()=>{};return{type:"native",events:{wheel(t){const r={x:t.clientX,y:t.clientY},i=e.componentsFromPoint(r);if(n.interact.enabled()){const[e]=i.filter((e=>e.key===is.COMPONENT.LEGEND_CATEGORICAL));rm(t,e)}if(n.scroll.enabled()){const[e]=i.filter((e=>e.key===u));e&&(c(r,Math.sign(-t.deltaY)),t.preventDefault())}}}}}const om="continuousPinchZoom";function am({chart:e,models:t,environment:n,viewState:r,viewCache:i,actions:o,selectables:a}){const s=tm.interactions.areaPan,{layoutService:l,dockService:u,discreteModel:c,colorService:d,tooltipService:m}=t,h="rtl"===n.options.direction,f=m.getInteractions(),p=function({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l}){return{gestures:[...Ys({componentKey:e,chart:t,actions:n,viewState:r,viewCache:i,layoutService:o,dockService:a,discrete:s,rtl:l})],native:Ws({componentKey:e,chart:t,actions:n,layoutService:o})}}({componentKey:"scrollbar",chart:e,actions:o,viewState:r,viewCache:i,discrete:c,layoutService:l,dockService:u,rtl:h}),y={type:"hammer",enable:!0,gestures:[...d.custom.legendInteractions(),...a.gestures.sort(((e,t)=>(t.prio||0)-(e.prio||0))),...p.gestures,...f.gestures]},g=[im({chart:e,models:t,actions:o,viewState:r,viewCache:i,environment:n}),p.native,f.native];return l.meta.isDiscrete&&(y.gestures.push(...c.interactions.gestures),g.push(c.interactions.native)),l.meta.isContinuous&&y.gestures.push(s({targetKey:nm(t.seriesModel),chart:e,actions:o,viewState:r,viewCache:i}),function({targetKey:e,chart:t,actions:n,viewState:r,viewCache:i,rtl:o}){const a={last:0,diff:0},s=tm.event.onZoom({viewCache:i,viewState:r,chart:t},{threshold:100,rtl:o,targetKey:e});return{type:"Pinch",key:"continuous:pinch-zoom",options:{event:om,pointers:2,threshold:0,enable:(r,i)=>!i||!!n.scroll.enabled()&&t.componentsFromPoint({x:i.center.x,y:i.center.y}).some((t=>t.key===e))},events:{[`${om}start`](e){a.last=e.scale,e.preventDefault()},[`${om}move`](e){const t=e.scale-a.last;Math.abs(t)>.01&&s(e.center,t>0?1:-1),a.last=e.scale,e.preventDefault()}}}}({targetKey:nm(t.seriesModel),chart:e,actions:o,viewState:r,viewCache:i,rtl:h})),[y,...g]}const sm=({key:e,components:t})=>({key:e,type:"brush-lasso",layout:{displayOrder:99},settings:{brush:{components:t},lasso:{fill:"rgba(0, 0, 0, 0)",stroke:"black",strokeWidth:2,opacity:.7,strokeDasharray:[]},snapIndicator:{threshold:75,strokeDasharray:"5, 5",stroke:"black",strokeWidth:2,opacity:.7},startPoint:{r:10,stroke:"rgba(77, 192, 78, 1)",strokeWidth:0,opacity:1}}}),lm="lasso",um=({key:e,componentTargetKey:t,requireFailure:n,recognizeWith:r},i)=>({key:`event:${e}`,type:"Pan",requireFailure:n,recognizeWith:r,options:{event:lm,enable(e,n){if(this.started===lm||!n)return!0;if(!i.actions.select.enabled()||!i.actions.lasso.enabled()||!i.actions.lasso.active())return!1;return this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((e=>e.key===t)).length>0}},events:{lassostart(t){t.preventDefault(),this.started!==lm&&(i.actions.select.emit("start",lm),this.chart.component(e).emit("lassoStart",t),this.started=lm)},lassomove(t){t.preventDefault(),this.chart.component(e).emit("lassoMove",t),"function"==typeof i.updateOnMove&&i.updateOnMove(this.chart)},lassoend(t){t.preventDefault(),this.started=!1,this.chart.component(e).emit("lassoEnd",t),i.actions.select.emit("end",lm),"function"==typeof i.updateOnEnd&&i.updateOnEnd()}}});const cm=({targets:e,requireFailure:t,recognizeWith:n,components:r,eventName:i="tap"},o)=>{let a;const s=o.customTooltipModel?o.customTooltipModel.utils:void 0,l=s?o.debouncer(s.displayTooltip,s.DEBOUNCE_THRESHOLD):void 0;return{key:"event:tap",type:"Tap",requireFailure:t,recognizeWith:n,options:{event:i,interval:10,pointers:1,enable(t,n){return!n||!(!o.actions.select.enabled()&&!o.actions.tooltip.enabled())&&(a=this.chart.componentsFromPoint({x:n.center.x,y:n.center.y}).filter((t=>-1!==e.indexOf(t.key))),a.length>0)}},events:{[i](t){t.preventDefault();const n=function(e,t){const n=t.element.getBoundingClientRect();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}}(t,this.chart),u=o.hitRadius?o.hitRadius(a):0,c=u>0?{cx:n.x,cy:n.y,r:u}:n,d=o.shapesAt?o.shapesAt(c):this.chart.shapesAt(c,{components:e.map((e=>({key:e,propagation:"stop"}))),propagation:"stop"}),m=this.chart.component("tooltip"),h="mouse"!==t.pointerType&&m&&m.show;if(!o.isLocked(a)&&!o.tooltipOnly&&o.actions.select.enabled()){const e=this.chart.componentsFromPoint({x:t.center.x,y:t.center.y}),n=e.some((e=>"legend-cat"===e.type));if(!d.length&&n||(this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1,o.actions.select.emit("start",i,e)),d.length&&r){this.chart.brushSelectionIncludeMax=!1,o.actions.select.brushSelectionIncludeMax=!1;const e="function"==typeof r?r(t,d):r;this.chart.brushFromShapes(d,{components:e}),o.actions.select.emit("end",i),(({largeDataService:e,chart:t})=>{((null==e?void 0:e.meta)||{}).isLargeNumPoints&&t.brush("lazySelection")._state(t.brush("selection")._state())})({largeDataService:o.largeDataService,chart:this.chart})}}if(m&&o.actions.tooltip.enabled())if(d.length){const{customTooltipModel:e}=o;if(null!=e&&e.useCustomTooltip&&s.checkIfPromisesExist({customTooltipModel:e})){const n=s.getNodes(t,this.chart);l(t,m,{nodes:n,opts:o,customTooltipModel:e})}else m.emit("show",t,{nodes:d})}else h&&m.emit("hide")}}}};const dm=({key:e,requireFailure:t,recognizeWith:n,eventName:r="tap"},i)=>({prio:1,key:`event:${e}-tap`,type:"Tap",requireFailure:t,recognizeWith:n,options:{event:`${r}-${e}-tap`,interval:10,pointers:1,enable:(t,n)=>!!n&&(!!i.actions.select.enabled()&&(!(!n.target||"INPUT"!==n.target.nodeName)||!(!n.target||!n.target.hasAttribute("data-other-value"))&&(n.target.getAttribute("data-key")||"").split("-bubble")[0]===e))},events:{[`${r}-${e}-tap`](t){(t.target.getAttribute("data-key")||"").split("-bubble")[0]&&(t.preventDefault(),this.chart.component(e).emit("bubbleStart",t))}}});const mm=({eventName:e,key:t,fillTargets:n=[],requireFailure:r,recognizeWith:i},o,a)=>({key:`event:${t}`,type:"Pan",requireFailure:r,recognizeWith:i,options:{event:e,enable(r,i){if(this.started===e||!i)return!0;if(!o.actions.select.enabled())return!1;const a=this.chart.componentsFromPoint({x:i.center.x,y:i.center.y}).filter((e=>-1!==n.indexOf(e.key))),s=0===a.length&&function(e,t){const{target:n}=e.srcEvent;return!(!n||0!==(n.getAttribute("data-key")||"").indexOf(`${t}-`))}(i,t);return s?(this.started=e,!0):a.length>0}},events:{[`${e}start`](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,o.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),o.actions.select.emit("start",e),this.chart.component(t).emit(`${a}Start`,n),this.started=e},[`${e}move`](e){e.preventDefault(),this.chart.component(t).emit(`${a}Move`,e),"function"==typeof o.updateOnMove&&o.updateOnMove(this.chart)},[`${e}end`](n){void 0===this.chart.brushSelectionIncludeMax&&(this.chart.brushSelectionIncludeMax=!0,o.actions.select.brushSelectionIncludeMax=!0),n.preventDefault(),this.chart.component(t).emit(`${a}End`,n),o.actions.select.emit("end",e),this.started=!1,"function"==typeof o.updateOnEnd&&o.updateOnEnd()}}});function hm(e,t){const n=function(e){const{key:t,targets:n,fillTargets:r,targetSelector:i,targetFillSelector:o,dock:a,scale:s,bubblesPlacement:l="inside",observeBrush:u=!1,multiple:c=!1,toLabel:d,onEdited:m}=e;return{key:t,type:"brush-range",layout:{dock:n.map((e=>`@${e}`)).join(",")},on:m?{bubbleEnd(){m()}}:{},settings:{brush:u?{context:"selection",observe:!0}:"selection",scale:s,multiple:c,direction:"left"===a||"right"===a?"vertical":"horizontal",bubbles:{align:"left"===a||"top"===a?"end":"start",placement:l,label:d},target:{components:r,selector:i,fillSelector:o,fill:"rgba(82,204,82,0.2)"}}}}(e),r=mm(e,t,"range");return{interactions:[e.onEdited?dm(e,t):null,r].filter(Boolean),components:[n]}}const fm=/axis|legend/,pm=e=>e.some((e=>fm.test(e.type)));function ym({actions:e,models:t}){const{seriesModel:n,layoutService:r,colorService:i,flags:o}=t,a=r.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),s={targets:[`${is.COMPONENT.BAR}-${os.AXIS.PRIMARY}`,`${is.COMPONENT.BAR}-${os.AXIS.SECONDARY}`,...n.query.series(os.TYPE.MARKER).map((e=>Fl(is.COMPONENT.MARKER,e))),...n.query.series(os.TYPE.LINE).map((e=>Fl(is.COMPONENT.POINT,e))),is.COMPONENT.AXIS.MAJOR,is.COMPONENT.AXIS_OVERLAY.TIME_INNER,is.COMPONENT.AXIS_OVERLAY.TIME_OUTER,is.COMPONENT.AXIS_OVERLAY.CONTINUOUS,is.COMPONENT.LEGEND_CATEGORICAL],components:(e,t)=>{const[n]=t,{key:r}=n,i={key:r,action:e.srcEvent.ctrlKey||a?"set":"toggle",contexts:["selection"]};return-1===[is.COMPONENT.AXIS.MAJOR,is.COMPONENT.AXIS_OVERLAY.TIME_INNER,is.COMPONENT.AXIS_OVERLAY.TIME_OUTER,is.COMPONENT.AXIS_OVERLAY.CONTINUOUS,is.COMPONENT.LEGEND_CATEGORICAL].indexOf(r)&&(i.data=["selectionDimension"]),[i]}},l={actions:e,isLocked:e=>e.some((e=>"legend-cat"===e.type))?i.isSelectionLocked({isMeasureSelectionLocked:r.meta.isDimensionLocked}):r.meta.isDimensionLocked,hitRadius:e=>pm(e)?0:3,debouncer:A,flags:o};return function(e,t){if(!e.targets)throw new Error("Missing 'targets' property");return{interactions:[cm(e,t)],components:[]}}(s,l)}function gm({actions:e,models:t}){const{layoutService:n,dockService:r,seriesModel:i}=t,{isDiscrete:o,isDimensionLocked:a}=n.meta;if(!o||a)return!1;const s=[...i.meta.seriesComponentKeys,is.COMPONENT.AXIS.MAJOR];return function(e,t){const n=function(e){const{key:t,targets:n,components:r,fillTargets:i,dock:o}=e;return{key:t,type:"brush-area-dir",layout:{dock:n.map((e=>`@${e}`)).join(",")},settings:{multiple:!0,brush:{components:r},direction:"left"===o||"right"===o?"vertical":"horizontal",bubbles:{align:"left"===o||"top"===o?"end":"start",placement:"inside"},target:{components:i,fill:"rgba(82,204,82,0.2)"}}}}(e);return{interactions:[mm(e,t,"area")],components:[n]}}({eventName:"discreteRange",key:"discrete-range-brush",components:[{key:s[0],contexts:["selection"],action:"set",data:["selectionDimension"]}],targets:s,fillTargets:[is.COMPONENT.AXIS.MAJOR],dock:r.meta.major.dock},{actions:e})}const vm={components:[],interactions:[]};function xm({actions:e,chart:t,models:n,isUnsupportedFeature:r}){const i=function({actions:e,models:t,isUnsupportedFeature:n}){const{dockService:r,seriesModel:i,layoutService:o}=t;return!(o.meta.isDimensionLocked||o.meta.isBarSeriesStacked||null!=n&&n("rangeSelections"))&&hm({eventName:"minorRange",key:"minor-range-brush",targets:[is.COMPONENT.AXIS.MINOR.PRIMARY,`${is.COMPONENT.BAR}-${os.AXIS.PRIMARY}`,...i.query.series(os.TYPE.MARKER).filter((e=>e.isPrimary)).map((e=>Fl(is.COMPONENT.MARKER,e))),...i.query.series(os.TYPE.LINE).filter((e=>e.isPrimary)).map((e=>Fl(is.COMPONENT.POINT,e)))],fillTargets:[is.COMPONENT.AXIS.MINOR.PRIMARY],dock:r.meta.minor.dock,scale:is.SCALE.MINOR.PRIMARY,onEdited(){e.select.emit("end","minorRange")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:r})||vm,o=function({actions:e,models:t,isUnsupportedFeature:n}){const{dockService:r,seriesModel:i,layoutService:o}=t;return!(o.meta.isDimensionLocked||o.meta.isBarSeriesStacked||null!=n&&n("rangeSelections"))&&hm({eventName:"minorRange-secondary",key:"minor-secondary-range-brush",targets:[is.COMPONENT.AXIS.MINOR.SECONDARY,`${is.COMPONENT.BAR}-${os.AXIS.SECONDARY}`,...i.query.series(os.TYPE.MARKER).filter((e=>!e.isPrimary)).map((e=>Fl(is.COMPONENT.MARKER,e))),...i.query.series(os.TYPE.LINE).filter((e=>!e.isPrimary)).map((e=>Fl(is.COMPONENT.POINT,e)))],fillTargets:[is.COMPONENT.AXIS.MINOR.SECONDARY],dock:r.meta.minorSecondary.dock,scale:is.SCALE.MINOR.SECONDARY,onEdited(){e.select.emit("end","minorRange-secondary")}},{actions:e})}({actions:e,models:n,isUnsupportedFeature:r})||vm,a=gm({actions:e,models:n})||vm,s=function({actions:e,chart:t,models:n}){const{layoutService:r,dockService:i,seriesModel:o}=n,{isContinuous:a,isTime:s}=r.meta;if(!a)return!1;const l=s?[is.COMPONENT.AXIS_OVERLAY.TIME_INNER,is.COMPONENT.AXIS_OVERLAY.TIME_OUTER]:[is.COMPONENT.AXIS_OVERLAY.CONTINUOUS];return hm({eventName:"continuousRange",key:"continuous-range-brush",targets:[`${is.COMPONENT.BAR}-${os.AXIS.PRIMARY}`,`${is.COMPONENT.BAR}-${os.AXIS.SECONDARY}`,...o.query.series(os.TYPE.MARKER).map((e=>Fl(is.COMPONENT.MARKER,e))),...o.query.series(os.TYPE.LINE).map((e=>Fl(is.COMPONENT.POINT,e))),...l],fillTargets:l,dock:i.meta.major.dock,scale:s?is.SCALE.MAJOR_INNER:is.SCALE.MAJOR,observeBrush:!0,multiple:!0,toLabel({datum:e,data:n,scale:r}){const i=s?r.formatter():t.formatter(is.FORMATTER.PRIMARY),o=t.scale(is.SCALE.MAJOR).max(),a=t.brushSelectionIncludeMax&&e===o;return`${e!==Math.max(...n)||a?"":"<"}${i(e)}`}},{actions:e})}({actions:e,chart:t,models:n})||vm,l=function({actions:e,models:t}){const{colorService:n,layoutService:r}=t,[i]=n.custom.legendComponents(),o=n.custom.wrappedScales(),{isDimensionLocked:a}=r.meta;if(a||!i)return!1;const s=`${is.SCALE.COLOR}Range`,{type:l,key:u}=i,c=o[s];return!("legend-seq"!==l||!c||c.min>=c.max)&&hm({eventName:"legendRange",key:"legend-range-brush",targets:[u],fillTargets:[u],targetSelector:'[id="legend-seq-target"]',targetFillSelector:'[id="legend-seq-ticks"]',dock:i.layout.dock,scale:s,bubblesPlacement:"outside",onEdited:()=>{e.select.emit("end","legendRange")}},{actions:e})}({actions:e,models:n})||vm;return{components:[...i.components,...o.components,...a.components,...s.components,...l.components],interactions:[...i.interactions,...o.interactions,...a.interactions,...s.interactions,...l.interactions]}}function bm({actions:e,models:t}){const{layoutService:n,seriesModel:r}=t,{seriesComponentKeys:i}=r.meta;if(n.meta.isDimensionLocked)return{components:[],interactions:[]};const o={key:"lasso",componentTargetKey:i[0],components:i.map((e=>({key:e,action:"add",contexts:["selection"],data:["selectionDimension"]})))};return function(e,t){if(!e.componentTargetKey)throw new Error("Missing 'componentTargetKey' property");const n={key:"lasso",...e},r=sm(n);return{interactions:[um(n,t)],components:[r]}}(o,{actions:e})}function Sm({picasso:e,chart:t,models:n,environment:r,viewState:i,viewCache:o,actions:a,isUnsupportedFeature:s}){const{colorService:l,pluginService:u}=n,c=n.layoutService.getLayout(),{options:d}=r,m=function({layout:e,options:t={}}){return!(null==e||!e.snapshotData||t.freeResize)&&{width:e.snapshotData.content.size.w,height:e.snapshotData.content.size.h}}({layout:c,options:d}),h=function(e,t){return{layoutModes:ue.getLayoutModes(),center:void 0!==t.minCenterRatio?{minWidthRatio:t.minCenterRatio,minHeightRatio:t.minCenterRatio}:void 0,logicalSize:t.logicalSize?{align:.5,preserveAspectRatio:!0,...t.logicalSize}:void 0}}(0,{logicalSize:m,minCenterRatio:0}),f=function({chart:e,models:t,environment:n,viewState:r,viewCache:i,actions:o}){var a;const{colorService:s,layoutService:l,dockService:u,tooltipService:c}=t,d=vc({environment:n,models:t});return"center"===(null==d||null===(a=d.layout)||void 0===a?void 0:a.dock)?[d]:[...ic({models:t}),...Rl({models:t}),...Qu({chart:e,models:t,environment:n,viewState:r,viewCache:i}),Sc({models:t,environment:n}),...Dl({models:t,environment:n}),...lc({models:t,environment:n,actions:o}),Yo({viewState:r,viewCache:i,layoutService:l,dockService:u}),...fc({models:t}),...pc({chart:e,models:t,environment:n}),uc({models:t,environment:n,viewState:r,viewCache:i}),...s.custom.legendComponents(),xc(t),...hc({chart:e,models:t,viewState:r,viewCache:i,environment:n}),...c.getComponents(),d].filter(Boolean)}({chart:t,models:n,environment:r,viewState:i,viewCache:o,actions:a}),p=function({actions:e,chart:t,models:n,isUnsupportedFeature:r}){const{layoutService:i}=n,o=i.getHyperCubeValue("qDimensionInfo.0.qIsOneAndOnlyOne",!1),a=ym({actions:e,models:n});if(o)return{components:[...a.components],gestures:[...a.interactions]};const s=xm({actions:e,chart:t,models:n,isUnsupportedFeature:r}),l=bm({actions:e,models:n});return{components:[...a.components,...s.components,...l.components],gestures:[...a.interactions,...s.interactions,...l.interactions]}}({actions:a,chart:t,models:n,isUnsupportedFeature:s}),y=u.extendComponents([...f,...p.components]);return{collections:pl({models:n}),scales:Tl({picasso:e,models:n,viewState:i,viewCache:o,environment:r}),components:y,formatters:Ec({models:n}),interactions:am({chart:t,models:n,environment:r,viewState:i,viewCache:o,actions:a,selectables:p}),strategy:h,palettes:l.getPalettes()}}const Em=({picasso:e,chart:t,models:n,environment:r,viewState:a,viewCache:s,actions:l,isUnsupportedFeature:u})=>{const{width:c,height:d}=i(),[,m]=o((async()=>{if(!(null!=t&&t.update&&n&&r&&a))return;const{colorService:i,discreteModel:o,dockService:m,layoutService:h,refLineModel:f}=n;function p(){t.update({settings:Sm({picasso:e,chart:t,models:n,environment:r,viewState:a,viewCache:s,actions:l,isUnsupportedFeature:u})})}m.update({width:c,height:d}),i.custom.updateLegend(),f.update({picasso:e,chart:t,models:n,environment:r,viewState:a,viewCache:s,actions:l});const y=h.getDataPages();h.setDataPages([]),p(),h.setDataPages(y),h.meta.isContinuous||await o.command.initialize(),p()}),[c,d]);if(m)throw m},Mm=({models:{layoutService:e,fieldModel:t,appLayoutModel:n}})=>({type:"q",key:is.DATA.MAIN,data:e.getHyperCube(),config:{virtualFields:t.virtuals,localeInfo:n.qLocaleInfo}}),Cm=({models:{layoutService:e,fieldModel:t,continuousModel:n,appLayoutModel:r}})=>e.meta.isContinuous?[{type:"q",key:is.DATA.REDUCED,data:n.getInitialCube(),config:{virtualFields:t.virtuals,localeInfo:r.qLocaleInfo}}]:[],Am=[is.COMPONENT.AXIS_TITLE.MAJOR,is.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,is.COMPONENT.AXIS_TITLE.MINOR.SECONDARY,is.COMPONENT.GRID_LINE,is.COMPONENT.ZERO_LINE],Om=({picasso:e,chart:t,models:n,environment:i,viewState:a,viewCache:s,actions:l})=>{(({chart:e,models:t,viewState:n,viewCache:i})=>{const{event:{onZoomIntercept:o,onZoomChange:a}}=tm;r((()=>{if(!t||!n||!i)return;const{layoutService:r,continuousModel:s,refLineModel:l,seriesModel:u}=t,{miniComponentKeys:c}=u.meta,d=()=>{l&&l.update(),e.update({partialData:!0,excludeFromUpdate:[...Am,...c]})};n.onChanged("scrollOffset",d),r.meta.isContinuous&&(n.onChanged("zoom",a({layoutService:r,continuousDataModel:s},d)),n.intercept("zoom",o({viewCache:i})))}),[t,n,i])})({chart:t,models:n,viewState:a,viewCache:s}),(({picasso:e,chart:t,models:n,environment:r,viewState:i,viewCache:a,actions:s})=>{const[,l]=o((async()=>{if(null==t||!t.update||!n||!r)return;const{layoutService:o,colorService:l,discreteModel:u}=n;function c(o=!1){t.update({settings:Sm({picasso:e,chart:t,models:n,environment:r,viewState:i,viewCache:a,actions:s}),data:o&&[Mm({models:n}),...Cm({models:n}),...l.getData()]})}const d=o.getDataPages();o.setDataPages([]),c(!0),o.setDataPages(d),o.meta.isContinuous||await u.command.initialize(),c(!1)}),[null==t?void 0:t.update,n,r]);if(l)throw l})({picasso:e,chart:t,models:n,environment:i,viewState:a,viewCache:s,actions:l})},Tm={click:"Tap",Click:"Tap",tap:"Tap",pan:"Pan",swipe:"Swipe",rotate:"Rotate",press:"Press",pinch:"Pinch"};function Nm(e){return Tm[e]||e}function wm(e){return function(t,n,r){let i,o,a,s,l=[],u=!0;function c(){"function"==typeof i.enable&&(i.enable=i.enable.bind(o)()),i.enable&&(i.gestures.forEach((t=>{t.options=t.options||{},void 0===t.options.enable&&(t.options.enable=!0),"function"==typeof t.options.enable&&(t.options.enable=t.options.enable.bind(o));const n=Nm(t.type);e&&e[n]&&(t.options.event=t.options.event||t.type.toLowerCase(),a=a||new e.Manager(r),a.add(new e[n](t.options)),Object.keys(t.events).forEach((e=>{t.events[e]=t.events[e].bind(o),a.on(e,t.events[e])})),l.push(t))})),i.gestures.forEach((t=>{const n=Nm(t.type);e&&e[n]&&(t.recognizeWith&&a.get(t.options.event).recognizeWith(t.recognizeWith.split(" ").filter((e=>""!==e))),t.requireFailure&&a.get(t.options.event).requireFailure(t.requireFailure.split(" ").filter((e=>""!==e))))})))}function d(){l.forEach((e=>{Object.keys(e.events).forEach((t=>{a.off(t,e.events[t])})),a.remove(e.options.event)})),l=[]}return{get key(){return s},set(e){!function(e){s=e.key,i=e,o={chart:t,mediator:n,settings:i},i.gestures=i.gestures||[],void 0===i.enable&&(i.enable=!0)}(e),d(),u&&c()},off(){u=!1,d()},on(){u=!0,0===l.length&&c()},destroy(){d(),a&&a.destroy(),a=null,o=null,i=null}}}}function Rm(){return Rm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rm.apply(this,arguments)}var Im={exports:{}};function km(){}function Lm(){}Lm.resetWarningCache=km;Im.exports=function(){function e(e,t,n,r,i,o){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==o){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Lm,resetWarningCache:km};return n.PropTypes=n,n}();var Pm=W(Im.exports),qm={black:"#000",white:"#fff"},Dm={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},$m={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},zm={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},_m={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Hm={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Bm={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Fm={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"};function jm(){return jm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jm.apply(this,arguments)}function Vm(e){return Vm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vm(e)}function Um(e){return e&&"object"===Vm(e)&&e.constructor===Object}function Ym(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},r=n.clone?jm({},e):e;return Um(e)&&Um(t)&&Object.keys(t).forEach((function(i){"__proto__"!==i&&(Um(t[i])&&i in e?r[i]=Ym(e[i],t[i],n):r[i]=t[i])})),r}function Wm(e){var t=function(e,t){if("object"!==Vm(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Vm(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Vm(t)?t:String(t)}function Xm(e,t,n){return(t=Wm(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gm(e){for(var t="https://mui.com/production-error/?code="+e,n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified Material-UI error #"+e+"; visit "+t+" for the full message."}function Km(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function Jm(e){if(e.type)return e;if("#"===e.charAt(0))return Jm(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(Gm(3,e));var r=e.substring(t+1,e.length-1).split(",");return{type:n,values:r=r.map((function(e){return parseFloat(e)}))}}function Zm(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function Qm(e){var t="hsl"===(e=Jm(e)).type?Jm(function(e){var t=(e=Jm(e)).values,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return i-o*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),Zm({type:s,values:l})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function eh(e,t){return e=Jm(e),t=Km(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,Zm(e)}function th(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function nh(e,t){if(null==e)return{};var n,r,i=th(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var rh=["xs","sm","md","lg","xl"];function ih(e,t,n){var r;return jm({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return console.warn(["Material-UI: theme.mixins.gutters() is deprecated.","You can use the source of the mixin directly:","\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3),\n },\n "].join("\n")),jm({paddingLeft:t(2),paddingRight:t(2)},n,Xm({},e.up("sm"),jm({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(r={minHeight:56},Xm(r,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Xm(r,e.up("sm"),{minHeight:64}),r)},n)}var oh={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:qm.white,default:Fm[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},ah={text:{primary:qm.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:Fm[800],default:"#303030"},action:{active:qm.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function sh(e,t,n,r){var i=r.light||r,o=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=function(e,t){if(e=Jm(e),t=Km(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return Zm(e)}(e.main,i):"dark"===t&&(e.dark=function(e,t){if(e=Jm(e),t=Km(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return Zm(e)}(e.main,o)))}function lh(e){var t=e.primary,n=void 0===t?{light:zm[300],main:zm[500],dark:zm[700]}:t,r=e.secondary,i=void 0===r?{light:$m.A200,main:$m.A400,dark:$m.A700}:r,o=e.error,a=void 0===o?{light:Dm[300],main:Dm[500],dark:Dm[700]}:o,s=e.warning,l=void 0===s?{light:Bm[300],main:Bm[500],dark:Bm[700]}:s,u=e.info,c=void 0===u?{light:_m[300],main:_m[500],dark:_m[700]}:u,d=e.success,m=void 0===d?{light:Hm[300],main:Hm[500],dark:Hm[700]}:d,h=e.type,f=void 0===h?"light":h,p=e.contrastThreshold,y=void 0===p?3:p,g=e.tonalOffset,v=void 0===g?.2:g,x=nh(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function b(e){var t=function(e,t){var n=Qm(e),r=Qm(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,ah.text.primary)>=y?ah.text.primary:oh.text.primary;return t}var S=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=jm({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(Gm(4,t));if("string"!=typeof e.main)throw new Error(Gm(5,JSON.stringify(e.main)));return sh(e,"light",n,v),sh(e,"dark",r,v),e.contrastText||(e.contrastText=b(e.main)),e},E={dark:ah,light:oh};return Ym(jm({common:qm,type:f,primary:S(n),secondary:S(i,"A400","A200","A700"),error:S(a),warning:S(l),info:S(c),success:S(m),grey:Fm,contrastThreshold:y,getContrastText:b,augmentColor:S,tonalOffset:v},E[f]),x)}function uh(e){return Math.round(1e5*e)/1e5}function ch(e){return uh(e)}var dh={textTransform:"uppercase"},mh='"Roboto", "Helvetica", "Arial", sans-serif';function hh(e,t){var n="function"==typeof t?t(e):t,r=n.fontFamily,i=void 0===r?mh:r,o=n.fontSize,a=void 0===o?14:o,s=n.fontWeightLight,l=void 0===s?300:s,u=n.fontWeightRegular,c=void 0===u?400:u,d=n.fontWeightMedium,m=void 0===d?500:d,h=n.fontWeightBold,f=void 0===h?700:h,p=n.htmlFontSize,y=void 0===p?16:p,g=n.allVariants,v=n.pxToRem,x=nh(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]),b=a/14,S=v||function(e){return"".concat(e/y*b,"rem")},E=function(e,t,n,r,o){return jm({fontFamily:i,fontWeight:e,fontSize:S(t),lineHeight:n},i===mh?{letterSpacing:"".concat(uh(r/t),"em")}:{},o,g)},M={h1:E(l,96,1.167,-1.5),h2:E(l,60,1.2,-.5),h3:E(c,48,1.167,0),h4:E(c,34,1.235,.25),h5:E(c,24,1.334,0),h6:E(m,20,1.6,.15),subtitle1:E(c,16,1.75,.15),subtitle2:E(m,14,1.57,.1),body1:E(c,16,1.5,.15),body2:E(c,14,1.43,.15),button:E(m,14,1.75,.4,dh),caption:E(c,12,1.66,.4),overline:E(c,12,2.66,1,dh)};return Ym(jm({htmlFontSize:y,pxToRem:S,round:ch,fontFamily:i,fontSize:a,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:m,fontWeightBold:f},M),x,{clone:!1})}function fh(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var ph=["none",fh(0,2,1,-1,0,1,1,0,0,1,3,0),fh(0,3,1,-2,0,2,2,0,0,1,5,0),fh(0,3,3,-2,0,3,4,0,0,1,8,0),fh(0,2,4,-1,0,4,5,0,0,1,10,0),fh(0,3,5,-1,0,5,8,0,0,1,14,0),fh(0,3,5,-1,0,6,10,0,0,1,18,0),fh(0,4,5,-2,0,7,10,1,0,2,16,1),fh(0,5,5,-3,0,8,10,1,0,3,14,2),fh(0,5,6,-3,0,9,12,1,0,3,16,2),fh(0,6,6,-3,0,10,14,1,0,4,18,3),fh(0,6,7,-4,0,11,15,1,0,4,20,3),fh(0,7,8,-4,0,12,17,2,0,5,22,4),fh(0,7,8,-4,0,13,19,2,0,5,24,4),fh(0,7,9,-4,0,14,21,2,0,5,26,4),fh(0,8,9,-5,0,15,22,2,0,6,28,5),fh(0,8,10,-5,0,16,24,2,0,6,30,5),fh(0,8,11,-5,0,17,26,2,0,6,32,5),fh(0,9,11,-5,0,18,28,2,0,7,34,6),fh(0,9,12,-6,0,19,29,2,0,7,36,6),fh(0,10,13,-6,0,20,31,3,0,8,38,7),fh(0,10,13,-6,0,21,33,3,0,8,40,7),fh(0,10,14,-6,0,22,35,3,0,8,42,7),fh(0,11,14,-7,0,23,36,3,0,9,44,8),fh(0,11,15,-7,0,24,38,3,0,9,46,8)],yh={borderRadius:4};function gh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vh(e,t){if(e){if("string"==typeof e)return gh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gh(e,t):void 0}}function xh(e){return function(e){if(Array.isArray(e))return gh(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||vh(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bh(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||vh(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sh(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=function(e){var t=e.spacing||8;return"number"==typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"==typeof t?t:function(){}}({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return 0===n.length?t(1):1===n.length?t(n[0]):n.map((function(e){if("string"==typeof e)return e;var n=t(e);return"number"==typeof n?"".concat(n,"px"):n})).join(" ")};return Object.defineProperty(n,"unit",{get:function(){return e}}),n.mui=!0,n}var Eh={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Mh={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Ch(e){return"".concat(Math.round(e),"ms")}var Ah={easing:Eh,duration:Mh,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,r=void 0===n?Mh.standard:n,i=t.easing,o=void 0===i?Eh.easeInOut:i,a=t.delay,s=void 0===a?0:a;return nh(t,["duration","easing","delay"]),(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"==typeof r?r:Ch(r)," ").concat(o," ").concat("string"==typeof s?s:Ch(s))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}},Oh={mobileStepper:1e3,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Th(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,i=void 0===r?{}:r,o=e.palette,a=void 0===o?{}:o,s=e.spacing,l=e.typography,u=void 0===l?{}:l,c=nh(e,["breakpoints","mixins","palette","spacing","typography"]),d=lh(a),m=function(e){var t=e.values,n=void 0===t?{xs:0,sm:600,md:960,lg:1280,xl:1920}:t,r=e.unit,i=void 0===r?"px":r,o=e.step,a=void 0===o?5:o,s=nh(e,["values","unit","step"]);function l(e){var t="number"==typeof n[e]?n[e]:e;return"@media (min-width:".concat(t).concat(i,")")}function u(e,t){var r=rh.indexOf(t);return r===rh.length-1?l(e):"@media (min-width:".concat("number"==typeof n[e]?n[e]:e).concat(i,") and ")+"(max-width:".concat((-1!==r&&"number"==typeof n[rh[r+1]]?n[rh[r+1]]:t)-a/100).concat(i,")")}return jm({keys:rh,values:n,up:l,down:function(e){var t=rh.indexOf(e)+1,r=n[rh[t]];return t===rh.length?l("xs"):"@media (max-width:".concat(("number"==typeof r&&t>0?r:e)-a/100).concat(i,")")},between:u,only:function(e){return u(e,e)},width:function(e){return n[e]}},s)}(n),h=Sh(s),f=Ym({breakpoints:m,direction:"ltr",mixins:ih(m,h,i),overrides:{},palette:d,props:{},shadows:ph,typography:hh(d,u),spacing:h,shape:yh,transitions:Ah,zIndex:Oh},c),p=arguments.length,y=new Array(p>1?p-1:0),g=1;g<p;g++)y[g-1]=arguments[g];return f=y.reduce((function(e,t){return Ym(e,t)}),f)}var Nh="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__",wh=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function Rh(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.disableGlobal,n=void 0!==t&&t,r=e.productionPrefix,i=void 0===r?"jss":r,o=e.seed,a=void 0===o?"":o,s=""===a?"":"".concat(a,"-"),l=0,u=function(){return l+=1};return function(e,t){var r=t.options.name;if(r&&0===r.indexOf("Mui")&&!t.options.link&&!n){if(-1!==wh.indexOf(e.key))return"Mui-".concat(e.key);var o="".concat(s).concat(r,"-").concat(e.key);return t.options.theme[Nh]&&""===a?"".concat(o,"-").concat(u()):o}return"".concat(s).concat(i).concat(u())}}function Ih(e){var t=e.theme,n=e.name,r=e.props;if(!t||!t.props||!t.props[n])return r;var i,o=t.props[n];for(i in o)void 0===r[i]&&(r[i]=o[i]);return r}var kh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lh="object"===("undefined"==typeof window?"undefined":kh(window))&&"object"===("undefined"==typeof document?"undefined":kh(document))&&9===document.nodeType;function Ph(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Wm(r.key),r)}}function qh(e,t,n){return t&&Ph(e.prototype,t),n&&Ph(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Dh(e,t){return Dh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Dh(e,t)}function $h(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Dh(e,t)}function zh(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var _h={}.constructor;function Hh(e){if(null==e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(Hh);if(e.constructor!==_h)return e;var t={};for(var n in e)t[n]=Hh(e[n]);return t}function Bh(e,t,n){void 0===e&&(e="unnamed");var r=n.jss,i=Hh(t),o=r.plugins.onCreateRule(e,i,n);return o||(e[0],null)}var Fh=function(e,t){for(var n="",r=0;r<e.length&&"!important"!==e[r];r++)n&&(n+=t),n+=e[r];return n},jh=function(e){if(!Array.isArray(e))return e;var t="";if(Array.isArray(e[0]))for(var n=0;n<e.length&&"!important"!==e[n];n++)t&&(t+=", "),t+=Fh(e[n]," ");else t=Fh(e,", ");return"!important"===e[e.length-1]&&(t+=" !important"),t};function Vh(e){return e&&!1===e.format?{linebreak:"",space:""}:{linebreak:"\n",space:" "}}function Uh(e,t){for(var n="",r=0;r<t;r++)n+=" ";return n+e}function Yh(e,t,n){void 0===n&&(n={});var r="";if(!t)return r;var i=n.indent,o=void 0===i?0:i,a=t.fallbacks;!1===n.format&&(o=-1/0);var s=Vh(n),l=s.linebreak,u=s.space;if(e&&o++,a)if(Array.isArray(a))for(var c=0;c<a.length;c++){var d=a[c];for(var m in d){var h=d[m];null!=h&&(r&&(r+=l),r+=Uh(m+":"+u+jh(h)+";",o))}}else for(var f in a){var p=a[f];null!=p&&(r&&(r+=l),r+=Uh(f+":"+u+jh(p)+";",o))}for(var y in t){var g=t[y];null!=g&&"fallbacks"!==y&&(r&&(r+=l),r+=Uh(y+":"+u+jh(g)+";",o))}return(r||n.allowEmpty)&&e?(r&&(r=""+l+r+l),Uh(""+e+u+"{"+r,--o)+Uh("}",o)):r}var Wh=/([[\].#*$><+~=|^:(),"'`\s])/g,Xh="undefined"!=typeof CSS&&CSS.escape,Gh=function(e){return Xh?Xh(e):e.replace(Wh,"\\$1")},Kh=function(){function e(e,t,n){this.type="style",this.isProcessed=!1;var r=n.sheet,i=n.Renderer;this.key=e,this.options=n,this.style=t,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return e.prototype.prop=function(e,t,n){if(void 0===t)return this.style[e];var r=!!n&&n.force;if(!r&&this.style[e]===t)return this;var i=t;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(t,e,this));var o=null==i||!1===i,a=e in this.style;if(o&&!a&&!r)return this;var s=o&&a;if(s?delete this.style[e]:this.style[e]=i,this.renderable&&this.renderer)return s?this.renderer.removeProperty(this.renderable,e):this.renderer.setProperty(this.renderable,e,i),this;var l=this.options.sheet;return l&&l.attached,this},e}(),Jh=function(e){function t(t,n,r){var i;i=e.call(this,t,n,r)||this;var o=r.selector,a=r.scoped,s=r.sheet,l=r.generateId;return o?i.selectorText=o:!1!==a&&(i.id=l(zh(zh(i)),s),i.selectorText="."+Gh(i.id)),i}$h(t,e);var n=t.prototype;return n.applyTo=function(e){var t=this.renderer;if(t){var n=this.toJSON();for(var r in n)t.setProperty(e,r,n[r])}return this},n.toJSON=function(){var e={};for(var t in this.style){var n=this.style[t];"object"!=typeof n?e[t]=n:Array.isArray(n)&&(e[t]=jh(n))}return e},n.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?jm({},e,{allowEmpty:!0}):e;return Yh(this.selectorText,this.style,n)},qh(t,[{key:"selector",set:function(e){if(e!==this.selectorText){this.selectorText=e;var t=this.renderer,n=this.renderable;if(n&&t)t.setSelector(n,e)||t.replaceRule(n,this)}},get:function(){return this.selectorText}}]),t}(Kh),Zh={onCreateRule:function(e,t,n){return"@"===e[0]||n.parent&&"keyframes"===n.parent.type?null:new Jh(e,t,n)}},Qh={indent:1,children:!0},ef=/@([\w-]+)/,tf=function(){function e(e,t,n){this.type="conditional",this.isProcessed=!1,this.key=e;var r=e.match(ef);for(var i in this.at=r?r[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new Of(jm({},n,{parent:this})),t)this.rules.add(i,t[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(e){return this.rules.get(e)},t.indexOf=function(e){return this.rules.indexOf(e)},t.addRule=function(e,t,n){var r=this.rules.add(e,t,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},t.replaceRule=function(e,t,n){var r=this.rules.replace(e,t,n);return r&&this.options.jss.plugins.onProcessRule(r),r},t.toString=function(e){void 0===e&&(e=Qh);var t=Vh(e).linebreak;if(null==e.indent&&(e.indent=Qh.indent),null==e.children&&(e.children=Qh.children),!1===e.children)return this.query+" {}";var n=this.rules.toString(e);return n?this.query+" {"+t+n+t+"}":""},e}(),nf=/@container|@media|@supports\s+/,rf={onCreateRule:function(e,t,n){return nf.test(e)?new tf(e,t,n):null}},of={indent:1,children:!0},af=/@keyframes\s+([\w-]+)/,sf=function(){function e(e,t,n){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var r=e.match(af);r&&r[1]?this.name=r[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var i=n.scoped,o=n.sheet,a=n.generateId;for(var s in this.id=!1===i?this.name:Gh(a(this,o)),this.rules=new Of(jm({},n,{parent:this})),t)this.rules.add(s,t[s],jm({},n,{parent:this}));this.rules.process()}return e.prototype.toString=function(e){void 0===e&&(e=of);var t=Vh(e).linebreak;if(null==e.indent&&(e.indent=of.indent),null==e.children&&(e.children=of.children),!1===e.children)return this.at+" "+this.id+" {}";var n=this.rules.toString(e);return n&&(n=""+t+n+t),this.at+" "+this.id+" {"+n+"}"},e}(),lf=/@keyframes\s+/,uf=/\$([\w-]+)/g,cf=function(e,t){return"string"==typeof e?e.replace(uf,(function(e,n){return n in t?t[n]:e})):e},df=function(e,t,n){var r=e[t],i=cf(r,n);i!==r&&(e[t]=i)},mf={onCreateRule:function(e,t,n){return"string"==typeof e&&lf.test(e)?new sf(e,t,n):null},onProcessStyle:function(e,t,n){return"style"===t.type&&n?("animation-name"in e&&df(e,"animation-name",n.keyframes),"animation"in e&&df(e,"animation",n.keyframes),e):e},onChangeValue:function(e,t,n){var r=n.options.sheet;if(!r)return e;switch(t){case"animation":case"animation-name":return cf(e,r.keyframes);default:return e}}},hf=function(e){function t(){return e.apply(this,arguments)||this}return $h(t,e),t.prototype.toString=function(e){var t=this.options.sheet,n=!!t&&t.options.link?jm({},e,{allowEmpty:!0}):e;return Yh(this.key,this.style,n)},t}(Kh),ff={onCreateRule:function(e,t,n){return n.parent&&"keyframes"===n.parent.type?new hf(e,t,n):null}},pf=function(){function e(e,t,n){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){var t=Vh(e).linebreak;if(Array.isArray(this.style)){for(var n="",r=0;r<this.style.length;r++)n+=Yh(this.at,this.style[r]),this.style[r+1]&&(n+=t);return n}return Yh(this.at,this.style,e)},e}(),yf=/@font-face/,gf={onCreateRule:function(e,t,n){return yf.test(e)?new pf(e,t,n):null}},vf=function(){function e(e,t,n){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=e,this.style=t,this.options=n}return e.prototype.toString=function(e){return Yh(this.key,this.style,e)},e}(),xf={onCreateRule:function(e,t,n){return"@viewport"===e||"@-ms-viewport"===e?new vf(e,t,n):null}},bf=function(){function e(e,t,n){this.type="simple",this.isProcessed=!1,this.key=e,this.value=t,this.options=n}return e.prototype.toString=function(e){if(Array.isArray(this.value)){for(var t="",n=0;n<this.value.length;n++)t+=this.key+" "+this.value[n]+";",this.value[n+1]&&(t+="\n");return t}return this.key+" "+this.value+";"},e}(),Sf={"@charset":!0,"@import":!0,"@namespace":!0},Ef={onCreateRule:function(e,t,n){return e in Sf?new bf(e,t,n):null}},Mf=[Zh,rf,mf,ff,gf,xf,Ef],Cf={process:!0},Af={force:!0,process:!0},Of=function(){function e(e){this.map={},this.raw={},this.index=[],this.counter=0,this.options=e,this.classes=e.classes,this.keyframes=e.keyframes}var t=e.prototype;return t.add=function(e,t,n){var r=this.options,i=r.parent,o=r.sheet,a=r.jss,s=r.Renderer,l=r.generateId,u=r.scoped,c=jm({classes:this.classes,parent:i,sheet:o,jss:a,Renderer:s,generateId:l,scoped:u,name:e,keyframes:this.keyframes,selector:void 0},n),d=e;e in this.raw&&(d=e+"-d"+this.counter++),this.raw[d]=t,d in this.classes&&(c.selector="."+Gh(this.classes[d]));var m=Bh(d,t,c);if(!m)return null;this.register(m);var h=void 0===c.index?this.index.length:c.index;return this.index.splice(h,0,m),m},t.replace=function(e,t,n){var r=this.get(e),i=this.index.indexOf(r);r&&this.remove(r);var o=n;return-1!==i&&(o=jm({},n,{index:i})),this.add(e,t,o)},t.get=function(e){return this.map[e]},t.remove=function(e){this.unregister(e),delete this.raw[e.key],this.index.splice(this.index.indexOf(e),1)},t.indexOf=function(e){return this.index.indexOf(e)},t.process=function(){var e=this.options.jss.plugins;this.index.slice(0).forEach(e.onProcessRule,e)},t.register=function(e){this.map[e.key]=e,e instanceof Jh?(this.map[e.selector]=e,e.id&&(this.classes[e.key]=e.id)):e instanceof sf&&this.keyframes&&(this.keyframes[e.name]=e.id)},t.unregister=function(e){delete this.map[e.key],e instanceof Jh?(delete this.map[e.selector],delete this.classes[e.key]):e instanceof sf&&delete this.keyframes[e.name]},t.update=function(){var e,t,n;if("string"==typeof(arguments.length<=0?void 0:arguments[0])?(e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],n=arguments.length<=2?void 0:arguments[2]):(t=arguments.length<=0?void 0:arguments[0],n=arguments.length<=1?void 0:arguments[1],e=null),e)this.updateOne(this.get(e),t,n);else for(var r=0;r<this.index.length;r++)this.updateOne(this.index[r],t,n)},t.updateOne=function(t,n,r){void 0===r&&(r=Cf);var i=this.options,o=i.jss.plugins,a=i.sheet;if(t.rules instanceof e)t.rules.update(n,r);else{var s=t.style;if(o.onUpdate(n,t,a,r),r.process&&s&&s!==t.style){for(var l in o.onProcessStyle(t.style,t,a),t.style){var u=t.style[l];u!==s[l]&&t.prop(l,u,Af)}for(var c in s){var d=t.style[c],m=s[c];null==d&&d!==m&&t.prop(c,null,Af)}}}},t.toString=function(e){for(var t="",n=this.options.sheet,r=!!n&&n.options.link,i=Vh(e).linebreak,o=0;o<this.index.length;o++){var a=this.index[o].toString(e);(a||r)&&(t&&(t+=i),t+=a)}return t},e}(),Tf=function(){function e(e,t){for(var n in this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=jm({},t,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),t.Renderer&&(this.renderer=new t.Renderer(this)),this.rules=new Of(this.options),e)this.rules.add(n,e[n]);this.rules.process()}var t=e.prototype;return t.attach=function(){return this.attached||(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy()),this},t.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},t.addRule=function(e,t,n){var r=this.queue;this.attached&&!r&&(this.queue=[]);var i=this.rules.add(e,t,n);return i?(this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(r?r.push(i):(this.insertRule(i),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0)),i):i:(this.deployed=!1,i)):null},t.replaceRule=function(e,t,n){var r=this.rules.get(e);if(!r)return this.addRule(e,t,n);var i=this.rules.replace(e,t,n);return i&&this.options.jss.plugins.onProcessRule(i),this.attached?this.deployed?(this.renderer&&(i?r.renderable&&this.renderer.replaceRule(r.renderable,i):this.renderer.deleteRule(r)),i):i:(this.deployed=!1,i)},t.insertRule=function(e){this.renderer&&this.renderer.insertRule(e)},t.addRules=function(e,t){var n=[];for(var r in e){var i=this.addRule(r,e[r],t);i&&n.push(i)}return n},t.getRule=function(e){return this.rules.get(e)},t.deleteRule=function(e){var t="object"==typeof e?e:this.rules.get(e);return!(!t||this.attached&&!t.renderable)&&(this.rules.remove(t),!(this.attached&&t.renderable&&this.renderer)||this.renderer.deleteRule(t.renderable))},t.indexOf=function(e){return this.rules.indexOf(e)},t.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},t.update=function(){var e;return(e=this.rules).update.apply(e,arguments),this},t.updateOne=function(e,t,n){return this.rules.updateOne(e,t,n),this},t.toString=function(e){return this.rules.toString(e)},e}(),Nf=function(){function e(){this.plugins={internal:[],external:[]},this.registry={}}var t=e.prototype;return t.onCreateRule=function(e,t,n){for(var r=0;r<this.registry.onCreateRule.length;r++){var i=this.registry.onCreateRule[r](e,t,n);if(i)return i}return null},t.onProcessRule=function(e){if(!e.isProcessed){for(var t=e.options.sheet,n=0;n<this.registry.onProcessRule.length;n++)this.registry.onProcessRule[n](e,t);e.style&&this.onProcessStyle(e.style,e,t),e.isProcessed=!0}},t.onProcessStyle=function(e,t,n){for(var r=0;r<this.registry.onProcessStyle.length;r++)t.style=this.registry.onProcessStyle[r](t.style,t,n)},t.onProcessSheet=function(e){for(var t=0;t<this.registry.onProcessSheet.length;t++)this.registry.onProcessSheet[t](e)},t.onUpdate=function(e,t,n,r){for(var i=0;i<this.registry.onUpdate.length;i++)this.registry.onUpdate[i](e,t,n,r)},t.onChangeValue=function(e,t,n){for(var r=e,i=0;i<this.registry.onChangeValue.length;i++)r=this.registry.onChangeValue[i](r,t,n);return r},t.use=function(e,t){void 0===t&&(t={queue:"external"});var n=this.plugins[t.queue];-1===n.indexOf(e)&&(n.push(e),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce((function(e,t){for(var n in t)n in e&&e[n].push(t[n]);return e}),{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},e}(),wf=function(){function e(){this.registry=[]}var t=e.prototype;return t.add=function(e){var t=this.registry,n=e.options.index;if(-1===t.indexOf(e))if(0===t.length||n>=this.index)t.push(e);else for(var r=0;r<t.length;r++)if(t[r].options.index>n)return void t.splice(r,0,e)},t.reset=function(){this.registry=[]},t.remove=function(e){var t=this.registry.indexOf(e);this.registry.splice(t,1)},t.toString=function(e){for(var t=void 0===e?{}:e,n=t.attached,r=th(t,["attached"]),i=Vh(r).linebreak,o="",a=0;a<this.registry.length;a++){var s=this.registry[a];null!=n&&s.attached!==n||(o&&(o+=i),o+=s.toString(r))}return o},qh(e,[{key:"index",get:function(){return 0===this.registry.length?0:this.registry[this.registry.length-1].options.index}}]),e}(),Rf=new wf,If="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:Function("return this")(),kf="2f1acc6c3a606b082e5eef5e54414ffb";null==If[kf]&&(If[kf]=0);var Lf=If[kf]++,Pf=function(e){void 0===e&&(e={});var t=0;return function(n,r){t+=1;var i="",o="";return r&&(r.options.classNamePrefix&&(o=r.options.classNamePrefix),null!=r.options.jss.id&&(i=String(r.options.jss.id))),e.minify?""+(o||"c")+Lf+i+t:o+n.key+"-"+Lf+(i?"-"+i:"")+"-"+t}},qf=function(e){var t;return function(){return t||(t=e()),t}},Df=function(e,t){try{return e.attributeStyleMap?e.attributeStyleMap.get(t):e.style.getPropertyValue(t)}catch(e){return""}},$f=function(e,t,n){try{var r=n;if(Array.isArray(n)&&(r=jh(n)),e.attributeStyleMap)e.attributeStyleMap.set(t,r);else{var i=r?r.indexOf("!important"):-1,o=i>-1?r.substr(0,i-1):r;e.style.setProperty(t,o,i>-1?"important":"")}}catch(e){return!1}return!0},zf=function(e,t){try{e.attributeStyleMap?e.attributeStyleMap.delete(t):e.style.removeProperty(t)}catch(e){}},_f=function(e,t){return e.selectorText=t,e.selectorText===t},Hf=qf((function(){return document.querySelector("head")}));function Bf(e){var t=Rf.registry;if(t.length>0){var n=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.attached&&r.options.index>t.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&"string"==typeof r){var i=function(e){for(var t=Hf(),n=0;n<t.childNodes.length;n++){var r=t.childNodes[n];if(8===r.nodeType&&r.nodeValue.trim()===e)return r}return null}(r);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}var Ff=qf((function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null})),jf=function(e,t,n){try{"insertRule"in e?e.insertRule(t,n):"appendRule"in e&&e.appendRule(t)}catch(e){return!1}return e.cssRules[n]},Vf=function(e,t){var n=e.cssRules.length;return void 0===t||t>n?n:t},Uf=function(){function e(e){this.getPropertyValue=Df,this.setProperty=$f,this.removeProperty=zf,this.setSelector=_f,this.hasInsertedRules=!1,this.cssRules=[],e&&Rf.add(e),this.sheet=e;var t=this.sheet?this.sheet.options:{},n=t.media,r=t.meta,i=t.element;this.element=i||function(){var e=document.createElement("style");return e.textContent="\n",e}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var o=Ff();o&&this.element.setAttribute("nonce",o)}var t=e.prototype;return t.attach=function(){if(!this.element.parentNode&&this.sheet){!function(e,t){var n=t.insertionPoint,r=Bf(t);if(!1!==r&&r.parent)r.parent.insertBefore(e,r.node);else if(n&&"number"==typeof n.nodeType){var i=n,o=i.parentNode;o&&o.insertBefore(e,i.nextSibling)}else Hf().appendChild(e)}(this.element,this.sheet.options);var e=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&e&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var e=this.element.parentNode;e&&e.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},t.deploy=function(){var e=this.sheet;e&&(e.options.link?this.insertRules(e.rules):this.element.textContent="\n"+e.toString()+"\n")},t.insertRules=function(e,t){for(var n=0;n<e.index.length;n++)this.insertRule(e.index[n],n,t)},t.insertRule=function(e,t,n){if(void 0===n&&(n=this.element.sheet),e.rules){var r=e,i=n;if("conditional"===e.type||"keyframes"===e.type){var o=Vf(n,t);if(!1===(i=jf(n,r.toString({children:!1}),o)))return!1;this.refCssRule(e,o,i)}return this.insertRules(r.rules,i),i}var a=e.toString();if(!a)return!1;var s=Vf(n,t),l=jf(n,a,s);return!1!==l&&(this.hasInsertedRules=!0,this.refCssRule(e,s,l),l)},t.refCssRule=function(e,t,n){e.renderable=n,e.options.parent instanceof Tf&&this.cssRules.splice(t,0,n)},t.deleteRule=function(e){var t=this.element.sheet,n=this.indexOf(e);return-1!==n&&(t.deleteRule(n),this.cssRules.splice(n,1),!0)},t.indexOf=function(e){return this.cssRules.indexOf(e)},t.replaceRule=function(e,t){var n=this.indexOf(e);return-1!==n&&(this.element.sheet.deleteRule(n),this.cssRules.splice(n,1),this.insertRule(t,n))},t.getRules=function(){return this.element.sheet.cssRules},e}(),Yf=0,Wf=function(){function e(e){this.id=Yf++,this.version="10.10.0",this.plugins=new Nf,this.options={id:{minify:!1},createGenerateId:Pf,Renderer:Lh?Uf:null,plugins:[]},this.generateId=Pf({minify:!1});for(var t=0;t<Mf.length;t++)this.plugins.use(Mf[t],{queue:"internal"});this.setup(e)}var t=e.prototype;return t.setup=function(e){return void 0===e&&(e={}),e.createGenerateId&&(this.options.createGenerateId=e.createGenerateId),e.id&&(this.options.id=jm({},this.options.id,e.id)),(e.createGenerateId||e.id)&&(this.generateId=this.options.createGenerateId(this.options.id)),null!=e.insertionPoint&&(this.options.insertionPoint=e.insertionPoint),"Renderer"in e&&(this.options.Renderer=e.Renderer),e.plugins&&this.use.apply(this,e.plugins),this},t.createStyleSheet=function(e,t){void 0===t&&(t={});var n=t.index;"number"!=typeof n&&(n=0===Rf.index?0:Rf.index+1);var r=new Tf(e,jm({},t,{jss:this,generateId:t.generateId||this.generateId,insertionPoint:this.options.insertionPoint,Renderer:this.options.Renderer,index:n}));return this.plugins.onProcessSheet(r),r},t.removeStyleSheet=function(e){return e.detach(),Rf.remove(e),this},t.createRule=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n={}),"object"==typeof e)return this.createRule(void 0,e,t);var r=jm({},n,{name:e,jss:this,Renderer:this.options.Renderer});r.generateId||(r.generateId=this.generateId),r.classes||(r.classes={}),r.keyframes||(r.keyframes={});var i=Bh(e,t,r);return i&&this.plugins.onProcessRule(i),i},t.use=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){e.plugins.use(t)})),this},e}(),Xf=function(e){return new Wf(e)},Gf="object"==typeof CSS&&null!=CSS&&"number"in CSS;function Kf(e){var t=null;for(var n in e){var r=e[n],i=typeof r;if("function"===i)t||(t={}),t[n]=r;else if("object"===i&&null!==r&&!Array.isArray(r)){var o=Kf(r);o&&(t||(t={}),t[n]=o)}}return t}
|
|
17
8
|
/**
|
|
18
9
|
* A better abstraction over CSS.
|
|
19
10
|
*
|
|
20
11
|
* @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
|
|
21
12
|
* @website https://github.com/cssinjs/jss
|
|
22
13
|
* @license MIT
|
|
23
|
-
*/var rh="undefined"!=typeof CSS&&CSS&&"number"in CSS,oh=function(e){return new th(e)};oh();var ih=Date.now(),ah="fnValues"+ih,sh="fnStyle"+ ++ih;var lh="@global",ch="@global ",uh=function(){function e(e,t,n){for(var r in this.type="global",this.at=lh,this.rules=void 0,this.options=void 0,this.key=void 0,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new qf(Up({},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 this.options.jss.plugins.onProcessRule(r),r},t.indexOf=function(e){return this.rules.indexOf(e)},t.toString=function(){return this.rules.toString()},e}(),dh=function(){function e(e,t,n){this.type="global",this.at=lh,this.options=void 0,this.rule=void 0,this.isProcessed=!1,this.key=void 0,this.key=e,this.options=n;var r=e.substr(ch.length);this.rule=n.jss.createRule(r,t,Up({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),ph=/\s*,\s*/g;function mh(e,t){for(var n=e.split(ph),r="",o=0;o<n.length;o++)r+=t+" "+n[o].trim(),n[o+1]&&(r+=", ");return r}function fh(){return{onCreateRule:function(e,t,n){if(!e)return null;if(e===lh)return new uh(e,t,n);if("@"===e[0]&&e.substr(0,ch.length)===ch)return new dh(e,t,n);var r=n.parent;return r&&("global"===r.type||r.options.parent&&"global"===r.options.parent.type)&&(n.scoped=!1),!1===n.scoped&&(n.selector=e),null},onProcessRule:function(e){"style"===e.type&&(function(e){var t=e.options,n=e.style,r=n?n[lh]:null;if(r){for(var o in r)t.sheet.addRule(o,r[o],Up({},t,{selector:mh(o,e.selector)}));delete n[lh]}}(e),function(e){var t=e.options,n=e.style;for(var r in n)if("@"===r[0]&&r.substr(0,lh.length)===lh){var o=mh(r.substr(lh.length),e.selector);t.sheet.addRule(o,n[r],Up({},t,{selector:o})),delete n[r]}}(e))}}}var hh=/\s*,\s*/g,gh=/&/g,vh=/\$([\w-]+)/g;function yh(){function e(e,t){return function(n,r){var o=e.getRule(r)||t&&t.getRule(r);return o?(o=o).selector:r}}function t(e,t){for(var n=t.split(hh),r=e.split(hh),o="",i=0;i<n.length;i++)for(var a=n[i],s=0;s<r.length;s++){var l=r[s];o&&(o+=", "),o+=-1!==l.indexOf("&")?l.replace(gh,a):a+" "+l}return o}function n(e,t,n){if(n)return Up({},n,{index:n.index+1});var r=e.options.nestingLevel;return r=void 0===r?1:r+1,Up({},e.options,{nestingLevel:r,index:t.indexOf(e)+1})}return{onProcessStyle:function(r,o,i){if("style"!==o.type)return r;var a,s,l=o,c=l.options.parent;for(var u in r){var d=-1!==u.indexOf("&"),p="@"===u[0];if(d||p){if(a=n(l,c,a),d){var m=t(u,l.selector);s||(s=e(c,i)),m=m.replace(vh,s),c.addRule(m,r[u],Up({},a,{selector:m}))}else p&&c.addRule(u,{},a).addRule(l.key,r[u],{selector:l.selector});delete r[u]}}return r}}}var bh=/[A-Z]/g,xh=/^ms-/,Sh={};function Eh(e){return"-"+e.toLowerCase()}function Mh(e){if(Sh.hasOwnProperty(e))return Sh[e];var t=e.replace(bh,Eh);return Sh[e]=xh.test(t)?"-"+t:t}function Ch(e){var t={};for(var n in e){t[0===n.indexOf("--")?n:Mh(n)]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(Ch):t.fallbacks=Ch(e.fallbacks)),t}var wh=rh&&CSS?CSS.px:"px",kh=rh&&CSS?CSS.ms:"ms",Nh=rh&&CSS?CSS.percent:"%";function Th(e){var t=/(-[a-z])/g,n=function(e){return e[1].toUpperCase()},r={};for(var o in e)r[o]=e[o],r[o.replace(t,n)]=e[o];return r}var Oh=Th({"animation-delay":kh,"animation-duration":kh,"background-position":wh,"background-position-x":wh,"background-position-y":wh,"background-size":wh,border:wh,"border-bottom":wh,"border-bottom-left-radius":wh,"border-bottom-right-radius":wh,"border-bottom-width":wh,"border-left":wh,"border-left-width":wh,"border-radius":wh,"border-right":wh,"border-right-width":wh,"border-top":wh,"border-top-left-radius":wh,"border-top-right-radius":wh,"border-top-width":wh,"border-width":wh,margin:wh,"margin-bottom":wh,"margin-left":wh,"margin-right":wh,"margin-top":wh,padding:wh,"padding-bottom":wh,"padding-left":wh,"padding-right":wh,"padding-top":wh,"mask-position-x":wh,"mask-position-y":wh,"mask-size":wh,height:wh,width:wh,"min-height":wh,"max-height":wh,"min-width":wh,"max-width":wh,bottom:wh,left:wh,top:wh,right:wh,"box-shadow":wh,"text-shadow":wh,"column-gap":wh,"column-rule":wh,"column-rule-width":wh,"column-width":wh,"font-size":wh,"font-size-delta":wh,"letter-spacing":wh,"text-indent":wh,"text-stroke":wh,"text-stroke-width":wh,"word-spacing":wh,motion:wh,"motion-offset":wh,outline:wh,"outline-offset":wh,"outline-width":wh,perspective:wh,"perspective-origin-x":Nh,"perspective-origin-y":Nh,"transform-origin":Nh,"transform-origin-x":Nh,"transform-origin-y":Nh,"transform-origin-z":Nh,"transition-delay":kh,"transition-duration":kh,"vertical-align":wh,"flex-basis":wh,"shape-margin":wh,size:wh,grid:wh,"grid-gap":wh,"grid-row-gap":wh,"grid-column-gap":wh,"grid-template-rows":wh,"grid-template-columns":wh,"grid-auto-rows":wh,"grid-auto-columns":wh,"box-shadow-x":wh,"box-shadow-y":wh,"box-shadow-blur":wh,"box-shadow-spread":wh,"font-line-height":wh,"text-shadow-x":wh,"text-shadow-y":wh,"text-shadow-blur":wh});function Rh(e,t,n){if(!t)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=Rh(e,t[r],n);else if("object"==typeof t)if("fallbacks"===e)for(var o in t)t[o]=Rh(o,t[o],n);else for(var i in t)t[i]=Rh(e+"-"+i,t[i],n);else if("number"==typeof t)return n[e]?""+t+n[e]:Oh[e]?"function"==typeof Oh[e]?Oh[e](t).toString():""+t+Oh[e]:t.toString();return t}function Ah(e){void 0===e&&(e={});var t=Th(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=Rh(r,e[r],t);return e},onChangeValue:function(e,n){return Rh(n,e,t)}}}function Lh(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function Ih(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||Lh(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var Ph="",Dh="",qh="",zh=Ym&&"ontouchstart"in document.documentElement;if(Ym){var $h={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},Bh=document.createElement("p").style;for(var Fh in $h)if(Fh+"Transform"in Bh){Ph=Fh,Dh=$h[Fh];break}"Webkit"===Ph&&"msHyphens"in Bh&&(Ph="ms",Dh=$h.ms,"edge"),"Webkit"===Ph&&"-apple-trailing-word"in Bh&&(qh="apple")}var Hh=Ph,jh=Dh,Vh=qh,Wh=zh;var _h={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===Hh?"-webkit-"+e:jh+e)}},Uh={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===Hh?jh+"print-"+e:e)}},Yh=/[-\s]+(.)?/g;function Gh(e,t){return t?t.toUpperCase():""}function Kh(e){return e.replace(Yh,Gh)}function Xh(e){return Kh("-"+e)}var Jh,Zh={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===Hh){var n="mask-image";if(Kh(n)in t)return e;if(Hh+Xh(n)in t)return jh+e}return e}},Qh={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==Vh||Wh?e:jh+e)}},eg={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:jh+e)}},tg={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:jh+e)}},ng={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===Hh||"ms"===Hh?jh+e:e)}},rg={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===Hh||"ms"===Hh||"apple"===Vh?jh+e:e)}},og={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===Hh?"WebkitColumn"+Xh(e)in t&&jh+"column-"+e:"Moz"===Hh&&("page"+Xh(e)in t&&"page-"+e))}},ig={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===Hh)return e;var n=e.replace("-inline","");return Hh+Xh(n)in t&&jh+n}},ag={supportedProperty:function(e,t){return Kh(e)in t&&e}},sg={supportedProperty:function(e,t){var n=Xh(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:Hh+n in t?jh+e:"Webkit"!==Hh&&"Webkit"+n in t&&"-webkit-"+e}},lg={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===Hh?""+jh+e:e)}},cg={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===Hh?jh+"scroll-chaining":e)}},ug={"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"},dg={supportedProperty:function(e,t){var n=ug[e];return!!n&&(Hh+Xh(n)in t&&jh+n)}},pg={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"},mg=Object.keys(pg),fg=function(e){return jh+e},hg=[_h,Uh,Zh,Qh,eg,tg,ng,rg,og,ig,ag,sg,lg,cg,dg,{supportedProperty:function(e,t,n){var r=n.multiple;if(mg.indexOf(e)>-1){var o=pg[e];if(!Array.isArray(o))return Hh+Xh(o)in t&&jh+o;if(!r)return!1;for(var i=0;i<o.length;i++)if(!(Hh+Xh(o[0])in t))return!1;return o.map(fg)}return!1}}],gg=hg.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),vg=hg.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,Ih(t.noPrefill)),e}),[]),yg={};if(Ym){Jh=document.createElement("p");var bg=window.getComputedStyle(document.documentElement,"");for(var xg in bg)isNaN(xg)||(yg[bg[xg]]=bg[xg]);vg.forEach((function(e){return delete yg[e]}))}function Sg(e,t){if(void 0===t&&(t={}),!Jh)return e;if(null!=yg[e])return yg[e];"transition"!==e&&"transform"!==e||(t[e]=e in Jh.style);for(var n=0;n<gg.length&&(yg[e]=gg[n](e,Jh.style,t),!yg[e]);n++);try{Jh.style[e]=""}catch(e){return!1}return yg[e]}var Eg,Mg={},Cg={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},wg=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function kg(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var r=t?Sg(t):", "+Sg(n);return r||(t||n)}function Ng(e,t){var n=t;if(!Eg||"content"===e)return t;if("string"!=typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=Mg[r])return Mg[r];try{Eg.style[e]=n}catch(e){return Mg[r]=!1,!1}if(Cg[e])n=n.replace(wg,kg);else if(""===Eg.style[e]&&("-ms-flex"===(n=jh+n)&&(Eg.style[e]="-ms-flexbox"),Eg.style[e]=n,""===Eg.style[e]))return Mg[r]=!1,!1;return Eg.style[e]="",Mg[r]=n,Mg[r]}function Tg(){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 o=!1,i=Sg(n);i&&i!==n&&(o=!0);var a=!1,s=Ng(i,nf(r));s&&s!==r&&(a=!0),(o||a)&&(o&&delete t[n],t[i||n]=s||r)}}return t}return{onProcessRule:function(e){if("keyframes"===e.type){var t=e;t.at=function(e){return"-"===e[1]||"ms"===Hh?e:"@"+jh+"keyframes"+e.substr(10)}(t.at)}},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return Ng(t,nf(e))||e}}}function Og(){var e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length};return{onProcessStyle:function(t,n){if("style"!==n.type)return t;for(var r={},o=Object.keys(t).sort(e),i=0;i<o.length;i++)r[o[i]]=t[o[i]];return r}}}function Rg(){return{plugins:[{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=ef(e,{},n);return r[sh]=t,r},onProcessStyle:function(e,t){if(ah in t||sh in t)return e;var n={};for(var r in e){var o=e[r];"function"==typeof o&&(delete e[r],n[r]=o)}return t[ah]=n,e},onUpdate:function(e,t,n,r){var o=t,i=o[sh];i&&(o.style=i(e)||{});var a=o[ah];if(a)for(var s in a)o.prop(s,a[s](e),r)}},fh(),yh(),{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=Ch(e[t]);return e}return Ch(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var r=Mh(t);return t===r?e:(n.prop(r,e),null)}},Ah(),"undefined"==typeof window?null:Tg(),Og()]}}function Ag(){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=Up({},t);return Object.keys(n).forEach((function(e){n[e]&&(r[e]="".concat(t[e]," ").concat(n[e]))})),r}Ym&&(Eg=document.createElement("p"));var Lg=function(e,t,n,r){var o=e.get(t);o||(o=new Map,e.set(t,o)),o.set(n,r)},Ig=function(e,t,n){var r=e.get(t);return r?r.get(n):void 0},Pg=function(e,t,n){e.get(t).delete(n)},Dg=B.createContext(null);function qg(){return B.useContext(Dg)}var zg,$g=oh(Rg()),Bg={disableGeneration:!1,generateClassName:Wm(),jss:$g,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},Fg=B.createContext(Bg);function Hg(e){var t=e.children,n=e.injectFirst,r=void 0!==n&&n,o=e.disableGeneration,i=void 0!==o&&o,a=Gp(e,["children","injectFirst","disableGeneration"]),s=Up({},B.useContext(Fg),{disableGeneration:i},a);if(!s.jss.options.insertionPoint&&r&&"undefined"!=typeof window){if(!zg){var l=document.head;zg=document.createComment("mui-inject-first"),l.insertBefore(zg,l.firstChild)}s.jss=oh({plugins:Rg().plugins,insertionPoint:zg})}return B.createElement(Fg.Provider,{value:s},t)}var jg=-1e9;function Vg(){return jg+=1}var Wg={};function _g(e){var t="function"==typeof e;return{create:function(n,r){var o;try{o=t?e(n):e}catch(e){throw e}if(!r||!n.overrides||!n.overrides[r])return o;var i=n.overrides[r],a=Up({},o);return Object.keys(i).forEach((function(e){a[e]=Zp(a[e],i[e])})),a},options:{}}}function Ug(e,t,n){var r=e.state;if(e.stylesOptions.disableGeneration)return t||{};r.cacheClasses||(r.cacheClasses={value:null,lastProp:null,lastJSS:{}});var o=!1;return r.classes!==r.cacheClasses.lastJSS&&(r.cacheClasses.lastJSS=r.classes,o=!0),t!==r.cacheClasses.lastProp&&(r.cacheClasses.lastProp=t,o=!0),o&&(r.cacheClasses.value=Ag({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}function Yg(e,t){var n=e.state,r=e.theme,o=e.stylesOptions,i=e.stylesCreator,a=e.name;if(!o.disableGeneration){var s=Ig(o.sheetsManager,i,r);s||(s={refs:0,staticSheet:null,dynamicStyles:null},Lg(o.sheetsManager,i,r,s));var l=Up({},i.options,{},o,{theme:r,flip:"boolean"==typeof o.flip?o.flip:"rtl"===r.direction});l.generateId=l.serverGenerateClassName||l.generateClassName;var c=o.sheetsRegistry;if(0===s.refs){var u;o.sheetsCache&&(u=Ig(o.sheetsCache,i,r));var d=i.create(r,a);u||((u=o.jss.createStyleSheet(d,Up({link:!1},l))).attach(),o.sheetsCache&&Lg(o.sheetsCache,i,r,u)),c&&c.add(u),s.staticSheet=u,s.dynamicStyles=nh(d)}if(s.dynamicStyles){var p=o.jss.createStyleSheet(s.dynamicStyles,Up({link:!0},l));p.update(t).attach(),n.dynamicSheet=p,n.classes=Ag({baseClasses:s.staticSheet.classes,newClasses:p.classes}),c&&c.add(p)}else n.classes=s.staticSheet.classes;s.refs+=1}}function Gg(e,t){var n=e.state;n.dynamicSheet&&n.dynamicSheet.update(t)}function Kg(e){var t=e.state,n=e.theme,r=e.stylesOptions,o=e.stylesCreator;if(!r.disableGeneration){var i=Ig(r.sheetsManager,o,n);i.refs-=1;var a=r.sheetsRegistry;0===i.refs&&(Pg(r.sheetsManager,o,n),r.jss.removeStyleSheet(i.staticSheet),a&&a.remove(i.staticSheet)),t.dynamicSheet&&(r.jss.removeStyleSheet(t.dynamicSheet),a&&a.remove(t.dynamicSheet))}}function Xg(e,t){var n,r=B.useRef([]),o=B.useMemo((function(){return{}}),t);r.current!==o&&(r.current=o,n=e()),B.useEffect((function(){return function(){n&&n()}}),[o])}function Jg(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.name,r=t.classNamePrefix,o=t.Component,i=t.defaultTheme,a=void 0===i?Wg:i,s=Gp(t,["name","classNamePrefix","Component","defaultTheme"]),l=_g(e),c=n||r||"makeStyles";return l.options={index:Vg(),name:n,meta:c,classNamePrefix:c},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=qg()||a,r=Up({},B.useContext(Fg),{},s),i=B.useRef(),c=B.useRef();return Xg((function(){var o={name:n,state:{},stylesCreator:l,stylesOptions:r,theme:t};return Yg(o,e),c.current=!1,i.current=o,function(){Kg(o)}}),[t,l]),B.useEffect((function(){c.current&&Gg(i.current,e),c.current=!0})),Ug(i.current,e.classes,o)}}function Zg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qg(e){var t,n,r="";if(e)if("object"==typeof e)if(e.push)for(t=0;t<e.length;t++)e[t]&&(n=Qg(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(n=Qg(t))&&(r&&(r+=" "),r+=n);else"boolean"==typeof e||e.call||(r&&(r+=" "),r+=e);return r}function ev(){for(var e,t=0,n="";t<arguments.length;)(e=Qg(arguments[t++]))&&(n&&(n+=" "),n+=e);return n}var tv=Qp.exports,nv={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},rv={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},ov={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},iv={};function av(e){return tv.isMemo(e)?ov:iv[e.$$typeof]||nv}iv[tv.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0};var sv=Object.defineProperty,lv=Object.getOwnPropertyNames,cv=Object.getOwnPropertySymbols,uv=Object.getOwnPropertyDescriptor,dv=Object.getPrototypeOf,pv=Object.prototype;var mv=function e(t,n,r){if("string"!=typeof n){if(pv){var o=dv(n);o&&o!==pv&&e(t,o,r)}var i=lv(n);cv&&(i=i.concat(cv(n)));for(var a=av(t),s=av(n),l=0;l<i.length;++l){var c=i[l];if(!(rv[c]||r&&r[c]||s&&s[c]||a&&a[c])){var u=uv(n,c);try{sv(t,c,u)}catch(e){}}}return t}return t};function fv(e,t){var n={};return Object.keys(e).forEach((function(r){-1===t.indexOf(r)&&(n[r]=e[r])})),n}function hv(e){var t=e.children,n=e.theme,r=qg(),o=B.useMemo((function(){var e=null===r?n:function(e,t){return"function"==typeof t?t(e):Up({},e,{},t)}(r,n);return null!=e&&(e[jm]=null!==r),e}),[n,r]);return B.createElement(Dg.Provider,{value:o},t)}function gv(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.defaultTheme,n=function(e){var n=B.forwardRef((function(n,r){var o=n.innerRef,i=Gp(n,["innerRef"]),a=qg()||t;return B.createElement(e,Up({theme:a,ref:o||r},i))}));return mv(n,e),n};return n}gv();var vv=Hm();function yv(){return qg()||vv}function bv(e,t){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var r=t.defaultTheme,o=t.withTheme,i=void 0!==o&&o,a=t.name,s=Gp(t,["defaultTheme","withTheme","name"]),l=a,c=Jg(e,Up({defaultTheme:r,Component:n,name:a||n.displayName,classNamePrefix:l},s)),u=B.forwardRef((function(e,t){e.classes;var o,s=e.innerRef,l=Gp(e,["classes","innerRef"]),u=c(e),d=l;return("string"==typeof a||i)&&(o=qg()||r,a&&(d=_m({theme:o,name:a,props:l})),i&&!d.theme&&(d.theme=o)),B.createElement(n,Up({ref:s||t,classes:u},d))}));return u.defaultProps=n.defaultProps,mv(u,n),u}}(e,Up({defaultTheme:vv},t))}function xv(e){return e.charAt(0).toUpperCase()+e.slice(1)}gv({defaultTheme:vv});var Sv=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"div":o,a=e.square,s=void 0!==a&&a,l=e.elevation,c=void 0===l?1:l,u=Gp(e,["classes","className","component","square","elevation"]);return B.createElement(i,Up({className:ev(n.root,n["elevation".concat(c)],r,!s&&n.rounded),ref:t},u))})),Ev=bv((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),Up({root:{backgroundColor:e.palette.background.paper,color:e.palette.text.primary,transition:e.transitions.create("box-shadow")},rounded:{borderRadius:e.shape.borderRadius}},t)}),{name:"MuiPaper"})(Sv),Mv=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.color,i=void 0===o?"primary":o,a=e.position,s=void 0===a?"fixed":a,l=Gp(e,["classes","className","color","position"]);return B.createElement(Ev,Up({square:!0,component:"header",elevation:4,className:ev(n.root,n["position".concat(xv(s))],r,"inherit"!==i&&n["color".concat(xv(i))],{fixed:"mui-fixed"}[s]),ref:t},l))}));bv((function(e){var t="light"===e.palette.type?e.palette.grey[100]:e.palette.grey[900];return{root:{display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",zIndex:e.zIndex.appBar,flexShrink:0},positionFixed:{position:"fixed",top:0,left:"auto",right:0},positionAbsolute:{position:"absolute",top:0,left:"auto",right:0},positionSticky:{position:"sticky",top:0,left:"auto",right:0},positionStatic:{position:"static",transform:"translateZ(0)"},positionRelative:{position:"relative"},colorDefault:{backgroundColor:t,color:e.palette.getContrastText(t)},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText}}}),{name:"MuiAppBar"})(Mv);var Cv=B.forwardRef((function(e,t){var n=e.alt,r=e.children,o=e.classes,i=e.className,a=e.component,s=void 0===a?"div":a,l=e.imgProps,c=e.sizes,u=e.src,d=e.srcSet,p=e.variant,m=void 0===p?"circle":p,f=Gp(e,["alt","children","classes","className","component","imgProps","sizes","src","srcSet","variant"]),h=null,g=u||d;return h=g?B.createElement("img",Up({alt:n,src:u,srcSet:d,sizes:c,className:o.img},l)):r,B.createElement(s,Up({className:ev(o.root,o.system,o[m],i,!g&&o.colorDefault),ref:t},f),h)}));function wv(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}bv((function(e){return{root:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none"},colorDefault:{color:e.palette.background.default,backgroundColor:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600]},circle:{},rounded:{borderRadius:e.shape.borderRadius},square:{borderRadius:0},img:{width:"100%",height:"100%",textAlign:"center",objectFit:"cover"}}}),{name:"MuiAvatar"})(Cv);var kv=!1,Nv=B.createContext(null),Tv="unmounted",Ov="exited",Rv="entering",Av="entered",Lv="exiting",Iv=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=Ov,r.appearStatus=Rv):o=Av:o=t.unmountOnExit||t.mountOnEnter?Tv:Ov,r.state={status:o},r.nextCallback=null,r}Xm(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===Tv?{status:Ov}: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!==Rv&&n!==Av&&(t=Rv):n!==Rv&&n!==Av||(t=Lv)}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){this.cancelNextCallback();var n=V.findDOMNode(this);t===Rv?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===Ov&&this.setState({status:Tv})},n.performEnter=function(e,t){var n=this,r=this.props.enter,o=this.context?this.context.isMounting:t,i=this.getTimeouts(),a=o?i.appear:i.enter;!t&&!r||kv?this.safeSetState({status:Av},(function(){n.props.onEntered(e)})):(this.props.onEnter(e,o),this.safeSetState({status:Rv},(function(){n.props.onEntering(e,o),n.onTransitionEnd(e,a,(function(){n.safeSetState({status:Av},(function(){n.props.onEntered(e,o)}))}))})))},n.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();n&&!kv?(this.props.onExit(e),this.safeSetState({status:Lv},(function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,(function(){t.safeSetState({status:Ov},(function(){t.props.onExited(e)}))}))}))):this.safeSetState({status:Ov},(function(){t.props.onExited(e)}))},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,n){this.setNextCallback(n);var r=null==t&&!this.props.addEndListener;e&&!r?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===Tv)return null;var t=this.props,n=t.children,r=Yp(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return B.createElement(Nv.Provider,{value:null},n(e,r));var o=B.Children.only(n);return B.createElement(Nv.Provider,{value:null},B.cloneElement(o,r))},t}(B.Component);function Pv(){}Iv.contextType=Nv,Iv.propTypes={},Iv.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Pv,onEntering:Pv,onEntered:Pv,onExit:Pv,onExiting:Pv,onExited:Pv},Iv.UNMOUNTED=0,Iv.EXITED=1,Iv.ENTERING=2,Iv.ENTERED=3,Iv.EXITING=4;var Dv=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.add(r):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,r)||("string"==typeof n.className?n.className=n.className+" "+r:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+r)));var n,r}))},qv=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return r=t,void((n=e).classList?n.classList.remove(r):"string"==typeof n.className?n.className=wv(n.className,r):n.setAttribute("class",wv(n.className&&n.className.baseVal||"",r)));var n,r}))},zv=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){t.removeClasses(e,"exit"),t.addClass(e,n?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var r=n?"appear":"enter";t.addClass(e,r,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var r=n?"appear":"enter";t.removeClasses(e,r),t.addClass(e,r,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){t.removeClasses(e,"appear"),t.removeClasses(e,"enter"),t.addClass(e,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){t.addClass(e,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){t.removeClasses(e,"exit"),t.addClass(e,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.getClassNames=function(e){var n=t.props.classNames,r="string"==typeof n,o=r?""+(r&&n?n+"-":"")+e:n[e];return{baseClassName:o,activeClassName:r?o+"-active":n[e+"Active"],doneClassName:r?o+"-done":n[e+"Done"]}},t}Xm(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var r=this.getClassNames(t)[n+"ClassName"];"appear"===t&&"done"===n&&(r+=" "+this.getClassNames("enter").doneClassName),"active"===n&&e&&e.scrollTop,this.appliedClasses[t][n]=r,Dv(e,r)},n.removeClasses=function(e,t){var n=this.appliedClasses[t],r=n.base,o=n.active,i=n.done;this.appliedClasses[t]={},r&&qv(e,r),o&&qv(e,o),i&&qv(e,i)},n.render=function(){var e=this.props;e.classNames;var t=Yp(e,["classNames"]);return B.createElement(Iv,Up({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(B.Component);function $v(e,t){var n=Object.create(null);return e&&F.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&H(e)?t(e):e}(e)})),n}function Bv(e,t,n){return null!=n[t]?n[t]:e.props[t]}function Fv(e,t,n){var r=$v(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var l in t){if(o[l])for(r=0;r<o[l].length;r++){var c=o[l][r];s[o[l][r]]=n(c)}s[l]=n(l)}for(r=0;r<i.length;r++)s[i[r]]=n(i[r]);return s}(t,r);return Object.keys(o).forEach((function(i){var a=o[i];if(H(a)){var s=i in t,l=i in r,c=t[i],u=H(c)&&!c.props.in;!l||s&&!u?l||!s||u?l&&s&&H(c)&&(o[i]=j(a,{onExited:n.bind(null,a),in:c.props.in,exit:Bv(a,"exit",e),enter:Bv(a,"enter",e)})):o[i]=j(a,{in:!1}):o[i]=j(a,{onExited:n.bind(null,a),in:!0,exit:Bv(a,"exit",e),enter:Bv(a,"enter",e)})}})),o}zv.defaultProps={classNames:""},zv.propTypes={};var Hv,jv,Vv=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},Wv=function(e){function t(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(Jm(Jm(r)));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}Xm(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,o=t.children,i=t.handleExited;return{children:t.firstRender?(n=e,r=i,$v(n.children,(function(e){return j(e,{onExited:r.bind(null,e),in:!0,appear:Bv(e,"appear",n),enter:Bv(e,"enter",n),exit:Bv(e,"exit",n)})}))):Fv(e,o,i),firstRender:!1}},n.handleExited=function(e,t){var n=$v(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=Up({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=Yp(e,["component","childFactory"]),o=this.state.contextValue,i=Vv(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?B.createElement(Nv.Provider,{value:o},i):B.createElement(Nv.Provider,{value:o},B.createElement(t,r,i))},t}(B.Component);Wv.propTypes={},Wv.defaultProps={component:"div",childFactory:function(e){return e}},(function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).handleEnter=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEnter",0,n)},t.handleEntering=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntering",0,n)},t.handleEntered=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onEntered",0,n)},t.handleExit=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExit",1,n)},t.handleExiting=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExiting",1,n)},t.handleExited=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.handleLifecycle("onExited",1,n)},t}Xm(t,e);var n=t.prototype;return n.handleLifecycle=function(e,t,n){var r,o=this.props.children,i=B.Children.toArray(o)[t];i.props[e]&&(r=i.props)[e].apply(r,n),this.props[e]&&this.props[e](V.findDOMNode(this))},n.render=function(){var e=this.props,t=e.children,n=e.in,r=Yp(e,["children","in"]),o=B.Children.toArray(t),i=o[0],a=o[1];return delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,B.createElement(Wv,r,n?B.cloneElement(i,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):B.cloneElement(a,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},t}(B.Component)).propTypes={};var _v="out-in",Uv="in-out",Yv=function(e,t,n){return function(){var r;e.props[t]&&(r=e.props)[t].apply(r,arguments),n()}},Gv=((Hv={})[_v]=function(e){var t=e.current,n=e.changeState;return B.cloneElement(t,{in:!1,onExited:Yv(t,"onExited",(function(){n(Rv,null)}))})},Hv[Uv]=function(e){var t=e.current,n=e.changeState,r=e.children;return[t,B.cloneElement(r,{in:!0,onEntered:Yv(r,"onEntered",(function(){n(Rv)}))})]},Hv),Kv=((jv={})[_v]=function(e){var t=e.children,n=e.changeState;return B.cloneElement(t,{in:!0,onEntered:Yv(t,"onEntered",(function(){n(Av,B.cloneElement(t,{in:!0}))}))})},jv[Uv]=function(e){var t=e.current,n=e.children,r=e.changeState;return[B.cloneElement(t,{in:!1,onExited:Yv(t,"onExited",(function(){r(Av,B.cloneElement(n,{in:!0}))}))}),B.cloneElement(n,{in:!0})]},jv),Xv=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state={status:Av,current:null},t.appeared=!1,t.changeState=function(e,n){void 0===n&&(n=t.state.current),t.setState({status:e,current:n})},t}Xm(t,e);var n=t.prototype;return n.componentDidMount=function(){this.appeared=!0},t.getDerivedStateFromProps=function(e,t){return null==e.children?{current:null}:t.status===Rv&&e.mode===Uv?{status:Rv}:!t.current||(n=t.current,r=e.children,n===r||B.isValidElement(n)&&B.isValidElement(r)&&null!=n.key&&n.key===r.key)?{current:B.cloneElement(e.children,{in:!0})}:{status:Lv};var n,r},n.render=function(){var e,t=this.props,n=t.children,r=t.mode,o=this.state,i=o.status,a=o.current,s={children:n,current:a,changeState:this.changeState,status:i};switch(i){case Rv:e=Kv[r](s);break;case Lv:e=Gv[r](s);break;case Av:e=a}return B.createElement(Nv.Provider,{value:{isMounting:!this.appeared}},e)},t}(B.Component);Xv.propTypes={},Xv.defaultProps={mode:_v};var Jv=function(e){return e.scrollTop};function Zv(e,t){var n=e.timeout,r=e.style,o=void 0===r?{}:r;return{duration:o.transitionDuration||"number"==typeof n?n:n[t.mode]||0,delay:o.transitionDelay}}function Qv(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function ey(e,t){return B.useMemo((function(){return null==e&&null==t?null:function(n){Qv(e,n),Qv(t,n)}}),[e,t])}var ty={entering:{opacity:1},entered:{opacity:1}},ny={enter:zm.enteringScreen,exit:zm.leavingScreen},ry=B.forwardRef((function(e,t){var n=e.children,r=e.in,o=e.onEnter,i=e.onExit,a=e.style,s=e.timeout,l=void 0===s?ny:s,c=Gp(e,["children","in","onEnter","onExit","style","timeout"]),u=yv(),d=ey(n.ref,t);return B.createElement(Iv,Up({appear:!0,in:r,onEnter:function(e,t){Jv(e);var n=Zv({style:a,timeout:l},{mode:"enter"});e.style.webkitTransition=u.transitions.create("opacity",n),e.style.transition=u.transitions.create("opacity",n),o&&o(e,t)},onExit:function(e){var t=Zv({style:a,timeout:l},{mode:"exit"});e.style.webkitTransition=u.transitions.create("opacity",t),e.style.transition=u.transitions.create("opacity",t),i&&i(e)},timeout:l},c),(function(e,t){return B.cloneElement(n,Up({style:Up({opacity:0,visibility:"exited"!==e||r?void 0:"hidden"},ty[e],{},a,{},n.props.style),ref:d},t))}))})),oy=B.forwardRef((function(e,t){var n=e.children,r=e.classes,o=e.className,i=e.invisible,a=void 0!==i&&i,s=e.open,l=e.transitionDuration,c=Gp(e,["children","classes","className","invisible","open","transitionDuration"]);return B.createElement(ry,Up({in:s,timeout:l},c),B.createElement("div",{className:ev(r.root,o,a&&r.invisible),"aria-hidden":!0,ref:t},n))})),iy=bv({root:{zIndex:-1,position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",touchAction:"none"},invisible:{backgroundColor:"transparent"}},{name:"MuiBackdrop"})(oy),ay=B.forwardRef((function(e,t){var n=e.anchorOrigin,r=void 0===n?{vertical:"top",horizontal:"right"}:n,o=e.badgeContent,i=e.children,a=e.classes,s=e.className,l=e.color,c=void 0===l?"default":l,u=e.component,d=void 0===u?"span":u,p=e.invisible,m=e.max,f=void 0===m?99:m,h=e.overlap,g=void 0===h?"rectangle":h,v=e.showZero,y=void 0!==v&&v,b=e.variant,x=void 0===b?"standard":b,S=Gp(e,["anchorOrigin","badgeContent","children","classes","className","color","component","invisible","max","overlap","showZero","variant"]),E=p;null==p&&(0===o&&!y||null==o&&"dot"!==x)&&(E=!0);var M="";return"dot"!==x&&(M=o>f?"".concat(f,"+"):o),B.createElement(d,Up({className:ev(a.root,s),ref:t},S),i,B.createElement("span",{className:ev(a.badge,a["".concat(r.horizontal).concat(xv(r.vertical),"}")],a["anchorOrigin".concat(xv(r.vertical)).concat(xv(r.horizontal)).concat(xv(g))],"default"!==c&&a["color".concat(xv(c))],E&&a.invisible,{dot:a.dot}[x])},M))}));bv((function(e){return{root:{position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0},badge:{display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:20,lineHeight:1,padding:"0 6px",height:20,borderRadius:10,backgroundColor:e.palette.color,color:e.palette.textColor,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen})},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},colorError:{backgroundColor:e.palette.error.main,color:e.palette.error.contrastText},dot:{height:6,minWidth:6,padding:0},anchorOriginTopRightRectangle:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%","&$invisible":{transform:"scale(0) translate(50%, -50%)"}},anchorOriginBottomRightRectangle:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%","&$invisible":{transform:"scale(0) translate(50%, 50%)"}},anchorOriginTopLeftRectangle:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%","&$invisible":{transform:"scale(0) translate(-50%, -50%)"}},anchorOriginBottomLeftRectangle:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%","&$invisible":{transform:"scale(0) translate(-50%, 50%)"}},anchorOriginTopRightCircle:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%","&$invisible":{transform:"scale(0) translate(50%, -50%)"}},anchorOriginBottomRightCircle:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%","&$invisible":{transform:"scale(0) translate(50%, 50%)"}},anchorOriginTopLeftCircle:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%","&$invisible":{transform:"scale(0) translate(-50%, -50%)"}},anchorOriginBottomLeftCircle:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%","&$invisible":{transform:"scale(0) translate(-50%, 50%)"}},invisible:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}}),{name:"MuiBadge"})(ay);var sy=B.forwardRef((function(e,t){var n=e.children,r=e.classes,o=e.className,i=e.component,a=void 0===i?"div":i,s=e.onChange,l=e.showLabels,c=void 0!==l&&l,u=e.value,d=Gp(e,["children","classes","className","component","onChange","showLabels","value"]);return B.createElement(a,Up({className:ev(r.root,o),ref:t},d),B.Children.map(n,(function(e,t){if(!B.isValidElement(e))return null;var n=void 0===e.props.value?t:e.props.value;return B.cloneElement(e,{selected:n===u,showLabel:void 0!==e.props.showLabel?e.props.showLabel:c,value:n,onChange:s})})))}));bv((function(e){return{root:{display:"flex",justifyContent:"center",height:56,backgroundColor:e.palette.background.paper}}}),{name:"MuiBottomNavigation"})(sy);var ly="undefined"!=typeof window?B.useLayoutEffect:B.useEffect;function cy(e){var t=B.useRef(e);return ly((function(){t.current=e})),B.useCallback((function(e){return(0,t.current)(e)}),[])}var uy="undefined"!=typeof window?B.useLayoutEffect:B.useEffect;function dy(e){var t=e.children,n=e.defer,r=void 0!==n&&n,o=e.fallback,i=void 0===o?null:o,a=B.useState(!1),s=a[0],l=a[1];return uy((function(){r||l(!0)}),[r]),B.useEffect((function(){r&&l(!0)}),[r]),B.createElement(B.Fragment,null,s?t:i)}var py=!0,my=!1,fy=null,hy={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 gy(e){e.metaKey||e.altKey||e.ctrlKey||(py=!0)}function vy(){py=!1}function yy(){"hidden"===this.visibilityState&&my&&(py=!0)}function by(e){var t,n,r,o=e.target;try{return o.matches(":focus-visible")}catch(e){}return py||(n=(t=o).type,!("INPUT"!==(r=t.tagName)||!hy[n]||t.readOnly)||"TEXTAREA"===r&&!t.readOnly||!!t.isContentEditable)}function xy(){my=!0,window.clearTimeout(fy),fy=window.setTimeout((function(){my=!1}),100)}function Sy(){return{isFocusVisible:by,onBlurVisible:xy,ref:B.useCallback((function(e){var t=V.findDOMNode(e);null!=t&&function(e){e.addEventListener("keydown",gy,!0),e.addEventListener("mousedown",vy,!0),e.addEventListener("pointerdown",vy,!0),e.addEventListener("touchstart",vy,!0),e.addEventListener("visibilitychange",yy,!0)}(t.ownerDocument)}),[])}}var Ey="undefined"==typeof window?B.useEffect:B.useLayoutEffect;function My(e){var t=e.classes,n=e.pulsate,r=void 0!==n&&n,o=e.rippleX,i=e.rippleY,a=e.rippleSize,s=e.in,l=e.onExited,c=void 0===l?function(){}:l,u=e.timeout,d=B.useState(!1),p=d[0],m=d[1],f=ev(t.ripple,t.rippleVisible,r&&t.ripplePulsate),h={width:a,height:a,top:-a/2+i,left:-a/2+o},g=ev(t.child,p&&t.childLeaving,r&&t.childPulsate),v=cy(c);return Ey((function(){if(!s){m(!0);var e=setTimeout(v,u);return function(){clearTimeout(e)}}}),[v,s,u]),B.createElement("span",{className:f,style:h},B.createElement("span",{className:g}))}var Cy=B.forwardRef((function(e,t){var n=e.center,r=void 0!==n&&n,o=e.classes,i=e.className,a=Gp(e,["center","classes","className"]),s=B.useState([]),l=s[0],c=s[1],u=B.useRef(0),d=B.useRef(null);B.useEffect((function(){d.current&&(d.current(),d.current=null)}),[l]);var p=B.useRef(!1),m=B.useRef(null),f=B.useRef(null),h=B.useRef(null);B.useEffect((function(){return function(){clearTimeout(m.current)}}),[]);var g=B.useCallback((function(e){var t=e.pulsate,n=e.rippleX,r=e.rippleY,i=e.rippleSize,a=e.cb;c((function(e){return[].concat(Ih(e),[B.createElement(My,{key:u.current,classes:o,timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i})])})),u.current+=1,d.current=a}),[o]),v=B.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,o=t.pulsate,i=void 0!==o&&o,a=t.center,s=void 0===a?r||t.pulsate:a,l=t.fakeElement,c=void 0!==l&&l;if("mousedown"===e.type&&p.current)p.current=!1;else{"touchstart"===e.type&&(p.current=!0);var u,d,v,y=c?null:h.current,b=y?y.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(s||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(b.width/2),d=Math.round(b.height/2);else{var x=e.clientX?e.clientX:e.touches[0].clientX,S=e.clientY?e.clientY:e.touches[0].clientY;u=Math.round(x-b.left),d=Math.round(S-b.top)}if(s)(v=Math.sqrt((2*Math.pow(b.width,2)+Math.pow(b.height,2))/3))%2==0&&(v+=1);else{var E=2*Math.max(Math.abs((y?y.clientWidth:0)-u),u)+2,M=2*Math.max(Math.abs((y?y.clientHeight:0)-d),d)+2;v=Math.sqrt(Math.pow(E,2)+Math.pow(M,2))}e.touches?(f.current=function(){g({pulsate:i,rippleX:u,rippleY:d,rippleSize:v,cb:n})},m.current=setTimeout((function(){f.current&&(f.current(),f.current=null)}),80)):g({pulsate:i,rippleX:u,rippleY:d,rippleSize:v,cb:n})}}),[r,g]),y=B.useCallback((function(){v({},{pulsate:!0})}),[v]),b=B.useCallback((function(e,t){if(clearTimeout(m.current),"touchend"===e.type&&f.current)return e.persist(),f.current(),f.current=null,void(m.current=setTimeout((function(){b(e,t)})));f.current=null,c((function(e){return e.length>0?e.slice(1):e})),d.current=t}),[]);return B.useImperativeHandle(t,(function(){return{pulsate:y,start:v,stop:b}}),[y,v,b]),B.createElement("span",Up({className:ev(o.root,i),ref:h},a),B.createElement(Wv,{component:null,exit:!0},l))}));var wy,ky=bv((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"})(((wy=B.memo(Cy)).muiName="MuiTouchRipple",wy)),Ny=B.forwardRef((function(e,t){var n=e.action,r=e.buttonRef,o=e.centerRipple,i=void 0!==o&&o,a=e.children,s=e.classes,l=e.className,c=e.component,u=void 0===c?"button":c,d=e.disabled,p=void 0!==d&&d,m=e.disableRipple,f=void 0!==m&&m,h=e.disableTouchRipple,g=void 0!==h&&h,v=e.focusRipple,y=void 0!==v&&v,b=e.focusVisibleClassName,x=e.onBlur,S=e.onClick,E=e.onFocus,M=e.onFocusVisible,C=e.onKeyDown,w=e.onKeyUp,k=e.onMouseDown,N=e.onMouseLeave,T=e.onMouseUp,O=e.onTouchEnd,R=e.onTouchMove,A=e.onTouchStart,L=e.onDragLeave,I=e.tabIndex,P=void 0===I?0:I,D=e.TouchRippleProps,q=e.type,z=void 0===q?"button":q,$=Gp(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"]),F=B.useRef(null);var H=B.useRef(null),j=B.useState(!1),W=j[0],_=j[1];p&&W&&_(!1);var U=Sy(),Y=U.isFocusVisible,G=U.onBlurVisible,K=U.ref;function X(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g;return cy((function(r){return t&&t(r),!n&&H.current&&H.current[e](r),!0}))}B.useImperativeHandle(n,(function(){return{focusVisible:function(){_(!0),F.current.focus()}}}),[]),B.useEffect((function(){W&&y&&!f&&H.current.pulsate()}),[f,y,W]);var J=X("start",k),Z=X("stop",L),Q=X("stop",T),ee=X("stop",(function(e){W&&e.preventDefault(),N&&N(e)})),te=X("start",A),ne=X("stop",O),re=X("stop",R),oe=X("stop",(function(e){W&&(G(e),_(!1)),x&&x(e)}),!1),ie=cy((function(e){p||(F.current||(F.current=e.currentTarget),Y(e)&&(_(!0),M&&M(e)),E&&E(e))})),ae=B.useRef(!1),se=cy((function(e){y&&!ae.current&&W&&H.current&&" "===e.key&&(ae.current=!0,e.persist(),H.current.stop(e,(function(){H.current.start(e)}))),C&&C(e);var t=V.findDOMNode(F.current);e.target!==e.currentTarget||!u||"button"===u||" "!==e.key&&"Enter"!==e.key||"A"===t.tagName&&t.href||(e.preventDefault(),S&&S(e))})),le=cy((function(e){y&&" "===e.key&&H.current&&W&&(ae.current=!1,e.persist(),H.current.stop(e,(function(){H.current.pulsate(e)}))),w&&w(e)})),ce=u;"button"===ce&&$.href&&(ce="a");var ue={};"button"===ce?(ue.type=z,ue.disabled=p):("a"===ce&&$.href||(ue.role="button"),ue["aria-disabled"]=p);var de=ey(r,t),pe=ey(K,F),me=ey(de,pe);return B.createElement(ce,Up({className:ev(s.root,l,W&&[s.focusVisible,b],p&&s.disabled),onBlur:oe,onClick:S,onFocus:ie,onKeyDown:se,onKeyUp:le,onMouseDown:J,onMouseLeave:ee,onMouseUp:Q,onDragLeave:Z,onTouchEnd:ne,onTouchMove:re,onTouchStart:te,ref:me,tabIndex:p?-1:P},ue,$),a,f||p?null:B.createElement(dy,null,B.createElement(ky,Up({ref:H,center:i},D))))})),Ty=bv({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"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(Ny),Oy=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.icon,i=e.label,a=e.onChange,s=e.onClick,l=e.selected,c=e.showLabel,u=e.value,d=Gp(e,["classes","className","icon","label","onChange","onClick","selected","showLabel","value"]);return B.createElement(Ty,Up({ref:t,className:ev(n.root,r,l?n.selected:!c&&n.iconOnly),focusRipple:!0,onClick:function(e){a&&a(e,u),s&&s(e)}},d),B.createElement("span",{className:n.wrapper},o,B.createElement("span",{className:ev(n.label,l?n.selected:!c&&n.iconOnly)},i)))}));function Ry(e,t){return t?Zp(e,t,{clone:!1}):e}bv((function(e){return{root:{transition:e.transitions.create(["color","padding-top"],{duration:e.transitions.duration.short}),padding:"6px 12px 8px",minWidth:80,maxWidth:168,color:e.palette.text.secondary,flex:"1","&$iconOnly":{paddingTop:16},"&$selected":{paddingTop:6,color:e.palette.primary.main}},selected:{},iconOnly:{},wrapper:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"100%",flexDirection:"column"},label:{fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(12),opacity:1,transition:"font-size 0.2s, opacity 0.2s",transitionDelay:"0.1s","&$iconOnly":{opacity:0,transitionDelay:"0s"},"&$selected":{fontSize:e.typography.pxToRem(14)}}}}),{name:"MuiBottomNavigationAction"})(Oy);var Ay={xs:0,sm:600,md:960,lg:1280,xl:1920},Ly={keys:["xs","sm","md","lg","xl"],up:function(e){return"@media (min-width:".concat(Ay[e],"px)")}};function Iy(e,t,n){if(Array.isArray(t)){var r=e.theme.breakpoints||Ly;return t.reduce((function(e,o,i){return e[r.up(r.keys[i])]=n(t[i]),e}),{})}if("object"===Xp(t)){var o=e.theme.breakpoints||Ly;return Object.keys(t).reduce((function(e,r){return e[o.up(r)]=n(t[r]),e}),{})}return n(t)}function Py(e,t){return t&&"string"==typeof t?t.split(".").reduce((function(e,t){return e&&e[t]?e[t]:null}),e):null}function Dy(e){var t=e.prop,n=e.cssProperty,r=void 0===n?e.prop:n,o=e.themeKey,i=e.transform,a=function(e){if(null==e[t])return null;var n=e[t],a=Py(e.theme,o)||{};return Iy(e,n,(function(e){var t;return"function"==typeof a?t=a(e):Array.isArray(a)?t=a[e]||e:(t=Py(a,e)||e,i&&(t=i(t))),!1===r?t:_p({},r,t)}))};return a.propTypes={},a.filterProps=[t],a}function qy(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=function(e){return t.reduce((function(t,n){var r=n(e);return r?Ry(t,r):t}),{})};return r.propTypes={},r.filterProps=t.reduce((function(e,t){return e.concat(t.filterProps)}),[]),r}function zy(e){return"number"!=typeof e?e:"".concat(e,"px solid")}var $y=qy(Dy({prop:"border",themeKey:"borders",transform:zy}),Dy({prop:"borderTop",themeKey:"borders",transform:zy}),Dy({prop:"borderRight",themeKey:"borders",transform:zy}),Dy({prop:"borderBottom",themeKey:"borders",transform:zy}),Dy({prop:"borderLeft",themeKey:"borders",transform:zy}),Dy({prop:"borderColor",themeKey:"palette"}),Dy({prop:"borderRadius",themeKey:"shape"}));var By=qy(Dy({prop:"displayPrint",cssProperty:!1,transform:function(e){return{"@media print":{display:e}}}}),Dy({prop:"display"}),Dy({prop:"overflow"}),Dy({prop:"textOverflow"}),Dy({prop:"visibility"}),Dy({prop:"whiteSpace"})),Fy=qy(Dy({prop:"flexBasis"}),Dy({prop:"flexDirection"}),Dy({prop:"flexWrap"}),Dy({prop:"justifyContent"}),Dy({prop:"alignItems"}),Dy({prop:"alignContent"}),Dy({prop:"order"}),Dy({prop:"flex"}),Dy({prop:"flexGrow"}),Dy({prop:"flexShrink"}),Dy({prop:"alignSelf"}),Dy({prop:"justifyItems"}),Dy({prop:"justifySelf"})),Hy=qy(Dy({prop:"color",themeKey:"palette"}),Dy({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette"})),jy=qy(Dy({prop:"position"}),Dy({prop:"zIndex",themeKey:"zIndex"}),Dy({prop:"top"}),Dy({prop:"right"}),Dy({prop:"bottom"}),Dy({prop:"left"})),Vy=Dy({prop:"boxShadow",themeKey:"shadows"});function Wy(e){return e<=1?"".concat(100*e,"%"):e}var _y=Dy({prop:"width",transform:Wy}),Uy=Dy({prop:"maxWidth",transform:Wy}),Yy=Dy({prop:"minWidth",transform:Wy}),Gy=Dy({prop:"height",transform:Wy}),Ky=Dy({prop:"maxHeight",transform:Wy}),Xy=Dy({prop:"minHeight",transform:Wy});Dy({prop:"size",cssProperty:"width",transform:Wy}),Dy({prop:"size",cssProperty:"height",transform:Wy});var Jy=qy(_y,Uy,Yy,Gy,Ky,Xy);function Zy(e){if(Array.isArray(e))return e}function Qy(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function eb(e,t){return Zy(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(e,t)||Qy()}var tb={m:"margin",p:"padding"},nb={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},rb={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},ob=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){if(e.length>2){if(!rb[e])return[e];e=rb[e]}var t=eb(e.split(""),2),n=t[0],r=t[1],o=tb[n],i=nb[r]||"";return Array.isArray(i)?i.map((function(e){return o+e})):[o+i]})),ib=["m","mt","mr","mb","ml","mx","my","p","pt","pr","pb","pl","px","py","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY"];function ab(e,t){return function(n){return e.reduce((function(e,r){return e[r]=function(e,t){if("string"==typeof t)return t;var n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:"-".concat(n)}(t,n),e}),{})}}function sb(e){var t=function(e){var t=e.spacing||8;return"number"==typeof t?function(e){return t*e}:Array.isArray(t)?function(e){return t[e]}:"function"==typeof t?t:function(){}}(e.theme);return Object.keys(e).map((function(n){if(-1===ib.indexOf(n))return null;var r=ab(ob(n),t),o=e[n];return Iy(e,o,r)})).reduce(Ry,{})}sb.propTypes={},sb.filterProps=ib;var lb=qy(Dy({prop:"fontFamily",themeKey:"typography"}),Dy({prop:"fontSize",themeKey:"typography"}),Dy({prop:"fontStyle",themeKey:"typography"}),Dy({prop:"fontWeight",themeKey:"typography"}),Dy({prop:"letterSpacing"}),Dy({prop:"lineHeight"}),Dy({prop:"textAlign"})),cb=function(e){var t=function(t){var n=e(t);return t.css?Up({},Ry(n,e(Up({theme:t.theme},t.css))),{},function(e,t){var n={};return Object.keys(e).forEach((function(r){-1===t.indexOf(r)&&(n[r]=e[r])})),n}(t.css,[e.filterProps])):n};return t.propTypes={},t.filterProps=["css"].concat(Ih(e.filterProps)),t}(qy($y,By,Fy,jy,Hy,Vy,Jy,sb,lb));!function(e){var t=function(e){return function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.name,i=Gp(r,["name"]),a=o,s=Jg("function"==typeof t?function(e){return{root:function(n){return t(Up({theme:e},n))}}}:{root:t},Up({Component:e,name:o||e.displayName,classNamePrefix:a},i));t.filterProps&&(n=t.filterProps,delete t.filterProps),t.propTypes&&(t.propTypes,delete t.propTypes);var l=B.forwardRef((function(t,r){var o=t.children,i=t.className,a=t.clone,l=t.component,c=Gp(t,["children","className","clone","component"]),u=ev(s(t).root,i),d=c;if(n&&(d=fv(d,n)),a)return B.cloneElement(o,Up({className:ev(o.props.className,u)},d));if("function"==typeof o)return o(Up({className:u},d));var p=l||e;return B.createElement(p,Up({ref:r,className:u},d),o)}));return mv(l,e),l}}(e);return function(e,n){return t(e,Up({defaultTheme:vv},n))}}("div")(cb,{name:"MuiBox"});var ub={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},db=B.forwardRef((function(e,t){var n=e.align,r=void 0===n?"inherit":n,o=e.classes,i=e.className,a=e.color,s=void 0===a?"initial":a,l=e.component,c=e.display,u=void 0===c?"initial":c,d=e.gutterBottom,p=void 0!==d&&d,m=e.noWrap,f=void 0!==m&&m,h=e.paragraph,g=void 0!==h&&h,v=e.variant,y=void 0===v?"body1":v,b=e.variantMapping,x=void 0===b?ub:b,S=Gp(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),E=l||(g?"p":x[y]||ub[y])||"span";return B.createElement(E,Up({className:ev(o.root,i,"inherit"!==y&&o[y],"initial"!==s&&o["color".concat(xv(s))],f&&o.noWrap,p&&o.gutterBottom,g&&o.paragraph,"inherit"!==r&&o["align".concat(xv(r))],"initial"!==u&&o["display".concat(xv(u))]),ref:t},S))})),pb=bv((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"})(db),mb=B.forwardRef((function(e,t){var n=e.children,r=e.classes,o=e.className,i=e.color,a=void 0===i?"inherit":i,s=e.component,l=void 0===s?"svg":s,c=e.fontSize,u=void 0===c?"default":c,d=e.htmlColor,p=e.titleAccess,m=e.viewBox,f=void 0===m?"0 0 24 24":m,h=Gp(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return B.createElement(l,Up({className:ev(r.root,o,"inherit"!==a&&r["color".concat(xv(a))],"default"!==u&&r["fontSize".concat(xv(u))]),focusable:"false",viewBox:f,color:d,"aria-hidden":p?"false":"true",role:p?"img":"presentation",ref:t},h),n,p?B.createElement("title",null,p):null)}));mb.muiName="SvgIcon";var fb=bv((function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}}),{name:"MuiSvgIcon"})(mb);function hb(e,t){var n=B.memo(B.forwardRef((function(t,n){return B.createElement(fb,Up({},t,{ref:n}),e)})));return n.muiName=fb.muiName,n}var gb=hb(B.createElement("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}));var vb=bv((function(e){return{root:{display:"flex"},icon:{width:24,height:16,backgroundColor:e.palette.grey[100],color:e.palette.grey[700],borderRadius:2,marginLeft:e.spacing(.5),marginRight:e.spacing(.5),cursor:"pointer","&:hover, &:focus":{backgroundColor:e.palette.grey[200]},"&:active":{boxShadow:e.shadows[0],backgroundColor:Hp(e.palette.grey[200],.12)}}}}),{name:"PrivateBreadcrumbCollapsed"})((function(e){var t=e.classes,n=Gp(e,["classes"]);return B.createElement("li",Up({className:t.root},n),B.createElement(gb,{className:t.icon}))}));var yb=bv({root:{display:"flex",userSelect:"none",marginLeft:8,marginRight:8}},{name:"PrivateBreadcrumbSeparator"})((function(e){var t=e.classes,n=e.className,r=Gp(e,["classes","className"]);return B.createElement("li",Up({"aria-hidden":!0,className:ev(t.root,n)},r))}));var bb=B.forwardRef((function(e,t){var n=e.children,r=e.classes,o=e.className,i=e.component,a=void 0===i?"nav":i,s=e.itemsAfterCollapse,l=void 0===s?1:s,c=e.itemsBeforeCollapse,u=void 0===c?1:c,d=e.maxItems,p=void 0===d?8:d,m=e.separator,f=void 0===m?"/":m,h=Gp(e,["children","classes","className","component","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"]),g=B.useState(!1),v=g[0],y=g[1],b=B.Children.toArray(n).filter((function(e){return B.isValidElement(e)})).map((function(e,t){return B.createElement("li",{className:r.li,key:"child-".concat(t)},e)}));return B.createElement(pb,Up({ref:t,component:a,color:"textSecondary",className:ev(r.root,o)},h),B.createElement("ol",{className:r.ol},function(e,t,n){return e.reduce((function(r,o,i){return i<e.length-1?r=r.concat(o,B.createElement(yb,{key:"separator-".concat(i),className:t},n)):r.push(o),r}),[])}(v||p&&b.length<=p?b:function(e){return u+l>=e.length?e:[].concat(Ih(e.slice(0,u)),[B.createElement(vb,{key:"ellipsis",onClick:function(){y(!0)}})],Ih(e.slice(e.length-l,e.length)))}(b),r.separator,f)))}));bv({root:{},ol:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0},li:{listStyle:"none"},separator:{}},{name:"MuiBreadcrumbs"})(bb);var xb=B.forwardRef((function(e,t){var n=e.children,r=e.classes,o=e.className,i=e.color,a=void 0===i?"default":i,s=e.component,l=void 0===s?"button":s,c=e.disabled,u=void 0!==c&&c,d=e.disableFocusRipple,p=void 0!==d&&d,m=e.endIcon,f=e.focusVisibleClassName,h=e.fullWidth,g=void 0!==h&&h,v=e.size,y=void 0===v?"medium":v,b=e.startIcon,x=e.type,S=void 0===x?"button":x,E=e.variant,M=void 0===E?"text":E,C=Gp(e,["children","classes","className","color","component","disabled","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),w=b&&B.createElement("span",{className:ev(r.startIcon,r["iconSize".concat(xv(y))])},b),k=m&&B.createElement("span",{className:ev(r.endIcon,r["iconSize".concat(xv(y))])},m);return B.createElement(Ty,Up({className:ev(r.root,r[M],o,"inherit"===a?r.colorInherit:"default"!==a&&r["".concat(M).concat(xv(a))],"medium"!==y&&[r["".concat(M,"Size").concat(xv(y))],r["size".concat(xv(y))]],u&&r.disabled,g&&r.fullWidth),component:l,disabled:u,focusRipple:!p,focusVisibleClassName:ev(r.focusVisible,f),ref:t,type:S},C),B.createElement("span",{className:r.label},w,n,k))})),Sb=bv((function(e){return{root:Up({},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:jp(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:jp(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:jp(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.disabled)}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(jp(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:jp(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(jp(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:jp(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}}},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"})(xb),Eb=B.forwardRef((function(e,t){var n=e.children,r=e.classes,o=e.className,i=e.color,a=void 0===i?"default":i,s=e.component,l=void 0===s?"div":s,c=e.disabled,u=void 0!==c&&c,d=e.disableFocusRipple,p=void 0!==d&&d,m=e.disableRipple,f=void 0!==m&&m,h=e.fullWidth,g=void 0!==h&&h,v=e.size,y=void 0===v?"medium":v,b=e.variant,x=void 0===b?"outlined":b,S=Gp(e,["children","classes","className","color","component","disabled","disableFocusRipple","disableRipple","fullWidth","size","variant"]),E=ev(r.grouped,r["grouped".concat(xv(x))],r["grouped".concat(xv(x)).concat("default"!==a?xv(a):"")],u&&r.disabled);return B.createElement(l,Up({role:"group",className:ev(r.root,o,g&&r.fullWidth,{contained:r.contained}[x]),ref:t},S),B.Children.map(n,(function(e){return B.isValidElement(e)?B.cloneElement(e,{className:ev(E,e.props.className),disabled:e.props.disabled||u,color:e.props.color||a,disableFocusRipple:p,disableRipple:f,fullWidth:g,size:e.props.size||y,variant:e.props.variant||x}):null})))}));bv((function(e){return{root:{display:"inline-flex",borderRadius:e.shape.borderRadius},contained:{boxShadow:e.shadows[2]},fullWidth:{width:"100%"},grouped:{minWidth:40,"&:not(:first-child)":{borderTopLeftRadius:0,borderBottomLeftRadius:0},"&:not(:last-child)":{borderTopRightRadius:0,borderBottomRightRadius:0}},groupedText:{"&:not(:last-child)":{borderRight:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)")}},groupedTextPrimary:{"&:not(:last-child)":{borderColor:jp(e.palette.primary.main,.5)}},groupedTextSecondary:{"&:not(:last-child)":{borderColor:jp(e.palette.secondary.main,.5)}},groupedOutlined:{"&:not(:first-child)":{marginLeft:-1},"&:not(:last-child)":{borderRightColor:"transparent"}},groupedOutlinedPrimary:{"&:hover":{borderColor:e.palette.primary.main}},groupedOutlinedSecondary:{"&:hover":{borderColor:e.palette.secondary.main}},groupedContained:{boxShadow:"none","&:not(:last-child)":{borderRight:"1px solid ".concat(e.palette.grey[400]),"&$disabled":{borderRight:"1px solid ".concat(e.palette.action.disabled)}}},groupedContainedPrimary:{"&:not(:last-child)":{borderRight:"1px solid ".concat(e.palette.primary.dark)}},groupedContainedSecondary:{"&:not(:last-child)":{borderRight:"1px solid ".concat(e.palette.secondary.dark)}},disabled:{}}}),{name:"MuiButtonGroup"})(Eb);var Mb=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.raised,i=void 0!==o&&o,a=Gp(e,["classes","className","raised"]);return B.createElement(Ev,Up({className:ev(n.root,r),elevation:i?8:1,ref:t},a))}));bv({root:{overflow:"hidden"}},{name:"MuiCard"})(Mb);var Cb=B.forwardRef((function(e,t){var n=e.children,r=e.classes,o=e.className,i=e.focusVisibleClassName,a=Gp(e,["children","classes","className","focusVisibleClassName"]);return B.createElement(Ty,Up({className:ev(r.root,o),focusVisibleClassName:ev(i,r.focusVisible),ref:t},a),n,B.createElement("span",{className:r.focusHighlight}))}));bv((function(e){return{root:{display:"block",textAlign:"inherit",width:"100%","&:hover $focusHighlight":{opacity:e.palette.action.hoverOpacity},"&$focusVisible $focusHighlight":{opacity:.12}},focusVisible:{},focusHighlight:{overflow:"hidden",pointerEvents:"none",position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:"inherit",opacity:0,backgroundColor:"currentcolor",transition:e.transitions.create("opacity",{duration:e.transitions.duration.short})}}}),{name:"MuiCardActionArea"})(Cb);var wb=B.forwardRef((function(e,t){var n=e.disableSpacing,r=void 0!==n&&n,o=e.classes,i=e.className,a=Gp(e,["disableSpacing","classes","className"]);return B.createElement("div",Up({className:ev(o.root,i,!r&&o.spacing),ref:t},a))}));bv({root:{display:"flex",alignItems:"center",padding:8},spacing:{"& > * + *":{marginLeft:8}}},{name:"MuiCardActions"})(wb);var kb=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"div":o,a=Gp(e,["classes","className","component"]);return B.createElement(i,Up({className:ev(n.root,r),ref:t},a))}));bv({root:{padding:16,"&:last-child":{paddingBottom:24}}},{name:"MuiCardContent"})(kb);var Nb=B.forwardRef((function(e,t){var n=e.action,r=e.avatar,o=e.classes,i=e.className,a=e.component,s=void 0===a?"div":a,l=e.disableTypography,c=void 0!==l&&l,u=e.subheader,d=e.subheaderTypographyProps,p=e.title,m=e.titleTypographyProps,f=Gp(e,["action","avatar","classes","className","component","disableTypography","subheader","subheaderTypographyProps","title","titleTypographyProps"]),h=p;null==h||h.type===pb||c||(h=B.createElement(pb,Up({variant:r?"body2":"h5",className:o.title,component:"span",display:"block"},m),h));var g=u;return null==g||g.type===pb||c||(g=B.createElement(pb,Up({variant:r?"body2":"body1",className:o.subheader,color:"textSecondary",component:"span",display:"block"},d),g)),B.createElement(s,Up({className:ev(o.root,i),ref:t},f),r&&B.createElement("div",{className:o.avatar},r),B.createElement("div",{className:o.content},h,g),n&&B.createElement("div",{className:o.action},n))}));bv({root:{display:"flex",alignItems:"center",padding:16},avatar:{flex:"0 0 auto",marginRight:16},action:{flex:"0 0 auto",alignSelf:"flex-start",marginTop:-8,marginRight:-8},content:{flex:"1 1 auto"},title:{},subheader:{}},{name:"MuiCardHeader"})(Nb);var Tb=["video","audio","picture","iframe","img"],Ob=B.forwardRef((function(e,t){var n=e.children,r=e.classes,o=e.className,i=e.component,a=void 0===i?"div":i,s=e.image,l=e.src,c=e.style,u=Gp(e,["children","classes","className","component","image","src","style"]),d=-1!==Tb.indexOf(a),p=!d&&s?Up({backgroundImage:'url("'.concat(s,'")')},c):c;return B.createElement(a,Up({className:ev(r.root,o,d&&r.media,-1!=="picture img".indexOf(a)&&r.img),ref:t,style:p,src:d?s||l:void 0},u),n)}));bv({root:{display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"},media:{width:"100%"},img:{objectFit:"cover"}},{name:"MuiCardMedia"})(Ob);var Rb=B.createContext();function Ab(){return B.useContext(Rb)}function Lb(){return B.useContext(Rb)}var Ib=B.forwardRef((function(e,t){var n=e.edge,r=void 0!==n&&n,o=e.children,i=e.classes,a=e.className,s=e.color,l=void 0===s?"default":s,c=e.disabled,u=void 0!==c&&c,d=e.disableFocusRipple,p=void 0!==d&&d,m=e.size,f=void 0===m?"medium":m,h=Gp(e,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return B.createElement(Ty,Up({className:ev(i.root,a,"default"!==l&&i["color".concat(xv(l))],u&&i.disabled,{small:i["size".concat(xv(f))]}[f],{start:i.edgeStart,end:i.edgeEnd}[r]),centerRipple:!0,focusRipple:!p,disabled:u,ref:t},h),B.createElement("span",{className:i.label},o))})),Pb=bv((function(e){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:e.palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{backgroundColor:jp(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:e.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:jp(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:jp(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:e.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}}),{name:"MuiIconButton"})(Ib),Db=B.forwardRef((function(e,t){var n=e.autoFocus,r=e.checked,o=e.checkedIcon,i=e.classes,a=e.className,s=e.defaultChecked,l=e.disabled,c=e.icon,u=e.id,d=e.inputProps,p=e.inputRef,m=e.name,f=e.onBlur,h=e.onChange,g=e.onFocus,v=e.readOnly,y=e.required,b=e.tabIndex,x=e.type,S=e.value,E=Gp(e,["autoFocus","checked","checkedIcon","classes","className","defaultChecked","disabled","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"]),M=B.useRef(null!=r).current,C=B.useState(Boolean(s)),w=C[0],k=C[1],N=Lb(),T=l;N&&void 0===T&&(T=N.disabled);var O=M?r:w,R="checkbox"===x||"radio"===x;return B.createElement(Pb,Up({component:"span",className:ev(i.root,a,O&&i.checked,T&&i.disabled),disabled:T,tabIndex:null,role:void 0,onFocus:function(e){g&&g(e),N&&N.onFocus&&N.onFocus(e)},onBlur:function(e){f&&f(e),N&&N.onBlur&&N.onBlur(e)},ref:t},E),B.createElement("input",Up({autoFocus:n,checked:r,defaultChecked:s,className:i.input,disabled:T,id:R&&u,name:m,onChange:function(e){var t=e.target.checked;M||k(t),h&&h(e,t)},readOnly:v,ref:p,required:y,tabIndex:b,type:x,value:S},d)),O?o:c)})),qb=bv({root:{padding:9},checked:{},disabled:{},input:{cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}},{name:"PrivateSwitchBase"})(Db),zb=hb(B.createElement("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"})),$b=hb(B.createElement("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})),Bb=hb(B.createElement("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"})),Fb=B.createElement($b,null),Hb=B.createElement(zb,null),jb=B.createElement(Bb,null),Vb=B.forwardRef((function(e,t){var n=e.checkedIcon,r=void 0===n?Fb:n,o=e.classes,i=e.color,a=void 0===i?"secondary":i,s=e.icon,l=void 0===s?Hb:s,c=e.indeterminate,u=void 0!==c&&c,d=e.indeterminateIcon,p=void 0===d?jb:d,m=e.inputProps,f=Gp(e,["checkedIcon","classes","color","icon","indeterminate","indeterminateIcon","inputProps"]);return B.createElement(qb,Up({type:"checkbox",checkedIcon:u?p:r,classes:{root:ev(o.root,o["color".concat(xv(a))],u&&o.indeterminate),checked:o.checked,disabled:o.disabled},color:a,inputProps:Up({"data-indeterminate":u},m),icon:u?p:l,ref:t},f))}));bv((function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},indeterminate:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:jp(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:jp(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}}),{name:"MuiCheckbox"})(Vb);var Wb=hb(B.createElement("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"})),_b=B.forwardRef((function(e,t){var n=e.avatar,r=e.classes,o=e.className,i=e.clickable,a=e.color,s=void 0===a?"default":a,l=e.component,c=e.deleteIcon,u=e.disabled,d=void 0!==u&&u,p=e.icon,m=e.label,f=e.onClick,h=e.onDelete,g=e.onKeyDown,v=e.onKeyUp,y=e.size,b=void 0===y?"medium":y,x=e.variant,S=void 0===x?"default":x,E=Gp(e,["avatar","classes","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant"]),M=B.useRef(null),C=ey(M,t),w=function(e){e.stopPropagation(),h&&h(e)},k=!(!1===i||!f)||i,N="small"===b,T=l||(k?Ty:"div"),O=T===Ty?{component:"div"}:{},R=null;if(h){var A=ev("default"!==s&&("default"===S?r["deleteIconColor".concat(xv(s))]:r["deleteIconOutlinedColor".concat(xv(s))]),N&&r.deleteIconSmall);R=c&&B.isValidElement(c)?B.cloneElement(c,{className:ev(c.props.className,r.deleteIcon,A),onClick:w}):B.createElement(Wb,{className:ev(r.deleteIcon,A),onClick:w})}var L=null;n&&B.isValidElement(n)&&(L=B.cloneElement(n,{className:ev(r.avatar,n.props.className,N&&r.avatarSmall,"default"!==s&&r["avatarColor".concat(xv(s))])}));var I=null;return p&&B.isValidElement(p)&&(I=B.cloneElement(p,{className:ev(r.icon,p.props.className,N&&r.iconSmall,"default"!==s&&r["iconColor".concat(xv(s))])})),B.createElement(T,Up({role:k||h?"button":void 0,className:ev(r.root,o,"default"!==s&&[r["color".concat(xv(s))],k&&r["clickableColor".concat(xv(s))],h&&r["deletableColor".concat(xv(s))]],"default"!==S&&[r.outlined,{primary:r.outlinedPrimary,secondary:r.outlinedSecondary}[s]],d&&r.disabled,N&&r.sizeSmall,k&&r.clickable,h&&r.deletable),"aria-disabled":!!d||void 0,tabIndex:k||h?0:void 0,onClick:f,onKeyDown:function(e){g&&g(e),e.currentTarget===e.target&&-1!==[" ","Enter","Backspace","Delete","Escape"].indexOf(e.key)&&e.preventDefault()},onKeyUp:function(e){if(v&&v(e),e.currentTarget===e.target){var t=e.key;!h||"Backspace"!==t&&"Delete"!==t?"Escape"===t&&M.current&&M.current.blur():h(e)}},ref:C},O,E),L||I,B.createElement("span",{className:ev(r.label,N&&r.labelSmall)},m),R)}));bv((function(e){var t="light"===e.palette.type?e.palette.grey[300]:e.palette.grey[700],n=jp(e.palette.text.primary,.26);return{root:{fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:e.palette.getContrastText(t),backgroundColor:t,borderRadius:16,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"default",outline:0,textDecoration:"none",border:"none",padding:0,verticalAlign:"middle",boxSizing:"border-box","&$disabled":{opacity:.5,pointerEvents:"none"},"& $avatar":{marginLeft:5,marginRight:-6,width:24,height:24,color:"light"===e.palette.type?e.palette.grey[700]:e.palette.grey[300],fontSize:e.typography.pxToRem(12)},"& $avatarColorPrimary":{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.dark},"& $avatarColorSecondary":{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.dark},"& $avatarSmall":{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)}},sizeSmall:{height:24},colorPrimary:{backgroundColor:e.palette.primary.main,color:e.palette.primary.contrastText},colorSecondary:{backgroundColor:e.palette.secondary.main,color:e.palette.secondary.contrastText},disabled:{},clickable:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover, &:focus":{backgroundColor:Hp(t,.08)},"&:active":{boxShadow:e.shadows[1]}},clickableColorPrimary:{"&:hover, &:focus":{backgroundColor:Hp(e.palette.primary.main,.08)}},clickableColorSecondary:{"&:hover, &:focus":{backgroundColor:Hp(e.palette.secondary.main,.08)}},deletable:{"&:focus":{backgroundColor:Hp(t,.08)}},deletableColorPrimary:{"&:focus":{backgroundColor:Hp(e.palette.primary.main,.2)}},deletableColorSecondary:{"&:focus":{backgroundColor:Hp(e.palette.secondary.main,.2)}},outlined:{backgroundColor:"transparent",border:"1px solid ".concat("light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:jp(e.palette.text.primary,e.palette.action.hoverOpacity)},"& $avatar":{marginLeft:4},"& $avatarSmall":{marginLeft:2},"& $icon":{marginLeft:4},"& $iconSmall":{marginLeft:2},"& $deleteIcon":{marginRight:5},"& $deleteIconSmall":{marginRight:3}},outlinedPrimary:{color:e.palette.primary.main,border:"1px solid ".concat(e.palette.primary.main),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:jp(e.palette.primary.main,e.palette.action.hoverOpacity)}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(e.palette.secondary.main),"$clickable&:hover, $clickable&:focus, $deletable&:focus":{backgroundColor:jp(e.palette.secondary.main,e.palette.action.hoverOpacity)}},avatar:{},avatarSmall:{},avatarColorPrimary:{},avatarColorSecondary:{},icon:{color:"light"===e.palette.type?e.palette.grey[700]:e.palette.grey[300],marginLeft:5,marginRight:-6},iconSmall:{width:18,height:18,marginLeft:4,marginRight:-4},iconColorPrimary:{color:"inherit"},iconColorSecondary:{color:"inherit"},label:{display:"flex",alignItems:"center",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},labelSmall:{paddingLeft:8,paddingRight:8},deleteIcon:{WebkitTapHighlightColor:"transparent",color:n,height:22,width:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:jp(n,.4)}},deleteIconSmall:{height:16,width:16,marginRight:4,marginLeft:-4},deleteIconColorPrimary:{color:jp(e.palette.primary.contrastText,.7),"&:hover, &:active":{color:e.palette.primary.contrastText}},deleteIconColorSecondary:{color:jp(e.palette.secondary.contrastText,.7),"&:hover, &:active":{color:e.palette.secondary.contrastText}},deleteIconOutlinedColorPrimary:{color:jp(e.palette.primary.main,.7),"&:hover, &:active":{color:e.palette.primary.main}},deleteIconOutlinedColorSecondary:{color:jp(e.palette.secondary.main,.7),"&:hover, &:active":{color:e.palette.secondary.main}}}}),{name:"MuiChip"})(_b);var Ub=44;function Yb(e){var t,n,r;return t=e,n=0,r=1,e=(Math.min(Math.max(n,t),r)-n)/(r-n),e=(e-=1)*e*e+1}var Gb=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.color,i=void 0===o?"primary":o,a=e.disableShrink,s=void 0!==a&&a,l=e.size,c=void 0===l?40:l,u=e.style,d=e.thickness,p=void 0===d?3.6:d,m=e.value,f=void 0===m?0:m,h=e.variant,g=void 0===h?"indeterminate":h,v=Gp(e,["classes","className","color","disableShrink","size","style","thickness","value","variant"]),y={},b={},x={};if("determinate"===g||"static"===g){var S=2*Math.PI*((Ub-p)/2);y.strokeDasharray=S.toFixed(3),x["aria-valuenow"]=Math.round(f),"static"===g?(y.strokeDashoffset="".concat(((100-f)/100*S).toFixed(3),"px"),b.transform="rotate(-90deg)"):(y.strokeDashoffset="".concat((function(e){return e*e}((100-f)/100)*S).toFixed(3),"px"),b.transform="rotate(".concat((270*Yb(f/70)).toFixed(3),"deg)"))}return B.createElement("div",Up({className:ev(n.root,r,"inherit"!==i&&n["color".concat(xv(i))],{indeterminate:n.indeterminate,static:n.static}[g]),style:Up({width:c,height:c},b,{},u),ref:t,role:"progressbar"},x,v),B.createElement("svg",{className:n.svg,viewBox:"".concat(22," ").concat(22," ").concat(Ub," ").concat(Ub)},B.createElement("circle",{className:ev(n.circle,s&&n.circleDisableShrink,{indeterminate:n.circleIndeterminate,static:n.circleStatic}[g]),style:y,cx:Ub,cy:Ub,r:(Ub-p)/2,fill:"none",strokeWidth:p})))}));function Kb(e){return e&&e.ownerDocument||document}function Xb(e){return e.substring(2).toLowerCase()}bv((function(e){return{root:{display:"inline-block"},static:{transition:e.transitions.create("transform")},indeterminate:{animation:"$circular-rotate 1.4s linear infinite"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},svg:{display:"block"},circle:{stroke:"currentColor"},circleStatic:{transition:e.transitions.create("stroke-dashoffset")},circleIndeterminate:{animation:"$circular-dash 1.4s ease-in-out infinite",strokeDasharray:"80px, 200px",strokeDashoffset:"0px"},"@keyframes circular-rotate":{"100%":{transform:"rotate(360deg)"}},"@keyframes circular-dash":{"0%":{strokeDasharray:"1px, 200px",strokeDashoffset:"0px"},"50%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-15px"},"100%":{strokeDasharray:"100px, 200px",strokeDashoffset:"-125px"}},circleDisableShrink:{animation:"none"}}}),{name:"MuiCircularProgress",flip:!1})(Gb);var Jb=B.forwardRef((function(e,t){var n=e.children,r=e.mouseEvent,o=void 0===r?"onClick":r,i=e.touchEvent,a=void 0===i?"onTouchEnd":i,s=e.onClickAway,l=B.useRef(!1),c=B.useRef(null),u=B.useRef(!1);B.useEffect((function(){return u.current=!0,function(){u.current=!1}}),[]);var d=ey(c,t),p=B.useCallback((function(e){Qv(d,V.findDOMNode(e))}),[d]),m=ey(n.ref,p),f=cy((function(e){if(!e.defaultPrevented&&u.current)if(l.current)l.current=!1;else if(c.current){var t=Kb(c.current);t.documentElement&&t.documentElement.contains(e.target)&&!c.current.contains(e.target)&&s(e)}})),h=B.useCallback((function(){l.current=!0}),[]);return B.useEffect((function(){if(!1!==a){var e=Xb(a);return document.addEventListener(e,f),document.addEventListener("touchmove",h),function(){document.removeEventListener(e,f),document.removeEventListener("touchmove",h)}}}),[f,h,a]),B.useEffect((function(){if(!1!==o){var e=Xb(o);return document.addEventListener(e,f),function(){document.removeEventListener(e,f)}}}),[f,o]),B.createElement(B.Fragment,null,B.cloneElement(n,{ref:m}))})),Zb=B.forwardRef((function(e,t){var n=e.children,r=e.classes,o=e.className,i=e.collapsedHeight,a=void 0===i?"0px":i,s=e.component,l=void 0===s?"div":s,c=e.in,u=e.onEnter,d=e.onEntered,p=e.onEntering,m=e.onExit,f=e.onExiting,h=e.style,g=e.timeout,v=void 0===g?zm.standard:g,y=Gp(e,["children","classes","className","collapsedHeight","component","in","onEnter","onEntered","onEntering","onExit","onExiting","style","timeout"]),b=yv(),x=B.useRef(),S=B.useRef(null),E=B.useRef();B.useEffect((function(){return function(){clearTimeout(x.current)}}),[]);return B.createElement(Iv,Up({in:c,onEnter:function(e,t){e.style.height=a,u&&u(e,t)},onEntered:function(e,t){e.style.height="auto",d&&d(e,t)},onEntering:function(e,t){var n=S.current?S.current.clientHeight:0,r=Zv({style:h,timeout:v},{mode:"enter"}).duration;if("auto"===v){var o=b.transitions.getAutoHeightDuration(n);e.style.transitionDuration="".concat(o,"ms"),E.current=o}else e.style.transitionDuration="string"==typeof r?r:"".concat(r,"ms");e.style.height="".concat(n,"px"),p&&p(e,t)},onExit:function(e){var t=S.current?S.current.clientHeight:0;e.style.height="".concat(t,"px"),m&&m(e)},onExiting:function(e){var t=S.current?S.current.clientHeight:0,n=Zv({style:h,timeout:v},{mode:"exit"}).duration;if("auto"===v){var r=b.transitions.getAutoHeightDuration(t);e.style.transitionDuration="".concat(r,"ms"),E.current=r}else e.style.transitionDuration="string"==typeof n?n:"".concat(n,"ms");e.style.height=a,f&&f(e)},addEndListener:function(e,t){"auto"===v&&(x.current=setTimeout(t,E.current||0))},timeout:"auto"===v?null:v},y),(function(e,i){return B.createElement(l,Up({className:ev(r.container,o,{entered:r.entered,exited:!c&&"0px"===a&&r.hidden}[e]),style:Up({minHeight:a},h),ref:t},i),B.createElement("div",{className:r.wrapper,ref:S},B.createElement("div",{className:r.wrapperInner},n)))}))}));Zb.muiSupportAuto=!0;var Qb=bv((function(e){return{container:{height:0,overflow:"hidden",transition:e.transitions.create("height")},entered:{height:"auto",overflow:"visible"},hidden:{visibility:"hidden"},wrapper:{display:"flex"},wrapperInner:{width:"100%"}}}),{name:"MuiCollapse"})(Zb),ex=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"div":o,a=e.fixed,s=void 0!==a&&a,l=e.maxWidth,c=void 0===l?"lg":l,u=Gp(e,["classes","className","component","fixed","maxWidth"]);return B.createElement(i,Up({className:ev(n.root,r,s&&n.fixed,!1!==c&&n["maxWidth".concat(xv(String(c)))]),ref:t},u))}));bv((function(e){var t;return{root:(t={width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},_p(t,e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),_p(t,e.breakpoints.up("md"),{paddingLeft:e.spacing(4),paddingRight:e.spacing(4)}),t),fixed:Object.keys(e.breakpoints.values).reduce((function(t,n){var r=e.breakpoints.values[n];return 0!==r&&(t[e.breakpoints.up(n)]={maxWidth:r}),t}),{}),maxWidthXs:_p({},e.breakpoints.up("xs"),{maxWidth:Math.max(e.breakpoints.values.xs,444)}),maxWidthSm:_p({},e.breakpoints.up("sm"),{maxWidth:e.breakpoints.values.sm}),maxWidthMd:_p({},e.breakpoints.up("md"),{maxWidth:e.breakpoints.values.md}),maxWidthLg:_p({},e.breakpoints.up("lg"),{maxWidth:e.breakpoints.values.lg}),maxWidthXl:_p({},e.breakpoints.up("xl"),{maxWidth:e.breakpoints.values.xl})}}),{name:"MuiContainer"})(ex),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Jg(e,Up({defaultTheme:vv},t))}((function(e){return{"@global":{html:{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box"},"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:"bolder"},body:Up({margin:0,color:e.palette.text.primary},e.typography.body2,{backgroundColor:e.palette.background.default,"@media print":{backgroundColor:e.palette.common.white},"&::backdrop":{backgroundColor:e.palette.background.default}})}}}),{name:"MuiCssBaseline"});var tx="undefined"!=typeof window?B.useLayoutEffect:B.useEffect,nx=B.forwardRef((function(e,t){var n=e.children,r=e.container,o=e.disablePortal,i=void 0!==o&&o,a=e.onRendered,s=B.useState(null),l=s[0],c=s[1],u=ey(n.ref,t);return tx((function(){i||c(function(e){return e="function"==typeof e?e():e,V.findDOMNode(e)}(r)||document.body)}),[r,i]),tx((function(){if(l&&!i)return Qv(t,l),function(){Qv(t,null)}}),[t,l,i]),tx((function(){a&&(l||i)&&a()}),[a,l,i]),i?(B.Children.only(n),B.cloneElement(n,{ref:u})):l?V.createPortal(n,l):l}));function rx(){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),o=0;o<n;o++)r[o]=arguments[o];e.apply(this,r),t.apply(this,r)}}),(function(){}))}function ox(){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}function ix(e){return Kb(e).defaultView||window}function ax(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function sx(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function lx(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4?arguments[4]:void 0,i=[t,n].concat(Ih(r)),a=["TEMPLATE","SCRIPT","STYLE"];[].forEach.call(e.children,(function(e){1===e.nodeType&&-1===i.indexOf(e)&&-1===a.indexOf(e.tagName)&&ax(e,o)}))}function cx(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function ux(e,t){var n,r=[],o=[],i=e.container;if(!t.disableScrollLock){var a=function(e){var t=Kb(e);return t.body===e?ix(t).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(i),s=i.parentElement,l="HTML"===s.nodeName?s:i;if(r.push({value:l.style.overflow,key:"overflow",el:l}),l.style.overflow="hidden",a){var c=ox();r.push({value:i.style.paddingRight,key:"padding-right",el:i}),i.style["padding-right"]="".concat(sx(i)+c,"px"),n=Kb(i).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){o.push(e.style.paddingRight),e.style.paddingRight="".concat(sx(e)+c,"px")}))}}return function(){n&&[].forEach.call(n,(function(e,t){o[t]?e.style.paddingRight=o[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 dx=function(){function e(){Zg(this,e),this.modals=[],this.containers=[]}return Km(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&&ax(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);lx(t,e.mountNode,e.modalRef,r,!0);var o=cx(this.containers,(function(e){return e.container===t}));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblingNodes:r}),n)}},{key:"mount",value:function(e,t){var n=cx(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=ux(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=cx(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&&ax(e.modalRef,!0),lx(r.container,e.mountNode,e.modalRef,r.hiddenSiblingNodes,!1),this.containers.splice(n,1);else{var o=r.modals[r.modals.length-1];o.modalRef&&ax(o.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();function px(e){var t=e.children,n=e.disableAutoFocus,r=void 0!==n&&n,o=e.disableEnforceFocus,i=void 0!==o&&o,a=e.disableRestoreFocus,s=void 0!==a&&a,l=e.getDoc,c=e.isEnabled,u=e.open,d=B.useRef(),p=B.useRef(null),m=B.useRef(null),f=B.useRef(),h=B.useRef(null),g=B.useCallback((function(e){h.current=V.findDOMNode(e)}),[]),v=ey(t.ref,g);return B.useMemo((function(){u&&"undefined"!=typeof window&&(f.current=l().activeElement)}),[u]),B.useEffect((function(){if(u){var e=Kb(h.current);r||!h.current||h.current.contains(e.activeElement)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex",-1),h.current.focus());var t=function(){i||!c()||d.current?d.current=!1:h.current&&!h.current.contains(e.activeElement)&&h.current.focus()},n=function(t){!i&&c()&&9===t.keyCode&&e.activeElement===h.current&&(d.current=!0,t.shiftKey?m.current.focus():p.current.focus())};e.addEventListener("focus",t,!0),e.addEventListener("keydown",n,!0);var o=setInterval((function(){t()}),50);return function(){clearInterval(o),e.removeEventListener("focus",t,!0),e.removeEventListener("keydown",n,!0),s||(f.current&&f.current.focus&&f.current.focus(),f.current=null)}}}),[r,i,s,c,u]),B.createElement(B.Fragment,null,B.createElement("div",{tabIndex:0,ref:p,"data-test":"sentinelStart"}),B.cloneElement(t,{ref:v}),B.createElement("div",{tabIndex:0,ref:m,"data-test":"sentinelEnd"}))}var mx={root:{zIndex:-1,position:"fixed",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",touchAction:"none"},invisible:{backgroundColor:"transparent"}},fx=B.forwardRef((function(e,t){var n=e.invisible,r=void 0!==n&&n,o=e.open,i=Gp(e,["invisible","open"]);return o?B.createElement("div",Up({"aria-hidden":!0,ref:t},i,{style:Up({},mx.root,{},r?mx.invisible:{},{},i.style)})):null}));var hx=new dx,gx=B.forwardRef((function(e,t){var n=qg(),r=_m({name:"MuiModal",props:Up({},e),theme:n}),o=r.BackdropComponent,i=void 0===o?fx:o,a=r.BackdropProps,s=r.children,l=r.closeAfterTransition,c=void 0!==l&&l,u=r.container,d=r.disableAutoFocus,p=void 0!==d&&d,m=r.disableBackdropClick,f=void 0!==m&&m,h=r.disableEnforceFocus,g=void 0!==h&&h,v=r.disableEscapeKeyDown,y=void 0!==v&&v,b=r.disablePortal,x=void 0!==b&&b,S=r.disableRestoreFocus,E=void 0!==S&&S,M=r.disableScrollLock,C=void 0!==M&&M,w=r.hideBackdrop,k=void 0!==w&&w,N=r.keepMounted,T=void 0!==N&&N,O=r.manager,R=void 0===O?hx:O,A=r.onBackdropClick,L=r.onClose,I=r.onEscapeKeyDown,P=r.onRendered,D=r.open,q=Gp(r,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),z=B.useState(!0),$=z[0],F=z[1],H=B.useRef({}),j=B.useRef(null),W=B.useRef(null),_=ey(W,t),U=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(r),Y=function(){return Kb(j.current)},G=function(){return H.current.modalRef=W.current,H.current.mountNode=j.current,H.current},K=function(){R.mount(G(),{disableScrollLock:C}),W.current.scrollTop=0},X=cy((function(){var e=function(e){return e="function"==typeof e?e():e,V.findDOMNode(e)}(u)||Y().body;R.add(G(),e),W.current&&K()})),J=B.useCallback((function(){return R.isTopModal(G())}),[R]),Z=cy((function(e){j.current=e,e&&(P&&P(),D&&J()?K():ax(W.current,!0))})),Q=B.useCallback((function(){R.remove(G())}),[R]);if(B.useEffect((function(){return function(){Q()}}),[Q]),B.useEffect((function(){D?X():U&&c||Q()}),[D,Q,U,c,X]),!T&&!D&&(!U||$))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:Fm}),te={};return void 0===s.props.tabIndex&&(te.tabIndex=s.props.tabIndex||"-1"),U&&(te.onEnter=rx((function(){F(!1)}),s.props.onEnter),te.onExited=rx((function(){F(!0),c&&Q()}),s.props.onExited)),B.createElement(nx,{ref:Z,container:u,disablePortal:x},B.createElement("div",Up({ref:_,onKeyDown:function(e){"Escape"===e.key&&J()&&(e.stopPropagation(),I&&I(e),!y&&L&&L(e,"escapeKeyDown"))},role:"presentation"},q,{style:Up({},ee.root,{},!D&&$?ee.hidden:{},{},q.style)}),k?null:B.createElement(i,Up({open:D,onClick:function(e){e.target===e.currentTarget&&(A&&A(e),!f&&L&&L(e,"backdropClick"))}},a)),B.createElement(px,{disableEnforceFocus:g,disableAutoFocus:p,disableRestoreFocus:E,getDoc:Y,isEnabled:J,open:D},B.cloneElement(s,te))))})),vx={enter:zm.enteringScreen,exit:zm.leavingScreen},yx=B.forwardRef((function(e,t){var n=e.BackdropProps,r=e.children,o=e.classes,i=e.className,a=e.disableBackdropClick,s=void 0!==a&&a,l=e.disableEscapeKeyDown,c=void 0!==l&&l,u=e.fullScreen,d=void 0!==u&&u,p=e.fullWidth,m=void 0!==p&&p,f=e.maxWidth,h=void 0===f?"sm":f,g=e.onBackdropClick,v=e.onClose,y=e.onEnter,b=e.onEntered,x=e.onEntering,S=e.onEscapeKeyDown,E=e.onExit,M=e.onExited,C=e.onExiting,w=e.open,k=e.PaperComponent,N=void 0===k?Ev:k,T=e.PaperProps,O=void 0===T?{}:T,R=e.scroll,A=void 0===R?"paper":R,L=e.TransitionComponent,I=void 0===L?ry:L,P=e.transitionDuration,D=void 0===P?vx:P,q=e.TransitionProps,z=e["aria-describedby"],$=e["aria-labelledby"],F=Gp(e,["BackdropProps","children","classes","className","disableBackdropClick","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","onEnter","onEntered","onEntering","onEscapeKeyDown","onExit","onExited","onExiting","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps","aria-describedby","aria-labelledby"]),H=B.useRef();return B.createElement(gx,Up({className:ev(o.root,i),BackdropComponent:iy,BackdropProps:Up({transitionDuration:D},n),closeAfterTransition:!0,disableBackdropClick:s,disableEscapeKeyDown:c,onEscapeKeyDown:S,onClose:v,open:w,ref:t},F),B.createElement(I,Up({appear:!0,in:w,timeout:D,onEnter:y,onEntering:x,onEntered:b,onExit:E,onExiting:C,onExited:M,role:"none presentation"},q),B.createElement("div",{className:ev(o.container,o["scroll".concat(xv(A))]),onClick:function(e){e.target===e.currentTarget&&e.target===H.current&&(H.current=null,g&&g(e),!s&&v&&v(e,"backdropClick"))},onMouseDown:function(e){H.current=e.target}},B.createElement(N,Up({elevation:24,role:"dialog","aria-describedby":z,"aria-labelledby":$},O,{className:ev(o.paper,o["paperScroll".concat(xv(A))],o["paperWidth".concat(xv(String(h)))],O.className,d&&o.paperFullScreen,m&&o.paperFullWidth)}),r))))}));bv((function(e){return{root:{"@media print":{position:"absolute !important"}},scrollPaper:{display:"flex",justifyContent:"center",alignItems:"center"},scrollBody:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}},container:{height:"100%","@media print":{height:"auto"},outline:0},paper:{margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},paperScrollPaper:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},paperScrollBody:{display:"inline-block",verticalAlign:"middle",textAlign:"left"},paperWidthFalse:{maxWidth:"calc(100% - 64px)"},paperWidthXs:{maxWidth:Math.max(e.breakpoints.values.xs,444),"&$paperScrollBody":_p({},e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64),{maxWidth:"calc(100% - 64px)"})},paperWidthSm:{maxWidth:e.breakpoints.values.sm,"&$paperScrollBody":_p({},e.breakpoints.down(e.breakpoints.values.sm+64),{maxWidth:"calc(100% - 64px)"})},paperWidthMd:{maxWidth:e.breakpoints.values.md,"&$paperScrollBody":_p({},e.breakpoints.down(e.breakpoints.values.md+64),{maxWidth:"calc(100% - 64px)"})},paperWidthLg:{maxWidth:e.breakpoints.values.lg,"&$paperScrollBody":_p({},e.breakpoints.down(e.breakpoints.values.lg+64),{maxWidth:"calc(100% - 64px)"})},paperWidthXl:{maxWidth:e.breakpoints.values.xl,"&$paperScrollBody":_p({},e.breakpoints.down(e.breakpoints.values.xl+64),{maxWidth:"calc(100% - 64px)"})},paperFullWidth:{width:"calc(100% - 64px)"},paperFullScreen:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,"&$paperScrollBody":{margin:0,maxWidth:"100%"}}}}),{name:"MuiDialog"})(yx);var bx=B.forwardRef((function(e,t){var n=e.disableSpacing,r=void 0!==n&&n,o=e.classes,i=e.className,a=Gp(e,["disableSpacing","classes","className"]);return B.createElement("div",Up({className:ev(o.root,i,!r&&o.spacing),ref:t},a))}));bv({root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},spacing:{"& > * + *":{marginLeft:8}}},{name:"MuiDialogActions"})(bx);var xx=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.dividers,i=void 0!==o&&o,a=Gp(e,["classes","className","dividers"]);return B.createElement("div",Up({className:ev(n.root,r,i&&n.dividers),ref:t},a))}));bv((function(e){return{root:{flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"8px 24px","&:first-child":{paddingTop:20}},dividers:{padding:"16px 24px",borderTop:"1px solid ".concat(e.palette.divider),borderBottom:"1px solid ".concat(e.palette.divider)}}}),{name:"MuiDialogContent"})(xx);var Sx=B.forwardRef((function(e,t){return B.createElement(pb,Up({component:"p",variant:"body1",color:"textSecondary",ref:t},e))}));bv({root:{marginBottom:12}},{name:"MuiDialogContentText"})(Sx);var Ex=B.forwardRef((function(e,t){var n=e.children,r=e.classes,o=e.className,i=e.disableTypography,a=void 0!==i&&i,s=Gp(e,["children","classes","className","disableTypography"]);return B.createElement("div",Up({className:ev(r.root,o),ref:t},s),a?n:B.createElement(pb,{component:"h2",variant:"h6"},n))}));bv({root:{margin:0,padding:"16px 24px",flex:"0 0 auto"}},{name:"MuiDialogTitle"})(Ex);var Mx=B.forwardRef((function(e,t){var n=e.absolute,r=void 0!==n&&n,o=e.classes,i=e.className,a=e.component,s=void 0===a?"hr":a,l=e.light,c=void 0!==l&&l,u=e.orientation,d=void 0===u?"horizontal":u,p=e.role,m=void 0===p?"hr"!==s?"separator":void 0:p,f=e.variant,h=void 0===f?"fullWidth":f,g=Gp(e,["absolute","classes","className","component","light","orientation","role","variant"]);return B.createElement(s,Up({className:ev(o.root,i,"fullWidth"!==h&&o[h],r&&o.absolute,c&&o.light,{vertical:o.vertical}[d]),role:m,ref:t},g))}));function Cx(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var a=this,s=function(){e.apply(a,o)};clearTimeout(t),t=setTimeout(s,n)}return r.clear=function(){clearTimeout(t)},r}function wx(e,t){var n=function(e,t){var n,r=t.getBoundingClientRect();if(t.fakeTransform)n=t.fakeTransform;else{var o=window.getComputedStyle(t);n=o.getPropertyValue("-webkit-transform")||o.getPropertyValue("transform")}var i=0,a=0;if(n&&"none"!==n&&"string"==typeof n){var s=n.split("(")[1].split(")")[0].split(",");i=parseInt(s[4],10),a=parseInt(s[5],10)}return"left"===e?"translateX(".concat(window.innerWidth,"px) translateX(-").concat(r.left-i,"px)"):"right"===e?"translateX(-".concat(r.left+r.width-i,"px)"):"up"===e?"translateY(".concat(window.innerHeight,"px) translateY(-").concat(r.top-a,"px)"):"translateY(-".concat(r.top+r.height-a,"px)")}(e,t);n&&(t.style.webkitTransform=n,t.style.transform=n)}bv((function(e){return{root:{height:1,margin:0,border:"none",flexShrink:0,backgroundColor:e.palette.divider},absolute:{position:"absolute",bottom:0,left:0,width:"100%"},inset:{marginLeft:72},light:{backgroundColor:jp(e.palette.divider,.08)},middle:{marginLeft:e.spacing(2),marginRight:e.spacing(2)},vertical:{height:"100%",width:1}}}),{name:"MuiDivider"})(Mx);var kx={enter:zm.enteringScreen,exit:zm.leavingScreen},Nx=B.forwardRef((function(e,t){var n=e.children,r=e.direction,o=void 0===r?"down":r,i=e.in,a=e.onEnter,s=e.onEntering,l=e.onExit,c=e.onExited,u=e.style,d=e.timeout,p=void 0===d?kx:d,m=Gp(e,["children","direction","in","onEnter","onEntering","onExit","onExited","style","timeout"]),f=yv(),h=B.useRef(null),g=B.useCallback((function(e){h.current=V.findDOMNode(e)}),[]),v=ey(n.ref,g),y=ey(v,t),b=B.useCallback((function(){h.current&&wx(o,h.current)}),[o]);return B.useEffect((function(){if(!i&&"down"!==o&&"right"!==o){var e=Cx((function(){h.current&&wx(o,h.current)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[o,i]),B.useEffect((function(){i||b()}),[i,b]),B.createElement(Iv,Up({onEnter:function(e,t){var n=h.current;wx(o,n),Jv(n),a&&a(n,t)},onEntering:function(e,t){var n=h.current,r=Zv({timeout:p,style:u},{mode:"enter"});n.style.webkitTransition=f.transitions.create("-webkit-transform",Up({},r,{easing:f.transitions.easing.easeOut})),n.style.transition=f.transitions.create("transform",Up({},r,{easing:f.transitions.easing.easeOut})),n.style.webkitTransform="none",n.style.transform="none",s&&s(n,t)},onExit:function(){var e=h.current,t=Zv({timeout:p,style:u},{mode:"exit"});e.style.webkitTransition=f.transitions.create("-webkit-transform",Up({},t,{easing:f.transitions.easing.sharp})),e.style.transition=f.transitions.create("transform",Up({},t,{easing:f.transitions.easing.sharp})),wx(o,e),l&&l(e)},onExited:function(){var e=h.current;e.style.webkitTransition="",e.style.transition="",c&&c(e)},appear:!0,in:i,timeout:p},m),(function(e,t){return B.cloneElement(n,Up({ref:y,style:Up({visibility:"exited"!==e||i?void 0:"hidden"},u,{},n.props.style)},t))}))})),Tx={left:"right",right:"left",top:"down",bottom:"up"};function Ox(e){return-1!==["left","right"].indexOf(e)}function Rx(e,t){return"rtl"===e.direction&&Ox(t)?Tx[t]:t}var Ax={enter:zm.enteringScreen,exit:zm.leavingScreen},Lx=B.forwardRef((function(e,t){var n=e.anchor,r=void 0===n?"left":n,o=e.BackdropProps,i=e.children,a=e.classes,s=e.className,l=e.elevation,c=void 0===l?16:l,u=e.ModalProps,d=(u=void 0===u?{}:u).BackdropProps,p=Gp(u,["BackdropProps"]),m=e.onClose,f=e.open,h=void 0!==f&&f,g=e.PaperProps,v=e.SlideProps,y=e.transitionDuration,b=void 0===y?Ax:y,x=e.variant,S=void 0===x?"temporary":x,E=Gp(e,["anchor","BackdropProps","children","classes","className","elevation","ModalProps","onClose","open","PaperProps","SlideProps","transitionDuration","variant"]),M=yv(),C=B.useRef(!1);B.useEffect((function(){C.current=!0}),[]);var w=Rx(M,r),k=B.createElement(Ev,Up({elevation:"temporary"===S?c:0,square:!0,className:ev(a.paper,a["paperAnchor".concat(xv(w))],"temporary"!==S&&a["paperAnchorDocked".concat(xv(w))])},g),i);if("permanent"===S)return B.createElement("div",Up({className:ev(a.root,a.docked,s),ref:t},E),k);var N=B.createElement(Nx,Up({in:h,direction:Tx[w],timeout:b,appear:C.current},v),k);return"persistent"===S?B.createElement("div",Up({className:ev(a.root,a.docked,s),ref:t},E),N):B.createElement(gx,Up({BackdropProps:Up({},o,{},d,{transitionDuration:b}),BackdropComponent:iy,className:ev(a.root,a.modal,s),open:h,onClose:m,ref:t},E,p),N)})),Ix=bv((function(e){return{root:{},docked:{flex:"0 0 auto"},paper:{overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:e.zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0},paperAnchorLeft:{left:0,right:"auto"},paperAnchorRight:{left:"auto",right:0},paperAnchorTop:{top:0,left:0,bottom:"auto",right:0,height:"auto",maxHeight:"100%"},paperAnchorBottom:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"},paperAnchorDockedLeft:{borderRight:"1px solid ".concat(e.palette.divider)},paperAnchorDockedTop:{borderBottom:"1px solid ".concat(e.palette.divider)},paperAnchorDockedRight:{borderLeft:"1px solid ".concat(e.palette.divider)},paperAnchorDockedBottom:{borderTop:"1px solid ".concat(e.palette.divider)},modal:{}}}),{name:"MuiDrawer",flip:!1})(Lx);var Px=B.createContext({}),Dx=B.forwardRef((function(e,t){var n,r=e.children,o=e.classes,i=e.className,a=e.defaultExpanded,s=void 0!==a&&a,l=e.disabled,c=void 0!==l&&l,u=e.expanded,d=e.onChange,p=e.square,m=void 0!==p&&p,f=e.TransitionComponent,h=void 0===f?Qb:f,g=e.TransitionProps,v=Gp(e,["children","classes","className","defaultExpanded","disabled","expanded","onChange","square","TransitionComponent","TransitionProps"]),y=B.useRef(null!=u).current,b=B.useState(s),x=b[0],S=b[1],E=y?u:x,M=B.useCallback((function(e){y||S(!E),d&&d(e,!E)}),[E,y,d]),C=B.Children.toArray(r),w=Zy(n=C)||Lh(n)||Qy(),k=w[0],N=w.slice(1),T=B.useMemo((function(){return{expanded:E,disabled:c,toggle:M}}),[E,c,M]);return B.createElement(Ev,Up({className:ev(o.root,i,E&&o.expanded,c&&o.disabled,!m&&o.rounded),ref:t,square:m},v),B.createElement(Px.Provider,{value:T},k),B.createElement(h,Up({in:E,timeout:"auto"},g),B.createElement("div",{"aria-labelledby":k.props.id,id:k.props["aria-controls"],role:"region"},N)))}));bv((function(e){var t={duration:e.transitions.duration.shortest};return{root:{position:"relative",transition:e.transitions.create(["margin"],t),"&:before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:e.palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-child":{"&:before":{display:"none"}},"&$expanded":{margin:"16px 0","&:first-child":{marginTop:0},"&:last-child":{marginBottom:0},"&:before":{opacity:0}},"&$expanded + &":{"&:before":{display:"none"}},"&$disabled":{backgroundColor:e.palette.action.disabledBackground}},rounded:{borderRadius:0,"&:first-child":{borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius},"&:last-child":{borderBottomLeftRadius:e.shape.borderRadius,borderBottomRightRadius:e.shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}},expanded:{},disabled:{}}}),{name:"MuiExpansionPanel"})(Dx);var qx=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.disableSpacing,i=void 0!==o&&o,a=Gp(e,["classes","className","disableSpacing"]);return B.createElement("div",Up({className:ev(n.root,r,!i&&n.spacing),ref:t},a))}));bv({root:{display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end"},spacing:{"& > * + *":{marginLeft:8}}},{name:"MuiExpansionPanelActions"})(qx);var zx=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=Gp(e,["classes","className"]);return B.createElement("div",Up({className:ev(n.root,r),ref:t},o))}));bv({root:{display:"flex",padding:"8px 24px 24px"}},{name:"MuiExpansionPanelDetails"})(zx);var $x=B.forwardRef((function(e,t){var n=e.children,r=e.classes,o=e.className,i=e.expandIcon,a=e.IconButtonProps,s=e.onBlur,l=e.onClick,c=e.onFocusVisible,u=Gp(e,["children","classes","className","expandIcon","IconButtonProps","onBlur","onClick","onFocusVisible"]),d=B.useState(!1),p=d[0],m=d[1],f=B.useContext(Px),h=f.disabled,g=void 0!==h&&h,v=f.expanded,y=f.toggle;return B.createElement(Ty,Up({focusRipple:!1,disableRipple:!0,disabled:g,component:"div","aria-expanded":v,className:ev(r.root,o,g&&r.disabled,v&&r.expanded,p&&r.focused),onFocusVisible:function(e){m(!0),c&&c(e)},onBlur:function(e){m(!1),s&&s(e)},onClick:function(e){y&&y(e),l&&l(e)},ref:t},u),B.createElement("div",{className:ev(r.content,v&&r.expanded)},n),i&&B.createElement(Pb,Up({className:ev(r.expandIcon,v&&r.expanded),edge:"end",component:"div",tabIndex:null,role:null,"aria-hidden":!0},a),i))}));bv((function(e){var t={duration:e.transitions.duration.shortest};return{root:{display:"flex",minHeight:48,transition:e.transitions.create(["min-height","background-color"],t),padding:"0 24px 0 24px","&:hover:not($disabled)":{cursor:"pointer"},"&$expanded":{minHeight:64},"&$focused":{backgroundColor:e.palette.grey[300]},"&$disabled":{opacity:.38}},expanded:{},focused:{},disabled:{},content:{display:"flex",flexGrow:1,transition:e.transitions.create(["margin"],t),margin:"12px 0","&$expanded":{margin:"20px 0"}},expandIcon:{transform:"rotate(0deg)",transition:e.transitions.create("transform",t),"&:hover":{backgroundColor:"transparent"},"&$expanded":{transform:"rotate(180deg)"}}}}),{name:"MuiExpansionPanelSummary"})($x);var Bx=B.forwardRef((function(e,t){var n=e.children,r=e.classes,o=e.className,i=e.color,a=void 0===i?"default":i,s=e.component,l=void 0===s?"button":s,c=e.disabled,u=void 0!==c&&c,d=e.disableFocusRipple,p=void 0!==d&&d,m=e.focusVisibleClassName,f=e.size,h=void 0===f?"large":f,g=e.variant,v=void 0===g?"round":g,y=Gp(e,["children","classes","className","color","component","disabled","disableFocusRipple","focusVisibleClassName","size","variant"]);return B.createElement(Ty,Up({className:ev(r.root,o,"round"!==v&&r.extended,"large"!==h&&r["size".concat(xv(h))],u&&r.disabled,{primary:r.primary,secondary:r.secondary,inherit:r.colorInherit}[a]),component:l,disabled:u,focusRipple:!p,focusVisibleClassName:ev(r.focusVisible,m),ref:t},y),B.createElement("span",{className:r.label},n))}));function Fx(e){var t=e.props,n=e.states,r=e.muiFormControl;return n.reduce((function(e,n){return e[n]=t[n],r&&void 0===t[n]&&(e[n]=r[n]),e}),{})}function Hx(e,t){return parseInt(e[t],10)||0}bv((function(e){return{root:Up({},e.typography.button,{boxSizing:"border-box",minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,boxShadow:e.shadows[6],"&:active":{boxShadow:e.shadows[12]},color:e.palette.getContrastText(e.palette.grey[300]),backgroundColor:e.palette.grey[300],"&$focusVisible":{boxShadow:e.shadows[6]},"&:hover":{backgroundColor:e.palette.grey.A100,"@media (hover: none)":{backgroundColor:e.palette.grey[300]},"&$disabled":{backgroundColor:e.palette.action.disabledBackground},textDecoration:"none"},"&$disabled":{color:e.palette.action.disabled,boxShadow:e.shadows[0],backgroundColor:e.palette.action.disabledBackground}}),label:{width:"100%",display:"inherit",alignItems:"inherit",justifyContent:"inherit"},primary:{color:e.palette.primary.contrastText,backgroundColor:e.palette.primary.main,"&:hover":{backgroundColor:e.palette.primary.dark,"@media (hover: none)":{backgroundColor:e.palette.primary.main}}},secondary:{color:e.palette.secondary.contrastText,backgroundColor:e.palette.secondary.main,"&:hover":{backgroundColor:e.palette.secondary.dark,"@media (hover: none)":{backgroundColor:e.palette.secondary.main}}},extended:{borderRadius:24,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48,"&$sizeSmall":{width:"auto",padding:"0 8px",borderRadius:17,minWidth:34,height:34},"&$sizeMedium":{width:"auto",padding:"0 16px",borderRadius:20,minWidth:40,height:40}},focusVisible:{},disabled:{},colorInherit:{color:"inherit"},sizeSmall:{width:40,height:40},sizeMedium:{width:48,height:48}}}),{name:"MuiFab"})(Bx);var jx="undefined"!=typeof window?B.useLayoutEffect:B.useEffect,Vx={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"},Wx=B.forwardRef((function(e,t){var n=e.onChange,r=e.rows,o=e.rowsMax,i=e.style,a=e.value,s=Gp(e,["onChange","rows","rowsMax","style","value"]),l=B.useRef(null!=a).current,c=B.useRef(null),u=ey(t,c),d=B.useRef(null),p=B.useState({}),m=p[0],f=p[1],h=B.useCallback((function(){var t=c.current,n=window.getComputedStyle(t),i=d.current;i.style.width=n.width,i.value=t.value||e.placeholder||"x";var a=n["box-sizing"],s=Hx(n,"padding-bottom")+Hx(n,"padding-top"),l=Hx(n,"border-bottom-width")+Hx(n,"border-top-width"),u=i.scrollHeight-s;i.value="x";var p=i.scrollHeight-s,m=u;null!=r&&(m=Math.max(Number(r)*p,m)),null!=o&&(m=Math.min(Number(o)*p,m));var h=(m=Math.max(m,p))+("border-box"===a?s+l:0),g=Math.abs(m-u)<=1;f((function(e){return h>0&&Math.abs((e.outerHeightStyle||0)-h)>1||e.overflow!==g?{overflow:g,outerHeightStyle:h}:e}))}),[r,o,e.placeholder]);B.useEffect((function(){var e=Cx((function(){h()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[h]),jx((function(){h()}));return B.createElement(B.Fragment,null,B.createElement("textarea",Up({value:a,onChange:function(e){l||h(),n&&n(e)},ref:u,rows:r||1,style:Up({height:m.outerHeightStyle,overflow:m.overflow?"hidden":null},i)},s)),B.createElement("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:d,tabIndex:-1,style:Up({},Vx,{},i)}))}));function _x(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function Ux(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(_x(e.value)&&""!==e.value||t&&_x(e.defaultValue)&&""!==e.defaultValue)}var Yx="undefined"==typeof window?B.useEffect:B.useLayoutEffect,Gx=B.forwardRef((function(e,t){var n=e["aria-describedby"],r=e.autoComplete,o=e.autoFocus,i=e.classes,a=e.className;e.color;var s=e.defaultValue,l=e.disabled,c=e.endAdornment;e.error;var u=e.fullWidth,d=void 0!==u&&u,p=e.id,m=e.inputComponent,f=void 0===m?"input":m,h=e.inputProps,g=void 0===h?{}:h,v=e.inputRef;e.margin;var y=e.multiline,b=void 0!==y&&y,x=e.name,S=e.onBlur,E=e.onChange,M=e.onClick,C=e.onFocus,w=e.onKeyDown,k=e.onKeyUp,N=e.placeholder,T=e.readOnly,O=e.renderSuffix,R=e.rows,A=e.rowsMax,L=e.select,I=void 0!==L&&L,P=e.startAdornment,D=e.type,q=void 0===D?"text":D,z=e.value,$=Gp(e,["aria-describedby","autoComplete","autoFocus","classes","className","color","defaultValue","disabled","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","rowsMax","select","startAdornment","type","value"]),F=null!=g.value?g.value:z,H=B.useRef(null!=F).current,j=B.useRef(),V=B.useCallback((function(e){}),[]),W=ey(g.ref,V),_=ey(v,W),U=ey(j,_),Y=B.useState(!1),G=Y[0],K=Y[1],X=Ab(),J=Fx({props:e,muiFormControl:X,states:["color","disabled","error","hiddenLabel","margin","required","filled"]});J.focused=X?X.focused:G,B.useEffect((function(){!X&&l&&G&&(K(!1),S&&S())}),[X,l,G,S]);var Z=X&&X.onFilled,Q=X&&X.onEmpty,ee=B.useCallback((function(e){Ux(e)?Z&&Z():Q&&Q()}),[Z,Q]);Yx((function(){H&&ee({value:F})}),[F,ee,H]);B.useEffect((function(){ee(j.current)}),[]);var te=f,ne=Up({},g,{ref:U});"string"!=typeof te?ne=Up({inputRef:U,type:q},ne,{ref:null}):b?R&&!A?te="textarea":(ne=Up({rows:R,rowsMax:A},ne),te=Wx):ne=Up({type:q},ne);return B.useEffect((function(){X&&X.setAdornedStart(Boolean(P))}),[X,P]),B.createElement("div",Up({className:ev(i.root,i["color".concat(xv(J.color||"primary"))],a,J.disabled&&i.disabled,J.error&&i.error,d&&i.fullWidth,J.focused&&i.focused,X&&i.formControl,b&&i.multiline,P&&i.adornedStart,c&&i.adornedEnd,{dense:i.marginDense}[J.margin]),onClick:function(e){j.current&&e.currentTarget===e.target&&j.current.focus(),M&&M(e)},ref:t},$),P,B.createElement(Rb.Provider,{value:null},B.createElement(te,Up({"aria-invalid":J.error,"aria-describedby":n,autoComplete:r,autoFocus:o,defaultValue:s,disabled:J.disabled,id:p,onAnimationStart:function(e){ee(-1!==e.animationName.indexOf("auto-fill-cancel")?j.current:{value:"x"})},name:x,placeholder:N,readOnly:T,required:J.required,rows:R,value:F,onKeyDown:w,onKeyUp:k},ne,{className:ev(i.input,g.className,J.disabled&&i.disabled,b&&i.inputMultiline,I&&i.inputSelect,J.hiddenLabel&&i.inputHiddenLabel,P&&i.inputAdornedStart,c&&i.inputAdornedEnd,{search:i.inputTypeSearch}[q],{dense:i.inputMarginDense}[J.margin]),onBlur:function(e){S&&S(e),g.onBlur&&g.onBlur(e),X&&X.onBlur?X.onBlur(e):K(!1)},onChange:function(e){if(!H){var t=e.target||j.current;if(null==t)throw new TypeError("Material-UI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://material-ui.com/r/input-component-ref-interface for more info.");ee({value:t.value})}for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];g.onChange&&g.onChange.apply(g,[e].concat(r)),E&&E.apply(void 0,[e].concat(r))},onFocus:function(e){J.disabled?e.stopPropagation():(C&&C(e),g.onFocus&&g.onFocus(e),X&&X.onFocus?X.onFocus(e):K(!0))}}))),c,O?O(Up({},J,{startAdornment:P})):null)})),Kx=bv((function(e){var t="light"===e.palette.type,n={color:"currentColor",opacity:t?.42:.5,transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},o={opacity:t?.42:.5};return{root:{fontFamily:e.typography.fontFamily,color:e.palette.text.primary,fontSize:e.typography.pxToRem(16),lineHeight:"1.1875em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center","&$disabled":{color:e.palette.text.disabled,cursor:"default"}},formControl:{},focused:{},disabled:{},adornedStart:{},adornedEnd:{},error:{},marginDense:{},multiline:{padding:"".concat(6,"px 0 ").concat(7,"px"),"&$marginDense":{paddingTop:3}},colorSecondary:{},fullWidth:{width:"100%"},input:{font:"inherit",color:"currentColor",padding:"".concat(6,"px 0 ").concat(7,"px"),border:0,boxSizing:"content-box",background:"none",height:"1.1875em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"$auto-fill-cancel","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&:-ms-input-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{"-webkit-appearance":"none"},"label[data-shrink=false] + $formControl &":{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus:-ms-input-placeholder":o,"&:focus::-ms-input-placeholder":o},"&$disabled":{opacity:1},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"$auto-fill"}},"@keyframes auto-fill":{from:{}},"@keyframes auto-fill-cancel":{from:{}},inputMarginDense:{paddingTop:3},inputSelect:{paddingRight:24},inputMultiline:{height:"auto",resize:"none",padding:0},inputTypeSearch:{"-moz-appearance":"textfield","-webkit-appearance":"textfield"},inputAdornedStart:{},inputAdornedEnd:{},inputHiddenLabel:{}}}),{name:"MuiInputBase"})(Gx),Xx=B.forwardRef((function(e,t){var n=e.disableUnderline,r=e.classes,o=e.fullWidth,i=void 0!==o&&o,a=e.inputComponent,s=void 0===a?"input":a,l=e.multiline,c=void 0!==l&&l,u=e.type,d=void 0===u?"text":u,p=Gp(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return B.createElement(Kx,Up({classes:Up({},r,{root:ev(r.root,!n&&r.underline),underline:null}),fullWidth:i,inputComponent:s,multiline:c,ref:t,type:d},p))}));Xx.muiName="Input";var Jx=bv((function(e){var t="light"===e.palette.type,n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)";return{root:{position:"relative",backgroundColor:r,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:t?"rgba(0, 0, 0, 0.13)":"rgba(255, 255, 255, 0.13)","@media (hover: none)":{backgroundColor:r}},"&$focused":{backgroundColor:t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.09)"},"&$disabled":{backgroundColor:t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)"}},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(n),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:before":{borderBottom:"1px solid ".concat(e.palette.text.primary)},"&$disabled:before":{borderBottomStyle:"dotted"}},focused:{},disabled:{},adornedStart:{paddingLeft:12},adornedEnd:{paddingRight:12},error:{},marginDense:{},multiline:{padding:"27px 12px 10px","&$marginDense":{paddingTop:23,paddingBottom:6}},input:{padding:"27px 12px 10px","&:-webkit-autofill":{WebkitBoxShadow:"dark"===e.palette.type?"0 0 0 100px #266798 inset":null,WebkitTextFillColor:"dark"===e.palette.type?"#fff":null,borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},inputMarginDense:{paddingTop:23,paddingBottom:6},inputHiddenLabel:{paddingTop:18,paddingBottom:19,"&$inputMarginDense":{paddingTop:10,paddingBottom:11}},inputSelect:{paddingRight:24},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}}),{name:"MuiFilledInput"})(Xx);function Zx(e,t){return B.isValidElement(e)&&-1!==t.indexOf(e.type.muiName)}var Qx=B.forwardRef((function(e,t){var n=e.children,r=e.classes,o=e.className,i=e.component,a=void 0===i?"div":i,s=e.disabled,l=void 0!==s&&s,c=e.error,u=void 0!==c&&c,d=e.fullWidth,p=void 0!==d&&d,m=e.hiddenLabel,f=void 0!==m&&m,h=e.margin,g=void 0===h?"none":h,v=e.color,y=void 0===v?"primary":v,b=e.required,x=void 0!==b&&b,S=e.variant,E=void 0===S?"standard":S,M=Gp(e,["children","classes","className","component","disabled","error","fullWidth","hiddenLabel","margin","color","required","variant"]),C=B.useState((function(){var e=!1;return n&&B.Children.forEach(n,(function(t){if(Zx(t,["Input","Select"])){var n=Zx(t,["Select"])?t.props.input:t;n&&n.props.startAdornment&&(e=!0)}})),e})),w=C[0],k=C[1],N=B.useState((function(){var e=!1;return n&&B.Children.forEach(n,(function(t){Zx(t,["Input","Select"])&&Ux(t.props,!0)&&(e=!0)})),e})),T=N[0],O=N[1],R=B.useState(!1),A=R[0],L=R[1];l&&A&&L(!1);var I=B.useCallback((function(){O(!0)}),[]),P={adornedStart:w,setAdornedStart:k,color:y,disabled:l,error:u,filled:T,focused:A,hiddenLabel:f,margin:g,onBlur:function(){L(!1)},onEmpty:B.useCallback((function(){O(!1)}),[]),onFilled:I,onFocus:function(){L(!0)},registerEffect:undefined,required:x,variant:E};return B.createElement(Rb.Provider,{value:P},B.createElement(a,Up({className:ev(r.root,o,"none"!==g&&r["margin".concat(xv(g))],p&&r.fullWidth),ref:t},M),n))})),eS=bv({root:{display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},marginNormal:{marginTop:16,marginBottom:8},marginDense:{marginTop:8,marginBottom:4},fullWidth:{width:"100%"}},{name:"MuiFormControl"})(Qx),tS=B.forwardRef((function(e,t){e.checked;var n=e.classes,r=e.className,o=e.control,i=e.disabled;e.inputRef;var a=e.label,s=e.labelPlacement,l=void 0===s?"end":s;e.name,e.onChange,e.value;var c=Gp(e,["checked","classes","className","control","disabled","inputRef","label","labelPlacement","name","onChange","value"]),u=Lb(),d=i;void 0===d&&void 0!==o.props.disabled&&(d=o.props.disabled),void 0===d&&u&&(d=u.disabled);var p={disabled:d};return["checked","name","onChange","value","inputRef"].forEach((function(t){void 0===o.props[t]&&void 0!==e[t]&&(p[t]=e[t])})),B.createElement("label",Up({className:ev(n.root,r,"end"!==l&&n["labelPlacement".concat(xv(l))],d&&n.disabled),ref:t},c),B.cloneElement(o,p),B.createElement(pb,{component:"span",className:ev(n.label,d&&n.disabled)},a))}));bv((function(e){return{root:{display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,"&$disabled":{cursor:"default"}},labelPlacementStart:{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},labelPlacementTop:{flexDirection:"column-reverse",marginLeft:16},labelPlacementBottom:{flexDirection:"column",marginLeft:16},disabled:{},label:{"&$disabled":{color:e.palette.text.disabled}}}}),{name:"MuiFormControlLabel"})(tS);var nS=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.row,i=void 0!==o&&o,a=Gp(e,["classes","className","row"]);return B.createElement("div",Up({className:ev(n.root,r,i&&n.row),ref:t},a))})),rS=bv({root:{display:"flex",flexDirection:"column",flexWrap:"wrap"},row:{flexDirection:"row"}},{name:"MuiFormGroup"})(nS),oS=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"p":o;e.disabled,e.error,e.filled,e.focused,e.margin,e.required,e.variant;var a=Gp(e,["classes","className","component","disabled","error","filled","focused","margin","required","variant"]),s=Fx({props:e,muiFormControl:Lb(),states:["variant","margin","disabled","error","filled","focused","required"]});return B.createElement(i,Up({className:ev(n.root,("filled"===s.variant||"outlined"===s.variant)&&n.contained,r,s.disabled&&n.disabled,s.error&&n.error,s.filled&&n.filled,s.focused&&n.focused,s.required&&n.required,{dense:n.marginDense}[s.margin]),ref:t},a))})),iS=bv((function(e){return{root:Up({color:e.palette.text.secondary},e.typography.caption,{textAlign:"left",marginTop:8,lineHeight:"1em",minHeight:"1em",margin:0,"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),error:{},disabled:{},marginDense:{marginTop:4},contained:{margin:"8px 14px 0"},focused:{},filled:{},required:{}}}),{name:"MuiFormHelperText"})(oS),aS=B.forwardRef((function(e,t){var n=e.children,r=e.classes,o=e.className;e.color;var i=e.component,a=void 0===i?"label":i;e.disabled,e.error,e.filled,e.focused,e.required;var s=Gp(e,["children","classes","className","color","component","disabled","error","filled","focused","required"]),l=Fx({props:e,muiFormControl:Lb(),states:["color","required","focused","disabled","error","filled"]});return B.createElement(a,Up({className:ev(r.root,r["color".concat(xv(l.color||"primary"))],o,l.disabled&&r.disabled,l.error&&r.error,l.filled&&r.filled,l.focused&&r.focused,l.required&&r.required),ref:t},s),n,l.required&&B.createElement("span",{className:ev(r.asterisk,l.error&&r.error)}," ","*"))})),sS=bv((function(e){return{root:Up({color:e.palette.text.secondary},e.typography.body1,{lineHeight:1,padding:0,"&$focused":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled},"&$error":{color:e.palette.error.main}}),colorSecondary:{"&$focused":{color:e.palette.secondary.main}},focused:{},disabled:{},error:{},filled:{},required:{},asterisk:{"&$error":{color:e.palette.error.main}}}}),{name:"MuiFormLabel"})(aS),lS=[0,1,2,3,4,5,6,7,8,9,10],cS=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12];function uS(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=parseFloat(e);return"".concat(n/t).concat(String(e).replace(String(n),"")||"px")}var dS=B.forwardRef((function(e,t){var n=e.alignContent,r=void 0===n?"stretch":n,o=e.alignItems,i=void 0===o?"stretch":o,a=e.classes,s=e.className,l=e.component,c=void 0===l?"div":l,u=e.container,d=void 0!==u&&u,p=e.direction,m=void 0===p?"row":p,f=e.item,h=void 0!==f&&f,g=e.justify,v=void 0===g?"flex-start":g,y=e.lg,b=void 0!==y&&y,x=e.md,S=void 0!==x&&x,E=e.sm,M=void 0!==E&&E,C=e.spacing,w=void 0===C?0:C,k=e.wrap,N=void 0===k?"wrap":k,T=e.xl,O=void 0!==T&&T,R=e.xs,A=void 0!==R&&R,L=e.zeroMinWidth,I=void 0!==L&&L,P=Gp(e,["alignContent","alignItems","classes","className","component","container","direction","item","justify","lg","md","sm","spacing","wrap","xl","xs","zeroMinWidth"]),D=ev(a.root,s,d&&[a.container,0!==w&&a["spacing-xs-".concat(String(w))]],h&&a.item,I&&a.zeroMinWidth,"row"!==m&&a["direction-xs-".concat(String(m))],"wrap"!==N&&a["wrap-xs-".concat(String(N))],"stretch"!==i&&a["align-items-xs-".concat(String(i))],"stretch"!==r&&a["align-content-xs-".concat(String(r))],"flex-start"!==v&&a["justify-xs-".concat(String(v))],!1!==A&&a["grid-xs-".concat(String(A))],!1!==M&&a["grid-sm-".concat(String(M))],!1!==S&&a["grid-md-".concat(String(S))],!1!==b&&a["grid-lg-".concat(String(b))],!1!==O&&a["grid-xl-".concat(String(O))]);return B.createElement(c,Up({className:D,ref:t},P))}));bv((function(e){return Up({root:{},container:{boxSizing:"border-box",display:"flex",flexWrap:"wrap",width:"100%"},item:{boxSizing:"border-box",margin:"0"},zeroMinWidth:{minWidth:0},"direction-xs-column":{flexDirection:"column"},"direction-xs-column-reverse":{flexDirection:"column-reverse"},"direction-xs-row-reverse":{flexDirection:"row-reverse"},"wrap-xs-nowrap":{flexWrap:"nowrap"},"wrap-xs-wrap-reverse":{flexWrap:"wrap-reverse"},"align-items-xs-center":{alignItems:"center"},"align-items-xs-flex-start":{alignItems:"flex-start"},"align-items-xs-flex-end":{alignItems:"flex-end"},"align-items-xs-baseline":{alignItems:"baseline"},"align-content-xs-center":{alignContent:"center"},"align-content-xs-flex-start":{alignContent:"flex-start"},"align-content-xs-flex-end":{alignContent:"flex-end"},"align-content-xs-space-between":{alignContent:"space-between"},"align-content-xs-space-around":{alignContent:"space-around"},"justify-xs-center":{justifyContent:"center"},"justify-xs-flex-end":{justifyContent:"flex-end"},"justify-xs-space-between":{justifyContent:"space-between"},"justify-xs-space-around":{justifyContent:"space-around"},"justify-xs-space-evenly":{justifyContent:"space-evenly"}},function(e,t){var n={};return lS.forEach((function(r){var o=e.spacing(r);0!==o&&(n["spacing-".concat(t,"-").concat(r)]={margin:"-".concat(uS(o,2)),width:"calc(100% + ".concat(uS(o),")"),"& > $item":{padding:uS(o,2)}})})),n}(e,"xs"),{},e.breakpoints.keys.reduce((function(t,n){return function(e,t,n){var r={};cS.forEach((function(e){var t="grid-".concat(n,"-").concat(e);if(!0!==e)if("auto"!==e){var o="".concat(Math.round(e/12*1e8)/1e6,"%");r[t]={flexBasis:o,flexGrow:0,maxWidth:o}}else r[t]={flexBasis:"auto",flexGrow:0,maxWidth:"none"};else r[t]={flexBasis:0,flexGrow:1,maxWidth:"100%"}})),"xs"===n?Up(e,r):e[t.breakpoints.up(n)]=r}(t,e,n),t}),{}))}),{name:"MuiGrid"})(dS);var pS=B.forwardRef((function(e,t){var n=e.cellHeight,r=void 0===n?180:n,o=e.children,i=e.classes,a=e.className,s=e.cols,l=void 0===s?2:s,c=e.component,u=void 0===c?"ul":c,d=e.spacing,p=void 0===d?4:d,m=e.style,f=Gp(e,["cellHeight","children","classes","className","cols","component","spacing","style"]);return B.createElement(u,Up({className:ev(i.root,a),ref:t,style:Up({margin:-p/2},m)},f),B.Children.map(o,(function(e){if(!B.isValidElement(e))return null;var t=e.props.cols||1,n=e.props.rows||1;return B.cloneElement(e,{style:Up({width:"".concat(100/l*t,"%"),height:"auto"===r?"auto":r*n+p,padding:p/2},e.props.style)})})))}));bv({root:{display:"flex",flexWrap:"wrap",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch"}},{name:"MuiGridList"})(pS);var mS=function(e,t){var n,r,o,i;e&&e.complete&&(e.width/e.height>e.parentElement.offsetWidth/e.parentElement.offsetHeight?((n=e.classList).remove.apply(n,Ih(t.imgFullWidth.split(" "))),(r=e.classList).add.apply(r,Ih(t.imgFullHeight.split(" ")))):((o=e.classList).remove.apply(o,Ih(t.imgFullHeight.split(" "))),(i=e.classList).add.apply(i,Ih(t.imgFullWidth.split(" ")))))};var fS=B.forwardRef((function(e,t){var n=e.children,r=e.classes,o=e.className;e.cols;var i=e.component,a=void 0===i?"li":i;e.rows;var s=Gp(e,["children","classes","className","cols","component","rows"]),l=B.useRef(null);return B.useEffect((function(){!function(e,t){e&&(e.complete?mS(e,t):e.addEventListener("load",(function(){mS(e,t)})))}(l.current,r)})),B.useEffect((function(){var e=Cx((function(){mS(l.current,r)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[r]),B.createElement(a,Up({className:ev(r.root,o),ref:t},s),B.createElement("div",{className:r.tile},B.Children.map(n,(function(e){return B.isValidElement(e)?"img"===e.type||Zx(e,["Image"])?B.cloneElement(e,{ref:l}):e:null}))))}));bv({root:{boxSizing:"border-box",flexShrink:0},tile:{position:"relative",display:"block",height:"100%",overflow:"hidden"},imgFullHeight:{height:"100%",transform:"translateX(-50%)",position:"relative",left:"50%"},imgFullWidth:{width:"100%",position:"relative",transform:"translateY(-50%)",top:"50%"}},{name:"MuiGridListTile"})(fS);var hS=B.forwardRef((function(e,t){var n=e.actionIcon,r=e.actionPosition,o=void 0===r?"right":r,i=e.classes,a=e.className,s=e.subtitle,l=e.title,c=e.titlePosition,u=void 0===c?"bottom":c,d=Gp(e,["actionIcon","actionPosition","classes","className","subtitle","title","titlePosition"]),p=n&&o;return B.createElement("div",Up({className:ev(i.root,a,"top"===u?i.titlePositionTop:i.titlePositionBottom,s&&i.rootSubtitle),ref:t},d),B.createElement("div",{className:ev(i.titleWrap,{left:i.titleWrapActionPosLeft,right:i.titleWrapActionPosRight}[p])},B.createElement("div",{className:i.title},l),s?B.createElement("div",{className:i.subtitle},s):null),n?B.createElement("div",{className:ev(i.actionIcon,{left:i.actionIconActionPosLeft}[p])},n):null)}));function gS(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}bv((function(e){return{root:{position:"absolute",left:0,right:0,height:48,background:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",fontFamily:e.typography.fontFamily},titlePositionBottom:{bottom:0},titlePositionTop:{top:0},rootSubtitle:{height:68},titleWrap:{flexGrow:1,marginLeft:16,marginRight:16,color:e.palette.common.white,overflow:"hidden"},titleWrapActionPosLeft:{marginLeft:0},titleWrapActionPosRight:{marginRight:0},title:{fontSize:e.typography.pxToRem(16),lineHeight:"24px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},subtitle:{fontSize:e.typography.pxToRem(12),lineHeight:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},actionIcon:{},actionIconActionPosLeft:{order:-1}}}),{name:"MuiGridListTileBar"})(hS);var vS={entering:{opacity:1,transform:gS(1)},entered:{opacity:1,transform:"none"}},yS=B.forwardRef((function(e,t){var n=e.children,r=e.in,o=e.onEnter,i=e.onExit,a=e.style,s=e.timeout,l=void 0===s?"auto":s,c=Gp(e,["children","in","onEnter","onExit","style","timeout"]),u=B.useRef(),d=B.useRef(),p=ey(n.ref,t),m=yv();return B.useEffect((function(){return function(){clearTimeout(u.current)}}),[]),B.createElement(Iv,Up({appear:!0,in:r,onEnter:function(e,t){Jv(e);var n,r=Zv({style:a,timeout:l},{mode:"enter"}),i=r.duration,s=r.delay;"auto"===l?(n=m.transitions.getAutoHeightDuration(e.clientHeight),d.current=n):n=i,e.style.transition=[m.transitions.create("opacity",{duration:n,delay:s}),m.transitions.create("transform",{duration:.666*n,delay:s})].join(","),o&&o(e,t)},onExit:function(e){var t,n=Zv({style:a,timeout:l},{mode:"exit"}),r=n.duration,o=n.delay;"auto"===l?(t=m.transitions.getAutoHeightDuration(e.clientHeight),d.current=t):t=r,e.style.transition=[m.transitions.create("opacity",{duration:t,delay:o}),m.transitions.create("transform",{duration:.666*t,delay:o||.333*t})].join(","),e.style.opacity="0",e.style.transform=gS(.75),i&&i(e)},addEndListener:function(e,t){"auto"===l&&(u.current=setTimeout(t,d.current||0))},timeout:"auto"===l?null:l},c),(function(e,t){return B.cloneElement(n,Up({style:Up({opacity:0,transform:gS(.75),visibility:"exited"!==e||r?void 0:"hidden"},vS[e],{},a,{},n.props.style),ref:p},t))}))}));yS.muiSupportAuto=!0;var bS=!1;function xS(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=qg(),r=_m({theme:n,name:"MuiUseMediaQuery",props:{}}),o="function"==typeof e?e(n):e;o=o.replace(/^@media( ?)/m,"");var i="undefined"!=typeof window&&void 0!==window.matchMedia,a=Up({},r,{},t),s=a.defaultMatches,l=void 0!==s&&s,c=a.noSsr,u=void 0!==c&&c,d=a.ssrMatchMedia,p=void 0===d?null:d,m=B.useState((function(){return(bS||u)&&i?window.matchMedia(o).matches:p?p(o).matches:l})),f=m[0],h=m[1];return B.useEffect((function(){var e=!0;if(bS=!0,i){var t=window.matchMedia(o),n=function(){e&&h(t.matches)};return n(),t.addListener(n),function(){e=!1,t.removeListener(n)}}}),[o,i]),f}var SS=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return n?Sm.indexOf(e)<=Sm.indexOf(t):Sm.indexOf(e)<Sm.indexOf(t)},ES=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return n?Sm.indexOf(t)<=Sm.indexOf(e):Sm.indexOf(t)<Sm.indexOf(e)},MS="undefined"==typeof window?B.useEffect:B.useLayoutEffect;function CS(e){var t=e.children,n=e.only,r=e.width,o=yv(),i=!0;if(n)if(Array.isArray(n))for(var a=0;a<n.length;a+=1){if(r===n[a]){i=!1;break}}else n&&r===n&&(i=!1);if(i)for(var s=0;s<o.breakpoints.keys.length;s+=1){var l=o.breakpoints.keys[s],c=e["".concat(l,"Up")],u=e["".concat(l,"Down")];if(c&&SS(l,r)||u&&ES(l,r)){i=!1;break}}return i?t:null}CS.propTypes={children:Mp.exports.node,className:Mp.exports.string,implementation:Mp.exports.oneOf(["js","css"]),initialWidth:Mp.exports.oneOf(["xs","sm","md","lg","xl"]),lgDown:Mp.exports.bool,lgUp:Mp.exports.bool,mdDown:Mp.exports.bool,mdUp:Mp.exports.bool,only:Mp.exports.oneOfType([Mp.exports.oneOf(["xs","sm","md","lg","xl"]),Mp.exports.arrayOf(Mp.exports.oneOf(["xs","sm","md","lg","xl"]))]),smDown:Mp.exports.bool,smUp:Mp.exports.bool,width:Mp.exports.string.isRequired,xlDown:Mp.exports.bool,xlUp:Mp.exports.bool,xsDown:Mp.exports.bool,xsUp:Mp.exports.bool},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=e.withTheme,r=void 0!==n&&n,o=e.noSSR,i=void 0!==o&&o,a=e.initialWidth;function s(e){var n=yv(),o=e.theme||n,s=_m({theme:o,name:"MuiWithWidth",props:Up({},e)}),l=s.initialWidth,c=s.width,u=Gp(s,["initialWidth","width"]),d=B.useState(!1),p=d[0],m=d[1];MS((function(){m(!0)}),[]);var f=Ih(o.breakpoints.keys).reverse().reduce((function(e,t){var n=xS(o.breakpoints.up(t));return!e&&n?t:e}),null),h=Up({width:c||(p||i?f:void 0)||l||a},r?{theme:o}:{},{},u);return void 0===h.width?null:B.createElement(t,h)}return mv(s,t),s}}()(CS);bv((function(e){var t={display:"none"};return e.breakpoints.keys.reduce((function(n,r){return n["only".concat(xv(r))]=_p({},e.breakpoints.only(r),t),n["".concat(r,"Up")]=_p({},e.breakpoints.up(r),t),n["".concat(r,"Down")]=_p({},e.breakpoints.down(r),t),n}),{})}),{name:"PrivateHiddenCss"})((function(e){var t=e.children,n=e.classes,r=e.className;e.lgDown,e.lgUp,e.mdDown,e.mdUp;var o=e.only;e.smDown,e.smUp,e.xlDown,e.xlUp,e.xsDown,e.xsUp,Gp(e,["children","classes","className","lgDown","lgUp","mdDown","mdUp","only","smDown","smUp","xlDown","xlUp","xsDown","xsUp"]);var i=yv(),a=[];r&&a.push(r);for(var s=0;s<i.breakpoints.keys.length;s+=1){var l=i.breakpoints.keys[s],c=e["".concat(l,"Up")],u=e["".concat(l,"Down")];c&&a.push(n["".concat(l,"Up")]),u&&a.push(n["".concat(l,"Down")])}return o&&(Array.isArray(o)?o:[o]).forEach((function(e){a.push(n["only".concat(xv(e))])})),B.createElement("div",{className:a.join(" ")},t)}));var wS=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.color,i=void 0===o?"inherit":o,a=e.component,s=void 0===a?"span":a,l=e.fontSize,c=void 0===l?"default":l,u=Gp(e,["classes","className","color","component","fontSize"]);return B.createElement(s,Up({className:ev("material-icons",n.root,r,"inherit"!==i&&n["color".concat(xv(i))],"default"!==c&&n["fontSize".concat(xv(c))]),"aria-hidden":!0,ref:t},u))}));wS.muiName="Icon",bv((function(e){return{root:{userSelect:"none",fontSize:e.typography.pxToRem(24),width:"1em",height:"1em",overflow:"hidden",flexShrink:0},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(36)}}}),{name:"MuiIcon"})(wS);var kS=B.forwardRef((function(e,t){var n=e.disableUnderline,r=e.classes,o=e.fullWidth,i=void 0!==o&&o,a=e.inputComponent,s=void 0===a?"input":a,l=e.multiline,c=void 0!==l&&l,u=e.type,d=void 0===u?"text":u,p=Gp(e,["disableUnderline","classes","fullWidth","inputComponent","multiline","type"]);return B.createElement(Kx,Up({classes:Up({},r,{root:ev(r.root,!n&&r.underline),underline:null}),fullWidth:i,inputComponent:s,multiline:c,ref:t,type:d},p))}));kS.muiName="Input";var NS=bv((function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return{root:{position:"relative"},formControl:{"label + &":{marginTop:16}},focused:{},disabled:{},colorSecondary:{"&$underline:after":{borderBottomColor:e.palette.secondary.main}},underline:{"&:after":{borderBottom:"2px solid ".concat(e.palette.primary.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},"&$focused:after":{transform:"scaleX(1)"},"&$error:after":{borderBottomColor:e.palette.error.main,transform:"scaleX(1)"},"&:before":{borderBottom:"1px solid ".concat(t),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},"&:hover:not($disabled):before":{borderBottom:"2px solid ".concat(e.palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(t)}},"&$disabled:before":{borderBottomStyle:"dotted"}},error:{},multiline:{},fullWidth:{},input:{},inputMarginDense:{},inputMultiline:{},inputTypeSearch:{}}}),{name:"MuiInput"})(kS),TS=B.forwardRef((function(e,t){var n=e.children,r=e.classes,o=e.className,i=e.component,a=void 0===i?"div":i,s=e.disablePointerEvents,l=void 0!==s&&s,c=e.disableTypography,u=void 0!==c&&c,d=e.position,p=e.variant,m=Gp(e,["children","classes","className","component","disablePointerEvents","disableTypography","position","variant"]),f=Ab()||{},h=p;return p&&f.variant,f&&!h&&(h=f.variant),B.createElement(Rb.Provider,{value:null},B.createElement(a,Up({className:ev(r.root,o,l&&r.disablePointerEvents,f.hiddenLabel&&r.hiddenLabel,{filled:r.filled}[h],{start:r.positionStart,end:r.positionEnd}[d],{dense:r.marginDense}[f.margin]),ref:t},m),"string"!=typeof n||u?n:B.createElement(pb,{color:"textSecondary"},n)))}));bv({root:{display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center"},filled:{"&$positionStart:not($hiddenLabel)":{marginTop:16}},positionStart:{marginRight:8},positionEnd:{marginLeft:8},disablePointerEvents:{pointerEvents:"none"},hiddenLabel:{},marginDense:{}},{name:"MuiInputAdornment"})(TS);var OS=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.disableAnimation,i=void 0!==o&&o;e.margin;var a=e.shrink;e.variant;var s=Gp(e,["classes","className","disableAnimation","margin","shrink","variant"]),l=Lb(),c=a;void 0===c&&l&&(c=l.filled||l.focused||l.adornedStart);var u=Fx({props:e,muiFormControl:l,states:["margin","variant"]});return B.createElement(sS,Up({"data-shrink":c,className:ev(n.root,r,l&&n.formControl,!i&&n.animated,c&&n.shrink,{dense:n.marginDense}[u.margin],{filled:n.filled,outlined:n.outlined}[u.variant]),classes:{focused:n.focused,disabled:n.disabled,error:n.error,required:n.required,asterisk:n.asterisk},ref:t},s))})),RS=bv((function(e){return{root:{display:"block",transformOrigin:"top left"},focused:{},disabled:{},error:{},required:{},asterisk:{},formControl:{position:"absolute",left:0,top:0,transform:"translate(0, 24px) scale(1)"},marginDense:{transform:"translate(0, 21px) scale(1)"},shrink:{transform:"translate(0, 1.5px) scale(0.75)",transformOrigin:"top left"},animated:{transition:e.transitions.create(["color","transform"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},filled:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 20px) scale(1)","&$marginDense":{transform:"translate(12px, 17px) scale(1)"},"&$shrink":{transform:"translate(12px, 10px) scale(0.75)","&$marginDense":{transform:"translate(12px, 7px) scale(0.75)"}}},outlined:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 20px) scale(1)","&$marginDense":{transform:"translate(14px, 12px) scale(1)"},"&$shrink":{transform:"translate(14px, -6px) scale(0.75)"}}}}),{name:"MuiInputLabel"})(OS),AS=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.color,i=void 0===o?"primary":o,a=e.value,s=e.valueBuffer,l=e.variant,c=void 0===l?"indeterminate":l,u=Gp(e,["classes","className","color","value","valueBuffer","variant"]),d=yv(),p={},m={bar1:{},bar2:{}};if(("determinate"===c||"buffer"===c)&&void 0!==a){p["aria-valuenow"]=Math.round(a);var f=a-100;"rtl"===d.direction&&(f=-f),m.bar1.transform="translateX(".concat(f,"%)")}if("buffer"===c&&void 0!==s){var h=(s||0)-100;"rtl"===d.direction&&(h=-h),m.bar2.transform="translateX(".concat(h,"%)")}return B.createElement("div",Up({className:ev(n.root,n["color".concat(xv(i))],r,{determinate:n.determinate,indeterminate:n.indeterminate,buffer:n.buffer,query:n.query}[c]),role:"progressbar"},p,{ref:t},u),"buffer"===c?B.createElement("div",{className:ev(n.dashed,n["dashedColor".concat(xv(i))])}):null,B.createElement("div",{className:ev(n.bar,n["barColor".concat(xv(i))],("indeterminate"===c||"query"===c)&&n.bar1Indeterminate,{determinate:n.bar1Determinate,buffer:n.bar1Buffer}[c]),style:m.bar1}),"determinate"===c?null:B.createElement("div",{className:ev(n.bar,("indeterminate"===c||"query"===c)&&n.bar2Indeterminate,"buffer"===c?[n["color".concat(xv(i))],n.bar2Buffer]:n["barColor".concat(xv(i))]),style:m.bar2}))})),LS=bv((function(e){var t=function(t){return"light"===e.palette.type?Wp(t,.62):Vp(t,.5)},n=t(e.palette.primary.main),r=t(e.palette.secondary.main);return{root:{position:"relative",overflow:"hidden",height:4},colorPrimary:{backgroundColor:n},colorSecondary:{backgroundColor:r},determinate:{},indeterminate:{},buffer:{backgroundColor:"transparent"},query:{transform:"rotate(180deg)"},dashed:{position:"absolute",marginTop:0,height:"100%",width:"100%",animation:"$buffer 3s infinite linear"},dashedColorPrimary:{backgroundImage:"radial-gradient(".concat(n," 0%, ").concat(n," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0px -23px"},dashedColorSecondary:{backgroundImage:"radial-gradient(".concat(r," 0%, ").concat(r," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0px -23px"},bar:{width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},barColorPrimary:{backgroundColor:e.palette.primary.main},barColorSecondary:{backgroundColor:e.palette.secondary.main},bar1Indeterminate:{width:"auto",animation:"$indeterminate1 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite"},bar1Determinate:{transition:"transform .".concat(4,"s linear")},bar1Buffer:{zIndex:1,transition:"transform .".concat(4,"s linear")},bar2Indeterminate:{width:"auto",animation:"$indeterminate2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite",animationDelay:"1.15s"},bar2Buffer:{transition:"transform .".concat(4,"s linear")},"@keyframes indeterminate1":{"0%":{left:"-35%",right:"100%"},"60%":{left:"100%",right:"-90%"},"100%":{left:"100%",right:"-90%"}},"@keyframes indeterminate2":{"0%":{left:"-200%",right:"100%"},"60%":{left:"107%",right:"-8%"},"100%":{left:"107%",right:"-8%"}},"@keyframes buffer":{"0%":{opacity:1,backgroundPosition:"0px -23px"},"50%":{opacity:0,backgroundPosition:"0px -23px"},"100%":{opacity:1,backgroundPosition:"-200px -23px"}}}}),{name:"MuiLinearProgress"})(AS),IS=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.color,i=void 0===o?"primary":o,a=e.component,s=void 0===a?"a":a,l=e.onBlur,c=e.onFocus,u=e.TypographyClasses,d=e.underline,p=void 0===d?"hover":d,m=e.variant,f=void 0===m?"inherit":m,h=Gp(e,["classes","className","color","component","onBlur","onFocus","TypographyClasses","underline","variant"]),g=Sy(),v=g.isFocusVisible,y=g.onBlurVisible,b=g.ref,x=B.useState(!1),S=x[0],E=x[1],M=ey(t,b);return B.createElement(pb,Up({className:ev(n.root,n["underline".concat(xv(p))],r,S&&n.focusVisible,{button:n.button}[s]),classes:u,color:i,component:s,onBlur:function(e){S&&(y(),E(!1)),l&&l(e)},onFocus:function(e){v(e)&&E(!0),c&&c(e)},ref:M,variant:f},h))}));bv({root:{},underlineNone:{textDecoration:"none"},underlineHover:{textDecoration:"none","&:hover":{textDecoration:"underline"}},underlineAlways:{textDecoration:"underline"},button:{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","&::-moz-focus-inner":{borderStyle:"none"},"&$focusVisible":{outline:"auto"}},focusVisible:{}},{name:"MuiLink"})(IS);var PS=B.createContext({}),DS=B.forwardRef((function(e,t){var n=e.children,r=e.classes,o=e.className,i=e.component,a=void 0===i?"ul":i,s=e.dense,l=void 0!==s&&s,c=e.disablePadding,u=void 0!==c&&c,d=e.subheader,p=Gp(e,["children","classes","className","component","dense","disablePadding","subheader"]),m=B.useMemo((function(){return{dense:l}}),[l]);return B.createElement(PS.Provider,{value:m},B.createElement(a,Up({className:ev(r.root,o,l&&r.dense,!u&&r.padding,d&&r.subheader),ref:t},p),d,n))})),qS=bv({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})(DS),zS="undefined"==typeof window?B.useEffect:B.useLayoutEffect,$S=B.forwardRef((function(e,t){var n=e.alignItems,r=void 0===n?"center":n,o=e.autoFocus,i=void 0!==o&&o,a=e.button,s=void 0!==a&&a,l=e.children,c=e.classes,u=e.className,d=e.component,p=e.ContainerComponent,m=void 0===p?"li":p,f=e.ContainerProps,h=(f=void 0===f?{}:f).className,g=Gp(f,["className"]),v=e.dense,y=e.disabled,b=void 0!==y&&y,x=e.disableGutters,S=void 0!==x&&x,E=e.divider,M=void 0!==E&&E,C=e.focusVisibleClassName,w=e.selected,k=void 0!==w&&w,N=Gp(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),T=B.useContext(PS),O={dense:v||T.dense||!1,alignItems:r},R=B.useRef(null);zS((function(){i&&R.current&&R.current.focus()}),[i]);var A=B.Children.toArray(l),L=A.length&&Zx(A[A.length-1],["ListItemSecondaryAction"]),I=ey(B.useCallback((function(e){R.current=V.findDOMNode(e)}),[]),t),P=Up({className:ev(c.root,u,O.dense&&c.dense,!S&&c.gutters,M&&c.divider,b&&c.disabled,s&&c.button,"center"!==r&&c.alignItemsFlexStart,L&&c.secondaryAction,k&&c.selected),disabled:b},N),D=d||"li";return s&&(P.component=d||"div",P.focusVisibleClassName=ev(c.focusVisible,C),D=Ty),L?(D=P.component||d?D:"div","li"===m&&("li"===D?D="div":"li"===P.component&&(P.component="div")),B.createElement(PS.Provider,{value:O},B.createElement(m,Up({className:ev(c.container,h),ref:I},g),B.createElement(D,P,A),A.pop()))):B.createElement(PS.Provider,{value:O},B.createElement(D,Up({ref:I},P),A))})),BS=bv((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"})($S),FS=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=Gp(e,["classes","className"]),i=B.useContext(PS);return B.createElement("div",Up({className:ev(n.root,r,"flex-start"===i.alignItems&&n.alignItemsFlexStart),ref:t},o))}));bv({root:{minWidth:56,flexShrink:0},alignItemsFlexStart:{marginTop:8}},{name:"MuiListItemAvatar"})(FS);var HS=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=Gp(e,["classes","className"]),i=B.useContext(PS);return B.createElement("div",Up({className:ev(n.root,r,"flex-start"===i.alignItems&&n.alignItemsFlexStart),ref:t},o))})),jS=bv((function(e){return{root:{minWidth:56,color:e.palette.action.active,flexShrink:0,display:"inline-flex"},alignItemsFlexStart:{marginTop:8}}}),{name:"MuiListItemIcon"})(HS),VS=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=Gp(e,["classes","className"]);return B.createElement("div",Up({className:ev(n.root,r),ref:t},o))}));VS.muiName="ListItemSecondaryAction",bv({root:{position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"}},{name:"MuiListItemSecondaryAction"})(VS);var WS=B.forwardRef((function(e,t){var n=e.children,r=e.classes,o=e.className,i=e.disableTypography,a=void 0!==i&&i,s=e.inset,l=void 0!==s&&s,c=e.primary,u=e.primaryTypographyProps,d=e.secondary,p=e.secondaryTypographyProps,m=Gp(e,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),f=B.useContext(PS).dense,h=null!=c?c:n;null==h||h.type===pb||a||(h=B.createElement(pb,Up({variant:f?"body2":"body1",className:r.primary,component:"span"},u),h));var g=d;return null==g||g.type===pb||a||(g=B.createElement(pb,Up({variant:"body2",className:r.secondary,color:"textSecondary"},p),g)),B.createElement("div",Up({className:ev(r.root,o,f&&r.dense,l&&r.inset,h&&g&&r.multiline),ref:t},m),h,g)})),_S=bv({root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},{name:"MuiListItemText"})(WS),US=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.color,i=void 0===o?"default":o,a=e.component,s=void 0===a?"li":a,l=e.disableGutters,c=void 0!==l&&l,u=e.disableSticky,d=void 0!==u&&u,p=e.inset,m=void 0!==p&&p,f=Gp(e,["classes","className","color","component","disableGutters","disableSticky","inset"]);return B.createElement(s,Up({className:ev(n.root,r,"default"!==i&&n["color".concat(xv(i))],m&&n.inset,!d&&n.sticky,!c&&n.gutters),ref:t},f))}));function YS(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function GS(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function KS(e){return[e.horizontal,e.vertical].map((function(e){return"number"==typeof e?"".concat(e,"px"):e})).join(" ")}function XS(e){return"function"==typeof e?e():e}bv((function(e){return{root:{boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:e.palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14)},colorPrimary:{color:e.palette.primary.main},colorInherit:{color:"inherit"},gutters:{paddingLeft:16,paddingRight:16},inset:{paddingLeft:72},sticky:{position:"sticky",top:0,zIndex:1,backgroundColor:"inherit"}}}),{name:"MuiListSubheader"})(US);var JS=B.forwardRef((function(e,t){var n=e.action,r=e.anchorEl,o=e.anchorOrigin,i=void 0===o?{vertical:"top",horizontal:"left"}:o,a=e.anchorPosition,s=e.anchorReference,l=void 0===s?"anchorEl":s,c=e.children,u=e.classes,d=e.className,p=e.container,m=e.elevation,f=void 0===m?8:m,h=e.getContentAnchorEl,g=e.marginThreshold,v=void 0===g?16:g,y=e.onEnter,b=e.onEntered,x=e.onEntering,S=e.onExit,E=e.onExited,M=e.onExiting,C=e.open,w=e.PaperProps,k=void 0===w?{}:w,N=e.transformOrigin,T=void 0===N?{vertical:"top",horizontal:"left"}:N,O=e.TransitionComponent,R=void 0===O?yS:O,A=e.transitionDuration,L=void 0===A?"auto":A,I=e.TransitionProps,P=void 0===I?{}:I,D=Gp(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"]),q=B.useRef(),z=B.useCallback((function(e){if("anchorPosition"===l)return a;var t=XS(r),n=(t instanceof ix(t).Element?t:Kb(q.current).body).getBoundingClientRect(),o=0===e?i.vertical:"center";return{top:n.top+YS(n,o),left:n.left+GS(n,i.horizontal)}}),[r,i.horizontal,i.vertical,a,l]),$=B.useCallback((function(e){var t=0;if(h&&"anchorEl"===l){var n=h(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}),[i.vertical,l,h]),F=B.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:YS(e,T.vertical)+t,horizontal:GS(e,T.horizontal)}}),[T.horizontal,T.vertical]),H=B.useCallback((function(e){var t=$(e),n={width:e.offsetWidth,height:e.offsetHeight},o=F(n,t);if("none"===l)return{top:null,left:null,transformOrigin:KS(o)};var i=z(t),a=i.top-o.vertical,s=i.left-o.horizontal,c=a+n.height,u=s+n.width,d=ix(XS(r)),p=d.innerHeight-v,m=d.innerWidth-v;if(a<v){var f=a-v;a-=f,o.vertical+=f}else if(c>p){var h=c-p;a-=h,o.vertical+=h}if(s<v){var g=s-v;s-=g,o.horizontal+=g}else if(u>m){var y=u-m;s-=y,o.horizontal+=y}return{top:"".concat(a,"px"),left:"".concat(s,"px"),transformOrigin:KS(o)}}),[r,l,z,$,F,v]),j=B.useCallback((function(e){var t=H(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}),[H]),W=B.useCallback((function(e){q.current=V.findDOMNode(e)}),[]),_=B.useMemo((function(){if(C)return Cx((function(){j(q.current)}))}),[C,j]);B.useImperativeHandle(n,(function(){return C?{updatePosition:_}:null}),[C,_]),B.useEffect((function(){if(_)return window.addEventListener("resize",_),function(){window.removeEventListener("resize",_),_.clear()}}),[_]);var U=L;"auto"!==L||R.muiSupportAuto||(U=void 0);var Y=p||(r?Kb(XS(r)).body:void 0);return B.createElement(gx,Up({container:Y,open:C,ref:t,BackdropProps:{invisible:!0},className:ev(u.root,d)},D),B.createElement(R,Up({appear:!0,in:C,onEnter:y,onEntered:b,onExit:S,onExited:E,onExiting:M,timeout:U},P,{onEntering:rx((function(e,t){x&&x(e,t),j(e)}),P.onEntering)}),B.createElement(Ev,Up({elevation:f,ref:W},k,{className:ev(u.paper,k.className)}),c)))})),ZS=bv({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(JS);function QS(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function eE(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function tE(e,t){if(void 0===t)return!0;var n=e.innerText;return void 0===n&&(n=e.textContent),void 0!==n&&(0!==(n=n.trim().toLowerCase()).length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join(""))))}function nE(e,t,n,r,o){for(var i=!1,a=r(e,t,!!t&&n);a;){if(a===e.firstChild){if(i)return!1;i=!0}if(a.hasAttribute("tabindex")&&!a.disabled&&"true"!==a.getAttribute("aria-disabled")&&tE(a,o))return a.focus(),!0;a=r(e,a,n)}return!1}var rE="undefined"==typeof window?B.useEffect:B.useLayoutEffect,oE=B.forwardRef((function(e,t){var n=e.actions,r=e.autoFocus,o=void 0!==r&&r,i=e.autoFocusItem,a=void 0!==i&&i,s=e.children,l=e.className,c=e.onKeyDown,u=e.disableListWrap,d=void 0!==u&&u,p=e.variant,m=void 0===p?"selectedMenu":p,f=Gp(e,["actions","autoFocus","autoFocusItem","children","className","onKeyDown","disableListWrap","variant"]),h=B.useRef(null),g=B.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});rE((function(){o&&h.current.focus()}),[o]),B.useImperativeHandle(n,(function(){return{adjustStyleForScrollbar:function(e,t){var n=!h.current.style.width;if(e.clientHeight<h.current.clientHeight&&n){var r="".concat(ox(),"px");h.current.style["rtl"===t.direction?"paddingLeft":"paddingRight"]=r,h.current.style.width="calc(100% + ".concat(r,")")}return h.current}}}),[]);var v=ey(B.useCallback((function(e){h.current=V.findDOMNode(e)}),[]),t),y=-1;B.Children.forEach(s,(function(e,t){B.isValidElement(e)&&(e.props.disabled||("selectedMenu"===m&&e.props.selected||-1===y)&&(y=t))}));var b=B.Children.map(s,(function(e,t){if(t===y){var n={};if(a&&(n.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===m&&(n.tabIndex=0),null!==n)return B.cloneElement(e,n)}return e}));return B.createElement(qS,Up({role:"menu",ref:v,className:l,onKeyDown:function(e){var t=h.current,n=e.key,r=Kb(t).activeElement;if("ArrowDown"===n)e.preventDefault(),nE(t,r,d,QS);else if("ArrowUp"===n)e.preventDefault(),nE(t,r,d,eE);else if("Home"===n)e.preventDefault(),nE(t,null,d,QS);else if("End"===n)e.preventDefault(),nE(t,null,d,eE);else if(1===n.length){var o=g.current,i=n.toLowerCase(),a=performance.now();o.keys.length>0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);var s=r&&!o.repeating&&tE(r,o);o.previousKeyMatched&&(s||nE(t,r,!1,QS,o))?e.preventDefault():o.previousKeyMatched=!1}c&&c(e)},tabIndex:o?0:-1},f),b)})),iE={vertical:"top",horizontal:"right"},aE={vertical:"top",horizontal:"left"},sE=B.forwardRef((function(e,t){var n=e.autoFocus,r=void 0===n||n,o=e.children,i=e.classes,a=e.disableAutoFocusItem,s=void 0!==a&&a,l=e.MenuListProps,c=void 0===l?{}:l,u=e.onClose,d=e.onEntering,p=e.open,m=e.PaperProps,f=void 0===m?{}:m,h=e.PopoverClasses,g=e.transitionDuration,v=void 0===g?"auto":g,y=e.variant,b=void 0===y?"selectedMenu":y,x=Gp(e,["autoFocus","children","classes","disableAutoFocusItem","MenuListProps","onClose","onEntering","open","PaperProps","PopoverClasses","transitionDuration","variant"]),S=yv(),E=r&&!s&&p,M=B.useRef(null),C=B.useRef(null),w=-1;B.Children.map(o,(function(e,t){B.isValidElement(e)&&(e.props.disabled||("menu"!==b&&e.props.selected||-1===w)&&(w=t))}));var k=B.Children.map(o,(function(e,t){return t===w?B.cloneElement(e,{ref:function(t){C.current=V.findDOMNode(t),Qv(e.ref,t)}}):e}));return B.createElement(ZS,Up({getContentAnchorEl:function(){return C.current},classes:h,onClose:u,onEntering:function(e,t){M.current&&M.current.adjustStyleForScrollbar(e,S),d&&d(e,t)},anchorOrigin:"rtl"===S.direction?iE:aE,transformOrigin:"rtl"===S.direction?iE:aE,PaperProps:Up({},f,{classes:Up({},f.classes,{root:i.paper})}),open:p,ref:t,transitionDuration:v},x),B.createElement(oE,Up({onKeyDown:function(e){"Tab"===e.key&&(e.preventDefault(),u&&u(e,"tabKeyDown"))},actions:M,autoFocus:r&&(-1===w||s),autoFocusItem:E,variant:b},c,{className:ev(i.list,c.className)}),k))})),lE=bv({paper:{maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"},list:{outline:0}},{name:"MuiMenu"})(sE),cE=B.forwardRef((function(e,t){var n,r=e.classes,o=e.className,i=e.component,a=void 0===i?"li":i,s=e.disableGutters,l=void 0!==s&&s,c=e.role,u=void 0===c?"menuitem":c,d=e.selected,p=e.tabIndex,m=Gp(e,["classes","className","component","disableGutters","role","selected","tabIndex"]);return e.disabled||(n=void 0!==p?p:-1),B.createElement(BS,Up({button:!0,role:u,tabIndex:n,component:a,selected:d,disableGutters:l,classes:{dense:r.dense},className:ev(r.root,o,d&&r.selected,!l&&r.gutters),ref:t},m))})),uE=bv((function(e){return{root:Up({},e.typography.body1,_p({minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",width:"auto",overflow:"hidden",whiteSpace:"nowrap"},e.breakpoints.up("sm"),{minHeight:"auto"})),gutters:{},selected:{},dense:Up({},e.typography.body2,{minHeight:"auto"})}}),{name:"MuiMenuItem"})(cE),dE=B.forwardRef((function(e,t){var n=e.activeStep,r=void 0===n?0:n,o=e.backButton,i=e.classes,a=e.className,s=e.LinearProgressProps,l=e.nextButton,c=e.position,u=void 0===c?"bottom":c,d=e.steps,p=e.variant,m=void 0===p?"dots":p,f=Gp(e,["activeStep","backButton","classes","className","LinearProgressProps","nextButton","position","steps","variant"]);return B.createElement(Ev,Up({square:!0,elevation:0,className:ev(i.root,i["position".concat(xv(u))],a),ref:t},f),o,"text"===m&&B.createElement(B.Fragment,null,r+1," / ",d),"dots"===m&&B.createElement("div",{className:i.dots},Ih(new Array(d)).map((function(e,t){return B.createElement("div",{key:t,className:ev(i.dot,t===r&&i.dotActive)})}))),"progress"===m&&B.createElement(LS,Up({className:i.progress,variant:"determinate",value:Math.ceil(r/(d-1)*100)},s)),l)}));bv((function(e){return{root:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",background:e.palette.background.default,padding:8},positionBottom:{position:"fixed",bottom:0,left:0,right:0,zIndex:e.zIndex.mobileStepper},positionTop:{position:"fixed",top:0,left:0,right:0,zIndex:e.zIndex.mobileStepper},positionStatic:{},dots:{display:"flex",flexDirection:"row"},dot:{backgroundColor:e.palette.action.disabled,borderRadius:"50%",width:8,height:8,margin:"0 2px"},dotActive:{backgroundColor:e.palette.primary.main},progress:{width:"50%"}}}),{name:"MuiMobileStepper"})(dE);var pE=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.disabled,i=e.IconComponent,a=e.inputRef,s=e.variant,l=void 0===s?"standard":s,c=Gp(e,["classes","className","disabled","IconComponent","inputRef","variant"]);return B.createElement(B.Fragment,null,B.createElement("select",Up({className:ev(n.root,n.select,n[l],r,o&&n.disabled),disabled:o,ref:a||t},c)),e.multiple?null:B.createElement(i,{className:ev(n.icon,n["icon".concat(xv(l))])}))})),mE=hb(B.createElement("path",{d:"M7 10l5 5 5-5z"})),fE=function(e){return{root:{},select:{"-moz-appearance":"none","-webkit-appearance":"none",userSelect:"none",borderRadius:0,minWidth:16,cursor:"pointer","&:focus":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)",borderRadius:0},"&::-ms-expand":{display:"none"},"&$disabled":{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:e.palette.background.paper}},filled:{},outlined:{borderRadius:e.shape.borderRadius},selectMenu:{height:"auto",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},disabled:{},icon:{position:"absolute",right:0,top:"calc(50% - 12px)",color:e.palette.action.active,pointerEvents:"none"},iconOpen:{transform:"rotate(180deg)"},iconFilled:{right:7},iconOutlined:{right:7}}},hE=B.createElement(NS,null),gE=B.forwardRef((function(e,t){var n=e.children,r=e.classes,o=e.IconComponent,i=void 0===o?mE:o,a=e.input,s=void 0===a?hE:a,l=e.inputProps;e.variant;var c=Gp(e,["children","classes","IconComponent","input","inputProps","variant"]),u=Fx({props:e,muiFormControl:Lb(),states:["variant"]});return B.cloneElement(s,Up({inputComponent:pE,select:!0,inputProps:Up({children:n,classes:r,IconComponent:i,variant:u.variant,type:void 0},l,{},s?s.props.inputProps:{}),ref:t},c))}));gE.muiName="Select",bv(fE,{name:"MuiNativeSelect"})(gE);var vE=B.forwardRef((function(e,t){e.children;var n=e.classes,r=e.className,o=e.labelWidth,i=e.notched,a=e.style,s=Gp(e,["children","classes","className","labelWidth","notched","style"]),l="rtl"===yv().direction?"right":"left",c=o>0?.75*o+8:0;return B.createElement("fieldset",Up({"aria-hidden":!0,style:Up(_p({},"padding".concat(xv(l)),8+(i?0:c/2)),a),className:ev(n.root,r),ref:t},s),B.createElement("legend",{className:n.legend,style:{width:i?c:.01}},B.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}})))})),yE=bv((function(e){var t="rtl"===e.direction?"right":"left";return{root:{position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:0,pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,transition:e.transitions.create(["padding-".concat(t),"border-color","border-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})},legend:{textAlign:"left",padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}}}),{name:"PrivateNotchedOutline"})(vE),bE=B.forwardRef((function(e,t){var n=e.classes,r=e.fullWidth,o=void 0!==r&&r,i=e.inputComponent,a=void 0===i?"input":i,s=e.labelWidth,l=void 0===s?0:s,c=e.multiline,u=void 0!==c&&c,d=e.notched,p=e.type,m=void 0===p?"text":p,f=Gp(e,["classes","fullWidth","inputComponent","labelWidth","multiline","notched","type"]);return B.createElement(Kx,Up({renderSuffix:function(e){return B.createElement(yE,{className:n.notchedOutline,labelWidth:l,notched:void 0!==d?d:Boolean(e.startAdornment||e.filled||e.focused)})},classes:Up({},n,{root:ev(n.root,n.underline),notchedOutline:null}),fullWidth:o,inputComponent:a,multiline:u,ref:t,type:m},f))}));bE.muiName="Input";var xE=bv((function(e){var t="light"===e.palette.type?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{root:{position:"relative",borderRadius:e.shape.borderRadius,"&:hover $notchedOutline":{borderColor:e.palette.text.primary},"@media (hover: none)":{"&:hover $notchedOutline":{borderColor:t}},"&$focused $notchedOutline":{borderColor:e.palette.primary.main,borderWidth:2},"&$error $notchedOutline":{borderColor:e.palette.error.main},"&$disabled $notchedOutline":{borderColor:e.palette.action.disabled}},colorSecondary:{"&$focused $notchedOutline":{borderColor:e.palette.secondary.main}},focused:{},disabled:{},adornedStart:{paddingLeft:14},adornedEnd:{paddingRight:14},error:{},marginDense:{},multiline:{padding:"18.5px 14px","&$marginDense":{paddingTop:10.5,paddingBottom:10.5}},notchedOutline:{borderColor:t},input:{padding:"18.5px 14px","&:-webkit-autofill":{WebkitBoxShadow:"dark"===e.palette.type?"0 0 0 100px #266798 inset":null,WebkitTextFillColor:"dark"===e.palette.type?"#fff":null,borderRadius:"inherit"}},inputMarginDense:{paddingTop:10.5,paddingBottom:10.5},inputSelect:{paddingRight:24},inputMultiline:{padding:0},inputAdornedStart:{paddingLeft:0},inputAdornedEnd:{paddingRight:0}}}),{name:"MuiOutlinedInput"})(bE),SE="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,EE=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(SE&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}();
|
|
24
|
-
|
|
25
|
-
*
|
|
26
|
-
* @version 1.16.0
|
|
27
|
-
* @license
|
|
28
|
-
* Copyright (c) 2016 Federico Zivolo and contributors
|
|
29
|
-
*
|
|
30
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
31
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
32
|
-
* in the Software without restriction, including without limitation the rights
|
|
33
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
34
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
35
|
-
* furnished to do so, subject to the following conditions:
|
|
14
|
+
*/Xf();var Jf=Date.now(),Zf="fnValues"+Jf,Qf="fnStyle"+ ++Jf,ep=function(){return{onCreateRule:function(e,t,n){if("function"!=typeof t)return null;var r=Bh(e,{},n);return r[Qf]=t,r},onProcessStyle:function(e,t){if(Zf in t||Qf 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[Zf]=n,e},onUpdate:function(e,t,n,r){var i=t,o=i[Qf];o&&(i.style=o(e)||{});var a=i[Zf];if(a)for(var s in a)i.prop(s,a[s](e),r)}}},tp="@global",np="@global ",rp=function(){function e(e,t,n){for(var r in this.type="global",this.at=tp,this.isProcessed=!1,this.key=e,this.options=n,this.rules=new Of(jm({},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}(),ip=function(){function e(e,t,n){this.type="global",this.at=tp,this.isProcessed=!1,this.key=e,this.options=n;var r=e.substr(np.length);this.rule=n.jss.createRule(r,t,jm({},n,{parent:this}))}return e.prototype.toString=function(e){return this.rule?this.rule.toString(e):""},e}(),op=/\s*,\s*/g;function ap(e,t){for(var n=e.split(op),r="",i=0;i<n.length;i++)r+=t+" "+n[i].trim(),n[i+1]&&(r+=", ");return r}function sp(){return{onCreateRule:function(e,t,n){if(!e)return null;if(e===tp)return new rp(e,t,n);if("@"===e[0]&&e.substr(0,np.length)===np)return new ip(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[tp]:null;if(i){for(var o in i)t.addRule(o,i[o],jm({},n,{selector:ap(o,e.selector)}));delete r[tp]}}(e,t),function(e,t){var n=e.options,r=e.style;for(var i in r)if("@"===i[0]&&i.substr(0,tp.length)===tp){var o=ap(i.substr(tp.length),e.selector);t.addRule(o,r[i],jm({},n,{selector:o})),delete r[i]}}(e,t))}}}var lp=/\s*,\s*/g,up=/&/g,cp=/\$([\w-]+)/g;function dp(){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(lp),r=e.split(lp),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(up,a):a+" "+l}return i}function n(e,t,n){if(n)return jm({},n,{index:n.index+1});var r=e.options.nestingLevel;r=void 0===r?1:r+1;var i=jm({},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("&"),m="@"===c[0];if(d||m){if(a=n(l,u,a),d){var h=t(c,l.selector);s||(s=e(u,o)),h=h.replace(cp,s);var f=l.key+"-"+c;"replaceRule"in u?u.replaceRule(f,r[c],jm({},a,{selector:h})):u.addRule(f,r[c],jm({},a,{selector:h}))}else m&&u.addRule(c,{},a).addRule(l.key,r[c],{selector:l.selector});delete r[c]}}return r}}}var mp=/[A-Z]/g,hp=/^ms-/,fp={};function pp(e){return"-"+e.toLowerCase()}function yp(e){if(fp.hasOwnProperty(e))return fp[e];var t=e.replace(mp,pp);return fp[e]=hp.test(t)?"-"+t:t}function gp(e){var t={};for(var n in e){t[0===n.indexOf("--")?n:yp(n)]=e[n]}return e.fallbacks&&(Array.isArray(e.fallbacks)?t.fallbacks=e.fallbacks.map(gp):t.fallbacks=gp(e.fallbacks)),t}var vp=Gf&&CSS?CSS.px:"px",xp=Gf&&CSS?CSS.ms:"ms",bp=Gf&&CSS?CSS.percent:"%";function Sp(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 Ep=Sp({"animation-delay":xp,"animation-duration":xp,"background-position":vp,"background-position-x":vp,"background-position-y":vp,"background-size":vp,border:vp,"border-bottom":vp,"border-bottom-left-radius":vp,"border-bottom-right-radius":vp,"border-bottom-width":vp,"border-left":vp,"border-left-width":vp,"border-radius":vp,"border-right":vp,"border-right-width":vp,"border-top":vp,"border-top-left-radius":vp,"border-top-right-radius":vp,"border-top-width":vp,"border-width":vp,"border-block":vp,"border-block-end":vp,"border-block-end-width":vp,"border-block-start":vp,"border-block-start-width":vp,"border-block-width":vp,"border-inline":vp,"border-inline-end":vp,"border-inline-end-width":vp,"border-inline-start":vp,"border-inline-start-width":vp,"border-inline-width":vp,"border-start-start-radius":vp,"border-start-end-radius":vp,"border-end-start-radius":vp,"border-end-end-radius":vp,margin:vp,"margin-bottom":vp,"margin-left":vp,"margin-right":vp,"margin-top":vp,"margin-block":vp,"margin-block-end":vp,"margin-block-start":vp,"margin-inline":vp,"margin-inline-end":vp,"margin-inline-start":vp,padding:vp,"padding-bottom":vp,"padding-left":vp,"padding-right":vp,"padding-top":vp,"padding-block":vp,"padding-block-end":vp,"padding-block-start":vp,"padding-inline":vp,"padding-inline-end":vp,"padding-inline-start":vp,"mask-position-x":vp,"mask-position-y":vp,"mask-size":vp,height:vp,width:vp,"min-height":vp,"max-height":vp,"min-width":vp,"max-width":vp,bottom:vp,left:vp,top:vp,right:vp,inset:vp,"inset-block":vp,"inset-block-end":vp,"inset-block-start":vp,"inset-inline":vp,"inset-inline-end":vp,"inset-inline-start":vp,"box-shadow":vp,"text-shadow":vp,"column-gap":vp,"column-rule":vp,"column-rule-width":vp,"column-width":vp,"font-size":vp,"font-size-delta":vp,"letter-spacing":vp,"text-decoration-thickness":vp,"text-indent":vp,"text-stroke":vp,"text-stroke-width":vp,"word-spacing":vp,motion:vp,"motion-offset":vp,outline:vp,"outline-offset":vp,"outline-width":vp,perspective:vp,"perspective-origin-x":bp,"perspective-origin-y":bp,"transform-origin":bp,"transform-origin-x":bp,"transform-origin-y":bp,"transform-origin-z":bp,"transition-delay":xp,"transition-duration":xp,"vertical-align":vp,"flex-basis":vp,"shape-margin":vp,size:vp,gap:vp,grid:vp,"grid-gap":vp,"row-gap":vp,"grid-row-gap":vp,"grid-column-gap":vp,"grid-template-rows":vp,"grid-template-columns":vp,"grid-auto-rows":vp,"grid-auto-columns":vp,"box-shadow-x":vp,"box-shadow-y":vp,"box-shadow-blur":vp,"box-shadow-spread":vp,"font-line-height":vp,"text-shadow-x":vp,"text-shadow-y":vp,"text-shadow-blur":vp});function Mp(e,t,n){if(null==t)return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]=Mp(e,t[r],n);else if("object"==typeof t)if("fallbacks"===e)for(var i in t)t[i]=Mp(i,t[i],n);else for(var o in t)t[o]=Mp(e+"-"+o,t[o],n);else if("number"==typeof t&&!1===isNaN(t)){var a=n[e]||Ep[e];return!a||0===t&&a===vp?t.toString():"function"==typeof a?a(t).toString():""+t+a}return t}function Cp(e){void 0===e&&(e={});var t=Sp(e);return{onProcessStyle:function(e,n){if("style"!==n.type)return e;for(var r in e)e[r]=Mp(r,e[r],t);return e},onChangeValue:function(e,n){return Mp(n,e,t)}}}var Ap="",Op="",Tp="",Np="",wp=Lh&&"ontouchstart"in document.documentElement;if(Lh){var Rp={Moz:"-moz-",ms:"-ms-",O:"-o-",Webkit:"-webkit-"},Ip=document.createElement("p").style;for(var kp in Rp)if(kp+"Transform"in Ip){Ap=kp,Op=Rp[kp];break}"Webkit"===Ap&&"msHyphens"in Ip&&(Ap="ms",Op=Rp.ms,Np="edge"),"Webkit"===Ap&&"-apple-trailing-word"in Ip&&(Tp="apple")}var Lp={js:Ap,css:Op,vendor:Tp,browser:Np,isTouch:wp};var Pp={noPrefill:["appearance"],supportedProperty:function(e){return"appearance"===e&&("ms"===Lp.js?"-webkit-"+e:Lp.css+e)}},qp={noPrefill:["color-adjust"],supportedProperty:function(e){return"color-adjust"===e&&("Webkit"===Lp.js?Lp.css+"print-"+e:e)}},Dp=/[-\s]+(.)?/g;function $p(e,t){return t?t.toUpperCase():""}function zp(e){return e.replace(Dp,$p)}function _p(e){return zp("-"+e)}var Hp,Bp={noPrefill:["mask"],supportedProperty:function(e,t){if(!/^mask/.test(e))return!1;if("Webkit"===Lp.js){var n="mask-image";if(zp(n)in t)return e;if(Lp.js+_p(n)in t)return Lp.css+e}return e}},Fp={noPrefill:["text-orientation"],supportedProperty:function(e){return"text-orientation"===e&&("apple"!==Lp.vendor||Lp.isTouch?e:Lp.css+e)}},jp={noPrefill:["transform"],supportedProperty:function(e,t,n){return"transform"===e&&(n.transform?e:Lp.css+e)}},Vp={noPrefill:["transition"],supportedProperty:function(e,t,n){return"transition"===e&&(n.transition?e:Lp.css+e)}},Up={noPrefill:["writing-mode"],supportedProperty:function(e){return"writing-mode"===e&&("Webkit"===Lp.js||"ms"===Lp.js&&"edge"!==Lp.browser?Lp.css+e:e)}},Yp={noPrefill:["user-select"],supportedProperty:function(e){return"user-select"===e&&("Moz"===Lp.js||"ms"===Lp.js||"apple"===Lp.vendor?Lp.css+e:e)}},Wp={supportedProperty:function(e,t){return!!/^break-/.test(e)&&("Webkit"===Lp.js?"WebkitColumn"+_p(e)in t&&Lp.css+"column-"+e:"Moz"===Lp.js&&("page"+_p(e)in t&&"page-"+e))}},Xp={supportedProperty:function(e,t){if(!/^(border|margin|padding)-inline/.test(e))return!1;if("Moz"===Lp.js)return e;var n=e.replace("-inline","");return Lp.js+_p(n)in t&&Lp.css+n}},Gp={supportedProperty:function(e,t){return zp(e)in t&&e}},Kp={supportedProperty:function(e,t){var n=_p(e);return"-"===e[0]||"-"===e[0]&&"-"===e[1]?e:Lp.js+n in t?Lp.css+e:"Webkit"!==Lp.js&&"Webkit"+n in t&&"-webkit-"+e}},Jp={supportedProperty:function(e){return"scroll-snap"===e.substring(0,11)&&("ms"===Lp.js?""+Lp.css+e:e)}},Zp={supportedProperty:function(e){return"overscroll-behavior"===e&&("ms"===Lp.js?Lp.css+"scroll-chaining":e)}},Qp={"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"},ey={supportedProperty:function(e,t){var n=Qp[e];return!!n&&(Lp.js+_p(n)in t&&Lp.css+n)}},ty={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"},ny=Object.keys(ty),ry=function(e){return Lp.css+e},iy={supportedProperty:function(e,t,n){var r=n.multiple;if(ny.indexOf(e)>-1){var i=ty[e];if(!Array.isArray(i))return Lp.js+_p(i)in t&&Lp.css+i;if(!r)return!1;for(var o=0;o<i.length;o++)if(!(Lp.js+_p(i[0])in t))return!1;return i.map(ry)}return!1}},oy=[Pp,qp,Bp,Fp,jp,Vp,Up,Yp,Wp,Xp,Gp,Kp,Jp,Zp,ey,iy],ay=oy.filter((function(e){return e.supportedProperty})).map((function(e){return e.supportedProperty})),sy=oy.filter((function(e){return e.noPrefill})).reduce((function(e,t){return e.push.apply(e,xh(t.noPrefill)),e}),[]),ly={};if(Lh){Hp=document.createElement("p");var uy=window.getComputedStyle(document.documentElement,"");for(var cy in uy)isNaN(cy)||(ly[uy[cy]]=uy[cy]);sy.forEach((function(e){return delete ly[e]}))}function dy(e,t){if(void 0===t&&(t={}),!Hp)return e;if(null!=ly[e])return ly[e];"transition"!==e&&"transform"!==e||(t[e]=e in Hp.style);for(var n=0;n<ay.length&&(ly[e]=ay[n](e,Hp.style,t),!ly[e]);n++);try{Hp.style[e]=""}catch(e){return!1}return ly[e]}var my,hy={},fy={transition:1,"transition-property":1,"-webkit-transition":1,"-webkit-transition-property":1},py=/(^\s*[\w-]+)|, (\s*[\w-]+)(?![^()]*\))/g;function yy(e,t,n){if("var"===t)return"var";if("all"===t)return"all";if("all"===n)return", all";var r=t?dy(t):", "+dy(n);return r||(t||n)}function gy(e,t){var n=t;if(!my||"content"===e)return t;if("string"!=typeof n||!isNaN(parseInt(n,10)))return n;var r=e+n;if(null!=hy[r])return hy[r];try{my.style[e]=n}catch(e){return hy[r]=!1,!1}if(fy[e])n=n.replace(py,yy);else if(""===my.style[e]&&("-ms-flex"===(n=Lp.css+n)&&(my.style[e]="-ms-flexbox"),my.style[e]=n,""===my.style[e]))return hy[r]=!1,!1;return my.style[e]="",hy[r]=n,hy[r]}function vy(){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=dy(n);o&&o!==n&&(i=!0);var a=!1,s=gy(o,jh(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"===Lp.js?e:"@"+Lp.css+"keyframes"+e.substr(10)}(t.at)}},onProcessStyle:function(t,n){return"style"!==n.type?t:e(t)},onChangeValue:function(e,t){return gy(t,jh(e))||e}}}function xy(){var e=function(e,t){return e.length===t.length?e>t?1:-1:e.length-t.length};return{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}}}function by(){return{plugins:[ep(),sp(),dp(),{onProcessStyle:function(e){if(Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]=gp(e[t]);return e}return gp(e)},onChangeValue:function(e,t,n){if(0===t.indexOf("--"))return e;var r=yp(t);return t===r?e:(n.prop(r,e),null)}},Cp(),"undefined"==typeof window?null:vy(),xy()]}}function Sy(){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=jm({},t);return Object.keys(n).forEach((function(e){n[e]&&(r[e]="".concat(t[e]," ").concat(n[e]))})),r}Lh&&(my=document.createElement("p"));var Ey={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)}},My=Ey,Cy=_.createContext(null);function Ay(){return _.useContext(Cy)}var Oy,Ty=Xf(by()),Ny={disableGeneration:!1,generateClassName:Rh(),jss:Ty,sheetsCache:null,sheetsManager:new Map,sheetsRegistry:null},wy=_.createContext(Ny);function Ry(e){var t=e.children,n=e.injectFirst,r=void 0!==n&&n,i=e.disableGeneration,o=void 0!==i&&i,a=nh(e,["children","injectFirst","disableGeneration"]),s=jm({},_.useContext(wy),{disableGeneration:o},a);if(!s.jss.options.insertionPoint&&r&&"undefined"!=typeof window){if(!Oy){var l=document.head;Oy=document.createComment("mui-inject-first"),l.insertBefore(Oy,l.firstChild)}s.jss=Xf({plugins:by().plugins,insertionPoint:Oy})}return _.createElement(wy.Provider,{value:s},t)}var Iy=-1e9;var ky={};function Ly(e,t){var n=e.state,r=e.theme,i=e.stylesOptions,o=e.stylesCreator,a=e.name;if(!i.disableGeneration){var s=My.get(i.sheetsManager,o,r);s||(s={refs:0,staticSheet:null,dynamicStyles:null},My.set(i.sheetsManager,o,r,s));var l=jm({},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=My.get(i.sheetsCache,o,r));var d=o.create(r,a);c||((c=i.jss.createStyleSheet(d,jm({link:!1},l))).attach(),i.sheetsCache&&My.set(i.sheetsCache,o,r,c)),u&&u.add(c),s.staticSheet=c,s.dynamicStyles=Kf(d)}if(s.dynamicStyles){var m=i.jss.createStyleSheet(s.dynamicStyles,jm({link:!0},l));m.update(t),m.attach(),n.dynamicSheet=m,n.classes=Sy({baseClasses:s.staticSheet.classes,newClasses:m.classes}),u&&u.add(m)}else n.classes=s.staticSheet.classes;s.refs+=1}}function Py(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?ky:o,s=nh(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=jm({},i);return Object.keys(o).forEach((function(e){a[e]=Ym(a[e],o[e])})),a},options:{}}}(e),u=n||r||"makeStyles";l.options={index:Iy+=1,name:n,meta:u,classNamePrefix:u};return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Ay()||a,r=jm({},_.useContext(wy),s),o=_.useRef(),u=_.useRef();!function(e,t){var n,r=_.useRef([]),i=_.useMemo((function(){return{}}),t);r.current!==i&&(r.current=i,n=e()),_.useEffect((function(){return function(){n&&n()}}),[i])}((function(){var i={name:n,state:{},stylesCreator:l,stylesOptions:r,theme:t};return Ly(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=My.get(r.sheetsManager,i,n);o.refs-=1;var a=r.sheetsRegistry;0===o.refs&&(My.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]),_.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=Sy({baseClasses:r.cacheClasses.lastJSS,newClasses:t,Component:n})),r.cacheClasses.value}(o.current,e.classes,i);return c}}function qy(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=qy(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Dy(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=qy(e))&&(r&&(r+=" "),r+=t);return r}var $y={exports:{}},zy={};
|
|
15
|
+
/** @license React v16.11.0
|
|
16
|
+
* react-is.production.min.js
|
|
36
17
|
*
|
|
37
|
-
*
|
|
38
|
-
* copies or substantial portions of the Software.
|
|
18
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
39
19
|
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
|
|
43
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
44
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
45
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
46
|
-
* SOFTWARE.
|
|
47
|
-
*/var ME=SE&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),EE))}};function CE(e){return e&&"[object Function]"==={}.toString.call(e)}function wE(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function kE(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function NE(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=wE(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/(auto|scroll|overlay)/.test(n+o+r)?e:NE(kE(e))}function TE(e){return e&&e.referenceNode?e.referenceNode:e}var OE=SE&&!(!window.MSInputMethodContext||!document.documentMode),RE=SE&&/MSIE 10/.test(navigator.userAgent);function AE(e){return 11===e?OE:10===e?RE:OE||RE}function LE(e){if(!e)return document.documentElement;for(var t=AE(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===wE(n,"position")?LE(n):n:e?e.ownerDocument.documentElement:document.documentElement}function IE(e){return null!==e.parentNode?IE(e.parentNode):e}function PE(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,o=n?t:e,i=document.createRange();i.setStart(r,0),i.setEnd(o,0);var a,s,l=i.commonAncestorContainer;if(e!==l&&t!==l||r.contains(o))return"BODY"===(s=(a=l).nodeName)||"HTML"!==s&&LE(a.firstElementChild)!==a?LE(l):l;var c=IE(e);return c.host?PE(c.host,t):PE(e,IE(t).host)}function DE(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var o=e.ownerDocument.documentElement,i=e.ownerDocument.scrollingElement||o;return i[n]}return e[n]}function qE(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=DE(t,"top"),o=DE(t,"left"),i=n?-1:1;return e.top+=r*i,e.bottom+=r*i,e.left+=o*i,e.right+=o*i,e}function zE(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"],10)+parseFloat(e["border"+r+"Width"],10)}function $E(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],AE(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function BE(e){var t=e.body,n=e.documentElement,r=AE(10)&&getComputedStyle(n);return{height:$E("Height",t,n,r),width:$E("Width",t,n,r)}}var FE=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},HE=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),jE=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},VE=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function WE(e){return VE({},e,{right:e.left+e.width,bottom:e.top+e.height})}function _E(e){var t={};try{if(AE(10)){t=e.getBoundingClientRect();var n=DE(e,"top"),r=DE(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(e){}var o={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},i="HTML"===e.nodeName?BE(e.ownerDocument):{},a=i.width||e.clientWidth||o.width,s=i.height||e.clientHeight||o.height,l=e.offsetWidth-a,c=e.offsetHeight-s;if(l||c){var u=wE(e);l-=zE(u,"x"),c-=zE(u,"y"),o.width-=l,o.height-=c}return WE(o)}function UE(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=AE(10),o="HTML"===t.nodeName,i=_E(e),a=_E(t),s=NE(e),l=wE(t),c=parseFloat(l.borderTopWidth,10),u=parseFloat(l.borderLeftWidth,10);n&&o&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var d=WE({top:i.top-a.top-c,left:i.left-a.left-u,width:i.width,height:i.height});if(d.marginTop=0,d.marginLeft=0,!r&&o){var p=parseFloat(l.marginTop,10),m=parseFloat(l.marginLeft,10);d.top-=c-p,d.bottom-=c-p,d.left-=u-m,d.right-=u-m,d.marginTop=p,d.marginLeft=m}return(r&&!n?t.contains(s):t===s&&"BODY"!==s.nodeName)&&(d=qE(d,t)),d}function YE(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=UE(e,n),o=Math.max(n.clientWidth,window.innerWidth||0),i=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:DE(n),s=t?0:DE(n,"left"),l={top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:o,height:i};return WE(l)}function GE(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===wE(e,"position"))return!0;var n=kE(e);return!!n&&GE(n)}function KE(e){if(!e||!e.parentElement||AE())return document.documentElement;for(var t=e.parentElement;t&&"none"===wE(t,"transform");)t=t.parentElement;return t||document.documentElement}function XE(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i={top:0,left:0},a=o?KE(e):PE(e,TE(t));if("viewport"===r)i=YE(a,o);else{var s=void 0;"scrollParent"===r?"BODY"===(s=NE(kE(t))).nodeName&&(s=e.ownerDocument.documentElement):s="window"===r?e.ownerDocument.documentElement:r;var l=UE(s,a,o);if("HTML"!==s.nodeName||GE(a))i=l;else{var c=BE(e.ownerDocument),u=c.height,d=c.width;i.top+=l.top-l.marginTop,i.bottom=u+l.top,i.left+=l.left-l.marginLeft,i.right=d+l.left}}var p="number"==typeof(n=n||0);return i.left+=p?n:n.left||0,i.top+=p?n:n.top||0,i.right-=p?n:n.right||0,i.bottom-=p?n:n.bottom||0,i}function JE(e){return e.width*e.height}function ZE(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=XE(n,r,i,o),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},l=Object.keys(s).map((function(e){return VE({key:e},s[e],{area:JE(s[e])})})).sort((function(e,t){return t.area-e.area})),c=l.filter((function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight})),u=c.length>0?c[0].key:l[0].key,d=e.split("-")[1];return u+(d?"-"+d:"")}function QE(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=r?KE(t):PE(t,TE(n));return UE(n,o,r)}function eM(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function tM(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function nM(e,t,n){n=n.split("-")[0];var r=eM(e),o={width:r.width,height:r.height},i=-1!==["right","left"].indexOf(n),a=i?"top":"left",s=i?"left":"top",l=i?"height":"width",c=i?"width":"height";return o[a]=t[a]+t[l]/2-r[l]/2,o[s]=n===s?t[s]-r[c]:t[tM(s)],o}function rM(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function oM(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var r=rM(e,(function(e){return e[t]===n}));return e.indexOf(r)}(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&CE(n)&&(t.offsets.popper=WE(t.offsets.popper),t.offsets.reference=WE(t.offsets.reference),t=n(t,e))})),t}function iM(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=QE(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=ZE(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=nM(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=oM(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function aM(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function sM(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var o=t[r],i=o?""+o+n:e;if(void 0!==document.body.style[i])return i}return null}function lM(){return this.state.isDestroyed=!0,aM(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[sM("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function cM(e){var t=e.ownerDocument;return t?t.defaultView:window}function uM(e,t,n,r){var o="BODY"===e.nodeName,i=o?e.ownerDocument.defaultView:e;i.addEventListener(t,n,{passive:!0}),o||uM(NE(i.parentNode),t,n,r),r.push(i)}function dM(e,t,n,r){n.updateBound=r,cM(e).addEventListener("resize",n.updateBound,{passive:!0});var o=NE(e);return uM(o,"scroll",n.updateBound,n.scrollParents),n.scrollElement=o,n.eventsEnabled=!0,n}function pM(){this.state.eventsEnabled||(this.state=dM(this.reference,this.options,this.state,this.scheduleUpdate))}function mM(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,cM(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function fM(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function hM(e,t){Object.keys(t).forEach((function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&fM(t[n])&&(r="px"),e.style[n]=t[n]+r}))}var gM=SE&&/Firefox/i.test(navigator.userAgent);function vM(e,t,n){var r=rM(e,(function(e){return e.name===t})),o=!!r&&e.some((function(e){return e.name===n&&e.enabled&&e.order<r.order}));if(!o){var i="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+i+" modifier in order to work, be sure to include it before "+i+"!")}return o}var yM=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],bM=yM.slice(3);function xM(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=bM.indexOf(e),r=bM.slice(n+1).concat(bM.slice(0,n));return t?r.reverse():r}var SM="flip",EM="clockwise",MM="counterclockwise";function CM(e,t,n,r){var o=[0,0],i=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=a.indexOf(rM(a,(function(e){return-1!==e.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return(c=c.map((function(e,r){var o=(1===r?!i:i)?"height":"width",a=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,r){var o=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+o[1],a=o[2];if(!i)return e;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=r}return WE(s)[t]/100*i}if("vh"===a||"vw"===a)return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*i;return i}(e,o,t,n)}))}))).forEach((function(e,t){e.forEach((function(n,r){fM(n)&&(o[t]+=n*("-"===e[r-1]?-1:1))}))})),o}var wM={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var o=e.offsets,i=o.reference,a=o.popper,s=-1!==["bottom","top"].indexOf(n),l=s?"left":"top",c=s?"width":"height",u={start:jE({},l,i[l]),end:jE({},l,i[l]+i[c]-a[c])};e.offsets.popper=VE({},a,u[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,o=e.offsets,i=o.popper,a=o.reference,s=r.split("-")[0],l=void 0;return l=fM(+n)?[+n,0]:CM(n,i,a,s),"left"===s?(i.top+=l[0],i.left-=l[1]):"right"===s?(i.top+=l[0],i.left+=l[1]):"top"===s?(i.left+=l[0],i.top-=l[1]):"bottom"===s&&(i.left+=l[0],i.top+=l[1]),e.popper=i,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||LE(e.instance.popper);e.instance.reference===n&&(n=LE(n));var r=sM("transform"),o=e.instance.popper.style,i=o.top,a=o.left,s=o[r];o.top="",o.left="",o[r]="";var l=XE(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);o.top=i,o.left=a,o[r]=s,t.boundaries=l;var c=t.priority,u=e.offsets.popper,d={primary:function(e){var n=u[e];return u[e]<l[e]&&!t.escapeWithReference&&(n=Math.max(u[e],l[e])),jE({},e,n)},secondary:function(e){var n="right"===e?"left":"top",r=u[n];return u[e]>l[e]&&!t.escapeWithReference&&(r=Math.min(u[n],l[e]-("right"===e?u.width:u.height))),jE({},n,r)}};return c.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=VE({},u,d[t](e))})),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,o=e.placement.split("-")[0],i=Math.floor,a=-1!==["top","bottom"].indexOf(o),s=a?"right":"bottom",l=a?"left":"top",c=a?"width":"height";return n[s]<i(r[l])&&(e.offsets.popper[l]=i(r[l])-n[c]),n[l]>i(r[s])&&(e.offsets.popper[l]=i(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!vM(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"==typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var o=e.placement.split("-")[0],i=e.offsets,a=i.popper,s=i.reference,l=-1!==["left","right"].indexOf(o),c=l?"height":"width",u=l?"Top":"Left",d=u.toLowerCase(),p=l?"left":"top",m=l?"bottom":"right",f=eM(r)[c];s[m]-f<a[d]&&(e.offsets.popper[d]-=a[d]-(s[m]-f)),s[d]+f>a[m]&&(e.offsets.popper[d]+=s[d]+f-a[m]),e.offsets.popper=WE(e.offsets.popper);var h=s[d]+s[c]/2-f/2,g=wE(e.instance.popper),v=parseFloat(g["margin"+u],10),y=parseFloat(g["border"+u+"Width"],10),b=h-e.offsets.popper[d]-v-y;return b=Math.max(Math.min(a[c]-f,b),0),e.arrowElement=r,e.offsets.arrow=(jE(n={},d,Math.round(b)),jE(n,p,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(aM(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=XE(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],o=tM(r),i=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case SM:a=[r,o];break;case EM:a=xM(r);break;case MM:a=xM(r,!0);break;default:a=t.behavior}return a.forEach((function(s,l){if(r!==s||a.length===l+1)return e;r=e.placement.split("-")[0],o=tM(r);var c=e.offsets.popper,u=e.offsets.reference,d=Math.floor,p="left"===r&&d(c.right)>d(u.left)||"right"===r&&d(c.left)<d(u.right)||"top"===r&&d(c.bottom)>d(u.top)||"bottom"===r&&d(c.top)<d(u.bottom),m=d(c.left)<d(n.left),f=d(c.right)>d(n.right),h=d(c.top)<d(n.top),g=d(c.bottom)>d(n.bottom),v="left"===r&&m||"right"===r&&f||"top"===r&&h||"bottom"===r&&g,y=-1!==["top","bottom"].indexOf(r),b=!!t.flipVariations&&(y&&"start"===i&&m||y&&"end"===i&&f||!y&&"start"===i&&h||!y&&"end"===i&&g),x=!!t.flipVariationsByContent&&(y&&"start"===i&&f||y&&"end"===i&&m||!y&&"start"===i&&g||!y&&"end"===i&&h),S=b||x;(p||v||S)&&(e.flipped=!0,(p||v)&&(r=a[l+1]),S&&(i=function(e){return"end"===e?"start":"start"===e?"end":e}(i)),e.placement=r+(i?"-"+i:""),e.offsets.popper=VE({},e.offsets.popper,nM(e.instance.popper,e.offsets.reference,e.placement)),e=oM(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,o=r.popper,i=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return o[a?"left":"top"]=i[n]-(s?o[a?"width":"height"]:0),e.placement=tM(t),e.offsets.popper=WE(o),e}},hide:{order:800,enabled:!0,fn:function(e){if(!vM(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=rM(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,r=t.y,o=e.offsets.popper,i=rM(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==i&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==i?i:t.gpuAcceleration,s=LE(e.instance.popper),l=_E(s),c={position:o.position},u=function(e,t){var n=e.offsets,r=n.popper,o=n.reference,i=Math.round,a=Math.floor,s=function(e){return e},l=i(o.width),c=i(r.width),u=-1!==["left","right"].indexOf(e.placement),d=-1!==e.placement.indexOf("-"),p=t?u||d||l%2==c%2?i:a:s,m=t?i:s;return{left:p(l%2==1&&c%2==1&&!d&&t?r.left-1:r.left),top:m(r.top),bottom:m(r.bottom),right:p(r.right)}}(e,window.devicePixelRatio<2||!gM),d="bottom"===n?"top":"bottom",p="right"===r?"left":"right",m=sM("transform"),f=void 0,h=void 0;if(h="bottom"===d?"HTML"===s.nodeName?-s.clientHeight+u.bottom:-l.height+u.bottom:u.top,f="right"===p?"HTML"===s.nodeName?-s.clientWidth+u.right:-l.width+u.right:u.left,a&&m)c[m]="translate3d("+f+"px, "+h+"px, 0)",c[d]=0,c[p]=0,c.willChange="transform";else{var g="bottom"===d?-1:1,v="right"===p?-1:1;c[d]=h*g,c[p]=f*v,c.willChange=d+", "+p}var y={"x-placement":e.placement};return e.attributes=VE({},y,e.attributes),e.styles=VE({},c,e.styles),e.arrowStyles=VE({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){return hM(e.instance.popper,e.styles),function(e,t){Object.keys(t).forEach((function(n){!1!==t[n]?e.setAttribute(n,t[n]):e.removeAttribute(n)}))}(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&hM(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,o){var i=QE(o,t,e,n.positionFixed),a=ZE(n.placement,i,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),hM(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},kM=function(){function e(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};FE(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=ME(this.update.bind(this)),this.options=VE({},e.Defaults,o),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(VE({},e.Defaults.modifiers,o.modifiers)).forEach((function(t){r.options.modifiers[t]=VE({},e.Defaults.modifiers[t]||{},o.modifiers?o.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return VE({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&CE(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)})),this.update();var i=this.options.eventsEnabled;i&&this.enableEventListeners(),this.state.eventsEnabled=i}return HE(e,[{key:"update",value:function(){return iM.call(this)}},{key:"destroy",value:function(){return lM.call(this)}},{key:"enableEventListeners",value:function(){return pM.call(this)}},{key:"disableEventListeners",value:function(){return mM.call(this)}}]),e}();function NM(e){return"function"==typeof e?e():e}kM.Utils=("undefined"!=typeof window?window:global).PopperUtils,kM.placements=yM,kM.Defaults=wM;var TM="undefined"!=typeof window?B.useLayoutEffect:B.useEffect,OM={},RM=B.forwardRef((function(e,t){var n=e.anchorEl,r=e.children,o=e.container,i=e.disablePortal,a=void 0!==i&&i,s=e.keepMounted,l=void 0!==s&&s,c=e.modifiers,u=e.open,d=e.placement,p=void 0===d?"bottom":d,m=e.popperOptions,f=void 0===m?OM:m,h=e.popperRef,g=e.transition,v=void 0!==g&&g,y=Gp(e,["anchorEl","children","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition"]),b=B.useRef(null),x=ey(b,t),S=B.useRef(null),E=ey(S,h),M=B.useRef(E);TM((function(){M.current=E}),[E]),B.useImperativeHandle(h,(function(){return S.current}),[]);var C=B.useState(!0),w=C[0],k=C[1],N=function(e){if("rtl"!==("undefined"!=typeof window&&document.body.getAttribute("dir")||"ltr"))return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(p),T=B.useState(N),O=T[0],R=T[1],A=B.useCallback((function(){if(b.current&&n&&u){S.current&&(S.current.destroy(),M.current(null));var e=function(e){R(e.placement)};NM(n);var t=new kM(NM(n),b.current,Up({placement:N},f,{modifiers:Up({},a?{}:{preventOverflow:{boundariesElement:"window"}},{},c,{},f.modifiers),onCreate:rx(e,f.onCreate),onUpdate:rx(e,f.onUpdate)}));M.current(t)}}),[n,a,c,u,N,f]),L=B.useCallback((function(e){Qv(x,e),A()}),[x,A]),I=function(){S.current&&(S.current.destroy(),M.current(null))};if(B.useEffect((function(){A()}),[A]),B.useEffect((function(){return function(){I()}}),[]),B.useEffect((function(){u||v||I()}),[u,v]),!l&&!u&&(!v||w))return null;var P={placement:O};return v&&(P.TransitionProps={in:u,onEnter:function(){k(!1)},onExited:function(){k(!0),I()}}),B.createElement(nx,{disablePortal:a,container:o},B.createElement("div",Up({ref:L,role:"tooltip"},y,{style:Up({position:"fixed",top:0,left:0},y.style)}),"function"==typeof r?r(P):r))})),AM=hb(B.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),LM=hb(B.createElement("path",{d:"M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"})),IM=B.createElement(AM,null);var PM=bv((function(e){return{root:{position:"relative",display:"flex","&$checked $layer":{transform:"scale(1)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeOut,duration:e.transitions.duration.shortest})}},layer:{left:0,position:"absolute",transform:"scale(0)",transition:e.transitions.create("transform",{easing:e.transitions.easing.easeIn,duration:e.transitions.duration.shortest})},checked:{}}}),{name:"PrivateRadioButtonIcon"})((function(e){var t=e.checked,n=e.classes;return B.createElement("div",{className:ev(n.root,t&&n.checked)},IM,B.createElement(LM,{className:n.layer}))})),DM=B.createContext(),qM=B.createElement(PM,{checked:!0}),zM=B.createElement(PM,null),$M=B.forwardRef((function(e,t){var n=e.checked,r=e.classes,o=e.color,i=void 0===o?"secondary":o,a=e.name,s=e.onChange,l=Gp(e,["checked","classes","color","name","onChange"]),c=B.useContext(DM),u=n,d=rx(s,c&&c.onChange),p=a;return c&&(void 0===u&&(u=c.value===e.value),void 0===p&&(p=c.name)),B.createElement(qb,Up({color:i,type:"radio",icon:zM,checkedIcon:qM,classes:{root:ev(r.root,r["color".concat(xv(i))]),checked:r.checked,disabled:r.disabled},name:p,checked:u,onChange:d,ref:t},l))}));function BM(e,t){return"object"===Xp(t)&&null!==t?e===t:String(e)===String(t)}bv((function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:jp(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:jp(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}}),{name:"MuiRadio"})($M),B.forwardRef((function(e,t){var n=e.actions,r=e.children,o=e.name,i=e.value,a=e.onChange,s=Gp(e,["actions","children","name","value","onChange"]),l=B.useRef(null),c=B.useRef(null!=i).current,u=B.useState((function(){return c?null:e.defaultValue})),d=u[0],p=u[1];B.useImperativeHandle(n,(function(){return{focus:function(){var e=l.current.querySelector("input:not(:disabled):checked");e||(e=l.current.querySelector("input:not(:disabled)")),e&&e.focus()}}}),[]);var m={name:o,onChange:function(e){c||p(e.target.value),a&&a(e,e.target.value)},value:c?i:d},f=ey(t,l);return B.createElement(rS,Up({role:"radiogroup",ref:f},s),B.createElement(DM.Provider,{value:m},r))})),B.Component;var FM=B.forwardRef((function(e,t){var n=e.autoFocus,r=e.autoWidth,o=e.children,i=e.classes,a=e.className,s=e.defaultValue,l=e.disabled,c=e.displayEmpty,u=e.labelId,d=e.IconComponent,p=e.inputRef,m=e.MenuProps,f=void 0===m?{}:m,h=e.multiple,g=e.name,v=e.onBlur,y=e.onChange,b=e.onClose,x=e.onFocus,S=e.onOpen,E=e.open,M=e.readOnly,C=e.renderValue;e.required;var w=e.SelectDisplayProps,k=void 0===w?{}:w,N=e.tabIndex;e.type;var T=e.value,O=e.variant,R=void 0===O?"standard":O,A=Gp(e,["autoFocus","autoWidth","children","classes","className","defaultValue","disabled","displayEmpty","labelId","IconComponent","inputRef","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","required","SelectDisplayProps","tabIndex","type","value","variant"]),L=B.useRef(null!=T).current,I=B.useState(s),P=I[0],D=I[1],q=L?T:P,z=B.useRef(null),$=B.useState(null),F=$[0],H=$[1],j=B.useRef(null!=E).current,V=B.useState(),W=V[0],_=V[1],U=B.useState(!1),Y=U[0],G=U[1],K=ey(t,p);B.useImperativeHandle(K,(function(){return{focus:function(){F.focus()},node:z.current,value:q}}),[F,q]),B.useEffect((function(){n&&F&&F.focus()}),[n,F]);var X,J,Z=function(e,t){e?S&&S(t):(F.focus(),b&&b(t)),j||(_(r?null:F.clientWidth),G(e))},Q=function(e){return function(t){var n;if(h||Z(!1,t),h){n=Array.isArray(q)?Ih(q):[];var r=q.indexOf(e.props.value);-1===r?n.push(e.props.value):n.splice(r,1)}else n=e.props.value;L||D(n),y&&(t.persist(),Object.defineProperty(t,"target",{writable:!0,value:{value:n,name:g}}),y(t,e))}},ee=null!==F&&(j?E:Y);delete A["aria-invalid"];var te=[],ne=!1;(Ux({value:q})||c)&&(C?X=C(q):ne=!0);var re=B.Children.map(o,(function(e){if(!B.isValidElement(e))return null;var t;if(h){if(!Array.isArray(q))throw new Error("Material-UI: the `value` prop must be an array when using the `Select` component with `multiple`.");(t=q.some((function(t){return BM(t,e.props.value)})))&&ne&&te.push(e.props.children)}else(t=BM(q,e.props.value))&&ne&&(J=e.props.children);return B.cloneElement(e,{"aria-selected":t?"true":void 0,onClick:Q(e),role:"option",selected:t,value:void 0,"data-value":e.props.value})}));ne&&(X=h?te.join(", "):J);var oe,ie=W;!r&&j&&F&&(ie=F.clientWidth),oe=void 0!==N?N:l?null:0;var ae=k.id||(g?"mui-component-select-".concat(g):void 0);return B.createElement(B.Fragment,null,B.createElement("div",Up({className:ev(i.root,i.select,i.selectMenu,i[R],a,l&&i.disabled),ref:H,tabIndex:oe,role:"button","aria-expanded":ee?"true":void 0,"aria-labelledby":"".concat(u||""," ").concat(ae||""),"aria-haspopup":"listbox",onKeyDown:function(e){if(!M){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),Z(!0,e))}},onClick:l||M?null:function(e){Z(!0,e)},onBlur:function(e){!ee&&v&&(e.persist(),Object.defineProperty(e,"target",{writable:!0,value:{value:q,name:g}}),v(e))},onFocus:x},k,{id:ae}),function(e){return null==e||"string"==typeof e&&!e.trim()}(X)?B.createElement("span",{dangerouslySetInnerHTML:{__html:"​"}}):X),B.createElement("input",Up({value:Array.isArray(q)?q.join(","):q,name:g,ref:z,type:"hidden",autoFocus:n},A)),B.createElement(d,{className:ev(i.icon,i["icon".concat(xv(R))],ee&&i.iconOpen)}),B.createElement(lE,Up({id:"menu-".concat(g||""),anchorEl:F,open:ee,onClose:function(e){Z(!1,e)}},f,{MenuListProps:Up({"aria-labelledby":u,role:"listbox",disableListWrap:!0},f.MenuListProps),PaperProps:Up({},f.PaperProps,{style:Up({minWidth:ie},null!=f.PaperProps?f.PaperProps.style:null)})}),re))})),HM=fE,jM=B.createElement(NS,null),VM=B.createElement(Jx,null),WM=B.forwardRef((function e(t,n){var r=t.autoWidth,o=void 0!==r&&r,i=t.children,a=t.classes,s=t.displayEmpty,l=void 0!==s&&s,c=t.IconComponent,u=void 0===c?mE:c,d=t.id,p=t.input,m=t.inputProps,f=t.labelId,h=t.MenuProps,g=t.multiple,v=void 0!==g&&g,y=t.native,b=void 0!==y&&y,x=t.onClose,S=t.onOpen,E=t.open,M=t.renderValue,C=t.SelectDisplayProps,w=t.variant,k=void 0===w?"standard":w,N=t.labelWidth,T=void 0===N?0:N,O=Gp(t,["autoWidth","children","classes","displayEmpty","IconComponent","id","input","inputProps","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant","labelWidth"]),R=b?pE:FM,A=Fx({props:t,muiFormControl:Lb(),states:["variant"]}).variant||k,L=p||{standard:jM,outlined:B.createElement(xE,{labelWidth:T}),filled:VM}[A];return B.cloneElement(L,Up({inputComponent:R,select:!0,inputProps:Up({children:i,IconComponent:u,variant:A,type:void 0,multiple:v},b?{}:{autoWidth:o,displayEmpty:l,labelId:f,MenuProps:h,onClose:x,onOpen:S,open:E,renderValue:M,SelectDisplayProps:Up({id:d},C)},{},m,{classes:m?Ag({baseClasses:a,newClasses:m.classes,Component:e}):a},p?p.props.inputProps:{}),ref:n},O))}));WM.muiName="Select";var _M=bv(HM,{name:"MuiSelect"})(WM);var UM=bv((function(e){return{thumb:{"&$open":{"& $offset":{transform:"scale(1) translateY(-10px)"}}},open:{},offset:Up({zIndex:1},e.typography.body2,{fontSize:e.typography.pxToRem(12),lineHeight:1.2,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),top:-34,left:"calc(-50% + -4px)",transformOrigin:"bottom center",transform:"scale(0)",position:"absolute"}),circle:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,borderRadius:"50% 50% 50% 0",backgroundColor:"currentColor",transform:"rotate(-45deg)"},label:{color:e.palette.primary.contrastText,transform:"rotate(45deg)"}}}),{name:"PrivateValueLabel"})((function(e){var t=e.children,n=e.classes,r=e.className,o=e.open,i=e.value,a=e.valueLabelDisplay;return"off"===a?t:B.cloneElement(t,{className:ev(t.props.className,(o||"on"===a)&&n.open,n.thumb)},B.createElement("span",{className:ev(n.offset,r)},B.createElement("span",{className:n.circle},B.createElement("span",{className:n.label},i))))}));function YM(e,t){return e-t}function GM(e,t,n){return e<t?t:e>n?n:e}function KM(e,t){return e.reduce((function(e,n,r){var o=Math.abs(t-n);return null===e||o<e.distance||o===e.distance?{distance:o,index:r}:e}),null).index}function XM(e,t){if(void 0!==t.current&&e.changedTouches){for(var n=0;n<e.changedTouches.length;n+=1){var r=e.changedTouches[n];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function JM(e,t,n){return 100*(e-t)/(n-t)}function ZM(e,t){var n=Math.round(e/t)*t;return Number(n.toFixed(function(e){if(Math.abs(e)<1){var t=e.toExponential().split("e-"),n=t[0].split(".")[1];return(n?n.length:0)+parseInt(t[1],10)}var r=e.toString().split(".")[1];return r?r.length:0}(t)))}function QM(e){var t=e.values,n=e.source,r=e.newValue,o=e.index;if(t[o]===r)return n;var i=Ih(t);return i[o]=r,i}function eC(e){var t=e.sliderRef,n=e.activeIndex,r=e.setActive;t.current.contains(document.activeElement)&&Number(document.activeElement.getAttribute("data-index"))===n||t.current.querySelector('[data-index="'.concat(n,'"]')).focus(),r&&r(n)}var tC={horizontal:{offset:function(e){return{left:"".concat(e,"%")}},leap:function(e){return{width:"".concat(e,"%")}}},"horizontal-reverse":{offset:function(e){return{right:"".concat(e,"%")}},leap:function(e){return{width:"".concat(e,"%")}}},vertical:{offset:function(e){return{bottom:"".concat(e,"%")}},leap:function(e){return{height:"".concat(e,"%")}}}},nC=[],rC=function(e){return e},oC=B.forwardRef((function(e,t){var n=e["aria-label"],r=e["aria-labelledby"],o=e["aria-valuetext"],i=e.classes,a=e.className,s=e.color,l=void 0===s?"primary":s,c=e.component,u=void 0===c?"span":c,d=e.defaultValue,p=e.disabled,m=void 0!==p&&p,f=e.getAriaLabel,h=e.getAriaValueText,g=e.marks,v=void 0===g?nC:g,y=e.max,b=void 0===y?100:y,x=e.min,S=void 0===x?0:x,E=e.name,M=e.onChange,C=e.onChangeCommitted,w=e.onMouseDown,k=e.orientation,N=void 0===k?"horizontal":k,T=e.step,O=void 0===T?1:T,R=e.ThumbComponent,A=void 0===R?"span":R,L=e.track,I=void 0===L?"normal":L,P=e.value,D=e.ValueLabelComponent,q=void 0===D?UM:D,z=e.valueLabelDisplay,$=void 0===z?"off":z,F=e.valueLabelFormat,H=void 0===F?rC:F,j=Gp(e,["aria-label","aria-labelledby","aria-valuetext","classes","className","color","component","defaultValue","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","onMouseDown","orientation","step","ThumbComponent","track","value","ValueLabelComponent","valueLabelDisplay","valueLabelFormat"]),V=yv(),W=B.useRef(null!=P).current,_=B.useRef(),U=B.useState(-1),Y=U[0],G=U[1],K=B.useState(-1),X=K[0],J=K[1],Z=B.useState(d),Q=Z[0],ee=Z[1],te=W?P:Q,ne=Array.isArray(te),re=B.useRef(),oe=ne?Ih(te).sort(YM):[te];oe=oe.map((function(e){return GM(e,S,b)}));var ie=!0===v&&null!==O?Ih(Array(Math.floor((b-S)/O)+1)).map((function(e,t){return{value:S+O*t}})):v;re.current={source:te};var ae=Sy(),se=ae.isFocusVisible,le=ae.onBlurVisible,ce=ae.ref,ue=B.useState(-1),de=ue[0],pe=ue[1],me=B.useRef(),fe=ey(ce,me),he=ey(t,fe),ge=cy((function(e){var t=Number(e.currentTarget.getAttribute("data-index"));se(e)&&pe(t),J(t)})),ve=cy((function(){-1!==de&&(pe(-1),le()),J(-1)})),ye=cy((function(e){var t=Number(e.currentTarget.getAttribute("data-index"));J(t)})),be=cy((function(){J(-1)})),xe=cy((function(e){var t,n=Number(e.currentTarget.getAttribute("data-index")),r=oe[n],o=(b-S)/10,i=ie.map((function(e){return e.value})),a=i.indexOf(r);switch(e.key){case"Home":t=S;break;case"End":t=b;break;case"PageUp":O&&(t=r+o);break;case"PageDown":O&&(t=r-o);break;case"ArrowRight":case"ArrowUp":t=O?r+O:i[a+1]||i[i.length-1];break;case"ArrowLeft":case"ArrowDown":t=O?r-O:i[a-1]||i[0];break;default:return}if(e.preventDefault(),O&&(t=ZM(t,O)),t=GM(t,S,b),ne){var s=t;t=QM({values:oe,source:te,newValue:t,index:n}).sort(YM),eC({sliderRef:me,activeIndex:t.indexOf(s)})}W||ee(t),pe(n),M&&M(e,t),C&&C(e,t)})),Se=B.useRef(),Ee=N;"rtl"===V.direction&&"vertical"!==N&&(Ee+="-reverse");var Me=B.useCallback((function(e){var t,n,r=e.finger,o=e.move,i=void 0!==o&&o,a=e.values,s=e.source,l=me.current.getBoundingClientRect(),c=l.width,u=l.height,d=l.bottom,p=l.left;if(t=0===Ee.indexOf("vertical")?(d-r.y)/u:(r.x-p)/c,-1!==Ee.indexOf("-reverse")&&(t=1-t),n=function(e,t,n){return(n-t)*e+t}(t,S,b),O)n=ZM(n,O);else{var m=ie.map((function(e){return e.value}));n=m[KM(m,n)]}n=GM(n,S,b);var f=0;if(ne){var h=n;f=(n=QM({values:a,source:s,newValue:n,index:f=i?Se.current:KM(a,n)}).sort(YM)).indexOf(h),Se.current=f}return{newValue:n,activeIndex:f}}),[b,S,Ee,ne,O,ie]),Ce=cy((function(e){var t=XM(e,_);if(t){var n=Me({finger:t,move:!0,values:oe,source:te}),r=n.newValue,o=n.activeIndex;eC({sliderRef:me,activeIndex:o,setActive:G}),W||ee(r),M&&M(e,r)}})),we=cy((function(e){var t=XM(e,_);if(t){var n=Me({finger:t,values:oe,source:te}).newValue;G(-1),"touchend"===e.type&&J(-1),C&&C(e,n),_.current=void 0,document.body.removeEventListener("mousemove",Ce),document.body.removeEventListener("mouseup",we),document.body.removeEventListener("mouseenter",ke),document.body.removeEventListener("touchmove",Ce),document.body.removeEventListener("touchend",we)}})),ke=cy((function(e){0===e.buttons&&we(e)})),Ne=cy((function(e){e.preventDefault();var t=e.changedTouches[0];null!=t&&(_.current=t.identifier);var n=XM(e,_),r=Me({finger:n,values:oe,source:te}),o=r.newValue,i=r.activeIndex;eC({sliderRef:me,activeIndex:i,setActive:G}),W||ee(o),M&&M(e,o),document.body.addEventListener("touchmove",Ce),document.body.addEventListener("touchend",we)}));B.useEffect((function(){var e=me.current;return e.addEventListener("touchstart",Ne),function(){e.removeEventListener("touchstart",Ne),document.body.removeEventListener("mousemove",Ce),document.body.removeEventListener("mouseup",we),document.body.removeEventListener("mouseenter",ke),document.body.removeEventListener("touchmove",Ce),document.body.removeEventListener("touchend",we)}}),[ke,we,Ce,Ne]);var Te=cy((function(e){w&&w(e),e.preventDefault();var t=XM(e,_),n=Me({finger:t,values:oe,source:te}),r=n.newValue,o=n.activeIndex;eC({sliderRef:me,activeIndex:o,setActive:G}),W||ee(r),M&&M(e,r),document.body.addEventListener("mousemove",Ce),document.body.addEventListener("mouseenter",ke),document.body.addEventListener("mouseup",we)})),Oe=JM(ne?oe[0]:S,S,b),Re=JM(oe[oe.length-1],S,b)-Oe,Ae=Up({},tC[Ee].offset(Oe),{},tC[Ee].leap(Re));return B.createElement(u,Up({ref:he,className:ev(i.root,i["color".concat(xv(l))],a,m&&i.disabled,ie.length>0&&ie.some((function(e){return e.label}))&&i.marked,!1===I&&i.trackFalse,{vertical:i.vertical}[N],{inverted:i.trackInverted}[I]),onMouseDown:Te},j),B.createElement("span",{className:i.rail}),B.createElement("span",{className:i.track,style:Ae}),B.createElement("input",{value:oe.join(","),name:E,type:"hidden"}),ie.map((function(e){var t,n=JM(e.value,S,b),r=tC[Ee].offset(n);if(!1===I)t=-1!==oe.indexOf(e.value);else{var o=ne?e.value>=oe[0]&&e.value<=oe[oe.length-1]:e.value<=oe[0];t=o&&"normal"===I||!o&&"inverted"===I}return B.createElement(B.Fragment,{key:e.value},B.createElement("span",{style:r,className:ev(i.mark,t&&i.markActive)}),B.createElement("span",{"aria-hidden":!0,style:r,className:ev(i.markLabel,t&&i.markLabelActive)},e.label))})),oe.map((function(e,t){var a=JM(e,S,b),s=tC[Ee].offset(a);return B.createElement(q,{key:t,valueLabelFormat:H,valueLabelDisplay:$,className:i.valueLabel,value:"function"==typeof H?H(e,t):H,index:t,open:X===t||Y===t||"on"===$,disabled:m},B.createElement(A,{className:ev(i.thumb,i["thumbColor".concat(xv(l))],Y===t&&i.active,m&&i.disabled,de===t&&i.focusVisible),tabIndex:m?null:0,role:"slider",style:s,"data-index":t,"aria-label":f?f(t):n,"aria-labelledby":r,"aria-orientation":N,"aria-valuemax":b,"aria-valuemin":S,"aria-valuenow":e,"aria-valuetext":h?h(e,t):o,onKeyDown:xe,onFocus:ge,onBlur:ve,onMouseOver:ye,onMouseLeave:be}))})))}));bv((function(e){return{root:{height:2,width:"100%",boxSizing:"content-box",padding:"11px 0",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:e.palette.primary.main,WebkitTapHighlightColor:"transparent","&$disabled":{pointerEvents:"none",cursor:"default",color:e.palette.grey[400]},"&$vertical":{width:2,height:"100%",padding:"0 11px"},"@media (pointer: coarse)":{padding:"20px 0","&$vertical":{padding:"0 20px"}}},colorPrimary:{},colorSecondary:{color:e.palette.secondary.main},marked:{marginBottom:20,"&$vertical":{marginBottom:"auto",marginRight:20}},vertical:{},disabled:{},rail:{display:"block",position:"absolute",width:"100%",height:2,borderRadius:1,backgroundColor:"currentColor",opacity:.38,"$vertical &":{height:"100%",width:2}},track:{display:"block",position:"absolute",height:2,borderRadius:1,backgroundColor:"currentColor","$vertical &":{width:2}},trackFalse:{"& $track":{display:"none"}},trackInverted:{"& $track":{backgroundColor:"light"===e.palette.type?Wp(e.palette.primary.main,.62):Vp(e.palette.primary.main,.5)},"& $rail":{opacity:1}},thumb:{position:"absolute",width:12,height:12,marginLeft:-6,marginTop:-5,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow"],{duration:e.transitions.duration.shortest}),"&::after":{position:"absolute",content:'""',left:-18,top:-18,right:-18,bottom:-18},"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(jp(e.palette.primary.main,.16)),"@media (hover: none)":{boxShadow:"none"}},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(jp(e.palette.primary.main,.16))},"&$disabled":{width:8,height:8,marginLeft:-4,marginTop:-3,"&:hover":{boxShadow:"none"}},"$vertical &":{marginLeft:-5,marginBottom:-6},"$vertical &$disabled":{marginLeft:-3,marginBottom:-4}},thumbColorPrimary:{},thumbColorSecondary:{"&$focusVisible,&:hover":{boxShadow:"0px 0px 0px 8px ".concat(jp(e.palette.secondary.main,.16))},"&$active":{boxShadow:"0px 0px 0px 14px ".concat(jp(e.palette.secondary.main,.16))}},active:{},focusVisible:{},valueLabel:{},mark:{position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},markActive:{backgroundColor:e.palette.background.paper,opacity:.8},markLabel:Up({},e.typography.body2,{color:e.palette.text.secondary,position:"absolute",top:22,transform:"translateX(-50%)",whiteSpace:"nowrap","$vertical &":{top:"auto",left:22,transform:"translateY(50%)"}}),markLabelActive:{color:e.palette.text.primary}}}),{name:"MuiSlider"})(oC);var iC=B.forwardRef((function(e,t){var n=e.action,r=e.classes,o=e.className,i=e.message,a=e.role,s=void 0===a?"alert":a,l=Gp(e,["action","classes","className","message","role"]);return B.createElement(Ev,Up({component:pb,variant:"body2",variantMapping:{body1:"div",body2:"div"},role:s,square:!0,elevation:6,className:ev(r.root,o),ref:t},l),B.createElement("div",{className:r.message},i),n?B.createElement("div",{className:r.action},n):null)})),aC=bv((function(e){var t="light"===e.palette.type?.8:.98,n=Hp(e.palette.background.default,t);return{root:_p({color:e.palette.getContrastText(n),backgroundColor:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:e.shape.borderRadius,flexGrow:1},e.breakpoints.up("sm"),{flexGrow:"initial",minWidth:288}),message:{padding:"8px 0"},action:{display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}}}),{name:"MuiSnackbarContent"})(iC),sC=B.forwardRef((function(e,t){var n=e.action,r=e.anchorOrigin,o=(r=void 0===r?{vertical:"bottom",horizontal:"center"}:r).vertical,i=r.horizontal,a=e.autoHideDuration,s=e.children,l=e.classes,c=e.className,u=e.ClickAwayListenerProps,d=e.ContentProps,p=e.disableWindowBlurListener,m=void 0!==p&&p,f=e.message,h=e.onClose,g=e.onEnter,v=e.onEntered,y=e.onEntering,b=e.onExit,x=e.onExited,S=e.onExiting,E=e.onMouseEnter,M=e.onMouseLeave,C=e.open,w=e.resumeHideDuration,k=e.TransitionComponent,N=void 0===k?yS:k,T=e.transitionDuration,O=void 0===T?{enter:zm.enteringScreen,exit:zm.leavingScreen}:T,R=e.TransitionProps,A=Gp(e,["action","anchorOrigin","autoHideDuration","children","classes","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onClose","onEnter","onEntered","onEntering","onExit","onExited","onExiting","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"]),L=B.useRef(),I=B.useState(!0),P=I[0],D=I[1],q=B.useCallback((function(e){var t=null!=e?e:a;h&&null!=t&&(clearTimeout(L.current),L.current=setTimeout((function(){h&&null!=(null!=e?e:a)&&h(null,"timeout")}),t))}),[a,h]);B.useEffect((function(){return C&&q(),function(){clearTimeout(L.current)}}),[C,q]);var z=function(){clearTimeout(L.current)},$=B.useCallback((function(){if(null!=a){if(null!=w)return void q(w);q(.5*a)}}),[a,w,q]);return B.useEffect((function(){if(!m&&C)return window.addEventListener("focus",$),window.addEventListener("blur",z),function(){window.removeEventListener("focus",$),window.removeEventListener("blur",z)}}),[m,$,C]),!C&&P?null:B.createElement(Jb,Up({onClickAway:function(e){h&&h(e,"clickaway")}},u),B.createElement("div",Up({className:ev(l.root,l["anchorOrigin".concat(xv(o)).concat(xv(i))],c),onMouseEnter:function(e){E&&E(e),z()},onMouseLeave:function(e){M&&M(e),$()},ref:t},A),B.createElement(N,Up({appear:!0,in:C,onEnter:rx((function(){D(!1)}),g),onEntered:v,onEntering:y,onExit:b,onExited:rx((function(){D(!0)}),x),onExiting:S,timeout:O,direction:"top"===o?"down":"up"},R),s||B.createElement(aC,Up({message:f,action:n},d)))))}));bv((function(e){var t={top:8},n={bottom:8},r={justifyContent:"flex-end"},o={justifyContent:"flex-start"},i={top:24},a={bottom:24},s={right:24},l={left:24},c={left:"50%",right:"auto",transform:"translateX(-50%)"};return{root:{zIndex:e.zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},anchorOriginTopCenter:Up({},t,_p({},e.breakpoints.up("sm"),Up({},i,{},c))),anchorOriginBottomCenter:Up({},n,_p({},e.breakpoints.up("sm"),Up({},a,{},c))),anchorOriginTopRight:Up({},t,{},r,_p({},e.breakpoints.up("sm"),Up({left:"auto"},i,{},s))),anchorOriginBottomRight:Up({},n,{},r,_p({},e.breakpoints.up("sm"),Up({left:"auto"},a,{},s))),anchorOriginTopLeft:Up({},t,{},o,_p({},e.breakpoints.up("sm"),Up({right:"auto"},i,{},l))),anchorOriginBottomLeft:Up({},n,{},o,_p({},e.breakpoints.up("sm"),Up({right:"auto"},a,{},l)))}}),{flip:!1,name:"MuiSnackbar"})(sC);var lC=B.forwardRef((function(e,t){var n=e.active,r=void 0!==n&&n,o=e.alternativeLabel,i=e.children,a=e.classes,s=e.className,l=e.completed,c=void 0!==l&&l,u=e.connector,d=e.disabled,p=void 0!==d&&d,m=e.index,f=e.last,h=e.orientation,g=Gp(e,["active","alternativeLabel","children","classes","className","completed","connector","disabled","index","last","orientation"]);return B.createElement("div",Up({className:ev(a.root,a[h],s,o&&a.alternativeLabel,c&&a.completed),ref:t},g),u&&o&&0!==m&&B.cloneElement(u,{orientation:h,alternativeLabel:o,index:m,active:r,completed:c,disabled:p}),B.Children.map(i,(function(e){return B.isValidElement(e)?B.cloneElement(e,Up({active:r,alternativeLabel:o,completed:c,disabled:p,last:f,icon:m+1,orientation:h},e.props)):null})))}));bv({root:{},horizontal:{paddingLeft:8,paddingRight:8},vertical:{},alternativeLabel:{flex:1,position:"relative"},completed:{}},{name:"MuiStep"})(lC);var cC=hb(B.createElement("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"})),uC=hb(B.createElement("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"})),dC=B.createElement("circle",{cx:"12",cy:"12",r:"12"}),pC=B.forwardRef((function(e,t){var n=e.completed,r=void 0!==n&&n,o=e.icon,i=e.active,a=void 0!==i&&i,s=e.error,l=void 0!==s&&s,c=e.classes;return"number"==typeof o||"string"==typeof o?l?B.createElement(uC,{className:ev(c.root,c.error),ref:t}):r?B.createElement(cC,{className:ev(c.root,c.completed),ref:t}):B.createElement(fb,{className:ev(c.root,a&&c.active),ref:t},dC,B.createElement("text",{className:c.text,x:"12",y:"16",textAnchor:"middle"},o)):o})),mC=bv((function(e){return{root:{display:"block",color:e.palette.text.disabled,"&$active":{color:e.palette.primary.main},"&$completed":{color:e.palette.primary.main},"&$error":{color:e.palette.error.main}},text:{fill:e.palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily},active:{},completed:{},error:{}}}),{name:"MuiStepIcon"})(pC),fC=B.forwardRef((function(e,t){var n=e.active,r=void 0!==n&&n,o=e.alternativeLabel,i=void 0!==o&&o,a=e.children,s=e.classes,l=e.className,c=e.completed,u=void 0!==c&&c,d=e.disabled,p=void 0!==d&&d,m=e.error,f=void 0!==m&&m,h=e.icon;e.last;var g=e.optional,v=e.orientation,y=void 0===v?"horizontal":v,b=e.StepIconComponent,x=e.StepIconProps,S=Gp(e,["active","alternativeLabel","children","classes","className","completed","disabled","error","icon","last","optional","orientation","StepIconComponent","StepIconProps"]),E=b;return h&&!E&&(E=mC),B.createElement("span",Up({className:ev(s.root,s[y],l,p&&s.disabled,i&&s.alternativeLabel,f&&s.error),ref:t},S),h||E?B.createElement("span",{className:ev(s.iconContainer,i&&s.alternativeLabel)},B.createElement(E,Up({completed:u,active:r,error:f,icon:h},x))):null,B.createElement("span",{className:s.labelContainer},B.createElement(pb,{variant:"body2",component:"span",className:ev(s.label,i&&s.alternativeLabel,u&&s.completed,r&&s.active,f&&s.error),display:"block"},a),g))}));fC.muiName="StepLabel";var hC=bv((function(e){return{root:{display:"flex",alignItems:"center","&$alternativeLabel":{flexDirection:"column"},"&$disabled":{cursor:"default"}},horizontal:{},vertical:{},label:{color:e.palette.text.secondary,"&$active":{color:e.palette.text.primary,fontWeight:500},"&$completed":{color:e.palette.text.primary,fontWeight:500},"&$alternativeLabel":{textAlign:"center",marginTop:16},"&$error":{color:e.palette.error.main}},active:{},completed:{},error:{},disabled:{},iconContainer:{flexShrink:0,display:"flex",paddingRight:8,"&$alternativeLabel":{paddingRight:0}},alternativeLabel:{},labelContainer:{width:"100%"}}}),{name:"MuiStepLabel"})(fC),gC=B.forwardRef((function(e,t){var n=e.active,r=e.alternativeLabel,o=e.children,i=e.classes,a=e.className,s=e.completed,l=e.disabled,c=e.icon;e.last;var u=e.optional,d=e.orientation,p=Gp(e,["active","alternativeLabel","children","classes","className","completed","disabled","icon","last","optional","orientation"]),m={active:n,alternativeLabel:r,completed:s,disabled:l,icon:c,optional:u,orientation:d},f=Zx(o,["StepLabel"])?B.cloneElement(o,m):B.createElement(hC,m,o);return B.createElement(Ty,Up({disabled:l,TouchRippleProps:{className:i.touchRipple},className:ev(i.root,i[d],a),ref:t},p),f)}));bv({root:{width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},horizontal:{},vertical:{justifyContent:"flex-start",padding:"8px",margin:"-8px"},touchRipple:{color:"rgba(0, 0, 0, 0.3)"}},{name:"MuiStepButton"})(gC);var vC=B.forwardRef((function(e,t){var n=e.active,r=e.alternativeLabel,o=void 0!==r&&r,i=e.classes,a=e.className,s=e.completed,l=e.disabled;e.index;var c=e.orientation,u=void 0===c?"horizontal":c,d=Gp(e,["active","alternativeLabel","classes","className","completed","disabled","index","orientation"]);return B.createElement("div",Up({className:ev(i.root,i[u],a,o&&i.alternativeLabel,n&&i.active,s&&i.completed,l&&i.disabled),ref:t},d),B.createElement("span",{className:ev(i.line,"vertical"===u?i.lineVertical:i.lineHorizontal)}))})),yC=bv((function(e){return{root:{flex:"1 1 auto"},horizontal:{},vertical:{marginLeft:12,padding:"0 0 8px"},alternativeLabel:{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"},active:{},completed:{},disabled:{},line:{display:"block",borderColor:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600]},lineHorizontal:{borderTopStyle:"solid",borderTopWidth:1},lineVertical:{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24}}}),{name:"MuiStepConnector"})(vC),bC=B.forwardRef((function(e,t){var n=e.active;e.alternativeLabel;var r=e.children,o=e.classes,i=e.className;e.completed;var a=e.last;e.optional,e.orientation;var s=e.TransitionComponent,l=void 0===s?Qb:s,c=e.transitionDuration,u=void 0===c?"auto":c,d=e.TransitionProps,p=Gp(e,["active","alternativeLabel","children","classes","className","completed","last","optional","orientation","TransitionComponent","transitionDuration","TransitionProps"]),m=u;return"auto"!==u||l.muiSupportAuto||(m=void 0),B.createElement("div",Up({className:ev(o.root,i,a&&o.last),ref:t},p),B.createElement(l,Up({in:n,className:o.transition,timeout:m,unmountOnExit:!0},d),r))}));bv((function(e){return{root:{marginTop:8,marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:"1px solid ".concat("light"===e.palette.type?e.palette.grey[400]:e.palette.grey[600])},last:{borderLeft:"none"},transition:{}}}),{name:"MuiStepContent"})(bC);var xC=B.createElement(yC,null),SC=B.forwardRef((function(e,t){var n=e.activeStep,r=void 0===n?0:n,o=e.alternativeLabel,i=void 0!==o&&o,a=e.children,s=e.classes,l=e.className,c=e.connector,u=void 0===c?xC:c,d=e.nonLinear,p=void 0!==d&&d,m=e.orientation,f=void 0===m?"horizontal":m,h=Gp(e,["activeStep","alternativeLabel","children","classes","className","connector","nonLinear","orientation"]),g=B.isValidElement(u)?B.cloneElement(u,{orientation:f}):null,v=B.Children.toArray(a),y=v.map((function(e,t){var n={alternativeLabel:i,connector:u,last:t+1===v.length,orientation:f},o={index:t,active:!1,completed:!1,disabled:!1};return r===t?o.active=!0:!p&&r>t?o.completed=!0:!p&&r<t&&(o.disabled=!0),[!i&&g&&0!==t&&B.cloneElement(g,Up({key:t},o)),B.cloneElement(e,Up({},n,{},o,{},e.props))]}));return B.createElement(Ev,Up({square:!0,elevation:0,className:ev(s.root,s[f],l,i&&s.alternativeLabel),ref:t},h),y)}));bv({root:{display:"flex",padding:24},horizontal:{flexDirection:"row",alignItems:"center"},vertical:{flexDirection:"column"},alternativeLabel:{alignItems:"flex-start"}},{name:"MuiStepper"})(SC);var EC=B.forwardRef((function(e,t){var n=e.anchor,r=e.classes,o=e.className,i=e.width,a=Gp(e,["anchor","classes","className","width"]);return B.createElement("div",Up({className:ev(r.root,r["anchor".concat(xv(n))],o),ref:t,style:_p({},Ox(n)?"width":"height",i)},a))})),MC=bv((function(e){return{root:{position:"fixed",top:0,left:0,bottom:0,zIndex:e.zIndex.drawer-1},anchorLeft:{right:"auto"},anchorRight:{left:"auto",right:0},anchorTop:{bottom:"auto",right:0},anchorBottom:{top:"auto",bottom:0,right:0}}}),{name:"PrivateSwipeArea"})(EC),CC=null;function wC(e,t){return"right"===e?document.body.offsetWidth-t[0].pageX:t[0].pageX}function kC(e,t){return"bottom"===e?window.innerHeight-t[0].clientY:t[0].clientY}function NC(e,t){return e?t.clientWidth:t.clientHeight}function TC(e,t,n,r){return Math.min(Math.max(n?t-e:r+t-e,0),r)}var OC="undefined"!=typeof navigator&&/iPad|iPhone|iPod/.test(navigator.userAgent),RC={enter:zm.enteringScreen,exit:zm.leavingScreen},AC="undefined"!=typeof window?B.useLayoutEffect:B.useEffect;B.forwardRef((function(e,t){var n=e.anchor,r=void 0===n?"left":n,o=e.disableBackdropTransition,i=void 0!==o&&o,a=e.disableDiscovery,s=void 0!==a&&a,l=e.disableSwipeToOpen,c=void 0===l?OC:l,u=e.hideBackdrop,d=e.hysteresis,p=void 0===d?.52:d,m=e.minFlingVelocity,f=void 0===m?450:m,h=e.ModalProps,g=(h=void 0===h?{}:h).BackdropProps,v=Gp(h,["BackdropProps"]),y=e.onClose,b=e.onOpen,x=e.open,S=e.PaperProps,E=void 0===S?{}:S,M=e.SwipeAreaProps,C=e.swipeAreaWidth,w=void 0===C?20:C,k=e.transitionDuration,N=void 0===k?RC:k,T=e.variant,O=void 0===T?"temporary":T,R=Gp(e,["anchor","disableBackdropTransition","disableDiscovery","disableSwipeToOpen","hideBackdrop","hysteresis","minFlingVelocity","ModalProps","onClose","onOpen","open","PaperProps","SwipeAreaProps","swipeAreaWidth","transitionDuration","variant"]),A=yv(),L=B.useState(!1),I=L[0],P=L[1],D=B.useRef({isSwiping:null}),q=B.useRef(),z=B.useRef(),$=B.useRef(),F=B.useRef(!1),H=B.useRef();AC((function(){H.current=null}),[x]);var j=B.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.mode,o=void 0===n?null:n,a=t.changeTransition,s=void 0===a||a,l=Rx(A,r),c=-1!==["right","bottom"].indexOf(l)?1:-1,d=Ox(r),p=d?"translate(".concat(c*e,"px, 0)"):"translate(0, ".concat(c*e,"px)"),m=$.current.style;m.webkitTransform=p,m.transform=p;var f="";if(o&&(f=A.transitions.create("all",Zv({timeout:N},{mode:o}))),s&&(m.webkitTransition=f,m.transition=f),!i&&!u){var h=z.current.style;h.opacity=1-e/NC(d,$.current),s&&(h.webkitTransition=f,h.transition=f)}}),[r,i,u,A,N]),W=cy((function(e){if(F.current)if(CC=null,F.current=!1,P(!1),D.current.isSwiping){D.current.isSwiping=null;var t,n=Rx(A,r),o=Ox(r);t=o?wC(n,e.changedTouches):kC(n,e.changedTouches);var i=o?D.current.startX:D.current.startY,a=NC(o,$.current),s=TC(t,i,x,a),l=s/a;Math.abs(D.current.velocity)>f&&(H.current=1e3*Math.abs((a-s)/D.current.velocity)),x?D.current.velocity>f||l>p?y():j(0,{mode:"exit"}):D.current.velocity<-f||1-l>p?b():j(NC(o,$.current),{mode:"enter"})}else D.current.isSwiping=null})),_=cy((function(e){if($.current&&F.current&&(null==CC||CC===D.current)){var t=Rx(A,r),n=Ox(r),o=wC(t,e.touches),i=kC(t,e.touches);if(x&&$.current.contains(e.target)&&null==CC){var a=function(e){var t=e.domTreeShapes,n=e.start,r=e.current,o=e.anchor,i={x:"scrollLeft",y:"scrollTop"},a={x:"scrollWidth",y:"scrollHeight"},s={x:"clientWidth",y:"clientHeight"};return t.some((function(e){var t=r>=n;"top"!==o&&"left"!==o||(t=!t);var l="left"===o||"right"===o?"x":"y",c=e[i[l]],u=c>0,d=c+e[s[l]]<e[a[l]];return t&&d||!t&&u?e:null}))}({domTreeShapes:function(e,t){for(var n=[];e&&e!==t;){var r=window.getComputedStyle(e);"absolute"===r.getPropertyValue("position")||"hidden"===r.getPropertyValue("overflow-x")?n=[]:(e.clientWidth>0&&e.scrollWidth>e.clientWidth||e.clientHeight>0&&e.scrollHeight>e.clientHeight)&&n.push(e),e=e.parentElement}return n}(e.target,$.current),start:n?D.current.startX:D.current.startY,current:n?o:i,anchor:r});if(a)return void(CC=a);CC=D.current}if(null==D.current.isSwiping){var l=Math.abs(o-D.current.startX),c=Math.abs(i-D.current.startY);l>c&&e.cancelable&&e.preventDefault();var u=n?l>c&&l>3:c>l&&c>3;if(!0===u||(n?c>3:l>3)){if(D.current.isSwiping=u,!u)return void W(e);D.current.startX=o,D.current.startY=i,s||x||(n?D.current.startX-=w:D.current.startY-=w)}}if(D.current.isSwiping){var d=NC(n,$.current),p=n?D.current.startX:D.current.startY;x&&!D.current.paperHit&&(p=Math.min(p,d));var m=TC(n?o:i,p,x,d);if(x)if(D.current.paperHit)0===m&&(D.current.startX=o,D.current.startY=i);else{if(!(n?o<d:i<d))return;D.current.paperHit=!0,D.current.startX=o,D.current.startY=i}null===D.current.lastTranslate&&(D.current.lastTranslate=m,D.current.lastTime=performance.now()+1);var f=(m-D.current.lastTranslate)/(performance.now()-D.current.lastTime)*1e3;D.current.velocity=.4*D.current.velocity+.6*f,D.current.lastTranslate=m,D.current.lastTime=performance.now(),e.cancelable&&e.preventDefault(),j(m)}}})),U=cy((function(e){if(!e.defaultPrevented&&!e.muiHandled&&(!x||z.current.contains(e.target)||$.current.contains(e.target))){var t=Rx(A,r),n=Ox(r),o=wC(t,e.touches),i=kC(t,e.touches);if(!x){if(c||e.target!==q.current)return;if(n){if(o>w)return}else if(i>w)return}e.muiHandled=!0,CC=null,D.current.startX=o,D.current.startY=i,P(!0),!x&&$.current&&j(NC(n,$.current)+(s?20:-w),{changeTransition:!1}),D.current.velocity=0,D.current.lastTime=null,D.current.lastTranslate=null,D.current.paperHit=!1,F.current=!0}}));B.useEffect((function(){if("temporary"===O)return document.body.addEventListener("touchstart",U),document.body.addEventListener("touchmove",_,{passive:!1}),document.body.addEventListener("touchend",W),function(){document.body.removeEventListener("touchstart",U),document.body.removeEventListener("touchmove",_,{passive:!1}),document.body.removeEventListener("touchend",W)}}),[O,U,_,W]),B.useEffect((function(){return function(){CC===D.current&&(CC=null)}}),[]),B.useEffect((function(){x||P(!1)}),[x]);var Y=B.useCallback((function(e){z.current=V.findDOMNode(e)}),[]),G=B.useCallback((function(e){$.current=V.findDOMNode(e)}),[]);return B.createElement(B.Fragment,null,B.createElement(Ix,Up({open:!("temporary"!==O||!I)||x,variant:O,ModalProps:Up({BackdropProps:Up({},g,{ref:Y})},v),PaperProps:Up({},E,{style:Up({pointerEvents:"temporary"!==O||x?"":"none"},E.style),ref:G}),anchor:r,transitionDuration:H.current||N,onClose:y,ref:t},R)),!c&&"temporary"===O&&B.createElement(dy,null,B.createElement(MC,Up({anchor:r,ref:q,width:w},M))))}));var LC=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.color,i=void 0===o?"secondary":o,a=e.edge,s=void 0!==a&&a,l=e.size,c=void 0===l?"medium":l,u=Gp(e,["classes","className","color","edge","size"]),d=B.createElement("span",{className:n.thumb});return B.createElement("span",{className:ev(n.root,r,{start:n.edgeStart,end:n.edgeEnd}[s],{small:n["size".concat(xv(c))]}[c])},B.createElement(qb,Up({type:"checkbox",icon:d,checkedIcon:d,classes:{root:ev(n.switchBase,n["color".concat(xv(i))]),input:n.input,checked:n.checked,disabled:n.disabled},ref:t},u)),B.createElement("span",{className:n.track}))}));bv((function(e){return{root:{display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle"},edgeStart:{marginLeft:-8},edgeEnd:{marginRight:-8},switchBase:{position:"absolute",top:0,left:0,zIndex:1,color:"light"===e.palette.type?e.palette.grey[50]:e.palette.grey[400],transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),"&$checked":{transform:"translateX(50%)"},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{opacity:.5},"&$disabled + $track":{opacity:"light"===e.palette.type?.12:.1}},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:jp(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.primary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:jp(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.secondary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},sizeSmall:{width:40,height:24,padding:7,"& $thumb":{width:16,height:16},"& $switchBase":{padding:4}},checked:{},disabled:{},input:{left:"-100%",width:"300%"},thumb:{boxShadow:e.shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"},track:{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white,opacity:"light"===e.palette.type?.38:.3}}}),{name:"MuiSwitch"})(LC);var IC=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.disabled,i=void 0!==o&&o,a=e.disableFocusRipple,s=void 0!==a&&a,l=e.fullWidth,c=e.icon,u=e.indicator,d=e.label,p=e.onChange,m=e.onClick,f=e.selected,h=e.textColor,g=void 0===h?"inherit":h,v=e.value,y=e.wrapped,b=void 0!==y&&y,x=Gp(e,["classes","className","disabled","disableFocusRipple","fullWidth","icon","indicator","label","onChange","onClick","selected","textColor","value","wrapped"]);return B.createElement(Ty,Up({focusRipple:!s,className:ev(n.root,n["textColor".concat(xv(g))],r,i&&n.disabled,f&&n.selected,d&&c&&n.labelIcon,l&&n.fullWidth,b&&n.wrapped),ref:t,role:"tab","aria-selected":f,disabled:i,onClick:function(e){p&&p(e,v),m&&m(e)}},x),B.createElement("span",{className:n.wrapper},c,d),u)}));bv((function(e){var t;return{root:Up({},e.typography.button,(t={maxWidth:264,minWidth:72,position:"relative",boxSizing:"border-box",minHeight:48,flexShrink:0,padding:"6px 12px"},_p(t,e.breakpoints.up("sm"),{padding:"6px 24px"}),_p(t,"overflow","hidden"),_p(t,"whiteSpace","normal"),_p(t,"textAlign","center"),_p(t,e.breakpoints.up("sm"),{fontSize:e.typography.pxToRem(13),minWidth:160}),t)),labelIcon:{minHeight:72,paddingTop:9,"& $wrapper > *:first-child":{marginBottom:6}},textColorInherit:{color:"inherit",opacity:.7,"&$selected":{opacity:1},"&$disabled":{opacity:.5}},textColorPrimary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.primary.main},"&$disabled":{color:e.palette.text.disabled}},textColorSecondary:{color:e.palette.text.secondary,"&$selected":{color:e.palette.secondary.main},"&$disabled":{color:e.palette.text.disabled}},selected:{},disabled:{},fullWidth:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},wrapped:{fontSize:e.typography.pxToRem(12),lineHeight:1.5},wrapper:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:"100%",flexDirection:"column"}}}),{name:"MuiTab"})(IC);var PC=B.createContext(),DC=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"table":o,a=e.padding,s=void 0===a?"default":a,l=e.size,c=void 0===l?"medium":l,u=e.stickyHeader,d=void 0!==u&&u,p=Gp(e,["classes","className","component","padding","size","stickyHeader"]),m=B.useMemo((function(){return{padding:s,size:c,stickyHeader:d}}),[s,c,d]);return B.createElement(PC.Provider,{value:m},B.createElement(i,Up({ref:t,className:ev(n.root,r,d&&n.stickyHeader)},p)))}));bv((function(e){return{root:{display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":Up({},e.typography.body2,{padding:e.spacing(2),color:e.palette.text.secondary,textAlign:"left",captionSide:"bottom"})},stickyHeader:{borderCollapse:"separate"}}}),{name:"MuiTable"})(DC);var qC=B.createContext(),zC={variant:"body"},$C=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"tbody":o,a=Gp(e,["classes","className","component"]);return B.createElement(qC.Provider,{value:zC},B.createElement(i,Up({className:ev(n.root,r),ref:t},a)))}));bv({root:{display:"table-row-group"}},{name:"MuiTableBody"})($C);var BC=B.forwardRef((function(e,t){var n,r=e.align,o=void 0===r?"inherit":r,i=e.classes,a=e.className,s=e.component,l=e.padding,c=e.scope,u=e.size,d=e.sortDirection,p=e.variant,m=Gp(e,["align","classes","className","component","padding","scope","size","sortDirection","variant"]),f=B.useContext(PC),h=B.useContext(qC);n=s||(h&&"head"===h.variant?"th":"td");var g=c;!g&&h&&"head"===h.variant&&(g="col");var v=l||(f&&f.padding?f.padding:"default"),y=u||(f&&f.size?f.size:"medium"),b=p||h&&h.variant,x=null;return d&&(x="asc"===d?"ascending":"descending"),B.createElement(n,Up({ref:t,className:ev(i.root,i[b],a,"inherit"!==o&&i["align".concat(xv(o))],"default"!==v&&i["padding".concat(xv(v))],"medium"!==y&&i["size".concat(xv(y))],{head:f&&f.stickyHeader&&i.stickyHeader}[b]),"aria-sort":x,scope:g},m))})),FC=bv((function(e){return{root:Up({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:"1px solid\n ".concat("light"===e.palette.type?Wp(jp(e.palette.divider,1),.88):Vp(jp(e.palette.divider,1),.68)),textAlign:"left",padding:16}),head:{color:e.palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},body:{color:e.palette.text.primary},footer:{color:e.palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},sizeSmall:{padding:"6px 24px 6px 16px","&:last-child":{paddingRight:16},"&$paddingCheckbox":{width:24,padding:"0px 12px 0 16px","&:last-child":{paddingLeft:12,paddingRight:16},"& > *":{padding:0}}},paddingCheckbox:{width:48,padding:"0 0 0 4px","&:last-child":{paddingLeft:0,paddingRight:4}},paddingNone:{padding:0,"&:last-child":{padding:0}},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right",flexDirection:"row-reverse"},alignJustify:{textAlign:"justify"},stickyHeader:{position:"sticky",top:0,left:0,zIndex:2,backgroundColor:e.palette.background.default}}}),{name:"MuiTableCell"})(BC),HC={variant:"footer"},jC=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"tfoot":o,a=Gp(e,["classes","className","component"]);return B.createElement(qC.Provider,{value:HC},B.createElement(i,Up({className:ev(n.root,r),ref:t},a)))}));bv({root:{display:"table-footer-group"}},{name:"MuiTableFooter"})(jC);var VC={variant:"head"},WC=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"thead":o,a=Gp(e,["classes","className","component"]);return B.createElement(qC.Provider,{value:VC},B.createElement(i,Up({className:ev(n.root,r),ref:t},a)))}));bv({root:{display:"table-header-group"}},{name:"MuiTableHead"})(WC);var _C=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"div":o,a=e.disableGutters,s=void 0!==a&&a,l=e.variant,c=void 0===l?"regular":l,u=Gp(e,["classes","className","component","disableGutters","variant"]);return B.createElement(i,Up({className:ev(n.root,n[c],r,!s&&n.gutters),ref:t},u))})),UC=bv((function(e){return{root:{position:"relative",display:"flex",alignItems:"center"},gutters:_p({paddingLeft:e.spacing(2),paddingRight:e.spacing(2)},e.breakpoints.up("sm"),{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}),regular:e.mixins.toolbar,dense:{minHeight:48}}}),{name:"MuiToolbar"})(_C),YC=hb(B.createElement("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"})),GC=hb(B.createElement("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"})),KC=B.createElement(GC,null),XC=B.createElement(YC,null),JC=B.createElement(YC,null),ZC=B.createElement(GC,null),QC=B.forwardRef((function(e,t){var n=e.backIconButtonProps,r=e.count,o=e.nextIconButtonProps,i=e.onChangePage,a=e.page,s=e.rowsPerPage,l=Gp(e,["backIconButtonProps","count","nextIconButtonProps","onChangePage","page","rowsPerPage"]),c=yv();return B.createElement("div",Up({ref:t},l),B.createElement(Pb,Up({onClick:function(e){i(e,a-1)},disabled:0===a,color:"inherit"},n),"rtl"===c.direction?KC:XC),B.createElement(Pb,Up({onClick:function(e){i(e,a+1)},disabled:a>=Math.ceil(r/s)-1,color:"inherit"},o),"rtl"===c.direction?JC:ZC))})),ew=function(e){var t=e.from,n=e.to,r=e.count;return"".concat(t,"-").concat(-1===n?r:n," of ").concat(r)},tw=[10,25,50,100],nw=B.forwardRef((function(e,t){var n,r=e.ActionsComponent,o=void 0===r?QC:r,i=e.backIconButtonProps,a=e.classes,s=e.className,l=e.colSpan,c=e.component,u=void 0===c?FC:c,d=e.count,p=e.labelDisplayedRows,m=void 0===p?ew:p,f=e.labelRowsPerPage,h=void 0===f?"Rows per page:":f,g=e.nextIconButtonProps,v=e.onChangePage,y=e.onChangeRowsPerPage,b=e.page,x=e.rowsPerPage,S=e.rowsPerPageOptions,E=void 0===S?tw:S,M=e.SelectProps,C=void 0===M?{}:M,w=Gp(e,["ActionsComponent","backIconButtonProps","classes","className","colSpan","component","count","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onChangePage","onChangeRowsPerPage","page","rowsPerPage","rowsPerPageOptions","SelectProps"]);u!==FC&&"td"!==u||(n=l||1e3);var k=C.native?"option":uE;return B.createElement(u,Up({className:ev(a.root,s),colSpan:n,ref:t},w),B.createElement(UC,{className:a.toolbar},B.createElement("div",{className:a.spacer}),E.length>1&&B.createElement(pb,{color:"inherit",variant:"body2",className:a.caption},h),E.length>1&&B.createElement(_M,Up({classes:{select:a.select,icon:a.selectIcon},input:B.createElement(Kx,{className:ev(a.input,a.selectRoot)}),value:x,onChange:y},C),E.map((function(e){return B.createElement(k,{className:a.menuItem,key:e,value:e.value?e.value:e},e.label?e.label:e)}))),B.createElement(pb,{color:"inherit",variant:"body2",className:a.caption},m({from:0===d?0:b*x+1,to:Math.min(d,(b+1)*x),count:d,page:b})),B.createElement(o,{className:a.actions,backIconButtonProps:i,count:d,nextIconButtonProps:g,onChangePage:v,page:b,rowsPerPage:x})))}));bv((function(e){return{root:{color:e.palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}},toolbar:{minHeight:52,paddingRight:2},spacer:{flex:"1 1 100%"},caption:{flexShrink:0},selectRoot:{marginRight:32,marginLeft:8},select:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"},selectIcon:{top:1},input:{color:"inherit",fontSize:"inherit",flexShrink:0},menuItem:{},actions:{flexShrink:0,marginLeft:20}}}),{name:"MuiTablePagination"})(nw);var rw=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.component,i=void 0===o?"tr":o,a=e.hover,s=void 0!==a&&a,l=e.selected,c=void 0!==l&&l,u=Gp(e,["classes","className","component","hover","selected"]),d=B.useContext(qC);return B.createElement(i,Up({ref:t,className:ev(n.root,r,d&&{head:n.head,footer:n.footer}[d.variant],s&&n.hover,c&&n.selected)},u))}));bv((function(e){return{root:{color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,"&$selected":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.04)":"rgba(255, 255, 255, 0.08)"},"&$hover:hover":{backgroundColor:"light"===e.palette.type?"rgba(0, 0, 0, 0.07)":"rgba(255, 255, 255, 0.14)"}},selected:{},hover:{},head:{},footer:{}}}),{name:"MuiTableRow"})(rw);var ow=hb(B.createElement("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"})),iw=B.forwardRef((function(e,t){var n=e.active,r=void 0!==n&&n,o=e.children,i=e.classes,a=e.className,s=e.direction,l=void 0===s?"desc":s,c=e.hideSortIcon,u=void 0!==c&&c,d=e.IconComponent,p=void 0===d?ow:d,m=Gp(e,["active","children","classes","className","direction","hideSortIcon","IconComponent"]);return B.createElement(Ty,Up({className:ev(i.root,a,r&&i.active),component:"span",disableRipple:!0,ref:t},m),o,u&&!r?null:B.createElement(p,{className:ev(i.icon,i["iconDirection".concat(xv(l))])}))}));bv((function(e){return{root:{cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:e.palette.text.secondary},"&:hover":{color:e.palette.text.secondary,"& $icon":{opacity:1}},"&$active":{color:e.palette.text.primary,"&& $icon":{opacity:1,color:e.palette.text.secondary}}},active:{},icon:{marginRight:4,marginLeft:4,opacity:0,transition:e.transitions.create(["opacity","transform"],{duration:e.transitions.duration.shorter}),userSelect:"none"},iconDirectionDesc:{transform:"rotate(0deg)"},iconDirectionAsc:{transform:"rotate(180deg)"}}}),{name:"MuiTableSortLabel"})(iw);var aw,sw=!("undefined"==typeof window||!window.document||!window.document.createElement);function lw(){if(aw)return aw;if(!sw||!window.document.body)return"indeterminate";var e=window.document.createElement("div");return e.appendChild(document.createTextNode("ABCD")),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),aw="reverse",e.scrollLeft>0?aw="default":(e.scrollLeft=1,0===e.scrollLeft&&(aw="negative")),document.body.removeChild(e),aw}function cw(e,t){var n=e.scrollLeft;if("rtl"!==t)return n;var r=lw();if("indeterminate"===r)return Number.NaN;switch(r){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n}return n}function uw(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}var dw={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function pw(e){var t=e.onChange,n=Gp(e,["onChange"]),r=B.useRef(),o=B.useRef(null),i=function(){r.current=o.current.offsetHeight-o.current.clientHeight};return B.useEffect((function(){var e=Cx((function(){var e=r.current;i(),e!==r.current&&t(r.current)}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[t]),B.useEffect((function(){i(),t(r.current)}),[t]),B.createElement("div",Up({style:dw,ref:o},n))}var mw=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.color,i=e.orientation,a=Gp(e,["classes","className","color","orientation"]);return B.createElement("span",Up({className:ev(n.root,n["color".concat(xv(o))],r,{vertical:n.vertical}[i]),ref:t},a))})),fw=bv((function(e){return{root:{position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create()},colorPrimary:{backgroundColor:e.palette.primary.main},colorSecondary:{backgroundColor:e.palette.secondary.main},vertical:{height:"100%",width:2,right:0}}}),{name:"PrivateTabIndicator"})(mw),hw=B.createElement(YC,{fontSize:"small"}),gw=B.createElement(GC,{fontSize:"small"}),vw=B.forwardRef((function(e,t){var n=e.classes,r=e.className,o=e.direction,i=e.orientation,a=e.visible,s=Gp(e,["classes","className","direction","orientation","visible"]),l=ev(n.root,r,{vertical:n.vertical}[i]);return a?B.createElement(Ty,Up({component:"div",className:l,ref:t,role:null,tabIndex:null},s),"left"===o?hw:gw):B.createElement("div",{className:l})})),yw=bv({root:{width:40,flexShrink:0},vertical:{width:"100%",height:40,"& svg":{transform:"rotate(90deg)"}}},{name:"PrivateTabScrollButton"})(vw),bw=B.forwardRef((function(e,t){var n=e.action,r=e.centered,o=void 0!==r&&r,i=e.children,a=e.classes,s=e.className,l=e.component,c=void 0===l?"div":l,u=e.indicatorColor,d=void 0===u?"secondary":u,p=e.onChange,m=e.orientation,f=void 0===m?"horizontal":m,h=e.ScrollButtonComponent,g=void 0===h?yw:h,v=e.scrollButtons,y=void 0===v?"auto":v,b=e.TabIndicatorProps,x=void 0===b?{}:b,S=e.textColor,E=void 0===S?"inherit":S,M=e.value,C=e.variant,w=void 0===C?"standard":C,k=Gp(e,["action","centered","children","classes","className","component","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","TabIndicatorProps","textColor","value","variant"]),N=yv(),T="scrollable"===w,O="rtl"===N.direction,R="vertical"===f,A=R?"scrollTop":"scrollLeft",L=R?"top":"left",I=R?"bottom":"right",P=R?"clientHeight":"clientWidth",D=R?"height":"width",q=B.useState(!1),z=q[0],$=q[1],F=B.useState({}),H=F[0],j=F[1],V=B.useState({start:!1,end:!1}),W=V[0],_=V[1],U=B.useState({overflow:"hidden",marginBottom:null}),Y=U[0],G=U[1],K=new Map,X=B.useRef(null),J=B.useRef(null),Z=function(){var e,t,n=X.current;if(n){var r=n.getBoundingClientRect();e={clientWidth:n.clientWidth,scrollLeft:n.scrollLeft,scrollTop:n.scrollTop,scrollLeftNormalized:cw(n,N.direction),scrollWidth:n.scrollWidth,top:r.top,bottom:r.bottom,left:r.left,right:r.right}}if(n&&!1!==M){var o=J.current.children;if(o.length>0){var i=o[K.get(M)];t=i?i.getBoundingClientRect():null}}return{tabsMeta:e,tabMeta:t}},Q=cy((function(){var e,t=Z(),n=t.tabsMeta,r=t.tabMeta,o=0;if(r&&n)if(R)o=r.top-n.top+n.scrollTop;else{var i=O?n.scrollLeftNormalized+n.clientWidth-n.scrollWidth:n.scrollLeft;o=r.left-n.left+i}var a=(_p(e={},L,o),_p(e,D,r?r[D]:0),e);if(isNaN(H[L])||isNaN(H[D]))j(a);else{var s=Math.abs(H[L]-a[L]),l=Math.abs(H[D]-a[D]);(s>=1||l>=1)&&j(a)}})),ee=function(e){!function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},i=r.ease,a=void 0===i?uw:i,s=r.duration,l=void 0===s?300:s,c=null,u=t[e],d=!1,p=function(){d=!0},m=function r(i){if(d)o(new Error("Animation cancelled"));else{null===c&&(c=i);var s=Math.min(1,(i-c)/l);t[e]=a(s)*(n-u)+u,s>=1?requestAnimationFrame((function(){o(null)})):requestAnimationFrame(r)}};u===n?o(new Error("Element already at target position")):requestAnimationFrame(m)}(A,X.current,e)},te=function(e){var t=X.current[A];R?t+=e:(t+=e*(O?-1:1),t*=O&&"reverse"===lw()?-1:1),ee(t)},ne=function(){te(-X.current[P])},re=function(){te(X.current[P])},oe=B.useCallback((function(e){G({overflow:null,marginBottom:-e})}),[]),ie=cy((function(){var e=Z(),t=e.tabsMeta,n=e.tabMeta;if(n&&t)if(n[L]<t[L]){var r=t[A]+(n[L]-t[L]);ee(r)}else if(n[I]>t[I]){var o=t[A]+(n[I]-t[I]);ee(o)}})),ae=cy((function(){if(T&&"off"!==y){var e,t,n=X.current,r=n.scrollTop,o=n.scrollHeight,i=n.clientHeight,a=n.scrollWidth,s=n.clientWidth;if(R)e=r>1,t=r<o-i-1;else{var l=cw(X.current,N.direction);e=O?l<a-s-1:l>1,t=O?l>1:l<a-s-1}e===W.start&&t===W.end||_({start:e,end:t})}}));B.useEffect((function(){var e=Cx((function(){Q(),ae()})),t=ix(X.current);return t.addEventListener("resize",e),function(){e.clear(),t.removeEventListener("resize",e)}}),[Q,ae]);var se=B.useCallback(Cx((function(){ae()})));B.useEffect((function(){return function(){se.clear()}}),[se]),B.useEffect((function(){$(!0)}),[]),B.useEffect((function(){Q(),ae()})),B.useEffect((function(){ie()}),[ie,H]),B.useImperativeHandle(n,(function(){return{updateIndicator:Q,updateScrollButtons:ae}}),[Q,ae]);var le=B.createElement(fw,Up({className:a.indicator,orientation:f,color:d},x,{style:Up({},H,{},x.style)})),ce=0,ue=B.Children.map(i,(function(e){if(!B.isValidElement(e))return null;var t=void 0===e.props.value?ce:e.props.value;K.set(t,ce);var n=t===M;return ce+=1,B.cloneElement(e,{fullWidth:"fullWidth"===w,indicator:n&&!z&&le,selected:n,onChange:p,textColor:E,value:t})})),de=function(){var e={};e.scrollbarSizeListener=T?B.createElement(pw,{className:a.scrollable,onChange:oe}):null;var t=W.start||W.end,n=T&&("auto"===y&&t||"desktop"===y||"on"===y);return e.scrollButtonStart=n?B.createElement(g,{orientation:f,direction:O?"right":"left",onClick:ne,visible:W.start,className:ev(a.scrollButtons,"on"!==y&&a.scrollButtonsDesktop)}):null,e.scrollButtonEnd=n?B.createElement(g,{orientation:f,direction:O?"left":"right",onClick:re,visible:W.end,className:ev(a.scrollButtons,"on"!==y&&a.scrollButtonsDesktop)}):null,e}();return B.createElement(c,Up({className:ev(a.root,s,R&&a.vertical),ref:t},k),de.scrollButtonStart,de.scrollbarSizeListener,B.createElement("div",{className:ev(a.scroller,T?a.scrollable:a.fixed),style:Y,ref:X,onScroll:se},B.createElement("div",{className:ev(a.flexContainer,R&&a.flexContainerVertical,o&&!T&&a.centered),ref:J,role:"tablist"},ue),z&&le),de.scrollButtonEnd)}));bv((function(e){return{root:{overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},vertical:{flexDirection:"column"},flexContainer:{display:"flex"},flexContainerVertical:{flexDirection:"column"},centered:{justifyContent:"center"},scroller:{position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},fixed:{overflowX:"hidden",width:"100%"},scrollable:{overflowX:"scroll",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},scrollButtons:{},scrollButtonsDesktop:_p({},e.breakpoints.down("xs"),{display:"none"}),indicator:{}}}),{name:"MuiTabs"})(bw);var xw={standard:NS,filled:Jx,outlined:xE},Sw=B.forwardRef((function(e,t){var n=e.autoComplete,r=e.autoFocus,o=e.children,i=e.classes,a=e.className,s=e.color,l=void 0===s?"primary":s,c=e.defaultValue,u=e.error,d=e.FormHelperTextProps,p=e.fullWidth,m=e.helperText,f=e.hiddenLabel,h=e.id,g=e.InputLabelProps,v=e.inputProps,y=e.InputProps,b=e.inputRef,x=e.label,S=e.multiline,E=e.name,M=e.onBlur,C=e.onChange,w=e.onFocus,k=e.placeholder,N=e.required,T=void 0!==N&&N,O=e.rows,R=e.rowsMax,A=e.select,L=void 0!==A&&A,I=e.SelectProps,P=e.type,D=e.value,q=e.variant,z=void 0===q?"standard":q,$=Gp(e,["autoComplete","autoFocus","children","classes","className","color","defaultValue","error","FormHelperTextProps","fullWidth","helperText","hiddenLabel","id","InputLabelProps","inputProps","InputProps","inputRef","label","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","rowsMax","select","SelectProps","type","value","variant"]),F=B.useState(0),H=F[0],j=F[1],W=B.useRef(null);B.useEffect((function(){if("outlined"===z){var e=V.findDOMNode(W.current);j(null!=e?e.offsetWidth:0)}}),[z,T,x]);var _={};"outlined"===z&&(g&&void 0!==g.shrink&&(_.notched=g.shrink),_.labelWidth=H),L&&(I&&I.native||(_.id=void 0),_["aria-describedby"]=void 0);var U=m&&h?"".concat(h,"-helper-text"):void 0,Y=x&&h?"".concat(h,"-label"):void 0,G=xw[z],K=B.createElement(G,Up({"aria-describedby":U,autoComplete:n,autoFocus:r,defaultValue:c,fullWidth:p,multiline:S,name:E,rows:O,rowsMax:R,type:P,value:D,id:h,inputRef:b,onBlur:M,onChange:C,onFocus:w,placeholder:k,inputProps:v},_,y));return B.createElement(eS,Up({className:ev(i.root,a),error:u,fullWidth:p,hiddenLabel:f,ref:t,required:T,color:l,variant:z},$),x&&B.createElement(RS,Up({htmlFor:h,ref:W,id:Y},g),x),L?B.createElement(_M,Up({"aria-describedby":U,id:h,labelId:Y,value:D,input:K},I),o):K,m&&B.createElement(iS,Up({id:U},d),m))}));function Ew(e){return Math.round(1e5*e)/1e5}bv({root:{}},{name:"MuiTextField"})(Sw);var Mw=B.forwardRef((function(e,t){var n=e.children,r=e.classes,o=e.disableFocusListener,i=void 0!==o&&o,a=e.disableHoverListener,s=void 0!==a&&a,l=e.disableTouchListener,c=void 0!==l&&l,u=e.enterDelay,d=void 0===u?0:u,p=e.enterTouchDelay,m=void 0===p?700:p,f=e.id,h=e.interactive,g=void 0!==h&&h,v=e.leaveDelay,y=void 0===v?0:v,b=e.leaveTouchDelay,x=void 0===b?1500:b,S=e.onClose,E=e.onOpen,M=e.open,C=e.placement,w=void 0===C?"bottom":C,k=e.PopperProps,N=e.title,T=e.TransitionComponent,O=void 0===T?yS:T,R=e.TransitionProps,A=Gp(e,["children","classes","disableFocusListener","disableHoverListener","disableTouchListener","enterDelay","enterTouchDelay","id","interactive","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperProps","title","TransitionComponent","TransitionProps"]),L=yv(),I=B.useState(!1),P=I[0],D=I[1],q=B.useState(0)[1],z=B.useState(),$=z[0],F=z[1],H=B.useRef(!1),j=B.useRef(null!=M).current,W=B.useRef(),_=B.useRef(),U=B.useRef(),Y=B.useRef(),G=B.useRef();B.useEffect((function(){W.current||(W.current="mui-tooltip-".concat(Math.round(1e5*Math.random()))),M&&q((function(e){return!e}))}),[M]),B.useEffect((function(){return function(){clearTimeout(_.current),clearTimeout(U.current),clearTimeout(Y.current),clearTimeout(G.current)}}),[]);var K=function(e){j||P||D(!0),E&&E(e)},X=function(e){var t=n.props;"mouseover"===e.type&&t.onMouseOver&&t.onMouseOver(e),H.current&&"touchstart"!==e.type||($&&$.removeAttribute("title"),clearTimeout(U.current),clearTimeout(Y.current),d?(e.persist(),U.current=setTimeout((function(){K(e)}),d)):K(e))},J=Sy(),Z=J.isFocusVisible,Q=J.onBlurVisible,ee=J.ref,te=B.useState(!1),ne=te[0],re=te[1],oe=function(e){j||D(!1),S&&S(e),clearTimeout(_.current),_.current=setTimeout((function(){H.current=!1}),L.transitions.duration.shortest)},ie=function(e){var t=n.props;"blur"===e.type&&(t.onBlur&&t.onBlur(e),ne&&(re(!1),Q())),"mouseleave"===e.type&&t.onMouseLeave&&t.onMouseLeave(e),clearTimeout(U.current),clearTimeout(Y.current),e.persist(),Y.current=setTimeout((function(){oe(e)}),y)},ae=ey(F,t),se=ey(ee,ae),le=B.useCallback((function(e){Qv(se,V.findDOMNode(e))}),[se]),ce=ey(n.ref,le),ue=j?M:P;""===N&&(ue=!1);var de=!ue&&!s,pe=Up({"aria-describedby":ue?f||W.current:null,title:de&&"string"==typeof N?N:null},A,{},n.props,{className:ev(A.className,n.props.className)});c||(pe.onTouchStart=function(e){H.current=!0;var t=n.props;t.onTouchStart&&t.onTouchStart(e),clearTimeout(Y.current),clearTimeout(_.current),clearTimeout(G.current),e.persist(),G.current=setTimeout((function(){X(e)}),m)},pe.onTouchEnd=function(e){n.props.onTouchEnd&&n.props.onTouchEnd(e),clearTimeout(G.current),clearTimeout(Y.current),e.persist(),Y.current=setTimeout((function(){oe(e)}),x)}),s||(pe.onMouseOver=X,pe.onMouseLeave=ie),i||(pe.onFocus=function(e){$||F(e.currentTarget),Z(e)&&(re(!0),X(e));var t=n.props;t.onFocus&&t.onFocus(e)},pe.onBlur=ie);var me=g?{onMouseOver:pe.onMouseOver,onMouseLeave:pe.onMouseLeave,onFocus:pe.onFocus,onBlur:pe.onBlur}:{};return B.createElement(B.Fragment,null,B.cloneElement(n,Up({ref:ce},pe)),B.createElement(RM,Up({className:ev(r.popper,g&&r.popperInteractive),placement:w,anchorEl:$,open:!!$&&ue,id:pe["aria-describedby"],transition:!0},me,k),(function(e){var t=e.placement,n=e.TransitionProps;return B.createElement(O,Up({timeout:L.transitions.duration.shorter},n,R),B.createElement("div",{className:ev(r.tooltip,r["tooltipPlacement".concat(xv(t.split("-")[0]))],H.current&&r.touch)},N))})))}));bv((function(e){return{popper:{zIndex:e.zIndex.tooltip,pointerEvents:"none",flip:!1},popperInteractive:{pointerEvents:"auto"},tooltip:{backgroundColor:jp(e.palette.grey[700],.9),borderRadius:e.shape.borderRadius,color:e.palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(10),lineHeight:"".concat(Ew(1.4),"em"),maxWidth:300,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},touch:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:"".concat(Ew(16/14),"em"),fontWeight:e.typography.fontWeightRegular},tooltipPlacementLeft:_p({transformOrigin:"right center",margin:"0 24px "},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementRight:_p({transformOrigin:"left center",margin:"0 24px"},e.breakpoints.up("sm"),{margin:"0 14px"}),tooltipPlacementTop:_p({transformOrigin:"center bottom",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"}),tooltipPlacementBottom:_p({transformOrigin:"center top",margin:"24px 0"},e.breakpoints.up("sm"),{margin:"14px 0"})}}),{name:"MuiTooltip"})(Mw);var Cw={entering:{transform:"none"},entered:{transform:"none"}},ww={enter:zm.enteringScreen,exit:zm.leavingScreen};function kw(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function Nw({d:e,size:t,style:n={},viewBox:r="0 0 16 16"}){const o={fontSize:kw(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return B.createElement("i",{style:o},B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},B.createElement("path",{d:e})))}B.forwardRef((function(e,t){var n=e.children,r=e.in,o=e.onEnter,i=e.onExit,a=e.style,s=e.timeout,l=void 0===s?ww:s,c=Gp(e,["children","in","onEnter","onExit","style","timeout"]),u=yv(),d=ey(n.ref,t);return B.createElement(Iv,Up({appear:!0,in:r,onEnter:function(e,t){Jv(e);var n=Zv({style:a,timeout:l},{mode:"enter"});e.style.webkitTransition=u.transitions.create("transform",n),e.style.transition=u.transitions.create("transform",n),o&&o(e,t)},onExit:function(e){var t=Zv({style:a,timeout:l},{mode:"exit"});e.style.webkitTransition=u.transitions.create("transform",t),e.style.transition=u.transitions.create("transform",t),i&&i(e)},timeout:l},c),(function(e,t){return B.cloneElement(n,Up({style:Up({transform:"scale(0)",visibility:"exited"!==e||r?void 0:"hidden"},Cw[e],{},a,{},n.props.style),ref:d},t))}))}));const Tw={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"},Ow={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"},Rw="M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z",Aw={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"},Lw={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"};function Iw(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.",e.layout);let r=Zi.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 Pw(e,t,n,r,o,i){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)),c=Q(!0,{},a),u=c.qHyperCubeDef[r][s],d=c.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l];d.qAttributeDimensions=u.qAttributeDimensions,u.qAttributeDimensions=[],i||(d.qAttributeExpressions=u.qAttributeExpressions,u.qAttributeExpressions=[]),c.qHyperCubeDef[r][s]=d,c.qHyperCubeDef.qLayoutExclude.qHyperCubeDef[r][l]=u,o&&o({oldItem:u,newItem:d,oldProperties:a,newProperties:c,model:e}),Iw(e,a,c)}))}const Dw=(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 qw({dir:e,dock:t,altList:n,model:r,translator:o,app:i,onChange:a}){return 0===n.length?null:{dir:e,dock:t,getAlternatives:()=>Dw(i,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?"H"!==e.qDim.qGrouping&&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 o=e.qDef.qFieldLabels[0]||e.qDef.qFieldDefs[0];return Promise.resolve(o)}(e,i,o).then((t=>({id:e.qDef.cId,selected:!1,title:t})))))))),changeTo(e,t){Pw(r,e,t,"qDimensions",a)}}}function zw(e,t,n,r="/qHyperCubeDef"){return{breadcrumbs:e.qGroupFallbackTitles.slice(0,e.qGroupPos),drilldown:"H"===e.qGrouping,index:t,locked:!!e.qLocked,text:"H"===e.qGrouping?e.qGroupFallbackTitles[e.qGroupPos]:e.qFallbackTitle,popoverText:(o=e,"H"===o.qGrouping?o.title||"":o.qFallbackTitle||""),drillUp(e){n.drillUp(r,t,e)},id:e.cId};var o}function $w({altList:e,app:t,dir:n,dock:r,model:o,onChange:i,skipAttributeExpressions:a,translator:s}){return 0===e.length?null:{dir:n,dock:r,getAlternatives:()=>Dw(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 o=e.qDef.qLabel||e.qDef.qDef;return Promise.resolve(o)}(e,t,s).then((t=>({id:e.qDef.cId,selected:!1,title:t})))))))),changeTo(e,t){Pw(o,e,t,"qMeasures",i,a)}}}function Bw(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle,id:e.cId}}const Fw={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"}}},Hw=({children:e,...t})=>B.createElement(Sb,Ep({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e);const jw=Hm({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 Vw=Wm({productionPrefix:"q3888",disableGlobal:!0,seed:""});function Ww(e,t,n,r){const o=function(t){const n=String(t);return e(n)};return o.ticks=()=>t.map((t=>{const i=o([t.data.value,r?n-1:0]),a=o([t.data.value,r?0:n-1])+e.bandwidth();return{position:(i+a)/2,label:t.label,data:t.data,start:i,end:a}})),o.bandwidth=()=>e.bandwidth(),o.data=()=>e.data(),o.domain=()=>e.domain(),o.pxScale=function(r){const o=e.pxScale(r);return o===e?this:Ww(o,t,n)},o}function _w(e){const t=e.scale("band");e.scale("group-by-measure",(function(e={},n={},r={}){const o=t(e,n,r),i=o.domain(),a=o.ticks(),s=[],l=e.measureCount;return i.forEach(((e,t)=>{for(let t=0;t<l;++t)s.push(String([e,t]));s.push(`SPACER_${t}_SPACER`)})),s.splice(-1),o.domain(s),Ww(o,a,l,e.invert)}))}const Uw={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:o,flipXY:i,symbol:a}){let s="x",l="y",c=r,u=o,d=t<.5?90:-90;return i&&(s="y",l="x",c=o,u=r,d=t<.5?180:0),a(Q({},e,{[s]:n*c,[l]:u-Math.max(e.size/2,Math.min(t*u,u-e.size/2)),startAngle:d}))}};function Yw({i:e,width:t,height:n,resolved:r,keys:o,flipXY:i,calcKey:a="box"}){let s,l=null,c=null;void 0!==r.major.settings.binStart?(l=r.major.items[e].binStart,c=r.major.items[e].binEnd,s=r.major.settings.binStart.scale):(s=r.major.settings.major.scale,l=s?r.major.items[e].major:0);let u=0;s?s.bandwidth?(u=s.bandwidth(),l-=u/2):u=c-l:u=1;const d=Q({},{major:l,majorEnd:c},r.minor.items[e]);o.forEach((t=>{d[t]=r[t].items[e]}));const p=i?n:t,m=function({bandwidth:e,width:t,minWidthPx:n,maxWidthPx:r,maxMajorWidth:o}){const i=e>=0?1:-1;let a=Math.min(i*e*t,Number.isNaN(Number(r))?o:r/o);return a=Number.isNaN(Number(n))?a:Math.max(n/o,a),a*i}({bandwidth:u,width:d[a].width,minWidthPx:d[a].minWidthPx,maxWidthPx:d[a].maxWidthPx,maxMajorWidth:p}),f=(u-m)/2,h=f+d.major+m/2;return{item:d,boxCenter:h,boxWidth:m,boxPadding:f,rendWidth:t,rendHeight:n}}function Gw({keys:e,data:t,defaultSettings:n,style:r,settings:o,width:i,height:a,resolver:s}){const l=Q(!0,{},n||{},r||{}),c={major:"horizontal"===o.orientation?a:i,minor:"horizontal"===o.orientation?i:a},u=o.major;let d;d="object"==typeof u&&"object"==typeof u.ref&&void 0!==u.ref.start&&void 0!==u.ref.end?s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:Q(!0,{},{binStart:{scale:o.major.scale,ref:o.major.ref.start},binEnd:{scale:o.major.scale,ref:o.major.ref.end}})}):"object"==typeof u&&void 0!==u.binStart&&void 0!==u.binEnd?s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:Q(!0,{},{binStart:{scale:o.major.scale,ref:"binStart"},binEnd:{scale:o.major.scale,ref:"binEnd"}},o.major)}):s.resolve({data:t,scaled:c,defaults:{major:.5},settings:{major:o.major}});const p=o.minor||{};let m;const f={major:d,minor:s.resolve({data:t,defaults:{start:0,end:1},scaled:c,settings:Q(!0,{},{start:{scale:p.scale,ref:"start"},end:{scale:p.scale,ref:"end"},min:{scale:p.scale,ref:"min"},max:{scale:p.scale,ref:"max"},med:{scale:p.scale,ref:"med"}},p)})};for(let n=0,r=e.length;n<r;n++)m=e[n],f[m]=s.resolve({data:t,defaults:l[m],settings:o[m],scaled:c});return f}const Kw=["oob"];const Xw={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:10},data:{},style:{}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,{dockValue:n}=this.settings.settings,r="horizontal"===this.settings.settings.orientation,{data:o,style:i,resolver:a,symbol:s}=this,l=Gw({keys:Kw,data:o,defaultSettings:{oob:Uw.getDefaultSettings()},style:i,settings:this.settings.settings,width:e,height:t,resolver:a}),{settings:c,items:u}=l;return function({width:e,height:t,flipXY:n,resolved:r,keys:o,symbol:i,dockValue:a,_calcItemRenderingOpts:s=Yw}){const l=[],{items:c}=r.major;for(let u=0,d=c.length;u<d;u++){const{item:d,boxCenter:p,rendWidth:m,rendHeight:f}=s({i:u,width:e,height:t,resolved:r,keys:o,flipXY:n,calcKey:"oob"}),h=c[u].data,g=[];if(d.oob.show){g.push(Uw.createOob({oob:d.oob,dockValue:a,boxCenter:p,rendWidth:m,rendHeight:f,flipXY:n,symbol:i}));const e={type:"container",data:h,collider:{type:"bounds"},children:g};l.push(e)}}return l}({items:u,settings:c,width:e,height:t,flipXY:r,resolved:l,keys:Kw,symbol:s,dockValue:n})}},Jw={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},Zw=["hat"];function Qw(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 ek({item:e,boxWidth:t,boxPadding:n,rendWidth:r,rendHeight:o,flipXY:i}){let a="x",s="y",l=r,c=o,u=e.hat.alignment||0;i&&(a="y",s="x",l=o,c=r,u=1-u);const d=(n+e.major)*l;let p=[{[a]:d,[s]:0+c},{[a]:d+t*u*l,[s]:8},{[a]:d+t*l,[s]:0+c},{[a]:d+t*l,[s]:0+c+10},{[a]:d,[s]:0+c+10}];const m=Q({},e.hat,{type:"path",d:Qw(p)});p=[{[a]:d,[s]:0},{[a]:d+t*(1-u)*l,[s]:0+c-8},{[a]:d+t*l,[s]:0},{[a]:d+t*l,[s]:-10},{[a]:d,[s]:-10}];return[m,Q({},e.hat,{type:"path",d:Qw(p)})]}const tk={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:25},data:{},style:{hat:"$shape"}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,n="horizontal"===this.settings.settings.orientation,{data:r,style:o,resolver:i}=this,a=Gw({keys:Zw,data:r,defaultSettings:Jw,style:o,settings:this.settings.settings,width:e,height:t,resolver:i}),{settings:s,items:l}=a;return function({width:e,height:t,flipXY:n,resolved:r,keys:o,_calcItemRenderingOpts:i=Yw}){const a=[],{items:s}=r.major;for(let l=0,c=s.length;l<c;l++){const{item:c,boxWidth:u,boxPadding:d,rendWidth:p,rendHeight:m}=i({i:l,width:e,height:t,resolved:r,keys:o,flipXY:n,calcKey:"hat"}),f=s[l].data,h=[];c.hat.show&&h.push(...ek({item:c,boxWidth:u,boxPadding:d,rendWidth:p,rendHeight:m,flipXY:n}));const g={type:"container",data:f,collider:{type:"bounds"},children:h};a.push(g)}return a}({items:l,settings:s,width:e,height:t,flipXY:n,resolved:a,keys:Zw})}};var nk="unclassified",rk="equal-equal",ok="equal-higher",ik="equal-lower",ak="equal-void",sk="higher-equal",lk="higher-higher-acute",ck="higher-higher-obtuse",uk="higher-lower-negative",dk="higher-lower-positive",pk="higher-void",mk="lower-equal",fk="lower-higher-negative",hk="lower-higher-positive",gk="lower-lower-acute",vk="lower-lower-obtuse",yk="lower-void",bk="void-equal",xk="void-higher",Sk="void-lower",Ek="void-void";function Mk(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*(180/Math.PI)}function Ck(e,t,n){const r=Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),o=Math.sqrt((t.x-n.x)**2+(t.y-n.y)**2),i=Math.sqrt((n.x-e.x)**2+(n.y-e.y)**2);return Math.acos((o*o+r*r-i*i)/(2*o*r))*(180/Math.PI)}function wk({previous:e,current:t,next:n}){const r=e&&e.value,o=t&&t.value,i=n&&n.value;return e||n?e?n?r===o?o===i?rk:o<i?ok:ik:o===i?r>o?sk:mk:r>o?o<i?Ck(e,t,n)>90?ck:lk:Mk(e,t)>Mk(e,n)?dk:uk:o>i?Ck(e,t,n)>90?vk:gk:Mk(e,t)>Mk(e,n)?hk:fk:r===o?ak:r>o?pk:yk:o===i?bk:o<i?xk:Sk:Ek}function kk({bounds:e,size:t}){const{x:n,y:r,width:o,height:i}=e,{insideStrategy:a}=t;return"center"===a?Math.floor(n+o/2)>=0&&Math.ceil(n+o/2)<=t.width&&Math.floor(r+i/2)>=0&&Math.ceil(r+i/2)<=t.height:Math.floor(n+o)>0&&Math.ceil(n)<t.width&&Math.floor(r+i/2)>=0&&Math.ceil(r+i/2)<=t.height}const Nk=1,Tk=0;function Ok({node:e,line:t,groupIndex:n,extract:r,style:o,measureText:i,size:a,horizontal:s,rtl:l,meta:c,showLabel:u}){const d=r.label(e.data);if("string"!=typeof d&&"number"!=typeof d||""===d)return!1;const p=i({fontFamily:o.fontFamily,fontSize:o.fontSize,text:d}),{localBounds:m}=e,{"stroke-width":f}=e.attrs,h=r.pointValue(e.data),g={x:m.x+m.width/2,y:m.y+m.height/2,width:p.width+2*Nk,height:p.height+2*Tk},v=`${g.x}-${g.y}`,y=!s&&!l,b=s?a.height:a.width,x=(s?g.y:g.x)/b,S=(y?1-x:x)<=(b<=200?.25:.1),E={key:v,node:e,line:t,group:n,value:h,labelMeasurements:p,bounds:g,inside:kk({bounds:m,size:a}),border:f?f/2:0,classification:nk,setClassification(e){E.classification=e},preferences:[],setPreferences(e){E.preferences.push(...e)},placement:void 0,setPlacement(e){E.placement=e},duplicate:!1,setDuplicate(){E.duplicate=!0},extreme:c.getExtreme(v),elite:S,show:u(e)};return E}function Rk({nodes:e,extract:t,style:n,measureText:r,size:o,horizontal:i,rtl:a,showLabel:s}){const l=function({nodes:e}){const t={top:[],right:[],bottom:[],left:[]},n=e.map((e=>{const{localBounds:t}=e,n={x:t.x+t.width/2,y:t.y+t.height/2};return{key:`${n.x}-${n.y}`,center:n}})),r=n.reduce(((e,t)=>((!e.top||t.center.y<e.top.center.y)&&(e.top=t),(!e.right||t.center.x>e.right.center.x)&&(e.right=t),(!e.bottom||t.center.y>e.bottom.center.y)&&(e.bottom=t),(!e.left||t.center.x<e.left.center.x)&&(e.left=t),e)),{});return t.top=n.filter((e=>e.center.y===r.top.center.y)).map((e=>e.key)),t.right=n.filter((e=>e.center.x===r.right.center.x)).map((e=>e.key)),t.bottom=n.filter((e=>e.center.y===r.bottom.center.y)).map((e=>e.key)),t.left=n.filter((e=>e.center.x===r.left.center.x)).map((e=>e.key)),{getExtrema:e=>({top:-1!==t.top.indexOf(e),right:-1!==t.right.indexOf(e),bottom:-1!==t.bottom.indexOf(e),left:-1!==t.left.indexOf(e)}),getExtreme:e=>{const{top:n,right:r,bottom:o,left:i}=t;return[n,r,o,i].some((t=>-1!==t.indexOf(e)))}}}({nodes:e});return function({nodes:e,by:t,lineIndex:n}){const r=e.reduce(((e,r,o)=>{const i=t(r.data);return e[i]||(e[i]={items:[],index:o}),e[i].items.push({node:r,line:r.data[n].value}),e}),{});return Object.keys(r).map((e=>r[e])).sort(((e,t)=>e.index-t.index)).map((e=>e.items))}({nodes:e,by:t.majorValue,lineIndex:t.lineIndex}).map(((e,c)=>e.map((e=>({line:e.line,item:Ok({node:e.node,line:e.line,groupIndex:c,extract:t,style:n,measureText:r,size:o,horizontal:i,rtl:a,meta:l,showLabel:s})}))).filter((e=>e.item)).reduce(((e,t)=>(e[t.line]=t.item,e)),{}))).filter((e=>Object.keys(e).length))}var Ak={TOP:"top",TOP_RIGHT:"top-right",RIGHT:"right",BOTTOM_RIGHT:"bottom-right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left",LEFT:"left",TOP_LEFT:"top-left"},Lk={[rk]:[Ak.TOP,Ak.BOTTOM],[ok]:[Ak.BOTTOM,Ak.BOTTOM_RIGHT],[ik]:[Ak.TOP,Ak.TOP_RIGHT],[ak]:[Ak.TOP,Ak.BOTTOM],[sk]:[Ak.LEFT,Ak.BOTTOM_LEFT,Ak.TOP,Ak.TOP_RIGHT],[lk]:[Ak.BOTTOM,Ak.BOTTOM_LEFT,Ak.LEFT,Ak.TOP_RIGHT],[ck]:[Ak.BOTTOM,Ak.TOP],[uk]:[Ak.TOP,Ak.TOP_RIGHT,Ak.RIGHT],[dk]:[Ak.BOTTOM,Ak.BOTTOM_LEFT,Ak.LEFT],[pk]:[Ak.TOP],[mk]:[Ak.TOP],[fk]:[Ak.TOP,Ak.TOP_LEFT],[hk]:[Ak.BOTTOM_RIGHT],[gk]:[Ak.TOP,Ak.TOP_LEFT,Ak.LEFT,Ak.TOP_RIGHT,Ak.RIGHT],[vk]:[Ak.TOP,Ak.BOTTOM],[yk]:[Ak.TOP],[bk]:[Ak.TOP],[xk]:[Ak.TOP,Ak.BOTTOM],[Sk]:[Ak.TOP,Ak.BOTTOM,Ak.LEFT],[Ek]:[Ak.TOP]};function Ik({nodes:e,extract:t,style:n,measureText:r,size:o,horizontal:i,rtl:a,showLabel:s}){const l=Rk({nodes:e,extract:t,style:n,measureText:r,size:o,horizontal:i,rtl:a,showLabel:s}),c=[...l.reduce(((e,t)=>(e.push(...Object.keys(t).map((e=>t[e]))),e)),[])],[u]=c,d=function({groups:e,threshold:t}){const n=e.map((e=>Object.keys(e).map((t=>e[t])))),r={};for(let e=0;e<=n.length;e++){const t=n[e];if(t)for(let e=0;e<t.length;e++){const n=t[e],{line:o}=n;r[o]||(r[o]=[]),r[o].push(n.bounds)}}const o=Object.keys(r).map((e=>r[e])),i=[];for(let e=0;e<o.length;e++)for(let n=0;n<o[e].length-1;n++){const r=o[e][n],a=o[e][n+1],s={x1:r.x,y1:r.y,x2:a.x,y2:a.y},l=s.x1-s.x2,c=s.y1-s.y2;Math.sqrt(l*l+c*c)>t&&i.push(s)}return i}({groups:l,threshold:u.node.localBounds.height}),p={getItems:()=>c,getLines:()=>d};return function({groups:e}){for(let t=0;t<e.length;t++){const n=Object.keys(e[t]).map((n=>e[t][n]));for(let r=0;r<n.length;r++){const o=n[r],i=wk({previous:e[t-1]&&e[t-1][o.line],current:o,next:e[t+1]&&e[t+1][o.line]});o.setClassification(i)}}}({groups:l}),p.getItems().forEach((e=>e.setPreferences(Lk[e.classification]))),p}function Pk({item:e,placement:t,size:n}){return t.x>=0-n.edgeBleed.left&&t.x<=n.width-e.bounds.width+n.edgeBleed.right&&t.y>=0-n.edgeBleed.top&&t.y<=n.height-e.bounds.height}function Dk({line1:e,line2:t}){const n=(t.y2-t.y1)*(e.x2-e.x1)-(t.x2-t.x1)*(e.y2-e.y1);if(0===n)return!1;const r=((t.x2-t.x1)*(e.y1-t.y1)-(t.y2-t.y1)*(e.x1-t.x1))/n,o=((e.x2-e.x1)*(e.y1-t.y1)-(e.y2-e.y1)*(e.x1-t.x1))/n;return r>=0&&r<=1&&o>=0&&o<=1}function qk({candidate:e,lines:t,rects:n}){return!!n.some((t=>function({rect1:e,rect2:t}){return!(t.x>e.x+e.width||t.x+t.width<e.x||t.y>e.y+e.height||t.y+t.height<e.y)}({rect1:t,rect2:e})))||t.some((t=>function({line:e,rect:t}){const n={x:t.x,y:t.y},r={x:t.x+t.width,y:t.y},o={x:t.x+t.width,y:t.y+t.height},i={x:t.x,y:t.y+t.height},a={x1:r.x,y1:r.y,x2:o.x,y2:o.y},s={x1:o.x,y1:o.y,x2:i.x,y2:i.y},l={x1:i.x,y1:i.y,x2:n.x,y2:n.y};return Dk({line1:e,line2:{x1:n.x,y1:n.y,x2:r.x,y2:r.y}})||Dk({line1:e,line2:a})||Dk({line1:e,line2:s})||Dk({line1:e,line2:l})}({line:t,rect:e})))}const zk={x:0,width:0,y:0,height:0};const $k=({item:e})=>({x:e.bounds.x-e.bounds.width/2,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border}),Bk=({item:e})=>({x:e.bounds.x,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border}),Fk=({item:e})=>({x:e.bounds.x+e.node.localBounds.width/2+e.border,y:e.bounds.y-e.bounds.height/2}),Hk=({item:e})=>({x:e.bounds.x,y:e.bounds.y+e.node.localBounds.height/2+e.border}),jk=({item:e})=>({x:e.bounds.x-e.bounds.width/2,y:e.bounds.y+e.node.localBounds.height/2+e.border}),Vk=({item:e})=>({x:e.bounds.x-e.bounds.width,y:e.bounds.y+e.node.localBounds.height/2+e.border}),Wk=({item:e})=>({x:e.bounds.x-e.bounds.width-e.node.localBounds.width/2-e.border,y:e.bounds.y-e.bounds.height/2}),_k=({item:e})=>({x:e.bounds.x-e.bounds.width,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border});var Uk=2.5,Yk=4;const Gk=[Ak.TOP,Ak.TOP_LEFT,Ak.TOP_RIGHT],Kk=[Ak.BOTTOM,Ak.BOTTOM_LEFT,Ak.BOTTOM_RIGHT];function Xk({position:e}){const t={x:Uk,width:-2*Uk,y:0,height:0},n=Gk.indexOf(e)>-1,r=Kk.indexOf(e)>-1;return n&&(t.y=Yk,t.height=-Yk),r&&(t.height=-Yk),t}function Jk({cx:e,cy:t,r:n,degrees:r}){const o=r*(Math.PI/180);return{x:Math.round(e+n*Math.sin(o)),y:Math.round(t+n*-Math.cos(o))}}function Zk({coordinates:e,degrees:t,item:n}){const r={x:e.x,y:e.y};return t<=90?r.y-=n.bounds.height:t>180&&t<=270?r.x-=n.bounds.width:t>270&&(r.y-=n.bounds.height,r.x-=n.bounds.width),r}function Qk({item:e,validator:t,force:n=!1}){const r=function({item:e}){return[e.node.localBounds.height/2*Math.sqrt(2)]}({item:e}),o=e.bounds.x,i=e.bounds.y;for(let a=0;a<r.length;a++){const s=r[a];for(let r=40;r<=180;r+=15){const a=Zk({coordinates:Jk({cx:o,cy:i,r:s,degrees:r}),degrees:r,item:e});if(t({item:e,placement:a,ignoreLines:n}).valid)return a}for(let r=320;r>180;r-=15){const a=Zk({coordinates:Jk({cx:o,cy:i,r:s,degrees:r}),degrees:r,item:e});if(t({item:e,placement:a,ignoreLines:n}).valid)return a}}return!1}const eN=void 0;function tN({item:e,validator:t,force:n=!1}){const r=[...e.preferences,...Object.keys(Ak).map((e=>Ak[e])).filter((t=>-1===e.preferences.indexOf(t)))],o={[Ak.TOP]:$k,[Ak.TOP_RIGHT]:Bk,[Ak.RIGHT]:Fk,[Ak.BOTTOM_RIGHT]:Hk,[Ak.BOTTOM]:jk,[Ak.BOTTOM_LEFT]:Vk,[Ak.LEFT]:Wk,[Ak.TOP_LEFT]:_k},i=[];for(let a=0;a<r.length;a++){const s=r[a],l=o[s]({item:e}),c=Xk({position:s}),u=t({item:e,placement:l,adjustment:c,ignoreLines:n});if(n&&u.inside&&i.push(l),u.valid)return l}const a=()=>Qk({item:e,validator:t,force:n});if(n){const e=a();return e||(i[0]||eN)}return(e.extreme||e.elite)&&a()||eN}function nN({model:e,size:t,all:n}){const r={},o=e.getItems(),i=[...o.map((e=>({x:e.node.localBounds.x-e.border+1,y:e.node.localBounds.y-e.border+1,height:e.node.localBounds.height+2*e.border-2,width:e.node.localBounds.width+2*e.border-2})))],a=[],s=e.getLines();o.forEach((e=>{const{data:o}=e.node;if(!e.show||!e.inside||o.null&&o.null.value||o.interpolated&&o.interpolated.value)return;const{key:l}=e;if(r[l])return void e.setDuplicate();r[l]=!0;const c=function({size:e,lines:t,placements:n}){return function({item:r,placement:o,adjustment:i=zk,ignoreLines:a=!1}){const s={inside:Pk({item:r,placement:o,size:e}),collides:!0,valid:!1};return s.inside?(s.collides=qk({candidate:{x:o.x+i.x,y:o.y+i.y,width:r.bounds.width+i.width,height:r.bounds.height+i.height},lines:a?[]:t,rects:n}),s.valid=!s.collides,s):s}}({size:t,lines:s,placements:i}),u=tN({item:e,validator:c});u?(u.height=e.bounds.height,u.width=e.bounds.width,i.push(u),e.setPlacement(u)):n&&a.push({item:e,validator:c})})),a.forEach((e=>{const{item:t,validator:n}=e,r=tN({item:t,validator:n,force:!0});r&&(r.height=t.bounds.height,r.width=t.bounds.width,i.push(r),t.setPlacement(r))}))}var rN={require:["chart","renderer"],defaultSettings:{settings:{orientation:"horizontal",rtl:!1,connect:!1,all:!1,label:()=>{},showLabel:()=>!0,pointValue:()=>{},majorValue:()=>{},target:{point:"point-component",allPoints:[]},lineIndex:"line",insideStrategy:"edge",labelSpace:{use:()=>!1,size:10}},style:{fontFamily:'"Source Sans Pro", "Arial", "sans-serif"',fontSize:"12px",fill:"#333"}},preferredSize(){const e={edgeBleed:{top:0,right:0,left:0}},{orientation:t,rtl:n,labelSpace:r}=this.settings.settings,{use:o,size:i}=r;if(o()){const r="horizontal"===t;e.edgeBleed.top=r?i:0,e.edgeBleed[n?"left":"right"]=r?0:i}return e},render(){const{settings:e}=this.settings,{target:t,enabled:n}=e;if(!this.chart.component(t.point))return[];if("function"==typeof n&&!n())return[];const{allPoints:r}=t,o=r.length?e=>r.includes(e.key):e=>e.key===t.point,i=this.chart.findShapes("circle").filter(o);if(!i.length)return[];const a="horizontal"===e.orientation,s=a?"x":"y";i.sort(((e,t)=>e.localBounds[s]-t.localBounds[s]));const l={label:e.label,pointValue:e.pointValue,majorValue:e.majorValue,lineIndex:e.lineIndex},{height:c,width:u,edgeBleed:d}=this.rect,p={height:c,width:u,edgeBleed:d,insideStrategy:e.insideStrategy},{style:m}=this,f=Ik({nodes:i,extract:l,style:m,measureText:this.renderer.measureText,size:p,horizontal:a,rtl:e.rtl,showLabel:e.showLabel});return function({model:e}){e.getItems().sort(((e,t)=>e.extreme===t.extreme?0:e.extreme&&!t.extreme?-1:1))}({model:f}),nN({model:f,size:p,all:e.all}),f.getItems().filter((e=>e.placement&&e.node.key===this.settings.settings.target.point)).map((e=>({type:"text",x:e.placement.x+e.placement.width/2,y:e.placement.y+e.labelMeasurements.height/2,fontSize:m.fontSize,fontFamily:m.fontFamily,fill:m.fill,text:l.label(e.node.data),data:e.node.data.value,baseline:"central",anchor:"middle"})))}},oN={defaultSettings:{settings:{size:10}},preferredSize(){return this.settings.settings.size},render:()=>[]};var iN={require:["resolver","symbol"],defaultSettings:{settings:{type:"max",primaryExtremum:()=>{},secondaryExtremum:()=>{},primarySeries:[],secondarySeries:[],orientation:"horizontal",rtl:!1,major:{scale:"major-scale"},markerOffset:1,size:10},style:{fill:"#999"}},preferredSize(){return this.settings.settings.size},render(){const{items:e=[]}=this.data;if(!e.length)return[];const{type:t,orientation:n,rtl:r,markerOffset:o,size:i,major:a,primarySeries:s,secondarySeries:l}=this.settings.settings,c=this.settings.settings.primaryExtremum(),u=this.settings.settings.secondaryExtremum(),d=s.length&&void 0!==c,p=l.length&&void 0!==u;if(!d&&!p)return[];const m=s.map((e=>e.ref)),f=l.map((e=>e.ref)),h=function({type:e,primaryExtremum:t,secondaryExtremum:n,primaryItems:r=[],secondaryItems:o=[],primarySeries:i=[],secondarySeries:a=[]}){const s=[];return[...i,...a].forEach((i=>{const a=i.isPrimary?t:n,l=i.isPrimary?r:o;s.push((({type:e,extremum:t,separateStacking:n,items:r})=>{const o="max"===e?e=>e>t:e=>e<t,i=n?e=>o(e.point.value<0?e.start.value:e.end.value):e=>o(e.end.value);return r.filter(i)})({type:e,extremum:a,items:l}))})),(({items:e})=>{const t=[],n=[];return e.forEach((e=>{const{value:r}=e.major;t[r]||(t[r]=!0,n.push(e))})),n})({items:s.reduce(((e,t)=>e.concat(t)),[])})}({type:t,primaryExtremum:c,secondaryExtremum:u,primaryItems:e.filter((e=>m.includes(e.end.source.field))),secondaryItems:e.filter((e=>f.includes(e.end.source.field))),primarySeries:s,secondarySeries:l});if(!h.length)return[];const g="horizontal"===n,v=this.rect[g?"width":"height"],y=this.resolver.resolve({data:{items:h},settings:{major:a},scaled:{major:v}}),b=("max"===t?90:-90)-(g?0:90)-(!g&&r?180:0),x=i/2*o,{fill:S}=this.settings.style;return y.items.map((e=>function({symbol:e,size:t,fill:n,startAngle:r,x:o,y:i,data:a}){return e({type:"n-polygon",show:!0,size:t,fill:n,stroke:"#205891",strokeWidth:0,sides:3,startAngle:r,width:.7,x:o,y:i,data:a})}({symbol:this.symbol,size:i,fill:S,startAngle:b,x:g?v*e.major:x,y:g?x:v*e.major,data:e.data})))}};function aN({x:e,y:t,size:n,stroke:r,strokeWidth:o,fill:i}){return{type:"container",children:[{type:"line",stroke:r||i,strokeWidth:o,x1:e-n/2,y1:t,x2:e+n/2,y2:t},{type:"circle",strokeWidth:0,fill:i,cx:e,cy:t,r:.25*n}]}}function sN({chart:e,seriesInfo:t}){const n={primary:{paths:[],map:{}},secondary:{paths:[],map:{}}},r=[...t.primary.map((e=>e.key)),...t.secondary.map((e=>e.key))];return e.findShapes("path").filter((e=>r.some((t=>t===e.key)))).reduce(((e,n)=>((t.primary.some((e=>e.key===n.key))?e.primary:e.secondary).paths.push(n),e)),n),{getLine:(e,t)=>{const r=t?n.primary:n.secondary;if(!r.map[e]){const[t]=r.paths.filter((t=>t.data&&t.data.typeIndex.value===e));r.map[e]=t}return r.map[e]}}}function lN({brush:e}){const t=e.brush.values();return function({value:e}){return-1!==t.indexOf(e)}}function cN({brush:e,chart:t}){const n=e.brush.ranges();if(!n.length)return!1;const r=t&&t.scale(Qa.SCALE.MAJOR),o=r&&r.max&&r.max(),i="qHyperCube/qDimensionInfo/0:numeric"===e.id?(e,t)=>t===o?e<=t:e<t:(e,t)=>e<=t;return function({value:e}){return n.some((t=>t.min<=e&&i(e,t.max)))}}function uN({brush:e,selectionInfo:t,items:n,selectionValues:r,colorByData:o,chart:i}){const a=e.brushes();if(!a.length)return[];const s=a[0],{minorRange:l,legendRange:c,legendTap:u}=t,d=0===s.id.indexOf("qHyperCube/qMeasureInfo/")?"qHyperCube/qMeasureInfo/X":s.id;let p=[c?e=>e.color.value:r[d]].filter(Boolean);if(o&&l&&p.push((e=>e.color.value)),!o&&u&&(p=[e=>e.color.value]),!p.length)return[];const m=function({brush:e,chart:t}){return("value"===e.type?lN:cN)({brush:e,chart:t})}({brush:s,chart:i});return m?n.reduce(((e,t,n)=>(p.some((e=>m({value:e(t)})))&&e.push({item:t,index:n}),e)),[]):[]}function dN({chart:e,selected:t,connection:n,gradient:r,fallback:o}){const i=e.scale(Qa.SCALE.COLOR),a=t.filter((e=>-1!==n.indexOf(e.index))).map((e=>e.item.end.value)),s=Math.min(...a),l=Math.max(...a),c=l-s,u=0===c?1:c,d=i.domain().map((e=>({color:i(Math.min(l,Math.max(s,e)))||o,offset:Math.min(1,Math.max(0,(e-s)/u))}))),p=d.map((e=>e.offset)),m=p.lastIndexOf(0),f=p.indexOf(1),h=d.slice(-1===m?0:m,-1===f?d.length:f+1);return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:h}}function pN({chart:e,selected:t,connection:n,gradient:r,fallback:o}){const i=e.scale(Qa.SCALE.COLOR),a=t.filter((e=>-1!==n.indexOf(e.index))).map((e=>e.item.end.value)),s=Math.min(...a),l=Math.max(...a)-s,c=0===l?1:l,u=i.domain(),d=[];for(let e=0;e<u.length-1;e++){const t=u[e],n=i(t)||o;d.push({color:n,offset:Math.min(1,Math.max(0,(t-s)/c))});const r=u[e+1];d.push({color:n,offset:Math.min(1,Math.max(0,(r-s)/c))})}const p=d.map((e=>e.offset)),m=p.lastIndexOf(0),f=p.indexOf(1),h=d.slice(-1===m?0:m,-1===f?d.length:f+1);return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:h}}function mN({property:e,chart:t,connection:n,attrs:r,colorSettings:o,colorByData:i,selected:a,hasMultipleMeasures:s,groupedByMeasure:l,itemsPerGroup:c,orientation:u,rtl:d}){const p=r[e];if("gradient"!==p.type)return p;const{type:m,nil:f}=o;if(s||!i)return function({chart:e,selected:t,connection:n,gradient:r,fallback:o,orientation:i,isColorCode:a,groupedByMeasure:s,itemsPerGroup:l,rtl:c}){const u=e.scale(Qa.SCALE.MAJOR),d=e.scale(Qa.SCALE.COLOR),p=s?e=>u([e,0])+u.bandwidth()*l/2:e=>u(e),m=t.filter((e=>-1!==n.indexOf(e.index))),f=("vertical"===i&&c?m.reverse():m).map((e=>e.item)),h=f.map((e=>p(e.major.value))),g=Math.min(...h),v=Math.max(...h)-g,y=0===v?1:v,b=h.map(((e,t)=>0===t?0:t===h.length-1?1:(e-g)/y)),x=[];for(let e=0;e<f.length;e++){const t=f[e],n=a?t.color.value:d(t.color.value)||o,r=b[e];x.push({color:n,offset:0===e?0:Math.max(0,x[x.length-1].offset)}),x.push({color:n,offset:e===f.length-1?1:Math.max(0,parseFloat((r+(b[e+1]-r)/2).toFixed(5)))})}return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:x}}({chart:t,selected:a,connection:n,gradient:p,fallback:f,orientation:u,isColorCode:"color"===m,groupedByMeasure:l,itemsPerGroup:c,rtl:d});return("continuous"===m?dN:pN)({chart:t,selected:a,connection:n,gradient:p,fallback:f})}function fN({chart:e,pathModel:t,colorSettings:n,colorByData:r,hasMultipleMeasures:o,groupedByMeasure:i,itemsPerGroup:a,orientation:s,lineKey:l,primary:c,selected:u,connections:d,rtl:p,count:m}){const f=t.getLine(l,c),{attrs:h}=f,g=function({d:e}){return e.replace("Z","").split(/(?=[LMC])/).map((e=>{const t=e.substring(0,1),n={letter:t,x:0,y:0,raw:e},r=e.substring(1).split(",");return"M"===t||"L"===t?([n.x]=r,[,n.y]=r):"C"===t&&([,,,,n.x]=r,[,,,,,n.y]=r),n}))}({d:h.d});return d.map((t=>function({chart:e,colorSettings:t,colorByData:n,hasMultipleMeasures:r,groupedByMeasure:o,itemsPerGroup:i,orientation:a,selected:s,connection:l,commands:c,attrs:u,rtl:d,count:p}){return{path:l.map(((e,t)=>{const n=c[e];return 0!==t||"M"===n.letter?n.raw:`M${n.x},${n.y}`})).join(""),attrs:u,stroke:mN({property:"stroke",chart:e,connection:l,attrs:u,selected:s,colorSettings:t,colorByData:n,hasMultipleMeasures:r,groupedByMeasure:o,itemsPerGroup:i,orientation:a,rtl:d,count:p})}}({chart:e,colorSettings:n,colorByData:r,hasMultipleMeasures:o,groupedByMeasure:i,itemsPerGroup:a,orientation:s,selected:u,connection:t,commands:g,attrs:h,rtl:p,count:m})))}function hN({chart:e,pathModel:t,seriesInfo:n,brush:r,selectionInfo:o,items:i,selectionValues:a,colorSettings:s,colorByData:l,hasMultipleMeasures:c,groupedByMeasure:u,itemsPerGroup:d,orientation:p,rtl:m}){const f=function({items:e,seriesInfo:t}){const n=e.reduce(((e,n,r)=>{const o=n.typeIndex.value;var i;return e[o]||(e[o]={key:o,items:[],index:r,measureIx:null===(i=n.colorMeasureIdx)||void 0===i?void 0:i.value,primary:t.primary.some((e=>e.typeIndex===o))}),e[o].items.push(n),e}),{});return Object.keys(n).map((e=>n[e])).sort(((e,t)=>e.index-t.index)).map((e=>({lineKey:e.key,items:e.items,primary:e.primary,measureIx:e.measureIx})))}({items:function({items:e,selectionInfo:t,seriesInfo:n}){return e.filter((e=>{if("NaN"===e.end.value||Number.isNaN(e.end.value))return!1;const{minorRange:r,minorRangePrimary:o}=t;return!r||(o?n.primary:n.secondary).some((t=>t.typeIndex===e.typeIndex.value))}))}({items:i,selectionInfo:o,seriesInfo:n}),seriesInfo:n}),{lines:h}=f.reduce(((n,i)=>{const f=uN({brush:r,selectionInfo:o,items:i.items,selectionValues:a,colorByData:l,chart:e});if(f.length<2)return n;const h=function({selected:e}){return e.reduce(((e,t)=>{const{index:n}=t;if(e.length){const t=e[e.length-1];n===t[t.length-1]+1?t.push(n):e.push([n])}else e.push([n]);return e}),[]).filter((e=>e.length>1))}({selected:f});return h.length?(n.lines.push(...fN({chart:e,pathModel:t,colorSettings:s(i.measureIx),colorByData:l(i.measureIx),hasMultipleMeasures:c,groupedByMeasure:u,itemsPerGroup:d,orientation:p,lineKey:i.lineKey,primary:i.primary,selected:f,connections:h,rtl:m,count:i.items.length})),n):n}),{lines:[]}),g=[];return h.forEach((e=>g.push({type:"path",d:e.path,stroke:e.stroke,strokeLinejoin:e.attrs["stroke-linejoin"],strokeWidth:e.attrs["stroke-width"],strokeDasharray:e.attrs["stroke-dasharray"],fill:"none"}))),g}var gN={require:["chart","renderer"],defaultSettings:{settings:{seriesInfo:{primary:[],secondary:[]},selectionValues:{},colorSettings:void 0,colorByData:!1,isColorCode:!1,hasMultipleMeasures:!1,groupedByMeasure:!1,itemsPerGroup:1,orientation:"vertical",rtl:!1}},addListener(e,t){this.state.brush.addListener(e,t),this.state.listeners.push({type:e,fn:t})},removeListeners(){this.state.listeners.forEach((e=>this.state.brush.removeListener(e.type,e.fn))),this.state.listeners.length=0},created(){this.state={pathModel:sN({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),brush:this.chart.brush("selection"),listeners:[],selectionInfo:{minorRange:!1,minorRangePrimary:!1,legendRange:!1,legendTap:!1}}},mounted(){this.addListener("update",(()=>{this.state.selectionInfo=this.settings.settings.getSelectionInfo();const e=hN({chart:this.chart,pathModel:this.state.pathModel,seriesInfo:this.settings.settings.seriesInfo,brush:this.state.brush,selectionInfo:this.state.selectionInfo,items:this.data.items,selectionValues:this.settings.settings.selectionValues,colorSettings:this.settings.settings.colorSettings,colorByData:this.settings.settings.colorByData,isColorCode:this.settings.settings.isColorCode,hasMultipleMeasures:this.settings.settings.hasMultipleMeasures,groupedByMeasure:this.settings.settings.groupedByMeasure,itemsPerGroup:this.settings.settings.itemsPerGroup,orientation:this.settings.settings.orientation,rtl:this.settings.settings.rtl});this.renderer.render(e)})),this.addListener("end",(()=>{this.renderer.render([])}))},render(){this.state.pathModel=sN({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),this.state.selectionInfo=this.settings.settings.getSelectionInfo();return hN({chart:this.chart,pathModel:this.state.pathModel,seriesInfo:this.settings.settings.seriesInfo,brush:this.state.brush,selectionInfo:this.state.selectionInfo,items:this.data.items,selectionValues:this.settings.settings.selectionValues,colorSettings:this.settings.settings.colorSettings,colorByData:this.settings.settings.colorByData,isColorCode:this.settings.settings.isColorCode,hasMultipleMeasures:this.settings.settings.hasMultipleMeasures,groupedByMeasure:this.settings.settings.groupedByMeasure,itemsPerGroup:this.settings.settings.itemsPerGroup,orientation:this.settings.settings.orientation,rtl:this.settings.settings.rtl})},destroyed(){this.removeListeners()}};const vN={line:"bar",circle:"circle",diamond:"diamond",triangle:"triangle",rect:"square"},yN=e=>void 0===e.marker?vN.circle:vN[e.marker],bN=e=>void 0===e.markerFill||e.markerFill;function xN({series:e,layoutService:t}){switch(hu(e)){case es.MARKER:return(e=>({marker:yN(e),fill:bN(e)}))(e);case es.LINE:return(e=>{const t=e.getLayoutValue("nullMode","gap");return{showAsGaps:"gap"===t,showAsConnections:"connect"===t,showAsZeros:"zero"===t}})(t);default:return{}}}function SN(e=ns,t){return t?e.axis===ts.PRIMARY:e.axis===ts.PRIMARY||hu(e)===es.BAR}var EN={exports:{}};var MN={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH:16};var CN="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n}=MN,r=CN,o=(t=e.exports={}).re=[],i=t.src=[],a=t.t={};let s=0;const l=(e,t,n)=>{const l=s++;r(l,t),a[e]=l,i[l]=t,o[l]=new RegExp(t,n?"g":void 0)};l("NUMERICIDENTIFIER","0|[1-9]\\d*"),l("NUMERICIDENTIFIERLOOSE","[0-9]+"),l("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),l("MAINVERSION",`(${i[a.NUMERICIDENTIFIER]})\\.(${i[a.NUMERICIDENTIFIER]})\\.(${i[a.NUMERICIDENTIFIER]})`),l("MAINVERSIONLOOSE",`(${i[a.NUMERICIDENTIFIERLOOSE]})\\.(${i[a.NUMERICIDENTIFIERLOOSE]})\\.(${i[a.NUMERICIDENTIFIERLOOSE]})`),l("PRERELEASEIDENTIFIER",`(?:${i[a.NUMERICIDENTIFIER]}|${i[a.NONNUMERICIDENTIFIER]})`),l("PRERELEASEIDENTIFIERLOOSE",`(?:${i[a.NUMERICIDENTIFIERLOOSE]}|${i[a.NONNUMERICIDENTIFIER]})`),l("PRERELEASE",`(?:-(${i[a.PRERELEASEIDENTIFIER]}(?:\\.${i[a.PRERELEASEIDENTIFIER]})*))`),l("PRERELEASELOOSE",`(?:-?(${i[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${i[a.PRERELEASEIDENTIFIERLOOSE]})*))`),l("BUILDIDENTIFIER","[0-9A-Za-z-]+"),l("BUILD",`(?:\\+(${i[a.BUILDIDENTIFIER]}(?:\\.${i[a.BUILDIDENTIFIER]})*))`),l("FULLPLAIN",`v?${i[a.MAINVERSION]}${i[a.PRERELEASE]}?${i[a.BUILD]}?`),l("FULL",`^${i[a.FULLPLAIN]}$`),l("LOOSEPLAIN",`[v=\\s]*${i[a.MAINVERSIONLOOSE]}${i[a.PRERELEASELOOSE]}?${i[a.BUILD]}?`),l("LOOSE",`^${i[a.LOOSEPLAIN]}$`),l("GTLT","((?:<|>)?=?)"),l("XRANGEIDENTIFIERLOOSE",i[a.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*"),l("XRANGEIDENTIFIER",i[a.NUMERICIDENTIFIER]+"|x|X|\\*"),l("XRANGEPLAIN",`[v=\\s]*(${i[a.XRANGEIDENTIFIER]})(?:\\.(${i[a.XRANGEIDENTIFIER]})(?:\\.(${i[a.XRANGEIDENTIFIER]})(?:${i[a.PRERELEASE]})?${i[a.BUILD]}?)?)?`),l("XRANGEPLAINLOOSE",`[v=\\s]*(${i[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${i[a.XRANGEIDENTIFIERLOOSE]})(?:${i[a.PRERELEASELOOSE]})?${i[a.BUILD]}?)?)?`),l("XRANGE",`^${i[a.GTLT]}\\s*${i[a.XRANGEPLAIN]}$`),l("XRANGELOOSE",`^${i[a.GTLT]}\\s*${i[a.XRANGEPLAINLOOSE]}$`),l("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),l("COERCERTL",i[a.COERCE],!0),l("LONETILDE","(?:~>?)"),l("TILDETRIM",`(\\s*)${i[a.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",l("TILDE",`^${i[a.LONETILDE]}${i[a.XRANGEPLAIN]}$`),l("TILDELOOSE",`^${i[a.LONETILDE]}${i[a.XRANGEPLAINLOOSE]}$`),l("LONECARET","(?:\\^)"),l("CARETTRIM",`(\\s*)${i[a.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",l("CARET",`^${i[a.LONECARET]}${i[a.XRANGEPLAIN]}$`),l("CARETLOOSE",`^${i[a.LONECARET]}${i[a.XRANGEPLAINLOOSE]}$`),l("COMPARATORLOOSE",`^${i[a.GTLT]}\\s*(${i[a.LOOSEPLAIN]})$|^$`),l("COMPARATOR",`^${i[a.GTLT]}\\s*(${i[a.FULLPLAIN]})$|^$`),l("COMPARATORTRIM",`(\\s*)${i[a.GTLT]}\\s*(${i[a.LOOSEPLAIN]}|${i[a.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",l("HYPHENRANGE",`^\\s*(${i[a.XRANGEPLAIN]})\\s+-\\s+(${i[a.XRANGEPLAIN]})\\s*$`),l("HYPHENRANGELOOSE",`^\\s*(${i[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${i[a.XRANGEPLAINLOOSE]})\\s*$`),l("STAR","(<|>)?=?\\s*\\*"),l("GTE0","^\\s*>=\\s*0.0.0\\s*$"),l("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}(EN,EN.exports);const wN=["includePrerelease","loose","rtl"];var kN=e=>e?"object"!=typeof e?{loose:!0}:wN.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{};const NN=/^[0-9]+$/,TN=(e,t)=>{const n=NN.test(e),r=NN.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1};var ON={compareIdentifiers:TN,rcompareIdentifiers:(e,t)=>TN(t,e)};const RN=CN,{MAX_LENGTH:AN,MAX_SAFE_INTEGER:LN}=MN,{re:IN,t:PN}=EN.exports,DN=kN,{compareIdentifiers:qN}=ON;class zN{constructor(e,t){if(t=DN(t),e instanceof zN){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>AN)throw new TypeError(`version is longer than ${AN} characters`);RN("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?IN[PN.LOOSE]:IN[PN.FULL]);if(!n)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>LN||this.major<0)throw new TypeError("Invalid major version");if(this.minor>LN||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>LN||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<LN)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version}toString(){return this.version}compare(e){if(RN("SemVer.compare",this.version,this.options,e),!(e instanceof zN)){if("string"==typeof e&&e===this.version)return 0;e=new zN(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof zN||(e=new zN(e,this.options)),qN(this.major,e.major)||qN(this.minor,e.minor)||qN(this.patch,e.patch)}comparePre(e){if(e instanceof zN||(e=new zN(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const n=this.prerelease[t],r=e.prerelease[t];if(RN("prerelease compare",t,n,r),void 0===n&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===n)return-1;if(n!==r)return qN(n,r)}while(++t)}compareBuild(e){e instanceof zN||(e=new zN(e,this.options));let t=0;do{const n=this.build[t],r=e.build[t];if(RN("prerelease compare",t,n,r),void 0===n&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===n)return-1;if(n!==r)return qN(n,r)}while(++t)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this}}var $N=zN;const{MAX_LENGTH:BN}=MN,{re:FN,t:HN}=EN.exports,jN=$N,VN=kN;var WN=(e,t)=>{if(t=VN(t),e instanceof jN)return e;if("string"!=typeof e)return null;if(e.length>BN)return null;if(!(t.loose?FN[HN.LOOSE]:FN[HN.FULL]).test(e))return null;try{return new jN(e,t)}catch(e){return null}};const _N=WN;var UN=(e,t)=>{const n=_N(e,t);return n?n.version:null};const YN=WN;var GN=(e,t)=>{const n=YN(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};const KN=$N;var XN=(e,t,n,r)=>{"string"==typeof n&&(r=n,n=void 0);try{return new KN(e,n).inc(t,r).version}catch(e){return null}};const JN=$N;var ZN=(e,t,n)=>new JN(e,n).compare(new JN(t,n));const QN=ZN;var eT=(e,t,n)=>0===QN(e,t,n);const tT=WN,nT=eT;var rT=(e,t)=>{if(nT(e,t))return null;{const n=tT(e),r=tT(t),o=n.prerelease.length||r.prerelease.length,i=o?"pre":"",a=o?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==r[e])return i+e;return a}};const oT=$N;var iT=(e,t)=>new oT(e,t).major;const aT=$N;var sT=(e,t)=>new aT(e,t).minor;const lT=$N;var cT=(e,t)=>new lT(e,t).patch;const uT=WN;var dT=(e,t)=>{const n=uT(e,t);return n&&n.prerelease.length?n.prerelease:null};const pT=ZN;var mT=(e,t,n)=>pT(t,e,n);const fT=ZN;var hT=(e,t)=>fT(e,t,!0);const gT=$N;var vT=(e,t,n)=>{const r=new gT(e,n),o=new gT(t,n);return r.compare(o)||r.compareBuild(o)};const yT=vT;var bT=(e,t)=>e.sort(((e,n)=>yT(e,n,t)));const xT=vT;var ST=(e,t)=>e.sort(((e,n)=>xT(n,e,t)));const ET=ZN;var MT=(e,t,n)=>ET(e,t,n)>0;const CT=ZN;var wT=(e,t,n)=>CT(e,t,n)<0;const kT=ZN;var NT=(e,t,n)=>0!==kT(e,t,n);const TT=ZN;var OT=(e,t,n)=>TT(e,t,n)>=0;const RT=ZN;var AT=(e,t,n)=>RT(e,t,n)<=0;const LT=eT,IT=NT,PT=MT,DT=OT,qT=wT,zT=AT;var $T=(e,t,n,r)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return LT(e,n,r);case"!=":return IT(e,n,r);case">":return PT(e,n,r);case">=":return DT(e,n,r);case"<":return qT(e,n,r);case"<=":return zT(e,n,r);default:throw new TypeError("Invalid operator: "+t)}};const BT=$N,FT=WN,{re:HT,t:jT}=EN.exports;var VT,WT,_T,UT,YT,GT,KT,XT,JT,ZT,QT=(e,t)=>{if(e instanceof BT)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=HT[jT.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),HT[jT.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;HT[jT.COERCERTL].lastIndex=-1}else n=e.match(HT[jT.COERCE]);return null===n?null:FT(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)};function eO(){if(UT)return _T;function e(t){var n=this;if(n instanceof e||(n=new e),n.tail=null,n.head=null,n.length=0,t&&"function"==typeof t.forEach)t.forEach((function(e){n.push(e)}));else if(arguments.length>0)for(var r=0,o=arguments.length;r<o;r++)n.push(arguments[r]);return n}function t(e,t,n){var r=t===e.head?new o(n,null,t,e):new o(n,t,t.next,e);return null===r.next&&(e.tail=r),null===r.prev&&(e.head=r),e.length++,r}function n(e,t){e.tail=new o(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function r(e,t){e.head=new o(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function o(e,t,n,r){if(!(this instanceof o))return new o(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}UT=1,_T=e,e.Node=o,e.create=e,e.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},e.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},e.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},e.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)n(this,arguments[e]);return this.length},e.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)r(this,arguments[e]);return this.length},e.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},e.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},e.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},e.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},e.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},e.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},e.prototype.map=function(t,n){n=n||this;for(var r=new e,o=this.head;null!==o;)r.push(t.call(n,o.value,this)),o=o.next;return r},e.prototype.mapReverse=function(t,n){n=n||this;for(var r=new e,o=this.tail;null!==o;)r.push(t.call(n,o.value,this)),o=o.prev;return r},e.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var o=0;null!==r;o++)n=e(n,r.value,o),r=r.next;return n},e.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var o=this.length-1;null!==r;o--)n=e(n,r.value,o),r=r.prev;return n},e.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},e.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},e.prototype.slice=function(t,n){(n=n||this.length)<0&&(n+=this.length),(t=t||0)<0&&(t+=this.length);var r=new e;if(n<t||n<0)return r;t<0&&(t=0),n>this.length&&(n=this.length);for(var o=0,i=this.head;null!==i&&o<t;o++)i=i.next;for(;null!==i&&o<n;o++,i=i.next)r.push(i.value);return r},e.prototype.sliceReverse=function(t,n){(n=n||this.length)<0&&(n+=this.length),(t=t||0)<0&&(t+=this.length);var r=new e;if(n<t||n<0)return r;t<0&&(t=0),n>this.length&&(n=this.length);for(var o=this.length,i=this.tail;null!==i&&o>n;o--)i=i.prev;for(;null!==i&&o>t;o--,i=i.prev)r.push(i.value);return r},e.prototype.splice=function(e,n,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var o=0,i=this.head;null!==i&&o<e;o++)i=i.next;var a=[];for(o=0;i&&o<n;o++)a.push(i.value),i=this.removeNode(i);null===i&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(o=0;o<r.length;o++)i=t(this,i,r[o]);return a},e.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{(WT?VT:(WT=1,VT=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}))(e)}catch(e){}return _T}function tO(){if(XT)return KT;XT=1;class e{constructor(t,o){if(o=n(o),t instanceof e)return t.loose===!!o.loose&&t.includePrerelease===!!o.includePrerelease?t:new e(t.raw,o);if(t instanceof r)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=o,this.loose=!!o.loose,this.includePrerelease=!!o.includePrerelease,this.raw=t,this.set=t.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError("Invalid SemVer Range: "+t);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!d(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&p(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const n=`parseRange:${Object.keys(this.options).join(",")}:${e}`,i=t.get(n);if(i)return i;const p=this.options.loose,m=p?a[s.HYPHENRANGELOOSE]:a[s.HYPHENRANGE];e=e.replace(m,C(this.options.includePrerelease)),o("hyphen replace",e),e=e.replace(a[s.COMPARATORTRIM],l),o("comparator trim",e,a[s.COMPARATORTRIM]),e=(e=(e=e.replace(a[s.TILDETRIM],c)).replace(a[s.CARETTRIM],u)).split(/\s+/).join(" ");const h=p?a[s.COMPARATORLOOSE]:a[s.COMPARATOR],g=e.split(" ").map((e=>f(e,this.options))).join(" ").split(/\s+/).map((e=>M(e,this.options))).filter(this.options.loose?e=>!!e.match(h):()=>!0).map((e=>new r(e,this.options)));g.length;const v=new Map;for(const e of g){if(d(e))return[e];v.set(e.value,e)}v.size>1&&v.has("")&&v.delete("");const y=[...v.values()];return t.set(n,y),y}intersects(t,n){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some((e=>m(e,n)&&t.set.some((t=>m(t,n)&&e.every((e=>t.every((t=>e.intersects(t,n)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new i(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(w(this.set[t],e,this.options))return!0;return!1}}KT=e;const t=new(function(){if(GT)return YT;GT=1;const e=eO(),t=Symbol("max"),n=Symbol("length"),r=Symbol("lengthCalculator"),o=Symbol("allowStale"),i=Symbol("maxAge"),a=Symbol("dispose"),s=Symbol("noDisposeOnSet"),l=Symbol("lruList"),c=Symbol("cache"),u=Symbol("updateAgeOnGet"),d=()=>1,p=(e,t,n)=>{const r=e[c].get(t);if(r){const t=r.value;if(m(e,t)){if(h(e,r),!e[o])return}else n&&(e[u]&&(r.value.now=Date.now()),e[l].unshiftNode(r));return t.value}},m=(e,t)=>{if(!t||!t.maxAge&&!e[i])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[i]&&n>e[i]},f=e=>{if(e[n]>e[t])for(let r=e[l].tail;e[n]>e[t]&&null!==r;){const t=r.prev;h(e,r),r=t}},h=(e,t)=>{if(t){const r=t.value;e[a]&&e[a](r.key,r.value),e[n]-=r.length,e[c].delete(r.key),e[l].removeNode(t)}};class g{constructor(e,t,n,r,o){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=o||0}}const v=(e,t,n,r)=>{let i=n.value;m(e,i)&&(h(e,n),e[o]||(i=void 0)),i&&t.call(r,i.value,i.key,e)};return YT=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[t]=e.max||1/0;const n=e.length||d;if(this[r]="function"!=typeof n?d:n,this[o]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[i]=e.maxAge||0,this[a]=e.dispose,this[s]=e.noDisposeOnSet||!1,this[u]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[t]=e||1/0,f(this)}get max(){return this[t]}set allowStale(e){this[o]=!!e}get allowStale(){return this[o]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[i]=e,f(this)}get maxAge(){return this[i]}set lengthCalculator(e){"function"!=typeof e&&(e=d),e!==this[r]&&(this[r]=e,this[n]=0,this[l].forEach((e=>{e.length=this[r](e.value,e.key),this[n]+=e.length}))),f(this)}get lengthCalculator(){return this[r]}get length(){return this[n]}get itemCount(){return this[l].length}rforEach(e,t){t=t||this;for(let n=this[l].tail;null!==n;){const r=n.prev;v(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[l].head;null!==n;){const r=n.next;v(this,e,n,t),n=r}}keys(){return this[l].toArray().map((e=>e.key))}values(){return this[l].toArray().map((e=>e.value))}reset(){this[a]&&this[l]&&this[l].length&&this[l].forEach((e=>this[a](e.key,e.value))),this[c]=new Map,this[l]=new e,this[n]=0}dump(){return this[l].map((e=>!m(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[l]}set(e,o,u){if((u=u||this[i])&&"number"!=typeof u)throw new TypeError("maxAge must be a number");const d=u?Date.now():0,p=this[r](o,e);if(this[c].has(e)){if(p>this[t])return h(this,this[c].get(e)),!1;const r=this[c].get(e).value;return this[a]&&(this[s]||this[a](e,r.value)),r.now=d,r.maxAge=u,r.value=o,this[n]+=p-r.length,r.length=p,this.get(e),f(this),!0}const m=new g(e,o,p,d,u);return m.length>this[t]?(this[a]&&this[a](e,o),!1):(this[n]+=m.length,this[l].unshift(m),this[c].set(e,this[l].head),f(this),!0)}has(e){if(!this[c].has(e))return!1;const t=this[c].get(e).value;return!m(this,t)}get(e){return p(this,e,!0)}peek(e){return p(this,e,!1)}pop(){const e=this[l].tail;return e?(h(this,e),e.value):null}del(e){h(this,this[c].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],o=r.e||0;if(0===o)this.set(r.k,r.v);else{const e=o-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[c].forEach(((e,t)=>p(this,t,!1)))}}}())({max:1e3}),n=kN,r=nO(),o=CN,i=$N,{re:a,t:s,comparatorTrimReplace:l,tildeTrimReplace:c,caretTrimReplace:u}=EN.exports,d=e=>"<0.0.0-0"===e.value,p=e=>""===e.value,m=(e,t)=>{let n=!0;const r=e.slice();let o=r.pop();for(;n&&r.length;)n=r.every((e=>o.intersects(e,t))),o=r.pop();return n},f=(e,t)=>(o("comp",e,t),e=y(e,t),o("caret",e),e=g(e,t),o("tildes",e),e=x(e,t),o("xrange",e),e=E(e,t),o("stars",e),e),h=e=>!e||"x"===e.toLowerCase()||"*"===e,g=(e,t)=>e.trim().split(/\s+/).map((e=>v(e,t))).join(" "),v=(e,t)=>{const n=t.loose?a[s.TILDELOOSE]:a[s.TILDE];return e.replace(n,((t,n,r,i,a)=>{let s;return o("tilde",e,t,n,r,i,a),h(n)?s="":h(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:h(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(o("replaceTilde pr",a),s=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,o("tilde return",s),s}))},y=(e,t)=>e.trim().split(/\s+/).map((e=>b(e,t))).join(" "),b=(e,t)=>{o("caret",e,t);const n=t.loose?a[s.CARETLOOSE]:a[s.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,a,s)=>{let l;return o("caret",e,t,n,i,a,s),h(n)?l="":h(i)?l=`>=${n}.0.0${r} <${+n+1}.0.0-0`:h(a)?l="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(o("replaceCaret pr",s),l="0"===n?"0"===i?`>=${n}.${i}.${a}-${s} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${s} <${+n+1}.0.0-0`):(o("no pr"),l="0"===n?"0"===i?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o("caret return",l),l}))},x=(e,t)=>(o("replaceXRanges",e,t),e.split(/\s+/).map((e=>S(e,t))).join(" ")),S=(e,t)=>{e=e.trim();const n=t.loose?a[s.XRANGELOOSE]:a[s.XRANGE];return e.replace(n,((n,r,i,a,s,l)=>{o("xRange",e,n,r,i,a,s,l);const c=h(i),u=c||h(a),d=u||h(s),p=d;return"="===r&&p&&(r=""),l=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&p?(u&&(a=0),s=0,">"===r?(r=">=",u?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):"<="===r&&(r="<",u?i=+i+1:a=+a+1),"<"===r&&(l="-0"),n=`${r+i}.${a}.${s}${l}`):u?n=`>=${i}.0.0${l} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${l} <${i}.${+a+1}.0-0`),o("xRange return",n),n}))},E=(e,t)=>(o("replaceStars",e,t),e.trim().replace(a[s.STAR],"")),M=(e,t)=>(o("replaceGTE0",e,t),e.trim().replace(a[t.includePrerelease?s.GTE0PRE:s.GTE0],"")),C=e=>(t,n,r,o,i,a,s,l,c,u,d,p,m)=>`${n=h(r)?"":h(o)?`>=${r}.0.0${e?"-0":""}`:h(i)?`>=${r}.${o}.0${e?"-0":""}`:a?">="+n:`>=${n}${e?"-0":""}`} ${l=h(c)?"":h(u)?`<${+c+1}.0.0-0`:h(d)?`<${c}.${+u+1}.0-0`:p?`<=${c}.${u}.${d}-${p}`:e?`<${c}.${u}.${+d+1}-0`:"<="+l}`.trim(),w=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(o(e[n].semver),e[n].semver!==r.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return KT}function nO(){if(ZT)return JT;ZT=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,o){if(o=n(o),r instanceof t){if(r.loose===!!o.loose)return r;r=r.value}a("comparator",r,o),this.options=o,this.loose=!!o.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(t){const n=this.options.loose?r[o.COMPARATORLOOSE]:r[o.COMPARATOR],i=t.match(n);if(!i)throw new TypeError("Invalid comparator: "+t);this.operator=void 0!==i[1]?i[1]:"","="===this.operator&&(this.operator=""),i[2]?this.semver=new s(i[2],this.options.loose):this.semver=e}toString(){return this.value}test(t){if(a("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new s(t,this.options)}catch(e){return!1}return i(t,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Comparator is required");if(n&&"object"==typeof n||(n={loose:!!n,includePrerelease:!1}),""===this.operator)return""===this.value||new l(e.value,n).test(this.value);if(""===e.operator)return""===e.value||new l(this.value,n).test(e.semver);const r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),o=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),a=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),c=i(this.semver,"<",e.semver,n)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),u=i(this.semver,">",e.semver,n)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||o||a&&s||c||u}}JT=t;const n=kN,{re:r,t:o}=EN.exports,i=$T,a=CN,s=$N,l=tO();return JT}const rO=tO();var oO=(e,t,n)=>{try{t=new rO(t,n)}catch(e){return!1}return t.test(e)};const iO=tO();var aO=(e,t)=>new iO(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));const sO=$N,lO=tO();var cO=(e,t,n)=>{let r=null,o=null,i=null;try{i=new lO(t,n)}catch(e){return null}return e.forEach((e=>{i.test(e)&&(r&&-1!==o.compare(e)||(r=e,o=new sO(r,n)))})),r};const uO=$N,dO=tO();var pO=(e,t,n)=>{let r=null,o=null,i=null;try{i=new dO(t,n)}catch(e){return null}return e.forEach((e=>{i.test(e)&&(r&&1!==o.compare(e)||(r=e,o=new uO(r,n)))})),r};const mO=$N,fO=tO(),hO=MT;var gO=(e,t)=>{e=new fO(e,t);let n=new mO("0.0.0");if(e.test(n))return n;if(n=new mO("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const r=e.set[t];let o=null;r.forEach((e=>{const t=new mO(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":o&&!hO(t,o)||(o=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}})),!o||n&&!hO(n,o)||(n=o)}return n&&e.test(n)?n:null};const vO=tO();var yO=(e,t)=>{try{return new vO(e,t).range||"*"}catch(e){return null}};const bO=$N,xO=nO(),{ANY:SO}=xO,EO=tO(),MO=oO,CO=MT,wO=wT,kO=AT,NO=OT;var TO=(e,t,n,r)=>{let o,i,a,s,l;switch(e=new bO(e,r),t=new EO(t,r),n){case">":o=CO,i=kO,a=wO,s=">",l=">=";break;case"<":o=wO,i=NO,a=CO,s="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(MO(e,t,r))return!1;for(let n=0;n<t.set.length;++n){const c=t.set[n];let u=null,d=null;if(c.forEach((e=>{e.semver===SO&&(e=new xO(">=0.0.0")),u=u||e,d=d||e,o(e.semver,u.semver,r)?u=e:a(e.semver,d.semver,r)&&(d=e)})),u.operator===s||u.operator===l)return!1;if((!d.operator||d.operator===s)&&i(e,d.semver))return!1;if(d.operator===l&&a(e,d.semver))return!1}return!0};const OO=TO;var RO=(e,t,n)=>OO(e,t,">",n);const AO=TO;var LO=(e,t,n)=>AO(e,t,"<",n);const IO=tO();var PO=(e,t,n)=>(e=new IO(e,n),t=new IO(t,n),e.intersects(t));const DO=oO,qO=ZN;const zO=tO(),$O=nO(),{ANY:BO}=$O,FO=oO,HO=ZN,jO=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===BO){if(1===t.length&&t[0].semver===BO)return!0;e=n.includePrerelease?[new $O(">=0.0.0-0")]:[new $O(">=0.0.0")]}if(1===t.length&&t[0].semver===BO){if(n.includePrerelease)return!0;t=[new $O(">=0.0.0")]}const r=new Set;let o,i,a,s,l,c,u;for(const t of e)">"===t.operator||">="===t.operator?o=VO(o,t,n):"<"===t.operator||"<="===t.operator?i=WO(i,t,n):r.add(t.semver);if(r.size>1)return null;if(o&&i){if(a=HO(o.semver,i.semver,n),a>0)return null;if(0===a&&(">="!==o.operator||"<="!==i.operator))return null}for(const e of r){if(o&&!FO(e,String(o),n))return null;if(i&&!FO(e,String(i),n))return null;for(const r of t)if(!FO(e,String(r),n))return!1;return!0}let d=!(!i||n.includePrerelease||!i.semver.prerelease.length)&&i.semver,p=!(!o||n.includePrerelease||!o.semver.prerelease.length)&&o.semver;d&&1===d.prerelease.length&&"<"===i.operator&&0===d.prerelease[0]&&(d=!1);for(const e of t){if(u=u||">"===e.operator||">="===e.operator,c=c||"<"===e.operator||"<="===e.operator,o)if(p&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===p.major&&e.semver.minor===p.minor&&e.semver.patch===p.patch&&(p=!1),">"===e.operator||">="===e.operator){if(s=VO(o,e,n),s===e&&s!==o)return!1}else if(">="===o.operator&&!FO(o.semver,String(e),n))return!1;if(i)if(d&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===d.major&&e.semver.minor===d.minor&&e.semver.patch===d.patch&&(d=!1),"<"===e.operator||"<="===e.operator){if(l=WO(i,e,n),l===e&&l!==i)return!1}else if("<="===i.operator&&!FO(i.semver,String(e),n))return!1;if(!e.operator&&(i||o)&&0!==a)return!1}return!(o&&c&&!i&&0!==a)&&(!(i&&u&&!o&&0!==a)&&(!p&&!d))},VO=(e,t,n)=>{if(!e)return t;const r=HO(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},WO=(e,t,n)=>{if(!e)return t;const r=HO(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};var _O=(e,t,n={})=>{if(e===t)return!0;e=new zO(e,n),t=new zO(t,n);let r=!1;e:for(const o of e.set){for(const e of t.set){const t=jO(o,e,n);if(r=r||null!==t,t)continue e}if(r)return!1}return!0};const UO=EN.exports;var YO={re:UO.re,src:UO.src,tokens:UO.t,SEMVER_SPEC_VERSION:MN.SEMVER_SPEC_VERSION,SemVer:$N,compareIdentifiers:ON.compareIdentifiers,rcompareIdentifiers:ON.rcompareIdentifiers,parse:WN,valid:UN,clean:GN,inc:XN,diff:rT,major:iT,minor:sT,patch:cT,prerelease:dT,compare:ZN,rcompare:mT,compareLoose:hT,compareBuild:vT,sort:bT,rsort:ST,gt:MT,lt:wT,eq:eT,neq:NT,gte:OT,lte:AT,cmp:$T,coerce:QT,Comparator:nO(),Range:tO(),satisfies:oO,toComparators:aO,maxSatisfying:cO,minSatisfying:pO,minVersion:gO,validRange:yO,outside:TO,gtr:RO,ltr:LO,intersects:PO,simplifyRange:(e,t,n)=>{const r=[];let o=null,i=null;const a=e.sort(((e,t)=>qO(e,t,n)));for(const e of a){DO(e,t,n)?(i=e,o||(o=e)):(i&&r.push([o,i]),i=null,o=null)}o&&r.push([o,null]);const s=[];for(const[e,t]of r)e===t?s.push(e):t||e!==a[0]?t?e===a[0]?s.push("<="+t):s.push(`${e} - ${t}`):s.push(">="+e):s.push("*");const l=s.join(" || "),c="string"==typeof t.raw?t.raw:String(t);return l.length<c.length?l:t},subset:_O},GO="0.23.1";const KO=e=>!e||YO.lt(YO.coerce(e),YO.coerce(GO));function XO(){return function({layout:e}){var t,n,r;const o=E(e,"qHyperCube.qMeasureInfo",[]),i=o.some((({series:e=ns})=>hu(e)===es.LINE)),a=me.continuous(e,(()=>i&&le.isTime(!0,e))),s=!KO(E(e,"version","")),l=o.filter((({series:e=ns})=>hu(e)===es.BAR)),c=l.length,u=l.filter((({series:e=ns})=>e.axis!==ts.SECONDARY)).length,d=l.filter((({series:e=ns})=>e.axis===ts.SECONDARY)).length,p=s?u>1||d>1:c>1,m=("grouped"!==E(e,"barGrouping.grouping")||a)&&p,f=!m&&c>1,h=s&&m&&(u>0&&d>1||u>1&&d>0),g=!(null==e||null===(t=e.qHyperCube)||void 0===t||null===(n=t.qDimensionInfo)||void 0===n||null===(r=n[0])||void 0===r||!r.qLocked);return{canBeContinuous:le.canBeContinuous(e),isDiscrete:!a,isContinuous:a,isTime:le.isTime(a,e),isSnapshot:me.snapshot(e),isBarSeriesStacked:m,isBarSeriesGrouped:f,isBarSeriesStackedInBothAxis:h,isGrouped:f||h,isGroupedByMeasure:f||h,isDimensionLocked:g,groupSize:h?2:c,hasLineSeries:i}}}function JO({layoutService:e}){const{dimensionCount:t,measureCount:n}=e.meta;return{qTop:0,qLeft:0,qWidth:t+n,qHeight:Math.min(2e3,1e4/(n+1))}}const ZO=e=>"number"==typeof e&&!Number.isNaN(e);function QO({isPrimary:e,layoutService:t,seriesModel:n}){return function(){const r=t.getHyperCubeValue("qMeasureInfo"),o=n.query.seriesByAxis(e).map((e=>r[e.refIndex])),i=o.filter((e=>hu(e.series)===es.BAR)),a=o.filter((e=>hu(e.series)===es.LINE)),s=o.filter((e=>hu(e.series)===es.MARKER));return{min:Math.min(...o.filter((e=>ZO(e.qMin))).map((e=>e.qMin))),max:Math.max(...o.filter((e=>ZO(e.qMax))).map((e=>e.qMax))),bar:{min:Math.min(...i.filter((e=>ZO(e.qMin))).map((e=>e.qMin))),max:Math.max(...i.filter((e=>ZO(e.qMax))).map((e=>e.qMax)))},line:{min:Math.min(...a.filter((e=>ZO(e.qMin))).map((e=>e.qMin))),max:Math.max(...a.filter((e=>ZO(e.qMax))).map((e=>e.qMax)))},marker:{min:Math.min(...s.filter((e=>ZO(e.qMin))).map((e=>e.qMin))),max:Math.max(...s.filter((e=>ZO(e.qMax))).map((e=>e.qMax)))}}}}function eR({isPrimary:e,layoutService:t,seriesModel:n}){const r=QO({isPrimary:e,layoutService:t,seriesModel:n}),o=function({seriesModel:e,isPrimary:t}){return function({dataPage:n}){const r=e.query.series(es.BAR).filter((e=>e.isPrimary===t)).map((e=>e.refIndex)),{qMatrix:o}=n,i={min:NaN,max:NaN};return o.forEach((e=>{let t=0,n=0;e.slice(1).filter(((e,t)=>r.some((e=>e===t))&&"NaN"!==e.qNum)).forEach((e=>{e.qNum>=0?n+=e.qNum:t+=e.qNum})),i.min=Number.isNaN(i.min)?t:Math.min(t,i.min),i.max=Number.isNaN(i.max)?n:Math.max(n,i.max)})),i}}({seriesModel:n,isPrimary:e});return function({dataPage:e}){const t=r({dataPage:e});return t.bar=o({dataPage:e}),t.min=Math.min(t.bar.min,t.line.min,t.marker.min),t.max=Math.max(t.bar.max,t.line.max,t.marker.max),t}}function tR({isPrimary:e,continuousModel:t,layoutService:n,reducedModel:r,seriesModel:o}){const i={min:NaN,max:NaN,implicit:{min:NaN,max:NaN,bar:{min:NaN,max:NaN},line:{min:NaN,max:NaN},marker:{min:NaN,max:NaN}},explicit:{min:NaN,max:NaN},meta:{hasExplicit:!1,hasExplicitMin:!1,hasExplicitMax:!1,includesZero:!1}},a=function({isPrimary:e,layoutService:t,seriesModel:n}){const{isBarSeriesStacked:r}=t.meta,o=n.query.series(es.BAR).filter((t=>t.isPrimary===e)).length;return!r||o<2?QO({isPrimary:e,layoutService:t,seriesModel:n}):eR({isPrimary:e,layoutService:t,seriesModel:n})}({isPrimary:e,layoutService:n,seriesModel:o});return{query:{getExtrema:()=>i},command:{initialize:()=>{const{min:s,max:l}=function({isPrimary:e,layoutService:t}){const n={min:NaN,max:NaN},{getLayoutValue:r}=t,o=r("measureAxes."+(e?0:1),{});if(o.autoMinMax)return n;const{minMax:i,min:a,max:s}=o;return"min"!==i&&"minMax"!==i||(n.min=a),"max"!==i&&"minMax"!==i||(n.max=s),Number.isNaN(n.min)||Number.isNaN(n.max)||(n.min=Math.min(a,s),n.max=Math.max(a,s)),n}({isPrimary:e,layoutService:n});return i.explicit.min=s,i.explicit.max=l,i.meta.hasExplicitMin=!Number.isNaN(s),i.meta.hasExplicitMax=!Number.isNaN(l),i.meta.hasExplicit=i.meta.hasExplicitMin||i.meta.hasExplicitMax,function({continuousModel:e,layoutService:t,reducedModel:n}){const{isDiscrete:r}=t.meta;if(r){const e=n.query.getCube();return Promise.resolve({dataPage:e.qDataPages[0]})}return e.fetchMinMaxData().then((e=>({dataPage:e[0]})))}({continuousModel:t,layoutService:n,reducedModel:r}).then((({dataPage:t})=>{const{min:n,max:r,bar:s,line:l,marker:c}=a({dataPage:t}),u=o.query.seriesByAxis(e).some((e=>hu(e)===es.BAR)),d=u?Math.min(n,0):n,p=u?Math.max(r,0):r,m=u?Math.min(s.min,0):s.min,f=u?Math.max(s.max,0):s.max,h=u?Math.min(l.min,0):l.min,g=u?Math.max(l.max,0):l.max,v=u?Math.min(c.min,0):c.min,y=u?Math.max(c.max,0):c.max;i.implicit.min=Number.isFinite(d)?d:0,i.implicit.max=Number.isFinite(p)?p:0,i.implicit.bar.min=Number.isFinite(m)?m:0,i.implicit.bar.max=Number.isFinite(f)?f:0,i.implicit.line.min=Number.isFinite(h)?h:0,i.implicit.line.max=Number.isFinite(g)?g:0,i.implicit.marker.min=Number.isFinite(v)?v:0,i.implicit.marker.max=Number.isFinite(y)?y:0,i.min=Number.isNaN(i.explicit.min)?i.implicit.min:i.explicit.min,i.max=Number.isNaN(i.explicit.max)?i.implicit.max:i.explicit.max,i.meta.hasExplicitMin&&!i.meta.hasExplicitMax&&(i.max=Math.max(i.min,i.max)),i.meta.hasExplicitMax&&!i.meta.hasExplicitMin&&(i.min=Math.min(i.min,i.max)),i.meta.includesZero=!!((0-i.min)*(0-i.max)<=0)}))}}}}function nR({extrema:e,ticks:t}){const n=e.meta.hasExplicit?2:3;return t.filter((t=>(t=>!e.meta.hasExplicitMin||t>=e.explicit.min)(t)&&(t=>!e.meta.hasExplicitMax||t<=e.explicit.max)(t))).length>=n}function rR({min:e,max:t,count:n,threshold:r,disable:o}){const i=function(e,t,n){const r=qr().domain([e,t]);return r.nice(n),r}(e,t,n),a=function({min:e,max:t,threshold:n,scale:r,disable:o}){const i={start:!0,stop:!0};if(o)return i;const[a,s]=r.domain();return 0!==e&&0!==a&&(i.start=r(e)>n),0!==t&&0!==s&&(i.stop=r(t)<1-n),i}({min:e,max:t,threshold:r,scale:i,disable:o});if(!a.start||!a.stop){const[e,t]=i.domain(),r=i.ticks(n),o=r.length>=4?r[1]-r[0]:.1*e,s=r.length>=4?r[r.length-1]-r[r.length-2]:.1*t;i.domain([a.start?e:e-o,a.stop?t:t+s]),i.nice(n)}return i}const oR=50,iR=100,aR=200,sR=125;function lR({config:{measureAxesRef:e},layoutService:t,size:n}){const r=(e=>{switch(e){case.5:return oR;case 1:return iR;case 2:return aR;default:return e*sR}})(t.getLayoutValue(e+".spacing",1));return Math.max(1,Math.round(n/r))}function cR({config:e,chart:t,layoutService:n,dockService:r,measureText:o,size:i,min:a,max:s}){const l=lR({config:e,layoutService:n,size:i}),c=rR({min:a,max:s,count:l,threshold:.05,disable:!0}),u=c.domain(),d={roundedMin:u[0],roundedMax:u[1],ticks:c.ticks(l)},p="horizontal"===r.meta.major.orientation?"height":"width",m=e=>o(e)[p],f=t.formatter(e.formatter),h=()=>{const e=d.ticks.map(f);return!e.some(((t,n)=>e.indexOf(t)!==n))&&(e=>{const t=i/d.ticks.length;return Math.max(...e.map(m))<=t})(e)};for(let e=l-1;e>0&&!h();e--)c.domain([a,s]),c.nice(e),[d.roundedMin,d.roundedMax]=c.domain(),d.ticks=c.ticks(e);return d}function uR({tick:e,index:t,ticks:n}){return 0===t||t===n.length-1||0===e}function dR({index:e,ticks:t}){return 0===e||e===t.length-1||e===Math.floor((t.length-1)/2)}function pR({config:e,chart:t,extrema:n,min:r,max:o}){const i={roundedMin:0,roundedMax:0,ticks:[]},a=rR({min:r,max:o,count:10,threshold:.15,disable:!0});[i.roundedMin,i.roundedMax]=a.domain();const s=a.ticks(10),l=function({ticks:e}){const t=Math.round(.3*e.length),n=t,r=e.length-t;return e.slice(n,r).some((e=>0===e))}({ticks:s}),c=l?uR:dR;i.ticks=s.filter(((e,t,n)=>c({tick:e,index:t,ticks:n})));i.ticks.length%2==0&&!l&&!n.meta.hasExplicit&&s.length>1&&(i.ticks=[s[0],(s[0]+s[s.length-1])/2,s[s.length-1]]);const u=t.formatter(e.formatter),d=i.ticks.map(u);return d.some(((e,t)=>d.indexOf(e)!==t))&&(i.ticks=[i.ticks[0],i.ticks[i.ticks.length-1]]),i}function mR({ticks:e,extrema:t}){let n=[...e];return t.meta.hasExplicit&&e.length?(t.meta.hasExplicitMin&&!e.some((e=>e===t.explicit.min))&&(n.unshift(t.explicit.min),n=n.filter((e=>e>=t.explicit.min))),t.meta.hasExplicitMax&&!e.some((e=>e===t.explicit.max))&&(n.push(t.explicit.max),n=n.filter((e=>e<=t.explicit.max))),n):n}function fR({config:e,chart:t,layoutService:n,dockService:r,extrema:o,measureText:i,size:a,min:s,max:l}){const{ticks:c,roundedMin:u,roundedMax:d}=function({config:e,chart:t,layoutService:n,dockService:r,extrema:o,measureText:i,size:a,min:s,max:l}){if("SPARK"===r.meta.chart.mode)return function({min:e,max:t}){return{roundedMin:e,roundedMax:t,ticks:[]}}({min:s,max:l});const c=cR({config:e,chart:t,layoutService:n,dockService:r,measureText:i,size:a,min:s,max:l});return nR({extrema:o,ticks:c.ticks})?c:pR({config:e,chart:t,extrema:o,min:s,max:l})}({config:e,chart:t,layoutService:n,dockService:r,extrema:o,measureText:i,size:a,min:s,max:l}),p=function({ticks:e,count:t}){const n=[];for(let r=0;r<e.length-1;r++){const o=e[r],i=(e[r+1]-o)/(t+1);for(let e=1;e<=t;e++)n.push(o+i*e)}return n}({ticks:c,count:1});return{min:u,max:d,values:[...mR({ticks:c,extrema:o}).map((e=>({value:e,isMinor:!1}))),...p.map((e=>({value:e,isMinor:!0})))].sort(((e,t)=>e.value-t.value))}}function hR({config:e,chart:t,layoutService:n,dockService:r,measureText:o,extrema:i,size:a}){const{min:s,max:l}=function({extrema:e}){const{min:t,max:n}=e;return t!==n?{min:t,max:n}:0===t||1===t?{min:t-1,max:n+1}:{min:t-.2*t*Math.sign(t),max:n+.2*n*Math.sign(n)}}({extrema:i});return fR({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l})}function gR({config:e,chart:t,layoutService:n,extremumModel:r,dockService:o,seriesModel:i,themeService:a}){const s={locked:!1,resolved:void 0},{getExtrema:l}=r.query,c=function({chart:e,config:t,dockService:n,extremumModel:r,layoutService:o,seriesModel:i,themeService:a}){const{measureText:s}=z.renderer("svg")();return()=>{const l=a.getStyles(),c=function({dockService:e,seriesModel:t,chart:n}){var r;const o=n.component(t.meta.seriesComponentKeys[0]),i=null!==(r=null==o?void 0:o.rect)&&void 0!==r?r:e.meta.chart.size;return"horizontal"===e.meta.major.orientation?i.height:i.width}({chart:e,dockService:n,seriesModel:i}),u=r.query.getExtrema();return hR({config:t,chart:e,layoutService:o,dockService:n,measureText:e=>s({text:e,fontFamily:l.axis.label.name.fontFamily,fontSize:l.axis.label.name.fontSize}),extrema:u,size:c})}}({config:e,chart:t,layoutService:n,extremumModel:r,dockService:o,seriesModel:i,themeService:a}),u=()=>(s.locked&&s.resolved||(s.resolved=c()),s.resolved);return{query:{getValues:()=>u().values,getMin:()=>l().meta.hasExplicitMin?l().explicit.min:u().min,getMax:()=>l().meta.hasExplicitMax?l().explicit.max:u().max},command:{lock:()=>{s.locked=!0},unlock:()=>{s.locked=!1}}}}function vR({layoutService:e,seriesModel:t,colorService:n}){const{type:r,mode:o,fieldType:i}=n.getSettings();if("categorical"!==r)return;const a=e.getLayoutValue("dataPoint.show",!1)?"line-point":"line";let s;s="field"===o?"measure"===i?()=>({type:es.BAR}):()=>t.query.all()[0]:e=>t.query.all()[e.value];return{item:{shape:{type:({datum:e})=>{const{type:t,options:n}=s(e);switch(t){case"line":return a;case"marker":return n.marker;default:return"square"}},stroke:{},strokeWidth:({datum:e})=>{const{type:t,options:n}=s(e);return t===es.LINE?2:t!==es.MARKER||n.fill?0:1},size:10,fill:{fn:({datum:e,scale:t})=>{const{type:n,options:r}=s(e);return n!==es.MARKER||"bar"===r.marker||r.fill?t(e.value):"none"}}}}}}function yR({layout:e,defaultAuto:t}){const n=t(e),r=e.qHyperCube.qMeasureInfo.length>1;return{...n,useBaseColors:r?"measure":n.useBaseColors}}function bR({actions:e,appLayoutModel:t,appModel:n,chart:r,environment:o,genericObjectModel:i,layoutService:a,picasso:s,seriesModel:l,viewState:c}){let u;const{theme:d,translator:p}=o,m={wrappedScales:void 0,legendComponents:void 0,legendInteractions:void 0};return u=N({picasso:s,model:i,app:n,translator:p,layoutService:a,createConfig:()=>{const e=a.getHyperCubeValue("qMeasureInfo").map((e=>e.color));return{theme:d,colorProps:{measureOverrides:e},legendProps:a.getLayoutValue("legend"),hc:a.getHyperCube(),key:Qa.SCALE.COLOR}},config:{auto:yR,localeInfo:t.qLocaleInfo},custom:{wrappedScales:()=>m.wrappedScales,legendComponents:()=>m.legendComponents,legendInteractions:()=>m.legendInteractions,updateLegend:()=>{const{components:t,interactions:n,scales:i}=function({viewState:e,chart:t,layoutService:n,seriesModel:r,environment:o,colorService:i,actions:a}){const{options:s}=o,l={eventName:"legend-c",key:Qa.COMPONENT.LEGEND,viewState:e,chart:t,styleReference:"object.comboChart",rtl:"rtl"===s.direction,settings:vR({layoutService:n,seriesModel:r,colorService:i})},{components:c,interactions:u}=i.getLegend(l,{actions:a,navigationDisabled:!a.interact.enabled()}),d=i.getScales();return{components:c.filter(Boolean).map((e=>{const{layout:t}=e,{dock:n}=t,r=d[Qa.SCALE.COLOR+"Range"];return!r||"right"!==n&&"left"!==n||(r.invert=!0),"legend-cat"===e.type&&(e.settings.item.shape.fill.scale=e.scale,e.settings.item.shape.stroke.scale=e.scale),e})),interactions:u,scales:d}}({viewState:c,chart:r,environment:o,colorService:u,seriesModel:l,layoutService:a,actions:e});m.wrappedScales=i,m.legendComponents=t,m.legendInteractions=n}}}),u}const xR="REJECTED",SR=()=>{},ER=1e4,MR=2,CR=20,wR=200,kR=10;var NR={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qLeft<=t.qLeft&&n.qLeft+n.qWidth>=t.qLeft+t.qWidth&&n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qMatrix.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qMatrix.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(0,t.qWidth)-Math.abs(Math.min(0,t.qLeft-e.qArea.qLeft)),o=Math.max(t.qTop,e.qArea.qTop),i=Math.max(t.qLeft,e.qArea.qLeft),a=Math.max(0,o-e.qArea.qTop),s=Math.min(o+n-e.qArea.qTop,e.qArea.qHeight),l=Math.max(0,i-e.qArea.qLeft),c=Math.min(i+r-e.qArea.qLeft,e.qArea.qWidth),u={qArea:{qHeight:s-a,qWidth:c-l,qTop:o,qLeft:i},qMatrix:[]};for(let t=a;t<s;t++)u.qMatrix.push(e.qMatrix[t].slice(l,c));return u},cacheWarden:function({bounds:e={width:0,height:0}}){return{release(t,n){const r=n.qTop-kR<=t.qTop,o=n.qLeft+n.qWidth+kR>=t.qLeft+t.qWidth,i=n.qTop+n.qHeight+kR>=t.qTop+t.qHeight,a=n.qLeft-kR<=t.qLeft;return r&&t.qTop>0||o&&t.qLeft+t.qWidth<e.width||i&&t.qTop+t.qHeight<e.height||a&&t.qLeft>0}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeData",args:[e,[t]]})}};var TR={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qData[0].qSubNodes.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qData.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(t.qTop,e.qArea.qTop),o=Math.max(t.qLeft,e.qArea.qLeft),i=Math.max(0,r-e.qArea.qTop),a=Math.min(r+n-e.qArea.qTop,e.qArea.qHeight),s=e.qData[0].qUp+e.qArea.qHeight+e.qData[0].qDown-r-(a-i),l={qArea:{qHeight:a-i,qWidth:e.qArea.qWidth,qTop:r,qLeft:o},qData:[{...e.qData[0],qUp:r,qDown:s,qSubNodes:[]}]};for(let t=i;t<a;t++)l.qData[0].qSubNodes.push(e.qData[0].qSubNodes[t]);return l},cacheWarden:function({bounds:e={height:0}}){return{release(t,n){const r=n.qTop-kR<=t.qTop,o=n.qTop+n.qHeight+kR>=t.qTop+t.qHeight;return r&&t.qTop>0||o&&t.qTop+t.qHeight<e.height}}},request:function({layoutService:e,definitionPath:t}){const n=e.getLayoutValue("dimensionAxis.axisDisplayMode","auto");return e=>{const r={method:"getHyperCubeStackData",args:[t,[e]]};return"auto"===n&&r.args.push(600),r}}};var OR={contains:function(){return!1},patcher:function(){const e=e=>e;return e.should=()=>!1,e},slicer:function(e){return e},cacheWarden:function(){return{release:()=>!0}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeTreeData",args:[e,[t]]})}};const RR="pages";const AR="discretePan";function LR({chart:e,actions:t,componentKey:n,dockService:r,rtl:o,scroller:i}){return{type:"Pan",key:"discrete:pan",options:{event:AR,pointers:1,threshold:10,enable(r,o){return this.started===AR||!o||!(!t.scroll.enabled()||!i.enabled())&&e.componentsFromPoint({x:o.center.x,y:o.center.y}).some((e=>e.key===n))}},events:{discretePanstart(e){e.preventDefault(),this.started=AR;const t="horizontal"===r.meta.major.orientation?e.deltaX:e.deltaY;this.previousTotalDelta=t<0?-10:10},discretePanmove(e){e.preventDefault();const t="horizontal"===r.meta.major.orientation,n=t?e.deltaX:e.deltaY,a=t&&o?-1:1,s=(n-this.previousTotalDelta)*a;this.previousTotalDelta=n,i.scroll(s)},discretePanend(e){e.preventDefault(),this.started=!1},discretePancancel(e){e.preventDefault(),this.started=!1}}}}function IR({chart:e,componentKey:t,actions:n,scroller:r}){return function(o){if(!n.scroll.enabled()||!r.enabled())return;const[i]=e.componentsFromPoint({x:o.clientX,y:o.clientY}).filter((e=>e.key===t));if(!i)return;o.preventDefault();const a=Math.abs(o.deltaY)>Math.abs(o.deltaX)?o.deltaY:o.deltaX,s=100*Math.sign(-a);r.scroll(s)}}function PR({chart:e,actions:t,componentKey:n,dockService:r,rtl:o,scroller:i}){return{gestures:[LR({chart:e,actions:t,componentKey:n,dockService:r,rtl:o,scroller:i})],native:{type:"native",events:{wheel:IR({chart:e,actions:t,componentKey:n,scroller:i})}}}}function DR({layoutService:e}){const t=function({layoutService:e}){const t=Math.floor(ER/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){const r=Math.min(t,Math.max(wR,n));return{width:e,height:Math.max(CR,Math.min(n*MR,r))}}}({layoutService:e}),n={width:e.meta.size.x,height:e.meta.size.y};return function(e){const{width:r,height:o}=t({width:e.qWidth,height:e.qHeight}),i=o?Math.ceil((o-e.qHeight)/2):0,a=r?Math.ceil((r-e.qWidth)/2):0;return{qHeight:o?Math.min(o,n.height):e.qHeight,qWidth:r?Math.min(r,n.width):e.qWidth,qTop:o?Math.max(0,Math.min(e.qTop-i,n.height-o)):e.qTop,qLeft:r?Math.max(0,Math.min(e.qLeft-a,n.width-r)):e.qLeft}}}function qR(e){let t,n;const r=o=>{t=o;const{method:i,args:a}=t.request;e[i](...a).then((e=>{if(t.canceled||n)return t.reject(xR),t=null,void(n&&(r(n),n=null));t.resolve(e[0]),t=null}))},o=e=>new Promise(((o,i)=>{const a={request:e,resolve:o,reject:i,canceled:!1,cancel:()=>{a.canceled=!0}};t?(e=>{n&&n.reject(xR),n=e})(a):r(a)}));return o.isProcessing=()=>!!t,o.hasQueued=()=>!!n,o.cancel=()=>{o.isProcessing()&&t.cancel(),o.hasQueued()&&(n.reject(xR),n=null)},o}const zR={command:{update:()=>{}}};var $R={inTotal:function({layoutService:e}){return e.meta.size.x},area:function({layoutService:e}){return{qTop:0,qHeight:1,qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:o}=t,i=e.getDataPages()[0],a=o/r;return[a,n.inView>=n.inTotal?a+1:a+i.qArea.qWidth/n.inView]}};var BR={inTotal:function({layoutService:e}){if(e.meta.isSnapshot&&!e.getLayoutValue("reducedHyperCube")){const[t]=e.getDataPages();if(t)return t.qArea.qHeight}return e.meta.size.y},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const o=void 0===r?4:r,i=Math.max(0,Math.floor(t)-o/2);return{qTop:i,qHeight:Math.min(e.meta.size.y-i,Math.max(0,Math.ceil(n+o))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:o}=t,i=e.getDataPages()[0],a=r/n.inView,s=(o+i.qArea.qTop*a)/r;return[s,n.inView>=n.inTotal?s+1:s+i.qArea.qHeight/n.inView]}};function FR(e){const{groupSize:t,measureCount:n}=e.meta;return null!=t?t:n}function HR(e,t){const n=[];for(let r=0;r<e.length;r++){const o=t(e[r]);-1===n.indexOf(o)&&n.push(o)}return n.length}function jR(e){return HR(e.qMatrix,(e=>e[0].qElemNumber))-1}var VR={inTotal:function({layoutService:e}){const t=FR(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const o=FR(e),i=void 0===r?o:r,a=t/(o+1),s=Math.max(0,Math.floor((t-a-i/2)/o));return{qTop:s,qHeight:Math.min(e.meta.size.y-s,Math.max(0,Math.ceil((n+i)/o+1))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const o=FR(e),i=e.getDataPages()[0],a=r/n.inView,{pixel:s}=t,l=jR(i),c=i.qArea.qHeight*o+l,u=(s+(i.qArea.qTop*o+i.qArea.qTop)*a)/r;return[u,n.inView>=n.inTotal?u+1:u+c/n.inView]}};const WR=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1);function _R(e){return{itemOffset(t,n){if(0!==t.qArea.qTop)return WR(e,n);const r=((e,t)=>{const n={successful:!0,count:0};let r=Math.abs(Math.floor(t));const o=[];for(let t=0;t<=r;t++){if(!e[t])return n.successful=!1,n;const i=e[t][0].qElemNumber;-1===o.indexOf(i)&&(o.push(i),r--)}return n.count=o.length-1,n})(t.qMatrix,n);return r.successful?r.count:WR(e,n)},area(t,n,r){if(0!==t.qArea.qTop)return WR(e,n);return HR(t.qMatrix.slice(0,r.qTop+1),(e=>e[0].qElemNumber))-1}}}var UR={inTotal:function({layoutService:e}){return e.meta.size.y+e.meta.size.dimensions[0]-1},area:function({getDataPages:e,layoutService:t,itemOffset:n,inView:r}){const o=_R(t).itemOffset(e(),n),i=Math.max(0,Math.floor(n-o));return{qTop:i,qHeight:Math.min(t.meta.size.y-i,Math.max(0,Math.ceil(r+1))),qLeft:0,qWidth:t.meta.size.x}},scaleRange:function({getDataPages:e,layoutService:t,offsets:n,items:r,viewSize:o,upperBound:i}){const a=t.getDataPages()[0],s=o/r.inView,{item:l,pixel:c}=n,u=_R(t).area(e(),l,a.qArea),d=jR(a),p=a.qArea.qHeight+d,m=c===i?(r.inView-p)*s/o:(c+(a.qArea.qTop+u)*s)/o;return[m,r.inView>=r.inTotal?m+1:m+p/r.inView]}};function YR({chart:e,rect:t,dockService:n,itemWidths:r,axisKey:o,renderer:i,isGrouped:a,dimensionAxis:s,inTotal:l,isMajorLabelless:c,maxDataRows:u}){const{DEFAULT:d,SQUEEZE:p,LABELLESS:m}=r[n.meta.chart.mode],f="horizontal"===n.meta.major.orientation,{axisDisplayMode:h="auto",maxVisibleItems:g=10,label:v}=s,y=f?t.width:t.height,b=y/l>=p;switch(h){case"max":return Math.min(l,u);case"custom":return Math.min(g,u);case"auto":default:return c?y/m:b?function({chart:e,isHorizontal:t,axisKey:n,renderer:r={},isGrouped:o,itemSize:i,label:a}){if(o||"auto"!==a&&"tilted"!==a)return!1;const s=e.component(n),{measureText:l}=r;if(!s||!l)return!0;const{fontFamily:c,fontSize:u,tiltAngle:d}=s.settings.settings.labels,{height:p}=l({fontFamily:c,fontSize:u,text:"M"});if(!t)return p>i;const m=(90-d)*(Math.PI/180);return p>Math.cos(m)*i}({chart:e,isHorizontal:f,axisKey:o,renderer:i,isGrouped:a,itemSize:p,label:v})?y/d:l:y/d}}var GR={SPARK:{DEFAULT:7,SQUEEZE:7,LABELLESS:7},XSMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},SMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},MEDIUM:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},FULL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20}};function KR({layoutService:e,key:t}){const{style:n}=e.getLayoutValue("components",[]).filter((e=>e.key===t))[0]||{};return({property:r,defaultValue:o,index:i})=>{const a=n&&Object.hasOwnProperty.call(n,r)?n[r]:o;if(void 0===i)return a;const{style:s}=e.getHyperCubeValue((e=>`qMeasureInfo.${e}.styling`)(i),[]).filter((e=>e.key===t))[0]||{};return s&&Object.hasOwnProperty.call(s,r)?s[r]:a}}function XR({dataset:e,data:t,valueData:n}){var r;const{source:o,label:i,value:a}=n,s=e(o.key).field(o.field);return s.raw().isCustomFormatted?i:"-"===i||""===a||Number.isNaN(a)||"NaN"===a||null!==(r=t.null)&&void 0!==r&&r.value?"-":s.formatter()(a)}function JR({chart:e,actions:t,translator:n,rtl:r,dockService:o,seriesModel:i,colorService:a,themeService:s,propertiesModel:l,custom:c}){const u=s.getStyles(),d=({data:e})=>e.major.value,p=({data:e})=>!e.null.value||0===e.end.value,{SLICED_HAT:m}=Qa.COMPONENT,{PRIMARY:f,SECONDARY:h}=ts,g=function({dockService:e,seriesModel:t}){const{AXIS:n,BAR_OOB:r,DATA_OOB_MARKER:o,SLICED_HAT:i}=Qa.COMPONENT,{PRIMARY:a,SECONDARY:s}=ts,{orientation:l}=e.meta.chart,c="vertical"===l,u=[...t.meta.barComponentKeys,...t.meta.markerComponentKeys,...t.meta.pointComponentKeys];return[({chart:e,hovered:t,meta:l})=>{const[d]=t,{triggerer:p}=l,m=p===n.MAJOR?d.data.value:d.data.major.value;if(c){const t=e.findShapes("container").find((e=>(e.key===`${i}-max-${a}`||e.key===`${i}-max-${s}`)&&e.data&&e.data.value===m&&e.children.length));if(t)return{key:t.key,bounds:t.bounds}}const f=e.findShapes("path").find((e=>(e.key===`${r}-max-${a}`||e.key===`${r}-max-${s}`||e.key===o+"-max")&&e.data.major.value===m));if(c&&f)return{key:f.key,bounds:f.bounds};const h=e.findShapes("path").find((e=>(e.key===`${r}-min-${a}`||e.key===`${r}-min-${s}`||e.key===o+"-min")&&e.data.major.value===m)),g=e.findShapes("*").filter((e=>u.indexOf(e.key)>-1&&e.data&&e.data.major.value===m));if(c&&h&&!g.find((e=>e.data.end.source.field!==h.data.end.source.field)))return{key:h.key,bounds:h.bounds};const v=f||h;return!(c||!v||g.find((e=>e.data.end.source.field!==v.data.end.source.field)))&&{key:v.key,bounds:v.bounds}},"collectible"]}({dockService:o,seriesModel:i});return T({chart:e,translator:n,config:{rtl:r,enable:()=>t.tooltip.enabled(),getColorSettings:()=>a.getSettings(),style:{fontFamily:u.fontFamily},main:{key:Qa.COMPONENT.TOOLTIP,getGroupByValue:d,collectibles:[...i.meta.barComponentKeys.map((e=>({key:e,type:"bar",major:d}))),...i.meta.pointComponentKeys.map((e=>({key:e,type:"point",major:d}))),...i.meta.markers.map((e=>({key:e.key,type:e.type,major:d})))],triggers:[{keys:[Qa.COMPONENT.AXIS.MAJOR],collect:{from:"dimension",by:({data:e})=>e.value,filter:p},placement:g},{keys:[...i.meta.barComponentKeys,...i.meta.markerComponentKeys,`${m}-max-${f}`,`${m}-max-${h}`,`${m}-min-${f}`,`${m}-min-${h}`,`${Qa.COMPONENT.BAR_OOB}-max-${f}`,`${Qa.COMPONENT.BAR_OOB}-max-${h}`,`${Qa.COMPONENT.BAR_OOB}-min-${f}`,`${Qa.COMPONENT.BAR_OOB}-min-${h}`,Qa.COMPONENT.DATA_OOB_MARKER+"-max",Qa.COMPONENT.DATA_OOB_MARKER+"-min"],collect:{from:"dimension",by:d,filter:p},placement:g},{keys:[...i.meta.pointComponentKeys],distance:3,collect:{from:"dimension",by:d,filter:p},placement:g}],section:({h:e,nodes:t,dataset:n,create:r,util:o})=>{const[i]=t,{title:a,description:s,measures:l}=c.isEnabled()?c.getAttributes({dataset:n,nodes:[i]}):{},u=[];a&&u.push(r.text({value:a,style:{bold:!0}})),s&&u.push(r.text({value:s}));const d=c.hideBasic();d&&!l.length&&(a||s)||u.push(r.text({value:i.data.label,style:{bold:!0}})),d||(u.push(r.color({nodes:t,property:Qa.SCALE.COLOR})),u.push(...t.map((e=>{const{segment:t,end:i}=e.data,a=t||i,{key:s,field:l}=a.source;return r.measure({label:o.dataset.title(s,l),value:XR({dataset:n,data:e.data,valueData:a})})})))),l&&u.push(...l.map((e=>r.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}})))),c.chart.isEnabled()&&(c.chart.hasLimitation()?(c.chart.destroy(),u.push(r.raw({value:c.chart.createLimitationRow()}))):u.push(r.raw({value:c.chart.createContainer({h:e})})));const{customTooltipImages:p}=i.data;return c.isEnabled()&&p&&u.push(...p.map((t=>r.raw({value:c.createImageRow({value:t,h:e})})))),u},layout:{grouping:!0,single:()=>!(!c.isEnabled()||!c.hasImages())||c.chart.isEnabled()},events:{tooltip:{beforeShow:({collectNodes:e})=>c.isEnabled()&&c.hasImages()?c.addImages({nodes:e()}):Promise.resolve(),afterShow:({nodes:e})=>{c.chart.isEnabled()&&!c.chart.hasLimitation()&&c.chart.show({nodes:e,properties:l.query.getProperties()})}},interaction:{mouseleave:()=>{c.chart.isEnabled()&&c.chart.hasAlternateState()&&c.chart.hide()}}}},legend:{keys:{tooltip:Qa.COMPONENT.LEGEND_TOOLTIP,component:Qa.COMPONENT.LEGEND_CATEGORICAL}}}})}const{model:ZR}=Zd;const QR={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"}}]};const eA={query:{getCanScroll:()=>!0}};function tA({clearMinor:e,clearDiscrete:t,clearLegend:n}){e(),e({componentName:"minor-secondary-range-brush",eventName:"minorRange-secondary"}),t({brushName:!1}),n()}function nA({setSelectionInfo:e,event:t,components:n,clear:r}){const o=null!=n&&n.length?n.map((e=>e.key)).filter(Boolean):[];e({event:t,components:o,minorRangePrimary:"minorRange"===t,minorRange:["minorRange","minorRange-secondary"].includes(t),legendRange:"legendRange"===t,legendTap:"tap"===t&&o[0]===Qa.COMPONENT.LEGEND_CATEGORICAL}),r()}function rA({chart:e,actions:t}){const o=b(),i=a(),[s,l]=n();return r((()=>{if(null==e||!e.update||!e.scale||!o)return null;const n=e.scale(Qa.SCALE.MAJOR),r=P({chart:e,actions:t,selections:o,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:n,selectionActions:{clear:tA},selectionEvents:{start:nA}}});r.setLayout(i);const{destroy:a}=r;return l(r),()=>{a()}}),[o,null==e?void 0:e.update,null==e?void 0:e.scale]),r((()=>{null!=s&&s.setLayout&&i&&s.setLayout(i)}),[i]),s}const oA={version:"1.23.7",qHyperCubeDef:{qAlwaysFullyExpanded:!0,qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:17,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1},showTitles:!0,subtitle:"",title:"",footnote:"",barGrouping:{grouping:"grouped"},orientation:"vertical",scrollStartPos:0,nullMode:"gap",dataPoint:{show:!1,showLineLabels:!1,showBarLabels:!1},color:{auto:!0,mode:"primary",useBaseColors:"off",paletteColor:{index:6},useDimColVal:!0,useMeasureGradient:!0,persistent:!1,expressionIsColor:!0,expressionLabel:"",measureScheme:"sg",reverseScheme:!1,dimensionScheme:"12",autoMinMax:!0,measureMin:0,measureMax:10},legend:{dock:"auto",show:!0,showTitle:!0},components:[],dimensionAxis:{axisDisplayMode:"auto",continuousAuto:!0,dock:"near",label:"auto",maxVisibleItems:10,show:"all"},measureAxes:[{show:"all",dock:"near",spacing:1,autoMinMax:!0,minMax:"min",min:0,max:10},{show:"all",dock:"far",spacing:1,autoMinMax:!0,minMax:"min",min:0,max:10}],refLine:{refLines:[],refLines2:[],dimRefLines:[]},preferContinuousAxis:!0,showMiniChartForContinuousAxis:!0,tooltip:{auto:!0,hideBasic:!1,title:"",description:"",chart:void 0,imageComponents:void 0}};var iA=e=>t=>{const n=t.qHyperCubeDef.qMeasures,r=[0,0,0];let o;if(!n.length)return e.get("Visualizations.Descriptions.Bars");for(let e=0;e<n.length;++e)o=hu(n[e].qDef.series),o===es.BAR?r[0]=1:o===es.LINE?r[1]=1:r[2]=1;const i=["Visualizations.Descriptions.Marker","Visualizations.Descriptions.Line","Visualizations.Descriptions.ComboChart.Dimension.LineMarker","Visualizations.Descriptions.Bars","Visualizations.Descriptions.ComboChart.Dimension.BarMarker","Visualizations.Descriptions.ComboChart.Dimension.BarLine","Visualizations.Descriptions.ComboChart.Dimension.BarLineMarker"][parseInt(r.join(""),2)-1];return e.get(i)},aA=e=>(t,n)=>{let r;const o=t.qHyperCubeDef.qMeasures[n];if(o){const{type:e}=o.qDef.series;r=e===es.LINE?"Visualizations.Descriptions.HeightLine":e===es.BAR?"Visualizations.Descriptions.LengthBars":"Visualizations.Descriptions.ComboChart.Measure.HeightMarker"}else r=n?"Visualizations.Descriptions.HeightLine":"Visualizations.Descriptions.LengthBars";return e.get(r)};function sA(e){var t,n;const r=e.qHyperCubeDef.qMeasures,o=null===(t=e.color)||void 0===t?void 0:t.mode;"byDimension"===o&&1===r.length&&hu(null===(n=r[0].qDef)||void 0===n?void 0:n.series)===es.LINE?e.color.mode="primary":"byDimension"===o&&r.length>1&&(e.color.mode="byMultiple")}function lA(e){const{translator:t}=e;return{dimensions:{min:1,max:1,description:iA(t),added(e,t){gs.addCallbackCustomTooltip(t)},moved(e,t){gs.moveCallbackCustomTooltip(t,e)},removed(e,t){gs.removeCallbackCustomTooltip(t,e)},replaced(e,t,n,r){gs.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:15,description:aA(t),added({qDef:e},t){var n;sA(t),null!==(n=e.series)&&void 0!==n&&n.type||(t.qHyperCubeDef.qMeasures.length>1?e.series={type:es.LINE,axis:ts.SECONDARY}:e.series={type:es.BAR,axis:ts.PRIMARY})},moved(e,t){sA(t)}}}}function cA(e){const t=lA(e);return{properties:oA,data:{targets:[{path:"/qHyperCubeDef",...t}]},importProperties:({exportFormat:e,initialProperties:n,hypercubePath:r})=>{const o=W.axisChart.importProperties({exportFormat:e,initialProperties:n,dataDefinition:t,hypercubePath:r}),i="linechart"===e.properties.visualization,a=[];o.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.series||(e.qDef.series={type:i?"line":"bar",axis:0,marker:"circle",markerFill:!0}),a.indexOf(e.qDef.series.axis)<0&&a.push(e.qDef.series.axis)}));const s=a.sort().shift();return o.qProperty.measureAxes[s]&&e.properties.measureAxis&&void 0!==e.properties.measureAxis.autoMinMax&&Q(!0,o.qProperty.measureAxes[s],e.properties.measureAxis,{logarithmic:!1}),o},exportProperties:({propertyTree:e,hyperCubePath:t,viewDataMode:n})=>W.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})}}const uA=(e,t,n,r)=>{const o=t+".fontFamily",i=t+".fontSize";return{fontFamilyItem:{component:"dropdown",ref:e+".fontFamily",options:()=>n.getOptions(o),defaultValue:()=>n.getDefaultValue(o)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:e+".fontSize",options:()=>n.getOptions(i),defaultValue:()=>n.getDefaultValue(i)},fontColorItem:{component:"color-picker",width:!1,ref:e+".color",defaultValue:()=>({color:r.getStyle("object.comboChart",t,"color")})}}}}};function dA(e,t,n){const r=D({theme:t,translator:n,config:{id:"comboChart",paths:["axis.title","axis.label.name","label.value"]}});if(null!=e&&e.isEnabled("SENSECLIENT_IM_311_STYLINGPANEL_COMBOCHART"))return{component:"styling-panel",show:!0,chartType:"combochart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.ComboChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:null==e?void 0:e.isEnabled("SENSECLIENT_IM_2431_COMBOCHART_BG"),items:{barSection:{translation:"Visualizations.Descriptions.Bars",component:"accordion",items:{outlineSection:{translation:"properties.Outline",component:"panel-section",items:{wrapperItem:{component:"items",ref:"components",key:"bar",items:{barStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:!0,component:"dropdown",options:[{translation:"Common.None",value:"none"},{translation:"Common.Small",value:"small"},{translation:"Common.Medium",value:"medium"},{translation:"Common.Large",value:"large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",defaultValue:{color:"#205891"},schemaIgnore:!0,width:"auto",component:"color-picker"}}}}}}},widthSection:{translation:"LayerStyleEditor.style.barWidth",component:"panel-section",items:{barWidth:{component:"items",ref:"components",key:"bar",items:{width:{ref:"style.width",component:"slider",min:.01,max:1,step:.01,defaultValue:.7,schemaIgnore:!0}}}}},labelValueSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.barlabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"bar",items:uA("bar.label.value","label.value",r,t)}}}:void 0}},lineSection:{translation:"Visualizations.Descriptions.Lines",component:"accordion",items:{dataPointSection:{translation:"LayerStyleEditor.style.dataPointSize",component:"panel-section",items:{dataPointSize:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.dataPointSize",component:"slider",min:3,max:20,step:1,defaultValue:6,schemaIgnore:!0}}}}},lineSection:{translation:"Line options",component:"panel-section",items:{wrapperItem:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.lineThickness",translation:"Thickness",component:"slider",defaultValue:1,min:1,max:5,step:1,schemaIgnore:!0},type:{ref:"style.lineType",translation:"Type",component:"dropdown",width:"auto",grouped:!0,options:[{value:"solid",translation:"LayerStyleEditor.style.solid"},{value:"dashed",translation:"LayerStyleEditor.style.dashed"}],defaultValue:"solid",schemaIgnore:!0},curve:{ref:"style.lineCurve",translation:"Curve",component:"dropdown",width:"auto",grouped:!0,options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}],defaultValue:"linear",schemaIgnore:!0}}}}},labelValueSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.linelabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"line",items:uA("line.label.value","label.value",r,t)}}}:void 0}},axisTitleSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.axis.title",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"axis",items:uA("axis.title","axis.title",r,t)}}}:void 0,axisLabelSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.axis.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"axis",items:uA("axis.label.name","axis.label.name",r,t)}}}:void 0}};const o={component:"dropdown",type:"string",expression:"optional",baseRef:"style.strokeWidth",translation:"LayerStyleEditor.style.strokeWidth",show:!0,defaultValue:"none",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"}]},i={component:"color-picker",type:"object",baseRef:"style.strokeColor",translation:"LayerStyleEditor.style.strokeColor",dualOutput:!0,show:e=>"none"!==E(e,`${((e,t)=>{let n=-1;for(let r=0;r<e.length;r++)if(e[r].key===t){n=r;break}return n})(e,"bar")}.${o.baseRef}`),defaultValue:()=>({index:-1,color:"#205891"})},a={component:"slider",type:"number",expression:"optional",baseRef:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",show:!0,defaultValue:6,min:3,max:20,step:1},s={component:"slider",type:"number",expression:"optional",baseRef:"style.lineThickness",translation:"LayerStyleEditor.style.lineThickness",show:!0,defaultValue:1,min:1,max:5,step:1},l={component:"dropdown",type:"string",expression:"optional",baseRef:"style.lineType",translation:"LayerStyleEditor.style.lineType",show:!0,defaultValue:"solid",options:[{value:"solid",translation:"LayerStyleEditor.style.solid"},{value:"dashed",translation:"LayerStyleEditor.style.dashed"}]},c={component:"dropdown",type:"string",expression:"optional",baseRef:"style.lineCurve",translation:"LayerStyleEditor.style.lineCurve",show:!0,defaultValue:"linear",options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}]};return{component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:["bar","line"],ref:"components",defaultValue:[],defaultValues(e){const t="grouped"===e.barGrouping.grouping,n=e.qHyperCubeDef.qMeasures.filter((e=>hu(e.qDef.series)===es.BAR)).length,r=t&&n>1;return[{key:"bar",style:{strokeWidth:o.defaultValue,strokeColor:i.defaultValue(),width:r?.9:.7}},{key:"line",style:{dataPointSize:a.defaultValue,lineThickness:s.defaultValue,lineType:l.defaultValue,lineCurve:c.defaultValue}}]},items:{list:{type:"items",component:"expandable-items",items:{bar:{type:"items",translation:"Visualizations.Descriptions.Bar",expanded:!0,styleKey:"bar",items:{barStrokeWidth:o,barStrokeColor:i,barWidth:{component:"slider",type:"number",expression:"optional",baseRef:"style.width",translation:"LayerStyleEditor.style.barWidth",show:(e,t,n)=>{const r=t.getMeasures().some((e=>hu(e.qDef.series)===es.LINE));return!me.continuous(n.layout,r&&le.isTime(!0,n.layout))},defaultValue:.7,min:.01,max:1,step:.01}}},line:{type:"items",translation:"Visualizations.Descriptions.Line",expanded:!0,styleKey:"line",items:{dataPointSize:a,lineThickness:s,lineType:l,lineCurve:c}}}}}}}const pA={classification:{section:"styling",tags:["simple"],exclusive:!0},component:"items",show:!0,chartType:"combochart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.ComboChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,items:{barsSection:{component:"items",items:{wrapperItem:{component:"items",ref:"components",key:"bar",items:{barsHeader:{component:"header",translation:"Visualizations.Descriptions.Bars"},outlineSection:{component:"items",items:{barStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:!0,component:"dropdown",translation:"LayerStyleEditor.style.strokeWidth",options:[{translation:"Common.None",value:"none"},{translation:"Common.Small",value:"small"},{translation:"Common.Medium",value:"medium"},{translation:"Common.Large",value:"large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",schemaIgnore:!0,defaultValue:{color:"#205891"},width:"auto",component:"color-picker"}}}}},widthSection:{component:"items",items:{barWidth:{component:"items",items:{width:{ref:"style.width",translation:"LayerStyleEditor.style.barWidth",component:"slider",min:.01,max:1,step:.01,schemaIgnore:!0,defaultValue:.7}}}}}}}}},linesSection:{component:"items",items:{wrapperItem:{component:"items",items:{linesHeader:{component:"header",translation:"Visualizations.Descriptions.Lines"},dataPointSection:{component:"items",items:{dataPointSize:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",component:"slider",min:3,max:20,step:1,defaultValue:6,schemaIgnore:!0}}}}},lineSection:{component:"items",items:{wrapperItem:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.lineThickness",translation:"LayerStyleEditor.style.lineThickness",component:"slider",defaultValue:1,min:1,max:5,step:1,schemaIgnore:!0},type:{ref:"style.lineType",translation:"LayerStyleEditor.style.lineType",component:"dropdown",width:"auto",grouped:!0,options:[{value:"solid",translation:"LayerStyleEditor.style.solid"},{value:"dashed",translation:"LayerStyleEditor.style.dashed"}],defaultValue:"solid",schemaIgnore:!0},curve:{ref:"style.lineCurve",translation:"LayerStyleEditor.style.lineCurve",component:"dropdown",width:"auto",grouped:!0,options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}],defaultValue:"linear",schemaIgnore:!0}}}}}}}}},optionsSection:{component:"items",items:{wrapperItem:{component:"items",items:{optionsHeader:{component:"header",translation:"LayerStyleEditor.label.Options"},scrollStartPos:{ref:"scrollStartPos",translation:"properties.ScrollAlignment",component:"dropdown",defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}]},dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!1}}}}}}};function mA(e){const t=E(e,"qHyperCube.qMeasureInfo",[]).some((({series:e=ns})=>hu(e)===es.LINE));return me.continuous(e,(()=>t&&le.isTime(!0,e)))}function fA(e){var t,n;return!(null===(t=e.qDef)||void 0===t||null===(n=t.color)||void 0===n||!n.on)}function hA(e){var t,n,r;return fA(e)&&"primary"===(null!==(t=null===(n=e.qDef)||void 0===n||null===(r=n.color)||void 0===r?void 0:r.mode)&&void 0!==t?t:"primary")}function gA(e){var t,n;return fA(e)&&"byExpression"===(null===(t=e.qDef)||void 0===t||null===(n=t.color)||void 0===n?void 0:n.mode)}function vA(e){var t,n,r,o,i;if(null!=e&&null!==(t=e.color)&&void 0!==t&&t.auto||"byExpression"!==(null==e||null===(n=e.color)||void 0===n?void 0:n.mode))return[];const a=null==e||null===(r=e.color)||void 0===r?void 0:r.colorExpression,s=null!==(o=null==e||null===(i=e.color)||void 0===i?void 0:i.expressionLabel)&&void 0!==o?o:"";return a?[{qExpression:a,label:s,id:"colorByExpression"}]:[]}function yA(e){return gA(e)?[{qExpression:e.qDef.color.colorExpression,id:"colorByMeasureExpression"}]:[]}function bA(e){var t,n;(null!==(t=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qMeasures)&&void 0!==t?t:[]).forEach(((t,n)=>function(e,t,n){e.qAttributeExpressions=0===t?[...vA(n),...yA(e)]:yA(e)}(t,n,e)))}function xA(e){var t,n;const r={ref:"qDef.series.type",type:"string",component:"item-selection-list",defaultValue:"bar",schemaIgnore:!0,horizontal:!0,items:[{icon:e=>"stacked"===e.barGrouping.grouping||mA(e)?"stacked":"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.bar",value:"bar"},{icon:"line_chart_line",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.line",value:"line"},{icon:"shapes",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.marker",value:"marker"}]},o={ref:"qDef.series.marker",type:"string",component:"dropdown",defaultValue:"circle",options:[{translation:"properties.marker.circle",value:"circle"},{translation:"properties.marker.rect",value:"rect"},{translation:"properties.marker.diamond",value:"diamond"},{translation:"properties.marker.triangle",value:"triangle"},{translation:"properties.marker.line",value:"line"}],show(e){var t;return hu(null===(t=e.qDef)||void 0===t?void 0:t.series)===es.MARKER}},i={ref:"qDef.series.markerFill",translation:"properties.series.fill",type:"boolean",defaultValue:!0,show(e){var t;return hu(null===(t=e.qDef)||void 0===t?void 0:t.series)===es.MARKER&&!["line"].includes(e.qDef.series.marker)}},a={ref:"qDef.color.mode",type:"string",component:"dropdown",options:[{value:"primary",translation:"properties.colorMode.primary"},{value:"byExpression",translation:"properties.colorMode.byExpression"}],defaultValue:"primary",show:(...e)=>fA(...e)},s=null===(t=e.anything)||void 0===t||null===(n=t.sense)||void 0===n?void 0:n.theme;return{items:{series:{type:"items",items:{supPanel:{translation:"properties.measure.moreProperties",title:"properties.measure.moreProperties",subTitle:(e,t,n)=>{var r;return null===(r=n.measureTitle)||void 0===r?void 0:r.call(n)},component:"sub-panel",type:"items",items:{groups:{type:"items",component:"expandable-items",items:{presentation:{type:"items",translation:"properties.presentation",items:{seriesType:r,seriesAxis:{ref:"qDef.series.axis",type:"integer",component:"dropdown",defaultValue:0,options:[{translation:"properties.axis.primary",value:0},{translation:"properties.axis.secondary",value:1}]},seriesMarker:o,seriesMarkerFill:i}},color:{type:"items",translation:"properties.color",items:{customColor:{ref:"qDef.color.on",translation:"properties.colors",type:"boolean",component:"switch",defaultValue:!1,trueOption:{value:!1,translation:"Common.Auto"},falseOption:{value:!0,translation:"Common.Custom"}},colorMode:a,paletteColor:{ref:"qDef.color.paletteColor",translation:"properties.color",type:"object",component:"color-picker",dualOutput:!0,defaultValue:()=>{var e;const{primary:t}=s.getDataColorSpecials(),n=null===(e=s.getDataColorPickerPalettes()[0])||void 0===e?void 0:e.colors,r=n.indexOf(t);return{index:-1===r?Math.min(6,n.length-1):r}},show:hA},attributeExpression:{type:"string",component:"expression",expressionType:"measure",schemaIgnore:!0,ref:"qDef.color.colorExpression",translation:"Common.Expression",show:gA}}}}}}}}}}}}const SA=!0;function EA(e,t,n){let r;const o=n||0;var i,a;t?r=t.getMeasureLayouts():r=null!==(i=null==e||null===(a=e.qHyperCubeDef)||void 0===a?void 0:a.qMeasures)&&void 0!==i?i:[];return r.filter((e=>{const{series:t}=e||{};return 0===o?SN(t,SA):!SN(t,SA)}))}function MA(e,t){return t.getMeasures().filter((e=>hu(e.qDef.series)===es.LINE)).length>0}function CA(e,t,n){const r=t.getMeasures().filter((e=>hu(e.qDef.series)===es.BAR));return r.filter((e=>e.qDef.series.axis!==ts.SECONDARY)).length>n||r.filter((e=>e.qDef.series.axis===ts.SECONDARY)).length>n}const wA=(e,t,n,r)=>{const o="vertical"===t.layout.orientation||mA(t.layout)?"y":"x",i=EA(e,t,r).map((e=>e.qFallbackTitle));let a;return a=i.length?n.get(`properties.${o}AxisWithInfo`,[i.join(",")]):n.get(`properties.${o}Axis`),a};function kA(e){var t,n,r,o,i;const{translator:a,flags:s,anything:l}=e,c=null==e||null===(t=e.anything)||void 0===t||null===(n=t.sense)||void 0===n?void 0:n.theme,u=null==e||null===(r=e.anything)||void 0===r||null===(o=r.sense)||void 0===o||null===(i=o.isUnsupportedFeature)||void 0===i?void 0:i.call(o,"continuousData"),d={items:{attributeExpression:{ref:"color.colorExpression",change:null,globalChange:e=>bA(e)},expressionLabel:{change:null},disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some((e=>fA(e)))}}},p=e=>!!e&&(e.coloring&&e.coloring.baseColor&&e.coloring.baseColor.color?e.coloring.baseColor:!(!e.baseColor||!e.baseColor.color)&&e.baseColor);const m=(e,t)=>!E(e,"color.auto")&&"primary"===E(e,"color.mode")&&!((e=>E(e,"layout.qHyperCube.qMeasureInfo",[]).filter((e=>!!p(e))).length>0)(t)&&"measure"===E(e,"color.useBaseColors")||function(e){return E(e,"layout.qHyperCube.qDimensionInfo",[]).filter((e=>!!p(e))).length>0}(t)&&"dimension"===E(e,"color.useBaseColors")),f=(e,t)=>{var n,r;return e.qHyperCubeDef.qMeasures.some((e=>fA(e)))||!s.isEnabled("SIMPLE_PROPERTIES_LIBRARY_COLOR")&&!(null!=e&&null!==(n=e.color)&&void 0!==n&&n.auto||"primary"!==(null==e||null===(r=e.color)||void 0===r?void 0:r.mode)||m(e,t))},h={items:{disclaimer:{show:(e,t)=>f(e,t),reset:e=>{e.qHyperCubeDef.qMeasures.forEach((e=>{var t;E(t=e,"qDef.color.on",void 0)&&M(t,"qDef.color.on",!1)}))}},simpleItems:{show:(e,t)=>!f(e,t)}}},g={items:{labels:{items:{header:{show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length},barLabels:{component:"checkbox",ref:"dataPoint.showBarLabels",type:"boolean",translation:"Simple.Label.Bar",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&CA(0,t,0)},lineLabels:{component:"checkbox",ref:"dataPoint.showLineLabels",type:"boolean",translation:"Simple.Label.Line",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&MA(0,t),convertFunctions:{get:(e,t,n,r)=>r.dataPoint.show&&r.dataPoint.showLineLabels,set(e,t,n,r,o){o.dataPoint.showLineLabels=e,o.dataPoint.show=e}},reset(e){M(e,"dataPoint.show",!1),M(e,"dataPoint.showLineLabels",!1)}},dimensionTitle:{component:"checkbox",ref:"dimensionAxis.show",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)=>"labels"===r.dimensionAxis.show||"none"===r.dimensionAxis.show,set(e,t,n,r,o){o.dimensionAxis.show=e?"labels":"all"}}},primaryMeasureTitle:{component:"checkbox",ref:"measureAxes.0.show",type:"string",label:(e,t)=>a.get(EA(e,t,1).length>0?"Simple.Label.PrimaryMeasure.Hide":"Simple.Label.Measure.Hide"),defaultValue:"all",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&EA(e,t,0).length>0,convertFunctions:{get:(e,t,n,r)=>"labels"===r.measureAxes[0].show||"none"===r.measureAxes[0].show,set(e,t,n,r,o){o.measureAxes[0].show=e?"labels":"all"}}},secondaryMeasureTitle:{component:"checkbox",ref:"measureAxes.1.show",type:"string",translation:"Simple.Label.SecondaryMeasure.Hide",defaultValue:"all",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&EA(e,t,1).length>0,convertFunctions:{get:(e,t,n,r)=>"labels"===r.measureAxes[1].show||"none"===r.measureAxes[1].show,set(e,t,n,r,o){o.measureAxes[1].show=e?"labels":"all"}}}}}}},v={uses:"settings",items:{simpleStyling:null!=s&&s.isEnabled("COMBOCHART_SIMPLE_STYLING")?pA:void 0,simpleLabels:g,presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{comboStyling:dA(s,c,a),grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",defaultValue:"grouped",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show:(e,t,n)=>CA(0,t,1)&&!mA(n.layout)},orientation:{ref:"orientation",type:"string",component:"item-selection-list",defaultValue:"vertical",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],readOnly:(e,t,n)=>mA(n.layout),convertFunctions:(y="vertical",{get:(e,t,n)=>mA(n.layout)?y:e(t.type),set(e,t,n,r){t(n.type,mA(r.layout)?y:e,y)}})},scrollStartPos:{ref:"scrollStartPos",type:"number",translation:"properties.ScrollAlignment",component:"dropdown",defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}],show:(e,t,n)=>!mA(n.layout)},nullMode:{type:"string",component:"dropdown",ref:"nullMode",translation:"properties.nullMode",options:[{value:"gap",translation:"properties.nullMode.gap"},{value:"connect",translation:"properties.nullMode.connect"},{value:"zero",translation:"properties.nullMode.zero"}],defaultValue:"gap",show:(e,t)=>MA(0,t)},dataPointSettings:{type:"items",grouped:!1,snapshot:{tid:"property-dataPoint"},show:(e,t)=>MA(0,t),items:{dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!1},showLineDataPointLabels:{ref:"dataPoint.showLineLabels",translation:"properties.dataPoints.linelabelmode",type:"boolean",component:"switch",defaultValue:!1,show:e=>e.dataPoint&&e.dataPoint.show,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]}}},showBarLabels:{ref:"dataPoint.showBarLabels",type:"boolean",translation:"properties.dataPoints.barlabelmode",component:"switch",show:(e,t)=>CA(0,t,0),defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:d,simpleColors:h,legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",label(e,t){const n="vertical"===t.layout.orientation||mA(t.layout)?"x":"y",r=function(e,t){return t?t.getDimensionLayouts():e.qHyperCubeDef.qDimensions.map((e=>e.qDef))}(e,t).map((e=>e.qFallbackTitle||"")).join(", ");let o;return o=r?a.get(`properties.${n}AxisWithInfo`,[r]):a.get(`properties.${n}Axis`),o},items:{othersGroup:{items:{dock:{options(e,t){let n="Common.Bottom",r="Common.Top";return"vertical"===t.layout.orientation||mA(t.layout)||(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}}}},axisDisplaySettings:{type:"items",components:"items",show:(e,t,n)=>!mA(n.layout),items:{axisDisplayMode:{type:"string",translation:"properties.axis.displaymode",ref:"dimensionAxis.axisDisplayMode",component:"dropdown",defaultValue:"auto",options:[{value:"auto",translation:"properties.axis.displaymode.auto"},{value:"max",translation:"properties.axis.displaymode.max"},{value:"custom",translation:"properties.axis.displaymode.custom"}]},maxVisibleItems:{type:"integer",translation:"properties.axis.maxvisiblevalues",ref:"dimensionAxis.maxVisibleItems",expression:"optional",defaultValue:10,show:e=>"custom"===e.dimensionAxis.axisDisplayMode,invalid(e){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:r}=e.dimensionAxis;return r<0||r>1e4/(t.length+n.length)},globalChange(e){if("custom"===e.dimensionAxis.axisDisplayMode){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:r}=e.dimensionAxis;r<1?e.dimensionAxis.maxVisibleItems=10:r>1e4/(t.length+n.length)&&(e.dimensionAxis.maxVisibleItems=Math.min(r,Math.floor(1e4/(t.length+n.length))))}}},hint:{component:"text",translation:"properties.axis.maxvisiblevalues.hint.combochart",style:"hint",show:e=>["custom","max"].indexOf(e.dimensionAxis.axisDisplayMode)>-1}}}},continuousGroup:{show:!u}},measureAxis:{uses:"axis.measureAxis",label:(e,t)=>wA(e,t,a,0),show:(e,t)=>EA(e,t,0).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,t)=>wA(e,t,a,0),show:(e,t)=>EA(e,t,0).length>0,classification:{section:"axis",tags:["simple"],exclusive:!0}},show:{ref:"measureAxes.0.show",snapshot:{title:"properties.axis.primary",tid:"property-primary-axis",show(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qMeasureInfo)||[]).some((e=>(null==e?void 0:e.series)&&SN(null==e?void 0:e.series,SA)))}}},dock:{ref:"measureAxes.0.dock",show:(e,t)=>"none"!==e.measureAxes[0].show&&EA(e,t,0).length>0,options(e,t){let n="Common.Bottom",r="Common.Top";return("vertical"===t.layout.orientation||mA(t.layout))&&(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}},spacing:{ref:"measureAxes.0.spacing",show:(e,t)=>e.measureAxes[0]&&"none"!==e.measureAxes[0].show&&EA(e,t,0).length>0}}},minMax:{items:{autoMinMax:{ref:"measureAxes.0.autoMinMax"},minMax:{ref:"measureAxes.0.minMax",defaultValue:"min",show:e=>!e.measureAxes[0].autoMinMax},min:{ref:"measureAxes.0.min",show:e=>["min","minMax"].includes(e.measureAxes[0].minMax)&&!e.measureAxes[0].autoMinMax,invalid:e=>"minMax"===e.measureAxes[0].minMax&&e.measureAxes[0].min>=e.measureAxes[0].max},max:{ref:"measureAxes.0.max",show:e=>["max","minMax"].includes(e.measureAxes[0].minMax)&&!e.measureAxes[0].autoMinMax,invalid:e=>"minMax"===e.measureAxes[0].minMax&&e.measureAxes[0].min>=e.measureAxes[0].max}}},startAt:{type:"string",component:"dropdown",translation:"properties.axis.startAt",show:(e,t)=>EA(e,t,0).length>0,readOnly:e=>!(e.measureAxes[0].autoMinMax||"min"===e.measureAxes[0].minMax&&0===e.measureAxes[0].min),options:[{value:"zero",translation:"properties.axis.startAt.zero"},{value:"lowest",translation:"properties.axis.startAt.lowest"}],defaultValue:"lowest",convertFunctions:{get(e,t,n,r){const{autoMinMax:o,minMax:i,min:a}=(null==r?void 0:r.measureAxes[0])||{};return!0===o?"lowest":o||"min"!==i||0!==a?e(t.type):"zero"},set(e,t,n,r,o){"zero"===e?(M(o,"measureAxes.0.autoMinMax",!1),M(o,"measureAxes.0.minMax","min"),M(o,"measureAxes.0.min",0)):M(o,"measureAxes.0.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},secondaryMeasureAxis:{uses:"axis.measureAxis",label:(e,t)=>wA(e,t,a,1),show:(e,t)=>EA(e,t,1).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,t)=>wA(e,t,a,1),show:(e,t)=>EA(e,t,1).length>0,classification:{section:"axis",tags:["simple"],exclusive:!0}},show:{ref:"measureAxes.1.show",snapshot:{title:"properties.axis.secondary",tid:"property-secondary-Axis",show(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qMeasureInfo)||[]).some((e=>(null==e?void 0:e.series)&&!SN(null==e?void 0:e.series,SA)))}}},dock:{ref:"measureAxes.1.dock",defaultValue:"far",show:(e,t)=>"none"!==e.measureAxes[1].show&&EA(e,t,1).length>0,options(e,t){let n="Common.Bottom",r="Common.Top";return("vertical"===t.layout.orientation||mA(t.layout))&&(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}},spacing:{ref:"measureAxes.1.spacing",show:(e,t)=>e.measureAxes[1]&&"none"!==e.measureAxes[1].show&&EA(e,t,1).length>0}}},minMax:{type:"items",items:{autoMinMax:{ref:"measureAxes.1.autoMinMax"},minMax:{ref:"measureAxes.1.minMax",defaultValue:"min",show:e=>!e.measureAxes[1].autoMinMax},min:{ref:"measureAxes.1.min",show:e=>["min","minMax"].includes(e.measureAxes[1].minMax)&&!e.measureAxes[1].autoMinMax,invalid:e=>"minMax"===e.measureAxes[1].minMax&&e.measureAxes[1].min>=e.measureAxes[1].max},max:{ref:"measureAxes.1.max",show:e=>["max","minMax"].includes(e.measureAxes[1].minMax)&&!e.measureAxes[1].autoMinMax,invalid:e=>"minMax"===e.measureAxes[1].minMax&&e.measureAxes[1].min>=e.measureAxes[1].max}}},startAt:{type:"string",component:"dropdown",translation:"properties.axis.startAt",show:(e,t)=>EA(e,t,1).length>0,readOnly:e=>!(e.measureAxes[1].autoMinMax||"min"===e.measureAxes[1].minMax&&0===e.measureAxes[1].min),options:[{value:"zero",translation:"properties.axis.startAt.zero"},{value:"lowest",translation:"properties.axis.startAt.lowest"}],defaultValue:"lowest",convertFunctions:{get(e,t,n,r){const{autoMinMax:o,minMax:i,min:a}=(null==r?void 0:r.measureAxes[1])||{};return!0===o?"lowest":o||"min"!==i||0!==a?e(t.type):"zero"},set(e,t,n,r,o){"zero"===e?(M(o,"measureAxes.1.autoMinMax",!1),M(o,"measureAxes.1.minMax","min"),M(o,"measureAxes.1.min",0)):M(o,"measureAxes.1.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},tooltips:{uses:"tooltip"}}};var y;s.isEnabled("SENSECLIENT_LAYERED_LABELS")&&(v.items.dimensionAxis.items.othersGroup.items.label={options:[{value:"auto",translation:"Common.Auto"},{value:"horizontal",translation:"Common.Horizontal"},{value:"tilted",translation:"properties.labels.tilted"},{value:"layered",translation:"properties.labels.layered"}]});return{type:"items",component:"accordion",items:{data:{uses:"data",items:{dimensions:{items:{nullSuppression:{show(e,t,n){var r,o;if(null!=l&&null!==(r=l.sense)&&void 0!==r&&null!==(o=r.isUnsupportedFeature)&&void 0!==o&&o.call(r,"includeZeroValues"))return!1;return!mA(n.layout)}}}},measures:xA(e)}},sorting:{uses:"sortingWithDisclaimer"},addons:{type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}},primaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines",translation:"properties.primaryMeasureAxisReferenceLines",title:{translation:"properties.primaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some((e=>SN(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,SA)},secondaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines2",translation:"properties.secondaryMeasureAxisReferenceLines",title:{translation:"properties.secondaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some((e=>!SN(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,SA)},dimRefLines:{uses:"dimReflines"}}},settings:v}}}function NA(e){return e.qHyperCubeDef.qMeasures.filter((e=>hu(e.qDef.series)===es.LINE)).length>0}function TA(){return{type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sortWithDisclaimer"},presentation:{uses:"presentation",type:"items",translation:"properties.presentation",grouped:!0,show:(e,t)=>NA(e)||!mA(t),items:{grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show(e,t){var n;return function(e,t){const n=e.qHyperCubeDef.qMeasures.filter((e=>hu(e.qDef.series)===es.BAR));return t?n.filter((e=>e.qDef.series.axis===ts.PRIMARY)).length>1||n.filter((e=>e.qDef.series.axis===ts.SECONDARY)).length>1:n.length>1}(e,!KO(null!==(n=null==e?void 0:e.version)&&void 0!==n?n:""))&&!mA(t)}},orientation:{ref:"orientation",type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],show:(e,t)=>!mA(t)},nullMode:{type:"string",component:"radio-list",ref:"nullMode",translation:"properties.nullMode",options:()=>[{value:"gap",translation:"properties.nullMode.gap"},{value:"connect",translation:"properties.nullMode.connect"},{value:"zero",translation:"properties.nullMode.zero"}],show:e=>NA(e)&&e.qHyperCubeDef.qMeasures.length>1},dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",show:e=>NA(e)}}},color:{uses:"color",items:{disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some((e=>fA(e)))}}}}}}const OA={bar:{axis:0,icon:"bar-chart",tid:"as-bar",translation:"contextMenu.asBar"},line:{axis:1,icon:"line-chart",tid:"as-line",translation:"contextMenu.asLine"},marker:{axis:1,icon:"shapes",tid:"as-marker",translation:"contextMenu.asMarker"}};function RA(e,t,n,r,o){const{axis:i,icon:a,tid:s,translation:l}=OA[o];t.addItem({icon:a,tid:s,translation:l,async select(){let t;t="measure"===e.type?await r.addLibraryMeasure(e.id):await r.addExpressionMeasure(e.name,""),t.qDef.series.type=o,t.qDef.series.axis=i,r.updateGlobalChangeListeners(),n.setProperties(r.properties),window.qvangularGlobal.$rootScope.$broadcast("pp-open-path","data."+t.qDef.cId)}})}function AA(e,t,n,r,o){!function(e,t,n){const{item:r}=e,o=["contextMenu.add",r.name];if(n.canAddMeasure()){const i=e.menu.addItem({translation:o,tid:"add-as"});RA(r,i,t,n,"bar"),RA(r,i,t,n,"line"),RA(r,i,t,n,"marker")}}(e,n,t),t.getMeasures().length>=t.minMeasures()&&e.ReplaceMeasures(n,t,o),e.ColorBy(n,t,o),r()}function LA(e){const t={},{tooltip:n}=e;if(n){var r,o;t.chart_tooltip_custom=!n.auto;const e=null===(r=n.chart)||void 0===r||null===(o=r.object)||void 0===o?void 0:o.refId;!n.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}const IA=e=>!!(e&&e.qHyperCube.qSize.qcy>0);function PA(e){return{definition:kA(e),softDefinition:TA(),support:{snapshot:IA,export:!0,exportData:!0,sharing:!1,viewData:!0,modifiers:["accumulation","movingAverage","difference","normalization"]},getDropMeasureOptions:AA,extendMetrics:LA,importProperties:(t,n,r,o)=>{const i={layout:{templateId:n.templateId}};r.mapProperties(i);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=W.axisChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:lA(e),defaultPropertyValues:a,hypercubePath:o,extension:r});return function(e,t,n){const r="linechart"===n.properties.visualization,o=[];e.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.series||(e.qDef.series={type:r?"line":"bar",axis:0,marker:"circle",markerFill:!0}),o.indexOf(e.qDef.series.axis)<0&&o.push(e.qDef.series.axis)}));const i=o.sort().shift();e.qProperty.measureAxes[i]&&n.properties.measureAxis&&void 0!==n.properties.measureAxis.autoMinMax&&Q(!0,e.qProperty.measureAxes[i],n.properties.measureAxis,{logarithmic:!1}),bA(e.qProperty)}(s,0,t),s},exportProperties:(e,t,n)=>{!function(e){e.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qAttributeExpressions=[]}))}(e);return W.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})},migrate:{properties:e=>e.qExtendsId?e:function(e){return KO(e.version)&&(e.qHyperCubeDef.qMeasures.forEach((e=>{const{qDef:t}=e;void 0===t.series&&(t.series=ns),void 0===t.series.type&&(t.series.type=ns.type),void 0===t.series.axis&&(t.series.axis=t.series.type===es.BAR?ts.PRIMARY:ts.SECONDARY),t.series.type===es.BAR&&t.series.axis===ts.SECONDARY&&(t.series.axis=ts.PRIMARY)})),e.version=GO),e}(e)}}}}}}));
|
|
20
|
+
* This source code is licensed under the MIT license found in the
|
|
21
|
+
* LICENSE file in the root directory of this source tree.
|
|
22
|
+
*/
|
|
23
|
+
Object.defineProperty(zy,"__esModule",{value:!0});var _y="function"==typeof Symbol&&Symbol.for,Hy=_y?Symbol.for("react.element"):60103,By=_y?Symbol.for("react.portal"):60106,Fy=_y?Symbol.for("react.fragment"):60107,jy=_y?Symbol.for("react.strict_mode"):60108,Vy=_y?Symbol.for("react.profiler"):60114,Uy=_y?Symbol.for("react.provider"):60109,Yy=_y?Symbol.for("react.context"):60110,Wy=_y?Symbol.for("react.async_mode"):60111,Xy=_y?Symbol.for("react.concurrent_mode"):60111,Gy=_y?Symbol.for("react.forward_ref"):60112,Ky=_y?Symbol.for("react.suspense"):60113,Jy=_y?Symbol.for("react.suspense_list"):60120,Zy=_y?Symbol.for("react.memo"):60115,Qy=_y?Symbol.for("react.lazy"):60116,eg=_y?Symbol.for("react.fundamental"):60117,tg=_y?Symbol.for("react.responder"):60118,ng=_y?Symbol.for("react.scope"):60119;function rg(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case Hy:switch(e=e.type){case Wy:case Xy:case Fy:case Vy:case jy:case Ky:return e;default:switch(e=e&&e.$$typeof){case Yy:case Gy:case Uy:return e;default:return t}}case Qy:case Zy:case By:return t}}}function ig(e){return rg(e)===Xy}zy.typeOf=rg,zy.AsyncMode=Wy,zy.ConcurrentMode=Xy,zy.ContextConsumer=Yy,zy.ContextProvider=Uy,zy.Element=Hy,zy.ForwardRef=Gy,zy.Fragment=Fy,zy.Lazy=Qy,zy.Memo=Zy,zy.Portal=By,zy.Profiler=Vy,zy.StrictMode=jy,zy.Suspense=Ky,zy.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===Fy||e===Xy||e===Vy||e===jy||e===Ky||e===Jy||"object"==typeof e&&null!==e&&(e.$$typeof===Qy||e.$$typeof===Zy||e.$$typeof===Uy||e.$$typeof===Yy||e.$$typeof===Gy||e.$$typeof===eg||e.$$typeof===tg||e.$$typeof===ng)},zy.isAsyncMode=function(e){return ig(e)||rg(e)===Wy},zy.isConcurrentMode=ig,zy.isContextConsumer=function(e){return rg(e)===Yy},zy.isContextProvider=function(e){return rg(e)===Uy},zy.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===Hy},zy.isForwardRef=function(e){return rg(e)===Gy},zy.isFragment=function(e){return rg(e)===Fy},zy.isLazy=function(e){return rg(e)===Qy},zy.isMemo=function(e){return rg(e)===Zy},zy.isPortal=function(e){return rg(e)===By},zy.isProfiler=function(e){return rg(e)===Vy},zy.isStrictMode=function(e){return rg(e)===jy},zy.isSuspense=function(e){return rg(e)===Ky},$y.exports=zy;var og=$y.exports,ag={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},sg={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},lg={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ug={};function cg(e){return og.isMemo(e)?lg:ug[e.$$typeof]||ag}ug[og.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ug[og.Memo]=lg;var dg=Object.defineProperty,mg=Object.getOwnPropertyNames,hg=Object.getOwnPropertySymbols,fg=Object.getOwnPropertyDescriptor,pg=Object.getPrototypeOf,yg=Object.prototype;var gg=function e(t,n,r){if("string"!=typeof n){if(yg){var i=pg(n);i&&i!==yg&&e(t,i,r)}var o=mg(n);hg&&(o=o.concat(hg(n)));for(var a=cg(t),s=cg(n),l=0;l<o.length;++l){var u=o[l];if(!(sg[u]||r&&r[u]||s&&s[u]||a&&a[u])){var c=fg(n,u);try{dg(t,u,c)}catch(e){}}}}return t},vg=W(gg);function xg(e){var t=e.children,n=e.theme,r=Ay(),i=_.useMemo((function(){var e=null===r?n:function(e,t){return"function"==typeof t?t(e):jm({},e,t)}(r,n);return null!=e&&(e[Nh]=null!==r),e}),[n,r]);return _.createElement(Cy.Provider,{value:i},t)}var bg=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=nh(t,["defaultTheme","withTheme","name"]),l=a,u=Py(e,jm({defaultTheme:r,Component:n,name:a||n.displayName,classNamePrefix:l},s)),c=_.forwardRef((function(e,t){e.classes;var i,s=e.innerRef,l=nh(e,["classes","innerRef"]),c=u(jm({},n.defaultProps,e)),d=l;return("string"==typeof a||o)&&(i=Ay()||r,a&&(d=Ih({theme:i,name:a,props:l})),o&&!d.theme&&(d.theme=i)),_.createElement(n,jm({ref:s||t,classes:c},d))}));return vg(c,n),c}},Sg=Th();function Eg(e,t){return bg(e,jm({defaultTheme:Sg},t))}function Mg(e){if("string"!=typeof e)throw new Error(Gm(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Cg(){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 Ag(e){return e&&e.ownerDocument||document}function Og(e){return Ag(e).defaultView||window}function Tg(e,t){"function"==typeof e?e(t):e&&(e.current=t)}var Ng="undefined"!=typeof window?H.useLayoutEffect:H.useEffect;function wg(e){var t=H.useRef(e);return Ng((function(){t.current=e})),H.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}function Rg(e,t){return H.useMemo((function(){return null==e&&null==t?null:function(n){Tg(e,n),Tg(t,n)}}),[e,t])}var Ig=!0,kg=!1,Lg=null,Pg={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 qg(e){e.metaKey||e.altKey||e.ctrlKey||(Ig=!0)}function Dg(){Ig=!1}function $g(){"hidden"===this.visibilityState&&kg&&(Ig=!0)}function zg(e){var t,n,r,i=e.target;try{return i.matches(":focus-visible")}catch(e){}return Ig||(n=(t=i).type,!("INPUT"!==(r=t.tagName)||!Pg[n]||t.readOnly)||"TEXTAREA"===r&&!t.readOnly||!!t.isContentEditable)}function _g(){kg=!0,window.clearTimeout(Lg),Lg=window.setTimeout((function(){kg=!1}),100)}function Hg(){return{isFocusVisible:zg,onBlurVisible:_g,ref:H.useCallback((function(e){var t,n=V.findDOMNode(e);null!=n&&((t=n.ownerDocument).addEventListener("keydown",qg,!0),t.addEventListener("mousedown",Dg,!0),t.addEventListener("pointerdown",Dg,!0),t.addEventListener("touchstart",Dg,!0),t.addEventListener("visibilitychange",$g,!0))}),[])}}var Bg=!1,Fg=_.createContext(null),jg="unmounted",Vg="exited",Ug="entering",Yg="entered",Wg="exiting",Xg=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=Vg,r.appearStatus=Ug):i=Yg:i=t.unmountOnExit||t.mountOnEnter?jg:Vg,r.state={status:i},r.nextCallback=null,r}$h(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===jg?{status:Vg}: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!==Ug&&n!==Yg&&(t=Ug):n!==Ug&&n!==Yg||(t=Wg)}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===Ug){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:U.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Vg&&this.setState({status:jg})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[U.findDOMNode(this),r],o=i[0],a=i[1],s=this.getTimeouts(),l=r?s.appear:s.enter;!e&&!n||Bg?this.safeSetState({status:Yg},(function(){t.props.onEntered(o)})):(this.props.onEnter(o,a),this.safeSetState({status:Ug},(function(){t.props.onEntering(o,a),t.onTransitionEnd(l,(function(){t.safeSetState({status:Yg},(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:U.findDOMNode(this);t&&!Bg?(this.props.onExit(r),this.safeSetState({status:Wg},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:Vg},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:Vg},(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:U.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===jg)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=th(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return _.createElement(Fg.Provider,{value:null},"function"==typeof n?n(e,r):_.cloneElement(_.Children.only(n),r))},t}(_.Component);function Gg(){}Xg.contextType=Fg,Xg.propTypes={},Xg.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Gg,onEntering:Gg,onEntered:Gg,onExit:Gg,onExiting:Gg,onExited:Gg},Xg.UNMOUNTED=jg,Xg.EXITED=Vg,Xg.ENTERING=Ug,Xg.ENTERED=Yg,Xg.EXITING=Wg;var Kg=Xg;function Jg(e,t){var n=Object.create(null);return e&&B.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&F(e)?t(e):e}(e)})),n}function Zg(e,t,n){return null!=n[t]?n[t]:e.props[t]}function Qg(e,t,n){var r=Jg(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(F(a)){var s=o in t,l=o in r,u=t[o],c=F(u)&&!u.props.in;!l||s&&!c?l||!s||c?l&&s&&F(u)&&(i[o]=j(a,{onExited:n.bind(null,a),in:u.props.in,exit:Zg(a,"exit",e),enter:Zg(a,"enter",e)})):i[o]=j(a,{in:!1}):i[o]=j(a,{onExited:n.bind(null,a),in:!0,exit:Zg(a,"exit",e),enter:Zg(a,"enter",e)})}})),i}var ev=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},tv=function(e){function t(t,n){var r,i=(r=e.call(this,t,n)||this).handleExited.bind(zh(r));return r.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},r}$h(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,Jg(n.children,(function(e){return j(e,{onExited:r.bind(null,e),in:!0,appear:Zg(e,"appear",n),enter:Zg(e,"enter",n),exit:Zg(e,"exit",n)})}))):Qg(e,i,o),firstRender:!1}},n.handleExited=function(e,t){var n=Jg(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=jm({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,r=th(e,["component","childFactory"]),i=this.state.contextValue,o=ev(this.state.children).map(n);return delete r.appear,delete r.enter,delete r.exit,null===t?_.createElement(Fg.Provider,{value:i},o):_.createElement(Fg.Provider,{value:i},_.createElement(t,r,o))},t}(_.Component);tv.propTypes={},tv.defaultProps={component:"div",childFactory:function(e){return e}};var nv=tv;function rv(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 iv=H.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,m=nh(e,["classes","className","component","square","elevation","variant"]);return H.createElement(o,jm({className:Dy(n.root,r,"outlined"===d?n.outlined:n["elevation".concat(u)],!s&&n.rounded),ref:t},m))})),ov=Eg((function(e){var t={};return e.shadows.forEach((function(e,n){t["elevation".concat(n)]={boxShadow:e}})),jm({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"})(iv),av="undefined"==typeof window?H.useEffect:H.useLayoutEffect;function sv(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=H.useState(!1),m=d[0],h=d[1],f=Dy(t.ripple,t.rippleVisible,r&&t.ripplePulsate),p={width:a,height:a,top:-a/2+o,left:-a/2+i},y=Dy(t.child,m&&t.childLeaving,r&&t.childPulsate),g=wg(u);return av((function(){if(!s){h(!0);var e=setTimeout(g,c);return function(){clearTimeout(e)}}}),[g,s,c]),H.createElement("span",{className:f,style:p},H.createElement("span",{className:y}))}var lv=H.forwardRef((function(e,t){var n=e.center,r=void 0!==n&&n,i=e.classes,o=e.className,a=nh(e,["center","classes","className"]),s=H.useState([]),l=s[0],u=s[1],c=H.useRef(0),d=H.useRef(null);H.useEffect((function(){d.current&&(d.current(),d.current=null)}),[l]);var m=H.useRef(!1),h=H.useRef(null),f=H.useRef(null),p=H.useRef(null);H.useEffect((function(){return function(){clearTimeout(h.current)}}),[]);var y=H.useCallback((function(e){var t=e.pulsate,n=e.rippleX,r=e.rippleY,o=e.rippleSize,a=e.cb;u((function(e){return[].concat(xh(e),[H.createElement(sv,{key:c.current,classes:i,timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o})])})),c.current+=1,d.current=a}),[i]),g=H.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&&m.current)m.current=!1;else{"touchstart"===e.type&&(m.current=!0);var c,d,g,v=u?null:p.current,x=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(x.width/2),d=Math.round(x.height/2);else{var b=e.touches?e.touches[0]:e,S=b.clientX,E=b.clientY;c=Math.round(S-x.left),d=Math.round(E-x.top)}if(s)(g=Math.sqrt((2*Math.pow(x.width,2)+Math.pow(x.height,2))/3))%2==0&&(g+=1);else{var M=2*Math.max(Math.abs((v?v.clientWidth:0)-c),c)+2,C=2*Math.max(Math.abs((v?v.clientHeight:0)-d),d)+2;g=Math.sqrt(Math.pow(M,2)+Math.pow(C,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]),v=H.useCallback((function(){g({},{pulsate:!0})}),[g]),x=H.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 H.useImperativeHandle(t,(function(){return{pulsate:v,start:g,stop:x}}),[v,g,x]),H.createElement("span",jm({className:Dy(i.root,o),ref:p},a),H.createElement(nv,{component:null,exit:!0},l))})),uv=Eg((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"})(H.memo(lv)),cv=H.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,m=void 0!==d&&d,h=e.disableRipple,f=void 0!==h&&h,p=e.disableTouchRipple,y=void 0!==p&&p,g=e.focusRipple,v=void 0!==g&&g,x=e.focusVisibleClassName,b=e.onBlur,S=e.onClick,E=e.onFocus,M=e.onFocusVisible,C=e.onKeyDown,A=e.onKeyUp,O=e.onMouseDown,T=e.onMouseLeave,N=e.onMouseUp,w=e.onTouchEnd,R=e.onTouchMove,I=e.onTouchStart,k=e.onDragLeave,L=e.tabIndex,P=void 0===L?0:L,q=e.TouchRippleProps,D=e.type,$=void 0===D?"button":D,z=nh(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"]),_=H.useRef(null);var B=H.useRef(null),F=H.useState(!1),j=F[0],U=F[1];m&&j&&U(!1);var Y=Hg(),W=Y.isFocusVisible,X=Y.onBlurVisible,G=Y.ref;function K(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:y;return wg((function(r){return t&&t(r),!n&&B.current&&B.current[e](r),!0}))}H.useImperativeHandle(n,(function(){return{focusVisible:function(){U(!0),_.current.focus()}}}),[]),H.useEffect((function(){j&&v&&!f&&B.current.pulsate()}),[f,v,j]);var J=K("start",O),Z=K("stop",k),Q=K("stop",N),ee=K("stop",(function(e){j&&e.preventDefault(),T&&T(e)})),te=K("start",I),ne=K("stop",w),re=K("stop",R),ie=K("stop",(function(e){j&&(X(e),U(!1)),b&&b(e)}),!1),oe=wg((function(e){_.current||(_.current=e.currentTarget),W(e)&&(U(!0),M&&M(e)),E&&E(e)})),ae=function(){var e=V.findDOMNode(_.current);return c&&"button"!==c&&!("A"===e.tagName&&e.href)},se=H.useRef(!1),le=wg((function(e){v&&!se.current&&j&&B.current&&" "===e.key&&(se.current=!0,e.persist(),B.current.stop(e,(function(){B.current.start(e)}))),e.target===e.currentTarget&&ae()&&" "===e.key&&e.preventDefault(),C&&C(e),e.target===e.currentTarget&&ae()&&"Enter"===e.key&&!m&&(e.preventDefault(),S&&S(e))})),ue=wg((function(e){v&&" "===e.key&&B.current&&j&&!e.defaultPrevented&&(se.current=!1,e.persist(),B.current.stop(e,(function(){B.current.pulsate(e)}))),A&&A(e),S&&e.target===e.currentTarget&&ae()&&" "===e.key&&!e.defaultPrevented&&S(e)})),ce=c;"button"===ce&&z.href&&(ce="a");var de={};"button"===ce?(de.type=$,de.disabled=m):("a"===ce&&z.href||(de.role="button"),de["aria-disabled"]=m);var me=Rg(r,t),he=Rg(G,_),fe=Rg(me,he),pe=H.useState(!1),ye=pe[0],ge=pe[1];H.useEffect((function(){ge(!0)}),[]);var ve=ye&&!f&&!m;return H.createElement(ce,jm({className:Dy(s.root,l,j&&[s.focusVisible,x],m&&s.disabled),onBlur:ie,onClick:S,onFocus:oe,onKeyDown:le,onKeyUp:ue,onMouseDown:J,onMouseLeave:ee,onMouseUp:Q,onDragLeave:Z,onTouchEnd:ne,onTouchMove:re,onTouchStart:te,ref:fe,tabIndex:m?-1:P},de,z),a,ve?H.createElement(uv,jm({ref:B,center:o},q)):null)})),dv=Eg({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"})(cv),mv={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},hv=H.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,m=void 0!==d&&d,h=e.noWrap,f=void 0!==h&&h,p=e.paragraph,y=void 0!==p&&p,g=e.variant,v=void 0===g?"body1":g,x=e.variantMapping,b=void 0===x?mv:x,S=nh(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),E=l||(y?"p":b[v]||mv[v])||"span";return H.createElement(E,jm({className:Dy(i.root,o,"inherit"!==v&&i[v],"initial"!==s&&i["color".concat(Mg(s))],f&&i.noWrap,m&&i.gutterBottom,y&&i.paragraph,"inherit"!==r&&i["align".concat(Mg(r))],"initial"!==c&&i["display".concat(Mg(c))]),ref:t},S))})),fv=Eg((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"})(hv),pv=H.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,m=void 0!==d&&d,h=e.disableFocusRipple,f=void 0!==h&&h,p=e.endIcon,y=e.focusVisibleClassName,g=e.fullWidth,v=void 0!==g&&g,x=e.size,b=void 0===x?"medium":x,S=e.startIcon,E=e.type,M=void 0===E?"button":E,C=e.variant,A=void 0===C?"text":C,O=nh(e,["children","classes","className","color","component","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"]),T=S&&H.createElement("span",{className:Dy(r.startIcon,r["iconSize".concat(Mg(b))])},S),N=p&&H.createElement("span",{className:Dy(r.endIcon,r["iconSize".concat(Mg(b))])},p);return H.createElement(dv,jm({className:Dy(r.root,r[A],i,"inherit"===a?r.colorInherit:"default"!==a&&r["".concat(A).concat(Mg(a))],"medium"!==b&&[r["".concat(A,"Size").concat(Mg(b))],r["size".concat(Mg(b))]],m&&r.disableElevation,c&&r.disabled,v&&r.fullWidth),component:l,disabled:c,focusRipple:!f,focusVisibleClassName:Dy(r.focusVisible,y),ref:t,type:M},O),H.createElement("span",{className:r.label},T,n,N))})),yv=Eg((function(e){return{root:jm({},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:eh(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:eh(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},textSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:eh(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(eh(e.palette.primary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.primary.main),backgroundColor:eh(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},outlinedSecondary:{color:e.palette.secondary.main,border:"1px solid ".concat(eh(e.palette.secondary.main,.5)),"&:hover":{border:"1px solid ".concat(e.palette.secondary.main),backgroundColor:eh(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"})(pv);var gv="undefined"!=typeof window?H.useLayoutEffect:H.useEffect,vv=H.forwardRef((function(e,t){var n=e.children,r=e.container,i=e.disablePortal,o=void 0!==i&&i,a=e.onRendered,s=H.useState(null),l=s[0],u=s[1],c=Rg(H.isValidElement(n)?n.ref:null,t);return gv((function(){o||u(function(e){return e="function"==typeof e?e():e,V.findDOMNode(e)}(r)||document.body)}),[r,o]),gv((function(){if(l&&!o)return Tg(t,l),function(){Tg(t,null)}}),[t,l,o]),gv((function(){a&&(l||o)&&a()}),[a,l,o]),o?H.isValidElement(n)?H.cloneElement(n,{ref:c}):n:l?V.createPortal(n,l):l})),xv=vv;function bv(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Sv(e){return parseInt(window.getComputedStyle(e)["padding-right"],10)||0}function Ev(e,t,n){var r=arguments.length>4?arguments[4]:void 0,i=[t,n].concat(xh(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)&&bv(e,r)}))}function Mv(e,t){var n=-1;return e.some((function(e,r){return!!t(e)&&(n=r,!0)})),n}function Cv(e,t){var n,r=[],i=[],o=e.container;if(!t.disableScrollLock){if(function(e){var t=Ag(e);return t.body===e?Og(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(Sv(o)+a,"px"),n=Ag(o).querySelectorAll(".mui-fixed"),[].forEach.call(n,(function(e){i.push(e.style.paddingRight),e.style.paddingRight="".concat(Sv(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 Av=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 qh(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&&bv(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);Ev(t,e.mountNode,e.modalRef,r,!0);var i=Mv(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=Mv(this.containers,(function(t){return-1!==t.modals.indexOf(e)})),r=this.containers[n];r.restore||(r.restore=Cv(r,t))}},{key:"remove",value:function(e){var t=this.modals.indexOf(e);if(-1===t)return t;var n=Mv(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&&bv(e.modalRef,!0),Ev(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&&bv(i.modalRef,!1)}return t}},{key:"isTopModal",value:function(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}}]),e}();function Ov(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=H.useRef(),m=H.useRef(null),h=H.useRef(null),f=H.useRef(),p=H.useRef(null),y=H.useCallback((function(e){p.current=V.findDOMNode(e)}),[]),g=Rg(t.ref,y),v=H.useRef();return H.useEffect((function(){v.current=c}),[c]),!v.current&&c&&"undefined"!=typeof window&&(f.current=l().activeElement),H.useEffect((function(){if(c){var e=Ag(p.current);r||!p.current||p.current.contains(e.activeElement)||(p.current.hasAttribute("tabIndex")||p.current.setAttribute("tabIndex",-1),p.current.focus());var t=function(){null!==p.current&&(e.hasFocus()&&!o&&u()&&!d.current?p.current&&!p.current.contains(e.activeElement)&&p.current.focus():d.current=!1)},n=function(t){!o&&u()&&9===t.keyCode&&e.activeElement===p.current&&(d.current=!0,t.shiftKey?h.current.focus():m.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]),H.createElement(H.Fragment,null,H.createElement("div",{tabIndex:0,ref:m,"data-test":"sentinelStart"}),H.cloneElement(t,{ref:g}),H.createElement("div",{tabIndex:0,ref:h,"data-test":"sentinelEnd"}))}var Tv={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"}},Nv=H.forwardRef((function(e,t){var n=e.invisible,r=void 0!==n&&n,i=e.open,o=nh(e,["invisible","open"]);return i?H.createElement("div",jm({"aria-hidden":!0,ref:t},o,{style:jm({},Tv.root,r?Tv.invisible:{},o.style)})):null}));var wv=new Av,Rv=H.forwardRef((function(e,t){var n=Ay(),r=Ih({name:"MuiModal",props:jm({},e),theme:n}),i=r.BackdropComponent,o=void 0===i?Nv:i,a=r.BackdropProps,s=r.children,l=r.closeAfterTransition,u=void 0!==l&&l,c=r.container,d=r.disableAutoFocus,m=void 0!==d&&d,h=r.disableBackdropClick,f=void 0!==h&&h,p=r.disableEnforceFocus,y=void 0!==p&&p,g=r.disableEscapeKeyDown,v=void 0!==g&&g,x=r.disablePortal,b=void 0!==x&&x,S=r.disableRestoreFocus,E=void 0!==S&&S,M=r.disableScrollLock,C=void 0!==M&&M,A=r.hideBackdrop,O=void 0!==A&&A,T=r.keepMounted,N=void 0!==T&&T,w=r.manager,R=void 0===w?wv:w,I=r.onBackdropClick,k=r.onClose,L=r.onEscapeKeyDown,P=r.onRendered,q=r.open,D=nh(r,["BackdropComponent","BackdropProps","children","closeAfterTransition","container","disableAutoFocus","disableBackdropClick","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onEscapeKeyDown","onRendered","open"]),$=H.useState(!0),z=$[0],_=$[1],B=H.useRef({}),F=H.useRef(null),j=H.useRef(null),U=Rg(j,t),Y=function(e){return!!e.children&&e.children.props.hasOwnProperty("in")}(r),W=function(){return Ag(F.current)},X=function(){return B.current.modalRef=j.current,B.current.mountNode=F.current,B.current},G=function(){R.mount(X(),{disableScrollLock:C}),j.current.scrollTop=0},K=wg((function(){var e=function(e){return e="function"==typeof e?e():e,V.findDOMNode(e)}(c)||W().body;R.add(X(),e),j.current&&G()})),J=H.useCallback((function(){return R.isTopModal(X())}),[R]),Z=wg((function(e){F.current=e,e&&(P&&P(),q&&J()?G():bv(j.current,!0))})),Q=H.useCallback((function(){R.remove(X())}),[R]);if(H.useEffect((function(){return function(){Q()}}),[Q]),H.useEffect((function(){q?K():Y&&u||Q()}),[q,Q,Y,u,K]),!N&&!q&&(!Y||z))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:Oh}),te={};return void 0===s.props.tabIndex&&(te.tabIndex=s.props.tabIndex||"-1"),Y&&(te.onEnter=Cg((function(){_(!1)}),s.props.onEnter),te.onExited=Cg((function(){_(!0),u&&Q()}),s.props.onExited)),H.createElement(xv,{ref:Z,container:c,disablePortal:b},H.createElement("div",jm({ref:U,onKeyDown:function(e){"Escape"===e.key&&J()&&(L&&L(e),v||(e.stopPropagation(),k&&k(e,"escapeKeyDown")))},role:"presentation"},D,{style:jm({},ee.root,!q&&z?ee.hidden:{},D.style)}),O?null:H.createElement(o,jm({open:q,onClick:function(e){e.target===e.currentTarget&&(I&&I(e),!f&&k&&k(e,"backdropClick"))}},a)),H.createElement(Ov,{disableEnforceFocus:y,disableAutoFocus:m,disableRestoreFocus:E,getDoc:W,isEnabled:J,open:q},H.cloneElement(s,te))))})),Iv=Rv;function kv(e){return"scale(".concat(e,", ").concat(Math.pow(e,2),")")}var Lv={entering:{opacity:1,transform:kv(1)},entered:{opacity:1,transform:"none"}},Pv=H.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,m=e.style,h=e.timeout,f=void 0===h?"auto":h,p=e.TransitionComponent,y=void 0===p?Kg:p,g=nh(e,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),v=H.useRef(),x=H.useRef(),b=Ay()||Sg,S=b.unstable_strictMode&&!i,E=H.useRef(null),M=Rg(n.ref,t),C=Rg(S?E:void 0,M),A=function(e){return function(t,n){if(e){var r=bh(S?[E.current,t]:[t,n],2),i=r[0],o=r[1];void 0===o?e(i):e(i,o)}}},O=A(l),T=A((function(e,t){!function(e){e.scrollTop}(e);var n,r=rv({style:m,timeout:f},{mode:"enter"}),i=r.duration,o=r.delay;"auto"===f?(n=b.transitions.getAutoHeightDuration(e.clientHeight),x.current=n):n=i,e.style.transition=[b.transitions.create("opacity",{duration:n,delay:o}),b.transitions.create("transform",{duration:.666*n,delay:o})].join(","),a&&a(e,t)})),N=A(s),w=A(d),R=A((function(e){var t,n=rv({style:m,timeout:f},{mode:"exit"}),r=n.duration,i=n.delay;"auto"===f?(t=b.transitions.getAutoHeightDuration(e.clientHeight),x.current=t):t=r,e.style.transition=[b.transitions.create("opacity",{duration:t,delay:i}),b.transitions.create("transform",{duration:.666*t,delay:i||.333*t})].join(","),e.style.opacity="0",e.style.transform=kv(.75),u&&u(e)})),I=A(c);return H.useEffect((function(){return function(){clearTimeout(v.current)}}),[]),H.createElement(y,jm({appear:!0,in:o,nodeRef:S?E:void 0,onEnter:T,onEntered:N,onEntering:O,onExit:R,onExited:I,onExiting:w,addEndListener:function(e,t){var n=S?e:t;"auto"===f&&(v.current=setTimeout(n,x.current||0))},timeout:"auto"===f?null:f},g),(function(e,t){return H.cloneElement(n,jm({style:jm({opacity:0,transform:kv(.75),visibility:"exited"!==e||o?void 0:"hidden"},Lv[e],m,n.props.style),ref:C},t))}))}));Pv.muiSupportAuto=!0;var qv=Pv,Dv=H.createContext({}),$v=H.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,m=nh(e,["children","classes","className","component","dense","disablePadding","subheader"]),h=H.useMemo((function(){return{dense:l}}),[l]);return H.createElement(Dv.Provider,{value:h},H.createElement(a,jm({className:Dy(r.root,i,l&&r.dense,!c&&r.padding,d&&r.subheader),ref:t},m),d,n))})),zv=Eg({root:{listStyle:"none",margin:0,padding:0,position:"relative"},padding:{paddingTop:8,paddingBottom:8},dense:{},subheader:{paddingTop:0}},{name:"MuiList"})($v),_v="undefined"==typeof window?H.useEffect:H.useLayoutEffect,Hv=H.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,m=e.ContainerComponent,h=void 0===m?"li":m,f=e.ContainerProps,p=(f=void 0===f?{}:f).className,y=nh(f,["className"]),g=e.dense,v=void 0!==g&&g,x=e.disabled,b=void 0!==x&&x,S=e.disableGutters,E=void 0!==S&&S,M=e.divider,C=void 0!==M&&M,A=e.focusVisibleClassName,O=e.selected,T=void 0!==O&&O,N=nh(e,["alignItems","autoFocus","button","children","classes","className","component","ContainerComponent","ContainerProps","dense","disabled","disableGutters","divider","focusVisibleClassName","selected"]),w=H.useContext(Dv),R={dense:v||w.dense||!1,alignItems:r},I=H.useRef(null);_v((function(){o&&I.current&&I.current.focus()}),[o]);var k,L,P=H.Children.toArray(l),q=P.length&&(k=P[P.length-1],L=["ListItemSecondaryAction"],H.isValidElement(k)&&-1!==L.indexOf(k.type.muiName)),D=Rg(H.useCallback((function(e){I.current=V.findDOMNode(e)}),[]),t),$=jm({className:Dy(u.root,c,R.dense&&u.dense,!E&&u.gutters,C&&u.divider,b&&u.disabled,s&&u.button,"center"!==r&&u.alignItemsFlexStart,q&&u.secondaryAction,T&&u.selected),disabled:b},N),z=d||"li";return s&&($.component=d||"div",$.focusVisibleClassName=Dy(u.focusVisible,A),z=dv),q?(z=$.component||d?z:"div","li"===h&&("li"===z?z="div":"li"===$.component&&($.component="div")),H.createElement(Dv.Provider,{value:R},H.createElement(h,jm({className:Dy(u.container,p),ref:D},y),H.createElement(z,$,P),P.pop()))):H.createElement(Dv.Provider,{value:R},H.createElement(z,jm({ref:D},$),P))})),Bv=Eg((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"})(Hv),Fv=H.forwardRef((function(e,t){var n=e.classes,r=e.className,i=nh(e,["classes","className"]),o=H.useContext(Dv);return H.createElement("div",jm({className:Dy(n.root,r,"flex-start"===o.alignItems&&n.alignItemsFlexStart),ref:t},i))})),jv=Eg((function(e){return{root:{minWidth:56,color:e.palette.action.active,flexShrink:0,display:"inline-flex"},alignItemsFlexStart:{marginTop:8}}}),{name:"MuiListItemIcon"})(Fv),Vv=H.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,m=e.secondaryTypographyProps,h=nh(e,["children","classes","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"]),f=H.useContext(Dv).dense,p=null!=u?u:n;null==p||p.type===fv||a||(p=H.createElement(fv,jm({variant:f?"body2":"body1",className:r.primary,component:"span",display:"block"},c),p));var y=d;return null==y||y.type===fv||a||(y=H.createElement(fv,jm({variant:"body2",className:r.secondary,color:"textSecondary",display:"block"},m),y)),H.createElement("div",jm({className:Dy(r.root,i,f&&r.dense,l&&r.inset,p&&y&&r.multiline),ref:t},h),p,y)})),Uv=Eg({root:{flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},multiline:{marginTop:6,marginBottom:6},dense:{},inset:{paddingLeft:56},primary:{},secondary:{}},{name:"MuiListItemText"})(Vv);function Yv(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function Wv(e,t){var n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function Xv(e){return[e.horizontal,e.vertical].map((function(e){return"number"==typeof e?"".concat(e,"px"):e})).join(" ")}function Gv(e){return"function"==typeof e?e():e}var Kv=H.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,m=e.container,h=e.elevation,f=void 0===h?8:h,p=e.getContentAnchorEl,y=e.marginThreshold,g=void 0===y?16:y,v=e.onEnter,x=e.onEntered,b=e.onEntering,S=e.onExit,E=e.onExited,M=e.onExiting,C=e.open,A=e.PaperProps,O=void 0===A?{}:A,T=e.transformOrigin,N=void 0===T?{vertical:"top",horizontal:"left"}:T,w=e.TransitionComponent,R=void 0===w?qv:w,I=e.transitionDuration,k=void 0===I?"auto":I,L=e.TransitionProps,P=void 0===L?{}:L,q=nh(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"]),D=H.useRef(),$=H.useCallback((function(e){if("anchorPosition"===l)return a;var t=Gv(r),n=(t&&1===t.nodeType?t:Ag(D.current).body).getBoundingClientRect(),i=0===e?o.vertical:"center";return{top:n.top+Yv(n,i),left:n.left+Wv(n,o.horizontal)}}),[r,o.horizontal,o.vertical,a,l]),z=H.useCallback((function(e){var t=0;if(p&&"anchorEl"===l){var n=p(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,p]),_=H.useCallback((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{vertical:Yv(e,N.vertical)+t,horizontal:Wv(e,N.horizontal)}}),[N.horizontal,N.vertical]),B=H.useCallback((function(e){var t=z(e),n={width:e.offsetWidth,height:e.offsetHeight},i=_(n,t);if("none"===l)return{top:null,left:null,transformOrigin:Xv(i)};var o=$(t),a=o.top-i.vertical,s=o.left-i.horizontal,u=a+n.height,c=s+n.width,d=Og(Gv(r)),m=d.innerHeight-g,h=d.innerWidth-g;if(a<g){var f=a-g;a-=f,i.vertical+=f}else if(u>m){var p=u-m;a-=p,i.vertical+=p}if(s<g){var y=s-g;s-=y,i.horizontal+=y}else if(c>h){var v=c-h;s-=v,i.horizontal+=v}return{top:"".concat(Math.round(a),"px"),left:"".concat(Math.round(s),"px"),transformOrigin:Xv(i)}}),[r,l,$,z,_,g]),F=H.useCallback((function(){var e=D.current;if(e){var t=B(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin}}),[B]),j=H.useCallback((function(e){D.current=V.findDOMNode(e)}),[]);H.useEffect((function(){C&&F()})),H.useImperativeHandle(n,(function(){return C?{updatePosition:function(){F()}}:null}),[C,F]),H.useEffect((function(){if(C){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(){F()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}}),[C,F]);var U=k;"auto"!==k||R.muiSupportAuto||(U=void 0);var Y=m||(r?Ag(Gv(r)).body:void 0);return H.createElement(Iv,jm({container:Y,open:C,ref:t,BackdropProps:{invisible:!0},className:Dy(c.root,d)},q),H.createElement(R,jm({appear:!0,in:C,onEnter:v,onEntered:x,onExit:S,onExited:E,onExiting:M,timeout:U},P,{onEntering:Cg((function(e,t){b&&b(e,t),F()}),P.onEntering)}),H.createElement(ov,jm({elevation:f,ref:j},O,{className:Dy(c.paper,O.className)}),u)))})),Jv=Eg({root:{},paper:{position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}},{name:"MuiPopover"})(Kv);function Zv(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function Qv({d:e,size:t,style:n={},viewBox:r="0 0 16 16"}){const i={fontSize:Zv(t),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",...n};return _.createElement("i",{style:i},_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:r,fill:"currentColor"},_.createElement("path",{d:e})))}const ex={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"},tx={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"},nx={d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"},rx={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"},ix={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"};function ox(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.",e.layout);let r=Zo.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 ax(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=re(!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}),ox(e,a,u)}))}const sx=(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 lx({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=sx(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?"H"!==e.qDim.qGrouping&&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){ax(r,e,t,"qDimensions",a)}}}function ux(e,t,n,r="/qHyperCubeDef"){return{breadcrumbs:e.qGroupFallbackTitles.slice(0,e.qGroupPos),drilldown:"H"===e.qGrouping,index:t,locked:!!e.qLocked,text:"H"===e.qGrouping?e.qGroupFallbackTitles[e.qGroupPos]:e.qFallbackTitle,popoverText:(i=e,"H"===i.qGrouping?i.title||"":i.qFallbackTitle||""),drillUp(e){n.drillUp(r,t,e)},id:e.cId};var i}function cx({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=sx(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){ax(i,e,t,"qMeasures",o,a)}}}function dx(e,t){return{breadcrumbs:[],drilldown:!1,index:t,locked:!1,text:e.qFallbackTitle,popoverText:e.qFallbackTitle,id:e.cId}}const mx={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"}}},hx=({children:e,...t})=>_.createElement(yv,Rm({size:"small",disableRipple:!0,disableTouchRipple:!0},t),e);function fx(e){function t({title:e,selected:t,onClick:n}){const r=Oe.detectTextDirection(e);return _.createElement(Bv,{role:"menuitem",button:!0,onClick:n,style:{textAlign:"start"}},_.createElement(jv,{style:{minWidth:32}},_.createElement(Qv,{d:t?nx.d:""})),_.createElement(Uv,{primaryTypographyProps:{dir:r}},e))}function n({alignTo:e,changeTo:n,current:r,dir:i,dock:o,list:a,onClose:s,show:l,instruction:u}){const c=a.map((e=>_.createElement(t,{key:e.id,title:e.title,onClick:()=>n(e.id)})));return _.createElement(Jv,Rm({anchorEl:e,open:l,onClose:s},mx[o],{PaperProps:{style:{minWidth:"250px",maxHeight:"300px"}}}),_.createElement(zv,{dense:!0,dir:i,"aria-label":u,component:"nav"},_.createElement(t,{title:r,selected:!0,onClick:s}),c))}t.propTypes={title:Pm.string.isRequired,selected:Pm.bool,onClick:Pm.func.isRequired},t.defaultProps={selected:!1},n.propTypes={alignTo:Pm.any,changeTo:Pm.func.isRequired,current:Pm.string.isRequired,dir:Pm.string.isRequired,dock:Pm.string.isRequired,list:Pm.array,onClose:Pm.func.isRequired,show:Pm.bool.isRequired,instruction:Pm.string.isRequired},n.defaultProps={list:[],alignTo:null};class r extends _.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=_.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()}openPopover(){this.state.closeTime&&Date.now()-this.state.closeTime<20||this.props.popover.getAlternatives().then((e=>{this.setState({open:!0,alternatives:e})}))}closePopover(){this.setState({open:!1,closeTime:Date.now()})}render(){const{titleData:e,popover:t,translator:r,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,m=i||this.state.inSelection,h=e.breadcrumbs.map(((t,n)=>_.createElement(hx,{style:{display:"flex",alignItems:"center",color:m&&"rgba(89, 89, 89, 0.8)",pointerEvents:m?"none":"auto",paddingTop:0,paddingBottom:0,height:"100%"},key:n,onClick:()=>m?void 0:e.drillUp(d-n),title:t},_.createElement("span",{style:c},t),_.createElement(Qv,Rm({},ix,{size:"small",style:{margin:"0 8px"}}))))),f=u?this.state.hasValidAlternatives:l,p=t&&!this.state.open?this.openPopover:this.closePopover,y=!t||i||this.state.inSelection,g={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&&(g.background="rgba(0,0,0,0.08)");a&&(g.padding=a),s&&(g.minWidth=s);const v=Oe.detectTextDirection(e.text),x=_.createElement(hx,{"aria-label":r.get("Accessibility.Alternative.Instructions",[e.text]),style:g,onClick:y?void 0:p,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()}},e.locked&&_.createElement(Qv,Rm({},tx,{size:"small",title:r.get("Tooltip.selections.locked")})),_.createElement("span",{style:c,dir:v},e.text),t&&f&&_.createElement(Qv,Rm({},rx,{size:"small",style:{margin:"0 8px"}})));return _.createElement(_.Fragment,null,e.drilldown&&_.createElement(Qv,Rm({},ex,{size:"small",title:r.get("Tooltip.dimensions.drilldown"),style:{margin:"0 4px 0 0"}})),h,_.createElement("div",{ref:this.alignToRef,style:{overflow:"hidden",pointerEvents:f?"auto":"none",height:"100%"}},x),t&&f&&_.createElement(n,{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:r.get("Accessibility.Popover.Instructions")}))}}function i(e){return{top:"bottom",bottom:"top",left:"right",right:"left"}[e]}function o(e){return!e.isDimension&&fe.getValue(e,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures.length")>0}return r.propTypes={disabled:Pm.bool.isRequired,padding:Pm.string,minWidth:Pm.string,titleData:Pm.shape({breadcrumbs:Pm.arrayOf(Pm.string).isRequired,drilldown:Pm.bool.isRequired,index:Pm.number.isRequired,locked:Pm.bool.isRequired,text:Pm.string.isRequired,popoverText:Pm.string.isRequired,drillUp:Pm.func,id:Pm.string.isRequired}).isRequired,popover:Pm.shape({dir:Pm.string.isRequired,dock:Pm.string.isRequired,changeTo:Pm.func.isRequired,getAlternatives:Pm.func.isRequired}),translator:Pm.shape({get:Pm.func.isRequired}).isRequired,selections:Pm.shape({isActive:Pm.func,addListener:Pm.func,removeListener:Pm.func}),style:Pm.shape({fontSize:Pm.string,color:Pm.string,fontFamily:Pm.string}).isRequired,isDimension:Pm.bool.isRequired,hasAlternative:Pm.bool.isRequired,supportConditional:Pm.bool.isRequired},r.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||o(this.settings.settings)?Math.max(28,t):Math.max(20,t)},render(){const{settings:{app:e,disabled:t,explicitItemInfos:n,hyperCube:a,hyperCubeDef:s,isDimension:l,minWidth:u,model:c,onChangeToAlternative:d,padding:m,rtl:h,selections:f,skipAttributeExpressions:p,translator:y,supportConditional:g=!1},layout:{dock:v}}=this.settings,x="top"!==v&&"bottom"!==v||!h?"ltr":"rtl",b=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}(v,this.rect),S=s&&s.qLayoutExclude&&s.qLayoutExclude.qHyperCubeDef,E=S&&S[l?"qDimensions":"qMeasures"]||[],M=n||a[l?"qDimensionInfo":"qMeasureInfo"],C=l?lx:cx,A=l?ux:dx,O=c&&c.colorSupport&&c.modifiers&&C({altList:E,app:e,dir:h?"rtl":"ltr",dock:i(v),model:c,onChange:d,skipAttributeExpressions:p,translator:y}),T=(N=this.settings.settings).isDimension&&fe.getValue(N,"hyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions.length")>0||o(this.settings.settings);var N;const w=M.map(((e,n)=>{const i="number"==typeof e.explicitColumn?e.explicitColumn:n,o=A(e,i,c),a=n===M.length-1;return _.createElement(_.Fragment,{key:e.cId},_.createElement(r,{popover:O,titleData:o,model:c,translator:y,selections:f,disabled:t(),style:this.style,isDimension:l,padding:m,minWidth:u,hasAlternative:T,supportConditional:g}),!a&&_.createElement("span",{style:{lineHeight:"normal",...this.style}},", "))}));return _.createElement("div",{style:b,dir:x},w)}}}const px=function(){return Th.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 yx=Rh({productionPrefix:"q2d4d",disableGlobal:!0,seed:""});function gx(){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",U.render(function(e,t){return _.createElement(Ry,{generateClassName:t},_.createElement(xg,{theme:px},e))}(e,yx),r),!0},itemsAt:()=>[],findShapes:()=>[],clear:()=>(r&&U.unmountComponentAtNode(r),o),destroy(){r&&r.parentElement&&(U.unmountComponentAtNode(r),r.parentElement.removeChild(r)),r=null},size:t=>(t&&(i=e(t)),i)};return o}}function vx(){return function(e){e.renderer("react",gx()),e.component("data-title",fx(e.renderer("svg")())),e.component("disclaimer",function(){class e extends _.Component{render(){const{label:e,spanStyle:t}=this.props;return _.createElement(_.Fragment,null,_.createElement("span",{ref:this.alignToRef,style:t,title:e},e))}}return e.propTypes={label:Pm.string.isRequired,spanStyle:Pm.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 _.createElement("div",{style:a,dir:o},_.createElement(_.Fragment,null,_.createElement(e,{label:s,spanStyle:l})))}}}())}}function xx(e,t,n,r){const i=function(t){const n=String(t);return e(n)};return i.ticks=()=>t.map((t=>{const o=i([t.data.value,r?n-1:0]),a=i([t.data.value,r?0:n-1])+e.bandwidth();return{position:(o+a)/2,label:t.label,data:t.data,start:o,end:a}})),i.bandwidth=()=>e.bandwidth(),i.data=()=>e.data(),i.domain=()=>e.domain(),i.pxScale=function(r){const i=e.pxScale(r);return i===e?this:xx(i,t,n)},i}function bx(e){const t=e.scale("band");e.scale("group-by-measure",(function(e={},n={},r={}){const i=t(e,n,r),o=i.domain(),a=i.ticks(),s=[],l=e.measureCount;return o.forEach(((e,t)=>{for(let t=0;t<l;++t)s.push(String([e,t]));s.push(`SPACER_${t}_SPACER`)})),s.splice(-1),i.domain(s),xx(i,a,l,e.invert)}))}const Sx={getDefaultSettings:({size:e=10,fill:t="#999",alignment:n}={})=>({show:!0,type:"n-polygon",fill:t,stroke:"#000",strokeWidth:0,size:e,sides:3,startAngle:-90,alignment:n}),createOob({oob:e,dockValue:t,boxCenter:n,rendWidth:r,rendHeight:i,flipXY:o,symbol:a}){let s="x",l="y",u=r,c=i,d=t<.5?90:-90;return o&&(s="y",l="x",u=i,c=r,d=t<.5?180:0),a(re({},e,{[s]:n*u,[l]:c-Math.max(e.size/2,Math.min(t*c,c-e.size/2)),startAngle:d}))}};function Ex({i:e,width:t,height:n,resolved:r,keys:i,flipXY:o,calcKey:a="box"}){let s,l=null,u=null;void 0!==r.major.settings.binStart?(l=r.major.items[e].binStart,u=r.major.items[e].binEnd,s=r.major.settings.binStart.scale):(s=r.major.settings.major.scale,l=s?r.major.items[e].major:0);let c=0;s?s.bandwidth?(c=s.bandwidth(),l-=c/2):c=u-l:c=1;const d=re({},{major:l,majorEnd:u},r.minor.items[e]);i.forEach((t=>{d[t]=r[t].items[e]}));const m=o?n:t,h=function({bandwidth:e,width:t,minWidthPx:n,maxWidthPx:r,maxMajorWidth:i}){const o=e>=0?1:-1;let a=Math.min(o*e*t,Number.isNaN(Number(r))?i:r/i);return a=Number.isNaN(Number(n))?a:Math.max(n/i,a),a*o}({bandwidth:c,width:d[a].width,minWidthPx:d[a].minWidthPx,maxWidthPx:d[a].maxWidthPx,maxMajorWidth:m}),f=(c-h)/2,p=f+d.major+h/2;return{item:d,boxCenter:p,boxWidth:h,boxPadding:f,rendWidth:t,rendHeight:n}}function Mx({keys:e,data:t,defaultSettings:n,style:r,settings:i,width:o,height:a,resolver:s}){const l=re(!0,{},n||{},r||{}),u={major:"horizontal"===i.orientation?a:o,minor:"horizontal"===i.orientation?o:a},c=i.major;let d;d="object"==typeof c&&"object"==typeof c.ref&&void 0!==c.ref.start&&void 0!==c.ref.end?s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:re(!0,{},{binStart:{scale:i.major.scale,ref:i.major.ref.start},binEnd:{scale:i.major.scale,ref:i.major.ref.end}})}):"object"==typeof c&&void 0!==c.binStart&&void 0!==c.binEnd?s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:re(!0,{},{binStart:{scale:i.major.scale,ref:"binStart"},binEnd:{scale:i.major.scale,ref:"binEnd"}},i.major)}):s.resolve({data:t,scaled:u,defaults:{major:.5},settings:{major:i.major}});const m=i.minor||{};let h;const f={major:d,minor:s.resolve({data:t,defaults:{start:0,end:1},scaled:u,settings:re(!0,{},{start:{scale:m.scale,ref:"start"},end:{scale:m.scale,ref:"end"},min:{scale:m.scale,ref:"min"},max:{scale:m.scale,ref:"max"},med:{scale:m.scale,ref:"med"}},m)})};for(let n=0,r=e.length;n<r;n++)h=e[n],f[h]=s.resolve({data:t,defaults:l[h],settings:i[h],scaled:u});return f}const Cx=["oob"];const Ax={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:10},data:{},style:{}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,{dockValue:n}=this.settings.settings,r="horizontal"===this.settings.settings.orientation,{data:i,style:o,resolver:a,symbol:s}=this,l=Mx({keys:Cx,data:i,defaultSettings:{oob:Sx.getDefaultSettings()},style:o,settings:this.settings.settings,width:e,height:t,resolver:a}),{settings:u,items:c}=l,d=function({width:e,height:t,flipXY:n,resolved:r,keys:i,symbol:o,dockValue:a,_calcItemRenderingOpts:s=Ex}){const l=[],{items:u}=r.major;for(let c=0,d=u.length;c<d;c++){const{item:d,boxCenter:m,rendWidth:h,rendHeight:f}=s({i:c,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"oob"}),p=u[c].data,y=[];if(d.oob.show){y.push(Sx.createOob({oob:d.oob,dockValue:a,boxCenter:m,rendWidth:h,rendHeight:f,flipXY:n,symbol:o}));const e={type:"container",data:p,collider:{type:"bounds"},children:y};l.push(e)}}return l}({items:c,settings:u,width:e,height:t,flipXY:r,resolved:l,keys:Cx,symbol:s,dockValue:n});return d}},Ox={size:25,hat:{show:!0,fill:"#999",stroke:"#000",strokeWidth:0,strokeLinejoin:"miter",width:1,maxWidthPx:void 0,minWidthPx:1,minHeightPx:1,alignment:0}},Tx=["hat"];function Nx(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 wx({item:e,boxWidth:t,boxPadding:n,rendWidth:r,rendHeight:i,flipXY:o}){let a="x",s="y",l=r,u=i,c=e.hat.alignment||0;o&&(a="y",s="x",l=i,u=r,c=1-c);const d=(n+e.major)*l;let m=[{[a]:d,[s]:0+u},{[a]:d+t*c*l,[s]:8},{[a]:d+t*l,[s]:0+u},{[a]:d+t*l,[s]:0+u+10},{[a]:d,[s]:0+u+10}];const h=re({},e.hat,{type:"path",d:Nx(m)});m=[{[a]:d,[s]:0},{[a]:d+t*(1-c)*l,[s]:0+u-8},{[a]:d+t*l,[s]:0},{[a]:d+t*l,[s]:-10},{[a]:d,[s]:-10}];return[h,re({},e.hat,{type:"path",d:Nx(m)})]}const Rx={require:["chart","resolver","symbol"],defaultSettings:{settings:{size:25},data:{},style:{hat:"$shape"}},created(){this.state={}},preferredSize(){return this.settings.settings.size},render(){const{width:e,height:t}=this.rect,n="horizontal"===this.settings.settings.orientation,{data:r,style:i,resolver:o}=this,a=Mx({keys:Tx,data:r,defaultSettings:Ox,style:i,settings:this.settings.settings,width:e,height:t,resolver:o}),{settings:s,items:l}=a,u=function({width:e,height:t,flipXY:n,resolved:r,keys:i,_calcItemRenderingOpts:o=Ex}){const a=[],{items:s}=r.major;for(let l=0,u=s.length;l<u;l++){const{item:u,boxWidth:c,boxPadding:d,rendWidth:m,rendHeight:h}=o({i:l,width:e,height:t,resolved:r,keys:i,flipXY:n,calcKey:"hat"}),f=s[l].data,p=[];u.hat.show&&p.push(...wx({item:u,boxWidth:c,boxPadding:d,rendWidth:m,rendHeight:h,flipXY:n}));const y={type:"container",data:f,collider:{type:"bounds"},children:p};a.push(y)}return a}({items:l,settings:s,width:e,height:t,flipXY:n,resolved:a,keys:Tx});return u}};var Ix={UNCLASSIFIED:"unclassified",EQUAL_EQUAL:"equal-equal",EQUAL_HIGHER:"equal-higher",EQUAL_LOWER:"equal-lower",EQUAL_VOID:"equal-void",HIGHER_EQUAL:"higher-equal",HIGHER_HIGHER_ACUTE:"higher-higher-acute",HIGHER_HIGHER_OBTUSE:"higher-higher-obtuse",HIGHER_LOWER_NEGATIVE:"higher-lower-negative",HIGHER_LOWER_POSITIVE:"higher-lower-positive",HIGHER_VOID:"higher-void",LOWER_EQUAL:"lower-equal",LOWER_HIGHER_NEGATIVE:"lower-higher-negative",LOWER_HIGHER_POSITIVE:"lower-higher-positive",LOWER_LOWER_ACUTE:"lower-lower-acute",LOWER_LOWER_OBTUSE:"lower-lower-obtuse",LOWER_VOID:"lower-void",VOID_EQUAL:"void-equal",VOID_HIGHER:"void-higher",VOID_LOWER:"void-lower",VOID_VOID:"void-void"};function kx(e,t){return Math.atan2(t.y-e.y,t.x-e.x)*(180/Math.PI)}function Lx(e,t,n){const r=Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),i=Math.sqrt((t.x-n.x)**2+(t.y-n.y)**2),o=Math.sqrt((n.x-e.x)**2+(n.y-e.y)**2);return Math.acos((i*i+r*r-o*o)/(2*i*r))*(180/Math.PI)}function Px({previous:e,current:t,next:n}){const r=e&&e.value,i=t&&t.value,o=n&&n.value;return e||n?e?n?r===i?i===o?Ix.EQUAL_EQUAL:i<o?Ix.EQUAL_HIGHER:Ix.EQUAL_LOWER:i===o?r>i?Ix.HIGHER_EQUAL:Ix.LOWER_EQUAL:r>i?i<o?Lx(e,t,n)>90?Ix.HIGHER_HIGHER_OBTUSE:Ix.HIGHER_HIGHER_ACUTE:kx(e,t)>kx(e,n)?Ix.HIGHER_LOWER_POSITIVE:Ix.HIGHER_LOWER_NEGATIVE:i>o?Lx(e,t,n)>90?Ix.LOWER_LOWER_OBTUSE:Ix.LOWER_LOWER_ACUTE:kx(e,t)>kx(e,n)?Ix.LOWER_HIGHER_POSITIVE:Ix.LOWER_HIGHER_NEGATIVE:r===i?Ix.EQUAL_VOID:r>i?Ix.HIGHER_VOID:Ix.LOWER_VOID:i===o?Ix.VOID_EQUAL:i<o?Ix.VOID_HIGHER:Ix.VOID_LOWER:Ix.VOID_VOID}function qx({bounds:e,size:t}){const{x:n,y:r,width:i,height:o}=e,{insideStrategy:a}=t;return"center"===a?Math.floor(n+i/2)>=0&&Math.ceil(n+i/2)<=t.width&&Math.floor(r+o/2)>=0&&Math.ceil(r+o/2)<=t.height:Math.floor(n+i)>0&&Math.ceil(n)<t.width&&Math.floor(r+o/2)>=0&&Math.ceil(r+o/2)<=t.height}const Dx={X:1,Y:0};function $x({node:e,line:t,groupIndex:n,extract:r,style:i,measureText:o,size:a,horizontal:s,rtl:l,meta:u,showLabel:c}){const d=r.label(e.data);if("string"!=typeof d&&"number"!=typeof d||""===d)return!1;const m=o({fontFamily:i.fontFamily,fontSize:i.fontSize,text:d}),{localBounds:h}=e,{"stroke-width":f}=e.attrs,p=r.pointValue(e.data),y={x:h.x+h.width/2,y:h.y+h.height/2,width:m.width+2*Dx.X,height:m.height+2*Dx.Y},g=`${y.x}-${y.y}`,v=!s&&!l,x=s?a.height:a.width,b=(s?y.y:y.x)/x,S=(v?1-b:b)<=(x<=200?.25:.1),E={key:g,node:e,line:t,group:n,value:p,labelMeasurements:m,bounds:y,inside:qx({bounds:h,size:a}),border:f?f/2:0,classification:Ix.UNCLASSIFIED,setClassification(e){E.classification=e},preferences:[],setPreferences(e){E.preferences.push(...e)},placement:void 0,setPlacement(e){E.placement=e},duplicate:!1,setDuplicate(){E.duplicate=!0},extreme:u.getExtreme(g),elite:S,show:c(e)};return E}function zx({nodes:e,extract:t,style:n,measureText:r,size:i,horizontal:o,rtl:a,showLabel:s}){const l=function({nodes:e}){const t={top:[],right:[],bottom:[],left:[]},n=e.map((e=>{const{localBounds:t}=e,n={x:t.x+t.width/2,y:t.y+t.height/2};return{key:`${n.x}-${n.y}`,center:n}})),r=n.reduce(((e,t)=>((!e.top||t.center.y<e.top.center.y)&&(e.top=t),(!e.right||t.center.x>e.right.center.x)&&(e.right=t),(!e.bottom||t.center.y>e.bottom.center.y)&&(e.bottom=t),(!e.left||t.center.x<e.left.center.x)&&(e.left=t),e)),{});return t.top=n.filter((e=>e.center.y===r.top.center.y)).map((e=>e.key)),t.right=n.filter((e=>e.center.x===r.right.center.x)).map((e=>e.key)),t.bottom=n.filter((e=>e.center.y===r.bottom.center.y)).map((e=>e.key)),t.left=n.filter((e=>e.center.x===r.left.center.x)).map((e=>e.key)),{getExtrema:e=>({top:-1!==t.top.indexOf(e),right:-1!==t.right.indexOf(e),bottom:-1!==t.bottom.indexOf(e),left:-1!==t.left.indexOf(e)}),getExtreme:e=>{const{top:n,right:r,bottom:i,left:o}=t;return[n,r,i,o].some((t=>-1!==t.indexOf(e)))}}}({nodes:e}),u=function({nodes:e,by:t,lineIndex:n}){const r=e.reduce(((e,r,i)=>{const o=t(r.data);return e[o]||(e[o]={items:[],index:i}),e[o].items.push({node:r,line:r.data[n].value}),e}),{});return Object.keys(r).map((e=>r[e])).sort(((e,t)=>e.index-t.index)).map((e=>e.items))}({nodes:e,by:t.majorValue,lineIndex:t.lineIndex}).map(((e,u)=>e.map((e=>({line:e.line,item:$x({node:e.node,line:e.line,groupIndex:u,extract:t,style:n,measureText:r,size:i,horizontal:o,rtl:a,meta:l,showLabel:s})}))).filter((e=>e.item)).reduce(((e,t)=>(e[t.line]=t.item,e)),{})));return u.filter((e=>Object.keys(e).length))}var _x={TOP:"top",TOP_RIGHT:"top-right",RIGHT:"right",BOTTOM_RIGHT:"bottom-right",BOTTOM:"bottom",BOTTOM_LEFT:"bottom-left",LEFT:"left",TOP_LEFT:"top-left"},Hx={[Ix.EQUAL_EQUAL]:[_x.TOP,_x.BOTTOM],[Ix.EQUAL_HIGHER]:[_x.BOTTOM,_x.BOTTOM_RIGHT],[Ix.EQUAL_LOWER]:[_x.TOP,_x.TOP_RIGHT],[Ix.EQUAL_VOID]:[_x.TOP,_x.BOTTOM],[Ix.HIGHER_EQUAL]:[_x.LEFT,_x.BOTTOM_LEFT,_x.TOP,_x.TOP_RIGHT],[Ix.HIGHER_HIGHER_ACUTE]:[_x.BOTTOM,_x.BOTTOM_LEFT,_x.LEFT,_x.TOP_RIGHT],[Ix.HIGHER_HIGHER_OBTUSE]:[_x.BOTTOM,_x.TOP],[Ix.HIGHER_LOWER_NEGATIVE]:[_x.TOP,_x.TOP_RIGHT,_x.RIGHT],[Ix.HIGHER_LOWER_POSITIVE]:[_x.BOTTOM,_x.BOTTOM_LEFT,_x.LEFT],[Ix.HIGHER_VOID]:[_x.TOP],[Ix.LOWER_EQUAL]:[_x.TOP],[Ix.LOWER_HIGHER_NEGATIVE]:[_x.TOP,_x.TOP_LEFT],[Ix.LOWER_HIGHER_POSITIVE]:[_x.BOTTOM_RIGHT],[Ix.LOWER_LOWER_ACUTE]:[_x.TOP,_x.TOP_LEFT,_x.LEFT,_x.TOP_RIGHT,_x.RIGHT],[Ix.LOWER_LOWER_OBTUSE]:[_x.TOP,_x.BOTTOM],[Ix.LOWER_VOID]:[_x.TOP],[Ix.VOID_EQUAL]:[_x.TOP],[Ix.VOID_HIGHER]:[_x.TOP,_x.BOTTOM],[Ix.VOID_LOWER]:[_x.TOP,_x.BOTTOM,_x.LEFT],[Ix.VOID_VOID]:[_x.TOP]};function Bx({nodes:e,extract:t,style:n,measureText:r,size:i,horizontal:o,rtl:a,showLabel:s}){const l=zx({nodes:e,extract:t,style:n,measureText:r,size:i,horizontal:o,rtl:a,showLabel:s}),u=[...l.reduce(((e,t)=>(e.push(...Object.keys(t).map((e=>t[e]))),e)),[])],[c]=u,d=function({groups:e,threshold:t}){const n=e.map((e=>Object.keys(e).map((t=>e[t])))),r={};for(let e=0;e<=n.length;e++){const t=n[e];if(t)for(let e=0;e<t.length;e++){const n=t[e],{line:i}=n;r[i]||(r[i]=[]),r[i].push(n.bounds)}}const i=Object.keys(r).map((e=>r[e])),o=[];for(let e=0;e<i.length;e++)for(let n=0;n<i[e].length-1;n++){const r=i[e][n],a=i[e][n+1],s={x1:r.x,y1:r.y,x2:a.x,y2:a.y},l=s.x1-s.x2,u=s.y1-s.y2;Math.sqrt(l*l+u*u)>t&&o.push(s)}return o}({groups:l,threshold:c.node.localBounds.height}),m={getItems:()=>u,getLines:()=>d};return function({groups:e}){for(let t=0;t<e.length;t++){const n=Object.keys(e[t]).map((n=>e[t][n]));for(let r=0;r<n.length;r++){const i=n[r],o=Px({previous:e[t-1]&&e[t-1][i.line],current:i,next:e[t+1]&&e[t+1][i.line]});i.setClassification(o)}}}({groups:l}),m.getItems().forEach((e=>e.setPreferences(Hx[e.classification]))),m}function Fx({item:e,placement:t,size:n}){return t.x>=0-n.edgeBleed.left&&t.x<=n.width-e.bounds.width+n.edgeBleed.right&&t.y>=0-n.edgeBleed.top&&t.y<=n.height-e.bounds.height}function jx({line1:e,line2:t}){const n=(t.y2-t.y1)*(e.x2-e.x1)-(t.x2-t.x1)*(e.y2-e.y1);if(0===n)return!1;const r=((t.x2-t.x1)*(e.y1-t.y1)-(t.y2-t.y1)*(e.x1-t.x1))/n,i=((e.x2-e.x1)*(e.y1-t.y1)-(e.y2-e.y1)*(e.x1-t.x1))/n;return r>=0&&r<=1&&i>=0&&i<=1}function Vx({candidate:e,lines:t,rects:n}){return!!n.some((t=>function({rect1:e,rect2:t}){return!(t.x>e.x+e.width||t.x+t.width<e.x||t.y>e.y+e.height||t.y+t.height<e.y)}({rect1:t,rect2:e})))||t.some((t=>function({line:e,rect:t}){const n={x:t.x,y:t.y},r={x:t.x+t.width,y:t.y},i={x:t.x+t.width,y:t.y+t.height},o={x:t.x,y:t.y+t.height},a={x1:r.x,y1:r.y,x2:i.x,y2:i.y},s={x1:i.x,y1:i.y,x2:o.x,y2:o.y},l={x1:o.x,y1:o.y,x2:n.x,y2:n.y};return jx({line1:e,line2:{x1:n.x,y1:n.y,x2:r.x,y2:r.y}})||jx({line1:e,line2:a})||jx({line1:e,line2:s})||jx({line1:e,line2:l})}({line:t,rect:e})))}const Ux={x:0,width:0,y:0,height:0};const Yx=({item:e})=>({x:e.bounds.x-e.bounds.width/2,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border}),Wx=({item:e})=>({x:e.bounds.x,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border}),Xx=({item:e})=>({x:e.bounds.x+e.node.localBounds.width/2+e.border,y:e.bounds.y-e.bounds.height/2}),Gx=({item:e})=>({x:e.bounds.x,y:e.bounds.y+e.node.localBounds.height/2+e.border}),Kx=({item:e})=>({x:e.bounds.x-e.bounds.width/2,y:e.bounds.y+e.node.localBounds.height/2+e.border}),Jx=({item:e})=>({x:e.bounds.x-e.bounds.width,y:e.bounds.y+e.node.localBounds.height/2+e.border}),Zx=({item:e})=>({x:e.bounds.x-e.bounds.width-e.node.localBounds.width/2-e.border,y:e.bounds.y-e.bounds.height/2}),Qx=({item:e})=>({x:e.bounds.x-e.bounds.width,y:e.bounds.y-e.bounds.height-e.node.localBounds.height/2-e.border});var eb={X:2.5,Y:4};const tb=[_x.TOP,_x.TOP_LEFT,_x.TOP_RIGHT],nb=[_x.BOTTOM,_x.BOTTOM_LEFT,_x.BOTTOM_RIGHT];function rb({position:e}){const t={x:eb.X,width:-2*eb.X,y:0,height:0},n=tb.indexOf(e)>-1,r=nb.indexOf(e)>-1;return n&&(t.y=eb.Y,t.height=-eb.Y),r&&(t.height=-eb.Y),t}function ib({cx:e,cy:t,r:n,degrees:r}){const i=r*(Math.PI/180);return{x:Math.round(e+n*Math.sin(i)),y:Math.round(t+n*-Math.cos(i))}}function ob({coordinates:e,degrees:t,item:n}){const r={x:e.x,y:e.y};return t<=90?r.y-=n.bounds.height:t>180&&t<=270?r.x-=n.bounds.width:t>270&&(r.y-=n.bounds.height,r.x-=n.bounds.width),r}const ab=15;function sb({item:e,validator:t,force:n=!1}){const r=function({item:e}){return[e.node.localBounds.height/2*Math.sqrt(2)]}({item:e}),i=e.bounds.x,o=e.bounds.y;for(let a=0;a<r.length;a++){const s=r[a];for(let r=40;r<=180;r+=ab){const a=ob({coordinates:ib({cx:i,cy:o,r:s,degrees:r}),degrees:r,item:e});if(t({item:e,placement:a,ignoreLines:n}).valid)return a}for(let r=320;r>180;r-=ab){const a=ob({coordinates:ib({cx:i,cy:o,r:s,degrees:r}),degrees:r,item:e});if(t({item:e,placement:a,ignoreLines:n}).valid)return a}}return!1}const lb=void 0;function ub({item:e,validator:t,force:n=!1}){const r=[...e.preferences,...Object.keys(_x).map((e=>_x[e])).filter((t=>-1===e.preferences.indexOf(t)))],i={[_x.TOP]:Yx,[_x.TOP_RIGHT]:Wx,[_x.RIGHT]:Xx,[_x.BOTTOM_RIGHT]:Gx,[_x.BOTTOM]:Kx,[_x.BOTTOM_LEFT]:Jx,[_x.LEFT]:Zx,[_x.TOP_LEFT]:Qx},o=[];for(let a=0;a<r.length;a++){const s=r[a],l=i[s]({item:e}),u=rb({position:s}),c=t({item:e,placement:l,adjustment:u,ignoreLines:n});if(n&&c.inside&&o.push(l),c.valid)return l}const a=()=>sb({item:e,validator:t,force:n});if(n){const e=a();return e||(o[0]||lb)}return(e.extreme||e.elite)&&a()||lb}function cb({model:e,size:t,all:n}){const r={},i=e.getItems(),o=[...i.map((e=>({x:e.node.localBounds.x-e.border+1,y:e.node.localBounds.y-e.border+1,height:e.node.localBounds.height+2*e.border-2,width:e.node.localBounds.width+2*e.border-2})))],a=[],s=e.getLines();i.forEach((e=>{const{data:i}=e.node;if(!e.show||!e.inside||i.null&&i.null.value||i.interpolated&&i.interpolated.value)return;const{key:l}=e;if(r[l])return void e.setDuplicate();r[l]=!0;const u=function({size:e,lines:t,placements:n}){return function({item:r,placement:i,adjustment:o=Ux,ignoreLines:a=!1}){const s={inside:Fx({item:r,placement:i,size:e}),collides:!0,valid:!1};return s.inside?(s.collides=Vx({candidate:{x:i.x+o.x,y:i.y+o.y,width:r.bounds.width+o.width,height:r.bounds.height+o.height},lines:a?[]:t,rects:n}),s.valid=!s.collides,s):s}}({size:t,lines:s,placements:o}),c=ub({item:e,validator:u});c?(c.height=e.bounds.height,c.width=e.bounds.width,o.push(c),e.setPlacement(c)):n&&a.push({item:e,validator:u})})),a.forEach((e=>{const{item:t,validator:n}=e,r=ub({item:t,validator:n,force:!0});r&&(r.height=t.bounds.height,r.width=t.bounds.width,o.push(r),t.setPlacement(r))}))}var db={require:["chart","renderer"],defaultSettings:{settings:{orientation:"horizontal",rtl:!1,connect:!1,all:!1,label:()=>{},showLabel:()=>!0,pointValue:()=>{},majorValue:()=>{},target:{point:"point-component",allPoints:[]},lineIndex:"line",insideStrategy:"edge",labelSpace:{use:()=>!1,size:10}},style:{fontFamily:'"Source Sans Pro", "Arial", "sans-serif"',fontSize:"12px",fill:"#333"}},preferredSize(){const e={edgeBleed:{top:0,right:0,left:0}},{orientation:t,rtl:n,labelSpace:r}=this.settings.settings,{use:i,size:o}=r;if(i()){const r="horizontal"===t;e.edgeBleed.top=r?o:0,e.edgeBleed[n?"left":"right"]=r?0:o}return e},render(){const{settings:e}=this.settings,{target:t,enabled:n}=e;if(!this.chart.component(t.point))return[];if("function"==typeof n&&!n())return[];const{allPoints:r}=t,i=r.length?e=>r.includes(e.key):e=>e.key===t.point,o=this.chart.findShapes("circle").filter(i);if(!o.length)return[];const a="horizontal"===e.orientation,s=a?"x":"y";o.sort(((e,t)=>e.localBounds[s]-t.localBounds[s]));const l={label:e.label,pointValue:e.pointValue,majorValue:e.majorValue,lineIndex:e.lineIndex},{height:u,width:c,edgeBleed:d}=this.rect,m={height:u,width:c,edgeBleed:d,insideStrategy:e.insideStrategy},{style:h}=this,f=Bx({nodes:o,extract:l,style:h,measureText:this.renderer.measureText,size:m,horizontal:a,rtl:e.rtl,showLabel:e.showLabel});return function({model:e}){e.getItems().sort(((e,t)=>e.extreme===t.extreme?0:e.extreme&&!t.extreme?-1:1))}({model:f}),cb({model:f,size:m,all:e.all}),f.getItems().filter((e=>e.placement&&e.node.key===this.settings.settings.target.point)).map((e=>({type:"text",x:e.placement.x+e.placement.width/2,y:e.placement.y+e.labelMeasurements.height/2,fontSize:h.fontSize,fontFamily:h.fontFamily,fill:h.fill,text:l.label(e.node.data),data:e.node.data.value,baseline:"central",anchor:"middle"})))}},mb={defaultSettings:{settings:{size:10}},preferredSize(){return this.settings.settings.size},render:()=>[]};var hb={require:["resolver","symbol"],defaultSettings:{settings:{type:"max",primaryExtremum:()=>{},secondaryExtremum:()=>{},primarySeries:[],secondarySeries:[],orientation:"horizontal",rtl:!1,major:{scale:"major-scale"},markerOffset:1,size:10},style:{fill:"#999"}},preferredSize(){return this.settings.settings.size},render(){const{items:e=[]}=this.data;if(!e.length)return[];const{type:t,orientation:n,rtl:r,markerOffset:i,size:o,major:a,primarySeries:s,secondarySeries:l}=this.settings.settings,u=this.settings.settings.primaryExtremum(),c=this.settings.settings.secondaryExtremum(),d=s.length&&void 0!==u,m=l.length&&void 0!==c;if(!d&&!m)return[];const h=s.map((e=>e.ref)),f=l.map((e=>e.ref)),p=function({type:e,primaryExtremum:t,secondaryExtremum:n,primaryItems:r=[],secondaryItems:i=[],primarySeries:o=[],secondarySeries:a=[]}){const s=[];[...o,...a].forEach((o=>{const a=o.isPrimary?t:n,l=o.isPrimary?r:i;s.push((({type:e,extremum:t,separateStacking:n,items:r})=>{const i="max"===e?e=>e>t:e=>e<t,o=n?e=>i(e.point.value<0?e.start.value:e.end.value):e=>i(e.end.value);return r.filter(o)})({type:e,extremum:a,items:l}))}));const l=(({items:e})=>{const t=[],n=[];return e.forEach((e=>{const{value:r}=e.major;t[r]||(t[r]=!0,n.push(e))})),n})({items:s.reduce(((e,t)=>e.concat(t)),[])});return l}({type:t,primaryExtremum:u,secondaryExtremum:c,primaryItems:e.filter((e=>h.includes(e.end.source.field))),secondaryItems:e.filter((e=>f.includes(e.end.source.field))),primarySeries:s,secondarySeries:l});if(!p.length)return[];const y="horizontal"===n,g=this.rect[y?"width":"height"],v=this.resolver.resolve({data:{items:p},settings:{major:a},scaled:{major:g}}),x=("max"===t?90:-90)-(y?0:90)-(!y&&r?180:0),b=o/2*i,{fill:S}=this.settings.style,E=v.items.map((e=>function({symbol:e,size:t,fill:n,startAngle:r,x:i,y:o,data:a}){return e({type:"n-polygon",show:!0,size:t,fill:n,stroke:"#205891",strokeWidth:0,sides:3,startAngle:r,width:.7,x:i,y:o,data:a})}({symbol:this.symbol,size:o,fill:S,startAngle:x,x:y?g*e.major:b,y:y?b:g*e.major,data:e.data})));return E}};function fb({x:e,y:t,size:n,stroke:r,strokeWidth:i,fill:o}){return{type:"container",children:[{type:"line",stroke:r||o,strokeWidth:i,x1:e-n/2,y1:t,x2:e+n/2,y2:t},{type:"circle",strokeWidth:0,fill:o,cx:e,cy:t,r:.25*n}]}}function pb({chart:e,seriesInfo:t}){const n={primary:{paths:[],map:{}},secondary:{paths:[],map:{}}},r=[...t.primary.map((e=>e.key)),...t.secondary.map((e=>e.key))],i=e.findShapes("path").filter((e=>r.some((t=>t===e.key))));return i.reduce(((e,n)=>((t.primary.some((e=>e.key===n.key))?e.primary:e.secondary).paths.push(n),e)),n),{getLine:(e,t)=>{const r=t?n.primary:n.secondary;if(!r.map[e]){const[t]=r.paths.filter((t=>t.data&&t.data.typeIndex.value===e));r.map[e]=t}return r.map[e]}}}function yb({brush:e}){const t=e.brush.values();return function({value:e}){return-1!==t.indexOf(e)}}function gb({brush:e,chart:t}){const n=e.brush.ranges();if(!n.length)return!1;const r=t&&t.scale(is.SCALE.MAJOR),i=r&&r.max&&r.max(),o="qHyperCube/qDimensionInfo/0:numeric"===e.id?(e,t)=>t===i?e<=t:e<t:(e,t)=>e<=t;return function({value:e}){return n.some((t=>t.min<=e&&o(e,t.max)))}}function vb({brush:e,selectionInfo:t,items:n,selectionValues:r,colorByData:i,chart:o}){const a=e.brushes();if(!a.length)return[];const s=a[0],{minorRange:l,legendRange:u,legendTap:c}=t,d=0===s.id.indexOf("qHyperCube/qMeasureInfo/")?"qHyperCube/qMeasureInfo/X":s.id;let m=[u?e=>e.color.value:r[d]].filter(Boolean);if(i&&l&&m.push((e=>e.color.value)),!i&&c&&(m=[e=>e.color.value]),!m.length)return[];const h=function({brush:e,chart:t}){return("value"===e.type?yb:gb)({brush:e,chart:t})}({brush:s,chart:o});return h?n.reduce(((e,t,n)=>(m.some((e=>h({value:e(t)})))&&e.push({item:t,index:n}),e)),[]):[]}function xb({chart:e,selected:t,connection:n,gradient:r,fallback:i}){const o=e.scale(is.SCALE.COLOR),a=t.filter((e=>-1!==n.indexOf(e.index))).map((e=>e.item.end.value)),s=Math.min(...a),l=Math.max(...a),u=l-s,c=0===u?1:u,d=o.domain().map((e=>({color:o(Math.min(l,Math.max(s,e)))||i,offset:Math.min(1,Math.max(0,(e-s)/c))}))),m=d.map((e=>e.offset)),h=m.lastIndexOf(0),f=m.indexOf(1),p=d.slice(-1===h?0:h,-1===f?d.length:f+1);return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:p}}function bb({chart:e,selected:t,connection:n,gradient:r,fallback:i}){const o=e.scale(is.SCALE.COLOR),a=t.filter((e=>-1!==n.indexOf(e.index))).map((e=>e.item.end.value)),s=Math.min(...a),l=Math.max(...a)-s,u=0===l?1:l,c=o.domain(),d=[];for(let e=0;e<c.length-1;e++){const t=c[e],n=o(t)||i;d.push({color:n,offset:Math.min(1,Math.max(0,(t-s)/u))});const r=c[e+1];d.push({color:n,offset:Math.min(1,Math.max(0,(r-s)/u))})}const m=d.map((e=>e.offset)),h=m.lastIndexOf(0),f=m.indexOf(1),p=d.slice(-1===h?0:h,-1===f?d.length:f+1);return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:p}}function Sb({property:e,chart:t,connection:n,attrs:r,colorSettings:i,colorByData:o,selected:a,hasMultipleMeasures:s,groupedByMeasure:l,itemsPerGroup:u,orientation:c,rtl:d}){const m=r[e];if("gradient"!==m.type)return m;const{type:h,nil:f}=i;if(s||!o)return function({chart:e,selected:t,connection:n,gradient:r,fallback:i,orientation:o,isColorCode:a,groupedByMeasure:s,itemsPerGroup:l,rtl:u}){const c=e.scale(is.SCALE.MAJOR),d=e.scale(is.SCALE.COLOR),m=s?e=>c([e,0])+c.bandwidth()*l/2:e=>c(e),h=t.filter((e=>-1!==n.indexOf(e.index))),f=("vertical"===o&&u?h.reverse():h).map((e=>e.item)),p=f.map((e=>m(e.major.value))),y=Math.min(...p),g=Math.max(...p)-y,v=0===g?1:g,x=p.map(((e,t)=>0===t?0:t===p.length-1?1:(e-y)/v)),b=[];for(let e=0;e<f.length;e++){const t=f[e],n=a?t.color.value:d(t.color.value)||i,r=x[e];b.push({color:n,offset:0===e?0:Math.max(0,b[b.length-1].offset)}),b.push({color:n,offset:e===f.length-1?1:Math.max(0,parseFloat((r+(x[e+1]-r)/2).toFixed(5)))})}return{type:"gradient",x1:r.x1,x2:r.x2,y1:r.y1,y2:r.y2,stops:b}}({chart:t,selected:a,connection:n,gradient:m,fallback:f,orientation:c,isColorCode:"color"===h,groupedByMeasure:l,itemsPerGroup:u,rtl:d});return("continuous"===h?xb:bb)({chart:t,selected:a,connection:n,gradient:m,fallback:f})}function Eb({chart:e,pathModel:t,colorSettings:n,colorByData:r,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,lineKey:l,primary:u,selected:c,connections:d,rtl:m,count:h}){const f=t.getLine(l,u),{attrs:p}=f,y=function({d:e}){return e.replace("Z","").split(/(?=[LMC])/).map((e=>{const t=e.substring(0,1),n={letter:t,x:0,y:0,raw:e},r=e.substring(1).split(",");return"M"===t||"L"===t?([n.x]=r,[,n.y]=r):"C"===t&&([,,,,n.x]=r,[,,,,,n.y]=r),n}))}({d:p.d});return d.map((t=>function({chart:e,colorSettings:t,colorByData:n,hasMultipleMeasures:r,groupedByMeasure:i,itemsPerGroup:o,orientation:a,selected:s,connection:l,commands:u,attrs:c,rtl:d,count:m}){return{path:l.map(((e,t)=>{const n=u[e];return 0!==t||"M"===n.letter?n.raw:`M${n.x},${n.y}`})).join(""),attrs:c,stroke:Sb({property:"stroke",chart:e,connection:l,attrs:c,selected:s,colorSettings:t,colorByData:n,hasMultipleMeasures:r,groupedByMeasure:i,itemsPerGroup:o,orientation:a,rtl:d,count:m})}}({chart:e,colorSettings:n,colorByData:r,hasMultipleMeasures:i,groupedByMeasure:o,itemsPerGroup:a,orientation:s,selected:c,connection:t,commands:y,attrs:p,rtl:m,count:h})))}function Mb({chart:e,pathModel:t,seriesInfo:n,brush:r,selectionInfo:i,items:o,selectionValues:a,colorSettings:s,colorByData:l,hasMultipleMeasures:u,groupedByMeasure:c,itemsPerGroup:d,orientation:m,rtl:h}){const f=function({items:e,selectionInfo:t,seriesInfo:n}){return e.filter((e=>{if("NaN"===e.end.value||Number.isNaN(e.end.value))return!1;const{minorRange:r,minorRangePrimary:i}=t;return!r||(i?n.primary:n.secondary).some((t=>t.typeIndex===e.typeIndex.value))}))}({items:o,selectionInfo:i,seriesInfo:n}),p=function({items:e,seriesInfo:t}){const n=e.reduce(((e,n,r)=>{const i=n.typeIndex.value;var o;return e[i]||(e[i]={key:i,items:[],index:r,measureIx:null===(o=n.colorMeasureIdx)||void 0===o?void 0:o.value,primary:t.primary.some((e=>e.typeIndex===i))}),e[i].items.push(n),e}),{});return Object.keys(n).map((e=>n[e])).sort(((e,t)=>e.index-t.index)).map((e=>({lineKey:e.key,items:e.items,primary:e.primary,measureIx:e.measureIx})))}({items:f,seriesInfo:n}),{lines:y}=p.reduce(((n,o)=>{const f=vb({brush:r,selectionInfo:i,items:o.items,selectionValues:a,colorByData:l,chart:e});if(f.length<2)return n;const p=function({selected:e}){return e.reduce(((e,t)=>{const{index:n}=t;if(e.length){const t=e[e.length-1];n===t[t.length-1]+1?t.push(n):e.push([n])}else e.push([n]);return e}),[]).filter((e=>e.length>1))}({selected:f});return p.length?(n.lines.push(...Eb({chart:e,pathModel:t,colorSettings:s(o.measureIx),colorByData:l(o.measureIx),hasMultipleMeasures:u,groupedByMeasure:c,itemsPerGroup:d,orientation:m,lineKey:o.lineKey,primary:o.primary,selected:f,connections:p,rtl:h,count:o.items.length})),n):n}),{lines:[]}),g=[];return y.forEach((e=>g.push({type:"path",d:e.path,stroke:e.stroke,strokeLinejoin:e.attrs["stroke-linejoin"],strokeWidth:e.attrs["stroke-width"],strokeDasharray:e.attrs["stroke-dasharray"],fill:"none"}))),g}var Cb={require:["chart","renderer"],defaultSettings:{settings:{seriesInfo:{primary:[],secondary:[]},selectionValues:{},colorSettings:void 0,colorByData:!1,isColorCode:!1,hasMultipleMeasures:!1,groupedByMeasure:!1,itemsPerGroup:1,orientation:"vertical",rtl:!1}},addListener(e,t){this.state.brush.addListener(e,t),this.state.listeners.push({type:e,fn:t})},removeListeners(){this.state.listeners.forEach((e=>this.state.brush.removeListener(e.type,e.fn))),this.state.listeners.length=0},created(){this.state={pathModel:pb({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),brush:this.chart.brush("selection"),listeners:[],selectionInfo:{minorRange:!1,minorRangePrimary:!1,legendRange:!1,legendTap:!1}}},mounted(){this.addListener("update",(()=>{this.state.selectionInfo=this.settings.settings.getSelectionInfo();const e=Mb({chart:this.chart,pathModel:this.state.pathModel,seriesInfo:this.settings.settings.seriesInfo,brush:this.state.brush,selectionInfo:this.state.selectionInfo,items:this.data.items,selectionValues:this.settings.settings.selectionValues,colorSettings:this.settings.settings.colorSettings,colorByData:this.settings.settings.colorByData,isColorCode:this.settings.settings.isColorCode,hasMultipleMeasures:this.settings.settings.hasMultipleMeasures,groupedByMeasure:this.settings.settings.groupedByMeasure,itemsPerGroup:this.settings.settings.itemsPerGroup,orientation:this.settings.settings.orientation,rtl:this.settings.settings.rtl});this.renderer.render(e)})),this.addListener("end",(()=>{this.renderer.render([])}))},render(){this.state.pathModel=pb({chart:this.chart,seriesInfo:this.settings.settings.seriesInfo}),this.state.selectionInfo=this.settings.settings.getSelectionInfo();return Mb({chart:this.chart,pathModel:this.state.pathModel,seriesInfo:this.settings.settings.seriesInfo,brush:this.state.brush,selectionInfo:this.state.selectionInfo,items:this.data.items,selectionValues:this.settings.settings.selectionValues,colorSettings:this.settings.settings.colorSettings,colorByData:this.settings.settings.colorByData,isColorCode:this.settings.settings.isColorCode,hasMultipleMeasures:this.settings.settings.hasMultipleMeasures,groupedByMeasure:this.settings.settings.groupedByMeasure,itemsPerGroup:this.settings.settings.itemsPerGroup,orientation:this.settings.settings.orientation,rtl:this.settings.settings.rtl})},destroyed(){this.removeListeners()}};const Ab=()=>{const e=$();return e.use(z),e.use(function(e){if("function"!=typeof e.interaction)return t=>{t.interaction("hammer",wm(e))};e.interaction("hammer",wm(Hammer))}(D)),e.use(bx),e.use(vx()),e.component("scrollbar",hl),e.component("point-label",db),e.component("label-space",mb),e.component("time-axis",tm.picassoComponents.timeAxis),e.component("axis-overlay",tm.picassoComponents.axisOverlay),e.component("reference-line-labels",ja),e.component("box-sliced-hat",Rx),e.component("box-out-of-bounds",Ax),e.component("data-out-of-bounds-marker",hb),e.component("scroll-hint",Uo),e.component("brush-highlighter",Cb),e.scale("time",tm.picassoScales.time),e.symbol("line-point",fb),e};const Ob={line:"bar",circle:"circle",diamond:"diamond",triangle:"triangle",rect:"square"},Tb=e=>void 0===e.marker?Ob.circle:Ob[e.marker],Nb=e=>void 0===e.markerFill||e.markerFill;function wb({series:e,layoutService:t}){switch(bc(e)){case os.TYPE.MARKER:return(e=>({marker:Tb(e),fill:Nb(e)}))(e);case os.TYPE.LINE:return(e=>{const t=e.getLayoutValue("nullMode","gap");return{showAsGaps:"gap"===t,showAsConnections:"connect"===t,showAsZeros:"zero"===t}})(t);default:return{}}}function Rb(e=os.NOPE_SERIES,t){return t?e.axis===os.AXIS.PRIMARY:e.axis===os.AXIS.PRIMARY||bc(e)===os.TYPE.BAR}var Ib={exports:{}};var kb={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,MAX_SAFE_COMPONENT_LENGTH:16};const Lb="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Pb=Lb;!function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n}=kb,r=Pb,i=(t=e.exports={}).re=[],o=t.src=[],a=t.t={};let s=0;const l=(e,t,n)=>{const l=s++;r(l,t),a[e]=l,o[l]=t,i[l]=new RegExp(t,n?"g":void 0)};l("NUMERICIDENTIFIER","0|[1-9]\\d*"),l("NUMERICIDENTIFIERLOOSE","[0-9]+"),l("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),l("MAINVERSION",`(${o[a.NUMERICIDENTIFIER]})\\.(${o[a.NUMERICIDENTIFIER]})\\.(${o[a.NUMERICIDENTIFIER]})`),l("MAINVERSIONLOOSE",`(${o[a.NUMERICIDENTIFIERLOOSE]})\\.(${o[a.NUMERICIDENTIFIERLOOSE]})\\.(${o[a.NUMERICIDENTIFIERLOOSE]})`),l("PRERELEASEIDENTIFIER",`(?:${o[a.NUMERICIDENTIFIER]}|${o[a.NONNUMERICIDENTIFIER]})`),l("PRERELEASEIDENTIFIERLOOSE",`(?:${o[a.NUMERICIDENTIFIERLOOSE]}|${o[a.NONNUMERICIDENTIFIER]})`),l("PRERELEASE",`(?:-(${o[a.PRERELEASEIDENTIFIER]}(?:\\.${o[a.PRERELEASEIDENTIFIER]})*))`),l("PRERELEASELOOSE",`(?:-?(${o[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${o[a.PRERELEASEIDENTIFIERLOOSE]})*))`),l("BUILDIDENTIFIER","[0-9A-Za-z-]+"),l("BUILD",`(?:\\+(${o[a.BUILDIDENTIFIER]}(?:\\.${o[a.BUILDIDENTIFIER]})*))`),l("FULLPLAIN",`v?${o[a.MAINVERSION]}${o[a.PRERELEASE]}?${o[a.BUILD]}?`),l("FULL",`^${o[a.FULLPLAIN]}$`),l("LOOSEPLAIN",`[v=\\s]*${o[a.MAINVERSIONLOOSE]}${o[a.PRERELEASELOOSE]}?${o[a.BUILD]}?`),l("LOOSE",`^${o[a.LOOSEPLAIN]}$`),l("GTLT","((?:<|>)?=?)"),l("XRANGEIDENTIFIERLOOSE",`${o[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),l("XRANGEIDENTIFIER",`${o[a.NUMERICIDENTIFIER]}|x|X|\\*`),l("XRANGEPLAIN",`[v=\\s]*(${o[a.XRANGEIDENTIFIER]})(?:\\.(${o[a.XRANGEIDENTIFIER]})(?:\\.(${o[a.XRANGEIDENTIFIER]})(?:${o[a.PRERELEASE]})?${o[a.BUILD]}?)?)?`),l("XRANGEPLAINLOOSE",`[v=\\s]*(${o[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${o[a.XRANGEIDENTIFIERLOOSE]})(?:${o[a.PRERELEASELOOSE]})?${o[a.BUILD]}?)?)?`),l("XRANGE",`^${o[a.GTLT]}\\s*${o[a.XRANGEPLAIN]}$`),l("XRANGELOOSE",`^${o[a.GTLT]}\\s*${o[a.XRANGEPLAINLOOSE]}$`),l("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),l("COERCERTL",o[a.COERCE],!0),l("LONETILDE","(?:~>?)"),l("TILDETRIM",`(\\s*)${o[a.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",l("TILDE",`^${o[a.LONETILDE]}${o[a.XRANGEPLAIN]}$`),l("TILDELOOSE",`^${o[a.LONETILDE]}${o[a.XRANGEPLAINLOOSE]}$`),l("LONECARET","(?:\\^)"),l("CARETTRIM",`(\\s*)${o[a.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",l("CARET",`^${o[a.LONECARET]}${o[a.XRANGEPLAIN]}$`),l("CARETLOOSE",`^${o[a.LONECARET]}${o[a.XRANGEPLAINLOOSE]}$`),l("COMPARATORLOOSE",`^${o[a.GTLT]}\\s*(${o[a.LOOSEPLAIN]})$|^$`),l("COMPARATOR",`^${o[a.GTLT]}\\s*(${o[a.FULLPLAIN]})$|^$`),l("COMPARATORTRIM",`(\\s*)${o[a.GTLT]}\\s*(${o[a.LOOSEPLAIN]}|${o[a.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",l("HYPHENRANGE",`^\\s*(${o[a.XRANGEPLAIN]})\\s+-\\s+(${o[a.XRANGEPLAIN]})\\s*$`),l("HYPHENRANGELOOSE",`^\\s*(${o[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${o[a.XRANGEPLAINLOOSE]})\\s*$`),l("STAR","(<|>)?=?\\s*\\*"),l("GTE0","^\\s*>=\\s*0.0.0\\s*$"),l("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")}(Ib,Ib.exports);var qb=Ib.exports;const Db=["includePrerelease","loose","rtl"];var $b=e=>e?"object"!=typeof e?{loose:!0}:Db.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{};const zb=/^[0-9]+$/,_b=(e,t)=>{const n=zb.test(e),r=zb.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1};var Hb={compareIdentifiers:_b,rcompareIdentifiers:(e,t)=>_b(t,e)};const Bb=Pb,{MAX_LENGTH:Fb,MAX_SAFE_INTEGER:jb}=kb,{re:Vb,t:Ub}=qb,Yb=$b,{compareIdentifiers:Wb}=Hb;var Xb=class e{constructor(t,n){if(n=Yb(n),t instanceof e){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if("string"!=typeof t)throw new TypeError(`Invalid Version: ${t}`);if(t.length>Fb)throw new TypeError(`version is longer than ${Fb} characters`);Bb("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const r=t.trim().match(n.loose?Vb[Ub.LOOSE]:Vb[Ub.FULL]);if(!r)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>jb||this.major<0)throw new TypeError("Invalid major version");if(this.minor>jb||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>jb||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<jb)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(Bb("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if("string"==typeof t&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),Wb(this.major,t.major)||Wb(this.minor,t.minor)||Wb(this.patch,t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{const e=this.prerelease[n],r=t.prerelease[n];if(Bb("prerelease compare",n,e,r),void 0===e&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===e)return-1;if(e!==r)return Wb(e,r)}while(++n)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let n=0;do{const e=this.build[n],r=t.build[n];if(Bb("prerelease compare",n,e,r),void 0===e&&void 0===r)return 0;if(void 0===r)return 1;if(void 0===e)return-1;if(e!==r)return Wb(e,r)}while(++n)}inc(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{let e=this.prerelease.length;for(;--e>=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};const{MAX_LENGTH:Gb}=kb,{re:Kb,t:Jb}=qb,Zb=Xb,Qb=$b;var eS=(e,t)=>{if(t=Qb(t),e instanceof Zb)return e;if("string"!=typeof e)return null;if(e.length>Gb)return null;if(!(t.loose?Kb[Jb.LOOSE]:Kb[Jb.FULL]).test(e))return null;try{return new Zb(e,t)}catch(e){return null}};const tS=eS;var nS=(e,t)=>{const n=tS(e,t);return n?n.version:null};const rS=eS;var iS=(e,t)=>{const n=rS(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};const oS=Xb;var aS=(e,t,n,r)=>{"string"==typeof n&&(r=n,n=void 0);try{return new oS(e,n).inc(t,r).version}catch(e){return null}};const sS=Xb;var lS=(e,t,n)=>new sS(e,n).compare(new sS(t,n));const uS=lS;var cS=(e,t,n)=>0===uS(e,t,n);const dS=eS,mS=cS;var hS=(e,t)=>{if(mS(e,t))return null;{const n=dS(e),r=dS(t),i=n.prerelease.length||r.prerelease.length,o=i?"pre":"",a=i?"prerelease":"";for(const e in n)if(("major"===e||"minor"===e||"patch"===e)&&n[e]!==r[e])return o+e;return a}};const fS=Xb;var pS=(e,t)=>new fS(e,t).major;const yS=Xb;var gS=(e,t)=>new yS(e,t).minor;const vS=Xb;var xS=(e,t)=>new vS(e,t).patch;const bS=eS;var SS=(e,t)=>{const n=bS(e,t);return n&&n.prerelease.length?n.prerelease:null};const ES=lS;var MS=(e,t,n)=>ES(t,e,n);const CS=lS;var AS=(e,t)=>CS(e,t,!0);const OS=Xb;var TS=(e,t,n)=>{const r=new OS(e,n),i=new OS(t,n);return r.compare(i)||r.compareBuild(i)};const NS=TS;var wS=(e,t)=>e.sort(((e,n)=>NS(e,n,t)));const RS=TS;var IS=(e,t)=>e.sort(((e,n)=>RS(n,e,t)));const kS=lS;var LS=(e,t,n)=>kS(e,t,n)>0;const PS=lS;var qS=(e,t,n)=>PS(e,t,n)<0;const DS=lS;var $S=(e,t,n)=>0!==DS(e,t,n);const zS=lS;var _S=(e,t,n)=>zS(e,t,n)>=0;const HS=lS;var BS=(e,t,n)=>HS(e,t,n)<=0;const FS=cS,jS=$S,VS=LS,US=_S,YS=qS,WS=BS;var XS=(e,t,n,r)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return FS(e,n,r);case"!=":return jS(e,n,r);case">":return VS(e,n,r);case">=":return US(e,n,r);case"<":return YS(e,n,r);case"<=":return WS(e,n,r);default:throw new TypeError(`Invalid operator: ${t}`)}};const GS=Xb,KS=eS,{re:JS,t:ZS}=qb;var QS,eE,tE,nE,rE,iE,oE,aE,sE,lE,uE=(e,t)=>{if(e instanceof GS)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){let t;for(;(t=JS[ZS.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&t.index+t[0].length===n.index+n[0].length||(n=t),JS[ZS.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;JS[ZS.COERCERTL].lastIndex=-1}else n=e.match(JS[ZS.COERCE]);return null===n?null:KS(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,t)};function cE(){if(nE)return tE;function e(t){var n=this;if(n instanceof e||(n=new e),n.tail=null,n.head=null,n.length=0,t&&"function"==typeof t.forEach)t.forEach((function(e){n.push(e)}));else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)n.push(arguments[r]);return n}function t(e,t,n){var r=t===e.head?new i(n,null,t,e):new i(n,t,t.next,e);return null===r.next&&(e.tail=r),null===r.prev&&(e.head=r),e.length++,r}function n(e,t){e.tail=new i(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function r(e,t){e.head=new i(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function i(e,t,n,r){if(!(this instanceof i))return new i(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}nE=1,tE=e,e.Node=i,e.create=e,e.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},e.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},e.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},e.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)n(this,arguments[e]);return this.length},e.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)r(this,arguments[e]);return this.length},e.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},e.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},e.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},e.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},e.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},e.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},e.prototype.map=function(t,n){n=n||this;for(var r=new e,i=this.head;null!==i;)r.push(t.call(n,i.value,this)),i=i.next;return r},e.prototype.mapReverse=function(t,n){n=n||this;for(var r=new e,i=this.tail;null!==i;)r.push(t.call(n,i.value,this)),i=i.prev;return r},e.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var i=0;null!==r;i++)n=e(n,r.value,i),r=r.next;return n},e.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var i=this.length-1;null!==r;i--)n=e(n,r.value,i),r=r.prev;return n},e.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},e.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},e.prototype.slice=function(t,n){(n=n||this.length)<0&&(n+=this.length),(t=t||0)<0&&(t+=this.length);var r=new e;if(n<t||n<0)return r;t<0&&(t=0),n>this.length&&(n=this.length);for(var i=0,o=this.head;null!==o&&i<t;i++)o=o.next;for(;null!==o&&i<n;i++,o=o.next)r.push(o.value);return r},e.prototype.sliceReverse=function(t,n){(n=n||this.length)<0&&(n+=this.length),(t=t||0)<0&&(t+=this.length);var r=new e;if(n<t||n<0)return r;t<0&&(t=0),n>this.length&&(n=this.length);for(var i=this.length,o=this.tail;null!==o&&i>n;i--)o=o.prev;for(;null!==o&&i>t;i--,o=o.prev)r.push(o.value);return r},e.prototype.splice=function(e,n,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;var a=[];for(i=0;o&&i<n;i++)a.push(o.value),o=this.removeNode(o);null===o&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev);for(i=0;i<r.length;i++)o=t(this,o,r[i]);return a},e.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{(eE?QS:(eE=1,QS=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}))(e)}catch(e){}return tE}function dE(){if(aE)return oE;aE=1;class e{constructor(t,n){if(n=r(n),t instanceof e)return t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease?t:new e(t.raw,n);if(t instanceof i)return this.raw=t.value,this.set=[[t]],this.format(),this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=t,this.set=t.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${t}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!m(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&h(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,r=n.get(t);if(r)return r;const a=this.options.loose,h=a?s[l.HYPHENRANGELOOSE]:s[l.HYPHENRANGE];e=e.replace(h,A(this.options.includePrerelease)),o("hyphen replace",e),e=e.replace(s[l.COMPARATORTRIM],u),o("comparator trim",e,s[l.COMPARATORTRIM]),e=(e=(e=e.replace(s[l.TILDETRIM],c)).replace(s[l.CARETTRIM],d)).split(/\s+/).join(" ");const f=a?s[l.COMPARATORLOOSE]:s[l.COMPARATOR],y=e.split(" ").map((e=>p(e,this.options))).join(" ").split(/\s+/).map((e=>C(e,this.options))).filter(this.options.loose?e=>!!e.match(f):()=>!0).map((e=>new i(e,this.options)));y.length;const g=new Map;for(const e of y){if(m(e))return[e];g.set(e.value,e)}g.size>1&&g.has("")&&g.delete("");const v=[...g.values()];return n.set(t,v),v}intersects(t,n){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some((e=>f(e,n)&&t.set.some((t=>f(t,n)&&e.every((e=>t.every((t=>e.intersects(t,n)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new a(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(O(this.set[t],e,this.options))return!0;return!1}}oE=e;const t=function(){if(iE)return rE;iE=1;const e=cE(),t=Symbol("max"),n=Symbol("length"),r=Symbol("lengthCalculator"),i=Symbol("allowStale"),o=Symbol("maxAge"),a=Symbol("dispose"),s=Symbol("noDisposeOnSet"),l=Symbol("lruList"),u=Symbol("cache"),c=Symbol("updateAgeOnGet"),d=()=>1,m=(e,t,n)=>{const r=e[u].get(t);if(r){const t=r.value;if(h(e,t)){if(p(e,r),!e[i])return}else n&&(e[c]&&(r.value.now=Date.now()),e[l].unshiftNode(r));return t.value}},h=(e,t)=>{if(!t||!t.maxAge&&!e[o])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[o]&&n>e[o]},f=e=>{if(e[n]>e[t])for(let r=e[l].tail;e[n]>e[t]&&null!==r;){const t=r.prev;p(e,r),r=t}},p=(e,t)=>{if(t){const r=t.value;e[a]&&e[a](r.key,r.value),e[n]-=r.length,e[u].delete(r.key),e[l].removeNode(t)}};class y{constructor(e,t,n,r,i){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=i||0}}const g=(e,t,n,r)=>{let o=n.value;h(e,o)&&(p(e,n),e[i]||(o=void 0)),o&&t.call(r,o.value,o.key,e)};return rE=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[t]=e.max||1/0;const n=e.length||d;if(this[r]="function"!=typeof n?d:n,this[i]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[o]=e.maxAge||0,this[a]=e.dispose,this[s]=e.noDisposeOnSet||!1,this[c]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[t]=e||1/0,f(this)}get max(){return this[t]}set allowStale(e){this[i]=!!e}get allowStale(){return this[i]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[o]=e,f(this)}get maxAge(){return this[o]}set lengthCalculator(e){"function"!=typeof e&&(e=d),e!==this[r]&&(this[r]=e,this[n]=0,this[l].forEach((e=>{e.length=this[r](e.value,e.key),this[n]+=e.length}))),f(this)}get lengthCalculator(){return this[r]}get length(){return this[n]}get itemCount(){return this[l].length}rforEach(e,t){t=t||this;for(let n=this[l].tail;null!==n;){const r=n.prev;g(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[l].head;null!==n;){const r=n.next;g(this,e,n,t),n=r}}keys(){return this[l].toArray().map((e=>e.key))}values(){return this[l].toArray().map((e=>e.value))}reset(){this[a]&&this[l]&&this[l].length&&this[l].forEach((e=>this[a](e.key,e.value))),this[u]=new Map,this[l]=new e,this[n]=0}dump(){return this[l].map((e=>!h(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[l]}set(e,i,c){if((c=c||this[o])&&"number"!=typeof c)throw new TypeError("maxAge must be a number");const d=c?Date.now():0,m=this[r](i,e);if(this[u].has(e)){if(m>this[t])return p(this,this[u].get(e)),!1;const r=this[u].get(e).value;return this[a]&&(this[s]||this[a](e,r.value)),r.now=d,r.maxAge=c,r.value=i,this[n]+=m-r.length,r.length=m,this.get(e),f(this),!0}const h=new y(e,i,m,d,c);return h.length>this[t]?(this[a]&&this[a](e,i),!1):(this[n]+=h.length,this[l].unshift(h),this[u].set(e,this[l].head),f(this),!0)}has(e){if(!this[u].has(e))return!1;const t=this[u].get(e).value;return!h(this,t)}get(e){return m(this,e,!0)}peek(e){return m(this,e,!1)}pop(){const e=this[l].tail;return e?(p(this,e),e.value):null}del(e){p(this,this[u].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],i=r.e||0;if(0===i)this.set(r.k,r.v);else{const e=i-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[u].forEach(((e,t)=>m(this,t,!1)))}},rE}(),n=new t({max:1e3}),r=$b,i=mE(),o=Pb,a=Xb,{re:s,t:l,comparatorTrimReplace:u,tildeTrimReplace:c,caretTrimReplace:d}=qb,m=e=>"<0.0.0-0"===e.value,h=e=>""===e.value,f=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every((e=>i.intersects(e,t))),i=r.pop();return n},p=(e,t)=>(o("comp",e,t),e=x(e,t),o("caret",e),e=g(e,t),o("tildes",e),e=S(e,t),o("xrange",e),e=M(e,t),o("stars",e),e),y=e=>!e||"x"===e.toLowerCase()||"*"===e,g=(e,t)=>e.trim().split(/\s+/).map((e=>v(e,t))).join(" "),v=(e,t)=>{const n=t.loose?s[l.TILDELOOSE]:s[l.TILDE];return e.replace(n,((t,n,r,i,a)=>{let s;return o("tilde",e,t,n,r,i,a),y(n)?s="":y(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:y(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(o("replaceTilde pr",a),s=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,o("tilde return",s),s}))},x=(e,t)=>e.trim().split(/\s+/).map((e=>b(e,t))).join(" "),b=(e,t)=>{o("caret",e,t);const n=t.loose?s[l.CARETLOOSE]:s[l.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,a,s)=>{let l;return o("caret",e,t,n,i,a,s),y(n)?l="":y(i)?l=`>=${n}.0.0${r} <${+n+1}.0.0-0`:y(a)?l="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(o("replaceCaret pr",s),l="0"===n?"0"===i?`>=${n}.${i}.${a}-${s} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${s} <${+n+1}.0.0-0`):(o("no pr"),l="0"===n?"0"===i?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o("caret return",l),l}))},S=(e,t)=>(o("replaceXRanges",e,t),e.split(/\s+/).map((e=>E(e,t))).join(" ")),E=(e,t)=>{e=e.trim();const n=t.loose?s[l.XRANGELOOSE]:s[l.XRANGE];return e.replace(n,((n,r,i,a,s,l)=>{o("xRange",e,n,r,i,a,s,l);const u=y(i),c=u||y(a),d=c||y(s),m=d;return"="===r&&m&&(r=""),l=t.includePrerelease?"-0":"",u?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&m?(c&&(a=0),s=0,">"===r?(r=">=",c?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):"<="===r&&(r="<",c?i=+i+1:a=+a+1),"<"===r&&(l="-0"),n=`${r+i}.${a}.${s}${l}`):c?n=`>=${i}.0.0${l} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${l} <${i}.${+a+1}.0-0`),o("xRange return",n),n}))},M=(e,t)=>(o("replaceStars",e,t),e.trim().replace(s[l.STAR],"")),C=(e,t)=>(o("replaceGTE0",e,t),e.trim().replace(s[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),A=e=>(t,n,r,i,o,a,s,l,u,c,d,m,h)=>`${n=y(r)?"":y(i)?`>=${r}.0.0${e?"-0":""}`:y(o)?`>=${r}.${i}.0${e?"-0":""}`:a?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=y(u)?"":y(c)?`<${+u+1}.0.0-0`:y(d)?`<${u}.${+c+1}.0-0`:m?`<=${u}.${c}.${d}-${m}`:e?`<${u}.${c}.${+d+1}-0`:`<=${l}`}`.trim(),O=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(o(e[n].semver),e[n].semver!==i.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return oE}function mE(){if(lE)return sE;lE=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,i){if(i=n(i),r instanceof t){if(r.loose===!!i.loose)return r;r=r.value}a("comparator",r,i),this.options=i,this.loose=!!i.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(t){const n=this.options.loose?r[i.COMPARATORLOOSE]:r[i.COMPARATOR],o=t.match(n);if(!o)throw new TypeError(`Invalid comparator: ${t}`);this.operator=void 0!==o[1]?o[1]:"","="===this.operator&&(this.operator=""),o[2]?this.semver=new s(o[2],this.options.loose):this.semver=e}toString(){return this.value}test(t){if(a("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new s(t,this.options)}catch(e){return!1}return o(t,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Comparator is required");if(n&&"object"==typeof n||(n={loose:!!n,includePrerelease:!1}),""===this.operator)return""===this.value||new l(e.value,n).test(this.value);if(""===e.operator)return""===e.value||new l(this.value,n).test(e.semver);const r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),a=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),u=o(this.semver,"<",e.semver,n)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=o(this.semver,">",e.semver,n)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||i||a&&s||u||c}}sE=t;const n=$b,{re:r,t:i}=qb,o=XS,a=Pb,s=Xb,l=dE();return sE}const hE=dE();var fE=(e,t,n)=>{try{t=new hE(t,n)}catch(e){return!1}return t.test(e)};const pE=dE();var yE=(e,t)=>new pE(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")));const gE=Xb,vE=dE();var xE=(e,t,n)=>{let r=null,i=null,o=null;try{o=new vE(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(r&&-1!==i.compare(e)||(r=e,i=new gE(r,n)))})),r};const bE=Xb,SE=dE();var EE=(e,t,n)=>{let r=null,i=null,o=null;try{o=new SE(t,n)}catch(e){return null}return e.forEach((e=>{o.test(e)&&(r&&1!==i.compare(e)||(r=e,i=new bE(r,n)))})),r};const ME=Xb,CE=dE(),AE=LS;var OE=(e,t)=>{e=new CE(e,t);let n=new ME("0.0.0");if(e.test(n))return n;if(n=new ME("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const r=e.set[t];let i=null;r.forEach((e=>{const t=new ME(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":i&&!AE(t,i)||(i=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!i||n&&!AE(n,i)||(n=i)}return n&&e.test(n)?n:null};const TE=dE();var NE=(e,t)=>{try{return new TE(e,t).range||"*"}catch(e){return null}};const wE=Xb,RE=mE(),{ANY:IE}=RE,kE=dE(),LE=fE,PE=LS,qE=qS,DE=BS,$E=_S;var zE=(e,t,n,r)=>{let i,o,a,s,l;switch(e=new wE(e,r),t=new kE(t,r),n){case">":i=PE,o=DE,a=qE,s=">",l=">=";break;case"<":i=qE,o=$E,a=PE,s="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(LE(e,t,r))return!1;for(let n=0;n<t.set.length;++n){const u=t.set[n];let c=null,d=null;if(u.forEach((e=>{e.semver===IE&&(e=new RE(">=0.0.0")),c=c||e,d=d||e,i(e.semver,c.semver,r)?c=e:a(e.semver,d.semver,r)&&(d=e)})),c.operator===s||c.operator===l)return!1;if((!d.operator||d.operator===s)&&o(e,d.semver))return!1;if(d.operator===l&&a(e,d.semver))return!1}return!0};const _E=zE;var HE=(e,t,n)=>_E(e,t,">",n);const BE=zE;var FE=(e,t,n)=>BE(e,t,"<",n);const jE=dE();var VE=(e,t,n)=>(e=new jE(e,n),t=new jE(t,n),e.intersects(t));const UE=fE,YE=lS;const WE=dE(),XE=mE(),{ANY:GE}=XE,KE=fE,JE=lS,ZE=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===GE){if(1===t.length&&t[0].semver===GE)return!0;e=n.includePrerelease?[new XE(">=0.0.0-0")]:[new XE(">=0.0.0")]}if(1===t.length&&t[0].semver===GE){if(n.includePrerelease)return!0;t=[new XE(">=0.0.0")]}const r=new Set;let i,o,a,s,l,u,c;for(const t of e)">"===t.operator||">="===t.operator?i=QE(i,t,n):"<"===t.operator||"<="===t.operator?o=eM(o,t,n):r.add(t.semver);if(r.size>1)return null;if(i&&o){if(a=JE(i.semver,o.semver,n),a>0)return null;if(0===a&&(">="!==i.operator||"<="!==o.operator))return null}for(const e of r){if(i&&!KE(e,String(i),n))return null;if(o&&!KE(e,String(o),n))return null;for(const r of t)if(!KE(e,String(r),n))return!1;return!0}let d=!(!o||n.includePrerelease||!o.semver.prerelease.length)&&o.semver,m=!(!i||n.includePrerelease||!i.semver.prerelease.length)&&i.semver;d&&1===d.prerelease.length&&"<"===o.operator&&0===d.prerelease[0]&&(d=!1);for(const e of t){if(c=c||">"===e.operator||">="===e.operator,u=u||"<"===e.operator||"<="===e.operator,i)if(m&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===m.major&&e.semver.minor===m.minor&&e.semver.patch===m.patch&&(m=!1),">"===e.operator||">="===e.operator){if(s=QE(i,e,n),s===e&&s!==i)return!1}else if(">="===i.operator&&!KE(i.semver,String(e),n))return!1;if(o)if(d&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===d.major&&e.semver.minor===d.minor&&e.semver.patch===d.patch&&(d=!1),"<"===e.operator||"<="===e.operator){if(l=eM(o,e,n),l===e&&l!==o)return!1}else if("<="===o.operator&&!KE(o.semver,String(e),n))return!1;if(!e.operator&&(o||i)&&0!==a)return!1}return!(i&&u&&!o&&0!==a)&&(!(o&&c&&!i&&0!==a)&&(!m&&!d))},QE=(e,t,n)=>{if(!e)return t;const r=JE(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},eM=(e,t,n)=>{if(!e)return t;const r=JE(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};var tM=(e,t,n={})=>{if(e===t)return!0;e=new WE(e,n),t=new WE(t,n);let r=!1;e:for(const i of e.set){for(const e of t.set){const t=ZE(i,e,n);if(r=r||null!==t,t)continue e}if(r)return!1}return!0};const nM=qb;var rM={re:nM.re,src:nM.src,tokens:nM.t,SEMVER_SPEC_VERSION:kb.SEMVER_SPEC_VERSION,SemVer:Xb,compareIdentifiers:Hb.compareIdentifiers,rcompareIdentifiers:Hb.rcompareIdentifiers,parse:eS,valid:nS,clean:iS,inc:aS,diff:hS,major:pS,minor:gS,patch:xS,prerelease:SS,compare:lS,rcompare:MS,compareLoose:AS,compareBuild:TS,sort:wS,rsort:IS,gt:LS,lt:qS,eq:cS,neq:$S,gte:_S,lte:BS,cmp:XS,coerce:uE,Comparator:mE(),Range:dE(),satisfies:fE,toComparators:yE,maxSatisfying:xE,minSatisfying:EE,minVersion:OE,validRange:NE,outside:zE,gtr:HE,ltr:FE,intersects:VE,simplifyRange:(e,t,n)=>{const r=[];let i=null,o=null;const a=e.sort(((e,t)=>YE(e,t,n)));for(const e of a){UE(e,t,n)?(o=e,i||(i=e)):(o&&r.push([i,o]),o=null,i=null)}i&&r.push([i,null]);const s=[];for(const[e,t]of r)e===t?s.push(e):t||e!==a[0]?t?e===a[0]?s.push(`<=${t}`):s.push(`${e} - ${t}`):s.push(`>=${e}`):s.push("*");const l=s.join(" || "),u="string"==typeof t.raw?t.raw:String(t);return l.length<u.length?l:t},subset:tM},iM=W(rM),oM={BAR_IN_SECONDARY_AXIS:"0.23.1"};const aM=e=>!e||iM.lt(iM.coerce(e),iM.coerce(oM.BAR_IN_SECONDARY_AXIS)),sM=({layoutService:e})=>{const t=!aM(e.getLayoutValue("version")),n=e.getHyperCubeValue("qMeasureInfo").map(((e,t)=>{const n={[os.TYPE.BAR]:0,[os.TYPE.LINE]:0,[os.TYPE.MARKER]:0};return({series:r=os.NOPE_SERIES},i)=>{const o=Rb(r,t),a=bc(r);return{id:i,type:a,typeIndex:n[a]++,ref:`qMeasureInfo/${i}`,refIndex:i,isPrimary:o,scale:o?is.SCALE.MINOR.PRIMARY:is.SCALE.MINOR.SECONDARY,collection:o?is.COLLECTION.PRIMARY:is.COLLECTION.SECONDARY,options:wb({series:r,layoutService:e})}}})(e,t)),r=(e,t)=>e.filter((e=>bc(e)===t)).length,i=n.filter((e=>e.isPrimary)),o=n.filter((e=>!e.isPrimary)),a=[!!i.length&&i[0],!!o.length&&o[0]].filter((e=>!!e)),s=r(n,os.TYPE.BAR),l=r(i,os.TYPE.BAR),u=r(o,os.TYPE.BAR),c=e=>n.filter((t=>bc(t)===e)),d=c(os.TYPE.LINE).map((e=>Fl(is.COMPONENT.POINT,e))),m=c(os.TYPE.MARKER).map((e=>({key:Fl(is.COMPONENT.MARKER,e),type:e.options.marker}))),h=m.map((e=>e.key)),f=[];l>0&&f.push(`${is.COMPONENT.BAR}-${os.AXIS.PRIMARY}`),u>0&&f.push(`${is.COMPONENT.BAR}-${os.AXIS.SECONDARY}`);const p=[...f,...d,...h],{MINI_CHART:y}=is.COMPONENT,g=c(os.TYPE.LINE).map((e=>Fl(y.LINE,e))),v=c(os.TYPE.MARKER).map((e=>Fl(y.MARKER,e))),x=e.meta.isContinuous?[`${y.BAR}-${os.AXIS.PRIMARY}`,`${y.BAR}-${os.AXIS.SECONDARY}`,...g,...v]:[];return{meta:{allSeries:n,primarySeries:i,secondarySeries:o,barSeriesCount:s,primaryBarSeriesCount:l,secondaryBarSeriesCount:u,measureAxes:a,pointComponentKeys:d,markerComponentKeys:h,barComponentKeys:f,seriesComponentKeys:p,miniComponentKeys:x,markers:m},query:{all:()=>n,seriesByAxis:e=>e?i:o,series:c,isPrimary:Rb}}};function lM({layoutService:e}){const{dimensionCount:t,measureCount:n}=e.meta;return{qTop:0,qLeft:0,qWidth:t+n,qHeight:Math.min(2e3,1e4/(n+1))}}function uM({genericObjectModel:e,layoutService:t}){return function(){return function(e,t,n){return e.getHyperCubeReducedData(n.path,[n.rect],n.zoomLevel,n.filter).catch(be).then((e=>{var n;const r=t.getHyperCubeValue("qMode"),i=t.getHyperCubeValue("qDimensionInfo"),o="K"===r&&i.length>1&&(null===(n=e[0])||void 0===n?void 0:n.qIsReduced),a=e.slice(),s=t.getHyperCubeValue("qMeasureInfo"),l=o?[]:t.getHyperCubeValue("qColumnOrder");return{reducedCube:{qDataPages:a,qDimensionInfo:i.slice(),qEffectiveInterColumnSortOrder:[1,0],qMeasureInfo:o?[s[0],s[0]]:s.slice(),qStackedDataPages:[],qMode:"S",qHasOtherValues:t.getHyperCubeValue("qHasOtherValues"),qSize:t.getHyperCubeValue("qSize"),qColumnOrder:l}}}))}(e,t,{path:"/qHyperCubeDef",rect:lM({layoutService:t}),zoomLevel:-1,filter:"D1"})}}function cM({genericObjectModel:e,layoutService:t}){const{isSnapshot:n,isContinuous:r}=t.meta;return n?function({layoutService:e}){return function(){return Promise.resolve({reducedCube:e.getLayoutValue("reducedHyperCube")||e.getHyperCube()})}}({layoutService:t}):r?function({layoutService:e}){return function(){const t=e.getHyperCube();return Promise.resolve({reducedCube:{...t,qDataPages:[...t.qDataPages]}})}}({layoutService:t}):uM({genericObjectModel:e,layoutService:t})}const dM=e=>"number"==typeof e&&!Number.isNaN(e);function mM({isPrimary:e,layoutService:t,seriesModel:n}){return function(){const r=t.getHyperCubeValue("qMeasureInfo"),i=n.query.seriesByAxis(e).map((e=>r[e.refIndex])),o=i.filter((e=>bc(e.series)===os.TYPE.BAR)),a=i.filter((e=>bc(e.series)===os.TYPE.LINE)),s=i.filter((e=>bc(e.series)===os.TYPE.MARKER));return{min:Math.min(...i.filter((e=>dM(e.qMin))).map((e=>e.qMin))),max:Math.max(...i.filter((e=>dM(e.qMax))).map((e=>e.qMax))),bar:{min:Math.min(...o.filter((e=>dM(e.qMin))).map((e=>e.qMin))),max:Math.max(...o.filter((e=>dM(e.qMax))).map((e=>e.qMax)))},line:{min:Math.min(...a.filter((e=>dM(e.qMin))).map((e=>e.qMin))),max:Math.max(...a.filter((e=>dM(e.qMax))).map((e=>e.qMax)))},marker:{min:Math.min(...s.filter((e=>dM(e.qMin))).map((e=>e.qMin))),max:Math.max(...s.filter((e=>dM(e.qMax))).map((e=>e.qMax)))}}}}function hM({isPrimary:e,layoutService:t,seriesModel:n}){const r=mM({isPrimary:e,layoutService:t,seriesModel:n}),i=function({seriesModel:e,isPrimary:t}){return function({dataPage:n}){const r=e.query.series(os.TYPE.BAR).filter((e=>e.isPrimary===t)).map((e=>e.refIndex)),{qMatrix:i}=n,o={min:NaN,max:NaN};return i.forEach((e=>{let t=0,n=0;e.slice(1).filter(((e,t)=>r.some((e=>e===t))&&"NaN"!==e.qNum)).forEach((e=>{e.qNum>=0?n+=e.qNum:t+=e.qNum})),o.min=Number.isNaN(o.min)?t:Math.min(t,o.min),o.max=Number.isNaN(o.max)?n:Math.max(n,o.max)})),o}}({seriesModel:n,isPrimary:e});return function({dataPage:e}){const t=r({dataPage:e});return t.bar=i({dataPage:e}),t.min=Math.min(t.bar.min,t.line.min,t.marker.min),t.max=Math.max(t.bar.max,t.line.max,t.marker.max),t}}function fM({isPrimary:e,continuousModel:t,layoutService:n,reducedModel:r,seriesModel:i}){const o={min:NaN,max:NaN,implicit:{min:NaN,max:NaN,bar:{min:NaN,max:NaN},line:{min:NaN,max:NaN},marker:{min:NaN,max:NaN}},explicit:{min:NaN,max:NaN},meta:{hasExplicit:!1,hasExplicitMin:!1,hasExplicitMax:!1,includesZero:!1}},a=function({isPrimary:e,layoutService:t,seriesModel:n}){const{isBarSeriesStacked:r}=t.meta,i=n.query.series(os.TYPE.BAR).filter((t=>t.isPrimary===e)).length;return!r||i<2?mM({isPrimary:e,layoutService:t,seriesModel:n}):hM({isPrimary:e,layoutService:t,seriesModel:n})}({isPrimary:e,layoutService:n,seriesModel:i});return{query:{getExtrema:()=>o},command:{initialize:()=>{const{min:s,max:l}=function({isPrimary:e,layoutService:t}){const n={min:NaN,max:NaN},{getLayoutValue:r}=t,i=r("measureAxes."+(e?0:1),{});if(i.autoMinMax)return n;const{minMax:o,min:a,max:s}=i;return"min"!==o&&"minMax"!==o||(n.min=a),"max"!==o&&"minMax"!==o||(n.max=s),Number.isNaN(n.min)||Number.isNaN(n.max)||(n.min=Math.min(a,s),n.max=Math.max(a,s)),n}({isPrimary:e,layoutService:n});return o.explicit.min=s,o.explicit.max=l,o.meta.hasExplicitMin=!Number.isNaN(s),o.meta.hasExplicitMax=!Number.isNaN(l),o.meta.hasExplicit=o.meta.hasExplicitMin||o.meta.hasExplicitMax,function({continuousModel:e,layoutService:t,reducedModel:n}){const{isDiscrete:r}=t.meta;if(r){const e=n.query.getCube();return Promise.resolve({dataPage:e.qDataPages[0]})}return e.fetchMinMaxData().then((e=>({dataPage:e[0]})))}({continuousModel:t,layoutService:n,reducedModel:r}).then((({dataPage:t})=>{const{min:n,max:r,bar:s,line:l,marker:u}=a({dataPage:t}),c=i.query.seriesByAxis(e).some((e=>bc(e)===os.TYPE.BAR)),d=c?Math.min(n,0):n,m=c?Math.max(r,0):r,h=c?Math.min(s.min,0):s.min,f=c?Math.max(s.max,0):s.max,p=c?Math.min(l.min,0):l.min,y=c?Math.max(l.max,0):l.max,g=c?Math.min(u.min,0):u.min,v=c?Math.max(u.max,0):u.max;o.implicit.min=Number.isFinite(d)?d:0,o.implicit.max=Number.isFinite(m)?m:0,o.implicit.bar.min=Number.isFinite(h)?h:0,o.implicit.bar.max=Number.isFinite(f)?f:0,o.implicit.line.min=Number.isFinite(p)?p:0,o.implicit.line.max=Number.isFinite(y)?y:0,o.implicit.marker.min=Number.isFinite(g)?g:0,o.implicit.marker.max=Number.isFinite(v)?v:0,o.min=Number.isNaN(o.explicit.min)?o.implicit.min:o.explicit.min,o.max=Number.isNaN(o.explicit.max)?o.implicit.max:o.explicit.max,o.meta.hasExplicitMin&&!o.meta.hasExplicitMax&&(o.max=Math.max(o.min,o.max)),o.meta.hasExplicitMax&&!o.meta.hasExplicitMin&&(o.min=Math.min(o.min,o.max)),o.meta.includesZero=!!((0-o.min)*(0-o.max)<=0)}))}}}}const pM=.2;function yM({extrema:e,ticks:t}){const n=e.meta.hasExplicit?2:3;return t.filter((t=>(t=>!e.meta.hasExplicitMin||t>=e.explicit.min)(t)&&(t=>!e.meta.hasExplicitMax||t<=e.explicit.max)(t))).length>=n}function gM({min:e,max:t,count:n,threshold:r,disable:i}){const o=function(e,t,n){const r=Ir().domain([e,t]);return r.nice(n),r}(e,t,n),a=function({min:e,max:t,threshold:n,scale:r,disable:i}){const o={start:!0,stop:!0};if(i)return o;const[a,s]=r.domain();return 0!==e&&0!==a&&(o.start=r(e)>n),0!==t&&0!==s&&(o.stop=r(t)<1-n),o}({min:e,max:t,threshold:r,scale:o,disable:i});if(!a.start||!a.stop){const[e,t]=o.domain(),r=o.ticks(n),i=r.length>=4?r[1]-r[0]:.1*e,s=r.length>=4?r[r.length-1]-r[r.length-2]:.1*t;o.domain([a.start?e:e-i,a.stop?t:t+s]),o.nice(n)}return o}const vM=50,xM=100,bM=200,SM=125,EM=e=>{switch(e){case.5:return vM;case 1:return xM;case 2:return bM;default:return e*SM}};function MM({config:e,chart:t,layoutService:n,dockService:r,measureText:i,size:o,min:a,max:s}){const l=function({config:{measureAxesRef:e},layoutService:t,size:n}){const r=t.getLayoutValue(`${e}.spacing`,1),i=EM(r);return Math.max(1,Math.round(n/i))}({config:e,layoutService:n,size:o}),u=gM({min:a,max:s,count:l,threshold:.05,disable:!0}),c=u.domain(),d={roundedMin:c[0],roundedMax:c[1],ticks:u.ticks(l)},m="horizontal"===r.meta.major.orientation?"height":"width",h=e=>i(e)[m],f=t.formatter(e.formatter),p=()=>{const e=d.ticks.map(f),t=e.some(((t,n)=>e.indexOf(t)!==n));return!t&&(e=>{const t=o/d.ticks.length;return Math.max(...e.map(h))<=t})(e)};for(let e=l-1;e>0&&!p();e--)u.domain([a,s]),u.nice(e),[d.roundedMin,d.roundedMax]=u.domain(),d.ticks=u.ticks(e);return d}const CM=.3;function AM({tick:e,index:t,ticks:n}){return 0===t||t===n.length-1||0===e}function OM({index:e,ticks:t}){return 0===e||e===t.length-1||e===Math.floor((t.length-1)/2)}const TM=10;function NM({config:e,chart:t,extrema:n,min:r,max:i}){const o={roundedMin:0,roundedMax:0,ticks:[]},a=gM({min:r,max:i,count:TM,threshold:.15,disable:!0});[o.roundedMin,o.roundedMax]=a.domain();const s=a.ticks(TM),l=function({ticks:e}){const t=Math.round(e.length*CM),n=t,r=e.length-t;return e.slice(n,r).some((e=>0===e))}({ticks:s}),u=l?AM:OM;o.ticks=s.filter(((e,t,n)=>u({tick:e,index:t,ticks:n})));o.ticks.length%2==0&&!l&&!n.meta.hasExplicit&&s.length>1&&(o.ticks=[s[0],(s[0]+s[s.length-1])/2,s[s.length-1]]);const c=t.formatter(e.formatter),d=o.ticks.map(c),m=d.some(((e,t)=>d.indexOf(e)!==t));return m&&(o.ticks=[o.ticks[0],o.ticks[o.ticks.length-1]]),o}function wM({ticks:e,extrema:t}){let n=[...e];return t.meta.hasExplicit&&e.length?(t.meta.hasExplicitMin&&!e.some((e=>e===t.explicit.min))&&(n.unshift(t.explicit.min),n=n.filter((e=>e>=t.explicit.min))),t.meta.hasExplicitMax&&!e.some((e=>e===t.explicit.max))&&(n.push(t.explicit.max),n=n.filter((e=>e<=t.explicit.max))),n):n}function RM({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l}){const{ticks:u,roundedMin:c,roundedMax:d}=function({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l}){if("SPARK"===r.meta.chart.mode)return function({min:e,max:t}){return{roundedMin:e,roundedMax:t,ticks:[]}}({min:s,max:l});const u=MM({config:e,chart:t,layoutService:n,dockService:r,measureText:o,size:a,min:s,max:l});return yM({extrema:i,ticks:u.ticks})?u:NM({config:e,chart:t,extrema:i,min:s,max:l})}({config:e,chart:t,layoutService:n,dockService:r,extrema:i,measureText:o,size:a,min:s,max:l}),m=function({ticks:e,count:t}){const n=[];for(let r=0;r<e.length-1;r++){const i=e[r],o=(e[r+1]-i)/(t+1);for(let e=1;e<=t;e++)n.push(i+o*e)}return n}({ticks:u,count:1}),h=[...wM({ticks:u,extrema:i}).map((e=>({value:e,isMinor:!1}))),...m.map((e=>({value:e,isMinor:!0})))].sort(((e,t)=>e.value-t.value));return{min:c,max:d,values:h}}function IM({config:e,chart:t,layoutService:n,dockService:r,measureText:i,extrema:o,size:a}){const{min:s,max:l}=function({extrema:e}){const{min:t,max:n}=e;return t!==n?{min:t,max:n}:0===t||1===t?{min:t-1,max:n+1}:{min:t-t*pM*Math.sign(t),max:n+n*pM*Math.sign(n)}}({extrema:o});return RM({config:e,chart:t,layoutService:n,dockService:r,extrema:o,measureText:i,size:a,min:s,max:l})}function kM({config:e,chart:t,layoutService:n,extremumModel:r,dockService:i,seriesModel:o,themeService:a}){const s={locked:!1,resolved:void 0},{getExtrema:l}=r.query,u=function({chart:e,config:t,dockService:n,extremumModel:r,layoutService:i,seriesModel:o,themeService:a}){const{measureText:s}=$.renderer("svg")();return()=>{const l=a.getStyles(),u=function({dockService:e,seriesModel:t,chart:n}){var r;const i=n.component(t.meta.seriesComponentKeys[0]),o=null!==(r=null==i?void 0:i.rect)&&void 0!==r?r:e.meta.chart.size;return"horizontal"===e.meta.major.orientation?o.height:o.width}({chart:e,dockService:n,seriesModel:o}),c=r.query.getExtrema();return IM({config:t,chart:e,layoutService:i,dockService:n,measureText:e=>s({text:e,fontFamily:l.axis.label.name.fontFamily,fontSize:l.axis.label.name.fontSize}),extrema:c,size:u})}}({config:e,chart:t,layoutService:n,extremumModel:r,dockService:i,seriesModel:o,themeService:a}),c=()=>(s.locked&&s.resolved||(s.resolved=u()),s.resolved);return{query:{getValues:()=>c().values,getMin:()=>l().meta.hasExplicitMin?l().explicit.min:c().min,getMax:()=>l().meta.hasExplicitMax?l().explicit.max:c().max},command:{lock:()=>{s.locked=!0},unlock:()=>{s.locked=!1}}}}function LM({genericObjectModel:e,layoutService:t}){const n={properties:void 0};return{query:{getProperties:()=>n.properties},command:{initialize:()=>function({layout:e,model:t}){return ve.snapshot(e)?Promise.resolve(null):t.getEffectiveProperties().then((e=>({properties:e})))}({layout:t.getLayout(),model:e}).then((e=>{const{properties:t}=null!=e?e:{};n.properties=t}))}}}function PM({layoutService:e,seriesModel:t,colorService:n}){const{type:r,mode:i,fieldType:o}=n.getSettings();if("categorical"!==r)return;const a=e.getLayoutValue("dataPoint.show",!1)?"line-point":"line";let s;s="field"===i?"measure"===o?()=>({type:os.TYPE.BAR}):()=>t.query.all()[0]:e=>t.query.all()[e.value];return{item:{shape:{type:({datum:e})=>{const{type:t,options:n}=s(e);switch(t){case"line":return a;case"marker":return n.marker;default:return"square"}},stroke:{},strokeWidth:({datum:e})=>{const{type:t,options:n}=s(e);return t===os.TYPE.LINE?2:t!==os.TYPE.MARKER||n.fill?0:1},size:10,fill:{fn:({datum:e,scale:t})=>{const{type:n,options:r}=s(e);return n!==os.TYPE.MARKER||"bar"===r.marker||r.fill?t(e.value):"none"}}}}}}function qM({layout:e,defaultAuto:t}){const n=t(e),r=e.qHyperCube.qMeasureInfo.length>1;return{...n,useBaseColors:r?"measure":n.useBaseColors}}function DM({actions:e,appLayoutModel:t,appModel:n,chart:r,environment:i,genericObjectModel:o,layoutService:a,picasso:s,seriesModel:l,viewState:u,styleModel:c}){let d;const{theme:m,translator:h}=i,f={wrappedScales:void 0,legendComponents:void 0,legendInteractions:void 0};return d=T({picasso:s,model:o,app:n,translator:h,layoutService:a,createConfig:()=>{const e=a.getHyperCubeValue("qMeasureInfo").map((e=>e.color));return{theme:m,colorProps:{measureOverrides:e},legendProps:a.getLayoutValue("legend"),hc:a.getHyperCube(),key:is.SCALE.COLOR}},config:{auto:qM,localeInfo:t.qLocaleInfo},custom:{wrappedScales:()=>f.wrappedScales,legendComponents:()=>f.legendComponents,legendInteractions:()=>f.legendInteractions,updateLegend:()=>{const{components:t,interactions:n,scales:o}=function({viewState:e,chart:t,layoutService:n,seriesModel:r,environment:i,colorService:o,actions:a,styleModel:s}){const{options:l}=i,u={eventName:"legend-c",key:is.COMPONENT.LEGEND,viewState:e,chart:t,styleReference:"object.comboChart",styleOverrides:{title:s.query.legend.title.getStyle(),label:s.query.legend.label.getStyle()},rtl:"rtl"===l.direction,settings:PM({layoutService:n,seriesModel:r,colorService:o})},{components:c,interactions:d}=o.getLegend(u,{actions:a,navigationDisabled:!a.interact.enabled()}),m=o.getScales();return{components:c.filter(Boolean).map((e=>{const{layout:t}=e,{dock:n}=t,r=m[`${is.SCALE.COLOR}Range`];return!r||"right"!==n&&"left"!==n||(r.invert=!0),"legend-cat"===e.type&&(e.settings.item.shape.fill.scale=e.scale,e.settings.item.shape.stroke.scale=e.scale),e})),interactions:d,scales:m}}({viewState:u,chart:r,environment:i,colorService:d,seriesModel:l,layoutService:a,actions:e,styleModel:c});f.wrappedScales=o,f.legendComponents=t,f.legendInteractions=n}}}),d}const $M="REJECTED",zM=()=>{},_M=1e4,HM={MULTIPLIER:2,MINIMUM:20,MAXIMUM:200},BM=50,FM=10,jM=100;var VM={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qLeft<=t.qLeft&&n.qLeft+n.qWidth>=t.qLeft+t.qWidth&&n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qMatrix.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qMatrix.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(0,t.qWidth)-Math.abs(Math.min(0,t.qLeft-e.qArea.qLeft)),i=Math.max(t.qTop,e.qArea.qTop),o=Math.max(t.qLeft,e.qArea.qLeft),a=Math.max(0,i-e.qArea.qTop),s=Math.min(i+n-e.qArea.qTop,e.qArea.qHeight),l=Math.max(0,o-e.qArea.qLeft),u=Math.min(o+r-e.qArea.qLeft,e.qArea.qWidth),c={qArea:{qHeight:s-a,qWidth:u-l,qTop:i,qLeft:o},qMatrix:[]};for(let t=a;t<s;t++)c.qMatrix.push(e.qMatrix[t].slice(l,u));return c},cacheWarden:function({bounds:e={width:0,height:0}}){return{release(t,n){const r=n.qTop-FM<=t.qTop,i=n.qLeft+n.qWidth+FM>=t.qLeft+t.qWidth,o=n.qTop+n.qHeight+FM>=t.qTop+t.qHeight,a=n.qLeft-FM<=t.qLeft;return r&&t.qTop>0||i&&t.qLeft+t.qWidth<e.width||o&&t.qTop+t.qHeight<e.height||a&&t.qLeft>0}}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeData",args:[e,[t]]})}};var UM={contains:function(e,t){if(!e)return!1;const{qArea:n}=e;return!!n&&(n.qTop<=t.qTop&&n.qTop+n.qHeight>=t.qTop+t.qHeight)},patcher:function({layoutService:e}){const t=t=>{t.qArea.qHeight=t.qData[0].qSubNodes.length,t.qArea.qWidth=e.meta.size.x};return t.should=e=>0===e.qArea.qHeight&&0===e.qArea.qWidth&&!!e.qData.length,t},slicer:function(e,t){const n=Math.max(0,t.qHeight)-Math.abs(Math.min(0,t.qTop-e.qArea.qTop)),r=Math.max(t.qTop,e.qArea.qTop),i=Math.max(t.qLeft,e.qArea.qLeft),o=Math.max(0,r-e.qArea.qTop),a=Math.min(r+n-e.qArea.qTop,e.qArea.qHeight),s=e.qData[0].qUp+e.qArea.qHeight+e.qData[0].qDown-r-(a-o),l={qArea:{qHeight:a-o,qWidth:e.qArea.qWidth,qTop:r,qLeft:i},qData:[{...e.qData[0],qUp:r,qDown:s,qSubNodes:[]}]};for(let t=o;t<a;t++)l.qData[0].qSubNodes.push(e.qData[0].qSubNodes[t]);return l},cacheWarden:function({bounds:e={height:0}}){return{release(t,n){const r=n.qTop-FM<=t.qTop,i=n.qTop+n.qHeight+FM>=t.qTop+t.qHeight;return r&&t.qTop>0||i&&t.qTop+t.qHeight<e.height}}},request:function({layoutService:e,definitionPath:t}){const n=e.getLayoutValue("dimensionAxis.axisDisplayMode","auto");return e=>{const r={method:"getHyperCubeStackData",args:[t,[e]]};return"auto"===n&&r.args.push(600),r}}};var YM={contains:function(){return!1},patcher:function(){const e=e=>e;return e.should=()=>!1,e},slicer:function(e){return e},cacheWarden:function(){return{release:()=>!0}},request:function({definitionPath:e}){return t=>({method:"getHyperCubeTreeData",args:[e,[t]]})}};const WM="pages";const XM="discretePan",GM=10;function KM({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{type:"Pan",key:"discrete:pan",options:{event:XM,pointers:1,threshold:GM,enable(r,i){return this.started===XM||!i||!(!t.scroll.enabled()||!o.enabled())&&e.componentsFromPoint({x:i.center.x,y:i.center.y}).some((e=>e.key===n))}},events:{[`${XM}start`](e){e.preventDefault(),this.started=XM;const t="horizontal"===r.meta.major.orientation?e.deltaX:e.deltaY;this.previousTotalDelta=t<0?-GM:GM},[`${XM}move`](e){e.preventDefault();const t="horizontal"===r.meta.major.orientation,n=t?e.deltaX:e.deltaY,a=t&&i?-1:1,s=(n-this.previousTotalDelta)*a;this.previousTotalDelta=n,o.scroll(s)},[`${XM}end`](e){e.preventDefault(),this.started=!1},[`${XM}cancel`](e){e.preventDefault(),this.started=!1}}}}function JM({chart:e,componentKey:t,actions:n,scroller:r}){return function(i){if(!n.scroll.enabled()||!r.enabled())return;const[o]=e.componentsFromPoint({x:i.clientX,y:i.clientY}).filter((e=>e.key===t));if(!o)return;i.preventDefault();const a=Math.abs(i.deltaY)>Math.abs(i.deltaX)?i.deltaY:i.deltaX,s=Math.sign(-a)*jM;r.scroll(s)}}function ZM({layoutService:e}){const t=function({layoutService:e}){const t=Math.floor(_M/(e.meta.dimensionCount+e.meta.measureCount));return function({width:e,height:n}){const r=Math.min(t,Math.max(HM.MAXIMUM,n));return{width:e,height:Math.max(HM.MINIMUM,Math.min(n*HM.MULTIPLIER,r))}}}({layoutService:e}),n={width:e.meta.size.x,height:e.meta.size.y};return function(e){const{width:r,height:i}=t({width:e.qWidth,height:e.qHeight}),o=i?Math.ceil((i-e.qHeight)/2):0,a=r?Math.ceil((r-e.qWidth)/2):0;return{qHeight:i?Math.min(i,n.height):e.qHeight,qWidth:r?Math.min(r,n.width):e.qWidth,qTop:i?Math.max(0,Math.min(e.qTop-o,n.height-i)):e.qTop,qLeft:r?Math.max(0,Math.min(e.qLeft-a,n.width-r)):e.qLeft}}}function QM(e){let t,n;const r=i=>{t=i;const{method:o,args:a}=t.request;e[o](...a).then((e=>{if(t.canceled||n)return t.reject($M),t=null,void(n&&(r(n),n=null));t.resolve(e[0]),t=null}))},i=e=>new Promise(((i,o)=>{const a={request:e,resolve:i,reject:o,canceled:!1,cancel:()=>{a.canceled=!0}};t?(e=>{n&&n.reject($M),n=e})(a):r(a)}));return i.isProcessing=()=>!!t,i.hasQueued=()=>!!n,i.cancel=()=>{i.isProcessing()&&t.cancel(),i.hasQueued()&&(n.reject($M),n=null)},i}const eC={command:{update:()=>{}}};function tC({dataStore:e,composition:t,enigmaModel:n,layoutService:r,trendLineModel:i=eC,definitionPath:o,processDataPage:a}){const{slicer:s,cacheWarden:l,request:u}=t,c=function({dataStore:e,slice:t,warden:n,expand:r,request:i,process:o,connectionless:a,processDataPage:s}){return(l,{onProcessing:u}={})=>{if(e.contains(l)){const r=e.getCurrent();if(a)return Promise.resolve(t(r,l));const i=n.release(r.qArea,l),s=o.isProcessing();if(!i&&s&&o.cancel(),!i||s)return Promise.resolve(t(r,l))}if(a)return Promise.resolve(e.getCurrent());o.isProcessing()&&u&&u();const c=r(l);return o(i(c)).then((n=>(s(n),e.add(n),t(n,l))))}}({dataStore:e,slice:s,warden:l({bounds:{width:r.meta.size.x,height:r.meta.size.y}}),expand:ZM({layoutService:r}),request:u({layoutService:r,definitionPath:o}),process:QM(n),connectionless:r.meta.isSnapshot,processDataPage:a}),d=O(((e,{onProcessing:t,onData:n})=>{c(e,{onProcessing:t}).then((e=>n(e))).catch((e=>{if(e!==$M)throw e}))}),BM);return function(e,{onProcessing:t=zM,onDataPage:n=zM}={}){d(e,{onProcessing:t,onData:e=>{r.setDataPages(e?[e]:[]),i.command.update(),n(e)}})}}var nC={inTotal:function({layoutService:e}){return e.meta.size.x},area:function({layoutService:e}){return{qTop:0,qHeight:1,qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:i}=t,o=e.getDataPages()[0],a=i/r;return[a,n.inView>=n.inTotal?a+1:a+o.qArea.qWidth/n.inView]}};var rC={inTotal:function({layoutService:e}){if(e.meta.isSnapshot&&!e.getLayoutValue("reducedHyperCube")){const[t]=e.getDataPages();if(t)return t.qArea.qHeight}return e.meta.size.y},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const i=void 0===r?4:r,o=Math.max(0,Math.floor(t)-i/2);return{qTop:o,qHeight:Math.min(e.meta.size.y-o,Math.max(0,Math.ceil(n+i))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const{pixel:i}=t,o=e.getDataPages()[0],a=r/n.inView,s=(i+o.qArea.qTop*a)/r;return[s,n.inView>=n.inTotal?s+1:s+o.qArea.qHeight/n.inView]}};function iC(e){const{groupSize:t,measureCount:n}=e.meta;return null!=t?t:n}function oC(e,t){const n=[];for(let r=0;r<e.length;r++){const i=t(e[r]);-1===n.indexOf(i)&&n.push(i)}return n.length}function aC(e){return oC(e.qMatrix,(e=>e[0].qElemNumber))-1}var sC={inTotal:function({layoutService:e}){const t=iC(e);return e.meta.size.y*t*(1+1/t)-1},area:function({layoutService:e,itemOffset:t,inView:n,areaBuffer:r}){const i=iC(e),o=void 0===r?i:r,a=t/(i+1),s=Math.max(0,Math.floor((t-a-o/2)/i));return{qTop:s,qHeight:Math.min(e.meta.size.y-s,Math.max(0,Math.ceil((n+o)/i+1))),qLeft:0,qWidth:e.meta.size.x}},scaleRange:function({layoutService:e,offsets:t,items:n,viewSize:r}){const i=iC(e),o=e.getDataPages()[0],a=r/n.inView,{pixel:s}=t,l=aC(o),u=o.qArea.qHeight*i+l,c=(s+(o.qArea.qTop*i+o.qArea.qTop)*a)/r;return[c,n.inView>=n.inTotal?c+1:c+u/n.inView]}};const lC=(e,t)=>t/(e.meta.size.y/e.meta.size.dimensions[0]+1),uC=(e,t)=>{const n={successful:!0,count:0};let r=Math.abs(Math.floor(t));const i=[];for(let t=0;t<=r;t++){if(!e[t])return n.successful=!1,n;const o=e[t][0].qElemNumber;-1===i.indexOf(o)&&(i.push(o),r--)}return n.count=i.length-1,n};function cC(e){return{itemOffset(t,n){if(0!==t.qArea.qTop)return lC(e,n);const r=uC(t.qMatrix,n);return r.successful?r.count:lC(e,n)},area(t,n,r){if(0!==t.qArea.qTop)return lC(e,n);return oC(t.qMatrix.slice(0,r.qTop+1),(e=>e[0].qElemNumber))-1}}}var dC={inTotal:function({layoutService:e}){return e.meta.size.y+e.meta.size.dimensions[0]-1},area:function({getDataPages:e,layoutService:t,itemOffset:n,inView:r}){const i=cC(t).itemOffset(e(),n),o=Math.max(0,Math.floor(n-i));return{qTop:o,qHeight:Math.min(t.meta.size.y-o,Math.max(0,Math.ceil(r+1))),qLeft:0,qWidth:t.meta.size.x}},scaleRange:function({getDataPages:e,layoutService:t,offsets:n,items:r,viewSize:i,upperBound:o}){const a=t.getDataPages()[0],s=i/r.inView,{item:l,pixel:u}=n,c=cC(t).area(e(),l,a.qArea),d=aC(a),m=a.qArea.qHeight+d,h=u===o?(r.inView-m)*s/i:(u+(a.qArea.qTop+c)*s)/i;return[h,r.inView>=r.inTotal?h+1:h+m/r.inView]}};function mC({chart:e,rect:t,dockService:n,itemWidths:r,axisKey:i,renderer:o,isGrouped:a,dimensionAxis:s,inTotal:l,isMajorLabelless:u,maxDataRows:c}){const{DEFAULT:d,SQUEEZE:m,LABELLESS:h}=r[n.meta.chart.mode],f="horizontal"===n.meta.major.orientation,{axisDisplayMode:p="auto",maxVisibleItems:y=10,label:g}=s,v=f?t.width:t.height,x=v/l>=m;switch(p){case"max":return Math.min(l,c);case"custom":return Math.min(y,c);default:return u?v/h:x?function({chart:e,isHorizontal:t,axisKey:n,renderer:r={},isGrouped:i,itemSize:o,label:a}){if(i||"auto"!==a&&"tilted"!==a)return!1;const s=e.component(n),{measureText:l}=r;if(!s||!l)return!0;const{fontFamily:u,fontSize:c,tiltAngle:d}=s.settings.settings.labels,{height:m}=l({fontFamily:u,fontSize:c,text:"M"});if(!t)return m>o;const h=(90-d)*(Math.PI/180);return m>Math.cos(h)*o}({chart:e,isHorizontal:f,axisKey:i,renderer:o,isGrouped:a,itemSize:m,label:g})?v/d:l:v/d}}function hC({chart:e,getRect:t,getDataPages:n,layoutService:r,dockService:i,getItemWidths:o,axisKey:a,renderer:s,areaBuffer:l,rtl:u}){const{inTotal:c,area:d,scaleRange:m}=function({layoutService:e}){const{isDimensionless:t,isGrouped:n,isGroupedByMeasure:r}=e.meta;return t?nC:n?r?sC:dC:rC}({layoutService:r}),h=()=>"horizontal"===i.meta.major.orientation?t().width:t().height,f=e=>e?h()/e:0,p=(e,t)=>-(e-t)*f(t);return{getItems(){const n=r.getLayoutValue("dimensionAxis"),l=c({layoutService:r});return{inTotal:l,inView:mC({chart:e,rect:t(),dockService:i,itemWidths:o(),axisKey:a,renderer:s,isGrouped:r.meta.isGrouped,dimensionAxis:n,inTotal:l,isMajorLabelless:"none"===n.show||"title"===n.show,maxDataRows:Math.floor(_M/(r.meta.dimensionCount+r.meta.measureCount))})}},getItemSize({items:e}){const{inView:t}=e;return f(t)},getOffsets({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t,i=Math.min(0,Math.max(e,p(n,r))),o=r?Math.abs(r*i/h()):0;return{start:{pixel:i,item:o},end:{item:Math.min(o+(r||0),n)}}},getUpperBound({items:e}){const{inTotal:t,inView:n}=e;return p(t,n)},getViewRange({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return function({viewSize:e,inTotal:t,inView:n,pixelOffset:r}){const i=e/n*t,o=Math.abs(r)/i;return[o,o+e/i]}({viewSize:h(),inTotal:n,inView:r,pixelOffset:e})},getArea:({itemOffset:e,items:t})=>d({getDataPages:n,layoutService:r,itemOffset:e,inView:t.inView,areaBuffer:l}),getScaleRange({offsets:e,items:t}){const o=m({getDataPages:n,layoutService:r,offsets:e,items:t,viewSize:h(),upperBound:p(t.inTotal,t.inView)});return"horizontal"===i.meta.major.orientation&&u?function(e){return[1-e[1],1-e[0]]}(o):o},validate:{offset({pixelOffset:e,items:t}){const{inTotal:n,inView:r}=t;return e<=0&&e>=p(n,r)}},convert:{itemToPixelOffset({itemOffset:e,items:t}){const{inView:n}=t,r=e*f(n);return Number.isFinite(r)?-r:0},relativeToPixelOffset({relativeOffset:e,items:t}){const{inTotal:n,inView:r}=t;return-e*(f(r)*n)}}}}function fC({chart:e,componentKey:t,state:n,dataStore:r,pageData:i,layoutService:o,dockService:a,itemWidths:s,getRect:l,axisKey:u,renderer:c,areaBuffer:d,viewState:m,rtl:h}){n.set("rect",{width:0,height:0}),n.set("itemWidths",{}),n.set("itemSize",0),n.set("items",{}),n.set("offsets",{}),n.set("finished",0),n.set("scaleRange",[0,1]);const f=hC({chart:e,getRect:()=>n.get("rect"),getDataPages:r.getCurrent,layoutService:o,dockService:a,getItemWidths:()=>n.get("itemWidths"),axisKey:u,renderer:c,areaBuffer:d,rtl:h}),p=()=>{const e=f.getItems();return n.set("items",e),e},y=({pixelOffset:e,items:t})=>{const r=f.getOffsets({pixelOffset:e,items:t});return n.set("offsets",r),r},g=e=>{const t=Date.now(),r=p(),a=y({pixelOffset:e,items:r}),s=f.getArea({itemOffset:a.start.item,items:r});if((e=>{const[{qArea:t}]=o.getDataPages();return!!t&&Object.keys(e).every((n=>e[n]===t[n]))})(s))return void((f.validate.offset({pixelOffset:e,items:r})||m.get("scrollOffset").start!==a.start.item)&&(n.set("finished",t),n.set("scaleRange",f.getScaleRange({offsets:a.start,items:r})),m.preventSet("viewRange",f.getViewRange({pixelOffset:a.start.pixel,items:r})),m.set("scrollOffset",{start:a.start.item,end:a.end.item})));m.preventSet("viewRange",f.getViewRange({pixelOffset:a.start.pixel,items:r}));const l=()=>{n.get("finished")>t||(n.set("finished",t),n.set("scaleRange",f.getScaleRange({offsets:a.start,items:r})),m.set("scrollOffset",{start:a.start.item,end:a.end.item}))};i(s,{onProcessing:l,onDataPage:l})};return{enabled(){const{inTotal:e,inView:t}=n.get("items");return e>t},itemSize:()=>n.get("itemSize"),scaleRange:()=>n.get("scaleRange"),initialize(){const r=e.component(t);if(!r)return Promise.resolve();n.set("rect","function"==typeof l?l():r.rect),n.set("itemWidths","function"==typeof s?s():s);const a=p();n.set("itemSize",f.getItemSize({items:a}));const u=(({items:e})=>{const t=o.getLayoutValue("scrollStartPos"),n=m.get("scrollOffset");if(void 0===n)return 1===t?f.getUpperBound({items:e}):0;if("number"==typeof n)return f.convert.itemToPixelOffset({itemOffset:n,items:e});const{start:r,end:i}=n,a=1===t&&i?i-e.inView:r;return f.convert.itemToPixelOffset({itemOffset:a,items:e})})({items:a}),c=y({pixelOffset:u,items:a});m.preventSet("viewRange",f.getViewRange({pixelOffset:c.start.pixel,items:a}));const d=f.getArea({itemOffset:c.start.item,items:a});return new Promise((e=>{i(d,{onDataPage:()=>{n.set("scaleRange",f.getScaleRange({offsets:c.start,items:a})),m.preventSet("scrollOffset",{start:c.start.item,end:c.end.item}),e()}})}))},scroll(e){const t=n.get("offsets").start.pixel+e;g(t)},scrollToRelative(e){const t=n.get("items"),r=f.convert.relativeToPixelOffset({relativeOffset:e,items:t});g(r)}}}function pC({chart:e,actions:t,componentKey:n,enigmaModel:r,layoutService:i,dockService:o,trendLineModel:a,itemWidths:s,viewState:l,rtl:u,options:{definitionPath:c="/qHyperCubeDef",getRect:d,axisKey:m,renderer:h,areaBuffer:f,processDataPage:p=(()=>{})}={}}){const y=C(),g=function({qMode:e}){switch(e){case"S":default:return VM;case"K":return UM;case"T":return YM}}({qMode:i.getHyperCubeValue("qMode")}),v=function({state:e,contains:t}){return e.set(WM,[]),{add:t=>{const n=e.get(WM);n.length=0,n.push(t)},getCurrent:()=>e.get(WM)[0],getAll:()=>e.get(WM),contains:n=>t(e.get(WM)[0],n)}}({state:y,contains:g.contains});!function({layoutService:e,dataStore:t,composition:n}){const r=e.getDataPages()[0];if(!r)return;const i=n.patcher({layoutService:e});i.should(r)&&i(r),t.add(r)}({layoutService:i,dataStore:v,composition:g});const x=function({buffer:e}){return void 0===e?void 0:2*Math.round(e/2)}({buffer:f}),b=tC({dataStore:v,composition:g,enigmaModel:r,layoutService:i,trendLineModel:a,definitionPath:c,processDataPage:p}),S=fC({chart:e,componentKey:n,state:y,dataStore:v,pageData:b,layoutService:i,dockService:o,itemWidths:s,getRect:d,axisKey:m,renderer:h,areaBuffer:x,viewState:l,rtl:u}),M=function({layoutService:e,dataStore:t}){return function(n){const r=E(n,`${e.refs.dataPages}`);r.length=0,r.push(t.getCurrent())}}({layoutService:i,dataStore:v}),A=function({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o}){return{gestures:[KM({chart:e,actions:t,componentKey:n,dockService:r,rtl:i,scroller:o})],native:{type:"native",events:{wheel:JM({chart:e,actions:t,componentKey:n,scroller:o})}}}}({chart:e,actions:t,componentKey:n,dockService:o,rtl:u,scroller:S});return{interactions:A,query:{getCanScroll:()=>S.enabled(),getItemSize:()=>S.itemSize(),getScaleRange:()=>S.scaleRange(),getCurrentDataPage:()=>v.getCurrent()},command:{initialize:()=>S.initialize(),scrollTo:e=>S.scrollToRelative(e),setSnapshotData:e=>M(e)}}}var yC={SPARK:{DEFAULT:7,SQUEEZE:7,LABELLESS:7},XSMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},SMALL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},MEDIUM:{DEFAULT:28,SQUEEZE:24,LABELLESS:20},FULL:{DEFAULT:28,SQUEEZE:24,LABELLESS:20}};function gC({layoutService:e,key:t}){const{style:n}=e.getLayoutValue("components",[]).filter((e=>e.key===t))[0]||{};return({property:r,defaultValue:i,index:o})=>{const a=n&&Object.hasOwnProperty.call(n,r)?n[r]:i;if(void 0===o)return a;const{style:s}=e.getHyperCubeValue((e=>`qMeasureInfo.${e}.styling`)(o),[]).filter((e=>e.key===t))[0]||{};return s&&Object.hasOwnProperty.call(s,r)?s[r]:a}}function vC({layoutService:e,dockService:t,themeService:n,flags:r}){const{BAR:i,LINE:o,POINT:a}=Zl,s=n.getStyles(),l=gC({layoutService:e,key:"bar"}),u=gC({layoutService:e,key:"line"}),c=()=>{const e=l({property:"strokeWidth",defaultValue:"none"});return e?i.STROKE.WIDTH[e.toUpperCase()]:0},d=t=>r.isEnabled("CLIENT_IM_3050")?e.getLayoutValue("components",[]).find((e=>e.key===t)):void 0;return{query:{bar:{getHasStyling:()=>!!e.getLayoutValue("components",[]).filter((e=>"bar"===e.key)).length,getWidthFn:()=>()=>l({property:"width",defaultValue:.7}),getHasStrokeWidth:()=>!!c(),getStrokeWidth:()=>c(),getStrokeColor:()=>l({property:"strokeColor",defaultValue:{index:-1,color:i.STROKE.COLOR}}).color,label:{getStyle:()=>{var e,t,n,r,i,o,a,l,u,c,m,h,f,p,y,g;return{fill:null!==(e=null===(t=d("bar"))||void 0===t||null===(n=t.bar)||void 0===n||null===(r=n.label)||void 0===r||null===(i=r.value)||void 0===i||null===(o=i.color)||void 0===o?void 0:o.color)&&void 0!==e?e:s.label.value.color,fontSize:null!==(a=null===(l=d("bar"))||void 0===l||null===(u=l.bar)||void 0===u||null===(c=u.label)||void 0===c||null===(m=c.value)||void 0===m?void 0:m.fontSize)&&void 0!==a?a:s.label.value.numFontSize,fontFamily:null!==(h=null===(f=d("bar"))||void 0===f||null===(p=f.bar)||void 0===p||null===(y=p.label)||void 0===y||null===(g=y.value)||void 0===g?void 0:g.fontFamily)&&void 0!==h?h:s.label.value.fontFamily}}}},line:{getCurveFn:()=>(e,t)=>u({property:"lineCurve",defaultValue:o.CURVE.LINEAR,index:t}),getStrokeWidthFn:()=>(e,n)=>u({property:"lineThickness",defaultValue:"FULL"===t.meta.chart.mode?o.WIDTH.FULL.DEFAULT:o.WIDTH.LESS.DEFAULT,index:n}),getStrokeDasharrayFn:()=>(e,t)=>{const n=u({property:"lineType",defaultValue:o.TYPE.SOLID,index:t});return n&&o.TYPE[n.toUpperCase()]}},point:{getSize:e=>u({property:"dataPointSize",defaultValue:a.SIZE.DEFAULT,index:e}),label:{getStyle:()=>{var e,t,n,r,i,o,a,l,u,c,m,h,f,p,y,g;return{fill:null!==(e=null===(t=d("line"))||void 0===t||null===(n=t.line)||void 0===n||null===(r=n.label)||void 0===r||null===(i=r.value)||void 0===i||null===(o=i.color)||void 0===o?void 0:o.color)&&void 0!==e?e:s.label.value.color,fontSize:null!==(a=null===(l=d("line"))||void 0===l||null===(u=l.line)||void 0===u||null===(c=u.label)||void 0===c||null===(m=c.value)||void 0===m?void 0:m.fontSize)&&void 0!==a?a:s.label.value.fontSize,fontFamily:null!==(h=null===(f=d("line"))||void 0===f||null===(p=f.line)||void 0===p||null===(y=p.label)||void 0===y||null===(g=y.value)||void 0===g?void 0:g.fontFamily)&&void 0!==h?h:s.label.value.fontFamily}}}},axis:{title:{getStyle:()=>{var e,t,n,r,i,o,a,l,u,c,m,h,f;return{fontFamily:null!==(e=null===(t=d("axis"))||void 0===t||null===(n=t.axis)||void 0===n||null===(r=n.title)||void 0===r?void 0:r.fontFamily)&&void 0!==e?e:s.axis.title.fontFamily,fontSize:null!==(i=null===(o=d("axis"))||void 0===o||null===(a=o.axis)||void 0===a||null===(l=a.title)||void 0===l?void 0:l.fontSize)&&void 0!==i?i:s.axis.title.fontSize,color:null!==(u=null===(c=d("axis"))||void 0===c||null===(m=c.axis)||void 0===m||null===(h=m.title)||void 0===h||null===(f=h.color)||void 0===f?void 0:f.color)&&void 0!==u?u:s.axis.title.color}}},label:{getStyle:()=>{var e,t,n,r,i,o,a,l,u,c,m,h,f,p,y,g;return{fill:null!==(e=null===(t=d("axis"))||void 0===t||null===(n=t.axis)||void 0===n||null===(r=n.label)||void 0===r||null===(i=r.name)||void 0===i||null===(o=i.color)||void 0===o?void 0:o.color)&&void 0!==e?e:s.axis.label.name.color,fontSize:null!==(a=null===(l=d("axis"))||void 0===l||null===(u=l.axis)||void 0===u||null===(c=u.label)||void 0===c||null===(m=c.name)||void 0===m?void 0:m.fontSize)&&void 0!==a?a:s.axis.label.name.fontSize,fontFamily:null!==(h=null===(f=d("axis"))||void 0===f||null===(p=f.axis)||void 0===p||null===(y=p.label)||void 0===y||null===(g=y.name)||void 0===g?void 0:g.fontFamily)&&void 0!==h?h:s.axis.label.name.fontFamily}}}},legend:{title:{getStyle:()=>{var e,t,n,r,i,o,a,l,u,c,m,h,f;return{fontFamily:null!==(e=null===(t=d("legend"))||void 0===t||null===(n=t.legend)||void 0===n||null===(r=n.title)||void 0===r?void 0:r.fontFamily)&&void 0!==e?e:s.legend.title.fontFamily,fontSize:null!==(i=null===(o=d("legend"))||void 0===o||null===(a=o.legend)||void 0===a||null===(l=a.title)||void 0===l?void 0:l.fontSize)&&void 0!==i?i:s.legend.title.fontSize,color:null!==(u=null===(c=d("legend"))||void 0===c||null===(m=c.legend)||void 0===m||null===(h=m.title)||void 0===h||null===(f=h.color)||void 0===f?void 0:f.color)&&void 0!==u?u:s.legend.title.color}}},label:{getStyle:()=>{var e,t,n,r,i,o,a,l,u,c,m,h,f;return{fontFamily:null!==(e=null===(t=d("legend"))||void 0===t||null===(n=t.legend)||void 0===n||null===(r=n.label)||void 0===r?void 0:r.fontFamily)&&void 0!==e?e:s.legend.label.fontFamily,fontSize:null!==(i=null===(o=d("legend"))||void 0===o||null===(a=o.legend)||void 0===a||null===(l=a.label)||void 0===l?void 0:l.fontSize)&&void 0!==i?i:s.legend.label.fontSize,color:null!==(u=null===(c=d("legend"))||void 0===c||null===(m=c.legend)||void 0===m||null===(h=m.label)||void 0===h||null===(f=h.color)||void 0===f?void 0:f.color)&&void 0!==u?u:s.legend.label.color}}}}}}}function xC({dataset:e,data:t,valueData:n}){var r;const{source:i,label:o,value:a}=n,s=e(i.key).field(i.field);return s.raw().isCustomFormatted?o:"-"===o||""===a||Number.isNaN(a)||"NaN"===a||null!==(r=t.null)&&void 0!==r&&r.value?"-":s.formatter()(a)}function bC({chart:e,actions:t,translator:n,rtl:r,dockService:i,seriesModel:o,colorService:a,themeService:s,propertiesModel:l,custom:u}){const c=s.getStyles(),d=({data:e})=>e.major.value,m=({data:e})=>!e.null.value||0===e.end.value,{SLICED_HAT:h}=is.COMPONENT,{PRIMARY:f,SECONDARY:p}=os.AXIS,y=function({dockService:e,seriesModel:t}){const{AXIS:n,BAR_OOB:r,DATA_OOB_MARKER:i,SLICED_HAT:o}=is.COMPONENT,{PRIMARY:a,SECONDARY:s}=os.AXIS,{orientation:l}=e.meta.chart,u="vertical"===l,c=[...t.meta.barComponentKeys,...t.meta.markerComponentKeys,...t.meta.pointComponentKeys];return[({chart:e,hovered:t,meta:l})=>{const[d]=t,{triggerer:m}=l,h=m===n.MAJOR?d.data.value:d.data.major.value;if(u){const t=e.findShapes("container").find((e=>(e.key===`${o}-max-${a}`||e.key===`${o}-max-${s}`)&&e.data&&e.data.value===h&&e.children.length));if(t)return{key:t.key,bounds:t.bounds}}const f=e.findShapes("path").find((e=>(e.key===`${r}-max-${a}`||e.key===`${r}-max-${s}`||e.key===`${i}-max`)&&e.data.major.value===h));if(u&&f)return{key:f.key,bounds:f.bounds};const p=e.findShapes("path").find((e=>(e.key===`${r}-min-${a}`||e.key===`${r}-min-${s}`||e.key===`${i}-min`)&&e.data.major.value===h)),y=e.findShapes("*").filter((e=>c.indexOf(e.key)>-1&&e.data&&e.data.major.value===h));if(u&&p&&!y.find((e=>e.data.end.source.field!==p.data.end.source.field)))return{key:p.key,bounds:p.bounds};const g=f||p;return!(u||!g||y.find((e=>e.data.end.source.field!==g.data.end.source.field)))&&{key:g.key,bounds:g.bounds}},"collectible"]}({dockService:i,seriesModel:o});return N({chart:e,translator:n,config:{rtl:r,enable:()=>t.tooltip.enabled(),getColorSettings:()=>a.getSettings(),style:{fontFamily:c.fontFamily},main:{key:is.COMPONENT.TOOLTIP,getGroupByValue:d,collectibles:[...o.meta.barComponentKeys.map((e=>({key:e,type:"bar",major:d}))),...o.meta.pointComponentKeys.map((e=>({key:e,type:"point",major:d}))),...o.meta.markers.map((e=>({key:e.key,type:e.type,major:d})))],triggers:[{keys:[is.COMPONENT.AXIS.MAJOR],collect:{from:"dimension",by:({data:e})=>e.value,filter:m},placement:y},{keys:[...o.meta.barComponentKeys,...o.meta.markerComponentKeys,`${h}-max-${f}`,`${h}-max-${p}`,`${h}-min-${f}`,`${h}-min-${p}`,`${is.COMPONENT.BAR_OOB}-max-${f}`,`${is.COMPONENT.BAR_OOB}-max-${p}`,`${is.COMPONENT.BAR_OOB}-min-${f}`,`${is.COMPONENT.BAR_OOB}-min-${p}`,`${is.COMPONENT.DATA_OOB_MARKER}-max`,`${is.COMPONENT.DATA_OOB_MARKER}-min`],collect:{from:"dimension",by:d,filter:m},placement:y},{keys:[...o.meta.pointComponentKeys],distance:3,collect:{from:"dimension",by:d,filter:m},placement:y}],section:({h:e,nodes:t,dataset:n,create:r,util:i})=>{const[o]=t,{title:a,description:s,measures:l}=u.isEnabled()?u.getAttributes({dataset:n,nodes:[o]}):{},c=[];a&&c.push(r.text({value:a,style:{bold:!0}})),s&&c.push(r.text({value:s}));const d=u.hideBasic();d&&!l.length&&(a||s)||c.push(r.text({value:o.data.label,style:{bold:!0}})),d||(c.push(r.color({nodes:t,property:is.SCALE.COLOR})),c.push(...t.map((e=>{const{segment:t,end:o}=e.data,a=t||o,{key:s,field:l}=a.source;return r.measure({label:i.dataset.title(s,l),value:xC({dataset:n,data:e.data,valueData:a})})})))),l&&c.push(...l.map((e=>r.measure({label:e.label,value:e.value,survive:{color:!0,duplicate:!0}})))),u.chart.isEnabled()&&(u.chart.hasLimitation()?(u.chart.destroy(),c.push(r.raw({value:u.chart.createLimitationRow()}))):c.push(r.raw({value:u.chart.createContainer({h:e})})));const{customTooltipImages:m}=o.data;return u.isEnabled()&&m&&c.push(...m.map((t=>r.raw({value:u.createImageRow({value:t,h:e})})))),c},layout:{grouping:!0,single:()=>!(!u.isEnabled()||!u.hasImages())||u.chart.isEnabled()},events:{tooltip:{beforeShow:({collectNodes:e})=>u.isEnabled()&&u.hasImages()?u.addImages({nodes:e()}):Promise.resolve(),afterShow:({nodes:e})=>{u.chart.isEnabled()&&!u.chart.hasLimitation()&&u.chart.show({nodes:e,properties:l.query.getProperties()})}},interaction:{mouseleave:()=>{u.chart.isEnabled()&&u.chart.hasAlternateState()&&u.chart.hide()}}}},legend:{keys:{tooltip:is.COMPONENT.LEGEND_TOOLTIP,component:is.COMPONENT.LEGEND_CATEGORICAL}}}})}const{model:SC}=tm,EC=({picasso:e,chart:t,environment:m,flags:h,viewState:f,viewCache:p,actions:y,selectionService:g})=>{const v=a(),{width:x,height:b}=i(),[S,M]=n(),[C,A]=n(),O=s(),T=l(),N=u(),L=c(),P=d();r((()=>{if(!(v&&null!=t&&t.update&&m&&f))return;const n=w({source:v,metaAdditionsFn:function({layout:e}){var t,n,r;const i=E(e,"qHyperCube.qMeasureInfo",[]),o=i.some((({series:e=os.NOPE_SERIES})=>bc(e)===os.TYPE.LINE)),a=ve.continuous(e,(()=>o&&me.isTime(!0,e))),s=!aM(E(e,"version","")),l=i.filter((({series:e=os.NOPE_SERIES})=>bc(e)===os.TYPE.BAR)),u=l.length,c=l.filter((({series:e=os.NOPE_SERIES})=>e.axis!==os.AXIS.SECONDARY)).length,d=l.filter((({series:e=os.NOPE_SERIES})=>e.axis===os.AXIS.SECONDARY)).length,m=s?c>1||d>1:u>1,h=("grouped"!==E(e,"barGrouping.grouping")||a)&&m,f=!h&&u>1,p=s&&h&&(c>0&&d>1||c>1&&d>0),y=!(null==e||null===(t=e.qHyperCube)||void 0===t||null===(n=t.qDimensionInfo)||void 0===n||null===(r=n[0])||void 0===r||!r.qLocked);return{canBeContinuous:me.canBeContinuous(e),isDiscrete:!a,isContinuous:a,isTime:me.isTime(a,e),isSnapshot:ve.snapshot(e),isBarSeriesStacked:h,isBarSeriesGrouped:f,isBarSeriesStackedInBothAxis:p,isGrouped:f||p,isGroupedByMeasure:f||p,isDimensionLocked:y,groupSize:p?2:u,hasLineSeries:o}}}),{options:r,translator:i}=m,{direction:o,viewState:a={}}=r,s="rtl"===o,{legendScrollOffset:l,scrollOffset:u}=n.meta.isSnapshot?n.getLayoutValue("snapshotData.content.chartData",{}):a;f.preventSet("scrollOffset",u),f.preventSet("legendScrollOffset",l),f.preventSet("title",n.getLayoutValue("title"));const c=function({genericObjectModel:e,layoutService:t}){const n={cube:void 0,on:!1},r=cM({genericObjectModel:e,layoutService:t});return{query:{getCube:()=>n.cube,getIsReduced:()=>n.on},command:{initialize:()=>r().then((({reducedCube:e})=>{n.cube=e,n.on=!!(n.cube&&n.cube.qDataPages[0]&&n.cube.qDataPages[0].qIsReduced)})),setSnapshotData:e=>{e.reducedHyperCube=n.cube}}}}({genericObjectModel:O,layoutService:n}),d=R({chart:t,layoutService:n,config:{logicalSize:{width:x,height:b},rtl:s},typeConfig:{type:"major-minor",fallback:"vertical",invert:!0,measureAxes:[{ref:"measureAxes.0",name:"minor"},{ref:"measureAxes.1",name:"minorSecondary"}]}}),S=sM({layoutService:n,flags:h}),C=n.meta.isDiscrete?function({chart:e,genericObjectModel:t,layoutService:n,dockService:r,seriesModel:i,viewState:o,rtl:a,actions:s,picasso:l}){return pC({chart:e,actions:s,componentKey:nm(i),enigmaModel:t,layoutService:n,dockService:r,viewState:o,rtl:a,itemWidths:yC,options:{axisKey:is.COMPONENT.AXIS.MAJOR,renderer:l.renderer("svg")()}})}({chart:t,genericObjectModel:O,layoutService:n,dockService:d,seriesModel:S,viewState:f,rtl:"rtl"===m.options.direction,actions:y,picasso:e}):void 0,A=n.meta.isContinuous?SC({model:O,layoutService:n,viewState:f,viewCache:p}):void 0,q=I({theme:m.theme,config:{id:"comboChart",resolve:[["object","label.value","numFontSize","12px",e=>parseInt(e,10)]]}}),D=vC({layoutService:n,dockService:d,themeService:q,flags:h}),$=DM({actions:y,appLayoutModel:N,appModel:T,chart:t,environment:m,flags:h,genericObjectModel:O,layoutService:n,picasso:e,seriesModel:S,viewState:f,styleModel:D}),z=function({layoutService:e,seriesModel:t}){const{isContinuous:n}=e.meta,r="qDimensionInfo/0",i=`${r}:numeric`,o=n?[{key:i,from:r,override:{value:e=>e.qNum}}]:void 0;return{main:{major:r,majorNumeric:i,minorsPrimary:t.meta.primarySeries.map((e=>e.ref)),minorsSecondary:t.meta.secondarySeries.map((e=>e.ref))},virtuals:o}}({layoutService:n,seriesModel:S}),_=fM({isPrimary:!0,layoutService:n,reducedModel:c,seriesModel:S,continuousModel:A,flags:h}),H=fM({isPrimary:!1,layoutService:n,reducedModel:c,seriesModel:S,continuousModel:A,flags:h}),B=kM({config:{measureAxesRef:"measureAxes.0",formatter:is.FORMATTER.PRIMARY},chart:t,layoutService:n,extremumModel:_,dockService:d,seriesModel:S,themeService:q}),F=kM({config:{measureAxesRef:"measureAxes.1",formatter:is.FORMATTER.SECONDARY},chart:t,layoutService:n,extremumModel:H,dockService:d,seriesModel:S,themeService:q}),j=LM({genericObjectModel:O,layoutService:n}),V=As({flags:h,layout:v,app:T,model:O,picasso:e,chart:t,translator:i,localeInfo:N.qLocaleInfo,embed:P,options:r}),U=bC({chart:t,actions:y,translator:i,rtl:s,dockService:d,seriesModel:S,colorService:$,themeService:q,propertiesModel:j,custom:V}),Y=rs({layoutService:n,discreteModel:C}),W=function(e){return{layout:e.getLayout(),keys:{SCALE:{MAJOR:is.SCALE.MAJOR,MAJOR_INNER:is.SCALE.MAJOR_INNER,MINOR:{PRIMARY:is.SCALE.MINOR.PRIMARY,SECONDARY:is.SCALE.MINOR.SECONDARY}},COMPONENT:{BAR_PRIMARY:`${is.COMPONENT.BAR}-${os.AXIS.PRIMARY}`,BAR_SECONDARY:`${is.COMPONENT.BAR}-${os.AXIS.SECONDARY}`,AXIS:{MAJOR:is.COMPONENT.AXIS.MAJOR,MAJOR_CONTINUOUS:is.COMPONENT.AXIS.MAJOR_CONTINUOUS,TIME_INNER:is.COMPONENT.AXIS.TIME_INNER,MINOR:{PRIMARY:is.COMPONENT.AXIS.MINOR.PRIMARY,SECONDARY:is.COMPONENT.AXIS.MINOR.SECONDARY}},AXIS_TITLE:{MAJOR:is.COMPONENT.AXIS_TITLE.MAJOR,MINOR:{PRIMARY:is.COMPONENT.AXIS_TITLE.MINOR.PRIMARY,SECONDARY:is.COMPONENT.AXIS_TITLE.MINOR.SECONDARY}}},COLLECTION:{MAIN:is.COLLECTION.MAIN}}}}(n),X=k({picassoInstance:e,plugins:L,pluginArgs:W});M({selectionService:g,genericObjectModel:O,appModel:T,dockService:d,styleModel:D,layoutService:n,fieldModel:z,seriesModel:S,reducedModel:c,primaryExtremumModel:_,secondaryExtremumModel:H,primaryTickModel:B,secondaryTickModel:F,propertiesModel:j,colorService:$,themeService:q,appLayoutModel:N,tooltipService:U,flags:h,...C&&{discreteModel:C},...A&&{continuousModel:A},refLineModel:Y,pluginService:X})}),[v,O,T,N,m,null==t?void 0:t.update,f]);const[,q]=o((()=>{if(!S)return Promise.resolve();const{layoutService:e,colorService:t,reducedModel:n,primaryExtremumModel:r,secondaryExtremumModel:i,propertiesModel:o,continuousModel:a,discreteModel:s,pluginService:l}=S,u=a?()=>{var t,n;a.update(e.getLayout());const r=a.initialFetch(),i=!e.meta.isSnapshot&&(null==m||null===(t=m.options)||void 0===t||null===(n=t.viewState)||void 0===n?void 0:n.zoom);return i&&f.preventSet("zoom",i),r}:()=>Promise.resolve(),c=t.initialize().then((()=>{const e=t.getSettings().field;g&&g.setBrushAliases({colorField:e}),t.custom.updateLegend()}));return Promise.all([l.initialize(),n.command.initialize(),O?o.command.initialize():Promise.resolve(),c,u(),y.scroll.attachDiscreteModel(s)]).then((()=>Promise.all([r.command.initialize(),i.command.initialize()]).then((()=>A(S)))))}),[S]);if(q)throw q;return C};const MC={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"}}]};const CC={query:{getCanScroll:()=>!0}};function AC({clearMinor:e,clearDiscrete:t,clearLegend:n}){e(),e({componentName:"minor-secondary-range-brush",eventName:"minorRange-secondary"}),t({brushName:!1}),n()}function OC({setSelectionInfo:e,event:t,components:n,clear:r}){const i=null!=n&&n.length?n.map((e=>e.key)).filter(Boolean):[];e({event:t,components:i,minorRangePrimary:"minorRange"===t,minorRange:["minorRange","minorRange-secondary"].includes(t),legendRange:"legendRange"===t,legendTap:"tap"===t&&i[0]===is.COMPONENT.LEGEND_CATEGORICAL}),r()}function TC({chart:e,actions:t}){const i=x(),o=a(),[s,l]=n();return r((()=>{if(null==e||!e.update||!e.scale||!i)return null;const n=e.scale(is.SCALE.MAJOR),r=P({chart:e,actions:t,selections:i,config:{allowSimultaneous:!0,brushRanges:!0,majorScale:n,selectionActions:{reset(){e.brushSelectionIncludeMax=void 0,t.lasso.active()&&t.lasso.action(!1)},clear:AC},selectionEvents:{start:OC}}});r.setLayout(o);const{destroy:a}=r;return l(r),()=>{a()}}),[i,null==e?void 0:e.update,null==e?void 0:e.scale]),r((()=>{null!=s&&s.setLayout&&o&&s.setLayout(o)}),[o]),s}const NC={version:"1.24.1",qHyperCubeDef:{qAlwaysFullyExpanded:!0,qDimensions:[],qMeasures:[],qInitialDataFetch:[{qWidth:17,qHeight:500}],qSuppressMissing:!0,qSuppressZero:!1},showTitles:!0,subtitle:"",title:"",footnote:"",barGrouping:{grouping:"grouped"},orientation:"vertical",scrollStartPos:0,nullMode:"gap",dataPoint:{show:!1,showLineLabels:!1,showBarLabels:!1},color:{auto:!0,mode:"primary",useBaseColors:"off",paletteColor:{index:6},useDimColVal:!0,useMeasureGradient:!0,persistent:!1,expressionIsColor:!0,expressionLabel:"",measureScheme:"sg",reverseScheme:!1,dimensionScheme:"12",autoMinMax:!0,measureMin:0,measureMax:10},legend:{dock:"auto",show:!0,showTitle:!0},components:[],dimensionAxis:{axisDisplayMode:"auto",continuousAuto:!0,dock:"near",label:"auto",maxVisibleItems:10,show:"all"},measureAxes:[{show:"all",dock:"near",spacing:1,autoMinMax:!0,minMax:"min",min:0,max:10},{show:"all",dock:"far",spacing:1,autoMinMax:!0,minMax:"min",min:0,max:10}],refLine:{refLines:[],refLines2:[],dimRefLines:[]},preferContinuousAxis:!0,showMiniChartForContinuousAxis:!0,tooltip:{auto:!0,hideBasic:!1,title:"",description:"",chart:void 0,imageComponents:void 0}};var wC=e=>t=>{const n=t.qHyperCubeDef.qMeasures,r=[0,0,0];let i;if(!n.length)return e.get("Visualizations.Descriptions.Bars");for(let e=0;e<n.length;++e)i=bc(n[e].qDef.series),i===os.TYPE.BAR?r[0]=1:i===os.TYPE.LINE?r[1]=1:r[2]=1;const o=["Visualizations.Descriptions.Marker","Visualizations.Descriptions.Line","Visualizations.Descriptions.ComboChart.Dimension.LineMarker","Visualizations.Descriptions.Bars","Visualizations.Descriptions.ComboChart.Dimension.BarMarker","Visualizations.Descriptions.ComboChart.Dimension.BarLine","Visualizations.Descriptions.ComboChart.Dimension.BarLineMarker"][parseInt(r.join(""),2)-1];return e.get(o)},RC=e=>(t,n)=>{let r;const i=t.qHyperCubeDef.qMeasures[n];if(i){const{type:e}=i.qDef.series;r=e===os.TYPE.LINE?"Visualizations.Descriptions.HeightLine":e===os.TYPE.BAR?"Visualizations.Descriptions.LengthBars":"Visualizations.Descriptions.ComboChart.Measure.HeightMarker"}else r=n?"Visualizations.Descriptions.HeightLine":"Visualizations.Descriptions.LengthBars";return e.get(r)};function IC(e){var t,n;const r=e.qHyperCubeDef.qMeasures,i=null===(t=e.color)||void 0===t?void 0:t.mode;"byDimension"===i&&1===r.length&&bc(null===(n=r[0].qDef)||void 0===n?void 0:n.series)===os.TYPE.LINE?e.color.mode="primary":"byDimension"===i&&r.length>1&&(e.color.mode="byMultiple")}function kC(e){const{translator:t}=e;return{dimensions:{min:1,max:1,description:wC(t),added(e,t){xs.addCallbackCustomTooltip(t)},moved(e,t){xs.moveCallbackCustomTooltip(t,e)},removed(e,t){xs.removeCallbackCustomTooltip(t,e)},replaced(e,t,n,r){xs.replaceCallbackCustomTooltip(r,t)}},measures:{min:1,max:15,description:RC(t),added({qDef:e},t){var n;IC(t),null!==(n=e.series)&&void 0!==n&&n.type||(t.qHyperCubeDef.qMeasures.length>1?e.series={type:os.TYPE.LINE,axis:os.AXIS.SECONDARY}:e.series={type:os.TYPE.BAR,axis:os.AXIS.PRIMARY})},moved(e,t){IC(t)}}}}function LC(e){const t=kC(e);return{properties:NC,data:{targets:[{path:"/qHyperCubeDef",...t}]},importProperties:({exportFormat:e,initialProperties:n,hypercubePath:r})=>{const i=Y.axisChart.importProperties({exportFormat:e,initialProperties:n,dataDefinition:t,hypercubePath:r}),o="linechart"===e.properties.visualization,a=[];i.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.series||(e.qDef.series={type:o?"line":"bar",axis:0,marker:"circle",markerFill:!0}),a.indexOf(e.qDef.series.axis)<0&&a.push(e.qDef.series.axis)}));const s=a.sort().shift();return i.qProperty.measureAxes[s]&&e.properties.measureAxis&&void 0!==e.properties.measureAxis.autoMinMax&&re(!0,i.qProperty.measureAxes[s],e.properties.measureAxis,{logarithmic:!1}),i},exportProperties:({propertyTree:e,hyperCubePath:t,viewDataMode:n})=>Y.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})}}const PC=({models:e,chart:t,viewState:n})=>{b((r=>{if(!e)return;const{layoutService:i,dockService:o,colorService:a,discreteModel:s,continuousModel:l,reducedModel:u}=e,{width:c,height:d}=o.meta.chart.size;return r.snapshotData=r.snapshotData||{},r.snapshotData.content={size:{w:c,h:d}},i.meta.isSnapshot?Promise.resolve():(r.snapshotData.content.chartData={scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:xe(t,is.COMPONENT.LEGEND_CATEGORICAL)},i.meta.isDiscrete?(s.command.setSnapshotData(r),u.command.setSnapshotData(r)):l.setSnapshotData(r),a.getSnapshotData().then((e=>{r.snapshotData.content.chartData={...r.snapshotData.content.chartData,...e}})).catch((()=>{})))})),S((()=>({getViewState(){if(n&&t)return{scrollOffset:n.get("scrollOffset"),zoom:n.get("zoom"),legendScrollOffset:xe(t,is.COMPONENT.LEGEND_CATEGORICAL)}}})),[n,t])};const qC=(e,t,n,r)=>{const i=`${t}.fontFamily`,o=`${t}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:`${e}.fontFamily`,options:()=>n.getOptions(i),defaultValue:()=>n.getDefaultValue(i)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:`${e}.fontSize`,options:()=>n.getOptions(o),defaultValue:()=>n.getDefaultValue(o)},fontColorItem:{component:"color-picker",width:!1,ref:`${e}.color`,defaultValue:()=>({color:r.getStyle("object.comboChart",t,"color")})}}}}};function DC(e,t,n){const r=q({theme:t,translator:n,flags:e,config:{id:"comboChart",paths:["axis.title","axis.label.name","label.value","legend.title","legend.label"]}});if(null!=e&&e.isEnabled("SENSECLIENT_IM_311_STYLINGPANEL_COMBOCHART"))return{component:"styling-panel",show:!0,chartType:"combochart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.ComboChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:null==e?void 0:e.isEnabled("SENSECLIENT_IM_2431_COMBOCHART_BG"),items:{barSection:{translation:"Visualizations.Descriptions.Bars",component:"accordion",items:{outlineSection:{translation:"properties.Outline",component:"panel-section",items:{wrapperItem:{component:"items",ref:"components",key:"bar",items:{barStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:!0,component:"dropdown",options:[{translation:"Common.None",value:"none"},{translation:"Common.Small",value:"small"},{translation:"Common.Medium",value:"medium"},{translation:"Common.Large",value:"large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",defaultValue:{color:"#205891"},schemaIgnore:!0,width:"auto",component:"color-picker"}}}}}}},widthSection:{translation:"LayerStyleEditor.style.barWidth",component:"panel-section",items:{barWidth:{component:"items",ref:"components",key:"bar",items:{width:{ref:"style.width",component:"slider",min:.01,max:1,step:.01,defaultValue:.7,schemaIgnore:!0}}}}},labelValueSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.barlabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"bar",items:qC("bar.label.value","label.value",r,t)}}}:void 0}},lineSection:{translation:"Visualizations.Descriptions.Lines",component:"accordion",items:{dataPointSection:{translation:"LayerStyleEditor.style.dataPointSize",component:"panel-section",items:{dataPointSize:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.dataPointSize",component:"slider",min:3,max:20,step:1,defaultValue:6,schemaIgnore:!0}}}}},lineSection:{translation:"Line options",component:"panel-section",items:{wrapperItem:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.lineThickness",translation:"Thickness",component:"slider",defaultValue:1,min:1,max:5,step:1,schemaIgnore:!0},type:{ref:"style.lineType",translation:"Type",component:"dropdown",width:"auto",grouped:!0,options:[{value:"solid",translation:"LayerStyleEditor.style.solid"},{value:"dashed",translation:"LayerStyleEditor.style.dashed"}],defaultValue:"solid",schemaIgnore:!0},curve:{ref:"style.lineCurve",translation:"Curve",component:"dropdown",width:"auto",grouped:!0,options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}],defaultValue:"linear",schemaIgnore:!0}}}}},labelValueSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.dataPoints.linelabelmode",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"line",items:qC("line.label.value","label.value",r,t)}}}:void 0}},axisTitleSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.axis.title",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"axis",items:qC("axis.title","axis.title",r,t)}}}:void 0,axisLabelSection:null!=e&&e.isEnabled("CLIENT_IM_3050")?{translation:"properties.axis.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"axis",items:qC("axis.label.name","axis.label.name",r,t)}}}:void 0,legendTitleSection:null!=e&&e.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.title",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"legend",items:qC("legend.title","legend.title",r,t)}}}:void 0,legendLabelSection:null!=e&&e.isEnabled("CLIENT_IM_3051")?{translation:"properties.legend.label",component:"panel-section",items:{labelItems:{component:"items",ref:"components",key:"legend",items:qC("legend.label","legend.label",r,t)}}}:void 0}};const i={component:"dropdown",type:"string",expression:"optional",baseRef:"style.strokeWidth",translation:"LayerStyleEditor.style.strokeWidth",show:!0,defaultValue:"none",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"}]},o={component:"color-picker",type:"object",baseRef:"style.strokeColor",translation:"LayerStyleEditor.style.strokeColor",dualOutput:!0,show:e=>"none"!==E(e,`${((e,t)=>{let n=-1;for(let r=0;r<e.length;r++)if(e[r].key===t){n=r;break}return n})(e,"bar")}.${i.baseRef}`),defaultValue:()=>({index:-1,color:"#205891"})},a={component:"slider",type:"number",expression:"optional",baseRef:"style.width",translation:"LayerStyleEditor.style.barWidth",show:(e,t,n)=>{const r=t.getMeasures().some((e=>bc(e.qDef.series)===os.TYPE.LINE));return!ve.continuous(n.layout,r&&me.isTime(!0,n.layout))},defaultValue:.7,min:.01,max:1,step:.01},s={component:"slider",type:"number",expression:"optional",baseRef:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",show:!0,defaultValue:6,min:3,max:20,step:1},l={component:"slider",type:"number",expression:"optional",baseRef:"style.lineThickness",translation:"LayerStyleEditor.style.lineThickness",show:!0,defaultValue:1,min:1,max:5,step:1},u={component:"dropdown",type:"string",expression:"optional",baseRef:"style.lineType",translation:"LayerStyleEditor.style.lineType",show:!0,defaultValue:"solid",options:[{value:"solid",translation:"LayerStyleEditor.style.solid"},{value:"dashed",translation:"LayerStyleEditor.style.dashed"}]},c={component:"dropdown",type:"string",expression:"optional",baseRef:"style.lineCurve",translation:"LayerStyleEditor.style.lineCurve",show:!0,defaultValue:"linear",options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}]};return{component:"style-editor",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",resetBtnTranslation:"LayerStyleEditor.component.resetAll",key:["bar","line"],ref:"components",defaultValue:[],defaultValues(e){const t="grouped"===e.barGrouping.grouping,n=e.qHyperCubeDef.qMeasures.filter((e=>bc(e.qDef.series)===os.TYPE.BAR)).length,r=t&&n>1;return[{key:"bar",style:{strokeWidth:i.defaultValue,strokeColor:o.defaultValue(),width:r?.9:.7}},{key:"line",style:{dataPointSize:s.defaultValue,lineThickness:l.defaultValue,lineType:u.defaultValue,lineCurve:c.defaultValue}}]},items:{list:{type:"items",component:"expandable-items",items:{bar:{type:"items",translation:"Visualizations.Descriptions.Bar",expanded:!0,styleKey:"bar",items:{barStrokeWidth:i,barStrokeColor:o,barWidth:a}},line:{type:"items",translation:"Visualizations.Descriptions.Line",expanded:!0,styleKey:"line",items:{dataPointSize:s,lineThickness:l,lineType:u,lineCurve:c}}}}}}}const $C={classification:{section:"styling",tags:["simple"],exclusive:!0},component:"items",show:!0,chartType:"combochart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.ComboChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,items:{barsSection:{component:"items",items:{wrapperItem:{component:"items",ref:"components",key:"bar",items:{barsHeader:{component:"header",translation:"Visualizations.Descriptions.Bars"},outlineSection:{component:"items",items:{barStroke:{component:"inline-wrapper",items:{strokeWidth:{ref:"style.strokeWidth",width:!0,component:"dropdown",translation:"LayerStyleEditor.style.strokeWidth",options:[{translation:"Common.None",value:"none"},{translation:"Common.Small",value:"small"},{translation:"Common.Medium",value:"medium"},{translation:"Common.Large",value:"large"}],defaultValue:"none",schemaIgnore:!0},strokeColor:{ref:"style.strokeColor",schemaIgnore:!0,defaultValue:{color:"#205891"},width:"auto",component:"color-picker"}}}}},widthSection:{component:"items",items:{barWidth:{component:"items",items:{width:{ref:"style.width",translation:"LayerStyleEditor.style.barWidth",component:"slider",min:.01,max:1,step:.01,schemaIgnore:!0,defaultValue:.7}}}}}}}}},linesSection:{component:"items",items:{wrapperItem:{component:"items",items:{linesHeader:{component:"header",translation:"Visualizations.Descriptions.Lines"},dataPointSection:{component:"items",items:{dataPointSize:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.dataPointSize",translation:"LayerStyleEditor.style.dataPointSize",component:"slider",min:3,max:20,step:1,defaultValue:6,schemaIgnore:!0}}}}},lineSection:{component:"items",items:{wrapperItem:{component:"items",ref:"components",key:"line",items:{size:{ref:"style.lineThickness",translation:"LayerStyleEditor.style.lineThickness",component:"slider",defaultValue:1,min:1,max:5,step:1,schemaIgnore:!0},type:{ref:"style.lineType",translation:"LayerStyleEditor.style.lineType",component:"dropdown",width:"auto",grouped:!0,options:[{value:"solid",translation:"LayerStyleEditor.style.solid"},{value:"dashed",translation:"LayerStyleEditor.style.dashed"}],defaultValue:"solid",schemaIgnore:!0},curve:{ref:"style.lineCurve",translation:"LayerStyleEditor.style.lineCurve",component:"dropdown",width:"auto",grouped:!0,options:[{value:"linear",translation:"LayerStyleEditor.style.linear"},{value:"monotone",translation:"LayerStyleEditor.style.monotone"}],defaultValue:"linear",schemaIgnore:!0}}}}}}}}},optionsSection:{component:"items",items:{wrapperItem:{component:"items",items:{optionsHeader:{component:"header",translation:"LayerStyleEditor.label.Options"},scrollStartPos:{ref:"scrollStartPos",translation:"properties.ScrollAlignment",component:"dropdown",defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}]},dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!1}}}}}}};function zC(e){const t=E(e,"qHyperCube.qMeasureInfo",[]).some((({series:e=os.NOPE_SERIES})=>bc(e)===os.TYPE.LINE));return ve.continuous(e,(()=>t&&me.isTime(!0,e)))}function _C(e){var t,n;return!(null===(t=e.qDef)||void 0===t||null===(n=t.color)||void 0===n||!n.on)}function HC(e){var t,n,r;return _C(e)&&"primary"===(null!==(t=null===(n=e.qDef)||void 0===n||null===(r=n.color)||void 0===r?void 0:r.mode)&&void 0!==t?t:"primary")}function BC(e){var t,n;return _C(e)&&"byExpression"===(null===(t=e.qDef)||void 0===t||null===(n=t.color)||void 0===n?void 0:n.mode)}function FC(e){var t,n,r,i,o;if(null!=e&&null!==(t=e.color)&&void 0!==t&&t.auto||"byExpression"!==(null==e||null===(n=e.color)||void 0===n?void 0:n.mode))return[];const a=null==e||null===(r=e.color)||void 0===r?void 0:r.colorExpression,s=null!==(i=null==e||null===(o=e.color)||void 0===o?void 0:o.expressionLabel)&&void 0!==i?i:"";return a?[{qExpression:a,label:s,id:"colorByExpression"}]:[]}function jC(e){return BC(e)?[{qExpression:e.qDef.color.colorExpression,id:"colorByMeasureExpression"}]:[]}function VC(e){var t,n;(null!==(t=null==e||null===(n=e.qHyperCubeDef)||void 0===n?void 0:n.qMeasures)&&void 0!==t?t:[]).forEach(((t,n)=>function(e,t,n){e.qAttributeExpressions=0===t?[...FC(n),...jC(e)]:jC(e)}(t,n,e)))}function UC(e){var t,n;const r={ref:"qDef.series.type",type:"string",component:"item-selection-list",defaultValue:"bar",schemaIgnore:!0,horizontal:!0,items:[{icon:e=>"stacked"===e.barGrouping.grouping||zC(e)?"stacked":"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.bar",value:"bar"},{icon:"line_chart_line",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.line",value:"line"},{icon:"shapes",component:"icon-item",labelPlacement:"bottom",translation:"properties.style.marker",value:"marker"}]},i={ref:"qDef.series.marker",type:"string",component:"dropdown",defaultValue:"circle",options:[{translation:"properties.marker.circle",value:"circle"},{translation:"properties.marker.rect",value:"rect"},{translation:"properties.marker.diamond",value:"diamond"},{translation:"properties.marker.triangle",value:"triangle"},{translation:"properties.marker.line",value:"line"}],show(e){var t;return bc(null===(t=e.qDef)||void 0===t?void 0:t.series)===os.TYPE.MARKER}},o={ref:"qDef.series.markerFill",translation:"properties.series.fill",type:"boolean",defaultValue:!0,show(e){var t;return bc(null===(t=e.qDef)||void 0===t?void 0:t.series)===os.TYPE.MARKER&&!["line"].includes(e.qDef.series.marker)}},a={ref:"qDef.color.mode",type:"string",component:"dropdown",options:[{value:"primary",translation:"properties.colorMode.primary"},{value:"byExpression",translation:"properties.colorMode.byExpression"}],defaultValue:"primary",show:(...e)=>_C(...e)},s=null===(t=e.anything)||void 0===t||null===(n=t.sense)||void 0===n?void 0:n.theme;return{items:{series:{type:"items",items:{supPanel:{translation:"properties.measure.moreProperties",title:"properties.measure.moreProperties",subTitle:(e,t,n)=>{var r;return null===(r=n.measureTitle)||void 0===r?void 0:r.call(n)},component:"sub-panel",type:"items",items:{groups:{type:"items",component:"expandable-items",items:{presentation:{type:"items",translation:"properties.presentation",items:{seriesType:r,seriesAxis:{ref:"qDef.series.axis",type:"integer",component:"dropdown",defaultValue:0,options:[{translation:"properties.axis.primary",value:0},{translation:"properties.axis.secondary",value:1}]},seriesMarker:i,seriesMarkerFill:o}},color:{type:"items",translation:"properties.color",items:{customColor:{ref:"qDef.color.on",translation:"properties.colors",type:"boolean",component:"switch",defaultValue:!1,trueOption:{value:!1,translation:"Common.Auto"},falseOption:{value:!0,translation:"Common.Custom"}},colorMode:a,paletteColor:{ref:"qDef.color.paletteColor",translation:"properties.color",type:"object",component:"color-picker",dualOutput:!0,defaultValue:()=>{var e;const{primary:t}=s.getDataColorSpecials(),n=null===(e=s.getDataColorPickerPalettes()[0])||void 0===e?void 0:e.colors,r=n.indexOf(t);return{index:-1===r?Math.min(6,n.length-1):r}},show:HC},attributeExpression:{type:"string",component:"expression",expressionType:"measure",schemaIgnore:!0,ref:"qDef.color.colorExpression",translation:"Common.Expression",show:BC}}}}}}}}}}}}const YC=10,WC=!0;function XC(e,t,n){let r;const i=n||0;var o,a;t?r=t.getMeasureLayouts():r=null!==(o=null==e||null===(a=e.qHyperCubeDef)||void 0===a?void 0:a.qMeasures)&&void 0!==o?o:[];return r.filter((e=>{const{series:t}=e||{};return 0===i?Rb(t,WC):!Rb(t,WC)}))}function GC(e,t){return t.getMeasures().filter((e=>bc(e.qDef.series)===os.TYPE.LINE)).length>0}function KC(e,t,n){const r=t.getMeasures().filter((e=>bc(e.qDef.series)===os.TYPE.BAR));return r.filter((e=>e.qDef.series.axis!==os.AXIS.SECONDARY)).length>n||r.filter((e=>e.qDef.series.axis===os.AXIS.SECONDARY)).length>n}const JC=(e,t,n,r)=>{const i="vertical"===t.layout.orientation||zC(t.layout)?"y":"x",o=XC(e,t,r).map((e=>e.qFallbackTitle));let a;return a=o.length?n.get(`properties.${i}AxisWithInfo`,[o.join(",")]):n.get(`properties.${i}Axis`),a};function ZC(e){var t,n,r,i,o;const{translator:a,flags:s,anything:l}=e,u=null==e||null===(t=e.anything)||void 0===t||null===(n=t.sense)||void 0===n?void 0:n.theme,c=null==e||null===(r=e.anything)||void 0===r||null===(i=r.sense)||void 0===i||null===(o=i.isUnsupportedFeature)||void 0===o?void 0:o.call(i,"continuousData"),d={items:{attributeExpression:{ref:"color.colorExpression",change:null,globalChange:e=>VC(e)},expressionLabel:{change:null},disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some((e=>_C(e)))}}},m=e=>!!e&&(e.coloring&&e.coloring.baseColor&&e.coloring.baseColor.color?e.coloring.baseColor:!(!e.baseColor||!e.baseColor.color)&&e.baseColor);const h=(e,t)=>!E(e,"color.auto")&&"primary"===E(e,"color.mode")&&!((e=>E(e,"layout.qHyperCube.qMeasureInfo",[]).filter((e=>!!m(e))).length>0)(t)&&"measure"===E(e,"color.useBaseColors")||function(e){return E(e,"layout.qHyperCube.qDimensionInfo",[]).filter((e=>!!m(e))).length>0}(t)&&"dimension"===E(e,"color.useBaseColors")),f=(e,t)=>{var n,r;return e.qHyperCubeDef.qMeasures.some((e=>_C(e)))||!s.isEnabled("SIMPLE_PROPERTIES_LIBRARY_COLOR")&&!(null!=e&&null!==(n=e.color)&&void 0!==n&&n.auto||"primary"!==(null==e||null===(r=e.color)||void 0===r?void 0:r.mode)||h(e,t))},p={items:{disclaimer:{show:(e,t)=>f(e,t),reset:e=>{e.qHyperCubeDef.qMeasures.forEach((e=>{var t;E(t=e,"qDef.color.on",void 0)&&M(t,"qDef.color.on",!1)}))}},simpleItems:{show:(e,t)=>!f(e,t)}}},y={items:{labels:{items:{header:{show:e=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length},barLabels:{component:"checkbox",ref:"dataPoint.showBarLabels",type:"boolean",translation:"Simple.Label.Bar",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&KC(0,t,0)},lineLabels:{component:"checkbox",ref:"dataPoint.showLineLabels",type:"boolean",translation:"Simple.Label.Line",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&GC(0,t),convertFunctions:{get:(e,t,n,r)=>r.dataPoint.show&&r.dataPoint.showLineLabels,set(e,t,n,r,i){i.dataPoint.showLineLabels=e,i.dataPoint.show=e}},reset(e){M(e,"dataPoint.show",!1),M(e,"dataPoint.showLineLabels",!1)}},dimensionTitle:{component:"checkbox",ref:"dimensionAxis.show",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)=>"labels"===r.dimensionAxis.show||"none"===r.dimensionAxis.show,set(e,t,n,r,i){i.dimensionAxis.show=e?"labels":"all"}}},primaryMeasureTitle:{component:"checkbox",ref:"measureAxes.0.show",type:"string",label:(e,t)=>a.get(XC(e,t,1).length>0?"Simple.Label.PrimaryMeasure.Hide":"Simple.Label.Measure.Hide"),defaultValue:"all",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&XC(e,t,0).length>0,convertFunctions:{get:(e,t,n,r)=>"labels"===r.measureAxes[0].show||"none"===r.measureAxes[0].show,set(e,t,n,r,i){i.measureAxes[0].show=e?"labels":"all"}}},secondaryMeasureTitle:{component:"checkbox",ref:"measureAxes.1.show",type:"string",translation:"Simple.Label.SecondaryMeasure.Hide",defaultValue:"all",show:(e,t)=>e.qHyperCubeDef.qDimensions.length&&e.qHyperCubeDef.qMeasures.length&&XC(e,t,1).length>0,convertFunctions:{get:(e,t,n,r)=>"labels"===r.measureAxes[1].show||"none"===r.measureAxes[1].show,set(e,t,n,r,i){i.measureAxes[1].show=e?"labels":"all"}}}}}}},g={uses:"settings",items:{simpleStyling:null!=s&&s.isEnabled("COMBOCHART_SIMPLE_STYLING")?$C:void 0,simpleLabels:y,presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:{comboStyling:DC(s,u,a),grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",defaultValue:"grouped",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show:(e,t,n)=>KC(0,t,1)&&!zC(n.layout)},orientation:{ref:"orientation",type:"string",component:"item-selection-list",defaultValue:"vertical",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],readOnly:(e,t,n)=>zC(n.layout),convertFunctions:(v="vertical",{get:(e,t,n)=>zC(n.layout)?v:e(t.type),set(e,t,n,r){t(n.type,zC(r.layout)?v:e,v)}})},scrollStartPos:{ref:"scrollStartPos",type:"number",translation:"properties.ScrollAlignment",component:"dropdown",defaultValue:0,options:[{value:0,translation:"properties.ScrollAlignStart"},{value:1,translation:"properties.ScrollAlignEnd"}],show:(e,t,n)=>!zC(n.layout)},nullMode:{type:"string",component:"dropdown",ref:"nullMode",translation:"properties.nullMode",options:[{value:"gap",translation:"properties.nullMode.gap"},{value:"connect",translation:"properties.nullMode.connect"},{value:"zero",translation:"properties.nullMode.zero"}],defaultValue:"gap",show:(e,t)=>GC(0,t)},dataPointSettings:{type:"items",grouped:!1,snapshot:{tid:"property-dataPoint"},show:(e,t)=>GC(0,t),items:{dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",defaultValue:!1},showLineDataPointLabels:{ref:"dataPoint.showLineLabels",translation:"properties.dataPoints.linelabelmode",type:"boolean",component:"switch",defaultValue:!1,show:e=>e.dataPoint&&e.dataPoint.show,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]}}},showBarLabels:{ref:"dataPoint.showBarLabels",type:"boolean",translation:"properties.dataPoints.barlabelmode",component:"switch",show:(e,t)=>KC(0,t,0),defaultValue:!1,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}]}}},colorsAndLegend:{uses:"colorsAndLegend",items:{colors:d,simpleColors:p,legend:{items:{show:{snapshot:{tid:"property-legend"}}}}}},dimensionAxis:{uses:"axis.dimensionAxis",label(e,t){const n="vertical"===t.layout.orientation||zC(t.layout)?"x":"y",r=function(e,t){return t?t.getDimensionLayouts():e.qHyperCubeDef.qDimensions.map((e=>e.qDef))}(e,t).map((e=>e.qFallbackTitle||"")).join(", ");let i;return i=r?a.get(`properties.${n}AxisWithInfo`,[r]):a.get(`properties.${n}Axis`),i},items:{othersGroup:{items:{dock:{options(e,t){let n="Common.Bottom",r="Common.Top";return"vertical"===t.layout.orientation||zC(t.layout)||(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}}}},axisDisplaySettings:{type:"items",components:"items",show:(e,t,n)=>!zC(n.layout),items:{axisDisplayMode:{type:"string",translation:"properties.axis.displaymode",ref:"dimensionAxis.axisDisplayMode",component:"dropdown",defaultValue:"auto",options:[{value:"auto",translation:"properties.axis.displaymode.auto"},{value:"max",translation:"properties.axis.displaymode.max"},{value:"custom",translation:"properties.axis.displaymode.custom"}]},maxVisibleItems:{type:"integer",translation:"properties.axis.maxvisiblevalues",ref:"dimensionAxis.maxVisibleItems",expression:"optional",defaultValue:YC,show:e=>"custom"===e.dimensionAxis.axisDisplayMode,invalid(e){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:r}=e.dimensionAxis;return r<0||r>1e4/(t.length+n.length)},globalChange(e){if("custom"===e.dimensionAxis.axisDisplayMode){const{qDimensions:t,qMeasures:n}=e.qHyperCubeDef,{maxVisibleItems:r}=e.dimensionAxis;r<1?e.dimensionAxis.maxVisibleItems=YC:r>1e4/(t.length+n.length)&&(e.dimensionAxis.maxVisibleItems=Math.min(r,Math.floor(1e4/(t.length+n.length))))}}},hint:{component:"text",translation:"properties.axis.maxvisiblevalues.hint.combochart",style:"hint",show:e=>["custom","max"].indexOf(e.dimensionAxis.axisDisplayMode)>-1}}}},continuousGroup:{show:!c}},measureAxis:{uses:"axis.measureAxis",label:(e,t)=>JC(e,t,a,0),show:(e,t)=>XC(e,t,0).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,t)=>JC(e,t,a,0),show:(e,t)=>XC(e,t,0).length>0,classification:{section:"axis",tags:["simple"],exclusive:!0}},show:{ref:"measureAxes.0.show",snapshot:{title:"properties.axis.primary",tid:"property-primary-axis",show(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qMeasureInfo)||[]).some((e=>(null==e?void 0:e.series)&&Rb(null==e?void 0:e.series,WC)))}}},dock:{ref:"measureAxes.0.dock",show:(e,t)=>"none"!==e.measureAxes[0].show&&XC(e,t,0).length>0,options(e,t){let n="Common.Bottom",r="Common.Top";return("vertical"===t.layout.orientation||zC(t.layout))&&(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}},spacing:{ref:"measureAxes.0.spacing",show:(e,t)=>e.measureAxes[0]&&"none"!==e.measureAxes[0].show&&XC(e,t,0).length>0}}},minMax:{items:{autoMinMax:{ref:"measureAxes.0.autoMinMax"},minMax:{ref:"measureAxes.0.minMax",defaultValue:"min",show:e=>!e.measureAxes[0].autoMinMax},min:{ref:"measureAxes.0.min",show:e=>["min","minMax"].includes(e.measureAxes[0].minMax)&&!e.measureAxes[0].autoMinMax,invalid:e=>"minMax"===e.measureAxes[0].minMax&&e.measureAxes[0].min>=e.measureAxes[0].max},max:{ref:"measureAxes.0.max",show:e=>["max","minMax"].includes(e.measureAxes[0].minMax)&&!e.measureAxes[0].autoMinMax,invalid:e=>"minMax"===e.measureAxes[0].minMax&&e.measureAxes[0].min>=e.measureAxes[0].max}}},startAt:{type:"string",component:"dropdown",translation:"properties.axis.startAt",show:(e,t)=>XC(e,t,0).length>0,readOnly:e=>!(e.measureAxes[0].autoMinMax||"min"===e.measureAxes[0].minMax&&0===e.measureAxes[0].min),options:[{value:"zero",translation:"properties.axis.startAt.zero"},{value:"lowest",translation:"properties.axis.startAt.lowest"}],defaultValue:"lowest",convertFunctions:{get(e,t,n,r){const{autoMinMax:i,minMax:o,min:a}=(null==r?void 0:r.measureAxes[0])||{};return!0===i?"lowest":i||"min"!==o||0!==a?e(t.type):"zero"},set(e,t,n,r,i){"zero"===e?(M(i,"measureAxes.0.autoMinMax",!1),M(i,"measureAxes.0.minMax","min"),M(i,"measureAxes.0.min",0)):M(i,"measureAxes.0.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},secondaryMeasureAxis:{uses:"axis.measureAxis",label:(e,t)=>JC(e,t,a,1),show:(e,t)=>XC(e,t,1).length>0,items:{axis:{items:{measureAxisTitle:{component:"header",type:"string",label:(e,t)=>JC(e,t,a,1),show:(e,t)=>XC(e,t,1).length>0,classification:{section:"axis",tags:["simple"],exclusive:!0}},show:{ref:"measureAxes.1.show",snapshot:{title:"properties.axis.secondary",tid:"property-secondary-Axis",show(e){var t;return((null==e||null===(t=e.qHyperCube)||void 0===t?void 0:t.qMeasureInfo)||[]).some((e=>(null==e?void 0:e.series)&&!Rb(null==e?void 0:e.series,WC)))}}},dock:{ref:"measureAxes.1.dock",defaultValue:"far",show:(e,t)=>"none"!==e.measureAxes[1].show&&XC(e,t,1).length>0,options(e,t){let n="Common.Bottom",r="Common.Top";return("vertical"===t.layout.orientation||zC(t.layout))&&(n=e.yMirrorMode?"properties.dock.right":"properties.dock.left",r=e.yMirrorMode?"properties.dock.left":"properties.dock.right"),[{value:"near",translation:n},{value:"far",translation:r}]}},spacing:{ref:"measureAxes.1.spacing",show:(e,t)=>e.measureAxes[1]&&"none"!==e.measureAxes[1].show&&XC(e,t,1).length>0}}},minMax:{type:"items",items:{autoMinMax:{ref:"measureAxes.1.autoMinMax"},minMax:{ref:"measureAxes.1.minMax",defaultValue:"min",show:e=>!e.measureAxes[1].autoMinMax},min:{ref:"measureAxes.1.min",show:e=>["min","minMax"].includes(e.measureAxes[1].minMax)&&!e.measureAxes[1].autoMinMax,invalid:e=>"minMax"===e.measureAxes[1].minMax&&e.measureAxes[1].min>=e.measureAxes[1].max},max:{ref:"measureAxes.1.max",show:e=>["max","minMax"].includes(e.measureAxes[1].minMax)&&!e.measureAxes[1].autoMinMax,invalid:e=>"minMax"===e.measureAxes[1].minMax&&e.measureAxes[1].min>=e.measureAxes[1].max}}},startAt:{type:"string",component:"dropdown",translation:"properties.axis.startAt",show:(e,t)=>XC(e,t,1).length>0,readOnly:e=>!(e.measureAxes[1].autoMinMax||"min"===e.measureAxes[1].minMax&&0===e.measureAxes[1].min),options:[{value:"zero",translation:"properties.axis.startAt.zero"},{value:"lowest",translation:"properties.axis.startAt.lowest"}],defaultValue:"lowest",convertFunctions:{get(e,t,n,r){const{autoMinMax:i,minMax:o,min:a}=(null==r?void 0:r.measureAxes[1])||{};return!0===i?"lowest":i||"min"!==o||0!==a?e(t.type):"zero"},set(e,t,n,r,i){"zero"===e?(M(i,"measureAxes.1.autoMinMax",!1),M(i,"measureAxes.1.minMax","min"),M(i,"measureAxes.1.min",0)):M(i,"measureAxes.1.autoMinMax",!0)}},classification:{section:"axis",tags:["simple"],exclusive:!0}}}},tooltips:{uses:"tooltip"}}};var v;s.isEnabled("SENSECLIENT_LAYERED_LABELS")&&(g.items.dimensionAxis.items.othersGroup.items.label={options:[{value:"auto",translation:"Common.Auto"},{value:"horizontal",translation:"Common.Horizontal"},{value:"tilted",translation:"properties.labels.tilted"},{value:"layered",translation:"properties.labels.layered"}]});const x={uses:"data",items:{dimensions:{items:{nullSuppression:{show(e,t,n){var r,i;if(null!=l&&null!==(r=l.sense)&&void 0!==r&&null!==(i=r.isUnsupportedFeature)&&void 0!==i&&i.call(r,"includeZeroValues"))return!1;return!zC(n.layout)}}}},measures:UC(e)}},b={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}},primaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines",translation:"properties.primaryMeasureAxisReferenceLines",title:{translation:"properties.primaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some((e=>Rb(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,WC)},secondaryMeasureAxisRefLines:{uses:"reflines",ref:"refLine.refLines2",translation:"properties.secondaryMeasureAxisReferenceLines",title:{translation:"properties.secondaryMeasureAxisReferenceLines.tooltip"},show:e=>function(e,t){return e.some((e=>!Rb(e.qDef.series,t)))}(e.qHyperCubeDef.qMeasures,WC)},dimRefLines:{uses:"dimReflines"}}};return{type:"items",component:"accordion",items:{data:x,sorting:{uses:"sortingWithDisclaimer"},addons:b,settings:g}}}function QC(e){return e.qHyperCubeDef.qMeasures.filter((e=>bc(e.qDef.series)===os.TYPE.LINE)).length>0}function eA(){return{type:"items",component:"accordion",items:{data:{uses:"data"},sort:{uses:"sortWithDisclaimer"},presentation:{uses:"presentation",type:"items",translation:"properties.presentation",grouped:!0,show:(e,t)=>QC(e)||!zC(t),items:{grouping:{ref:"barGrouping.grouping",type:"string",component:"item-selection-list",horizontal:!0,items:[{icon:"grouped",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.grouped",value:"grouped"},{icon:"stacked",component:"icon-item",labelPlacement:"bottom",translation:"properties.grouping.stacked",value:"stacked"}],show(e,t){var n;return function(e,t){const n=e.qHyperCubeDef.qMeasures.filter((e=>bc(e.qDef.series)===os.TYPE.BAR));return t?n.filter((e=>e.qDef.series.axis===os.AXIS.PRIMARY)).length>1||n.filter((e=>e.qDef.series.axis===os.AXIS.SECONDARY)).length>1:n.length>1}(e,!aM(null!==(n=null==e?void 0:e.version)&&void 0!==n?n:""))&&!zC(t)}},orientation:{ref:"orientation",type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"bars_vertical",labelPlacement:"bottom",translation:"properties.orientation.vertical",value:"vertical"},{icon:"bars_horizontal",component:"icon-item",labelPlacement:"bottom",translation:"Common.Horizontal",value:"horizontal"}],show:(e,t)=>!zC(t)},nullMode:{type:"string",component:"radio-list",ref:"nullMode",translation:"properties.nullMode",options:()=>[{value:"gap",translation:"properties.nullMode.gap"},{value:"connect",translation:"properties.nullMode.connect"},{value:"zero",translation:"properties.nullMode.zero"}],show:e=>QC(e)&&e.qHyperCubeDef.qMeasures.length>1},dataPoints:{ref:"dataPoint.show",translation:"properties.dataPoints.showDataPoints",type:"boolean",show:e=>QC(e)}}},color:{uses:"color",items:{disclaimer:{component:"text",translation:"properties.color.colorOnMeasureDisclaimer",style:"hint",show:e=>e.qHyperCubeDef.qMeasures.some((e=>_C(e)))}}}}}}const tA={bar:{axis:0,icon:"bar-chart",tid:"as-bar",translation:"contextMenu.asBar"},line:{axis:1,icon:"line-chart",tid:"as-line",translation:"contextMenu.asLine"},marker:{axis:1,icon:"shapes",tid:"as-marker",translation:"contextMenu.asMarker"}};function nA(e,t,n,r,i){const{axis:o,icon:a,tid:s,translation:l}=tA[i];t.addItem({icon:a,tid:s,translation:l,async select(){let t;t="measure"===e.type?await r.addLibraryMeasure(e.id):await r.addExpressionMeasure(e.name,""),t.qDef.series.type=i,t.qDef.series.axis=o,r.updateGlobalChangeListeners(),n.setProperties(r.properties),window.qvangularGlobal.$rootScope.$broadcast("pp-open-path",`data.${t.qDef.cId}`)}})}function rA(e,t,n,r,i){!function(e,t,n){const{item:r}=e,i=["contextMenu.add",r.name];if(n.canAddMeasure()){const o=e.menu.addItem({translation:i,tid:"add-as"});nA(r,o,t,n,"bar"),nA(r,o,t,n,"line"),nA(r,o,t,n,"marker")}}(e,n,t),t.getMeasures().length>=t.minMeasures()&&e.ReplaceMeasures(n,t,i),e.ColorBy(n,t,i),r()}function iA(e){const t={},{tooltip:n}=e;if(n){var r,i;t.chart_tooltip_custom=!n.auto;const e=null===(r=n.chart)||void 0===r||null===(i=r.object)||void 0===i?void 0:i.refId;!n.auto&&e&&(t.chart_tooltip_custom_mini_chart=e)}return t}const oA=e=>!!(e&&e.qHyperCube.qSize.qcy>0);function aA(e){return{definition:ZC(e),softDefinition:eA(),support:{snapshot:oA,export:!0,exportData:!0,sharing:!1,viewData:!0,modifiers:["accumulation","movingAverage","difference","normalization"]},getDropMeasureOptions:rA,extendMetrics:iA,importProperties:(t,n,r,i)=>{const o={layout:{templateId:n.templateId}};r.mapProperties(o);const a={defaultDimension:r.getDefaultDimensionProperties(),defaultMeasure:r.getDefaultMeasureProperties()},s=Y.axisChart.importProperties({exportFormat:t,initialProperties:n,dataDefinition:kC(e),defaultPropertyValues:a,hypercubePath:i,extension:r});return function(e,t,n){const r="linechart"===n.properties.visualization,i=[];e.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qDef.series||(e.qDef.series={type:r?"line":"bar",axis:0,marker:"circle",markerFill:!0}),i.indexOf(e.qDef.series.axis)<0&&i.push(e.qDef.series.axis)}));const o=i.sort().shift();e.qProperty.measureAxes[o]&&n.properties.measureAxis&&void 0!==n.properties.measureAxis.autoMinMax&&re(!0,e.qProperty.measureAxes[o],n.properties.measureAxis,{logarithmic:!1}),VC(e.qProperty)}(s,0,t),s},exportProperties:(e,t,n)=>{!function(e){e.qProperty.qHyperCubeDef.qMeasures.forEach((e=>{e.qAttributeExpressions=[]}))}(e);return Y.axisChart.exportProperties({propertyTree:e,hyperCubePath:t,viewDataMode:n})},migrate:{properties:e=>e.qExtendsId?e:function(e){return aM(e.version)&&(e.qHyperCubeDef.qMeasures.forEach((e=>{const{qDef:t}=e;void 0===t.series&&(t.series=os.NOPE_SERIES),void 0===t.series.type&&(t.series.type=os.NOPE_SERIES.type),void 0===t.series.axis&&(t.series.axis=t.series.type===os.TYPE.BAR?os.AXIS.PRIMARY:os.AXIS.SECONDARY),t.series.type===os.TYPE.BAR&&t.series.axis===os.AXIS.SECONDARY&&(t.series.axis=os.AXIS.PRIMARY)})),e.version=oM.BAR_IN_SECONDARY_AXIS),e}(e)}}}}}}));
|