@nebula.js/sn-funnel-chart 1.9.0 → 1.9.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  /*
2
- * @nebula.js/sn-funnel-chart v1.9.0
2
+ * @nebula.js/sn-funnel-chart v1.9.1
3
3
  * Copyright (c) 2024 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
6
6
 
7
- System.register(["picasso.js","picasso-plugin-q","qlik-chart-modules","@nebula.js/stardust"],(function(t){"use strict";var e,n,r,i,o,a,u,l,s,c,h,f,d,g,p,y,m,b,v,w,x,M,C,k,$,T;return{setters:[function(t){e=t.default},function(t){n=t.default},function(t){r=t.fontResolver,i=t.getValue,o=t.setValue,a=t.colorService,u=t.selectionService,l=t.cache,s=t.pluginService,c=t.themeService},function(t){h=t.useElement,f=t.useSelections,d=t.useModel,g=t.useApp,p=t.useTranslator,y=t.useOptions,m=t.useState,b=t.useEffect,v=t.useStaleLayout,w=t.useTheme,x=t.useConstraints,M=t.useRect,C=t.usePlugins,k=t.useAppLayout,$=t.usePromise,T=t.onTakeSnapshot}],execute:function(){t("default",(function(t){const r=e();r.use(n),r.component("funnel",I);const{flags:i}=t;return{ext:V(t),qae:{properties:{initial:U},data:{targets:Y}},component(){!function({picasso:t,flags:e}){const n=v(),r=w(),i=x(),o=M(),a=C(),u=k().qLocaleInfo,[l,h,f,d]=Ri({picasso:t,layout:n}),g=y(),p=()=>{const t=l.element.clientWidth!==d.get("width")||l.element.clientHeight!==d.get("height");return!1!==g.chartAnimations&&e.isEnabled("IM_1355_ANIMATIONS_FUNNEL")&&!t&&!it.propertiesHaveChanged({viewCache:d,layout:n})},[m]=$((()=>{if(!h)return Promise.resolve();const e=({getUseBaseColors:t})=>({theme:r,colorProps:{...n.color,useBaseColors:t(n)},layout:n,hc:n.qHyperCube}),i=function(t){const e={layout:t,keys:{SCALE:{FILL:"fill"},COMPONENT:{FUNNEL:"fun",FUNNEL_LABELS:"funnel-labels",DIMENSION_TITLE:"dimension-title"}}};return e}(n),o=s({picassoInstance:t,plugins:a,pluginArgs:i});return Promise.all([h.initialize({createConfig:e}),o.initialize()]).then((()=>o))}),[n,h]);b((()=>{if(!l||!h||!m)return;const t=[{type:"q",key:"qHyperCube",data:n.qHyperCube,config:{localeInfo:u}},...h.getData()],o=c({theme:r,config:{id:"funnelChart"}}),a=function({layout:t,themeService:e}){const n=e.getStyles(),r=e=>{var n,r;return null!==(n=null===(r=t.components)||void 0===r?void 0:r.find((t=>t.key===e)))&&void 0!==n?n:void 0};return{axis:{title:{getStyle:()=>{var t,e,i,o,a,u;return{fontFamily:null!==(t=null===(e=r("axis"))||void 0===e||null===(e=e.axis)||void 0===e||null===(e=e.title)||void 0===e?void 0:e.fontFamily)&&void 0!==t?t:n.axis.title.fontFamily,fontSize:null!==(i=null===(o=r("axis"))||void 0===o||null===(o=o.axis)||void 0===o||null===(o=o.title)||void 0===o?void 0:o.fontSize)&&void 0!==i?i:n.axis.title.fontSize,fill:null!==(a=null===(u=r("axis"))||void 0===u||null===(u=u.axis)||void 0===u||null===(u=u.title)||void 0===u||null===(u=u.color)||void 0===u?void 0:u.color)&&void 0!==a?a:n.axis.title.color}}},label:{getStyle:()=>{var t,e,i,o,a,u;return{fontSize:null!==(t=null===(e=r("axis"))||void 0===e||null===(e=e.axis)||void 0===e||null===(e=e.label)||void 0===e||null===(e=e.name)||void 0===e?void 0:e.fontSize)&&void 0!==t?t:n.axis.label.name.fontSize,fontFamily:null!==(i=null===(o=r("axis"))||void 0===o||null===(o=o.axis)||void 0===o||null===(o=o.label)||void 0===o||null===(o=o.name)||void 0===o?void 0:o.fontFamily)&&void 0!==i?i:n.axis.label.name.fontFamily,fill:null!==(a=null===(u=r("axis"))||void 0===u||null===(u=u.axis)||void 0===u||null===(u=u.label)||void 0===u||null===(u=u.name)||void 0===u||null===(u=u.color)||void 0===u?void 0:u.color)&&void 0!==a?a:n.axis.label.name.color}}}},label:{value:{getStyle:()=>{var t,e,i,o,a,u,l,s;return{fontSize:null!==(t=null===(e=r("label"))||void 0===e||null===(e=e.label)||void 0===e||null===(e=e.value)||void 0===e?void 0:e.fontSize)&&void 0!==t?t:n.label.value.fontSize,fontFamily:null!==(i=null===(o=r("label"))||void 0===o||null===(o=o.label)||void 0===o||null===(o=o.value)||void 0===o?void 0:o.fontFamily)&&void 0!==i?i:n.label.value.fontFamily,fill:null!==(a=null===(u=r("label"))||void 0===u||null===(u=u.label)||void 0===u||null===(u=u.value)||void 0===u||null===(u=u.color)||void 0===u?void 0:u.color)&&void 0!==a?a:n.label.value.color,useContrastColor:null===(l=null===(s=r("label"))||void 0===s||null===(s=s.label)||void 0===s||null===(s=s.value)||void 0===s?void 0:s.useContrastColor)||void 0===l||l}}}}}}({layout:n,themeService:o}),s=function({flags:t,layout:e,constraints:n,colorService:r,themeService:i,styleModel:o,pluginService:a,animationsEnabled:u}){const l=function(t){const e={...t.getScales()};return e}(r),s=r.getPalettes(),c=function({layout:t,constraints:e,colorService:n,animationsEnabled:r}){const i=n.getDatumProps(),o=n.getColor(),a={type:"funnel",key:"fun",data:{extract:{field:"qDimensionInfo/0",props:{num:{field:"qMeasureInfo/0"},...i}}},brush:e.select||e.active?{}:{trigger:[{contexts:["selection"],data:[""]}],consume:[{context:"selection",filter:t=>"section"===t.tag,style:{inactive:{opacity:.3}}}]},settings:{num:{ref:"num"},fill:o,mode:t.funnel.mode},animations:{enabled:r,isMainComponent:!0,trackBy:t=>`${t.tag}: ${t.data.value}`}};return a}({layout:e,constraints:n,colorService:r,animationsEnabled:u}),h=[c,Ni(t,e,i,u,o),qi(t,e,o)];return{palettes:s,scales:l,components:a.extendComponents(h),formatters:Hi()}}({flags:e,layout:n,constraints:i,colorService:h,themeService:o,styleModel:a,pluginService:m,animationsEnabled:p});l.update({data:t,settings:s}),d.set("width",l.element.clientWidth),d.set("height",l.element.clientHeight),it.cacheProperties({viewCache:d,layout:n})}),[l,h,r.name(),m,i]),b((()=>{l&&(l.update(),d.set("width",l.element.clientWidth),d.set("height",l.element.clientHeight))}),[o.width,o.height]),b((()=>{f&&f.setLayout(n)}),[n]),T((t=>h.getSnapshotData().then((e=>(t.snapshotData=t.snapshotData||{},t.snapshotData.content=t.snapshotData.content||{},t.snapshotData.content.chartData=e,t))).catch((()=>t))))}({picasso:r,flags:i})}}}));const S={fill:"steelblue",num:1},D=.9,N=150,q=(t,e,n)=>{let r=0,i=0,o=0,a={},u=0;if("labelCenter"===t)r=e.bottomLeft.x,i=e.topRight.y,o=e.bottomRight.x-e.bottomLeft.x,u=e.bottomRight.y-e.topRight.y,a={share:n.share,fill:n.fill};else{const t=180/Math.PI*Math.atan((e.bottomRight.y-e.topRight.y)/(e.topRight.x-e.bottomRight.x));r=t<15&&t>=0?e.topRight.x:t>-15&&t<0?e.bottomRight.x:t<-15?(e.bottomRight.x-e.topRight.x)/2+e.topRight.x+15:(e.topRight.x-e.bottomRight.x)/2+e.bottomRight.x+15,i=e.topRight.y,o=e.width-r,u=e.bottomRight.y-e.topRight.y,a={fill:n.fill}}return{tag:t,type:"rect",x:r,y:i,width:o,height:u,data:n.data,desc:a,fill:"none"}},H=(t,e)=>{const n=(t=>{const e=(t=>{let e=0;return t.forEach((t=>{t.num>e&&(e=t.num)})),e})(t);let n=0;return t.slice().reverse().map((t=>{const r={datum:t,s:n/e,e:t.num/e};return n=t.num,r})).reverse()})(t),r=e.width*D,i=e.height*D,o=(e.width-r)/2,a=(e.height-i)/2,u=r-(r>N&&i>N?100:0),l=(i-1*(n.length-1))/n.length,s=[];return n.forEach(((t,r)=>{const i=(c=t.e,h=r<n.length-1?t.s:t.e,[.5-.5*c,.5+.5*c,.5+.5*h,.5-.5*h]).map((t=>Math.round(t*u+o)));var c,h;const f=l*r+1*r+a,d={bottomRight:{x:i[2],y:Math.round(f+l)},bottomLeft:{x:i[3],y:Math.round(f+l)},topRight:{x:i[1],y:Math.round(f)},topLeft:{x:i[0],y:Math.round(f)},width:e.width},g=`M${d.topLeft.x},${d.topLeft.y} L${d.topRight.x},${d.topRight.y} ${d.bottomRight.x},${d.bottomRight.y} ${d.bottomLeft.x},${d.bottomLeft.y}Z`;s.push({tag:"section",type:"path",d:g,data:t.datum.data,fill:t.datum.fill});const p={share:t.e,fill:t.datum.fill,data:t.datum.data};l>12&&(d.bottomRight.x-d.bottomLeft.x>32&&s.push(q("labelCenter",d,p)),s.push(q("labelLeft",d,p)))})),s},R=(t,e,n,r)=>(r-t)/r*(e-n)+n,E=(t,e,n)=>{const r=t.filter((t=>"NaN"!==t.num&&t.num>0)),i=r.length,o=n.width*D,a=n.height*D,u=Math.round((n.width-o)/2),l=Math.round((n.height-a)/2),s=o-(o>N&&a>N?100:0),c=a-1*(i-1),h=[],f=r[0].data.num.value;let d=l;return r.forEach(((t,r)=>{const i=e[r]*c,o=Math.round(R(d-l,s,.2*s,a)/2),g=Math.round(R(d-l+i,s,.2*s,a)/2),p=u+Math.round(s/2),y={bottomRight:{x:p+g,y:Math.round(d+i)},bottomLeft:{x:p-g,y:Math.round(d+i)},topRight:{x:p+o,y:d},topLeft:{x:p-o,y:d},width:n.width},m=`M${y.topLeft.x},${y.topLeft.y} L${y.topRight.x},${y.topRight.y} ${y.bottomRight.x},${y.bottomRight.y} ${y.bottomLeft.x},${y.bottomLeft.y}Z`;h.push({tag:"section",type:"path",d:m,data:t.data,fill:t.fill});const b={share:t.data.num.value/f,fill:t.fill,data:t.data};i>2&&(y.bottomRight.x-y.bottomLeft.x>32&&h.push(q("labelCenter",y,b)),h.push(q("labelLeft",y,b))),d+=i+1})),h},L=(t,e,n)=>{const r=t.filter((t=>"NaN"!==t.num&&t.num>0));if(r&&r.length>0)switch(e){case"WIDTH":default:return H(r,n);case"ORDER":return E(r,r.map((()=>1/r.length)),n);case"HEIGHT":return E(r,(t=>{const e=t.reduce(((t,e)=>t+e.data.num.value),0);return t.map((t=>t.data.num.value/e))})(r),n);case"AREA":return E(r,((t,e,n)=>{const r=t.reduce(((t,e)=>t+e.data.num.value),0),i=e.width*D,o=e.height*D,a=i*n,u=o*(i+a)/2,l=(i-a)/2/o,s=[];let c=0;for(let e=t.length-1;e>=0;e--){const n=t[e].data.num.value/r,i=2*l*c+a,h=-i/(2*l)+Math.sqrt(i*i/(4*l*l)+n*u/l);s[e]=h/o,c+=h}return s})(r,n,.2),n)}return[]};var I={require:["resolver"],defaultSettings:{settings:{},data:{},style:{item:"$shape"}},render({data:t}){const e=this.resolver.resolve({data:t,defaults:{...S,...this.style.item},settings:this.settings.settings});return L(e.items,this.settings.settings.mode,this.rect)}};const U={version:"1.9.0",color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",measureMin:void 0,measureMax:void 0,measureScheme:"sg",mode:"primary",paletteColor:{index:6},persistent:!1,reverseScheme:!1,singleColor:void 0,useBaseColors:"off",useDimColVal:!0,useMeasureGradient:!0},dataPoint:{auto:!0,labelMode:"share"},footnote:"",funnel:{mode:"WIDTH"},qHyperCubeDef:{qDimensions:[],qMeasures:[],qInterColumnSortOrder:[],qInitialDataFetch:[{qWidth:2,qHeight:5e3}],qSuppressMissing:!0,qSuppressZero:!1},showDimensionTitle:!0,showTitles:!0,subtitle:"",title:""};function F(t,e,n){const r=`${t}.fontFamily`,i=`${t}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:r,options:()=>e.getOptions(r),defaultValue:()=>e.getDefaultValue(r)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:i,options:()=>e.getOptions(i),defaultValue:()=>e.getDefaultValue(i)},fontColorItem:{component:"color-picker",width:!1,ref:`${t}.color`,defaultValue:()=>({color:n.getStyle("object.funnelChart",t,"color")})}}}}}function A(t,e,n){const i=r({theme:t,translator:n,flags:e,config:{id:"funnelChart",paths:["axis.title","axis.label.name","label.value"]}});return{component:"styling-panel",show:!0,chartType:"funnelchart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.FunnelChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:!0,items:{axisTitleSection:{component:"panel-section",label:"Dimension title",items:{dimensionTitleItems:{component:"items",ref:"components",key:"axis",items:F("axis.title",i,t)}}},labelNameSection:{component:"panel-section",label:"Dimension value label",items:{dimensionTitleItems:{component:"items",ref:"components",key:"axis",items:F("axis.label.name",i,t)}}},labelValueSection:{component:"panel-section",label:"Value Label",items:{labelItems:{component:"items",ref:"components",key:"label",items:{...F("label.value",i,t),contrastColor:{component:"checkbox",type:"boolean",ref:"label.value.useContrastColor",translation:"properties.dataPoints.valuelabel.contrast",defaultValue:!0}}}}}}}}const P={uses:"sorting"},O=(t,e,n)=>{var r;const i=null==n||null===(r=n.sense)||void 0===r?void 0:r.theme;return{uses:"settings",items:{presentation:{type:"items",label:"Presentation",grouped:!0,items:{...(null==e?void 0:e.isEnabled("SENSECLIENT_IM_4897_VIZBUNDLE_STYLING"))&&{funnelStyling:A(i,e,t)},funnelmode:{ref:"funnel.mode",label:"Funnel Mode",type:"string",component:"dropdown",options:[{value:"AREA",label:"Area"},{value:"HEIGHT",label:"Height"},{value:"WIDTH",label:"Width"},{value:"ORDER",label:"Ordering"}],defaultValue:"WIDTH"},dimensionTitle:{ref:"showDimensionTitle",type:"boolean",component:"switch",label:"Dimension title",defaultValue:!0,options:[{value:!0,label:"Auto"},{value:!1,label:"Off"}]},valuesAuto:{ref:"dataPoint.auto",type:"boolean",label:"Value labels",component:"switch",defaultValue:!0,options:[{value:!0,label:"Auto"},{value:!1,label:"Custom"}]},labelMode:{ref:"dataPoint.labelMode",type:"string",component:"dropdown",options:[{value:"none",label:"None"},{value:"share",label:"Share"},{value:"value",label:"Values"}],defaultValue:"share",show:t=>!t.dataPoint.auto}}},colorsAndLegend:{uses:"colorsAndLegend",translation:"Colors",items:{colors:{items:{colorByLabel:{show:!1},expressionLabel:{show:!1}}},legend:{show:!1}}}}}},z={uses:"data",items:{dimensions:{uses:"dimensions",items:{others:{items:{suppressOther:{defaultValue:!0,show:!1}}}},disabledRef:""},measures:{uses:"measures",disabledRef:""}}};function j({translator:t,flags:e,anything:n}){return{type:"items",component:"accordion",items:{data:z,sorting:P,settings:O(t,e,n)}}}function V(t){return{definition:j(t),support:{export:!0,exportData:!0,snapshot:!0,viewData:!1},importProperties:null,exportProperties:null}}const Y=[{path:"/qHyperCubeDef",dimensions:{min:1,max:1,description:()=>"Segments"},measures:{min:1,max:1,description(t){switch(t.funnel.mode){case"WIDTH":return"Width";case"AREA":return"Area";case"HEIGHT":return"Height";case"ORDER":return"Order";default:return""}},added(t,e){2===e.qHyperCubeDef.qInterColumnSortOrder.length&&1!==e.qHyperCubeDef.qInterColumnSortOrder[0]&&(e.qHyperCubeDef.qInterColumnSortOrder=[1,0])}}}];function _(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var B=Object.prototype.hasOwnProperty,W=Object.prototype.toString,Z=Object.defineProperty,G=Object.getOwnPropertyDescriptor,X=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===W.call(t)},J=function(t){if(!t||"[object Object]"!==W.call(t))return!1;var e,n=B.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&B.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;for(e in t);return void 0===e||B.call(t,e)},Q=function(t,e){Z&&"__proto__"===e.name?Z(t,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):t[e.name]=e.newValue},K=function(t,e){if("__proto__"===e){if(!B.call(t,e))return;if(G)return G(t,e).value}return t[e]},tt=function t(){var e,n,r,i,o,a,u=arguments[0],l=1,s=arguments.length,c=!1;for("boolean"==typeof u&&(c=u,u=arguments[1]||{},l=2),(null==u||"object"!=typeof u&&"function"!=typeof u)&&(u={});l<s;++l)if(null!=(e=arguments[l]))for(n in e)r=K(u,n),u!==(i=K(e,n))&&(c&&i&&(J(i)||(o=X(i)))?(o?(o=!1,a=r&&X(r)?r:[]):a=r&&J(r)?r:{},Q(u,{name:n,newValue:t(c,a,i)})):void 0!==i&&Q(u,{name:n,newValue:i}));return u},et=_(tt),nt={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 rt(t){const{qHyperCube:e,...n}=t,{qAxisData:r,qDataPages:a,qStackedDataPages:u,qTreeDataPages:l,...s}=e,c=et(!0,{},{...n,qHyperCube:{...s,qAxisData:null,qDataPages:null,qStackedDataPages:null,qTreeDataPages:null}}),{dataRelatedPropertiesPaths:h}=nt;return h.forEach((t=>{const e=t.split("[");if(1===e.length)void 0!==i(c,t)&&o(c,t,null);else{const t=e[0],n=e[1].split("].")[1];i(c,t,[]).forEach((t=>{void 0!==i(t,n)&&o(t,n,null)}))}})),c}var it={axes:{trackBy:function({isTime:t,isContinuous:e,isMeasure:n,isMajor:r}){return i=>{if(t||e||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 t=i.children.filter((t=>"text"===t.type)).map((t=>t.text));return`${i.data.value} ${t.join("")}`}return Math.random()}if(r){if("line"===i.type&&void 0===i.tickValue)return"axis";const t=i.transform&&i.transform.match(/rotate/gi)?"rotated":"horizontal";return`${i.data.group?`${i.data.group.value} `:""}${i.data.value} ${i.text} ${t}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:t,isTime:e,isContinuous:n,isHorizontal:r,dock:i}){return({currentNodes:o,currentRect:a,previousRect:u})=>{const l=a.x-u.x,s=a.y-u.y,c=a.width-u.width,h=a.height-u.height;t?("left"===i&&o.forEach((t=>{"line"===t.type?(t.x1+=c,t.x2+=c):"text"===t.type&&(t.x+=c)})),"left"!==i&&"right"!==i||o.forEach((t=>{var e;("line"===t.type&&(t.x1===t.x2?(t.y1=a.y,t.y2=t.y1+a.height):(Math.round(t.y1)<a.y||t.y1>a.y+a.height)&&(t.strokeWidth=0)),"text"===t.type)&&((t.y<a.y||t.y>a.y+a.height)&&(t.fontSize="1px","#"===(null===(e=t.fill)||void 0===e?void 0:e[0])&&(t.fill=`${t.fill.slice(0,1)}00${t.fill.slice(1)}`)))})),"top"!==i&&"bottom"!==i||o.forEach((t=>{var e;("line"===t.type&&(t.y1===t.y2?(t.x1=a.x,t.x2=t.x1+a.width):(Math.round(t.x1)<a.x||t.x1>a.x+a.width)&&(t.strokeWidth=0)),"text"===t.type)&&((t.x<a.x||t.x>a.x+a.width)&&(t.fontSize="1px","#"===(null===(e=t.fill)||void 0===e?void 0:e[0])&&(t.fill=`${t.fill.slice(0,1)}00${t.fill.slice(1)}`)))}))):e?o.forEach((t=>{"line"===t.type?t.y1===t.y2?t.x2+=c:t.x1===t.x2&&(t.x1-=l,t.x2-=l):"text"===t.type&&(t.x-=l)})):n||r?o.forEach((t=>{"line"===t.type&&t.y1===t.y2&&(t.x1+=l,t.x2+=l+c)})):o.forEach((t=>{"line"===t.type&&t.x1===t.x2&&(t.y1+=s,t.y2+=s+h)}))}}},bars:{trackBy:function(t){return t.data.measureIndex?`${t.data.value} ${t.data.measureIndex.value}`:t.data.group?`${t.data.value} ${t.data.group.value}`:t.data.stack?`${t.data.value} ${t.data.stack.value}`:`${t.data.value}`},compensateForLayoutChanges:function({currentNodes:t,currentRect:e,previousRect:n}){const r=e.x-n.x,i=e.y-n.y;0===r&&0===i||t.forEach((t=>{t.children&&t.children.length>0&&t.children.forEach((t=>{void 0!==t.x&&void 0!==t.y?(t.x-=r,t.y-=i):t.transform=`translate(${-r}, ${-i})`}))}))}},barOobs:{compensateForLayoutChanges:function({currentNodes:t,currentRect:e,previousRect:n}){const r=e.x-n.x;0===e.y-n.y&&0===r||t.forEach((t=>{t.children&&t.children.length>0&&t.children.forEach((t=>{t.opacity=0}))}))}},labels:{trackBy:function(t){if("rect"===t.type)return"-3"===t.data?Math.random():`${t.type} ${t.data} ${t.rotation}`;const e=t.transform&&t.transform.match(/rotate/gi)?"rotated":"horizontal";return`${t.type} ${t.data} ${t.text} ${e}`},compensateForLayoutChanges:function({currentNodes:t,currentRect:e,previousRect:n}){const r=e.x-n.x,i=e.y-n.y;0===r&&0===i||t.forEach((t=>{t.transform&&t.transform.match(/rotate\(-90/gi)?(t.x+=i,t.y-=r):(t.x-=r,t.y-=i)}))},linkData:function(t){return t.data.measureIndex?`${t.data.value} ${t.data.measureIndex.value}`:t.data.group?`${t.data.value} ${t.data.group.value}`:t.data.stack?`${t.data.value} ${t.data.stack.value}`:`${t.data.value}`}},lines:{trackBy:function(t){var e;return"line"===t.type?null!==(e=t.value)&&void 0!==e?e:Math.random():"path"===t.type?`${t.generatorType} ${t.layerObj.id} ${t.data.source.key}`:Math.random()},compensateForLayoutChanges:function({currentNodes:t,currentRect:e,previousRect:n}){const r=e.x-n.x,i=e.y-n.y;t.forEach((t=>{if(void 0!==t.x1&&void 0!==t.y1)t.y1===t.y2?(t.x2=t.x1+e.width,t.y1-=i,t.y2-=i):t.x1===t.x2&&(t.y2=t.y1+e.height,t.x1-=r,t.x2-=r);else{const e="x"===t.major.p?r/t.major.size:i/t.major.size,n="y"===t.minor.p?i/t.minor.size:r/t.minor.size;t.points.forEach((t=>{t.modified||(t.major-=e,t.minor-=n,t.minor0-=n,t.modified=!0)}))}}))}},lineOobs:{compensateForLayoutChanges:function({currentNodes:t,currentRect:e,previousRect:n}){const r=e.x-n.x;0===e.y-n.y&&0===r||t.forEach((t=>{t.opacity=0}))}},points:{trackBy:function(t){return t.data.line?`${t.data.line.value} ${t.data.major.value}`:`${t.data.major.value}`},compensateForLayoutChanges:function({currentNodes:t,currentRect:e,previousRect:n}){const r=e.x-n.x,i=e.y-n.y;0===r&&0===i||t.forEach((t=>{t.cx-=r,t.cy-=i}))}},refLineLabels:{trackBy:function(t){if(void 0!==t.value){if("rect"===t.type)return`${t.value}`;if("text"===t.type)return`${t.value} ${t.text}`}return Math.random()},compensateForLayoutChanges:function({currentNodes:t,currentRect:e,previousRect:n}){const r=e.x-n.x,i=e.y-n.y,o=e.width-n.width,a=e.height-n.height;let u=-r,l=-i;t.forEach((t=>{switch(t.dock){case"right":r>0&&(u=e.width);break;case"left":o<0&&(u=-n.width);break;case"top":a<0&&(l=-n.height);break;case"bottom":i>0&&(l=e.height)}switch(t.type){case"text":case"rect":t.x+=u,t.y+=l;break;case"circle":t.cx+=u,t.cy+=l;break;case"path":t.transform=`translate(${u}, ${l})`}}))}},shadowBars:{trackBy:function(){return Math.random()}},cacheProperties:function({viewCache:t,layout:e}){const n=rt(e);t.set("dataIndependentProperties",JSON.stringify(n))},propertiesHaveChanged:function({viewCache:t,layout:e}){const n=rt(e);return t.get("dataIndependentProperties")!==JSON.stringify(n)},nonUpdatingNode:{trackBy:function(){return Math.random()}}};function ot(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function at(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ut(){}var lt=.7,st=1/lt,ct="\\s*([+-]?\\d+)\\s*",ht="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ft="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",dt=/^#([0-9a-f]{3,8})$/,gt=new RegExp(`^rgb\\(${ct},${ct},${ct}\\)$`),pt=new RegExp(`^rgb\\(${ft},${ft},${ft}\\)$`),yt=new RegExp(`^rgba\\(${ct},${ct},${ct},${ht}\\)$`),mt=new RegExp(`^rgba\\(${ft},${ft},${ft},${ht}\\)$`),bt=new RegExp(`^hsl\\(${ht},${ft},${ft}\\)$`),vt=new RegExp(`^hsla\\(${ht},${ft},${ft},${ht}\\)$`),wt={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 xt(){return this.rgb().formatHex()}function Mt(){return this.rgb().formatRgb()}function Ct(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=dt.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?kt(e):3===n?new St(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?$t(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?$t(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=gt.exec(t))?new St(e[1],e[2],e[3],1):(e=pt.exec(t))?new St(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=yt.exec(t))?$t(e[1],e[2],e[3],e[4]):(e=mt.exec(t))?$t(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=bt.exec(t))?Et(e[1],e[2]/100,e[3]/100,1):(e=vt.exec(t))?Et(e[1],e[2]/100,e[3]/100,e[4]):wt.hasOwnProperty(t)?kt(wt[t]):"transparent"===t?new St(NaN,NaN,NaN,0):null}function kt(t){return new St(t>>16&255,t>>8&255,255&t,1)}function $t(t,e,n,r){return r<=0&&(t=e=n=NaN),new St(t,e,n,r)}function Tt(t){return t instanceof ut||(t=Ct(t)),t?new St((t=t.rgb()).r,t.g,t.b,t.opacity):new St}function St(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Dt(){return`#${Rt(this.r)}${Rt(this.g)}${Rt(this.b)}`}function Nt(){const t=qt(this.opacity);return`${1===t?"rgb(":"rgba("}${Ht(this.r)}, ${Ht(this.g)}, ${Ht(this.b)}${1===t?")":`, ${t})`}`}function qt(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ht(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Rt(t){return((t=Ht(t))<16?"0":"")+t.toString(16)}function Et(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new It(t,e,n,r)}function Lt(t){if(t instanceof It)return new It(t.h,t.s,t.l,t.opacity);if(t instanceof ut||(t=Ct(t)),!t)return new It;if(t instanceof It)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,u=o-i,l=(o+i)/2;return u?(a=e===o?(n-r)/u+6*(n<r):n===o?(r-e)/u+2:(e-n)/u+4,u/=l<.5?o+i:2-o-i,a*=60):u=l>0&&l<1?0:a,new It(a,u,l,t.opacity)}function It(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ut(t){return(t=(t||0)%360)<0?t+360:t}function Ft(t){return Math.max(0,Math.min(1,t||0))}function At(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}ot(ut,Ct,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:xt,formatHex:xt,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Lt(this).formatHsl()},formatRgb:Mt,toString:Mt}),ot(St,(function(t,e,n,r){return 1===arguments.length?Tt(t):new St(t,e,n,null==r?1:r)}),at(ut,{brighter(t){return t=null==t?st:Math.pow(st,t),new St(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?lt:Math.pow(lt,t),new St(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new St(Ht(this.r),Ht(this.g),Ht(this.b),qt(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:Dt,formatHex:Dt,formatHex8:function(){return`#${Rt(this.r)}${Rt(this.g)}${Rt(this.b)}${Rt(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Nt,toString:Nt})),ot(It,(function(t,e,n,r){return 1===arguments.length?Lt(t):new It(t,e,n,null==r?1:r)}),at(ut,{brighter(t){return t=null==t?st:Math.pow(st,t),new It(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?lt:Math.pow(lt,t),new It(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new St(At(t>=240?t-240:t+120,i,r),At(t,i,r),At(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new It(Ut(this.h),Ft(this.s),Ft(this.l),qt(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 t=qt(this.opacity);return`${1===t?"hsl(":"hsla("}${Ut(this.h)}, ${100*Ft(this.s)}%, ${100*Ft(this.l)}%${1===t?")":`, ${t})`}`}}));const Pt=Math.PI/180,Ot=180/Math.PI,zt=.96422,jt=1,Vt=.82521,Yt=4/29,_t=6/29,Bt=3*_t*_t,Wt=_t*_t*_t;function Zt(t){if(t instanceof Gt)return new Gt(t.l,t.a,t.b,t.opacity);if(t instanceof ee)return ne(t);t instanceof St||(t=Tt(t));var e,n,r=Kt(t.r),i=Kt(t.g),o=Kt(t.b),a=Xt((.2225045*r+.7168786*i+.0606169*o)/jt);return r===i&&i===o?e=n=a:(e=Xt((.4360747*r+.3850649*i+.1430804*o)/zt),n=Xt((.0139322*r+.0971045*i+.7141733*o)/Vt)),new Gt(116*a-16,500*(e-a),200*(a-n),t.opacity)}function Gt(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Xt(t){return t>Wt?Math.pow(t,1/3):t/Bt+Yt}function Jt(t){return t>_t?t*t*t:Bt*(t-Yt)}function Qt(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Kt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function te(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof ee)return new ee(t.h,t.c,t.l,t.opacity);if(t instanceof Gt||(t=Zt(t)),0===t.a&&0===t.b)return new ee(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Ot;return new ee(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new ee(t,e,n,null==r?1:r)}function ee(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function ne(t){if(isNaN(t.h))return new Gt(t.l,0,0,t.opacity);var e=t.h*Pt;return new Gt(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}ot(Gt,(function(t,e,n,r){return 1===arguments.length?Zt(t):new Gt(t,e,n,null==r?1:r)}),at(ut,{brighter(t){return new Gt(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new Gt(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new St(Qt(3.1338561*(e=zt*Jt(e))-1.6168667*(t=jt*Jt(t))-.4906146*(n=Vt*Jt(n))),Qt(-.9787684*e+1.9161415*t+.033454*n),Qt(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),ot(ee,te,at(ut,{brighter(t){return new ee(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new ee(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return ne(this).rgb()}}));var re,ie,oe={isDark:function(t){return te(t).l<70}};function ae(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}1===(re=ae).length&&(ie=re,re=function(t,e){return ae(ie(t),e)});var ue="$";function le(){}function se(t,e){var n=new le;if(t instanceof le)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==e)for(;++i<o;)n.set(i,t[i]);else for(;++i<o;)n.set(e(r=t[i],i,t),r)}else if(t)for(var a in t)n.set(a,t[a]);return n}function ce(){}le.prototype=se.prototype={constructor:le,has:function(t){return ue+t in this},get:function(t){return this[ue+t]},set:function(t,e){return this[ue+t]=e,this},remove:function(t){var e=ue+t;return e in this&&delete this[e]},clear:function(){for(var t in this)t[0]===ue&&delete this[t]},keys:function(){var t=[];for(var e in this)e[0]===ue&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)e[0]===ue&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)e[0]===ue&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)e[0]===ue&&++t;return t},empty:function(){for(var t in this)if(t[0]===ue)return!1;return!0},each:function(t){for(var e in this)e[0]===ue&&t(this[e],e.slice(1),this)}};var he=se.prototype;function fe(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function de(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ge(){}ce.prototype={constructor:ce,has:he.has,add:function(t){return this[ue+(t+="")]=t,this},remove:he.remove,clear:he.clear,values:he.keys,size:he.size,empty:he.empty,each:he.each};var pe=.7,ye=1/pe,me="\\s*([+-]?\\d+)\\s*",be="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ve="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",we=/^#([0-9a-f]{3})$/,xe=/^#([0-9a-f]{6})$/,Me=new RegExp("^rgb\\("+[me,me,me]+"\\)$"),Ce=new RegExp("^rgb\\("+[ve,ve,ve]+"\\)$"),ke=new RegExp("^rgba\\("+[me,me,me,be]+"\\)$"),$e=new RegExp("^rgba\\("+[ve,ve,ve,be]+"\\)$"),Te=new RegExp("^hsl\\("+[be,ve,ve]+"\\)$"),Se=new RegExp("^hsla\\("+[be,ve,ve,be]+"\\)$"),De={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 Ne(t){var e;return t=(t+"").trim().toLowerCase(),(e=we.exec(t))?new Le((e=parseInt(e[1],16))>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):(e=xe.exec(t))?qe(parseInt(e[1],16)):(e=Me.exec(t))?new Le(e[1],e[2],e[3],1):(e=Ce.exec(t))?new Le(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ke.exec(t))?He(e[1],e[2],e[3],e[4]):(e=$e.exec(t))?He(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Te.exec(t))?Ue(e[1],e[2]/100,e[3]/100,1):(e=Se.exec(t))?Ue(e[1],e[2]/100,e[3]/100,e[4]):De.hasOwnProperty(t)?qe(De[t]):"transparent"===t?new Le(NaN,NaN,NaN,0):null}function qe(t){return new Le(t>>16&255,t>>8&255,255&t,1)}function He(t,e,n,r){return r<=0&&(t=e=n=NaN),new Le(t,e,n,r)}function Re(t){return t instanceof ge||(t=Ne(t)),t?new Le((t=t.rgb()).r,t.g,t.b,t.opacity):new Le}function Ee(t,e,n,r){return 1===arguments.length?Re(t):new Le(t,e,n,null==r?1:r)}function Le(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Ie(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Ue(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Fe(t,e,n,r)}function Fe(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ae(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}fe(ge,Ne,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),fe(Le,Ee,de(ge,{brighter:function(t){return t=null==t?ye:Math.pow(ye,t),new Le(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?pe:Math.pow(pe,t),new Le(this.r*t,this.g*t,this.b*t,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"#"+Ie(this.r)+Ie(this.g)+Ie(this.b)},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),fe(Fe,(function(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof Fe)return new Fe(t.h,t.s,t.l,t.opacity);if(t instanceof ge||(t=Ne(t)),!t)return new Fe;if(t instanceof Fe)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,u=o-i,l=(o+i)/2;return u?(a=e===o?(n-r)/u+6*(n<r):n===o?(r-e)/u+2:(e-n)/u+4,u/=l<.5?o+i:2-o-i,a*=60):u=l>0&&l<1?0:a,new Fe(a,u,l,t.opacity)}(t):new Fe(t,e,n,null==r?1:r)}),de(ge,{brighter:function(t){return t=null==t?ye:Math.pow(ye,t),new Fe(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?pe:Math.pow(pe,t),new Fe(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Le(Ae(t>=240?t-240:t+120,i,r),Ae(t,i,r),Ae(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var Pe=Math.PI/180,Oe=180/Math.PI,ze=.96422,je=1,Ve=.82521,Ye=4/29,_e=6/29,Be=3*_e*_e,We=_e*_e*_e;function Ze(t){if(t instanceof Ge)return new Ge(t.l,t.a,t.b,t.opacity);if(t instanceof tn){if(isNaN(t.h))return new Ge(t.l,0,0,t.opacity);var e=t.h*Pe;return new Ge(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof Le||(t=Re(t));var n,r,i=Ke(t.r),o=Ke(t.g),a=Ke(t.b),u=Xe((.2225045*i+.7168786*o+.0606169*a)/je);return i===o&&o===a?n=r=u:(n=Xe((.4360747*i+.3850649*o+.1430804*a)/ze),r=Xe((.0139322*i+.0971045*o+.7141733*a)/Ve)),new Ge(116*u-16,500*(n-u),200*(u-r),t.opacity)}function Ge(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Xe(t){return t>We?Math.pow(t,1/3):t/Be+Ye}function Je(t){return t>_e?t*t*t:Be*(t-Ye)}function Qe(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ke(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function tn(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}fe(Ge,(function(t,e,n,r){return 1===arguments.length?Ze(t):new Ge(t,e,n,null==r?1:r)}),de(ge,{brighter:function(t){return new Ge(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Ge(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Le(Qe(3.1338561*(e=ze*Je(e))-1.6168667*(t=je*Je(t))-.4906146*(n=Ve*Je(n))),Qe(-.9787684*e+1.9161415*t+.033454*n),Qe(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),fe(tn,(function(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof tn)return new tn(t.h,t.c,t.l,t.opacity);if(t instanceof Ge||(t=Ze(t)),0===t.a&&0===t.b)return new tn(NaN,0,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Oe;return new tn(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new tn(t,e,n,null==r?1:r)}),de(ge,{brighter:function(t){return new tn(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new tn(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Ze(this).rgb()}}));var en=-.14861,nn=1.78277,rn=-.29227,on=-.90649,an=1.97294,un=an*on,ln=an*nn,sn=nn*rn-on*en;function cn(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof hn)return new hn(t.h,t.s,t.l,t.opacity);t instanceof Le||(t=Re(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(sn*r+un*e-ln*n)/(sn+un-ln),o=r-i,a=(an*(n-i)-rn*o)/on,u=Math.sqrt(a*a+o*o)/(an*i*(1-i)),l=u?Math.atan2(a,o)*Oe-120:NaN;return new hn(l<0?l+360:l,u,i,t.opacity)}(t):new hn(t,e,n,null==r?1:r)}function hn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function fn(t){return function(){return t}}function dn(t,e){return function(n){return t+n*e}}function gn(t){return 1==(t=+t)?pn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):fn(isNaN(e)?n:e)}}function pn(t,e){var n=e-t;return n?dn(t,n):fn(isNaN(t)?e:t)}function yn(t){return function e(n){function r(e,r){var i=t((e=cn(e)).h,(r=cn(r)).h),o=pn(e.s,r.s),a=pn(e.l,r.l),u=pn(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=o(t),e.l=a(Math.pow(t,n)),e.opacity=u(t),e+""}}return n=+n,r.gamma=e,r}(1)}function mn(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}fe(hn,cn,de(ge,{brighter:function(t){return t=null==t?ye:Math.pow(ye,t),new hn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?pe:Math.pow(pe,t),new hn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*Pe,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new Le(255*(e+n*(en*r+nn*i)),255*(e+n*(rn*r+on*i)),255*(e+n*(an*r)),this.opacity)}})),function t(e){var n=gn(e);function r(t,e){var r=n((t=Ee(t)).r,(e=Ee(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=pn(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1),yn((function(t,e){var n=e-t;return n?dn(t,n>180||n<-180?n-360*Math.round(n/360):n):fn(isNaN(t)?e:t)})),yn(pn);var bn,vn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function wn(t){return new xn(t)}function xn(t){if(!(e=vn.exec(t)))throw new Error("invalid format: "+t);var e;this.fill=e[1]||" ",this.align=e[2]||">",this.sign=e[3]||"-",this.symbol=e[4]||"",this.zero=!!e[5],this.width=e[6]&&+e[6],this.comma=!!e[7],this.precision=e[8]&&+e[8].slice(1),this.trim=!!e[9],this.type=e[10]||""}function Mn(t,e){var n=mn(t,e);if(!n)return t+"";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")}wn.prototype=xn.prototype,xn.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 Cn={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Mn(100*t,e)},r:Mn,s:function(t,e){var n=mn(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(bn=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")+mn(t,Math.max(0,e+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function kn(t){return t}var $n,Tn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Sn(t){var e,n,r=t.grouping&&t.thousands?(e=t.grouping,n=t.thousands,function(t,r){for(var i=t.length,o=[],a=0,u=e[0],l=0;i>0&&u>0&&(l+u+1>r&&(u=Math.max(1,r-l)),o.push(t.substring(i-=u,i+u)),!((l+=u+1)>r));)u=e[a=(a+1)%e.length];return o.reverse().join(n)}):kn,i=t.currency,o=t.decimal,a=t.numerals?function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(t.numerals):kn,u=t.percent||"%";function l(t){var e=(t=wn(t)).fill,n=t.align,l=t.sign,s=t.symbol,c=t.zero,h=t.width,f=t.comma,d=t.precision,g=t.trim,p=t.type;"n"===p?(f=!0,p="g"):Cn[p]||(null==d&&(d=12),g=!0,p="g"),(c||"0"===e&&"="===n)&&(c=!0,e="0",n="=");var y="$"===s?i[0]:"#"===s&&/[boxX]/.test(p)?"0"+p.toLowerCase():"",m="$"===s?i[1]:/[%p]/.test(p)?u:"",b=Cn[p],v=/[defgprs%]/.test(p);function w(t){var i,u,s,w=y,x=m;if("c"===p)x=b(t)+x,t="";else{var M=(t=+t)<0;if(t=b(Math.abs(t),d),g&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(i>0){if(!+t[r])break t;i=0}}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),M&&0==+t&&(M=!1),w=(M?"("===l?l:"-":"-"===l||"("===l?"":l)+w,x=("s"===p?Tn[8+bn/3]:"")+x+(M&&"("===l?")":""),v)for(i=-1,u=t.length;++i<u;)if(48>(s=t.charCodeAt(i))||s>57){x=(46===s?o+t.slice(i+1):t.slice(i))+x,t=t.slice(0,i);break}}f&&!c&&(t=r(t,1/0));var C=w.length+t.length+x.length,k=C<h?new Array(h-C+1).join(e):"";switch(f&&c&&(t=r(k+t,k.length?h-x.length:1/0),k=""),n){case"<":t=w+t+x+k;break;case"=":t=w+k+t+x;break;case"^":t=k.slice(0,C=k.length>>1)+w+t+x+k.slice(C);break;default:t=k+w+t+x}return a(t)}return d=null==d?6:/[gprs]/.test(p)?Math.max(1,Math.min(21,d)):Math.max(0,Math.min(20,d)),w.toString=function(){return t+""},w}return{format:l,formatPrefix:function(t,e){var n,r=l(((t=wn(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor((n=e,((n=mn(Math.abs(n)))?n[1]:NaN)/3)))),o=Math.pow(10,-i),a=Tn[8+i/3];return function(t){return r(o*t)+a}}}}($n=Sn({decimal:".",thousands:",",grouping:[3],currency:["$",""]})).format,$n.formatPrefix;var Dn=new Date,Nn=new Date;function qn(t,e,n,r){function i(e){return t(e=new Date(+e)),e}return i.floor=i,i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,o){var a,u=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return u;do{u.push(a=new Date(+n)),e(n,o),t(n)}while(a<n&&n<r);return u},i.filter=function(n){return qn((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return Dn.setTime(+e),Nn.setTime(+r),t(Dn),t(Nn),Math.floor(n(Dn,Nn))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var Hn=qn((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));Hn.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?qn((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):Hn:null},Hn.range;var Rn=1e3,En=6e4,Ln=36e5,In=864e5,Un=6048e5;qn((function(t){t.setTime(Math.floor(t/Rn)*Rn)}),(function(t,e){t.setTime(+t+e*Rn)}),(function(t,e){return(e-t)/Rn}),(function(t){return t.getUTCSeconds()})).range,qn((function(t){t.setTime(Math.floor(t/En)*En)}),(function(t,e){t.setTime(+t+e*En)}),(function(t,e){return(e-t)/En}),(function(t){return t.getMinutes()})).range,qn((function(t){var e=t.getTimezoneOffset()*En%Ln;e<0&&(e+=Ln),t.setTime(Math.floor((+t-e)/Ln)*Ln+e)}),(function(t,e){t.setTime(+t+e*Ln)}),(function(t,e){return(e-t)/Ln}),(function(t){return t.getHours()})).range;var Fn=qn((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*En)/In}),(function(t){return t.getDate()-1}));function An(t){return qn((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*En)/Un}))}Fn.range;var Pn=An(0),On=An(1),zn=An(2),jn=An(3),Vn=An(4),Yn=An(5),_n=An(6);Pn.range,On.range,zn.range,jn.range,Vn.range,Yn.range,_n.range,qn((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})).range;var Bn=qn((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));Bn.every=function(t){return isFinite(t=Math.floor(t))&&t>0?qn((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null},Bn.range,qn((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*En)}),(function(t,e){return(e-t)/En}),(function(t){return t.getUTCMinutes()})).range,qn((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*Ln)}),(function(t,e){return(e-t)/Ln}),(function(t){return t.getUTCHours()})).range;var Wn=qn((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/In}),(function(t){return t.getUTCDate()-1}));function Zn(t){return qn((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/Un}))}Wn.range;var Gn=Zn(0),Xn=Zn(1),Jn=Zn(2),Qn=Zn(3),Kn=Zn(4),tr=Zn(5),er=Zn(6);Gn.range,Xn.range,Jn.range,Qn.range,Kn.range,tr.range,er.range,qn((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})).range;var nr=qn((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));function rr(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function ir(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function or(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}nr.every=function(t){return isFinite(t=Math.floor(t))&&t>0?qn((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null},nr.range;var ar,ur,lr,sr={"-":"",_:" ",0:"0"},cr=/^\s*\d+/,hr=/^%/,fr=/[\\^$*+?|[\]().{}]/g;function dr(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function gr(t){return t.replace(fr,"\\$&")}function pr(t){return new RegExp("^(?:"+t.map(gr).join("|")+")","i")}function yr(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function mr(t,e,n){var r=cr.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function br(t,e,n){var r=cr.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function vr(t,e,n){var r=cr.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function wr(t,e,n){var r=cr.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function xr(t,e,n){var r=cr.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Mr(t,e,n){var r=cr.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Cr(t,e,n){var r=cr.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function kr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function $r(t,e,n){var r=cr.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Tr(t,e,n){var r=cr.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Sr(t,e,n){var r=cr.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Dr(t,e,n){var r=cr.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Nr(t,e,n){var r=cr.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function qr(t,e,n){var r=cr.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=cr.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=cr.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Er(t,e,n){var r=hr.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Lr(t,e,n){var r=cr.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Ir(t,e,n){var r=cr.exec(e.slice(n));return r?(t.Q=1e3*+r[0],n+r[0].length):-1}function Ur(t,e){return dr(t.getDate(),e,2)}function Fr(t,e){return dr(t.getHours(),e,2)}function Ar(t,e){return dr(t.getHours()%12||12,e,2)}function Pr(t,e){return dr(1+Fn.count(Bn(t),t),e,3)}function Or(t,e){return dr(t.getMilliseconds(),e,3)}function zr(t,e){return Or(t,e)+"000"}function jr(t,e){return dr(t.getMonth()+1,e,2)}function Vr(t,e){return dr(t.getMinutes(),e,2)}function Yr(t,e){return dr(t.getSeconds(),e,2)}function _r(t){var e=t.getDay();return 0===e?7:e}function Br(t,e){return dr(Pn.count(Bn(t),t),e,2)}function Wr(t,e){var n=t.getDay();return t=n>=4||0===n?Vn(t):Vn.ceil(t),dr(Vn.count(Bn(t),t)+(4===Bn(t).getDay()),e,2)}function Zr(t){return t.getDay()}function Gr(t,e){return dr(On.count(Bn(t),t),e,2)}function Xr(t,e){return dr(t.getFullYear()%100,e,2)}function Jr(t,e){return dr(t.getFullYear()%1e4,e,4)}function Qr(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+dr(e/60|0,"0",2)+dr(e%60,"0",2)}function Kr(t,e){return dr(t.getUTCDate(),e,2)}function ti(t,e){return dr(t.getUTCHours(),e,2)}function ei(t,e){return dr(t.getUTCHours()%12||12,e,2)}function ni(t,e){return dr(1+Wn.count(nr(t),t),e,3)}function ri(t,e){return dr(t.getUTCMilliseconds(),e,3)}function ii(t,e){return ri(t,e)+"000"}function oi(t,e){return dr(t.getUTCMonth()+1,e,2)}function ai(t,e){return dr(t.getUTCMinutes(),e,2)}function ui(t,e){return dr(t.getUTCSeconds(),e,2)}function li(t){var e=t.getUTCDay();return 0===e?7:e}function si(t,e){return dr(Gn.count(nr(t),t),e,2)}function ci(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Kn(t):Kn.ceil(t),dr(Kn.count(nr(t),t)+(4===nr(t).getUTCDay()),e,2)}function hi(t){return t.getUTCDay()}function fi(t,e){return dr(Xn.count(nr(t),t),e,2)}function di(t,e){return dr(t.getUTCFullYear()%100,e,2)}function gi(t,e){return dr(t.getUTCFullYear()%1e4,e,4)}function pi(){return"+0000"}function yi(){return"%"}function mi(t){return+t}function bi(t){return Math.floor(+t/1e3)}!function(t){ar=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,u=t.months,l=t.shortMonths,s=pr(i),c=yr(i),h=pr(o),f=yr(o),d=pr(a),g=yr(a),p=pr(u),y=yr(u),m=pr(l),b=yr(l),v={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return u[t.getMonth()]},c:null,d:Ur,e:Ur,f:zr,H:Fr,I:Ar,j:Pr,L:Or,m:jr,M:Vr,p:function(t){return i[+(t.getHours()>=12)]},Q:mi,s:bi,S:Yr,u:_r,U:Br,V:Wr,w:Zr,W:Gr,x:null,X:null,y:Xr,Y:Jr,Z:Qr,"%":yi},w={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return u[t.getUTCMonth()]},c:null,d:Kr,e:Kr,f:ii,H:ti,I:ei,j:ni,L:ri,m:oi,M:ai,p:function(t){return i[+(t.getUTCHours()>=12)]},Q:mi,s:bi,S:ui,u:li,U:si,V:ci,w:hi,W:fi,x:null,X:null,y:di,Y:gi,Z:pi,"%":yi},x={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=g[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=b[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.m=y[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return k(t,e,n,r)},d:Tr,e:Tr,f:Rr,H:Dr,I:Dr,j:Sr,L:Hr,m:$r,M:Nr,p:function(t,e,n){var r=s.exec(e.slice(n));return r?(t.p=c[r[0].toLowerCase()],n+r[0].length):-1},Q:Lr,s:Ir,S:qr,u:br,U:vr,V:wr,w:mr,W:xr,x:function(t,e,r){return k(t,n,e,r)},X:function(t,e,n){return k(t,r,e,n)},y:Cr,Y:Mr,Z:kr,"%":Er};function M(t,e){return function(n){var r,i,o,a=[],u=-1,l=0,s=t.length;for(n instanceof Date||(n=new Date(+n));++u<s;)37===t.charCodeAt(u)&&(a.push(t.slice(l,u)),null!=(i=sr[r=t.charAt(++u)])?r=t.charAt(++u):i="e"===r?" ":"0",(o=e[r])&&(r=o(n,i)),a.push(r),l=u+1);return a.push(t.slice(l,u)),a.join("")}}function C(t,e){return function(n){var r,i,o=or(1900);if(k(o,t,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=ir(or(o.y))).getUTCDay(),r=i>4||0===i?Xn.ceil(r):Xn(r),r=Wn.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=e(or(o.y))).getDay(),r=i>4||0===i?On.ceil(r):On(r),r=Fn.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?ir(or(o.y)).getUTCDay():e(or(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,ir(o)):e(o)}}function k(t,e,n,r){for(var i,o,a=0,u=e.length,l=n.length;a<u;){if(r>=l)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=x[i in sr?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return v.x=M(n,v),v.X=M(r,v),v.c=M(e,v),w.x=M(n,w),w.X=M(r,w),w.c=M(e,w),{format:function(t){var e=M(t+="",v);return e.toString=function(){return t},e},parse:function(t){var e=C(t+="",rr);return e.toString=function(){return t},e},utcFormat:function(t){var e=M(t+="",w);return e.toString=function(){return t},e},utcParse:function(t){var e=C(t,ir);return e.toString=function(){return t},e}}}(t),ar.format,ar.parse,ur=ar.utcFormat,lr=ar.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 vi="%Y-%m-%dT%H:%M:%S.%LZ";Date.prototype.toISOString||ur(vi),+new Date("2000-01-01T00:00:00.000Z")||lr(vi),et.bind(null,!0);const wi=[[2,4,6],[2,4],[3]],xi=[,[,,[[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 Mi(t,e,n){const r=t?t.length:0;let i,o=void 0===e?Number.MAX_VALUE:t[0]/e;for(i=1;i<r;i++)o=Math.min(o,t[i]/t[i-1]);void 0!==n&&(o=Math.min(o,n/t[r-1])),t.splice(0,0,o)}function Ci(t,e,n){let r;const i=t?t.length:0;for(r=0;r<i;r++)Mi(t[r],e,n)}function ki(t,e=!1){const n=e?"IM_5791_SVG_LABEL_RENDERING":"IM_4962_SVG_CHART_LABELS";if(null!=t&&t.isEnabled(n))return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?void 0:"svg"}function $i(t){const e=t.node.desc&&t.node.desc.share;return e?t.formatter("share")(e):""}function Ti(t){return t.formatter("num")(t.node.data.num.value)}function Si({data:t}){return t?t.label:""}function Di(t){if(t.dataPoint.auto)return $i;switch(t.dataPoint.labelMode){case"share":default:return $i;case"value":return Ti;case"none":return null}}function Ni(t,e,n,r,i){const o=i.axis.label.getStyle(),a=i.label.value.getStyle(),u=n.getStyles().label.value;return{type:"labels",key:"funnel-labels",renderer:ki(t,!0),layout:{displayOrder:2},settings:{sources:[{component:"fun",selector:".labelLeft",strategy:{type:"rows",settings:{align:0,fill:o.fill,fontSize:parseInt(o.fontSize,10),fontFamily:o.fontFamily,labels:[{label:Si}],linkData:t=>`${t.data.value} ${Si(t)}`}}},{component:"fun",selector:".labelCenter",strategy:{type:"rows",settings:{align:.5,fill:a.useContrastColor?({node:t})=>(t=>oe.isDark(t.desc.fill)?u.lightColor:u.darkColor)(t):a.fill,fontSize:parseInt(a.fontSize,10),fontFamily:a.fontFamily,labels:[{label:Di(e)}],linkData:t=>"none"===e.dataPoint.labelMode?Math.random():`${t.data.value} ${Di(e)(t)}`}}}]},animations:{enabled:r,trackBy:t=>t.data}}}function qi(t,e,n){if(!e.showDimensionTitle||!e.qHyperCube.qDimensionInfo[0].qFallbackTitle)return!1;const r=e.qHyperCube.qDimensionInfo[0].qFallbackTitle,i=n.axis.title.getStyle();return{type:"text",key:"dimension-title",renderer:ki(t,!0),text:r,layout:{dock:"top"},style:{text:{fill:i.fill,fontSize:i.fontSize,fontFamily:i.fontFamily}}}}function Hi(){return{share:{type:"d3-number",format:".1%"},num:{data:{field:"qMeasureInfo/0"}}}}function Ri({picasso:t}){const e=h(),n=f(),r=d(),i=g(),o=p(),s=y(),[c,v]=m(),[w,x]=m(),[M,C]=m(),[k,$]=m();return b((()=>{const c=a({picasso:t,model:r,app:i,translator:o,config:{auto:!1,key:"fill"}});e.style.overflow="hidden";const h=t({renderer:{prio:[s.renderer||"svg"]}}).chart({element:e,data:[],settings:{}}),f=u({chart:h,selections:n,config:{selectionActions:!1}});return C(f),x(c),v(h),$(l()),()=>{f.destroy(),h.destroy()}}),[]),[c,w,M,k]}!function(){let t,e;for(Ci(wi,1,10),t=0;t<xi.length;t++)if(xi[t])for(e=0;e<xi[t].length;e++)Array.isArray(xi[t][e])&&Ci(xi[t][e])}()}}}));
7
+ System.register(["picasso.js","picasso-plugin-q","qlik-chart-modules","@nebula.js/stardust"],(function(t){"use strict";var e,n,r,i,o,a,u,l,s,c,h,f,d,g,p,y,m,b,v,w,x,M,C,k,$,T;return{setters:[function(t){e=t.default},function(t){n=t.default},function(t){r=t.fontResolver,i=t.getValue,o=t.setValue,a=t.colorService,u=t.selectionService,l=t.cache,s=t.pluginService,c=t.themeService},function(t){h=t.useElement,f=t.useSelections,d=t.useModel,g=t.useApp,p=t.useTranslator,y=t.useOptions,m=t.useState,b=t.useEffect,v=t.useStaleLayout,w=t.useTheme,x=t.useConstraints,M=t.useRect,C=t.usePlugins,k=t.useAppLayout,$=t.usePromise,T=t.onTakeSnapshot}],execute:function(){t("default",(function(t){const r=e();r.use(n),r.component("funnel",I);const{flags:i}=t;return{ext:V(t),qae:{properties:{initial:U},data:{targets:Y}},component(){!function({picasso:t,flags:e}){const n=v(),r=w(),i=x(),o=M(),a=C(),u=k().qLocaleInfo,[l,h,f,d]=Ri({picasso:t,layout:n}),g=y(),p=()=>{const t=l.element.clientWidth!==d.get("width")||l.element.clientHeight!==d.get("height");return!1!==g.chartAnimations&&e.isEnabled("IM_1355_ANIMATIONS_FUNNEL")&&!t&&!it.propertiesHaveChanged({viewCache:d,layout:n})},[m]=$((()=>{if(!h)return Promise.resolve();const e=({getUseBaseColors:t})=>({theme:r,colorProps:{...n.color,useBaseColors:t(n)},layout:n,hc:n.qHyperCube}),i=function(t){const e={layout:t,keys:{SCALE:{FILL:"fill"},COMPONENT:{FUNNEL:"fun",FUNNEL_LABELS:"funnel-labels",DIMENSION_TITLE:"dimension-title"}}};return e}(n),o=s({picassoInstance:t,plugins:a,pluginArgs:i});return Promise.all([h.initialize({createConfig:e}),o.initialize()]).then((()=>o))}),[n,h]);b((()=>{if(!l||!h||!m)return;const t=[{type:"q",key:"qHyperCube",data:n.qHyperCube,config:{localeInfo:u}},...h.getData()],o=c({theme:r,config:{id:"funnelChart"}}),a=function({layout:t,themeService:e}){const n=e.getStyles(),r=e=>{var n,r;return null!==(n=null===(r=t.components)||void 0===r?void 0:r.find((t=>t.key===e)))&&void 0!==n?n:void 0};return{axis:{title:{getStyle:()=>{var t,e,i,o,a,u;return{fontFamily:null!==(t=null===(e=r("axis"))||void 0===e||null===(e=e.axis)||void 0===e||null===(e=e.title)||void 0===e?void 0:e.fontFamily)&&void 0!==t?t:n.axis.title.fontFamily,fontSize:null!==(i=null===(o=r("axis"))||void 0===o||null===(o=o.axis)||void 0===o||null===(o=o.title)||void 0===o?void 0:o.fontSize)&&void 0!==i?i:n.axis.title.fontSize,fill:null!==(a=null===(u=r("axis"))||void 0===u||null===(u=u.axis)||void 0===u||null===(u=u.title)||void 0===u||null===(u=u.color)||void 0===u?void 0:u.color)&&void 0!==a?a:n.axis.title.color}}},label:{getStyle:()=>{var t,e,i,o,a,u;return{fontSize:null!==(t=null===(e=r("axis"))||void 0===e||null===(e=e.axis)||void 0===e||null===(e=e.label)||void 0===e||null===(e=e.name)||void 0===e?void 0:e.fontSize)&&void 0!==t?t:n.axis.label.name.fontSize,fontFamily:null!==(i=null===(o=r("axis"))||void 0===o||null===(o=o.axis)||void 0===o||null===(o=o.label)||void 0===o||null===(o=o.name)||void 0===o?void 0:o.fontFamily)&&void 0!==i?i:n.axis.label.name.fontFamily,fill:null!==(a=null===(u=r("axis"))||void 0===u||null===(u=u.axis)||void 0===u||null===(u=u.label)||void 0===u||null===(u=u.name)||void 0===u||null===(u=u.color)||void 0===u?void 0:u.color)&&void 0!==a?a:n.axis.label.name.color}}}},label:{value:{getStyle:()=>{var t,e,i,o,a,u,l,s;return{fontSize:null!==(t=null===(e=r("label"))||void 0===e||null===(e=e.label)||void 0===e||null===(e=e.value)||void 0===e?void 0:e.fontSize)&&void 0!==t?t:n.label.value.fontSize,fontFamily:null!==(i=null===(o=r("label"))||void 0===o||null===(o=o.label)||void 0===o||null===(o=o.value)||void 0===o?void 0:o.fontFamily)&&void 0!==i?i:n.label.value.fontFamily,fill:null!==(a=null===(u=r("label"))||void 0===u||null===(u=u.label)||void 0===u||null===(u=u.value)||void 0===u||null===(u=u.color)||void 0===u?void 0:u.color)&&void 0!==a?a:n.label.value.color,useContrastColor:null===(l=null===(s=r("label"))||void 0===s||null===(s=s.label)||void 0===s||null===(s=s.value)||void 0===s?void 0:s.useContrastColor)||void 0===l||l}}}}}}({layout:n,themeService:o}),s=function({flags:t,layout:e,constraints:n,colorService:r,themeService:i,styleModel:o,pluginService:a,animationsEnabled:u}){const l=function(t){const e={...t.getScales()};return e}(r),s=r.getPalettes(),c=function({layout:t,constraints:e,colorService:n,animationsEnabled:r}){const i=n.getDatumProps(),o=n.getColor(),a={type:"funnel",key:"fun",data:{extract:{field:"qDimensionInfo/0",props:{num:{field:"qMeasureInfo/0"},...i}}},brush:e.select||e.active?{}:{trigger:[{contexts:["selection"],data:[""]}],consume:[{context:"selection",filter:t=>"section"===t.tag,style:{inactive:{opacity:.3}}}]},settings:{num:{ref:"num"},fill:o,mode:t.funnel.mode},animations:{enabled:r,isMainComponent:!0,trackBy:t=>`${t.tag}: ${t.data.value}`}};return a}({layout:e,constraints:n,colorService:r,animationsEnabled:u}),h=[c,Ni(t,e,i,u,o),qi(t,e,o)];return{palettes:s,scales:l,components:a.extendComponents(h),formatters:Hi()}}({flags:e,layout:n,constraints:i,colorService:h,themeService:o,styleModel:a,pluginService:m,animationsEnabled:p});l.update({data:t,settings:s}),d.set("width",l.element.clientWidth),d.set("height",l.element.clientHeight),it.cacheProperties({viewCache:d,layout:n})}),[l,h,r.name(),m,i]),b((()=>{l&&(l.update(),d.set("width",l.element.clientWidth),d.set("height",l.element.clientHeight))}),[o.width,o.height]),b((()=>{f&&f.setLayout(n)}),[n]),T((t=>h.getSnapshotData().then((e=>(t.snapshotData=t.snapshotData||{},t.snapshotData.content=t.snapshotData.content||{},t.snapshotData.content.chartData=e,t))).catch((()=>t))))}({picasso:r,flags:i})}}}));const S={fill:"steelblue",num:1},D=.9,N=150,q=(t,e,n)=>{let r=0,i=0,o=0,a={},u=0;if("labelCenter"===t)r=e.bottomLeft.x,i=e.topRight.y,o=e.bottomRight.x-e.bottomLeft.x,u=e.bottomRight.y-e.topRight.y,a={share:n.share,fill:n.fill};else{const t=180/Math.PI*Math.atan((e.bottomRight.y-e.topRight.y)/(e.topRight.x-e.bottomRight.x));r=t<15&&t>=0?e.topRight.x:t>-15&&t<0?e.bottomRight.x:t<-15?(e.bottomRight.x-e.topRight.x)/2+e.topRight.x+15:(e.topRight.x-e.bottomRight.x)/2+e.bottomRight.x+15,i=e.topRight.y,o=e.width-r,u=e.bottomRight.y-e.topRight.y,a={fill:n.fill}}return{tag:t,type:"rect",x:r,y:i,width:o,height:u,data:n.data,desc:a,fill:"none"}},H=(t,e)=>{const n=(t=>{const e=(t=>{let e=0;return t.forEach((t=>{t.num>e&&(e=t.num)})),e})(t);let n=0;return t.slice().reverse().map((t=>{const r={datum:t,s:n/e,e:t.num/e};return n=t.num,r})).reverse()})(t),r=e.width*D,i=e.height*D,o=(e.width-r)/2,a=(e.height-i)/2,u=r-(r>N&&i>N?100:0),l=(i-1*(n.length-1))/n.length,s=[];return n.forEach(((t,r)=>{const i=(c=t.e,h=r<n.length-1?t.s:t.e,[.5-.5*c,.5+.5*c,.5+.5*h,.5-.5*h]).map((t=>Math.round(t*u+o)));var c,h;const f=l*r+1*r+a,d={bottomRight:{x:i[2],y:Math.round(f+l)},bottomLeft:{x:i[3],y:Math.round(f+l)},topRight:{x:i[1],y:Math.round(f)},topLeft:{x:i[0],y:Math.round(f)},width:e.width},g=`M${d.topLeft.x},${d.topLeft.y} L${d.topRight.x},${d.topRight.y} ${d.bottomRight.x},${d.bottomRight.y} ${d.bottomLeft.x},${d.bottomLeft.y}Z`;s.push({tag:"section",type:"path",d:g,data:t.datum.data,fill:t.datum.fill});const p={share:t.e,fill:t.datum.fill,data:t.datum.data};l>12&&(d.bottomRight.x-d.bottomLeft.x>32&&s.push(q("labelCenter",d,p)),s.push(q("labelLeft",d,p)))})),s},R=(t,e,n,r)=>(r-t)/r*(e-n)+n,E=(t,e,n)=>{const r=t.filter((t=>"NaN"!==t.num&&t.num>0)),i=r.length,o=n.width*D,a=n.height*D,u=Math.round((n.width-o)/2),l=Math.round((n.height-a)/2),s=o-(o>N&&a>N?100:0),c=a-1*(i-1),h=[],f=r[0].data.num.value;let d=l;return r.forEach(((t,r)=>{const i=e[r]*c,o=Math.round(R(d-l,s,.2*s,a)/2),g=Math.round(R(d-l+i,s,.2*s,a)/2),p=u+Math.round(s/2),y={bottomRight:{x:p+g,y:Math.round(d+i)},bottomLeft:{x:p-g,y:Math.round(d+i)},topRight:{x:p+o,y:d},topLeft:{x:p-o,y:d},width:n.width},m=`M${y.topLeft.x},${y.topLeft.y} L${y.topRight.x},${y.topRight.y} ${y.bottomRight.x},${y.bottomRight.y} ${y.bottomLeft.x},${y.bottomLeft.y}Z`;h.push({tag:"section",type:"path",d:m,data:t.data,fill:t.fill});const b={share:t.data.num.value/f,fill:t.fill,data:t.data};i>2&&(y.bottomRight.x-y.bottomLeft.x>32&&h.push(q("labelCenter",y,b)),h.push(q("labelLeft",y,b))),d+=i+1})),h},L=(t,e,n)=>{const r=t.filter((t=>"NaN"!==t.num&&t.num>0));if(r&&r.length>0)switch(e){case"WIDTH":default:return H(r,n);case"ORDER":return E(r,r.map((()=>1/r.length)),n);case"HEIGHT":return E(r,(t=>{const e=t.reduce(((t,e)=>t+e.data.num.value),0);return t.map((t=>t.data.num.value/e))})(r),n);case"AREA":return E(r,((t,e,n)=>{const r=t.reduce(((t,e)=>t+e.data.num.value),0),i=e.width*D,o=e.height*D,a=i*n,u=o*(i+a)/2,l=(i-a)/2/o,s=[];let c=0;for(let e=t.length-1;e>=0;e--){const n=t[e].data.num.value/r,i=2*l*c+a,h=-i/(2*l)+Math.sqrt(i*i/(4*l*l)+n*u/l);s[e]=h/o,c+=h}return s})(r,n,.2),n)}return[]};var I={require:["resolver"],defaultSettings:{settings:{},data:{},style:{item:"$shape"}},render({data:t}){const e=this.resolver.resolve({data:t,defaults:{...S,...this.style.item},settings:this.settings.settings});return L(e.items,this.settings.settings.mode,this.rect)}};const U={version:"1.9.1",color:{auto:!0,autoMinMax:!0,byDimDef:void 0,byMeasureDef:void 0,colorExpression:void 0,dimensionScheme:"12",expressionIsColor:!0,expressionLabel:"",measureMin:void 0,measureMax:void 0,measureScheme:"sg",mode:"primary",paletteColor:{index:6},persistent:!1,reverseScheme:!1,singleColor:void 0,useBaseColors:"off",useDimColVal:!0,useMeasureGradient:!0},dataPoint:{auto:!0,labelMode:"share"},footnote:"",funnel:{mode:"WIDTH"},qHyperCubeDef:{qDimensions:[],qMeasures:[],qInterColumnSortOrder:[],qInitialDataFetch:[{qWidth:2,qHeight:5e3}],qSuppressMissing:!0,qSuppressZero:!1},showDimensionTitle:!0,showTitles:!0,subtitle:"",title:""};function F(t,e,n){const r=`${t}.fontFamily`,i=`${t}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:r,options:()=>e.getOptions(r),defaultValue:()=>e.getDefaultValue(r)},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:i,options:()=>e.getOptions(i),defaultValue:()=>e.getDefaultValue(i)},fontColorItem:{component:"color-picker",width:!1,ref:`${t}.color`,defaultValue:()=>({color:n.getStyle("object.funnelChart",t,"color")})}}}}}function A(t,e,n){const i=r({theme:t,translator:n,flags:e,config:{id:"funnelChart",paths:["axis.title","axis.label.name","label.value"]}});return{component:"styling-panel",show:!0,chartType:"funnelchart",translation:"LayerStyleEditor.component.styling",chartTitle:"Object.FunnelChart",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:!0,items:{axisTitleSection:{component:"panel-section",label:"Dimension title",items:{dimensionTitleItems:{component:"items",ref:"components",key:"axis",items:F("axis.title",i,t)}}},labelNameSection:{component:"panel-section",label:"Dimension value label",items:{dimensionTitleItems:{component:"items",ref:"components",key:"axis",items:F("axis.label.name",i,t)}}},labelValueSection:{component:"panel-section",label:"Value Label",items:{labelItems:{component:"items",ref:"components",key:"label",items:{...F("label.value",i,t),contrastColor:{component:"checkbox",type:"boolean",ref:"label.value.useContrastColor",translation:"properties.dataPoints.valuelabel.contrast",defaultValue:!0}}}}}}}}const P={uses:"sorting"},O=(t,e,n)=>{var r;const i=null==n||null===(r=n.sense)||void 0===r?void 0:r.theme;return{uses:"settings",items:{presentation:{type:"items",label:"Presentation",grouped:!0,items:{...(null==e?void 0:e.isEnabled("SENSECLIENT_IM_4897_VIZBUNDLE_STYLING"))&&{funnelStyling:A(i,e,t)},funnelmode:{ref:"funnel.mode",label:"Funnel Mode",type:"string",component:"dropdown",options:[{value:"AREA",label:"Area"},{value:"HEIGHT",label:"Height"},{value:"WIDTH",label:"Width"},{value:"ORDER",label:"Ordering"}],defaultValue:"WIDTH"},dimensionTitle:{ref:"showDimensionTitle",type:"boolean",component:"switch",label:"Dimension title",defaultValue:!0,options:[{value:!0,label:"Auto"},{value:!1,label:"Off"}]},valuesAuto:{ref:"dataPoint.auto",type:"boolean",label:"Value labels",component:"switch",defaultValue:!0,options:[{value:!0,label:"Auto"},{value:!1,label:"Custom"}]},labelMode:{ref:"dataPoint.labelMode",type:"string",component:"dropdown",options:[{value:"none",label:"None"},{value:"share",label:"Share"},{value:"value",label:"Values"}],defaultValue:"share",show:t=>!t.dataPoint.auto}}},colorsAndLegend:{uses:"colorsAndLegend",translation:"Colors",items:{colors:{items:{colorByLabel:{show:!1},expressionLabel:{show:!1}}},legend:{show:!1}}}}}},z={uses:"data",items:{dimensions:{uses:"dimensions",items:{others:{items:{suppressOther:{defaultValue:!0,show:!1}}}},disabledRef:""},measures:{uses:"measures",disabledRef:""}}};function j({translator:t,flags:e,anything:n}){return{type:"items",component:"accordion",items:{data:z,sorting:P,settings:O(t,e,n)}}}function V(t){return{definition:j(t),support:{export:!0,exportData:!0,snapshot:!0,viewData:!1},importProperties:null,exportProperties:null}}const Y=[{path:"/qHyperCubeDef",dimensions:{min:1,max:1,description:()=>"Segments"},measures:{min:1,max:1,description(t){switch(t.funnel.mode){case"WIDTH":return"Width";case"AREA":return"Area";case"HEIGHT":return"Height";case"ORDER":return"Order";default:return""}},added(t,e){2===e.qHyperCubeDef.qInterColumnSortOrder.length&&1!==e.qHyperCubeDef.qInterColumnSortOrder[0]&&(e.qHyperCubeDef.qInterColumnSortOrder=[1,0])}}}];function _(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var B=Object.prototype.hasOwnProperty,W=Object.prototype.toString,Z=Object.defineProperty,G=Object.getOwnPropertyDescriptor,X=function(t){return"function"==typeof Array.isArray?Array.isArray(t):"[object Array]"===W.call(t)},J=function(t){if(!t||"[object Object]"!==W.call(t))return!1;var e,n=B.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&B.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;for(e in t);return void 0===e||B.call(t,e)},Q=function(t,e){Z&&"__proto__"===e.name?Z(t,e.name,{enumerable:!0,configurable:!0,value:e.newValue,writable:!0}):t[e.name]=e.newValue},K=function(t,e){if("__proto__"===e){if(!B.call(t,e))return;if(G)return G(t,e).value}return t[e]},tt=function t(){var e,n,r,i,o,a,u=arguments[0],l=1,s=arguments.length,c=!1;for("boolean"==typeof u&&(c=u,u=arguments[1]||{},l=2),(null==u||"object"!=typeof u&&"function"!=typeof u)&&(u={});l<s;++l)if(null!=(e=arguments[l]))for(n in e)r=K(u,n),u!==(i=K(e,n))&&(c&&i&&(J(i)||(o=X(i)))?(o?(o=!1,a=r&&X(r)?r:[]):a=r&&J(r)?r:{},Q(u,{name:n,newValue:t(c,a,i)})):void 0!==i&&Q(u,{name:n,newValue:i}));return u},et=_(tt),nt={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 rt(t){const{qHyperCube:e,...n}=t,{qAxisData:r,qDataPages:a,qStackedDataPages:u,qTreeDataPages:l,...s}=e,c=et(!0,{},{...n,qHyperCube:{...s,qAxisData:null,qDataPages:null,qStackedDataPages:null,qTreeDataPages:null}}),{dataRelatedPropertiesPaths:h}=nt;return h.forEach((t=>{const e=t.split("[");if(1===e.length)void 0!==i(c,t)&&o(c,t,null);else{const t=e[0],n=e[1].split("].")[1];i(c,t,[]).forEach((t=>{void 0!==i(t,n)&&o(t,n,null)}))}})),c}var it={axes:{trackBy:function({isTime:t,isContinuous:e,isMeasure:n,isMajor:r}){return i=>{if(t||e||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 t=i.children.filter((t=>"text"===t.type)).map((t=>t.text));return`${i.data.value} ${t.join("")}`}return Math.random()}if(r){if("line"===i.type&&void 0===i.tickValue)return"axis";const t=i.transform&&i.transform.match(/rotate/gi)?"rotated":"horizontal";return`${i.data.group?`${i.data.group.value} `:""}${i.data.value} ${i.text} ${t}`}return Math.random()}},compensateForLayoutChanges:function({isMeasure:t,isTime:e,isContinuous:n,isHorizontal:r,dock:i}){return({currentNodes:o,currentRect:a,previousRect:u})=>{const l=a.x-u.x,s=a.y-u.y,c=a.width-u.width,h=a.height-u.height;t?("left"===i&&o.forEach((t=>{"line"===t.type?(t.x1+=c,t.x2+=c):"text"===t.type&&(t.x+=c)})),"left"!==i&&"right"!==i||o.forEach((t=>{var e;("line"===t.type&&(t.x1===t.x2?(t.y1=a.y,t.y2=t.y1+a.height):(Math.round(t.y1)<a.y||t.y1>a.y+a.height)&&(t.strokeWidth=0)),"text"===t.type)&&((t.y<a.y||t.y>a.y+a.height)&&(t.fontSize="1px","#"===(null===(e=t.fill)||void 0===e?void 0:e[0])&&(t.fill=`${t.fill.slice(0,1)}00${t.fill.slice(1)}`)))})),"top"!==i&&"bottom"!==i||o.forEach((t=>{var e;("line"===t.type&&(t.y1===t.y2?(t.x1=a.x,t.x2=t.x1+a.width):(Math.round(t.x1)<a.x||t.x1>a.x+a.width)&&(t.strokeWidth=0)),"text"===t.type)&&((t.x<a.x||t.x>a.x+a.width)&&(t.fontSize="1px","#"===(null===(e=t.fill)||void 0===e?void 0:e[0])&&(t.fill=`${t.fill.slice(0,1)}00${t.fill.slice(1)}`)))}))):e?o.forEach((t=>{"line"===t.type?t.y1===t.y2?t.x2+=c:t.x1===t.x2&&(t.x1-=l,t.x2-=l):"text"===t.type&&(t.x-=l)})):n||r?o.forEach((t=>{"line"===t.type&&t.y1===t.y2&&(t.x1+=l,t.x2+=l+c)})):o.forEach((t=>{"line"===t.type&&t.x1===t.x2&&(t.y1+=s,t.y2+=s+h)}))}}},bars:{trackBy:function(t){return t.data.measureIndex?`${t.data.value} ${t.data.measureIndex.value}`:t.data.group?`${t.data.value} ${t.data.group.value}`:t.data.stack?`${t.data.value} ${t.data.stack.value}`:`${t.data.value}`},compensateForLayoutChanges:function({currentNodes:t,currentRect:e,previousRect:n}){const r=e.x-n.x,i=e.y-n.y;0===r&&0===i||t.forEach((t=>{t.children&&t.children.length>0&&t.children.forEach((t=>{void 0!==t.x&&void 0!==t.y?(t.x-=r,t.y-=i):t.transform=`translate(${-r}, ${-i})`}))}))}},barOobs:{compensateForLayoutChanges:function({currentNodes:t,currentRect:e,previousRect:n}){const r=e.x-n.x;0===e.y-n.y&&0===r||t.forEach((t=>{t.children&&t.children.length>0&&t.children.forEach((t=>{t.opacity=0}))}))}},labels:{trackBy:function(t){if("rect"===t.type)return"-3"===t.data?Math.random():`${t.type} ${t.data} ${t.rotation}`;const e=t.transform&&t.transform.match(/rotate/gi)?"rotated":"horizontal";return`${t.type} ${t.data} ${t.text} ${e}`},compensateForLayoutChanges:function({currentNodes:t,currentRect:e,previousRect:n}){const r=e.x-n.x,i=e.y-n.y;0===r&&0===i||t.forEach((t=>{t.transform&&t.transform.match(/rotate\(-90/gi)?(t.x+=i,t.y-=r):(t.x-=r,t.y-=i)}))},linkData:function(t){return t.data.measureIndex?`${t.data.value} ${t.data.measureIndex.value}`:t.data.group?`${t.data.value} ${t.data.group.value}`:t.data.stack?`${t.data.value} ${t.data.stack.value}`:`${t.data.value}`}},lines:{trackBy:function(t){var e;return"line"===t.type?null!==(e=t.value)&&void 0!==e?e:Math.random():"path"===t.type?`${t.generatorType} ${t.layerObj.id} ${t.data.source.key}`:Math.random()},compensateForLayoutChanges:function({currentNodes:t,currentRect:e,previousRect:n}){const r=e.x-n.x,i=e.y-n.y;t.forEach((t=>{if(void 0!==t.x1&&void 0!==t.y1)t.y1===t.y2?(t.x2=t.x1+e.width,t.y1-=i,t.y2-=i):t.x1===t.x2&&(t.y2=t.y1+e.height,t.x1-=r,t.x2-=r);else{const e="x"===t.major.p?r/t.major.size:i/t.major.size,n="y"===t.minor.p?i/t.minor.size:r/t.minor.size;t.points.forEach((t=>{t.modified||(t.major-=e,t.minor-=n,t.minor0-=n,t.modified=!0)}))}}))}},lineOobs:{compensateForLayoutChanges:function({currentNodes:t,currentRect:e,previousRect:n}){const r=e.x-n.x;0===e.y-n.y&&0===r||t.forEach((t=>{t.opacity=0}))}},points:{trackBy:function(t){return t.data.line?`${t.data.line.value} ${t.data.major.value}`:`${t.data.major.value}`},compensateForLayoutChanges:function({currentNodes:t,currentRect:e,previousRect:n}){const r=e.x-n.x,i=e.y-n.y;0===r&&0===i||t.forEach((t=>{t.cx-=r,t.cy-=i}))}},refLineLabels:{trackBy:function(t){if(void 0!==t.value){if("rect"===t.type)return`${t.value}`;if("text"===t.type)return`${t.value} ${t.text}`}return Math.random()},compensateForLayoutChanges:function({currentNodes:t,currentRect:e,previousRect:n}){const r=e.x-n.x,i=e.y-n.y,o=e.width-n.width,a=e.height-n.height;let u=-r,l=-i;t.forEach((t=>{switch(t.dock){case"right":r>0&&(u=e.width);break;case"left":o<0&&(u=-n.width);break;case"top":a<0&&(l=-n.height);break;case"bottom":i>0&&(l=e.height)}switch(t.type){case"text":case"rect":t.x+=u,t.y+=l;break;case"circle":t.cx+=u,t.cy+=l;break;case"path":t.transform=`translate(${u}, ${l})`}}))}},shadowBars:{trackBy:function(){return Math.random()}},cacheProperties:function({viewCache:t,layout:e}){const n=rt(e);t.set("dataIndependentProperties",JSON.stringify(n))},propertiesHaveChanged:function({viewCache:t,layout:e}){const n=rt(e);return t.get("dataIndependentProperties")!==JSON.stringify(n)},nonUpdatingNode:{trackBy:function(){return Math.random()}}};function ot(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function at(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ut(){}var lt=.7,st=1/lt,ct="\\s*([+-]?\\d+)\\s*",ht="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ft="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",dt=/^#([0-9a-f]{3,8})$/,gt=new RegExp(`^rgb\\(${ct},${ct},${ct}\\)$`),pt=new RegExp(`^rgb\\(${ft},${ft},${ft}\\)$`),yt=new RegExp(`^rgba\\(${ct},${ct},${ct},${ht}\\)$`),mt=new RegExp(`^rgba\\(${ft},${ft},${ft},${ht}\\)$`),bt=new RegExp(`^hsl\\(${ht},${ft},${ft}\\)$`),vt=new RegExp(`^hsla\\(${ht},${ft},${ft},${ht}\\)$`),wt={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 xt(){return this.rgb().formatHex()}function Mt(){return this.rgb().formatRgb()}function Ct(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=dt.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?kt(e):3===n?new St(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?$t(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?$t(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=gt.exec(t))?new St(e[1],e[2],e[3],1):(e=pt.exec(t))?new St(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=yt.exec(t))?$t(e[1],e[2],e[3],e[4]):(e=mt.exec(t))?$t(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=bt.exec(t))?Et(e[1],e[2]/100,e[3]/100,1):(e=vt.exec(t))?Et(e[1],e[2]/100,e[3]/100,e[4]):wt.hasOwnProperty(t)?kt(wt[t]):"transparent"===t?new St(NaN,NaN,NaN,0):null}function kt(t){return new St(t>>16&255,t>>8&255,255&t,1)}function $t(t,e,n,r){return r<=0&&(t=e=n=NaN),new St(t,e,n,r)}function Tt(t){return t instanceof ut||(t=Ct(t)),t?new St((t=t.rgb()).r,t.g,t.b,t.opacity):new St}function St(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Dt(){return`#${Rt(this.r)}${Rt(this.g)}${Rt(this.b)}`}function Nt(){const t=qt(this.opacity);return`${1===t?"rgb(":"rgba("}${Ht(this.r)}, ${Ht(this.g)}, ${Ht(this.b)}${1===t?")":`, ${t})`}`}function qt(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ht(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Rt(t){return((t=Ht(t))<16?"0":"")+t.toString(16)}function Et(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new It(t,e,n,r)}function Lt(t){if(t instanceof It)return new It(t.h,t.s,t.l,t.opacity);if(t instanceof ut||(t=Ct(t)),!t)return new It;if(t instanceof It)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,u=o-i,l=(o+i)/2;return u?(a=e===o?(n-r)/u+6*(n<r):n===o?(r-e)/u+2:(e-n)/u+4,u/=l<.5?o+i:2-o-i,a*=60):u=l>0&&l<1?0:a,new It(a,u,l,t.opacity)}function It(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ut(t){return(t=(t||0)%360)<0?t+360:t}function Ft(t){return Math.max(0,Math.min(1,t||0))}function At(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}ot(ut,Ct,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:xt,formatHex:xt,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Lt(this).formatHsl()},formatRgb:Mt,toString:Mt}),ot(St,(function(t,e,n,r){return 1===arguments.length?Tt(t):new St(t,e,n,null==r?1:r)}),at(ut,{brighter(t){return t=null==t?st:Math.pow(st,t),new St(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?lt:Math.pow(lt,t),new St(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new St(Ht(this.r),Ht(this.g),Ht(this.b),qt(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:Dt,formatHex:Dt,formatHex8:function(){return`#${Rt(this.r)}${Rt(this.g)}${Rt(this.b)}${Rt(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Nt,toString:Nt})),ot(It,(function(t,e,n,r){return 1===arguments.length?Lt(t):new It(t,e,n,null==r?1:r)}),at(ut,{brighter(t){return t=null==t?st:Math.pow(st,t),new It(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?lt:Math.pow(lt,t),new It(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new St(At(t>=240?t-240:t+120,i,r),At(t,i,r),At(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new It(Ut(this.h),Ft(this.s),Ft(this.l),qt(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 t=qt(this.opacity);return`${1===t?"hsl(":"hsla("}${Ut(this.h)}, ${100*Ft(this.s)}%, ${100*Ft(this.l)}%${1===t?")":`, ${t})`}`}}));const Pt=Math.PI/180,Ot=180/Math.PI,zt=.96422,jt=1,Vt=.82521,Yt=4/29,_t=6/29,Bt=3*_t*_t,Wt=_t*_t*_t;function Zt(t){if(t instanceof Gt)return new Gt(t.l,t.a,t.b,t.opacity);if(t instanceof ee)return ne(t);t instanceof St||(t=Tt(t));var e,n,r=Kt(t.r),i=Kt(t.g),o=Kt(t.b),a=Xt((.2225045*r+.7168786*i+.0606169*o)/jt);return r===i&&i===o?e=n=a:(e=Xt((.4360747*r+.3850649*i+.1430804*o)/zt),n=Xt((.0139322*r+.0971045*i+.7141733*o)/Vt)),new Gt(116*a-16,500*(e-a),200*(a-n),t.opacity)}function Gt(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Xt(t){return t>Wt?Math.pow(t,1/3):t/Bt+Yt}function Jt(t){return t>_t?t*t*t:Bt*(t-Yt)}function Qt(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Kt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function te(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof ee)return new ee(t.h,t.c,t.l,t.opacity);if(t instanceof Gt||(t=Zt(t)),0===t.a&&0===t.b)return new ee(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Ot;return new ee(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new ee(t,e,n,null==r?1:r)}function ee(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function ne(t){if(isNaN(t.h))return new Gt(t.l,0,0,t.opacity);var e=t.h*Pt;return new Gt(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}ot(Gt,(function(t,e,n,r){return 1===arguments.length?Zt(t):new Gt(t,e,n,null==r?1:r)}),at(ut,{brighter(t){return new Gt(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new Gt(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new St(Qt(3.1338561*(e=zt*Jt(e))-1.6168667*(t=jt*Jt(t))-.4906146*(n=Vt*Jt(n))),Qt(-.9787684*e+1.9161415*t+.033454*n),Qt(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),ot(ee,te,at(ut,{brighter(t){return new ee(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new ee(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return ne(this).rgb()}}));var re,ie,oe={isDark:function(t){return te(t).l<70}};function ae(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}1===(re=ae).length&&(ie=re,re=function(t,e){return ae(ie(t),e)});var ue="$";function le(){}function se(t,e){var n=new le;if(t instanceof le)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==e)for(;++i<o;)n.set(i,t[i]);else for(;++i<o;)n.set(e(r=t[i],i,t),r)}else if(t)for(var a in t)n.set(a,t[a]);return n}function ce(){}le.prototype=se.prototype={constructor:le,has:function(t){return ue+t in this},get:function(t){return this[ue+t]},set:function(t,e){return this[ue+t]=e,this},remove:function(t){var e=ue+t;return e in this&&delete this[e]},clear:function(){for(var t in this)t[0]===ue&&delete this[t]},keys:function(){var t=[];for(var e in this)e[0]===ue&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)e[0]===ue&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)e[0]===ue&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)e[0]===ue&&++t;return t},empty:function(){for(var t in this)if(t[0]===ue)return!1;return!0},each:function(t){for(var e in this)e[0]===ue&&t(this[e],e.slice(1),this)}};var he=se.prototype;function fe(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function de(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ge(){}ce.prototype={constructor:ce,has:he.has,add:function(t){return this[ue+(t+="")]=t,this},remove:he.remove,clear:he.clear,values:he.keys,size:he.size,empty:he.empty,each:he.each};var pe=.7,ye=1/pe,me="\\s*([+-]?\\d+)\\s*",be="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ve="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",we=/^#([0-9a-f]{3})$/,xe=/^#([0-9a-f]{6})$/,Me=new RegExp("^rgb\\("+[me,me,me]+"\\)$"),Ce=new RegExp("^rgb\\("+[ve,ve,ve]+"\\)$"),ke=new RegExp("^rgba\\("+[me,me,me,be]+"\\)$"),$e=new RegExp("^rgba\\("+[ve,ve,ve,be]+"\\)$"),Te=new RegExp("^hsl\\("+[be,ve,ve]+"\\)$"),Se=new RegExp("^hsla\\("+[be,ve,ve,be]+"\\)$"),De={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 Ne(t){var e;return t=(t+"").trim().toLowerCase(),(e=we.exec(t))?new Le((e=parseInt(e[1],16))>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):(e=xe.exec(t))?qe(parseInt(e[1],16)):(e=Me.exec(t))?new Le(e[1],e[2],e[3],1):(e=Ce.exec(t))?new Le(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ke.exec(t))?He(e[1],e[2],e[3],e[4]):(e=$e.exec(t))?He(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Te.exec(t))?Ue(e[1],e[2]/100,e[3]/100,1):(e=Se.exec(t))?Ue(e[1],e[2]/100,e[3]/100,e[4]):De.hasOwnProperty(t)?qe(De[t]):"transparent"===t?new Le(NaN,NaN,NaN,0):null}function qe(t){return new Le(t>>16&255,t>>8&255,255&t,1)}function He(t,e,n,r){return r<=0&&(t=e=n=NaN),new Le(t,e,n,r)}function Re(t){return t instanceof ge||(t=Ne(t)),t?new Le((t=t.rgb()).r,t.g,t.b,t.opacity):new Le}function Ee(t,e,n,r){return 1===arguments.length?Re(t):new Le(t,e,n,null==r?1:r)}function Le(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Ie(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Ue(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Fe(t,e,n,r)}function Fe(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ae(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}fe(ge,Ne,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),fe(Le,Ee,de(ge,{brighter:function(t){return t=null==t?ye:Math.pow(ye,t),new Le(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?pe:Math.pow(pe,t),new Le(this.r*t,this.g*t,this.b*t,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"#"+Ie(this.r)+Ie(this.g)+Ie(this.b)},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),fe(Fe,(function(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof Fe)return new Fe(t.h,t.s,t.l,t.opacity);if(t instanceof ge||(t=Ne(t)),!t)return new Fe;if(t instanceof Fe)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,u=o-i,l=(o+i)/2;return u?(a=e===o?(n-r)/u+6*(n<r):n===o?(r-e)/u+2:(e-n)/u+4,u/=l<.5?o+i:2-o-i,a*=60):u=l>0&&l<1?0:a,new Fe(a,u,l,t.opacity)}(t):new Fe(t,e,n,null==r?1:r)}),de(ge,{brighter:function(t){return t=null==t?ye:Math.pow(ye,t),new Fe(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?pe:Math.pow(pe,t),new Fe(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Le(Ae(t>=240?t-240:t+120,i,r),Ae(t,i,r),Ae(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var Pe=Math.PI/180,Oe=180/Math.PI,ze=.96422,je=1,Ve=.82521,Ye=4/29,_e=6/29,Be=3*_e*_e,We=_e*_e*_e;function Ze(t){if(t instanceof Ge)return new Ge(t.l,t.a,t.b,t.opacity);if(t instanceof tn){if(isNaN(t.h))return new Ge(t.l,0,0,t.opacity);var e=t.h*Pe;return new Ge(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof Le||(t=Re(t));var n,r,i=Ke(t.r),o=Ke(t.g),a=Ke(t.b),u=Xe((.2225045*i+.7168786*o+.0606169*a)/je);return i===o&&o===a?n=r=u:(n=Xe((.4360747*i+.3850649*o+.1430804*a)/ze),r=Xe((.0139322*i+.0971045*o+.7141733*a)/Ve)),new Ge(116*u-16,500*(n-u),200*(u-r),t.opacity)}function Ge(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Xe(t){return t>We?Math.pow(t,1/3):t/Be+Ye}function Je(t){return t>_e?t*t*t:Be*(t-Ye)}function Qe(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ke(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function tn(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}fe(Ge,(function(t,e,n,r){return 1===arguments.length?Ze(t):new Ge(t,e,n,null==r?1:r)}),de(ge,{brighter:function(t){return new Ge(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Ge(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Le(Qe(3.1338561*(e=ze*Je(e))-1.6168667*(t=je*Je(t))-.4906146*(n=Ve*Je(n))),Qe(-.9787684*e+1.9161415*t+.033454*n),Qe(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),fe(tn,(function(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof tn)return new tn(t.h,t.c,t.l,t.opacity);if(t instanceof Ge||(t=Ze(t)),0===t.a&&0===t.b)return new tn(NaN,0,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Oe;return new tn(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new tn(t,e,n,null==r?1:r)}),de(ge,{brighter:function(t){return new tn(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new tn(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Ze(this).rgb()}}));var en=-.14861,nn=1.78277,rn=-.29227,on=-.90649,an=1.97294,un=an*on,ln=an*nn,sn=nn*rn-on*en;function cn(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof hn)return new hn(t.h,t.s,t.l,t.opacity);t instanceof Le||(t=Re(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(sn*r+un*e-ln*n)/(sn+un-ln),o=r-i,a=(an*(n-i)-rn*o)/on,u=Math.sqrt(a*a+o*o)/(an*i*(1-i)),l=u?Math.atan2(a,o)*Oe-120:NaN;return new hn(l<0?l+360:l,u,i,t.opacity)}(t):new hn(t,e,n,null==r?1:r)}function hn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function fn(t){return function(){return t}}function dn(t,e){return function(n){return t+n*e}}function gn(t){return 1==(t=+t)?pn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):fn(isNaN(e)?n:e)}}function pn(t,e){var n=e-t;return n?dn(t,n):fn(isNaN(t)?e:t)}function yn(t){return function e(n){function r(e,r){var i=t((e=cn(e)).h,(r=cn(r)).h),o=pn(e.s,r.s),a=pn(e.l,r.l),u=pn(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=o(t),e.l=a(Math.pow(t,n)),e.opacity=u(t),e+""}}return n=+n,r.gamma=e,r}(1)}function mn(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}fe(hn,cn,de(ge,{brighter:function(t){return t=null==t?ye:Math.pow(ye,t),new hn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?pe:Math.pow(pe,t),new hn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*Pe,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new Le(255*(e+n*(en*r+nn*i)),255*(e+n*(rn*r+on*i)),255*(e+n*(an*r)),this.opacity)}})),function t(e){var n=gn(e);function r(t,e){var r=n((t=Ee(t)).r,(e=Ee(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=pn(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1),yn((function(t,e){var n=e-t;return n?dn(t,n>180||n<-180?n-360*Math.round(n/360):n):fn(isNaN(t)?e:t)})),yn(pn);var bn,vn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function wn(t){return new xn(t)}function xn(t){if(!(e=vn.exec(t)))throw new Error("invalid format: "+t);var e;this.fill=e[1]||" ",this.align=e[2]||">",this.sign=e[3]||"-",this.symbol=e[4]||"",this.zero=!!e[5],this.width=e[6]&&+e[6],this.comma=!!e[7],this.precision=e[8]&&+e[8].slice(1),this.trim=!!e[9],this.type=e[10]||""}function Mn(t,e){var n=mn(t,e);if(!n)return t+"";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")}wn.prototype=xn.prototype,xn.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 Cn={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Mn(100*t,e)},r:Mn,s:function(t,e){var n=mn(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(bn=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")+mn(t,Math.max(0,e+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function kn(t){return t}var $n,Tn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Sn(t){var e,n,r=t.grouping&&t.thousands?(e=t.grouping,n=t.thousands,function(t,r){for(var i=t.length,o=[],a=0,u=e[0],l=0;i>0&&u>0&&(l+u+1>r&&(u=Math.max(1,r-l)),o.push(t.substring(i-=u,i+u)),!((l+=u+1)>r));)u=e[a=(a+1)%e.length];return o.reverse().join(n)}):kn,i=t.currency,o=t.decimal,a=t.numerals?function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(t.numerals):kn,u=t.percent||"%";function l(t){var e=(t=wn(t)).fill,n=t.align,l=t.sign,s=t.symbol,c=t.zero,h=t.width,f=t.comma,d=t.precision,g=t.trim,p=t.type;"n"===p?(f=!0,p="g"):Cn[p]||(null==d&&(d=12),g=!0,p="g"),(c||"0"===e&&"="===n)&&(c=!0,e="0",n="=");var y="$"===s?i[0]:"#"===s&&/[boxX]/.test(p)?"0"+p.toLowerCase():"",m="$"===s?i[1]:/[%p]/.test(p)?u:"",b=Cn[p],v=/[defgprs%]/.test(p);function w(t){var i,u,s,w=y,x=m;if("c"===p)x=b(t)+x,t="";else{var M=(t=+t)<0;if(t=b(Math.abs(t),d),g&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(i>0){if(!+t[r])break t;i=0}}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),M&&0==+t&&(M=!1),w=(M?"("===l?l:"-":"-"===l||"("===l?"":l)+w,x=("s"===p?Tn[8+bn/3]:"")+x+(M&&"("===l?")":""),v)for(i=-1,u=t.length;++i<u;)if(48>(s=t.charCodeAt(i))||s>57){x=(46===s?o+t.slice(i+1):t.slice(i))+x,t=t.slice(0,i);break}}f&&!c&&(t=r(t,1/0));var C=w.length+t.length+x.length,k=C<h?new Array(h-C+1).join(e):"";switch(f&&c&&(t=r(k+t,k.length?h-x.length:1/0),k=""),n){case"<":t=w+t+x+k;break;case"=":t=w+k+t+x;break;case"^":t=k.slice(0,C=k.length>>1)+w+t+x+k.slice(C);break;default:t=k+w+t+x}return a(t)}return d=null==d?6:/[gprs]/.test(p)?Math.max(1,Math.min(21,d)):Math.max(0,Math.min(20,d)),w.toString=function(){return t+""},w}return{format:l,formatPrefix:function(t,e){var n,r=l(((t=wn(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor((n=e,((n=mn(Math.abs(n)))?n[1]:NaN)/3)))),o=Math.pow(10,-i),a=Tn[8+i/3];return function(t){return r(o*t)+a}}}}($n=Sn({decimal:".",thousands:",",grouping:[3],currency:["$",""]})).format,$n.formatPrefix;var Dn=new Date,Nn=new Date;function qn(t,e,n,r){function i(e){return t(e=new Date(+e)),e}return i.floor=i,i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,o){var a,u=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return u;do{u.push(a=new Date(+n)),e(n,o),t(n)}while(a<n&&n<r);return u},i.filter=function(n){return qn((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return Dn.setTime(+e),Nn.setTime(+r),t(Dn),t(Nn),Math.floor(n(Dn,Nn))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var Hn=qn((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));Hn.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?qn((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):Hn:null},Hn.range;var Rn=1e3,En=6e4,Ln=36e5,In=864e5,Un=6048e5;qn((function(t){t.setTime(Math.floor(t/Rn)*Rn)}),(function(t,e){t.setTime(+t+e*Rn)}),(function(t,e){return(e-t)/Rn}),(function(t){return t.getUTCSeconds()})).range,qn((function(t){t.setTime(Math.floor(t/En)*En)}),(function(t,e){t.setTime(+t+e*En)}),(function(t,e){return(e-t)/En}),(function(t){return t.getMinutes()})).range,qn((function(t){var e=t.getTimezoneOffset()*En%Ln;e<0&&(e+=Ln),t.setTime(Math.floor((+t-e)/Ln)*Ln+e)}),(function(t,e){t.setTime(+t+e*Ln)}),(function(t,e){return(e-t)/Ln}),(function(t){return t.getHours()})).range;var Fn=qn((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*En)/In}),(function(t){return t.getDate()-1}));function An(t){return qn((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*En)/Un}))}Fn.range;var Pn=An(0),On=An(1),zn=An(2),jn=An(3),Vn=An(4),Yn=An(5),_n=An(6);Pn.range,On.range,zn.range,jn.range,Vn.range,Yn.range,_n.range,qn((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})).range;var Bn=qn((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));Bn.every=function(t){return isFinite(t=Math.floor(t))&&t>0?qn((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null},Bn.range,qn((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*En)}),(function(t,e){return(e-t)/En}),(function(t){return t.getUTCMinutes()})).range,qn((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*Ln)}),(function(t,e){return(e-t)/Ln}),(function(t){return t.getUTCHours()})).range;var Wn=qn((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/In}),(function(t){return t.getUTCDate()-1}));function Zn(t){return qn((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/Un}))}Wn.range;var Gn=Zn(0),Xn=Zn(1),Jn=Zn(2),Qn=Zn(3),Kn=Zn(4),tr=Zn(5),er=Zn(6);Gn.range,Xn.range,Jn.range,Qn.range,Kn.range,tr.range,er.range,qn((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})).range;var nr=qn((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));function rr(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function ir(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function or(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}nr.every=function(t){return isFinite(t=Math.floor(t))&&t>0?qn((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null},nr.range;var ar,ur,lr,sr={"-":"",_:" ",0:"0"},cr=/^\s*\d+/,hr=/^%/,fr=/[\\^$*+?|[\]().{}]/g;function dr(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function gr(t){return t.replace(fr,"\\$&")}function pr(t){return new RegExp("^(?:"+t.map(gr).join("|")+")","i")}function yr(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function mr(t,e,n){var r=cr.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function br(t,e,n){var r=cr.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function vr(t,e,n){var r=cr.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function wr(t,e,n){var r=cr.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function xr(t,e,n){var r=cr.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Mr(t,e,n){var r=cr.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Cr(t,e,n){var r=cr.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function kr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function $r(t,e,n){var r=cr.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Tr(t,e,n){var r=cr.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Sr(t,e,n){var r=cr.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Dr(t,e,n){var r=cr.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Nr(t,e,n){var r=cr.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function qr(t,e,n){var r=cr.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=cr.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=cr.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Er(t,e,n){var r=hr.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Lr(t,e,n){var r=cr.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Ir(t,e,n){var r=cr.exec(e.slice(n));return r?(t.Q=1e3*+r[0],n+r[0].length):-1}function Ur(t,e){return dr(t.getDate(),e,2)}function Fr(t,e){return dr(t.getHours(),e,2)}function Ar(t,e){return dr(t.getHours()%12||12,e,2)}function Pr(t,e){return dr(1+Fn.count(Bn(t),t),e,3)}function Or(t,e){return dr(t.getMilliseconds(),e,3)}function zr(t,e){return Or(t,e)+"000"}function jr(t,e){return dr(t.getMonth()+1,e,2)}function Vr(t,e){return dr(t.getMinutes(),e,2)}function Yr(t,e){return dr(t.getSeconds(),e,2)}function _r(t){var e=t.getDay();return 0===e?7:e}function Br(t,e){return dr(Pn.count(Bn(t),t),e,2)}function Wr(t,e){var n=t.getDay();return t=n>=4||0===n?Vn(t):Vn.ceil(t),dr(Vn.count(Bn(t),t)+(4===Bn(t).getDay()),e,2)}function Zr(t){return t.getDay()}function Gr(t,e){return dr(On.count(Bn(t),t),e,2)}function Xr(t,e){return dr(t.getFullYear()%100,e,2)}function Jr(t,e){return dr(t.getFullYear()%1e4,e,4)}function Qr(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+dr(e/60|0,"0",2)+dr(e%60,"0",2)}function Kr(t,e){return dr(t.getUTCDate(),e,2)}function ti(t,e){return dr(t.getUTCHours(),e,2)}function ei(t,e){return dr(t.getUTCHours()%12||12,e,2)}function ni(t,e){return dr(1+Wn.count(nr(t),t),e,3)}function ri(t,e){return dr(t.getUTCMilliseconds(),e,3)}function ii(t,e){return ri(t,e)+"000"}function oi(t,e){return dr(t.getUTCMonth()+1,e,2)}function ai(t,e){return dr(t.getUTCMinutes(),e,2)}function ui(t,e){return dr(t.getUTCSeconds(),e,2)}function li(t){var e=t.getUTCDay();return 0===e?7:e}function si(t,e){return dr(Gn.count(nr(t),t),e,2)}function ci(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Kn(t):Kn.ceil(t),dr(Kn.count(nr(t),t)+(4===nr(t).getUTCDay()),e,2)}function hi(t){return t.getUTCDay()}function fi(t,e){return dr(Xn.count(nr(t),t),e,2)}function di(t,e){return dr(t.getUTCFullYear()%100,e,2)}function gi(t,e){return dr(t.getUTCFullYear()%1e4,e,4)}function pi(){return"+0000"}function yi(){return"%"}function mi(t){return+t}function bi(t){return Math.floor(+t/1e3)}!function(t){ar=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,u=t.months,l=t.shortMonths,s=pr(i),c=yr(i),h=pr(o),f=yr(o),d=pr(a),g=yr(a),p=pr(u),y=yr(u),m=pr(l),b=yr(l),v={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return u[t.getMonth()]},c:null,d:Ur,e:Ur,f:zr,H:Fr,I:Ar,j:Pr,L:Or,m:jr,M:Vr,p:function(t){return i[+(t.getHours()>=12)]},Q:mi,s:bi,S:Yr,u:_r,U:Br,V:Wr,w:Zr,W:Gr,x:null,X:null,y:Xr,Y:Jr,Z:Qr,"%":yi},w={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return u[t.getUTCMonth()]},c:null,d:Kr,e:Kr,f:ii,H:ti,I:ei,j:ni,L:ri,m:oi,M:ai,p:function(t){return i[+(t.getUTCHours()>=12)]},Q:mi,s:bi,S:ui,u:li,U:si,V:ci,w:hi,W:fi,x:null,X:null,y:di,Y:gi,Z:pi,"%":yi},x={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=g[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=b[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.m=y[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return k(t,e,n,r)},d:Tr,e:Tr,f:Rr,H:Dr,I:Dr,j:Sr,L:Hr,m:$r,M:Nr,p:function(t,e,n){var r=s.exec(e.slice(n));return r?(t.p=c[r[0].toLowerCase()],n+r[0].length):-1},Q:Lr,s:Ir,S:qr,u:br,U:vr,V:wr,w:mr,W:xr,x:function(t,e,r){return k(t,n,e,r)},X:function(t,e,n){return k(t,r,e,n)},y:Cr,Y:Mr,Z:kr,"%":Er};function M(t,e){return function(n){var r,i,o,a=[],u=-1,l=0,s=t.length;for(n instanceof Date||(n=new Date(+n));++u<s;)37===t.charCodeAt(u)&&(a.push(t.slice(l,u)),null!=(i=sr[r=t.charAt(++u)])?r=t.charAt(++u):i="e"===r?" ":"0",(o=e[r])&&(r=o(n,i)),a.push(r),l=u+1);return a.push(t.slice(l,u)),a.join("")}}function C(t,e){return function(n){var r,i,o=or(1900);if(k(o,t,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=ir(or(o.y))).getUTCDay(),r=i>4||0===i?Xn.ceil(r):Xn(r),r=Wn.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=e(or(o.y))).getDay(),r=i>4||0===i?On.ceil(r):On(r),r=Fn.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?ir(or(o.y)).getUTCDay():e(or(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,ir(o)):e(o)}}function k(t,e,n,r){for(var i,o,a=0,u=e.length,l=n.length;a<u;){if(r>=l)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=x[i in sr?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return v.x=M(n,v),v.X=M(r,v),v.c=M(e,v),w.x=M(n,w),w.X=M(r,w),w.c=M(e,w),{format:function(t){var e=M(t+="",v);return e.toString=function(){return t},e},parse:function(t){var e=C(t+="",rr);return e.toString=function(){return t},e},utcFormat:function(t){var e=M(t+="",w);return e.toString=function(){return t},e},utcParse:function(t){var e=C(t,ir);return e.toString=function(){return t},e}}}(t),ar.format,ar.parse,ur=ar.utcFormat,lr=ar.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 vi="%Y-%m-%dT%H:%M:%S.%LZ";Date.prototype.toISOString||ur(vi),+new Date("2000-01-01T00:00:00.000Z")||lr(vi),et.bind(null,!0);const wi=[[2,4,6],[2,4],[3]],xi=[,[,,[[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 Mi(t,e,n){const r=t?t.length:0;let i,o=void 0===e?Number.MAX_VALUE:t[0]/e;for(i=1;i<r;i++)o=Math.min(o,t[i]/t[i-1]);void 0!==n&&(o=Math.min(o,n/t[r-1])),t.splice(0,0,o)}function Ci(t,e,n){let r;const i=t?t.length:0;for(r=0;r<i;r++)Mi(t[r],e,n)}function ki(t,e=!1){const n=e?"IM_5791_SVG_LABEL_RENDERING":"IM_4962_SVG_CHART_LABELS";if(null!=t&&t.isEnabled(n))return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?void 0:"svg"}function $i(t){const e=t.node.desc&&t.node.desc.share;return e?t.formatter("share")(e):""}function Ti(t){return t.formatter("num")(t.node.data.num.value)}function Si({data:t}){return t?t.label:""}function Di(t){if(t.dataPoint.auto)return $i;switch(t.dataPoint.labelMode){case"share":default:return $i;case"value":return Ti;case"none":return null}}function Ni(t,e,n,r,i){const o=i.axis.label.getStyle(),a=i.label.value.getStyle(),u=n.getStyles().label.value;return{type:"labels",key:"funnel-labels",renderer:ki(t,!0),layout:{displayOrder:2},settings:{sources:[{component:"fun",selector:".labelLeft",strategy:{type:"rows",settings:{align:0,fill:o.fill,fontSize:parseInt(o.fontSize,10),fontFamily:o.fontFamily,labels:[{label:Si}],linkData:t=>`${t.data.value} ${Si(t)}`}}},{component:"fun",selector:".labelCenter",strategy:{type:"rows",settings:{align:.5,fill:a.useContrastColor?({node:t})=>(t=>oe.isDark(t.desc.fill)?u.lightColor:u.darkColor)(t):a.fill,fontSize:parseInt(a.fontSize,10),fontFamily:a.fontFamily,labels:[{label:Di(e)}],linkData:t=>"none"===e.dataPoint.labelMode?Math.random():`${t.data.value} ${Di(e)(t)}`}}}]},animations:{enabled:r,trackBy:t=>t.data}}}function qi(t,e,n){if(!e.showDimensionTitle||!e.qHyperCube.qDimensionInfo[0].qFallbackTitle)return!1;const r=e.qHyperCube.qDimensionInfo[0].qFallbackTitle,i=n.axis.title.getStyle();return{type:"text",key:"dimension-title",renderer:ki(t,!0),text:r,layout:{dock:"top"},style:{text:{fill:i.fill,fontSize:i.fontSize,fontFamily:i.fontFamily}}}}function Hi(){return{share:{type:"d3-number",format:".1%"},num:{data:{field:"qMeasureInfo/0"}}}}function Ri({picasso:t}){const e=h(),n=f(),r=d(),i=g(),o=p(),s=y(),[c,v]=m(),[w,x]=m(),[M,C]=m(),[k,$]=m();return b((()=>{const c=a({picasso:t,model:r,app:i,translator:o,config:{auto:!1,key:"fill"}});e.style.overflow="hidden";const h=t({renderer:{prio:[s.renderer||"svg"]}}).chart({element:e,data:[],settings:{}}),f=u({chart:h,selections:n,config:{selectionActions:!1}});return C(f),x(c),v(h),$(l()),()=>{f.destroy(),h.destroy()}}),[]),[c,w,M,k]}!function(){let t,e;for(Ci(wi,1,10),t=0;t<xi.length;t++)if(xi[t])for(e=0;e<xi[t].length;e++)Array.isArray(xi[t][e])&&Ci(xi[t][e])}()}}}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nebula.js/sn-funnel-chart",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "description": "A sequential chart visualizing a linear process with connected stages, for example a sales process with potential revenue at each stage.",
5
5
  "author": "QlikTech International AB",
6
6
  "license": "MIT",