@formant/ava 3.4.8-formant → 3.4.16-formant
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ava.min.js +1 -1
- package/esm/insight/narrative/strategy/categoryOutlier.js +1 -1
- package/esm/insight/narrative/strategy/majority.js +0 -1
- package/esm/insight/narrative/strategy/timeSeriesOutlier.js +5 -2
- package/esm/insight/narrative/strategy/trend.js +5 -2
- package/lib/insight/narrative/strategy/categoryOutlier.js +1 -1
- package/lib/insight/narrative/strategy/majority.js +0 -1
- package/lib/insight/narrative/strategy/timeSeriesOutlier.js +5 -2
- package/lib/insight/narrative/strategy/trend.js +5 -2
- package/package.json +6 -4
package/dist/ava.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.AVA=e():t.AVA=e()}(self,(function(){return function(){var t={7047:function(t,e,n){"use strict";n.d(e,{w:function(){return Qa}});var r=n(4528),a=n.n(r),i=n(8798),o=n.n(i),u=n(9057),c=n.n(u),s=n(9105),l=n(1448),f=n.n(l);function h(t,e){return e.every((function(e){return t.includes(e)}))}var d=10,p=["bar_chart","grouped_bar_chart","stacked_bar_chart","percent_stacked_bar_chart","column_chart","grouped_column_chart","stacked_column_chart","percent_stacked_column_chart"],v={id:"bar-series-qty",type:"SOFT",docs:{lintText:"Bar chart should has proper number of bars or bar groups."},trigger:function(t){var e=t.chartType;return p.includes(e)},validator:function(t){var e=1,n=t.dataProps,r=t.chartType;if(n&&r){var a=n.find((function(t){return h(t.levelOfMeasurements,["Nominal"])})),i=a&&a.count?a.count:0;i>20&&(e=20/i)}return e=e<.1?.1:e}},m=["bar_chart","grouped_bar_chart","stacked_bar_chart","percent_stacked_bar_chart","column_chart","grouped_column_chart","stacked_column_chart","percent_stacked_column_chart"],g={id:"bar-without-axis-min",type:"DESIGN",docs:{lintText:"It is not recommended to set the minimum value of axis for the bar or column chart.",fixText:"Remove the minimum value config of axis."},trigger:function(t){var e=t.chartType;return m.includes(e)},optimizer:function(t,e){var n,r,a=e.scale;if(!a)return{};var i=null===(n=a.x)||void 0===n?void 0:n.domainMin,o=null===(r=a.y)||void 0===r?void 0:r.domainMin;if(i||o){var u=JSON.parse(JSON.stringify(a));return i&&(u.x.domainMin=0),o&&(u.y.domainMin=0),{scale:u}}return{}}};function y(t,e){return e.some((function(e){return t.includes(e)}))}function b(t,e){return t.distinct<e.distinct?1:t.distinct>e.distinct?-1:0}var _={"bar-series-qty":.5,"data-check":1,"data-field-qty":1,"diff-pie-sector":.5,"landscape-or-portrait":.3,"limit-series":1,"line-field-time-ordinal":1,"no-redundant-field":1,"nominal-enum-combinatorial":1,"purpose-check":1,"series-qty-limit":.8},x=function(t,e,n,r,a,i){var o=1;return Object.values(n).filter((function(n){var i,o,u,c=(null===(i=n.option)||void 0===i?void 0:i.weight)||_[n.id]||1,s=null===(o=n.option)||void 0===o?void 0:o.extra;return n.type===r&&n.trigger(f()(f()(f()({},a),{},{weight:c},s),{},{chartType:t,chartWIKI:e}))&&!(null!==(u=n.option)&&void 0!==u&&u.off)})).forEach((function(n){var u,c,s=(null===(u=n.option)||void 0===u?void 0:u.weight)||_[n.id]||1,l=null===(c=n.option)||void 0===c?void 0:c.extra,h=n.validator(f()(f()(f()({},a),{},{weight:s},l),{},{chartType:t,chartWIKI:e})),d=s*h;o*=d,i.push({phase:"ADVISE",ruleId:n.id,score:d,base:h,weight:s,ruleType:r})})),o},w={id:"data-check",type:"HARD",docs:{lintText:"Data must satisfy the data prerequisites."},trigger:function(){return!0},validator:function(t){var e=0,n=t.dataProps,r=t.chartType,a=t.chartWIKI;if(n&&r&&a[r]){e=1;var i=a[r].dataPres||[];i.forEach((function(t){(function(t,e){var n=e.map((function(t){return t.levelOfMeasurements}));if(n){var r=0;if(n.forEach((function(e){e&&y(e,t.fieldConditions)&&(r+=1)})),r>=t.minQty&&(r<=t.maxQty||"*"===t.maxQty))return!0}return!1})(t,n)||(e=0)})),n.map((function(t){return t.levelOfMeasurements})).forEach((function(t){var n=!1;i.forEach((function(e){t&&y(t,e.fieldConditions)&&(n=!0)})),n||(e=0)}))}return e}},k=["pie_chart","donut_chart"],M={id:"diff-pie-sector",type:"SOFT",docs:{lintText:"The difference between sectors of a pie chart should be large enough."},trigger:function(t){var e=t.chartType;return k.includes(e)},validator:function(t){var e=1,n=t.dataProps;if(n){var r=n.find((function(t){return h(t.levelOfMeasurements,["Interval"])}));if(r&&r.sum&&r.rawData){var a=1/r.sum,i=r.rawData.map((function(t){return t*a})).reduce((function(t,e){return t*e})),o=r.rawData.length,u=Math.pow(1/o,o);e=Math.abs(u-Math.abs(i))/u*2}}return e=e<.1?.1:e}},A=["bar_chart","grouped_bar_chart","stacked_bar_chart","percent_stacked_bar_chart","column_chart","grouped_column_chart","stacked_column_chart","percent_stacked_column_chart"];function C(t){var e=t.chartType,n=t.dataProps,r=t.preferences;return!!(n&&e&&r&&r.canvasLayout)}var T={id:"landscape-or-portrait",type:"SOFT",docs:{lintText:"Recommend column charts for landscape layout and bar charts for portrait layout."},trigger:function(t){return A.includes(t.chartType)&&C(t)},validator:function(t){var e=1,n=t.chartType,r=t.preferences;return C(t)&&("portrait"===r.canvasLayout&&["bar_chart","grouped_bar_chart","stacked_bar_chart","percent_stacked_bar_chart"].includes(n)||"landscape"===r.canvasLayout&&["column_chart","grouped_column_chart","stacked_column_chart","percent_stacked_column_chart"].includes(n))&&(e=5),e}};var S={id:"limit-series",type:"SOFT",docs:{lintText:"Avoid too many values in one series."},trigger:function(t){return function(t){return t.filter((function(t){return y(t.levelOfMeasurements,["Nominal","Ordinal"])})).length>=2}(t.dataProps)},validator:function(t){var e=1,n=t.dataProps,r=t.chartType;if(n){var a=n.filter((function(t){return y(t.levelOfMeasurements,["Nominal","Ordinal"])}));if(a.length>=2){var i=a.sort(b)[1];i.distinct&&(e=i.distinct>d?.1:1/i.distinct,i.distinct>6&&"heatmap"===r?e=5:"heatmap"===r&&(e=1))}}return e}},N=["line_chart","area_chart","stacked_area_chart","percent_stacked_area_chart"],O={id:"line-field-time-ordinal",type:"SOFT",docs:{lintText:"Data containing time or ordinal fields are suitable for line or area charts."},trigger:function(t){var e=t.chartType;return N.includes(e)},validator:function(t){var e=1,n=t.dataProps;n&&(n.find((function(t){return y(t.levelOfMeasurements,["Ordinal","Time"])}))&&(e=5));return e}},I=["bar_chart","column_chart","grouped_bar_chart","grouped_column_chart","stacked_bar_chart","stacked_column_chart"];function P(t){return t.filter((function(t){return h(t.levelOfMeasurements,["Nominal"])}))}var R={id:"nominal-enum-combinatorial",type:"SOFT",docs:{lintText:"Single (Basic) and Multi (Stacked, Grouped,...) charts should be optimized recommended by nominal enums combinatorial numbers."},trigger:function(t){var e=t.chartType,n=t.dataProps;return I.includes(e)&&P(n).length>=2},validator:function(t){var e=1,n=t.dataProps,r=t.chartType;if(n){var a=P(n);if(a.length>=2){var i=a.sort(b),o=i[0],u=i[1];if(o.distinct===o.count&&["bar_chart","column_chart"].includes(r)&&(e=5),o.count&&o.distinct&&u.distinct&&o.count>o.distinct){["grouped_bar_chart","grouped_column_chart","stacked_bar_chart","stacked_column_chart"].includes(r)&&(e=5)}}}return e}},j=["pie_chart","donut_chart","radar_chart","rose_chart"],D={id:"series-qty-limit",type:"SOFT",docs:{lintText:"Some charts should has at most N values for the series."},trigger:function(t){var e=t.chartType;return j.includes(e)},validator:function(t){var e=1,n=t.dataProps,r=t.chartType,a=t.limit;if((!Number.isInteger(a)||a<=0)&&(a=6,"pie_chart"!==r&&"donut_chart"!==r&&"rose_chart"!==r||(a=6),"radar_chart"===r&&(a=8)),n){var i=n.find((function(t){return h(t.levelOfMeasurements,["Nominal"])})),o=i&&i.count?i.count:0;o>=2&&o<=a&&(e=5+2/o)}return e}},E=n(5570),L=n.n(E),B=n(8972);function z(t){return"number"==typeof t}function Q(t){return"string"==typeof t||"boolean"==typeof t}function G(t){return t instanceof Date}function F(t,e,n){if(void 0!==n)return function(t){switch(t){case"linear":case"log":case"pow":case"sqrt":case"qunatile":case"threshold":case"quantize":case"sequential":return"quantitative";case"time":return"temporal";case"ordinal":case"point":case"band":return"categorical";default:throw new Error("Unkonwn scale type: ".concat(t,"."))}}(n);var r=function(t,e){return function(t){return"function"==typeof t}(e)?t.map(e):function(t,e){return"string"==typeof e&&t.some((function(t){return void 0!==t[e]}))}(t,e)?t.map((function(t){return t[e]})):t.map((function(){return e}))}(t,e);return function(t){if(t.some(z))return"quantitative";if(t.some(Q))return"categorical";if(t.some(G))return"temporal";throw new Error("Unknown type: ".concat(L()(t[0])))}(r)}function q(t){var e=t.encode,n=t.data,r=t.scale,a=(0,B.mapValues)(e,(function(t,e){return{field:t,type:F(n,t,null==r?void 0:r[e].type)}}));return f()(f()({},t),{},{encode:a})}for(var $=["line_chart"],U={id:"x-axis-line-fading",type:"DESIGN",docs:{lintText:"Adjust axis to make it prettier"},trigger:function(t){var e=t.chartType;return $.includes(e)},optimizer:function(t,e){var n,r=q(e).encode;if(r&&"quantitative"===(null===(n=r.y)||void 0===n?void 0:n.type)){var a=t.find((function(t){var e;return t.name===(null===(e=r.y)||void 0===e?void 0:e.field)}));if(a){var i=a.maximum-a.minimum;if(a.minimum&&a.maximum&&i<2*a.maximum/3){var o=Math.floor(a.minimum-i/5);return{axis:{x:{tick:!1}},scale:{y:{domainMin:o>0?o:0}},clip:!0}}}}return{}}},V=([].concat(["data-check","data-field-qty","no-redundant-field","purpose-check"],["series-qty-limit","bar-series-qty","line-field-time-ordinal","landscape-or-portrait","diff-pie-sector","nominal-enum-combinatorial","limit-series"]),{"data-check":w,"data-field-qty":{id:"data-field-qty",type:"HARD",docs:{lintText:"Data must have at least the min qty of the prerequisite."},trigger:function(){return!0},validator:function(t){var e=0,n=t.dataProps,r=t.chartType,a=t.chartWIKI;if(n&&r&&a[r]){e=1;var i=(a[r].dataPres||[]).map((function(t){return t.minQty})).reduce((function(t,e){return t+e}));if(n.length)n.length>=i&&(e=1)}return e}},"no-redundant-field":{id:"no-redundant-field",type:"HARD",docs:{lintText:"No redundant field."},trigger:function(){return!0},validator:function(t){var e=0,n=t.dataProps,r=t.chartType,a=t.chartWIKI;if(n&&r&&a[r]){var i=(a[r].dataPres||[]).map((function(t){return"*"===t.maxQty?99:t.maxQty})).reduce((function(t,e){return t+e}));if(n.length)n.length<=i&&(e=1)}return e}},"purpose-check":{id:"purpose-check",type:"HARD",docs:{lintText:"Choose chart types that satisfy the purpose, if purpose is defined."},trigger:function(){return!0},validator:function(t){var e=0,n=t.chartType,r=t.purpose,a=t.chartWIKI;if(!r)return e=1;if(n&&a[n]&&r&&(a[n].purpose||"").includes(r))return e=1;return e}},"bar-series-qty":v,"diff-pie-sector":M,"landscape-or-portrait":T,"limit-series":S,"line-field-time-ordinal":O,"nominal-enum-combinatorial":R,"series-qty-limit":D,"x-axis-line-fading":U,"bar-without-axis-min":g}),W=Object.keys(V),H=function(t){var e={};return t.forEach((function(t){Object.keys(V).includes(t)&&(e[t]=V[t])})),e},Z=function(t){if(!t)return H(W);var e=H(W);t.exclude&&t.exclude.forEach((function(t){Object.keys(e).includes(t)&&delete e[t]}));if(t.include){var n=t.include;Object.keys(e).forEach((function(t){n.includes(t)||delete e[t]}))}var r=f()(f()({},e),t.custom),a=t.options;a&&Object.keys(a).forEach((function(t){if(Object.keys(r).includes(t)){var e=a[t];r[t]=f()(f()({},r[t]),{},{option:e})}}));return r},Y=n(7849),J=function t(e){if("object"!==L()(e)||null===e)return e;var n;if(Array.isArray(e)){n=[];for(var r=0,a=e.length;r<a;r+=1)"object"===L()(e[r])&&null!=e[r]?n[r]=t(e[r]):n[r]=e[r]}else{n={};for(var i=Object.keys(e),o=0;o<i.length;o+=1){var u=i[o];"object"===L()(e[u])&&null!=e[u]?n[u]=t(e[u]):n[u]=e[u]}}return n},K=n(3100),X=n.n(K),tt=n(4479),et=n.n(tt),nt={model:"rgb",value:{r:255,g:255,b:255}},rt=["normal","darken","multiply","colorBurn","linearBurn","lighten","screen","colorDodge","linearDodge","overlay","softLight","hardLight","vividLight","linearLight","pinLight","difference","exclusion"],at=([].concat(rt,["hue","saturation","color","luminosity"]),n(1088)),it=n(6970),ot=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return mt(gt(e,t),n)},ut=function(t){t._clipped=!1,t._unclipped=t.slice(0);for(var e=0;e<=3;e++)e<3?((t[e]<0||t[e]>255)&&(t._clipped=!0),t[e]=ot(t[e],0,255)):3===e&&(t[e]=ot(t[e],0,1));return t},ct={},st=0,lt=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];st<lt.length;st++){var ft=lt[st];ct["[object ".concat(ft,"]")]=ft.toLowerCase()}function ht(t){return ct[Object.prototype.toString.call(t)]||"object"}var dt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t.length>=3?Array.prototype.slice.call(t):"object"==ht(t[0])&&e?e.split("").filter((function(e){return void 0!==t[0][e]})).map((function(e){return t[0][e]})):t[0]},pt=function(t){if(t.length<2)return null;var e=t.length-1;return"string"==ht(t[e])?t[e].toLowerCase():null},vt=Math.PI,mt=Math.min,gt=Math.max,yt=2*vt,bt=vt/3,_t=vt/180,xt=180/vt,wt={format:{},autodetect:[]},kt=function(){function t(){r(this,t);for(var e=this,n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];if("object"===ht(a[0])&&a[0].constructor&&a[0].constructor===this.constructor)return a[0];var o=pt(a),u=!1;if(!o){u=!0,wt.sorted||(wt.autodetect=wt.autodetect.sort((function(t,e){return e.p-t.p})),wt.sorted=!0);var c,s=it(wt.autodetect);try{for(s.s();!(c=s.n()).done;){var l=c.value;if(o=l.test.apply(l,a))break}}catch(t){s.e(t)}finally{s.f()}}if(!wt.format[o])throw new Error("unknown format: "+a);var f=wt.format[o].apply(null,u?a:a.slice(0,-1));e._rgb=ut(f),3===e._rgb.length&&e._rgb.push(1)}return i(t,[{key:"toString",value:function(){return"function"==ht(this.hex)?this.hex():"[".concat(this._rgb.join(","),"]")}}]),t}(),Mt=kt,At=function t(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return at(t.Color,n)};At.Color=Mt,At.version="2.6.0";var Ct=At,Tt=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e=dt(e,"cmyk"),a=K(r,4),i=a[0],o=a[1],u=a[2],c=a[3],s=e.length>4?e[4]:1;return 1===c?[0,0,0,s]:[i>=1?0:255*(1-i)*(1-c),o>=1?0:255*(1-o)*(1-c),u>=1?0:255*(1-u)*(1-c),s]},St=Math.max,Nt=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=dt(e,"rgb"),a=K(r,3),i=a[0],o=a[1],u=a[2],c=1-St(i/=255,St(o/=255,u/=255)),s=c<1?1/(1-c):0,l=(1-i-c)*s,f=(1-o-c)*s,h=(1-u-c)*s;return[l,f,h,c]};Mt.prototype.cmyk=function(){return Nt(this._rgb)},Ct.cmyk=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(Mt,e.concat(["cmyk"]))},wt.format.cmyk=Tt,wt.autodetect.push({p:2,test:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if("array"===ht(e=dt(e,"cmyk"))&&4===e.length)return"cmyk"}});var Ot=function(t){return Math.round(100*t)/100},It=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=dt(e,"hsla"),a=pt(e)||"lsa";return r[0]=Ot(r[0]||0),r[1]=Ot(100*r[1])+"%",r[2]=Ot(100*r[2])+"%","hsla"===a||r.length>3&&r[3]<1?(r[3]=r.length>3?r[3]:1,a="hsla"):r.length=3,"".concat(a,"(").concat(r.join(","),")")},Pt=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,a,i=e=dt(e,"rgba"),o=K(i,3),u=o[0],c=o[1],s=o[2],l=mt(u/=255,c/=255,s/=255),f=gt(u,c,s),h=(f+l)/2;return f===l?(r=0,a=Number.NaN):r=h<.5?(f-l)/(f+l):(f-l)/(2-f-l),u==f?a=(c-s)/(f-l):c==f?a=2+(s-u)/(f-l):s==f&&(a=4+(u-c)/(f-l)),(a*=60)<0&&(a+=360),e.length>3&&void 0!==e[3]?[a,r,h,e[3]]:[a,r,h]},Rt=Math.round,jt=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=dt(e,"rgba"),a=pt(e)||"rgb";return"hsl"==a.substr(0,3)?It(Pt(r),a):(r[0]=Rt(r[0]),r[1]=Rt(r[1]),r[2]=Rt(r[2]),("rgba"===a||r.length>3&&r[3]<1)&&(r[3]=r.length>3?r[3]:1,a="rgba"),"".concat(a,"(").concat(r.slice(0,"rgb"===a?3:4).join(","),")"))},Dt=Math.round,Et=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,a,i,o=e=dt(e,"hsl"),u=K(o,3),c=u[0],s=u[1],l=u[2];if(0===s)r=a=i=255*l;else{var f=[0,0,0],h=[0,0,0],d=l<.5?l*(1+s):l+s-l*s,p=2*l-d,v=c/360;f[0]=v+1/3,f[1]=v,f[2]=v-1/3;for(var m=0;m<3;m++)f[m]<0&&(f[m]+=1),f[m]>1&&(f[m]-=1),6*f[m]<1?h[m]=p+6*(d-p)*f[m]:2*f[m]<1?h[m]=d:3*f[m]<2?h[m]=p+(d-p)*(2/3-f[m])*6:h[m]=p;var g=[Dt(255*h[0]),Dt(255*h[1]),Dt(255*h[2])];r=g[0],a=g[1],i=g[2]}return e.length>3?[r,a,i,e[3]]:[r,a,i,1]},Lt=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,Bt=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,zt=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Qt=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Gt=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Ft=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,qt=Math.round,$t=function(t){var e;if(t=t.toLowerCase().trim(),wt.format.named)try{return wt.format.named(t)}catch(t){}if(e=t.match(Lt)){for(var n=e.slice(1,4),r=0;r<3;r++)n[r]=+n[r];return n[3]=1,n}if(e=t.match(Bt)){for(var a=e.slice(1,5),i=0;i<4;i++)a[i]=+a[i];return a}if(e=t.match(zt)){for(var o=e.slice(1,4),u=0;u<3;u++)o[u]=qt(2.55*o[u]);return o[3]=1,o}if(e=t.match(Qt)){for(var c=e.slice(1,5),s=0;s<3;s++)c[s]=qt(2.55*c[s]);return c[3]=+c[3],c}if(e=t.match(Gt)){var l=e.slice(1,4);l[1]*=.01,l[2]*=.01;var f=Et(l);return f[3]=1,f}if(e=t.match(Ft)){var h=e.slice(1,4);h[1]*=.01,h[2]*=.01;var d=Et(h);return d[3]=+e[4],d}};$t.test=function(t){return Lt.test(t)||Bt.test(t)||zt.test(t)||Qt.test(t)||Gt.test(t)||Ft.test(t)};var Ut=$t;Mt.prototype.css=function(t){return jt(this._rgb,t)},Ct.css=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(Mt,e.concat(["css"]))},wt.format.css=Ut,wt.autodetect.push({p:5,test:function(t){if((arguments.length<=1||!(arguments.length-1))&&"string"===ht(t)&&Ut.test(t))return"css"}}),wt.format.gl=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=dt(e,"rgba");return r[0]*=255,r[1]*=255,r[2]*=255,r},Ct.gl=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(Mt,e.concat(["gl"]))},Mt.prototype.gl=function(){var t=this._rgb;return[t[0]/255,t[1]/255,t[2]/255,t[3]]};var Vt=Math.floor,Wt=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,a,i,o=e=dt(e,"hcg"),u=K(o,3),c=u[0],s=u[1],l=u[2];l*=255;var f=255*s;if(0===s)r=a=i=l;else{360===c&&(c=0),c>360&&(c-=360),c<0&&(c+=360);var h=Vt(c/=60),d=c-h,p=l*(1-s),v=p+f*(1-d),m=p+f*d,g=p+f;switch(h){case 0:r=g,a=m,i=p;break;case 1:r=v,a=g,i=p;break;case 2:r=p,a=g,i=m;break;case 3:r=p,a=v,i=g;break;case 4:r=m,a=p,i=g;break;case 5:r=g,a=p,i=v}}return[r,a,i,e.length>3?e[3]:1]},Ht=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,a=dt(e,"rgb"),i=K(a,3),o=i[0],u=i[1],c=i[2],s=mt(o,u,c),l=gt(o,u,c),f=l-s,h=100*f/255,d=s/(255-f)*100;return 0===f?r=Number.NaN:(o===l&&(r=(u-c)/f),u===l&&(r=2+(c-o)/f),c===l&&(r=4+(o-u)/f),(r*=60)<0&&(r+=360)),[r,h,d]};Mt.prototype.hcg=function(){return Ht(this._rgb)},Ct.hcg=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(Mt,e.concat(["hcg"]))},wt.format.hcg=Wt,wt.autodetect.push({p:1,test:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if("array"===ht(e=dt(e,"hcg"))&&3===e.length)return"hcg"}});var Zt=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Yt=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Jt=function(t){if(t.match(Zt)){4!==t.length&&7!==t.length||(t=t.substr(1)),3===t.length&&(t=(t=t.split(""))[0]+t[0]+t[1]+t[1]+t[2]+t[2]);var e=parseInt(t,16);return[e>>16,e>>8&255,255&e,1]}if(t.match(Yt)){5!==t.length&&9!==t.length||(t=t.substr(1)),4===t.length&&(t=(t=t.split(""))[0]+t[0]+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]);var n=parseInt(t,16);return[n>>24&255,n>>16&255,n>>8&255,Math.round((255&n)/255*100)/100]}throw new Error("unknown hex color: ".concat(t))},Kt=Math.round,Xt=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=dt(e,"rgba"),a=K(r,4),i=a[0],o=a[1],u=a[2],c=a[3],s=pt(e)||"auto";void 0===c&&(c=1),"auto"===s&&(s=c<1?"rgba":"rgb");var l=(i=Kt(i))<<16|(o=Kt(o))<<8|(u=Kt(u)),f="000000"+l.toString(16);f=f.substr(f.length-6);var h="0"+Kt(255*c).toString(16);switch(h=h.substr(h.length-2),s.toLowerCase()){case"rgba":return"#".concat(f).concat(h);case"argb":return"#".concat(h).concat(f);default:return"#".concat(f)}};Mt.prototype.hex=function(t){return Xt(this._rgb,t)},Ct.hex=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(Mt,e.concat(["hex"]))},wt.format.hex=Jt,wt.autodetect.push({p:4,test:function(t){if((arguments.length<=1||!(arguments.length-1))&&"string"===ht(t)&&[3,4,5,6,7,8,9].indexOf(t.length)>=0)return"hex"}});var te=Math.cos,ee=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,a,i,o=e=dt(e,"hsi"),u=K(o,3),c=u[0],s=u[1],l=u[2];return isNaN(c)&&(c=0),isNaN(s)&&(s=0),c>360&&(c-=360),c<0&&(c+=360),(c/=360)<1/3?a=1-((i=(1-s)/3)+(r=(1+s*te(yt*c)/te(bt-yt*c))/3)):c<2/3?i=1-((r=(1-s)/3)+(a=(1+s*te(yt*(c-=1/3))/te(bt-yt*c))/3)):r=1-((a=(1-s)/3)+(i=(1+s*te(yt*(c-=2/3))/te(bt-yt*c))/3)),[255*(r=ot(l*r*3)),255*(a=ot(l*a*3)),255*(i=ot(l*i*3)),e.length>3?e[3]:1]},ne=Math.min,re=Math.sqrt,ae=Math.acos,ie=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,a=dt(e,"rgb"),i=K(a,3),o=i[0],u=i[1],c=i[2],s=ne(o/=255,u/=255,c/=255),l=(o+u+c)/3,f=l>0?1-s/l:0;return 0===f?r=NaN:(r=(o-u+(o-c))/2,r/=re((o-u)*(o-u)+(o-c)*(u-c)),r=ae(r),c>u&&(r=yt-r),r/=yt),[360*r,f,l]};Mt.prototype.hsi=function(){return ie(this._rgb)},Ct.hsi=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(Mt,e.concat(["hsi"]))},wt.format.hsi=ee,wt.autodetect.push({p:2,test:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if("array"===ht(e=dt(e,"hsi"))&&3===e.length)return"hsi"}}),Mt.prototype.hsl=function(){return Pt(this._rgb)},Ct.hsl=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(Mt,e.concat(["hsl"]))},wt.format.hsl=Et,wt.autodetect.push({p:2,test:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if("array"===ht(e=dt(e,"hsl"))&&3===e.length)return"hsl"}});var oe=Math.floor,ue=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,a,i,o=e=dt(e,"hsv"),u=K(o,3),c=u[0],s=u[1],l=u[2];if(l*=255,0===s)r=a=i=l;else{360===c&&(c=0),c>360&&(c-=360),c<0&&(c+=360);var f=oe(c/=60),h=c-f,d=l*(1-s),p=l*(1-s*h),v=l*(1-s*(1-h));switch(f){case 0:r=l,a=v,i=d;break;case 1:r=p,a=l,i=d;break;case 2:r=d,a=l,i=v;break;case 3:r=d,a=p,i=l;break;case 4:r=v,a=d,i=l;break;case 5:r=l,a=d,i=p}}return[r,a,i,e.length>3?e[3]:1]},ce=Math.min,se=Math.max,le=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,a,i,o=e=dt(e,"rgb"),u=K(o,3),c=u[0],s=u[1],l=u[2],f=ce(c,s,l),h=se(c,s,l),d=h-f;return i=h/255,0===h?(r=Number.NaN,a=0):(a=d/h,c===h&&(r=(s-l)/d),s===h&&(r=2+(l-c)/d),l===h&&(r=4+(c-s)/d),(r*=60)<0&&(r+=360)),[r,a,i]};Mt.prototype.hsv=function(){return le(this._rgb)},Ct.hsv=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(Mt,e.concat(["hsv"]))},wt.format.hsv=ue,wt.autodetect.push({p:2,test:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if("array"===ht(e=dt(e,"hsv"))&&3===e.length)return"hsv"}});var fe=18,he=.95047,de=1,pe=1.08883,ve=.137931034,me=.206896552,ge=.12841855,ye=.008856452,be=Math.pow,_e=function(t){return 255*(t<=.00304?12.92*t:1.055*be(t,1/2.4)-.055)},xe=function(t){return t>me?t*t*t:ge*(t-ve)},we=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,a,i,o=e=dt(e,"lab"),u=K(o,3),c=u[0],s=u[1],l=u[2];return a=(c+16)/116,r=isNaN(s)?a:a+s/500,i=isNaN(l)?a:a-l/200,a=de*xe(a),r=he*xe(r),i=pe*xe(i),[_e(3.2404542*r-1.5371385*a-.4985314*i),_e(-.969266*r+1.8760108*a+.041556*i),_e(.0556434*r-.2040259*a+1.0572252*i),e.length>3?e[3]:1]},ke=Math.pow,Me=function(t){return(t/=255)<=.04045?t/12.92:ke((t+.055)/1.055,2.4)},Ae=function(t){return t>ye?ke(t,1/3):t/ge+ve},Ce=function(t,e,n){return t=Me(t),e=Me(e),n=Me(n),[Ae((.4124564*t+.3575761*e+.1804375*n)/he),Ae((.2126729*t+.7151522*e+.072175*n)/de),Ae((.0193339*t+.119192*e+.9503041*n)/pe)]},Te=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=dt(e,"rgb"),a=K(r,3),i=a[0],o=a[1],u=a[2],c=Ce(i,o,u),s=K(c,3),l=s[0],f=s[1],h=s[2],d=116*f-16;return[d<0?0:d,500*(l-f),200*(f-h)]};Mt.prototype.lab=function(){return Te(this._rgb)},Ct.lab=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(Mt,e.concat(["lab"]))},wt.format.lab=we,wt.autodetect.push({p:2,test:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if("array"===ht(e=dt(e,"lab"))&&3===e.length)return"lab"}});var Se=Math.sin,Ne=Math.cos,Oe=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=dt(e,"lch"),a=K(r,3),i=a[0],o=a[1],u=a[2];return isNaN(u)&&(u=0),[i,Ne(u*=_t)*o,Se(u)*o]},Ie=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e=dt(e,"lch"),a=K(r,3),i=a[0],o=a[1],u=a[2],c=Oe(i,o,u),s=K(c,3),l=s[0],f=s[1],h=s[2],d=we(l,f,h),p=K(d,3),v=p[0],m=p[1],g=p[2];return[v,m,g,e.length>3?e[3]:1]},Pe=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=dt(e,"hcl").reverse();return Ie.apply(void 0,tt(r))},Re=Math.sqrt,je=Math.atan2,De=Math.round,Ee=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=dt(e,"lab"),a=K(r,3),i=a[0],o=a[1],u=a[2],c=Re(o*o+u*u),s=(je(u,o)*xt+360)%360;return 0===De(1e4*c)&&(s=Number.NaN),[i,c,s]},Le=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=dt(e,"rgb"),a=K(r,3),i=a[0],o=a[1],u=a[2],c=Te(i,o,u),s=K(c,3),l=s[0],f=s[1],h=s[2];return Ee(l,f,h)};Mt.prototype.lch=function(){return Le(this._rgb)},Mt.prototype.hcl=function(){return Le(this._rgb).reverse()},Ct.lch=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(Mt,e.concat(["lch"]))},Ct.hcl=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(Mt,e.concat(["hcl"]))},wt.format.lch=Ie,wt.format.hcl=Pe,["lch","hcl"].forEach((function(t){return wt.autodetect.push({p:2,test:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if("array"===ht(n=dt(n,t))&&3===n.length)return t}})}));var Be={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};Mt.prototype.name=function(){for(var t=Xt(this._rgb,"rgb"),e=0,n=Object.keys(Be);e<n.length;e++){var r=n[e];if(Be[r]===t)return r.toLowerCase()}return t},wt.format.named=function(t){if(t=t.toLowerCase(),Be[t])return Jt(Be[t]);throw new Error("unknown color name: "+t)},wt.autodetect.push({p:5,test:function(t){if((arguments.length<=1||!(arguments.length-1))&&"string"===ht(t)&&Be[t.toLowerCase()])return"named"}});var ze=function(t){if("number"==ht(t)&&t>=0&&t<=16777215)return[t>>16,t>>8&255,255&t,1];throw new Error("unknown num color: "+t)},Qe=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=dt(e,"rgb"),a=K(r,3),i=a[0],o=a[1],u=a[2];return(i<<16)+(o<<8)+u};Mt.prototype.num=function(){return Qe(this._rgb)},Ct.num=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(Mt,e.concat(["num"]))},wt.format.num=ze,wt.autodetect.push({p:5,test:function(){if(1===arguments.length&&"number"===ht(arguments.length<=0?void 0:arguments[0])&&(arguments.length<=0?void 0:arguments[0])>=0&&(arguments.length<=0?void 0:arguments[0])<=16777215)return"num"}});var Ge=Math.round;Mt.prototype.rgb=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return!1===t?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Ge)},Mt.prototype.rgba=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._rgb.slice(0,4).map((function(e,n){return n<3?!1===t?e:Ge(e):e}))},Ct.rgb=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(Mt,e.concat(["rgb"]))},wt.format.rgb=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=dt(e,"rgba");return void 0===r[3]&&(r[3]=1),r},wt.autodetect.push({p:3,test:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if("array"===ht(e=dt(e,"rgba"))&&(3===e.length||4===e.length&&"number"==ht(e[3])&&e[3]>=0&&e[3]<=1))return"rgb"}});var Fe=Math.log,qe=function(t){var e,n,r,a=t/100;return a<66?(e=255,n=a<6?0:-155.25485562709179-.44596950469579133*(n=a-2)+104.49216199393888*Fe(n),r=a<20?0:.8274096064007395*(r=a-10)-254.76935184120902+115.67994401066147*Fe(r)):(e=351.97690566805693+.114206453784165*(e=a-55)-40.25366309332127*Fe(e),n=325.4494125711974+.07943456536662342*(n=a-50)-28.0852963507957*Fe(n),r=255),[e,n,r,1]},$e=Math.round,Ue=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r,a=dt(e,"rgb"),i=a[0],o=a[2],u=1e3,c=4e4,s=.4;c-u>s;){var l=qe(r=.5*(c+u));l[2]/l[0]>=o/i?c=r:u=r}return $e(r)};Mt.prototype.temp=Mt.prototype.kelvin=Mt.prototype.temperature=function(){return Ue(this._rgb)},Ct.temp=Ct.kelvin=Ct.temperature=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(Mt,e.concat(["temp"]))},wt.format.temp=wt.format.kelvin=wt.format.temperature=qe;var Ve=Math.pow,We=Math.sign,He=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e=dt(e,"lab"),a=K(r,3),i=a[0],o=a[1],u=a[2],c=Ve(i+.3963377774*o+.2158037573*u,3),s=Ve(i-.1055613458*o-.0638541728*u,3),l=Ve(i-.0894841775*o-1.291485548*u,3);return[255*Ze(4.0767416621*c-3.3077115913*s+.2309699292*l),255*Ze(-1.2684380046*c+2.6097574011*s-.3413193965*l),255*Ze(-.0041960863*c-.7034186147*s+1.707614701*l),e.length>3?e[3]:1]};function Ze(t){var e=Math.abs(t);return e>.0031308?(We(t)||1)*(1.055*Ve(e,1/2.4)-.055):12.92*t}var Ye=Math.cbrt,Je=Math.pow,Ke=Math.sign,Xe=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=dt(e,"rgb"),a=K(r,3),i=a[0],o=a[1],u=a[2],c=[tn(i/255),tn(o/255),tn(u/255)],s=c[0],l=c[1],f=c[2],h=Ye(.4122214708*s+.5363325363*l+.0514459929*f),d=Ye(.2119034982*s+.6806995451*l+.1073969566*f),p=Ye(.0883024619*s+.2817188376*l+.6299787005*f);return[.2104542553*h+.793617785*d-.0040720468*p,1.9779984951*h-2.428592205*d+.4505937099*p,.0259040371*h+.7827717662*d-.808675766*p]};function tn(t){var e=Math.abs(t);return e<.04045?t/12.92:(Ke(t)||1)*Je((e+.055)/1.055,2.4)}Mt.prototype.oklab=function(){return Xe(this._rgb)},Ct.oklab=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(Mt,e.concat(["oklab"]))},wt.format.oklab=He,wt.autodetect.push({p:3,test:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if("array"===ht(e=dt(e,"oklab"))&&3===e.length)return"oklab"}});var en=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e=dt(e,"lch"),a=K(r,3),i=a[0],o=a[1],u=a[2],c=Oe(i,o,u),s=K(c,3),l=s[0],f=s[1],h=s[2],d=He(l,f,h),p=K(d,3),v=p[0],m=p[1],g=p[2];return[v,m,g,e.length>3?e[3]:1]},nn=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=dt(e,"rgb"),a=K(r,3),i=a[0],o=a[1],u=a[2],c=Xe(i,o,u),s=K(c,3),l=s[0],f=s[1],h=s[2];return Ee(l,f,h)};Mt.prototype.oklch=function(){return nn(this._rgb)},Ct.oklch=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(Mt,e.concat(["oklch"]))},wt.format.oklch=en,wt.autodetect.push({p:3,test:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if("array"===ht(e=dt(e,"oklch"))&&3===e.length)return"oklch"}}),Mt.prototype.alpha=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return void 0!==t&&"number"===ht(t)?e?(this._rgb[3]=t,this):new Mt([this._rgb[0],this._rgb[1],this._rgb[2],t],"rgb"):this._rgb[3]},Mt.prototype.clipped=function(){return this._rgb._clipped||!1},Mt.prototype.darken=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=this,n=e.lab();return n[0]-=fe*t,new Mt(n,"lab").alpha(e.alpha(),!0)},Mt.prototype.brighten=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.darken(-t)},Mt.prototype.darker=Mt.prototype.darken,Mt.prototype.brighter=Mt.prototype.brighten,Mt.prototype.get=function(t){var e=t.split("."),n=K(e,2),r=n[0],a=n[1],i=this[r]();if(a){var o=r.indexOf(a)-("ok"===r.substr(0,2)?2:0);if(o>-1)return i[o];throw new Error("unknown channel ".concat(a," in mode ").concat(r))}return i};var rn=Math.pow;Mt.prototype.luminance=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"rgb";if(void 0!==t&&"number"===ht(t)){if(0===t)return new Mt([0,0,0,this._rgb[3]],"rgb");if(1===t)return new Mt([255,255,255,this._rgb[3]],"rgb");var n=this.luminance(),r=20,a=function n(a,i){var o=a.interpolate(i,.5,e),u=o.luminance();return Math.abs(t-u)<1e-7||!r--?o:u>t?n(a,o):n(o,i)},i=(n>t?a(new Mt([0,0,0]),this):a(this,new Mt([255,255,255]))).rgb();return new Mt([].concat(tt(i),[this._rgb[3]]))}return an.apply(void 0,tt(this._rgb.slice(0,3)))};var an=function(t,e,n){return.2126*(t=on(t))+.7152*(e=on(e))+.0722*(n=on(n))},on=function(t){return(t/=255)<=.03928?t/12.92:rn((t+.055)/1.055,2.4)},un={},cn=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.5,r=(arguments.length<=3?void 0:arguments[3])||"lrgb";if(un[r]||!(arguments.length<=3)&&arguments.length-3||(r=Object.keys(un)[0]),!un[r])throw new Error("interpolation mode ".concat(r," is not defined"));return"object"!==ht(t)&&(t=new Mt(t)),"object"!==ht(e)&&(e=new Mt(e)),un[r](t,e,n).alpha(t.alpha()+n*(e.alpha()-t.alpha()))};Mt.prototype.mix=Mt.prototype.interpolate=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];return cn.apply(void 0,[this,t,e].concat(r))},Mt.prototype.premultiply=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._rgb,n=e[3];return t?(this._rgb=[e[0]*n,e[1]*n,e[2]*n,n],this):new Mt([e[0]*n,e[1]*n,e[2]*n,n],"rgb")},Mt.prototype.saturate=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=this,n=e.lch();return n[1]+=fe*t,n[1]<0&&(n[1]=0),new Mt(n,"lch").alpha(e.alpha(),!0)},Mt.prototype.desaturate=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.saturate(-t)},Mt.prototype.set=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t.split("."),a=K(r,2),i=a[0],o=a[1],u=this[i]();if(o){var c=i.indexOf(o)-("ok"===i.substr(0,2)?2:0);if(c>-1){if("string"==ht(e))switch(e.charAt(0)){case"+":case"-":u[c]+=+e;break;case"*":u[c]*=+e.substr(1);break;case"/":u[c]/=+e.substr(1);break;default:u[c]=+e}else{if("number"!==ht(e))throw new Error("unsupported value for Color.set");u[c]=e}var s=new Mt(u,i);return n?(this._rgb=s._rgb,this):s}throw new Error("unknown channel ".concat(o," in mode ").concat(i))}return u},Mt.prototype.tint=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.5,e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return cn.apply(void 0,[this,"white",t].concat(n))},Mt.prototype.shade=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.5,e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return cn.apply(void 0,[this,"black",t].concat(n))};var sn=function(t,e,n){var r=t._rgb,a=e._rgb;return new Mt(r[0]+n*(a[0]-r[0]),r[1]+n*(a[1]-r[1]),r[2]+n*(a[2]-r[2]),"rgb")};un.rgb=sn;var ln=Math.sqrt,fn=Math.pow,hn=function(t,e,n){var r=K(t._rgb,3),a=r[0],i=r[1],o=r[2],u=K(e._rgb,3),c=u[0],s=u[1],l=u[2];return new Mt(ln(fn(a,2)*(1-n)+fn(c,2)*n),ln(fn(i,2)*(1-n)+fn(s,2)*n),ln(fn(o,2)*(1-n)+fn(l,2)*n),"rgb")};un.lrgb=hn;var dn=function(t,e,n){var r=t.lab(),a=e.lab();return new Mt(r[0]+n*(a[0]-r[0]),r[1]+n*(a[1]-r[1]),r[2]+n*(a[2]-r[2]),"lab")};un.lab=dn;var pn=function(t,e,n,r){var a,i,o,u,c,s,l,f,h,d,p;if("hsl"===r?(a=t.hsl(),i=e.hsl()):"hsv"===r?(a=t.hsv(),i=e.hsv()):"hcg"===r?(a=t.hcg(),i=e.hcg()):"hsi"===r?(a=t.hsi(),i=e.hsi()):"lch"===r||"hcl"===r?(r="hcl",a=t.hcl(),i=e.hcl()):"oklch"===r&&(a=t.oklch().reverse(),i=e.oklch().reverse()),"h"===r.substr(0,1)||"oklch"===r){var v=K(a,3);o=v[0],c=v[1],l=v[2];var m=K(i,3);u=m[0],s=m[1],f=m[2]}return isNaN(o)||isNaN(u)?isNaN(o)?isNaN(u)?d=Number.NaN:(d=u,1!=l&&0!=l||"hsv"==r||(h=s)):(d=o,1!=f&&0!=f||"hsv"==r||(h=c)):d=o+n*(u>o&&u-o>180?u-(o+360):u<o&&o-u>180?u+360-o:u-o),void 0===h&&(h=c+n*(s-c)),p=l+n*(f-l),new Mt("oklch"===r?[p,h,d]:[d,h,p],r)},vn=function(t,e,n){return pn(t,e,n,"lch")};un.lch=vn,un.hcl=vn;var mn=function(t,e,n){var r=t.num(),a=e.num();return new Mt(r+n*(a-r),"num")};un.num=mn;var gn=function(t,e,n){return pn(t,e,n,"hcg")};un.hcg=gn;var yn=function(t,e,n){return pn(t,e,n,"hsi")};un.hsi=yn;var bn=function(t,e,n){return pn(t,e,n,"hsl")};un.hsl=bn;var _n=function(t,e,n){return pn(t,e,n,"hsv")};un.hsv=_n;var xn=function(t,e,n){var r=t.oklab(),a=e.oklab();return new Mt(r[0]+n*(a[0]-r[0]),r[1]+n*(a[1]-r[1]),r[2]+n*(a[2]-r[2]),"oklab")};un.oklab=xn;var wn=function(t,e,n){return pn(t,e,n,"oklch")};un.oklch=wn;var kn=Math.pow,Mn=Math.sqrt,An=Math.PI,Cn=Math.cos,Tn=Math.sin,Sn=Math.atan2,Nn=function(t,e){for(var n=t.length,r=[0,0,0,0],a=0;a<t.length;a++){var i=t[a],o=e[a]/n,u=i._rgb;r[0]+=kn(u[0],2)*o,r[1]+=kn(u[1],2)*o,r[2]+=kn(u[2],2)*o,r[3]+=u[3]*o}return r[0]=Mn(r[0]),r[1]=Mn(r[1]),r[2]=Mn(r[2]),r[3]>.9999999&&(r[3]=1),new Mt(ut(r))},On=Math.pow;function In(t){var e="rgb",n=Ct("#ccc"),r=0,a=[0,1],i=[],o=[0,0],u=!1,c=[],s=!1,l=0,f=1,h=!1,d={},p=!0,v=1,m=function(t){if((t=t||["#fff","#000"])&&"string"===ht(t)&&Ct.brewer&&Ct.brewer[t.toLowerCase()]&&(t=Ct.brewer[t.toLowerCase()]),"array"===ht(t)){1===t.length&&(t=[t[0],t[0]]),t=t.slice(0);for(var e=0;e<t.length;e++)t[e]=Ct(t[e]);i.length=0;for(var n=0;n<t.length;n++)i.push(n/(t.length-1))}return _(),c=t},g=function(t){return t},y=function(t){return t},b=function(t,r){var a,s;if(null==r&&(r=!1),isNaN(t)||null===t)return n;if(r)s=t;else if(u&&u.length>2){var h=function(t){if(null!=u){for(var e=u.length-1,n=0;n<e&&t>=u[n];)n++;return n-1}return 0}(t);s=h/(u.length-2)}else s=f!==l?(t-l)/(f-l):1;s=y(s),r||(s=g(s)),1!==v&&(s=On(s,v)),s=o[0]+s*(1-o[0]-o[1]),s=ot(s,0,1);var m=Math.floor(1e4*s);if(p&&d[m])a=d[m];else{if("array"===ht(c))for(var b=0;b<i.length;b++){var _=i[b];if(s<=_){a=c[b];break}if(s>=_&&b===i.length-1){a=c[b];break}if(s>_&&s<i[b+1]){s=(s-_)/(i[b+1]-_),a=Ct.interpolate(c[b],c[b+1],s,e);break}}else"function"===ht(c)&&(a=c(s));p&&(d[m]=a)}return a},_=function(){return d={}};m(t);var x=function(t){var e=Ct(b(t));return s&&e[s]?e[s]():e};return x.classes=function(t){if(null!=t){if("array"===ht(t))u=t,a=[t[0],t[t.length-1]];else{var e=Ct.analyze(a);u=0===t?[e.min,e.max]:Ct.limits(e,"e",t)}return x}return u},x.domain=function(t){if(!arguments.length)return a;l=t[0],f=t[t.length-1],i=[];var e=c.length;if(t.length===e&&l!==f)for(var n=0,r=Array.from(t);n<r.length;n++){var o=r[n];i.push((o-l)/(f-l))}else{for(var u=0;u<e;u++)i.push(u/(e-1));if(t.length>2){var s=t.map((function(e,n){return n/(t.length-1)})),h=t.map((function(t){return(t-l)/(f-l)}));h.every((function(t,e){return s[e]===t}))||(y=function(t){if(t<=0||t>=1)return t;for(var e=0;t>=h[e+1];)e++;var n=(t-h[e])/(h[e+1]-h[e]);return s[e]+n*(s[e+1]-s[e])})}}return a=[l,f],x},x.mode=function(t){return arguments.length?(e=t,_(),x):e},x.range=function(t,e){return m(t),x},x.out=function(t){return s=t,x},x.spread=function(t){return arguments.length?(r=t,x):r},x.correctLightness=function(t){return null==t&&(t=!0),h=t,_(),g=h?function(t){for(var e=b(0,!0).lab()[0],n=b(1,!0).lab()[0],r=e>n,a=b(t,!0).lab()[0],i=e+(n-e)*t,o=a-i,u=0,c=1,s=20;Math.abs(o)>.01&&s-- >0;)r&&(o*=-1),o<0?(u=t,t+=.5*(c-t)):(c=t,t+=.5*(u-t)),a=b(t,!0).lab()[0],o=a-i;return t}:function(t){return t},x},x.padding=function(t){return null!=t?("number"===ht(t)&&(t=[t,t]),o=t,x):o},x.colors=function(e,n){arguments.length<2&&(n="hex");var r=[];if(0===arguments.length)r=c.slice(0);else if(1===e)r=[x(.5)];else if(e>1){var i=a[0],o=a[1]-i;r=Pn(0,e,!1).map((function(t){return x(i+t/(e-1)*o)}))}else{t=[];var s=[];if(u&&u.length>2)for(var l=1,f=u.length,h=1<=f;h?l<f:l>f;h?l++:l--)s.push(.5*(u[l-1]+u[l]));else s=a;r=s.map((function(t){return x(t)}))}return Ct[n]&&(r=r.map((function(t){return t[n]()}))),r},x.cache=function(t){return null!=t?(p=t,x):p},x.gamma=function(t){return null!=t?(v=t,x):v},x.nodata=function(t){return null!=t?(n=Ct(t),x):n},x}function Pn(t,e,n){for(var r=[],a=t<e,i=n?a?e+1:e-1:e,o=t;a?o<i:o>i;a?o++:o--)r.push(o);return r}var Rn=function t(e,n,r){if(!t[r])throw new Error("unknown blend mode "+r);return t[r](e,n)},jn=function(t){return function(e,n){var r=Ct(n).rgb(),a=Ct(e).rgb();return Ct.rgb(t(r,a))}},Dn=function(t){return function(e,n){var r=[];return r[0]=t(e[0],n[0]),r[1]=t(e[1],n[1]),r[2]=t(e[2],n[2]),r}};Rn.normal=jn(Dn((function(t){return t}))),Rn.multiply=jn(Dn((function(t,e){return t*e/255}))),Rn.screen=jn(Dn((function(t,e){return 255*(1-(1-t/255)*(1-e/255))}))),Rn.overlay=jn(Dn((function(t,e){return e<128?2*t*e/255:255*(1-2*(1-t/255)*(1-e/255))}))),Rn.darken=jn(Dn((function(t,e){return t>e?e:t}))),Rn.lighten=jn(Dn((function(t,e){return t>e?t:e}))),Rn.dodge=jn(Dn((function(t,e){return 255===t||(t=e/255*255/(1-t/255))>255?255:t}))),Rn.burn=jn(Dn((function(t,e){return 255*(1-(1-e/255)/(t/255))})));var En=Rn,Ln=Math.pow,Bn=Math.sin,zn=Math.cos;var Qn=Math.floor,Gn=Math.random,Fn=Math.log,qn=Math.pow,$n=Math.floor,Un=Math.abs;function Vn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===ht(t)&&(t=Object.values(t)),t.forEach((function(t){e&&"object"===ht(t)&&(t=t[e]),null==t||isNaN(t)||(n.values.push(t),n.sum+=t,t<n.min&&(n.min=t),t>n.max&&(n.max=t),n.count+=1)})),n.domain=[n.min,n.max],n.limits=function(t,e){return Wn(n,t,e)},n}function Wn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"equal",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7;"array"==ht(t)&&(t=Vn(t));var r=t,a=r.min,i=r.max,o=t.values.sort((function(t,e){return t-e}));if(1===n)return[a,i];var u=[];if("c"===e.substr(0,1)&&(u.push(a),u.push(i)),"e"===e.substr(0,1)){u.push(a);for(var c=1;c<n;c++)u.push(a+c/n*(i-a));u.push(i)}else if("l"===e.substr(0,1)){if(a<=0)throw new Error("Logarithmic scales are only possible for values > 0");var s=Math.LOG10E*Fn(a),l=Math.LOG10E*Fn(i);u.push(a);for(var f=1;f<n;f++)u.push(qn(10,s+f/n*(l-s)));u.push(i)}else if("q"===e.substr(0,1)){u.push(a);for(var h=1;h<n;h++){var d=(o.length-1)*h/n,p=$n(d);if(p===d)u.push(o[p]);else{var v=d-p;u.push(o[p]*(1-v)+o[p+1]*v)}}u.push(i)}else if("k"===e.substr(0,1)){var m,g=o.length,y=new Array(g),b=new Array(n),_=!0,x=0,w=null;(w=[]).push(a);for(var k=1;k<n;k++)w.push(a+k/n*(i-a));for(w.push(i);_;){for(var M=0;M<n;M++)b[M]=0;for(var A=0;A<g;A++)for(var C=o[A],T=Number.MAX_VALUE,S=void 0,N=0;N<n;N++){var O=Un(w[N]-C);O<T&&(T=O,S=N),b[S]++,y[A]=S}for(var I=new Array(n),P=0;P<n;P++)I[P]=null;for(var R=0;R<g;R++)null===I[m=y[R]]?I[m]=o[R]:I[m]+=o[R];for(var j=0;j<n;j++)I[j]*=1/b[j];_=!1;for(var D=0;D<n;D++)if(I[D]!==w[D]){_=!0;break}w=I,++x>200&&(_=!1)}for(var E={},L=0;L<n;L++)E[L]=[];for(var B=0;B<g;B++)E[m=y[B]].push(o[B]);for(var z=[],Q=0;Q<n;Q++)z.push(E[Q][0]),z.push(E[Q][E[Q].length-1]);z=z.sort((function(t,e){return t-e})),u.push(z[0]);for(var G=1;G<z.length;G+=2){var F=z[G];isNaN(F)||-1!==u.indexOf(F)||u.push(F)}}return u}var Hn=Math.sqrt,Zn=Math.pow,Yn=Math.min,Jn=Math.max,Kn=Math.atan2,Xn=Math.abs,tr=Math.cos,er=Math.sin,nr=Math.exp,rr=Math.PI;for(var ar={cool:function(){return In([Ct.hsl(180,1,.9),Ct.hsl(250,.7,.4)])},hot:function(){return In(["#000","#f00","#ff0","#fff"]).mode("rgb")}},ir={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},or=0,ur=Object.keys(ir);or<ur.length;or++){var cr=ur[or];ir[cr.toLowerCase()]=ir[cr]}var sr=ir;Object.assign(Ct,{average:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"lrgb",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=t.length;n||(n=Array.from(new Array(r)).map((function(){return 1})));var a=r/n.reduce((function(t,e){return t+e}));if(n.forEach((function(t,e){n[e]*=a})),t=t.map((function(t){return new Mt(t)})),"lrgb"===e)return Nn(t,n);for(var i=t.shift(),o=i.get(e),u=[],c=0,s=0,l=0;l<o.length;l++)if(o[l]=(o[l]||0)*n[0],u.push(isNaN(o[l])?0:n[0]),"h"===e.charAt(l)&&!isNaN(o[l])){var f=o[l]/180*An;c+=Cn(f)*n[0],s+=Tn(f)*n[0]}var h=i.alpha()*n[0];t.forEach((function(t,r){var a=t.get(e);h+=t.alpha()*n[r+1];for(var i=0;i<o.length;i++)if(!isNaN(a[i]))if(u[i]+=n[r+1],"h"===e.charAt(i)){var l=a[i]/180*An;c+=Cn(l)*n[r+1],s+=Tn(l)*n[r+1]}else o[i]+=a[i]*n[r+1]}));for(var d=0;d<o.length;d++)if("h"===e.charAt(d)){for(var p=Sn(s/u[d],c/u[d])/An*180;p<0;)p+=360;for(;p>=360;)p-=360;o[d]=p}else o[d]=o[d]/u[d];return h/=r,new Mt(o,e).alpha(h>.99999?1:h,!0)},bezier:function(t){var e=function(t){var e,n,r,a;if(2===(t=t.map((function(t){return new Mt(t)}))).length){var i=t.map((function(t){return t.lab()})),o=K(i,2);n=o[0],r=o[1],e=function(t){var e=[0,1,2].map((function(e){return n[e]+t*(r[e]-n[e])}));return new Mt(e,"lab")}}else if(3===t.length){var u=t.map((function(t){return t.lab()})),c=K(u,3);n=c[0],r=c[1],a=c[2],e=function(t){var e=[0,1,2].map((function(e){return(1-t)*(1-t)*n[e]+2*(1-t)*t*r[e]+t*t*a[e]}));return new Mt(e,"lab")}}else if(4===t.length){var s,l=t.map((function(t){return t.lab()})),f=K(l,4);n=f[0],r=f[1],a=f[2],s=f[3],e=function(t){var e=[0,1,2].map((function(e){return(1-t)*(1-t)*(1-t)*n[e]+3*(1-t)*(1-t)*t*r[e]+3*(1-t)*t*t*a[e]+t*t*t*s[e]}));return new Mt(e,"lab")}}else{if(!(t.length>=5))throw new RangeError("No point in running bezier with only one color.");var h,d,p;h=t.map((function(t){return t.lab()})),p=t.length-1,d=function(t){for(var e=[1,1],n=1;n<t;n++){for(var r=[1],a=1;a<=e.length;a++)r[a]=(e[a]||0)+e[a-1];e=r}return e}(p),e=function(t){var e=1-t,n=[0,1,2].map((function(n){return h.reduce((function(r,a,i){return r+d[i]*Math.pow(e,p-i)*Math.pow(t,i)*a[n]}),0)}));return new Mt(n,"lab")}}return e}(t);return e.scale=function(){return In(e)},e},blend:En,cubehelix:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1.5,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[0,1],o=0;"array"===ht(i)?t=i[1]-i[0]:(t=0,i=[i,i]);var u=function(u){var c=yt*((e+120)/360+n*u),s=Ln(i[0]+t*u,a),l=(0!==o?r[0]+u*o:r)*s*(1-s)/2,f=zn(c),h=Bn(c);return Ct(ut([255*(s+l*(-.14861*f+1.78277*h)),255*(s+l*(-.29227*f-.90649*h)),255*(s+l*(1.97294*f)),1]))};return u.start=function(t){return null==t?e:(e=t,u)},u.rotations=function(t){return null==t?n:(n=t,u)},u.gamma=function(t){return null==t?a:(a=t,u)},u.hue=function(t){return null==t?r:("array"===ht(r=t)?0===(o=r[1]-r[0])&&(r=r[1]):o=0,u)},u.lightness=function(e){return null==e?i:("array"===ht(e)?(i=e,t=e[1]-e[0]):(i=[e,e],t=0),u)},u.scale=function(){return Ct.scale(u)},u.hue(r),u},mix:cn,interpolate:cn,random:function(){for(var t="#",e=0;e<6;e++)t+="0123456789abcdef".charAt(Qn(16*Gn()));return new Mt(t,"hex")},scale:In,analyze:Vn,contrast:function(t,e){t=new Mt(t),e=new Mt(e);var n=t.luminance(),r=e.luminance();return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)},deltaE:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,i=function(t){return 360*t/(2*rr)},o=function(t){return 2*rr*t/360};t=new Mt(t),e=new Mt(e);var u=Array.from(t.lab()),c=K(u,3),s=c[0],l=c[1],f=c[2],h=Array.from(e.lab()),d=K(h,3),p=d[0],v=d[1],m=d[2],g=(s+p)/2,y=Hn(Zn(l,2)+Zn(f,2)),b=Hn(Zn(v,2)+Zn(m,2)),_=(y+b)/2,x=.5*(1-Hn(Zn(_,7)/(Zn(_,7)+Zn(25,7)))),w=l*(1+x),k=v*(1+x),M=Hn(Zn(w,2)+Zn(f,2)),A=Hn(Zn(k,2)+Zn(m,2)),C=(M+A)/2,T=i(Kn(f,w)),S=i(Kn(m,k)),N=T>=0?T:T+360,O=S>=0?S:S+360,I=Xn(N-O)>180?(N+O+360)/2:(N+O)/2,P=1-.17*tr(o(I-30))+.24*tr(o(2*I))+.32*tr(o(3*I+6))-.2*tr(o(4*I-63)),R=O-N;R=Xn(R)<=180?R:O<=N?R+360:R-360,R=2*Hn(M*A)*er(o(R)/2);var j=p-s,D=A-M,E=1+.015*Zn(g-50,2)/Hn(20+Zn(g-50,2)),L=1+.045*C,B=1+.015*C*P,z=30*nr(-Zn((I-275)/25,2)),Q=2*Hn(Zn(C,7)/(Zn(C,7)+Zn(25,7))),G=-Q*er(2*o(z)),F=Hn(Zn(j/(n*E),2)+Zn(D/(r*L),2)+Zn(R/(a*B),2)+G*(D/(r*L))*(R/(a*B)));return Jn(0,Yn(100,F))},distance:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"lab";t=new Mt(t),e=new Mt(e);var r=t.get(n),a=e.get(n),i=0;for(var o in r){var u=(r[o]||0)-(a[o]||0);i+=u*u}return Math.sqrt(i)},limits:Wn,valid:function(){try{for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(Mt,e),!0}catch(t){return!1}},scales:ar,input:wt,colors:Be,brewer:sr});var lr=Ct;function fr(t){return"continuous-scale"===t.type}function hr(t){return"matrix"===t.type}function dr(t){var e=t.value;return function(t){return!!lr.valid(t)}(e)?lr(e).hex():""}var pr={lab:{l:[0,100],a:[-86.185,98.254],b:[-107.863,94.482]},lch:{l:[0,100],c:[0,100],h:[0,360]},rgb:{r:[0,255],g:[0,255],b:[0,255]},rgba:{r:[0,255],g:[0,255],b:[0,255],a:[0,1]},hsl:{h:[0,360],s:[0,1],l:[0,1]},hsv:{h:[0,360],s:[0,1],v:[0,1]},hsi:{h:[0,360],s:[0,1],i:[0,1]},cmyk:{c:[0,1],m:[0,1],y:[0,1],k:[0,1]}};var vr=function(t){var e=t.value;return function(t){return!!lr.valid(t)}(e)?lr(e):lr("#000")},mr=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.model,n=vr(t);return n?n[e]():[0,0,0]},gr=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4===t.length?"rgba":"rgb",n={};if(1===t.length)for(var r=X()(t,1),a=r[0],i=0;i<e.length;i+=1)n[e[i]]=a;else for(var o=0;o<e.length;o+=1)n[e[o]]=t[o];return{model:e,value:n}};function yr(t){var e=mr(t,"rgb"),n=X()(e,3),r=n[0],a=n[1],i=n[2];return Math.round(.299*r+.587*a+.114*i)}function br(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return 1===e?{model:"rgb",value:{r:t,g:t,b:t}}:{model:"rgba",value:{r:t,g:t,b:t,a:e}}}function _r(t){if(/^(#|0x)?[0-9a-fA-F]{3}$/.test(t)||/^(#|0x)?[0-9a-fA-F]{6}$/.test(t)){var e=lr(t).rgb();return gr(e,"rgb")}if(/^(#|0x)?[0-9a-fA-F]{4}$/.test(t)||/^(#|0x)?[0-9a-fA-F]{8}$/.test(t)){var n=lr(t).rgba();return gr(n,"rgba")}return{model:"rgb",value:{r:0,g:0,b:0}}}var xr=function(t,e){return t*e/255},wr=function(t,e){return t+e-t*e/255},kr=function(t,e){return t<128?xr(2*t,e):wr(2*t-255,e)},Mr={normal:function(t){return t},darken:function(t,e){return Math.min(t,e)},multiply:xr,colorBurn:function(t,e){return 0===t?0:Math.max(0,255*(1-(255-e)/t))},lighten:function(t,e){return Math.max(t,e)},screen:wr,colorDodge:function(t,e){return 255===t?255:Math.min(255,e/(255-t)*255)},overlay:function(t,e){return kr(e,t)},softLight:function(t,e){return t<128?e-(1-2*t/255)*e*(1-e/255):e+255*(2*t/255-1)*((e<64?e/255*(e/255*(e/255*16-12)+4):Math.sqrt(e/255))-e/255)},hardLight:kr,difference:function(t,e){return Math.abs(t-e)},exclusion:function(t,e){return t+e-2*t*e/255},linearBurn:function(t,e){return Math.max(t+e-255,0)},linearDodge:function(t,e){return Math.min(255,t+e)},linearLight:function(t,e){return Math.max(e+2*t-255,0)},vividLight:function(t,e){return t<128?255*(1-(1-e/255)/(2*t/255)):e/2/(255-t)*255},pinLight:function(t,e){return t<128?Math.min(e,2*t):Math.max(e,2*t-255)}},Ar=function(t){return.3*t[0]+.58*t[1]+.11*t[2]},Cr=function(t,e){var n=e-Ar(t);return function(t){var e=Ar(t),n=Math.min.apply(Math,et()(t)),r=Math.max.apply(Math,et()(t)),a=et()(t);return n<0&&(a=a.map((function(t){return e+(t-e)*e/(e-n)}))),r>255&&(a=a.map((function(t){return e+(t-e)*(255-e)/(r-e)}))),a}(t.map((function(t){return t+n})))},Tr=function(t){return Math.max.apply(Math,et()(t))-Math.min.apply(Math,et()(t))},Sr=function(t,e){var n=t.map((function(t,e){return{value:t,index:e}}));n.sort((function(t,e){return t.value-e.value}));var r=n[0].index,a=n[1].index,i=n[2].index,o=et()(t);return o[i]>o[r]?(o[a]=(o[a]-o[r])*e/(o[i]-o[r]),o[i]=e):(o[a]=0,o[i]=0),o[r]=0,o},Nr={hue:function(t,e){return Cr(Sr(t,Tr(e)),Ar(e))},saturation:function(t,e){return Cr(Sr(e,Tr(t)),Ar(e))},color:function(t,e){return Cr(t,Ar(e))},luminosity:function(t,e){return Cr(e,Ar(t))}},Or=function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"normal",a=mr(t,"rgba"),i=X()(a,4),o=i[0],u=i[1],c=i[2],s=i[3],l=mr(e,"rgba"),f=X()(l,4),h=f[0],d=f[1],p=f[2],v=f[3],m=[o,u,c],g=[h,d,p];if(rt.includes(r)){var y=Mr[r];n=m.map((function(t,e){return Math.floor(y(t,g[e]))}))}else n=Nr[r](m,g);var b=s+v*(1-s),_=Math.round((s*(1-v)*o+s*v*n[0]+(1-s)*v*h)/b),x=Math.round((s*(1-v)*u+s*v*n[1]+(1-s)*v*d)/b),w=Math.round((s*(1-v)*c+s*v*n[2]+(1-s)*v*p)/b);return 1===b?{model:"rgb",value:{r:_,g:x,b:w}}:{model:"rgba",value:{r:_,g:x,b:w,a:b}}},Ir=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=Math.min(t,e),r=Math.max(t,e);return n+Math.random()*(r-n)},Pr=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=Math.ceil(Math.min(t,e)),r=Math.floor(Math.max(t,e));return Math.floor(n+Math.random()*(r-n+1))},Rr=function t(e){if(e&&"object"===L()(e)){if(Array.isArray(e))return e.map((function(e){return t(e)}));var n={};return Object.keys(e).forEach((function(r){n[r]=t(e[r])})),n}return e},jr=function(t,e){var n=(t+e)%360;return n<0?n+=360:n>=360&&(n-=360),n};function Dr(t){return t*(Math.PI/180)}var Er=n(3042),Lr=n.n(Er);var Br=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"normal";if("normal"===e)return f()({},t);var n=dr(t),r=Lr()[e](n);return _r(r)},zr=function(t){var e=yr(t),n=mr(t,"rgba"),r=X()(n,4)[3];return br(e,void 0===r?1:r)};function Qr(t,e){for(var n,r=mr(e,"lab"),a=X()(r,3),i=a[1],o=a[2],u=mr(e,"rgba"),c=X()(u,4)[3],s=void 0===c?1:c,l=100*t,h=Math.round(l),d=yr(gr([h,i,o],"lab")),p=25;Math.round(l)!==Math.round(d/255*100)&&p>0;)l>d/255*100?h+=1:h-=1,p-=1,d=yr(gr([h,i,o],"lab"));if(Math.round(l)<Math.round(d/255*100)&&(h-=1),1===s)n=gr([h,i,o],"lab");else{var v=mr(gr([h,i,o],"lab"),"rgb");n=gr([].concat(et()(v),[s]),"rgba")}return f()(f()({},e),n)}var Gr=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"normal";return"grayscale"===e?zr(t):Br(t,e)},Fr=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[Pr(5,10),Pr(90,95)],r=mr(t,"lab"),a=X()(r,3),i=a[0],o=a[1],u=a[2],c=i<=15?i:n[0],s=i>=85?i:n[1],l=(s-c)/(e-1),f=Math.ceil((i-c)/l);return l=0===f?l:(i-c)/f,new Array(e).fill(0).map((function(t,e){return gr([l*e+c,o,u],"lab")}))},qr=function(t){var e=t.count,n=t.color,r="tint"===t.tendency,a=Fr(n,e);return{name:"monochromatic",semantic:null,type:"discrete-scale",colors:r?a:a.reverse()}},$r={model:"rgb",value:{r:0,g:0,b:0}},Ur={model:"rgb",value:{r:255,g:255,b:255}},Vr=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"lab";return lr.distance(vr(t),vr(e),n)},Wr=function(t,e){var n=Math.atan2(t,e)*(180/Math.PI);return n>=0?n:n+360},Hr=function(t,e){var n,r=mr(t,"lab"),a=X()(r,3),i=a[0],o=a[1],u=a[2],c=mr(e,"lab"),s=X()(c,3),l=s[0],f=s[1],h=s[2],d=(Math.sqrt(Math.pow(o,2)+Math.pow(u,2))+Math.sqrt(Math.pow(f,2)+Math.pow(h,2)))/2,p=.5*(1-Math.sqrt(Math.pow(d,7)/(Math.pow(d,7)+Math.pow(25,7)))),v=(1+p)*o,m=(1+p)*f,g=Math.sqrt(Math.pow(v,2)+Math.pow(u,2)),y=Math.sqrt(Math.pow(m,2)+Math.pow(h,2)),b=Wr(u,v),_=Wr(h,m),x=l-i,w=y-g;n=Math.abs(_-b)<=180?_-b:_-b<-180?_-b+360:_-b-360;var k,M=2*Math.sqrt(g*y)*Math.sin(Dr(n)/2);k=Math.abs(b-_)<=180?(b+_)/2:Math.abs(b-_)>180&&b+_<360?(b+_+360)/2:(b+_-360)/2;var A=(i+l)/2,C=(g+y)/2,T=1-.17*Math.cos(Dr(k-30))+.24*Math.cos(Dr(2*k))+.32*Math.cos(Dr(3*k+6))-.2*Math.cos(Dr(4*k-63)),S=1+.015*Math.pow(A-50,2)/Math.sqrt(20+Math.pow(A-50,2)),N=1+.045*C,O=1+.015*C*T,I=-2*Math.sqrt(Math.pow(C,7)/(Math.pow(C,7)+Math.pow(25,7)))*Math.sin(Dr(60*Math.exp(-Math.pow((k-275)/25,2))));return Math.sqrt(Math.pow(x/(1*S),2)+Math.pow(w/(1*N),2)+Math.pow(M/(1*O),2)+I*(w/(1*N))*(M/(1*O)))},Zr=function(t){var e=t/255;return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)},Yr=function(t){var e=mr(t),n=X()(e,3),r=n[0],a=n[1],i=n[2];return.2126*Zr(r)+.7152*Zr(a)+.0722*Zr(i)},Jr=function(t,e){var n=Yr(t),r=Yr(e);return r>n?(r+.05)/(n+.05):(n+.05)/(r+.05)},Kr=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{measure:"euclidean"},r=n.measure,a=void 0===r?"euclidean":r,i=n.backgroundColor,o=void 0===i?nt:i,u=Or(t,o),c=Or(e,o);switch(a){case"CIEDE2000":return Hr(u,c);case"euclidean":return Vr(u,c,n.colorModel);case"contrastRatio":return Jr(u,c);default:return Vr(u,c)}},Xr=[.8,1.2],ta={rouletteWheel:function(t){for(var e=t.reduce((function(t,e){return t+e})),n=0,r=Ir(e),a=0,i=0;i<t.length;i+=1)r<(a+=t[i])&&(n=+i);return n},tournament:function(t){for(var e=-1,n=0,r=0;r<3;r+=1){var a=Pr(t.length-1);t[a]>n&&(e=r,n=t[a])}return e}},ea=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"tournament";return ta[e](t)},na=function(t,e){for(var n=Rr(t),r=Rr(e),a=1;a<t.length;a+=2)n[a]=e[a],r[a]=t[a];return[n,r]},ra=function(t,e,n,r){var a=Rr(t),i=e[Pr(e.length-1)],o=Pr(t[0].length-1),u=a[i][o]*Ir.apply(void 0,Xr),c=[15,240];"grayscale"!==n&&(c=pr[r][r.split("")[o]]);var s=c,l=X()(s,2),f=l[0],h=l[1];return u<f?u=f:u>h&&(u=h),a[i][o]=u,a},aa=function(t,e,n,r,a,i){var o;o="grayscale"===n?t.map((function(t){return br(X()(t,1)[0])})):t.map((function(t){return Gr(gr(t,r),n)}));for(var u=1/0,c=0;c<o.length;c+=1)for(var s=c+1;s<o.length;s+=1)e[c]&&e[s]||(u=Math.min(u,Kr(o[c],o[s],{measure:a,backgroundColor:i})));return u},ia=function(t,e,n,r,a,i,o){if(Math.round(aa(t,e,n,a,i,o))>r)return t;for(var u=new Array(t.length).fill(0).map((function(t,e){return e})).filter((function(t,n){return!e[n]})),c=new Array(50).fill(0).map((function(){return ra(t,u,n,a)})),s=c.map((function(t){return aa(t,e,n,a,i,o)})),l=Math.max.apply(Math,et()(s)),f=c[s.findIndex((function(t){return t===l}))],h=1,d=function(){for(var t=[f],r=1;r<50;r+=2){var d=c[ea(s)],p=c[ea(s)],v=Ir()<.9?na(d,p):[d,p];v=v.map((function(t){return Ir()<.1?ra(t,u,n,a):t})),t.push.apply(t,et()(v))}s=(c=t).map((function(t){return aa(t,e,n,a,i,o)}));var m=Math.max.apply(Math,et()(s));l=m,f=c[s.findIndex((function(t){return t===m}))],h+=1};h<100&&Math.round(l)<r;)d();return f},oa={euclidean:30,CIEDE2000:20,contrastRatio:4.5},ua={euclidean:291.48,CIEDE2000:100,contrastRatio:21},ca=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.locked,r=void 0===n?[]:n,a=e.simulationType,i=void 0===a?"normal":a,o=e.threshold,u=e.colorModel,c=void 0===u?"hsv":u,s=e.colorDifferenceMeasure,l=void 0===s?"euclidean":s,f=e.backgroundColor,h=void 0===f?nt:f,d=o;if(d||(d=oa[l]),"grayscale"===i){var p=ua[l];d=Math.min(d,p/t.colors.length)}var v=Rr(t);if(!hr(v)&&!fr(v))if("grayscale"===i){var m=v.colors.map((function(t){return[yr(t)]})),g=ia(m,r,i,d,c,l,h);v.colors.forEach((function(t,e){return Object.assign(t,Qr(g[e][0]/255,t))}))}else{var y=v.colors.map((function(t){return mr(t,c)})),b=ia(y,r,i,d,c,l,h);v.colors.forEach((function(t,e){Object.assign(t,gr(b[e],c))}))}return v},sa=[.3,.9],la=[.5,1],fa=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=mr(t,"hsv"),i=X()(a,1),o=i[0],u=new Array(n).fill(!1),c=-1===r.findIndex((function(e){return e&&e.model===t.model&&e.value===t.value})),s=new Array(n).fill(0).map((function(n,a){var i=r[a];return i?(u[a]=!0,i):c?(c=!1,u[a]=!0,t):gr([jr(o,e*a),Ir.apply(void 0,sa),Ir.apply(void 0,la)],"hsv")}));return{newColors:s,locked:u}};function ha(){var t=Pr(255),e=Pr(255),n=Pr(255);return gr([t,e,n],"rgb")}var da=function(t){var e=t.count,n=t.colors,r=[],a={name:"random",semantic:null,type:"categorical",colors:new Array(e).fill(0).map((function(t,e){var a=n[e];return a?(r[e]=!0,a):ha()}))};return ca(a,{locked:r})},pa=["monochromatic"],va=function(t,e){var n=e.count,r=void 0===n?8:n,a=e.tendency,i=void 0===a?"tint":a,o=e.colors,u=void 0===o?[]:o,c=e.color;return c||(c=u.find((function(t){return!!t&&!!t.model&&!!t.value}))||ha()),pa.includes(t)&&(u=[]),{color:c,colors:u,count:r,tendency:i}},ma={monochromatic:qr,analogous:function(t){var e=t.count,n=t.color,r="tint"===t.tendency,a=mr(n,"hsv"),i=X()(a,3),o=i[0],u=i[1],c=i[2],s=Math.floor(e/2),l=60/(e-1);o>=60&&o<=240&&(l=-l);var f=(u-.1)/3/(e-s-1),h=(c-.4)/3/s,d=new Array(e).fill(0).map((function(t,e){var n=jr(o,l*(e-s)),r=e<=s?Math.min(u+f*(s-e),1):u+3*f*(s-e),a=e<=s?c-3*h*(s-e):Math.min(c-h*(s-e),1);return gr([n,r,a],"hsv")}));return{name:"analogous",semantic:null,type:"discrete-scale",colors:r?d:d.reverse()}},achromatic:function(t){var e=t.tendency,n=f()(f()({},t),{},{color:"tint"===e?$r:Ur}),r=qr(n);return f()(f()({},r),{},{name:"achromatic"})},complementary:function(t){var e,n=t.count,r=t.color,a=mr(r,"hsv"),i=X()(a,3),o=i[0],u=i[1],c=i[2],s=gr([jr(o,180),u,c],"hsv"),l=Pr(80,90),f=Pr(15,25),h=Math.floor(n/2),d=Fr(r,h,[f,l]),p=Fr(s,h,[f,l]).reverse();if(n%2==1){var v=gr([(jr(o,180)+o)/2,Ir(.05,.1),Ir(.9,.95)],"hsv");e=[].concat(et()(d),[v],et()(p))}else e=[].concat(et()(d),et()(p));return{name:"complementary",semantic:null,type:"discrete-scale",colors:e}},"split-complementary":function(t){var e=t.count,n=t.color,r=t.colors,a=fa(n,180,e,r),i=a.newColors,o=a.locked;return ca({name:"tetradic",semantic:null,type:"categorical",colors:i},{locked:o})},triadic:function(t){var e=t.count,n=t.color,r=t.colors,a=fa(n,120,e,r),i=a.newColors,o=a.locked;return ca({name:"tetradic",semantic:null,type:"categorical",colors:i},{locked:o})},tetradic:function(t){var e=t.count,n=t.color,r=t.colors,a=fa(n,90,e,r),i=a.newColors,o=a.locked;return ca({name:"tetradic",semantic:null,type:"categorical",colors:i},{locked:o})},polychromatic:function(t){var e=t.count,n=t.color,r=t.colors,a=fa(n,360/e,e,r),i=a.newColors,o=a.locked;return ca({name:"tetradic",semantic:null,type:"categorical",colors:i},{locked:o})},customized:da},ga=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"monochromatic",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=va(t,e);try{return ma[t](n)}catch(t){return da(n)}};n(9558),n(9989),n(6646);var ya={}.toString,ba=function(t,e){return ya.call(t)==="[object ".concat(e,"]")},_a=function(t){if(!function(t){return"object"===L()(t)&&null!==t}(t)||!ba(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e};function xa(t,e,n,r){var a=n||0,i=r||5,o=t;Object.keys(e).forEach((function(t){if(Object.prototype.hasOwnProperty.call(e,t)){var n=e[t];null!==n&&_a(n)?(_a(o[t])||(o[t]={}),a<i?xa(o[t],n,a+1,i):o[t]=e[t]):!function(t){return Array.isArray?Array.isArray(t):ba(t,"Array")}(n)?void 0!==n&&(o[t]=n):(o[t]=[],o[t]=o[t].concat(n))}}))}var wa=function(t){for(var e=0;e<(arguments.length<=1?0:arguments.length-1);e+=1)xa(t,e+1<1||arguments.length<=e+1?void 0:arguments[e+1]);return t},ka=n(3708),Ma=n(1438),Aa=n(2616),Ca=function(t){return null===t},Ta=function(t,e){return Ca(t.distinct)||Ca(e.distinct)?t.distinct<e.distinct?1:t.distinct>e.distinct?-1:0:0};function Sa(t){return[t.find((function(t){return h(t.levelOfMeasurements,["Nominal"])})),t.find((function(t){return h(t.levelOfMeasurements,["Interval"])}))]}function Na(t){return[t.find((function(t){return y(t.levelOfMeasurements,["Time","Ordinal"])})),t.find((function(t){return h(t.levelOfMeasurements,["Interval"])})),t.find((function(t){return h(t.levelOfMeasurements,["Nominal"])}))]}function Oa(t){var e=t.find((function(t){return y(t.levelOfMeasurements,["Time","Ordinal"])})),n=t.find((function(t){return h(t.levelOfMeasurements,["Nominal"])}));return[e,t.find((function(t){return h(t.levelOfMeasurements,["Interval"])})),n]}function Ia(t){var e=t.filter((function(t){return h(t.levelOfMeasurements,["Nominal"])})).sort(Ta),n=e[0],r=e[1];return[t.find((function(t){return h(t.levelOfMeasurements,["Interval"])})),n,r]}function Pa(t){var e,n,r,a,i=t.filter((function(t){return h(t.levelOfMeasurements,["Nominal"])})).sort(Ta);if((0,Ma.Js)(null===(e=i[1])||void 0===e?void 0:e.rawData,null===(n=i[0])||void 0===n?void 0:n.rawData)){var o=X()(i,2);a=o[0],r=o[1]}else{var u=X()(i,2);r=u[0],a=u[1]}return[r,t.find((function(t){return h(t.levelOfMeasurements,["Interval"])})),a]}function Ra(t,e,n,r){if(!ka.Sx.includes(t)&&r)return r.toSpec?r.toSpec(e,n):null;switch(t){case"pie_chart":return function(t,e){var n=Sa(e),r=X()(n,2),a=r[0],i=r[1];return i&&a?{type:"interval",data:t,encode:{color:a.name,y:i.name},transform:[{type:"stackY"}],coordinate:{type:"theta"}}:null}(e,n);case"donut_chart":return function(t,e){var n=Sa(e),r=X()(n,2),a=r[0],i=r[1];return i&&a?{type:"interval",data:t,encode:{color:a.name,y:i.name},transform:[{type:"stackY"}],coordinate:{type:"theta",innerRadius:.6}}:null}(e,n);case"line_chart":return function(t,e){var n=Na(e),r=X()(n,3),a=r[0],i=r[1],o=r[2];if(!a||!i)return null;var u={type:"line",data:t,encode:{x:a.name,y:i.name}};return o&&(u.encode.color=o.name),u}(e,n);case"step_line_chart":return function(t,e){var n=Na(e),r=X()(n,3),a=r[0],i=r[1],o=r[2];if(!a||!i)return null;var u={type:"line",data:t,encode:{x:a.name,y:i.name,shape:"hvh"}};return o&&(u.encode.color=o.name),u}(e,n);case"area_chart":return function(t,e){var n=e.find((function(t){return y(t.levelOfMeasurements,["Time","Ordinal"])})),r=e.find((function(t){return h(t.levelOfMeasurements,["Interval"])}));return n&&r?{type:"area",data:t,encode:{x:n.name,y:r.name}}:null}(e,n);case"stacked_area_chart":return function(t,e){var n=Oa(e),r=X()(n,3),a=r[0],i=r[1],o=r[2];return a&&i&&o?{type:"area",data:t,encode:{x:a.name,y:i.name,color:o.name},transform:[{type:"stackY"}]}:null}(e,n);case"percent_stacked_area_chart":return function(t,e){var n=Oa(e),r=X()(n,3),a=r[0],i=r[1],o=r[2];return a&&i&&o?{type:"area",data:t,encode:{x:a.name,y:i.name,color:o.name},transform:[{type:"stackY"},{type:"normalizeY"}]}:null}(e,n);case"bar_chart":return function(t,e){var n=Ia(e),r=X()(n,3),a=r[0],i=r[1],o=r[2];if(!a||!i)return null;var u={type:"interval",data:t,encode:{x:i.name,y:a.name},coordinate:{transform:[{type:"transpose"}]}};return o&&(u.encode.color=o.name,u.transform=[{type:"stackY"}]),u}(e,n);case"grouped_bar_chart":return function(t,e){var n=Ia(e),r=X()(n,3),a=r[0],i=r[1],o=r[2];return a&&i&&o?{type:"interval",data:t,encode:{x:i.name,y:a.name,color:o.name},transform:[{type:"dodgeX"}],coordinate:{transform:[{type:"transpose"}]}}:null}(e,n);case"stacked_bar_chart":return function(t,e){var n=Ia(e),r=X()(n,3),a=r[0],i=r[1],o=r[2];return a&&i&&o?{type:"interval",data:t,encode:{x:i.name,y:a.name,color:o.name},transform:[{type:"stackY"}],coordinate:{transform:[{type:"transpose"}]}}:null}(e,n);case"percent_stacked_bar_chart":return function(t,e){var n=Ia(e),r=X()(n,3),a=r[0],i=r[1],o=r[2];return a&&i&&o?{type:"interval",data:t,encode:{x:i.name,y:a.name,color:o.name},transform:[{type:"stackY"},{type:"normalizeY"}],coordinate:{transform:[{type:"transpose"}]}}:null}(e,n);case"column_chart":return function(t,e){var n=e.filter((function(t){return h(t.levelOfMeasurements,["Nominal"])})).sort(Ta),r=n[0],a=n[1],i=e.find((function(t){return h(t.levelOfMeasurements,["Interval"])}));if(!r||!i)return null;var o={type:"interval",data:t,encode:{x:r.name,y:i.name}};return a&&(o.encode.color=a.name,o.transform=[{type:"stackY"}]),o}(e,n);case"grouped_column_chart":return function(t,e){var n=Pa(e),r=X()(n,3),a=r[0],i=r[1],o=r[2];return a&&i&&o?{type:"interval",data:t,encode:{x:a.name,y:i.name,color:o.name},transform:[{type:"dodgeX"}]}:null}(e,n);case"stacked_column_chart":return function(t,e){var n=Pa(e),r=X()(n,3),a=r[0],i=r[1],o=r[2];return a&&i&&o?{type:"interval",data:t,encode:{x:a.name,y:i.name,color:o.name},transform:[{type:"stackY"}]}:null}(e,n);case"percent_stacked_column_chart":return function(t,e){var n=Pa(e),r=X()(n,3),a=r[0],i=r[1],o=r[2];return a&&i&&o?{type:"interval",data:t,encode:{x:a.name,y:i.name,color:o.name},transform:[{type:"stackY"},{type:"normalizeY"}]}:null}(e,n);case"scatter_plot":return function(t,e){var n=e.filter((function(t){return h(t.levelOfMeasurements,["Interval"])})).sort(Ta),r=n[0],a=n[1],i=e.find((function(t){return h(t.levelOfMeasurements,["Nominal"])}));if(!r||!a)return null;var o={type:"point",data:t,encode:{x:r.name,y:a.name}};return i&&(o.encode.color=i.name),o}(e,n);case"bubble_chart":return function(t,e){for(var n=e.filter((function(t){return h(t.levelOfMeasurements,["Interval"])})),r={x:n[0],y:n[1],corr:0,size:n[2]},a=function(t){for(var e=function(e){var a=(0,Aa.Vs)(n[t].rawData,n[e].rawData);Math.abs(a)>r.corr&&(r.x=n[t],r.y=n[e],r.corr=a,r.size=n[et()(Array(n.length).keys()).find((function(n){return n!==t&&n!==e}))||0])},a=t+1;a<n.length;a+=1)e(a)},i=0;i<n.length;i+=1)a(i);var o=r.x,u=r.y,c=r.size,s=e.find((function(t){return y(t.levelOfMeasurements,["Nominal"])}));if(!o||!u||!c)return null;var l={type:"point",data:t,encode:{x:o.name,y:u.name,size:c.name}};return s&&(l.encode.color=s.name),l}(e,n);case"histogram":return function(t,e){var n=e.find((function(t){return h(t.levelOfMeasurements,["Interval"])}));return n?{type:"rect",data:t,encode:{x:n.name},transform:[{type:"binX",y:"count"}]}:null}(e,n);case"heatmap":return function(t,e){var n=e.filter((function(t){return y(t.levelOfMeasurements,["Nominal","Ordinal"])})).sort(Ta),r=n[0],a=n[1],i=e.find((function(t){return h(t.levelOfMeasurements,["Interval"])}));return r&&a&&i?{type:"cell",data:t,encode:{x:r.name,y:a.name,color:i.name}}:null}(e,n);default:return null}}var ja=["monochromatic","analogous"],Da=["polychromatic","split-complementary","triadic","tetradic"];function Ea(t,e,n,r,a,i,o){var u=void 0!==(null==i?void 0:i.refine)&&i.refine,c=a,s=null==i?void 0:i.theme,l=void 0===(null==i?void 0:i.requireSpec)||i.requireSpec,f=n,h=Object.keys(f),d=[],p=h.map((function(a){var l=function(t,e,n,r,a){var i=[],o={dataProps:n,chartType:t,purpose:a?a.purpose:"",preferences:a?a.preferences:void 0},u=x(t,e,r,"HARD",o,i);return 0===u?{chartType:t,score:0,log:i}:{chartType:t,score:u*x(t,e,r,"SOFT",o,i),log:i}}(a,f,e,r,i);d.push(l);var h=l.score;if(h<=0)return{type:a,spec:null,score:h};var p=Ra(a,t,e,n[a]);if(!["kpi_panel","table"].includes(a)&&!p)return{type:a,spec:null,score:h};if(p&&u){var v=function(t,e,n,r){return Object.values(n).filter((function(r){var a;return"DESIGN"===r.type&&r.trigger({dataProps:e,chartType:t})&&!(null!==(a=n[r.id].option)&&void 0!==a&&a.off)})).reduce((function(t,n){var a=n.optimizer(e,r);return wa(t,a)}),{})}(a,e,r,p);wa(p,v)}if(p)if(s&&!c){var m=function(t,e,n){var r=q(e),a=n.primaryColor,i=r.encode;if(a&&i){var o=_r(a);if(i.color){var u,c,s=i.color,l=s.type,f=s.field;c="quantitative"===l?ja[Math.floor(Math.random()*ja.length)]:Da[Math.floor(Math.random()*Da.length)];var h=null===(u=t.find((function(t){return t.name===f})))||void 0===u?void 0:u.count;return{scale:{color:{range:ga(c,{color:o,count:h}).colors.map((function(t){return dr(t)}))}}}}return"line"===e.type?{style:{stroke:dr(o)}}:{style:{fill:dr(o)}}}return{}}(e,p,s);wa(p,m)}else if(c){var g,y=null!==(g=null==o?void 0:o.themeColor)&&void 0!==g?g:"#678ef2",b=null==o?void 0:o.colorSchemeType,_=null==o?void 0:o.simulationType,w=function(t,e,n,r,a){var i=q(e).encode;if(n&&i){var o=_r(n);if(i.color){var u,c=i.color,s=c.type,l=c.field,f=r;f||(f="quantitative"===s?"monochromatic":"polychromatic");var h=null===(u=t.find((function(t){return t.name===l})))||void 0===u?void 0:u.count;return{scale:{color:{range:ga(f,{color:o,count:h}).colors.map((function(t){return dr(a?Gr(t,a):t)}))}}}}return"line"===e.type?{style:{stroke:dr(o)}}:{style:{fill:dr(o)}}}return{}}(e,p,y,b,_);wa(p,w)}return{type:a,spec:p,score:h}}));return{advices:p.filter((function(t){return t.score>0&&(!l||t.spec)})).sort((function(t,e){return t.score<e.score?1:t.score>e.score?-1:0})),log:d}}function La(t,e,n){var r=t.data,a=t.dataProps,i=t.smartColor,o=t.options,u=t.colorOptions,c=t.fields;try{var s=J(r),l=function(t,e,n){var r=(e?new Y.Z(t,{columns:e}):new Y.Z(t)).info();return n?r.map((function(t){var e=n.find((function(e){return e.name===t.name}));return f()(f()({},t),e)})):r}(s,c,a);return Ea(c?s.map((function(t){var e=t;return Object.keys(e).forEach((function(t){c.includes(t)||delete e[t]})),t})):s,l,e,n,i,o,u)}catch(t){return console.error("error: ",t),{advices:[],log:[]}}}function Ba(t,e,n,r,a,i,o){Object.values(t).filter((function(t){var r,a=t.option||{},o=a.weight,u=a.extra;return function(t){return"DESIGN"===e?"DESIGN"===t:"DESIGN"!==t}(t.type)&&!(null!==(r=t.option)&&void 0!==r&&r.off)&&t.trigger(f()(f()(f()({},n),{},{weight:o},u),{},{chartWIKI:i}))})).forEach((function(t){var u,c=t.type,s=t.id,l=t.docs;if("DESIGN"===e){var h=t.optimizer(n.dataProps,o);u=0===Object.keys(h).length?1:0,a.push({type:c,id:s,score:u,fix:h,docs:l})}else{var d=t.option||{},p=d.weight,v=d.extra;u=t.validator(f()(f()(f()({},n),{},{weight:p},v),{},{chartWIKI:i})),a.push({type:c,id:s,score:u,docs:l})}r.push({phase:"LINT",ruleId:s,score:u,base:u,weight:1,ruleType:c})}))}function za(t,e,n){var r=t.spec,a=t.options,i=t.dataProps,o=null==a?void 0:a.purpose,u=null==a?void 0:a.preferences,c=function(t){var e,n=t;switch(n.type){case"area":e=function(t){var e=t.transform,n=null==e?void 0:e.some((function(t){return"stackY"===t.type})),r=null==e?void 0:e.some((function(t){return"normalizeY"===t.type}));return n?r?"percent_stacked_area_chart":"stacked_area_chart":"area_chart"}(n);break;case"interval":e=function(t){var e,n=t.coordinate;if("theta"===(null==n?void 0:n.type))return null!=n&&n.innerRadius?"donut_chart":"pie_chart";var r=t.transform,a=null==n||null===(e=n.transform)||void 0===e?void 0:e.some((function(t){return"transpose"===t.type})),i=null==r?void 0:r.some((function(t){return"normalizeY"===t.type})),o=null==r?void 0:r.some((function(t){return"stackY"===t.type})),u=null==r?void 0:r.some((function(t){return"dodgeX"===t.type}));return a?u?"grouped_bar_chart":i?"stacked_bar_chart":o?"percent_stacked_bar_chart":"bar_chart":u?"grouped_column_chart":i?"stacked_column_chart":o?"percent_stacked_column_chart":"column_chart"}(n);break;case"line":e=function(t){var e=t.encode;return e.shape&&"hvh"===e.shape?"step_line_chart":"line_chart"}(n);break;case"point":e=function(t){return t.encode.size?"bubble_chart":"scatter_plot"}(n);break;case"rect":e="histogram";break;case"cell":e="heatmap";break;default:e=""}return e}(r),s=[],l=[];if(!r||!c)return{lints:s,log:l};if(!i||!i.length)try{i=new Y.Z(r.data).info()}catch(t){return console.error("error: ",t),{lints:s,log:l}}var f={dataProps:i,chartType:c,purpose:o,preferences:u};return Ba(e,"notDESIGN",f,l,s,n),Ba(e,"DESIGN",f,l,s,n,r),{lints:s=s.filter((function(t){return t.score<1})),log:l}}var Qa=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a()(this,t),c()(this,"ckb",void 0),c()(this,"ruleBase",void 0),this.ckb=(0,s.n)(e.ckbCfg),this.ruleBase=Z(e.ruleCfg)}return o()(t,[{key:"advise",value:function(t){return La(t,this.ckb,this.ruleBase).advices}},{key:"adviseWithLog",value:function(t){return La(t,this.ckb,this.ruleBase)}},{key:"lint",value:function(t){return za(t,this.ruleBase,this.ckb).lints}},{key:"lintWithLog",value:function(t){return za(t,this.ruleBase,this.ckb)}}]),t}()},9105:function(t,e,n){"use strict";n.d(e,{n:function(){return u}});var r=n(1448),a=n.n(r),i={line_chart:{id:"line_chart",name:"Line Chart",alias:["Lines"],family:["LineCharts"],def:"A line chart uses lines with segments to show changes in data in a ordinal dimension.",purpose:["Comparison","Trend","Anomaly"],coord:["Cartesian2D"],category:["Statistic"],shape:["Lines"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Time","Ordinal"]},{minQty:0,maxQty:1,fieldConditions:["Nominal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Position","Direction"],recRate:"Recommended"},step_line_chart:{id:"step_line_chart",name:"Step Line Chart",alias:["Step Lines"],family:["LineCharts"],def:"A step line chart is a line chart in which points of each line are connected by horizontal and vertical line segments, looking like steps of a staircase.",purpose:["Comparison","Trend"],coord:["Cartesian2D"],category:["Statistic"],shape:["Lines"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Time","Ordinal"]},{minQty:0,maxQty:1,fieldConditions:["Nominal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Position","Direction"],recRate:"Recommended"},area_chart:{id:"area_chart",name:"Area Chart",alias:[],family:["AreaCharts"],def:"An area chart uses series of line segments with overlapped areas to show the change in data in a ordinal dimension.",purpose:["Comparison","Trend","Anomaly"],coord:["Cartesian2D"],category:["Statistic"],shape:["Area"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Time","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]},{minQty:0,maxQty:1,fieldConditions:["Nominal"]}],channel:["Color","Position"],recRate:"Recommended"},stacked_area_chart:{id:"stacked_area_chart",name:"Stacked Area Chart",alias:[],family:["AreaCharts"],def:"A stacked area chart uses layered line segments with different styles of padding regions to display how multiple sets of data change in the same ordinal dimension, and the endpoint heights of the segments on the same dimension tick are accumulated by value.",purpose:["Composition","Trend"],coord:["Cartesian2D"],category:["Statistic"],shape:["Area"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Time","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]},{minQty:1,maxQty:1,fieldConditions:["Nominal"]}],channel:["Color","Length"],recRate:"Recommended"},percent_stacked_area_chart:{id:"percent_stacked_area_chart",name:"Percent Stacked Area Chart",alias:["Percent Stacked Area","% Stacked Area","100% Stacked Area"],family:["AreaCharts"],def:"A percent stacked area chart is an extented stacked area chart in which the height of the endpoints of the line segment on the same dimension tick is the accumulated proportion of the ratio, which is 100% of the total.",purpose:["Comparison","Composition","Proportion","Trend"],coord:["Cartesian2D"],category:["Statistic"],shape:["Area"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Time","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]},{minQty:1,maxQty:1,fieldConditions:["Nominal"]}],channel:["Color","Length"],recRate:"Recommended"},column_chart:{id:"column_chart",name:"Column Chart",alias:["Columns"],family:["ColumnCharts"],def:"A column chart uses series of columns to display the value of the dimension. The horizontal axis shows the classification dimension and the vertical axis shows the corresponding value.",purpose:["Comparison","Distribution","Rank"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:1,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Position","Color"],recRate:"Recommended"},grouped_column_chart:{id:"grouped_column_chart",name:"Grouped Column Chart",alias:["Grouped Column"],family:["ColumnCharts"],def:"A grouped column chart uses columns of different colors to form a group to display the values of dimensions. The horizontal axis indicates the grouping of categories, the color indicates the categories, and the vertical axis shows the corresponding value.",purpose:["Comparison","Distribution","Rank"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Position"],recRate:"Recommended"},stacked_column_chart:{id:"stacked_column_chart",name:"Stacked Column Chart",alias:["Stacked Column"],family:["ColumnCharts"],def:"A stacked column chart uses stacked bars of different colors to display the values for each dimension. The horizontal axis indicates the first classification dimension, the color indicates the second classification dimension, and the vertical axis shows the corresponding value.",purpose:["Comparison","Composition","Distribution","Rank"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Length","Position"],recRate:"Recommended"},percent_stacked_column_chart:{id:"percent_stacked_column_chart",name:"Percent Stacked Column Chart",alias:["Percent Stacked Column","% Stacked Column","100% Stacked Column"],family:["ColumnCharts"],def:"A percent stacked column chart uses stacked bars of different colors to display the values for each dimension. The horizontal axis indicates the first classification dimension, the color indicates the second classification dimension, and the vertical axis shows the percentage of the corresponding classification.",purpose:["Comparison","Composition","Distribution","Proportion"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Length"],recRate:"Recommended"},range_column_chart:{id:"range_column_chart",name:"Range Column Chart",alias:[],family:["ColumnCharts"],def:"A column chart that does not have to start from zero axis.",purpose:["Comparison"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Interval","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Nominal"]}],channel:["Length"],recRate:"Recommended"},waterfall_chart:{id:"waterfall_chart",name:"Waterfall Chart",alias:["Flying Bricks Chart","Mario Chart","Bridge Chart","Cascade Chart"],family:["ColumnCharts"],def:"A waterfall chart is used to portray how an initial value is affected by a series of intermediate positive or negative values",purpose:["Comparison","Trend"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Ordinal","Time","Nominal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Length","Position"],recRate:"Recommended"},histogram:{id:"histogram",name:"Histogram",alias:[],family:["ColumnCharts"],def:"A histogram is an accurate representation of the distribution of numerical data.",purpose:["Distribution"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Position"],recRate:"Recommended"},bar_chart:{id:"bar_chart",name:"Bar Chart",alias:["Bars"],family:["BarCharts"],def:"A bar chart uses series of bars to display the value of the dimension. The vertical axis shows the classification dimension and the horizontal axis shows the corresponding value.",purpose:["Comparison","Distribution","Rank"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:1,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Position","Color"],recRate:"Recommended"},stacked_bar_chart:{id:"stacked_bar_chart",name:"Stacked Bar Chart",alias:["Stacked Bar"],family:["BarCharts"],def:"A stacked bar chart uses stacked bars of different colors to display the values for each dimension. The vertical axis indicates the first classification dimension, the color indicates the second classification dimension, and the horizontal axis shows the corresponding value.",purpose:["Comparison","Composition","Distribution","Rank"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Length","Position"],recRate:"Recommended"},percent_stacked_bar_chart:{id:"percent_stacked_bar_chart",name:"Percent Stacked Bar Chart",alias:["Percent Stacked Bar","% Stacked Bar","100% Stacked Bar"],family:["BarCharts"],def:"A percent stacked column chart uses stacked bars of different colors to display the values for each dimension. The vertical axis indicates the first classification dimension, the color indicates the second classification dimension, and the horizontal axis shows the percentage of the corresponding classification.",purpose:["Comparison","Composition","Distribution","Proportion"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Length"],recRate:"Recommended"},grouped_bar_chart:{id:"grouped_bar_chart",name:"Grouped Bar Chart",alias:["Grouped Bar"],family:["BarCharts"],def:"A grouped bar chart uses bars of different colors to form a group to display the values of the dimensions. The vertical axis indicates the grouping of categories, the color indicates the categories, and the horizontal axis shows the corresponding value.",purpose:["Comparison","Distribution","Rank"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Position"],recRate:"Recommended"},range_bar_chart:{id:"range_bar_chart",name:"Range Bar Chart",alias:[],family:["BarCharts"],def:"A bar chart that does not have to start from zero axis.",purpose:["Comparison"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Interval"]},{minQty:1,maxQty:1,fieldConditions:["Nominal","Ordinal"]}],channel:["Length"],recRate:"Recommended"},radial_bar_chart:{id:"radial_bar_chart",name:"Radial Bar Chart",alias:["Radial Column Chart"],family:["BarCharts"],def:"A bar chart that is plotted in the polar coordinate system. The axis along radius shows the classification dimension and the angle shows the corresponding value.",purpose:["Comparison","Distribution","Rank"],coord:["Polar"],category:["Statistic"],shape:["Round"],dataPres:[{minQty:1,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Angle","Color"],recRate:"Recommended"},bullet_chart:{id:"bullet_chart",name:"Bullet Chart",alias:[],family:["BarCharts"],def:"A bullet graph is a variation of a bar graph developed by Stephen Few. Seemingly inspired by the traditional thermometer charts and progress bars found in many dashboards, the bullet graph serves as a replacement for dashboard gauges and meters.",purpose:["Proportion"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:3,maxQty:3,fieldConditions:["Interval"]},{minQty:1,maxQty:1,fieldConditions:["Nominal","Ordinal"]}],channel:["Position","Color"],recRate:"Recommended"},pie_chart:{id:"pie_chart",name:"Pie Chart",alias:["Circle Chart","Pie"],family:["PieCharts"],def:"A pie chart is a chart that the classification and proportion of data are represented by the color and arc length (angle, area) of the sector.",purpose:["Comparison","Composition","Proportion"],coord:["Polar"],category:["Statistic"],shape:["Round"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Angle","Area","Color"],recRate:"Use with Caution"},donut_chart:{id:"donut_chart",name:"Donut Chart",alias:["Donut","Doughnut","Doughnut Chart","Ring Chart"],family:["PieCharts"],def:"A donut chart is a variation on a Pie chart except it has a round hole in the center which makes it look like a donut.",purpose:["Comparison","Composition","Proportion"],coord:["Polar"],category:["Statistic"],shape:["Round"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["ArcLength"],recRate:"Recommended"},nested_pie_chart:{id:"nested_pie_chart",name:"Nested Pie Chart",alias:["Nested Circle Chart","Nested Pie","Nested Donut Chart"],family:["PieCharts"],def:"A nested pie chart is a chart that contains several donut charts, where all the donut charts share the same center in position.",purpose:["Comparison","Composition","Proportion"],coord:["Polar"],category:["Statistic"],shape:["Round"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:"*",fieldConditions:["Interval"]}],channel:["Angle","Area","Color","Position"],recRate:"Use with Caution"},rose_chart:{id:"rose_chart",name:"Rose Chart",alias:["Nightingale Chart","Polar Area Chart","Coxcomb Chart"],family:["PieCharts"],def:"Nightingale Rose Chart is a peculiar combination of the Radar Chart and Stacked Column Chart types of data visualization.",purpose:["Comparison","Composition","Proportion"],coord:["Polar"],category:["Statistic"],shape:["Round"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Angle","Color","Length"],recRate:"Use with Caution"},scatter_plot:{id:"scatter_plot",name:"Scatter Plot",alias:["Scatter Chart","Scatterplot"],family:["ScatterCharts"],def:"A scatter plot is a type of plot or mathematical diagram using Cartesian coordinates to display values for typically two variables for series of data.",purpose:["Comparison","Distribution","Anomaly"],coord:["Cartesian2D"],category:["Statistic"],shape:["Scatter"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Interval"]},{minQty:0,maxQty:1,fieldConditions:["Nominal"]}],channel:["Color","Position"],recRate:"Recommended"},bubble_chart:{id:"bubble_chart",name:"Bubble Chart",alias:["Bubble Chart"],family:["ScatterCharts"],def:"A bubble chart is a type of chart that displays four dimensions of data with x, y positions, circle size and circle color.",purpose:["Comparison","Distribution"],coord:["Cartesian2D"],category:["Statistic"],shape:["Scatter"],dataPres:[{minQty:3,maxQty:3,fieldConditions:["Interval"]},{minQty:0,maxQty:1,fieldConditions:["Nominal"]}],channel:["Color","Position","Size"],recRate:"Recommended"},non_ribbon_chord_diagram:{id:"non_ribbon_chord_diagram",name:"Non-Ribbon Chord Diagram",alias:[],family:["GeneralGraph"],def:"A stripped-down version of a Chord Diagram, with only the connection lines showing. This provides more emphasis on the connections within the data.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},arc_diagram:{id:"arc_diagram",name:"Arc Diagram",alias:[],family:["GeneralGraph"],def:"A graph where the edges are represented as arcs.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},chord_diagram:{id:"chord_diagram",name:"Chord Diagram",alias:[],family:["GeneralGraph"],def:"A graphical method of displaying the inter-relationships between data in a matrix. The data are arranged radially around a circle with the relationships between the data points typically drawn as arcs connecting the data.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},treemap:{id:"treemap",name:"Treemap",alias:[],family:["TreeGraph"],def:"A visual representation of a data tree with nodes. Each node is displayed as a rectangle, sized and colored according to values that you assign.",purpose:["Composition","Comparison","Hierarchy"],coord:["Cartesian2D"],category:["Statistic"],shape:["Square"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Area"],recRate:"Recommended"},sankey_diagram:{id:"sankey_diagram",name:"Sankey Diagram",alias:[],family:["GeneralGraph"],def:"A graph shows the flows with weights between objects.",purpose:["Flow","Trend","Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},funnel_chart:{id:"funnel_chart",name:"Funnel Chart",alias:[],family:["FunnelCharts"],def:"A funnel chart is often used to represent stages in a sales process and show the amount of potential revenue for each stage.",purpose:["Trend"],coord:["SymmetricCartesian"],category:["Statistic"],shape:["Symmetric"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Length"],recRate:"Recommended"},mirror_funnel_chart:{id:"mirror_funnel_chart",name:"Mirror Funnel Chart",alias:["Contrast Funnel Chart"],family:["FunnelCharts"],def:"A mirror funnel chart is a funnel chart divided into two series by a central axis.",purpose:["Comparison","Trend"],coord:["SymmetricCartesian"],category:["Statistic"],shape:["Symmetric"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]},{minQty:1,maxQty:1,fieldConditions:["Nominal"]}],channel:["Color","Length","Direction"],recRate:"Recommended"},box_plot:{id:"box_plot",name:"Box Plot",alias:["Box and Whisker Plot","boxplot"],family:["BarCharts"],def:"A box plot is often used to graphically depict groups of numerical data through their quartiles. Box plots may also have lines extending from the boxes indicating variability outside the upper and lower quartiles. Outliers may be plotted as individual points.",purpose:["Distribution","Anomaly"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Position"],recRate:"Recommended"},heatmap:{id:"heatmap",name:"Heatmap",alias:[],family:["HeatmapCharts"],def:"A heatmap is a graphical representation of data where the individual values contained in a matrix are represented as colors.",purpose:["Distribution"],coord:["Cartesian2D"],category:["Statistic"],shape:["Square"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Position"],recRate:"Recommended"},density_heatmap:{id:"density_heatmap",name:"Density Heatmap",alias:["Heatmap"],family:["HeatmapCharts"],def:"A density heatmap is a heatmap for representing the density of dots.",purpose:["Distribution"],coord:["Cartesian2D"],category:["Statistic"],shape:["Area"],dataPres:[{minQty:3,maxQty:3,fieldConditions:["Interval"]}],channel:["Color","Position","Area"],recRate:"Recommended"},radar_chart:{id:"radar_chart",name:"Radar Chart",alias:["Web Chart","Spider Chart","Star Chart","Cobweb Chart","Irregular Polygon","Kiviat diagram"],family:["RadarCharts"],def:"A radar chart maps series of data volume of multiple dimensions onto the axes. Starting at the same center point, usually ending at the edge of the circle, connecting the same set of points using lines.",purpose:["Comparison"],coord:["Radar"],category:["Statistic"],shape:["Round"],dataPres:[{minQty:1,maxQty:2,fieldConditions:["Nominal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Position"],recRate:"Recommended"},wordcloud:{id:"wordcloud",name:"Word Cloud",alias:["Wordle","Tag Cloud","Text Cloud"],family:["Others"],def:"A word cloud is a collection, or cluster, of words depicted in different sizes, colors, and shapes, which takes a piece of text as input. Typically, the font size in the word cloud is encoded as the word frequency in the input text.",purpose:["Proportion"],coord:["Cartesian2D"],category:["Diagram"],shape:["Scatter"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Nominal"]},{minQty:0,maxQty:1,fieldConditions:["Interval"]}],channel:["Size","Position","Color"],recRate:"Recommended"},candlestick_chart:{id:"candlestick_chart",name:"Candlestick Chart",alias:["Japanese Candlestick Chart)"],family:["BarCharts"],def:"A candlestick chart is a specific version of box plot, which is a style of financial chart used to describe price movements of a security, derivative, or currency.",purpose:["Trend","Distribution"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Time"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Position"],recRate:"Recommended"},compact_box_tree:{id:"compact_box_tree",name:"CompactBox Tree",alias:[],family:["TreeGraph"],def:"A type of tree graph layout which arranges the nodes with same depth on the same level.",purpose:["Relation","Hierarchy"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},dendrogram:{id:"dendrogram",name:"Dendrogram",alias:[],family:["TreeGraph"],def:"A type of tree graph layout which arranges the leaves on the same level.",purpose:["Relation","Hierarchy"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},indented_tree:{id:"indented_tree",name:"Indented Tree Layout",alias:[],family:["TreeGraph"],def:"A type of tree graph layout where the hierarchy of tree is represented by the horizontal indentation, and each element will occupy one row/column. It is commonly used to represent the file directory structure.",purpose:["Relation","Hierarchy"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},radial_tree:{id:"radial_tree",name:"Radial Tree Layout",alias:[],family:["TreeGraph"],def:"A type of tree graph layout which places the root at the center, and the branches around the root radially.",purpose:["Relation","Hierarchy"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},flow_diagram:{id:"flow_diagram",name:"Flow Diagram",alias:["Dagre Graph Layout","Dagre","Flow Chart"],family:["GeneralGraph"],def:"Directed flow graph.",purpose:["Relation","Flow"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},fruchterman_layout_graph:{id:"fruchterman_layout_graph",name:"Fruchterman Graph Layout",alias:[],family:["GeneralGraph"],def:"A type of force directed graph layout.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},force_directed_layout_graph:{id:"force_directed_layout_graph",name:"Force Directed Graph Layout",alias:[],family:["GeneralGraph"],def:"The classical force directed graph layout.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},fa2_layout_graph:{id:"fa2_layout_graph",name:"Force Atlas 2 Graph Layout",alias:["FA2 Layout"],family:["GeneralGraph"],def:"A type of force directed graph layout algorithm. It focuses more on the degree of the node when calculating the force than the classical force-directed algorithm .",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},mds_layout_graph:{id:"mds_layout_graph",name:"Multi-Dimensional Scaling Layout",alias:["MDS Layout"],family:["GeneralGraph"],def:"A type of dimension reduction algorithm that could be used for calculating graph layout. MDS (Multidimensional scaling) is used for project high dimensional data onto low dimensional space.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},circular_layout_graph:{id:"circular_layout_graph",name:"Circular Graph Layout",alias:[],family:["GeneralGraph"],def:"A type of graph layout which arranges all the nodes on a circle.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},spiral_layout_graph:{id:"spiral_layout_graph",name:"Spiral Graph Layout",alias:[],family:["GeneralGraph"],def:"A type of graph layout which arranges all the nodes along a spiral line.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},radial_layout_graph:{id:"radial_layout_graph",name:"Radial Graph Layout",alias:[],family:["GeneralGraph"],def:"A type of graph layout which places a focus node on the center and the others on the concentrics centered at the focus node according to the shortest path length to the it.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},concentric_layout_graph:{id:"concentric_layout_graph",name:"Concentric Graph Layout",alias:[],family:["GeneralGraph"],def:"A type of graph layout which arranges the nodes on concentrics.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},grid_layout_graph:{id:"grid_layout_graph",name:"Grid Graph Layout",alias:[],family:["GeneralGraph"],def:"A type of graph layout arranges the nodes on grids.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"}};function o(){return JSON.parse(JSON.stringify(i))}function u(t){var e=o();return t?function(t,e){var n=t,r=e.exclude,i=e.include,o=e.custom;return r&&r.forEach((function(t){Object.keys(n).includes(t)&&delete n[t]})),i&&Object.keys(n).forEach((function(t){i.includes(t)||delete n[t]})),a()(a()({},n),o)}(e,t):e}},3708:function(t,e,n){"use strict";n.d(e,{HS:function(){return c},Kp:function(){return i},Sx:function(){return r},X1:function(){return f},io:function(){return o},kB:function(){return u},oW:function(){return a},pD:function(){return l},qm:function(){return s}});var r=["line_chart","step_line_chart","area_chart","stacked_area_chart","percent_stacked_area_chart","column_chart","grouped_column_chart","stacked_column_chart","percent_stacked_column_chart","range_column_chart","waterfall_chart","histogram","bar_chart","stacked_bar_chart","percent_stacked_bar_chart","grouped_bar_chart","range_bar_chart","radial_bar_chart","bullet_chart","pie_chart","donut_chart","nested_pie_chart","rose_chart","scatter_plot","bubble_chart","non_ribbon_chord_diagram","arc_diagram","chord_diagram","treemap","sankey_diagram","funnel_chart","mirror_funnel_chart","box_plot","heatmap","density_heatmap","radar_chart","wordcloud","candlestick_chart","compact_box_tree","dendrogram","indented_tree","radial_tree","flow_diagram","fruchterman_layout_graph","force_directed_layout_graph","fa2_layout_graph","mds_layout_graph","circular_layout_graph","spiral_layout_graph","radial_layout_graph","concentric_layout_graph","grid_layout_graph"],a=["LineCharts","ColumnCharts","BarCharts","PieCharts","AreaCharts","ScatterCharts","FunnelCharts","HeatmapCharts","RadarCharts","TreeGraph","GeneralGraph","PolygonLayer","LineLayer","PointLayer","HeatmapLayer","Table","Others"],i=["Comparison","Trend","Distribution","Rank","Proportion","Composition","Relation","Hierarchy","Flow","Spatial","Anomaly","Value"],o=["NumberLine","Cartesian2D","SymmetricCartesian","Cartesian3D","Polar","NodeLink","Radar","Geo","Other"],u=["Statistic","Diagram","Graph","Map","Other"],c=["Lines","Bars","Round","Square","Area","Scatter","Symmetric","Network","Map","Other"],s=["Nominal","Ordinal","Interval","Discrete","Continuous","Time"],l=["Position","Length","Color","Area","Angle","ArcLength","Direction","Size","Opacity","Stroke","LineWidth","Lightness"],f=["Recommended","Use with Caution","Not Recommended"]},5706:function(t,e,n){"use strict";n.d(e,{N:function(){return a}});var r={"zh-CN":{concepts:{family:{LineCharts:"折线图类",ColumnCharts:"柱状图类",BarCharts:"条形图类",PieCharts:"饼图类",AreaCharts:"面积图类",ScatterCharts:"散点图类",FunnelCharts:"漏斗图类",HeatmapCharts:"热力图类",RadarCharts:"雷达图类",TreeGraph:"树形关系类",GeneralGraph:"关系图类",PointLayer:"点图层类",LineLayer:"线图层类",PolygonLayer:"面图层类",HeatmapLayer:"地图热力图类",Others:"其他类",Table:"表格类"},category:{Statistic:"统计图表",Diagram:"示意图",Graph:"关系图",Map:"地图",Other:"其他"},purpose:{Comparison:"比较",Trend:"趋势",Distribution:"分布",Rank:"排名",Proportion:"占比",Composition:"组成",Relation:"关系",Hierarchy:"层级",Flow:"流向",Spatial:"空间",Anomaly:"异常",Value:"数值"},coord:{NumberLine:"数轴",Cartesian2D:"二维直角坐标系",SymmetricCartesian:"对称直角坐标系",Cartesian3D:"三维直角坐标系",Polar:"极坐标系",NodeLink:"点线关系网络",Radar:"雷达型坐标系",Geo:"地理坐标系",Other:"其他"},shape:{Lines:"线形",Bars:"条形",Round:"圆形",Square:"方形",Area:"面形",Scatter:"散点形",Symmetric:"对称形",Network:"网络形",Map:"地图",Other:"其他"},channel:{Position:"位置",Length:"长度",Color:"颜色",Area:"面积",Angle:"角度",ArcLength:"弧长",Direction:"方向",Size:"大小",Opacity:"透明度",Stroke:"线色",LineWidth:"线粗",Lightness:"亮度"},lom:{Continuous:"连续",Discrete:"离散",Interval:"数值",Nominal:"无序名词",Ordinal:"有序名词",Time:"时间"},recRate:{Recommended:"推荐","Use with Caution":"慎用","Not Recommended":"不推荐"}},chartTypes:{line_chart:{name:"折线图",alias:["折线图","线图"],def:"使用折线的线段显示数据在一个具有顺序性的维度上的变化。"},step_line_chart:{name:"阶梯图",alias:["阶梯线"],def:"折线根据分类字段分为多根在 x 方向(时间)的信息是完全一致、颜色及 y 方向(变量)信息不一致的折线,通常用作同一时间区间内多个变量发展趋势的对比。"},area_chart:{name:"面积图",alias:[],def:"使用带填充区域的线段显示数据在一个具有顺序性的维度上的变化。"},stacked_area_chart:{name:"堆叠面积图",alias:[],def:"使用带不同样式的填充区域的层叠线段来显示多组数据在同一个具有顺序性的维度上的变化,线段在同一维度值上的端点高度按照数值累加。"},percent_stacked_area_chart:{name:"百分比堆叠面积图",alias:["%堆叠面积图","100%堆叠面积图"],def:"一种特殊的堆叠面积图,线段在同一维度值上的端点高度代表值在其中的占比,占比总和为百分之百。"},column_chart:{name:"柱状图",alias:["柱形图"],def:"使用柱形显示维度的数值。横轴显示分类维度,纵轴显示相应的值。"},grouped_column_chart:{name:"分组柱状图",alias:["簇状柱状图"],def:"使用颜色不同的柱形并排组成小组来显示各维度的数值。横轴标示出分组,颜色标示出分类,纵轴显示相应的值。"},stacked_column_chart:{name:"堆叠柱状图",alias:[],def:"使用颜色不同的堆叠的柱形来显示各维度的数值。横轴标示出第一个分类维度,颜色标示出第二个分类维度,纵轴显示相应的值。"},percent_stacked_column_chart:{name:"百分比堆叠柱状图",alias:["%堆叠柱状图","100%堆叠柱状图"],def:"使用颜色不同的堆叠的柱形来显示各维度的数值。横轴标示出第一个分类维度,颜色标示出第二个分类维度,纵轴显示相应分类所占的百分比。"},range_column_chart:{name:"值域柱状图",alias:[],def:"值域柱状图是一种特殊的柱状图,柱子不一定要从 0 开始,而是用柱子长度表示一个从起始值到终止值的区间。"},waterfall_chart:{name:"瀑布图",alias:["桥图"],def:"瀑布图形似瀑布流水,采用绝对值与相对值结合的方式,适用于表达数个特定数值之间的数量变化关系。"},histogram:{name:"直方图",alias:[],def:"直方图是一种统计报告图,由一系列高度不等的纵向条纹或线段表示数据分布的情况。"},bar_chart:{name:"条形图",alias:["条状图"],def:"使用条形显示维度的数值。纵轴显示分类维度,横轴显示相应的值。"},grouped_bar_chart:{name:"分组条形图",alias:["簇状条形图"],def:"使用颜色不同的条形并排组成小组来显示维度的数值。纵轴标示出分组,颜色标示出分类,横轴显示相应的值。"},stacked_bar_chart:{name:"堆叠条形图",alias:[],def:"使用颜色不同的堆叠的条形来显示各维度的数值。纵轴标示出第一个分类维度,颜色标示出第二个分类维度,横轴显示相应的值。"},percent_stacked_bar_chart:{name:"百分比堆叠条形图",alias:["%堆叠条形图","100%堆叠条形图"],def:"使用颜色不同的堆叠的条形来显示各维度的数值。纵轴标示出第一个分类维度,颜色标示出第二个分类维度,横轴显示相应分类所占的百分比。"},range_bar_chart:{name:"值域条形图",alias:[],def:"值域条形图是一种特殊的条形图,条不一定要从 0 开始,而是用长度表示一个从起始值到终止值的区间。"},radial_bar_chart:{name:"径向条形图",alias:["环形条形图","环形柱状图","玉珏图"],def:"径向条形图是一种在极坐标系下绘制的条形图。径向条形图沿半径方向展示分类维度,使用角度来反应数值。"},bullet_chart:{name:"子弹图",alias:["靶心图","标靶图"],def:"子弹图可用于将度量的绩效可视化并与目标值和定性刻度。"},pie_chart:{name:"饼图",alias:[],def:"通过扇形区块的颜色和弧长(角度、面积)来展现数据的分类和占比情况。"},donut_chart:{name:"环图",alias:["甜甜圈图"],def:"通过弧形区块的颜色和弧长来展现数据的分类和占比情况。"},nested_pie_chart:{name:"嵌套饼图",alias:["嵌套环图","嵌套甜甜圈图"],def:"嵌套饼图由多个甜甜圈图构成,所有的甜甜圈共享同一个圆心。"},rose_chart:{name:"玫瑰图",alias:["南丁格尔图","鸡冠花图","极坐标面积图"],def:"统计学家和医学改革家佛罗伦萨‧南丁格尔在克里米亚战争期间创造了这种图表。尽管外形很像饼图,但本质上来说,南丁格尔玫瑰图更像在极坐标下绘制的柱状图或堆叠柱状图。只不过,它用半径来反映数值。"},scatter_plot:{name:"散点图",alias:[],def:"散点图是将所有的数据以不同颜色的点的形式展现在平面直角坐标系上的统计图表。"},bubble_chart:{name:"气泡图",alias:[],def:"气泡图是一种多变量的统计图表,由笛卡尔坐标系(直角坐标系)和大小不一、颜色不同的圆组成,可以看作是散点图的变形。"},treemap:{name:"树图",alias:["矩形树图"],def:"树图是一个由不同大小的嵌套式矩形来显示树状结构数据的统计图表。"},funnel_chart:{name:"漏斗图",alias:[],def:"漏斗图,形如“漏斗”,用于单流程分析,在开始和结束之间由N个流程环节组成。"},mirror_funnel_chart:{name:"对比漏斗图",alias:["对称漏斗图","镜像漏斗图"],def:"对比漏斗图是两个独立的漏斗图以一根中轴线对称展开的图表形式。"},box_plot:{name:"箱形图",alias:["箱线图","盒须图","盒式图","盒状图"],def:"箱形图是一种用作显示一组数据分散情况的统计图表,因形状如箱子而得名。箱子的顶端和底端分别代表上下四分位数,箱子中间的线代表中位数。从箱子延伸出去的线条展现出了上下四分位数以外的数据。有时,箱形图上也会出现个别的点,这代表离群值,也可称之为异常值。"},heatmap:{name:"热力图",alias:["区块热力图"],def:"热力图,是一种通过对色块着色来显示数据的统计图表。"},density_heatmap:{name:"密度热力图",alias:["热力图"],def:"密度热力图是一种用在连续坐标系上用色点展现密度分布的统计图表。"},radar_chart:{name:"雷达图",alias:["蛛网图"],def:"将不同系列的多个维度的数据量映射到坐标轴上,这些坐标轴起始于同一个圆心点,通常结束于圆周边缘,将同一组的点使用线连接起来,用颜色区分系列。"},wordcloud:{name:"词云",alias:["文字云","标签云"],def:"词云是由一组零散分布的,具有不同大小、颜色、和形状的词语组成的文本可视化形式,通常,一个词云中的词语是从一段有主题的文章中抽取出来的,字体的大小跟词语在原文中出现的频率相匹配。"},candlestick_chart:{name:"蜡烛图",alias:["烛台图","日本蜡烛图"],def:"蜡烛图是一种特殊的箱型图,在金融行业中有着广泛的应用:一般用来描述股票、期货等金融产品的价格走势。"},compact_box_tree:{name:"紧凑树",alias:[],def:"紧凑树是一种树图布局,从根节点开始,同一深度的节点在同一层。适合于脑图等应用场景。"},dendrogram:{name:"生态树",alias:[],def:"生态树是一种树图布局,不管数据的深度多少,总是叶节点对齐。常用于表示层次聚类。"},indented_tree:{name:"缩进树",alias:[],def:"缩进树是一种树图布局,树节点的层级通过水平方向的缩进量来表示,每个元素会占一行或一列。常用于表示文件目录结构。"},radial_tree:{name:"辐射树",alias:[],def:"辐射树是一种树图布局,根节点位于辐射树中心,其他分支辐射式展开。"},flow_diagram:{name:"流程图",alias:["有向图","层次布局图"],def:"流程图是一种图解,可视表示在过程或功能内部诸如事件、步骤等之间的顺序关系。"},fruchterman_layout_graph:{name:"Fruchterman 布局力导向图",alias:[],def:"一种使用 Fruchterman 布局算法的力导向图。"},force_directed_layout_graph:{name:"力导向图",alias:[],def:"力导向图布局作为较早被发明的一种实际应用布局算法,经过研究者多年改进、扩展,已发展成为一类算法的集合。该类算法的特点是模拟物理世界中的作用力,施加在节点上,并迭代计算以达到合理放置节点、美观布局的一类算法。"},fa2_layout_graph:{name:"Force Atlas 2 力导向布局",alias:["FA2力导向布局"],def:"一种使用 Force Atlas 2 布局算法的力导向图,相比于传统的力导算法,该算法在计算力时更关注于节点的度数。"},mds_layout_graph:{name:"MDS 布局图",alias:["多维尺度分析布局"],def:"一种使用 MDS (Multi-Dimensional Scaling) 降维算法计算节点位置的图布局方法。"},circular_layout_graph:{name:"环形布局关系图",alias:[],def:"环形布局根据参数指定的排序方式对节点进行排序后,将节点排列在圆环上。"},spiral_layout_graph:{name:"螺旋布局关系图",alias:[],def:"螺旋布局图的节点排列在一根螺旋线上。"},radial_layout_graph:{name:"辐射布局关系图",alias:[],def:"辐射布局根据指定的中心点,根据其他节点与中心点的拓扑距离(最短路径长度)将其余节点放置在以中心点为圆心的同心圆上。"},concentric_layout_graph:{name:"同心圆布局关系图",alias:[],def:"同心圆布局关系图将所有节点放置在同心圆上。"},grid_layout_graph:{name:"网格布局关系图",alias:[],def:"网格布局根据参数指定的排序方式对节点进行排序后,将节点排列在网格上。"},arc_diagram:{name:"弧形图",alias:[],def:"弧形图是一种关系图的特殊布局,节点被排列在同一水平线上,关系由节点间的圆弧线表示。"},chord_diagram:{name:"弦图",alias:[],def:"弦图是一种展示实体之间的相互关系的方法,常用来比较不同数据组之间的相似性。节点围绕一个圆圈径向排列,点与点之间以弧线彼此连接以显示其中关系。"},non_ribbon_chord_diagram:{name:"无带弦图",alias:[],def:"无带弦图是弦图的简化版本,只显示连接线,相比弦图更加突出了数据之间的联系。"},sankey_diagram:{name:"桑基图",alias:["桑吉图"],def:"桑基图,是一种表现流程的示意图,用于描述一组值到另一组值的流向。分支的宽度对应了数据流量的大小。"}}}};function a(t){if(!t||!Object.keys(r).includes(t))throw new Error("No CKB Dictionary for lang code ".concat(t,"!"));return r[t]}},107:function(t,e,n){"use strict";n.d(e,{ri:function(){return d}});var r=n(2616),a=n(9982),i=n(4479),o=n.n(i),u=n(4120);var c=function(t){var e=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return["".concat(u.oP),"".concat(u.oP).concat(u.cF).concat(t?"":"?","W").concat(u.ps,"(").concat(u.cF).concat(t?"":"?").concat(u.NO,")?"),"".concat(u.vc).concat(u.cF).concat(t?"":"?").concat(u.x4).concat(u.cF).concat(t?"":"?").concat(u.oP),"".concat(u.oP).concat(u.cF).concat(t?"":"?").concat(u.vc).concat(u.cF).concat(t?"":"?").concat(u.x4),"".concat(u.oP).concat(u.cF).concat(t?"":"?").concat(u.vc),"".concat(u.oP).concat(u.cF).concat(t?"":"?").concat(u.IY)]}(t),n=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return["".concat(u.kr,":").concat(t?"":"?").concat(u.EB,":").concat(t?"":"?").concat(u.sh,"([.,]").concat(u.KP,")?").concat(u.ew,"?"),"".concat(u.kr,":").concat(t?"":"?").concat(u.EB,"?").concat(u.ew)]}(t),r=[].concat(o()(e),o()(n));return e.forEach((function(t){n.forEach((function(e){r.push("".concat(t,"[T\\s]").concat(e))}))})),r.map((function(t){return new RegExp("^".concat(t,"$"))}))};function s(t,e){if((0,a.HD)(t))for(var n=c(e),r=0;r<n.length;r+=1){if(n[r].test(t.trim()))return!0}return!1}var l=n(1438);function f(t){var e=t.rawData;if("string"!==t.recommendation)return!1;if(function(t){return 1===t.distinct}(t))return!1;var n=e.filter((function(t){return!(0,a.kK)(t)&&(0,a.M1)(t)}));if(0===n.length)return!1;for(var r=null,i=null,o=-1,u=-1,c=!0;c;){for(var s=!0,l=0;l<n.length;l+=1){var f=n[l][o+1];if(null!==r&&0!==l||(r=f),f!==r){s=!1;break}}if(!s)break;o+=1}for(c=!0;c;){for(var h=!0,d=0;d<n.length;d+=1){var p=n[d],v=p[p.length-1-(u+1)];if(null!==i&&0!==d||(i=v),v!==i){h=!1;break}}if(!h)break;u+=1}var m=[/\d+/,/(零|一|二|三|四|五|六|七|八|九|十)+/,/(一|二|三|四|五|六|日)/,/^[a-z]$/,/^[A-Z]$/];if(-1===o&&-1===u)return!1;for(var g,y=n.map((function(t){return t.slice(-1===o?0:o+1,-1===u?void 0:t.length-u-1)})),b=function(){var t=m[_],e=y.some((function(e){return!t.test(e)}));if(!e)return{v:!0}},_=0;_<m.length;_+=1)if(g=b())return g.v;return!1}function h(t,e){return(0,a.kK)(t)?"null":(0,a.hj)(t)?(0,a.U)(t)?"integer":"float":(0,a.J_)(t)||s(t,e)?"date":(0,a.HD)(t)&&(0,a.i1)(t)?t.includes(".")?"float":"integer":"string"}function d(t,e){var n,i=t.map((function(t){return(0,a.kK)(t)?null:t})),o=(0,r.Gn)(i),u=o.null?i.filter((function(t){return null!==t})):i,c=i.map((function(t){return h(t,e)})),p=Object.keys((0,r.Gn)(c)).filter((function(t){return"null"!==t}));switch(p.length){case 0:n="null";break;case 1:if("integer"===(n=p[0]))i.filter((function(t){return null!==t})).map((function(t){return"".concat(t)})).every((function(t){return s(t)}))&&(n="date");break;case 2:if((p.includes("integer")||p.includes("date"))&&p.includes("float")){n="float";break}if(p.includes("integer")&&p.includes("date")){n=i.filter((function(t){return null!==t})).map((function(t){return"".concat(t)})).every((function(t){return s(t)}))?"date":"integer";break}n="string";break;default:n="string"}var v=(0,l.Tw)(u),m={count:t.length,distinct:v.length,type:p.length<=1?p[0]||"null":"mixed",recommendation:n,missing:o.null||0,rawData:t,valueMap:o};if(p.length>1){var g={},y=u;p.forEach((function(t){"date"===t?(g.date=d(y.filter((function(t){return s(t)})),e),y=y.filter((function(t){return!s(t)}))):"integer"===t?(g.integer=d(y.filter((function(t){return(0,a.Cf)(t)&&!s(t)})),e),y=y.filter((function(t){return!(0,a.Cf)(t)}))):"float"===t?(g.float=d(y.filter((function(t){return(0,a.vn)(t)&&!s(t)})),e),y=y.filter((function(t){return!(0,a.vn)(t)}))):"string"===t&&(g.string=d(y.filter((function(t){return"string"===h(t,e)}))),y=y.filter((function(t){return"string"!==h(t,e)})))})),m.meta=g}2===m.distinct&&"date"!==m.recommendation&&(i.length>=100||(0,a.jn)(v,!0))&&(m.recommendation="boolean"),"string"===n&&Object.assign(m,function(t){var e=t.map((function(t){return t.length}));return{maxLength:(0,r.Fp)(e),minLength:(0,r.VV)(e),meanLength:(0,r.J6)(e),containsChar:t.some((function(t){return/[A-z]/.test(t)})),containsDigit:t.some((function(t){return/[0-9]/.test(t)})),containsSpace:t.some((function(t){return/\s/.test(t)}))}}(u.map((function(t){return"".concat(t)})))),"integer"!==n&&"float"!==n||Object.assign(m,function(t){return{minimum:(0,r.VV)(t),maximum:(0,r.Fp)(t),mean:(0,r.J6)(t),percentile5:(0,r.VR)(t,5),percentile25:(0,r.VR)(t,25),percentile50:(0,r.VR)(t,50),percentile75:(0,r.VR)(t,75),percentile95:(0,r.VR)(t,95),sum:(0,r.Sm)(t),variance:(0,r.CA)(t),standardDeviation:(0,r.IN)(t),zeros:t.filter((function(t){return 0===t})).length}}(u.map((function(t){return 1*t})))),"date"===n&&Object.assign(m,function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.map((function(t){if(e){var n="".concat(t);if(8===n.length)return new Date("".concat(n.substring(0,4),"/").concat(n.substring(4,2),"/").concat(n.substring(6,2))).getTime()}return new Date(t).getTime()}));return{minimum:t[(0,r._D)(n)],maximum:t[(0,r.F_)(n)]}}(u,"integer"===m.type));var b,_=[];return("boolean"===(b=m).recommendation||"string"===b.recommendation&&!f(b))&&_.push("Nominal"),f(m)&&_.push("Ordinal"),function(t){return"integer"===t.recommendation||"float"===t.recommendation}(m)&&_.push("Interval"),function(t){return"integer"===t.recommendation}(m)&&_.push("Discrete"),function(t){return"float"===t.recommendation}(m)&&_.push("Continuous"),function(t){return"date"===t.recommendation}(m)&&_.push("Time"),m.levelOfMeasurements=_,m}},9643:function(t,e,n){"use strict";n.d(e,{Z:function(){return h}});var r=n(4528),a=n.n(r),i=n(8798),o=n.n(i),u=n(9057),c=n.n(u),s=n(1438),l=n(9982),f=n(4674),h=function(){function t(e,n){var r,i;if(a()(this,t),c()(this,"axes",[[]]),c()(this,"data",[]),c()(this,"colData",void 0),c()(this,"extra",void 0),(0,s.hu)(!n||(0,l.Kn)(n),"If extra exists, it must be an object."),(0,l.M1)(e))null!=n&&n.indexes?(this.setAxis(0,null==n?void 0:n.indexes),this.data=Array(null==n?void 0:n.indexes.length).fill((0,f.l7)((0,f.e1)(e,null==n?void 0:n.fillValue),null==n||null===(r=n.columnTypes)||void 0===r?void 0:r[0]))):(this.data=[(0,f.l7)((0,f.e1)(e,null==n?void 0:n.fillValue),null==n||null===(i=n.columnTypes)||void 0===i?void 0:i[0])],this.setAxis(0,[0]));else if((0,l.kJ)(e)){for(var o=!0,u=0;u<e.length;u+=1){var h=e[u];if(!(0,l.M1)(h)){o=!1;break}}if(this.setAxis(0,(0,f.dN)(e,null==n?void 0:n.indexes)),o){var d,p;if(null!=n&&n.indexes)(0,s.hu)((null==n||null===(p=n.indexes)||void 0===p?void 0:p.length)===e.length,"Index length is ".concat(null==n?void 0:n.indexes.length,", but data size ").concat(e.length)),this.setAxis(0,null==n?void 0:n.indexes);if(this.data=null!=n&&n.fillValue?e.map((function(t){return(0,f.e1)(t,null==n?void 0:n.fillValue)})):e,null!=n&&null!==(d=n.columnTypes)&&void 0!==d&&d.length)for(var v=0;v<this.data.length;v+=1){var m;this.data[v]=(0,f.l7)(this.data[v],null==n||null===(m=n.columnTypes)||void 0===m?void 0:m[0])}}}}return o()(t,[{key:"indexes",get:function(){return this.getAxis(0)}},{key:"columns",get:function(){return this.getAxis(1)}},{key:"getAxis",value:function(t){return this.axes[t]}},{key:"setAxis",value:function(t,e){(0,s.hu)((0,l.kJ)(e),"Index or columns must be Axis array."),this.axes[t]=e}}]),t}()},7849:function(t,e,n){"use strict";n.d(e,{Z:function(){return k}});var r=n(1448),a=n.n(r),i=n(4479),o=n.n(i),u=n(3100),c=n.n(u),s=n(4528),l=n.n(s),f=n(8798),h=n.n(f),d=n(7267),p=n.n(d),v=n(9913),m=n.n(v),g=n(107),y=n(1438),b=n(9982),_=n(9643),x=n(4420),w=n(4674),k=function(t){p()(n,t);var e=m()(n);function n(t,r){var a;if(l()(this,n),(a=e.call(this,t,r)).colData=[],a.extra=r||{},(0,y.hu)((0,b.M1)(t)||(0,b.kJ)(t)||(0,b.Kn)(t),"Data type is illegal"),(0,b.M1)(t)){if(null!=r&&r.columnTypes)for(var i=0;i<(null==r||null===(u=r.indexes)||void 0===u?void 0:u.length);i+=1){var u,s;a.data[i]=(0,w.l7)(a.data[i],null==r||null===(s=r.columnTypes)||void 0===s?void 0:s[i])}null!=r&&r.indexes&&null!=r&&r.columns?(a.setAxis(1,null==r?void 0:r.columns),a.data=Array(null==r?void 0:r.columns.length).fill(a.data)):null!=r&&r.columns?null!=r&&r.indexes||((0,y.hu)((0,b.kJ)(null==r?void 0:r.columns),"Index or columns must be Axis array."),(0,y.hu)(1===(null==r?void 0:r.columns.length),"When the length of extra.columns is larger than 1, extra.indexes is required.")):(a.setAxis(1,[0]),a.data=[a.data]),a.colData=a.data}if((0,b.kJ)(t)){var f=c()(t,1)[0];if(a.data.length>0&&(a.generateColumns([0],null==r?void 0:r.columns),a.colData=[a.data],a.data=a.data.map((function(t){return[t]}))),(0,b.kJ)(f)){var h=(0,y.w6)(f.length);a.generateDataAndColDataFromArray(!1,t,h,null==r?void 0:r.fillValue,null==r?void 0:r.columnTypes),a.generateColumns(h,null==r?void 0:r.columns)}if((0,b.Kn)(f)){for(var d=[],p=0;p<t.length;p+=1){var v=t[p];d.push.apply(d,o()(Object.keys(v)))}for(var m=o()(new Set(d)),g=0;g<t.length;g+=1){var _=t[g];if((0,y.hu)((0,b.Kn)(_),"The data is not standard object array."),null!=r&&r.columns){a.data[g]=[];for(var x=0;x<(null==r?void 0:r.columns.length);x+=1){var k,M=null==r?void 0:r.columns[x];(0,y.hu)(m.includes(M),"There is no column ".concat(M," in data."));var A=(0,w.l7)((0,w.e1)(_[M],r.fillValue),null==r||null===(k=r.columnTypes)||void 0===k?void 0:k[x]);a.data[g].push(A),a.colData[x]?a.colData[x].push(A):a.colData[x]=[A]}a.setAxis(1,null==r?void 0:r.columns)}}null!=r&&r.columns||(a.generateDataAndColDataFromArray(!0,t,m,null==r?void 0:r.fillValue,null==r?void 0:r.columnTypes),a.setAxis(1,m))}}if((0,b.Kn)(t)){var C=Object.values(t),T=C[0];if((0,b.M1)(T)){var S=Object.keys(t);if(null!=r&&r.indexes?((0,y.hu)((0,b.kJ)(r.indexes),"extra.indexes must be an array."),(0,y.hu)(1===r.indexes.length,"The length of extra.indexes must be 1."),a.setAxis(0,r.indexes)):a.setAxis(0,[0]),null!=r&&r.columns){for(var N=0;N<(null==r?void 0:r.columns.length);N+=1){var O,I=null==r?void 0:r.columns[N];(0,y.hu)(S.includes(I),"There is no column ".concat(I," in data.")),a.data.push((0,w.l7)((0,w.e1)(t[I],null==r?void 0:r.fillValue),null==r||null===(O=r.columnTypes)||void 0===O?void 0:O[N]))}a.colData=a.data.map((function(t){return[t]})),a.data=[a.data],a.setAxis(1,null==r?void 0:r.columns)}else{for(var P=0;P<S.length;P+=1){var R,j=t[S[P]];(0,y.hu)((0,b.M1)(j),"Data type is illegal"),a.data.push((0,w.l7)((0,w.e1)(j,null==r?void 0:r.fillValue),null==r||null===(R=r.columnTypes)||void 0===R?void 0:R[P]))}a.data=[a.data],a.colData=C.map((function(t){var e;return[(0,w.l7)((0,w.e1)(t,null==r?void 0:r.fillValue),null==r||null===(e=r.columnTypes)||void 0===e?void 0:e[0])]})),a.generateColumns(S)}}if((0,b.kJ)(T)){a.setAxis(0,(0,w.dN)(T,null==r?void 0:r.indexes));var D=Object.keys(t);a.generateColumns(D,null==r?void 0:r.columns);for(var E=function(e){var n=t[a.columns[e]];if((0,y.hu)((0,b.kJ)(n),"Data type is illegal"),n.length<a.indexes.length){var i,o=n.concat(Array(a.indexes.length-n.length).fill((0,w.l7)((0,w.e1)(void 0,null==r?void 0:r.fillValue),null==r||null===(i=r.columnTypes)||void 0===i?void 0:i[e])));a.colData.push(o)}else a.colData.push(n.map((function(t){var n;return(0,w.l7)((0,w.e1)(t,null==r?void 0:r.fillValue),null==r||null===(n=r.columnTypes)||void 0===n?void 0:n[e])})));for(var u=0;u<a.indexes.length;u+=1){var c,s;if(a.data[u])a.data[u].push((0,w.l7)((0,w.e1)(n[u],null==r?void 0:r.fillValue),null==r||null===(c=r.columnTypes)||void 0===c?void 0:c[e]));else a.data[u]=[(0,w.l7)((0,w.e1)(n[u],null==r?void 0:r.fillValue),null==r||null===(s=r.columnTypes)||void 0===s?void 0:s[e])]}},L=0;L<a.columns.length;L+=1)E(L)}}return a}return h()(n,[{key:"generateColumns",value:function(t,e){e?((0,y.hu)((null==e?void 0:e.length)===t.length,"Columns length is ".concat(null==e?void 0:e.length,", but data column is ").concat(t.length)),this.setAxis(1,e)):this.setAxis(1,t)}},{key:"generateDataAndColDataFromArray",value:function(t,e,n,r,a){for(var i=0;i<e.length;i+=1){var o=e[i];(0,y.hu)(t?(0,b.Kn)(o):(0,b.kJ)(o),"Data type is illegal"),t&&JSON.stringify(Object.keys(o))===JSON.stringify(n)?this.data.push(Object.values(o).map((function(t,e){return(0,w.l7)((0,w.e1)(t,r),null==a?void 0:a[e])}))):t||this.data.push(o.map((function(t,e){return(0,w.l7)((0,w.e1)(t,r),null==a?void 0:a[e])})));for(var u=0;u<n.length;u+=1){var c=n[u],s=(0,w.l7)((0,w.e1)(o[c],r),null==a?void 0:a[u]);t&&JSON.stringify(Object.keys(o))!==JSON.stringify(n)&&(this.data[i]?this.data[i].push(s):this.data[i]=[s]),this.colData[u]?this.colData[u].push(s):this.colData[u]=[s]}}}},{key:"shape",get:function(){return[this.axes[0].length,this.axes[1].length]}},{key:"get",value:function(t,e){if((0,y.hu)((0,w.U7)(t)||(0,b.kJ)(t),"The rowLoc is illegal"),void 0===e)if((0,b.hj)(t)){if((0,y.hu)(this.indexes.includes(t),"The rowLoc is not found in the indexes."),this.indexes.includes(t)){var r=this.data[t],a=this.columns;return new x.Z(r,{indexes:a})}}else{if((0,b.kJ)(t)){for(var i=[],o=[],u=0;u<t.length;u+=1){var c=t[u];(0,y.hu)(this.indexes.includes(c),"The rowLoc is not found in the indexes.");var s=this.indexes.indexOf(c);i.push(this.data[s]),o.push(this.indexes[s])}return new n(i,{indexes:o,columns:this.columns})}if((0,b.HD)(t)&&t.includes(":")){var l=t.split(":");if(2===l.length){var f=Number(l[0]),h=Number(l[1]);return(0,y.hu)((0,b.hj)(f)&&(0,b.hj)(h),"The rowLoc is not found in the indexes."),new n(this.data.slice(f,h),{indexes:this.indexes.slice(f,h),columns:this.columns})}}}var d=-1,p=-1,v=[],m=-1,g=-1,_=[];if((0,w.U7)(t)&&this.indexes.includes(t)&&(p=(d=this.indexes.indexOf(t))+1),(0,b.kJ)(t))for(var k=0;k<t.length;k+=1){var M=t[k];(0,y.hu)(this.indexes.includes(M),"The rowLoc is not found in the indexes."),v.push(this.indexes.indexOf(M))}if((0,b.HD)(t)&&t.includes(":")){var A=t.split(":");if(2===A.length){var C=Number(A[0]),T=Number(A[1]);(0,y.hu)((0,b.hj)(C)&&(0,b.hj)(T),"The rowLoc is not found in the indexes."),d=C,p=T}}if((0,w.U7)(e)&&this.columns.includes(e)&&(g=(m=this.columns.indexOf(e))+1),(0,b.kJ)(e))for(var S=0;S<e.length;S+=1){var N=e[S];(0,y.hu)(this.columns.includes(N),"The colLoc is not found in the columns."),_.push(this.columns.indexOf(N))}if((0,b.HD)(e)&&e.includes(":")){var O=e.split(":");if(2===O.length){var I=this.columns.indexOf(O[0]),P=this.columns.indexOf(O[1]);(0,y.hu)((0,b.hj)(I)&&(0,b.hj)(P),"The colLoc is not found in the columns."),m=I,g=P}}var R=[],j=[];if((0,y.hu)(d>=0&&p>=0||v.length>0,"The rowLoc is not found in the indexes."),d>=0&&p>=0&&(R=this.data.slice(d,p),j=this.indexes.slice(d,p)),v.length>0)for(var D=0;D<v.length;D+=1){var E=v[D];R.push(this.data[E]),j.push(this.indexes[E])}if(m>=0&&g>=0){for(var L=0;L<R.length;L+=1)R[L]=R[L].slice(m,g);return new n(R,{indexes:j,columns:this.columns.slice(m,g)})}if(_.length>0){for(var B=[],z=R.slice(),Q=0;Q<R.length;Q+=1){R[Q]=[],B=[];for(var G=0;G<_.length;G+=1){var F=_[G];R[Q].push(z[Q][F]),B.push(this.columns[F])}}return new n(R,{indexes:j,columns:B})}throw new Error("The colLoc is illegal.")}},{key:"getByIndex",value:function(t,e){if((0,y.hu)((0,b.U)(t)||(0,b.kJ)(t)||(0,b.HD)(t),"The rowLoc is illegal"),void 0===e){if((0,b.U)(t)){(0,y.hu)((0,y.w6)(this.indexes.length).includes(t),"The rowLoc is not found in the indexes.");var r=this.data[t],a=this.columns;return new x.Z(r,{indexes:a})}if((0,b.kJ)(t)){for(var i=[],o=[],u=0;u<t.length;u+=1){var c=t[u];(0,y.hu)((0,y.w6)(this.indexes.length).includes(c),"The rowLoc is not found in the indexes."),i.push(this.data[c]),o.push(this.indexes[c])}return new n(i,{indexes:o,columns:this.columns})}if((0,b.HD)(t)&&t.includes(":")){var s=t.split(":");if(2===s.length){var l=Number(s[0]),f=Number(s[1]);return(0,y.hu)((0,b.U)(l)&&(0,b.U)(f),"The rowLoc is not found in the indexes."),new n(this.data.slice(l,f),{indexes:this.indexes.slice(l,f),columns:this.columns})}}}var h=-1,d=-1,p=[],v=-1,m=-1,g=[];if((0,b.U)(t)&&((0,y.hu)((0,y.w6)(this.indexes.length).includes(t),"The rowLoc is not found in the indexes."),h=t,d=t+1),(0,b.kJ)(t))for(var _=0;_<t.length;_+=1){var w=t[_];(0,y.hu)((0,y.w6)(this.indexes.length).includes(w),"The rowLoc is not found in the indexes."),p.push(w)}if((0,b.HD)(t)&&t.includes(":")){var k=t.split(":");if(2===k.length){var M=Number(k[0]),A=Number(k[1]);(0,y.hu)((0,b.U)(M)&&(0,b.U)(A),"The rowLoc is not found in the indexes."),h=M,d=A}}if((0,y.hu)(h>=0&&d>=0||p.length>0,"The colLoc is illegal"),(0,b.U)(e)&&(0,y.w6)(this.columns.length).includes(e)&&(v=e,m=e+1),(0,b.kJ)(e))for(var C=0;C<e.length;C+=1){var T=e[C];(0,y.hu)((0,y.w6)(this.columns.length).includes(T),"The colLoc is not found in the columns index."),g.push(T)}if((0,b.HD)(e)&&e.includes(":")){var S=e.split(":");if(2===S.length){var N=Number(S[0]),O=Number(S[1]);(0,y.hu)((0,b.U)(N)&&(0,b.U)(O),"The colLoc is not found in the columns index."),v=N,m=O}}(0,y.hu)(h>=0&&d>=0||p.length>0,"The rowLoc is not found in the indexes.");var I=[],P=[];if(h>=0&&d>=0)I=this.data.slice(h,d),P=this.indexes.slice(h,d);else if(p.length>0)for(var R=0;R<p.length;R+=1){var j=p[R];I.push(this.data[j]),P.push(this.indexes[j])}if((0,y.hu)(v>=0&&m>=0||g.length>0,"The colLoc is not found in the columns index."),v>=0&&m>=0){for(var D=0;D<I.length;D+=1)I[D]=I[D].slice(v,m);return new n(I,{indexes:P,columns:this.columns.slice(v,m)})}if(g.length>0){for(var E=[],L=I.slice(),B=0;B<I.length;B+=1){I[B]=[],E=[];for(var z=0;z<g.length;z+=1){var Q=g[z];I[B].push(L[B][Q]),E.push(this.columns[Q])}}return new n(I,{indexes:P,columns:E})}throw new Error("The colLoc is illegal.")}},{key:"getByColumn",value:function(t){(0,y.hu)(this.columns.includes(t),"The col is illegal");var e=this.columns.indexOf(t);return new x.Z(this.colData[e],{indexes:this.indexes})}},{key:"info",value:function(){for(var t=[],e=0;e<(null===(n=this.columns)||void 0===n?void 0:n.length);e+=1){var n,r=this.columns[e];t.push(a()(a()({},(0,g.ri)(this.colData[e],this.extra.strictDatePattern)),{},{name:String(r)}))}return t}},{key:"toString",value:function(){for(var t=this,e=Array(this.columns.length+1).fill(0),n=0;n<this.indexes.length;n+=1){var r=(0,w.lz)(this.indexes[n]);r>e[0]&&(e[0]=r)}for(var a=0;a<this.columns.length;a+=1){var i=(0,w.lz)(this.columns[a]);i>e[a+1]&&(e[a+1]=i)}for(var o=0;o<this.colData.length;o+=1)for(var u=0;u<this.colData[o].length;u+=1){var c=(0,w.lz)(this.colData[o][u]);c>e[o+1]&&(e[o+1]=c)}return"".concat((0,w.ej)(e[0])).concat(this.columns.map((function(n,r){return"".concat(n).concat(r!==t.columns.length?(0,w.ej)(e[r+1]-(0,w.lz)(n)+2):"")})).join(""),"\n").concat(this.indexes.map((function(n,r){var a;return"".concat(n).concat((0,w.ej)(e[0]-(0,w.lz)(n))).concat(null===(a=t.data[r])||void 0===a?void 0:a.map((function(n,r){return"".concat((0,w.Pz)(n)).concat(r!==t.columns.length?(0,w.ej)(e[r+1]-(0,w.lz)(n)):"")})).join("")).concat(r!==t.indexes.length?"\n":"")})).join(""))}}]),n}(_.Z)},4420:function(t,e,n){"use strict";n.d(e,{Z:function(){return m}});var r=n(3100),a=n.n(r),i=n(4528),o=n.n(i),u=n(8798),c=n.n(u),s=n(7267),l=n.n(s),f=n(9913),h=n.n(f),d=n(1438),p=n(9982),v=n(4674),m=function(t){l()(n,t);var e=h()(n);function n(t,r){var i;if(o()(this,n),i=e.call(this,t,r),(0,d.hu)((0,p.Kn)(t)||(0,p.M1)(t)||(0,p.kJ)(t),"Data type is illegal"),(0,p.Kn)(t)){var u=Object.keys(t);if(null!=r&&r.indexes){var c,s;(0,d.hu)((null==r||null===(c=r.indexes)||void 0===c?void 0:c.length)<=u.length,"Index length ".concat(null==r||null===(s=r.indexes)||void 0===s?void 0:s.length," is greater than data size ").concat(u.length));for(var l=0;l<(null==r?void 0:r.indexes.length);l+=1){var f,h=null==r?void 0:r.indexes[l];if(u.includes(h))i.data.push((0,v.l7)((0,v.e1)(t[h],null==r?void 0:r.fillValue),null==r||null===(f=r.columnTypes)||void 0===f?void 0:f[0]))}i.setAxis(0,null==r?void 0:r.indexes)}else i.data=Object.values(t).map((function(t){var e;return(0,v.l7)((0,v.e1)(t,null==r?void 0:r.fillValue),null==r||null===(e=r.columnTypes)||void 0===e?void 0:e[0])})),i.setAxis(0,u)}else if((0,p.kJ)(t)){var m=a()(t,1)[0];if(!(0,p.M1)(m)){var g;if(null!=r&&r.indexes)(0,d.hu)((null==r||null===(g=r.indexes)||void 0===g?void 0:g.length)===t.length,"Index length is ".concat(null==r?void 0:r.indexes.length,", but data size ").concat(t.length)),i.setAxis(0,null==r?void 0:r.indexes);i.data=t}}return i}return c()(n,[{key:"shape",get:function(){return[this.axes[0].length]}},{key:"get",value:function(t){if((0,d.hu)((0,p.hj)(t)||(0,p.HD)(t)&&!t.includes(":")||(0,p.kJ)(t)||(0,p.HD)(t)&&t.includes(":"),"The rowLoc is illegal"),(0,p.hj)(t)||(0,p.HD)(t)&&!t.includes(":")){if((0,d.hu)(this.indexes.includes(t),"The rowLoc is not found in the indexes."),(0,p.hj)(t))return this.data[t];if((0,p.HD)(t)){var e=this.indexes.indexOf(t);return this.data[e]}}if((0,p.kJ)(t)){for(var r=[],a=[],i=0;i<t.length;i+=1){var o=t[i];(0,d.hu)(this.indexes.includes(o),"The rowLoc is not found in the indexes.");var u=this.indexes.indexOf(o);r.push(this.data[u]),a.push(this.indexes[u])}return new n(r,{indexes:a})}if((0,p.HD)(t)&&t.includes(":")){var c=t.split(":");(0,d.hu)(2===c.length,"The rowLoc is not found in the indexes.");var s=c[0],l=c[1];if((0,p.U)(Number(s))&&(0,p.U)(Number(l))){var f=Number(s),h=Number(l);return new n(this.data.slice(f,h),{indexes:this.indexes.slice(f,h)})}if((0,p.HD)(s)&&(0,p.HD)(l)){var v=this.indexes.indexOf(s),m=this.indexes.indexOf(l);return new n(this.data.slice(v,m),{indexes:this.indexes.slice(v,m)})}}throw new Error("The rowLoc is illegal")}},{key:"getByIndex",value:function(t){if((0,d.hu)((0,p.U)(t)||(0,p.kJ)(t)||(0,p.HD)(t)&&t.includes(":"),"The rowLoc is illegal"),(0,p.U)(t)&&((0,d.hu)((0,d.w6)(this.indexes.length).includes(t),"The rowLoc is not found in the indexes."),(0,d.w6)(this.indexes.length).includes(t)))return this.data[t];if((0,p.kJ)(t)){for(var e=[],r=[],a=0;a<t.length;a+=1){var i=t[a];(0,d.hu)((0,d.w6)(this.indexes.length).includes(i),"The rowLoc is not found in the indexes."),e.push(this.data[i]),r.push(this.indexes[i])}return new n(e,{indexes:r})}if((0,p.HD)(t)&&t.includes(":")){var o=t.split(":");if(2===o.length){var u=Number(o[0]),c=Number(o[1]);return(0,d.hu)((0,p.U)(u)&&(0,p.U)(c),"The rowLoc is not found in the indexes."),new n(this.data.slice(u,c),{indexes:this.indexes.slice(u,c)})}}throw new Error("The rowLoc is illegal")}}]),n}(n(9643).Z)},4674:function(t,e,n){"use strict";n.d(e,{Pz:function(){return s},U7:function(){return i},dN:function(){return o},e1:function(){return u},ej:function(){return c},l7:function(){return f},lz:function(){return l}});var r=n(9982),a=n(1438);function i(t){return(0,r.hj)(t)||(0,r.HD)(t)}function o(t,e){return(0,a.hu)((0,r.kJ)(t),"Data must be an array"),e?((0,a.hu)((null==e?void 0:e.length)===t.length,"Index length is ".concat(null==e?void 0:e.length,", but data size is ").concat(t.length)),e):(0,a.w6)(t.length)}function u(t,e){return!t&&JSON.stringify(e)?e:t}function c(t){return Array((0,r.hj)(t)?t:0).fill(" ").concat(" ").join("")}function s(t){var e;return(null===(e=JSON.stringify(t))||void 0===e||null===(e=e.replace(/\\n/g,""))||void 0===e||null===(e=e.replace(/\\/g,""))||void 0===e||null===(e=e.replace(/"\[/g,"["))||void 0===e||null===(e=e.replace(/\]"/g,"]"))||void 0===e||null===(e=e.replace(/"\{/g,"{"))||void 0===e?void 0:e.replace(/\}"/g," }"))||"undefined"}function l(t){var e;return null===(e=s(t))||void 0===e?void 0:e.length}function f(t,e){try{if("string"===e&&!(0,r.HD)(t))return"".concat(t);if("boolean"===e&&!(0,r.jn)(t))return Boolean(t);if("null"===e&&!(0,r.kK)(t))return null;if(("integer"===e||"float"===e)&&!(0,r.hj)(t))return+t;if("date"===e&&!(0,r.J_)(t)&&((0,r.hj)(t)||(0,r.HD)(t)))return new Date(t)}catch(t){throw new Error(t)}return t}},2616:function(t,e,n){"use strict";n.d(e,{eu:function(){return k},AV:function(){return M},EB:function(){return N},IS:function(){return v},s6:function(){return m},Fp:function(){return f},F_:function(){return h},J6:function(){return p},C2:function(){return y},VV:function(){return s},_D:function(){return l},wb:function(){return T},Vs:function(){return A},VR:function(){return _},gG:function(){return b},IN:function(){return w},Sm:function(){return d},QF:function(){return C},Gn:function(){return S},CA:function(){return x}});var r=n(4479),a=n.n(r),i=n(1438),o=new WeakMap;function u(t,e,n){return o.get(t)||o.set(t,new Map),o.get(t).set(e,n),n}function c(t,e){var n=o.get(t);if(n)return n.get(e)}function s(t){var e=c(t,"min");return void 0!==e?e:u(t,"min",Math.min.apply(Math,a()(t)))}function l(t){var e=c(t,"minIndex");return void 0!==e?e:u(t,"minIndex",function(t){for(var e=t[0],n=0,r=0;r<t.length;r+=1)t[r]<e&&(n=r,e=t[r]);return n}(t))}function f(t){var e=c(t,"max");return void 0!==e?e:u(t,"max",Math.max.apply(Math,a()(t)))}function h(t){var e=c(t,"maxIndex");return void 0!==e?e:u(t,"maxIndex",function(t){for(var e=t[0],n=0,r=0;r<t.length;r+=1)t[r]>e&&(n=r,e=t[r]);return n}(t))}function d(t){var e=c(t,"sum");return void 0!==e?e:u(t,"sum",t.reduce((function(t,e){return e+t}),0))}function p(t){return d(t)/t.length}function v(t){(0,i.hu)(t.some((function(t){return t>0})),"Each item in value must greater than 0.");var e=c(t,"geometricMean");return void 0!==e?e:u(t,"geometricMean",Math.pow(t.reduce((function(t,e){return t*e}),1),1/t.length))}function m(t){var e=Math.pow(2,16),n=c(t,"harmonicMean");return void 0!==n?n:u(t,"harmonicMean",e*t.length/t.reduce((function(t,n){return e/n+t}),0))}function g(t){return t.sort((function(t,e){return t>e?1:-1}))}function y(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.length,r=e?t:g(t);return n%2==1?r[(n-1)/2]:(r[n/2-1]+r[n/2])/2}function b(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,i.hu)(t.length>=3,"The length of value cannot be less than 3.");var n,r,a=t.length,o=e?t:g(t),u=y(o,!0);return a%2==1?(n=y(o.slice(0,(a-1)/2),!0),r=y(o.slice((a+1)/2),!0)):(n=y(o.slice(0,a/2),!0),r=y(o.slice(a/2),!0)),[n,u,r]}function _(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,i.hu)(e>0&&e<100,"The percent cannot be between (0, 100).");var r=n?t:g(t),a=Math.ceil(t.length*e/100)-1;return r[a]}function x(t){var e=p(t),n=c(t,"variance");return void 0!==n?n:u(t,"variance",t.reduce((function(t,n){return t+Math.pow(n-e,2)}),0)/t.length)}function w(t){return Math.sqrt(x(t))}function k(t){return w(t)/p(t)}function M(t,e){return(0,i.hu)(t.length===e.length,"The x and y must has same length."),p(t.map((function(t,n){return t*e[n]})))-p(t)*p(e)}function A(t,e){return M(t,e)/(w(t)*w(e))}function C(t){for(var e=0,n=0;n<t.length;n+=1)t[n]&&(e+=1);return e}function T(t){return t.length-C(t)}function S(t){var e={};return t.forEach((function(t){var n="".concat(t);e[n]?e[n]+=1:e[n]=1})),e}function N(t){return Object.keys(S(t)).length}},609:function(t,e,n){"use strict";n.d(e,{s:function(){return a}});var r=n(8972),a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(n<0||[t,e,n].some((function(t){return(0,r.isNil)(t)})))return NaN;var a=Math.abs((t-e)/n),i=1/Math.sqrt(2*Math.PI)*Math.exp(-1*Math.pow(a,2)/2),o=1/(1+.33267*a),u=1-i*(.4361836*o-.1201676*Math.pow(o,2)+.937298*Math.pow(o,3));return t>e?u:1-u}},7714:function(t,e,n){"use strict";n.d(e,{L:function(){return r},a:function(){return a}});var r={f:2/3,nSteps:3,delta:null},a={alpha:.05,alternative:"two-sided",rho:0}},3125:function(t,e,n){"use strict";n.d(e,{D:function(){return i}});var r=n(4479),a=n.n(r),i=function(t){var e=t.map((function(t){return Math.abs(t)}));return Math.max.apply(Math,a()(e))}},7201:function(t,e,n){"use strict";n.d(e,{Z:function(){return u}});var r=n(8972),a=n(2616),i=n(7714),o=n(8604),u=function(t,e,n){if(t.length!==e.length)return console.error("invalid arguments: First and second arguments must be arrays having the same length"),{pcorr:null,rejected:!1};var u,c,s=(0,r.mergeWith)(i.a,n,(function(t,e){return null!=e?e:t})),l=s.alpha,f=s.alternative,h=s.rho,d=(0,a.Vs)(t,e),p=!1;if(0!==h){u=(.5*Math.log((1+d)/(1-d))-.5*Math.log((1+h)/(1-h)))/(1/Math.sqrt(t.length-3)),"greater"===f?u>=(c=(0,o.T)(1-l))&&(p=!0):"less"===f?u<=(c=(0,o.T)(l))&&(p=!0):(c=(0,o.T)(1-l/2),Math.abs(u)>=c&&(p=!0))}else{var v=t.length-2;u=d*Math.sqrt(v)/Math.sqrt(1-Math.pow(d,2)),"greater"===f?u>=(c=(0,o.D)(1-l,v))&&(p=!0):"less"===f?u<=(c=(0,o.D)(l,v))&&(p=!0):(c=(0,o.D)(1-l/2,v),Math.abs(u)>=c&&(p=!0))}return{rejected:p,pcorr:d}}},8604:function(t,e,n){"use strict";n.d(e,{D:function(){return a},T:function(){return r}});var r=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(t>1||t<0||n<0)return NaN;var r=t<=.5?t:1-t,a=Math.sqrt(-2*Math.log(r)),i=a-(2.515517+.802853*a+.010328*Math.pow(a,2))/(1+1.432788*a+.189269*Math.pow(a,2)+.001308*Math.pow(a,3)),o=t<=.5?-1*i:i,u=n*o+e;return u},a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(t>1||t<0||e<=0)return NaN;if(1===e)return-Math.cos(Math.PI*t)/Math.sin(Math.PI*t);if(2===e)return(2*t-1)/Math.sqrt(2*t*(1-t));var n=t>.5?t:1-t,a=r(n),i=(Math.pow(a,3)+a)/4,o=(5*Math.pow(a,5)+16*Math.pow(a,3)+3*a)/96,u=(3*Math.pow(a,7)+19*Math.pow(a,5)+17*Math.pow(a,3)-15*a)/384,c=(79*Math.pow(a,9)+776*Math.pow(a,7)+1482*Math.pow(a,5)-1920*Math.pow(a,3)-945*a)/92160;return(t>.5?1:-1)*(a+i/e+o/Math.pow(e,2)+u/Math.pow(e,3)+c/Math.pow(e,4))}},1438:function(t,e,n){"use strict";n.d(e,{F6:function(){return c},Js:function(){return f},Tw:function(){return o},Yc:function(){return s},hu:function(){return l},w6:function(){return u}});var r=n(4479),a=n.n(r),i=n(9982);function o(t){return Array.from(new Set(t))}function u(t){return a()(Array(t).keys())}function c(t){return Array(t).fill(1)}function s(t){return Array(t).fill(0)}function l(t,e){if(!t)throw new Error(e)}function f(t,e){if(!(0,i.kJ)(t)||0===t.length||!(0,i.kJ)(e)||0===e.length||t.length!==e.length)return!1;for(var n={},r=0;r<e.length;r+=1){var a=e[r],o=t[r];if(n[a]){if(n[a]!==o)return!1}else n[a]=o}return!0}},4120:function(t,e,n){"use strict";n.d(e,{EB:function(){return h},IY:function(){return v},KP:function(){return p},NO:function(){return s},U0:function(){return r},cF:function(){return a},ew:function(){return m},kr:function(){return f},oP:function(){return i},ps:function(){return c},sh:function(){return d},vc:function(){return o},x4:function(){return u}});var r=[[!0,!1],[0,1],["true","false"],["Yes","No"],["True","False"],["0","1"],["是","否"]],a="([-_./\\s])",i="(?<year>(18|19|20)\\d{2})",o="(?<month>0?[1-9]|1[012])",u="(?<day>0?[1-9]|[12]\\d|3[01])",c="(?<week>[0-4]\\d|5[0-2])",s="(?<weekday>[1-7])",l="(0?\\d|[012345]\\d)",f="(?<hour>".concat(l,")"),h="(?<minute>".concat(l,")"),d="(?<second>".concat(l,")"),p="(?<millisecond>\\d{1,4})",v="(?<yearDay>(([0-2]\\d|3[0-5])\\d)|36[0-6])",m="(?<offset>Z|[+-]".concat("(0?\\d|1\\d|2[0-4])","(:").concat(l,")?)")},9982:function(t,e,n){"use strict";n.d(e,{Cf:function(){return s},HD:function(){return i},J_:function(){return f},Kn:function(){return d},M1:function(){return v},U:function(){return c},hj:function(){return o},i1:function(){return u},jn:function(){return h},kJ:function(){return p},kK:function(){return a},vn:function(){return l}});var r=n(4120);function a(t){return null==t||""===t||Number.isNaN(t)||"null"===t}function i(t){return"string"==typeof t}function o(t){return"number"==typeof t}function u(t){if(i(t)){var e=!1,n=t;/^[+-]/.test(n)&&(n=n.slice(1));for(var r=0;r<n.length;r+=1){var a=n[r];if("."===a){if(!1!==e)return!1;e=!0}if("."!==a&&!/[0-9]/.test(a))return!1}return""!==n.trim()}return!1}function c(t){return"number"==typeof t&&Number.isInteger(t)}function s(t){return!(!i(t)||!u(t))&&!t.includes(".")}function l(t){return!(!i(t)||!u(t))&&t.includes(".")}function f(t){return!(!t||Object.getPrototypeOf(t)!==Date.prototype)}function h(t,e){return e?r.U0.some((function(e){return t.every((function(t){return e.includes(t)}))})):"boolean"==typeof t}function d(t){return t&&Object.getPrototypeOf(t)===Object.prototype}function p(t){return Array.isArray(t)}function v(t){return!p(t)&&!d(t)}},9093:function(t,e,n){"use strict";n.d(e,{Cn:function(){return o},Ix:function(){return a},gN:function(){return i},qS:function(){return r}});var r={highlight:"#E09322",outlier:"#CB5140",font:"#bac4e2",defaultPointColor:"#fff"},a=500,i={textAlign:"center",fill:r.font,fontFamily:"Moderat",opacity:.65},o={innerRadius:.25,outerRadius:.8}},8382:function(t,e,n){"use strict";n.d(e,{l:function(){return h}});var r=n(9660),a=n(6798),i=n(5932),o=n(7784),u=n(8821),c=n(8045),s=function(t){return[(0,c.c)(t)]},l=function(t){return[(0,c.c)(t)]},f=n(8586);function h(t){var e,n=t.patterns[0].type,c={trend:r.D,time_series_outlier:a.p,category_outlier:i.F,change_point:o.J,low_variance:u._,majority:s,correlation:l},h=null===(e=c[n])||void 0===e?void 0:e.call(c,t);return(0,f.d)(h,t)}},5932:function(t,e,n){"use strict";n.d(e,{P:function(){return d},F:function(){return p}});var r=n(4479),a=n.n(r),i=n(8972),o=n(8346),u=n(9093),c=n(8045),s=n(1448),l=n.n(s),f=n(789),h=n(9198),d=function(t){var e=t.patterns;if(!(0,i.size)(e))return[];var n=[];return e.forEach((function(t){var e=function(t,e){var n=t.map((function(t){return{x:t.x,y:t.y}}));return l()(l()({type:"interval",data:n,encode:{x:"x",y:"y"}},e),{},{style:l()(l()({},null==e?void 0:e.style),{},{fill:u.qS.outlier})})}([t]),r=(0,f.b)([t],{style:{fontWeight:u.Ix,dy:-8},formatter:o.Z});n.push({categoryOutlier:[e,r]})})),n},p=function(t){var e=(0,c.c)(t),n=d(t),r=(0,h.d)(n);return[e].concat(a()(r))}},7784:function(t,e,n){"use strict";n.d(e,{J:function(){return d},u:function(){return h}});var r=n(4479),a=n.n(r),i=n(8972),o=n(9093),u=n(8346),c=n(7600),s=n(789),l=n(8045),f=n(9198),h=function(t){var e=t.patterns,n=o.qS.highlight;if(!(0,i.size)(e))return[];var r=e[0].measure,a=[];return e.forEach((function(t){var e=(0,c.G)([t],{style:{fill:n}}),i=(0,s.b)([t],{formatter:u.Z,label:function(t){return"".concat(t.x,", ").concat(r,": ").concat(t.y)},style:{dy:-20,background:!0,backgroundRadius:2,connector:!0,startMarker:!0,startMarkerFill:"#1c1e2d",startMarkerFillOpacity:.65}});a.push({changePoint:[e,i]})})),a},d=function(t){var e=(0,l.c)(t),n=h(t),r=(0,f.d)(n);return[e].concat(a()(r))}},8821:function(t,e,n){"use strict";n.d(e,{J:function(){return s},_:function(){return l}});var r=n(4479),a=n.n(r),i=n(8723),o=n(8045),u=n(9198),c=n(8346),s=function(t){var e=t.patterns,n=[];return e.forEach((function(t){var e=t.mean,r=(0,i.F)({y:e},{label:"mean: ".concat((0,c.Z)(e))});n.push({meanLine:[r]})})),n},l=function(t){var e=(0,o.c)(t),n=s(t),r=(0,u.d)(n);return[e].concat(a()(r))}},6798:function(t,e,n){"use strict";n.d(e,{p:function(){return v},g:function(){return p}});var r=n(4479),a=n.n(r),i=n(3100),o=n.n(i),u=n(8045),c=n(1448),s=n.n(c),l=n(8723),f=n(7600),h="baseline",d="interval",p=function(t){var e=t.data,n=o()(t.dimensions,1)[0].fieldName,r=t.patterns,a=r[0],i=a.baselines,u=a.thresholds,c=e.map((function(t,e){var r=i[e],a=[r-Math.abs(u[0]),r+u[1]];return{baseline:{x:t[n],y:r},interval:{x:t[n],y:a}}})),p=function(t,e){var n=e.encode,r={style:e.style,tooltip:e.tooltip};return t?s()(s()({},r),{},{type:"area",data:t,encode:s()({x:"x",y:"y"},n)}):null}(c.map((function(t){return t[d]})),{encode:{shape:"smooth"},style:{fillOpacity:.3,fill:"#ffd8b8"},tooltip:{title:"",items:[function(t,e,n,r){return{name:d,value:"".concat(r.y.value[e],"-").concat(r.y1.value[e]),color:"#ffd8b8"}}]}}),v=c.map((function(t){return t[h]}));return[{trendLine:[(0,l.F)({points:v},{encode:{shape:"smooth"},style:{lineWidth:1,stroke:"#ffa45c",lineDash:void 0},tooltip:{title:"",items:[{name:h,channel:"y"}]}})],anomalyArea:[p],outliers:[(0,f.G)(r,{style:{fill:"#f4664a",stroke:"#f4664a"},tooltip:{title:"",items:[{name:"outlier",channel:"y"}]}})]}]},v=function(t){var e=(0,u.c)(t),n=p(t)[0]||{},r=n.trendLine,i=void 0===r?[]:r,o=n.anomalyArea,c=void 0===o?[]:o,s=n.outliers,l=void 0===s?[]:s;return[].concat(a()(c),a()(i),[e],a()(l))}},9660:function(t,e,n){"use strict";n.d(e,{D:function(){return f},q:function(){return l}});var r=n(4479),a=n.n(r),i=n(3100),o=n.n(i),u=n(8723),c=n(8045),s=n(8346),l=function(t){var e=t.data,n=o()(t.dimensions,1)[0].fieldName,r=t.patterns,a=e.map((function(t,e){var a=r[0].regression.points[e];return[t[n],a]})),i=o()(r[0].regression.equation,2),c=i[0],l=i[1],f=a.map((function(t){return{x:t[0],y:t[1]}}));return[{trendLine:[(0,u.F)({points:f},{label:"y=".concat((0,s.Z)(c),"x").concat(l<0?"":"+").concat((0,s.Z)(l))})]}]},f=function(t){var e,n,r=(0,c.c)(t),i=l(t);return[r].concat(a()(null!==(e=null===(n=i[0])||void 0===n?void 0:n.trendLine)&&void 0!==e?e:[]))}},8045:function(t,e,n){"use strict";n.d(e,{c:function(){return o}});var r=n(1448),a=n.n(r),i=n(9093),o=function(t){var e,n,r=t.data,o=t.patterns,u=t.dimensions,c=t.measures,s=o[0].type,l={data:r,encode:{x:u[0].fieldName,y:c[0].fieldName}};return"majority"===s?a()(a()({},l),{},{type:"interval",encode:{color:u[0].fieldName,y:c[0].fieldName},transform:[{type:"stackY"}],coordinate:{type:"theta",innerRadius:i.Cn.innerRadius,outerRadius:i.Cn.outerRadius},tooltip:{items:[{field:u[0].fieldName},{field:c[0].fieldName}]}}):"trend"===s||"time_series_outlier"===s||"change_point"===s?a()(a()({},l),{},{type:"line",style:{lineWidth:2}}):"category_outlier"===s||"low_variance"===s?a()(a()({},l),{},{type:"interval"}):"correlation"===s?a()(a()({},l),{},{type:"point",encode:{x:null===(e=c[0])||void 0===e?void 0:e.fieldName,y:null===(n=c[1])||void 0===n?void 0:n.fieldName}}):null}},8723:function(t,e,n){"use strict";n.d(e,{F:function(){return o}});var r=n(1448),a=n.n(r),i=n(9093),o=function(t,e){var n=t.points,r=t.x,o=t.y,u=e.encode,c=e.style,s=e.label,l=e.tooltip,f={style:a()({lineDash:[2,2],stroke:i.qS.highlight},c),labels:s?[{text:s,selector:"last",position:"right",style:{textBaseline:"bottom",textAlign:"end",dy:-24}}]:void 0,tooltip:l};return n?a()(a()({},f),{},{type:"line",data:n,encode:a()({x:"x",y:"y"},u)}):r?a()(a()({},f),{},{type:"lineX",data:[r]}):o?a()(a()({},f),{},{type:"lineY",data:[o]}):null}},7600:function(t,e,n){"use strict";n.d(e,{G:function(){return o}});var r=n(1448),a=n.n(r),i=n(8972),o=function(t,e){var n=[];return t.forEach((function(t){var e=t.x,r=t.y;(0,i.isNil)(e)||(0,i.isNil)(r)||n.push({x:e,y:r})})),a()({type:"point",data:n,encode:{x:"x",y:"y"}},e)}},789:function(t,e,n){"use strict";n.d(e,{b:function(){return s}});var r=n(1448),a=n.n(r),i=n(9057),o=n.n(i),u=n(8972),c=n(9093),s=function(t,e){var n=e||{},r=n.style,i=n.label,s=n.formatter,l=t[0],f=l.measure,h=l.dimension;return{type:"text",data:t.map((function(t){var e=(0,u.isFunction)(i)?i(t):i,n=(0,u.isFunction)(s)?s(t.y):t.y;return o()(o()(o()({},h,t.x),f,t.y),"label",null!=e?e:"".concat(t.x,"\n").concat(n))})),encode:{x:h,y:f,text:"label"},style:a()(a()({},c.gN),r)}}},8586:function(t,e,n){"use strict";n.d(e,{d:function(){return i}});var r=n(1448),a=n.n(r),i=function(t,e){var n=e.patterns.map((function(t){return t.type})).includes("majority")?{scale:{y:{nice:!1}}}:{scale:{y:{nice:!0}}};return a()({type:"view",theme:"dark",axis:{x:{labelAutoHide:!0,labelAutoRotate:!1,title:!1},y:{title:!1}},interaction:{tooltip:{groupName:!1}},legend:!1,children:t},n)}},9198:function(t,e,n){"use strict";n.d(e,{d:function(){return a}});var r=n(8972),a=function(t){return(0,r.flattenDeep)((0,r.map)(t,(function(t){return Object.values(t)})))}},4977:function(t,e,n){"use strict";n.d(e,{B3:function(){return f},GT:function(){return h},K2:function(){return s},Mi:function(){return d},O2:function(){return u},Pe:function(){return i},a4:function(){return o},bc:function(){return r},qy:function(){return l},xq:function(){return c},yZ:function(){return a}});var r=.95,a=.05,i=.01,o=.2,u=20,c=1.5,s=2,l=["category_outlier","trend","change_point","time_series_outlier","majority","low_variance","correlation"],f="The input does not meet the requirements.",h="No insights were found at the specified significance threshold.",d=.15},9125:function(t,e,n){"use strict";n.d(e,{M:function(){return i}});var r=n(8972),a=function(t){var e,n,a,i=t.data,o=t.subjectInfo,u=t.fieldPropsMap,c=t.lom,s=o.dimensions;return(null==i?void 0:i.length)<3?"The data length is less than 3. ":function(t,e,n){var r=t.dimensions,a=t.measures;return r.length===e&&a.length===n}(o,1,1)?!!(Array.isArray(c)?null!==(e=(0,r.intersection)(null===(n=u[s[0]])||void 0===n?void 0:n.levelOfMeasurements,c))&&void 0!==e&&e.length:null!==(a=u[s[0]])&&void 0!==a&&null!==(a=a.levelOfMeasurements)&&void 0!==a&&a.includes(c))||"The type of the dimension field is not included in the option ".concat(Array.isArray(c)?c:[c],". "):"The length of the measure or dimension is not 1. "},i={category_outlier:function(t){var e=t.data,n=t.subjectInfo,r=t.fieldPropsMap;return a({data:e,subjectInfo:n,fieldPropsMap:r,lom:["Nominal","Discrete","Ordinal"]})},trend:function(t){var e=t.data,n=t.subjectInfo,r=t.fieldPropsMap;return a({data:e,subjectInfo:n,fieldPropsMap:r,lom:"Time"})},change_point:function(t){var e=t.data,n=t.subjectInfo,r=t.fieldPropsMap;return a({data:e,subjectInfo:n,fieldPropsMap:r,lom:"Time"})},time_series_outlier:function(t){var e=t.data,n=t.subjectInfo,r=t.fieldPropsMap;return a({data:e,subjectInfo:n,fieldPropsMap:r,lom:"Time"})},low_variance:function(t){var e=t.data,n=t.subjectInfo,r=t.fieldPropsMap,i=a({data:e,subjectInfo:n,fieldPropsMap:r,lom:["Nominal","Discrete","Ordinal"]});if(!0!==i)return i;var o=n.measures;return["float","integer"].includes(r[o[0].fieldName].recommendation)?0!==r[o[0].fieldName].mean||"The low variance test uses the coefficient of variation sigma/mean as the test statistic and requires that the mean cannot be 0. ":"The recommended data type of measure is not float or integer. "},correlation:function(t){var e,n,r=t.data,a=t.subjectInfo,i=t.fieldPropsMap,o=a.measures;return(null==r?void 0:r.length)<3?"The data length is less than 3. ":2!==o.length?"The length of the measure or dimension is not 2. ":!(null===(e=i[o[0].fieldName].levelOfMeasurements)||void 0===e||!e.includes("Continuous")||null===(n=i[o[1].fieldName].levelOfMeasurements)||void 0===n||!n.includes("Continuous"))||"Level of measurement is not continuous. "}}},1484:function(t,e,n){"use strict";n.d(e,{ew:function(){return G}});var r=n(4479),a=n.n(r),i=n(8972),o=n(2616);function u(t,e){var n=null==t,r=null==e;return n&&r?0:n?1:r?-1:t-e}function c(t,e){var n=e*t.length,r=Math.ceil(n);return r===n?0===r?t[0]:r===t.length?t[t.length-1]:(t[r-1]+t[r])/2:t[r-1]}var s={IQR:function(t,e){var n=(null==e?void 0:e.k)||1.5,r=t.slice().sort(u),a=c(r,.25),i=c(r,.75),o=i-a,s={upper:{threshold:0,indexes:[]},lower:{threshold:0,indexes:[]}};return s.lower.threshold=a-n*o,s.upper.threshold=i+n*o,t.forEach((function(t,e){t<=s.lower.threshold?s.lower.indexes.push(e):t>=s.upper.threshold&&s.upper.indexes.push(e)})),s}},l=n(4977),f=n(6845),h=function(t,e){var n=e||{},r=n.method,u=n.iqrK,c=n.confidenceInterval,h=void 0===c?l.bc:c,d=[],p=[],v=t.map((function(t,e){return{index:e,value:t}}));if("p-value"!==r){var m=s.IQR(t,{k:null!=u?u:l.xq}),g=m.lower.indexes,y=m.upper.indexes;[].concat(a()(g),a()(y)).forEach((function(e){var n=t[e],r=(v.findIndex((function(t){return t.value===n}))+1)/t.length,a=r>.5?r:1-r;d.push({index:e,value:n,significance:a})})),p.push(m.lower.threshold,m.upper.threshold)}else{var b=(0,i.orderBy)(v,(function(e){return Math.abs((0,o.J6)(t)-e.value)}),["desc"]);p.push.apply(p,a()((0,f.ZJ)(t,h,"two-sided")));for(var _=0;_<b.length;_+=1){var x=b[_],w=x.value,k=x.index,M=1-(0,f.Mc)(t,w,"two-sided");if(M<h)break;d.push({index:k,value:w,significance:M})}}return{outliers:d,thresholds:p}},d=n(660),p=n.n(d);function v(t){return t>0?1:t<0?-1:0}function m(t){for(var e=t.slice().sort(),n=[e[0]],r=[1],a=1;a<e.length;a+=1)e[a]!==n[n.length-1]?(n.push(e[a]),r.push(1)):r[r.length-1]+=1;return[n,r]}function g(t){for(var e=t.slice().sort(),n=[],r=0;r<t.length;r+=1){var a=t[r],o=e.indexOf(a)+1,u=(0,i.lastIndexOf)(e,a)+1;n.push(o===u?o:(o+u)/2)}return n}function y(t,e){var n=null==t?void 0:t.length,r=g(t),a=Math.abs(2*(0,i.sumBy)(r.slice(0,e))-e*(n+1));return 2*Math.exp(-6*Math.pow(a,2)/(Math.pow(n,2)+Math.pow(n,3)))}function b(t,e){return Math.abs(t.data-e.data)>=1}function _(t,e,n){var r=null==t?void 0:t.length,a=n||4;if(r<=2*a+3)return 0;for(var o=Array(r).fill(0),u=a;u<=r-a;u+=1){var c=(0,i.mean)(t.slice(u-a,u)),s=(0,i.mean)(t.slice(u,u+a));o[u]=Math.abs(c-s)}return(0,f.Mc)(o.slice(a,r-a+1),o[e])}var x=n(3125);var w={Bayesian:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=new(p())({breakpointVerifier:b,chunkSize:t.length,iteratee:function(t){return t}});e.exec(t);var n=e.breakPoints().map((function(e){return{index:e.index,significance:1-y(t,e.index)}}));return n},Window:function(t,e){var n=null==t?void 0:t.length,r=(null==e?void 0:e.windowSize)||4;if(n<=2*r+3)return[];for(var a=(null==e?void 0:e.significanceLimit)||l.bc,o=Array(n).fill(0),u=r;u<=n-r;u+=1){var c=(0,i.mean)(t.slice(u-r,u)),s=(0,i.mean)(t.slice(u,u+r));o[u]=Math.abs(c-s)}for(var h=o.slice(r,n-r+1),d=h.sort((function(t,e){return e-t})),p=[],v=function(){var t=d[m],e=o.findIndex((function(e){return e===t})),n=1-(0,f.Mc)(h,t);n>=a&&p.push({index:e,significance:n})},m=0;m<d.length;m+=1)v();return p},PettittTest:function(t){for(var e=null==t?void 0:t.length,n=g(t),r=0,a=-1,o=0;o<e;o+=1){var u=Math.abs(2*(0,i.sumBy)(n.slice(0,o))-o*(e+1));u>r&&(r=u,a=o)}return{index:a,significance:1-2*Math.exp(-6*Math.pow(r,2)/(Math.pow(e,2)+Math.pow(e,3)))}},BuishandUTest:function(t){var e=null==t?void 0:t.length,n=(0,i.mean)(t),r=t.map((function(e,r){return(0,i.sum)(t.slice(0,r+1))-n*(r+1)})),a=(0,i.sumBy)(r.slice(0,e-1),(function(t){return Math.pow(t,2)}))/(e*(e+1)),o=(0,x.D)(r),u=r.findIndex((function(t){return t===o}));return{uValue:a,index:u,significance:1-_(t,u)}}},k=n(1448),M=n.n(k),A=n(7201),C=n(7714);var T=n(1438),S=function(t){for(var e=[],n=function(n){e.push(t.map((function(t){return t[n]})))},r=0;r<t[0].length;r+=1)n(r);return e},N=function(t,e){var n;if((null===(n=t[0])||void 0===n?void 0:n.length)!==e.length)return null;var r=[],a=S(e);return t.forEach((function(t){return r.push(a.map((function(e){return function(t,e){if(t.length!==e.length)return null;var n=0;return t.forEach((function(t,r){n+=t*e[r]})),n}(t,e)})))})),r},O=function(t){for(var e=t[0],n=1;n<t.length;n+=1)e=N(e,t[n]);return e},I=function(t,e,n){var r,a,i,o=[(0,T.F6)(t.length),t],u=S(o),c=S([e]),s=(r=n).map((function(t,e){var n=Array(r.length).fill(0);return n[e]=t,n})),l=(a=O([o,s,u]),i=a[0][0]*a[1][1]-a[0][1]*a[1][0],[[a[1][1]/i,-a[0][1]/i],[-a[1][0]/i,a[0][0]/i]]);return O([l,o,s,c])},P=function(t,e,n){for(var r=t.length,a=(0,i.mergeWith)(C.L,n,(function(t,e){return null!=e?e:t})),u=Math.ceil(r*a.f),c=t.map((function(e){return t.map((function(t){return Math.abs(e-t)})).sort((function(t,e){return t-e}))[u]})),s=t.map((function(e,n){return t.map((function(t){return function(t){return!(0,i.isNumber)(t)||Math.abs(t)>=1?0:Math.pow(1-Math.pow(Math.abs(t),3),3)}((t-e)/c[n])}))})),l=(0,T.F6)(r),f=(0,T.Yc)(r),h=function(){for(var n=0;n<r;n+=1){var a=s[n].map((function(t,e){return t*l[e]})),u=I(t,e,a);f[n]=u[0][0]+u[1][0]*t[n]}var c=function(t,e){return t.length!==e.length?null:t.map((function(t,n){return t-e[n]}))}(e,f),h=(0,o.C2)(c.map((function(t){return Math.abs(t)})));c.forEach((function(t,e){l[e]=function(t){return!(0,i.isNumber)(t)||Math.abs(t)>=1?0:Math.pow(1-Math.pow(t,2),2)}(t/(6*h))}))},d=0;d<a.nSteps;d+=1)h();return{y:f}};var R=n(7914),j=n.n(R),D=n(3100),E=n.n(D),L=n(609),B=n(8604);var z={mkTest:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.05,n=null==t?void 0:t.length,r=0,a=0;a<n-1;a+=1)for(var o=a+1;o<n;o+=1)r+=v(t[o]-t[a]);var u=m(t),c=E()(u,2),s=c[0],l=c[1],f=s.length,h=(n*(n-1)*(2*n+5)-(f===n?0:(0,i.sumBy)(l,(function(t){return t*(t-1)*(2*t+5)}))))/18,d=0;r>0?d=(r-1)/Math.sqrt(h):r<0&&(d=(r+1)/Math.sqrt(h));var p=2*(1-(0,L.s)(Math.abs(d),0,1)),g=Math.abs(d)>(0,B.T)(1-e/2,0,1),y="no trend";return d<0&&g?y="decreasing":d>0&&g&&(y="increasing"),{trend:y,pValue:p,zScore:d}}};var Q={category_outlier:function(t){var e=(0,f.BB)(t),n="category_outlier";if((0,i.isString)(e))return(0,f.rx)({detailInfo:e,insightType:n,infoType:"verificationFailure"});var r=(0,f.lh)(t),a=r.dimension,u=r.values,c=r.measure;if((0,i.isNil)(a)||(0,i.isNil)(c))return(0,f.rx)({detailInfo:"Measure or dimension is empty.",insightType:n,infoType:"verificationFailure"});if(1===(0,o.EB)(u))return(0,f.rx)({insightType:n,infoType:"noInsight",customInfo:{info:"Each value in the data is the same. No outliers were found."}});var s=t.data,l=(0,i.get)(t,"options.algorithmParameter.outlier"),d=h(u,l).outliers;if(0===d.length){var p="No outliers were found using method ".concat("p-value"!==(null==l?void 0:l.method)?"Inter Quartile Range":"Normal Distribution test",".");return(0,f.rx)({insightType:n,infoType:"noInsight",customInfo:{info:p}})}return d.map((function(t){var e=t.index,r=t.significance;return{type:n,dimension:a,measure:c,significance:r,index:e,x:s[e][a],y:s[e][c],significantInsight:!0}}))},trend:function(t){var e,n=(0,f.BB)(t),r="trend";if((0,i.isString)(n))return(0,f.rx)({detailInfo:n,insightType:r,infoType:"verificationFailure"});var a=(0,f.lh)(t),o=a.dimension,u=a.values,c=a.measure;if((0,i.isNil)(o)||(0,i.isNil)(c))return(0,f.rx)({detailInfo:"Measure or dimension is empty.",insightType:r,infoType:"verificationFailure"});var s=(0,i.get)(t,"options.algorithmParameter.trend"),h=function(t,e){var n,r=null!==(n=null==e?void 0:e.threshold)&&void 0!==n?n:l.yZ,a=z.mkTest(t,r),i=a.pValue,o=a.trend,u=j().linear(t.map((function(t,e){return[e,t]}))),c=u.r2,s=u.points,f=u.equation;return{trend:o,significance:1-i,regression:{r2:c,points:s.map((function(t){return t[1]})),equation:f}}}(u,s);return[M()(M()({},h),{},{type:"trend",dimension:o,measure:c},"no trend"===h.trend?{significantInsight:!1,info:"The Mann-Kendall (MK) test does not pass at the specified significance level ".concat(null!==(e=null==s?void 0:s.threshold)&&void 0!==e?e:l.yZ,".")}:{significantInsight:!0})]},change_point:function(t){var e=(0,f.BB)(t),n="change_point";if((0,i.isString)(e))return(0,f.rx)({detailInfo:e,insightType:n,infoType:"verificationFailure"});var r=t.data,a=(0,f.lh)(t),o=a.dimension,u=a.values,c=a.measure;if((0,i.isNil)(o)||(0,i.isNil)(c))return(0,f.rx)({detailInfo:"Measure or dimension is empty.",insightType:n,infoType:"verificationFailure"});var s=function(t,e){var n,r=w.Bayesian(t),a=[],i=1-(null!==(n=null==e?void 0:e.threshold)&&void 0!==n?n:l.Mi);return r.forEach((function(t){(null==t?void 0:t.index)>=0&&(null==t?void 0:t.significance)>=i&&a.push(t)})),a}(u,(0,i.get)(t,"options.algorithmParameter.changePoint"));if(0===s.length){return(0,f.rx)({insightType:n,infoType:"noInsight",customInfo:{info:"Bayesian Online Changepoint Detection does not pass."}})}var h=[];return s.forEach((function(t){var e=t.index,a=t.significance;(0,i.isNil)(r[e])||h.push({type:n,dimension:o,measure:c,significance:a,index:e,x:r[e][o],y:r[e][c],significantInsight:!0})})),h},time_series_outlier:function(t){var e=(0,f.BB)(t),n="time_series_outlier";if((0,i.isString)(e))return(0,f.rx)({detailInfo:e,insightType:n,infoType:"verificationFailure"});var r=t.data,a=(0,f.lh)(t),u=a.dimension,c=a.values,s=a.measure;if((0,i.isNil)(u)||(0,i.isNil)(s))return(0,f.rx)({detailInfo:"Measure or dimension is empty.",insightType:n,infoType:"verificationFailure"});if(1===(0,o.EB)(c))return(0,f.rx)({insightType:n,infoType:"noInsight"});var d=function(t,e){var n=Array(t.length).fill(0).map((function(t,e){return e})),r=P(n,t,{nSteps:l.K2}),a=t.map((function(t,e){return t-r.y[e]})),i=h(a,e),o=i.outliers,u=i.thresholds;return{outliers:o,baselines:r.y,thresholds:u}}(c,(0,i.get)(t,"options.algorithmParameter.outlier")),p=d.outliers,v=d.baselines,m=d.thresholds;return 0===p.length?(0,f.rx)({insightType:n,infoType:"noInsight",customInfo:{baselines:v,thresholds:m,dimension:u,measure:s,info:"No outliers were found."}}):p.map((function(t){var e=t.index,a=t.significance;return{type:n,dimension:u,measure:s,significance:a,index:e,x:r[e][u],y:r[e][s],baselines:v,thresholds:m,significantInsight:!0}}))},majority:function(t){var e=(0,f.BB)(t),n="majority";if((0,i.isString)(e))return(0,f.rx)({detailInfo:e,insightType:n,infoType:"verificationFailure"});var r=t.data,a=(0,f.lh)(t),o=a.dimension,u=a.values,c=a.measure;if((0,i.isNil)(o)||(0,i.isNil)(c))return(0,f.rx)({detailInfo:"Measure or dimension is empty.",insightType:n,infoType:"verificationFailure"});var s=(0,i.get)(t,"options.algorithmParameter.majority"),l=function(t,e){for(var n=0,r=-1/0,a=-1,i=0;i<(null==t?void 0:t.length);i+=1)n+=t[i],t[i]>r&&(r=t[i],a=i);var o=(null==e?void 0:e.limit)||.6;if(0===n)return null;var u=r/n;return u>o&&u<1?{index:a,value:r,proportion:u,significance:u}:null}(u,s);if(l){var h=l.significance,d=l.index;return[{type:n,dimension:o,measure:c,significance:h,index:d,proportion:l.proportion,x:r[d][o],y:r[d][c],significantInsight:!0}]}var p="After disassembling with the given dimension, the proportion of the maximum value does not exceed ".concat((null==s?void 0:s.limit)||.6,".");return(0,f.rx)({insightType:n,infoType:"noInsight",customInfo:{info:p,dimension:o,measure:c}})},low_variance:function(t){var e=(0,f.BB)(t),n="low_variance";if((0,i.isString)(e))return(0,f.rx)({detailInfo:e,insightType:n,infoType:"verificationFailure"});var r=(0,f.lh)(t),a=r.dimension,u=r.values,c=r.measure;if((0,i.isNil)(a)||(0,i.isNil)(c))return(0,f.rx)({detailInfo:"Measure or dimension is empty.",insightType:n,infoType:"verificationFailure"});var s=(0,i.get)(t,"options.algorithmParameter.lowVariance"),l=function(t,e){var n=(0,o.eu)(t);return n>=((null==e?void 0:e.cvThreshold)||.15)?null:{significance:1-n,mean:(0,o.J6)(t)}}(u,s);if(l)return[{type:n,dimension:a,measure:c,significance:l.significance,mean:l.mean,significantInsight:!0}];var h="The coefficient of variance of the data is greater than ".concat((null==s?void 0:s.cvThreshold)||.15,". The data does not follow a uniform distribution.");return(0,f.rx)({insightType:n,infoType:"noInsight",customInfo:{info:h}})},correlation:function(t){var e,n,r=(0,f.BB)(t),a="correlation",o=t.data,u=t.measures,c=t.dimensions,s=t.options;if((0,i.isString)(r)||!c)return(0,f.rx)(M()({insightType:a,infoType:"verificationFailure"},(0,i.isString)(r)?{detailInfo:r}:{}));var l=u[0].fieldName,h=u[1].fieldName,d=o.map((function(t){return null==t?void 0:t[l]})),p=o.map((function(t){return null==t?void 0:t[h]})),v=null==s||null===(e=s.algorithmParameter)||void 0===e?void 0:e.correlation,m=function(t,e,n){var r=(0,A.Z)(t,e,n),a=r.rejected,i=r.pcorr;return a?{pcorr:i,significance:Math.abs(i)}:null}(d,p,v);if(m)return[M()(M()({},m),{},{type:a,measures:[l,h],significantInsight:!0})];var g="The Pearson product-moment correlation test does not pass at the specified significance level ".concat(null!==(n=null==v?void 0:v.alpha)&&void 0!==n?n:C.a.alpha,".");return(0,f.rx)({insightType:a,infoType:"noInsight",customInfo:{info:g}})}},G=function(t){var e=t.insightType,n=void 0===e?"trend":e,r=(t.options||{}).filterInsight,o=void 0!==r&&r,u=Q[n];return(0,i.isFunction)(u)?(0,i.flow)([u].concat(a()(o?[f.te]:[])))(t):[]}},6845:function(t,e,n){"use strict";n.d(e,{BB:function(){return v},Mc:function(){return h},Mo:function(){return y},ZJ:function(){return d},lh:function(){return p},rx:function(){return m},te:function(){return g}});var r=n(1448),a=n.n(r),i=n(8972),o=n(2616),u=n(609),c=n(8604),s=n(2434),l=n(4977),f=n(9125),h=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"two-sided",r=(0,i.mean)(t),a=(0,o.IN)(t),c=(0,u.s)(e,r,a);return"two-sided"===n?c<.5?2*c:2*(1-c):"less"===n?c:1-c},d=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"two-sided",r=(0,i.mean)(t),a=(0,o.IN)(t),u=1-e;return"greater"===n?[(0,c.T)(e,r,a),(0,o.Fp)(t)]:"less"===n?[(0,o.VV)(t),(0,c.T)(u,r,a)]:[(0,c.T)(u/2,r,a),(0,c.T)(e+u/2,r,a)]},p=function(t){var e,n,r=t.data,a=t.dimensions,i=t.measures,o=null==a||null===(e=a[0])||void 0===e?void 0:e.fieldName,u=null==i||null===(n=i[0])||void 0===n?void 0:n.fieldName,c=r.map((function(t){return Number(null==t?void 0:t[u])}));return{dimension:o,measure:u,values:c}},v=function(t){var e=t.data,n=t.dimensions,r=t.measures,a=t.options,i=t.insightType,o=a||{},u=o.dataValidation,c=void 0!==u&&u,l=o.dataProcessInfo;if(!e||0===e.length)return"No data. ";if(!c)return!0;var h=e.filter((function(t){return!Object.values(t).some((function(t){return null==t}))})),d=(0,s.mn)(h,l).reduce((function(t,e){return t[e.name]=e,t}),{}),p=f.M[i];return!p||p({data:e,subjectInfo:{dimensions:null==n?void 0:n.map((function(t){return t.fieldName})),measures:r,subspace:[]},fieldPropsMap:d})},m=function(t){var e=t.infoType,n=t.insightType,r=t.detailInfo,i=void 0===r?"":r,o=t.customInfo,u=void 0===o?{}:o,c="".concat(i).concat("noInsight"===e?l.GT:l.B3);return[a()({significantInsight:!1,type:n,info:c,significance:0},u)]},g=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t.filter((function(t){return t.significantInsight}))},y=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t.filter((function(t){return![t.baselines,t.thresholds,t.x].every(i.isNil)}))}},4477:function(t,e,n){"use strict";n.d(e,{Z:function(){return V}});var r={};n.r(r),n.d(r,{CategoryNarrativeStrategy:function(){return D},ChangePointNarrativeStrategy:function(){return y},CommonnessNarrativeStrategy:function(){return G},CorrelationNarrativeStrategy:function(){return z},ExceptionNarrativeStrategy:function(){return $},LowVarianceNarrativeStrategy:function(){return R},MajorityNarrativeStrategy:function(){return I},TimeSeriesOutlierNarrativeStrategy:function(){return C},TrendNarrativeStrategy:function(){return N}});var a=n(4528),i=n.n(a),o=n(8798),u=n.n(o),c=n(9057),s=n.n(c),l=n(7267),f=n.n(l),h=n(9913),d=n.n(h),p=n(8972),v=n(8670),m=u()((function t(){i()(this,t)}));s()(m,"insightType",void 0),s()(m,"structures",void 0),s()(m,"structureTemps",void 0);var g={dateRange:{varType:"time_desc"},total:{varType:"metric_value"},measure:{varType:"metric_name"}},y=function(t){f()(n,t);var e=d()(n);function n(){return i()(this,n),e.apply(this,arguments)}return u()(n,[{key:"generateTextSpec",value:function(t,e){var r=t.patterns,a=t.data,i=r[0].dimension;return(0,v.Z)({structures:n.structures[e],variable:{dateRange:"".concat((0,p.first)(a)[i],"~").concat((0,p.last)(a)[i]),measure:r[0].measure,total:r.length}}).sections[0].paragraphs}}]),n}(m);s()(y,"insightType","change_point"),s()(y,"structures",{"zh-CN":[{template:"${measure} 在 ${dateRange} 中,共出现 ${total} 次较大变化,值得关注。",variableMetaMap:g}],"en-US":[{template:"${total} major changes detected for ${measure} during ${dateRange}",variableMetaMap:g}]});var b=n(1448),_=n.n(b),x=function(t,e){return t>0?"en-US"===e?"more than":"超过":t<0?"en-US"===e?"less than":"少于":"en-US"===e?"equal":"持平"},w={change_point:"突变点",time_series_outlier:"时序异常值",trend:"趋势",majority:"主要因素",low_variance:"分布均匀",category_outlier:"异常值",correlation:"相关性"},k=function(t,e){return"en-US"===e?(0,p.lowerCase)(t):w[t]},M=function(t){return"zh-CN"===t?",":", "},A={dateRange:{varType:"time_desc"},measure:{varType:"metric_name"},max:{varType:"metric_value"},min:{varType:"metric_value"},total:{varType:"metric_value"},".x":{varType:"dim_value"},".y":{varType:"metric_value"},".base":{varType:"metric_value"},".diff":{varType:"delta_value"}},C=function(t){f()(n,t);var e=d()(n);function n(){return i()(this,n),e.apply(this,arguments)}return u()(n,[{key:"generateTextSpec",value:function(t,e){var r=t.patterns,a=t.data,i=r[0],o=i.measure,u=i.dimension;return(0,v.Z)({structures:n.structures[e],variable:{dateRange:"".concat((0,p.first)(a)[u],"~").concat((0,p.last)(a)[u]),total:r.length,measure:o,max:(0,p.maxBy)(a,o)[o],min:(0,p.minBy)(a,o)[o],outliers:r.map((function(t){var n=t.baselines[t.index],r=t.y-n;return _()(_()({},t),{},{base:n,diffDesc:x(r,e),diff:r})}))}}).sections[0].paragraphs}}]),n}(m);s()(C,"insightType","time_series_outlier"),s()(C,"structures",{"zh-CN":[{template:"${dateRange},${measure} 波动范围为最大值 ${max}, 最小值 ${min},有 ${total} 个异常点,按超过基线大小排序如下:",variableMetaMap:A},{template:"${.x},${measure} 为 ${.y}, 相比基线(${.base})${.diffDesc} ${.diff}。",displayType:"bullet",bulletOrder:!0,useVariable:"outliers",variableMetaMap:A}],"en-US":[{template:"${total} outliers detected for ${measure} during ${dateRange}",variableMetaMap:A},{template:"${.x}: ${measure} at ${.y} (${.diffDesc} ${.diff} baseline)",displayType:"bullet",bulletOrder:!0,useVariable:"outliers",variableMetaMap:A}]});var T={decreasing:"下降",increasing:"上升","no trend":"无明显趋势。"},S={dateRange:{varType:"time_desc"},trend:{varType:"trend_desc"},measure:{varType:"metric_name"}},N=function(t){f()(n,t);var e=d()(n);function n(){return i()(this,n),e.apply(this,arguments)}return u()(n,[{key:"generateTextSpec",value:function(t,e){var r=t.patterns,a=t.data,i=r[0],o=i.dimension,u=i.measure,c=i.trend;return(0,v.Z)({structures:n.structures[e],variable:{dateRange:"".concat((0,p.first)(a)[o],"~").concat((0,p.last)(a)[o]),measure:u,trend:"en-US"===e?c:T[c]}}).sections[0].paragraphs}}]),n}(m);s()(N,"insightType","trend"),s()(N,"structures",{"zh-CN":[{template:"${dateRange},${measure}${trend}。",variableMetaMap:S}],"en-US":[{template:"In ${dateRange}, the ${measure} is ${trend}.",variableMetaMap:S}]});var O={measure:{varType:"metric_name"},total:{varType:"metric_value"},proportion:{varType:"proportion"},dimValue:{varType:"dim_value"},y:{varType:"metric_value"}},I=function(t){f()(n,t);var e=d()(n);function n(){return i()(this,n),e.apply(this,arguments)}return u()(n,[{key:"generateTextSpec",value:function(t,e){var r=t.patterns,a=t.data,i=r[0],o=i.dimension,u=i.measure,c=i.x,s=i.y,l=(0,p.sumBy)(a,u);return(0,v.Z)({structures:n.structures[e],variable:{dimension:o,measure:u,dimValue:c,y:s,total:l,proportion:s/l}}).sections[0].paragraphs}}]),n}(m);s()(I,"insightType","majority"),s()(I,"structures",{"zh-CN":[{template:"按照 ${dimension} 对 ${measure} 进行拆解,${dimValue} 的 ${measure} 显著高于其他维值,为 ${y}, 占总数(${total})的 ${proportion}。",variableMetaMap:O}],"en-US":[{template:"The ${measure} for ${dimValue} is significantly higher than the other dimensions, at ${y}, ${proportion} of the total (${total}).",variableMetaMap:O,displayType:"heading"}]});var P={measure:{varType:"metric_name"},mean:{varType:"metric_value"}},R=function(t){f()(n,t);var e=d()(n);function n(){return i()(this,n),e.apply(this,arguments)}return u()(n,[{key:"generateTextSpec",value:function(t,e){var r=t.patterns[0],a=r.dimension,i=r.measure,o=r.mean;return(0,v.Z)({structures:n.structures[e],variable:{dimension:a,measure:i,mean:o}}).sections[0].paragraphs}}]),n}(m);s()(R,"insightType","low_variance"),s()(R,"structures",{"zh-CN":[{template:"按照 ${dimension} 对 ${measure} 进行拆解,指标分布均匀,平均为 ${mean}。",variableMetaMap:P}],"en-US":[{template:"We broke down the total based on ${dimension}, and the ${measure} are spread out evenly, averaging ${mean} each.",variableMetaMap:P}]});var j={measure:{varType:"metric_name"},total:{varType:"metric_value"},".x":{varType:"dim_value"}},D=function(t){f()(n,t);var e=d()(n);function n(){return i()(this,n),e.apply(this,arguments)}return u()(n,[{key:"generateTextSpec",value:function(t,e){var r=t.patterns,a=r[0],i=a.dimension,o=a.measure;return(0,v.Z)({structures:n.structures[e],variable:{dimension:i,measure:o,total:r.length,patterns:r},structureTemps:n.structureTemps[e]}).sections[0].paragraphs}}]),n}(m);s()(D,"insightType","category_outlier"),s()(D,"structures",{"zh-CN":[{template:"${measure} 在 ${dimension} 上有 ${total} 个类别相比其他维值突出:&{outliers}。",variableMetaMap:j}],"en-US":[{template:"${measure} has ${total} categories in the ${dimension} that are prominent compared to other dimensions: &{outliers}.",variableMetaMap:j,displayType:"paragraph"}]}),s()(D,"structureTemps",{"zh-CN":[{templateId:"outliers",template:"${.x}",separator:M("zh-CN"),variableMetaMap:j,useVariable:"paragraph"}],"en-US":[{templateId:"outliers",template:"${.x}",separator:M("en-US"),variableMetaMap:j,useVariable:"patterns"}]});var E=n(3100),L=n.n(E),B={pcorr:{varType:"metric_value"},m1:{varType:"metric_value"},m2:{varType:"metric_value"}},z=function(t){f()(n,t);var e=d()(n);function n(){return i()(this,n),e.apply(this,arguments)}return u()(n,[{key:"generateTextSpec",value:function(t,e){var r=t.patterns[0],a=L()(r.measures,2),i=a[0],o=a[1],u=r.pcorr;return(0,v.Z)({structures:n.structures[e],variable:{m1:i,m2:o,pcorr:u}}).sections[0].paragraphs}}]),n}(m);s()(z,"insightType","correlation"),s()(z,"structures",{"zh-CN":[{template:"${m1} 与 ${m2} 相关性最大,相关系数为 ${pcorr}。",variableMetaMap:B}],"en-US":[{template:" ${m1} and ${m2}, are highly correlated. Their relationship is measured by a number, ${pcorr}, which tells us just how closely they're linked. A higher number means they move in sync more often.",variableMetaMap:B,displayType:"paragraph"}]});var Q={measures:{varType:"metric_name"}},G=function(t){f()(n,t);var e=d()(n);function n(){return i()(this,n),e.apply(this,arguments)}return u()(n,[{key:"generateTextSpec",value:function(t,e){var r=t.measures,a=t.dimensions,i=t.insightType;return(0,v.Z)({structures:n.structures[e],variable:{measures:r.map((function(t){return t.fieldName})).join(M(e)),dimensions:a.map((function(t){return t.fieldName})).join(M(e)),insightType:k(i,e)}}).sections[0].paragraphs}}]),n}(m);s()(G,"insightType","commonness"),s()(G,"structures",{"zh-CN":[{template:"大部分 ${dimensions} 的维值在 ${measures} 上具有 ${insightType}。",variableMetaMap:Q}],"en-US":[{template:"Most of the dimension values of ${dimensions} have ${insightType} on ${measures}.",variableMetaMap:Q}]});var F,q={measures:{varType:"metric_name"},".dim":{varType:"dim_value"}},$=function(t){f()(n,t);var e=d()(n);function n(){return i()(this,n),e.apply(this,arguments)}return u()(n,[{key:"generateTextSpec",value:function(t,e){var r=t.measures,a=t.dimensions,i=t.insightType,o=t.exceptions;return(0,v.Z)({structures:n.structures[e],structureTemps:n.structureTemps[e],variable:{measures:r.map((function(t){return t.fieldName})).join(M(e)),dimensions:a.map((function(t){return t.fieldName})).join(M(e)),insightType:k(i,e),exceptions:o.map((function(t){return{dim:t}}))}}).sections[0].paragraphs}}]),n}(m);s()($,"insightType","exception"),s()($,"structures",{"zh-CN":[{template:"大部分 ${dimensions} 的维值在 ${measures} 上具有 ${insightType},除了&{exceptionList}。",variableMetaMap:q}],"en-US":[{template:"Most of the dimension values of ${dimensions} have ${insightType} on ${measures}, except for &{exceptionList}.",variableMetaMap:q}]}),s()($,"structureTemps",{"zh-CN":[{templateId:"exceptionList",template:"${.dim}",useVariable:"exceptions",separator:M("zh-CN"),variableMetaMap:q}],"en-US":[{templateId:"exceptionList",template:"${.dim}",useVariable:"exceptions",separator:M("en-US"),variableMetaMap:q}]});var U=function(){function t(){i()(this,t)}return u()(t,null,[{key:"getStrategy",value:function(e){var n=t.narrativeStrategyMap.get(e);if(!n)throw Error("There is no description policy for this '".concat(e,"'."));return n}}]),t}();function V(t,e){var n,r=function(t){return"childPatterns"in t}(t)?null==t?void 0:t.type:null==t||null===(n=t.patterns[0])||void 0===n?void 0:n.type;if(!r)throw Error("insight info has no insight type");var a=e.lang;return U.getStrategy(r).generateTextSpec(t,a)}F=U,s()(U,"narrativeStrategyMap",new Map),Object.values(r).forEach((function(t){F.narrativeStrategyMap.set(t.insightType,new t)}))},9664:function(t,e,n){"use strict";n.d(e,{o:function(){return O}});var r=n(1448),a=n.n(r),i=function(t,e,n,r){return new(n||(n=Promise))((function(a,i){function o(t){try{c(r.next(t))}catch(t){i(t)}}function u(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?a(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((r=r.apply(t,e||[])).next())}))},o=function(t,e){var n,r,a,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=u(0),o.throw=u(1),o.return=u(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&u[0]?r.return:u[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,u[1])).done)return a;switch(r=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){i.label=u[1];break}if(6===u[0]&&i.label<a[1]){i.label=a[1],a=u;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(u);break}a[2]&&i.ops.pop(),i.trys.pop();continue}u=e.call(t,i)}catch(t){u=[6,t],r=0}finally{n=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}},u=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,a,i=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(t){a={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return o},c=function(t,e,n){if(n||2===arguments.length)for(var r,a=0,i=e.length;a<i;a++)!r&&a in e||(r||(r=Array.prototype.slice.call(e,0,a)),r[a]=e[a]);return t.concat(r||Array.prototype.slice.call(e))},s=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},l=(function(){function t(e){void 0===e&&(e=t.minComparator);var n=this;this.compare=e,this.heapArray=[],this._limit=0,this.offer=this.add,this.element=this.peek,this.poll=this.pop,this._invertedCompare=function(t,e){return n.compare(t,e).then((function(t){return-1*t}))}}t.getChildrenIndexOf=function(t){return[2*t+1,2*t+2]},t.getParentIndexOf=function(t){if(t<=0)return-1;var e=t%2?1:2;return Math.floor((t-e)/2)},t.getSiblingIndexOf=function(t){return t<=0?-1:t+(t%2?1:-1)},t.minComparator=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){return t>e?[2,1]:t<e?[2,-1]:[2,0]}))}))},t.maxComparator=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){return e>t?[2,1]:e<t?[2,-1]:[2,0]}))}))},t.minComparatorNumber=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){return[2,t-e]}))}))},t.maxComparatorNumber=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){return[2,e-t]}))}))},t.defaultIsEqual=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){return[2,t===e]}))}))},t.print=function(e){function n(e){var n=t.getParentIndexOf(e);return Math.floor(Math.log2(n+1))}function r(t,e){for(var n="";e>0;--e)n+=t;return n}for(var a=0,i=[],o=n(e.length-1)+2,u=0;a<e.length;){var c=n(a)+1;0===a&&(c=0);var s=String(e.get(a));s.length>u&&(u=s.length),i[c]=i[c]||[],i[c].push(s),a+=1}return i.map((function(t,e){var n=Math.pow(2,o-e)-1;return r(" ",Math.floor(n/2)*u)+t.map((function(t){var e=(u-t.length)/2;return r(" ",Math.ceil(e))+t+r(" ",Math.floor(e))})).join(r(" ",n*u))})).join("\n")},t.heapify=function(e,n){return i(this,void 0,void 0,(function(){var r;return o(this,(function(a){switch(a.label){case 0:return(r=new t(n)).heapArray=e,[4,r.init()];case 1:return a.sent(),[2,r]}}))}))},t.heappop=function(e,n){var r=new t(n);return r.heapArray=e,r.pop()},t.heappush=function(e,n,r){return i(this,void 0,void 0,(function(){var a;return o(this,(function(i){switch(i.label){case 0:return(a=new t(r)).heapArray=e,[4,a.push(n)];case 1:return i.sent(),[2]}}))}))},t.heappushpop=function(e,n,r){var a=new t(r);return a.heapArray=e,a.pushpop(n)},t.heapreplace=function(e,n,r){var a=new t(r);return a.heapArray=e,a.replace(n)},t.heaptop=function(e,n,r){void 0===n&&(n=1);var a=new t(r);return a.heapArray=e,a.top(n)},t.heapbottom=function(e,n,r){void 0===n&&(n=1);var a=new t(r);return a.heapArray=e,a.bottom(n)},t.nlargest=function(e,n,r){return i(this,void 0,void 0,(function(){var a;return o(this,(function(i){switch(i.label){case 0:return(a=new t(r)).heapArray=c([],u(n),!1),[4,a.init()];case 1:return i.sent(),[2,a.top(e)]}}))}))},t.nsmallest=function(e,n,r){return i(this,void 0,void 0,(function(){var a;return o(this,(function(i){switch(i.label){case 0:return(a=new t(r)).heapArray=c([],u(n),!1),[4,a.init()];case 1:return i.sent(),[2,a.bottom(e)]}}))}))},t.prototype.add=function(t){return i(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this._sortNodeUp(this.heapArray.push(t)-1)];case 1:return e.sent(),this._applyLimit(),[2,!0]}}))}))},t.prototype.addAll=function(t){return i(this,void 0,void 0,(function(){var e,n,r;return o(this,(function(a){switch(a.label){case 0:e=this.length,(r=this.heapArray).push.apply(r,c([],u(t),!1)),n=this.length,a.label=1;case 1:return e<n?[4,this._sortNodeUp(e)]:[3,4];case 2:a.sent(),a.label=3;case 3:return++e,[3,1];case 4:return this._applyLimit(),[2,!0]}}))}))},t.prototype.bottom=function(){return i(this,arguments,void 0,(function(t){return void 0===t&&(t=1),o(this,(function(e){return 0===this.heapArray.length||t<=0?[2,[]]:1===this.heapArray.length?[2,[this.heapArray[0]]]:t>=this.heapArray.length?[2,c([],u(this.heapArray),!1)]:[2,this._bottomN_push(~~t)]}))}))},t.prototype.check=function(){return i(this,void 0,void 0,(function(){var t,e,n,r,a,i,u,c,l;return o(this,(function(o){switch(o.label){case 0:t=0,o.label=1;case 1:if(!(t<this.heapArray.length))return[3,10];e=this.heapArray[t],n=this.getChildrenOf(t),o.label=2;case 2:o.trys.push([2,7,8,9]),c=void 0,r=s(n),a=r.next(),o.label=3;case 3:return a.done?[3,6]:(i=a.value,[4,this.compare(e,i)]);case 4:if(o.sent()>0)return[2,e];o.label=5;case 5:return a=r.next(),[3,3];case 6:return[3,9];case 7:return u=o.sent(),c={error:u},[3,9];case 8:try{a&&!a.done&&(l=r.return)&&l.call(r)}finally{if(c)throw c.error}return[7];case 9:return++t,[3,1];case 10:return[2]}}))}))},t.prototype.clear=function(){this.heapArray=[]},t.prototype.clone=function(){var e=new t(this.comparator());return e.heapArray=this.toArray(),e._limit=this._limit,e},t.prototype.comparator=function(){return this.compare},t.prototype.contains=function(e){return i(this,arguments,void 0,(function(e,n){var r,a,i,u,c,l;return void 0===n&&(n=t.defaultIsEqual),o(this,(function(t){switch(t.label){case 0:t.trys.push([0,5,6,7]),r=s(this.heapArray),a=r.next(),t.label=1;case 1:return a.done?[3,4]:(i=a.value,[4,n(i,e)]);case 2:if(t.sent())return[2,!0];t.label=3;case 3:return a=r.next(),[3,1];case 4:return[3,7];case 5:return u=t.sent(),c={error:u},[3,7];case 6:try{a&&!a.done&&(l=r.return)&&l.call(r)}finally{if(c)throw c.error}return[7];case 7:return[2,!1]}}))}))},t.prototype.init=function(t){return i(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:t&&(this.heapArray=c([],u(t),!1)),e=Math.floor(this.heapArray.length),n.label=1;case 1:return e>=0?[4,this._sortNodeDown(e)]:[3,4];case 2:n.sent(),n.label=3;case 3:return--e,[3,1];case 4:return this._applyLimit(),[2]}}))}))},t.prototype.isEmpty=function(){return 0===this.length},t.prototype.leafs=function(){if(0===this.heapArray.length)return[];var e=t.getParentIndexOf(this.heapArray.length-1);return this.heapArray.slice(e+1)},Object.defineProperty(t.prototype,"length",{get:function(){return this.heapArray.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"limit",{get:function(){return this._limit},set:function(t){this._limit=~~t,this._applyLimit()},enumerable:!1,configurable:!0}),t.prototype.peek=function(){return this.heapArray[0]},t.prototype.pop=function(){return i(this,void 0,void 0,(function(){var t;return o(this,(function(e){return t=this.heapArray.pop(),this.length>0&&void 0!==t?[2,this.replace(t)]:[2,t]}))}))},t.prototype.push=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i(this,void 0,void 0,(function(){return o(this,(function(e){return t.length<1?[2,!1]:1===t.length?[2,this.add(t[0])]:[2,this.addAll(t)]}))}))},t.prototype.pushpop=function(t){return i(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,this.compare(this.heapArray[0],t)];case 1:return n.sent()<0?(e=u([this.heapArray[0],t],2),t=e[0],this.heapArray[0]=e[1],[4,this._sortNodeDown(0)]):[3,3];case 2:n.sent(),n.label=3;case 3:return[2,t]}}))}))},t.prototype.remove=function(e){return i(this,arguments,void 0,(function(e,n){var r,a,i,s=this;return void 0===n&&(n=t.defaultIsEqual),o(this,(function(o){switch(o.label){case 0:return this.heapArray.length?void 0!==e?[3,2]:[4,this.pop()]:[2,!1];case 1:return o.sent(),[2,!0];case 2:r=[0],o.label=3;case 3:return r.length?(a=r.shift(),[4,n(this.heapArray[a],e)]):[3,13];case 4:return o.sent()?0!==a?[3,6]:[4,this.pop()]:[3,11];case 5:return o.sent(),[3,10];case 6:return a!==this.heapArray.length-1?[3,7]:(this.heapArray.pop(),[3,10]);case 7:return this.heapArray.splice(a,1,this.heapArray.pop()),[4,this._sortNodeUp(a)];case 8:return o.sent(),[4,this._sortNodeDown(a)];case 9:o.sent(),o.label=10;case 10:return[2,!0];case 11:i=t.getChildrenIndexOf(a).filter((function(t){return t<s.heapArray.length})),r.push.apply(r,c([],u(i),!1)),o.label=12;case 12:return[3,3];case 13:return[2,!1]}}))}))},t.prototype.replace=function(t){return i(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return e=this.heapArray[0],this.heapArray[0]=t,[4,this._sortNodeDown(0)];case 1:return n.sent(),[2,e]}}))}))},t.prototype.size=function(){return this.length},t.prototype.top=function(){return i(this,arguments,void 0,(function(t){return void 0===t&&(t=1),o(this,(function(e){return 0===this.heapArray.length||t<=0?[2,[]]:1===this.heapArray.length||1===t?[2,[this.heapArray[0]]]:t>=this.heapArray.length?[2,c([],u(this.heapArray),!1)]:[2,this._topN_push(~~t)]}))}))},t.prototype.toArray=function(){return c([],u(this.heapArray),!1)},t.prototype.toString=function(){return this.heapArray.toString()},t.prototype.get=function(t){return this.heapArray[t]},t.prototype.getChildrenOf=function(e){var n=this;return t.getChildrenIndexOf(e).map((function(t){return n.heapArray[t]})).filter((function(t){return void 0!==t}))},t.prototype.getParentOf=function(e){var n=t.getParentIndexOf(e);return this.heapArray[n]},t.prototype[Symbol.iterator]=function(){return o(this,(function(t){switch(t.label){case 0:return this.length?[4,this.pop()]:[3,2];case 1:return t.sent(),[3,0];case 2:return[2]}}))},t.prototype.iterator=function(){return this},t.prototype._applyLimit=function(){if(this._limit&&this._limit<this.heapArray.length)for(var t=this.heapArray.length-this._limit;t;)this.heapArray.pop(),--t},t.prototype._bottomN_push=function(e){return i(this,void 0,void 0,(function(){var n,r,a,i,u,c;return o(this,(function(o){switch(o.label){case 0:return(n=new t(this.compare)).limit=e,n.heapArray=this.heapArray.slice(-e),[4,n.init()];case 1:for(o.sent(),r=this.heapArray.length-1-e,a=t.getParentIndexOf(r),i=[],c=r;c>a;--c)i.push(c);u=this.heapArray,o.label=2;case 2:return i.length?(c=i.shift(),[4,this.compare(u[c],n.peek())]):[3,6];case 3:return o.sent()>0?[4,n.replace(u[c])]:[3,5];case 4:o.sent(),c%2&&i.push(t.getParentIndexOf(c)),o.label=5;case 5:return[3,2];case 6:return[2,n.toArray()]}}))}))},t.prototype._moveNode=function(t,e){var n;n=u([this.heapArray[e],this.heapArray[t]],2),this.heapArray[t]=n[0],this.heapArray[e]=n[1]},t.prototype._sortNodeDown=function(t){return i(this,void 0,void 0,(function(){var e,n,r,a,i,u;return o(this,(function(o){switch(o.label){case 0:e=this.heapArray.length,o.label=1;case 1:return r=(n=2*t+1)+1,a=t,(i=n<e)?[4,this.compare(this.heapArray[n],this.heapArray[a])]:[3,3];case 2:i=o.sent()<0,o.label=3;case 3:return i&&(a=n),(u=r<e)?[4,this.compare(this.heapArray[r],this.heapArray[a])]:[3,5];case 4:u=o.sent()<0,o.label=5;case 5:if(u&&(a=r),a===t)return[3,7];this._moveNode(t,a),t=a,o.label=6;case 6:return[3,1];case 7:return[2]}}))}))},t.prototype._sortNodeUp=function(e){return i(this,void 0,void 0,(function(){var n;return o(this,(function(r){switch(r.label){case 0:return e>0?(n=t.getParentIndexOf(e),[4,this.compare(this.heapArray[e],this.heapArray[n])]):[3,2];case 1:return r.sent()<0?(this._moveNode(e,n),e=n,[3,0]):[3,2];case 2:return[2]}}))}))},t.prototype._topN_push=function(e){return i(this,void 0,void 0,(function(){var n,r,a,i;return o(this,(function(o){switch(o.label){case 0:(n=new t(this._invertedCompare)).limit=e,r=[0],a=this.heapArray,o.label=1;case 1:return r.length?(i=r.shift())<a.length?n.length<e?[4,n.push(a[i])]:[3,3]:[3,6]:[3,7];case 2:return o.sent(),r.push.apply(r,c([],u(t.getChildrenIndexOf(i)),!1)),[3,6];case 3:return[4,this.compare(a[i],n.peek())];case 4:return o.sent()<0?[4,n.replace(a[i])]:[3,6];case 5:o.sent(),r.push.apply(r,c([],u(t.getChildrenIndexOf(i)),!1)),o.label=6;case 6:return[3,1];case 7:return[2,n.toArray()]}}))}))},t.prototype._topN_fill=function(e){return i(this,void 0,void 0,(function(){var n,r,a,i,s;return o(this,(function(o){switch(o.label){case 0:return n=this.heapArray,(r=new t(this._invertedCompare)).limit=e,r.heapArray=n.slice(0,e),[4,r.init()];case 1:for(o.sent(),a=t.getParentIndexOf(e-1)+1,i=[],s=a;s<e;++s)i.push.apply(i,c([],u(t.getChildrenIndexOf(s).filter((function(t){return t<n.length}))),!1));(e-1)%2&&i.push(e),o.label=2;case 2:return i.length?(s=i.shift())<n.length?[4,this.compare(n[s],r.peek())]:[3,5]:[3,6];case 3:return o.sent()<0?[4,r.replace(n[s])]:[3,5];case 4:o.sent(),i.push.apply(i,c([],u(t.getChildrenIndexOf(s)),!1)),o.label=5;case 5:return[3,2];case 6:return[2,r.toArray()]}}))}))},t.prototype._topN_heap=function(t){return i(this,void 0,void 0,(function(){var e,n,r,a,i;return o(this,(function(o){switch(o.label){case 0:e=this.clone(),n=[],r=0,o.label=1;case 1:return r<t?(i=(a=n).push,[4,e.pop()]):[3,4];case 2:i.apply(a,[o.sent()]),o.label=3;case 3:return++r,[3,1];case 4:return[2,n]}}))}))},t.prototype._topIdxOf=function(t){return i(this,void 0,void 0,(function(){var e,n,r;return o(this,(function(a){switch(a.label){case 0:if(!t.length)return[2,-1];n=t[e=0],r=1,a.label=1;case 1:return r<t.length?[4,this.compare(t[r],n)]:[3,4];case 2:a.sent()<0&&(e=r,n=t[r]),a.label=3;case 3:return++r,[3,1];case 4:return[2,e]}}))}))},t.prototype._topOf=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return i(this,void 0,void 0,(function(){var n;return o(this,(function(r){switch(r.label){case 0:return[4,(n=new t(this.compare)).init(e)];case 1:return r.sent(),[2,n.peek()]}}))}))}}(),function(t,e){var n,r,a,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=u(0),o.throw=u(1),o.return=u(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&u[0]?r.return:u[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,u[1])).done)return a;switch(r=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){i.label=u[1];break}if(6===u[0]&&i.label<a[1]){i.label=a[1],a=u;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(u);break}a[2]&&i.ops.pop(),i.trys.pop();continue}u=e.call(t,i)}catch(t){u=[6,t],r=0}finally{n=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}),f=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,a,i=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(t){a={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return o},h=function(t,e,n){if(n||2===arguments.length)for(var r,a=0,i=e.length;a<i;a++)!r&&a in e||(r||(r=Array.prototype.slice.call(e,0,a)),r[a]=e[a]);return t.concat(r||Array.prototype.slice.call(e))},d=function(){function t(e){void 0===e&&(e=t.minComparator);var n=this;this.compare=e,this.heapArray=[],this._limit=0,this.offer=this.add,this.element=this.peek,this.poll=this.pop,this.removeAll=this.clear,this._invertedCompare=function(t,e){return-1*n.compare(t,e)}}return t.getChildrenIndexOf=function(t){return[2*t+1,2*t+2]},t.getParentIndexOf=function(t){if(t<=0)return-1;var e=t%2?1:2;return Math.floor((t-e)/2)},t.getSiblingIndexOf=function(t){return t<=0?-1:t+(t%2?1:-1)},t.minComparator=function(t,e){return t>e?1:t<e?-1:0},t.maxComparator=function(t,e){return e>t?1:e<t?-1:0},t.minComparatorNumber=function(t,e){return t-e},t.maxComparatorNumber=function(t,e){return e-t},t.defaultIsEqual=function(t,e){return t===e},t.print=function(e){function n(e){var n=t.getParentIndexOf(e);return Math.floor(Math.log2(n+1))}function r(t,e){for(var n="";e>0;--e)n+=t;return n}for(var a=0,i=[],o=n(e.length-1)+2,u=0;a<e.length;){var c=n(a)+1;0===a&&(c=0);var s=String(e.get(a));s.length>u&&(u=s.length),i[c]=i[c]||[],i[c].push(s),a+=1}return i.map((function(t,e){var n=Math.pow(2,o-e)-1;return r(" ",Math.floor(n/2)*u)+t.map((function(t){var e=(u-t.length)/2;return r(" ",Math.ceil(e))+t+r(" ",Math.floor(e))})).join(r(" ",n*u))})).join("\n")},t.heapify=function(e,n){var r=new t(n);return r.heapArray=e,r.init(),r},t.heappop=function(e,n){var r=new t(n);return r.heapArray=e,r.pop()},t.heappush=function(e,n,r){var a=new t(r);a.heapArray=e,a.push(n)},t.heappushpop=function(e,n,r){var a=new t(r);return a.heapArray=e,a.pushpop(n)},t.heapreplace=function(e,n,r){var a=new t(r);return a.heapArray=e,a.replace(n)},t.heaptop=function(e,n,r){void 0===n&&(n=1);var a=new t(r);return a.heapArray=e,a.top(n)},t.heapbottom=function(e,n,r){void 0===n&&(n=1);var a=new t(r);return a.heapArray=e,a.bottom(n)},t.nlargest=function(e,n,r){var a=new t(r);return a.heapArray=h([],f(n),!1),a.init(),a.top(e)},t.nsmallest=function(e,n,r){var a=new t(r);return a.heapArray=h([],f(n),!1),a.init(),a.bottom(e)},t.prototype.add=function(t){return this._sortNodeUp(this.heapArray.push(t)-1),this._applyLimit(),!0},t.prototype.addAll=function(t){var e,n=this.length;(e=this.heapArray).push.apply(e,h([],f(t),!1));for(var r=this.length;n<r;++n)this._sortNodeUp(n);return this._applyLimit(),!0},t.prototype.bottom=function(t){return void 0===t&&(t=1),0===this.heapArray.length||t<=0?[]:1===this.heapArray.length?[this.heapArray[0]]:t>=this.heapArray.length?h([],f(this.heapArray),!1):this._bottomN_push(~~t)},t.prototype.check=function(){var t=this;return this.heapArray.find((function(e,n){return!!t.getChildrenOf(n).find((function(n){return t.compare(e,n)>0}))}))},t.prototype.clear=function(){this.heapArray=[]},t.prototype.clone=function(){var e=new t(this.comparator());return e.heapArray=this.toArray(),e._limit=this._limit,e},t.prototype.comparator=function(){return this.compare},t.prototype.contains=function(e,n){return void 0===n&&(n=t.defaultIsEqual),-1!==this.indexOf(e,n)},t.prototype.init=function(t){t&&(this.heapArray=h([],f(t),!1));for(var e=Math.floor(this.heapArray.length);e>=0;--e)this._sortNodeDown(e);this._applyLimit()},t.prototype.isEmpty=function(){return 0===this.length},t.prototype.indexOf=function(e,n){if(void 0===n&&(n=t.defaultIsEqual),0===this.heapArray.length)return-1;for(var r=[],a=0;a<this.heapArray.length;){var i=this.heapArray[a];if(n(i,e))return a;this.compare(i,e)<=0&&r.push.apply(r,h([],f(t.getChildrenIndexOf(a)),!1)),a=r.shift()||this.heapArray.length}return-1},t.prototype.indexOfEvery=function(e,n){if(void 0===n&&(n=t.defaultIsEqual),0===this.heapArray.length)return[];for(var r=[],a=[],i=0;i<this.heapArray.length;){var o=this.heapArray[i];n(o,e)?(a.push(i),r.push.apply(r,h([],f(t.getChildrenIndexOf(i)),!1))):this.compare(o,e)<=0&&r.push.apply(r,h([],f(t.getChildrenIndexOf(i)),!1)),i=r.shift()||this.heapArray.length}return a},t.prototype.leafs=function(){if(0===this.heapArray.length)return[];var e=t.getParentIndexOf(this.heapArray.length-1);return this.heapArray.slice(e+1)},Object.defineProperty(t.prototype,"length",{get:function(){return this.heapArray.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"limit",{get:function(){return this._limit},set:function(t){t<0||isNaN(t)?this._limit=0:this._limit=~~t,this._applyLimit()},enumerable:!1,configurable:!0}),t.prototype.setLimit=function(t){return this.limit=t,t<0||isNaN(t)?NaN:this._limit},t.prototype.peek=function(){return this.heapArray[0]},t.prototype.pop=function(){var t=this.heapArray.pop();return this.length>0&&void 0!==t?this.replace(t):t},t.prototype.push=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return!(t.length<1)&&(1===t.length?this.add(t[0]):this.addAll(t))},t.prototype.pushpop=function(t){var e;return this.compare(this.heapArray[0],t)<0&&(t=(e=f([this.heapArray[0],t],2))[0],this.heapArray[0]=e[1],this._sortNodeDown(0)),t},t.prototype.remove=function(e,n){var r=this;if(void 0===n&&(n=t.defaultIsEqual),!this.heapArray.length)return!1;if(void 0===e)return this.pop(),!0;for(var a=[0];a.length;){var i=a.shift();if(n(this.heapArray[i],e))return 0===i?this.pop():i===this.heapArray.length-1?this.heapArray.pop():(this.heapArray.splice(i,1,this.heapArray.pop()),this._sortNodeUp(i),this._sortNodeDown(i)),!0;if(this.compare(this.heapArray[i],e)<=0){var o=t.getChildrenIndexOf(i).filter((function(t){return t<r.heapArray.length}));a.push.apply(a,h([],f(o),!1))}}return!1},t.prototype.replace=function(t){var e=this.heapArray[0];return this.heapArray[0]=t,this._sortNodeDown(0),e},t.prototype.size=function(){return this.length},t.prototype.top=function(t){return void 0===t&&(t=1),0===this.heapArray.length||t<=0?[]:1===this.heapArray.length||1===t?[this.heapArray[0]]:t>=this.heapArray.length?h([],f(this.heapArray),!1):this._topN_push(~~t)},t.prototype.toArray=function(){return h([],f(this.heapArray),!1)},t.prototype.toString=function(){return this.heapArray.toString()},t.prototype.get=function(t){return this.heapArray[t]},t.prototype.getChildrenOf=function(e){var n=this;return t.getChildrenIndexOf(e).map((function(t){return n.heapArray[t]})).filter((function(t){return void 0!==t}))},t.prototype.getParentOf=function(e){var n=t.getParentIndexOf(e);return this.heapArray[n]},t.prototype[Symbol.iterator]=function(){return l(this,(function(t){switch(t.label){case 0:return this.length?[4,this.pop()]:[3,2];case 1:return t.sent(),[3,0];case 2:return[2]}}))},t.prototype.iterator=function(){return this.toArray()},t.prototype._applyLimit=function(){if(this._limit>0&&this._limit<this.heapArray.length)for(var t=this.heapArray.length-this._limit;t;)this.heapArray.pop(),--t},t.prototype._bottomN_push=function(e){var n=new t(this.compare);n.limit=e,n.heapArray=this.heapArray.slice(-e),n.init();for(var r=this.heapArray.length-1-e,a=t.getParentIndexOf(r),i=[],o=r;o>a;--o)i.push(o);for(var u=this.heapArray;i.length;){o=i.shift();this.compare(u[o],n.peek())>0&&(n.replace(u[o]),o%2&&i.push(t.getParentIndexOf(o)))}return n.toArray()},t.prototype._moveNode=function(t,e){var n;n=f([this.heapArray[e],this.heapArray[t]],2),this.heapArray[t]=n[0],this.heapArray[e]=n[1]},t.prototype._sortNodeDown=function(t){for(var e=this.heapArray.length;;){var n=2*t+1,r=n+1,a=t;if(n<e&&this.compare(this.heapArray[n],this.heapArray[a])<0&&(a=n),r<e&&this.compare(this.heapArray[r],this.heapArray[a])<0&&(a=r),a===t)break;this._moveNode(t,a),t=a}},t.prototype._sortNodeUp=function(e){for(;e>0;){var n=t.getParentIndexOf(e);if(!(this.compare(this.heapArray[e],this.heapArray[n])<0))break;this._moveNode(e,n),e=n}},t.prototype._topN_push=function(e){var n=new t(this._invertedCompare);n.limit=e;for(var r=[0],a=this.heapArray;r.length;){var i=r.shift();i<a.length&&(n.length<e?(n.push(a[i]),r.push.apply(r,h([],f(t.getChildrenIndexOf(i)),!1))):this.compare(a[i],n.peek())<0&&(n.replace(a[i]),r.push.apply(r,h([],f(t.getChildrenIndexOf(i)),!1))))}return n.toArray()},t.prototype._topN_fill=function(e){var n=this.heapArray,r=new t(this._invertedCompare);r.limit=e,r.heapArray=n.slice(0,e),r.init();for(var a=[],i=t.getParentIndexOf(e-1)+1;i<e;++i)a.push.apply(a,h([],f(t.getChildrenIndexOf(i).filter((function(t){return t<n.length}))),!1));for((e-1)%2&&a.push(e);a.length;){(i=a.shift())<n.length&&this.compare(n[i],r.peek())<0&&(r.replace(n[i]),a.push.apply(a,h([],f(t.getChildrenIndexOf(i)),!1)))}return r.toArray()},t.prototype._topN_heap=function(t){for(var e=this.clone(),n=[],r=0;r<t;++r)n.push(e.pop());return n},t.prototype._topIdxOf=function(t){if(!t.length)return-1;for(var e=0,n=t[e],r=1;r<t.length;++r){this.compare(t[r],n)<0&&(e=r,n=t[r])}return e},t.prototype._topOf=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=new t(this.compare);return r.init(e),r.peek()},t}(),p=n(4977),v=n(8316),m=n(4479),g=n.n(m),y=n(8972),b=n(9125),_=n(1484);function x(t,e){var n=[],r=t.length,a=t.filter((function(t){var e;return t.patterns&&(null===(e=t.patterns)||void 0===e?void 0:e.length)>0}));if(a.length>1){if("trend"===e){var i,o=Object.values((0,y.groupBy)(t,"patterns.0.trend")).sort((function(t,e){return e.length-t.length}));2===o.length&&null!==(i=o[0][0])&&void 0!==i&&null!==(i=i.patterns)&&void 0!==i&&i.length&&o[0].length/r>.75&&o[1].length<5?n.push({type:"exception",insightType:e,childPatterns:(0,y.flatten)(a.map((function(t){return t.patterns}))),commonSet:o[0].map((function(t){return t.key})),exceptions:o[1].map((function(t){return t.key})),significance:1-o[1].length/r}):o.forEach((function(t){var a,i=t.length/r;if(i>.3&&t.length>=3&&null!==(a=t[0])&&void 0!==a&&a.patterns){var o=(0,y.flatten)(t.map((function(t){return t.patterns})));o.length&&n.push({type:"commonness",insightType:e,childPatterns:o,commonSet:t.map((function(t){return t.key})),significance:i})}}))}if(["change_point","outlier","time_series_outlier"].includes(e))Object.values((0,y.groupBy)((0,y.flatten)(a.map((function(t){return t.patterns.map((function(t){return t.index}))}))))).sort((function(t,e){return e.length-t.length})).forEach((function(t){var i=t.length/r;if(i>.3&&t.length>=3){var o=a.filter((function(e){return e.patterns.some((function(e){return e.index===t[0]}))})),u=(0,y.flatten)(o.map((function(e){return e.patterns.filter((function(e){return e.index===t[0]}))})));n.push({type:"commonness",insightType:e,childPatterns:u,commonSet:o.map((function(t){return t.key})),significance:i})}}))}return n}var w=n(2434),k=function(t,e){return t.score-e.score},M=function(t,e){return t.score-e.score};function A(t,e){null==t||t.forEach((function(t){e.length>=e.limit?e.pushpop(t):e.add(t)}))}function C(t,e,n,r){var a=e.measures,i=e.dimensions,o=(null==r?void 0:r.insightTypes)||p.qy,u={};return o.forEach((function(o){var c=b.M[o],s=!0;if(c&&(0,y.isString)(c({data:t,subjectInfo:e,fieldPropsMap:n}))&&(s=!1),s&&_.ew){var l=r||{},f={algorithmParameter:l.algorithmParameter,dataProcessInfo:l.dataProcessInfo,dataValidation:!1,filterInsight:!0},h=(0,_.ew)({data:t,dimensions:i.map((function(t){return{fieldName:t}})),measures:a,insightType:o,options:f});u[o]=h}else u[o]=void 0})),u}function T(t,e,n,r,i,o,u,c){if(null==t||!t.length)return[];var s=i.impactMeasureReferences,l=i.fieldPropsMap,f=function(t,e,n,r){if(null==r||!r.length||!e)return 1;var a=r.map((function(e){var r=(0,w.RF)(t,e),a="".concat(e.fieldName,"@").concat(e.method);return r/n[a]}));return Math.max.apply(Math,g()(a))}(t,r,s,null==c?void 0:c.impactMeasures);if(f<p.Pe)return[];var h,d=null!=c&&c.impactWeight&&c.impactWeight>=0&&c.impactWeight<1?c.impactWeight:p.a4,m=f*d+1*(1-d);if(o.length>=o.limit&&m<=(null===(h=o.peek())||void 0===h?void 0:h.score))return[];var b=[],_=function(t,e,n,r,a,i){var o=a.fieldPropsMap,u=[];return e.forEach((function(e){var a,c=[],s=null===(a=o[e])||void 0===a||null===(a=a.levelOfMeasurements)||void 0===a?void 0:a.includes("Time");n.forEach((function(n){var a={dimensions:[e],subspace:r,measures:[n]},u=(0,v.m_)(t,e,[n],s),l=C(u,a,o,i),f=(0,y.flatten)(Object.values(l).filter((function(t){return(null==t?void 0:t.length)>0}))).sort((function(t,e){return e.significance-t.significance}));if(f.length){var h={subspace:r,dimensions:[{fieldName:e}],measures:[n],patterns:f,data:u,score:f[0].significance};c.push(h)}else c.push(null)})),u.push(c)})),u}(t,e,n,r,i,c);if(_.forEach((function(t){var e=t.filter((function(t){return!!t})).map((function(t){return a()(a()({},t),{},{score:t.score*(1-d)+f*d})}));b.push.apply(b,g()(t)),A(e,o)})),(c.insightTypes||p.qy).includes("correlation")){var k=function(t,e,n,r,i,o){var u=i.fieldPropsMap,c=[],s=n.length;if(s>=2)for(var l=0;l<s-1;l+=1)for(var f=l+1;f<s;f+=1){var h,d=C(t,{dimensions:e,subspace:r,measures:[n[l],n[f]]},u,a()(a()({},o),{},{insightTypes:["correlation"]})),p=null==d||null===(h=d.correlation)||void 0===h?void 0:h.sort((function(t,e){return e.significance-t.significance}));if(null!=p&&p.length){var v={subspace:r,dimensions:e.map((function(t){return{fieldName:t}})),measures:[n[l],n[f]],patterns:p,data:t,score:p[0].significance};c.push(v)}}return c}(t,e,n,r,i,c);A(null==k?void 0:k.map((function(t){return a()(a()({},t),{},{score:t.score*(1-d)+f*d})})),o)}if(null!=c&&c.homogeneous&&_.forEach((function(a,i){var o=function(t,e){var n=t.map((function(t){return t.fieldName})),r=e.map((function(t){return null==t?void 0:t.patterns})),a=[];return p.qy.forEach((function(t){var e=x(r.map((function(e,r){return{key:n[r],patterns:null==e?void 0:e.filter((function(e){return e.type===t}))}})),t);a.push.apply(a,g()(e))})),a}(n,a);if(o.length>0){var c=o.map((function(a){return{subspace:r,dimensions:[{fieldName:e[i]}],measures:n,patterns:[a],data:t,score:a.significance*(1-d)+f*d}}));u.addAll(c)}})),null==c||!c.ignoreSubspace){var M,S=r.map((function(t){return t.dimension})),N=((null==c||null===(M=c.dimensions)||void 0===M?void 0:M.map((function(t){return t.fieldName})))||Object.values(l).filter((function(t){return"dimension"===t.domainType})).map((function(t){return t.name}))).filter((function(t){return!S.includes(t)}));N.length>0&&N.forEach((function(e){var a=[],s=(0,y.groupBy)(t,e),h=(0,y.uniq)(l[e].rawData),v=N.filter((function(t){return t!==e}));h.length>1&&h.forEach((function(t){var l=[].concat(g()(r),[{dimension:e,value:t}]),f=T(s[t],v,n,l,i,o,u,c);a.push(f)})),null!=c&&c.homogeneous&&v.forEach((function(i){n.forEach((function(n){var o=a.map((function(t){return t.find((function(t){return!!t&&1===t.dimensions.length&&t.dimensions[0].fieldName===i&&1===t.measures.length&&t.measures[0].fieldName===n.fieldName}))||null})),c=function(t,e){var n=e.length;if(t.length!==n)return[];var r=e.map((function(t){return null==t?void 0:t.patterns})),a=[];return p.qy.forEach((function(e){var n=x(r.map((function(n,r){return{key:t[r],patterns:null==n?void 0:n.filter((function(t){return t.type===e}))}})),e);a.push.apply(a,g()(n))})),a}(h,o).map((function(a){return{subspace:r,dimensions:[{fieldName:e},{fieldName:i}],measures:[n],patterns:[a],data:t,score:a.significance*(1-d)+f*d}}));u.addAll(c)}))}))}))}return b}var S=n(7462);function N(t,e){var n,r=t.filter((function(t){return!Object.values(t).some((function(t){return null==t}))})),a=(0,w.mn)(r,null==e?void 0:e.dataProcessInfo),i={fieldPropsMap:a.reduce((function(t,e){return t[e.name]=e,t}),{}),impactMeasureReferences:(0,w.ky)(r,null==e?void 0:e.impactMeasures)},o=(null==e?void 0:e.measures)||a.filter((function(t){return"measure"===t.domainType})).map((function(t){return{fieldName:t.name,method:"SUM"}})),u=(null==e||null===(n=e.dimensions)||void 0===n?void 0:n.map((function(t){return t.fieldName})))||a.filter((function(t){return"dimension"===t.domainType})).map((function(t){return t.name})),c=new d(k),s=new d(M),l=(null==e?void 0:e.limit)||p.O2;c.limit=l,c.init([]),s.init([]),function(t,e,n,r,a,i){var o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{};T(t,e,n,[],r,a,i,o)}(r,u,o,i,c,s,e);for(var f=[],h=c.size(),v=h>l?l:h,m=0;m<v;m+=1){var g=c.pop();f.push(g)}var y={insights:f.reverse()};if(null!=e&&e.homogeneous){for(var b=[],_=s.size(),x=_>l?l:_,A=0;A<x;A+=1){var C=s.pop();b.push(C)}y.homogeneousInsights=b.reverse()}return y}function O(t,e){var n=N(t,e);if(null!=e&&e.visualization){var r=a()({lang:"en-US"},!0===(null==e?void 0:e.visualization)?{}:null==e?void 0:e.visualization);return function(t,e){var n=t.insights,r=t.homogeneousInsights,i={insights:n.map((function(t){return a()(a()({},t),{},{visualizationSpecs:(0,S.c)(t,null==e?void 0:e.visualization)})}))};if(r&&null!=e&&e.homogeneous){var o=r.map((function(t){var n=(0,S.U)(t,e.visualization),r=t.data,i=t.measures,o=t.dimensions,u=a()(a()({},t),{},{visualizationSpecs:n});return i.length>1?u.data=(0,v.II)(r,o[0].fieldName,i):u.data=(0,v.q0)(r,o[0].fieldName,i[0],o[1].fieldName),u}));i.homogeneousInsights=o}return i}(n,a()(a()({},e),{},{visualization:r}))}return n}},2434:function(t,e,n){"use strict";n.d(e,{RF:function(){return s},ky:function(){return l},mn:function(){return c}});var r=n(1448),a=n.n(r),i=n(8972),o=n(7849),u=n(8316);function c(t,e){if(!t)throw new Error("Argument `data` is missing.");var n=new o.Z(t,e).info(),r=[];return n.forEach((function(t){var e,n=a()(a()({},t),{},{domainType:null!==(e=(0,i.intersection)(["Interval","Continuous"],t.levelOfMeasurements))&&void 0!==e&&e.length?"measure":"dimension"});r.push(n)})),r}function s(t,e){return(0,u._F[e.method])(t,e.fieldName)}function l(t,e){var n={};return null==e||e.forEach((function(e){var r="".concat(e.fieldName,"@").concat(e.method),a=s(t,e);n[r]=a})),n}},8367:function(t,e,n){"use strict";n.d(e,{hs:function(){return y}});var r=n(1448),a=n.n(r),i=n(8972),o=n(9660),u=n(7784),c=n(6798),s=n(8821),l=n(5932),f=n(8382),h=n(1484),d=n(4477),p=n(6845),v=n(8045),m=n(8586),g=function(t){var e=t.dimensions,n=t.measures,r=t.data;return{subspace:[],dimensions:e,measures:n,patterns:t.patternInfos,data:r}},y=function(t){var e=t.options,n=void 0===e?{}:e,r=t.insightType,y=n.visualizationOptions,b=void 0===y?{lang:"zh-CN"}:y,_=(0,h.ew)(t),x=function(t){var e=t.patternInfos,n=void 0===e?[]:e;return"time_series_outlier"===t.insightType?(0,p.Mo)(n):(0,p.te)(n)}({patternInfos:_,insightType:r}),w=g(a()(a()({},t),{},{patternInfos:_}));if((0,i.size)(x)){var k=g(a()(a()({},t),{},{patternInfos:x})),M=function(t){var e,n,r=(null!==(e=t.patterns[0])&&void 0!==e?e:{}).type,a={trend:o.q,change_point:u.u,time_series_outlier:c.g,low_variance:s.J,category_outlier:l.P};return null===(n=a[r])||void 0===n?void 0:n.call(a,t)}(k),A=(0,f.l)(k),C=(0,d.Z)(k,b);return a()(a()({},w),{},{visualizationSpecs:[{annotationSpec:M,chartSpec:A,patternType:r,narrativeSpec:C}]})}var T=function(t,e){var n=(0,v.c)(a()(a()({},t),0===(0,i.size)(t.patterns)?{patterns:[{type:e}]}:{}));return(0,m.d)([n],t)}(w,r);return a()(a()({},w),{},{visualizationSpecs:[{chartSpec:T,patternType:r}]})}},7462:function(t,e,n){"use strict";n.d(e,{U:function(){return f},c:function(){return l}});var r=n(1448),a=n.n(r),i=n(3100),o=n.n(i),u=n(8972),c=n(4477),s=n(8382),l=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{lang:"en-US"},n=t.patterns,r=[];if(!n.length)return[];var i=(0,u.groupBy)(n,(function(t){return t.type}));return Object.entries(i).forEach((function(n){var i=o()(n,2),u=i[0],l=i[1],f=(0,s.l)(a()(a()({},t),{},{patterns:l}));r.push({patternType:u,chartSpec:f,narrativeSpec:(0,c.Z)(a()(a()({},t),{},{patterns:l}),e)})})),r},f=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{lang:"en-US"},n=t.patterns,r=[];return n.forEach((function(n){var i=n.insightType;r.push({patternType:i,chartSpec:{},narrativeSpec:(0,c.Z)(a()(a()({},(0,u.omit)(t,["patterns"])),n),e)})})),r}},8316:function(t,e,n){"use strict";n.d(e,{II:function(){return h},_F:function(){return l},m_:function(){return f},q0:function(){return d}});var r=n(1448),a=n.n(r),i=n(9057),o=n.n(i),u=n(3100),c=n.n(u),s=n(8972),l={SUM:function(t,e){return(0,s.sumBy)(t,e)},COUNT:function(t,e){return t.filter((function(t){return e in t})).length},MAX:function(t,e){var n;return null===(n=(0,s.maxBy)(t,e))||void 0===n?void 0:n[e]},MIN:function(t,e){var n;return null===(n=(0,s.minBy)(t,e))||void 0===n?void 0:n[e]},MEAN:function(t,e){return(0,s.meanBy)(t,e)},COUNT_DISTINCT:function(t,e){return(0,s.uniq)(t.filter((function(t){return e in t})).map((function(t){return t[e]}))).length}};function f(t,e,n,r){var a=(0,s.groupBy)(t,e);return(r?(0,s.sortBy)(Object.entries(a),"0"):Object.entries(a)).map((function(t){var r=c()(t,2),a=r[0],i=r[1],u=o()({},e,a);return n.forEach((function(t){var e=t.fieldName,n=t.method,r=l[n];u[e]=r(i,e)})),u}))}function h(t,e,n){var r=(0,s.groupBy)(t,e),a=[];return Object.entries(r).forEach((function(t){var r=c()(t,2),i=r[0],u=r[1];n.forEach((function(t){var n=t.fieldName,r=t.method;if(n in u[0]){var c=(0,l[r])(u,n);a.push(o()(o()(o()({},e,i),"value",c),"measureName",n))}}))})),a}function d(t,e,n,r){var i=(0,s.groupBy)(t,e),u=n.fieldName,f=n.method,h=l[f];return(0,s.flatten)(Object.entries(i).map((function(t){var n=c()(t,2),i=n[0],l=n[1],f=(0,s.groupBy)(l,r);return Object.entries(f).map((function(t){var e=c()(t,2),n=e[0],a=e[1];return o()(o()({},r,n),u,h(a,u))})).map((function(t){return a()(a()({},t),{},o()({},e,i))}))})))}},8670:function(t,e,n){"use strict";n.d(e,{Z:function(){return x}});var r=n(4479),a=n.n(r),i=n(1448),o=n.n(i),u=n(4528),c=n.n(u),s=n(8798),l=n.n(s),f=n(9057),h=n.n(f),d=n(8972),p=n(5226),v=n(2267),m=n(8346);function g(t,e,n){return n?(0,d.startsWith)(n,".")?(0,d.get)(e,n.slice(1)):(0,d.get)(t,n):e}function y(t,e,n,r){return(0,d.slice)((a=g(t,e,n),(0,d.isUndefined)(a)?[]:(0,d.isArray)(a)?a:[a]),0,r);var a}function b(t,e){if((0,p.sI)(e)&&("delta_value"===t||"ratio_value"===t)){if(e>0)return"positive";if(e<0)return"negative"}}var _=function(){function t(e){var n=e.variable,r=e.structures,a=e.structureTemps;c()(this,t),h()(this,"variable",void 0),h()(this,"structures",void 0),h()(this,"structureTemps",void 0),this.variable=n,this.structures=r,this.structureTemps=a}return l()(t,[{key:"generateTextPhrase",value:function(t){return{type:"text",value:(0,d.toString)(t)}}},{key:"generateVarPhrase",value:function(t,e,n,r){if(!r)return this.generateTextPhrase(n);var a=r.varType,i=r.formatter,u=r.extraCustomMeta,c=function(t,e,n){return(0,p.sI)(e)?"delta_value"===t||"ratio_value"===t?n?n(Math.abs(e)):(0,m.Z)(Math.abs(e)):"proportion"===t?n?n(Math.abs(e)):"".concat((0,m.Z)(100*e),"%"):n?n(e):(0,m.Z)(e):e}(a,n,i);if(a){if((0,v.OC)(a))return{type:"entity",value:c,metadata:{entityType:a,origin:(0,p.sI)(n)?n:void 0,assessment:b(a,n),generateVariableInfo:{scopeVariable:t,path:e}}};var s=null==u?void 0:u(this.variable,t);return{type:"custom",value:c,metadata:o()({customType:a,generateVariableInfo:{scopeVariable:t,path:e}},s)}}return this.generateTextPhrase((0,d.toString)(n))}},{key:"generateSentence",value:function(t,e,n){for(var r,i,u=this,c=[],s=(r=/\${(.*?)}/,i=/&{(.*?)}/,t.split(/([\$|&]{.*?})/).filter((function(t){return t})).map((function(t){var e,n,a=null===(e=i.exec(t))||void 0===e?void 0:e[1];if(a)return{value:a,type:"template"};var o=null===(n=r.exec(t))||void 0===n?void 0:n[1];return o?{value:o,type:"variable"}:{value:t,type:"text"}}))),l=function(){var t,r,i,l=s[f],h=l.type,p=l.value;if("template"===h){var v=p,m=u.structureTemps.find((function(t){return t.templateId===v}));if(m){var b,_=m.template,x=m.useVariable,w=m.variableMetaMap,k=m.limit,M=m.separator,A=void 0===M?",":M,C=y(u.variable,e,x,k),T=C.map((function(t){return u.generateSentence(_,t,w)})).reduce((function(t,e,n){var r=[].concat(a()(t),a()(e));return n!==C.length-1&&r.push(u.generateTextPhrase(A)),r}),[]);c=(b=c).concat.apply(b,a()(T))}else console.warn("".concat(v," is not exist"))}else if("variable"===h){var S=p,N=null==n?void 0:n[S],O=null!=N&&N.getDisplayValue?(t=null==N?void 0:N.getDisplayValue,r=u.variable,i=e,(0,d.isString)(t)?(0,d.replace)(t,/\${(.*?)}/g,(function(t){var e,n=null===(e=/\${(.*?)}/.exec(t))||void 0===e?void 0:e[1];return n?g(r,i,n):""})):t(r,i)):g(u.variable,e,S);c.push(u.generateVarPhrase(e,S,O,o()({},N)))}else"text"===h&&c.push(u.generateTextPhrase(p))},f=0;f<s.length;f+=1)l();return c}},{key:"generateParagraphs",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.variable,r=t.variableMetaMap,a=t.template,i=t.displayType,u=void 0===i?"paragraph":i,c=t.useVariable,s=void 0===c?"":c,l=t.limit,f=t.bulletOrder,h=t.children,d=t.className,p=y(this.variable,n,s,l);return"paragraph"===u?p.map((function(t){return{type:"normal",phrases:e.generateSentence(a,t,r),className:d}})):"bullet"===u?[{type:"bullets",className:d,isOrder:f,bullets:p.map((function(t){return{type:"bullet-item",phrases:e.generateSentence(a,t,r),subBullet:h?e.generateParagraphs(o()(o()({},h),{},{displayType:"bullet"}),t)[0]:void 0}}))}]:null}},{key:"generateSection",value:function(){var t=this;return{paragraphs:this.structures.reduce((function(e,n){return[].concat(a()(e),a()(t.generateParagraphs(n)))}),[])}}},{key:"generateNarrative",value:function(){return{sections:[this.generateSection()]}}}]),t}();function x(t){return new _(t).generateNarrative()}},5244:function(t,e,n){"use strict";n.d(e,{e:function(){return r}});var r=["metric_name","metric_value","other_metric_value","contribute_ratio","delta_value","ratio_value","trend_desc","dim_value","time_desc","proportion"]},3069:function(){},2267:function(t,e,n){"use strict";n.d(e,{FX:function(){return g},Mu:function(){return u},NS:function(){return i},OC:function(){return p},TO:function(){return f},Tv:function(){return v},aY:function(){return l},cL:function(){return h},fc:function(){return y},lD:function(){return c},ps:function(){return d},rF:function(){return m},uV:function(){return o},xf:function(){return s},zu:function(){return b}});var r=n(5226),a=n(5244);function i(t){return(0,r.Kn)(t)&&"customType"in t}function o(t){return(0,r.Kn)(t)&&"customType"in t}function u(t){return(0,r.Kn)(t)&&"paragraphs"in t&&Array.isArray(null==t?void 0:t.paragraphs)}function c(t){return(0,r.Kn)(t)&&"normal"===(null==t?void 0:t.type)&&Array.isArray(null==t?void 0:t.phrases)}function s(t){return(0,r.Kn)(t)&&"bullets"===(null==t?void 0:t.type)&&Array.isArray(null==t?void 0:t.bullets)}function l(t){return(0,r.Kn)(t)&&"divider"===(null==t?void 0:t.type)}function f(t){if(null!=t&&t.startsWith("heading")){var e=Number(null==t?void 0:t.slice(-1));if(e>=1&&e<=6)return e}return NaN}function h(t){if((0,r.Kn)(t)&&"type"in t&&(0,r.HD)(t.type)){var e=f(null==t?void 0:t.type);return t.type.startsWith("heading")&&!Number.isNaN(e)}return!1}function d(t){var e;return"custom"===(null==t?void 0:t.type)&&!(null==t||null===(e=t.metadata)||void 0===e||!e.customType)}function p(t){return a.e.includes(t)}function v(t){var e;return"entity"===(null==t?void 0:t.type)&&a.e.includes(null==t||null===(e=t.metadata)||void 0===e?void 0:e.entityType)}function m(t){return"text"===(null==t?void 0:t.type)}function g(t){return"escape"===(null==t?void 0:t.type)}function y(t){return"formula"===(null==t?void 0:t.type)}function b(t){return"image"===(null==t?void 0:t.type)}},8346:function(t,e,n){"use strict";function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if("string"==typeof t)return t;var n=[{value:1,symbol:""},{value:1e3,symbol:"k"},{value:1e6,symbol:"M"},{value:1e9,symbol:"G"},{value:1e12,symbol:"T"},{value:1e15,symbol:"P"},{value:1e18,symbol:"E"}],r=/\.0+$|(\.[0-9]*[1-9])0+$/,a=n.slice().reverse().find((function(e){return t>=e.value}));return a?(t/a.value).toFixed(e).replace(r,"$1")+a.symbol:t.toFixed(e)}n.d(e,{Z:function(){return r}})},5226:function(t,e,n){"use strict";n.d(e,{HD:function(){return o},Kn:function(){return u},sI:function(){return c}});var r=n(5570),a=n.n(r),i=n(8972);function o(t){return"string"==typeof t}function u(t){return null!==t&&"object"===a()(t)}function c(t){var e=(0,i.toNumber)(t);return!(0,i.isNaN)(e)}},660:function(t,e,n){"use strict";var r=n(4479).default,a=n(4528).default,i=n(8798).default,o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=o(n(322)),c=function(t,e){for(var n=0,r=t.length;n<r;n++)t[n]=e},s=function(t,e){if("number"==typeof t)return t;throw Error("Specifiy an iteratee")},l=function(){function t(e){var n=e.breakpointVerifier,r=e.iteratee,i=void 0===r?s:r,o=e.chunkSize,u=void 0===o?1e3:o;a(this,t),this.iteratee=i,this.breakpointVerifier=n,this.chunkSize=u,this.init=!1,this.maximum=[],this.model=[],this.mu0=0,this.kappa0=1,this.alpha0=1,this.beta0=1,this.muT=[this.mu0],this.kappaT=[this.kappa0],this.alphaT=[this.alpha0],this.betaT=[this.beta0],this.breakPoints_=[],this.iteration=0,this.data=[],this.size=0}return i(t,[{key:"exec",value:function(t){var e=this.chunkSize;if(!this.init){var n=this.maximum=new Array(e+1);c(n,0);var r=this.model=new Array(e+1);c(r,0);for(var a=0;a<r.length;a++)r[a]=new Array(e+1),c(r[a],0);r[0][0]=1,this.mu0=0,this.kappa0=1,this.alpha0=1,this.beta0=1,this.muT=[this.mu0],this.kappaT=[this.kappa0],this.alphaT=[this.alpha0],this.betaT=[this.beta0],this.breakPoints_=[],this.iteration=0,this.init=!0}for(var i=function(t,e){for(var n=[],r=0,a=t.length;r<a;r+=e)n.push(t.slice(r,r+e));return n}(t,e),o=0,u=i.length;o<u;o++){var s=i[0];this.data=s,this.size=s.length,this.iteration=o,this.run(),this.computeBreakPoints();for(var l=this.model,f=l[l.length-1],h=0;h<l.length;h++)l[h]=new Array(e+1),c(l[h],0);l[0]=f,l[0][0]=1}}},{key:"get",value:function(t){return this.iteratee(this.data[t],t)}},{key:"run",value:function(){for(var t,e,n,r=0,a=0;a<this.size;a++){for(var i=new Array(a+1),o=0;o<=a;o++)i[o]=this.betaT[o]*(this.kappaT[o]+1)/(this.alphaT[o]*this.kappaT[o]);var c=u.default.predict(this.get(a),this.muT,i,this.alphaT);.005;for(var s=1;s<=a+1;s++)this.model[s][a+1]=this.model[s-1][a]*c[s-1]*.995;t=0;for(var l=0;l<=a;l++)t+=this.model[l][a]*c[l]*.005;this.model[0][a+1]=t,e=0;for(var f=0;f<this.size;f++)e+=this.model[f][a+1];for(var h=0;h<=this.size;h++)this.model[h][a+1]=this.model[h][a+1]/e;this.update(a),n=Number.MIN_VALUE;for(var d=0;d<=a;d++)this.model[d][a]>n&&(n=this.model[d][a],r=d);this.maximum[a]=r}}},{key:"update",value:function(t){var e,n,r,a;e=new Array(t+2),n=new Array(t+2),r=new Array(t+2),a=new Array(t+2),e[0]=this.mu0,n[0]=this.kappa0,r[0]=this.alpha0,a[0]=this.beta0;for(var i=0;i<=t;i++)e[i+1]=(this.kappaT[i]*this.muT[i]+this.get(t))/(this.kappaT[i]+1),n[i+1]=this.kappaT[i]+1,r[i+1]=this.alphaT[i]+.5,a[i+1]=this.betaT[i]+this.kappaT[i]*Math.pow(this.get(t)-this.muT[i],2)/(2*(this.kappaT[i]+1));this.muT=e,this.kappaT=n,this.alphaT=r,this.betaT=a}},{key:"computeIndex",value:function(t){return this.iteration*this.chunkSize+t}},{key:"computeBreakPoints",value:function(){for(var t=this.breakPoints_,e=0,n=t[0],r=1;r<this.size;r++)if(this.maximum[r-1]>this.maximum[r])if(e=r-this.maximum[r],0===t.length)n={data:this.data[e],index:this.computeIndex(e)},t.push(n);else{var a={data:this.data[e],index:this.computeIndex(e)};this.breakpointVerifier(a,n)&&(n=a,t.push(n))}}},{key:"breakPoints",value:function(){return r(this.breakPoints_).sort((function(t,e){return t.index-e.index}))}}]),t}();e.default=l},2242:function(t,e,n){"use strict";var r=n(4528).default,a=n(8798).default;Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){r(this,t)}return a(t,[{key:"logGamma",value:function(t){var e=1+76.18009173/(t+0)-86.50532033/(t+1)+24.01409822/(t+2)-1.231739516/(t+3)+.00120858003/(t+4)-536382e-11/(t+5);return(t-.5)*Math.log(t+4.5)-(t+4.5)+Math.log(e*Math.sqrt(2*Math.PI))}}]),t}();e.default=i},322:function(t,e,n){"use strict";var r=n(4528).default,a=n(8798).default,i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=i(n(2242)),u=function(){function t(){r(this,t)}return a(t,null,[{key:"predict",value:function(t,e,n,r){for(var a=0,i=n.length,u=new Array(i),c=new Array(i),s=new Array(i),l=new Array(i),f=new o.default,h=0;h<i;h++)c[h]=2*r[h];for(h=0;h<i;h++)l[h]=Math.exp(f.logGamma(c[h]/2+.5)-f.logGamma(c[h]/2));for(h=0;h<i;h++)u[h]=n[h]*c[h]*Math.PI,u[h]=Math.pow(u[h],-.5)*l[h];for(h=0;h<i;h++)a=1+1/(c[h]*n[h])*Math.pow(t-e[h],2),a=Math.pow(a,-(c[h]+1)/2),s[h]=u[h]*a;return s}}]),t}();e.default=u},5376:function(t,e){"use strict";var n=2.2,r=[3.240712470389558,-.969259258688888,.05563600315398933,-1.5372626602963142,1.875996969313966,-.2039948802843549,-.49857440415943116,.041556132211625726,1.0570636917433989],a=[.41242371206635076,.21265606784927693,.019331987577444885,.3575793401363035,.715157818248362,.11919267420354762,.1804662232369621,.0721864539171564,.9504491124870351],i={protan:{x:.7465,y:.2535,m:1.273463,yi:-.073894},deutan:{x:1.4,y:-.4,m:.968437,yi:.003331},tritan:{x:.1748,y:0,m:.062921,yi:.292119},custom:{x:.735,y:.265,m:-1.059259,yi:1.026914}};e.a=function(t,e,o){var u,c,s,l,f,h,d,p,v,m,g,y,b,_,x,w,k,M,A,C,T;return"achroma"===e?(u={R:u=.212656*t.R+.715158*t.G+.072186*t.B,G:u,B:u},o&&(s=(c=1.75)+1,u.R=(c*u.R+t.R)/s,u.G=(c*u.G+t.G)/s,u.B=(c*u.B+t.B)/s),u):(l=i[e],f=function(t){var e=t.X+t.Y+t.Z;return 0===e?{x:0,y:0,Y:t.Y}:{x:t.X/e,y:t.Y/e,Y:t.Y}}(function(t){var e=a,n={},r=t.R/255,i=t.G/255,o=t.B/255;return r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,o=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92,n.X=r*e[0]+i*e[3]+o*e[6],n.Y=r*e[1]+i*e[4]+o*e[7],n.Z=r*e[2]+i*e[5]+o*e[8],n}(t)),h=(f.y-l.y)/(f.x-l.x),d=f.y-f.x*h,v=h*(p=(l.yi-d)/(h-l.m))+d,0,(u={}).X=p*f.Y/v,u.Y=f.Y,u.Z=(1-(p+v))*f.Y/v,M=.312713*f.Y/.329016,A=.358271*f.Y/.329016,m=M-u.X,g=A-u.Z,y=m*(C=r)[0]+0*C[3]+g*C[6],b=m*C[1]+0*C[4]+g*C[7],_=m*C[2]+0*C[5]+g*C[8],u.R=u.X*C[0]+u.Y*C[3]+u.Z*C[6],u.G=u.X*C[1]+u.Y*C[4]+u.Z*C[7],u.B=u.X*C[2]+u.Y*C[5]+u.Z*C[8],x=((u.R<0?0:1)-u.R)/y,w=((u.G<0?0:1)-u.G)/b,(k=(k=((u.B<0?0:1)-u.B)/_)>1||k<0?0:k)>(T=(x=x>1||x<0?0:x)>(w=w>1||w<0?0:w)?x:w)&&(T=k),u.R+=T*y,u.G+=T*b,u.B+=T*_,u.R=255*(u.R<=0?0:u.R>=1?1:Math.pow(u.R,1/n)),u.G=255*(u.G<=0?0:u.G>=1?1:Math.pow(u.G,1/n)),u.B=255*(u.B<=0?0:u.B>=1?1:Math.pow(u.B,1/n)),o&&(s=(c=1.75)+1,u.R=(c*u.R+t.R)/s,u.G=(c*u.G+t.G)/s,u.B=(c*u.B+t.B)/s),u)}},3042:function(t,e,n){"use strict";var r=n(5533),a=n(5376).a,i={protanomaly:{type:"protan",anomalize:!0},protanopia:{type:"protan"},deuteranomaly:{type:"deutan",anomalize:!0},deuteranopia:{type:"deutan"},tritanomaly:{type:"tritan",anomalize:!0},tritanopia:{type:"tritan"},achromatomaly:{type:"achroma",anomalize:!0},achromatopsia:{type:"achroma"}},o=function(t){return Math.round(255*t)},u=function(t){return function(e,n){var u=r(e);if(!u)return n?{R:0,G:0,B:0}:"#000000";var c=new a({R:o(u.red()||0),G:o(u.green()||0),B:o(u.blue()||0)},i[t].type,i[t].anomalize);return c.R=c.R||0,c.G=c.G||0,c.B=c.B||0,n?(delete c.X,delete c.Y,delete c.Z,c):new r.RGB(c.R%256/255,c.G%256/255,c.B%256/255,1).hex()}};for(var c in i)e[c]=u(c)},8972:function(t,e,n){var r;t=n.nmd(t);var a=n(5570).default;(function(){var i,o="Expected a function",u="__lodash_hash_undefined__",c="__lodash_placeholder__",s=16,l=32,f=64,h=128,d=256,p=1/0,v=9007199254740991,m=NaN,g=4294967295,y=[["ary",h],["bind",1],["bindKey",2],["curry",8],["curryRight",s],["flip",512],["partial",l],["partialRight",f],["rearg",d]],b="[object Arguments]",_="[object Array]",x="[object Boolean]",w="[object Date]",k="[object Error]",M="[object Function]",A="[object GeneratorFunction]",C="[object Map]",T="[object Number]",S="[object Object]",N="[object Promise]",O="[object RegExp]",I="[object Set]",P="[object String]",R="[object Symbol]",j="[object WeakMap]",D="[object ArrayBuffer]",E="[object DataView]",L="[object Float32Array]",B="[object Float64Array]",z="[object Int8Array]",Q="[object Int16Array]",G="[object Int32Array]",F="[object Uint8Array]",q="[object Uint8ClampedArray]",$="[object Uint16Array]",U="[object Uint32Array]",V=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Z=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,J=RegExp(Z.source),K=RegExp(Y.source),X=/<%-([\s\S]+?)%>/g,tt=/<%([\s\S]+?)%>/g,et=/<%=([\s\S]+?)%>/g,nt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rt=/^\w*$/,at=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,it=/[\\^$.*+?()[\]{}|]/g,ot=RegExp(it.source),ut=/^\s+/,ct=/\s/,st=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,lt=/\{\n\/\* \[wrapped with (.+)\] \*/,ft=/,? & /,ht=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,dt=/[()=,{}\[\]\/\s]/,pt=/\\(\\)?/g,vt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,mt=/\w*$/,gt=/^[-+]0x[0-9a-f]+$/i,yt=/^0b[01]+$/i,bt=/^\[object .+?Constructor\]$/,_t=/^0o[0-7]+$/i,xt=/^(?:0|[1-9]\d*)$/,wt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,kt=/($^)/,Mt=/['\n\r\u2028\u2029\\]/g,At="\\ud800-\\udfff",Ct="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Tt="\\u2700-\\u27bf",St="a-z\\xdf-\\xf6\\xf8-\\xff",Nt="A-Z\\xc0-\\xd6\\xd8-\\xde",Ot="\\ufe0e\\ufe0f",It="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Pt="['’]",Rt="["+At+"]",jt="["+It+"]",Dt="["+Ct+"]",Et="\\d+",Lt="["+Tt+"]",Bt="["+St+"]",zt="[^"+At+It+Et+Tt+St+Nt+"]",Qt="\\ud83c[\\udffb-\\udfff]",Gt="[^"+At+"]",Ft="(?:\\ud83c[\\udde6-\\uddff]){2}",qt="[\\ud800-\\udbff][\\udc00-\\udfff]",$t="["+Nt+"]",Ut="\\u200d",Vt="(?:"+Bt+"|"+zt+")",Wt="(?:"+$t+"|"+zt+")",Ht="(?:['’](?:d|ll|m|re|s|t|ve))?",Zt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Yt="(?:"+Dt+"|"+Qt+")"+"?",Jt="["+Ot+"]?",Kt=Jt+Yt+("(?:"+Ut+"(?:"+[Gt,Ft,qt].join("|")+")"+Jt+Yt+")*"),Xt="(?:"+[Lt,Ft,qt].join("|")+")"+Kt,te="(?:"+[Gt+Dt+"?",Dt,Ft,qt,Rt].join("|")+")",ee=RegExp(Pt,"g"),ne=RegExp(Dt,"g"),re=RegExp(Qt+"(?="+Qt+")|"+te+Kt,"g"),ae=RegExp([$t+"?"+Bt+"+"+Ht+"(?="+[jt,$t,"$"].join("|")+")",Wt+"+"+Zt+"(?="+[jt,$t+Vt,"$"].join("|")+")",$t+"?"+Vt+"+"+Ht,$t+"+"+Zt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Et,Xt].join("|"),"g"),ie=RegExp("["+Ut+At+Ct+Ot+"]"),oe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ue=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ce=-1,se={};se[L]=se[B]=se[z]=se[Q]=se[G]=se[F]=se[q]=se[$]=se[U]=!0,se[b]=se[_]=se[D]=se[x]=se[E]=se[w]=se[k]=se[M]=se[C]=se[T]=se[S]=se[O]=se[I]=se[P]=se[j]=!1;var le={};le[b]=le[_]=le[D]=le[E]=le[x]=le[w]=le[L]=le[B]=le[z]=le[Q]=le[G]=le[C]=le[T]=le[S]=le[O]=le[I]=le[P]=le[R]=le[F]=le[q]=le[$]=le[U]=!0,le[k]=le[M]=le[j]=!1;var fe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},he=parseFloat,de=parseInt,pe="object"==(void 0===n.g?"undefined":a(n.g))&&n.g&&n.g.Object===Object&&n.g,ve="object"==("undefined"==typeof self?"undefined":a(self))&&self&&self.Object===Object&&self,me=pe||ve||Function("return this")(),ge="object"==a(e)&&e&&!e.nodeType&&e,ye=ge&&"object"==a(t)&&t&&!t.nodeType&&t,be=ye&&ye.exports===ge,_e=be&&pe.process,xe=function(){try{var t=ye&&ye.require&&ye.require("util").types;return t||_e&&_e.binding&&_e.binding("util")}catch(t){}}(),we=xe&&xe.isArrayBuffer,ke=xe&&xe.isDate,Me=xe&&xe.isMap,Ae=xe&&xe.isRegExp,Ce=xe&&xe.isSet,Te=xe&&xe.isTypedArray;function Se(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ne(t,e,n,r){for(var a=-1,i=null==t?0:t.length;++a<i;){var o=t[a];e(r,o,n(o),t)}return r}function Oe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ie(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Pe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Re(t,e){for(var n=-1,r=null==t?0:t.length,a=0,i=[];++n<r;){var o=t[n];e(o,n,t)&&(i[a++]=o)}return i}function je(t,e){return!!(null==t?0:t.length)&&$e(t,e,0)>-1}function De(t,e,n){for(var r=-1,a=null==t?0:t.length;++r<a;)if(n(e,t[r]))return!0;return!1}function Ee(t,e){for(var n=-1,r=null==t?0:t.length,a=Array(r);++n<r;)a[n]=e(t[n],n,t);return a}function Le(t,e){for(var n=-1,r=e.length,a=t.length;++n<r;)t[a+n]=e[n];return t}function Be(t,e,n,r){var a=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++a]);++a<i;)n=e(n,t[a],a,t);return n}function ze(t,e,n,r){var a=null==t?0:t.length;for(r&&a&&(n=t[--a]);a--;)n=e(n,t[a],a,t);return n}function Qe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var Ge=He("length");function Fe(t,e,n){var r;return n(t,(function(t,n,a){if(e(t,n,a))return r=n,!1})),r}function qe(t,e,n,r){for(var a=t.length,i=n+(r?1:-1);r?i--:++i<a;)if(e(t[i],i,t))return i;return-1}function $e(t,e,n){return e==e?function(t,e,n){var r=n-1,a=t.length;for(;++r<a;)if(t[r]===e)return r;return-1}(t,e,n):qe(t,Ve,n)}function Ue(t,e,n,r){for(var a=n-1,i=t.length;++a<i;)if(r(t[a],e))return a;return-1}function Ve(t){return t!=t}function We(t,e){var n=null==t?0:t.length;return n?Je(t,e)/n:m}function He(t){return function(e){return null==e?i:e[t]}}function Ze(t){return function(e){return null==t?i:t[e]}}function Ye(t,e,n,r,a){return a(t,(function(t,a,i){n=r?(r=!1,t):e(n,t,a,i)})),n}function Je(t,e){for(var n,r=-1,a=t.length;++r<a;){var o=e(t[r]);o!==i&&(n=n===i?o:n+o)}return n}function Ke(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Xe(t){return t?t.slice(0,yn(t)+1).replace(ut,""):t}function tn(t){return function(e){return t(e)}}function en(t,e){return Ee(e,(function(e){return t[e]}))}function nn(t,e){return t.has(e)}function rn(t,e){for(var n=-1,r=t.length;++n<r&&$e(e,t[n],0)>-1;);return n}function an(t,e){for(var n=t.length;n--&&$e(e,t[n],0)>-1;);return n}function on(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var un=Ze({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),cn=Ze({"&":"&","<":"<",">":">",'"':""","'":"'"});function sn(t){return"\\"+fe[t]}function ln(t){return ie.test(t)}function fn(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function hn(t,e){return function(n){return t(e(n))}}function dn(t,e){for(var n=-1,r=t.length,a=0,i=[];++n<r;){var o=t[n];o!==e&&o!==c||(t[n]=c,i[a++]=n)}return i}function pn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function vn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function mn(t){return ln(t)?function(t){var e=re.lastIndex=0;for(;re.test(t);)++e;return e}(t):Ge(t)}function gn(t){return ln(t)?function(t){return t.match(re)||[]}(t):function(t){return t.split("")}(t)}function yn(t){for(var e=t.length;e--&&ct.test(t.charAt(e)););return e}var bn=Ze({"&":"&","<":"<",">":">",""":'"',"'":"'"});var _n=function t(e){var n,r=(e=null==e?me:_n.defaults(me.Object(),e,_n.pick(me,ue))).Array,ct=e.Date,At=e.Error,Ct=e.Function,Tt=e.Math,St=e.Object,Nt=e.RegExp,Ot=e.String,It=e.TypeError,Pt=r.prototype,Rt=Ct.prototype,jt=St.prototype,Dt=e["__core-js_shared__"],Et=Rt.toString,Lt=jt.hasOwnProperty,Bt=0,zt=(n=/[^.]+$/.exec(Dt&&Dt.keys&&Dt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Qt=jt.toString,Gt=Et.call(St),Ft=me._,qt=Nt("^"+Et.call(Lt).replace(it,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$t=be?e.Buffer:i,Ut=e.Symbol,Vt=e.Uint8Array,Wt=$t?$t.allocUnsafe:i,Ht=hn(St.getPrototypeOf,St),Zt=St.create,Yt=jt.propertyIsEnumerable,Jt=Pt.splice,Kt=Ut?Ut.isConcatSpreadable:i,Xt=Ut?Ut.iterator:i,te=Ut?Ut.toStringTag:i,re=function(){try{var t=pi(St,"defineProperty");return t({},"",{}),t}catch(t){}}(),ie=e.clearTimeout!==me.clearTimeout&&e.clearTimeout,fe=ct&&ct.now!==me.Date.now&&ct.now,pe=e.setTimeout!==me.setTimeout&&e.setTimeout,ve=Tt.ceil,ge=Tt.floor,ye=St.getOwnPropertySymbols,_e=$t?$t.isBuffer:i,xe=e.isFinite,Ge=Pt.join,Ze=hn(St.keys,St),xn=Tt.max,wn=Tt.min,kn=ct.now,Mn=e.parseInt,An=Tt.random,Cn=Pt.reverse,Tn=pi(e,"DataView"),Sn=pi(e,"Map"),Nn=pi(e,"Promise"),On=pi(e,"Set"),In=pi(e,"WeakMap"),Pn=pi(St,"create"),Rn=In&&new In,jn={},Dn=Gi(Tn),En=Gi(Sn),Ln=Gi(Nn),Bn=Gi(On),zn=Gi(In),Qn=Ut?Ut.prototype:i,Gn=Qn?Qn.valueOf:i,Fn=Qn?Qn.toString:i;function qn(t){if(iu(t)&&!Ho(t)&&!(t instanceof Wn)){if(t instanceof Vn)return t;if(Lt.call(t,"__wrapped__"))return Fi(t)}return new Vn(t)}var $n=function(){function t(){}return function(e){if(!au(e))return{};if(Zt)return Zt(e);t.prototype=e;var n=new t;return t.prototype=i,n}}();function Un(){}function Vn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function Wn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function Hn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Zn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Yn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Jn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Yn;++e<n;)this.add(t[e])}function Kn(t){var e=this.__data__=new Zn(t);this.size=e.size}function Xn(t,e){var n=Ho(t),r=!n&&Wo(t),a=!n&&!r&&Ko(t),i=!n&&!r&&!a&&du(t),o=n||r||a||i,u=o?Ke(t.length,Ot):[],c=u.length;for(var s in t)!e&&!Lt.call(t,s)||o&&("length"==s||a&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||xi(s,c))||u.push(s);return u}function tr(t){var e=t.length;return e?t[Jr(0,e-1)]:i}function er(t,e){return Bi(Pa(t),lr(e,0,t.length))}function nr(t){return Bi(Pa(t))}function rr(t,e,n){(n!==i&&!$o(t[e],n)||n===i&&!(e in t))&&cr(t,e,n)}function ar(t,e,n){var r=t[e];Lt.call(t,e)&&$o(r,n)&&(n!==i||e in t)||cr(t,e,n)}function ir(t,e){for(var n=t.length;n--;)if($o(t[n][0],e))return n;return-1}function or(t,e,n,r){return vr(t,(function(t,a,i){e(r,t,n(t),i)})),r}function ur(t,e){return t&&Ra(e,Du(e),t)}function cr(t,e,n){"__proto__"==e&&re?re(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function sr(t,e){for(var n=-1,a=e.length,o=r(a),u=null==t;++n<a;)o[n]=u?i:Ou(t,e[n]);return o}function lr(t,e,n){return t==t&&(n!==i&&(t=t<=n?t:n),e!==i&&(t=t>=e?t:e)),t}function fr(t,e,n,r,a,o){var u,c=1&e,s=2&e,l=4&e;if(n&&(u=a?n(t,r,a,o):n(t)),u!==i)return u;if(!au(t))return t;var f=Ho(t);if(f){if(u=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&Lt.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!c)return Pa(t,u)}else{var h=gi(t),d=h==M||h==A;if(Ko(t))return Ca(t,c);if(h==S||h==b||d&&!a){if(u=s||d?{}:bi(t),!c)return s?function(t,e){return Ra(t,mi(t),e)}(t,function(t,e){return t&&Ra(e,Eu(e),t)}(u,t)):function(t,e){return Ra(t,vi(t),e)}(t,ur(u,t))}else{if(!le[h])return a?t:{};u=function(t,e,n){var r=t.constructor;switch(e){case D:return Ta(t);case x:case w:return new r(+t);case E:return function(t,e){var n=e?Ta(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case L:case B:case z:case Q:case G:case F:case q:case $:case U:return Sa(t,n);case C:return new r;case T:case P:return new r(t);case O:return function(t){var e=new t.constructor(t.source,mt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case I:return new r;case R:return a=t,Gn?St(Gn.call(a)):{}}var a}(t,h,c)}}o||(o=new Kn);var p=o.get(t);if(p)return p;o.set(t,u),lu(t)?t.forEach((function(r){u.add(fr(r,e,n,r,t,o))})):ou(t)&&t.forEach((function(r,a){u.set(a,fr(r,e,n,a,t,o))}));var v=f?i:(l?s?ui:oi:s?Eu:Du)(t);return Oe(v||t,(function(r,a){v&&(r=t[a=r]),ar(u,a,fr(r,e,n,a,t,o))})),u}function hr(t,e,n){var r=n.length;if(null==t)return!r;for(t=St(t);r--;){var a=n[r],o=e[a],u=t[a];if(u===i&&!(a in t)||!o(u))return!1}return!0}function dr(t,e,n){if("function"!=typeof t)throw new It(o);return ji((function(){t.apply(i,n)}),e)}function pr(t,e,n,r){var a=-1,i=je,o=!0,u=t.length,c=[],s=e.length;if(!u)return c;n&&(e=Ee(e,tn(n))),r?(i=De,o=!1):e.length>=200&&(i=nn,o=!1,e=new Jn(e));t:for(;++a<u;){var l=t[a],f=null==n?l:n(l);if(l=r||0!==l?l:0,o&&f==f){for(var h=s;h--;)if(e[h]===f)continue t;c.push(l)}else i(e,f,r)||c.push(l)}return c}qn.templateSettings={escape:X,evaluate:tt,interpolate:et,variable:"",imports:{_:qn}},qn.prototype=Un.prototype,qn.prototype.constructor=qn,Vn.prototype=$n(Un.prototype),Vn.prototype.constructor=Vn,Wn.prototype=$n(Un.prototype),Wn.prototype.constructor=Wn,Hn.prototype.clear=function(){this.__data__=Pn?Pn(null):{},this.size=0},Hn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Hn.prototype.get=function(t){var e=this.__data__;if(Pn){var n=e[t];return n===u?i:n}return Lt.call(e,t)?e[t]:i},Hn.prototype.has=function(t){var e=this.__data__;return Pn?e[t]!==i:Lt.call(e,t)},Hn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Pn&&e===i?u:e,this},Zn.prototype.clear=function(){this.__data__=[],this.size=0},Zn.prototype.delete=function(t){var e=this.__data__,n=ir(e,t);return!(n<0)&&(n==e.length-1?e.pop():Jt.call(e,n,1),--this.size,!0)},Zn.prototype.get=function(t){var e=this.__data__,n=ir(e,t);return n<0?i:e[n][1]},Zn.prototype.has=function(t){return ir(this.__data__,t)>-1},Zn.prototype.set=function(t,e){var n=this.__data__,r=ir(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Yn.prototype.clear=function(){this.size=0,this.__data__={hash:new Hn,map:new(Sn||Zn),string:new Hn}},Yn.prototype.delete=function(t){var e=hi(this,t).delete(t);return this.size-=e?1:0,e},Yn.prototype.get=function(t){return hi(this,t).get(t)},Yn.prototype.has=function(t){return hi(this,t).has(t)},Yn.prototype.set=function(t,e){var n=hi(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Jn.prototype.add=Jn.prototype.push=function(t){return this.__data__.set(t,u),this},Jn.prototype.has=function(t){return this.__data__.has(t)},Kn.prototype.clear=function(){this.__data__=new Zn,this.size=0},Kn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Kn.prototype.get=function(t){return this.__data__.get(t)},Kn.prototype.has=function(t){return this.__data__.has(t)},Kn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Zn){var r=n.__data__;if(!Sn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Yn(r)}return n.set(t,e),this.size=n.size,this};var vr=Ea(kr),mr=Ea(Mr,!0);function gr(t,e){var n=!0;return vr(t,(function(t,r,a){return n=!!e(t,r,a)})),n}function yr(t,e,n){for(var r=-1,a=t.length;++r<a;){var o=t[r],u=e(o);if(null!=u&&(c===i?u==u&&!hu(u):n(u,c)))var c=u,s=o}return s}function br(t,e){var n=[];return vr(t,(function(t,r,a){e(t,r,a)&&n.push(t)})),n}function _r(t,e,n,r,a){var i=-1,o=t.length;for(n||(n=_i),a||(a=[]);++i<o;){var u=t[i];e>0&&n(u)?e>1?_r(u,e-1,n,r,a):Le(a,u):r||(a[a.length]=u)}return a}var xr=La(),wr=La(!0);function kr(t,e){return t&&xr(t,e,Du)}function Mr(t,e){return t&&wr(t,e,Du)}function Ar(t,e){return Re(e,(function(e){return eu(t[e])}))}function Cr(t,e){for(var n=0,r=(e=wa(e,t)).length;null!=t&&n<r;)t=t[Qi(e[n++])];return n&&n==r?t:i}function Tr(t,e,n){var r=e(t);return Ho(t)?r:Le(r,n(t))}function Sr(t){return null==t?t===i?"[object Undefined]":"[object Null]":te&&te in St(t)?function(t){var e=Lt.call(t,te),n=t[te];try{t[te]=i;var r=!0}catch(t){}var a=Qt.call(t);r&&(e?t[te]=n:delete t[te]);return a}(t):function(t){return Qt.call(t)}(t)}function Nr(t,e){return t>e}function Or(t,e){return null!=t&&Lt.call(t,e)}function Ir(t,e){return null!=t&&e in St(t)}function Pr(t,e,n){for(var a=n?De:je,o=t[0].length,u=t.length,c=u,s=r(u),l=1/0,f=[];c--;){var h=t[c];c&&e&&(h=Ee(h,tn(e))),l=wn(h.length,l),s[c]=!n&&(e||o>=120&&h.length>=120)?new Jn(c&&h):i}h=t[0];var d=-1,p=s[0];t:for(;++d<o&&f.length<l;){var v=h[d],m=e?e(v):v;if(v=n||0!==v?v:0,!(p?nn(p,m):a(f,m,n))){for(c=u;--c;){var g=s[c];if(!(g?nn(g,m):a(t[c],m,n)))continue t}p&&p.push(m),f.push(v)}}return f}function Rr(t,e,n){var r=null==(t=Oi(t,e=wa(e,t)))?t:t[Qi(Xi(e))];return null==r?i:Se(r,t,n)}function jr(t){return iu(t)&&Sr(t)==b}function Dr(t,e,n,r,a){return t===e||(null==t||null==e||!iu(t)&&!iu(e)?t!=t&&e!=e:function(t,e,n,r,a,o){var u=Ho(t),c=Ho(e),s=u?_:gi(t),l=c?_:gi(e),f=(s=s==b?S:s)==S,h=(l=l==b?S:l)==S,d=s==l;if(d&&Ko(t)){if(!Ko(e))return!1;u=!0,f=!1}if(d&&!f)return o||(o=new Kn),u||du(t)?ai(t,e,n,r,a,o):function(t,e,n,r,a,i,o){switch(n){case E:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case D:return!(t.byteLength!=e.byteLength||!i(new Vt(t),new Vt(e)));case x:case w:case T:return $o(+t,+e);case k:return t.name==e.name&&t.message==e.message;case O:case P:return t==e+"";case C:var u=fn;case I:var c=1&r;if(u||(u=pn),t.size!=e.size&&!c)return!1;var s=o.get(t);if(s)return s==e;r|=2,o.set(t,e);var l=ai(u(t),u(e),r,a,i,o);return o.delete(t),l;case R:if(Gn)return Gn.call(t)==Gn.call(e)}return!1}(t,e,s,n,r,a,o);if(!(1&n)){var p=f&&Lt.call(t,"__wrapped__"),v=h&&Lt.call(e,"__wrapped__");if(p||v){var m=p?t.value():t,g=v?e.value():e;return o||(o=new Kn),a(m,g,n,r,o)}}if(!d)return!1;return o||(o=new Kn),function(t,e,n,r,a,o){var u=1&n,c=oi(t),s=c.length,l=oi(e),f=l.length;if(s!=f&&!u)return!1;var h=s;for(;h--;){var d=c[h];if(!(u?d in e:Lt.call(e,d)))return!1}var p=o.get(t),v=o.get(e);if(p&&v)return p==e&&v==t;var m=!0;o.set(t,e),o.set(e,t);var g=u;for(;++h<s;){var y=t[d=c[h]],b=e[d];if(r)var _=u?r(b,y,d,e,t,o):r(y,b,d,t,e,o);if(!(_===i?y===b||a(y,b,n,r,o):_)){m=!1;break}g||(g="constructor"==d)}if(m&&!g){var x=t.constructor,w=e.constructor;x==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof x&&x instanceof x&&"function"==typeof w&&w instanceof w||(m=!1)}return o.delete(t),o.delete(e),m}(t,e,n,r,a,o)}(t,e,n,r,Dr,a))}function Er(t,e,n,r){var a=n.length,o=a,u=!r;if(null==t)return!o;for(t=St(t);a--;){var c=n[a];if(u&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++a<o;){var s=(c=n[a])[0],l=t[s],f=c[1];if(u&&c[2]){if(l===i&&!(s in t))return!1}else{var h=new Kn;if(r)var d=r(l,f,s,t,e,h);if(!(d===i?Dr(f,l,3,r,h):d))return!1}}return!0}function Lr(t){return!(!au(t)||(e=t,zt&&zt in e))&&(eu(t)?qt:bt).test(Gi(t));var e}function Br(t){return"function"==typeof t?t:null==t?uc:"object"==a(t)?Ho(t)?$r(t[0],t[1]):qr(t):mc(t)}function zr(t){if(!Ci(t))return Ze(t);var e=[];for(var n in St(t))Lt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Qr(t){if(!au(t))return function(t){var e=[];if(null!=t)for(var n in St(t))e.push(n);return e}(t);var e=Ci(t),n=[];for(var r in t)("constructor"!=r||!e&&Lt.call(t,r))&&n.push(r);return n}function Gr(t,e){return t<e}function Fr(t,e){var n=-1,a=Yo(t)?r(t.length):[];return vr(t,(function(t,r,i){a[++n]=e(t,r,i)})),a}function qr(t){var e=di(t);return 1==e.length&&e[0][2]?Si(e[0][0],e[0][1]):function(n){return n===t||Er(n,t,e)}}function $r(t,e){return ki(t)&&Ti(e)?Si(Qi(t),e):function(n){var r=Ou(n,t);return r===i&&r===e?Iu(n,t):Dr(e,r,3)}}function Ur(t,e,n,r,a){t!==e&&xr(e,(function(o,u){if(a||(a=new Kn),au(o))!function(t,e,n,r,a,o,u){var c=Pi(t,n),s=Pi(e,n),l=u.get(s);if(l)return void rr(t,n,l);var f=o?o(c,s,n+"",t,e,u):i,h=f===i;if(h){var d=Ho(s),p=!d&&Ko(s),v=!d&&!p&&du(s);f=s,d||p||v?Ho(c)?f=c:Jo(c)?f=Pa(c):p?(h=!1,f=Ca(s,!0)):v?(h=!1,f=Sa(s,!0)):f=[]:cu(s)||Wo(s)?(f=c,Wo(c)?f=xu(c):au(c)&&!eu(c)||(f=bi(s))):h=!1}h&&(u.set(s,f),a(f,s,r,o,u),u.delete(s));rr(t,n,f)}(t,e,u,n,Ur,r,a);else{var c=r?r(Pi(t,u),o,u+"",t,e,a):i;c===i&&(c=o),rr(t,u,c)}}),Eu)}function Vr(t,e){var n=t.length;if(n)return xi(e+=e<0?n:0,n)?t[e]:i}function Wr(t,e,n){e=e.length?Ee(e,(function(t){return Ho(t)?function(e){return Cr(e,1===t.length?t[0]:t)}:t})):[uc];var r=-1;e=Ee(e,tn(fi()));var a=Fr(t,(function(t,n,a){var i=Ee(e,(function(e){return e(t)}));return{criteria:i,index:++r,value:t}}));return function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(a,(function(t,e){return function(t,e,n){var r=-1,a=t.criteria,i=e.criteria,o=a.length,u=n.length;for(;++r<o;){var c=Na(a[r],i[r]);if(c)return r>=u?c:c*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}))}function Hr(t,e,n){for(var r=-1,a=e.length,i={};++r<a;){var o=e[r],u=Cr(t,o);n(u,o)&&na(i,wa(o,t),u)}return i}function Zr(t,e,n,r){var a=r?Ue:$e,i=-1,o=e.length,u=t;for(t===e&&(e=Pa(e)),n&&(u=Ee(t,tn(n)));++i<o;)for(var c=0,s=e[i],l=n?n(s):s;(c=a(u,l,c,r))>-1;)u!==t&&Jt.call(u,c,1),Jt.call(t,c,1);return t}function Yr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var a=e[n];if(n==r||a!==i){var i=a;xi(a)?Jt.call(t,a,1):pa(t,a)}}return t}function Jr(t,e){return t+ge(An()*(e-t+1))}function Kr(t,e){var n="";if(!t||e<1||e>v)return n;do{e%2&&(n+=t),(e=ge(e/2))&&(t+=t)}while(e);return n}function Xr(t,e){return Di(Ni(t,e,uc),t+"")}function ta(t){return tr($u(t))}function ea(t,e){var n=$u(t);return Bi(n,lr(e,0,n.length))}function na(t,e,n,r){if(!au(t))return t;for(var a=-1,o=(e=wa(e,t)).length,u=o-1,c=t;null!=c&&++a<o;){var s=Qi(e[a]),l=n;if("__proto__"===s||"constructor"===s||"prototype"===s)return t;if(a!=u){var f=c[s];(l=r?r(f,s,c):i)===i&&(l=au(f)?f:xi(e[a+1])?[]:{})}ar(c,s,l),c=c[s]}return t}var ra=Rn?function(t,e){return Rn.set(t,e),t}:uc,aa=re?function(t,e){return re(t,"toString",{configurable:!0,enumerable:!1,value:ac(e),writable:!0})}:uc;function ia(t){return Bi($u(t))}function oa(t,e,n){var a=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=r(i);++a<i;)o[a]=t[a+e];return o}function ua(t,e){var n;return vr(t,(function(t,r,a){return!(n=e(t,r,a))})),!!n}function ca(t,e,n){var r=0,a=null==t?r:t.length;if("number"==typeof e&&e==e&&a<=2147483647){for(;r<a;){var i=r+a>>>1,o=t[i];null!==o&&!hu(o)&&(n?o<=e:o<e)?r=i+1:a=i}return a}return sa(t,e,uc,n)}function sa(t,e,n,r){var a=0,o=null==t?0:t.length;if(0===o)return 0;for(var u=(e=n(e))!=e,c=null===e,s=hu(e),l=e===i;a<o;){var f=ge((a+o)/2),h=n(t[f]),d=h!==i,p=null===h,v=h==h,m=hu(h);if(u)var g=r||v;else g=l?v&&(r||d):c?v&&d&&(r||!p):s?v&&d&&!p&&(r||!m):!p&&!m&&(r?h<=e:h<e);g?a=f+1:o=f}return wn(o,4294967294)}function la(t,e){for(var n=-1,r=t.length,a=0,i=[];++n<r;){var o=t[n],u=e?e(o):o;if(!n||!$o(u,c)){var c=u;i[a++]=0===o?0:o}}return i}function fa(t){return"number"==typeof t?t:hu(t)?m:+t}function ha(t){if("string"==typeof t)return t;if(Ho(t))return Ee(t,ha)+"";if(hu(t))return Fn?Fn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function da(t,e,n){var r=-1,a=je,i=t.length,o=!0,u=[],c=u;if(n)o=!1,a=De;else if(i>=200){var s=e?null:Ka(t);if(s)return pn(s);o=!1,a=nn,c=new Jn}else c=e?[]:u;t:for(;++r<i;){var l=t[r],f=e?e(l):l;if(l=n||0!==l?l:0,o&&f==f){for(var h=c.length;h--;)if(c[h]===f)continue t;e&&c.push(f),u.push(l)}else a(c,f,n)||(c!==u&&c.push(f),u.push(l))}return u}function pa(t,e){return null==(t=Oi(t,e=wa(e,t)))||delete t[Qi(Xi(e))]}function va(t,e,n,r){return na(t,e,n(Cr(t,e)),r)}function ma(t,e,n,r){for(var a=t.length,i=r?a:-1;(r?i--:++i<a)&&e(t[i],i,t););return n?oa(t,r?0:i,r?i+1:a):oa(t,r?i+1:0,r?a:i)}function ga(t,e){var n=t;return n instanceof Wn&&(n=n.value()),Be(e,(function(t,e){return e.func.apply(e.thisArg,Le([t],e.args))}),n)}function ya(t,e,n){var a=t.length;if(a<2)return a?da(t[0]):[];for(var i=-1,o=r(a);++i<a;)for(var u=t[i],c=-1;++c<a;)c!=i&&(o[i]=pr(o[i]||u,t[c],e,n));return da(_r(o,1),e,n)}function ba(t,e,n){for(var r=-1,a=t.length,o=e.length,u={};++r<a;){var c=r<o?e[r]:i;n(u,t[r],c)}return u}function _a(t){return Jo(t)?t:[]}function xa(t){return"function"==typeof t?t:uc}function wa(t,e){return Ho(t)?t:ki(t,e)?[t]:zi(wu(t))}var ka=Xr;function Ma(t,e,n){var r=t.length;return n=n===i?r:n,!e&&n>=r?t:oa(t,e,n)}var Aa=ie||function(t){return me.clearTimeout(t)};function Ca(t,e){if(e)return t.slice();var n=t.length,r=Wt?Wt(n):new t.constructor(n);return t.copy(r),r}function Ta(t){var e=new t.constructor(t.byteLength);return new Vt(e).set(new Vt(t)),e}function Sa(t,e){var n=e?Ta(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Na(t,e){if(t!==e){var n=t!==i,r=null===t,a=t==t,o=hu(t),u=e!==i,c=null===e,s=e==e,l=hu(e);if(!c&&!l&&!o&&t>e||o&&u&&s&&!c&&!l||r&&u&&s||!n&&s||!a)return 1;if(!r&&!o&&!l&&t<e||l&&n&&a&&!r&&!o||c&&n&&a||!u&&a||!s)return-1}return 0}function Oa(t,e,n,a){for(var i=-1,o=t.length,u=n.length,c=-1,s=e.length,l=xn(o-u,0),f=r(s+l),h=!a;++c<s;)f[c]=e[c];for(;++i<u;)(h||i<o)&&(f[n[i]]=t[i]);for(;l--;)f[c++]=t[i++];return f}function Ia(t,e,n,a){for(var i=-1,o=t.length,u=-1,c=n.length,s=-1,l=e.length,f=xn(o-c,0),h=r(f+l),d=!a;++i<f;)h[i]=t[i];for(var p=i;++s<l;)h[p+s]=e[s];for(;++u<c;)(d||i<o)&&(h[p+n[u]]=t[i++]);return h}function Pa(t,e){var n=-1,a=t.length;for(e||(e=r(a));++n<a;)e[n]=t[n];return e}function Ra(t,e,n,r){var a=!n;n||(n={});for(var o=-1,u=e.length;++o<u;){var c=e[o],s=r?r(n[c],t[c],c,n,t):i;s===i&&(s=t[c]),a?cr(n,c,s):ar(n,c,s)}return n}function ja(t,e){return function(n,r){var a=Ho(n)?Ne:or,i=e?e():{};return a(n,t,fi(r,2),i)}}function Da(t){return Xr((function(e,n){var r=-1,a=n.length,o=a>1?n[a-1]:i,u=a>2?n[2]:i;for(o=t.length>3&&"function"==typeof o?(a--,o):i,u&&wi(n[0],n[1],u)&&(o=a<3?i:o,a=1),e=St(e);++r<a;){var c=n[r];c&&t(e,c,r,o)}return e}))}function Ea(t,e){return function(n,r){if(null==n)return n;if(!Yo(n))return t(n,r);for(var a=n.length,i=e?a:-1,o=St(n);(e?i--:++i<a)&&!1!==r(o[i],i,o););return n}}function La(t){return function(e,n,r){for(var a=-1,i=St(e),o=r(e),u=o.length;u--;){var c=o[t?u:++a];if(!1===n(i[c],c,i))break}return e}}function Ba(t){return function(e){var n=ln(e=wu(e))?gn(e):i,r=n?n[0]:e.charAt(0),a=n?Ma(n,1).join(""):e.slice(1);return r[t]()+a}}function za(t){return function(e){return Be(ec(Wu(e).replace(ee,"")),t,"")}}function Qa(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=$n(t.prototype),r=t.apply(n,e);return au(r)?r:n}}function Ga(t){return function(e,n,r){var a=St(e);if(!Yo(e)){var o=fi(n,3);e=Du(e),n=function(t){return o(a[t],t,a)}}var u=t(e,n,r);return u>-1?a[o?e[u]:u]:i}}function Fa(t){return ii((function(e){var n=e.length,r=n,a=Vn.prototype.thru;for(t&&e.reverse();r--;){var u=e[r];if("function"!=typeof u)throw new It(o);if(a&&!c&&"wrapper"==si(u))var c=new Vn([],!0)}for(r=c?r:n;++r<n;){var s=si(u=e[r]),l="wrapper"==s?ci(u):i;c=l&&Mi(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?c[si(l[0])].apply(c,l[3]):1==u.length&&Mi(u)?c[s]():c.thru(u)}return function(){var t=arguments,r=t[0];if(c&&1==t.length&&Ho(r))return c.plant(r).value();for(var a=0,i=n?e[a].apply(this,t):r;++a<n;)i=e[a].call(this,i);return i}}))}function qa(t,e,n,a,o,u,c,s,l,f){var d=e&h,p=1&e,v=2&e,m=24&e,g=512&e,y=v?i:Qa(t);return function i(){for(var h=arguments.length,b=r(h),_=h;_--;)b[_]=arguments[_];if(m)var x=li(i),w=on(b,x);if(a&&(b=Oa(b,a,o,m)),u&&(b=Ia(b,u,c,m)),h-=w,m&&h<f){var k=dn(b,x);return Ya(t,e,qa,i.placeholder,n,b,k,s,l,f-h)}var M=p?n:this,A=v?M[t]:t;return h=b.length,s?b=Ii(b,s):g&&h>1&&b.reverse(),d&&l<h&&(b.length=l),this&&this!==me&&this instanceof i&&(A=y||Qa(A)),A.apply(M,b)}}function $a(t,e){return function(n,r){return function(t,e,n,r){return kr(t,(function(t,a,i){e(r,n(t),a,i)})),r}(n,t,e(r),{})}}function Ua(t,e){return function(n,r){var a;if(n===i&&r===i)return e;if(n!==i&&(a=n),r!==i){if(a===i)return r;"string"==typeof n||"string"==typeof r?(n=ha(n),r=ha(r)):(n=fa(n),r=fa(r)),a=t(n,r)}return a}}function Va(t){return ii((function(e){return e=Ee(e,tn(fi())),Xr((function(n){var r=this;return t(e,(function(t){return Se(t,r,n)}))}))}))}function Wa(t,e){var n=(e=e===i?" ":ha(e)).length;if(n<2)return n?Kr(e,t):e;var r=Kr(e,ve(t/mn(e)));return ln(e)?Ma(gn(r),0,t).join(""):r.slice(0,t)}function Ha(t){return function(e,n,a){return a&&"number"!=typeof a&&wi(e,n,a)&&(n=a=i),e=gu(e),n===i?(n=e,e=0):n=gu(n),function(t,e,n,a){for(var i=-1,o=xn(ve((e-t)/(n||1)),0),u=r(o);o--;)u[a?o:++i]=t,t+=n;return u}(e,n,a=a===i?e<n?1:-1:gu(a),t)}}function Za(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=_u(e),n=_u(n)),t(e,n)}}function Ya(t,e,n,r,a,o,u,c,s,h){var d=8&e;e|=d?l:f,4&(e&=~(d?f:l))||(e&=-4);var p=[t,e,a,d?o:i,d?u:i,d?i:o,d?i:u,c,s,h],v=n.apply(i,p);return Mi(t)&&Ri(v,p),v.placeholder=r,Ei(v,t,e)}function Ja(t){var e=Tt[t];return function(t,n){if(t=_u(t),(n=null==n?0:wn(yu(n),292))&&xe(t)){var r=(wu(t)+"e").split("e");return+((r=(wu(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Ka=On&&1/pn(new On([,-0]))[1]==p?function(t){return new On(t)}:hc;function Xa(t){return function(e){var n=gi(e);return n==C?fn(e):n==I?vn(e):function(t,e){return Ee(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function ti(t,e,n,a,u,p,v,m){var g=2&e;if(!g&&"function"!=typeof t)throw new It(o);var y=a?a.length:0;if(y||(e&=-97,a=u=i),v=v===i?v:xn(yu(v),0),m=m===i?m:yu(m),y-=u?u.length:0,e&f){var b=a,_=u;a=u=i}var x=g?i:ci(t),w=[t,e,n,a,u,b,_,p,v,m];if(x&&function(t,e){var n=t[1],r=e[1],a=n|r,i=a<131,o=r==h&&8==n||r==h&&n==d&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!i&&!o)return t;1&r&&(t[2]=e[2],a|=1&n?0:4);var u=e[3];if(u){var s=t[3];t[3]=s?Oa(s,u,e[4]):u,t[4]=s?dn(t[3],c):e[4]}(u=e[5])&&(s=t[5],t[5]=s?Ia(s,u,e[6]):u,t[6]=s?dn(t[5],c):e[6]);(u=e[7])&&(t[7]=u);r&h&&(t[8]=null==t[8]?e[8]:wn(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=a}(w,x),t=w[0],e=w[1],n=w[2],a=w[3],u=w[4],!(m=w[9]=w[9]===i?g?0:t.length:xn(w[9]-y,0))&&24&e&&(e&=-25),e&&1!=e)k=8==e||e==s?function(t,e,n){var a=Qa(t);return function o(){for(var u=arguments.length,c=r(u),s=u,l=li(o);s--;)c[s]=arguments[s];var f=u<3&&c[0]!==l&&c[u-1]!==l?[]:dn(c,l);return(u-=f.length)<n?Ya(t,e,qa,o.placeholder,i,c,f,i,i,n-u):Se(this&&this!==me&&this instanceof o?a:t,this,c)}}(t,e,m):e!=l&&33!=e||u.length?qa.apply(i,w):function(t,e,n,a){var i=1&e,o=Qa(t);return function e(){for(var u=-1,c=arguments.length,s=-1,l=a.length,f=r(l+c),h=this&&this!==me&&this instanceof e?o:t;++s<l;)f[s]=a[s];for(;c--;)f[s++]=arguments[++u];return Se(h,i?n:this,f)}}(t,e,n,a);else var k=function(t,e,n){var r=1&e,a=Qa(t);return function e(){return(this&&this!==me&&this instanceof e?a:t).apply(r?n:this,arguments)}}(t,e,n);return Ei((x?ra:Ri)(k,w),t,e)}function ei(t,e,n,r){return t===i||$o(t,jt[n])&&!Lt.call(r,n)?e:t}function ni(t,e,n,r,a,o){return au(t)&&au(e)&&(o.set(e,t),Ur(t,e,i,ni,o),o.delete(e)),t}function ri(t){return cu(t)?i:t}function ai(t,e,n,r,a,o){var u=1&n,c=t.length,s=e.length;if(c!=s&&!(u&&s>c))return!1;var l=o.get(t),f=o.get(e);if(l&&f)return l==e&&f==t;var h=-1,d=!0,p=2&n?new Jn:i;for(o.set(t,e),o.set(e,t);++h<c;){var v=t[h],m=e[h];if(r)var g=u?r(m,v,h,e,t,o):r(v,m,h,t,e,o);if(g!==i){if(g)continue;d=!1;break}if(p){if(!Qe(e,(function(t,e){if(!nn(p,e)&&(v===t||a(v,t,n,r,o)))return p.push(e)}))){d=!1;break}}else if(v!==m&&!a(v,m,n,r,o)){d=!1;break}}return o.delete(t),o.delete(e),d}function ii(t){return Di(Ni(t,i,Hi),t+"")}function oi(t){return Tr(t,Du,vi)}function ui(t){return Tr(t,Eu,mi)}var ci=Rn?function(t){return Rn.get(t)}:hc;function si(t){for(var e=t.name+"",n=jn[e],r=Lt.call(jn,e)?n.length:0;r--;){var a=n[r],i=a.func;if(null==i||i==t)return a.name}return e}function li(t){return(Lt.call(qn,"placeholder")?qn:t).placeholder}function fi(){var t=qn.iteratee||cc;return t=t===cc?Br:t,arguments.length?t(arguments[0],arguments[1]):t}function hi(t,e){var n,r,i=t.__data__;return("string"==(r=a(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function di(t){for(var e=Du(t),n=e.length;n--;){var r=e[n],a=t[r];e[n]=[r,a,Ti(a)]}return e}function pi(t,e){var n=function(t,e){return null==t?i:t[e]}(t,e);return Lr(n)?n:i}var vi=ye?function(t){return null==t?[]:(t=St(t),Re(ye(t),(function(e){return Yt.call(t,e)})))}:bc,mi=ye?function(t){for(var e=[];t;)Le(e,vi(t)),t=Ht(t);return e}:bc,gi=Sr;function yi(t,e,n){for(var r=-1,a=(e=wa(e,t)).length,i=!1;++r<a;){var o=Qi(e[r]);if(!(i=null!=t&&n(t,o)))break;t=t[o]}return i||++r!=a?i:!!(a=null==t?0:t.length)&&ru(a)&&xi(o,a)&&(Ho(t)||Wo(t))}function bi(t){return"function"!=typeof t.constructor||Ci(t)?{}:$n(Ht(t))}function _i(t){return Ho(t)||Wo(t)||!!(Kt&&t&&t[Kt])}function xi(t,e){var n=a(t);return!!(e=null==e?v:e)&&("number"==n||"symbol"!=n&&xt.test(t))&&t>-1&&t%1==0&&t<e}function wi(t,e,n){if(!au(n))return!1;var r=a(e);return!!("number"==r?Yo(n)&&xi(e,n.length):"string"==r&&e in n)&&$o(n[e],t)}function ki(t,e){if(Ho(t))return!1;var n=a(t);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!hu(t))||(rt.test(t)||!nt.test(t)||null!=e&&t in St(e))}function Mi(t){var e=si(t),n=qn[e];if("function"!=typeof n||!(e in Wn.prototype))return!1;if(t===n)return!0;var r=ci(n);return!!r&&t===r[0]}(Tn&&gi(new Tn(new ArrayBuffer(1)))!=E||Sn&&gi(new Sn)!=C||Nn&&gi(Nn.resolve())!=N||On&&gi(new On)!=I||In&&gi(new In)!=j)&&(gi=function(t){var e=Sr(t),n=e==S?t.constructor:i,r=n?Gi(n):"";if(r)switch(r){case Dn:return E;case En:return C;case Ln:return N;case Bn:return I;case zn:return j}return e});var Ai=Dt?eu:_c;function Ci(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||jt)}function Ti(t){return t==t&&!au(t)}function Si(t,e){return function(n){return null!=n&&(n[t]===e&&(e!==i||t in St(n)))}}function Ni(t,e,n){return e=xn(e===i?t.length-1:e,0),function(){for(var a=arguments,i=-1,o=xn(a.length-e,0),u=r(o);++i<o;)u[i]=a[e+i];i=-1;for(var c=r(e+1);++i<e;)c[i]=a[i];return c[e]=n(u),Se(t,this,c)}}function Oi(t,e){return e.length<2?t:Cr(t,oa(e,0,-1))}function Ii(t,e){for(var n=t.length,r=wn(e.length,n),a=Pa(t);r--;){var o=e[r];t[r]=xi(o,n)?a[o]:i}return t}function Pi(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ri=Li(ra),ji=pe||function(t,e){return me.setTimeout(t,e)},Di=Li(aa);function Ei(t,e,n){var r=e+"";return Di(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(st,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Oe(y,(function(n){var r="_."+n[0];e&n[1]&&!je(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(lt);return e?e[1].split(ft):[]}(r),n)))}function Li(t){var e=0,n=0;return function(){var r=kn(),a=16-(r-n);if(n=r,a>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function Bi(t,e){var n=-1,r=t.length,a=r-1;for(e=e===i?r:e;++n<e;){var o=Jr(n,a),u=t[o];t[o]=t[n],t[n]=u}return t.length=e,t}var zi=function(t){var e=Bo(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(at,(function(t,n,r,a){e.push(r?a.replace(pt,"$1"):n||t)})),e}));function Qi(t){if("string"==typeof t||hu(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Gi(t){if(null!=t){try{return Et.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Fi(t){if(t instanceof Wn)return t.clone();var e=new Vn(t.__wrapped__,t.__chain__);return e.__actions__=Pa(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var qi=Xr((function(t,e){return Jo(t)?pr(t,_r(e,1,Jo,!0)):[]})),$i=Xr((function(t,e){var n=Xi(e);return Jo(n)&&(n=i),Jo(t)?pr(t,_r(e,1,Jo,!0),fi(n,2)):[]})),Ui=Xr((function(t,e){var n=Xi(e);return Jo(n)&&(n=i),Jo(t)?pr(t,_r(e,1,Jo,!0),i,n):[]}));function Vi(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var a=null==n?0:yu(n);return a<0&&(a=xn(r+a,0)),qe(t,fi(e,3),a)}function Wi(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var a=r-1;return n!==i&&(a=yu(n),a=n<0?xn(r+a,0):wn(a,r-1)),qe(t,fi(e,3),a,!0)}function Hi(t){return(null==t?0:t.length)?_r(t,1):[]}function Zi(t){return t&&t.length?t[0]:i}var Yi=Xr((function(t){var e=Ee(t,_a);return e.length&&e[0]===t[0]?Pr(e):[]})),Ji=Xr((function(t){var e=Xi(t),n=Ee(t,_a);return e===Xi(n)?e=i:n.pop(),n.length&&n[0]===t[0]?Pr(n,fi(e,2)):[]})),Ki=Xr((function(t){var e=Xi(t),n=Ee(t,_a);return(e="function"==typeof e?e:i)&&n.pop(),n.length&&n[0]===t[0]?Pr(n,i,e):[]}));function Xi(t){var e=null==t?0:t.length;return e?t[e-1]:i}var to=Xr(eo);function eo(t,e){return t&&t.length&&e&&e.length?Zr(t,e):t}var no=ii((function(t,e){var n=null==t?0:t.length,r=sr(t,e);return Yr(t,Ee(e,(function(t){return xi(t,n)?+t:t})).sort(Na)),r}));function ro(t){return null==t?t:Cn.call(t)}var ao=Xr((function(t){return da(_r(t,1,Jo,!0))})),io=Xr((function(t){var e=Xi(t);return Jo(e)&&(e=i),da(_r(t,1,Jo,!0),fi(e,2))})),oo=Xr((function(t){var e=Xi(t);return e="function"==typeof e?e:i,da(_r(t,1,Jo,!0),i,e)}));function uo(t){if(!t||!t.length)return[];var e=0;return t=Re(t,(function(t){if(Jo(t))return e=xn(t.length,e),!0})),Ke(e,(function(e){return Ee(t,He(e))}))}function co(t,e){if(!t||!t.length)return[];var n=uo(t);return null==e?n:Ee(n,(function(t){return Se(e,i,t)}))}var so=Xr((function(t,e){return Jo(t)?pr(t,e):[]})),lo=Xr((function(t){return ya(Re(t,Jo))})),fo=Xr((function(t){var e=Xi(t);return Jo(e)&&(e=i),ya(Re(t,Jo),fi(e,2))})),ho=Xr((function(t){var e=Xi(t);return e="function"==typeof e?e:i,ya(Re(t,Jo),i,e)})),po=Xr(uo);var vo=Xr((function(t){var e=t.length,n=e>1?t[e-1]:i;return n="function"==typeof n?(t.pop(),n):i,co(t,n)}));function mo(t){var e=qn(t);return e.__chain__=!0,e}function go(t,e){return e(t)}var yo=ii((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,a=function(e){return sr(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Wn&&xi(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:go,args:[a],thisArg:i}),new Vn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(a)}));var bo=ja((function(t,e,n){Lt.call(t,n)?++t[n]:cr(t,n,1)}));var _o=Ga(Vi),xo=Ga(Wi);function wo(t,e){return(Ho(t)?Oe:vr)(t,fi(e,3))}function ko(t,e){return(Ho(t)?Ie:mr)(t,fi(e,3))}var Mo=ja((function(t,e,n){Lt.call(t,n)?t[n].push(e):cr(t,n,[e])}));var Ao=Xr((function(t,e,n){var a=-1,i="function"==typeof e,o=Yo(t)?r(t.length):[];return vr(t,(function(t){o[++a]=i?Se(e,t,n):Rr(t,e,n)})),o})),Co=ja((function(t,e,n){cr(t,n,e)}));function To(t,e){return(Ho(t)?Ee:Fr)(t,fi(e,3))}var So=ja((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var No=Xr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&wi(t,e[0],e[1])?e=[]:n>2&&wi(e[0],e[1],e[2])&&(e=[e[0]]),Wr(t,_r(e,1),[])})),Oo=fe||function(){return me.Date.now()};function Io(t,e,n){return e=n?i:e,e=t&&null==e?t.length:e,ti(t,h,i,i,i,i,e)}function Po(t,e){var n;if("function"!=typeof e)throw new It(o);return t=yu(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=i),n}}var Ro=Xr((function(t,e,n){var r=1;if(n.length){var a=dn(n,li(Ro));r|=l}return ti(t,r,e,n,a)})),jo=Xr((function(t,e,n){var r=3;if(n.length){var a=dn(n,li(jo));r|=l}return ti(e,r,t,n,a)}));function Do(t,e,n){var r,a,u,c,s,l,f=0,h=!1,d=!1,p=!0;if("function"!=typeof t)throw new It(o);function v(e){var n=r,o=a;return r=a=i,f=e,c=t.apply(o,n)}function m(t){return f=t,s=ji(y,e),h?v(t):c}function g(t){var n=t-l;return l===i||n>=e||n<0||d&&t-f>=u}function y(){var t=Oo();if(g(t))return b(t);s=ji(y,function(t){var n=e-(t-l);return d?wn(n,u-(t-f)):n}(t))}function b(t){return s=i,p&&r?v(t):(r=a=i,c)}function _(){var t=Oo(),n=g(t);if(r=arguments,a=this,l=t,n){if(s===i)return m(l);if(d)return Aa(s),s=ji(y,e),v(l)}return s===i&&(s=ji(y,e)),c}return e=_u(e)||0,au(n)&&(h=!!n.leading,u=(d="maxWait"in n)?xn(_u(n.maxWait)||0,e):u,p="trailing"in n?!!n.trailing:p),_.cancel=function(){s!==i&&Aa(s),f=0,r=l=a=s=i},_.flush=function(){return s===i?c:b(Oo())},_}var Eo=Xr((function(t,e){return dr(t,1,e)})),Lo=Xr((function(t,e,n){return dr(t,_u(e)||0,n)}));function Bo(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new It(o);var n=function n(){var r=arguments,a=e?e.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var o=t.apply(this,r);return n.cache=i.set(a,o)||i,o};return n.cache=new(Bo.Cache||Yn),n}function zo(t){if("function"!=typeof t)throw new It(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Bo.Cache=Yn;var Qo=ka((function(t,e){var n=(e=1==e.length&&Ho(e[0])?Ee(e[0],tn(fi())):Ee(_r(e,1),tn(fi()))).length;return Xr((function(r){for(var a=-1,i=wn(r.length,n);++a<i;)r[a]=e[a].call(this,r[a]);return Se(t,this,r)}))})),Go=Xr((function(t,e){var n=dn(e,li(Go));return ti(t,l,i,e,n)})),Fo=Xr((function(t,e){var n=dn(e,li(Fo));return ti(t,f,i,e,n)})),qo=ii((function(t,e){return ti(t,d,i,i,i,e)}));function $o(t,e){return t===e||t!=t&&e!=e}var Uo=Za(Nr),Vo=Za((function(t,e){return t>=e})),Wo=jr(function(){return arguments}())?jr:function(t){return iu(t)&&Lt.call(t,"callee")&&!Yt.call(t,"callee")},Ho=r.isArray,Zo=we?tn(we):function(t){return iu(t)&&Sr(t)==D};function Yo(t){return null!=t&&ru(t.length)&&!eu(t)}function Jo(t){return iu(t)&&Yo(t)}var Ko=_e||_c,Xo=ke?tn(ke):function(t){return iu(t)&&Sr(t)==w};function tu(t){if(!iu(t))return!1;var e=Sr(t);return e==k||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!cu(t)}function eu(t){if(!au(t))return!1;var e=Sr(t);return e==M||e==A||"[object AsyncFunction]"==e||"[object Proxy]"==e}function nu(t){return"number"==typeof t&&t==yu(t)}function ru(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=v}function au(t){var e=a(t);return null!=t&&("object"==e||"function"==e)}function iu(t){return null!=t&&"object"==a(t)}var ou=Me?tn(Me):function(t){return iu(t)&&gi(t)==C};function uu(t){return"number"==typeof t||iu(t)&&Sr(t)==T}function cu(t){if(!iu(t)||Sr(t)!=S)return!1;var e=Ht(t);if(null===e)return!0;var n=Lt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Et.call(n)==Gt}var su=Ae?tn(Ae):function(t){return iu(t)&&Sr(t)==O};var lu=Ce?tn(Ce):function(t){return iu(t)&&gi(t)==I};function fu(t){return"string"==typeof t||!Ho(t)&&iu(t)&&Sr(t)==P}function hu(t){return"symbol"==a(t)||iu(t)&&Sr(t)==R}var du=Te?tn(Te):function(t){return iu(t)&&ru(t.length)&&!!se[Sr(t)]};var pu=Za(Gr),vu=Za((function(t,e){return t<=e}));function mu(t){if(!t)return[];if(Yo(t))return fu(t)?gn(t):Pa(t);if(Xt&&t[Xt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Xt]());var e=gi(t);return(e==C?fn:e==I?pn:$u)(t)}function gu(t){return t?(t=_u(t))===p||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function yu(t){var e=gu(t),n=e%1;return e==e?n?e-n:e:0}function bu(t){return t?lr(yu(t),0,g):0}function _u(t){if("number"==typeof t)return t;if(hu(t))return m;if(au(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=au(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Xe(t);var n=yt.test(t);return n||_t.test(t)?de(t.slice(2),n?2:8):gt.test(t)?m:+t}function xu(t){return Ra(t,Eu(t))}function wu(t){return null==t?"":ha(t)}var ku=Da((function(t,e){if(Ci(e)||Yo(e))Ra(e,Du(e),t);else for(var n in e)Lt.call(e,n)&&ar(t,n,e[n])})),Mu=Da((function(t,e){Ra(e,Eu(e),t)})),Au=Da((function(t,e,n,r){Ra(e,Eu(e),t,r)})),Cu=Da((function(t,e,n,r){Ra(e,Du(e),t,r)})),Tu=ii(sr);var Su=Xr((function(t,e){t=St(t);var n=-1,r=e.length,a=r>2?e[2]:i;for(a&&wi(e[0],e[1],a)&&(r=1);++n<r;)for(var o=e[n],u=Eu(o),c=-1,s=u.length;++c<s;){var l=u[c],f=t[l];(f===i||$o(f,jt[l])&&!Lt.call(t,l))&&(t[l]=o[l])}return t})),Nu=Xr((function(t){return t.push(i,ni),Se(Bu,i,t)}));function Ou(t,e,n){var r=null==t?i:Cr(t,e);return r===i?n:r}function Iu(t,e){return null!=t&&yi(t,e,Ir)}var Pu=$a((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Qt.call(e)),t[e]=n}),ac(uc)),Ru=$a((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Qt.call(e)),Lt.call(t,e)?t[e].push(n):t[e]=[n]}),fi),ju=Xr(Rr);function Du(t){return Yo(t)?Xn(t):zr(t)}function Eu(t){return Yo(t)?Xn(t,!0):Qr(t)}var Lu=Da((function(t,e,n){Ur(t,e,n)})),Bu=Da((function(t,e,n,r){Ur(t,e,n,r)})),zu=ii((function(t,e){var n={};if(null==t)return n;var r=!1;e=Ee(e,(function(e){return e=wa(e,t),r||(r=e.length>1),e})),Ra(t,ui(t),n),r&&(n=fr(n,7,ri));for(var a=e.length;a--;)pa(n,e[a]);return n}));var Qu=ii((function(t,e){return null==t?{}:function(t,e){return Hr(t,e,(function(e,n){return Iu(t,n)}))}(t,e)}));function Gu(t,e){if(null==t)return{};var n=Ee(ui(t),(function(t){return[t]}));return e=fi(e),Hr(t,n,(function(t,n){return e(t,n[0])}))}var Fu=Xa(Du),qu=Xa(Eu);function $u(t){return null==t?[]:en(t,Du(t))}var Uu=za((function(t,e,n){return e=e.toLowerCase(),t+(n?Vu(e):e)}));function Vu(t){return tc(wu(t).toLowerCase())}function Wu(t){return(t=wu(t))&&t.replace(wt,un).replace(ne,"")}var Hu=za((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Zu=za((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Yu=Ba("toLowerCase");var Ju=za((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var Ku=za((function(t,e,n){return t+(n?" ":"")+tc(e)}));var Xu=za((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),tc=Ba("toUpperCase");function ec(t,e,n){return t=wu(t),(e=n?i:e)===i?function(t){return oe.test(t)}(t)?function(t){return t.match(ae)||[]}(t):function(t){return t.match(ht)||[]}(t):t.match(e)||[]}var nc=Xr((function(t,e){try{return Se(t,i,e)}catch(t){return tu(t)?t:new At(t)}})),rc=ii((function(t,e){return Oe(e,(function(e){e=Qi(e),cr(t,e,Ro(t[e],t))})),t}));function ac(t){return function(){return t}}var ic=Fa(),oc=Fa(!0);function uc(t){return t}function cc(t){return Br("function"==typeof t?t:fr(t,1))}var sc=Xr((function(t,e){return function(n){return Rr(n,t,e)}})),lc=Xr((function(t,e){return function(n){return Rr(t,n,e)}}));function fc(t,e,n){var r=Du(e),a=Ar(e,r);null!=n||au(e)&&(a.length||!r.length)||(n=e,e=t,t=this,a=Ar(e,Du(e)));var i=!(au(n)&&"chain"in n&&!n.chain),o=eu(t);return Oe(a,(function(n){var r=e[n];t[n]=r,o&&(t.prototype[n]=function(){var e=this.__chain__;if(i||e){var n=t(this.__wrapped__),a=n.__actions__=Pa(this.__actions__);return a.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Le([this.value()],arguments))})})),t}function hc(){}var dc=Va(Ee),pc=Va(Pe),vc=Va(Qe);function mc(t){return ki(t)?He(Qi(t)):function(t){return function(e){return Cr(e,t)}}(t)}var gc=Ha(),yc=Ha(!0);function bc(){return[]}function _c(){return!1}var xc=Ua((function(t,e){return t+e}),0),wc=Ja("ceil"),kc=Ua((function(t,e){return t/e}),1),Mc=Ja("floor");var Ac,Cc=Ua((function(t,e){return t*e}),1),Tc=Ja("round"),Sc=Ua((function(t,e){return t-e}),0);return qn.after=function(t,e){if("function"!=typeof e)throw new It(o);return t=yu(t),function(){if(--t<1)return e.apply(this,arguments)}},qn.ary=Io,qn.assign=ku,qn.assignIn=Mu,qn.assignInWith=Au,qn.assignWith=Cu,qn.at=Tu,qn.before=Po,qn.bind=Ro,qn.bindAll=rc,qn.bindKey=jo,qn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ho(t)?t:[t]},qn.chain=mo,qn.chunk=function(t,e,n){e=(n?wi(t,e,n):e===i)?1:xn(yu(e),0);var a=null==t?0:t.length;if(!a||e<1)return[];for(var o=0,u=0,c=r(ve(a/e));o<a;)c[u++]=oa(t,o,o+=e);return c},qn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,a=[];++e<n;){var i=t[e];i&&(a[r++]=i)}return a},qn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],a=t;a--;)e[a-1]=arguments[a];return Le(Ho(n)?Pa(n):[n],_r(e,1))},qn.cond=function(t){var e=null==t?0:t.length,n=fi();return t=e?Ee(t,(function(t){if("function"!=typeof t[1])throw new It(o);return[n(t[0]),t[1]]})):[],Xr((function(n){for(var r=-1;++r<e;){var a=t[r];if(Se(a[0],this,n))return Se(a[1],this,n)}}))},qn.conforms=function(t){return function(t){var e=Du(t);return function(n){return hr(n,t,e)}}(fr(t,1))},qn.constant=ac,qn.countBy=bo,qn.create=function(t,e){var n=$n(t);return null==e?n:ur(n,e)},qn.curry=function t(e,n,r){var a=ti(e,8,i,i,i,i,i,n=r?i:n);return a.placeholder=t.placeholder,a},qn.curryRight=function t(e,n,r){var a=ti(e,s,i,i,i,i,i,n=r?i:n);return a.placeholder=t.placeholder,a},qn.debounce=Do,qn.defaults=Su,qn.defaultsDeep=Nu,qn.defer=Eo,qn.delay=Lo,qn.difference=qi,qn.differenceBy=$i,qn.differenceWith=Ui,qn.drop=function(t,e,n){var r=null==t?0:t.length;return r?oa(t,(e=n||e===i?1:yu(e))<0?0:e,r):[]},qn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?oa(t,0,(e=r-(e=n||e===i?1:yu(e)))<0?0:e):[]},qn.dropRightWhile=function(t,e){return t&&t.length?ma(t,fi(e,3),!0,!0):[]},qn.dropWhile=function(t,e){return t&&t.length?ma(t,fi(e,3),!0):[]},qn.fill=function(t,e,n,r){var a=null==t?0:t.length;return a?(n&&"number"!=typeof n&&wi(t,e,n)&&(n=0,r=a),function(t,e,n,r){var a=t.length;for((n=yu(n))<0&&(n=-n>a?0:a+n),(r=r===i||r>a?a:yu(r))<0&&(r+=a),r=n>r?0:bu(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},qn.filter=function(t,e){return(Ho(t)?Re:br)(t,fi(e,3))},qn.flatMap=function(t,e){return _r(To(t,e),1)},qn.flatMapDeep=function(t,e){return _r(To(t,e),p)},qn.flatMapDepth=function(t,e,n){return n=n===i?1:yu(n),_r(To(t,e),n)},qn.flatten=Hi,qn.flattenDeep=function(t){return(null==t?0:t.length)?_r(t,p):[]},qn.flattenDepth=function(t,e){return(null==t?0:t.length)?_r(t,e=e===i?1:yu(e)):[]},qn.flip=function(t){return ti(t,512)},qn.flow=ic,qn.flowRight=oc,qn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var a=t[e];r[a[0]]=a[1]}return r},qn.functions=function(t){return null==t?[]:Ar(t,Du(t))},qn.functionsIn=function(t){return null==t?[]:Ar(t,Eu(t))},qn.groupBy=Mo,qn.initial=function(t){return(null==t?0:t.length)?oa(t,0,-1):[]},qn.intersection=Yi,qn.intersectionBy=Ji,qn.intersectionWith=Ki,qn.invert=Pu,qn.invertBy=Ru,qn.invokeMap=Ao,qn.iteratee=cc,qn.keyBy=Co,qn.keys=Du,qn.keysIn=Eu,qn.map=To,qn.mapKeys=function(t,e){var n={};return e=fi(e,3),kr(t,(function(t,r,a){cr(n,e(t,r,a),t)})),n},qn.mapValues=function(t,e){var n={};return e=fi(e,3),kr(t,(function(t,r,a){cr(n,r,e(t,r,a))})),n},qn.matches=function(t){return qr(fr(t,1))},qn.matchesProperty=function(t,e){return $r(t,fr(e,1))},qn.memoize=Bo,qn.merge=Lu,qn.mergeWith=Bu,qn.method=sc,qn.methodOf=lc,qn.mixin=fc,qn.negate=zo,qn.nthArg=function(t){return t=yu(t),Xr((function(e){return Vr(e,t)}))},qn.omit=zu,qn.omitBy=function(t,e){return Gu(t,zo(fi(e)))},qn.once=function(t){return Po(2,t)},qn.orderBy=function(t,e,n,r){return null==t?[]:(Ho(e)||(e=null==e?[]:[e]),Ho(n=r?i:n)||(n=null==n?[]:[n]),Wr(t,e,n))},qn.over=dc,qn.overArgs=Qo,qn.overEvery=pc,qn.overSome=vc,qn.partial=Go,qn.partialRight=Fo,qn.partition=So,qn.pick=Qu,qn.pickBy=Gu,qn.property=mc,qn.propertyOf=function(t){return function(e){return null==t?i:Cr(t,e)}},qn.pull=to,qn.pullAll=eo,qn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Zr(t,e,fi(n,2)):t},qn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Zr(t,e,i,n):t},qn.pullAt=no,qn.range=gc,qn.rangeRight=yc,qn.rearg=qo,qn.reject=function(t,e){return(Ho(t)?Re:br)(t,zo(fi(e,3)))},qn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,a=[],i=t.length;for(e=fi(e,3);++r<i;){var o=t[r];e(o,r,t)&&(n.push(o),a.push(r))}return Yr(t,a),n},qn.rest=function(t,e){if("function"!=typeof t)throw new It(o);return Xr(t,e=e===i?e:yu(e))},qn.reverse=ro,qn.sampleSize=function(t,e,n){return e=(n?wi(t,e,n):e===i)?1:yu(e),(Ho(t)?er:ea)(t,e)},qn.set=function(t,e,n){return null==t?t:na(t,e,n)},qn.setWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:na(t,e,n,r)},qn.shuffle=function(t){return(Ho(t)?nr:ia)(t)},qn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&wi(t,e,n)?(e=0,n=r):(e=null==e?0:yu(e),n=n===i?r:yu(n)),oa(t,e,n)):[]},qn.sortBy=No,qn.sortedUniq=function(t){return t&&t.length?la(t):[]},qn.sortedUniqBy=function(t,e){return t&&t.length?la(t,fi(e,2)):[]},qn.split=function(t,e,n){return n&&"number"!=typeof n&&wi(t,e,n)&&(e=n=i),(n=n===i?g:n>>>0)?(t=wu(t))&&("string"==typeof e||null!=e&&!su(e))&&!(e=ha(e))&&ln(t)?Ma(gn(t),0,n):t.split(e,n):[]},qn.spread=function(t,e){if("function"!=typeof t)throw new It(o);return e=null==e?0:xn(yu(e),0),Xr((function(n){var r=n[e],a=Ma(n,0,e);return r&&Le(a,r),Se(t,this,a)}))},qn.tail=function(t){var e=null==t?0:t.length;return e?oa(t,1,e):[]},qn.take=function(t,e,n){return t&&t.length?oa(t,0,(e=n||e===i?1:yu(e))<0?0:e):[]},qn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?oa(t,(e=r-(e=n||e===i?1:yu(e)))<0?0:e,r):[]},qn.takeRightWhile=function(t,e){return t&&t.length?ma(t,fi(e,3),!1,!0):[]},qn.takeWhile=function(t,e){return t&&t.length?ma(t,fi(e,3)):[]},qn.tap=function(t,e){return e(t),t},qn.throttle=function(t,e,n){var r=!0,a=!0;if("function"!=typeof t)throw new It(o);return au(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),Do(t,e,{leading:r,maxWait:e,trailing:a})},qn.thru=go,qn.toArray=mu,qn.toPairs=Fu,qn.toPairsIn=qu,qn.toPath=function(t){return Ho(t)?Ee(t,Qi):hu(t)?[t]:Pa(zi(wu(t)))},qn.toPlainObject=xu,qn.transform=function(t,e,n){var r=Ho(t),a=r||Ko(t)||du(t);if(e=fi(e,4),null==n){var i=t&&t.constructor;n=a?r?new i:[]:au(t)&&eu(i)?$n(Ht(t)):{}}return(a?Oe:kr)(t,(function(t,r,a){return e(n,t,r,a)})),n},qn.unary=function(t){return Io(t,1)},qn.union=ao,qn.unionBy=io,qn.unionWith=oo,qn.uniq=function(t){return t&&t.length?da(t):[]},qn.uniqBy=function(t,e){return t&&t.length?da(t,fi(e,2)):[]},qn.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?da(t,i,e):[]},qn.unset=function(t,e){return null==t||pa(t,e)},qn.unzip=uo,qn.unzipWith=co,qn.update=function(t,e,n){return null==t?t:va(t,e,xa(n))},qn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:va(t,e,xa(n),r)},qn.values=$u,qn.valuesIn=function(t){return null==t?[]:en(t,Eu(t))},qn.without=so,qn.words=ec,qn.wrap=function(t,e){return Go(xa(e),t)},qn.xor=lo,qn.xorBy=fo,qn.xorWith=ho,qn.zip=po,qn.zipObject=function(t,e){return ba(t||[],e||[],ar)},qn.zipObjectDeep=function(t,e){return ba(t||[],e||[],na)},qn.zipWith=vo,qn.entries=Fu,qn.entriesIn=qu,qn.extend=Mu,qn.extendWith=Au,fc(qn,qn),qn.add=xc,qn.attempt=nc,qn.camelCase=Uu,qn.capitalize=Vu,qn.ceil=wc,qn.clamp=function(t,e,n){return n===i&&(n=e,e=i),n!==i&&(n=(n=_u(n))==n?n:0),e!==i&&(e=(e=_u(e))==e?e:0),lr(_u(t),e,n)},qn.clone=function(t){return fr(t,4)},qn.cloneDeep=function(t){return fr(t,5)},qn.cloneDeepWith=function(t,e){return fr(t,5,e="function"==typeof e?e:i)},qn.cloneWith=function(t,e){return fr(t,4,e="function"==typeof e?e:i)},qn.conformsTo=function(t,e){return null==e||hr(t,e,Du(e))},qn.deburr=Wu,qn.defaultTo=function(t,e){return null==t||t!=t?e:t},qn.divide=kc,qn.endsWith=function(t,e,n){t=wu(t),e=ha(e);var r=t.length,a=n=n===i?r:lr(yu(n),0,r);return(n-=e.length)>=0&&t.slice(n,a)==e},qn.eq=$o,qn.escape=function(t){return(t=wu(t))&&K.test(t)?t.replace(Y,cn):t},qn.escapeRegExp=function(t){return(t=wu(t))&&ot.test(t)?t.replace(it,"\\$&"):t},qn.every=function(t,e,n){var r=Ho(t)?Pe:gr;return n&&wi(t,e,n)&&(e=i),r(t,fi(e,3))},qn.find=_o,qn.findIndex=Vi,qn.findKey=function(t,e){return Fe(t,fi(e,3),kr)},qn.findLast=xo,qn.findLastIndex=Wi,qn.findLastKey=function(t,e){return Fe(t,fi(e,3),Mr)},qn.floor=Mc,qn.forEach=wo,qn.forEachRight=ko,qn.forIn=function(t,e){return null==t?t:xr(t,fi(e,3),Eu)},qn.forInRight=function(t,e){return null==t?t:wr(t,fi(e,3),Eu)},qn.forOwn=function(t,e){return t&&kr(t,fi(e,3))},qn.forOwnRight=function(t,e){return t&&Mr(t,fi(e,3))},qn.get=Ou,qn.gt=Uo,qn.gte=Vo,qn.has=function(t,e){return null!=t&&yi(t,e,Or)},qn.hasIn=Iu,qn.head=Zi,qn.identity=uc,qn.includes=function(t,e,n,r){t=Yo(t)?t:$u(t),n=n&&!r?yu(n):0;var a=t.length;return n<0&&(n=xn(a+n,0)),fu(t)?n<=a&&t.indexOf(e,n)>-1:!!a&&$e(t,e,n)>-1},qn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var a=null==n?0:yu(n);return a<0&&(a=xn(r+a,0)),$e(t,e,a)},qn.inRange=function(t,e,n){return e=gu(e),n===i?(n=e,e=0):n=gu(n),function(t,e,n){return t>=wn(e,n)&&t<xn(e,n)}(t=_u(t),e,n)},qn.invoke=ju,qn.isArguments=Wo,qn.isArray=Ho,qn.isArrayBuffer=Zo,qn.isArrayLike=Yo,qn.isArrayLikeObject=Jo,qn.isBoolean=function(t){return!0===t||!1===t||iu(t)&&Sr(t)==x},qn.isBuffer=Ko,qn.isDate=Xo,qn.isElement=function(t){return iu(t)&&1===t.nodeType&&!cu(t)},qn.isEmpty=function(t){if(null==t)return!0;if(Yo(t)&&(Ho(t)||"string"==typeof t||"function"==typeof t.splice||Ko(t)||du(t)||Wo(t)))return!t.length;var e=gi(t);if(e==C||e==I)return!t.size;if(Ci(t))return!zr(t).length;for(var n in t)if(Lt.call(t,n))return!1;return!0},qn.isEqual=function(t,e){return Dr(t,e)},qn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:i)?n(t,e):i;return r===i?Dr(t,e,i,n):!!r},qn.isError=tu,qn.isFinite=function(t){return"number"==typeof t&&xe(t)},qn.isFunction=eu,qn.isInteger=nu,qn.isLength=ru,qn.isMap=ou,qn.isMatch=function(t,e){return t===e||Er(t,e,di(e))},qn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:i,Er(t,e,di(e),n)},qn.isNaN=function(t){return uu(t)&&t!=+t},qn.isNative=function(t){if(Ai(t))throw new At("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Lr(t)},qn.isNil=function(t){return null==t},qn.isNull=function(t){return null===t},qn.isNumber=uu,qn.isObject=au,qn.isObjectLike=iu,qn.isPlainObject=cu,qn.isRegExp=su,qn.isSafeInteger=function(t){return nu(t)&&t>=-9007199254740991&&t<=v},qn.isSet=lu,qn.isString=fu,qn.isSymbol=hu,qn.isTypedArray=du,qn.isUndefined=function(t){return t===i},qn.isWeakMap=function(t){return iu(t)&&gi(t)==j},qn.isWeakSet=function(t){return iu(t)&&"[object WeakSet]"==Sr(t)},qn.join=function(t,e){return null==t?"":Ge.call(t,e)},qn.kebabCase=Hu,qn.last=Xi,qn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var a=r;return n!==i&&(a=(a=yu(n))<0?xn(r+a,0):wn(a,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,a):qe(t,Ve,a,!0)},qn.lowerCase=Zu,qn.lowerFirst=Yu,qn.lt=pu,qn.lte=vu,qn.max=function(t){return t&&t.length?yr(t,uc,Nr):i},qn.maxBy=function(t,e){return t&&t.length?yr(t,fi(e,2),Nr):i},qn.mean=function(t){return We(t,uc)},qn.meanBy=function(t,e){return We(t,fi(e,2))},qn.min=function(t){return t&&t.length?yr(t,uc,Gr):i},qn.minBy=function(t,e){return t&&t.length?yr(t,fi(e,2),Gr):i},qn.stubArray=bc,qn.stubFalse=_c,qn.stubObject=function(){return{}},qn.stubString=function(){return""},qn.stubTrue=function(){return!0},qn.multiply=Cc,qn.nth=function(t,e){return t&&t.length?Vr(t,yu(e)):i},qn.noConflict=function(){return me._===this&&(me._=Ft),this},qn.noop=hc,qn.now=Oo,qn.pad=function(t,e,n){t=wu(t);var r=(e=yu(e))?mn(t):0;if(!e||r>=e)return t;var a=(e-r)/2;return Wa(ge(a),n)+t+Wa(ve(a),n)},qn.padEnd=function(t,e,n){t=wu(t);var r=(e=yu(e))?mn(t):0;return e&&r<e?t+Wa(e-r,n):t},qn.padStart=function(t,e,n){t=wu(t);var r=(e=yu(e))?mn(t):0;return e&&r<e?Wa(e-r,n)+t:t},qn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Mn(wu(t).replace(ut,""),e||0)},qn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&wi(t,e,n)&&(e=n=i),n===i&&("boolean"==typeof e?(n=e,e=i):"boolean"==typeof t&&(n=t,t=i)),t===i&&e===i?(t=0,e=1):(t=gu(t),e===i?(e=t,t=0):e=gu(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var a=An();return wn(t+a*(e-t+he("1e-"+((a+"").length-1))),e)}return Jr(t,e)},qn.reduce=function(t,e,n){var r=Ho(t)?Be:Ye,a=arguments.length<3;return r(t,fi(e,4),n,a,vr)},qn.reduceRight=function(t,e,n){var r=Ho(t)?ze:Ye,a=arguments.length<3;return r(t,fi(e,4),n,a,mr)},qn.repeat=function(t,e,n){return e=(n?wi(t,e,n):e===i)?1:yu(e),Kr(wu(t),e)},qn.replace=function(){var t=arguments,e=wu(t[0]);return t.length<3?e:e.replace(t[1],t[2])},qn.result=function(t,e,n){var r=-1,a=(e=wa(e,t)).length;for(a||(a=1,t=i);++r<a;){var o=null==t?i:t[Qi(e[r])];o===i&&(r=a,o=n),t=eu(o)?o.call(t):o}return t},qn.round=Tc,qn.runInContext=t,qn.sample=function(t){return(Ho(t)?tr:ta)(t)},qn.size=function(t){if(null==t)return 0;if(Yo(t))return fu(t)?mn(t):t.length;var e=gi(t);return e==C||e==I?t.size:zr(t).length},qn.snakeCase=Ju,qn.some=function(t,e,n){var r=Ho(t)?Qe:ua;return n&&wi(t,e,n)&&(e=i),r(t,fi(e,3))},qn.sortedIndex=function(t,e){return ca(t,e)},qn.sortedIndexBy=function(t,e,n){return sa(t,e,fi(n,2))},qn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=ca(t,e);if(r<n&&$o(t[r],e))return r}return-1},qn.sortedLastIndex=function(t,e){return ca(t,e,!0)},qn.sortedLastIndexBy=function(t,e,n){return sa(t,e,fi(n,2),!0)},qn.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var n=ca(t,e,!0)-1;if($o(t[n],e))return n}return-1},qn.startCase=Ku,qn.startsWith=function(t,e,n){return t=wu(t),n=null==n?0:lr(yu(n),0,t.length),e=ha(e),t.slice(n,n+e.length)==e},qn.subtract=Sc,qn.sum=function(t){return t&&t.length?Je(t,uc):0},qn.sumBy=function(t,e){return t&&t.length?Je(t,fi(e,2)):0},qn.template=function(t,e,n){var r=qn.templateSettings;n&&wi(t,e,n)&&(e=i),t=wu(t),e=Au({},e,r,ei);var a,o,u=Au({},e.imports,r.imports,ei),c=Du(u),s=en(u,c),l=0,f=e.interpolate||kt,h="__p += '",d=Nt((e.escape||kt).source+"|"+f.source+"|"+(f===et?vt:kt).source+"|"+(e.evaluate||kt).source+"|$","g"),p="//# sourceURL="+(Lt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ce+"]")+"\n";t.replace(d,(function(e,n,r,i,u,c){return r||(r=i),h+=t.slice(l,c).replace(Mt,sn),n&&(a=!0,h+="' +\n__e("+n+") +\n'"),u&&(o=!0,h+="';\n"+u+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+e.length,e})),h+="';\n";var v=Lt.call(e,"variable")&&e.variable;if(v){if(dt.test(v))throw new At("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(o?h.replace(V,""):h).replace(W,"$1").replace(H,"$1;"),h="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var m=nc((function(){return Ct(c,p+"return "+h).apply(i,s)}));if(m.source=h,tu(m))throw m;return m},qn.times=function(t,e){if((t=yu(t))<1||t>v)return[];var n=g,r=wn(t,g);e=fi(e),t-=g;for(var a=Ke(r,e);++n<t;)e(n);return a},qn.toFinite=gu,qn.toInteger=yu,qn.toLength=bu,qn.toLower=function(t){return wu(t).toLowerCase()},qn.toNumber=_u,qn.toSafeInteger=function(t){return t?lr(yu(t),-9007199254740991,v):0===t?t:0},qn.toString=wu,qn.toUpper=function(t){return wu(t).toUpperCase()},qn.trim=function(t,e,n){if((t=wu(t))&&(n||e===i))return Xe(t);if(!t||!(e=ha(e)))return t;var r=gn(t),a=gn(e);return Ma(r,rn(r,a),an(r,a)+1).join("")},qn.trimEnd=function(t,e,n){if((t=wu(t))&&(n||e===i))return t.slice(0,yn(t)+1);if(!t||!(e=ha(e)))return t;var r=gn(t);return Ma(r,0,an(r,gn(e))+1).join("")},qn.trimStart=function(t,e,n){if((t=wu(t))&&(n||e===i))return t.replace(ut,"");if(!t||!(e=ha(e)))return t;var r=gn(t);return Ma(r,rn(r,gn(e))).join("")},qn.truncate=function(t,e){var n=30,r="...";if(au(e)){var a="separator"in e?e.separator:a;n="length"in e?yu(e.length):n,r="omission"in e?ha(e.omission):r}var o=(t=wu(t)).length;if(ln(t)){var u=gn(t);o=u.length}if(n>=o)return t;var c=n-mn(r);if(c<1)return r;var s=u?Ma(u,0,c).join(""):t.slice(0,c);if(a===i)return s+r;if(u&&(c+=s.length-c),su(a)){if(t.slice(c).search(a)){var l,f=s;for(a.global||(a=Nt(a.source,wu(mt.exec(a))+"g")),a.lastIndex=0;l=a.exec(f);)var h=l.index;s=s.slice(0,h===i?c:h)}}else if(t.indexOf(ha(a),c)!=c){var d=s.lastIndexOf(a);d>-1&&(s=s.slice(0,d))}return s+r},qn.unescape=function(t){return(t=wu(t))&&J.test(t)?t.replace(Z,bn):t},qn.uniqueId=function(t){var e=++Bt;return wu(t)+e},qn.upperCase=Xu,qn.upperFirst=tc,qn.each=wo,qn.eachRight=ko,qn.first=Zi,fc(qn,(Ac={},kr(qn,(function(t,e){Lt.call(qn.prototype,e)||(Ac[e]=t)})),Ac),{chain:!1}),qn.VERSION="4.17.21",Oe(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){qn[t].placeholder=qn})),Oe(["drop","take"],(function(t,e){Wn.prototype[t]=function(n){n=n===i?1:xn(yu(n),0);var r=this.__filtered__&&!e?new Wn(this):this.clone();return r.__filtered__?r.__takeCount__=wn(n,r.__takeCount__):r.__views__.push({size:wn(n,g),type:t+(r.__dir__<0?"Right":"")}),r},Wn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Oe(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Wn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:fi(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Oe(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Wn.prototype[t]=function(){return this[n](1).value()[0]}})),Oe(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Wn.prototype[t]=function(){return this.__filtered__?new Wn(this):this[n](1)}})),Wn.prototype.compact=function(){return this.filter(uc)},Wn.prototype.find=function(t){return this.filter(t).head()},Wn.prototype.findLast=function(t){return this.reverse().find(t)},Wn.prototype.invokeMap=Xr((function(t,e){return"function"==typeof t?new Wn(this):this.map((function(n){return Rr(n,t,e)}))})),Wn.prototype.reject=function(t){return this.filter(zo(fi(t)))},Wn.prototype.slice=function(t,e){t=yu(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Wn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==i&&(n=(e=yu(e))<0?n.dropRight(-e):n.take(e-t)),n)},Wn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Wn.prototype.toArray=function(){return this.take(g)},kr(Wn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),a=qn[r?"take"+("last"==e?"Right":""):e],o=r||/^find/.test(e);a&&(qn.prototype[e]=function(){var e=this.__wrapped__,u=r?[1]:arguments,c=e instanceof Wn,s=u[0],l=c||Ho(e),f=function(t){var e=a.apply(qn,Le([t],u));return r&&h?e[0]:e};l&&n&&"function"==typeof s&&1!=s.length&&(c=l=!1);var h=this.__chain__,d=!!this.__actions__.length,p=o&&!h,v=c&&!d;if(!o&&l){e=v?e:new Wn(this);var m=t.apply(e,u);return m.__actions__.push({func:go,args:[f],thisArg:i}),new Vn(m,h)}return p&&v?t.apply(this,u):(m=this.thru(f),p?r?m.value()[0]:m.value():m)})})),Oe(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Pt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);qn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var a=this.value();return e.apply(Ho(a)?a:[],t)}return this[n]((function(n){return e.apply(Ho(n)?n:[],t)}))}})),kr(Wn.prototype,(function(t,e){var n=qn[e];if(n){var r=n.name+"";Lt.call(jn,r)||(jn[r]=[]),jn[r].push({name:e,func:n})}})),jn[qa(i,2).name]=[{name:"wrapper",func:i}],Wn.prototype.clone=function(){var t=new Wn(this.__wrapped__);return t.__actions__=Pa(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Pa(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Pa(this.__views__),t},Wn.prototype.reverse=function(){if(this.__filtered__){var t=new Wn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Wn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ho(t),r=e<0,a=n?t.length:0,i=function(t,e,n){var r=-1,a=n.length;for(;++r<a;){var i=n[r],o=i.size;switch(i.type){case"drop":t+=o;break;case"dropRight":e-=o;break;case"take":e=wn(e,t+o);break;case"takeRight":t=xn(t,e-o)}}return{start:t,end:e}}(0,a,this.__views__),o=i.start,u=i.end,c=u-o,s=r?u:o-1,l=this.__iteratees__,f=l.length,h=0,d=wn(c,this.__takeCount__);if(!n||!r&&a==c&&d==c)return ga(t,this.__actions__);var p=[];t:for(;c--&&h<d;){for(var v=-1,m=t[s+=e];++v<f;){var g=l[v],y=g.iteratee,b=g.type,_=y(m);if(2==b)m=_;else if(!_){if(1==b)continue t;break t}}p[h++]=m}return p},qn.prototype.at=yo,qn.prototype.chain=function(){return mo(this)},qn.prototype.commit=function(){return new Vn(this.value(),this.__chain__)},qn.prototype.next=function(){this.__values__===i&&(this.__values__=mu(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},qn.prototype.plant=function(t){for(var e,n=this;n instanceof Un;){var r=Fi(n);r.__index__=0,r.__values__=i,e?a.__wrapped__=r:e=r;var a=r;n=n.__wrapped__}return a.__wrapped__=t,e},qn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Wn){var e=t;return this.__actions__.length&&(e=new Wn(this)),(e=e.reverse()).__actions__.push({func:go,args:[ro],thisArg:i}),new Vn(e,this.__chain__)}return this.thru(ro)},qn.prototype.toJSON=qn.prototype.valueOf=qn.prototype.value=function(){return ga(this.__wrapped__,this.__actions__)},qn.prototype.first=qn.prototype.head,Xt&&(qn.prototype[Xt]=function(){return this}),qn}();"object"==a(n.amdO)&&n.amdO?(me._=_n,(r=function(){return _n}.call(e,n,e,t))===i||(t.exports=r)):ye?((ye.exports=_n)._=_n,ge._=_n):me._=_n}).call(this)},5533:function(t,e,n){t.exports=n(8811).use(n(3839)).use(n(2270)).use(n(7195)).use(n(6802)).use(n(3005)).use(n(8575)).use(n(9146)).use(n(1696)).use(n(8747)).use(n(1953)).use(n(7686)).use(n(3244)).use(n(3132)).use(n(9506)).use(n(8094)).use(n(4192)).use(n(1171)).use(n(9954)).use(n(7507)).use(n(9880)).use(n(6987))},3005:function(t){t.exports=function(t){t.installColorSpace("CMYK",["cyan","magenta","yellow","black","alpha"],{rgb:function(){return new t.RGB(1-this._cyan*(1-this._black)-this._black,1-this._magenta*(1-this._black)-this._black,1-this._yellow*(1-this._black)-this._black,this._alpha)},fromRgb:function(){var e=this._red,n=this._green,r=this._blue,a=1-e,i=1-n,o=1-r,u=1;return e||n||r?(a=(a-(u=Math.min(a,Math.min(i,o))))/(1-u),i=(i-u)/(1-u),o=(o-u)/(1-u)):u=1,new t.CMYK(a,i,o,u,this._alpha)}})}},6802:function(t,e,n){t.exports=function(t){t.use(n(7195)),t.installColorSpace("HSL",["hue","saturation","lightness","alpha"],{hsv:function(){var e,n=2*this._lightness,r=this._saturation*(n<=1?n:2-n);return e=n+r<1e-9?0:2*r/(n+r),new t.HSV(this._hue,e,(n+r)/2,this._alpha)},rgb:function(){return this.hsv().rgb()},fromRgb:function(){return this.hsv().hsl()}})}},7195:function(t){t.exports=function(t){t.installColorSpace("HSV",["hue","saturation","value","alpha"],{rgb:function(){var e,n,r,a=this._hue,i=this._saturation,o=this._value,u=Math.min(5,Math.floor(6*a)),c=6*a-u,s=o*(1-i),l=o*(1-c*i),f=o*(1-(1-c)*i);switch(u){case 0:e=o,n=f,r=s;break;case 1:e=l,n=o,r=s;break;case 2:e=s,n=o,r=f;break;case 3:e=s,n=l,r=o;break;case 4:e=f,n=s,r=o;break;case 5:e=o,n=s,r=l}return new t.RGB(e,n,r,this._alpha)},hsl:function(){var e,n=(2-this._saturation)*this._value,r=this._saturation*this._value,a=n<=1?n:2-n;return e=a<1e-9?0:r/a,new t.HSL(this._hue,e,n/2,this._alpha)},fromRgb:function(){var e,n=this._red,r=this._green,a=this._blue,i=Math.max(n,r,a),o=i-Math.min(n,r,a),u=0===i?0:o/i,c=i;if(0===o)e=0;else switch(i){case n:e=(r-a)/o/6+(r<a?1:0);break;case r:e=(a-n)/o/6+1/3;break;case a:e=(n-r)/o/6+2/3}return new t.HSV(e,u,c,this._alpha)}})}},2270:function(t,e,n){t.exports=function(t){t.use(n(3839)),t.installColorSpace("LAB",["l","a","b","alpha"],{fromRgb:function(){return this.xyz().lab()},rgb:function(){return this.xyz().rgb()},xyz:function(){var e=function(t){var e=Math.pow(t,3);return e>.008856?e:(t-16/116)/7.87},n=(this._l+16)/116,r=this._a/500+n,a=n-this._b/200;return new t.XYZ(95.047*e(r),100*e(n),108.883*e(a),this._alpha)}})}},3839:function(t){t.exports=function(t){t.installColorSpace("XYZ",["x","y","z","alpha"],{fromRgb:function(){var e=function(t){return t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92},n=e(this._red),r=e(this._green),a=e(this._blue);return new t.XYZ(.4124564*n+.3575761*r+.1804375*a,.2126729*n+.7151522*r+.072175*a,.0193339*n+.119192*r+.9503041*a,this._alpha)},rgb:function(){var e=this._x,n=this._y,r=this._z,a=function(t){return t>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t};return new t.RGB(a(3.2404542*e+-1.5371385*n+-.4985314*r),a(-.969266*e+1.8760108*n+.041556*r),a(.0556434*e+-.2040259*n+1.0572252*r),this._alpha)},lab:function(){var e=function(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29},n=e(this._x/95.047),r=e(this._y/100),a=e(this._z/108.883);return new t.LAB(116*r-16,500*(n-r),200*(r-a),this._alpha)}})}},8811:function(t,e,n){var r=n(5570).default,a=[],i=function(t){return void 0===t},o=/\s*(\.\d+|\d+(?:\.\d+)?)(%)?\s*/,u=/\s*(\.\d+|100|\d?\d(?:\.\d+)?)%\s*/,c=new RegExp("^(rgb|hsl|hsv)a?\\("+o.source+","+o.source+","+o.source+"(?:,"+/\s*(\.\d+|\d+(?:\.\d+)?)\s*/.source+")?\\)$","i");function s(t){if(Array.isArray(t)){if("string"==typeof t[0]&&"function"==typeof s[t[0]])return new s[t[0]](t.slice(1,t.length));if(4===t.length)return new s.RGB(t[0]/255,t[1]/255,t[2]/255,t[3]/255)}else if("string"==typeof t){var e=t.toLowerCase();s.namedColors[e]&&(t="#"+s.namedColors[e]),"transparent"===e&&(t="rgba(0,0,0,0)");var n=t.match(c);if(n){var a=n[1].toUpperCase(),o=i(n[8])?n[8]:parseFloat(n[8]),l="H"===a[0],f=n[3]?100:l?360:255,h=n[5]||l?100:255,d=n[7]||l?100:255;if(i(s[a]))throw new Error("color."+a+" is not installed.");return new s[a](parseFloat(n[2])/f,parseFloat(n[4])/h,parseFloat(n[6])/d,o)}t.length<6&&(t=t.replace(/^#?([0-9a-f])([0-9a-f])([0-9a-f])$/i,"$1$1$2$2$3$3"));var p=t.match(/^#?([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])$/i);if(p)return new s.RGB(parseInt(p[1],16)/255,parseInt(p[2],16)/255,parseInt(p[3],16)/255);if(s.CMYK){var v=t.match(new RegExp("^cmyk\\("+u.source+","+u.source+","+u.source+","+u.source+"\\)$","i"));if(v)return new s.CMYK(parseFloat(v[1])/100,parseFloat(v[2])/100,parseFloat(v[3])/100,parseFloat(v[4])/100)}}else if("object"===r(t)&&t.isColor)return t;return!1}s.namedColors={},s.installColorSpace=function(t,e,n){s[t]=function(n){var r=Array.isArray(n)?n:arguments;e.forEach((function(n,a){var i=r[a];if("alpha"===n)this._alpha=isNaN(i)||i>1?1:i<0?0:i;else{if(isNaN(i))throw new Error("["+t+"]: Invalid color: ("+e.join(",")+")");"hue"===n?this._hue=i<0?i-Math.floor(i):i%1:this["_"+n]=i<0?0:i>1?1:i}}),this)},s[t].propertyNames=e;var r=s[t].prototype;for(var o in["valueOf","hex","hexa","css","cssa"].forEach((function(e){r[e]=r[e]||("RGB"===t?r.hex:function(){return this.rgb()[e]()})})),r.isColor=!0,r.equals=function(n,r){i(r)&&(r=1e-10),n=n[t.toLowerCase()]();for(var a=0;a<e.length;a+=1)if(Math.abs(this["_"+e[a]]-n["_"+e[a]])>r)return!1;return!0},r.toJSON=function(){return[t].concat(e.map((function(t){return this["_"+t]}),this))},n)if(n.hasOwnProperty(o)){var u=o.match(/^from(.*)$/);u?s[u[1].toUpperCase()].prototype[t.toLowerCase()]=n[o]:r[o]=n[o]}function c(t,e){var n={};for(var r in n[e.toLowerCase()]=function(){return this.rgb()[e.toLowerCase()]()},s[e].propertyNames.forEach((function(t){var r="black"===t?"k":t.charAt(0);n[t]=n[r]=function(n,r){return this[e.toLowerCase()]()[t](n,r)}})),n)n.hasOwnProperty(r)&&void 0===s[t].prototype[r]&&(s[t].prototype[r]=n[r])}return r[t.toLowerCase()]=function(){return this},r.toString=function(){return"["+t+" "+e.map((function(t){return this["_"+t]}),this).join(", ")+"]"},e.forEach((function(t){var n="black"===t?"k":t.charAt(0);r[t]=r[n]=function(n,r){return void 0===n?this["_"+t]:r?new this.constructor(e.map((function(e){return this["_"+e]+(t===e?n:0)}),this)):new this.constructor(e.map((function(e){return t===e?n:this["_"+e]}),this))}})),a.forEach((function(e){c(t,e),c(e,t)})),a.push(t),s},s.pluginList=[],s.use=function(t){return-1===s.pluginList.indexOf(t)&&(this.pluginList.push(t),t(s)),s},s.installMethod=function(t,e){return a.forEach((function(n){s[n].prototype[t]=e})),this},s.installColorSpace("RGB",["red","green","blue","alpha"],{hex:function(){var t=(65536*Math.round(255*this._red)+256*Math.round(255*this._green)+Math.round(255*this._blue)).toString(16);return"#"+"00000".substr(0,6-t.length)+t},hexa:function(){var t=Math.round(255*this._alpha).toString(16);return"#"+"00".substr(0,2-t.length)+t+this.hex().substr(1,6)},css:function(){return"rgb("+Math.round(255*this._red)+","+Math.round(255*this._green)+","+Math.round(255*this._blue)+")"},cssa:function(){return"rgba("+Math.round(255*this._red)+","+Math.round(255*this._green)+","+Math.round(255*this._blue)+","+this._alpha+")"}}),t.exports=s},9146:function(t){t.exports=function(t){t.installMethod("clearer",(function(t){return this.alpha(isNaN(t)?-.1:-t,!0)}))}},1696:function(t,e,n){t.exports=function(t){t.use(n(8094)),t.installMethod("contrast",(function(t){var e=this.luminance(),n=t.luminance();return e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)}))}},8747:function(t,e,n){t.exports=function(t){t.use(n(6802)),t.installMethod("darken",(function(t){return this.lightness(isNaN(t)?-.1:-t,!0)}))}},1953:function(t,e,n){t.exports=function(t){t.use(n(6802)),t.installMethod("desaturate",(function(t){return this.saturation(isNaN(t)?-.1:-t,!0)}))}},7686:function(t){t.exports=function(t){function e(){var e=this.rgb(),n=.3*e._red+.59*e._green+.11*e._blue;return new t.RGB(n,n,n,e._alpha)}t.installMethod("greyscale",e).installMethod("grayscale",e)}},3244:function(t){t.exports=function(t){t.installMethod("isDark",(function(){var t=this.rgb();return(255*t._red*299+255*t._green*587+255*t._blue*114)/1e3<128}))}},3132:function(t,e,n){t.exports=function(t){t.use(n(3244)),t.installMethod("isLight",(function(){return!this.isDark()}))}},9506:function(t,e,n){t.exports=function(t){t.use(n(6802)),t.installMethod("lighten",(function(t){return this.lightness(isNaN(t)?.1:t,!0)}))}},8094:function(t){t.exports=function(t){function e(t){return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}t.installMethod("luminance",(function(){var t=this.rgb();return.2126*e(t._red)+.7152*e(t._green)+.0722*e(t._blue)}))}},4192:function(t){t.exports=function(t){t.installMethod("mix",(function(e,n){e=t(e).rgb();var r=2*(n=1-(isNaN(n)?.5:n))-1,a=this._alpha-e._alpha,i=((r*a==-1?r:(r+a)/(1+r*a))+1)/2,o=1-i,u=this.rgb();return new t.RGB(u._red*i+e._red*o,u._green*i+e._green*o,u._blue*i+e._blue*o,u._alpha*n+e._alpha*(1-n))}))}},8575:function(t){t.exports=function(t){t.namedColors={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgrey:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",grey:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"}}},1171:function(t){t.exports=function(t){t.installMethod("negate",(function(){var e=this.rgb();return new t.RGB(1-e._red,1-e._green,1-e._blue,this._alpha)}))}},9954:function(t){t.exports=function(t){t.installMethod("opaquer",(function(t){return this.alpha(isNaN(t)?.1:t,!0)}))}},7507:function(t,e,n){t.exports=function(t){t.use(n(6802)),t.installMethod("rotate",(function(t){return this.hue((t||0)/360,!0)}))}},9880:function(t,e,n){t.exports=function(t){t.use(n(6802)),t.installMethod("saturate",(function(t){return this.saturation(isNaN(t)?.1:t,!0)}))}},6987:function(t){t.exports=function(t){t.installMethod("toAlpha",(function(t){var e=this.rgb(),n=t(t).rgb(),r=new t.RGB(0,0,0,e._alpha),a=["_red","_green","_blue"];return a.forEach((function(t){e[t]<1e-10?r[t]=e[t]:e[t]>n[t]?r[t]=(e[t]-n[t])/(1-n[t]):e[t]>n[t]?r[t]=(n[t]-e[t])/n[t]:r[t]=0})),r._red>r._green?r._red>r._blue?e._alpha=r._red:e._alpha=r._blue:r._green>r._blue?e._alpha=r._green:e._alpha=r._blue,e._alpha<1e-10||(a.forEach((function(t){e[t]=(e[t]-n[t])/e._alpha+n[t]})),e._alpha*=r._alpha),e}))}},6646:function(t){if(!e)var e={map:function(t,e){var n={};return e?t.map((function(t,r){return n.index=r,e.call(n,t)})):t.slice()},naturalOrder:function(t,e){return t<e?-1:t>e?1:0},sum:function(t,e){var n={};return t.reduce(e?function(t,r,a){return n.index=a,t+e.call(n,r)}:function(t,e){return t+e},0)},max:function(t,n){return Math.max.apply(null,n?e.map(t,n):t)}};var n=function(){function t(t,e,n){return(t<<10)+(e<<5)+n}function n(t){var e=[],n=!1;function r(){e.sort(t),n=!0}return{push:function(t){e.push(t),n=!1},peek:function(t){return n||r(),void 0===t&&(t=e.length-1),e[t]},pop:function(){return n||r(),e.pop()},size:function(){return e.length},map:function(t){return e.map(t)},debug:function(){return n||r(),e}}}function r(t,e,n,r,a,i,o){var u=this;u.r1=t,u.r2=e,u.g1=n,u.g2=r,u.b1=a,u.b2=i,u.histo=o}function a(){this.vboxes=new n((function(t,n){return e.naturalOrder(t.vbox.count()*t.vbox.volume(),n.vbox.count()*n.vbox.volume())}))}function i(n,r){if(r.count()){var a=r.r2-r.r1+1,i=r.g2-r.g1+1,o=r.b2-r.b1+1,u=e.max([a,i,o]);if(1==r.count())return[r.copy()];var c,s,l,f,h=0,d=[],p=[];if(u==a)for(c=r.r1;c<=r.r2;c++){for(f=0,s=r.g1;s<=r.g2;s++)for(l=r.b1;l<=r.b2;l++)f+=n[t(c,s,l)]||0;h+=f,d[c]=h}else if(u==i)for(c=r.g1;c<=r.g2;c++){for(f=0,s=r.r1;s<=r.r2;s++)for(l=r.b1;l<=r.b2;l++)f+=n[t(s,c,l)]||0;h+=f,d[c]=h}else for(c=r.b1;c<=r.b2;c++){for(f=0,s=r.r1;s<=r.r2;s++)for(l=r.g1;l<=r.g2;l++)f+=n[t(s,l,c)]||0;h+=f,d[c]=h}return d.forEach((function(t,e){p[e]=h-t})),v(u==a?"r":u==i?"g":"b")}function v(t){var e,n,a,i,o,u=t+"1",s=t+"2",l=0;for(c=r[u];c<=r[s];c++)if(d[c]>h/2){for(a=r.copy(),i=r.copy(),o=(e=c-r[u])<=(n=r[s]-c)?Math.min(r[s]-1,~~(c+n/2)):Math.max(r[u],~~(c-1-e/2));!d[o];)o++;for(l=p[o];!l&&d[o-1];)l=p[--o];return a[s]=o,i[u]=a[s]+1,[a,i]}}}return r.prototype={volume:function(t){var e=this;return e._volume&&!t||(e._volume=(e.r2-e.r1+1)*(e.g2-e.g1+1)*(e.b2-e.b1+1)),e._volume},count:function(e){var n=this,r=n.histo;if(!n._count_set||e){var a,i,o,u=0;for(a=n.r1;a<=n.r2;a++)for(i=n.g1;i<=n.g2;i++)for(o=n.b1;o<=n.b2;o++)u+=r[t(a,i,o)]||0;n._count=u,n._count_set=!0}return n._count},copy:function(){var t=this;return new r(t.r1,t.r2,t.g1,t.g2,t.b1,t.b2,t.histo)},avg:function(e){var n=this,r=n.histo;if(!n._avg||e){var a,i,o,u,c=0,s=0,l=0,f=0;for(i=n.r1;i<=n.r2;i++)for(o=n.g1;o<=n.g2;o++)for(u=n.b1;u<=n.b2;u++)c+=a=r[t(i,o,u)]||0,s+=a*(i+.5)*8,l+=a*(o+.5)*8,f+=a*(u+.5)*8;n._avg=c?[~~(s/c),~~(l/c),~~(f/c)]:[~~(8*(n.r1+n.r2+1)/2),~~(8*(n.g1+n.g2+1)/2),~~(8*(n.b1+n.b2+1)/2)]}return n._avg},contains:function(t){var e=this,n=t[0]>>3;return gval=t[1]>>3,bval=t[2]>>3,n>=e.r1&&n<=e.r2&&gval>=e.g1&&gval<=e.g2&&bval>=e.b1&&bval<=e.b2}},a.prototype={push:function(t){this.vboxes.push({vbox:t,color:t.avg()})},palette:function(){return this.vboxes.map((function(t){return t.color}))},size:function(){return this.vboxes.size()},map:function(t){for(var e=this.vboxes,n=0;n<e.size();n++)if(e.peek(n).vbox.contains(t))return e.peek(n).color;return this.nearest(t)},nearest:function(t){for(var e,n,r,a=this.vboxes,i=0;i<a.size();i++)((n=Math.sqrt(Math.pow(t[0]-a.peek(i).color[0],2)+Math.pow(t[1]-a.peek(i).color[1],2)+Math.pow(t[2]-a.peek(i).color[2],2)))<e||void 0===e)&&(e=n,r=a.peek(i).color);return r},forcebw:function(){var t=this.vboxes;t.sort((function(t,n){return e.naturalOrder(e.sum(t.color),e.sum(n.color))}));var n=t[0].color;n[0]<5&&n[1]<5&&n[2]<5&&(t[0].color=[0,0,0]);var r=t.length-1,a=t[r].color;a[0]>251&&a[1]>251&&a[2]>251&&(t[r].color=[255,255,255])}},{quantize:function(o,u){if(!o.length||u<2||u>256)return!1;var c=function(e){var n,r,a,i,o=new Array(32768);return e.forEach((function(e){r=e[0]>>3,a=e[1]>>3,i=e[2]>>3,n=t(r,a,i),o[n]=(o[n]||0)+1})),o}(o);c.forEach((function(){0}));var s=function(t,e){var n,a,i,o=1e6,u=0,c=1e6,s=0,l=1e6,f=0;return t.forEach((function(t){n=t[0]>>3,a=t[1]>>3,i=t[2]>>3,n<o?o=n:n>u&&(u=n),a<c?c=a:a>s&&(s=a),i<l?l=i:i>f&&(f=i)})),new r(o,u,c,s,l,f,e)}(o,c),l=new n((function(t,n){return e.naturalOrder(t.count(),n.count())}));function f(t,e){for(var n,r=1,a=0;a<1e3;)if((n=t.pop()).count()){var o=i(c,n),u=o[0],s=o[1];if(!u)return;if(t.push(u),s&&(t.push(s),r++),r>=e)return;if(a++>1e3)return}else t.push(n),a++}l.push(s),f(l,.75*u);for(var h=new n((function(t,n){return e.naturalOrder(t.count()*t.volume(),n.count()*n.volume())}));l.size();)h.push(l.pop());f(h,u-h.size());for(var d=new a;h.size();)d.push(h.pop());return d}}}();t.exports=n.quantize},7914:function(t,e){var n,r,a;r=[t],n=function(t){"use strict";function e(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var a={order:2,precision:2,period:null};function i(t,e){var n=[],r=[];t.forEach((function(t,a){null!==t[1]&&(r.push(t),n.push(e[a]))}));var a=r.reduce((function(t,e){return t+e[1]}),0)/r.length,i=r.reduce((function(t,e){var n=e[1]-a;return t+n*n}),0);return 1-r.reduce((function(t,e,r){var a=n[r],i=e[1]-a[1];return t+i*i}),0)/i}function o(t,e){for(var n=t,r=t.length-1,a=[e],i=0;i<r;i++){for(var o=i,u=i+1;u<r;u++)Math.abs(n[i][u])>Math.abs(n[i][o])&&(o=u);for(var c=i;c<r+1;c++){var s=n[c][i];n[c][i]=n[c][o],n[c][o]=s}for(var l=i+1;l<r;l++)for(var f=r;f>=i;f--)n[f][l]-=n[f][i]*n[i][l]/n[i][i]}for(var h=r-1;h>=0;h--){for(var d=0,p=h+1;p<r;p++)d+=n[p][h]*a[p];a[h]=(n[r][h]-d)/n[h][h]}return a}function u(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}var c={linear:function(t,e){for(var n=[0,0,0,0,0],r=0,a=0;a<t.length;a++)null!==t[a][1]&&(r++,n[0]+=t[a][0],n[1]+=t[a][1],n[2]+=t[a][0]*t[a][0],n[3]+=t[a][0]*t[a][1],n[4]+=t[a][1]*t[a][1]);var o=r*n[2]-n[0]*n[0],c=r*n[3]-n[0]*n[1],s=0===o?0:u(c/o,e.precision),l=u(n[1]/r-s*n[0]/r,e.precision),f=function(t){return[u(t,e.precision),u(s*t+l,e.precision)]},h=t.map((function(t){return f(t[0])}));return{points:h,predict:f,equation:[s,l],r2:u(i(t,h),e.precision),string:0===l?"y = "+s+"x":"y = "+s+"x + "+l}},exponential:function(t,e){for(var n=[0,0,0,0,0,0],r=0;r<t.length;r++)null!==t[r][1]&&(n[0]+=t[r][0],n[1]+=t[r][1],n[2]+=t[r][0]*t[r][0]*t[r][1],n[3]+=t[r][1]*Math.log(t[r][1]),n[4]+=t[r][0]*t[r][1]*Math.log(t[r][1]),n[5]+=t[r][0]*t[r][1]);var a=n[1]*n[2]-n[5]*n[5],o=Math.exp((n[2]*n[3]-n[5]*n[4])/a),c=(n[1]*n[4]-n[5]*n[3])/a,s=u(o,e.precision),l=u(c,e.precision),f=function(t){return[u(t,e.precision),u(s*Math.exp(l*t),e.precision)]},h=t.map((function(t){return f(t[0])}));return{points:h,predict:f,equation:[s,l],string:"y = "+s+"e^("+l+"x)",r2:u(i(t,h),e.precision)}},logarithmic:function(t,e){for(var n=[0,0,0,0],r=t.length,a=0;a<r;a++)null!==t[a][1]&&(n[0]+=Math.log(t[a][0]),n[1]+=t[a][1]*Math.log(t[a][0]),n[2]+=t[a][1],n[3]+=Math.pow(Math.log(t[a][0]),2));var o=u((r*n[1]-n[2]*n[0])/(r*n[3]-n[0]*n[0]),e.precision),c=u((n[2]-o*n[0])/r,e.precision),s=function(t){return[u(t,e.precision),u(u(c+o*Math.log(t),e.precision),e.precision)]},l=t.map((function(t){return s(t[0])}));return{points:l,predict:s,equation:[c,o],string:"y = "+c+" + "+o+" ln(x)",r2:u(i(t,l),e.precision)}},power:function(t,e){for(var n=[0,0,0,0,0],r=t.length,a=0;a<r;a++)null!==t[a][1]&&(n[0]+=Math.log(t[a][0]),n[1]+=Math.log(t[a][1])*Math.log(t[a][0]),n[2]+=Math.log(t[a][1]),n[3]+=Math.pow(Math.log(t[a][0]),2));var o=(r*n[1]-n[0]*n[2])/(r*n[3]-Math.pow(n[0],2)),c=(n[2]-o*n[0])/r,s=u(Math.exp(c),e.precision),l=u(o,e.precision),f=function(t){return[u(t,e.precision),u(u(s*Math.pow(t,l),e.precision),e.precision)]},h=t.map((function(t){return f(t[0])}));return{points:h,predict:f,equation:[s,l],string:"y = "+s+"x^"+l,r2:u(i(t,h),e.precision)}},polynomial:function(t,e){for(var n=[],a=[],c=0,s=0,l=t.length,f=e.order+1,h=0;h<f;h++){for(var d=0;d<l;d++)null!==t[d][1]&&(c+=Math.pow(t[d][0],h)*t[d][1]);n.push(c),c=0;for(var p=[],v=0;v<f;v++){for(var m=0;m<l;m++)null!==t[m][1]&&(s+=Math.pow(t[m][0],h+v));p.push(s),s=0}a.push(p)}a.push(n);for(var g=o(a,f).map((function(t){return u(t,e.precision)})),y=function(t){return[u(t,e.precision),u(g.reduce((function(e,n,r){return e+n*Math.pow(t,r)}),0),e.precision)]},b=t.map((function(t){return y(t[0])})),_="y = ",x=g.length-1;x>=0;x--)_+=x>1?g[x]+"x^"+x+" + ":1===x?g[x]+"x + ":g[x];return{string:_,points:b,predict:y,equation:[].concat(r(g)).reverse(),r2:u(i(t,b),e.precision)}}};function s(){var t=function(t,r){return n({_round:u},t,e({},r,(function(t,e){return c[r](t,n({},a,e))})))};return Object.keys(c).reduce(t,{})}t.exports=s()},void 0===(a="function"==typeof n?n.apply(e,r):n)||(t.exports=a)},1451:function(t){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},t.exports.__esModule=!0,t.exports.default=t.exports},2659:function(t){t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports},4218:function(t,e,n){var r=n(1451);t.exports=function(t){if(Array.isArray(t))return r(t)},t.exports.__esModule=!0,t.exports.default=t.exports},6626:function(t){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports},9989:function(t){function e(t,e,n,r,a,i,o){try{var u=t[i](o),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,a)}t.exports=function(t){return function(){var n=this,r=arguments;return new Promise((function(a,i){var o=t.apply(n,r);function u(t){e(o,a,i,u,c,"next",t)}function c(t){e(o,a,i,u,c,"throw",t)}u(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},4528:function(t){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},1088:function(t,e,n){var r=n(6842),a=n(5597);function i(e,n,o){return a()?(t.exports=i=Reflect.construct.bind(),t.exports.__esModule=!0,t.exports.default=t.exports):(t.exports=i=function(t,e,n){var a=[null];a.push.apply(a,e);var i=new(Function.bind.apply(t,a));return n&&r(i,n.prototype),i},t.exports.__esModule=!0,t.exports.default=t.exports),i.apply(null,arguments)}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},8798:function(t,e,n){var r=n(6157);function a(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,r(a.key),a)}}t.exports=function(t,e,n){return e&&a(t.prototype,e),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports},6970:function(t,e,n){var r=n(2482);t.exports=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=r(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var a=0,i=function(){};return{s:i,n:function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return u=t.done,t},e:function(t){c=!0,o=t},f:function(){try{u||null==n.return||n.return()}finally{if(c)throw o}}}},t.exports.__esModule=!0,t.exports.default=t.exports},9913:function(t,e,n){var r=n(378),a=n(5597),i=n(4776);t.exports=function(t){var e=a();return function(){var n,a=r(t);if(e){var o=r(this).constructor;n=Reflect.construct(a,arguments,o)}else n=a.apply(this,arguments);return i(this,n)}},t.exports.__esModule=!0,t.exports.default=t.exports},9057:function(t,e,n){var r=n(6157);t.exports=function(t,e,n){return(e=r(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.__esModule=!0,t.exports.default=t.exports},378:function(t){function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},7267:function(t,e,n){var r=n(6842);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&r(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports},5597:function(t){t.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}},t.exports.__esModule=!0,t.exports.default=t.exports},2977:function(t){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.__esModule=!0,t.exports.default=t.exports},926:function(t){t.exports=function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,i,o,u=[],c=!0,s=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){s=!0,a=t}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return u}},t.exports.__esModule=!0,t.exports.default=t.exports},9811:function(t){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},7404:function(t){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},1448:function(t,e,n){var r=n(9057);function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}t.exports=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t},t.exports.__esModule=!0,t.exports.default=t.exports},4776:function(t,e,n){var r=n(5570).default,a=n(6626);t.exports=function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return a(t)},t.exports.__esModule=!0,t.exports.default=t.exports},9558:function(t,e,n){var r=n(5570).default;function a(){"use strict";t.exports=a=function(){return n},t.exports.__esModule=!0,t.exports.default=t.exports;var e,n={},i=Object.prototype,o=i.hasOwnProperty,u=Object.defineProperty||function(t,e,n){t[e]=n.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";function h(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(e){h=function(t,e,n){return t[e]=n}}function d(t,e,n,r){var a=e&&e.prototype instanceof b?e:b,i=Object.create(a.prototype),o=new P(r||[]);return u(i,"_invoke",{value:S(t,n,o)}),i}function p(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}n.wrap=d;var v="suspendedStart",m="executing",g="completed",y={};function b(){}function _(){}function x(){}var w={};h(w,s,(function(){return this}));var k=Object.getPrototypeOf,M=k&&k(k(R([])));M&&M!==i&&o.call(M,s)&&(w=M);var A=x.prototype=b.prototype=Object.create(w);function C(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function n(a,i,u,c){var s=p(t[a],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==r(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,u,c)}),(function(t){n("throw",t,u,c)})):e.resolve(f).then((function(t){l.value=t,u(l)}),(function(t){return n("throw",t,u,c)}))}c(s.arg)}var a;u(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,a){n(t,r,e,a)}))}return a=a?a.then(i,i):i()}})}function S(t,n,r){var a=v;return function(i,o){if(a===m)throw new Error("Generator is already running");if(a===g){if("throw"===i)throw o;return{value:e,done:!0}}for(r.method=i,r.arg=o;;){var u=r.delegate;if(u){var c=N(u,r);if(c){if(c===y)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===v)throw a=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=m;var s=p(t,n,r);if("normal"===s.type){if(a=r.done?g:"suspendedYield",s.arg===y)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(a=g,r.method="throw",r.arg=s.arg)}}}function N(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,N(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var i=p(a,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,y;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function R(t){if(t||""===t){var n=t[s];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=function n(){for(;++a<t.length;)if(o.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(r(t)+" is not iterable")}return _.prototype=x,u(A,"constructor",{value:x,configurable:!0}),u(x,"constructor",{value:_,configurable:!0}),_.displayName=h(x,f,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===_||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,h(t,f,"GeneratorFunction")),t.prototype=Object.create(A),t},n.awrap=function(t){return{__await:t}},C(T.prototype),h(T.prototype,l,(function(){return this})),n.AsyncIterator=T,n.async=function(t,e,r,a,i){void 0===i&&(i=Promise);var o=new T(d(t,e,r,a),i);return n.isGeneratorFunction(e)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},C(A),h(A,f,"Generator"),h(A,s,(function(){return this})),h(A,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},n.values=R,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(I),!t)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,a){return u.type="throw",u.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),s=o.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),I(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var a=r.arg;I(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:R(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},n}t.exports=a,t.exports.__esModule=!0,t.exports.default=t.exports},6842:function(t){function e(n,r){return t.exports=e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n,r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},3100:function(t,e,n){var r=n(2659),a=n(926),i=n(2482),o=n(9811);t.exports=function(t,e){return r(t)||a(t,e)||i(t,e)||o()},t.exports.__esModule=!0,t.exports.default=t.exports},4479:function(t,e,n){var r=n(4218),a=n(2977),i=n(2482),o=n(7404);t.exports=function(t){return r(t)||a(t)||i(t)||o()},t.exports.__esModule=!0,t.exports.default=t.exports},2579:function(t,e,n){var r=n(5570).default;t.exports=function(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var a=n.call(t,e||"default");if("object"!=r(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports},6157:function(t,e,n){var r=n(5570).default,a=n(2579);t.exports=function(t){var e=a(t,"string");return"symbol"==r(e)?e:String(e)},t.exports.__esModule=!0,t.exports.default=t.exports},5570:function(t){function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},2482:function(t,e,n){var r=n(1451);t.exports=function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports}},e={};function n(r){var a=e[r];if(void 0!==a)return a.exports;var i=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.amdO={},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t};var r={};return function(){"use strict";n.r(r),n.d(r,{Advisor:function(){return t.w},CHANNELS:function(){return i.pD},CHART_IDS:function(){return i.Sx},COORDINATE_SYSTEMS:function(){return i.io},DataFrame:function(){return c.Z},ENTITY_TYPES:function(){return _.e},FAMILIES:function(){return i.oW},GRAPHIC_CATEGORIES:function(){return i.kB},LEVEL_OF_MEASUREMENTS:function(){return i.qm},PURPOSES:function(){return i.Kp},RECOMMEND_RATINGS:function(){return i.X1},SHAPES:function(){return i.HS},Series:function(){return u.Z},analyzeField:function(){return o.ri},cdf:function(){return h.s},ckb:function(){return e.n},ckbDict:function(){return a.N},coefficientOfVariance:function(){return s.eu},covariance:function(){return s.AV},distinct:function(){return s.EB},generateInsightVisualizationSpec:function(){return v.c},generateTextSpec:function(){return y.Z},geometricMean:function(){return s.IS},getHeadingWeight:function(){return b.TO},getInsights:function(){return p.o},getSpecificInsight:function(){return g.hs},harmonicMean:function(){return s.s6},insightPatternsExtractor:function(){return m.ew},isBulletParagraph:function(){return b.xf},isCustomParagraph:function(){return b.uV},isCustomPhrase:function(){return b.ps},isCustomSection:function(){return b.NS},isDividerParagraph:function(){return b.aY},isEntityPhrase:function(){return b.Tv},isEntityType:function(){return b.OC},isEscapePhrase:function(){return b.FX},isFormulaPhrase:function(){return b.fc},isHeadingParagraph:function(){return b.cL},isImagePhrase:function(){return b.zu},isStandardSection:function(){return b.Mu},isTextParagraph:function(){return b.lD},isTextPhrase:function(){return b.rF},max:function(){return s.Fp},maxabs:function(){return d.D},mean:function(){return s.J6},median:function(){return s.C2},min:function(){return s.VV},missing:function(){return s.wb},normalDistributionQuantile:function(){return l.T},pcorrtest:function(){return f.Z},pearson:function(){return s.Vs},quantile:function(){return s.VR},quartile:function(){return s.gG},standardDeviation:function(){return s.IN},sum:function(){return s.Sm},tDistributionQuantile:function(){return l.D},valid:function(){return s.QF},valueMap:function(){return s.Gn},variance:function(){return s.CA}});var t=n(7047),e=n(9105),a=n(5706),i=n(3708),o=n(107),u=n(4420),c=n(7849),s=n(2616),l=n(8604),f=n(7201),h=n(609),d=n(3125),p=n(9664),v=n(7462),m=n(1484),g=n(8367),y=n(8670),b=n(2267),_=n(5244),x=n(3069),w={};for(var k in x)["default","Advisor","ckb","ckbDict","CHANNELS","CHART_IDS","COORDINATE_SYSTEMS","FAMILIES","GRAPHIC_CATEGORIES","LEVEL_OF_MEASUREMENTS","PURPOSES","RECOMMEND_RATINGS","SHAPES","analyzeField","Series","DataFrame","min","max","sum","mean","normalDistributionQuantile","tDistributionQuantile","distinct","valueMap","missing","valid","pearson","covariance","coefficientOfVariance","standardDeviation","variance","quantile","quartile","median","harmonicMean","geometricMean","pcorrtest","cdf","maxabs","getInsights","generateInsightVisualizationSpec","insightPatternsExtractor","getSpecificInsight","generateTextSpec","isCustomSection","isStandardSection","isCustomParagraph","isTextParagraph","isBulletParagraph","getHeadingWeight","isHeadingParagraph","isDividerParagraph","isEntityPhrase","isImagePhrase","isCustomPhrase","isTextPhrase","isEntityType","isEscapePhrase","isFormulaPhrase","ENTITY_TYPES"].indexOf(k)<0&&(w[k]=function(t){return x[t]}.bind(0,k));n.d(r,w)}(),r}()}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.AVA=e():t.AVA=e()}(self,(function(){return function(){var t={7047:function(t,e,n){"use strict";n.d(e,{w:function(){return Qa}});var r=n(4528),a=n.n(r),i=n(8798),o=n.n(i),u=n(9057),c=n.n(u),s=n(9105),l=n(1448),f=n.n(l);function h(t,e){return e.every((function(e){return t.includes(e)}))}var d=10,p=["bar_chart","grouped_bar_chart","stacked_bar_chart","percent_stacked_bar_chart","column_chart","grouped_column_chart","stacked_column_chart","percent_stacked_column_chart"],v={id:"bar-series-qty",type:"SOFT",docs:{lintText:"Bar chart should has proper number of bars or bar groups."},trigger:function(t){var e=t.chartType;return p.includes(e)},validator:function(t){var e=1,n=t.dataProps,r=t.chartType;if(n&&r){var a=n.find((function(t){return h(t.levelOfMeasurements,["Nominal"])})),i=a&&a.count?a.count:0;i>20&&(e=20/i)}return e=e<.1?.1:e}},m=["bar_chart","grouped_bar_chart","stacked_bar_chart","percent_stacked_bar_chart","column_chart","grouped_column_chart","stacked_column_chart","percent_stacked_column_chart"],g={id:"bar-without-axis-min",type:"DESIGN",docs:{lintText:"It is not recommended to set the minimum value of axis for the bar or column chart.",fixText:"Remove the minimum value config of axis."},trigger:function(t){var e=t.chartType;return m.includes(e)},optimizer:function(t,e){var n,r,a=e.scale;if(!a)return{};var i=null===(n=a.x)||void 0===n?void 0:n.domainMin,o=null===(r=a.y)||void 0===r?void 0:r.domainMin;if(i||o){var u=JSON.parse(JSON.stringify(a));return i&&(u.x.domainMin=0),o&&(u.y.domainMin=0),{scale:u}}return{}}};function y(t,e){return e.some((function(e){return t.includes(e)}))}function b(t,e){return t.distinct<e.distinct?1:t.distinct>e.distinct?-1:0}var _={"bar-series-qty":.5,"data-check":1,"data-field-qty":1,"diff-pie-sector":.5,"landscape-or-portrait":.3,"limit-series":1,"line-field-time-ordinal":1,"no-redundant-field":1,"nominal-enum-combinatorial":1,"purpose-check":1,"series-qty-limit":.8},w=function(t,e,n,r,a,i){var o=1;return Object.values(n).filter((function(n){var i,o,u,c=(null===(i=n.option)||void 0===i?void 0:i.weight)||_[n.id]||1,s=null===(o=n.option)||void 0===o?void 0:o.extra;return n.type===r&&n.trigger(f()(f()(f()({},a),{},{weight:c},s),{},{chartType:t,chartWIKI:e}))&&!(null!==(u=n.option)&&void 0!==u&&u.off)})).forEach((function(n){var u,c,s=(null===(u=n.option)||void 0===u?void 0:u.weight)||_[n.id]||1,l=null===(c=n.option)||void 0===c?void 0:c.extra,h=n.validator(f()(f()(f()({},a),{},{weight:s},l),{},{chartType:t,chartWIKI:e})),d=s*h;o*=d,i.push({phase:"ADVISE",ruleId:n.id,score:d,base:h,weight:s,ruleType:r})})),o},x={id:"data-check",type:"HARD",docs:{lintText:"Data must satisfy the data prerequisites."},trigger:function(){return!0},validator:function(t){var e=0,n=t.dataProps,r=t.chartType,a=t.chartWIKI;if(n&&r&&a[r]){e=1;var i=a[r].dataPres||[];i.forEach((function(t){(function(t,e){var n=e.map((function(t){return t.levelOfMeasurements}));if(n){var r=0;if(n.forEach((function(e){e&&y(e,t.fieldConditions)&&(r+=1)})),r>=t.minQty&&(r<=t.maxQty||"*"===t.maxQty))return!0}return!1})(t,n)||(e=0)})),n.map((function(t){return t.levelOfMeasurements})).forEach((function(t){var n=!1;i.forEach((function(e){t&&y(t,e.fieldConditions)&&(n=!0)})),n||(e=0)}))}return e}},M=["pie_chart","donut_chart"],k={id:"diff-pie-sector",type:"SOFT",docs:{lintText:"The difference between sectors of a pie chart should be large enough."},trigger:function(t){var e=t.chartType;return M.includes(e)},validator:function(t){var e=1,n=t.dataProps;if(n){var r=n.find((function(t){return h(t.levelOfMeasurements,["Interval"])}));if(r&&r.sum&&r.rawData){var a=1/r.sum,i=r.rawData.map((function(t){return t*a})).reduce((function(t,e){return t*e})),o=r.rawData.length,u=Math.pow(1/o,o);e=Math.abs(u-Math.abs(i))/u*2}}return e=e<.1?.1:e}},C=["bar_chart","grouped_bar_chart","stacked_bar_chart","percent_stacked_bar_chart","column_chart","grouped_column_chart","stacked_column_chart","percent_stacked_column_chart"];function A(t){var e=t.chartType,n=t.dataProps,r=t.preferences;return!!(n&&e&&r&&r.canvasLayout)}var T={id:"landscape-or-portrait",type:"SOFT",docs:{lintText:"Recommend column charts for landscape layout and bar charts for portrait layout."},trigger:function(t){return C.includes(t.chartType)&&A(t)},validator:function(t){var e=1,n=t.chartType,r=t.preferences;return A(t)&&("portrait"===r.canvasLayout&&["bar_chart","grouped_bar_chart","stacked_bar_chart","percent_stacked_bar_chart"].includes(n)||"landscape"===r.canvasLayout&&["column_chart","grouped_column_chart","stacked_column_chart","percent_stacked_column_chart"].includes(n))&&(e=5),e}};var S={id:"limit-series",type:"SOFT",docs:{lintText:"Avoid too many values in one series."},trigger:function(t){return function(t){return t.filter((function(t){return y(t.levelOfMeasurements,["Nominal","Ordinal"])})).length>=2}(t.dataProps)},validator:function(t){var e=1,n=t.dataProps,r=t.chartType;if(n){var a=n.filter((function(t){return y(t.levelOfMeasurements,["Nominal","Ordinal"])}));if(a.length>=2){var i=a.sort(b)[1];i.distinct&&(e=i.distinct>d?.1:1/i.distinct,i.distinct>6&&"heatmap"===r?e=5:"heatmap"===r&&(e=1))}}return e}},O=["line_chart","area_chart","stacked_area_chart","percent_stacked_area_chart"],N={id:"line-field-time-ordinal",type:"SOFT",docs:{lintText:"Data containing time or ordinal fields are suitable for line or area charts."},trigger:function(t){var e=t.chartType;return O.includes(e)},validator:function(t){var e=1,n=t.dataProps;n&&(n.find((function(t){return y(t.levelOfMeasurements,["Ordinal","Time"])}))&&(e=5));return e}},P=["bar_chart","column_chart","grouped_bar_chart","grouped_column_chart","stacked_bar_chart","stacked_column_chart"];function D(t){return t.filter((function(t){return h(t.levelOfMeasurements,["Nominal"])}))}var I={id:"nominal-enum-combinatorial",type:"SOFT",docs:{lintText:"Single (Basic) and Multi (Stacked, Grouped,...) charts should be optimized recommended by nominal enums combinatorial numbers."},trigger:function(t){var e=t.chartType,n=t.dataProps;return P.includes(e)&&D(n).length>=2},validator:function(t){var e=1,n=t.dataProps,r=t.chartType;if(n){var a=D(n);if(a.length>=2){var i=a.sort(b),o=i[0],u=i[1];if(o.distinct===o.count&&["bar_chart","column_chart"].includes(r)&&(e=5),o.count&&o.distinct&&u.distinct&&o.count>o.distinct){["grouped_bar_chart","grouped_column_chart","stacked_bar_chart","stacked_column_chart"].includes(r)&&(e=5)}}}return e}},j=["pie_chart","donut_chart","radar_chart","rose_chart"],R={id:"series-qty-limit",type:"SOFT",docs:{lintText:"Some charts should has at most N values for the series."},trigger:function(t){var e=t.chartType;return j.includes(e)},validator:function(t){var e=1,n=t.dataProps,r=t.chartType,a=t.limit;if((!Number.isInteger(a)||a<=0)&&(a=6,"pie_chart"!==r&&"donut_chart"!==r&&"rose_chart"!==r||(a=6),"radar_chart"===r&&(a=8)),n){var i=n.find((function(t){return h(t.levelOfMeasurements,["Nominal"])})),o=i&&i.count?i.count:0;o>=2&&o<=a&&(e=5+2/o)}return e}},L=n(5570),E=n.n(L),z=n(8972);function B(t){return"number"==typeof t}function Q(t){return"string"==typeof t||"boolean"==typeof t}function F(t){return t instanceof Date}function q(t,e,n){if(void 0!==n)return function(t){switch(t){case"linear":case"log":case"pow":case"sqrt":case"qunatile":case"threshold":case"quantize":case"sequential":return"quantitative";case"time":return"temporal";case"ordinal":case"point":case"band":return"categorical";default:throw new Error("Unkonwn scale type: ".concat(t,"."))}}(n);var r=function(t,e){return function(t){return"function"==typeof t}(e)?t.map(e):function(t,e){return"string"==typeof e&&t.some((function(t){return void 0!==t[e]}))}(t,e)?t.map((function(t){return t[e]})):t.map((function(){return e}))}(t,e);return function(t){if(t.some(B))return"quantitative";if(t.some(Q))return"categorical";if(t.some(F))return"temporal";throw new Error("Unknown type: ".concat(E()(t[0])))}(r)}function G(t){var e=t.encode,n=t.data,r=t.scale,a=(0,z.mapValues)(e,(function(t,e){return{field:t,type:q(n,t,null==r?void 0:r[e].type)}}));return f()(f()({},t),{},{encode:a})}for(var W=["line_chart"],U={id:"x-axis-line-fading",type:"DESIGN",docs:{lintText:"Adjust axis to make it prettier"},trigger:function(t){var e=t.chartType;return W.includes(e)},optimizer:function(t,e){var n,r=G(e).encode;if(r&&"quantitative"===(null===(n=r.y)||void 0===n?void 0:n.type)){var a=t.find((function(t){var e;return t.name===(null===(e=r.y)||void 0===e?void 0:e.field)}));if(a){var i=a.maximum-a.minimum;if(a.minimum&&a.maximum&&i<2*a.maximum/3){var o=Math.floor(a.minimum-i/5);return{axis:{x:{tick:!1}},scale:{y:{domainMin:o>0?o:0}},clip:!0}}}}return{}}},Y=([].concat(["data-check","data-field-qty","no-redundant-field","purpose-check"],["series-qty-limit","bar-series-qty","line-field-time-ordinal","landscape-or-portrait","diff-pie-sector","nominal-enum-combinatorial","limit-series"]),{"data-check":x,"data-field-qty":{id:"data-field-qty",type:"HARD",docs:{lintText:"Data must have at least the min qty of the prerequisite."},trigger:function(){return!0},validator:function(t){var e=0,n=t.dataProps,r=t.chartType,a=t.chartWIKI;if(n&&r&&a[r]){e=1;var i=(a[r].dataPres||[]).map((function(t){return t.minQty})).reduce((function(t,e){return t+e}));if(n.length)n.length>=i&&(e=1)}return e}},"no-redundant-field":{id:"no-redundant-field",type:"HARD",docs:{lintText:"No redundant field."},trigger:function(){return!0},validator:function(t){var e=0,n=t.dataProps,r=t.chartType,a=t.chartWIKI;if(n&&r&&a[r]){var i=(a[r].dataPres||[]).map((function(t){return"*"===t.maxQty?99:t.maxQty})).reduce((function(t,e){return t+e}));if(n.length)n.length<=i&&(e=1)}return e}},"purpose-check":{id:"purpose-check",type:"HARD",docs:{lintText:"Choose chart types that satisfy the purpose, if purpose is defined."},trigger:function(){return!0},validator:function(t){var e=0,n=t.chartType,r=t.purpose,a=t.chartWIKI;if(!r)return e=1;if(n&&a[n]&&r&&(a[n].purpose||"").includes(r))return e=1;return e}},"bar-series-qty":v,"diff-pie-sector":k,"landscape-or-portrait":T,"limit-series":S,"line-field-time-ordinal":N,"nominal-enum-combinatorial":I,"series-qty-limit":R,"x-axis-line-fading":U,"bar-without-axis-min":g}),$=Object.keys(Y),H=function(t){var e={};return t.forEach((function(t){Object.keys(Y).includes(t)&&(e[t]=Y[t])})),e},V=function(t){if(!t)return H($);var e=H($);t.exclude&&t.exclude.forEach((function(t){Object.keys(e).includes(t)&&delete e[t]}));if(t.include){var n=t.include;Object.keys(e).forEach((function(t){n.includes(t)||delete e[t]}))}var r=f()(f()({},e),t.custom),a=t.options;a&&Object.keys(a).forEach((function(t){if(Object.keys(r).includes(t)){var e=a[t];r[t]=f()(f()({},r[t]),{},{option:e})}}));return r},J=n(7849),Z=function t(e){if("object"!==E()(e)||null===e)return e;var n;if(Array.isArray(e)){n=[];for(var r=0,a=e.length;r<a;r+=1)"object"===E()(e[r])&&null!=e[r]?n[r]=t(e[r]):n[r]=e[r]}else{n={};for(var i=Object.keys(e),o=0;o<i.length;o+=1){var u=i[o];"object"===E()(e[u])&&null!=e[u]?n[u]=t(e[u]):n[u]=e[u]}}return n},K=n(3100),X=n.n(K),tt=n(4479),et=n.n(tt),nt={model:"rgb",value:{r:255,g:255,b:255}},rt=["normal","darken","multiply","colorBurn","linearBurn","lighten","screen","colorDodge","linearDodge","overlay","softLight","hardLight","vividLight","linearLight","pinLight","difference","exclusion"],at=([].concat(rt,["hue","saturation","color","luminosity"]),n(1088)),it=n(6970),ot=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return mt(gt(e,t),n)},ut=function(t){t._clipped=!1,t._unclipped=t.slice(0);for(var e=0;e<=3;e++)e<3?((t[e]<0||t[e]>255)&&(t._clipped=!0),t[e]=ot(t[e],0,255)):3===e&&(t[e]=ot(t[e],0,1));return t},ct={},st=0,lt=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];st<lt.length;st++){var ft=lt[st];ct["[object ".concat(ft,"]")]=ft.toLowerCase()}function ht(t){return ct[Object.prototype.toString.call(t)]||"object"}var dt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return t.length>=3?Array.prototype.slice.call(t):"object"==ht(t[0])&&e?e.split("").filter((function(e){return void 0!==t[0][e]})).map((function(e){return t[0][e]})):t[0]},pt=function(t){if(t.length<2)return null;var e=t.length-1;return"string"==ht(t[e])?t[e].toLowerCase():null},vt=Math.PI,mt=Math.min,gt=Math.max,yt=2*vt,bt=vt/3,_t=vt/180,wt=180/vt,xt={format:{},autodetect:[]},Mt=function(){function t(){r(this,t);for(var e=this,n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];if("object"===ht(a[0])&&a[0].constructor&&a[0].constructor===this.constructor)return a[0];var o=pt(a),u=!1;if(!o){u=!0,xt.sorted||(xt.autodetect=xt.autodetect.sort((function(t,e){return e.p-t.p})),xt.sorted=!0);var c,s=it(xt.autodetect);try{for(s.s();!(c=s.n()).done;){var l=c.value;if(o=l.test.apply(l,a))break}}catch(t){s.e(t)}finally{s.f()}}if(!xt.format[o])throw new Error("unknown format: "+a);var f=xt.format[o].apply(null,u?a:a.slice(0,-1));e._rgb=ut(f),3===e._rgb.length&&e._rgb.push(1)}return i(t,[{key:"toString",value:function(){return"function"==ht(this.hex)?this.hex():"[".concat(this._rgb.join(","),"]")}}]),t}(),kt=Mt,Ct=function t(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return at(t.Color,n)};Ct.Color=kt,Ct.version="2.6.0";var At=Ct,Tt=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e=dt(e,"cmyk"),a=K(r,4),i=a[0],o=a[1],u=a[2],c=a[3],s=e.length>4?e[4]:1;return 1===c?[0,0,0,s]:[i>=1?0:255*(1-i)*(1-c),o>=1?0:255*(1-o)*(1-c),u>=1?0:255*(1-u)*(1-c),s]},St=Math.max,Ot=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=dt(e,"rgb"),a=K(r,3),i=a[0],o=a[1],u=a[2],c=1-St(i/=255,St(o/=255,u/=255)),s=c<1?1/(1-c):0,l=(1-i-c)*s,f=(1-o-c)*s,h=(1-u-c)*s;return[l,f,h,c]};kt.prototype.cmyk=function(){return Ot(this._rgb)},At.cmyk=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(kt,e.concat(["cmyk"]))},xt.format.cmyk=Tt,xt.autodetect.push({p:2,test:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if("array"===ht(e=dt(e,"cmyk"))&&4===e.length)return"cmyk"}});var Nt=function(t){return Math.round(100*t)/100},Pt=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=dt(e,"hsla"),a=pt(e)||"lsa";return r[0]=Nt(r[0]||0),r[1]=Nt(100*r[1])+"%",r[2]=Nt(100*r[2])+"%","hsla"===a||r.length>3&&r[3]<1?(r[3]=r.length>3?r[3]:1,a="hsla"):r.length=3,"".concat(a,"(").concat(r.join(","),")")},Dt=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,a,i=e=dt(e,"rgba"),o=K(i,3),u=o[0],c=o[1],s=o[2],l=mt(u/=255,c/=255,s/=255),f=gt(u,c,s),h=(f+l)/2;return f===l?(r=0,a=Number.NaN):r=h<.5?(f-l)/(f+l):(f-l)/(2-f-l),u==f?a=(c-s)/(f-l):c==f?a=2+(s-u)/(f-l):s==f&&(a=4+(u-c)/(f-l)),(a*=60)<0&&(a+=360),e.length>3&&void 0!==e[3]?[a,r,h,e[3]]:[a,r,h]},It=Math.round,jt=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=dt(e,"rgba"),a=pt(e)||"rgb";return"hsl"==a.substr(0,3)?Pt(Dt(r),a):(r[0]=It(r[0]),r[1]=It(r[1]),r[2]=It(r[2]),("rgba"===a||r.length>3&&r[3]<1)&&(r[3]=r.length>3?r[3]:1,a="rgba"),"".concat(a,"(").concat(r.slice(0,"rgb"===a?3:4).join(","),")"))},Rt=Math.round,Lt=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,a,i,o=e=dt(e,"hsl"),u=K(o,3),c=u[0],s=u[1],l=u[2];if(0===s)r=a=i=255*l;else{var f=[0,0,0],h=[0,0,0],d=l<.5?l*(1+s):l+s-l*s,p=2*l-d,v=c/360;f[0]=v+1/3,f[1]=v,f[2]=v-1/3;for(var m=0;m<3;m++)f[m]<0&&(f[m]+=1),f[m]>1&&(f[m]-=1),6*f[m]<1?h[m]=p+6*(d-p)*f[m]:2*f[m]<1?h[m]=d:3*f[m]<2?h[m]=p+(d-p)*(2/3-f[m])*6:h[m]=p;var g=[Rt(255*h[0]),Rt(255*h[1]),Rt(255*h[2])];r=g[0],a=g[1],i=g[2]}return e.length>3?[r,a,i,e[3]]:[r,a,i,1]},Et=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,zt=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,Bt=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Qt=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Ft=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,qt=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,Gt=Math.round,Wt=function(t){var e;if(t=t.toLowerCase().trim(),xt.format.named)try{return xt.format.named(t)}catch(t){}if(e=t.match(Et)){for(var n=e.slice(1,4),r=0;r<3;r++)n[r]=+n[r];return n[3]=1,n}if(e=t.match(zt)){for(var a=e.slice(1,5),i=0;i<4;i++)a[i]=+a[i];return a}if(e=t.match(Bt)){for(var o=e.slice(1,4),u=0;u<3;u++)o[u]=Gt(2.55*o[u]);return o[3]=1,o}if(e=t.match(Qt)){for(var c=e.slice(1,5),s=0;s<3;s++)c[s]=Gt(2.55*c[s]);return c[3]=+c[3],c}if(e=t.match(Ft)){var l=e.slice(1,4);l[1]*=.01,l[2]*=.01;var f=Lt(l);return f[3]=1,f}if(e=t.match(qt)){var h=e.slice(1,4);h[1]*=.01,h[2]*=.01;var d=Lt(h);return d[3]=+e[4],d}};Wt.test=function(t){return Et.test(t)||zt.test(t)||Bt.test(t)||Qt.test(t)||Ft.test(t)||qt.test(t)};var Ut=Wt;kt.prototype.css=function(t){return jt(this._rgb,t)},At.css=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(kt,e.concat(["css"]))},xt.format.css=Ut,xt.autodetect.push({p:5,test:function(t){if((arguments.length<=1||!(arguments.length-1))&&"string"===ht(t)&&Ut.test(t))return"css"}}),xt.format.gl=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=dt(e,"rgba");return r[0]*=255,r[1]*=255,r[2]*=255,r},At.gl=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(kt,e.concat(["gl"]))},kt.prototype.gl=function(){var t=this._rgb;return[t[0]/255,t[1]/255,t[2]/255,t[3]]};var Yt=Math.floor,$t=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,a,i,o=e=dt(e,"hcg"),u=K(o,3),c=u[0],s=u[1],l=u[2];l*=255;var f=255*s;if(0===s)r=a=i=l;else{360===c&&(c=0),c>360&&(c-=360),c<0&&(c+=360);var h=Yt(c/=60),d=c-h,p=l*(1-s),v=p+f*(1-d),m=p+f*d,g=p+f;switch(h){case 0:r=g,a=m,i=p;break;case 1:r=v,a=g,i=p;break;case 2:r=p,a=g,i=m;break;case 3:r=p,a=v,i=g;break;case 4:r=m,a=p,i=g;break;case 5:r=g,a=p,i=v}}return[r,a,i,e.length>3?e[3]:1]},Ht=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,a=dt(e,"rgb"),i=K(a,3),o=i[0],u=i[1],c=i[2],s=mt(o,u,c),l=gt(o,u,c),f=l-s,h=100*f/255,d=s/(255-f)*100;return 0===f?r=Number.NaN:(o===l&&(r=(u-c)/f),u===l&&(r=2+(c-o)/f),c===l&&(r=4+(o-u)/f),(r*=60)<0&&(r+=360)),[r,h,d]};kt.prototype.hcg=function(){return Ht(this._rgb)},At.hcg=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(kt,e.concat(["hcg"]))},xt.format.hcg=$t,xt.autodetect.push({p:1,test:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if("array"===ht(e=dt(e,"hcg"))&&3===e.length)return"hcg"}});var Vt=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Jt=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Zt=function(t){if(t.match(Vt)){4!==t.length&&7!==t.length||(t=t.substr(1)),3===t.length&&(t=(t=t.split(""))[0]+t[0]+t[1]+t[1]+t[2]+t[2]);var e=parseInt(t,16);return[e>>16,e>>8&255,255&e,1]}if(t.match(Jt)){5!==t.length&&9!==t.length||(t=t.substr(1)),4===t.length&&(t=(t=t.split(""))[0]+t[0]+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]);var n=parseInt(t,16);return[n>>24&255,n>>16&255,n>>8&255,Math.round((255&n)/255*100)/100]}throw new Error("unknown hex color: ".concat(t))},Kt=Math.round,Xt=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=dt(e,"rgba"),a=K(r,4),i=a[0],o=a[1],u=a[2],c=a[3],s=pt(e)||"auto";void 0===c&&(c=1),"auto"===s&&(s=c<1?"rgba":"rgb");var l=(i=Kt(i))<<16|(o=Kt(o))<<8|(u=Kt(u)),f="000000"+l.toString(16);f=f.substr(f.length-6);var h="0"+Kt(255*c).toString(16);switch(h=h.substr(h.length-2),s.toLowerCase()){case"rgba":return"#".concat(f).concat(h);case"argb":return"#".concat(h).concat(f);default:return"#".concat(f)}};kt.prototype.hex=function(t){return Xt(this._rgb,t)},At.hex=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(kt,e.concat(["hex"]))},xt.format.hex=Zt,xt.autodetect.push({p:4,test:function(t){if((arguments.length<=1||!(arguments.length-1))&&"string"===ht(t)&&[3,4,5,6,7,8,9].indexOf(t.length)>=0)return"hex"}});var te=Math.cos,ee=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,a,i,o=e=dt(e,"hsi"),u=K(o,3),c=u[0],s=u[1],l=u[2];return isNaN(c)&&(c=0),isNaN(s)&&(s=0),c>360&&(c-=360),c<0&&(c+=360),(c/=360)<1/3?a=1-((i=(1-s)/3)+(r=(1+s*te(yt*c)/te(bt-yt*c))/3)):c<2/3?i=1-((r=(1-s)/3)+(a=(1+s*te(yt*(c-=1/3))/te(bt-yt*c))/3)):r=1-((a=(1-s)/3)+(i=(1+s*te(yt*(c-=2/3))/te(bt-yt*c))/3)),[255*(r=ot(l*r*3)),255*(a=ot(l*a*3)),255*(i=ot(l*i*3)),e.length>3?e[3]:1]},ne=Math.min,re=Math.sqrt,ae=Math.acos,ie=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,a=dt(e,"rgb"),i=K(a,3),o=i[0],u=i[1],c=i[2],s=ne(o/=255,u/=255,c/=255),l=(o+u+c)/3,f=l>0?1-s/l:0;return 0===f?r=NaN:(r=(o-u+(o-c))/2,r/=re((o-u)*(o-u)+(o-c)*(u-c)),r=ae(r),c>u&&(r=yt-r),r/=yt),[360*r,f,l]};kt.prototype.hsi=function(){return ie(this._rgb)},At.hsi=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(kt,e.concat(["hsi"]))},xt.format.hsi=ee,xt.autodetect.push({p:2,test:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if("array"===ht(e=dt(e,"hsi"))&&3===e.length)return"hsi"}}),kt.prototype.hsl=function(){return Dt(this._rgb)},At.hsl=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(kt,e.concat(["hsl"]))},xt.format.hsl=Lt,xt.autodetect.push({p:2,test:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if("array"===ht(e=dt(e,"hsl"))&&3===e.length)return"hsl"}});var oe=Math.floor,ue=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,a,i,o=e=dt(e,"hsv"),u=K(o,3),c=u[0],s=u[1],l=u[2];if(l*=255,0===s)r=a=i=l;else{360===c&&(c=0),c>360&&(c-=360),c<0&&(c+=360);var f=oe(c/=60),h=c-f,d=l*(1-s),p=l*(1-s*h),v=l*(1-s*(1-h));switch(f){case 0:r=l,a=v,i=d;break;case 1:r=p,a=l,i=d;break;case 2:r=d,a=l,i=v;break;case 3:r=d,a=p,i=l;break;case 4:r=v,a=d,i=l;break;case 5:r=l,a=d,i=p}}return[r,a,i,e.length>3?e[3]:1]},ce=Math.min,se=Math.max,le=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,a,i,o=e=dt(e,"rgb"),u=K(o,3),c=u[0],s=u[1],l=u[2],f=ce(c,s,l),h=se(c,s,l),d=h-f;return i=h/255,0===h?(r=Number.NaN,a=0):(a=d/h,c===h&&(r=(s-l)/d),s===h&&(r=2+(l-c)/d),l===h&&(r=4+(c-s)/d),(r*=60)<0&&(r+=360)),[r,a,i]};kt.prototype.hsv=function(){return le(this._rgb)},At.hsv=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(kt,e.concat(["hsv"]))},xt.format.hsv=ue,xt.autodetect.push({p:2,test:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if("array"===ht(e=dt(e,"hsv"))&&3===e.length)return"hsv"}});var fe=18,he=.95047,de=1,pe=1.08883,ve=.137931034,me=.206896552,ge=.12841855,ye=.008856452,be=Math.pow,_e=function(t){return 255*(t<=.00304?12.92*t:1.055*be(t,1/2.4)-.055)},we=function(t){return t>me?t*t*t:ge*(t-ve)},xe=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,a,i,o=e=dt(e,"lab"),u=K(o,3),c=u[0],s=u[1],l=u[2];return a=(c+16)/116,r=isNaN(s)?a:a+s/500,i=isNaN(l)?a:a-l/200,a=de*we(a),r=he*we(r),i=pe*we(i),[_e(3.2404542*r-1.5371385*a-.4985314*i),_e(-.969266*r+1.8760108*a+.041556*i),_e(.0556434*r-.2040259*a+1.0572252*i),e.length>3?e[3]:1]},Me=Math.pow,ke=function(t){return(t/=255)<=.04045?t/12.92:Me((t+.055)/1.055,2.4)},Ce=function(t){return t>ye?Me(t,1/3):t/ge+ve},Ae=function(t,e,n){return t=ke(t),e=ke(e),n=ke(n),[Ce((.4124564*t+.3575761*e+.1804375*n)/he),Ce((.2126729*t+.7151522*e+.072175*n)/de),Ce((.0193339*t+.119192*e+.9503041*n)/pe)]},Te=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=dt(e,"rgb"),a=K(r,3),i=a[0],o=a[1],u=a[2],c=Ae(i,o,u),s=K(c,3),l=s[0],f=s[1],h=s[2],d=116*f-16;return[d<0?0:d,500*(l-f),200*(f-h)]};kt.prototype.lab=function(){return Te(this._rgb)},At.lab=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(kt,e.concat(["lab"]))},xt.format.lab=xe,xt.autodetect.push({p:2,test:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if("array"===ht(e=dt(e,"lab"))&&3===e.length)return"lab"}});var Se=Math.sin,Oe=Math.cos,Ne=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=dt(e,"lch"),a=K(r,3),i=a[0],o=a[1],u=a[2];return isNaN(u)&&(u=0),[i,Oe(u*=_t)*o,Se(u)*o]},Pe=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e=dt(e,"lch"),a=K(r,3),i=a[0],o=a[1],u=a[2],c=Ne(i,o,u),s=K(c,3),l=s[0],f=s[1],h=s[2],d=xe(l,f,h),p=K(d,3),v=p[0],m=p[1],g=p[2];return[v,m,g,e.length>3?e[3]:1]},De=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=dt(e,"hcl").reverse();return Pe.apply(void 0,tt(r))},Ie=Math.sqrt,je=Math.atan2,Re=Math.round,Le=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=dt(e,"lab"),a=K(r,3),i=a[0],o=a[1],u=a[2],c=Ie(o*o+u*u),s=(je(u,o)*wt+360)%360;return 0===Re(1e4*c)&&(s=Number.NaN),[i,c,s]},Ee=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=dt(e,"rgb"),a=K(r,3),i=a[0],o=a[1],u=a[2],c=Te(i,o,u),s=K(c,3),l=s[0],f=s[1],h=s[2];return Le(l,f,h)};kt.prototype.lch=function(){return Ee(this._rgb)},kt.prototype.hcl=function(){return Ee(this._rgb).reverse()},At.lch=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(kt,e.concat(["lch"]))},At.hcl=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(kt,e.concat(["hcl"]))},xt.format.lch=Pe,xt.format.hcl=De,["lch","hcl"].forEach((function(t){return xt.autodetect.push({p:2,test:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if("array"===ht(n=dt(n,t))&&3===n.length)return t}})}));var ze={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};kt.prototype.name=function(){for(var t=Xt(this._rgb,"rgb"),e=0,n=Object.keys(ze);e<n.length;e++){var r=n[e];if(ze[r]===t)return r.toLowerCase()}return t},xt.format.named=function(t){if(t=t.toLowerCase(),ze[t])return Zt(ze[t]);throw new Error("unknown color name: "+t)},xt.autodetect.push({p:5,test:function(t){if((arguments.length<=1||!(arguments.length-1))&&"string"===ht(t)&&ze[t.toLowerCase()])return"named"}});var Be=function(t){if("number"==ht(t)&&t>=0&&t<=16777215)return[t>>16,t>>8&255,255&t,1];throw new Error("unknown num color: "+t)},Qe=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=dt(e,"rgb"),a=K(r,3),i=a[0],o=a[1],u=a[2];return(i<<16)+(o<<8)+u};kt.prototype.num=function(){return Qe(this._rgb)},At.num=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(kt,e.concat(["num"]))},xt.format.num=Be,xt.autodetect.push({p:5,test:function(){if(1===arguments.length&&"number"===ht(arguments.length<=0?void 0:arguments[0])&&(arguments.length<=0?void 0:arguments[0])>=0&&(arguments.length<=0?void 0:arguments[0])<=16777215)return"num"}});var Fe=Math.round;kt.prototype.rgb=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return!1===t?this._rgb.slice(0,3):this._rgb.slice(0,3).map(Fe)},kt.prototype.rgba=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._rgb.slice(0,4).map((function(e,n){return n<3?!1===t?e:Fe(e):e}))},At.rgb=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(kt,e.concat(["rgb"]))},xt.format.rgb=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=dt(e,"rgba");return void 0===r[3]&&(r[3]=1),r},xt.autodetect.push({p:3,test:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if("array"===ht(e=dt(e,"rgba"))&&(3===e.length||4===e.length&&"number"==ht(e[3])&&e[3]>=0&&e[3]<=1))return"rgb"}});var qe=Math.log,Ge=function(t){var e,n,r,a=t/100;return a<66?(e=255,n=a<6?0:-155.25485562709179-.44596950469579133*(n=a-2)+104.49216199393888*qe(n),r=a<20?0:.8274096064007395*(r=a-10)-254.76935184120902+115.67994401066147*qe(r)):(e=351.97690566805693+.114206453784165*(e=a-55)-40.25366309332127*qe(e),n=325.4494125711974+.07943456536662342*(n=a-50)-28.0852963507957*qe(n),r=255),[e,n,r,1]},We=Math.round,Ue=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r,a=dt(e,"rgb"),i=a[0],o=a[2],u=1e3,c=4e4,s=.4;c-u>s;){var l=Ge(r=.5*(c+u));l[2]/l[0]>=o/i?c=r:u=r}return We(r)};kt.prototype.temp=kt.prototype.kelvin=kt.prototype.temperature=function(){return Ue(this._rgb)},At.temp=At.kelvin=At.temperature=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(kt,e.concat(["temp"]))},xt.format.temp=xt.format.kelvin=xt.format.temperature=Ge;var Ye=Math.pow,$e=Math.sign,He=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e=dt(e,"lab"),a=K(r,3),i=a[0],o=a[1],u=a[2],c=Ye(i+.3963377774*o+.2158037573*u,3),s=Ye(i-.1055613458*o-.0638541728*u,3),l=Ye(i-.0894841775*o-1.291485548*u,3);return[255*Ve(4.0767416621*c-3.3077115913*s+.2309699292*l),255*Ve(-1.2684380046*c+2.6097574011*s-.3413193965*l),255*Ve(-.0041960863*c-.7034186147*s+1.707614701*l),e.length>3?e[3]:1]};function Ve(t){var e=Math.abs(t);return e>.0031308?($e(t)||1)*(1.055*Ye(e,1/2.4)-.055):12.92*t}var Je=Math.cbrt,Ze=Math.pow,Ke=Math.sign,Xe=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=dt(e,"rgb"),a=K(r,3),i=a[0],o=a[1],u=a[2],c=[tn(i/255),tn(o/255),tn(u/255)],s=c[0],l=c[1],f=c[2],h=Je(.4122214708*s+.5363325363*l+.0514459929*f),d=Je(.2119034982*s+.6806995451*l+.1073969566*f),p=Je(.0883024619*s+.2817188376*l+.6299787005*f);return[.2104542553*h+.793617785*d-.0040720468*p,1.9779984951*h-2.428592205*d+.4505937099*p,.0259040371*h+.7827717662*d-.808675766*p]};function tn(t){var e=Math.abs(t);return e<.04045?t/12.92:(Ke(t)||1)*Ze((e+.055)/1.055,2.4)}kt.prototype.oklab=function(){return Xe(this._rgb)},At.oklab=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(kt,e.concat(["oklab"]))},xt.format.oklab=He,xt.autodetect.push({p:3,test:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if("array"===ht(e=dt(e,"oklab"))&&3===e.length)return"oklab"}});var en=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e=dt(e,"lch"),a=K(r,3),i=a[0],o=a[1],u=a[2],c=Ne(i,o,u),s=K(c,3),l=s[0],f=s[1],h=s[2],d=He(l,f,h),p=K(d,3),v=p[0],m=p[1],g=p[2];return[v,m,g,e.length>3?e[3]:1]},nn=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=dt(e,"rgb"),a=K(r,3),i=a[0],o=a[1],u=a[2],c=Xe(i,o,u),s=K(c,3),l=s[0],f=s[1],h=s[2];return Le(l,f,h)};kt.prototype.oklch=function(){return nn(this._rgb)},At.oklch=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(kt,e.concat(["oklch"]))},xt.format.oklch=en,xt.autodetect.push({p:3,test:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if("array"===ht(e=dt(e,"oklch"))&&3===e.length)return"oklch"}}),kt.prototype.alpha=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return void 0!==t&&"number"===ht(t)?e?(this._rgb[3]=t,this):new kt([this._rgb[0],this._rgb[1],this._rgb[2],t],"rgb"):this._rgb[3]},kt.prototype.clipped=function(){return this._rgb._clipped||!1},kt.prototype.darken=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=this,n=e.lab();return n[0]-=fe*t,new kt(n,"lab").alpha(e.alpha(),!0)},kt.prototype.brighten=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.darken(-t)},kt.prototype.darker=kt.prototype.darken,kt.prototype.brighter=kt.prototype.brighten,kt.prototype.get=function(t){var e=t.split("."),n=K(e,2),r=n[0],a=n[1],i=this[r]();if(a){var o=r.indexOf(a)-("ok"===r.substr(0,2)?2:0);if(o>-1)return i[o];throw new Error("unknown channel ".concat(a," in mode ").concat(r))}return i};var rn=Math.pow;kt.prototype.luminance=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"rgb";if(void 0!==t&&"number"===ht(t)){if(0===t)return new kt([0,0,0,this._rgb[3]],"rgb");if(1===t)return new kt([255,255,255,this._rgb[3]],"rgb");var n=this.luminance(),r=20,a=function n(a,i){var o=a.interpolate(i,.5,e),u=o.luminance();return Math.abs(t-u)<1e-7||!r--?o:u>t?n(a,o):n(o,i)},i=(n>t?a(new kt([0,0,0]),this):a(this,new kt([255,255,255]))).rgb();return new kt([].concat(tt(i),[this._rgb[3]]))}return an.apply(void 0,tt(this._rgb.slice(0,3)))};var an=function(t,e,n){return.2126*(t=on(t))+.7152*(e=on(e))+.0722*(n=on(n))},on=function(t){return(t/=255)<=.03928?t/12.92:rn((t+.055)/1.055,2.4)},un={},cn=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.5,r=(arguments.length<=3?void 0:arguments[3])||"lrgb";if(un[r]||!(arguments.length<=3)&&arguments.length-3||(r=Object.keys(un)[0]),!un[r])throw new Error("interpolation mode ".concat(r," is not defined"));return"object"!==ht(t)&&(t=new kt(t)),"object"!==ht(e)&&(e=new kt(e)),un[r](t,e,n).alpha(t.alpha()+n*(e.alpha()-t.alpha()))};kt.prototype.mix=kt.prototype.interpolate=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];return cn.apply(void 0,[this,t,e].concat(r))},kt.prototype.premultiply=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._rgb,n=e[3];return t?(this._rgb=[e[0]*n,e[1]*n,e[2]*n,n],this):new kt([e[0]*n,e[1]*n,e[2]*n,n],"rgb")},kt.prototype.saturate=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=this,n=e.lch();return n[1]+=fe*t,n[1]<0&&(n[1]=0),new kt(n,"lch").alpha(e.alpha(),!0)},kt.prototype.desaturate=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.saturate(-t)},kt.prototype.set=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t.split("."),a=K(r,2),i=a[0],o=a[1],u=this[i]();if(o){var c=i.indexOf(o)-("ok"===i.substr(0,2)?2:0);if(c>-1){if("string"==ht(e))switch(e.charAt(0)){case"+":case"-":u[c]+=+e;break;case"*":u[c]*=+e.substr(1);break;case"/":u[c]/=+e.substr(1);break;default:u[c]=+e}else{if("number"!==ht(e))throw new Error("unsupported value for Color.set");u[c]=e}var s=new kt(u,i);return n?(this._rgb=s._rgb,this):s}throw new Error("unknown channel ".concat(o," in mode ").concat(i))}return u},kt.prototype.tint=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.5,e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return cn.apply(void 0,[this,"white",t].concat(n))},kt.prototype.shade=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.5,e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return cn.apply(void 0,[this,"black",t].concat(n))};var sn=function(t,e,n){var r=t._rgb,a=e._rgb;return new kt(r[0]+n*(a[0]-r[0]),r[1]+n*(a[1]-r[1]),r[2]+n*(a[2]-r[2]),"rgb")};un.rgb=sn;var ln=Math.sqrt,fn=Math.pow,hn=function(t,e,n){var r=K(t._rgb,3),a=r[0],i=r[1],o=r[2],u=K(e._rgb,3),c=u[0],s=u[1],l=u[2];return new kt(ln(fn(a,2)*(1-n)+fn(c,2)*n),ln(fn(i,2)*(1-n)+fn(s,2)*n),ln(fn(o,2)*(1-n)+fn(l,2)*n),"rgb")};un.lrgb=hn;var dn=function(t,e,n){var r=t.lab(),a=e.lab();return new kt(r[0]+n*(a[0]-r[0]),r[1]+n*(a[1]-r[1]),r[2]+n*(a[2]-r[2]),"lab")};un.lab=dn;var pn=function(t,e,n,r){var a,i,o,u,c,s,l,f,h,d,p;if("hsl"===r?(a=t.hsl(),i=e.hsl()):"hsv"===r?(a=t.hsv(),i=e.hsv()):"hcg"===r?(a=t.hcg(),i=e.hcg()):"hsi"===r?(a=t.hsi(),i=e.hsi()):"lch"===r||"hcl"===r?(r="hcl",a=t.hcl(),i=e.hcl()):"oklch"===r&&(a=t.oklch().reverse(),i=e.oklch().reverse()),"h"===r.substr(0,1)||"oklch"===r){var v=K(a,3);o=v[0],c=v[1],l=v[2];var m=K(i,3);u=m[0],s=m[1],f=m[2]}return isNaN(o)||isNaN(u)?isNaN(o)?isNaN(u)?d=Number.NaN:(d=u,1!=l&&0!=l||"hsv"==r||(h=s)):(d=o,1!=f&&0!=f||"hsv"==r||(h=c)):d=o+n*(u>o&&u-o>180?u-(o+360):u<o&&o-u>180?u+360-o:u-o),void 0===h&&(h=c+n*(s-c)),p=l+n*(f-l),new kt("oklch"===r?[p,h,d]:[d,h,p],r)},vn=function(t,e,n){return pn(t,e,n,"lch")};un.lch=vn,un.hcl=vn;var mn=function(t,e,n){var r=t.num(),a=e.num();return new kt(r+n*(a-r),"num")};un.num=mn;var gn=function(t,e,n){return pn(t,e,n,"hcg")};un.hcg=gn;var yn=function(t,e,n){return pn(t,e,n,"hsi")};un.hsi=yn;var bn=function(t,e,n){return pn(t,e,n,"hsl")};un.hsl=bn;var _n=function(t,e,n){return pn(t,e,n,"hsv")};un.hsv=_n;var wn=function(t,e,n){var r=t.oklab(),a=e.oklab();return new kt(r[0]+n*(a[0]-r[0]),r[1]+n*(a[1]-r[1]),r[2]+n*(a[2]-r[2]),"oklab")};un.oklab=wn;var xn=function(t,e,n){return pn(t,e,n,"oklch")};un.oklch=xn;var Mn=Math.pow,kn=Math.sqrt,Cn=Math.PI,An=Math.cos,Tn=Math.sin,Sn=Math.atan2,On=function(t,e){for(var n=t.length,r=[0,0,0,0],a=0;a<t.length;a++){var i=t[a],o=e[a]/n,u=i._rgb;r[0]+=Mn(u[0],2)*o,r[1]+=Mn(u[1],2)*o,r[2]+=Mn(u[2],2)*o,r[3]+=u[3]*o}return r[0]=kn(r[0]),r[1]=kn(r[1]),r[2]=kn(r[2]),r[3]>.9999999&&(r[3]=1),new kt(ut(r))},Nn=Math.pow;function Pn(t){var e="rgb",n=At("#ccc"),r=0,a=[0,1],i=[],o=[0,0],u=!1,c=[],s=!1,l=0,f=1,h=!1,d={},p=!0,v=1,m=function(t){if((t=t||["#fff","#000"])&&"string"===ht(t)&&At.brewer&&At.brewer[t.toLowerCase()]&&(t=At.brewer[t.toLowerCase()]),"array"===ht(t)){1===t.length&&(t=[t[0],t[0]]),t=t.slice(0);for(var e=0;e<t.length;e++)t[e]=At(t[e]);i.length=0;for(var n=0;n<t.length;n++)i.push(n/(t.length-1))}return _(),c=t},g=function(t){return t},y=function(t){return t},b=function(t,r){var a,s;if(null==r&&(r=!1),isNaN(t)||null===t)return n;if(r)s=t;else if(u&&u.length>2){var h=function(t){if(null!=u){for(var e=u.length-1,n=0;n<e&&t>=u[n];)n++;return n-1}return 0}(t);s=h/(u.length-2)}else s=f!==l?(t-l)/(f-l):1;s=y(s),r||(s=g(s)),1!==v&&(s=Nn(s,v)),s=o[0]+s*(1-o[0]-o[1]),s=ot(s,0,1);var m=Math.floor(1e4*s);if(p&&d[m])a=d[m];else{if("array"===ht(c))for(var b=0;b<i.length;b++){var _=i[b];if(s<=_){a=c[b];break}if(s>=_&&b===i.length-1){a=c[b];break}if(s>_&&s<i[b+1]){s=(s-_)/(i[b+1]-_),a=At.interpolate(c[b],c[b+1],s,e);break}}else"function"===ht(c)&&(a=c(s));p&&(d[m]=a)}return a},_=function(){return d={}};m(t);var w=function(t){var e=At(b(t));return s&&e[s]?e[s]():e};return w.classes=function(t){if(null!=t){if("array"===ht(t))u=t,a=[t[0],t[t.length-1]];else{var e=At.analyze(a);u=0===t?[e.min,e.max]:At.limits(e,"e",t)}return w}return u},w.domain=function(t){if(!arguments.length)return a;l=t[0],f=t[t.length-1],i=[];var e=c.length;if(t.length===e&&l!==f)for(var n=0,r=Array.from(t);n<r.length;n++){var o=r[n];i.push((o-l)/(f-l))}else{for(var u=0;u<e;u++)i.push(u/(e-1));if(t.length>2){var s=t.map((function(e,n){return n/(t.length-1)})),h=t.map((function(t){return(t-l)/(f-l)}));h.every((function(t,e){return s[e]===t}))||(y=function(t){if(t<=0||t>=1)return t;for(var e=0;t>=h[e+1];)e++;var n=(t-h[e])/(h[e+1]-h[e]);return s[e]+n*(s[e+1]-s[e])})}}return a=[l,f],w},w.mode=function(t){return arguments.length?(e=t,_(),w):e},w.range=function(t,e){return m(t),w},w.out=function(t){return s=t,w},w.spread=function(t){return arguments.length?(r=t,w):r},w.correctLightness=function(t){return null==t&&(t=!0),h=t,_(),g=h?function(t){for(var e=b(0,!0).lab()[0],n=b(1,!0).lab()[0],r=e>n,a=b(t,!0).lab()[0],i=e+(n-e)*t,o=a-i,u=0,c=1,s=20;Math.abs(o)>.01&&s-- >0;)r&&(o*=-1),o<0?(u=t,t+=.5*(c-t)):(c=t,t+=.5*(u-t)),a=b(t,!0).lab()[0],o=a-i;return t}:function(t){return t},w},w.padding=function(t){return null!=t?("number"===ht(t)&&(t=[t,t]),o=t,w):o},w.colors=function(e,n){arguments.length<2&&(n="hex");var r=[];if(0===arguments.length)r=c.slice(0);else if(1===e)r=[w(.5)];else if(e>1){var i=a[0],o=a[1]-i;r=Dn(0,e,!1).map((function(t){return w(i+t/(e-1)*o)}))}else{t=[];var s=[];if(u&&u.length>2)for(var l=1,f=u.length,h=1<=f;h?l<f:l>f;h?l++:l--)s.push(.5*(u[l-1]+u[l]));else s=a;r=s.map((function(t){return w(t)}))}return At[n]&&(r=r.map((function(t){return t[n]()}))),r},w.cache=function(t){return null!=t?(p=t,w):p},w.gamma=function(t){return null!=t?(v=t,w):v},w.nodata=function(t){return null!=t?(n=At(t),w):n},w}function Dn(t,e,n){for(var r=[],a=t<e,i=n?a?e+1:e-1:e,o=t;a?o<i:o>i;a?o++:o--)r.push(o);return r}var In=function t(e,n,r){if(!t[r])throw new Error("unknown blend mode "+r);return t[r](e,n)},jn=function(t){return function(e,n){var r=At(n).rgb(),a=At(e).rgb();return At.rgb(t(r,a))}},Rn=function(t){return function(e,n){var r=[];return r[0]=t(e[0],n[0]),r[1]=t(e[1],n[1]),r[2]=t(e[2],n[2]),r}};In.normal=jn(Rn((function(t){return t}))),In.multiply=jn(Rn((function(t,e){return t*e/255}))),In.screen=jn(Rn((function(t,e){return 255*(1-(1-t/255)*(1-e/255))}))),In.overlay=jn(Rn((function(t,e){return e<128?2*t*e/255:255*(1-2*(1-t/255)*(1-e/255))}))),In.darken=jn(Rn((function(t,e){return t>e?e:t}))),In.lighten=jn(Rn((function(t,e){return t>e?t:e}))),In.dodge=jn(Rn((function(t,e){return 255===t||(t=e/255*255/(1-t/255))>255?255:t}))),In.burn=jn(Rn((function(t,e){return 255*(1-(1-e/255)/(t/255))})));var Ln=In,En=Math.pow,zn=Math.sin,Bn=Math.cos;var Qn=Math.floor,Fn=Math.random,qn=Math.log,Gn=Math.pow,Wn=Math.floor,Un=Math.abs;function Yn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===ht(t)&&(t=Object.values(t)),t.forEach((function(t){e&&"object"===ht(t)&&(t=t[e]),null==t||isNaN(t)||(n.values.push(t),n.sum+=t,t<n.min&&(n.min=t),t>n.max&&(n.max=t),n.count+=1)})),n.domain=[n.min,n.max],n.limits=function(t,e){return $n(n,t,e)},n}function $n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"equal",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7;"array"==ht(t)&&(t=Yn(t));var r=t,a=r.min,i=r.max,o=t.values.sort((function(t,e){return t-e}));if(1===n)return[a,i];var u=[];if("c"===e.substr(0,1)&&(u.push(a),u.push(i)),"e"===e.substr(0,1)){u.push(a);for(var c=1;c<n;c++)u.push(a+c/n*(i-a));u.push(i)}else if("l"===e.substr(0,1)){if(a<=0)throw new Error("Logarithmic scales are only possible for values > 0");var s=Math.LOG10E*qn(a),l=Math.LOG10E*qn(i);u.push(a);for(var f=1;f<n;f++)u.push(Gn(10,s+f/n*(l-s)));u.push(i)}else if("q"===e.substr(0,1)){u.push(a);for(var h=1;h<n;h++){var d=(o.length-1)*h/n,p=Wn(d);if(p===d)u.push(o[p]);else{var v=d-p;u.push(o[p]*(1-v)+o[p+1]*v)}}u.push(i)}else if("k"===e.substr(0,1)){var m,g=o.length,y=new Array(g),b=new Array(n),_=!0,w=0,x=null;(x=[]).push(a);for(var M=1;M<n;M++)x.push(a+M/n*(i-a));for(x.push(i);_;){for(var k=0;k<n;k++)b[k]=0;for(var C=0;C<g;C++)for(var A=o[C],T=Number.MAX_VALUE,S=void 0,O=0;O<n;O++){var N=Un(x[O]-A);N<T&&(T=N,S=O),b[S]++,y[C]=S}for(var P=new Array(n),D=0;D<n;D++)P[D]=null;for(var I=0;I<g;I++)null===P[m=y[I]]?P[m]=o[I]:P[m]+=o[I];for(var j=0;j<n;j++)P[j]*=1/b[j];_=!1;for(var R=0;R<n;R++)if(P[R]!==x[R]){_=!0;break}x=P,++w>200&&(_=!1)}for(var L={},E=0;E<n;E++)L[E]=[];for(var z=0;z<g;z++)L[m=y[z]].push(o[z]);for(var B=[],Q=0;Q<n;Q++)B.push(L[Q][0]),B.push(L[Q][L[Q].length-1]);B=B.sort((function(t,e){return t-e})),u.push(B[0]);for(var F=1;F<B.length;F+=2){var q=B[F];isNaN(q)||-1!==u.indexOf(q)||u.push(q)}}return u}var Hn=Math.sqrt,Vn=Math.pow,Jn=Math.min,Zn=Math.max,Kn=Math.atan2,Xn=Math.abs,tr=Math.cos,er=Math.sin,nr=Math.exp,rr=Math.PI;for(var ar={cool:function(){return Pn([At.hsl(180,1,.9),At.hsl(250,.7,.4)])},hot:function(){return Pn(["#000","#f00","#ff0","#fff"]).mode("rgb")}},ir={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},or=0,ur=Object.keys(ir);or<ur.length;or++){var cr=ur[or];ir[cr.toLowerCase()]=ir[cr]}var sr=ir;Object.assign(At,{average:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"lrgb",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=t.length;n||(n=Array.from(new Array(r)).map((function(){return 1})));var a=r/n.reduce((function(t,e){return t+e}));if(n.forEach((function(t,e){n[e]*=a})),t=t.map((function(t){return new kt(t)})),"lrgb"===e)return On(t,n);for(var i=t.shift(),o=i.get(e),u=[],c=0,s=0,l=0;l<o.length;l++)if(o[l]=(o[l]||0)*n[0],u.push(isNaN(o[l])?0:n[0]),"h"===e.charAt(l)&&!isNaN(o[l])){var f=o[l]/180*Cn;c+=An(f)*n[0],s+=Tn(f)*n[0]}var h=i.alpha()*n[0];t.forEach((function(t,r){var a=t.get(e);h+=t.alpha()*n[r+1];for(var i=0;i<o.length;i++)if(!isNaN(a[i]))if(u[i]+=n[r+1],"h"===e.charAt(i)){var l=a[i]/180*Cn;c+=An(l)*n[r+1],s+=Tn(l)*n[r+1]}else o[i]+=a[i]*n[r+1]}));for(var d=0;d<o.length;d++)if("h"===e.charAt(d)){for(var p=Sn(s/u[d],c/u[d])/Cn*180;p<0;)p+=360;for(;p>=360;)p-=360;o[d]=p}else o[d]=o[d]/u[d];return h/=r,new kt(o,e).alpha(h>.99999?1:h,!0)},bezier:function(t){var e=function(t){var e,n,r,a;if(2===(t=t.map((function(t){return new kt(t)}))).length){var i=t.map((function(t){return t.lab()})),o=K(i,2);n=o[0],r=o[1],e=function(t){var e=[0,1,2].map((function(e){return n[e]+t*(r[e]-n[e])}));return new kt(e,"lab")}}else if(3===t.length){var u=t.map((function(t){return t.lab()})),c=K(u,3);n=c[0],r=c[1],a=c[2],e=function(t){var e=[0,1,2].map((function(e){return(1-t)*(1-t)*n[e]+2*(1-t)*t*r[e]+t*t*a[e]}));return new kt(e,"lab")}}else if(4===t.length){var s,l=t.map((function(t){return t.lab()})),f=K(l,4);n=f[0],r=f[1],a=f[2],s=f[3],e=function(t){var e=[0,1,2].map((function(e){return(1-t)*(1-t)*(1-t)*n[e]+3*(1-t)*(1-t)*t*r[e]+3*(1-t)*t*t*a[e]+t*t*t*s[e]}));return new kt(e,"lab")}}else{if(!(t.length>=5))throw new RangeError("No point in running bezier with only one color.");var h,d,p;h=t.map((function(t){return t.lab()})),p=t.length-1,d=function(t){for(var e=[1,1],n=1;n<t;n++){for(var r=[1],a=1;a<=e.length;a++)r[a]=(e[a]||0)+e[a-1];e=r}return e}(p),e=function(t){var e=1-t,n=[0,1,2].map((function(n){return h.reduce((function(r,a,i){return r+d[i]*Math.pow(e,p-i)*Math.pow(t,i)*a[n]}),0)}));return new kt(n,"lab")}}return e}(t);return e.scale=function(){return Pn(e)},e},blend:Ln,cubehelix:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1.5,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[0,1],o=0;"array"===ht(i)?t=i[1]-i[0]:(t=0,i=[i,i]);var u=function(u){var c=yt*((e+120)/360+n*u),s=En(i[0]+t*u,a),l=(0!==o?r[0]+u*o:r)*s*(1-s)/2,f=Bn(c),h=zn(c);return At(ut([255*(s+l*(-.14861*f+1.78277*h)),255*(s+l*(-.29227*f-.90649*h)),255*(s+l*(1.97294*f)),1]))};return u.start=function(t){return null==t?e:(e=t,u)},u.rotations=function(t){return null==t?n:(n=t,u)},u.gamma=function(t){return null==t?a:(a=t,u)},u.hue=function(t){return null==t?r:("array"===ht(r=t)?0===(o=r[1]-r[0])&&(r=r[1]):o=0,u)},u.lightness=function(e){return null==e?i:("array"===ht(e)?(i=e,t=e[1]-e[0]):(i=[e,e],t=0),u)},u.scale=function(){return At.scale(u)},u.hue(r),u},mix:cn,interpolate:cn,random:function(){for(var t="#",e=0;e<6;e++)t+="0123456789abcdef".charAt(Qn(16*Fn()));return new kt(t,"hex")},scale:Pn,analyze:Yn,contrast:function(t,e){t=new kt(t),e=new kt(e);var n=t.luminance(),r=e.luminance();return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)},deltaE:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,i=function(t){return 360*t/(2*rr)},o=function(t){return 2*rr*t/360};t=new kt(t),e=new kt(e);var u=Array.from(t.lab()),c=K(u,3),s=c[0],l=c[1],f=c[2],h=Array.from(e.lab()),d=K(h,3),p=d[0],v=d[1],m=d[2],g=(s+p)/2,y=Hn(Vn(l,2)+Vn(f,2)),b=Hn(Vn(v,2)+Vn(m,2)),_=(y+b)/2,w=.5*(1-Hn(Vn(_,7)/(Vn(_,7)+Vn(25,7)))),x=l*(1+w),M=v*(1+w),k=Hn(Vn(x,2)+Vn(f,2)),C=Hn(Vn(M,2)+Vn(m,2)),A=(k+C)/2,T=i(Kn(f,x)),S=i(Kn(m,M)),O=T>=0?T:T+360,N=S>=0?S:S+360,P=Xn(O-N)>180?(O+N+360)/2:(O+N)/2,D=1-.17*tr(o(P-30))+.24*tr(o(2*P))+.32*tr(o(3*P+6))-.2*tr(o(4*P-63)),I=N-O;I=Xn(I)<=180?I:N<=O?I+360:I-360,I=2*Hn(k*C)*er(o(I)/2);var j=p-s,R=C-k,L=1+.015*Vn(g-50,2)/Hn(20+Vn(g-50,2)),E=1+.045*A,z=1+.015*A*D,B=30*nr(-Vn((P-275)/25,2)),Q=2*Hn(Vn(A,7)/(Vn(A,7)+Vn(25,7))),F=-Q*er(2*o(B)),q=Hn(Vn(j/(n*L),2)+Vn(R/(r*E),2)+Vn(I/(a*z),2)+F*(R/(r*E))*(I/(a*z)));return Zn(0,Jn(100,q))},distance:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"lab";t=new kt(t),e=new kt(e);var r=t.get(n),a=e.get(n),i=0;for(var o in r){var u=(r[o]||0)-(a[o]||0);i+=u*u}return Math.sqrt(i)},limits:$n,valid:function(){try{for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return at(kt,e),!0}catch(t){return!1}},scales:ar,input:xt,colors:ze,brewer:sr});var lr=At;function fr(t){return"continuous-scale"===t.type}function hr(t){return"matrix"===t.type}function dr(t){var e=t.value;return function(t){return!!lr.valid(t)}(e)?lr(e).hex():""}var pr={lab:{l:[0,100],a:[-86.185,98.254],b:[-107.863,94.482]},lch:{l:[0,100],c:[0,100],h:[0,360]},rgb:{r:[0,255],g:[0,255],b:[0,255]},rgba:{r:[0,255],g:[0,255],b:[0,255],a:[0,1]},hsl:{h:[0,360],s:[0,1],l:[0,1]},hsv:{h:[0,360],s:[0,1],v:[0,1]},hsi:{h:[0,360],s:[0,1],i:[0,1]},cmyk:{c:[0,1],m:[0,1],y:[0,1],k:[0,1]}};var vr=function(t){var e=t.value;return function(t){return!!lr.valid(t)}(e)?lr(e):lr("#000")},mr=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.model,n=vr(t);return n?n[e]():[0,0,0]},gr=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4===t.length?"rgba":"rgb",n={};if(1===t.length)for(var r=X()(t,1),a=r[0],i=0;i<e.length;i+=1)n[e[i]]=a;else for(var o=0;o<e.length;o+=1)n[e[o]]=t[o];return{model:e,value:n}};function yr(t){var e=mr(t,"rgb"),n=X()(e,3),r=n[0],a=n[1],i=n[2];return Math.round(.299*r+.587*a+.114*i)}function br(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return 1===e?{model:"rgb",value:{r:t,g:t,b:t}}:{model:"rgba",value:{r:t,g:t,b:t,a:e}}}function _r(t){if(/^(#|0x)?[0-9a-fA-F]{3}$/.test(t)||/^(#|0x)?[0-9a-fA-F]{6}$/.test(t)){var e=lr(t).rgb();return gr(e,"rgb")}if(/^(#|0x)?[0-9a-fA-F]{4}$/.test(t)||/^(#|0x)?[0-9a-fA-F]{8}$/.test(t)){var n=lr(t).rgba();return gr(n,"rgba")}return{model:"rgb",value:{r:0,g:0,b:0}}}var wr=function(t,e){return t*e/255},xr=function(t,e){return t+e-t*e/255},Mr=function(t,e){return t<128?wr(2*t,e):xr(2*t-255,e)},kr={normal:function(t){return t},darken:function(t,e){return Math.min(t,e)},multiply:wr,colorBurn:function(t,e){return 0===t?0:Math.max(0,255*(1-(255-e)/t))},lighten:function(t,e){return Math.max(t,e)},screen:xr,colorDodge:function(t,e){return 255===t?255:Math.min(255,e/(255-t)*255)},overlay:function(t,e){return Mr(e,t)},softLight:function(t,e){return t<128?e-(1-2*t/255)*e*(1-e/255):e+255*(2*t/255-1)*((e<64?e/255*(e/255*(e/255*16-12)+4):Math.sqrt(e/255))-e/255)},hardLight:Mr,difference:function(t,e){return Math.abs(t-e)},exclusion:function(t,e){return t+e-2*t*e/255},linearBurn:function(t,e){return Math.max(t+e-255,0)},linearDodge:function(t,e){return Math.min(255,t+e)},linearLight:function(t,e){return Math.max(e+2*t-255,0)},vividLight:function(t,e){return t<128?255*(1-(1-e/255)/(2*t/255)):e/2/(255-t)*255},pinLight:function(t,e){return t<128?Math.min(e,2*t):Math.max(e,2*t-255)}},Cr=function(t){return.3*t[0]+.58*t[1]+.11*t[2]},Ar=function(t,e){var n=e-Cr(t);return function(t){var e=Cr(t),n=Math.min.apply(Math,et()(t)),r=Math.max.apply(Math,et()(t)),a=et()(t);return n<0&&(a=a.map((function(t){return e+(t-e)*e/(e-n)}))),r>255&&(a=a.map((function(t){return e+(t-e)*(255-e)/(r-e)}))),a}(t.map((function(t){return t+n})))},Tr=function(t){return Math.max.apply(Math,et()(t))-Math.min.apply(Math,et()(t))},Sr=function(t,e){var n=t.map((function(t,e){return{value:t,index:e}}));n.sort((function(t,e){return t.value-e.value}));var r=n[0].index,a=n[1].index,i=n[2].index,o=et()(t);return o[i]>o[r]?(o[a]=(o[a]-o[r])*e/(o[i]-o[r]),o[i]=e):(o[a]=0,o[i]=0),o[r]=0,o},Or={hue:function(t,e){return Ar(Sr(t,Tr(e)),Cr(e))},saturation:function(t,e){return Ar(Sr(e,Tr(t)),Cr(e))},color:function(t,e){return Ar(t,Cr(e))},luminosity:function(t,e){return Ar(e,Cr(t))}},Nr=function(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"normal",a=mr(t,"rgba"),i=X()(a,4),o=i[0],u=i[1],c=i[2],s=i[3],l=mr(e,"rgba"),f=X()(l,4),h=f[0],d=f[1],p=f[2],v=f[3],m=[o,u,c],g=[h,d,p];if(rt.includes(r)){var y=kr[r];n=m.map((function(t,e){return Math.floor(y(t,g[e]))}))}else n=Or[r](m,g);var b=s+v*(1-s),_=Math.round((s*(1-v)*o+s*v*n[0]+(1-s)*v*h)/b),w=Math.round((s*(1-v)*u+s*v*n[1]+(1-s)*v*d)/b),x=Math.round((s*(1-v)*c+s*v*n[2]+(1-s)*v*p)/b);return 1===b?{model:"rgb",value:{r:_,g:w,b:x}}:{model:"rgba",value:{r:_,g:w,b:x,a:b}}},Pr=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=Math.min(t,e),r=Math.max(t,e);return n+Math.random()*(r-n)},Dr=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=Math.ceil(Math.min(t,e)),r=Math.floor(Math.max(t,e));return Math.floor(n+Math.random()*(r-n+1))},Ir=function t(e){if(e&&"object"===E()(e)){if(Array.isArray(e))return e.map((function(e){return t(e)}));var n={};return Object.keys(e).forEach((function(r){n[r]=t(e[r])})),n}return e},jr=function(t,e){var n=(t+e)%360;return n<0?n+=360:n>=360&&(n-=360),n};function Rr(t){return t*(Math.PI/180)}var Lr=n(3042),Er=n.n(Lr);var zr=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"normal";if("normal"===e)return f()({},t);var n=dr(t),r=Er()[e](n);return _r(r)},Br=function(t){var e=yr(t),n=mr(t,"rgba"),r=X()(n,4)[3];return br(e,void 0===r?1:r)};function Qr(t,e){for(var n,r=mr(e,"lab"),a=X()(r,3),i=a[1],o=a[2],u=mr(e,"rgba"),c=X()(u,4)[3],s=void 0===c?1:c,l=100*t,h=Math.round(l),d=yr(gr([h,i,o],"lab")),p=25;Math.round(l)!==Math.round(d/255*100)&&p>0;)l>d/255*100?h+=1:h-=1,p-=1,d=yr(gr([h,i,o],"lab"));if(Math.round(l)<Math.round(d/255*100)&&(h-=1),1===s)n=gr([h,i,o],"lab");else{var v=mr(gr([h,i,o],"lab"),"rgb");n=gr([].concat(et()(v),[s]),"rgba")}return f()(f()({},e),n)}var Fr=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"normal";return"grayscale"===e?Br(t):zr(t,e)},qr=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[Dr(5,10),Dr(90,95)],r=mr(t,"lab"),a=X()(r,3),i=a[0],o=a[1],u=a[2],c=i<=15?i:n[0],s=i>=85?i:n[1],l=(s-c)/(e-1),f=Math.ceil((i-c)/l);return l=0===f?l:(i-c)/f,new Array(e).fill(0).map((function(t,e){return gr([l*e+c,o,u],"lab")}))},Gr=function(t){var e=t.count,n=t.color,r="tint"===t.tendency,a=qr(n,e);return{name:"monochromatic",semantic:null,type:"discrete-scale",colors:r?a:a.reverse()}},Wr={model:"rgb",value:{r:0,g:0,b:0}},Ur={model:"rgb",value:{r:255,g:255,b:255}},Yr=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"lab";return lr.distance(vr(t),vr(e),n)},$r=function(t,e){var n=Math.atan2(t,e)*(180/Math.PI);return n>=0?n:n+360},Hr=function(t,e){var n,r=mr(t,"lab"),a=X()(r,3),i=a[0],o=a[1],u=a[2],c=mr(e,"lab"),s=X()(c,3),l=s[0],f=s[1],h=s[2],d=(Math.sqrt(Math.pow(o,2)+Math.pow(u,2))+Math.sqrt(Math.pow(f,2)+Math.pow(h,2)))/2,p=.5*(1-Math.sqrt(Math.pow(d,7)/(Math.pow(d,7)+Math.pow(25,7)))),v=(1+p)*o,m=(1+p)*f,g=Math.sqrt(Math.pow(v,2)+Math.pow(u,2)),y=Math.sqrt(Math.pow(m,2)+Math.pow(h,2)),b=$r(u,v),_=$r(h,m),w=l-i,x=y-g;n=Math.abs(_-b)<=180?_-b:_-b<-180?_-b+360:_-b-360;var M,k=2*Math.sqrt(g*y)*Math.sin(Rr(n)/2);M=Math.abs(b-_)<=180?(b+_)/2:Math.abs(b-_)>180&&b+_<360?(b+_+360)/2:(b+_-360)/2;var C=(i+l)/2,A=(g+y)/2,T=1-.17*Math.cos(Rr(M-30))+.24*Math.cos(Rr(2*M))+.32*Math.cos(Rr(3*M+6))-.2*Math.cos(Rr(4*M-63)),S=1+.015*Math.pow(C-50,2)/Math.sqrt(20+Math.pow(C-50,2)),O=1+.045*A,N=1+.015*A*T,P=-2*Math.sqrt(Math.pow(A,7)/(Math.pow(A,7)+Math.pow(25,7)))*Math.sin(Rr(60*Math.exp(-Math.pow((M-275)/25,2))));return Math.sqrt(Math.pow(w/(1*S),2)+Math.pow(x/(1*O),2)+Math.pow(k/(1*N),2)+P*(x/(1*O))*(k/(1*N)))},Vr=function(t){var e=t/255;return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)},Jr=function(t){var e=mr(t),n=X()(e,3),r=n[0],a=n[1],i=n[2];return.2126*Vr(r)+.7152*Vr(a)+.0722*Vr(i)},Zr=function(t,e){var n=Jr(t),r=Jr(e);return r>n?(r+.05)/(n+.05):(n+.05)/(r+.05)},Kr=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{measure:"euclidean"},r=n.measure,a=void 0===r?"euclidean":r,i=n.backgroundColor,o=void 0===i?nt:i,u=Nr(t,o),c=Nr(e,o);switch(a){case"CIEDE2000":return Hr(u,c);case"euclidean":return Yr(u,c,n.colorModel);case"contrastRatio":return Zr(u,c);default:return Yr(u,c)}},Xr=[.8,1.2],ta={rouletteWheel:function(t){for(var e=t.reduce((function(t,e){return t+e})),n=0,r=Pr(e),a=0,i=0;i<t.length;i+=1)r<(a+=t[i])&&(n=+i);return n},tournament:function(t){for(var e=-1,n=0,r=0;r<3;r+=1){var a=Dr(t.length-1);t[a]>n&&(e=r,n=t[a])}return e}},ea=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"tournament";return ta[e](t)},na=function(t,e){for(var n=Ir(t),r=Ir(e),a=1;a<t.length;a+=2)n[a]=e[a],r[a]=t[a];return[n,r]},ra=function(t,e,n,r){var a=Ir(t),i=e[Dr(e.length-1)],o=Dr(t[0].length-1),u=a[i][o]*Pr.apply(void 0,Xr),c=[15,240];"grayscale"!==n&&(c=pr[r][r.split("")[o]]);var s=c,l=X()(s,2),f=l[0],h=l[1];return u<f?u=f:u>h&&(u=h),a[i][o]=u,a},aa=function(t,e,n,r,a,i){var o;o="grayscale"===n?t.map((function(t){return br(X()(t,1)[0])})):t.map((function(t){return Fr(gr(t,r),n)}));for(var u=1/0,c=0;c<o.length;c+=1)for(var s=c+1;s<o.length;s+=1)e[c]&&e[s]||(u=Math.min(u,Kr(o[c],o[s],{measure:a,backgroundColor:i})));return u},ia=function(t,e,n,r,a,i,o){if(Math.round(aa(t,e,n,a,i,o))>r)return t;for(var u=new Array(t.length).fill(0).map((function(t,e){return e})).filter((function(t,n){return!e[n]})),c=new Array(50).fill(0).map((function(){return ra(t,u,n,a)})),s=c.map((function(t){return aa(t,e,n,a,i,o)})),l=Math.max.apply(Math,et()(s)),f=c[s.findIndex((function(t){return t===l}))],h=1,d=function(){for(var t=[f],r=1;r<50;r+=2){var d=c[ea(s)],p=c[ea(s)],v=Pr()<.9?na(d,p):[d,p];v=v.map((function(t){return Pr()<.1?ra(t,u,n,a):t})),t.push.apply(t,et()(v))}s=(c=t).map((function(t){return aa(t,e,n,a,i,o)}));var m=Math.max.apply(Math,et()(s));l=m,f=c[s.findIndex((function(t){return t===m}))],h+=1};h<100&&Math.round(l)<r;)d();return f},oa={euclidean:30,CIEDE2000:20,contrastRatio:4.5},ua={euclidean:291.48,CIEDE2000:100,contrastRatio:21},ca=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.locked,r=void 0===n?[]:n,a=e.simulationType,i=void 0===a?"normal":a,o=e.threshold,u=e.colorModel,c=void 0===u?"hsv":u,s=e.colorDifferenceMeasure,l=void 0===s?"euclidean":s,f=e.backgroundColor,h=void 0===f?nt:f,d=o;if(d||(d=oa[l]),"grayscale"===i){var p=ua[l];d=Math.min(d,p/t.colors.length)}var v=Ir(t);if(!hr(v)&&!fr(v))if("grayscale"===i){var m=v.colors.map((function(t){return[yr(t)]})),g=ia(m,r,i,d,c,l,h);v.colors.forEach((function(t,e){return Object.assign(t,Qr(g[e][0]/255,t))}))}else{var y=v.colors.map((function(t){return mr(t,c)})),b=ia(y,r,i,d,c,l,h);v.colors.forEach((function(t,e){Object.assign(t,gr(b[e],c))}))}return v},sa=[.3,.9],la=[.5,1],fa=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=mr(t,"hsv"),i=X()(a,1),o=i[0],u=new Array(n).fill(!1),c=-1===r.findIndex((function(e){return e&&e.model===t.model&&e.value===t.value})),s=new Array(n).fill(0).map((function(n,a){var i=r[a];return i?(u[a]=!0,i):c?(c=!1,u[a]=!0,t):gr([jr(o,e*a),Pr.apply(void 0,sa),Pr.apply(void 0,la)],"hsv")}));return{newColors:s,locked:u}};function ha(){var t=Dr(255),e=Dr(255),n=Dr(255);return gr([t,e,n],"rgb")}var da=function(t){var e=t.count,n=t.colors,r=[],a={name:"random",semantic:null,type:"categorical",colors:new Array(e).fill(0).map((function(t,e){var a=n[e];return a?(r[e]=!0,a):ha()}))};return ca(a,{locked:r})},pa=["monochromatic"],va=function(t,e){var n=e.count,r=void 0===n?8:n,a=e.tendency,i=void 0===a?"tint":a,o=e.colors,u=void 0===o?[]:o,c=e.color;return c||(c=u.find((function(t){return!!t&&!!t.model&&!!t.value}))||ha()),pa.includes(t)&&(u=[]),{color:c,colors:u,count:r,tendency:i}},ma={monochromatic:Gr,analogous:function(t){var e=t.count,n=t.color,r="tint"===t.tendency,a=mr(n,"hsv"),i=X()(a,3),o=i[0],u=i[1],c=i[2],s=Math.floor(e/2),l=60/(e-1);o>=60&&o<=240&&(l=-l);var f=(u-.1)/3/(e-s-1),h=(c-.4)/3/s,d=new Array(e).fill(0).map((function(t,e){var n=jr(o,l*(e-s)),r=e<=s?Math.min(u+f*(s-e),1):u+3*f*(s-e),a=e<=s?c-3*h*(s-e):Math.min(c-h*(s-e),1);return gr([n,r,a],"hsv")}));return{name:"analogous",semantic:null,type:"discrete-scale",colors:r?d:d.reverse()}},achromatic:function(t){var e=t.tendency,n=f()(f()({},t),{},{color:"tint"===e?Wr:Ur}),r=Gr(n);return f()(f()({},r),{},{name:"achromatic"})},complementary:function(t){var e,n=t.count,r=t.color,a=mr(r,"hsv"),i=X()(a,3),o=i[0],u=i[1],c=i[2],s=gr([jr(o,180),u,c],"hsv"),l=Dr(80,90),f=Dr(15,25),h=Math.floor(n/2),d=qr(r,h,[f,l]),p=qr(s,h,[f,l]).reverse();if(n%2==1){var v=gr([(jr(o,180)+o)/2,Pr(.05,.1),Pr(.9,.95)],"hsv");e=[].concat(et()(d),[v],et()(p))}else e=[].concat(et()(d),et()(p));return{name:"complementary",semantic:null,type:"discrete-scale",colors:e}},"split-complementary":function(t){var e=t.count,n=t.color,r=t.colors,a=fa(n,180,e,r),i=a.newColors,o=a.locked;return ca({name:"tetradic",semantic:null,type:"categorical",colors:i},{locked:o})},triadic:function(t){var e=t.count,n=t.color,r=t.colors,a=fa(n,120,e,r),i=a.newColors,o=a.locked;return ca({name:"tetradic",semantic:null,type:"categorical",colors:i},{locked:o})},tetradic:function(t){var e=t.count,n=t.color,r=t.colors,a=fa(n,90,e,r),i=a.newColors,o=a.locked;return ca({name:"tetradic",semantic:null,type:"categorical",colors:i},{locked:o})},polychromatic:function(t){var e=t.count,n=t.color,r=t.colors,a=fa(n,360/e,e,r),i=a.newColors,o=a.locked;return ca({name:"tetradic",semantic:null,type:"categorical",colors:i},{locked:o})},customized:da},ga=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"monochromatic",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=va(t,e);try{return ma[t](n)}catch(t){return da(n)}};n(9558),n(9989),n(6646);var ya={}.toString,ba=function(t,e){return ya.call(t)==="[object ".concat(e,"]")},_a=function(t){if(!function(t){return"object"===E()(t)&&null!==t}(t)||!ba(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e};function wa(t,e,n,r){var a=n||0,i=r||5,o=t;Object.keys(e).forEach((function(t){if(Object.prototype.hasOwnProperty.call(e,t)){var n=e[t];null!==n&&_a(n)?(_a(o[t])||(o[t]={}),a<i?wa(o[t],n,a+1,i):o[t]=e[t]):!function(t){return Array.isArray?Array.isArray(t):ba(t,"Array")}(n)?void 0!==n&&(o[t]=n):(o[t]=[],o[t]=o[t].concat(n))}}))}var xa=function(t){for(var e=0;e<(arguments.length<=1?0:arguments.length-1);e+=1)wa(t,e+1<1||arguments.length<=e+1?void 0:arguments[e+1]);return t},Ma=n(3708),ka=n(1438),Ca=n(2616),Aa=function(t){return null===t},Ta=function(t,e){return Aa(t.distinct)||Aa(e.distinct)?t.distinct<e.distinct?1:t.distinct>e.distinct?-1:0:0};function Sa(t){return[t.find((function(t){return h(t.levelOfMeasurements,["Nominal"])})),t.find((function(t){return h(t.levelOfMeasurements,["Interval"])}))]}function Oa(t){return[t.find((function(t){return y(t.levelOfMeasurements,["Time","Ordinal"])})),t.find((function(t){return h(t.levelOfMeasurements,["Interval"])})),t.find((function(t){return h(t.levelOfMeasurements,["Nominal"])}))]}function Na(t){var e=t.find((function(t){return y(t.levelOfMeasurements,["Time","Ordinal"])})),n=t.find((function(t){return h(t.levelOfMeasurements,["Nominal"])}));return[e,t.find((function(t){return h(t.levelOfMeasurements,["Interval"])})),n]}function Pa(t){var e=t.filter((function(t){return h(t.levelOfMeasurements,["Nominal"])})).sort(Ta),n=e[0],r=e[1];return[t.find((function(t){return h(t.levelOfMeasurements,["Interval"])})),n,r]}function Da(t){var e,n,r,a,i=t.filter((function(t){return h(t.levelOfMeasurements,["Nominal"])})).sort(Ta);if((0,ka.Js)(null===(e=i[1])||void 0===e?void 0:e.rawData,null===(n=i[0])||void 0===n?void 0:n.rawData)){var o=X()(i,2);a=o[0],r=o[1]}else{var u=X()(i,2);r=u[0],a=u[1]}return[r,t.find((function(t){return h(t.levelOfMeasurements,["Interval"])})),a]}function Ia(t,e,n,r){if(!Ma.Sx.includes(t)&&r)return r.toSpec?r.toSpec(e,n):null;switch(t){case"pie_chart":return function(t,e){var n=Sa(e),r=X()(n,2),a=r[0],i=r[1];return i&&a?{type:"interval",data:t,encode:{color:a.name,y:i.name},transform:[{type:"stackY"}],coordinate:{type:"theta"}}:null}(e,n);case"donut_chart":return function(t,e){var n=Sa(e),r=X()(n,2),a=r[0],i=r[1];return i&&a?{type:"interval",data:t,encode:{color:a.name,y:i.name},transform:[{type:"stackY"}],coordinate:{type:"theta",innerRadius:.6}}:null}(e,n);case"line_chart":return function(t,e){var n=Oa(e),r=X()(n,3),a=r[0],i=r[1],o=r[2];if(!a||!i)return null;var u={type:"line",data:t,encode:{x:a.name,y:i.name}};return o&&(u.encode.color=o.name),u}(e,n);case"step_line_chart":return function(t,e){var n=Oa(e),r=X()(n,3),a=r[0],i=r[1],o=r[2];if(!a||!i)return null;var u={type:"line",data:t,encode:{x:a.name,y:i.name,shape:"hvh"}};return o&&(u.encode.color=o.name),u}(e,n);case"area_chart":return function(t,e){var n=e.find((function(t){return y(t.levelOfMeasurements,["Time","Ordinal"])})),r=e.find((function(t){return h(t.levelOfMeasurements,["Interval"])}));return n&&r?{type:"area",data:t,encode:{x:n.name,y:r.name}}:null}(e,n);case"stacked_area_chart":return function(t,e){var n=Na(e),r=X()(n,3),a=r[0],i=r[1],o=r[2];return a&&i&&o?{type:"area",data:t,encode:{x:a.name,y:i.name,color:o.name},transform:[{type:"stackY"}]}:null}(e,n);case"percent_stacked_area_chart":return function(t,e){var n=Na(e),r=X()(n,3),a=r[0],i=r[1],o=r[2];return a&&i&&o?{type:"area",data:t,encode:{x:a.name,y:i.name,color:o.name},transform:[{type:"stackY"},{type:"normalizeY"}]}:null}(e,n);case"bar_chart":return function(t,e){var n=Pa(e),r=X()(n,3),a=r[0],i=r[1],o=r[2];if(!a||!i)return null;var u={type:"interval",data:t,encode:{x:i.name,y:a.name},coordinate:{transform:[{type:"transpose"}]}};return o&&(u.encode.color=o.name,u.transform=[{type:"stackY"}]),u}(e,n);case"grouped_bar_chart":return function(t,e){var n=Pa(e),r=X()(n,3),a=r[0],i=r[1],o=r[2];return a&&i&&o?{type:"interval",data:t,encode:{x:i.name,y:a.name,color:o.name},transform:[{type:"dodgeX"}],coordinate:{transform:[{type:"transpose"}]}}:null}(e,n);case"stacked_bar_chart":return function(t,e){var n=Pa(e),r=X()(n,3),a=r[0],i=r[1],o=r[2];return a&&i&&o?{type:"interval",data:t,encode:{x:i.name,y:a.name,color:o.name},transform:[{type:"stackY"}],coordinate:{transform:[{type:"transpose"}]}}:null}(e,n);case"percent_stacked_bar_chart":return function(t,e){var n=Pa(e),r=X()(n,3),a=r[0],i=r[1],o=r[2];return a&&i&&o?{type:"interval",data:t,encode:{x:i.name,y:a.name,color:o.name},transform:[{type:"stackY"},{type:"normalizeY"}],coordinate:{transform:[{type:"transpose"}]}}:null}(e,n);case"column_chart":return function(t,e){var n=e.filter((function(t){return h(t.levelOfMeasurements,["Nominal"])})).sort(Ta),r=n[0],a=n[1],i=e.find((function(t){return h(t.levelOfMeasurements,["Interval"])}));if(!r||!i)return null;var o={type:"interval",data:t,encode:{x:r.name,y:i.name}};return a&&(o.encode.color=a.name,o.transform=[{type:"stackY"}]),o}(e,n);case"grouped_column_chart":return function(t,e){var n=Da(e),r=X()(n,3),a=r[0],i=r[1],o=r[2];return a&&i&&o?{type:"interval",data:t,encode:{x:a.name,y:i.name,color:o.name},transform:[{type:"dodgeX"}]}:null}(e,n);case"stacked_column_chart":return function(t,e){var n=Da(e),r=X()(n,3),a=r[0],i=r[1],o=r[2];return a&&i&&o?{type:"interval",data:t,encode:{x:a.name,y:i.name,color:o.name},transform:[{type:"stackY"}]}:null}(e,n);case"percent_stacked_column_chart":return function(t,e){var n=Da(e),r=X()(n,3),a=r[0],i=r[1],o=r[2];return a&&i&&o?{type:"interval",data:t,encode:{x:a.name,y:i.name,color:o.name},transform:[{type:"stackY"},{type:"normalizeY"}]}:null}(e,n);case"scatter_plot":return function(t,e){var n=e.filter((function(t){return h(t.levelOfMeasurements,["Interval"])})).sort(Ta),r=n[0],a=n[1],i=e.find((function(t){return h(t.levelOfMeasurements,["Nominal"])}));if(!r||!a)return null;var o={type:"point",data:t,encode:{x:r.name,y:a.name}};return i&&(o.encode.color=i.name),o}(e,n);case"bubble_chart":return function(t,e){for(var n=e.filter((function(t){return h(t.levelOfMeasurements,["Interval"])})),r={x:n[0],y:n[1],corr:0,size:n[2]},a=function(t){for(var e=function(e){var a=(0,Ca.Vs)(n[t].rawData,n[e].rawData);Math.abs(a)>r.corr&&(r.x=n[t],r.y=n[e],r.corr=a,r.size=n[et()(Array(n.length).keys()).find((function(n){return n!==t&&n!==e}))||0])},a=t+1;a<n.length;a+=1)e(a)},i=0;i<n.length;i+=1)a(i);var o=r.x,u=r.y,c=r.size,s=e.find((function(t){return y(t.levelOfMeasurements,["Nominal"])}));if(!o||!u||!c)return null;var l={type:"point",data:t,encode:{x:o.name,y:u.name,size:c.name}};return s&&(l.encode.color=s.name),l}(e,n);case"histogram":return function(t,e){var n=e.find((function(t){return h(t.levelOfMeasurements,["Interval"])}));return n?{type:"rect",data:t,encode:{x:n.name},transform:[{type:"binX",y:"count"}]}:null}(e,n);case"heatmap":return function(t,e){var n=e.filter((function(t){return y(t.levelOfMeasurements,["Nominal","Ordinal"])})).sort(Ta),r=n[0],a=n[1],i=e.find((function(t){return h(t.levelOfMeasurements,["Interval"])}));return r&&a&&i?{type:"cell",data:t,encode:{x:r.name,y:a.name,color:i.name}}:null}(e,n);default:return null}}var ja=["monochromatic","analogous"],Ra=["polychromatic","split-complementary","triadic","tetradic"];function La(t,e,n,r,a,i,o){var u=void 0!==(null==i?void 0:i.refine)&&i.refine,c=a,s=null==i?void 0:i.theme,l=void 0===(null==i?void 0:i.requireSpec)||i.requireSpec,f=n,h=Object.keys(f),d=[],p=h.map((function(a){var l=function(t,e,n,r,a){var i=[],o={dataProps:n,chartType:t,purpose:a?a.purpose:"",preferences:a?a.preferences:void 0},u=w(t,e,r,"HARD",o,i);return 0===u?{chartType:t,score:0,log:i}:{chartType:t,score:u*w(t,e,r,"SOFT",o,i),log:i}}(a,f,e,r,i);d.push(l);var h=l.score;if(h<=0)return{type:a,spec:null,score:h};var p=Ia(a,t,e,n[a]);if(!["kpi_panel","table"].includes(a)&&!p)return{type:a,spec:null,score:h};if(p&&u){var v=function(t,e,n,r){return Object.values(n).filter((function(r){var a;return"DESIGN"===r.type&&r.trigger({dataProps:e,chartType:t})&&!(null!==(a=n[r.id].option)&&void 0!==a&&a.off)})).reduce((function(t,n){var a=n.optimizer(e,r);return xa(t,a)}),{})}(a,e,r,p);xa(p,v)}if(p)if(s&&!c){var m=function(t,e,n){var r=G(e),a=n.primaryColor,i=r.encode;if(a&&i){var o=_r(a);if(i.color){var u,c,s=i.color,l=s.type,f=s.field;c="quantitative"===l?ja[Math.floor(Math.random()*ja.length)]:Ra[Math.floor(Math.random()*Ra.length)];var h=null===(u=t.find((function(t){return t.name===f})))||void 0===u?void 0:u.count;return{scale:{color:{range:ga(c,{color:o,count:h}).colors.map((function(t){return dr(t)}))}}}}return"line"===e.type?{style:{stroke:dr(o)}}:{style:{fill:dr(o)}}}return{}}(e,p,s);xa(p,m)}else if(c){var g,y=null!==(g=null==o?void 0:o.themeColor)&&void 0!==g?g:"#678ef2",b=null==o?void 0:o.colorSchemeType,_=null==o?void 0:o.simulationType,x=function(t,e,n,r,a){var i=G(e).encode;if(n&&i){var o=_r(n);if(i.color){var u,c=i.color,s=c.type,l=c.field,f=r;f||(f="quantitative"===s?"monochromatic":"polychromatic");var h=null===(u=t.find((function(t){return t.name===l})))||void 0===u?void 0:u.count;return{scale:{color:{range:ga(f,{color:o,count:h}).colors.map((function(t){return dr(a?Fr(t,a):t)}))}}}}return"line"===e.type?{style:{stroke:dr(o)}}:{style:{fill:dr(o)}}}return{}}(e,p,y,b,_);xa(p,x)}return{type:a,spec:p,score:h}}));return{advices:p.filter((function(t){return t.score>0&&(!l||t.spec)})).sort((function(t,e){return t.score<e.score?1:t.score>e.score?-1:0})),log:d}}function Ea(t,e,n){var r=t.data,a=t.dataProps,i=t.smartColor,o=t.options,u=t.colorOptions,c=t.fields;try{var s=Z(r),l=function(t,e,n){var r=(e?new J.Z(t,{columns:e}):new J.Z(t)).info();return n?r.map((function(t){var e=n.find((function(e){return e.name===t.name}));return f()(f()({},t),e)})):r}(s,c,a);return La(c?s.map((function(t){var e=t;return Object.keys(e).forEach((function(t){c.includes(t)||delete e[t]})),t})):s,l,e,n,i,o,u)}catch(t){return console.error("error: ",t),{advices:[],log:[]}}}function za(t,e,n,r,a,i,o){Object.values(t).filter((function(t){var r,a=t.option||{},o=a.weight,u=a.extra;return function(t){return"DESIGN"===e?"DESIGN"===t:"DESIGN"!==t}(t.type)&&!(null!==(r=t.option)&&void 0!==r&&r.off)&&t.trigger(f()(f()(f()({},n),{},{weight:o},u),{},{chartWIKI:i}))})).forEach((function(t){var u,c=t.type,s=t.id,l=t.docs;if("DESIGN"===e){var h=t.optimizer(n.dataProps,o);u=0===Object.keys(h).length?1:0,a.push({type:c,id:s,score:u,fix:h,docs:l})}else{var d=t.option||{},p=d.weight,v=d.extra;u=t.validator(f()(f()(f()({},n),{},{weight:p},v),{},{chartWIKI:i})),a.push({type:c,id:s,score:u,docs:l})}r.push({phase:"LINT",ruleId:s,score:u,base:u,weight:1,ruleType:c})}))}function Ba(t,e,n){var r=t.spec,a=t.options,i=t.dataProps,o=null==a?void 0:a.purpose,u=null==a?void 0:a.preferences,c=function(t){var e,n=t;switch(n.type){case"area":e=function(t){var e=t.transform,n=null==e?void 0:e.some((function(t){return"stackY"===t.type})),r=null==e?void 0:e.some((function(t){return"normalizeY"===t.type}));return n?r?"percent_stacked_area_chart":"stacked_area_chart":"area_chart"}(n);break;case"interval":e=function(t){var e,n=t.coordinate;if("theta"===(null==n?void 0:n.type))return null!=n&&n.innerRadius?"donut_chart":"pie_chart";var r=t.transform,a=null==n||null===(e=n.transform)||void 0===e?void 0:e.some((function(t){return"transpose"===t.type})),i=null==r?void 0:r.some((function(t){return"normalizeY"===t.type})),o=null==r?void 0:r.some((function(t){return"stackY"===t.type})),u=null==r?void 0:r.some((function(t){return"dodgeX"===t.type}));return a?u?"grouped_bar_chart":i?"stacked_bar_chart":o?"percent_stacked_bar_chart":"bar_chart":u?"grouped_column_chart":i?"stacked_column_chart":o?"percent_stacked_column_chart":"column_chart"}(n);break;case"line":e=function(t){var e=t.encode;return e.shape&&"hvh"===e.shape?"step_line_chart":"line_chart"}(n);break;case"point":e=function(t){return t.encode.size?"bubble_chart":"scatter_plot"}(n);break;case"rect":e="histogram";break;case"cell":e="heatmap";break;default:e=""}return e}(r),s=[],l=[];if(!r||!c)return{lints:s,log:l};if(!i||!i.length)try{i=new J.Z(r.data).info()}catch(t){return console.error("error: ",t),{lints:s,log:l}}var f={dataProps:i,chartType:c,purpose:o,preferences:u};return za(e,"notDESIGN",f,l,s,n),za(e,"DESIGN",f,l,s,n,r),{lints:s=s.filter((function(t){return t.score<1})),log:l}}var Qa=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a()(this,t),c()(this,"ckb",void 0),c()(this,"ruleBase",void 0),this.ckb=(0,s.n)(e.ckbCfg),this.ruleBase=V(e.ruleCfg)}return o()(t,[{key:"advise",value:function(t){return Ea(t,this.ckb,this.ruleBase).advices}},{key:"adviseWithLog",value:function(t){return Ea(t,this.ckb,this.ruleBase)}},{key:"lint",value:function(t){return Ba(t,this.ruleBase,this.ckb).lints}},{key:"lintWithLog",value:function(t){return Ba(t,this.ruleBase,this.ckb)}}]),t}()},9105:function(t,e,n){"use strict";n.d(e,{n:function(){return u}});var r=n(1448),a=n.n(r),i={line_chart:{id:"line_chart",name:"Line Chart",alias:["Lines"],family:["LineCharts"],def:"A line chart uses lines with segments to show changes in data in a ordinal dimension.",purpose:["Comparison","Trend","Anomaly"],coord:["Cartesian2D"],category:["Statistic"],shape:["Lines"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Time","Ordinal"]},{minQty:0,maxQty:1,fieldConditions:["Nominal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Position","Direction"],recRate:"Recommended"},step_line_chart:{id:"step_line_chart",name:"Step Line Chart",alias:["Step Lines"],family:["LineCharts"],def:"A step line chart is a line chart in which points of each line are connected by horizontal and vertical line segments, looking like steps of a staircase.",purpose:["Comparison","Trend"],coord:["Cartesian2D"],category:["Statistic"],shape:["Lines"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Time","Ordinal"]},{minQty:0,maxQty:1,fieldConditions:["Nominal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Position","Direction"],recRate:"Recommended"},area_chart:{id:"area_chart",name:"Area Chart",alias:[],family:["AreaCharts"],def:"An area chart uses series of line segments with overlapped areas to show the change in data in a ordinal dimension.",purpose:["Comparison","Trend","Anomaly"],coord:["Cartesian2D"],category:["Statistic"],shape:["Area"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Time","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]},{minQty:0,maxQty:1,fieldConditions:["Nominal"]}],channel:["Color","Position"],recRate:"Recommended"},stacked_area_chart:{id:"stacked_area_chart",name:"Stacked Area Chart",alias:[],family:["AreaCharts"],def:"A stacked area chart uses layered line segments with different styles of padding regions to display how multiple sets of data change in the same ordinal dimension, and the endpoint heights of the segments on the same dimension tick are accumulated by value.",purpose:["Composition","Trend"],coord:["Cartesian2D"],category:["Statistic"],shape:["Area"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Time","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]},{minQty:1,maxQty:1,fieldConditions:["Nominal"]}],channel:["Color","Length"],recRate:"Recommended"},percent_stacked_area_chart:{id:"percent_stacked_area_chart",name:"Percent Stacked Area Chart",alias:["Percent Stacked Area","% Stacked Area","100% Stacked Area"],family:["AreaCharts"],def:"A percent stacked area chart is an extented stacked area chart in which the height of the endpoints of the line segment on the same dimension tick is the accumulated proportion of the ratio, which is 100% of the total.",purpose:["Comparison","Composition","Proportion","Trend"],coord:["Cartesian2D"],category:["Statistic"],shape:["Area"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Time","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]},{minQty:1,maxQty:1,fieldConditions:["Nominal"]}],channel:["Color","Length"],recRate:"Recommended"},column_chart:{id:"column_chart",name:"Column Chart",alias:["Columns"],family:["ColumnCharts"],def:"A column chart uses series of columns to display the value of the dimension. The horizontal axis shows the classification dimension and the vertical axis shows the corresponding value.",purpose:["Comparison","Distribution","Rank"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:1,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Position","Color"],recRate:"Recommended"},grouped_column_chart:{id:"grouped_column_chart",name:"Grouped Column Chart",alias:["Grouped Column"],family:["ColumnCharts"],def:"A grouped column chart uses columns of different colors to form a group to display the values of dimensions. The horizontal axis indicates the grouping of categories, the color indicates the categories, and the vertical axis shows the corresponding value.",purpose:["Comparison","Distribution","Rank"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Position"],recRate:"Recommended"},stacked_column_chart:{id:"stacked_column_chart",name:"Stacked Column Chart",alias:["Stacked Column"],family:["ColumnCharts"],def:"A stacked column chart uses stacked bars of different colors to display the values for each dimension. The horizontal axis indicates the first classification dimension, the color indicates the second classification dimension, and the vertical axis shows the corresponding value.",purpose:["Comparison","Composition","Distribution","Rank"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Length","Position"],recRate:"Recommended"},percent_stacked_column_chart:{id:"percent_stacked_column_chart",name:"Percent Stacked Column Chart",alias:["Percent Stacked Column","% Stacked Column","100% Stacked Column"],family:["ColumnCharts"],def:"A percent stacked column chart uses stacked bars of different colors to display the values for each dimension. The horizontal axis indicates the first classification dimension, the color indicates the second classification dimension, and the vertical axis shows the percentage of the corresponding classification.",purpose:["Comparison","Composition","Distribution","Proportion"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Length"],recRate:"Recommended"},range_column_chart:{id:"range_column_chart",name:"Range Column Chart",alias:[],family:["ColumnCharts"],def:"A column chart that does not have to start from zero axis.",purpose:["Comparison"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Interval","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Nominal"]}],channel:["Length"],recRate:"Recommended"},waterfall_chart:{id:"waterfall_chart",name:"Waterfall Chart",alias:["Flying Bricks Chart","Mario Chart","Bridge Chart","Cascade Chart"],family:["ColumnCharts"],def:"A waterfall chart is used to portray how an initial value is affected by a series of intermediate positive or negative values",purpose:["Comparison","Trend"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Ordinal","Time","Nominal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Length","Position"],recRate:"Recommended"},histogram:{id:"histogram",name:"Histogram",alias:[],family:["ColumnCharts"],def:"A histogram is an accurate representation of the distribution of numerical data.",purpose:["Distribution"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Position"],recRate:"Recommended"},bar_chart:{id:"bar_chart",name:"Bar Chart",alias:["Bars"],family:["BarCharts"],def:"A bar chart uses series of bars to display the value of the dimension. The vertical axis shows the classification dimension and the horizontal axis shows the corresponding value.",purpose:["Comparison","Distribution","Rank"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:1,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Position","Color"],recRate:"Recommended"},stacked_bar_chart:{id:"stacked_bar_chart",name:"Stacked Bar Chart",alias:["Stacked Bar"],family:["BarCharts"],def:"A stacked bar chart uses stacked bars of different colors to display the values for each dimension. The vertical axis indicates the first classification dimension, the color indicates the second classification dimension, and the horizontal axis shows the corresponding value.",purpose:["Comparison","Composition","Distribution","Rank"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Length","Position"],recRate:"Recommended"},percent_stacked_bar_chart:{id:"percent_stacked_bar_chart",name:"Percent Stacked Bar Chart",alias:["Percent Stacked Bar","% Stacked Bar","100% Stacked Bar"],family:["BarCharts"],def:"A percent stacked column chart uses stacked bars of different colors to display the values for each dimension. The vertical axis indicates the first classification dimension, the color indicates the second classification dimension, and the horizontal axis shows the percentage of the corresponding classification.",purpose:["Comparison","Composition","Distribution","Proportion"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Length"],recRate:"Recommended"},grouped_bar_chart:{id:"grouped_bar_chart",name:"Grouped Bar Chart",alias:["Grouped Bar"],family:["BarCharts"],def:"A grouped bar chart uses bars of different colors to form a group to display the values of the dimensions. The vertical axis indicates the grouping of categories, the color indicates the categories, and the horizontal axis shows the corresponding value.",purpose:["Comparison","Distribution","Rank"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Position"],recRate:"Recommended"},range_bar_chart:{id:"range_bar_chart",name:"Range Bar Chart",alias:[],family:["BarCharts"],def:"A bar chart that does not have to start from zero axis.",purpose:["Comparison"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Interval"]},{minQty:1,maxQty:1,fieldConditions:["Nominal","Ordinal"]}],channel:["Length"],recRate:"Recommended"},radial_bar_chart:{id:"radial_bar_chart",name:"Radial Bar Chart",alias:["Radial Column Chart"],family:["BarCharts"],def:"A bar chart that is plotted in the polar coordinate system. The axis along radius shows the classification dimension and the angle shows the corresponding value.",purpose:["Comparison","Distribution","Rank"],coord:["Polar"],category:["Statistic"],shape:["Round"],dataPres:[{minQty:1,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Angle","Color"],recRate:"Recommended"},bullet_chart:{id:"bullet_chart",name:"Bullet Chart",alias:[],family:["BarCharts"],def:"A bullet graph is a variation of a bar graph developed by Stephen Few. Seemingly inspired by the traditional thermometer charts and progress bars found in many dashboards, the bullet graph serves as a replacement for dashboard gauges and meters.",purpose:["Proportion"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:3,maxQty:3,fieldConditions:["Interval"]},{minQty:1,maxQty:1,fieldConditions:["Nominal","Ordinal"]}],channel:["Position","Color"],recRate:"Recommended"},pie_chart:{id:"pie_chart",name:"Pie Chart",alias:["Circle Chart","Pie"],family:["PieCharts"],def:"A pie chart is a chart that the classification and proportion of data are represented by the color and arc length (angle, area) of the sector.",purpose:["Comparison","Composition","Proportion"],coord:["Polar"],category:["Statistic"],shape:["Round"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Angle","Area","Color"],recRate:"Use with Caution"},donut_chart:{id:"donut_chart",name:"Donut Chart",alias:["Donut","Doughnut","Doughnut Chart","Ring Chart"],family:["PieCharts"],def:"A donut chart is a variation on a Pie chart except it has a round hole in the center which makes it look like a donut.",purpose:["Comparison","Composition","Proportion"],coord:["Polar"],category:["Statistic"],shape:["Round"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["ArcLength"],recRate:"Recommended"},nested_pie_chart:{id:"nested_pie_chart",name:"Nested Pie Chart",alias:["Nested Circle Chart","Nested Pie","Nested Donut Chart"],family:["PieCharts"],def:"A nested pie chart is a chart that contains several donut charts, where all the donut charts share the same center in position.",purpose:["Comparison","Composition","Proportion"],coord:["Polar"],category:["Statistic"],shape:["Round"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:"*",fieldConditions:["Interval"]}],channel:["Angle","Area","Color","Position"],recRate:"Use with Caution"},rose_chart:{id:"rose_chart",name:"Rose Chart",alias:["Nightingale Chart","Polar Area Chart","Coxcomb Chart"],family:["PieCharts"],def:"Nightingale Rose Chart is a peculiar combination of the Radar Chart and Stacked Column Chart types of data visualization.",purpose:["Comparison","Composition","Proportion"],coord:["Polar"],category:["Statistic"],shape:["Round"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Angle","Color","Length"],recRate:"Use with Caution"},scatter_plot:{id:"scatter_plot",name:"Scatter Plot",alias:["Scatter Chart","Scatterplot"],family:["ScatterCharts"],def:"A scatter plot is a type of plot or mathematical diagram using Cartesian coordinates to display values for typically two variables for series of data.",purpose:["Comparison","Distribution","Anomaly"],coord:["Cartesian2D"],category:["Statistic"],shape:["Scatter"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Interval"]},{minQty:0,maxQty:1,fieldConditions:["Nominal"]}],channel:["Color","Position"],recRate:"Recommended"},bubble_chart:{id:"bubble_chart",name:"Bubble Chart",alias:["Bubble Chart"],family:["ScatterCharts"],def:"A bubble chart is a type of chart that displays four dimensions of data with x, y positions, circle size and circle color.",purpose:["Comparison","Distribution"],coord:["Cartesian2D"],category:["Statistic"],shape:["Scatter"],dataPres:[{minQty:3,maxQty:3,fieldConditions:["Interval"]},{minQty:0,maxQty:1,fieldConditions:["Nominal"]}],channel:["Color","Position","Size"],recRate:"Recommended"},non_ribbon_chord_diagram:{id:"non_ribbon_chord_diagram",name:"Non-Ribbon Chord Diagram",alias:[],family:["GeneralGraph"],def:"A stripped-down version of a Chord Diagram, with only the connection lines showing. This provides more emphasis on the connections within the data.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},arc_diagram:{id:"arc_diagram",name:"Arc Diagram",alias:[],family:["GeneralGraph"],def:"A graph where the edges are represented as arcs.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},chord_diagram:{id:"chord_diagram",name:"Chord Diagram",alias:[],family:["GeneralGraph"],def:"A graphical method of displaying the inter-relationships between data in a matrix. The data are arranged radially around a circle with the relationships between the data points typically drawn as arcs connecting the data.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},treemap:{id:"treemap",name:"Treemap",alias:[],family:["TreeGraph"],def:"A visual representation of a data tree with nodes. Each node is displayed as a rectangle, sized and colored according to values that you assign.",purpose:["Composition","Comparison","Hierarchy"],coord:["Cartesian2D"],category:["Statistic"],shape:["Square"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Area"],recRate:"Recommended"},sankey_diagram:{id:"sankey_diagram",name:"Sankey Diagram",alias:[],family:["GeneralGraph"],def:"A graph shows the flows with weights between objects.",purpose:["Flow","Trend","Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},funnel_chart:{id:"funnel_chart",name:"Funnel Chart",alias:[],family:["FunnelCharts"],def:"A funnel chart is often used to represent stages in a sales process and show the amount of potential revenue for each stage.",purpose:["Trend"],coord:["SymmetricCartesian"],category:["Statistic"],shape:["Symmetric"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Length"],recRate:"Recommended"},mirror_funnel_chart:{id:"mirror_funnel_chart",name:"Mirror Funnel Chart",alias:["Contrast Funnel Chart"],family:["FunnelCharts"],def:"A mirror funnel chart is a funnel chart divided into two series by a central axis.",purpose:["Comparison","Trend"],coord:["SymmetricCartesian"],category:["Statistic"],shape:["Symmetric"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]},{minQty:1,maxQty:1,fieldConditions:["Nominal"]}],channel:["Color","Length","Direction"],recRate:"Recommended"},box_plot:{id:"box_plot",name:"Box Plot",alias:["Box and Whisker Plot","boxplot"],family:["BarCharts"],def:"A box plot is often used to graphically depict groups of numerical data through their quartiles. Box plots may also have lines extending from the boxes indicating variability outside the upper and lower quartiles. Outliers may be plotted as individual points.",purpose:["Distribution","Anomaly"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Position"],recRate:"Recommended"},heatmap:{id:"heatmap",name:"Heatmap",alias:[],family:["HeatmapCharts"],def:"A heatmap is a graphical representation of data where the individual values contained in a matrix are represented as colors.",purpose:["Distribution"],coord:["Cartesian2D"],category:["Statistic"],shape:["Square"],dataPres:[{minQty:2,maxQty:2,fieldConditions:["Nominal","Ordinal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Position"],recRate:"Recommended"},density_heatmap:{id:"density_heatmap",name:"Density Heatmap",alias:["Heatmap"],family:["HeatmapCharts"],def:"A density heatmap is a heatmap for representing the density of dots.",purpose:["Distribution"],coord:["Cartesian2D"],category:["Statistic"],shape:["Area"],dataPres:[{minQty:3,maxQty:3,fieldConditions:["Interval"]}],channel:["Color","Position","Area"],recRate:"Recommended"},radar_chart:{id:"radar_chart",name:"Radar Chart",alias:["Web Chart","Spider Chart","Star Chart","Cobweb Chart","Irregular Polygon","Kiviat diagram"],family:["RadarCharts"],def:"A radar chart maps series of data volume of multiple dimensions onto the axes. Starting at the same center point, usually ending at the edge of the circle, connecting the same set of points using lines.",purpose:["Comparison"],coord:["Radar"],category:["Statistic"],shape:["Round"],dataPres:[{minQty:1,maxQty:2,fieldConditions:["Nominal"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Color","Position"],recRate:"Recommended"},wordcloud:{id:"wordcloud",name:"Word Cloud",alias:["Wordle","Tag Cloud","Text Cloud"],family:["Others"],def:"A word cloud is a collection, or cluster, of words depicted in different sizes, colors, and shapes, which takes a piece of text as input. Typically, the font size in the word cloud is encoded as the word frequency in the input text.",purpose:["Proportion"],coord:["Cartesian2D"],category:["Diagram"],shape:["Scatter"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Nominal"]},{minQty:0,maxQty:1,fieldConditions:["Interval"]}],channel:["Size","Position","Color"],recRate:"Recommended"},candlestick_chart:{id:"candlestick_chart",name:"Candlestick Chart",alias:["Japanese Candlestick Chart)"],family:["BarCharts"],def:"A candlestick chart is a specific version of box plot, which is a style of financial chart used to describe price movements of a security, derivative, or currency.",purpose:["Trend","Distribution"],coord:["Cartesian2D"],category:["Statistic"],shape:["Bars"],dataPres:[{minQty:1,maxQty:1,fieldConditions:["Time"]},{minQty:1,maxQty:1,fieldConditions:["Interval"]}],channel:["Position"],recRate:"Recommended"},compact_box_tree:{id:"compact_box_tree",name:"CompactBox Tree",alias:[],family:["TreeGraph"],def:"A type of tree graph layout which arranges the nodes with same depth on the same level.",purpose:["Relation","Hierarchy"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},dendrogram:{id:"dendrogram",name:"Dendrogram",alias:[],family:["TreeGraph"],def:"A type of tree graph layout which arranges the leaves on the same level.",purpose:["Relation","Hierarchy"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},indented_tree:{id:"indented_tree",name:"Indented Tree Layout",alias:[],family:["TreeGraph"],def:"A type of tree graph layout where the hierarchy of tree is represented by the horizontal indentation, and each element will occupy one row/column. It is commonly used to represent the file directory structure.",purpose:["Relation","Hierarchy"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},radial_tree:{id:"radial_tree",name:"Radial Tree Layout",alias:[],family:["TreeGraph"],def:"A type of tree graph layout which places the root at the center, and the branches around the root radially.",purpose:["Relation","Hierarchy"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},flow_diagram:{id:"flow_diagram",name:"Flow Diagram",alias:["Dagre Graph Layout","Dagre","Flow Chart"],family:["GeneralGraph"],def:"Directed flow graph.",purpose:["Relation","Flow"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},fruchterman_layout_graph:{id:"fruchterman_layout_graph",name:"Fruchterman Graph Layout",alias:[],family:["GeneralGraph"],def:"A type of force directed graph layout.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},force_directed_layout_graph:{id:"force_directed_layout_graph",name:"Force Directed Graph Layout",alias:[],family:["GeneralGraph"],def:"The classical force directed graph layout.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},fa2_layout_graph:{id:"fa2_layout_graph",name:"Force Atlas 2 Graph Layout",alias:["FA2 Layout"],family:["GeneralGraph"],def:"A type of force directed graph layout algorithm. It focuses more on the degree of the node when calculating the force than the classical force-directed algorithm .",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},mds_layout_graph:{id:"mds_layout_graph",name:"Multi-Dimensional Scaling Layout",alias:["MDS Layout"],family:["GeneralGraph"],def:"A type of dimension reduction algorithm that could be used for calculating graph layout. MDS (Multidimensional scaling) is used for project high dimensional data onto low dimensional space.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},circular_layout_graph:{id:"circular_layout_graph",name:"Circular Graph Layout",alias:[],family:["GeneralGraph"],def:"A type of graph layout which arranges all the nodes on a circle.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},spiral_layout_graph:{id:"spiral_layout_graph",name:"Spiral Graph Layout",alias:[],family:["GeneralGraph"],def:"A type of graph layout which arranges all the nodes along a spiral line.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},radial_layout_graph:{id:"radial_layout_graph",name:"Radial Graph Layout",alias:[],family:["GeneralGraph"],def:"A type of graph layout which places a focus node on the center and the others on the concentrics centered at the focus node according to the shortest path length to the it.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},concentric_layout_graph:{id:"concentric_layout_graph",name:"Concentric Graph Layout",alias:[],family:["GeneralGraph"],def:"A type of graph layout which arranges the nodes on concentrics.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"},grid_layout_graph:{id:"grid_layout_graph",name:"Grid Graph Layout",alias:[],family:["GeneralGraph"],def:"A type of graph layout arranges the nodes on grids.",purpose:["Relation"],coord:["Cartesian2D"],category:["Graph"],shape:["Network"],dataPres:[{minQty:1,maxQty:"*",fieldConditions:["Nominal"]}],channel:["Color","Size","Opacity","Stroke","LineWidth"],recRate:"Recommended"}};function o(){return JSON.parse(JSON.stringify(i))}function u(t){var e=o();return t?function(t,e){var n=t,r=e.exclude,i=e.include,o=e.custom;return r&&r.forEach((function(t){Object.keys(n).includes(t)&&delete n[t]})),i&&Object.keys(n).forEach((function(t){i.includes(t)||delete n[t]})),a()(a()({},n),o)}(e,t):e}},3708:function(t,e,n){"use strict";n.d(e,{HS:function(){return c},Kp:function(){return i},Sx:function(){return r},X1:function(){return f},io:function(){return o},kB:function(){return u},oW:function(){return a},pD:function(){return l},qm:function(){return s}});var r=["line_chart","step_line_chart","area_chart","stacked_area_chart","percent_stacked_area_chart","column_chart","grouped_column_chart","stacked_column_chart","percent_stacked_column_chart","range_column_chart","waterfall_chart","histogram","bar_chart","stacked_bar_chart","percent_stacked_bar_chart","grouped_bar_chart","range_bar_chart","radial_bar_chart","bullet_chart","pie_chart","donut_chart","nested_pie_chart","rose_chart","scatter_plot","bubble_chart","non_ribbon_chord_diagram","arc_diagram","chord_diagram","treemap","sankey_diagram","funnel_chart","mirror_funnel_chart","box_plot","heatmap","density_heatmap","radar_chart","wordcloud","candlestick_chart","compact_box_tree","dendrogram","indented_tree","radial_tree","flow_diagram","fruchterman_layout_graph","force_directed_layout_graph","fa2_layout_graph","mds_layout_graph","circular_layout_graph","spiral_layout_graph","radial_layout_graph","concentric_layout_graph","grid_layout_graph"],a=["LineCharts","ColumnCharts","BarCharts","PieCharts","AreaCharts","ScatterCharts","FunnelCharts","HeatmapCharts","RadarCharts","TreeGraph","GeneralGraph","PolygonLayer","LineLayer","PointLayer","HeatmapLayer","Table","Others"],i=["Comparison","Trend","Distribution","Rank","Proportion","Composition","Relation","Hierarchy","Flow","Spatial","Anomaly","Value"],o=["NumberLine","Cartesian2D","SymmetricCartesian","Cartesian3D","Polar","NodeLink","Radar","Geo","Other"],u=["Statistic","Diagram","Graph","Map","Other"],c=["Lines","Bars","Round","Square","Area","Scatter","Symmetric","Network","Map","Other"],s=["Nominal","Ordinal","Interval","Discrete","Continuous","Time"],l=["Position","Length","Color","Area","Angle","ArcLength","Direction","Size","Opacity","Stroke","LineWidth","Lightness"],f=["Recommended","Use with Caution","Not Recommended"]},5706:function(t,e,n){"use strict";n.d(e,{N:function(){return a}});var r={"zh-CN":{concepts:{family:{LineCharts:"折线图类",ColumnCharts:"柱状图类",BarCharts:"条形图类",PieCharts:"饼图类",AreaCharts:"面积图类",ScatterCharts:"散点图类",FunnelCharts:"漏斗图类",HeatmapCharts:"热力图类",RadarCharts:"雷达图类",TreeGraph:"树形关系类",GeneralGraph:"关系图类",PointLayer:"点图层类",LineLayer:"线图层类",PolygonLayer:"面图层类",HeatmapLayer:"地图热力图类",Others:"其他类",Table:"表格类"},category:{Statistic:"统计图表",Diagram:"示意图",Graph:"关系图",Map:"地图",Other:"其他"},purpose:{Comparison:"比较",Trend:"趋势",Distribution:"分布",Rank:"排名",Proportion:"占比",Composition:"组成",Relation:"关系",Hierarchy:"层级",Flow:"流向",Spatial:"空间",Anomaly:"异常",Value:"数值"},coord:{NumberLine:"数轴",Cartesian2D:"二维直角坐标系",SymmetricCartesian:"对称直角坐标系",Cartesian3D:"三维直角坐标系",Polar:"极坐标系",NodeLink:"点线关系网络",Radar:"雷达型坐标系",Geo:"地理坐标系",Other:"其他"},shape:{Lines:"线形",Bars:"条形",Round:"圆形",Square:"方形",Area:"面形",Scatter:"散点形",Symmetric:"对称形",Network:"网络形",Map:"地图",Other:"其他"},channel:{Position:"位置",Length:"长度",Color:"颜色",Area:"面积",Angle:"角度",ArcLength:"弧长",Direction:"方向",Size:"大小",Opacity:"透明度",Stroke:"线色",LineWidth:"线粗",Lightness:"亮度"},lom:{Continuous:"连续",Discrete:"离散",Interval:"数值",Nominal:"无序名词",Ordinal:"有序名词",Time:"时间"},recRate:{Recommended:"推荐","Use with Caution":"慎用","Not Recommended":"不推荐"}},chartTypes:{line_chart:{name:"折线图",alias:["折线图","线图"],def:"使用折线的线段显示数据在一个具有顺序性的维度上的变化。"},step_line_chart:{name:"阶梯图",alias:["阶梯线"],def:"折线根据分类字段分为多根在 x 方向(时间)的信息是完全一致、颜色及 y 方向(变量)信息不一致的折线,通常用作同一时间区间内多个变量发展趋势的对比。"},area_chart:{name:"面积图",alias:[],def:"使用带填充区域的线段显示数据在一个具有顺序性的维度上的变化。"},stacked_area_chart:{name:"堆叠面积图",alias:[],def:"使用带不同样式的填充区域的层叠线段来显示多组数据在同一个具有顺序性的维度上的变化,线段在同一维度值上的端点高度按照数值累加。"},percent_stacked_area_chart:{name:"百分比堆叠面积图",alias:["%堆叠面积图","100%堆叠面积图"],def:"一种特殊的堆叠面积图,线段在同一维度值上的端点高度代表值在其中的占比,占比总和为百分之百。"},column_chart:{name:"柱状图",alias:["柱形图"],def:"使用柱形显示维度的数值。横轴显示分类维度,纵轴显示相应的值。"},grouped_column_chart:{name:"分组柱状图",alias:["簇状柱状图"],def:"使用颜色不同的柱形并排组成小组来显示各维度的数值。横轴标示出分组,颜色标示出分类,纵轴显示相应的值。"},stacked_column_chart:{name:"堆叠柱状图",alias:[],def:"使用颜色不同的堆叠的柱形来显示各维度的数值。横轴标示出第一个分类维度,颜色标示出第二个分类维度,纵轴显示相应的值。"},percent_stacked_column_chart:{name:"百分比堆叠柱状图",alias:["%堆叠柱状图","100%堆叠柱状图"],def:"使用颜色不同的堆叠的柱形来显示各维度的数值。横轴标示出第一个分类维度,颜色标示出第二个分类维度,纵轴显示相应分类所占的百分比。"},range_column_chart:{name:"值域柱状图",alias:[],def:"值域柱状图是一种特殊的柱状图,柱子不一定要从 0 开始,而是用柱子长度表示一个从起始值到终止值的区间。"},waterfall_chart:{name:"瀑布图",alias:["桥图"],def:"瀑布图形似瀑布流水,采用绝对值与相对值结合的方式,适用于表达数个特定数值之间的数量变化关系。"},histogram:{name:"直方图",alias:[],def:"直方图是一种统计报告图,由一系列高度不等的纵向条纹或线段表示数据分布的情况。"},bar_chart:{name:"条形图",alias:["条状图"],def:"使用条形显示维度的数值。纵轴显示分类维度,横轴显示相应的值。"},grouped_bar_chart:{name:"分组条形图",alias:["簇状条形图"],def:"使用颜色不同的条形并排组成小组来显示维度的数值。纵轴标示出分组,颜色标示出分类,横轴显示相应的值。"},stacked_bar_chart:{name:"堆叠条形图",alias:[],def:"使用颜色不同的堆叠的条形来显示各维度的数值。纵轴标示出第一个分类维度,颜色标示出第二个分类维度,横轴显示相应的值。"},percent_stacked_bar_chart:{name:"百分比堆叠条形图",alias:["%堆叠条形图","100%堆叠条形图"],def:"使用颜色不同的堆叠的条形来显示各维度的数值。纵轴标示出第一个分类维度,颜色标示出第二个分类维度,横轴显示相应分类所占的百分比。"},range_bar_chart:{name:"值域条形图",alias:[],def:"值域条形图是一种特殊的条形图,条不一定要从 0 开始,而是用长度表示一个从起始值到终止值的区间。"},radial_bar_chart:{name:"径向条形图",alias:["环形条形图","环形柱状图","玉珏图"],def:"径向条形图是一种在极坐标系下绘制的条形图。径向条形图沿半径方向展示分类维度,使用角度来反应数值。"},bullet_chart:{name:"子弹图",alias:["靶心图","标靶图"],def:"子弹图可用于将度量的绩效可视化并与目标值和定性刻度。"},pie_chart:{name:"饼图",alias:[],def:"通过扇形区块的颜色和弧长(角度、面积)来展现数据的分类和占比情况。"},donut_chart:{name:"环图",alias:["甜甜圈图"],def:"通过弧形区块的颜色和弧长来展现数据的分类和占比情况。"},nested_pie_chart:{name:"嵌套饼图",alias:["嵌套环图","嵌套甜甜圈图"],def:"嵌套饼图由多个甜甜圈图构成,所有的甜甜圈共享同一个圆心。"},rose_chart:{name:"玫瑰图",alias:["南丁格尔图","鸡冠花图","极坐标面积图"],def:"统计学家和医学改革家佛罗伦萨‧南丁格尔在克里米亚战争期间创造了这种图表。尽管外形很像饼图,但本质上来说,南丁格尔玫瑰图更像在极坐标下绘制的柱状图或堆叠柱状图。只不过,它用半径来反映数值。"},scatter_plot:{name:"散点图",alias:[],def:"散点图是将所有的数据以不同颜色的点的形式展现在平面直角坐标系上的统计图表。"},bubble_chart:{name:"气泡图",alias:[],def:"气泡图是一种多变量的统计图表,由笛卡尔坐标系(直角坐标系)和大小不一、颜色不同的圆组成,可以看作是散点图的变形。"},treemap:{name:"树图",alias:["矩形树图"],def:"树图是一个由不同大小的嵌套式矩形来显示树状结构数据的统计图表。"},funnel_chart:{name:"漏斗图",alias:[],def:"漏斗图,形如“漏斗”,用于单流程分析,在开始和结束之间由N个流程环节组成。"},mirror_funnel_chart:{name:"对比漏斗图",alias:["对称漏斗图","镜像漏斗图"],def:"对比漏斗图是两个独立的漏斗图以一根中轴线对称展开的图表形式。"},box_plot:{name:"箱形图",alias:["箱线图","盒须图","盒式图","盒状图"],def:"箱形图是一种用作显示一组数据分散情况的统计图表,因形状如箱子而得名。箱子的顶端和底端分别代表上下四分位数,箱子中间的线代表中位数。从箱子延伸出去的线条展现出了上下四分位数以外的数据。有时,箱形图上也会出现个别的点,这代表离群值,也可称之为异常值。"},heatmap:{name:"热力图",alias:["区块热力图"],def:"热力图,是一种通过对色块着色来显示数据的统计图表。"},density_heatmap:{name:"密度热力图",alias:["热力图"],def:"密度热力图是一种用在连续坐标系上用色点展现密度分布的统计图表。"},radar_chart:{name:"雷达图",alias:["蛛网图"],def:"将不同系列的多个维度的数据量映射到坐标轴上,这些坐标轴起始于同一个圆心点,通常结束于圆周边缘,将同一组的点使用线连接起来,用颜色区分系列。"},wordcloud:{name:"词云",alias:["文字云","标签云"],def:"词云是由一组零散分布的,具有不同大小、颜色、和形状的词语组成的文本可视化形式,通常,一个词云中的词语是从一段有主题的文章中抽取出来的,字体的大小跟词语在原文中出现的频率相匹配。"},candlestick_chart:{name:"蜡烛图",alias:["烛台图","日本蜡烛图"],def:"蜡烛图是一种特殊的箱型图,在金融行业中有着广泛的应用:一般用来描述股票、期货等金融产品的价格走势。"},compact_box_tree:{name:"紧凑树",alias:[],def:"紧凑树是一种树图布局,从根节点开始,同一深度的节点在同一层。适合于脑图等应用场景。"},dendrogram:{name:"生态树",alias:[],def:"生态树是一种树图布局,不管数据的深度多少,总是叶节点对齐。常用于表示层次聚类。"},indented_tree:{name:"缩进树",alias:[],def:"缩进树是一种树图布局,树节点的层级通过水平方向的缩进量来表示,每个元素会占一行或一列。常用于表示文件目录结构。"},radial_tree:{name:"辐射树",alias:[],def:"辐射树是一种树图布局,根节点位于辐射树中心,其他分支辐射式展开。"},flow_diagram:{name:"流程图",alias:["有向图","层次布局图"],def:"流程图是一种图解,可视表示在过程或功能内部诸如事件、步骤等之间的顺序关系。"},fruchterman_layout_graph:{name:"Fruchterman 布局力导向图",alias:[],def:"一种使用 Fruchterman 布局算法的力导向图。"},force_directed_layout_graph:{name:"力导向图",alias:[],def:"力导向图布局作为较早被发明的一种实际应用布局算法,经过研究者多年改进、扩展,已发展成为一类算法的集合。该类算法的特点是模拟物理世界中的作用力,施加在节点上,并迭代计算以达到合理放置节点、美观布局的一类算法。"},fa2_layout_graph:{name:"Force Atlas 2 力导向布局",alias:["FA2力导向布局"],def:"一种使用 Force Atlas 2 布局算法的力导向图,相比于传统的力导算法,该算法在计算力时更关注于节点的度数。"},mds_layout_graph:{name:"MDS 布局图",alias:["多维尺度分析布局"],def:"一种使用 MDS (Multi-Dimensional Scaling) 降维算法计算节点位置的图布局方法。"},circular_layout_graph:{name:"环形布局关系图",alias:[],def:"环形布局根据参数指定的排序方式对节点进行排序后,将节点排列在圆环上。"},spiral_layout_graph:{name:"螺旋布局关系图",alias:[],def:"螺旋布局图的节点排列在一根螺旋线上。"},radial_layout_graph:{name:"辐射布局关系图",alias:[],def:"辐射布局根据指定的中心点,根据其他节点与中心点的拓扑距离(最短路径长度)将其余节点放置在以中心点为圆心的同心圆上。"},concentric_layout_graph:{name:"同心圆布局关系图",alias:[],def:"同心圆布局关系图将所有节点放置在同心圆上。"},grid_layout_graph:{name:"网格布局关系图",alias:[],def:"网格布局根据参数指定的排序方式对节点进行排序后,将节点排列在网格上。"},arc_diagram:{name:"弧形图",alias:[],def:"弧形图是一种关系图的特殊布局,节点被排列在同一水平线上,关系由节点间的圆弧线表示。"},chord_diagram:{name:"弦图",alias:[],def:"弦图是一种展示实体之间的相互关系的方法,常用来比较不同数据组之间的相似性。节点围绕一个圆圈径向排列,点与点之间以弧线彼此连接以显示其中关系。"},non_ribbon_chord_diagram:{name:"无带弦图",alias:[],def:"无带弦图是弦图的简化版本,只显示连接线,相比弦图更加突出了数据之间的联系。"},sankey_diagram:{name:"桑基图",alias:["桑吉图"],def:"桑基图,是一种表现流程的示意图,用于描述一组值到另一组值的流向。分支的宽度对应了数据流量的大小。"}}}};function a(t){if(!t||!Object.keys(r).includes(t))throw new Error("No CKB Dictionary for lang code ".concat(t,"!"));return r[t]}},107:function(t,e,n){"use strict";n.d(e,{ri:function(){return d}});var r=n(2616),a=n(9982),i=n(4479),o=n.n(i),u=n(4120);var c=function(t){var e=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return["".concat(u.oP),"".concat(u.oP).concat(u.cF).concat(t?"":"?","W").concat(u.ps,"(").concat(u.cF).concat(t?"":"?").concat(u.NO,")?"),"".concat(u.vc).concat(u.cF).concat(t?"":"?").concat(u.x4).concat(u.cF).concat(t?"":"?").concat(u.oP),"".concat(u.oP).concat(u.cF).concat(t?"":"?").concat(u.vc).concat(u.cF).concat(t?"":"?").concat(u.x4),"".concat(u.oP).concat(u.cF).concat(t?"":"?").concat(u.vc),"".concat(u.oP).concat(u.cF).concat(t?"":"?").concat(u.IY)]}(t),n=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return["".concat(u.kr,":").concat(t?"":"?").concat(u.EB,":").concat(t?"":"?").concat(u.sh,"([.,]").concat(u.KP,")?").concat(u.ew,"?"),"".concat(u.kr,":").concat(t?"":"?").concat(u.EB,"?").concat(u.ew)]}(t),r=[].concat(o()(e),o()(n));return e.forEach((function(t){n.forEach((function(e){r.push("".concat(t,"[T\\s]").concat(e))}))})),r.map((function(t){return new RegExp("^".concat(t,"$"))}))};function s(t,e){if((0,a.HD)(t))for(var n=c(e),r=0;r<n.length;r+=1){if(n[r].test(t.trim()))return!0}return!1}var l=n(1438);function f(t){var e=t.rawData;if("string"!==t.recommendation)return!1;if(function(t){return 1===t.distinct}(t))return!1;var n=e.filter((function(t){return!(0,a.kK)(t)&&(0,a.M1)(t)}));if(0===n.length)return!1;for(var r=null,i=null,o=-1,u=-1,c=!0;c;){for(var s=!0,l=0;l<n.length;l+=1){var f=n[l][o+1];if(null!==r&&0!==l||(r=f),f!==r){s=!1;break}}if(!s)break;o+=1}for(c=!0;c;){for(var h=!0,d=0;d<n.length;d+=1){var p=n[d],v=p[p.length-1-(u+1)];if(null!==i&&0!==d||(i=v),v!==i){h=!1;break}}if(!h)break;u+=1}var m=[/\d+/,/(零|一|二|三|四|五|六|七|八|九|十)+/,/(一|二|三|四|五|六|日)/,/^[a-z]$/,/^[A-Z]$/];if(-1===o&&-1===u)return!1;for(var g,y=n.map((function(t){return t.slice(-1===o?0:o+1,-1===u?void 0:t.length-u-1)})),b=function(){var t=m[_],e=y.some((function(e){return!t.test(e)}));if(!e)return{v:!0}},_=0;_<m.length;_+=1)if(g=b())return g.v;return!1}function h(t,e){return(0,a.kK)(t)?"null":(0,a.hj)(t)?(0,a.U)(t)?"integer":"float":(0,a.J_)(t)||s(t,e)?"date":(0,a.HD)(t)&&(0,a.i1)(t)?t.includes(".")?"float":"integer":"string"}function d(t,e){var n,i=t.map((function(t){return(0,a.kK)(t)?null:t})),o=(0,r.Gn)(i),u=o.null?i.filter((function(t){return null!==t})):i,c=i.map((function(t){return h(t,e)})),p=Object.keys((0,r.Gn)(c)).filter((function(t){return"null"!==t}));switch(p.length){case 0:n="null";break;case 1:if("integer"===(n=p[0]))i.filter((function(t){return null!==t})).map((function(t){return"".concat(t)})).every((function(t){return s(t)}))&&(n="date");break;case 2:if((p.includes("integer")||p.includes("date"))&&p.includes("float")){n="float";break}if(p.includes("integer")&&p.includes("date")){n=i.filter((function(t){return null!==t})).map((function(t){return"".concat(t)})).every((function(t){return s(t)}))?"date":"integer";break}n="string";break;default:n="string"}var v=(0,l.Tw)(u),m={count:t.length,distinct:v.length,type:p.length<=1?p[0]||"null":"mixed",recommendation:n,missing:o.null||0,rawData:t,valueMap:o};if(p.length>1){var g={},y=u;p.forEach((function(t){"date"===t?(g.date=d(y.filter((function(t){return s(t)})),e),y=y.filter((function(t){return!s(t)}))):"integer"===t?(g.integer=d(y.filter((function(t){return(0,a.Cf)(t)&&!s(t)})),e),y=y.filter((function(t){return!(0,a.Cf)(t)}))):"float"===t?(g.float=d(y.filter((function(t){return(0,a.vn)(t)&&!s(t)})),e),y=y.filter((function(t){return!(0,a.vn)(t)}))):"string"===t&&(g.string=d(y.filter((function(t){return"string"===h(t,e)}))),y=y.filter((function(t){return"string"!==h(t,e)})))})),m.meta=g}2===m.distinct&&"date"!==m.recommendation&&(i.length>=100||(0,a.jn)(v,!0))&&(m.recommendation="boolean"),"string"===n&&Object.assign(m,function(t){var e=t.map((function(t){return t.length}));return{maxLength:(0,r.Fp)(e),minLength:(0,r.VV)(e),meanLength:(0,r.J6)(e),containsChar:t.some((function(t){return/[A-z]/.test(t)})),containsDigit:t.some((function(t){return/[0-9]/.test(t)})),containsSpace:t.some((function(t){return/\s/.test(t)}))}}(u.map((function(t){return"".concat(t)})))),"integer"!==n&&"float"!==n||Object.assign(m,function(t){return{minimum:(0,r.VV)(t),maximum:(0,r.Fp)(t),mean:(0,r.J6)(t),percentile5:(0,r.VR)(t,5),percentile25:(0,r.VR)(t,25),percentile50:(0,r.VR)(t,50),percentile75:(0,r.VR)(t,75),percentile95:(0,r.VR)(t,95),sum:(0,r.Sm)(t),variance:(0,r.CA)(t),standardDeviation:(0,r.IN)(t),zeros:t.filter((function(t){return 0===t})).length}}(u.map((function(t){return 1*t})))),"date"===n&&Object.assign(m,function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.map((function(t){if(e){var n="".concat(t);if(8===n.length)return new Date("".concat(n.substring(0,4),"/").concat(n.substring(4,2),"/").concat(n.substring(6,2))).getTime()}return new Date(t).getTime()}));return{minimum:t[(0,r._D)(n)],maximum:t[(0,r.F_)(n)]}}(u,"integer"===m.type));var b,_=[];return("boolean"===(b=m).recommendation||"string"===b.recommendation&&!f(b))&&_.push("Nominal"),f(m)&&_.push("Ordinal"),function(t){return"integer"===t.recommendation||"float"===t.recommendation}(m)&&_.push("Interval"),function(t){return"integer"===t.recommendation}(m)&&_.push("Discrete"),function(t){return"float"===t.recommendation}(m)&&_.push("Continuous"),function(t){return"date"===t.recommendation}(m)&&_.push("Time"),m.levelOfMeasurements=_,m}},9643:function(t,e,n){"use strict";n.d(e,{Z:function(){return h}});var r=n(4528),a=n.n(r),i=n(8798),o=n.n(i),u=n(9057),c=n.n(u),s=n(1438),l=n(9982),f=n(4674),h=function(){function t(e,n){var r,i;if(a()(this,t),c()(this,"axes",[[]]),c()(this,"data",[]),c()(this,"colData",void 0),c()(this,"extra",void 0),(0,s.hu)(!n||(0,l.Kn)(n),"If extra exists, it must be an object."),(0,l.M1)(e))null!=n&&n.indexes?(this.setAxis(0,null==n?void 0:n.indexes),this.data=Array(null==n?void 0:n.indexes.length).fill((0,f.l7)((0,f.e1)(e,null==n?void 0:n.fillValue),null==n||null===(r=n.columnTypes)||void 0===r?void 0:r[0]))):(this.data=[(0,f.l7)((0,f.e1)(e,null==n?void 0:n.fillValue),null==n||null===(i=n.columnTypes)||void 0===i?void 0:i[0])],this.setAxis(0,[0]));else if((0,l.kJ)(e)){for(var o=!0,u=0;u<e.length;u+=1){var h=e[u];if(!(0,l.M1)(h)){o=!1;break}}if(this.setAxis(0,(0,f.dN)(e,null==n?void 0:n.indexes)),o){var d,p;if(null!=n&&n.indexes)(0,s.hu)((null==n||null===(p=n.indexes)||void 0===p?void 0:p.length)===e.length,"Index length is ".concat(null==n?void 0:n.indexes.length,", but data size ").concat(e.length)),this.setAxis(0,null==n?void 0:n.indexes);if(this.data=null!=n&&n.fillValue?e.map((function(t){return(0,f.e1)(t,null==n?void 0:n.fillValue)})):e,null!=n&&null!==(d=n.columnTypes)&&void 0!==d&&d.length)for(var v=0;v<this.data.length;v+=1){var m;this.data[v]=(0,f.l7)(this.data[v],null==n||null===(m=n.columnTypes)||void 0===m?void 0:m[0])}}}}return o()(t,[{key:"indexes",get:function(){return this.getAxis(0)}},{key:"columns",get:function(){return this.getAxis(1)}},{key:"getAxis",value:function(t){return this.axes[t]}},{key:"setAxis",value:function(t,e){(0,s.hu)((0,l.kJ)(e),"Index or columns must be Axis array."),this.axes[t]=e}}]),t}()},7849:function(t,e,n){"use strict";n.d(e,{Z:function(){return M}});var r=n(1448),a=n.n(r),i=n(4479),o=n.n(i),u=n(3100),c=n.n(u),s=n(4528),l=n.n(s),f=n(8798),h=n.n(f),d=n(7267),p=n.n(d),v=n(9913),m=n.n(v),g=n(107),y=n(1438),b=n(9982),_=n(9643),w=n(4420),x=n(4674),M=function(t){p()(n,t);var e=m()(n);function n(t,r){var a;if(l()(this,n),(a=e.call(this,t,r)).colData=[],a.extra=r||{},(0,y.hu)((0,b.M1)(t)||(0,b.kJ)(t)||(0,b.Kn)(t),"Data type is illegal"),(0,b.M1)(t)){if(null!=r&&r.columnTypes)for(var i=0;i<(null==r||null===(u=r.indexes)||void 0===u?void 0:u.length);i+=1){var u,s;a.data[i]=(0,x.l7)(a.data[i],null==r||null===(s=r.columnTypes)||void 0===s?void 0:s[i])}null!=r&&r.indexes&&null!=r&&r.columns?(a.setAxis(1,null==r?void 0:r.columns),a.data=Array(null==r?void 0:r.columns.length).fill(a.data)):null!=r&&r.columns?null!=r&&r.indexes||((0,y.hu)((0,b.kJ)(null==r?void 0:r.columns),"Index or columns must be Axis array."),(0,y.hu)(1===(null==r?void 0:r.columns.length),"When the length of extra.columns is larger than 1, extra.indexes is required.")):(a.setAxis(1,[0]),a.data=[a.data]),a.colData=a.data}if((0,b.kJ)(t)){var f=c()(t,1)[0];if(a.data.length>0&&(a.generateColumns([0],null==r?void 0:r.columns),a.colData=[a.data],a.data=a.data.map((function(t){return[t]}))),(0,b.kJ)(f)){var h=(0,y.w6)(f.length);a.generateDataAndColDataFromArray(!1,t,h,null==r?void 0:r.fillValue,null==r?void 0:r.columnTypes),a.generateColumns(h,null==r?void 0:r.columns)}if((0,b.Kn)(f)){for(var d=[],p=0;p<t.length;p+=1){var v=t[p];d.push.apply(d,o()(Object.keys(v)))}for(var m=o()(new Set(d)),g=0;g<t.length;g+=1){var _=t[g];if((0,y.hu)((0,b.Kn)(_),"The data is not standard object array."),null!=r&&r.columns){a.data[g]=[];for(var w=0;w<(null==r?void 0:r.columns.length);w+=1){var M,k=null==r?void 0:r.columns[w];(0,y.hu)(m.includes(k),"There is no column ".concat(k," in data."));var C=(0,x.l7)((0,x.e1)(_[k],r.fillValue),null==r||null===(M=r.columnTypes)||void 0===M?void 0:M[w]);a.data[g].push(C),a.colData[w]?a.colData[w].push(C):a.colData[w]=[C]}a.setAxis(1,null==r?void 0:r.columns)}}null!=r&&r.columns||(a.generateDataAndColDataFromArray(!0,t,m,null==r?void 0:r.fillValue,null==r?void 0:r.columnTypes),a.setAxis(1,m))}}if((0,b.Kn)(t)){var A=Object.values(t),T=A[0];if((0,b.M1)(T)){var S=Object.keys(t);if(null!=r&&r.indexes?((0,y.hu)((0,b.kJ)(r.indexes),"extra.indexes must be an array."),(0,y.hu)(1===r.indexes.length,"The length of extra.indexes must be 1."),a.setAxis(0,r.indexes)):a.setAxis(0,[0]),null!=r&&r.columns){for(var O=0;O<(null==r?void 0:r.columns.length);O+=1){var N,P=null==r?void 0:r.columns[O];(0,y.hu)(S.includes(P),"There is no column ".concat(P," in data.")),a.data.push((0,x.l7)((0,x.e1)(t[P],null==r?void 0:r.fillValue),null==r||null===(N=r.columnTypes)||void 0===N?void 0:N[O]))}a.colData=a.data.map((function(t){return[t]})),a.data=[a.data],a.setAxis(1,null==r?void 0:r.columns)}else{for(var D=0;D<S.length;D+=1){var I,j=t[S[D]];(0,y.hu)((0,b.M1)(j),"Data type is illegal"),a.data.push((0,x.l7)((0,x.e1)(j,null==r?void 0:r.fillValue),null==r||null===(I=r.columnTypes)||void 0===I?void 0:I[D]))}a.data=[a.data],a.colData=A.map((function(t){var e;return[(0,x.l7)((0,x.e1)(t,null==r?void 0:r.fillValue),null==r||null===(e=r.columnTypes)||void 0===e?void 0:e[0])]})),a.generateColumns(S)}}if((0,b.kJ)(T)){a.setAxis(0,(0,x.dN)(T,null==r?void 0:r.indexes));var R=Object.keys(t);a.generateColumns(R,null==r?void 0:r.columns);for(var L=function(e){var n=t[a.columns[e]];if((0,y.hu)((0,b.kJ)(n),"Data type is illegal"),n.length<a.indexes.length){var i,o=n.concat(Array(a.indexes.length-n.length).fill((0,x.l7)((0,x.e1)(void 0,null==r?void 0:r.fillValue),null==r||null===(i=r.columnTypes)||void 0===i?void 0:i[e])));a.colData.push(o)}else a.colData.push(n.map((function(t){var n;return(0,x.l7)((0,x.e1)(t,null==r?void 0:r.fillValue),null==r||null===(n=r.columnTypes)||void 0===n?void 0:n[e])})));for(var u=0;u<a.indexes.length;u+=1){var c,s;if(a.data[u])a.data[u].push((0,x.l7)((0,x.e1)(n[u],null==r?void 0:r.fillValue),null==r||null===(c=r.columnTypes)||void 0===c?void 0:c[e]));else a.data[u]=[(0,x.l7)((0,x.e1)(n[u],null==r?void 0:r.fillValue),null==r||null===(s=r.columnTypes)||void 0===s?void 0:s[e])]}},E=0;E<a.columns.length;E+=1)L(E)}}return a}return h()(n,[{key:"generateColumns",value:function(t,e){e?((0,y.hu)((null==e?void 0:e.length)===t.length,"Columns length is ".concat(null==e?void 0:e.length,", but data column is ").concat(t.length)),this.setAxis(1,e)):this.setAxis(1,t)}},{key:"generateDataAndColDataFromArray",value:function(t,e,n,r,a){for(var i=0;i<e.length;i+=1){var o=e[i];(0,y.hu)(t?(0,b.Kn)(o):(0,b.kJ)(o),"Data type is illegal"),t&&JSON.stringify(Object.keys(o))===JSON.stringify(n)?this.data.push(Object.values(o).map((function(t,e){return(0,x.l7)((0,x.e1)(t,r),null==a?void 0:a[e])}))):t||this.data.push(o.map((function(t,e){return(0,x.l7)((0,x.e1)(t,r),null==a?void 0:a[e])})));for(var u=0;u<n.length;u+=1){var c=n[u],s=(0,x.l7)((0,x.e1)(o[c],r),null==a?void 0:a[u]);t&&JSON.stringify(Object.keys(o))!==JSON.stringify(n)&&(this.data[i]?this.data[i].push(s):this.data[i]=[s]),this.colData[u]?this.colData[u].push(s):this.colData[u]=[s]}}}},{key:"shape",get:function(){return[this.axes[0].length,this.axes[1].length]}},{key:"get",value:function(t,e){if((0,y.hu)((0,x.U7)(t)||(0,b.kJ)(t),"The rowLoc is illegal"),void 0===e)if((0,b.hj)(t)){if((0,y.hu)(this.indexes.includes(t),"The rowLoc is not found in the indexes."),this.indexes.includes(t)){var r=this.data[t],a=this.columns;return new w.Z(r,{indexes:a})}}else{if((0,b.kJ)(t)){for(var i=[],o=[],u=0;u<t.length;u+=1){var c=t[u];(0,y.hu)(this.indexes.includes(c),"The rowLoc is not found in the indexes.");var s=this.indexes.indexOf(c);i.push(this.data[s]),o.push(this.indexes[s])}return new n(i,{indexes:o,columns:this.columns})}if((0,b.HD)(t)&&t.includes(":")){var l=t.split(":");if(2===l.length){var f=Number(l[0]),h=Number(l[1]);return(0,y.hu)((0,b.hj)(f)&&(0,b.hj)(h),"The rowLoc is not found in the indexes."),new n(this.data.slice(f,h),{indexes:this.indexes.slice(f,h),columns:this.columns})}}}var d=-1,p=-1,v=[],m=-1,g=-1,_=[];if((0,x.U7)(t)&&this.indexes.includes(t)&&(p=(d=this.indexes.indexOf(t))+1),(0,b.kJ)(t))for(var M=0;M<t.length;M+=1){var k=t[M];(0,y.hu)(this.indexes.includes(k),"The rowLoc is not found in the indexes."),v.push(this.indexes.indexOf(k))}if((0,b.HD)(t)&&t.includes(":")){var C=t.split(":");if(2===C.length){var A=Number(C[0]),T=Number(C[1]);(0,y.hu)((0,b.hj)(A)&&(0,b.hj)(T),"The rowLoc is not found in the indexes."),d=A,p=T}}if((0,x.U7)(e)&&this.columns.includes(e)&&(g=(m=this.columns.indexOf(e))+1),(0,b.kJ)(e))for(var S=0;S<e.length;S+=1){var O=e[S];(0,y.hu)(this.columns.includes(O),"The colLoc is not found in the columns."),_.push(this.columns.indexOf(O))}if((0,b.HD)(e)&&e.includes(":")){var N=e.split(":");if(2===N.length){var P=this.columns.indexOf(N[0]),D=this.columns.indexOf(N[1]);(0,y.hu)((0,b.hj)(P)&&(0,b.hj)(D),"The colLoc is not found in the columns."),m=P,g=D}}var I=[],j=[];if((0,y.hu)(d>=0&&p>=0||v.length>0,"The rowLoc is not found in the indexes."),d>=0&&p>=0&&(I=this.data.slice(d,p),j=this.indexes.slice(d,p)),v.length>0)for(var R=0;R<v.length;R+=1){var L=v[R];I.push(this.data[L]),j.push(this.indexes[L])}if(m>=0&&g>=0){for(var E=0;E<I.length;E+=1)I[E]=I[E].slice(m,g);return new n(I,{indexes:j,columns:this.columns.slice(m,g)})}if(_.length>0){for(var z=[],B=I.slice(),Q=0;Q<I.length;Q+=1){I[Q]=[],z=[];for(var F=0;F<_.length;F+=1){var q=_[F];I[Q].push(B[Q][q]),z.push(this.columns[q])}}return new n(I,{indexes:j,columns:z})}throw new Error("The colLoc is illegal.")}},{key:"getByIndex",value:function(t,e){if((0,y.hu)((0,b.U)(t)||(0,b.kJ)(t)||(0,b.HD)(t),"The rowLoc is illegal"),void 0===e){if((0,b.U)(t)){(0,y.hu)((0,y.w6)(this.indexes.length).includes(t),"The rowLoc is not found in the indexes.");var r=this.data[t],a=this.columns;return new w.Z(r,{indexes:a})}if((0,b.kJ)(t)){for(var i=[],o=[],u=0;u<t.length;u+=1){var c=t[u];(0,y.hu)((0,y.w6)(this.indexes.length).includes(c),"The rowLoc is not found in the indexes."),i.push(this.data[c]),o.push(this.indexes[c])}return new n(i,{indexes:o,columns:this.columns})}if((0,b.HD)(t)&&t.includes(":")){var s=t.split(":");if(2===s.length){var l=Number(s[0]),f=Number(s[1]);return(0,y.hu)((0,b.U)(l)&&(0,b.U)(f),"The rowLoc is not found in the indexes."),new n(this.data.slice(l,f),{indexes:this.indexes.slice(l,f),columns:this.columns})}}}var h=-1,d=-1,p=[],v=-1,m=-1,g=[];if((0,b.U)(t)&&((0,y.hu)((0,y.w6)(this.indexes.length).includes(t),"The rowLoc is not found in the indexes."),h=t,d=t+1),(0,b.kJ)(t))for(var _=0;_<t.length;_+=1){var x=t[_];(0,y.hu)((0,y.w6)(this.indexes.length).includes(x),"The rowLoc is not found in the indexes."),p.push(x)}if((0,b.HD)(t)&&t.includes(":")){var M=t.split(":");if(2===M.length){var k=Number(M[0]),C=Number(M[1]);(0,y.hu)((0,b.U)(k)&&(0,b.U)(C),"The rowLoc is not found in the indexes."),h=k,d=C}}if((0,y.hu)(h>=0&&d>=0||p.length>0,"The colLoc is illegal"),(0,b.U)(e)&&(0,y.w6)(this.columns.length).includes(e)&&(v=e,m=e+1),(0,b.kJ)(e))for(var A=0;A<e.length;A+=1){var T=e[A];(0,y.hu)((0,y.w6)(this.columns.length).includes(T),"The colLoc is not found in the columns index."),g.push(T)}if((0,b.HD)(e)&&e.includes(":")){var S=e.split(":");if(2===S.length){var O=Number(S[0]),N=Number(S[1]);(0,y.hu)((0,b.U)(O)&&(0,b.U)(N),"The colLoc is not found in the columns index."),v=O,m=N}}(0,y.hu)(h>=0&&d>=0||p.length>0,"The rowLoc is not found in the indexes.");var P=[],D=[];if(h>=0&&d>=0)P=this.data.slice(h,d),D=this.indexes.slice(h,d);else if(p.length>0)for(var I=0;I<p.length;I+=1){var j=p[I];P.push(this.data[j]),D.push(this.indexes[j])}if((0,y.hu)(v>=0&&m>=0||g.length>0,"The colLoc is not found in the columns index."),v>=0&&m>=0){for(var R=0;R<P.length;R+=1)P[R]=P[R].slice(v,m);return new n(P,{indexes:D,columns:this.columns.slice(v,m)})}if(g.length>0){for(var L=[],E=P.slice(),z=0;z<P.length;z+=1){P[z]=[],L=[];for(var B=0;B<g.length;B+=1){var Q=g[B];P[z].push(E[z][Q]),L.push(this.columns[Q])}}return new n(P,{indexes:D,columns:L})}throw new Error("The colLoc is illegal.")}},{key:"getByColumn",value:function(t){(0,y.hu)(this.columns.includes(t),"The col is illegal");var e=this.columns.indexOf(t);return new w.Z(this.colData[e],{indexes:this.indexes})}},{key:"info",value:function(){for(var t=[],e=0;e<(null===(n=this.columns)||void 0===n?void 0:n.length);e+=1){var n,r=this.columns[e];t.push(a()(a()({},(0,g.ri)(this.colData[e],this.extra.strictDatePattern)),{},{name:String(r)}))}return t}},{key:"toString",value:function(){for(var t=this,e=Array(this.columns.length+1).fill(0),n=0;n<this.indexes.length;n+=1){var r=(0,x.lz)(this.indexes[n]);r>e[0]&&(e[0]=r)}for(var a=0;a<this.columns.length;a+=1){var i=(0,x.lz)(this.columns[a]);i>e[a+1]&&(e[a+1]=i)}for(var o=0;o<this.colData.length;o+=1)for(var u=0;u<this.colData[o].length;u+=1){var c=(0,x.lz)(this.colData[o][u]);c>e[o+1]&&(e[o+1]=c)}return"".concat((0,x.ej)(e[0])).concat(this.columns.map((function(n,r){return"".concat(n).concat(r!==t.columns.length?(0,x.ej)(e[r+1]-(0,x.lz)(n)+2):"")})).join(""),"\n").concat(this.indexes.map((function(n,r){var a;return"".concat(n).concat((0,x.ej)(e[0]-(0,x.lz)(n))).concat(null===(a=t.data[r])||void 0===a?void 0:a.map((function(n,r){return"".concat((0,x.Pz)(n)).concat(r!==t.columns.length?(0,x.ej)(e[r+1]-(0,x.lz)(n)):"")})).join("")).concat(r!==t.indexes.length?"\n":"")})).join(""))}}]),n}(_.Z)},4420:function(t,e,n){"use strict";n.d(e,{Z:function(){return m}});var r=n(3100),a=n.n(r),i=n(4528),o=n.n(i),u=n(8798),c=n.n(u),s=n(7267),l=n.n(s),f=n(9913),h=n.n(f),d=n(1438),p=n(9982),v=n(4674),m=function(t){l()(n,t);var e=h()(n);function n(t,r){var i;if(o()(this,n),i=e.call(this,t,r),(0,d.hu)((0,p.Kn)(t)||(0,p.M1)(t)||(0,p.kJ)(t),"Data type is illegal"),(0,p.Kn)(t)){var u=Object.keys(t);if(null!=r&&r.indexes){var c,s;(0,d.hu)((null==r||null===(c=r.indexes)||void 0===c?void 0:c.length)<=u.length,"Index length ".concat(null==r||null===(s=r.indexes)||void 0===s?void 0:s.length," is greater than data size ").concat(u.length));for(var l=0;l<(null==r?void 0:r.indexes.length);l+=1){var f,h=null==r?void 0:r.indexes[l];if(u.includes(h))i.data.push((0,v.l7)((0,v.e1)(t[h],null==r?void 0:r.fillValue),null==r||null===(f=r.columnTypes)||void 0===f?void 0:f[0]))}i.setAxis(0,null==r?void 0:r.indexes)}else i.data=Object.values(t).map((function(t){var e;return(0,v.l7)((0,v.e1)(t,null==r?void 0:r.fillValue),null==r||null===(e=r.columnTypes)||void 0===e?void 0:e[0])})),i.setAxis(0,u)}else if((0,p.kJ)(t)){var m=a()(t,1)[0];if(!(0,p.M1)(m)){var g;if(null!=r&&r.indexes)(0,d.hu)((null==r||null===(g=r.indexes)||void 0===g?void 0:g.length)===t.length,"Index length is ".concat(null==r?void 0:r.indexes.length,", but data size ").concat(t.length)),i.setAxis(0,null==r?void 0:r.indexes);i.data=t}}return i}return c()(n,[{key:"shape",get:function(){return[this.axes[0].length]}},{key:"get",value:function(t){if((0,d.hu)((0,p.hj)(t)||(0,p.HD)(t)&&!t.includes(":")||(0,p.kJ)(t)||(0,p.HD)(t)&&t.includes(":"),"The rowLoc is illegal"),(0,p.hj)(t)||(0,p.HD)(t)&&!t.includes(":")){if((0,d.hu)(this.indexes.includes(t),"The rowLoc is not found in the indexes."),(0,p.hj)(t))return this.data[t];if((0,p.HD)(t)){var e=this.indexes.indexOf(t);return this.data[e]}}if((0,p.kJ)(t)){for(var r=[],a=[],i=0;i<t.length;i+=1){var o=t[i];(0,d.hu)(this.indexes.includes(o),"The rowLoc is not found in the indexes.");var u=this.indexes.indexOf(o);r.push(this.data[u]),a.push(this.indexes[u])}return new n(r,{indexes:a})}if((0,p.HD)(t)&&t.includes(":")){var c=t.split(":");(0,d.hu)(2===c.length,"The rowLoc is not found in the indexes.");var s=c[0],l=c[1];if((0,p.U)(Number(s))&&(0,p.U)(Number(l))){var f=Number(s),h=Number(l);return new n(this.data.slice(f,h),{indexes:this.indexes.slice(f,h)})}if((0,p.HD)(s)&&(0,p.HD)(l)){var v=this.indexes.indexOf(s),m=this.indexes.indexOf(l);return new n(this.data.slice(v,m),{indexes:this.indexes.slice(v,m)})}}throw new Error("The rowLoc is illegal")}},{key:"getByIndex",value:function(t){if((0,d.hu)((0,p.U)(t)||(0,p.kJ)(t)||(0,p.HD)(t)&&t.includes(":"),"The rowLoc is illegal"),(0,p.U)(t)&&((0,d.hu)((0,d.w6)(this.indexes.length).includes(t),"The rowLoc is not found in the indexes."),(0,d.w6)(this.indexes.length).includes(t)))return this.data[t];if((0,p.kJ)(t)){for(var e=[],r=[],a=0;a<t.length;a+=1){var i=t[a];(0,d.hu)((0,d.w6)(this.indexes.length).includes(i),"The rowLoc is not found in the indexes."),e.push(this.data[i]),r.push(this.indexes[i])}return new n(e,{indexes:r})}if((0,p.HD)(t)&&t.includes(":")){var o=t.split(":");if(2===o.length){var u=Number(o[0]),c=Number(o[1]);return(0,d.hu)((0,p.U)(u)&&(0,p.U)(c),"The rowLoc is not found in the indexes."),new n(this.data.slice(u,c),{indexes:this.indexes.slice(u,c)})}}throw new Error("The rowLoc is illegal")}}]),n}(n(9643).Z)},4674:function(t,e,n){"use strict";n.d(e,{Pz:function(){return s},U7:function(){return i},dN:function(){return o},e1:function(){return u},ej:function(){return c},l7:function(){return f},lz:function(){return l}});var r=n(9982),a=n(1438);function i(t){return(0,r.hj)(t)||(0,r.HD)(t)}function o(t,e){return(0,a.hu)((0,r.kJ)(t),"Data must be an array"),e?((0,a.hu)((null==e?void 0:e.length)===t.length,"Index length is ".concat(null==e?void 0:e.length,", but data size is ").concat(t.length)),e):(0,a.w6)(t.length)}function u(t,e){return!t&&JSON.stringify(e)?e:t}function c(t){return Array((0,r.hj)(t)?t:0).fill(" ").concat(" ").join("")}function s(t){var e;return(null===(e=JSON.stringify(t))||void 0===e||null===(e=e.replace(/\\n/g,""))||void 0===e||null===(e=e.replace(/\\/g,""))||void 0===e||null===(e=e.replace(/"\[/g,"["))||void 0===e||null===(e=e.replace(/\]"/g,"]"))||void 0===e||null===(e=e.replace(/"\{/g,"{"))||void 0===e?void 0:e.replace(/\}"/g," }"))||"undefined"}function l(t){var e;return null===(e=s(t))||void 0===e?void 0:e.length}function f(t,e){try{if("string"===e&&!(0,r.HD)(t))return"".concat(t);if("boolean"===e&&!(0,r.jn)(t))return Boolean(t);if("null"===e&&!(0,r.kK)(t))return null;if(("integer"===e||"float"===e)&&!(0,r.hj)(t))return+t;if("date"===e&&!(0,r.J_)(t)&&((0,r.hj)(t)||(0,r.HD)(t)))return new Date(t)}catch(t){throw new Error(t)}return t}},2616:function(t,e,n){"use strict";n.d(e,{eu:function(){return M},AV:function(){return k},EB:function(){return O},IS:function(){return v},s6:function(){return m},Fp:function(){return f},F_:function(){return h},J6:function(){return p},C2:function(){return y},VV:function(){return s},_D:function(){return l},wb:function(){return T},Vs:function(){return C},VR:function(){return _},gG:function(){return b},IN:function(){return x},Sm:function(){return d},QF:function(){return A},Gn:function(){return S},CA:function(){return w}});var r=n(4479),a=n.n(r),i=n(1438),o=new WeakMap;function u(t,e,n){return o.get(t)||o.set(t,new Map),o.get(t).set(e,n),n}function c(t,e){var n=o.get(t);if(n)return n.get(e)}function s(t){var e=c(t,"min");return void 0!==e?e:u(t,"min",Math.min.apply(Math,a()(t)))}function l(t){var e=c(t,"minIndex");return void 0!==e?e:u(t,"minIndex",function(t){for(var e=t[0],n=0,r=0;r<t.length;r+=1)t[r]<e&&(n=r,e=t[r]);return n}(t))}function f(t){var e=c(t,"max");return void 0!==e?e:u(t,"max",Math.max.apply(Math,a()(t)))}function h(t){var e=c(t,"maxIndex");return void 0!==e?e:u(t,"maxIndex",function(t){for(var e=t[0],n=0,r=0;r<t.length;r+=1)t[r]>e&&(n=r,e=t[r]);return n}(t))}function d(t){var e=c(t,"sum");return void 0!==e?e:u(t,"sum",t.reduce((function(t,e){return e+t}),0))}function p(t){return d(t)/t.length}function v(t){(0,i.hu)(t.some((function(t){return t>0})),"Each item in value must greater than 0.");var e=c(t,"geometricMean");return void 0!==e?e:u(t,"geometricMean",Math.pow(t.reduce((function(t,e){return t*e}),1),1/t.length))}function m(t){var e=Math.pow(2,16),n=c(t,"harmonicMean");return void 0!==n?n:u(t,"harmonicMean",e*t.length/t.reduce((function(t,n){return e/n+t}),0))}function g(t){return t.sort((function(t,e){return t>e?1:-1}))}function y(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.length,r=e?t:g(t);return n%2==1?r[(n-1)/2]:(r[n/2-1]+r[n/2])/2}function b(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,i.hu)(t.length>=3,"The length of value cannot be less than 3.");var n,r,a=t.length,o=e?t:g(t),u=y(o,!0);return a%2==1?(n=y(o.slice(0,(a-1)/2),!0),r=y(o.slice((a+1)/2),!0)):(n=y(o.slice(0,a/2),!0),r=y(o.slice(a/2),!0)),[n,u,r]}function _(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,i.hu)(e>0&&e<100,"The percent cannot be between (0, 100).");var r=n?t:g(t),a=Math.ceil(t.length*e/100)-1;return r[a]}function w(t){var e=p(t),n=c(t,"variance");return void 0!==n?n:u(t,"variance",t.reduce((function(t,n){return t+Math.pow(n-e,2)}),0)/t.length)}function x(t){return Math.sqrt(w(t))}function M(t){return x(t)/p(t)}function k(t,e){return(0,i.hu)(t.length===e.length,"The x and y must has same length."),p(t.map((function(t,n){return t*e[n]})))-p(t)*p(e)}function C(t,e){return k(t,e)/(x(t)*x(e))}function A(t){for(var e=0,n=0;n<t.length;n+=1)t[n]&&(e+=1);return e}function T(t){return t.length-A(t)}function S(t){var e={};return t.forEach((function(t){var n="".concat(t);e[n]?e[n]+=1:e[n]=1})),e}function O(t){return Object.keys(S(t)).length}},609:function(t,e,n){"use strict";n.d(e,{s:function(){return a}});var r=n(8972),a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(n<0||[t,e,n].some((function(t){return(0,r.isNil)(t)})))return NaN;var a=Math.abs((t-e)/n),i=1/Math.sqrt(2*Math.PI)*Math.exp(-1*Math.pow(a,2)/2),o=1/(1+.33267*a),u=1-i*(.4361836*o-.1201676*Math.pow(o,2)+.937298*Math.pow(o,3));return t>e?u:1-u}},7714:function(t,e,n){"use strict";n.d(e,{L:function(){return r},a:function(){return a}});var r={f:2/3,nSteps:3,delta:null},a={alpha:.05,alternative:"two-sided",rho:0}},3125:function(t,e,n){"use strict";n.d(e,{D:function(){return i}});var r=n(4479),a=n.n(r),i=function(t){var e=t.map((function(t){return Math.abs(t)}));return Math.max.apply(Math,a()(e))}},7201:function(t,e,n){"use strict";n.d(e,{Z:function(){return u}});var r=n(8972),a=n(2616),i=n(7714),o=n(8604),u=function(t,e,n){if(t.length!==e.length)return console.error("invalid arguments: First and second arguments must be arrays having the same length"),{pcorr:null,rejected:!1};var u,c,s=(0,r.mergeWith)(i.a,n,(function(t,e){return null!=e?e:t})),l=s.alpha,f=s.alternative,h=s.rho,d=(0,a.Vs)(t,e),p=!1;if(0!==h){u=(.5*Math.log((1+d)/(1-d))-.5*Math.log((1+h)/(1-h)))/(1/Math.sqrt(t.length-3)),"greater"===f?u>=(c=(0,o.T)(1-l))&&(p=!0):"less"===f?u<=(c=(0,o.T)(l))&&(p=!0):(c=(0,o.T)(1-l/2),Math.abs(u)>=c&&(p=!0))}else{var v=t.length-2;u=d*Math.sqrt(v)/Math.sqrt(1-Math.pow(d,2)),"greater"===f?u>=(c=(0,o.D)(1-l,v))&&(p=!0):"less"===f?u<=(c=(0,o.D)(l,v))&&(p=!0):(c=(0,o.D)(1-l/2,v),Math.abs(u)>=c&&(p=!0))}return{rejected:p,pcorr:d}}},8604:function(t,e,n){"use strict";n.d(e,{D:function(){return a},T:function(){return r}});var r=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(t>1||t<0||n<0)return NaN;var r=t<=.5?t:1-t,a=Math.sqrt(-2*Math.log(r)),i=a-(2.515517+.802853*a+.010328*Math.pow(a,2))/(1+1.432788*a+.189269*Math.pow(a,2)+.001308*Math.pow(a,3)),o=t<=.5?-1*i:i,u=n*o+e;return u},a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(t>1||t<0||e<=0)return NaN;if(1===e)return-Math.cos(Math.PI*t)/Math.sin(Math.PI*t);if(2===e)return(2*t-1)/Math.sqrt(2*t*(1-t));var n=t>.5?t:1-t,a=r(n),i=(Math.pow(a,3)+a)/4,o=(5*Math.pow(a,5)+16*Math.pow(a,3)+3*a)/96,u=(3*Math.pow(a,7)+19*Math.pow(a,5)+17*Math.pow(a,3)-15*a)/384,c=(79*Math.pow(a,9)+776*Math.pow(a,7)+1482*Math.pow(a,5)-1920*Math.pow(a,3)-945*a)/92160;return(t>.5?1:-1)*(a+i/e+o/Math.pow(e,2)+u/Math.pow(e,3)+c/Math.pow(e,4))}},1438:function(t,e,n){"use strict";n.d(e,{F6:function(){return c},Js:function(){return f},Tw:function(){return o},Yc:function(){return s},hu:function(){return l},w6:function(){return u}});var r=n(4479),a=n.n(r),i=n(9982);function o(t){return Array.from(new Set(t))}function u(t){return a()(Array(t).keys())}function c(t){return Array(t).fill(1)}function s(t){return Array(t).fill(0)}function l(t,e){if(!t)throw new Error(e)}function f(t,e){if(!(0,i.kJ)(t)||0===t.length||!(0,i.kJ)(e)||0===e.length||t.length!==e.length)return!1;for(var n={},r=0;r<e.length;r+=1){var a=e[r],o=t[r];if(n[a]){if(n[a]!==o)return!1}else n[a]=o}return!0}},4120:function(t,e,n){"use strict";n.d(e,{EB:function(){return h},IY:function(){return v},KP:function(){return p},NO:function(){return s},U0:function(){return r},cF:function(){return a},ew:function(){return m},kr:function(){return f},oP:function(){return i},ps:function(){return c},sh:function(){return d},vc:function(){return o},x4:function(){return u}});var r=[[!0,!1],[0,1],["true","false"],["Yes","No"],["True","False"],["0","1"],["是","否"]],a="([-_./\\s])",i="(?<year>(18|19|20)\\d{2})",o="(?<month>0?[1-9]|1[012])",u="(?<day>0?[1-9]|[12]\\d|3[01])",c="(?<week>[0-4]\\d|5[0-2])",s="(?<weekday>[1-7])",l="(0?\\d|[012345]\\d)",f="(?<hour>".concat(l,")"),h="(?<minute>".concat(l,")"),d="(?<second>".concat(l,")"),p="(?<millisecond>\\d{1,4})",v="(?<yearDay>(([0-2]\\d|3[0-5])\\d)|36[0-6])",m="(?<offset>Z|[+-]".concat("(0?\\d|1\\d|2[0-4])","(:").concat(l,")?)")},9982:function(t,e,n){"use strict";n.d(e,{Cf:function(){return s},HD:function(){return i},J_:function(){return f},Kn:function(){return d},M1:function(){return v},U:function(){return c},hj:function(){return o},i1:function(){return u},jn:function(){return h},kJ:function(){return p},kK:function(){return a},vn:function(){return l}});var r=n(4120);function a(t){return null==t||""===t||Number.isNaN(t)||"null"===t}function i(t){return"string"==typeof t}function o(t){return"number"==typeof t}function u(t){if(i(t)){var e=!1,n=t;/^[+-]/.test(n)&&(n=n.slice(1));for(var r=0;r<n.length;r+=1){var a=n[r];if("."===a){if(!1!==e)return!1;e=!0}if("."!==a&&!/[0-9]/.test(a))return!1}return""!==n.trim()}return!1}function c(t){return"number"==typeof t&&Number.isInteger(t)}function s(t){return!(!i(t)||!u(t))&&!t.includes(".")}function l(t){return!(!i(t)||!u(t))&&t.includes(".")}function f(t){return!(!t||Object.getPrototypeOf(t)!==Date.prototype)}function h(t,e){return e?r.U0.some((function(e){return t.every((function(t){return e.includes(t)}))})):"boolean"==typeof t}function d(t){return t&&Object.getPrototypeOf(t)===Object.prototype}function p(t){return Array.isArray(t)}function v(t){return!p(t)&&!d(t)}},9093:function(t,e,n){"use strict";n.d(e,{Cn:function(){return o},Ix:function(){return a},gN:function(){return i},qS:function(){return r}});var r={highlight:"#E09322",outlier:"#CB5140",font:"#bac4e2",defaultPointColor:"#fff"},a=500,i={textAlign:"center",fill:r.font,fontFamily:"Moderat",opacity:.65},o={innerRadius:.25,outerRadius:.8}},8382:function(t,e,n){"use strict";n.d(e,{l:function(){return h}});var r=n(9660),a=n(6798),i=n(5932),o=n(7784),u=n(8821),c=n(8045),s=function(t){return[(0,c.c)(t)]},l=function(t){return[(0,c.c)(t)]},f=n(8586);function h(t){var e,n=t.patterns[0].type,c={trend:r.D,time_series_outlier:a.p,category_outlier:i.F,change_point:o.J,low_variance:u._,majority:s,correlation:l},h=null===(e=c[n])||void 0===e?void 0:e.call(c,t);return(0,f.d)(h,t)}},5932:function(t,e,n){"use strict";n.d(e,{P:function(){return d},F:function(){return p}});var r=n(4479),a=n.n(r),i=n(8972),o=n(8346),u=n(9093),c=n(8045),s=n(1448),l=n.n(s),f=n(789),h=n(9198),d=function(t){var e=t.patterns;if(!(0,i.size)(e))return[];var n=[];return e.forEach((function(t){var e=function(t,e){var n=t.map((function(t){return{x:t.x,y:t.y}}));return l()(l()({type:"interval",data:n,encode:{x:"x",y:"y"}},e),{},{style:l()(l()({},null==e?void 0:e.style),{},{fill:u.qS.outlier})})}([t]),r=(0,f.b)([t],{style:{fontWeight:u.Ix,dy:-8},formatter:o.Z});n.push({categoryOutlier:[e,r]})})),n},p=function(t){var e=(0,c.c)(t),n=d(t),r=(0,h.d)(n);return[e].concat(a()(r))}},7784:function(t,e,n){"use strict";n.d(e,{J:function(){return d},u:function(){return h}});var r=n(4479),a=n.n(r),i=n(8972),o=n(9093),u=n(8346),c=n(7600),s=n(789),l=n(8045),f=n(9198),h=function(t){var e=t.patterns,n=o.qS.highlight;if(!(0,i.size)(e))return[];var r=e[0].measure,a=[];return e.forEach((function(t){var e=(0,c.G)([t],{style:{fill:n}}),i=(0,s.b)([t],{formatter:u.Z,label:function(t){return"".concat(t.x,", ").concat(r,": ").concat(t.y)},style:{dy:-20,background:!0,backgroundRadius:2,connector:!0,startMarker:!0,startMarkerFill:"#1c1e2d",startMarkerFillOpacity:.65}});a.push({changePoint:[e,i]})})),a},d=function(t){var e=(0,l.c)(t),n=h(t),r=(0,f.d)(n);return[e].concat(a()(r))}},8821:function(t,e,n){"use strict";n.d(e,{J:function(){return s},_:function(){return l}});var r=n(4479),a=n.n(r),i=n(8723),o=n(8045),u=n(9198),c=n(8346),s=function(t){var e=t.patterns,n=[];return e.forEach((function(t){var e=t.mean,r=(0,i.F)({y:e},{label:"mean: ".concat((0,c.Z)(e))});n.push({meanLine:[r]})})),n},l=function(t){var e=(0,o.c)(t),n=s(t),r=(0,u.d)(n);return[e].concat(a()(r))}},6798:function(t,e,n){"use strict";n.d(e,{p:function(){return v},g:function(){return p}});var r=n(4479),a=n.n(r),i=n(3100),o=n.n(i),u=n(8045),c=n(1448),s=n.n(c),l=n(8723),f=n(7600),h="baseline",d="interval",p=function(t){var e=t.data,n=o()(t.dimensions,1)[0].fieldName,r=t.patterns,a=r[0],i=a.baselines,u=a.thresholds,c=e.map((function(t,e){var r=i[e],a=[r-Math.abs(u[0]),r+u[1]];return{baseline:{x:t[n],y:r},interval:{x:t[n],y:a}}})),p=function(t,e){var n=e.encode,r={style:e.style,tooltip:e.tooltip};return t?s()(s()({},r),{},{type:"area",data:t,encode:s()({x:"x",y:"y"},n)}):null}(c.map((function(t){return t[d]})),{encode:{shape:"smooth"},style:{fillOpacity:.3,fill:"#ffd8b8"},tooltip:{title:"",items:[function(t,e,n,r){return{name:d,value:"".concat(r.y.value[e],"-").concat(r.y1.value[e]),color:"#ffd8b8"}}]}}),v=c.map((function(t){return t[h]}));return[{trendLine:[(0,l.F)({points:v},{encode:{shape:"smooth"},style:{lineWidth:1,stroke:"#ffa45c",lineDash:void 0},tooltip:{title:"",items:[{name:h,channel:"y"}]}})],anomalyArea:[p],outliers:[(0,f.G)(r,{style:{fill:"#f4664a",stroke:"#f4664a"},tooltip:{title:"",items:[{name:"outlier",channel:"y"}]}})]}]},v=function(t){var e=(0,u.c)(t),n=p(t)[0]||{},r=n.trendLine,i=void 0===r?[]:r,o=n.anomalyArea,c=void 0===o?[]:o,s=n.outliers,l=void 0===s?[]:s;return[].concat(a()(c),a()(i),[e],a()(l))}},9660:function(t,e,n){"use strict";n.d(e,{D:function(){return f},q:function(){return l}});var r=n(4479),a=n.n(r),i=n(3100),o=n.n(i),u=n(8723),c=n(8045),s=n(8346),l=function(t){var e=t.data,n=o()(t.dimensions,1)[0].fieldName,r=t.patterns,a=e.map((function(t,e){var a=r[0].regression.points[e];return[t[n],a]})),i=o()(r[0].regression.equation,2),c=i[0],l=i[1],f=a.map((function(t){return{x:t[0],y:t[1]}}));return[{trendLine:[(0,u.F)({points:f},{label:"y=".concat((0,s.Z)(c),"x").concat(l<0?"":"+").concat((0,s.Z)(l))})]}]},f=function(t){var e,n,r=(0,c.c)(t),i=l(t);return[r].concat(a()(null!==(e=null===(n=i[0])||void 0===n?void 0:n.trendLine)&&void 0!==e?e:[]))}},8045:function(t,e,n){"use strict";n.d(e,{c:function(){return o}});var r=n(1448),a=n.n(r),i=n(9093),o=function(t){var e,n,r=t.data,o=t.patterns,u=t.dimensions,c=t.measures,s=o[0].type,l={data:r,encode:{x:u[0].fieldName,y:c[0].fieldName}};return"majority"===s?a()(a()({},l),{},{type:"interval",encode:{color:u[0].fieldName,y:c[0].fieldName},transform:[{type:"stackY"}],coordinate:{type:"theta",innerRadius:i.Cn.innerRadius,outerRadius:i.Cn.outerRadius},tooltip:{items:[{field:u[0].fieldName},{field:c[0].fieldName}]}}):"trend"===s||"time_series_outlier"===s||"change_point"===s?a()(a()({},l),{},{type:"line",style:{lineWidth:2}}):"category_outlier"===s||"low_variance"===s?a()(a()({},l),{},{type:"interval"}):"correlation"===s?a()(a()({},l),{},{type:"point",encode:{x:null===(e=c[0])||void 0===e?void 0:e.fieldName,y:null===(n=c[1])||void 0===n?void 0:n.fieldName}}):null}},8723:function(t,e,n){"use strict";n.d(e,{F:function(){return o}});var r=n(1448),a=n.n(r),i=n(9093),o=function(t,e){var n=t.points,r=t.x,o=t.y,u=e.encode,c=e.style,s=e.label,l=e.tooltip,f={style:a()({lineDash:[2,2],stroke:i.qS.highlight},c),labels:s?[{text:s,selector:"last",position:"right",style:{textBaseline:"bottom",textAlign:"end",dy:-24}}]:void 0,tooltip:l};return n?a()(a()({},f),{},{type:"line",data:n,encode:a()({x:"x",y:"y"},u)}):r?a()(a()({},f),{},{type:"lineX",data:[r]}):o?a()(a()({},f),{},{type:"lineY",data:[o]}):null}},7600:function(t,e,n){"use strict";n.d(e,{G:function(){return o}});var r=n(1448),a=n.n(r),i=n(8972),o=function(t,e){var n=[];return t.forEach((function(t){var e=t.x,r=t.y;(0,i.isNil)(e)||(0,i.isNil)(r)||n.push({x:e,y:r})})),a()({type:"point",data:n,encode:{x:"x",y:"y"}},e)}},789:function(t,e,n){"use strict";n.d(e,{b:function(){return s}});var r=n(1448),a=n.n(r),i=n(9057),o=n.n(i),u=n(8972),c=n(9093),s=function(t,e){var n=e||{},r=n.style,i=n.label,s=n.formatter,l=t[0],f=l.measure,h=l.dimension;return{type:"text",data:t.map((function(t){var e=(0,u.isFunction)(i)?i(t):i,n=(0,u.isFunction)(s)?s(t.y):t.y;return o()(o()(o()({},h,t.x),f,t.y),"label",null!=e?e:"".concat(t.x,"\n").concat(n))})),encode:{x:h,y:f,text:"label"},style:a()(a()({},c.gN),r)}}},8586:function(t,e,n){"use strict";n.d(e,{d:function(){return i}});var r=n(1448),a=n.n(r),i=function(t,e){var n=e.patterns.map((function(t){return t.type})).includes("majority")?{scale:{y:{nice:!1}}}:{scale:{y:{nice:!0}}};return a()({type:"view",theme:"dark",axis:{x:{labelAutoHide:!0,labelAutoRotate:!1,title:!1},y:{title:!1}},interaction:{tooltip:{groupName:!1}},legend:!1,children:t},n)}},9198:function(t,e,n){"use strict";n.d(e,{d:function(){return a}});var r=n(8972),a=function(t){return(0,r.flattenDeep)((0,r.map)(t,(function(t){return Object.values(t)})))}},4977:function(t,e,n){"use strict";n.d(e,{B3:function(){return f},GT:function(){return h},K2:function(){return s},Mi:function(){return d},O2:function(){return u},Pe:function(){return i},a4:function(){return o},bc:function(){return r},qy:function(){return l},xq:function(){return c},yZ:function(){return a}});var r=.95,a=.05,i=.01,o=.2,u=20,c=1.5,s=2,l=["category_outlier","trend","change_point","time_series_outlier","majority","low_variance","correlation"],f="The input does not meet the requirements.",h="No insights were found at the specified significance threshold.",d=.15},9125:function(t,e,n){"use strict";n.d(e,{M:function(){return i}});var r=n(8972),a=function(t){var e,n,a,i=t.data,o=t.subjectInfo,u=t.fieldPropsMap,c=t.lom,s=o.dimensions;return(null==i?void 0:i.length)<3?"The data length is less than 3. ":function(t,e,n){var r=t.dimensions,a=t.measures;return r.length===e&&a.length===n}(o,1,1)?!!(Array.isArray(c)?null!==(e=(0,r.intersection)(null===(n=u[s[0]])||void 0===n?void 0:n.levelOfMeasurements,c))&&void 0!==e&&e.length:null!==(a=u[s[0]])&&void 0!==a&&null!==(a=a.levelOfMeasurements)&&void 0!==a&&a.includes(c))||"The type of the dimension field is not included in the option ".concat(Array.isArray(c)?c:[c],". "):"The length of the measure or dimension is not 1. "},i={category_outlier:function(t){var e=t.data,n=t.subjectInfo,r=t.fieldPropsMap;return a({data:e,subjectInfo:n,fieldPropsMap:r,lom:["Nominal","Discrete","Ordinal"]})},trend:function(t){var e=t.data,n=t.subjectInfo,r=t.fieldPropsMap;return a({data:e,subjectInfo:n,fieldPropsMap:r,lom:"Time"})},change_point:function(t){var e=t.data,n=t.subjectInfo,r=t.fieldPropsMap;return a({data:e,subjectInfo:n,fieldPropsMap:r,lom:"Time"})},time_series_outlier:function(t){var e=t.data,n=t.subjectInfo,r=t.fieldPropsMap;return a({data:e,subjectInfo:n,fieldPropsMap:r,lom:"Time"})},low_variance:function(t){var e=t.data,n=t.subjectInfo,r=t.fieldPropsMap,i=a({data:e,subjectInfo:n,fieldPropsMap:r,lom:["Nominal","Discrete","Ordinal"]});if(!0!==i)return i;var o=n.measures;return["float","integer"].includes(r[o[0].fieldName].recommendation)?0!==r[o[0].fieldName].mean||"The low variance test uses the coefficient of variation sigma/mean as the test statistic and requires that the mean cannot be 0. ":"The recommended data type of measure is not float or integer. "},correlation:function(t){var e,n,r=t.data,a=t.subjectInfo,i=t.fieldPropsMap,o=a.measures;return(null==r?void 0:r.length)<3?"The data length is less than 3. ":2!==o.length?"The length of the measure or dimension is not 2. ":!(null===(e=i[o[0].fieldName].levelOfMeasurements)||void 0===e||!e.includes("Continuous")||null===(n=i[o[1].fieldName].levelOfMeasurements)||void 0===n||!n.includes("Continuous"))||"Level of measurement is not continuous. "}}},1484:function(t,e,n){"use strict";n.d(e,{ew:function(){return F}});var r=n(4479),a=n.n(r),i=n(8972),o=n(2616);function u(t,e){var n=null==t,r=null==e;return n&&r?0:n?1:r?-1:t-e}function c(t,e){var n=e*t.length,r=Math.ceil(n);return r===n?0===r?t[0]:r===t.length?t[t.length-1]:(t[r-1]+t[r])/2:t[r-1]}var s={IQR:function(t,e){var n=(null==e?void 0:e.k)||1.5,r=t.slice().sort(u),a=c(r,.25),i=c(r,.75),o=i-a,s={upper:{threshold:0,indexes:[]},lower:{threshold:0,indexes:[]}};return s.lower.threshold=a-n*o,s.upper.threshold=i+n*o,t.forEach((function(t,e){t<=s.lower.threshold?s.lower.indexes.push(e):t>=s.upper.threshold&&s.upper.indexes.push(e)})),s}},l=n(4977),f=n(6845),h=function(t,e){var n=e||{},r=n.method,u=n.iqrK,c=n.confidenceInterval,h=void 0===c?l.bc:c,d=[],p=[],v=t.map((function(t,e){return{index:e,value:t}}));if("p-value"!==r){var m=s.IQR(t,{k:null!=u?u:l.xq}),g=m.lower.indexes,y=m.upper.indexes;[].concat(a()(g),a()(y)).forEach((function(e){var n=t[e],r=(v.findIndex((function(t){return t.value===n}))+1)/t.length,a=r>.5?r:1-r;d.push({index:e,value:n,significance:a})})),p.push(m.lower.threshold,m.upper.threshold)}else{var b=(0,i.orderBy)(v,(function(e){return Math.abs((0,o.J6)(t)-e.value)}),["desc"]);p.push.apply(p,a()((0,f.ZJ)(t,h,"two-sided")));for(var _=0;_<b.length;_+=1){var w=b[_],x=w.value,M=w.index,k=1-(0,f.Mc)(t,x,"two-sided");if(k<h)break;d.push({index:M,value:x,significance:k})}}return{outliers:d,thresholds:p}},d=n(660),p=n.n(d);function v(t){return t>0?1:t<0?-1:0}function m(t){for(var e=t.slice().sort(),n=[e[0]],r=[1],a=1;a<e.length;a+=1)e[a]!==n[n.length-1]?(n.push(e[a]),r.push(1)):r[r.length-1]+=1;return[n,r]}function g(t){for(var e=t.slice().sort(),n=[],r=0;r<t.length;r+=1){var a=t[r],o=e.indexOf(a)+1,u=(0,i.lastIndexOf)(e,a)+1;n.push(o===u?o:(o+u)/2)}return n}function y(t,e){var n=null==t?void 0:t.length,r=g(t),a=Math.abs(2*(0,i.sumBy)(r.slice(0,e))-e*(n+1));return 2*Math.exp(-6*Math.pow(a,2)/(Math.pow(n,2)+Math.pow(n,3)))}function b(t,e){return Math.abs(t.data-e.data)>=1}function _(t,e,n){var r=null==t?void 0:t.length,a=n||4;if(r<=2*a+3)return 0;for(var o=Array(r).fill(0),u=a;u<=r-a;u+=1){var c=(0,i.mean)(t.slice(u-a,u)),s=(0,i.mean)(t.slice(u,u+a));o[u]=Math.abs(c-s)}return(0,f.Mc)(o.slice(a,r-a+1),o[e])}var w=n(3125);var x={Bayesian:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=new(p())({breakpointVerifier:b,chunkSize:t.length,iteratee:function(t){return t}});e.exec(t);var n=e.breakPoints().map((function(e){return{index:e.index,significance:1-y(t,e.index)}}));return n},Window:function(t,e){var n=null==t?void 0:t.length,r=(null==e?void 0:e.windowSize)||4;if(n<=2*r+3)return[];for(var a=(null==e?void 0:e.significanceLimit)||l.bc,o=Array(n).fill(0),u=r;u<=n-r;u+=1){var c=(0,i.mean)(t.slice(u-r,u)),s=(0,i.mean)(t.slice(u,u+r));o[u]=Math.abs(c-s)}for(var h=o.slice(r,n-r+1),d=h.sort((function(t,e){return e-t})),p=[],v=function(){var t=d[m],e=o.findIndex((function(e){return e===t})),n=1-(0,f.Mc)(h,t);n>=a&&p.push({index:e,significance:n})},m=0;m<d.length;m+=1)v();return p},PettittTest:function(t){for(var e=null==t?void 0:t.length,n=g(t),r=0,a=-1,o=0;o<e;o+=1){var u=Math.abs(2*(0,i.sumBy)(n.slice(0,o))-o*(e+1));u>r&&(r=u,a=o)}return{index:a,significance:1-2*Math.exp(-6*Math.pow(r,2)/(Math.pow(e,2)+Math.pow(e,3)))}},BuishandUTest:function(t){var e=null==t?void 0:t.length,n=(0,i.mean)(t),r=t.map((function(e,r){return(0,i.sum)(t.slice(0,r+1))-n*(r+1)})),a=(0,i.sumBy)(r.slice(0,e-1),(function(t){return Math.pow(t,2)}))/(e*(e+1)),o=(0,w.D)(r),u=r.findIndex((function(t){return t===o}));return{uValue:a,index:u,significance:1-_(t,u)}}},M=n(1448),k=n.n(M),C=n(7201),A=n(7714);var T=n(1438),S=function(t){for(var e=[],n=function(n){e.push(t.map((function(t){return t[n]})))},r=0;r<t[0].length;r+=1)n(r);return e},O=function(t,e){var n;if((null===(n=t[0])||void 0===n?void 0:n.length)!==e.length)return null;var r=[],a=S(e);return t.forEach((function(t){return r.push(a.map((function(e){return function(t,e){if(t.length!==e.length)return null;var n=0;return t.forEach((function(t,r){n+=t*e[r]})),n}(t,e)})))})),r},N=function(t){for(var e=t[0],n=1;n<t.length;n+=1)e=O(e,t[n]);return e},P=function(t,e,n){var r,a,i,o=[(0,T.F6)(t.length),t],u=S(o),c=S([e]),s=(r=n).map((function(t,e){var n=Array(r.length).fill(0);return n[e]=t,n})),l=(a=N([o,s,u]),i=a[0][0]*a[1][1]-a[0][1]*a[1][0],[[a[1][1]/i,-a[0][1]/i],[-a[1][0]/i,a[0][0]/i]]);return N([l,o,s,c])},D=function(t,e,n){for(var r=t.length,a=(0,i.mergeWith)(A.L,n,(function(t,e){return null!=e?e:t})),u=Math.ceil(r*a.f),c=t.map((function(e){return t.map((function(t){return Math.abs(e-t)})).sort((function(t,e){return t-e}))[u]})),s=t.map((function(e,n){return t.map((function(t){return function(t){return!(0,i.isNumber)(t)||Math.abs(t)>=1?0:Math.pow(1-Math.pow(Math.abs(t),3),3)}((t-e)/c[n])}))})),l=(0,T.F6)(r),f=(0,T.Yc)(r),h=function(){for(var n=0;n<r;n+=1){var a=s[n].map((function(t,e){return t*l[e]})),u=P(t,e,a);f[n]=u[0][0]+u[1][0]*t[n]}var c=function(t,e){return t.length!==e.length?null:t.map((function(t,n){return t-e[n]}))}(e,f),h=(0,o.C2)(c.map((function(t){return Math.abs(t)})));c.forEach((function(t,e){l[e]=function(t){return!(0,i.isNumber)(t)||Math.abs(t)>=1?0:Math.pow(1-Math.pow(t,2),2)}(t/(6*h))}))},d=0;d<a.nSteps;d+=1)h();return{y:f}};var I=n(7914),j=n.n(I),R=n(3100),L=n.n(R),E=n(609),z=n(8604);var B={mkTest:function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.05,n=null==t?void 0:t.length,r=0,a=0;a<n-1;a+=1)for(var o=a+1;o<n;o+=1)r+=v(t[o]-t[a]);var u=m(t),c=L()(u,2),s=c[0],l=c[1],f=s.length,h=(n*(n-1)*(2*n+5)-(f===n?0:(0,i.sumBy)(l,(function(t){return t*(t-1)*(2*t+5)}))))/18,d=0;r>0?d=(r-1)/Math.sqrt(h):r<0&&(d=(r+1)/Math.sqrt(h));var p=2*(1-(0,E.s)(Math.abs(d),0,1)),g=Math.abs(d)>(0,z.T)(1-e/2,0,1),y="no trend";return d<0&&g?y="decreasing":d>0&&g&&(y="increasing"),{trend:y,pValue:p,zScore:d}}};var Q={category_outlier:function(t){var e=(0,f.BB)(t),n="category_outlier";if((0,i.isString)(e))return(0,f.rx)({detailInfo:e,insightType:n,infoType:"verificationFailure"});var r=(0,f.lh)(t),a=r.dimension,u=r.values,c=r.measure;if((0,i.isNil)(a)||(0,i.isNil)(c))return(0,f.rx)({detailInfo:"Measure or dimension is empty.",insightType:n,infoType:"verificationFailure"});if(1===(0,o.EB)(u))return(0,f.rx)({insightType:n,infoType:"noInsight",customInfo:{info:"Each value in the data is the same. No outliers were found."}});var s=t.data,l=(0,i.get)(t,"options.algorithmParameter.outlier"),d=h(u,l).outliers;if(0===d.length){var p="No outliers were found using method ".concat("p-value"!==(null==l?void 0:l.method)?"Inter Quartile Range":"Normal Distribution test",".");return(0,f.rx)({insightType:n,infoType:"noInsight",customInfo:{info:p}})}return d.map((function(t){var e=t.index,r=t.significance;return{type:n,dimension:a,measure:c,significance:r,index:e,x:s[e][a],y:s[e][c],significantInsight:!0}}))},trend:function(t){var e,n=(0,f.BB)(t),r="trend";if((0,i.isString)(n))return(0,f.rx)({detailInfo:n,insightType:r,infoType:"verificationFailure"});var a=(0,f.lh)(t),o=a.dimension,u=a.values,c=a.measure;if((0,i.isNil)(o)||(0,i.isNil)(c))return(0,f.rx)({detailInfo:"Measure or dimension is empty.",insightType:r,infoType:"verificationFailure"});var s=(0,i.get)(t,"options.algorithmParameter.trend"),h=function(t,e){var n,r=null!==(n=null==e?void 0:e.threshold)&&void 0!==n?n:l.yZ,a=B.mkTest(t,r),i=a.pValue,o=a.trend,u=j().linear(t.map((function(t,e){return[e,t]}))),c=u.r2,s=u.points,f=u.equation;return{trend:o,significance:1-i,regression:{r2:c,points:s.map((function(t){return t[1]})),equation:f}}}(u,s);return[k()(k()({},h),{},{type:"trend",dimension:o,measure:c},"no trend"===h.trend?{significantInsight:!1,info:"The Mann-Kendall (MK) test does not pass at the specified significance level ".concat(null!==(e=null==s?void 0:s.threshold)&&void 0!==e?e:l.yZ,".")}:{significantInsight:!0})]},change_point:function(t){var e=(0,f.BB)(t),n="change_point";if((0,i.isString)(e))return(0,f.rx)({detailInfo:e,insightType:n,infoType:"verificationFailure"});var r=t.data,a=(0,f.lh)(t),o=a.dimension,u=a.values,c=a.measure;if((0,i.isNil)(o)||(0,i.isNil)(c))return(0,f.rx)({detailInfo:"Measure or dimension is empty.",insightType:n,infoType:"verificationFailure"});var s=function(t,e){var n,r=x.Bayesian(t),a=[],i=1-(null!==(n=null==e?void 0:e.threshold)&&void 0!==n?n:l.Mi);return r.forEach((function(t){(null==t?void 0:t.index)>=0&&(null==t?void 0:t.significance)>=i&&a.push(t)})),a}(u,(0,i.get)(t,"options.algorithmParameter.changePoint"));if(0===s.length){return(0,f.rx)({insightType:n,infoType:"noInsight",customInfo:{info:"Bayesian Online Changepoint Detection does not pass."}})}var h=[];return s.forEach((function(t){var e=t.index,a=t.significance;(0,i.isNil)(r[e])||h.push({type:n,dimension:o,measure:c,significance:a,index:e,x:r[e][o],y:r[e][c],significantInsight:!0})})),h},time_series_outlier:function(t){var e=(0,f.BB)(t),n="time_series_outlier";if((0,i.isString)(e))return(0,f.rx)({detailInfo:e,insightType:n,infoType:"verificationFailure"});var r=t.data,a=(0,f.lh)(t),u=a.dimension,c=a.values,s=a.measure;if((0,i.isNil)(u)||(0,i.isNil)(s))return(0,f.rx)({detailInfo:"Measure or dimension is empty.",insightType:n,infoType:"verificationFailure"});if(1===(0,o.EB)(c))return(0,f.rx)({insightType:n,infoType:"noInsight"});var d=function(t,e){var n=Array(t.length).fill(0).map((function(t,e){return e})),r=D(n,t,{nSteps:l.K2}),a=t.map((function(t,e){return t-r.y[e]})),i=h(a,e),o=i.outliers,u=i.thresholds;return{outliers:o,baselines:r.y,thresholds:u}}(c,(0,i.get)(t,"options.algorithmParameter.outlier")),p=d.outliers,v=d.baselines,m=d.thresholds;return 0===p.length?(0,f.rx)({insightType:n,infoType:"noInsight",customInfo:{baselines:v,thresholds:m,dimension:u,measure:s,info:"No outliers were found."}}):p.map((function(t){var e=t.index,a=t.significance;return{type:n,dimension:u,measure:s,significance:a,index:e,x:r[e][u],y:r[e][s],baselines:v,thresholds:m,significantInsight:!0}}))},majority:function(t){var e=(0,f.BB)(t),n="majority";if((0,i.isString)(e))return(0,f.rx)({detailInfo:e,insightType:n,infoType:"verificationFailure"});var r=t.data,a=(0,f.lh)(t),o=a.dimension,u=a.values,c=a.measure;if((0,i.isNil)(o)||(0,i.isNil)(c))return(0,f.rx)({detailInfo:"Measure or dimension is empty.",insightType:n,infoType:"verificationFailure"});var s=(0,i.get)(t,"options.algorithmParameter.majority"),l=function(t,e){for(var n=0,r=-1/0,a=-1,i=0;i<(null==t?void 0:t.length);i+=1)n+=t[i],t[i]>r&&(r=t[i],a=i);var o=(null==e?void 0:e.limit)||.6;if(0===n)return null;var u=r/n;return u>o&&u<1?{index:a,value:r,proportion:u,significance:u}:null}(u,s);if(l){var h=l.significance,d=l.index;return[{type:n,dimension:o,measure:c,significance:h,index:d,proportion:l.proportion,x:r[d][o],y:r[d][c],significantInsight:!0}]}var p="After disassembling with the given dimension, the proportion of the maximum value does not exceed ".concat((null==s?void 0:s.limit)||.6,".");return(0,f.rx)({insightType:n,infoType:"noInsight",customInfo:{info:p,dimension:o,measure:c}})},low_variance:function(t){var e=(0,f.BB)(t),n="low_variance";if((0,i.isString)(e))return(0,f.rx)({detailInfo:e,insightType:n,infoType:"verificationFailure"});var r=(0,f.lh)(t),a=r.dimension,u=r.values,c=r.measure;if((0,i.isNil)(a)||(0,i.isNil)(c))return(0,f.rx)({detailInfo:"Measure or dimension is empty.",insightType:n,infoType:"verificationFailure"});var s=(0,i.get)(t,"options.algorithmParameter.lowVariance"),l=function(t,e){var n=(0,o.eu)(t);return n>=((null==e?void 0:e.cvThreshold)||.15)?null:{significance:1-n,mean:(0,o.J6)(t)}}(u,s);if(l)return[{type:n,dimension:a,measure:c,significance:l.significance,mean:l.mean,significantInsight:!0}];var h="The coefficient of variance of the data is greater than ".concat((null==s?void 0:s.cvThreshold)||.15,". The data does not follow a uniform distribution.");return(0,f.rx)({insightType:n,infoType:"noInsight",customInfo:{info:h}})},correlation:function(t){var e,n,r=(0,f.BB)(t),a="correlation",o=t.data,u=t.measures,c=t.dimensions,s=t.options;if((0,i.isString)(r)||!c)return(0,f.rx)(k()({insightType:a,infoType:"verificationFailure"},(0,i.isString)(r)?{detailInfo:r}:{}));var l=u[0].fieldName,h=u[1].fieldName,d=o.map((function(t){return null==t?void 0:t[l]})),p=o.map((function(t){return null==t?void 0:t[h]})),v=null==s||null===(e=s.algorithmParameter)||void 0===e?void 0:e.correlation,m=function(t,e,n){var r=(0,C.Z)(t,e,n),a=r.rejected,i=r.pcorr;return a?{pcorr:i,significance:Math.abs(i)}:null}(d,p,v);if(m)return[k()(k()({},m),{},{type:a,measures:[l,h],significantInsight:!0})];var g="The Pearson product-moment correlation test does not pass at the specified significance level ".concat(null!==(n=null==v?void 0:v.alpha)&&void 0!==n?n:A.a.alpha,".");return(0,f.rx)({insightType:a,infoType:"noInsight",customInfo:{info:g}})}},F=function(t){var e=t.insightType,n=void 0===e?"trend":e,r=(t.options||{}).filterInsight,o=void 0!==r&&r,u=Q[n];return(0,i.isFunction)(u)?(0,i.flow)([u].concat(a()(o?[f.te]:[])))(t):[]}},6845:function(t,e,n){"use strict";n.d(e,{BB:function(){return v},Mc:function(){return h},Mo:function(){return y},ZJ:function(){return d},lh:function(){return p},rx:function(){return m},te:function(){return g}});var r=n(1448),a=n.n(r),i=n(8972),o=n(2616),u=n(609),c=n(8604),s=n(2434),l=n(4977),f=n(9125),h=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"two-sided",r=(0,i.mean)(t),a=(0,o.IN)(t),c=(0,u.s)(e,r,a);return"two-sided"===n?c<.5?2*c:2*(1-c):"less"===n?c:1-c},d=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"two-sided",r=(0,i.mean)(t),a=(0,o.IN)(t),u=1-e;return"greater"===n?[(0,c.T)(e,r,a),(0,o.Fp)(t)]:"less"===n?[(0,o.VV)(t),(0,c.T)(u,r,a)]:[(0,c.T)(u/2,r,a),(0,c.T)(e+u/2,r,a)]},p=function(t){var e,n,r=t.data,a=t.dimensions,i=t.measures,o=null==a||null===(e=a[0])||void 0===e?void 0:e.fieldName,u=null==i||null===(n=i[0])||void 0===n?void 0:n.fieldName,c=r.map((function(t){return Number(null==t?void 0:t[u])}));return{dimension:o,measure:u,values:c}},v=function(t){var e=t.data,n=t.dimensions,r=t.measures,a=t.options,i=t.insightType,o=a||{},u=o.dataValidation,c=void 0!==u&&u,l=o.dataProcessInfo;if(!e||0===e.length)return"No data. ";if(!c)return!0;var h=e.filter((function(t){return!Object.values(t).some((function(t){return null==t}))})),d=(0,s.mn)(h,l).reduce((function(t,e){return t[e.name]=e,t}),{}),p=f.M[i];return!p||p({data:e,subjectInfo:{dimensions:null==n?void 0:n.map((function(t){return t.fieldName})),measures:r,subspace:[]},fieldPropsMap:d})},m=function(t){var e=t.infoType,n=t.insightType,r=t.detailInfo,i=void 0===r?"":r,o=t.customInfo,u=void 0===o?{}:o,c="".concat(i).concat("noInsight"===e?l.GT:l.B3);return[a()({significantInsight:!1,type:n,info:c,significance:0},u)]},g=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t.filter((function(t){return t.significantInsight}))},y=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t.filter((function(t){return![t.baselines,t.thresholds,t.x].every(i.isNil)}))}},7730:function(t,e,n){"use strict";n.d(e,{Z:function(){return Nn}});var r={};n.r(r),n.d(r,{CategoryNarrativeStrategy:function(){return wn},ChangePointNarrativeStrategy:function(){return y},CommonnessNarrativeStrategy:function(){return Cn},CorrelationNarrativeStrategy:function(){return Mn},ExceptionNarrativeStrategy:function(){return Sn},LowVarianceNarrativeStrategy:function(){return bn},MajorityNarrativeStrategy:function(){return gn},TimeSeriesOutlierNarrativeStrategy:function(){return hn},TrendNarrativeStrategy:function(){return vn}});var a=n(4528),i=n.n(a),o=n(8798),u=n.n(o),c=n(9057),s=n.n(c),l=n(7267),f=n.n(l),h=n(9913),d=n.n(h),p=n(8972),v=n(8670),m=u()((function t(){i()(this,t)}));s()(m,"insightType",void 0),s()(m,"structures",void 0),s()(m,"structureTemps",void 0);var g={dateRange:{varType:"time_desc"},total:{varType:"metric_value"},measure:{varType:"metric_name"}},y=function(t){f()(n,t);var e=d()(n);function n(){return i()(this,n),e.apply(this,arguments)}return u()(n,[{key:"generateTextSpec",value:function(t,e){var r=t.patterns,a=t.data,i=r[0].dimension;return(0,v.Z)({structures:n.structures[e],variable:{dateRange:"".concat((0,p.first)(a)[i],"~").concat((0,p.last)(a)[i]),measure:r[0].measure,total:r.length}}).sections[0].paragraphs}}]),n}(m);s()(y,"insightType","change_point"),s()(y,"structures",{"zh-CN":[{template:"${measure} 在 ${dateRange} 中,共出现 ${total} 次较大变化,值得关注。",variableMetaMap:g}],"en-US":[{template:"${total} major changes detected for ${measure} during ${dateRange}",variableMetaMap:g}]});var b=n(1448),_=n.n(b),w=function(t,e){return t>0?"en-US"===e?"more than":"超过":t<0?"en-US"===e?"less than":"少于":"en-US"===e?"equal":"持平"},x={change_point:"突变点",time_series_outlier:"时序异常值",trend:"趋势",majority:"主要因素",low_variance:"分布均匀",category_outlier:"异常值",correlation:"相关性"},M=function(t,e){return"en-US"===e?(0,p.lowerCase)(t):x[t]},k=function(t){return"zh-CN"===t?",":", "};function C(t){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},C(t)}function A(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function T(t){A(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===C(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function S(t,e){A(2,arguments);var n=T(t),r=T(e);return n.getFullYear()===r.getFullYear()}function O(t,e){A(2,arguments);var n=T(t),r=T(e);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function N(t){A(1,arguments);var e=T(t);return e.setHours(0,0,0,0),e}function P(t,e){A(2,arguments);var n=N(t),r=N(e);return n.getTime()===r.getTime()}function D(t){return A(1,arguments),t instanceof Date||"object"===C(t)&&"[object Date]"===Object.prototype.toString.call(t)}function I(t){if(A(1,arguments),!D(t)&&"number"!=typeof t)return!1;var e=T(t);return!isNaN(Number(e))}function j(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function R(t,e){A(2,arguments);var n=T(t).getTime(),r=j(e);return new Date(n+r)}function L(t,e){A(2,arguments);var n=j(e);return R(t,-n)}var E=864e5;function z(t){A(1,arguments);var e=1,n=T(t),r=n.getUTCDay(),a=(r<e?7:0)+r-e;return n.setUTCDate(n.getUTCDate()-a),n.setUTCHours(0,0,0,0),n}function B(t){A(1,arguments);var e=T(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var a=z(r),i=new Date(0);i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0);var o=z(i);return e.getTime()>=a.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function Q(t){A(1,arguments);var e=B(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=z(n);return r}var F=6048e5;var q={};function G(){return q}function W(t,e){var n,r,a,i,o,u,c,s;A(1,arguments);var l=G(),f=j(null!==(n=null!==(r=null!==(a=null!==(i=null==e?void 0:e.weekStartsOn)&&void 0!==i?i:null==e||null===(o=e.locale)||void 0===o||null===(u=o.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==a?a:l.weekStartsOn)&&void 0!==r?r:null===(c=l.locale)||void 0===c||null===(s=c.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==n?n:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=T(t),d=h.getUTCDay(),p=(d<f?7:0)+d-f;return h.setUTCDate(h.getUTCDate()-p),h.setUTCHours(0,0,0,0),h}function U(t,e){var n,r,a,i,o,u,c,s;A(1,arguments);var l=T(t),f=l.getUTCFullYear(),h=G(),d=j(null!==(n=null!==(r=null!==(a=null!==(i=null==e?void 0:e.firstWeekContainsDate)&&void 0!==i?i:null==e||null===(o=e.locale)||void 0===o||null===(u=o.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==a?a:h.firstWeekContainsDate)&&void 0!==r?r:null===(c=h.locale)||void 0===c||null===(s=c.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==n?n:1);if(!(d>=1&&d<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(f+1,0,d),p.setUTCHours(0,0,0,0);var v=W(p,e),m=new Date(0);m.setUTCFullYear(f,0,d),m.setUTCHours(0,0,0,0);var g=W(m,e);return l.getTime()>=v.getTime()?f+1:l.getTime()>=g.getTime()?f:f-1}function Y(t,e){var n,r,a,i,o,u,c,s;A(1,arguments);var l=G(),f=j(null!==(n=null!==(r=null!==(a=null!==(i=null==e?void 0:e.firstWeekContainsDate)&&void 0!==i?i:null==e||null===(o=e.locale)||void 0===o||null===(u=o.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==a?a:l.firstWeekContainsDate)&&void 0!==r?r:null===(c=l.locale)||void 0===c||null===(s=c.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==n?n:1),h=U(t,e),d=new Date(0);d.setUTCFullYear(h,0,f),d.setUTCHours(0,0,0,0);var p=W(d,e);return p}var $=6048e5;function H(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var V={y:function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return H("yy"===e?r%100:r,e.length)},M:function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):H(n+1,2)},d:function(t,e){return H(t.getUTCDate(),e.length)},a:function(t,e){var n=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(t,e){return H(t.getUTCHours()%12||12,e.length)},H:function(t,e){return H(t.getUTCHours(),e.length)},m:function(t,e){return H(t.getUTCMinutes(),e.length)},s:function(t,e){return H(t.getUTCSeconds(),e.length)},S:function(t,e){var n=e.length,r=t.getUTCMilliseconds();return H(Math.floor(r*Math.pow(10,n-3)),e.length)}},J="midnight",Z="noon",K="morning",X="afternoon",tt="evening",et="night",nt={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var r=t.getUTCFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return V.y(t,e)},Y:function(t,e,n,r){var a=U(t,r),i=a>0?a:1-a;return"YY"===e?H(i%100,2):"Yo"===e?n.ordinalNumber(i,{unit:"year"}):H(i,e.length)},R:function(t,e){return H(B(t),e.length)},u:function(t,e){return H(t.getUTCFullYear(),e.length)},Q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return H(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return H(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){var r=t.getUTCMonth();switch(e){case"M":case"MM":return V.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return H(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){var a=function(t,e){A(1,arguments);var n=T(t),r=W(n,e).getTime()-Y(n,e).getTime();return Math.round(r/$)+1}(t,r);return"wo"===e?n.ordinalNumber(a,{unit:"week"}):H(a,e.length)},I:function(t,e,n){var r=function(t){A(1,arguments);var e=T(t),n=z(e).getTime()-Q(e).getTime();return Math.round(n/F)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):H(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):V.d(t,e)},D:function(t,e,n){var r=function(t){A(1,arguments);var e=T(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime(),a=n-r;return Math.floor(a/E)+1}(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):H(r,e.length)},E:function(t,e,n){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var a=t.getUTCDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return H(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var a=t.getUTCDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return H(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getUTCDay(),a=0===r?7:r;switch(e){case"i":return String(a);case"ii":return H(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r,a=t.getUTCHours();switch(r=12===a?Z:0===a?J:a/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r,a=t.getUTCHours();switch(r=a>=17?tt:a>=12?X:a>=4?K:et,e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return V.h(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):V.H(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):H(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):H(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):V.m(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):V.s(t,e)},S:function(t,e){return V.S(t,e)},X:function(t,e,n,r){var a=(r._originalDate||t).getTimezoneOffset();if(0===a)return"Z";switch(e){case"X":return at(a);case"XXXX":case"XX":return it(a);default:return it(a,":")}},x:function(t,e,n,r){var a=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return at(a);case"xxxx":case"xx":return it(a);default:return it(a,":")}},O:function(t,e,n,r){var a=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+rt(a,":");default:return"GMT"+it(a,":")}},z:function(t,e,n,r){var a=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+rt(a,":");default:return"GMT"+it(a,":")}},t:function(t,e,n,r){var a=r._originalDate||t;return H(Math.floor(a.getTime()/1e3),e.length)},T:function(t,e,n,r){return H((r._originalDate||t).getTime(),e.length)}};function rt(t,e){var n=t>0?"-":"+",r=Math.abs(t),a=Math.floor(r/60),i=r%60;if(0===i)return n+String(a);var o=e||"";return n+String(a)+o+H(i,2)}function at(t,e){return t%60==0?(t>0?"-":"+")+H(Math.abs(t)/60,2):it(t,e)}function it(t,e){var n=e||"",r=t>0?"-":"+",a=Math.abs(t);return r+H(Math.floor(a/60),2)+n+H(a%60,2)}var ot=nt,ut=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},ct=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},st={p:ct,P:function(t,e){var n,r=t.match(/(P+)(p+)?/)||[],a=r[1],i=r[2];if(!i)return ut(t,e);switch(a){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",ut(a,e)).replace("{{time}}",ct(i,e))}},lt=st;function ft(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}var ht=["D","DD"],dt=["YY","YYYY"];function pt(t){return-1!==ht.indexOf(t)}function vt(t){return-1!==dt.indexOf(t)}function mt(t,e,n){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var gt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},yt=function(t,e,n){var r,a=gt[t];return r="string"==typeof a?a:1===e?a.one:a.other.replace("{{count}}",e.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function bt(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.width?String(e.width):t.defaultWidth,r=t.formats[n]||t.formats[t.defaultWidth];return r}}var _t={date:bt({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:bt({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:bt({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},wt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},xt=function(t,e,n,r){return wt[t]};function Mt(t){return function(e,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&t.formattingValues){var a=t.defaultFormattingWidth||t.defaultWidth,i=null!=n&&n.width?String(n.width):a;r=t.formattingValues[i]||t.formattingValues[a]}else{var o=t.defaultWidth,u=null!=n&&n.width?String(n.width):t.defaultWidth;r=t.values[u]||t.values[o]}return r[t.argumentCallback?t.argumentCallback(e):e]}}var kt={ordinalNumber:function(t,e){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Mt({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Mt({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Mt({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Mt({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Mt({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function Ct(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(a);if(!i)return null;var o,u=i[0],c=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],s=Array.isArray(c)?Tt(c,(function(t){return t.test(u)})):At(c,(function(t){return t.test(u)}));o=t.valueCallback?t.valueCallback(s):s,o=n.valueCallback?n.valueCallback(o):o;var l=e.slice(u.length);return{value:o,rest:l}}}function At(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}function Tt(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}var St,Ot={ordinalNumber:(St={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.match(St.matchPattern);if(!n)return null;var r=n[0],a=t.match(St.parsePattern);if(!a)return null;var i=St.valueCallback?St.valueCallback(a[0]):a[0];i=e.valueCallback?e.valueCallback(i):i;var o=t.slice(r.length);return{value:i,rest:o}}),era:Ct({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Ct({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Ct({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Ct({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Ct({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},Nt={code:"en-US",formatDistance:yt,formatLong:_t,formatRelative:xt,localize:kt,match:Ot,options:{weekStartsOn:0,firstWeekContainsDate:1}},Pt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Dt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,It=/^'([^]*?)'?$/,jt=/''/g,Rt=/[a-zA-Z]/;function Lt(t,e,n){var r,a,i,o,u,c,s,l,f,h,d,p,v,m,g,y,b,_;A(2,arguments);var w=String(e),x=G(),M=null!==(r=null!==(a=null==n?void 0:n.locale)&&void 0!==a?a:x.locale)&&void 0!==r?r:Nt,k=j(null!==(i=null!==(o=null!==(u=null!==(c=null==n?void 0:n.firstWeekContainsDate)&&void 0!==c?c:null==n||null===(s=n.locale)||void 0===s||null===(l=s.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==u?u:x.firstWeekContainsDate)&&void 0!==o?o:null===(f=x.locale)||void 0===f||null===(h=f.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1);if(!(k>=1&&k<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var C=j(null!==(d=null!==(p=null!==(v=null!==(m=null==n?void 0:n.weekStartsOn)&&void 0!==m?m:null==n||null===(g=n.locale)||void 0===g||null===(y=g.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==v?v:x.weekStartsOn)&&void 0!==p?p:null===(b=x.locale)||void 0===b||null===(_=b.options)||void 0===_?void 0:_.weekStartsOn)&&void 0!==d?d:0);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!M.localize)throw new RangeError("locale must contain localize property");if(!M.formatLong)throw new RangeError("locale must contain formatLong property");var S=T(t);if(!I(S))throw new RangeError("Invalid time value");var O=ft(S),N=L(S,O),P={firstWeekContainsDate:k,weekStartsOn:C,locale:M,_originalDate:S},D=w.match(Dt).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,lt[e])(t,M.formatLong):t})).join("").match(Pt).map((function(r){if("''"===r)return"'";var a=r[0];if("'"===a)return Et(r);var i=ot[a];if(i)return null!=n&&n.useAdditionalWeekYearTokens||!vt(r)||mt(r,e,String(t)),null!=n&&n.useAdditionalDayOfYearTokens||!pt(r)||mt(r,e,String(t)),i(N,r,M.localize,P);if(a.match(Rt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return r})).join("");return D}function Et(t){var e=t.match(It);return e?e[1].replace(jt,"'"):t}function zt(t){A(1,arguments);var e=T(t);return e.setSeconds(0,0),e}function Bt(t,e){A(2,arguments);var n=zt(t),r=zt(e);return n.getTime()===r.getTime()}function Qt(t){A(1,arguments);var e=T(t);return e.setHours(23,59,59,999),e}function Ft(t){A(1,arguments);var e=T(t),n=new Date(0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}function qt(t){A(1,arguments);var e=T(t),n=e.getFullYear();return e.setFullYear(n+1,0,0),e.setHours(23,59,59,999),e}function Gt(t){A(1,arguments);var e=T(t),n=e.getMonth(),r=n-n%3;return e.setMonth(r,1),e.setHours(0,0,0,0),e}function Wt(t){A(1,arguments);var e=T(t),n=e.getMonth(),r=n-n%3+3;return e.setMonth(r,0),e.setHours(23,59,59,999),e}function Ut(t){A(1,arguments);var e=T(t),n=Math.floor(e.getMonth()/3)+1;return n}function Yt(t){A(1,arguments);var e=T(t);return e.setDate(1),e.setHours(0,0,0,0),e}function $t(t){A(1,arguments);var e=T(t),n=e.getMonth();return e.setFullYear(e.getFullYear(),n+1,0),e.setHours(23,59,59,999),e}var Ht=function(t){return function(e){return function(t,e){return function(t){return t.replace(/^0/,"")}((n=t.toLocaleTimeString(e,{hour:"2-digit",minute:"2-digit"})||"",(r=(n||"").replace(/ AM/g,"am").replace(/ PM/g,"pm")).includes("m")?r.replace(/:00/g,""):r));var n,r}(e,t)}},Vt=function(){return"undefined"==typeof window?"en-US":window.navigator.language},Jt=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.today,a=void 0===r?new Date:r,i=n.locale,o=void 0===i?Vt():i,u=n.includeTime,c=void 0===u||u,s=n.separator,l=void 0===s?"-":s,f=S(t,e),h=O(t,e),d=P(t,e),p=S(t,a),v=P(t,a),m=p?"":", ".concat(Lt(e,"yyyy")),g=Ht(o),y=c&&!Bt(N(t),t)?", ".concat(g(t)):"",b=c&&!Bt(Qt(e),e)?", ".concat(g(e)):"";return Bt(Ft(t),t)&&Bt(qt(e),e)?"".concat(Lt(t,"yyyy")):Bt(Gt(t),t)&&Bt(Wt(e),e)&&Ut(t)===Ut(e)?"Q".concat(Ut(t)," ").concat(Lt(t,"yyyy")):Bt(Yt(t),t)&&Bt($t(e),e)?h&&f?"".concat(Lt(t,"LLLL yyyy")):"".concat(Lt(t,"LLL")," ").concat(l," ").concat(Lt(e,"LLL yyyy")):f?h?d?y||b?v?"".concat(g(t)," ").concat(l," ").concat(g(e)):"".concat(Lt(t,"LLL d")).concat(y," ").concat(l," ").concat(g(e)).concat(m):"".concat(Lt(t,"eee, LLL d")).concat(m):y||b?"".concat(Lt(t,"LLL d")).concat(y," ").concat(l," ").concat(Lt(e,"LLL d")).concat(b).concat(m):"".concat(Lt(t,"LLL d")," ").concat(l," ").concat(Lt(e,"d")).concat(m):"".concat(Lt(t,"LLL d")).concat(y," ").concat(l," ").concat(Lt(e,"LLL d")).concat(b).concat(m):"".concat(Lt(t,"LLL d ''yy")).concat(y," ").concat(l," ").concat(Lt(e,"LLL d ''yy")).concat(b)},Zt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Kt(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.width?String(e.width):t.defaultWidth,r=t.formats[n]||t.formats[t.defaultWidth];return r}}var Xt={date:Kt({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Kt({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Kt({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},te={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function ee(t){return function(e,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&t.formattingValues){var a=t.defaultFormattingWidth||t.defaultWidth,i=null!=n&&n.width?String(n.width):a;r=t.formattingValues[i]||t.formattingValues[a]}else{var o=t.defaultWidth,u=null!=n&&n.width?String(n.width):t.defaultWidth;r=t.values[u]||t.values[o]}return r[t.argumentCallback?t.argumentCallback(e):e]}}var ne={ordinalNumber:function(t,e){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:ee({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:ee({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:ee({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:ee({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:ee({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function re(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(a);if(!i)return null;var o,u=i[0],c=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],s=Array.isArray(c)?ie(c,(function(t){return t.test(u)})):ae(c,(function(t){return t.test(u)}));o=t.valueCallback?t.valueCallback(s):s,o=n.valueCallback?n.valueCallback(o):o;var l=e.slice(u.length);return{value:o,rest:l}}}function ae(t,e){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function ie(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}var oe={ordinalNumber:function(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.match(t.matchPattern);if(!r)return null;var a=r[0],i=e.match(t.parsePattern);if(!i)return null;var o=t.valueCallback?t.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;var u=e.slice(a.length);return{value:o,rest:u}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}}),era:re({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:re({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:re({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:re({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:re({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},ue={code:"en-US",formatDistance:function(t,e,n){var r,a=Zt[t];return r="string"==typeof a?a:1===e?a.one:a.other.replace("{{count}}",e.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:Xt,formatRelative:function(t,e,n,r){return te[t]},localize:ne,match:oe,options:{weekStartsOn:0,firstWeekContainsDate:1}},ce={};function se(){return ce}var le=n(3100),fe=n.n(le),he=n(5570),de=(Math.pow(10,8),6048e5),pe=Symbol.for("constructDateFrom");function ve(t,e){return"function"==typeof t?t(e):t&&"object"===he(t)&&pe in t?t[pe](e):t instanceof Date?new t.constructor(e):new Date(e)}function me(t,e){return ve(e||t,t)}function ge(t){var e=me(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function ye(t,e){var n=me(t,null==e?void 0:e.in);return n.setHours(0,0,0,0),n}function be(t,e,n){var r=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var a=ve.bind(null,t||n.find((function(t){return"object"===he(t)})));return n.map(a)}(null==n?void 0:n.in,t,e),a=le(r,2),i=a[0],o=a[1],u=ye(i),c=ye(o),s=+u-ge(u),l=+c-ge(c);return Math.round((s-l)/864e5)}function _e(t,e){var n=me(t,null==e?void 0:e.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function we(t,e){var n=me(t,null==e?void 0:e.in);return be(n,_e(n))+1}function xe(t,e){var n,r,a,i,o,u,c=se(),s=null!==(n=null!==(r=null!==(a=null!==(i=null==e?void 0:e.weekStartsOn)&&void 0!==i?i:null==e||null===(o=e.locale)||void 0===o||null===(o=o.options)||void 0===o?void 0:o.weekStartsOn)&&void 0!==a?a:c.weekStartsOn)&&void 0!==r?r:null===(u=c.locale)||void 0===u||null===(u=u.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==n?n:0,l=me(t,null==e?void 0:e.in),f=l.getDay(),h=(f<s?7:0)+f-s;return l.setDate(l.getDate()-h),l.setHours(0,0,0,0),l}function Me(t,e){return xe(t,b(b({},e),{},{weekStartsOn:1}))}function ke(t,e){var n=me(t,null==e?void 0:e.in),r=n.getFullYear(),a=ve(n,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);var i=Me(a),o=ve(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);var u=Me(o);return n.getTime()>=i.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function Ce(t,e){var n=ke(t,e),r=ve((null==e?void 0:e.in)||t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Me(r)}function Ae(t,e){var n=me(t,null==e?void 0:e.in),r=+Me(n)-+Ce(n);return Math.round(r/de)+1}function Te(t,e){var n,r,a,i,o,u,c=me(t,null==e?void 0:e.in),s=c.getFullYear(),l=se(),f=null!==(n=null!==(r=null!==(a=null!==(i=null==e?void 0:e.firstWeekContainsDate)&&void 0!==i?i:null==e||null===(o=e.locale)||void 0===o||null===(o=o.options)||void 0===o?void 0:o.firstWeekContainsDate)&&void 0!==a?a:l.firstWeekContainsDate)&&void 0!==r?r:null===(u=l.locale)||void 0===u||null===(u=u.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==n?n:1,h=ve((null==e?void 0:e.in)||t,0);h.setFullYear(s+1,0,f),h.setHours(0,0,0,0);var d=xe(h,e),p=ve((null==e?void 0:e.in)||t,0);p.setFullYear(s,0,f),p.setHours(0,0,0,0);var v=xe(p,e);return+c>=+d?s+1:+c>=+v?s:s-1}function Se(t,e){var n,r,a,i,o,u,c=se(),s=null!==(n=null!==(r=null!==(a=null!==(i=null==e?void 0:e.firstWeekContainsDate)&&void 0!==i?i:null==e||null===(o=e.locale)||void 0===o||null===(o=o.options)||void 0===o?void 0:o.firstWeekContainsDate)&&void 0!==a?a:c.firstWeekContainsDate)&&void 0!==r?r:null===(u=c.locale)||void 0===u||null===(u=u.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==n?n:1,l=Te(t,e),f=ve((null==e?void 0:e.in)||t,0);return f.setFullYear(l,0,s),f.setHours(0,0,0,0),xe(f,e)}function Oe(t,e){var n=me(t,null==e?void 0:e.in),r=+xe(n,e)-+Se(n,e);return Math.round(r/de)+1}function Ne(t,e){return(t<0?"-":"")+Math.abs(t).toString().padStart(e,"0")}var Pe=function(t,e){var n=t.getFullYear(),r=n>0?n:1-n;return Ne("yy"===e?r%100:r,e.length)},De=function(t,e){var n=t.getMonth();return"M"===e?String(n+1):Ne(n+1,2)},Ie=function(t,e){return Ne(t.getDate(),e.length)},je=function(t,e){return Ne(t.getHours()%12||12,e.length)},Re=function(t,e){return Ne(t.getHours(),e.length)},Le=function(t,e){return Ne(t.getMinutes(),e.length)},Ee=function(t,e){return Ne(t.getSeconds(),e.length)},ze=function(t,e){var n=e.length,r=t.getMilliseconds();return Ne(Math.trunc(r*Math.pow(10,n-3)),e.length)},Be="midnight",Qe="noon",Fe="morning",qe="afternoon",Ge="evening",We="night",Ue={G:function(t,e,n){var r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var r=t.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return Pe(t,e)},Y:function(t,e,n,r){var a=Te(t,r),i=a>0?a:1-a;return"YY"===e?Ne(i%100,2):"Yo"===e?n.ordinalNumber(i,{unit:"year"}):Ne(i,e.length)},R:function(t,e){return Ne(ke(t),e.length)},u:function(t,e){return Ne(t.getFullYear(),e.length)},Q:function(t,e,n){var r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return Ne(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){var r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return Ne(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){var r=t.getMonth();switch(e){case"M":case"MM":return De(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){var r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return Ne(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){var a=Oe(t,r);return"wo"===e?n.ordinalNumber(a,{unit:"week"}):Ne(a,e.length)},I:function(t,e,n){var r=Ae(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):Ne(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getDate(),{unit:"date"}):Ie(t,e)},D:function(t,e,n){var r=we(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):Ne(r,e.length)},E:function(t,e,n){var r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return Ne(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return Ne(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getDay(),a=0===r?7:r;switch(e){case"i":return String(a);case"ii":return Ne(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r,a=t.getHours();switch(r=12===a?Qe:0===a?Be:a/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r,a=t.getHours();switch(r=a>=17?Ge:a>=12?qe:a>=4?Fe:We,e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var r=t.getHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return je(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getHours(),{unit:"hour"}):Re(t,e)},K:function(t,e,n){var r=t.getHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):Ne(r,e.length)},k:function(t,e,n){var r=t.getHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):Ne(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):Le(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getSeconds(),{unit:"second"}):Ee(t,e)},S:function(t,e){return ze(t,e)},X:function(t,e,n){var r=t.getTimezoneOffset();if(0===r)return"Z";switch(e){case"X":return $e(r);case"XXXX":case"XX":return He(r);default:return He(r,":")}},x:function(t,e,n){var r=t.getTimezoneOffset();switch(e){case"x":return $e(r);case"xxxx":case"xx":return He(r);default:return He(r,":")}},O:function(t,e,n){var r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Ye(r,":");default:return"GMT"+He(r,":")}},z:function(t,e,n){var r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Ye(r,":");default:return"GMT"+He(r,":")}},t:function(t,e,n){return Ne(Math.trunc(+t/1e3),e.length)},T:function(t,e,n){return Ne(+t,e.length)}};function Ye(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t>0?"-":"+",r=Math.abs(t),a=Math.trunc(r/60),i=r%60;return 0===i?n+String(a):n+String(a)+e+Ne(i,2)}function $e(t,e){return t%60==0?(t>0?"-":"+")+Ne(Math.abs(t)/60,2):He(t,e)}function He(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t>0?"-":"+",r=Math.abs(t),a=Ne(Math.trunc(r/60),2),i=Ne(r%60,2);return n+a+e+i}var Ve=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},Je=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Ze={p:Je,P:function(t,e){var n,r=t.match(/(P+)(p+)?/)||[],a=r[1],i=r[2];if(!i)return Ve(t,e);switch(a){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",Ve(a,e)).replace("{{time}}",Je(i,e))}},Ke=/^D+$/,Xe=/^Y+$/,tn=["D","DD","YY","YYYY"];function en(t){return t instanceof Date||"object"===he(t)&&"[object Date]"===Object.prototype.toString.call(t)}function nn(t){return!(!en(t)&&"number"!=typeof t||isNaN(+me(t)))}var rn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,an=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,on=/^'([^]*?)'?$/,un=/''/g,cn=/[a-zA-Z]/;function sn(t,e,n){var r,a,i,o,u,c,s,l,f,h,d,p,v,m,g=se(),y=null!==(r=null!==(a=null==n?void 0:n.locale)&&void 0!==a?a:g.locale)&&void 0!==r?r:ue,b=null!==(i=null!==(o=null!==(u=null!==(c=null==n?void 0:n.firstWeekContainsDate)&&void 0!==c?c:null==n||null===(s=n.locale)||void 0===s||null===(s=s.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==u?u:g.firstWeekContainsDate)&&void 0!==o?o:null===(l=g.locale)||void 0===l||null===(l=l.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==i?i:1,_=null!==(f=null!==(h=null!==(d=null!==(p=null==n?void 0:n.weekStartsOn)&&void 0!==p?p:null==n||null===(v=n.locale)||void 0===v||null===(v=v.options)||void 0===v?void 0:v.weekStartsOn)&&void 0!==d?d:g.weekStartsOn)&&void 0!==h?h:null===(m=g.locale)||void 0===m||null===(m=m.options)||void 0===m?void 0:m.weekStartsOn)&&void 0!==f?f:0,w=me(t,null==n?void 0:n.in);if(!nn(w))throw new RangeError("Invalid time value");var x=e.match(an).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Ze[e])(t,y.formatLong):t})).join("").match(rn).map((function(t){if("''"===t)return{isToken:!1,value:"'"};var e=t[0];if("'"===e)return{isToken:!1,value:ln(t)};if(Ue[e])return{isToken:!0,value:t};if(e.match(cn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return{isToken:!1,value:t}}));y.localize.preprocessor&&(x=y.localize.preprocessor(w,x));var M={firstWeekContainsDate:b,weekStartsOn:_,locale:y};return x.map((function(r){if(!r.isToken)return r.value;var a=r.value;return(null!=n&&n.useAdditionalWeekYearTokens||!function(t){return Xe.test(t)}(a))&&(null!=n&&n.useAdditionalDayOfYearTokens||!function(t){return Ke.test(t)}(a))||function(t,e,n){var r=function(t,e,n){var r="Y"===t[0]?"years":"days of the month";return"Use `".concat(t.toLowerCase(),"` instead of `").concat(t,"` (in `").concat(e,"`) for formatting ").concat(r," to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md")}(t,e,n);if(console.warn(r),tn.includes(t))throw new RangeError(r)}(a,e,String(t)),(0,Ue[a[0]])(w,a,y.localize,M)})).join("")}function ln(t){var e=t.match(on);return e?e[1].replace(un,"'"):t}var fn={dateRange:{varType:"time_desc"},measure:{varType:"metric_name"},max:{varType:"metric_value"},min:{varType:"metric_value"},total:{varType:"metric_value"},".x":{varType:"dim_value"},".y":{varType:"metric_value"},".base":{varType:"metric_value"},".diff":{varType:"delta_value"}},hn=function(t){f()(n,t);var e=d()(n);function n(){return i()(this,n),e.apply(this,arguments)}return u()(n,[{key:"generateTextSpec",value:function(t,e){var r=t.patterns,a=t.data,i=r[0],o=i.measure,u=i.dimension;return(0,v.Z)({structures:n.structures[e],variable:{dateRange:"".concat(Jt(new Date((0,p.first)(a)[u]),new Date((0,p.last)(a)[u]),{includeTime:!1})),total:r.length,measure:o,max:(0,p.maxBy)(a,o)[o],min:(0,p.minBy)(a,o)[o],outliers:r.map((function(t){var n=t.baselines[t.index],r=t.y-n;return _()(_()({},t),{},{base:n,diffDesc:w(r,e),x:sn(new Date(t.x),"MMM d, yyyy"),diff:r})}))}}).sections[0].paragraphs}}]),n}(m);s()(hn,"insightType","time_series_outlier"),s()(hn,"structures",{"zh-CN":[{template:"${dateRange},${measure} 波动范围为最大值 ${max}, 最小值 ${min},有 ${total} 个异常点,按超过基线大小排序如下:",variableMetaMap:fn},{template:"${.x},${measure} 为 ${.y}, 相比基线(${.base})${.diffDesc} ${.diff}。",displayType:"bullet",bulletOrder:!0,useVariable:"outliers",variableMetaMap:fn}],"en-US":[{template:"${total} outliers detected for ${measure} during ${dateRange}",displayType:"paragraph",variableMetaMap:fn},{template:"${.x}: ${measure} at ${.y} (${.diffDesc} ${.diff} baseline)",displayType:"bullet",bulletOrder:!0,useVariable:"outliers",variableMetaMap:fn}]});var dn={decreasing:"下降",increasing:"上升","no trend":"无明显趋势。"},pn={dateRange:{varType:"time_desc"},trend:{varType:"trend_desc"},measure:{varType:"metric_name"}},vn=function(t){f()(n,t);var e=d()(n);function n(){return i()(this,n),e.apply(this,arguments)}return u()(n,[{key:"generateTextSpec",value:function(t,e){var r=t.patterns,a=t.data,i=r[0],o=i.dimension,u=i.measure,c=i.trend,s=r[0].regression;return(0,v.Z)({structures:n.structures[e],variable:{dateRange:"".concat(Jt(new Date((0,p.first)(a)[o]),new Date((0,p.last)(a)[o]),{includeTime:!1})),measure:u,trend:"en-US"===e?c:dn[c],slope:s.equation[0]}}).sections[0].paragraphs}}]),n}(m);s()(vn,"insightType","trend"),s()(vn,"structures",{"zh-CN":[{template:"${dateRange},${measure}${trend}。",variableMetaMap:pn}],"en-US":[{template:"There is a signifcant ${trend} trend for ${measure} during ${dateRange} with a slope of ${slope}X.",variableMetaMap:pn}]});var mn={measure:{varType:"metric_name"},total:{varType:"metric_value"},proportion:{varType:"proportion"},dimValue:{varType:"dim_value"},y:{varType:"metric_value"}},gn=function(t){f()(n,t);var e=d()(n);function n(){return i()(this,n),e.apply(this,arguments)}return u()(n,[{key:"generateTextSpec",value:function(t,e){var r=t.patterns,a=t.data,i=r[0],o=i.dimension,u=i.measure,c=i.x,s=i.y,l=(0,p.sumBy)(a,u);return(0,v.Z)({structures:n.structures[e],variable:{dimension:o,measure:u,dimValue:c,y:s,total:l,proportion:s/l}}).sections[0].paragraphs}}]),n}(m);s()(gn,"insightType","majority"),s()(gn,"structures",{"zh-CN":[{template:"按照 ${dimension} 对 ${measure} 进行拆解,${dimValue} 的 ${measure} 显著高于其他维值,为 ${y}, 占总数(${total})的 ${proportion}。",variableMetaMap:mn}],"en-US":[{template:"The ${measure} for ${dimValue} is significantly higher than the other dimensions, at ${y}, ${proportion} of the total (${total}).",variableMetaMap:mn}]});var yn={measure:{varType:"metric_name"},mean:{varType:"metric_value"}},bn=function(t){f()(n,t);var e=d()(n);function n(){return i()(this,n),e.apply(this,arguments)}return u()(n,[{key:"generateTextSpec",value:function(t,e){var r=t.patterns[0],a=r.dimension,i=r.measure,o=r.mean;return(0,v.Z)({structures:n.structures[e],variable:{dimension:a,measure:i,mean:o}}).sections[0].paragraphs}}]),n}(m);s()(bn,"insightType","low_variance"),s()(bn,"structures",{"zh-CN":[{template:"按照 ${dimension} 对 ${measure} 进行拆解,指标分布均匀,平均为 ${mean}。",variableMetaMap:yn}],"en-US":[{template:"We broke down the total based on ${dimension}, and the ${measure} are spread out evenly, averaging ${mean} each.",variableMetaMap:yn}]});var _n={measure:{varType:"metric_name"},total:{varType:"metric_value"},".x":{varType:"dim_value"}},wn=function(t){f()(n,t);var e=d()(n);function n(){return i()(this,n),e.apply(this,arguments)}return u()(n,[{key:"generateTextSpec",value:function(t,e){var r=t.patterns,a=r[0],i=a.dimension,o=a.measure;return(0,v.Z)({structures:n.structures[e],variable:{dimension:i,measure:o,total:r.length,patterns:r},structureTemps:n.structureTemps[e]}).sections[0].paragraphs}}]),n}(m);s()(wn,"insightType","category_outlier"),s()(wn,"structures",{"zh-CN":[{template:"${measure} 在 ${dimension} 上有 ${total} 个类别相比其他维值突出:&{outliers}。",variableMetaMap:_n}],"en-US":[{template:"${measure} has ${total} categories in the ${dimension} that are prominent compared to other dimensions: &{outliers}.",variableMetaMap:_n,displayType:"paragraph"}]}),s()(wn,"structureTemps",{"zh-CN":[{templateId:"outliers",template:"${.x}",separator:k("zh-CN"),variableMetaMap:_n,useVariable:"paragraph"}],"en-US":[{templateId:"outliers",template:"${.x}",separator:k("en-US"),variableMetaMap:_n,useVariable:"paragraph"}]});var xn={pcorr:{varType:"metric_value"},m1:{varType:"metric_value"},m2:{varType:"metric_value"}},Mn=function(t){f()(n,t);var e=d()(n);function n(){return i()(this,n),e.apply(this,arguments)}return u()(n,[{key:"generateTextSpec",value:function(t,e){var r=t.patterns[0],a=fe()(r.measures,2),i=a[0],o=a[1],u=r.pcorr;return(0,v.Z)({structures:n.structures[e],variable:{m1:i,m2:o,pcorr:u}}).sections[0].paragraphs}}]),n}(m);s()(Mn,"insightType","correlation"),s()(Mn,"structures",{"zh-CN":[{template:"${m1} 与 ${m2} 相关性最大,相关系数为 ${pcorr}。",variableMetaMap:xn}],"en-US":[{template:" ${m1} and ${m2}, are highly correlated. Their relationship is measured by a number, ${pcorr}, which tells us just how closely they're linked. A higher number means they move in sync more often.",variableMetaMap:xn,displayType:"paragraph"}]});var kn={measures:{varType:"metric_name"}},Cn=function(t){f()(n,t);var e=d()(n);function n(){return i()(this,n),e.apply(this,arguments)}return u()(n,[{key:"generateTextSpec",value:function(t,e){var r=t.measures,a=t.dimensions,i=t.insightType;return(0,v.Z)({structures:n.structures[e],variable:{measures:r.map((function(t){return t.fieldName})).join(k(e)),dimensions:a.map((function(t){return t.fieldName})).join(k(e)),insightType:M(i,e)}}).sections[0].paragraphs}}]),n}(m);s()(Cn,"insightType","commonness"),s()(Cn,"structures",{"zh-CN":[{template:"大部分 ${dimensions} 的维值在 ${measures} 上具有 ${insightType}。",variableMetaMap:kn}],"en-US":[{template:"Most of the dimension values of ${dimensions} have ${insightType} on ${measures}.",variableMetaMap:kn}]});var An,Tn={measures:{varType:"metric_name"},".dim":{varType:"dim_value"}},Sn=function(t){f()(n,t);var e=d()(n);function n(){return i()(this,n),e.apply(this,arguments)}return u()(n,[{key:"generateTextSpec",value:function(t,e){var r=t.measures,a=t.dimensions,i=t.insightType,o=t.exceptions;return(0,v.Z)({structures:n.structures[e],structureTemps:n.structureTemps[e],variable:{measures:r.map((function(t){return t.fieldName})).join(k(e)),dimensions:a.map((function(t){return t.fieldName})).join(k(e)),insightType:M(i,e),exceptions:o.map((function(t){return{dim:t}}))}}).sections[0].paragraphs}}]),n}(m);s()(Sn,"insightType","exception"),s()(Sn,"structures",{"zh-CN":[{template:"大部分 ${dimensions} 的维值在 ${measures} 上具有 ${insightType},除了&{exceptionList}。",variableMetaMap:Tn}],"en-US":[{template:"Most of the dimension values of ${dimensions} have ${insightType} on ${measures}, except for &{exceptionList}.",variableMetaMap:Tn}]}),s()(Sn,"structureTemps",{"zh-CN":[{templateId:"exceptionList",template:"${.dim}",useVariable:"exceptions",separator:k("zh-CN"),variableMetaMap:Tn}],"en-US":[{templateId:"exceptionList",template:"${.dim}",useVariable:"exceptions",separator:k("en-US"),variableMetaMap:Tn}]});var On=function(){function t(){i()(this,t)}return u()(t,null,[{key:"getStrategy",value:function(e){var n=t.narrativeStrategyMap.get(e);if(!n)throw Error("There is no description policy for this '".concat(e,"'."));return n}}]),t}();function Nn(t,e){var n,r=function(t){return"childPatterns"in t}(t)?null==t?void 0:t.type:null==t||null===(n=t.patterns[0])||void 0===n?void 0:n.type;if(!r)throw Error("insight info has no insight type");var a=e.lang;return On.getStrategy(r).generateTextSpec(t,a)}An=On,s()(On,"narrativeStrategyMap",new Map),Object.values(r).forEach((function(t){An.narrativeStrategyMap.set(t.insightType,new t)}))},9664:function(t,e,n){"use strict";n.d(e,{o:function(){return N}});var r=n(1448),a=n.n(r),i=function(t,e,n,r){return new(n||(n=Promise))((function(a,i){function o(t){try{c(r.next(t))}catch(t){i(t)}}function u(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?a(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}c((r=r.apply(t,e||[])).next())}))},o=function(t,e){var n,r,a,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=u(0),o.throw=u(1),o.return=u(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&u[0]?r.return:u[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,u[1])).done)return a;switch(r=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){i.label=u[1];break}if(6===u[0]&&i.label<a[1]){i.label=a[1],a=u;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(u);break}a[2]&&i.ops.pop(),i.trys.pop();continue}u=e.call(t,i)}catch(t){u=[6,t],r=0}finally{n=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}},u=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,a,i=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(t){a={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return o},c=function(t,e,n){if(n||2===arguments.length)for(var r,a=0,i=e.length;a<i;a++)!r&&a in e||(r||(r=Array.prototype.slice.call(e,0,a)),r[a]=e[a]);return t.concat(r||Array.prototype.slice.call(e))},s=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},l=(function(){function t(e){void 0===e&&(e=t.minComparator);var n=this;this.compare=e,this.heapArray=[],this._limit=0,this.offer=this.add,this.element=this.peek,this.poll=this.pop,this._invertedCompare=function(t,e){return n.compare(t,e).then((function(t){return-1*t}))}}t.getChildrenIndexOf=function(t){return[2*t+1,2*t+2]},t.getParentIndexOf=function(t){if(t<=0)return-1;var e=t%2?1:2;return Math.floor((t-e)/2)},t.getSiblingIndexOf=function(t){return t<=0?-1:t+(t%2?1:-1)},t.minComparator=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){return t>e?[2,1]:t<e?[2,-1]:[2,0]}))}))},t.maxComparator=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){return e>t?[2,1]:e<t?[2,-1]:[2,0]}))}))},t.minComparatorNumber=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){return[2,t-e]}))}))},t.maxComparatorNumber=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){return[2,e-t]}))}))},t.defaultIsEqual=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){return[2,t===e]}))}))},t.print=function(e){function n(e){var n=t.getParentIndexOf(e);return Math.floor(Math.log2(n+1))}function r(t,e){for(var n="";e>0;--e)n+=t;return n}for(var a=0,i=[],o=n(e.length-1)+2,u=0;a<e.length;){var c=n(a)+1;0===a&&(c=0);var s=String(e.get(a));s.length>u&&(u=s.length),i[c]=i[c]||[],i[c].push(s),a+=1}return i.map((function(t,e){var n=Math.pow(2,o-e)-1;return r(" ",Math.floor(n/2)*u)+t.map((function(t){var e=(u-t.length)/2;return r(" ",Math.ceil(e))+t+r(" ",Math.floor(e))})).join(r(" ",n*u))})).join("\n")},t.heapify=function(e,n){return i(this,void 0,void 0,(function(){var r;return o(this,(function(a){switch(a.label){case 0:return(r=new t(n)).heapArray=e,[4,r.init()];case 1:return a.sent(),[2,r]}}))}))},t.heappop=function(e,n){var r=new t(n);return r.heapArray=e,r.pop()},t.heappush=function(e,n,r){return i(this,void 0,void 0,(function(){var a;return o(this,(function(i){switch(i.label){case 0:return(a=new t(r)).heapArray=e,[4,a.push(n)];case 1:return i.sent(),[2]}}))}))},t.heappushpop=function(e,n,r){var a=new t(r);return a.heapArray=e,a.pushpop(n)},t.heapreplace=function(e,n,r){var a=new t(r);return a.heapArray=e,a.replace(n)},t.heaptop=function(e,n,r){void 0===n&&(n=1);var a=new t(r);return a.heapArray=e,a.top(n)},t.heapbottom=function(e,n,r){void 0===n&&(n=1);var a=new t(r);return a.heapArray=e,a.bottom(n)},t.nlargest=function(e,n,r){return i(this,void 0,void 0,(function(){var a;return o(this,(function(i){switch(i.label){case 0:return(a=new t(r)).heapArray=c([],u(n),!1),[4,a.init()];case 1:return i.sent(),[2,a.top(e)]}}))}))},t.nsmallest=function(e,n,r){return i(this,void 0,void 0,(function(){var a;return o(this,(function(i){switch(i.label){case 0:return(a=new t(r)).heapArray=c([],u(n),!1),[4,a.init()];case 1:return i.sent(),[2,a.bottom(e)]}}))}))},t.prototype.add=function(t){return i(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this._sortNodeUp(this.heapArray.push(t)-1)];case 1:return e.sent(),this._applyLimit(),[2,!0]}}))}))},t.prototype.addAll=function(t){return i(this,void 0,void 0,(function(){var e,n,r;return o(this,(function(a){switch(a.label){case 0:e=this.length,(r=this.heapArray).push.apply(r,c([],u(t),!1)),n=this.length,a.label=1;case 1:return e<n?[4,this._sortNodeUp(e)]:[3,4];case 2:a.sent(),a.label=3;case 3:return++e,[3,1];case 4:return this._applyLimit(),[2,!0]}}))}))},t.prototype.bottom=function(){return i(this,arguments,void 0,(function(t){return void 0===t&&(t=1),o(this,(function(e){return 0===this.heapArray.length||t<=0?[2,[]]:1===this.heapArray.length?[2,[this.heapArray[0]]]:t>=this.heapArray.length?[2,c([],u(this.heapArray),!1)]:[2,this._bottomN_push(~~t)]}))}))},t.prototype.check=function(){return i(this,void 0,void 0,(function(){var t,e,n,r,a,i,u,c,l;return o(this,(function(o){switch(o.label){case 0:t=0,o.label=1;case 1:if(!(t<this.heapArray.length))return[3,10];e=this.heapArray[t],n=this.getChildrenOf(t),o.label=2;case 2:o.trys.push([2,7,8,9]),c=void 0,r=s(n),a=r.next(),o.label=3;case 3:return a.done?[3,6]:(i=a.value,[4,this.compare(e,i)]);case 4:if(o.sent()>0)return[2,e];o.label=5;case 5:return a=r.next(),[3,3];case 6:return[3,9];case 7:return u=o.sent(),c={error:u},[3,9];case 8:try{a&&!a.done&&(l=r.return)&&l.call(r)}finally{if(c)throw c.error}return[7];case 9:return++t,[3,1];case 10:return[2]}}))}))},t.prototype.clear=function(){this.heapArray=[]},t.prototype.clone=function(){var e=new t(this.comparator());return e.heapArray=this.toArray(),e._limit=this._limit,e},t.prototype.comparator=function(){return this.compare},t.prototype.contains=function(e){return i(this,arguments,void 0,(function(e,n){var r,a,i,u,c,l;return void 0===n&&(n=t.defaultIsEqual),o(this,(function(t){switch(t.label){case 0:t.trys.push([0,5,6,7]),r=s(this.heapArray),a=r.next(),t.label=1;case 1:return a.done?[3,4]:(i=a.value,[4,n(i,e)]);case 2:if(t.sent())return[2,!0];t.label=3;case 3:return a=r.next(),[3,1];case 4:return[3,7];case 5:return u=t.sent(),c={error:u},[3,7];case 6:try{a&&!a.done&&(l=r.return)&&l.call(r)}finally{if(c)throw c.error}return[7];case 7:return[2,!1]}}))}))},t.prototype.init=function(t){return i(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:t&&(this.heapArray=c([],u(t),!1)),e=Math.floor(this.heapArray.length),n.label=1;case 1:return e>=0?[4,this._sortNodeDown(e)]:[3,4];case 2:n.sent(),n.label=3;case 3:return--e,[3,1];case 4:return this._applyLimit(),[2]}}))}))},t.prototype.isEmpty=function(){return 0===this.length},t.prototype.leafs=function(){if(0===this.heapArray.length)return[];var e=t.getParentIndexOf(this.heapArray.length-1);return this.heapArray.slice(e+1)},Object.defineProperty(t.prototype,"length",{get:function(){return this.heapArray.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"limit",{get:function(){return this._limit},set:function(t){this._limit=~~t,this._applyLimit()},enumerable:!1,configurable:!0}),t.prototype.peek=function(){return this.heapArray[0]},t.prototype.pop=function(){return i(this,void 0,void 0,(function(){var t;return o(this,(function(e){return t=this.heapArray.pop(),this.length>0&&void 0!==t?[2,this.replace(t)]:[2,t]}))}))},t.prototype.push=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i(this,void 0,void 0,(function(){return o(this,(function(e){return t.length<1?[2,!1]:1===t.length?[2,this.add(t[0])]:[2,this.addAll(t)]}))}))},t.prototype.pushpop=function(t){return i(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return[4,this.compare(this.heapArray[0],t)];case 1:return n.sent()<0?(e=u([this.heapArray[0],t],2),t=e[0],this.heapArray[0]=e[1],[4,this._sortNodeDown(0)]):[3,3];case 2:n.sent(),n.label=3;case 3:return[2,t]}}))}))},t.prototype.remove=function(e){return i(this,arguments,void 0,(function(e,n){var r,a,i,s=this;return void 0===n&&(n=t.defaultIsEqual),o(this,(function(o){switch(o.label){case 0:return this.heapArray.length?void 0!==e?[3,2]:[4,this.pop()]:[2,!1];case 1:return o.sent(),[2,!0];case 2:r=[0],o.label=3;case 3:return r.length?(a=r.shift(),[4,n(this.heapArray[a],e)]):[3,13];case 4:return o.sent()?0!==a?[3,6]:[4,this.pop()]:[3,11];case 5:return o.sent(),[3,10];case 6:return a!==this.heapArray.length-1?[3,7]:(this.heapArray.pop(),[3,10]);case 7:return this.heapArray.splice(a,1,this.heapArray.pop()),[4,this._sortNodeUp(a)];case 8:return o.sent(),[4,this._sortNodeDown(a)];case 9:o.sent(),o.label=10;case 10:return[2,!0];case 11:i=t.getChildrenIndexOf(a).filter((function(t){return t<s.heapArray.length})),r.push.apply(r,c([],u(i),!1)),o.label=12;case 12:return[3,3];case 13:return[2,!1]}}))}))},t.prototype.replace=function(t){return i(this,void 0,void 0,(function(){var e;return o(this,(function(n){switch(n.label){case 0:return e=this.heapArray[0],this.heapArray[0]=t,[4,this._sortNodeDown(0)];case 1:return n.sent(),[2,e]}}))}))},t.prototype.size=function(){return this.length},t.prototype.top=function(){return i(this,arguments,void 0,(function(t){return void 0===t&&(t=1),o(this,(function(e){return 0===this.heapArray.length||t<=0?[2,[]]:1===this.heapArray.length||1===t?[2,[this.heapArray[0]]]:t>=this.heapArray.length?[2,c([],u(this.heapArray),!1)]:[2,this._topN_push(~~t)]}))}))},t.prototype.toArray=function(){return c([],u(this.heapArray),!1)},t.prototype.toString=function(){return this.heapArray.toString()},t.prototype.get=function(t){return this.heapArray[t]},t.prototype.getChildrenOf=function(e){var n=this;return t.getChildrenIndexOf(e).map((function(t){return n.heapArray[t]})).filter((function(t){return void 0!==t}))},t.prototype.getParentOf=function(e){var n=t.getParentIndexOf(e);return this.heapArray[n]},t.prototype[Symbol.iterator]=function(){return o(this,(function(t){switch(t.label){case 0:return this.length?[4,this.pop()]:[3,2];case 1:return t.sent(),[3,0];case 2:return[2]}}))},t.prototype.iterator=function(){return this},t.prototype._applyLimit=function(){if(this._limit&&this._limit<this.heapArray.length)for(var t=this.heapArray.length-this._limit;t;)this.heapArray.pop(),--t},t.prototype._bottomN_push=function(e){return i(this,void 0,void 0,(function(){var n,r,a,i,u,c;return o(this,(function(o){switch(o.label){case 0:return(n=new t(this.compare)).limit=e,n.heapArray=this.heapArray.slice(-e),[4,n.init()];case 1:for(o.sent(),r=this.heapArray.length-1-e,a=t.getParentIndexOf(r),i=[],c=r;c>a;--c)i.push(c);u=this.heapArray,o.label=2;case 2:return i.length?(c=i.shift(),[4,this.compare(u[c],n.peek())]):[3,6];case 3:return o.sent()>0?[4,n.replace(u[c])]:[3,5];case 4:o.sent(),c%2&&i.push(t.getParentIndexOf(c)),o.label=5;case 5:return[3,2];case 6:return[2,n.toArray()]}}))}))},t.prototype._moveNode=function(t,e){var n;n=u([this.heapArray[e],this.heapArray[t]],2),this.heapArray[t]=n[0],this.heapArray[e]=n[1]},t.prototype._sortNodeDown=function(t){return i(this,void 0,void 0,(function(){var e,n,r,a,i,u;return o(this,(function(o){switch(o.label){case 0:e=this.heapArray.length,o.label=1;case 1:return r=(n=2*t+1)+1,a=t,(i=n<e)?[4,this.compare(this.heapArray[n],this.heapArray[a])]:[3,3];case 2:i=o.sent()<0,o.label=3;case 3:return i&&(a=n),(u=r<e)?[4,this.compare(this.heapArray[r],this.heapArray[a])]:[3,5];case 4:u=o.sent()<0,o.label=5;case 5:if(u&&(a=r),a===t)return[3,7];this._moveNode(t,a),t=a,o.label=6;case 6:return[3,1];case 7:return[2]}}))}))},t.prototype._sortNodeUp=function(e){return i(this,void 0,void 0,(function(){var n;return o(this,(function(r){switch(r.label){case 0:return e>0?(n=t.getParentIndexOf(e),[4,this.compare(this.heapArray[e],this.heapArray[n])]):[3,2];case 1:return r.sent()<0?(this._moveNode(e,n),e=n,[3,0]):[3,2];case 2:return[2]}}))}))},t.prototype._topN_push=function(e){return i(this,void 0,void 0,(function(){var n,r,a,i;return o(this,(function(o){switch(o.label){case 0:(n=new t(this._invertedCompare)).limit=e,r=[0],a=this.heapArray,o.label=1;case 1:return r.length?(i=r.shift())<a.length?n.length<e?[4,n.push(a[i])]:[3,3]:[3,6]:[3,7];case 2:return o.sent(),r.push.apply(r,c([],u(t.getChildrenIndexOf(i)),!1)),[3,6];case 3:return[4,this.compare(a[i],n.peek())];case 4:return o.sent()<0?[4,n.replace(a[i])]:[3,6];case 5:o.sent(),r.push.apply(r,c([],u(t.getChildrenIndexOf(i)),!1)),o.label=6;case 6:return[3,1];case 7:return[2,n.toArray()]}}))}))},t.prototype._topN_fill=function(e){return i(this,void 0,void 0,(function(){var n,r,a,i,s;return o(this,(function(o){switch(o.label){case 0:return n=this.heapArray,(r=new t(this._invertedCompare)).limit=e,r.heapArray=n.slice(0,e),[4,r.init()];case 1:for(o.sent(),a=t.getParentIndexOf(e-1)+1,i=[],s=a;s<e;++s)i.push.apply(i,c([],u(t.getChildrenIndexOf(s).filter((function(t){return t<n.length}))),!1));(e-1)%2&&i.push(e),o.label=2;case 2:return i.length?(s=i.shift())<n.length?[4,this.compare(n[s],r.peek())]:[3,5]:[3,6];case 3:return o.sent()<0?[4,r.replace(n[s])]:[3,5];case 4:o.sent(),i.push.apply(i,c([],u(t.getChildrenIndexOf(s)),!1)),o.label=5;case 5:return[3,2];case 6:return[2,r.toArray()]}}))}))},t.prototype._topN_heap=function(t){return i(this,void 0,void 0,(function(){var e,n,r,a,i;return o(this,(function(o){switch(o.label){case 0:e=this.clone(),n=[],r=0,o.label=1;case 1:return r<t?(i=(a=n).push,[4,e.pop()]):[3,4];case 2:i.apply(a,[o.sent()]),o.label=3;case 3:return++r,[3,1];case 4:return[2,n]}}))}))},t.prototype._topIdxOf=function(t){return i(this,void 0,void 0,(function(){var e,n,r;return o(this,(function(a){switch(a.label){case 0:if(!t.length)return[2,-1];n=t[e=0],r=1,a.label=1;case 1:return r<t.length?[4,this.compare(t[r],n)]:[3,4];case 2:a.sent()<0&&(e=r,n=t[r]),a.label=3;case 3:return++r,[3,1];case 4:return[2,e]}}))}))},t.prototype._topOf=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return i(this,void 0,void 0,(function(){var n;return o(this,(function(r){switch(r.label){case 0:return[4,(n=new t(this.compare)).init(e)];case 1:return r.sent(),[2,n.peek()]}}))}))}}(),function(t,e){var n,r,a,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=u(0),o.throw=u(1),o.return=u(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(i=0)),i;)try{if(n=1,r&&(a=2&u[0]?r.return:u[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,u[1])).done)return a;switch(r=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(a=i.trys,(a=a.length>0&&a[a.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){i.label=u[1];break}if(6===u[0]&&i.label<a[1]){i.label=a[1],a=u;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(u);break}a[2]&&i.ops.pop(),i.trys.pop();continue}u=e.call(t,i)}catch(t){u=[6,t],r=0}finally{n=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}),f=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,a,i=n.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(t){a={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return o},h=function(t,e,n){if(n||2===arguments.length)for(var r,a=0,i=e.length;a<i;a++)!r&&a in e||(r||(r=Array.prototype.slice.call(e,0,a)),r[a]=e[a]);return t.concat(r||Array.prototype.slice.call(e))},d=function(){function t(e){void 0===e&&(e=t.minComparator);var n=this;this.compare=e,this.heapArray=[],this._limit=0,this.offer=this.add,this.element=this.peek,this.poll=this.pop,this.removeAll=this.clear,this._invertedCompare=function(t,e){return-1*n.compare(t,e)}}return t.getChildrenIndexOf=function(t){return[2*t+1,2*t+2]},t.getParentIndexOf=function(t){if(t<=0)return-1;var e=t%2?1:2;return Math.floor((t-e)/2)},t.getSiblingIndexOf=function(t){return t<=0?-1:t+(t%2?1:-1)},t.minComparator=function(t,e){return t>e?1:t<e?-1:0},t.maxComparator=function(t,e){return e>t?1:e<t?-1:0},t.minComparatorNumber=function(t,e){return t-e},t.maxComparatorNumber=function(t,e){return e-t},t.defaultIsEqual=function(t,e){return t===e},t.print=function(e){function n(e){var n=t.getParentIndexOf(e);return Math.floor(Math.log2(n+1))}function r(t,e){for(var n="";e>0;--e)n+=t;return n}for(var a=0,i=[],o=n(e.length-1)+2,u=0;a<e.length;){var c=n(a)+1;0===a&&(c=0);var s=String(e.get(a));s.length>u&&(u=s.length),i[c]=i[c]||[],i[c].push(s),a+=1}return i.map((function(t,e){var n=Math.pow(2,o-e)-1;return r(" ",Math.floor(n/2)*u)+t.map((function(t){var e=(u-t.length)/2;return r(" ",Math.ceil(e))+t+r(" ",Math.floor(e))})).join(r(" ",n*u))})).join("\n")},t.heapify=function(e,n){var r=new t(n);return r.heapArray=e,r.init(),r},t.heappop=function(e,n){var r=new t(n);return r.heapArray=e,r.pop()},t.heappush=function(e,n,r){var a=new t(r);a.heapArray=e,a.push(n)},t.heappushpop=function(e,n,r){var a=new t(r);return a.heapArray=e,a.pushpop(n)},t.heapreplace=function(e,n,r){var a=new t(r);return a.heapArray=e,a.replace(n)},t.heaptop=function(e,n,r){void 0===n&&(n=1);var a=new t(r);return a.heapArray=e,a.top(n)},t.heapbottom=function(e,n,r){void 0===n&&(n=1);var a=new t(r);return a.heapArray=e,a.bottom(n)},t.nlargest=function(e,n,r){var a=new t(r);return a.heapArray=h([],f(n),!1),a.init(),a.top(e)},t.nsmallest=function(e,n,r){var a=new t(r);return a.heapArray=h([],f(n),!1),a.init(),a.bottom(e)},t.prototype.add=function(t){return this._sortNodeUp(this.heapArray.push(t)-1),this._applyLimit(),!0},t.prototype.addAll=function(t){var e,n=this.length;(e=this.heapArray).push.apply(e,h([],f(t),!1));for(var r=this.length;n<r;++n)this._sortNodeUp(n);return this._applyLimit(),!0},t.prototype.bottom=function(t){return void 0===t&&(t=1),0===this.heapArray.length||t<=0?[]:1===this.heapArray.length?[this.heapArray[0]]:t>=this.heapArray.length?h([],f(this.heapArray),!1):this._bottomN_push(~~t)},t.prototype.check=function(){var t=this;return this.heapArray.find((function(e,n){return!!t.getChildrenOf(n).find((function(n){return t.compare(e,n)>0}))}))},t.prototype.clear=function(){this.heapArray=[]},t.prototype.clone=function(){var e=new t(this.comparator());return e.heapArray=this.toArray(),e._limit=this._limit,e},t.prototype.comparator=function(){return this.compare},t.prototype.contains=function(e,n){return void 0===n&&(n=t.defaultIsEqual),-1!==this.indexOf(e,n)},t.prototype.init=function(t){t&&(this.heapArray=h([],f(t),!1));for(var e=Math.floor(this.heapArray.length);e>=0;--e)this._sortNodeDown(e);this._applyLimit()},t.prototype.isEmpty=function(){return 0===this.length},t.prototype.indexOf=function(e,n){if(void 0===n&&(n=t.defaultIsEqual),0===this.heapArray.length)return-1;for(var r=[],a=0;a<this.heapArray.length;){var i=this.heapArray[a];if(n(i,e))return a;this.compare(i,e)<=0&&r.push.apply(r,h([],f(t.getChildrenIndexOf(a)),!1)),a=r.shift()||this.heapArray.length}return-1},t.prototype.indexOfEvery=function(e,n){if(void 0===n&&(n=t.defaultIsEqual),0===this.heapArray.length)return[];for(var r=[],a=[],i=0;i<this.heapArray.length;){var o=this.heapArray[i];n(o,e)?(a.push(i),r.push.apply(r,h([],f(t.getChildrenIndexOf(i)),!1))):this.compare(o,e)<=0&&r.push.apply(r,h([],f(t.getChildrenIndexOf(i)),!1)),i=r.shift()||this.heapArray.length}return a},t.prototype.leafs=function(){if(0===this.heapArray.length)return[];var e=t.getParentIndexOf(this.heapArray.length-1);return this.heapArray.slice(e+1)},Object.defineProperty(t.prototype,"length",{get:function(){return this.heapArray.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"limit",{get:function(){return this._limit},set:function(t){t<0||isNaN(t)?this._limit=0:this._limit=~~t,this._applyLimit()},enumerable:!1,configurable:!0}),t.prototype.setLimit=function(t){return this.limit=t,t<0||isNaN(t)?NaN:this._limit},t.prototype.peek=function(){return this.heapArray[0]},t.prototype.pop=function(){var t=this.heapArray.pop();return this.length>0&&void 0!==t?this.replace(t):t},t.prototype.push=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return!(t.length<1)&&(1===t.length?this.add(t[0]):this.addAll(t))},t.prototype.pushpop=function(t){var e;return this.compare(this.heapArray[0],t)<0&&(t=(e=f([this.heapArray[0],t],2))[0],this.heapArray[0]=e[1],this._sortNodeDown(0)),t},t.prototype.remove=function(e,n){var r=this;if(void 0===n&&(n=t.defaultIsEqual),!this.heapArray.length)return!1;if(void 0===e)return this.pop(),!0;for(var a=[0];a.length;){var i=a.shift();if(n(this.heapArray[i],e))return 0===i?this.pop():i===this.heapArray.length-1?this.heapArray.pop():(this.heapArray.splice(i,1,this.heapArray.pop()),this._sortNodeUp(i),this._sortNodeDown(i)),!0;if(this.compare(this.heapArray[i],e)<=0){var o=t.getChildrenIndexOf(i).filter((function(t){return t<r.heapArray.length}));a.push.apply(a,h([],f(o),!1))}}return!1},t.prototype.replace=function(t){var e=this.heapArray[0];return this.heapArray[0]=t,this._sortNodeDown(0),e},t.prototype.size=function(){return this.length},t.prototype.top=function(t){return void 0===t&&(t=1),0===this.heapArray.length||t<=0?[]:1===this.heapArray.length||1===t?[this.heapArray[0]]:t>=this.heapArray.length?h([],f(this.heapArray),!1):this._topN_push(~~t)},t.prototype.toArray=function(){return h([],f(this.heapArray),!1)},t.prototype.toString=function(){return this.heapArray.toString()},t.prototype.get=function(t){return this.heapArray[t]},t.prototype.getChildrenOf=function(e){var n=this;return t.getChildrenIndexOf(e).map((function(t){return n.heapArray[t]})).filter((function(t){return void 0!==t}))},t.prototype.getParentOf=function(e){var n=t.getParentIndexOf(e);return this.heapArray[n]},t.prototype[Symbol.iterator]=function(){return l(this,(function(t){switch(t.label){case 0:return this.length?[4,this.pop()]:[3,2];case 1:return t.sent(),[3,0];case 2:return[2]}}))},t.prototype.iterator=function(){return this.toArray()},t.prototype._applyLimit=function(){if(this._limit>0&&this._limit<this.heapArray.length)for(var t=this.heapArray.length-this._limit;t;)this.heapArray.pop(),--t},t.prototype._bottomN_push=function(e){var n=new t(this.compare);n.limit=e,n.heapArray=this.heapArray.slice(-e),n.init();for(var r=this.heapArray.length-1-e,a=t.getParentIndexOf(r),i=[],o=r;o>a;--o)i.push(o);for(var u=this.heapArray;i.length;){o=i.shift();this.compare(u[o],n.peek())>0&&(n.replace(u[o]),o%2&&i.push(t.getParentIndexOf(o)))}return n.toArray()},t.prototype._moveNode=function(t,e){var n;n=f([this.heapArray[e],this.heapArray[t]],2),this.heapArray[t]=n[0],this.heapArray[e]=n[1]},t.prototype._sortNodeDown=function(t){for(var e=this.heapArray.length;;){var n=2*t+1,r=n+1,a=t;if(n<e&&this.compare(this.heapArray[n],this.heapArray[a])<0&&(a=n),r<e&&this.compare(this.heapArray[r],this.heapArray[a])<0&&(a=r),a===t)break;this._moveNode(t,a),t=a}},t.prototype._sortNodeUp=function(e){for(;e>0;){var n=t.getParentIndexOf(e);if(!(this.compare(this.heapArray[e],this.heapArray[n])<0))break;this._moveNode(e,n),e=n}},t.prototype._topN_push=function(e){var n=new t(this._invertedCompare);n.limit=e;for(var r=[0],a=this.heapArray;r.length;){var i=r.shift();i<a.length&&(n.length<e?(n.push(a[i]),r.push.apply(r,h([],f(t.getChildrenIndexOf(i)),!1))):this.compare(a[i],n.peek())<0&&(n.replace(a[i]),r.push.apply(r,h([],f(t.getChildrenIndexOf(i)),!1))))}return n.toArray()},t.prototype._topN_fill=function(e){var n=this.heapArray,r=new t(this._invertedCompare);r.limit=e,r.heapArray=n.slice(0,e),r.init();for(var a=[],i=t.getParentIndexOf(e-1)+1;i<e;++i)a.push.apply(a,h([],f(t.getChildrenIndexOf(i).filter((function(t){return t<n.length}))),!1));for((e-1)%2&&a.push(e);a.length;){(i=a.shift())<n.length&&this.compare(n[i],r.peek())<0&&(r.replace(n[i]),a.push.apply(a,h([],f(t.getChildrenIndexOf(i)),!1)))}return r.toArray()},t.prototype._topN_heap=function(t){for(var e=this.clone(),n=[],r=0;r<t;++r)n.push(e.pop());return n},t.prototype._topIdxOf=function(t){if(!t.length)return-1;for(var e=0,n=t[e],r=1;r<t.length;++r){this.compare(t[r],n)<0&&(e=r,n=t[r])}return e},t.prototype._topOf=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=new t(this.compare);return r.init(e),r.peek()},t}(),p=n(4977),v=n(8316),m=n(4479),g=n.n(m),y=n(8972),b=n(9125),_=n(1484);function w(t,e){var n=[],r=t.length,a=t.filter((function(t){var e;return t.patterns&&(null===(e=t.patterns)||void 0===e?void 0:e.length)>0}));if(a.length>1){if("trend"===e){var i,o=Object.values((0,y.groupBy)(t,"patterns.0.trend")).sort((function(t,e){return e.length-t.length}));2===o.length&&null!==(i=o[0][0])&&void 0!==i&&null!==(i=i.patterns)&&void 0!==i&&i.length&&o[0].length/r>.75&&o[1].length<5?n.push({type:"exception",insightType:e,childPatterns:(0,y.flatten)(a.map((function(t){return t.patterns}))),commonSet:o[0].map((function(t){return t.key})),exceptions:o[1].map((function(t){return t.key})),significance:1-o[1].length/r}):o.forEach((function(t){var a,i=t.length/r;if(i>.3&&t.length>=3&&null!==(a=t[0])&&void 0!==a&&a.patterns){var o=(0,y.flatten)(t.map((function(t){return t.patterns})));o.length&&n.push({type:"commonness",insightType:e,childPatterns:o,commonSet:t.map((function(t){return t.key})),significance:i})}}))}if(["change_point","outlier","time_series_outlier"].includes(e))Object.values((0,y.groupBy)((0,y.flatten)(a.map((function(t){return t.patterns.map((function(t){return t.index}))}))))).sort((function(t,e){return e.length-t.length})).forEach((function(t){var i=t.length/r;if(i>.3&&t.length>=3){var o=a.filter((function(e){return e.patterns.some((function(e){return e.index===t[0]}))})),u=(0,y.flatten)(o.map((function(e){return e.patterns.filter((function(e){return e.index===t[0]}))})));n.push({type:"commonness",insightType:e,childPatterns:u,commonSet:o.map((function(t){return t.key})),significance:i})}}))}return n}var x=n(2434),M=function(t,e){return t.score-e.score},k=function(t,e){return t.score-e.score};function C(t,e){null==t||t.forEach((function(t){e.length>=e.limit?e.pushpop(t):e.add(t)}))}function A(t,e,n,r){var a=e.measures,i=e.dimensions,o=(null==r?void 0:r.insightTypes)||p.qy,u={};return o.forEach((function(o){var c=b.M[o],s=!0;if(c&&(0,y.isString)(c({data:t,subjectInfo:e,fieldPropsMap:n}))&&(s=!1),s&&_.ew){var l=r||{},f={algorithmParameter:l.algorithmParameter,dataProcessInfo:l.dataProcessInfo,dataValidation:!1,filterInsight:!0},h=(0,_.ew)({data:t,dimensions:i.map((function(t){return{fieldName:t}})),measures:a,insightType:o,options:f});u[o]=h}else u[o]=void 0})),u}function T(t,e,n,r,i,o,u,c){if(null==t||!t.length)return[];var s=i.impactMeasureReferences,l=i.fieldPropsMap,f=function(t,e,n,r){if(null==r||!r.length||!e)return 1;var a=r.map((function(e){var r=(0,x.RF)(t,e),a="".concat(e.fieldName,"@").concat(e.method);return r/n[a]}));return Math.max.apply(Math,g()(a))}(t,r,s,null==c?void 0:c.impactMeasures);if(f<p.Pe)return[];var h,d=null!=c&&c.impactWeight&&c.impactWeight>=0&&c.impactWeight<1?c.impactWeight:p.a4,m=f*d+1*(1-d);if(o.length>=o.limit&&m<=(null===(h=o.peek())||void 0===h?void 0:h.score))return[];var b=[],_=function(t,e,n,r,a,i){var o=a.fieldPropsMap,u=[];return e.forEach((function(e){var a,c=[],s=null===(a=o[e])||void 0===a||null===(a=a.levelOfMeasurements)||void 0===a?void 0:a.includes("Time");n.forEach((function(n){var a={dimensions:[e],subspace:r,measures:[n]},u=(0,v.m_)(t,e,[n],s),l=A(u,a,o,i),f=(0,y.flatten)(Object.values(l).filter((function(t){return(null==t?void 0:t.length)>0}))).sort((function(t,e){return e.significance-t.significance}));if(f.length){var h={subspace:r,dimensions:[{fieldName:e}],measures:[n],patterns:f,data:u,score:f[0].significance};c.push(h)}else c.push(null)})),u.push(c)})),u}(t,e,n,r,i,c);if(_.forEach((function(t){var e=t.filter((function(t){return!!t})).map((function(t){return a()(a()({},t),{},{score:t.score*(1-d)+f*d})}));b.push.apply(b,g()(t)),C(e,o)})),(c.insightTypes||p.qy).includes("correlation")){var M=function(t,e,n,r,i,o){var u=i.fieldPropsMap,c=[],s=n.length;if(s>=2)for(var l=0;l<s-1;l+=1)for(var f=l+1;f<s;f+=1){var h,d=A(t,{dimensions:e,subspace:r,measures:[n[l],n[f]]},u,a()(a()({},o),{},{insightTypes:["correlation"]})),p=null==d||null===(h=d.correlation)||void 0===h?void 0:h.sort((function(t,e){return e.significance-t.significance}));if(null!=p&&p.length){var v={subspace:r,dimensions:e.map((function(t){return{fieldName:t}})),measures:[n[l],n[f]],patterns:p,data:t,score:p[0].significance};c.push(v)}}return c}(t,e,n,r,i,c);C(null==M?void 0:M.map((function(t){return a()(a()({},t),{},{score:t.score*(1-d)+f*d})})),o)}if(null!=c&&c.homogeneous&&_.forEach((function(a,i){var o=function(t,e){var n=t.map((function(t){return t.fieldName})),r=e.map((function(t){return null==t?void 0:t.patterns})),a=[];return p.qy.forEach((function(t){var e=w(r.map((function(e,r){return{key:n[r],patterns:null==e?void 0:e.filter((function(e){return e.type===t}))}})),t);a.push.apply(a,g()(e))})),a}(n,a);if(o.length>0){var c=o.map((function(a){return{subspace:r,dimensions:[{fieldName:e[i]}],measures:n,patterns:[a],data:t,score:a.significance*(1-d)+f*d}}));u.addAll(c)}})),null==c||!c.ignoreSubspace){var k,S=r.map((function(t){return t.dimension})),O=((null==c||null===(k=c.dimensions)||void 0===k?void 0:k.map((function(t){return t.fieldName})))||Object.values(l).filter((function(t){return"dimension"===t.domainType})).map((function(t){return t.name}))).filter((function(t){return!S.includes(t)}));O.length>0&&O.forEach((function(e){var a=[],s=(0,y.groupBy)(t,e),h=(0,y.uniq)(l[e].rawData),v=O.filter((function(t){return t!==e}));h.length>1&&h.forEach((function(t){var l=[].concat(g()(r),[{dimension:e,value:t}]),f=T(s[t],v,n,l,i,o,u,c);a.push(f)})),null!=c&&c.homogeneous&&v.forEach((function(i){n.forEach((function(n){var o=a.map((function(t){return t.find((function(t){return!!t&&1===t.dimensions.length&&t.dimensions[0].fieldName===i&&1===t.measures.length&&t.measures[0].fieldName===n.fieldName}))||null})),c=function(t,e){var n=e.length;if(t.length!==n)return[];var r=e.map((function(t){return null==t?void 0:t.patterns})),a=[];return p.qy.forEach((function(e){var n=w(r.map((function(n,r){return{key:t[r],patterns:null==n?void 0:n.filter((function(t){return t.type===e}))}})),e);a.push.apply(a,g()(n))})),a}(h,o).map((function(a){return{subspace:r,dimensions:[{fieldName:e},{fieldName:i}],measures:[n],patterns:[a],data:t,score:a.significance*(1-d)+f*d}}));u.addAll(c)}))}))}))}return b}var S=n(7462);function O(t,e){var n,r=t.filter((function(t){return!Object.values(t).some((function(t){return null==t}))})),a=(0,x.mn)(r,null==e?void 0:e.dataProcessInfo),i={fieldPropsMap:a.reduce((function(t,e){return t[e.name]=e,t}),{}),impactMeasureReferences:(0,x.ky)(r,null==e?void 0:e.impactMeasures)},o=(null==e?void 0:e.measures)||a.filter((function(t){return"measure"===t.domainType})).map((function(t){return{fieldName:t.name,method:"SUM"}})),u=(null==e||null===(n=e.dimensions)||void 0===n?void 0:n.map((function(t){return t.fieldName})))||a.filter((function(t){return"dimension"===t.domainType})).map((function(t){return t.name})),c=new d(M),s=new d(k),l=(null==e?void 0:e.limit)||p.O2;c.limit=l,c.init([]),s.init([]),function(t,e,n,r,a,i){var o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{};T(t,e,n,[],r,a,i,o)}(r,u,o,i,c,s,e);for(var f=[],h=c.size(),v=h>l?l:h,m=0;m<v;m+=1){var g=c.pop();f.push(g)}var y={insights:f.reverse()};if(null!=e&&e.homogeneous){for(var b=[],_=s.size(),w=_>l?l:_,C=0;C<w;C+=1){var A=s.pop();b.push(A)}y.homogeneousInsights=b.reverse()}return y}function N(t,e){var n=O(t,e);if(null!=e&&e.visualization){var r=a()({lang:"en-US"},!0===(null==e?void 0:e.visualization)?{}:null==e?void 0:e.visualization);return function(t,e){var n=t.insights,r=t.homogeneousInsights,i={insights:n.map((function(t){return a()(a()({},t),{},{visualizationSpecs:(0,S.c)(t,null==e?void 0:e.visualization)})}))};if(r&&null!=e&&e.homogeneous){var o=r.map((function(t){var n=(0,S.U)(t,e.visualization),r=t.data,i=t.measures,o=t.dimensions,u=a()(a()({},t),{},{visualizationSpecs:n});return i.length>1?u.data=(0,v.II)(r,o[0].fieldName,i):u.data=(0,v.q0)(r,o[0].fieldName,i[0],o[1].fieldName),u}));i.homogeneousInsights=o}return i}(n,a()(a()({},e),{},{visualization:r}))}return n}},2434:function(t,e,n){"use strict";n.d(e,{RF:function(){return s},ky:function(){return l},mn:function(){return c}});var r=n(1448),a=n.n(r),i=n(8972),o=n(7849),u=n(8316);function c(t,e){if(!t)throw new Error("Argument `data` is missing.");var n=new o.Z(t,e).info(),r=[];return n.forEach((function(t){var e,n=a()(a()({},t),{},{domainType:null!==(e=(0,i.intersection)(["Interval","Continuous"],t.levelOfMeasurements))&&void 0!==e&&e.length?"measure":"dimension"});r.push(n)})),r}function s(t,e){return(0,u._F[e.method])(t,e.fieldName)}function l(t,e){var n={};return null==e||e.forEach((function(e){var r="".concat(e.fieldName,"@").concat(e.method),a=s(t,e);n[r]=a})),n}},8367:function(t,e,n){"use strict";n.d(e,{hs:function(){return y}});var r=n(1448),a=n.n(r),i=n(8972),o=n(9660),u=n(7784),c=n(6798),s=n(8821),l=n(5932),f=n(8382),h=n(1484),d=n(7730),p=n(6845),v=n(8045),m=n(8586),g=function(t){var e=t.dimensions,n=t.measures,r=t.data;return{subspace:[],dimensions:e,measures:n,patterns:t.patternInfos,data:r}},y=function(t){var e=t.options,n=void 0===e?{}:e,r=t.insightType,y=n.visualizationOptions,b=void 0===y?{lang:"zh-CN"}:y,_=(0,h.ew)(t),w=function(t){var e=t.patternInfos,n=void 0===e?[]:e;return"time_series_outlier"===t.insightType?(0,p.Mo)(n):(0,p.te)(n)}({patternInfos:_,insightType:r}),x=g(a()(a()({},t),{},{patternInfos:_}));if((0,i.size)(w)){var M=g(a()(a()({},t),{},{patternInfos:w})),k=function(t){var e,n,r=(null!==(e=t.patterns[0])&&void 0!==e?e:{}).type,a={trend:o.q,change_point:u.u,time_series_outlier:c.g,low_variance:s.J,category_outlier:l.P};return null===(n=a[r])||void 0===n?void 0:n.call(a,t)}(M),C=(0,f.l)(M),A=(0,d.Z)(M,b);return a()(a()({},x),{},{visualizationSpecs:[{annotationSpec:k,chartSpec:C,patternType:r,narrativeSpec:A}]})}var T=function(t,e){var n=(0,v.c)(a()(a()({},t),0===(0,i.size)(t.patterns)?{patterns:[{type:e}]}:{}));return(0,m.d)([n],t)}(x,r);return a()(a()({},x),{},{visualizationSpecs:[{chartSpec:T,patternType:r}]})}},7462:function(t,e,n){"use strict";n.d(e,{U:function(){return f},c:function(){return l}});var r=n(1448),a=n.n(r),i=n(3100),o=n.n(i),u=n(8972),c=n(7730),s=n(8382),l=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{lang:"en-US"},n=t.patterns,r=[];if(!n.length)return[];var i=(0,u.groupBy)(n,(function(t){return t.type}));return Object.entries(i).forEach((function(n){var i=o()(n,2),u=i[0],l=i[1],f=(0,s.l)(a()(a()({},t),{},{patterns:l}));r.push({patternType:u,chartSpec:f,narrativeSpec:(0,c.Z)(a()(a()({},t),{},{patterns:l}),e)})})),r},f=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{lang:"en-US"},n=t.patterns,r=[];return n.forEach((function(n){var i=n.insightType;r.push({patternType:i,chartSpec:{},narrativeSpec:(0,c.Z)(a()(a()({},(0,u.omit)(t,["patterns"])),n),e)})})),r}},8316:function(t,e,n){"use strict";n.d(e,{II:function(){return h},_F:function(){return l},m_:function(){return f},q0:function(){return d}});var r=n(1448),a=n.n(r),i=n(9057),o=n.n(i),u=n(3100),c=n.n(u),s=n(8972),l={SUM:function(t,e){return(0,s.sumBy)(t,e)},COUNT:function(t,e){return t.filter((function(t){return e in t})).length},MAX:function(t,e){var n;return null===(n=(0,s.maxBy)(t,e))||void 0===n?void 0:n[e]},MIN:function(t,e){var n;return null===(n=(0,s.minBy)(t,e))||void 0===n?void 0:n[e]},MEAN:function(t,e){return(0,s.meanBy)(t,e)},COUNT_DISTINCT:function(t,e){return(0,s.uniq)(t.filter((function(t){return e in t})).map((function(t){return t[e]}))).length}};function f(t,e,n,r){var a=(0,s.groupBy)(t,e);return(r?(0,s.sortBy)(Object.entries(a),"0"):Object.entries(a)).map((function(t){var r=c()(t,2),a=r[0],i=r[1],u=o()({},e,a);return n.forEach((function(t){var e=t.fieldName,n=t.method,r=l[n];u[e]=r(i,e)})),u}))}function h(t,e,n){var r=(0,s.groupBy)(t,e),a=[];return Object.entries(r).forEach((function(t){var r=c()(t,2),i=r[0],u=r[1];n.forEach((function(t){var n=t.fieldName,r=t.method;if(n in u[0]){var c=(0,l[r])(u,n);a.push(o()(o()(o()({},e,i),"value",c),"measureName",n))}}))})),a}function d(t,e,n,r){var i=(0,s.groupBy)(t,e),u=n.fieldName,f=n.method,h=l[f];return(0,s.flatten)(Object.entries(i).map((function(t){var n=c()(t,2),i=n[0],l=n[1],f=(0,s.groupBy)(l,r);return Object.entries(f).map((function(t){var e=c()(t,2),n=e[0],a=e[1];return o()(o()({},r,n),u,h(a,u))})).map((function(t){return a()(a()({},t),{},o()({},e,i))}))})))}},8670:function(t,e,n){"use strict";n.d(e,{Z:function(){return w}});var r=n(4479),a=n.n(r),i=n(1448),o=n.n(i),u=n(4528),c=n.n(u),s=n(8798),l=n.n(s),f=n(9057),h=n.n(f),d=n(8972),p=n(5226),v=n(2267),m=n(8346);function g(t,e,n){return n?(0,d.startsWith)(n,".")?(0,d.get)(e,n.slice(1)):(0,d.get)(t,n):e}function y(t,e,n,r){return(0,d.slice)((a=g(t,e,n),(0,d.isUndefined)(a)?[]:(0,d.isArray)(a)?a:[a]),0,r);var a}function b(t,e){if((0,p.sI)(e)&&("delta_value"===t||"ratio_value"===t)){if(e>0)return"positive";if(e<0)return"negative"}}var _=function(){function t(e){var n=e.variable,r=e.structures,a=e.structureTemps;c()(this,t),h()(this,"variable",void 0),h()(this,"structures",void 0),h()(this,"structureTemps",void 0),this.variable=n,this.structures=r,this.structureTemps=a}return l()(t,[{key:"generateTextPhrase",value:function(t){return{type:"text",value:(0,d.toString)(t)}}},{key:"generateVarPhrase",value:function(t,e,n,r){if(!r)return this.generateTextPhrase(n);var a=r.varType,i=r.formatter,u=r.extraCustomMeta,c=function(t,e,n){return(0,p.sI)(e)?"delta_value"===t||"ratio_value"===t?n?n(Math.abs(e)):(0,m.Z)(Math.abs(e)):"proportion"===t?n?n(Math.abs(e)):"".concat((0,m.Z)(100*e),"%"):n?n(e):(0,m.Z)(e):e}(a,n,i);if(a){if((0,v.OC)(a))return{type:"entity",value:c,metadata:{entityType:a,origin:(0,p.sI)(n)?n:void 0,assessment:b(a,n),generateVariableInfo:{scopeVariable:t,path:e}}};var s=null==u?void 0:u(this.variable,t);return{type:"custom",value:c,metadata:o()({customType:a,generateVariableInfo:{scopeVariable:t,path:e}},s)}}return this.generateTextPhrase((0,d.toString)(n))}},{key:"generateSentence",value:function(t,e,n){for(var r,i,u=this,c=[],s=(r=/\${(.*?)}/,i=/&{(.*?)}/,t.split(/([\$|&]{.*?})/).filter((function(t){return t})).map((function(t){var e,n,a=null===(e=i.exec(t))||void 0===e?void 0:e[1];if(a)return{value:a,type:"template"};var o=null===(n=r.exec(t))||void 0===n?void 0:n[1];return o?{value:o,type:"variable"}:{value:t,type:"text"}}))),l=function(){var t,r,i,l=s[f],h=l.type,p=l.value;if("template"===h){var v=p,m=u.structureTemps.find((function(t){return t.templateId===v}));if(m){var b,_=m.template,w=m.useVariable,x=m.variableMetaMap,M=m.limit,k=m.separator,C=void 0===k?",":k,A=y(u.variable,e,w,M),T=A.map((function(t){return u.generateSentence(_,t,x)})).reduce((function(t,e,n){var r=[].concat(a()(t),a()(e));return n!==A.length-1&&r.push(u.generateTextPhrase(C)),r}),[]);c=(b=c).concat.apply(b,a()(T))}else console.warn("".concat(v," is not exist"))}else if("variable"===h){var S=p,O=null==n?void 0:n[S],N=null!=O&&O.getDisplayValue?(t=null==O?void 0:O.getDisplayValue,r=u.variable,i=e,(0,d.isString)(t)?(0,d.replace)(t,/\${(.*?)}/g,(function(t){var e,n=null===(e=/\${(.*?)}/.exec(t))||void 0===e?void 0:e[1];return n?g(r,i,n):""})):t(r,i)):g(u.variable,e,S);c.push(u.generateVarPhrase(e,S,N,o()({},O)))}else"text"===h&&c.push(u.generateTextPhrase(p))},f=0;f<s.length;f+=1)l();return c}},{key:"generateParagraphs",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.variable,r=t.variableMetaMap,a=t.template,i=t.displayType,u=void 0===i?"paragraph":i,c=t.useVariable,s=void 0===c?"":c,l=t.limit,f=t.bulletOrder,h=t.children,d=t.className,p=y(this.variable,n,s,l);return"paragraph"===u?p.map((function(t){return{type:"normal",phrases:e.generateSentence(a,t,r),className:d}})):"bullet"===u?[{type:"bullets",className:d,isOrder:f,bullets:p.map((function(t){return{type:"bullet-item",phrases:e.generateSentence(a,t,r),subBullet:h?e.generateParagraphs(o()(o()({},h),{},{displayType:"bullet"}),t)[0]:void 0}}))}]:null}},{key:"generateSection",value:function(){var t=this;return{paragraphs:this.structures.reduce((function(e,n){return[].concat(a()(e),a()(t.generateParagraphs(n)))}),[])}}},{key:"generateNarrative",value:function(){return{sections:[this.generateSection()]}}}]),t}();function w(t){return new _(t).generateNarrative()}},5244:function(t,e,n){"use strict";n.d(e,{e:function(){return r}});var r=["metric_name","metric_value","other_metric_value","contribute_ratio","delta_value","ratio_value","trend_desc","dim_value","time_desc","proportion"]},3069:function(){},2267:function(t,e,n){"use strict";n.d(e,{FX:function(){return g},Mu:function(){return u},NS:function(){return i},OC:function(){return p},TO:function(){return f},Tv:function(){return v},aY:function(){return l},cL:function(){return h},fc:function(){return y},lD:function(){return c},ps:function(){return d},rF:function(){return m},uV:function(){return o},xf:function(){return s},zu:function(){return b}});var r=n(5226),a=n(5244);function i(t){return(0,r.Kn)(t)&&"customType"in t}function o(t){return(0,r.Kn)(t)&&"customType"in t}function u(t){return(0,r.Kn)(t)&&"paragraphs"in t&&Array.isArray(null==t?void 0:t.paragraphs)}function c(t){return(0,r.Kn)(t)&&"normal"===(null==t?void 0:t.type)&&Array.isArray(null==t?void 0:t.phrases)}function s(t){return(0,r.Kn)(t)&&"bullets"===(null==t?void 0:t.type)&&Array.isArray(null==t?void 0:t.bullets)}function l(t){return(0,r.Kn)(t)&&"divider"===(null==t?void 0:t.type)}function f(t){if(null!=t&&t.startsWith("heading")){var e=Number(null==t?void 0:t.slice(-1));if(e>=1&&e<=6)return e}return NaN}function h(t){if((0,r.Kn)(t)&&"type"in t&&(0,r.HD)(t.type)){var e=f(null==t?void 0:t.type);return t.type.startsWith("heading")&&!Number.isNaN(e)}return!1}function d(t){var e;return"custom"===(null==t?void 0:t.type)&&!(null==t||null===(e=t.metadata)||void 0===e||!e.customType)}function p(t){return a.e.includes(t)}function v(t){var e;return"entity"===(null==t?void 0:t.type)&&a.e.includes(null==t||null===(e=t.metadata)||void 0===e?void 0:e.entityType)}function m(t){return"text"===(null==t?void 0:t.type)}function g(t){return"escape"===(null==t?void 0:t.type)}function y(t){return"formula"===(null==t?void 0:t.type)}function b(t){return"image"===(null==t?void 0:t.type)}},8346:function(t,e,n){"use strict";function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if("string"==typeof t)return t;var n=[{value:1,symbol:""},{value:1e3,symbol:"k"},{value:1e6,symbol:"M"},{value:1e9,symbol:"G"},{value:1e12,symbol:"T"},{value:1e15,symbol:"P"},{value:1e18,symbol:"E"}],r=/\.0+$|(\.[0-9]*[1-9])0+$/,a=n.slice().reverse().find((function(e){return t>=e.value}));return a?(t/a.value).toFixed(e).replace(r,"$1")+a.symbol:t.toFixed(e)}n.d(e,{Z:function(){return r}})},5226:function(t,e,n){"use strict";n.d(e,{HD:function(){return o},Kn:function(){return u},sI:function(){return c}});var r=n(5570),a=n.n(r),i=n(8972);function o(t){return"string"==typeof t}function u(t){return null!==t&&"object"===a()(t)}function c(t){var e=(0,i.toNumber)(t);return!(0,i.isNaN)(e)}},660:function(t,e,n){"use strict";var r=n(4479).default,a=n(4528).default,i=n(8798).default,o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var u=o(n(322)),c=function(t,e){for(var n=0,r=t.length;n<r;n++)t[n]=e},s=function(t,e){if("number"==typeof t)return t;throw Error("Specifiy an iteratee")},l=function(){function t(e){var n=e.breakpointVerifier,r=e.iteratee,i=void 0===r?s:r,o=e.chunkSize,u=void 0===o?1e3:o;a(this,t),this.iteratee=i,this.breakpointVerifier=n,this.chunkSize=u,this.init=!1,this.maximum=[],this.model=[],this.mu0=0,this.kappa0=1,this.alpha0=1,this.beta0=1,this.muT=[this.mu0],this.kappaT=[this.kappa0],this.alphaT=[this.alpha0],this.betaT=[this.beta0],this.breakPoints_=[],this.iteration=0,this.data=[],this.size=0}return i(t,[{key:"exec",value:function(t){var e=this.chunkSize;if(!this.init){var n=this.maximum=new Array(e+1);c(n,0);var r=this.model=new Array(e+1);c(r,0);for(var a=0;a<r.length;a++)r[a]=new Array(e+1),c(r[a],0);r[0][0]=1,this.mu0=0,this.kappa0=1,this.alpha0=1,this.beta0=1,this.muT=[this.mu0],this.kappaT=[this.kappa0],this.alphaT=[this.alpha0],this.betaT=[this.beta0],this.breakPoints_=[],this.iteration=0,this.init=!0}for(var i=function(t,e){for(var n=[],r=0,a=t.length;r<a;r+=e)n.push(t.slice(r,r+e));return n}(t,e),o=0,u=i.length;o<u;o++){var s=i[0];this.data=s,this.size=s.length,this.iteration=o,this.run(),this.computeBreakPoints();for(var l=this.model,f=l[l.length-1],h=0;h<l.length;h++)l[h]=new Array(e+1),c(l[h],0);l[0]=f,l[0][0]=1}}},{key:"get",value:function(t){return this.iteratee(this.data[t],t)}},{key:"run",value:function(){for(var t,e,n,r=0,a=0;a<this.size;a++){for(var i=new Array(a+1),o=0;o<=a;o++)i[o]=this.betaT[o]*(this.kappaT[o]+1)/(this.alphaT[o]*this.kappaT[o]);var c=u.default.predict(this.get(a),this.muT,i,this.alphaT);.005;for(var s=1;s<=a+1;s++)this.model[s][a+1]=this.model[s-1][a]*c[s-1]*.995;t=0;for(var l=0;l<=a;l++)t+=this.model[l][a]*c[l]*.005;this.model[0][a+1]=t,e=0;for(var f=0;f<this.size;f++)e+=this.model[f][a+1];for(var h=0;h<=this.size;h++)this.model[h][a+1]=this.model[h][a+1]/e;this.update(a),n=Number.MIN_VALUE;for(var d=0;d<=a;d++)this.model[d][a]>n&&(n=this.model[d][a],r=d);this.maximum[a]=r}}},{key:"update",value:function(t){var e,n,r,a;e=new Array(t+2),n=new Array(t+2),r=new Array(t+2),a=new Array(t+2),e[0]=this.mu0,n[0]=this.kappa0,r[0]=this.alpha0,a[0]=this.beta0;for(var i=0;i<=t;i++)e[i+1]=(this.kappaT[i]*this.muT[i]+this.get(t))/(this.kappaT[i]+1),n[i+1]=this.kappaT[i]+1,r[i+1]=this.alphaT[i]+.5,a[i+1]=this.betaT[i]+this.kappaT[i]*Math.pow(this.get(t)-this.muT[i],2)/(2*(this.kappaT[i]+1));this.muT=e,this.kappaT=n,this.alphaT=r,this.betaT=a}},{key:"computeIndex",value:function(t){return this.iteration*this.chunkSize+t}},{key:"computeBreakPoints",value:function(){for(var t=this.breakPoints_,e=0,n=t[0],r=1;r<this.size;r++)if(this.maximum[r-1]>this.maximum[r])if(e=r-this.maximum[r],0===t.length)n={data:this.data[e],index:this.computeIndex(e)},t.push(n);else{var a={data:this.data[e],index:this.computeIndex(e)};this.breakpointVerifier(a,n)&&(n=a,t.push(n))}}},{key:"breakPoints",value:function(){return r(this.breakPoints_).sort((function(t,e){return t.index-e.index}))}}]),t}();e.default=l},2242:function(t,e,n){"use strict";var r=n(4528).default,a=n(8798).default;Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){r(this,t)}return a(t,[{key:"logGamma",value:function(t){var e=1+76.18009173/(t+0)-86.50532033/(t+1)+24.01409822/(t+2)-1.231739516/(t+3)+.00120858003/(t+4)-536382e-11/(t+5);return(t-.5)*Math.log(t+4.5)-(t+4.5)+Math.log(e*Math.sqrt(2*Math.PI))}}]),t}();e.default=i},322:function(t,e,n){"use strict";var r=n(4528).default,a=n(8798).default,i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var o=i(n(2242)),u=function(){function t(){r(this,t)}return a(t,null,[{key:"predict",value:function(t,e,n,r){for(var a=0,i=n.length,u=new Array(i),c=new Array(i),s=new Array(i),l=new Array(i),f=new o.default,h=0;h<i;h++)c[h]=2*r[h];for(h=0;h<i;h++)l[h]=Math.exp(f.logGamma(c[h]/2+.5)-f.logGamma(c[h]/2));for(h=0;h<i;h++)u[h]=n[h]*c[h]*Math.PI,u[h]=Math.pow(u[h],-.5)*l[h];for(h=0;h<i;h++)a=1+1/(c[h]*n[h])*Math.pow(t-e[h],2),a=Math.pow(a,-(c[h]+1)/2),s[h]=u[h]*a;return s}}]),t}();e.default=u},5376:function(t,e){"use strict";var n=2.2,r=[3.240712470389558,-.969259258688888,.05563600315398933,-1.5372626602963142,1.875996969313966,-.2039948802843549,-.49857440415943116,.041556132211625726,1.0570636917433989],a=[.41242371206635076,.21265606784927693,.019331987577444885,.3575793401363035,.715157818248362,.11919267420354762,.1804662232369621,.0721864539171564,.9504491124870351],i={protan:{x:.7465,y:.2535,m:1.273463,yi:-.073894},deutan:{x:1.4,y:-.4,m:.968437,yi:.003331},tritan:{x:.1748,y:0,m:.062921,yi:.292119},custom:{x:.735,y:.265,m:-1.059259,yi:1.026914}};e.a=function(t,e,o){var u,c,s,l,f,h,d,p,v,m,g,y,b,_,w,x,M,k,C,A,T;return"achroma"===e?(u={R:u=.212656*t.R+.715158*t.G+.072186*t.B,G:u,B:u},o&&(s=(c=1.75)+1,u.R=(c*u.R+t.R)/s,u.G=(c*u.G+t.G)/s,u.B=(c*u.B+t.B)/s),u):(l=i[e],f=function(t){var e=t.X+t.Y+t.Z;return 0===e?{x:0,y:0,Y:t.Y}:{x:t.X/e,y:t.Y/e,Y:t.Y}}(function(t){var e=a,n={},r=t.R/255,i=t.G/255,o=t.B/255;return r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,o=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92,n.X=r*e[0]+i*e[3]+o*e[6],n.Y=r*e[1]+i*e[4]+o*e[7],n.Z=r*e[2]+i*e[5]+o*e[8],n}(t)),h=(f.y-l.y)/(f.x-l.x),d=f.y-f.x*h,v=h*(p=(l.yi-d)/(h-l.m))+d,0,(u={}).X=p*f.Y/v,u.Y=f.Y,u.Z=(1-(p+v))*f.Y/v,k=.312713*f.Y/.329016,C=.358271*f.Y/.329016,m=k-u.X,g=C-u.Z,y=m*(A=r)[0]+0*A[3]+g*A[6],b=m*A[1]+0*A[4]+g*A[7],_=m*A[2]+0*A[5]+g*A[8],u.R=u.X*A[0]+u.Y*A[3]+u.Z*A[6],u.G=u.X*A[1]+u.Y*A[4]+u.Z*A[7],u.B=u.X*A[2]+u.Y*A[5]+u.Z*A[8],w=((u.R<0?0:1)-u.R)/y,x=((u.G<0?0:1)-u.G)/b,(M=(M=((u.B<0?0:1)-u.B)/_)>1||M<0?0:M)>(T=(w=w>1||w<0?0:w)>(x=x>1||x<0?0:x)?w:x)&&(T=M),u.R+=T*y,u.G+=T*b,u.B+=T*_,u.R=255*(u.R<=0?0:u.R>=1?1:Math.pow(u.R,1/n)),u.G=255*(u.G<=0?0:u.G>=1?1:Math.pow(u.G,1/n)),u.B=255*(u.B<=0?0:u.B>=1?1:Math.pow(u.B,1/n)),o&&(s=(c=1.75)+1,u.R=(c*u.R+t.R)/s,u.G=(c*u.G+t.G)/s,u.B=(c*u.B+t.B)/s),u)}},3042:function(t,e,n){"use strict";var r=n(5533),a=n(5376).a,i={protanomaly:{type:"protan",anomalize:!0},protanopia:{type:"protan"},deuteranomaly:{type:"deutan",anomalize:!0},deuteranopia:{type:"deutan"},tritanomaly:{type:"tritan",anomalize:!0},tritanopia:{type:"tritan"},achromatomaly:{type:"achroma",anomalize:!0},achromatopsia:{type:"achroma"}},o=function(t){return Math.round(255*t)},u=function(t){return function(e,n){var u=r(e);if(!u)return n?{R:0,G:0,B:0}:"#000000";var c=new a({R:o(u.red()||0),G:o(u.green()||0),B:o(u.blue()||0)},i[t].type,i[t].anomalize);return c.R=c.R||0,c.G=c.G||0,c.B=c.B||0,n?(delete c.X,delete c.Y,delete c.Z,c):new r.RGB(c.R%256/255,c.G%256/255,c.B%256/255,1).hex()}};for(var c in i)e[c]=u(c)},8972:function(t,e,n){var r;t=n.nmd(t);var a=n(5570).default;(function(){var i,o="Expected a function",u="__lodash_hash_undefined__",c="__lodash_placeholder__",s=16,l=32,f=64,h=128,d=256,p=1/0,v=9007199254740991,m=NaN,g=4294967295,y=[["ary",h],["bind",1],["bindKey",2],["curry",8],["curryRight",s],["flip",512],["partial",l],["partialRight",f],["rearg",d]],b="[object Arguments]",_="[object Array]",w="[object Boolean]",x="[object Date]",M="[object Error]",k="[object Function]",C="[object GeneratorFunction]",A="[object Map]",T="[object Number]",S="[object Object]",O="[object Promise]",N="[object RegExp]",P="[object Set]",D="[object String]",I="[object Symbol]",j="[object WeakMap]",R="[object ArrayBuffer]",L="[object DataView]",E="[object Float32Array]",z="[object Float64Array]",B="[object Int8Array]",Q="[object Int16Array]",F="[object Int32Array]",q="[object Uint8Array]",G="[object Uint8ClampedArray]",W="[object Uint16Array]",U="[object Uint32Array]",Y=/\b__p \+= '';/g,$=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,J=/[&<>"']/g,Z=RegExp(V.source),K=RegExp(J.source),X=/<%-([\s\S]+?)%>/g,tt=/<%([\s\S]+?)%>/g,et=/<%=([\s\S]+?)%>/g,nt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rt=/^\w*$/,at=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,it=/[\\^$.*+?()[\]{}|]/g,ot=RegExp(it.source),ut=/^\s+/,ct=/\s/,st=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,lt=/\{\n\/\* \[wrapped with (.+)\] \*/,ft=/,? & /,ht=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,dt=/[()=,{}\[\]\/\s]/,pt=/\\(\\)?/g,vt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,mt=/\w*$/,gt=/^[-+]0x[0-9a-f]+$/i,yt=/^0b[01]+$/i,bt=/^\[object .+?Constructor\]$/,_t=/^0o[0-7]+$/i,wt=/^(?:0|[1-9]\d*)$/,xt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Mt=/($^)/,kt=/['\n\r\u2028\u2029\\]/g,Ct="\\ud800-\\udfff",At="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Tt="\\u2700-\\u27bf",St="a-z\\xdf-\\xf6\\xf8-\\xff",Ot="A-Z\\xc0-\\xd6\\xd8-\\xde",Nt="\\ufe0e\\ufe0f",Pt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Dt="['’]",It="["+Ct+"]",jt="["+Pt+"]",Rt="["+At+"]",Lt="\\d+",Et="["+Tt+"]",zt="["+St+"]",Bt="[^"+Ct+Pt+Lt+Tt+St+Ot+"]",Qt="\\ud83c[\\udffb-\\udfff]",Ft="[^"+Ct+"]",qt="(?:\\ud83c[\\udde6-\\uddff]){2}",Gt="[\\ud800-\\udbff][\\udc00-\\udfff]",Wt="["+Ot+"]",Ut="\\u200d",Yt="(?:"+zt+"|"+Bt+")",$t="(?:"+Wt+"|"+Bt+")",Ht="(?:['’](?:d|ll|m|re|s|t|ve))?",Vt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Jt="(?:"+Rt+"|"+Qt+")"+"?",Zt="["+Nt+"]?",Kt=Zt+Jt+("(?:"+Ut+"(?:"+[Ft,qt,Gt].join("|")+")"+Zt+Jt+")*"),Xt="(?:"+[Et,qt,Gt].join("|")+")"+Kt,te="(?:"+[Ft+Rt+"?",Rt,qt,Gt,It].join("|")+")",ee=RegExp(Dt,"g"),ne=RegExp(Rt,"g"),re=RegExp(Qt+"(?="+Qt+")|"+te+Kt,"g"),ae=RegExp([Wt+"?"+zt+"+"+Ht+"(?="+[jt,Wt,"$"].join("|")+")",$t+"+"+Vt+"(?="+[jt,Wt+Yt,"$"].join("|")+")",Wt+"?"+Yt+"+"+Ht,Wt+"+"+Vt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Lt,Xt].join("|"),"g"),ie=RegExp("["+Ut+Ct+At+Nt+"]"),oe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ue=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ce=-1,se={};se[E]=se[z]=se[B]=se[Q]=se[F]=se[q]=se[G]=se[W]=se[U]=!0,se[b]=se[_]=se[R]=se[w]=se[L]=se[x]=se[M]=se[k]=se[A]=se[T]=se[S]=se[N]=se[P]=se[D]=se[j]=!1;var le={};le[b]=le[_]=le[R]=le[L]=le[w]=le[x]=le[E]=le[z]=le[B]=le[Q]=le[F]=le[A]=le[T]=le[S]=le[N]=le[P]=le[D]=le[I]=le[q]=le[G]=le[W]=le[U]=!0,le[M]=le[k]=le[j]=!1;var fe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},he=parseFloat,de=parseInt,pe="object"==(void 0===n.g?"undefined":a(n.g))&&n.g&&n.g.Object===Object&&n.g,ve="object"==("undefined"==typeof self?"undefined":a(self))&&self&&self.Object===Object&&self,me=pe||ve||Function("return this")(),ge="object"==a(e)&&e&&!e.nodeType&&e,ye=ge&&"object"==a(t)&&t&&!t.nodeType&&t,be=ye&&ye.exports===ge,_e=be&&pe.process,we=function(){try{var t=ye&&ye.require&&ye.require("util").types;return t||_e&&_e.binding&&_e.binding("util")}catch(t){}}(),xe=we&&we.isArrayBuffer,Me=we&&we.isDate,ke=we&&we.isMap,Ce=we&&we.isRegExp,Ae=we&&we.isSet,Te=we&&we.isTypedArray;function Se(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Oe(t,e,n,r){for(var a=-1,i=null==t?0:t.length;++a<i;){var o=t[a];e(r,o,n(o),t)}return r}function Ne(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Pe(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function De(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Ie(t,e){for(var n=-1,r=null==t?0:t.length,a=0,i=[];++n<r;){var o=t[n];e(o,n,t)&&(i[a++]=o)}return i}function je(t,e){return!!(null==t?0:t.length)&&We(t,e,0)>-1}function Re(t,e,n){for(var r=-1,a=null==t?0:t.length;++r<a;)if(n(e,t[r]))return!0;return!1}function Le(t,e){for(var n=-1,r=null==t?0:t.length,a=Array(r);++n<r;)a[n]=e(t[n],n,t);return a}function Ee(t,e){for(var n=-1,r=e.length,a=t.length;++n<r;)t[a+n]=e[n];return t}function ze(t,e,n,r){var a=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++a]);++a<i;)n=e(n,t[a],a,t);return n}function Be(t,e,n,r){var a=null==t?0:t.length;for(r&&a&&(n=t[--a]);a--;)n=e(n,t[a],a,t);return n}function Qe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var Fe=He("length");function qe(t,e,n){var r;return n(t,(function(t,n,a){if(e(t,n,a))return r=n,!1})),r}function Ge(t,e,n,r){for(var a=t.length,i=n+(r?1:-1);r?i--:++i<a;)if(e(t[i],i,t))return i;return-1}function We(t,e,n){return e==e?function(t,e,n){var r=n-1,a=t.length;for(;++r<a;)if(t[r]===e)return r;return-1}(t,e,n):Ge(t,Ye,n)}function Ue(t,e,n,r){for(var a=n-1,i=t.length;++a<i;)if(r(t[a],e))return a;return-1}function Ye(t){return t!=t}function $e(t,e){var n=null==t?0:t.length;return n?Ze(t,e)/n:m}function He(t){return function(e){return null==e?i:e[t]}}function Ve(t){return function(e){return null==t?i:t[e]}}function Je(t,e,n,r,a){return a(t,(function(t,a,i){n=r?(r=!1,t):e(n,t,a,i)})),n}function Ze(t,e){for(var n,r=-1,a=t.length;++r<a;){var o=e(t[r]);o!==i&&(n=n===i?o:n+o)}return n}function Ke(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Xe(t){return t?t.slice(0,yn(t)+1).replace(ut,""):t}function tn(t){return function(e){return t(e)}}function en(t,e){return Le(e,(function(e){return t[e]}))}function nn(t,e){return t.has(e)}function rn(t,e){for(var n=-1,r=t.length;++n<r&&We(e,t[n],0)>-1;);return n}function an(t,e){for(var n=t.length;n--&&We(e,t[n],0)>-1;);return n}function on(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var un=Ve({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),cn=Ve({"&":"&","<":"<",">":">",'"':""","'":"'"});function sn(t){return"\\"+fe[t]}function ln(t){return ie.test(t)}function fn(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function hn(t,e){return function(n){return t(e(n))}}function dn(t,e){for(var n=-1,r=t.length,a=0,i=[];++n<r;){var o=t[n];o!==e&&o!==c||(t[n]=c,i[a++]=n)}return i}function pn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function vn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function mn(t){return ln(t)?function(t){var e=re.lastIndex=0;for(;re.test(t);)++e;return e}(t):Fe(t)}function gn(t){return ln(t)?function(t){return t.match(re)||[]}(t):function(t){return t.split("")}(t)}function yn(t){for(var e=t.length;e--&&ct.test(t.charAt(e)););return e}var bn=Ve({"&":"&","<":"<",">":">",""":'"',"'":"'"});var _n=function t(e){var n,r=(e=null==e?me:_n.defaults(me.Object(),e,_n.pick(me,ue))).Array,ct=e.Date,Ct=e.Error,At=e.Function,Tt=e.Math,St=e.Object,Ot=e.RegExp,Nt=e.String,Pt=e.TypeError,Dt=r.prototype,It=At.prototype,jt=St.prototype,Rt=e["__core-js_shared__"],Lt=It.toString,Et=jt.hasOwnProperty,zt=0,Bt=(n=/[^.]+$/.exec(Rt&&Rt.keys&&Rt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Qt=jt.toString,Ft=Lt.call(St),qt=me._,Gt=Ot("^"+Lt.call(Et).replace(it,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Wt=be?e.Buffer:i,Ut=e.Symbol,Yt=e.Uint8Array,$t=Wt?Wt.allocUnsafe:i,Ht=hn(St.getPrototypeOf,St),Vt=St.create,Jt=jt.propertyIsEnumerable,Zt=Dt.splice,Kt=Ut?Ut.isConcatSpreadable:i,Xt=Ut?Ut.iterator:i,te=Ut?Ut.toStringTag:i,re=function(){try{var t=pi(St,"defineProperty");return t({},"",{}),t}catch(t){}}(),ie=e.clearTimeout!==me.clearTimeout&&e.clearTimeout,fe=ct&&ct.now!==me.Date.now&&ct.now,pe=e.setTimeout!==me.setTimeout&&e.setTimeout,ve=Tt.ceil,ge=Tt.floor,ye=St.getOwnPropertySymbols,_e=Wt?Wt.isBuffer:i,we=e.isFinite,Fe=Dt.join,Ve=hn(St.keys,St),wn=Tt.max,xn=Tt.min,Mn=ct.now,kn=e.parseInt,Cn=Tt.random,An=Dt.reverse,Tn=pi(e,"DataView"),Sn=pi(e,"Map"),On=pi(e,"Promise"),Nn=pi(e,"Set"),Pn=pi(e,"WeakMap"),Dn=pi(St,"create"),In=Pn&&new Pn,jn={},Rn=Fi(Tn),Ln=Fi(Sn),En=Fi(On),zn=Fi(Nn),Bn=Fi(Pn),Qn=Ut?Ut.prototype:i,Fn=Qn?Qn.valueOf:i,qn=Qn?Qn.toString:i;function Gn(t){if(iu(t)&&!Ho(t)&&!(t instanceof $n)){if(t instanceof Yn)return t;if(Et.call(t,"__wrapped__"))return qi(t)}return new Yn(t)}var Wn=function(){function t(){}return function(e){if(!au(e))return{};if(Vt)return Vt(e);t.prototype=e;var n=new t;return t.prototype=i,n}}();function Un(){}function Yn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function $n(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function Hn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Vn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Jn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Zn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Jn;++e<n;)this.add(t[e])}function Kn(t){var e=this.__data__=new Vn(t);this.size=e.size}function Xn(t,e){var n=Ho(t),r=!n&&$o(t),a=!n&&!r&&Ko(t),i=!n&&!r&&!a&&du(t),o=n||r||a||i,u=o?Ke(t.length,Nt):[],c=u.length;for(var s in t)!e&&!Et.call(t,s)||o&&("length"==s||a&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||wi(s,c))||u.push(s);return u}function tr(t){var e=t.length;return e?t[Zr(0,e-1)]:i}function er(t,e){return zi(Da(t),lr(e,0,t.length))}function nr(t){return zi(Da(t))}function rr(t,e,n){(n!==i&&!Wo(t[e],n)||n===i&&!(e in t))&&cr(t,e,n)}function ar(t,e,n){var r=t[e];Et.call(t,e)&&Wo(r,n)&&(n!==i||e in t)||cr(t,e,n)}function ir(t,e){for(var n=t.length;n--;)if(Wo(t[n][0],e))return n;return-1}function or(t,e,n,r){return vr(t,(function(t,a,i){e(r,t,n(t),i)})),r}function ur(t,e){return t&&Ia(e,Ru(e),t)}function cr(t,e,n){"__proto__"==e&&re?re(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function sr(t,e){for(var n=-1,a=e.length,o=r(a),u=null==t;++n<a;)o[n]=u?i:Nu(t,e[n]);return o}function lr(t,e,n){return t==t&&(n!==i&&(t=t<=n?t:n),e!==i&&(t=t>=e?t:e)),t}function fr(t,e,n,r,a,o){var u,c=1&e,s=2&e,l=4&e;if(n&&(u=a?n(t,r,a,o):n(t)),u!==i)return u;if(!au(t))return t;var f=Ho(t);if(f){if(u=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&Et.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!c)return Da(t,u)}else{var h=gi(t),d=h==k||h==C;if(Ko(t))return Aa(t,c);if(h==S||h==b||d&&!a){if(u=s||d?{}:bi(t),!c)return s?function(t,e){return Ia(t,mi(t),e)}(t,function(t,e){return t&&Ia(e,Lu(e),t)}(u,t)):function(t,e){return Ia(t,vi(t),e)}(t,ur(u,t))}else{if(!le[h])return a?t:{};u=function(t,e,n){var r=t.constructor;switch(e){case R:return Ta(t);case w:case x:return new r(+t);case L:return function(t,e){var n=e?Ta(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case E:case z:case B:case Q:case F:case q:case G:case W:case U:return Sa(t,n);case A:return new r;case T:case D:return new r(t);case N:return function(t){var e=new t.constructor(t.source,mt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case P:return new r;case I:return a=t,Fn?St(Fn.call(a)):{}}var a}(t,h,c)}}o||(o=new Kn);var p=o.get(t);if(p)return p;o.set(t,u),lu(t)?t.forEach((function(r){u.add(fr(r,e,n,r,t,o))})):ou(t)&&t.forEach((function(r,a){u.set(a,fr(r,e,n,a,t,o))}));var v=f?i:(l?s?ui:oi:s?Lu:Ru)(t);return Ne(v||t,(function(r,a){v&&(r=t[a=r]),ar(u,a,fr(r,e,n,a,t,o))})),u}function hr(t,e,n){var r=n.length;if(null==t)return!r;for(t=St(t);r--;){var a=n[r],o=e[a],u=t[a];if(u===i&&!(a in t)||!o(u))return!1}return!0}function dr(t,e,n){if("function"!=typeof t)throw new Pt(o);return ji((function(){t.apply(i,n)}),e)}function pr(t,e,n,r){var a=-1,i=je,o=!0,u=t.length,c=[],s=e.length;if(!u)return c;n&&(e=Le(e,tn(n))),r?(i=Re,o=!1):e.length>=200&&(i=nn,o=!1,e=new Zn(e));t:for(;++a<u;){var l=t[a],f=null==n?l:n(l);if(l=r||0!==l?l:0,o&&f==f){for(var h=s;h--;)if(e[h]===f)continue t;c.push(l)}else i(e,f,r)||c.push(l)}return c}Gn.templateSettings={escape:X,evaluate:tt,interpolate:et,variable:"",imports:{_:Gn}},Gn.prototype=Un.prototype,Gn.prototype.constructor=Gn,Yn.prototype=Wn(Un.prototype),Yn.prototype.constructor=Yn,$n.prototype=Wn(Un.prototype),$n.prototype.constructor=$n,Hn.prototype.clear=function(){this.__data__=Dn?Dn(null):{},this.size=0},Hn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Hn.prototype.get=function(t){var e=this.__data__;if(Dn){var n=e[t];return n===u?i:n}return Et.call(e,t)?e[t]:i},Hn.prototype.has=function(t){var e=this.__data__;return Dn?e[t]!==i:Et.call(e,t)},Hn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Dn&&e===i?u:e,this},Vn.prototype.clear=function(){this.__data__=[],this.size=0},Vn.prototype.delete=function(t){var e=this.__data__,n=ir(e,t);return!(n<0)&&(n==e.length-1?e.pop():Zt.call(e,n,1),--this.size,!0)},Vn.prototype.get=function(t){var e=this.__data__,n=ir(e,t);return n<0?i:e[n][1]},Vn.prototype.has=function(t){return ir(this.__data__,t)>-1},Vn.prototype.set=function(t,e){var n=this.__data__,r=ir(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Jn.prototype.clear=function(){this.size=0,this.__data__={hash:new Hn,map:new(Sn||Vn),string:new Hn}},Jn.prototype.delete=function(t){var e=hi(this,t).delete(t);return this.size-=e?1:0,e},Jn.prototype.get=function(t){return hi(this,t).get(t)},Jn.prototype.has=function(t){return hi(this,t).has(t)},Jn.prototype.set=function(t,e){var n=hi(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Zn.prototype.add=Zn.prototype.push=function(t){return this.__data__.set(t,u),this},Zn.prototype.has=function(t){return this.__data__.has(t)},Kn.prototype.clear=function(){this.__data__=new Vn,this.size=0},Kn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Kn.prototype.get=function(t){return this.__data__.get(t)},Kn.prototype.has=function(t){return this.__data__.has(t)},Kn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Vn){var r=n.__data__;if(!Sn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Jn(r)}return n.set(t,e),this.size=n.size,this};var vr=La(Mr),mr=La(kr,!0);function gr(t,e){var n=!0;return vr(t,(function(t,r,a){return n=!!e(t,r,a)})),n}function yr(t,e,n){for(var r=-1,a=t.length;++r<a;){var o=t[r],u=e(o);if(null!=u&&(c===i?u==u&&!hu(u):n(u,c)))var c=u,s=o}return s}function br(t,e){var n=[];return vr(t,(function(t,r,a){e(t,r,a)&&n.push(t)})),n}function _r(t,e,n,r,a){var i=-1,o=t.length;for(n||(n=_i),a||(a=[]);++i<o;){var u=t[i];e>0&&n(u)?e>1?_r(u,e-1,n,r,a):Ee(a,u):r||(a[a.length]=u)}return a}var wr=Ea(),xr=Ea(!0);function Mr(t,e){return t&&wr(t,e,Ru)}function kr(t,e){return t&&xr(t,e,Ru)}function Cr(t,e){return Ie(e,(function(e){return eu(t[e])}))}function Ar(t,e){for(var n=0,r=(e=xa(e,t)).length;null!=t&&n<r;)t=t[Qi(e[n++])];return n&&n==r?t:i}function Tr(t,e,n){var r=e(t);return Ho(t)?r:Ee(r,n(t))}function Sr(t){return null==t?t===i?"[object Undefined]":"[object Null]":te&&te in St(t)?function(t){var e=Et.call(t,te),n=t[te];try{t[te]=i;var r=!0}catch(t){}var a=Qt.call(t);r&&(e?t[te]=n:delete t[te]);return a}(t):function(t){return Qt.call(t)}(t)}function Or(t,e){return t>e}function Nr(t,e){return null!=t&&Et.call(t,e)}function Pr(t,e){return null!=t&&e in St(t)}function Dr(t,e,n){for(var a=n?Re:je,o=t[0].length,u=t.length,c=u,s=r(u),l=1/0,f=[];c--;){var h=t[c];c&&e&&(h=Le(h,tn(e))),l=xn(h.length,l),s[c]=!n&&(e||o>=120&&h.length>=120)?new Zn(c&&h):i}h=t[0];var d=-1,p=s[0];t:for(;++d<o&&f.length<l;){var v=h[d],m=e?e(v):v;if(v=n||0!==v?v:0,!(p?nn(p,m):a(f,m,n))){for(c=u;--c;){var g=s[c];if(!(g?nn(g,m):a(t[c],m,n)))continue t}p&&p.push(m),f.push(v)}}return f}function Ir(t,e,n){var r=null==(t=Ni(t,e=xa(e,t)))?t:t[Qi(Xi(e))];return null==r?i:Se(r,t,n)}function jr(t){return iu(t)&&Sr(t)==b}function Rr(t,e,n,r,a){return t===e||(null==t||null==e||!iu(t)&&!iu(e)?t!=t&&e!=e:function(t,e,n,r,a,o){var u=Ho(t),c=Ho(e),s=u?_:gi(t),l=c?_:gi(e),f=(s=s==b?S:s)==S,h=(l=l==b?S:l)==S,d=s==l;if(d&&Ko(t)){if(!Ko(e))return!1;u=!0,f=!1}if(d&&!f)return o||(o=new Kn),u||du(t)?ai(t,e,n,r,a,o):function(t,e,n,r,a,i,o){switch(n){case L:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case R:return!(t.byteLength!=e.byteLength||!i(new Yt(t),new Yt(e)));case w:case x:case T:return Wo(+t,+e);case M:return t.name==e.name&&t.message==e.message;case N:case D:return t==e+"";case A:var u=fn;case P:var c=1&r;if(u||(u=pn),t.size!=e.size&&!c)return!1;var s=o.get(t);if(s)return s==e;r|=2,o.set(t,e);var l=ai(u(t),u(e),r,a,i,o);return o.delete(t),l;case I:if(Fn)return Fn.call(t)==Fn.call(e)}return!1}(t,e,s,n,r,a,o);if(!(1&n)){var p=f&&Et.call(t,"__wrapped__"),v=h&&Et.call(e,"__wrapped__");if(p||v){var m=p?t.value():t,g=v?e.value():e;return o||(o=new Kn),a(m,g,n,r,o)}}if(!d)return!1;return o||(o=new Kn),function(t,e,n,r,a,o){var u=1&n,c=oi(t),s=c.length,l=oi(e),f=l.length;if(s!=f&&!u)return!1;var h=s;for(;h--;){var d=c[h];if(!(u?d in e:Et.call(e,d)))return!1}var p=o.get(t),v=o.get(e);if(p&&v)return p==e&&v==t;var m=!0;o.set(t,e),o.set(e,t);var g=u;for(;++h<s;){var y=t[d=c[h]],b=e[d];if(r)var _=u?r(b,y,d,e,t,o):r(y,b,d,t,e,o);if(!(_===i?y===b||a(y,b,n,r,o):_)){m=!1;break}g||(g="constructor"==d)}if(m&&!g){var w=t.constructor,x=e.constructor;w==x||!("constructor"in t)||!("constructor"in e)||"function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x||(m=!1)}return o.delete(t),o.delete(e),m}(t,e,n,r,a,o)}(t,e,n,r,Rr,a))}function Lr(t,e,n,r){var a=n.length,o=a,u=!r;if(null==t)return!o;for(t=St(t);a--;){var c=n[a];if(u&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++a<o;){var s=(c=n[a])[0],l=t[s],f=c[1];if(u&&c[2]){if(l===i&&!(s in t))return!1}else{var h=new Kn;if(r)var d=r(l,f,s,t,e,h);if(!(d===i?Rr(f,l,3,r,h):d))return!1}}return!0}function Er(t){return!(!au(t)||(e=t,Bt&&Bt in e))&&(eu(t)?Gt:bt).test(Fi(t));var e}function zr(t){return"function"==typeof t?t:null==t?uc:"object"==a(t)?Ho(t)?Wr(t[0],t[1]):Gr(t):mc(t)}function Br(t){if(!Ai(t))return Ve(t);var e=[];for(var n in St(t))Et.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Qr(t){if(!au(t))return function(t){var e=[];if(null!=t)for(var n in St(t))e.push(n);return e}(t);var e=Ai(t),n=[];for(var r in t)("constructor"!=r||!e&&Et.call(t,r))&&n.push(r);return n}function Fr(t,e){return t<e}function qr(t,e){var n=-1,a=Jo(t)?r(t.length):[];return vr(t,(function(t,r,i){a[++n]=e(t,r,i)})),a}function Gr(t){var e=di(t);return 1==e.length&&e[0][2]?Si(e[0][0],e[0][1]):function(n){return n===t||Lr(n,t,e)}}function Wr(t,e){return Mi(t)&&Ti(e)?Si(Qi(t),e):function(n){var r=Nu(n,t);return r===i&&r===e?Pu(n,t):Rr(e,r,3)}}function Ur(t,e,n,r,a){t!==e&&wr(e,(function(o,u){if(a||(a=new Kn),au(o))!function(t,e,n,r,a,o,u){var c=Di(t,n),s=Di(e,n),l=u.get(s);if(l)return void rr(t,n,l);var f=o?o(c,s,n+"",t,e,u):i,h=f===i;if(h){var d=Ho(s),p=!d&&Ko(s),v=!d&&!p&&du(s);f=s,d||p||v?Ho(c)?f=c:Zo(c)?f=Da(c):p?(h=!1,f=Aa(s,!0)):v?(h=!1,f=Sa(s,!0)):f=[]:cu(s)||$o(s)?(f=c,$o(c)?f=wu(c):au(c)&&!eu(c)||(f=bi(s))):h=!1}h&&(u.set(s,f),a(f,s,r,o,u),u.delete(s));rr(t,n,f)}(t,e,u,n,Ur,r,a);else{var c=r?r(Di(t,u),o,u+"",t,e,a):i;c===i&&(c=o),rr(t,u,c)}}),Lu)}function Yr(t,e){var n=t.length;if(n)return wi(e+=e<0?n:0,n)?t[e]:i}function $r(t,e,n){e=e.length?Le(e,(function(t){return Ho(t)?function(e){return Ar(e,1===t.length?t[0]:t)}:t})):[uc];var r=-1;e=Le(e,tn(fi()));var a=qr(t,(function(t,n,a){var i=Le(e,(function(e){return e(t)}));return{criteria:i,index:++r,value:t}}));return function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(a,(function(t,e){return function(t,e,n){var r=-1,a=t.criteria,i=e.criteria,o=a.length,u=n.length;for(;++r<o;){var c=Oa(a[r],i[r]);if(c)return r>=u?c:c*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}))}function Hr(t,e,n){for(var r=-1,a=e.length,i={};++r<a;){var o=e[r],u=Ar(t,o);n(u,o)&&na(i,xa(o,t),u)}return i}function Vr(t,e,n,r){var a=r?Ue:We,i=-1,o=e.length,u=t;for(t===e&&(e=Da(e)),n&&(u=Le(t,tn(n)));++i<o;)for(var c=0,s=e[i],l=n?n(s):s;(c=a(u,l,c,r))>-1;)u!==t&&Zt.call(u,c,1),Zt.call(t,c,1);return t}function Jr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var a=e[n];if(n==r||a!==i){var i=a;wi(a)?Zt.call(t,a,1):pa(t,a)}}return t}function Zr(t,e){return t+ge(Cn()*(e-t+1))}function Kr(t,e){var n="";if(!t||e<1||e>v)return n;do{e%2&&(n+=t),(e=ge(e/2))&&(t+=t)}while(e);return n}function Xr(t,e){return Ri(Oi(t,e,uc),t+"")}function ta(t){return tr(Wu(t))}function ea(t,e){var n=Wu(t);return zi(n,lr(e,0,n.length))}function na(t,e,n,r){if(!au(t))return t;for(var a=-1,o=(e=xa(e,t)).length,u=o-1,c=t;null!=c&&++a<o;){var s=Qi(e[a]),l=n;if("__proto__"===s||"constructor"===s||"prototype"===s)return t;if(a!=u){var f=c[s];(l=r?r(f,s,c):i)===i&&(l=au(f)?f:wi(e[a+1])?[]:{})}ar(c,s,l),c=c[s]}return t}var ra=In?function(t,e){return In.set(t,e),t}:uc,aa=re?function(t,e){return re(t,"toString",{configurable:!0,enumerable:!1,value:ac(e),writable:!0})}:uc;function ia(t){return zi(Wu(t))}function oa(t,e,n){var a=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=r(i);++a<i;)o[a]=t[a+e];return o}function ua(t,e){var n;return vr(t,(function(t,r,a){return!(n=e(t,r,a))})),!!n}function ca(t,e,n){var r=0,a=null==t?r:t.length;if("number"==typeof e&&e==e&&a<=2147483647){for(;r<a;){var i=r+a>>>1,o=t[i];null!==o&&!hu(o)&&(n?o<=e:o<e)?r=i+1:a=i}return a}return sa(t,e,uc,n)}function sa(t,e,n,r){var a=0,o=null==t?0:t.length;if(0===o)return 0;for(var u=(e=n(e))!=e,c=null===e,s=hu(e),l=e===i;a<o;){var f=ge((a+o)/2),h=n(t[f]),d=h!==i,p=null===h,v=h==h,m=hu(h);if(u)var g=r||v;else g=l?v&&(r||d):c?v&&d&&(r||!p):s?v&&d&&!p&&(r||!m):!p&&!m&&(r?h<=e:h<e);g?a=f+1:o=f}return xn(o,4294967294)}function la(t,e){for(var n=-1,r=t.length,a=0,i=[];++n<r;){var o=t[n],u=e?e(o):o;if(!n||!Wo(u,c)){var c=u;i[a++]=0===o?0:o}}return i}function fa(t){return"number"==typeof t?t:hu(t)?m:+t}function ha(t){if("string"==typeof t)return t;if(Ho(t))return Le(t,ha)+"";if(hu(t))return qn?qn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function da(t,e,n){var r=-1,a=je,i=t.length,o=!0,u=[],c=u;if(n)o=!1,a=Re;else if(i>=200){var s=e?null:Ka(t);if(s)return pn(s);o=!1,a=nn,c=new Zn}else c=e?[]:u;t:for(;++r<i;){var l=t[r],f=e?e(l):l;if(l=n||0!==l?l:0,o&&f==f){for(var h=c.length;h--;)if(c[h]===f)continue t;e&&c.push(f),u.push(l)}else a(c,f,n)||(c!==u&&c.push(f),u.push(l))}return u}function pa(t,e){return null==(t=Ni(t,e=xa(e,t)))||delete t[Qi(Xi(e))]}function va(t,e,n,r){return na(t,e,n(Ar(t,e)),r)}function ma(t,e,n,r){for(var a=t.length,i=r?a:-1;(r?i--:++i<a)&&e(t[i],i,t););return n?oa(t,r?0:i,r?i+1:a):oa(t,r?i+1:0,r?a:i)}function ga(t,e){var n=t;return n instanceof $n&&(n=n.value()),ze(e,(function(t,e){return e.func.apply(e.thisArg,Ee([t],e.args))}),n)}function ya(t,e,n){var a=t.length;if(a<2)return a?da(t[0]):[];for(var i=-1,o=r(a);++i<a;)for(var u=t[i],c=-1;++c<a;)c!=i&&(o[i]=pr(o[i]||u,t[c],e,n));return da(_r(o,1),e,n)}function ba(t,e,n){for(var r=-1,a=t.length,o=e.length,u={};++r<a;){var c=r<o?e[r]:i;n(u,t[r],c)}return u}function _a(t){return Zo(t)?t:[]}function wa(t){return"function"==typeof t?t:uc}function xa(t,e){return Ho(t)?t:Mi(t,e)?[t]:Bi(xu(t))}var Ma=Xr;function ka(t,e,n){var r=t.length;return n=n===i?r:n,!e&&n>=r?t:oa(t,e,n)}var Ca=ie||function(t){return me.clearTimeout(t)};function Aa(t,e){if(e)return t.slice();var n=t.length,r=$t?$t(n):new t.constructor(n);return t.copy(r),r}function Ta(t){var e=new t.constructor(t.byteLength);return new Yt(e).set(new Yt(t)),e}function Sa(t,e){var n=e?Ta(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Oa(t,e){if(t!==e){var n=t!==i,r=null===t,a=t==t,o=hu(t),u=e!==i,c=null===e,s=e==e,l=hu(e);if(!c&&!l&&!o&&t>e||o&&u&&s&&!c&&!l||r&&u&&s||!n&&s||!a)return 1;if(!r&&!o&&!l&&t<e||l&&n&&a&&!r&&!o||c&&n&&a||!u&&a||!s)return-1}return 0}function Na(t,e,n,a){for(var i=-1,o=t.length,u=n.length,c=-1,s=e.length,l=wn(o-u,0),f=r(s+l),h=!a;++c<s;)f[c]=e[c];for(;++i<u;)(h||i<o)&&(f[n[i]]=t[i]);for(;l--;)f[c++]=t[i++];return f}function Pa(t,e,n,a){for(var i=-1,o=t.length,u=-1,c=n.length,s=-1,l=e.length,f=wn(o-c,0),h=r(f+l),d=!a;++i<f;)h[i]=t[i];for(var p=i;++s<l;)h[p+s]=e[s];for(;++u<c;)(d||i<o)&&(h[p+n[u]]=t[i++]);return h}function Da(t,e){var n=-1,a=t.length;for(e||(e=r(a));++n<a;)e[n]=t[n];return e}function Ia(t,e,n,r){var a=!n;n||(n={});for(var o=-1,u=e.length;++o<u;){var c=e[o],s=r?r(n[c],t[c],c,n,t):i;s===i&&(s=t[c]),a?cr(n,c,s):ar(n,c,s)}return n}function ja(t,e){return function(n,r){var a=Ho(n)?Oe:or,i=e?e():{};return a(n,t,fi(r,2),i)}}function Ra(t){return Xr((function(e,n){var r=-1,a=n.length,o=a>1?n[a-1]:i,u=a>2?n[2]:i;for(o=t.length>3&&"function"==typeof o?(a--,o):i,u&&xi(n[0],n[1],u)&&(o=a<3?i:o,a=1),e=St(e);++r<a;){var c=n[r];c&&t(e,c,r,o)}return e}))}function La(t,e){return function(n,r){if(null==n)return n;if(!Jo(n))return t(n,r);for(var a=n.length,i=e?a:-1,o=St(n);(e?i--:++i<a)&&!1!==r(o[i],i,o););return n}}function Ea(t){return function(e,n,r){for(var a=-1,i=St(e),o=r(e),u=o.length;u--;){var c=o[t?u:++a];if(!1===n(i[c],c,i))break}return e}}function za(t){return function(e){var n=ln(e=xu(e))?gn(e):i,r=n?n[0]:e.charAt(0),a=n?ka(n,1).join(""):e.slice(1);return r[t]()+a}}function Ba(t){return function(e){return ze(ec($u(e).replace(ee,"")),t,"")}}function Qa(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Wn(t.prototype),r=t.apply(n,e);return au(r)?r:n}}function Fa(t){return function(e,n,r){var a=St(e);if(!Jo(e)){var o=fi(n,3);e=Ru(e),n=function(t){return o(a[t],t,a)}}var u=t(e,n,r);return u>-1?a[o?e[u]:u]:i}}function qa(t){return ii((function(e){var n=e.length,r=n,a=Yn.prototype.thru;for(t&&e.reverse();r--;){var u=e[r];if("function"!=typeof u)throw new Pt(o);if(a&&!c&&"wrapper"==si(u))var c=new Yn([],!0)}for(r=c?r:n;++r<n;){var s=si(u=e[r]),l="wrapper"==s?ci(u):i;c=l&&ki(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?c[si(l[0])].apply(c,l[3]):1==u.length&&ki(u)?c[s]():c.thru(u)}return function(){var t=arguments,r=t[0];if(c&&1==t.length&&Ho(r))return c.plant(r).value();for(var a=0,i=n?e[a].apply(this,t):r;++a<n;)i=e[a].call(this,i);return i}}))}function Ga(t,e,n,a,o,u,c,s,l,f){var d=e&h,p=1&e,v=2&e,m=24&e,g=512&e,y=v?i:Qa(t);return function i(){for(var h=arguments.length,b=r(h),_=h;_--;)b[_]=arguments[_];if(m)var w=li(i),x=on(b,w);if(a&&(b=Na(b,a,o,m)),u&&(b=Pa(b,u,c,m)),h-=x,m&&h<f){var M=dn(b,w);return Ja(t,e,Ga,i.placeholder,n,b,M,s,l,f-h)}var k=p?n:this,C=v?k[t]:t;return h=b.length,s?b=Pi(b,s):g&&h>1&&b.reverse(),d&&l<h&&(b.length=l),this&&this!==me&&this instanceof i&&(C=y||Qa(C)),C.apply(k,b)}}function Wa(t,e){return function(n,r){return function(t,e,n,r){return Mr(t,(function(t,a,i){e(r,n(t),a,i)})),r}(n,t,e(r),{})}}function Ua(t,e){return function(n,r){var a;if(n===i&&r===i)return e;if(n!==i&&(a=n),r!==i){if(a===i)return r;"string"==typeof n||"string"==typeof r?(n=ha(n),r=ha(r)):(n=fa(n),r=fa(r)),a=t(n,r)}return a}}function Ya(t){return ii((function(e){return e=Le(e,tn(fi())),Xr((function(n){var r=this;return t(e,(function(t){return Se(t,r,n)}))}))}))}function $a(t,e){var n=(e=e===i?" ":ha(e)).length;if(n<2)return n?Kr(e,t):e;var r=Kr(e,ve(t/mn(e)));return ln(e)?ka(gn(r),0,t).join(""):r.slice(0,t)}function Ha(t){return function(e,n,a){return a&&"number"!=typeof a&&xi(e,n,a)&&(n=a=i),e=gu(e),n===i?(n=e,e=0):n=gu(n),function(t,e,n,a){for(var i=-1,o=wn(ve((e-t)/(n||1)),0),u=r(o);o--;)u[a?o:++i]=t,t+=n;return u}(e,n,a=a===i?e<n?1:-1:gu(a),t)}}function Va(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=_u(e),n=_u(n)),t(e,n)}}function Ja(t,e,n,r,a,o,u,c,s,h){var d=8&e;e|=d?l:f,4&(e&=~(d?f:l))||(e&=-4);var p=[t,e,a,d?o:i,d?u:i,d?i:o,d?i:u,c,s,h],v=n.apply(i,p);return ki(t)&&Ii(v,p),v.placeholder=r,Li(v,t,e)}function Za(t){var e=Tt[t];return function(t,n){if(t=_u(t),(n=null==n?0:xn(yu(n),292))&&we(t)){var r=(xu(t)+"e").split("e");return+((r=(xu(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Ka=Nn&&1/pn(new Nn([,-0]))[1]==p?function(t){return new Nn(t)}:hc;function Xa(t){return function(e){var n=gi(e);return n==A?fn(e):n==P?vn(e):function(t,e){return Le(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function ti(t,e,n,a,u,p,v,m){var g=2&e;if(!g&&"function"!=typeof t)throw new Pt(o);var y=a?a.length:0;if(y||(e&=-97,a=u=i),v=v===i?v:wn(yu(v),0),m=m===i?m:yu(m),y-=u?u.length:0,e&f){var b=a,_=u;a=u=i}var w=g?i:ci(t),x=[t,e,n,a,u,b,_,p,v,m];if(w&&function(t,e){var n=t[1],r=e[1],a=n|r,i=a<131,o=r==h&&8==n||r==h&&n==d&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!i&&!o)return t;1&r&&(t[2]=e[2],a|=1&n?0:4);var u=e[3];if(u){var s=t[3];t[3]=s?Na(s,u,e[4]):u,t[4]=s?dn(t[3],c):e[4]}(u=e[5])&&(s=t[5],t[5]=s?Pa(s,u,e[6]):u,t[6]=s?dn(t[5],c):e[6]);(u=e[7])&&(t[7]=u);r&h&&(t[8]=null==t[8]?e[8]:xn(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=a}(x,w),t=x[0],e=x[1],n=x[2],a=x[3],u=x[4],!(m=x[9]=x[9]===i?g?0:t.length:wn(x[9]-y,0))&&24&e&&(e&=-25),e&&1!=e)M=8==e||e==s?function(t,e,n){var a=Qa(t);return function o(){for(var u=arguments.length,c=r(u),s=u,l=li(o);s--;)c[s]=arguments[s];var f=u<3&&c[0]!==l&&c[u-1]!==l?[]:dn(c,l);return(u-=f.length)<n?Ja(t,e,Ga,o.placeholder,i,c,f,i,i,n-u):Se(this&&this!==me&&this instanceof o?a:t,this,c)}}(t,e,m):e!=l&&33!=e||u.length?Ga.apply(i,x):function(t,e,n,a){var i=1&e,o=Qa(t);return function e(){for(var u=-1,c=arguments.length,s=-1,l=a.length,f=r(l+c),h=this&&this!==me&&this instanceof e?o:t;++s<l;)f[s]=a[s];for(;c--;)f[s++]=arguments[++u];return Se(h,i?n:this,f)}}(t,e,n,a);else var M=function(t,e,n){var r=1&e,a=Qa(t);return function e(){return(this&&this!==me&&this instanceof e?a:t).apply(r?n:this,arguments)}}(t,e,n);return Li((w?ra:Ii)(M,x),t,e)}function ei(t,e,n,r){return t===i||Wo(t,jt[n])&&!Et.call(r,n)?e:t}function ni(t,e,n,r,a,o){return au(t)&&au(e)&&(o.set(e,t),Ur(t,e,i,ni,o),o.delete(e)),t}function ri(t){return cu(t)?i:t}function ai(t,e,n,r,a,o){var u=1&n,c=t.length,s=e.length;if(c!=s&&!(u&&s>c))return!1;var l=o.get(t),f=o.get(e);if(l&&f)return l==e&&f==t;var h=-1,d=!0,p=2&n?new Zn:i;for(o.set(t,e),o.set(e,t);++h<c;){var v=t[h],m=e[h];if(r)var g=u?r(m,v,h,e,t,o):r(v,m,h,t,e,o);if(g!==i){if(g)continue;d=!1;break}if(p){if(!Qe(e,(function(t,e){if(!nn(p,e)&&(v===t||a(v,t,n,r,o)))return p.push(e)}))){d=!1;break}}else if(v!==m&&!a(v,m,n,r,o)){d=!1;break}}return o.delete(t),o.delete(e),d}function ii(t){return Ri(Oi(t,i,Hi),t+"")}function oi(t){return Tr(t,Ru,vi)}function ui(t){return Tr(t,Lu,mi)}var ci=In?function(t){return In.get(t)}:hc;function si(t){for(var e=t.name+"",n=jn[e],r=Et.call(jn,e)?n.length:0;r--;){var a=n[r],i=a.func;if(null==i||i==t)return a.name}return e}function li(t){return(Et.call(Gn,"placeholder")?Gn:t).placeholder}function fi(){var t=Gn.iteratee||cc;return t=t===cc?zr:t,arguments.length?t(arguments[0],arguments[1]):t}function hi(t,e){var n,r,i=t.__data__;return("string"==(r=a(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function di(t){for(var e=Ru(t),n=e.length;n--;){var r=e[n],a=t[r];e[n]=[r,a,Ti(a)]}return e}function pi(t,e){var n=function(t,e){return null==t?i:t[e]}(t,e);return Er(n)?n:i}var vi=ye?function(t){return null==t?[]:(t=St(t),Ie(ye(t),(function(e){return Jt.call(t,e)})))}:bc,mi=ye?function(t){for(var e=[];t;)Ee(e,vi(t)),t=Ht(t);return e}:bc,gi=Sr;function yi(t,e,n){for(var r=-1,a=(e=xa(e,t)).length,i=!1;++r<a;){var o=Qi(e[r]);if(!(i=null!=t&&n(t,o)))break;t=t[o]}return i||++r!=a?i:!!(a=null==t?0:t.length)&&ru(a)&&wi(o,a)&&(Ho(t)||$o(t))}function bi(t){return"function"!=typeof t.constructor||Ai(t)?{}:Wn(Ht(t))}function _i(t){return Ho(t)||$o(t)||!!(Kt&&t&&t[Kt])}function wi(t,e){var n=a(t);return!!(e=null==e?v:e)&&("number"==n||"symbol"!=n&&wt.test(t))&&t>-1&&t%1==0&&t<e}function xi(t,e,n){if(!au(n))return!1;var r=a(e);return!!("number"==r?Jo(n)&&wi(e,n.length):"string"==r&&e in n)&&Wo(n[e],t)}function Mi(t,e){if(Ho(t))return!1;var n=a(t);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!hu(t))||(rt.test(t)||!nt.test(t)||null!=e&&t in St(e))}function ki(t){var e=si(t),n=Gn[e];if("function"!=typeof n||!(e in $n.prototype))return!1;if(t===n)return!0;var r=ci(n);return!!r&&t===r[0]}(Tn&&gi(new Tn(new ArrayBuffer(1)))!=L||Sn&&gi(new Sn)!=A||On&&gi(On.resolve())!=O||Nn&&gi(new Nn)!=P||Pn&&gi(new Pn)!=j)&&(gi=function(t){var e=Sr(t),n=e==S?t.constructor:i,r=n?Fi(n):"";if(r)switch(r){case Rn:return L;case Ln:return A;case En:return O;case zn:return P;case Bn:return j}return e});var Ci=Rt?eu:_c;function Ai(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||jt)}function Ti(t){return t==t&&!au(t)}function Si(t,e){return function(n){return null!=n&&(n[t]===e&&(e!==i||t in St(n)))}}function Oi(t,e,n){return e=wn(e===i?t.length-1:e,0),function(){for(var a=arguments,i=-1,o=wn(a.length-e,0),u=r(o);++i<o;)u[i]=a[e+i];i=-1;for(var c=r(e+1);++i<e;)c[i]=a[i];return c[e]=n(u),Se(t,this,c)}}function Ni(t,e){return e.length<2?t:Ar(t,oa(e,0,-1))}function Pi(t,e){for(var n=t.length,r=xn(e.length,n),a=Da(t);r--;){var o=e[r];t[r]=wi(o,n)?a[o]:i}return t}function Di(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ii=Ei(ra),ji=pe||function(t,e){return me.setTimeout(t,e)},Ri=Ei(aa);function Li(t,e,n){var r=e+"";return Ri(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(st,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Ne(y,(function(n){var r="_."+n[0];e&n[1]&&!je(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(lt);return e?e[1].split(ft):[]}(r),n)))}function Ei(t){var e=0,n=0;return function(){var r=Mn(),a=16-(r-n);if(n=r,a>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function zi(t,e){var n=-1,r=t.length,a=r-1;for(e=e===i?r:e;++n<e;){var o=Zr(n,a),u=t[o];t[o]=t[n],t[n]=u}return t.length=e,t}var Bi=function(t){var e=zo(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(at,(function(t,n,r,a){e.push(r?a.replace(pt,"$1"):n||t)})),e}));function Qi(t){if("string"==typeof t||hu(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Fi(t){if(null!=t){try{return Lt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function qi(t){if(t instanceof $n)return t.clone();var e=new Yn(t.__wrapped__,t.__chain__);return e.__actions__=Da(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Gi=Xr((function(t,e){return Zo(t)?pr(t,_r(e,1,Zo,!0)):[]})),Wi=Xr((function(t,e){var n=Xi(e);return Zo(n)&&(n=i),Zo(t)?pr(t,_r(e,1,Zo,!0),fi(n,2)):[]})),Ui=Xr((function(t,e){var n=Xi(e);return Zo(n)&&(n=i),Zo(t)?pr(t,_r(e,1,Zo,!0),i,n):[]}));function Yi(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var a=null==n?0:yu(n);return a<0&&(a=wn(r+a,0)),Ge(t,fi(e,3),a)}function $i(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var a=r-1;return n!==i&&(a=yu(n),a=n<0?wn(r+a,0):xn(a,r-1)),Ge(t,fi(e,3),a,!0)}function Hi(t){return(null==t?0:t.length)?_r(t,1):[]}function Vi(t){return t&&t.length?t[0]:i}var Ji=Xr((function(t){var e=Le(t,_a);return e.length&&e[0]===t[0]?Dr(e):[]})),Zi=Xr((function(t){var e=Xi(t),n=Le(t,_a);return e===Xi(n)?e=i:n.pop(),n.length&&n[0]===t[0]?Dr(n,fi(e,2)):[]})),Ki=Xr((function(t){var e=Xi(t),n=Le(t,_a);return(e="function"==typeof e?e:i)&&n.pop(),n.length&&n[0]===t[0]?Dr(n,i,e):[]}));function Xi(t){var e=null==t?0:t.length;return e?t[e-1]:i}var to=Xr(eo);function eo(t,e){return t&&t.length&&e&&e.length?Vr(t,e):t}var no=ii((function(t,e){var n=null==t?0:t.length,r=sr(t,e);return Jr(t,Le(e,(function(t){return wi(t,n)?+t:t})).sort(Oa)),r}));function ro(t){return null==t?t:An.call(t)}var ao=Xr((function(t){return da(_r(t,1,Zo,!0))})),io=Xr((function(t){var e=Xi(t);return Zo(e)&&(e=i),da(_r(t,1,Zo,!0),fi(e,2))})),oo=Xr((function(t){var e=Xi(t);return e="function"==typeof e?e:i,da(_r(t,1,Zo,!0),i,e)}));function uo(t){if(!t||!t.length)return[];var e=0;return t=Ie(t,(function(t){if(Zo(t))return e=wn(t.length,e),!0})),Ke(e,(function(e){return Le(t,He(e))}))}function co(t,e){if(!t||!t.length)return[];var n=uo(t);return null==e?n:Le(n,(function(t){return Se(e,i,t)}))}var so=Xr((function(t,e){return Zo(t)?pr(t,e):[]})),lo=Xr((function(t){return ya(Ie(t,Zo))})),fo=Xr((function(t){var e=Xi(t);return Zo(e)&&(e=i),ya(Ie(t,Zo),fi(e,2))})),ho=Xr((function(t){var e=Xi(t);return e="function"==typeof e?e:i,ya(Ie(t,Zo),i,e)})),po=Xr(uo);var vo=Xr((function(t){var e=t.length,n=e>1?t[e-1]:i;return n="function"==typeof n?(t.pop(),n):i,co(t,n)}));function mo(t){var e=Gn(t);return e.__chain__=!0,e}function go(t,e){return e(t)}var yo=ii((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,a=function(e){return sr(e,t)};return!(e>1||this.__actions__.length)&&r instanceof $n&&wi(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:go,args:[a],thisArg:i}),new Yn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(a)}));var bo=ja((function(t,e,n){Et.call(t,n)?++t[n]:cr(t,n,1)}));var _o=Fa(Yi),wo=Fa($i);function xo(t,e){return(Ho(t)?Ne:vr)(t,fi(e,3))}function Mo(t,e){return(Ho(t)?Pe:mr)(t,fi(e,3))}var ko=ja((function(t,e,n){Et.call(t,n)?t[n].push(e):cr(t,n,[e])}));var Co=Xr((function(t,e,n){var a=-1,i="function"==typeof e,o=Jo(t)?r(t.length):[];return vr(t,(function(t){o[++a]=i?Se(e,t,n):Ir(t,e,n)})),o})),Ao=ja((function(t,e,n){cr(t,n,e)}));function To(t,e){return(Ho(t)?Le:qr)(t,fi(e,3))}var So=ja((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var Oo=Xr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&xi(t,e[0],e[1])?e=[]:n>2&&xi(e[0],e[1],e[2])&&(e=[e[0]]),$r(t,_r(e,1),[])})),No=fe||function(){return me.Date.now()};function Po(t,e,n){return e=n?i:e,e=t&&null==e?t.length:e,ti(t,h,i,i,i,i,e)}function Do(t,e){var n;if("function"!=typeof e)throw new Pt(o);return t=yu(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=i),n}}var Io=Xr((function(t,e,n){var r=1;if(n.length){var a=dn(n,li(Io));r|=l}return ti(t,r,e,n,a)})),jo=Xr((function(t,e,n){var r=3;if(n.length){var a=dn(n,li(jo));r|=l}return ti(e,r,t,n,a)}));function Ro(t,e,n){var r,a,u,c,s,l,f=0,h=!1,d=!1,p=!0;if("function"!=typeof t)throw new Pt(o);function v(e){var n=r,o=a;return r=a=i,f=e,c=t.apply(o,n)}function m(t){return f=t,s=ji(y,e),h?v(t):c}function g(t){var n=t-l;return l===i||n>=e||n<0||d&&t-f>=u}function y(){var t=No();if(g(t))return b(t);s=ji(y,function(t){var n=e-(t-l);return d?xn(n,u-(t-f)):n}(t))}function b(t){return s=i,p&&r?v(t):(r=a=i,c)}function _(){var t=No(),n=g(t);if(r=arguments,a=this,l=t,n){if(s===i)return m(l);if(d)return Ca(s),s=ji(y,e),v(l)}return s===i&&(s=ji(y,e)),c}return e=_u(e)||0,au(n)&&(h=!!n.leading,u=(d="maxWait"in n)?wn(_u(n.maxWait)||0,e):u,p="trailing"in n?!!n.trailing:p),_.cancel=function(){s!==i&&Ca(s),f=0,r=l=a=s=i},_.flush=function(){return s===i?c:b(No())},_}var Lo=Xr((function(t,e){return dr(t,1,e)})),Eo=Xr((function(t,e,n){return dr(t,_u(e)||0,n)}));function zo(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Pt(o);var n=function n(){var r=arguments,a=e?e.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var o=t.apply(this,r);return n.cache=i.set(a,o)||i,o};return n.cache=new(zo.Cache||Jn),n}function Bo(t){if("function"!=typeof t)throw new Pt(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}zo.Cache=Jn;var Qo=Ma((function(t,e){var n=(e=1==e.length&&Ho(e[0])?Le(e[0],tn(fi())):Le(_r(e,1),tn(fi()))).length;return Xr((function(r){for(var a=-1,i=xn(r.length,n);++a<i;)r[a]=e[a].call(this,r[a]);return Se(t,this,r)}))})),Fo=Xr((function(t,e){var n=dn(e,li(Fo));return ti(t,l,i,e,n)})),qo=Xr((function(t,e){var n=dn(e,li(qo));return ti(t,f,i,e,n)})),Go=ii((function(t,e){return ti(t,d,i,i,i,e)}));function Wo(t,e){return t===e||t!=t&&e!=e}var Uo=Va(Or),Yo=Va((function(t,e){return t>=e})),$o=jr(function(){return arguments}())?jr:function(t){return iu(t)&&Et.call(t,"callee")&&!Jt.call(t,"callee")},Ho=r.isArray,Vo=xe?tn(xe):function(t){return iu(t)&&Sr(t)==R};function Jo(t){return null!=t&&ru(t.length)&&!eu(t)}function Zo(t){return iu(t)&&Jo(t)}var Ko=_e||_c,Xo=Me?tn(Me):function(t){return iu(t)&&Sr(t)==x};function tu(t){if(!iu(t))return!1;var e=Sr(t);return e==M||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!cu(t)}function eu(t){if(!au(t))return!1;var e=Sr(t);return e==k||e==C||"[object AsyncFunction]"==e||"[object Proxy]"==e}function nu(t){return"number"==typeof t&&t==yu(t)}function ru(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=v}function au(t){var e=a(t);return null!=t&&("object"==e||"function"==e)}function iu(t){return null!=t&&"object"==a(t)}var ou=ke?tn(ke):function(t){return iu(t)&&gi(t)==A};function uu(t){return"number"==typeof t||iu(t)&&Sr(t)==T}function cu(t){if(!iu(t)||Sr(t)!=S)return!1;var e=Ht(t);if(null===e)return!0;var n=Et.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Lt.call(n)==Ft}var su=Ce?tn(Ce):function(t){return iu(t)&&Sr(t)==N};var lu=Ae?tn(Ae):function(t){return iu(t)&&gi(t)==P};function fu(t){return"string"==typeof t||!Ho(t)&&iu(t)&&Sr(t)==D}function hu(t){return"symbol"==a(t)||iu(t)&&Sr(t)==I}var du=Te?tn(Te):function(t){return iu(t)&&ru(t.length)&&!!se[Sr(t)]};var pu=Va(Fr),vu=Va((function(t,e){return t<=e}));function mu(t){if(!t)return[];if(Jo(t))return fu(t)?gn(t):Da(t);if(Xt&&t[Xt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Xt]());var e=gi(t);return(e==A?fn:e==P?pn:Wu)(t)}function gu(t){return t?(t=_u(t))===p||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function yu(t){var e=gu(t),n=e%1;return e==e?n?e-n:e:0}function bu(t){return t?lr(yu(t),0,g):0}function _u(t){if("number"==typeof t)return t;if(hu(t))return m;if(au(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=au(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Xe(t);var n=yt.test(t);return n||_t.test(t)?de(t.slice(2),n?2:8):gt.test(t)?m:+t}function wu(t){return Ia(t,Lu(t))}function xu(t){return null==t?"":ha(t)}var Mu=Ra((function(t,e){if(Ai(e)||Jo(e))Ia(e,Ru(e),t);else for(var n in e)Et.call(e,n)&&ar(t,n,e[n])})),ku=Ra((function(t,e){Ia(e,Lu(e),t)})),Cu=Ra((function(t,e,n,r){Ia(e,Lu(e),t,r)})),Au=Ra((function(t,e,n,r){Ia(e,Ru(e),t,r)})),Tu=ii(sr);var Su=Xr((function(t,e){t=St(t);var n=-1,r=e.length,a=r>2?e[2]:i;for(a&&xi(e[0],e[1],a)&&(r=1);++n<r;)for(var o=e[n],u=Lu(o),c=-1,s=u.length;++c<s;){var l=u[c],f=t[l];(f===i||Wo(f,jt[l])&&!Et.call(t,l))&&(t[l]=o[l])}return t})),Ou=Xr((function(t){return t.push(i,ni),Se(zu,i,t)}));function Nu(t,e,n){var r=null==t?i:Ar(t,e);return r===i?n:r}function Pu(t,e){return null!=t&&yi(t,e,Pr)}var Du=Wa((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Qt.call(e)),t[e]=n}),ac(uc)),Iu=Wa((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Qt.call(e)),Et.call(t,e)?t[e].push(n):t[e]=[n]}),fi),ju=Xr(Ir);function Ru(t){return Jo(t)?Xn(t):Br(t)}function Lu(t){return Jo(t)?Xn(t,!0):Qr(t)}var Eu=Ra((function(t,e,n){Ur(t,e,n)})),zu=Ra((function(t,e,n,r){Ur(t,e,n,r)})),Bu=ii((function(t,e){var n={};if(null==t)return n;var r=!1;e=Le(e,(function(e){return e=xa(e,t),r||(r=e.length>1),e})),Ia(t,ui(t),n),r&&(n=fr(n,7,ri));for(var a=e.length;a--;)pa(n,e[a]);return n}));var Qu=ii((function(t,e){return null==t?{}:function(t,e){return Hr(t,e,(function(e,n){return Pu(t,n)}))}(t,e)}));function Fu(t,e){if(null==t)return{};var n=Le(ui(t),(function(t){return[t]}));return e=fi(e),Hr(t,n,(function(t,n){return e(t,n[0])}))}var qu=Xa(Ru),Gu=Xa(Lu);function Wu(t){return null==t?[]:en(t,Ru(t))}var Uu=Ba((function(t,e,n){return e=e.toLowerCase(),t+(n?Yu(e):e)}));function Yu(t){return tc(xu(t).toLowerCase())}function $u(t){return(t=xu(t))&&t.replace(xt,un).replace(ne,"")}var Hu=Ba((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Vu=Ba((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Ju=za("toLowerCase");var Zu=Ba((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var Ku=Ba((function(t,e,n){return t+(n?" ":"")+tc(e)}));var Xu=Ba((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),tc=za("toUpperCase");function ec(t,e,n){return t=xu(t),(e=n?i:e)===i?function(t){return oe.test(t)}(t)?function(t){return t.match(ae)||[]}(t):function(t){return t.match(ht)||[]}(t):t.match(e)||[]}var nc=Xr((function(t,e){try{return Se(t,i,e)}catch(t){return tu(t)?t:new Ct(t)}})),rc=ii((function(t,e){return Ne(e,(function(e){e=Qi(e),cr(t,e,Io(t[e],t))})),t}));function ac(t){return function(){return t}}var ic=qa(),oc=qa(!0);function uc(t){return t}function cc(t){return zr("function"==typeof t?t:fr(t,1))}var sc=Xr((function(t,e){return function(n){return Ir(n,t,e)}})),lc=Xr((function(t,e){return function(n){return Ir(t,n,e)}}));function fc(t,e,n){var r=Ru(e),a=Cr(e,r);null!=n||au(e)&&(a.length||!r.length)||(n=e,e=t,t=this,a=Cr(e,Ru(e)));var i=!(au(n)&&"chain"in n&&!n.chain),o=eu(t);return Ne(a,(function(n){var r=e[n];t[n]=r,o&&(t.prototype[n]=function(){var e=this.__chain__;if(i||e){var n=t(this.__wrapped__),a=n.__actions__=Da(this.__actions__);return a.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Ee([this.value()],arguments))})})),t}function hc(){}var dc=Ya(Le),pc=Ya(De),vc=Ya(Qe);function mc(t){return Mi(t)?He(Qi(t)):function(t){return function(e){return Ar(e,t)}}(t)}var gc=Ha(),yc=Ha(!0);function bc(){return[]}function _c(){return!1}var wc=Ua((function(t,e){return t+e}),0),xc=Za("ceil"),Mc=Ua((function(t,e){return t/e}),1),kc=Za("floor");var Cc,Ac=Ua((function(t,e){return t*e}),1),Tc=Za("round"),Sc=Ua((function(t,e){return t-e}),0);return Gn.after=function(t,e){if("function"!=typeof e)throw new Pt(o);return t=yu(t),function(){if(--t<1)return e.apply(this,arguments)}},Gn.ary=Po,Gn.assign=Mu,Gn.assignIn=ku,Gn.assignInWith=Cu,Gn.assignWith=Au,Gn.at=Tu,Gn.before=Do,Gn.bind=Io,Gn.bindAll=rc,Gn.bindKey=jo,Gn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ho(t)?t:[t]},Gn.chain=mo,Gn.chunk=function(t,e,n){e=(n?xi(t,e,n):e===i)?1:wn(yu(e),0);var a=null==t?0:t.length;if(!a||e<1)return[];for(var o=0,u=0,c=r(ve(a/e));o<a;)c[u++]=oa(t,o,o+=e);return c},Gn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,a=[];++e<n;){var i=t[e];i&&(a[r++]=i)}return a},Gn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],a=t;a--;)e[a-1]=arguments[a];return Ee(Ho(n)?Da(n):[n],_r(e,1))},Gn.cond=function(t){var e=null==t?0:t.length,n=fi();return t=e?Le(t,(function(t){if("function"!=typeof t[1])throw new Pt(o);return[n(t[0]),t[1]]})):[],Xr((function(n){for(var r=-1;++r<e;){var a=t[r];if(Se(a[0],this,n))return Se(a[1],this,n)}}))},Gn.conforms=function(t){return function(t){var e=Ru(t);return function(n){return hr(n,t,e)}}(fr(t,1))},Gn.constant=ac,Gn.countBy=bo,Gn.create=function(t,e){var n=Wn(t);return null==e?n:ur(n,e)},Gn.curry=function t(e,n,r){var a=ti(e,8,i,i,i,i,i,n=r?i:n);return a.placeholder=t.placeholder,a},Gn.curryRight=function t(e,n,r){var a=ti(e,s,i,i,i,i,i,n=r?i:n);return a.placeholder=t.placeholder,a},Gn.debounce=Ro,Gn.defaults=Su,Gn.defaultsDeep=Ou,Gn.defer=Lo,Gn.delay=Eo,Gn.difference=Gi,Gn.differenceBy=Wi,Gn.differenceWith=Ui,Gn.drop=function(t,e,n){var r=null==t?0:t.length;return r?oa(t,(e=n||e===i?1:yu(e))<0?0:e,r):[]},Gn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?oa(t,0,(e=r-(e=n||e===i?1:yu(e)))<0?0:e):[]},Gn.dropRightWhile=function(t,e){return t&&t.length?ma(t,fi(e,3),!0,!0):[]},Gn.dropWhile=function(t,e){return t&&t.length?ma(t,fi(e,3),!0):[]},Gn.fill=function(t,e,n,r){var a=null==t?0:t.length;return a?(n&&"number"!=typeof n&&xi(t,e,n)&&(n=0,r=a),function(t,e,n,r){var a=t.length;for((n=yu(n))<0&&(n=-n>a?0:a+n),(r=r===i||r>a?a:yu(r))<0&&(r+=a),r=n>r?0:bu(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},Gn.filter=function(t,e){return(Ho(t)?Ie:br)(t,fi(e,3))},Gn.flatMap=function(t,e){return _r(To(t,e),1)},Gn.flatMapDeep=function(t,e){return _r(To(t,e),p)},Gn.flatMapDepth=function(t,e,n){return n=n===i?1:yu(n),_r(To(t,e),n)},Gn.flatten=Hi,Gn.flattenDeep=function(t){return(null==t?0:t.length)?_r(t,p):[]},Gn.flattenDepth=function(t,e){return(null==t?0:t.length)?_r(t,e=e===i?1:yu(e)):[]},Gn.flip=function(t){return ti(t,512)},Gn.flow=ic,Gn.flowRight=oc,Gn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var a=t[e];r[a[0]]=a[1]}return r},Gn.functions=function(t){return null==t?[]:Cr(t,Ru(t))},Gn.functionsIn=function(t){return null==t?[]:Cr(t,Lu(t))},Gn.groupBy=ko,Gn.initial=function(t){return(null==t?0:t.length)?oa(t,0,-1):[]},Gn.intersection=Ji,Gn.intersectionBy=Zi,Gn.intersectionWith=Ki,Gn.invert=Du,Gn.invertBy=Iu,Gn.invokeMap=Co,Gn.iteratee=cc,Gn.keyBy=Ao,Gn.keys=Ru,Gn.keysIn=Lu,Gn.map=To,Gn.mapKeys=function(t,e){var n={};return e=fi(e,3),Mr(t,(function(t,r,a){cr(n,e(t,r,a),t)})),n},Gn.mapValues=function(t,e){var n={};return e=fi(e,3),Mr(t,(function(t,r,a){cr(n,r,e(t,r,a))})),n},Gn.matches=function(t){return Gr(fr(t,1))},Gn.matchesProperty=function(t,e){return Wr(t,fr(e,1))},Gn.memoize=zo,Gn.merge=Eu,Gn.mergeWith=zu,Gn.method=sc,Gn.methodOf=lc,Gn.mixin=fc,Gn.negate=Bo,Gn.nthArg=function(t){return t=yu(t),Xr((function(e){return Yr(e,t)}))},Gn.omit=Bu,Gn.omitBy=function(t,e){return Fu(t,Bo(fi(e)))},Gn.once=function(t){return Do(2,t)},Gn.orderBy=function(t,e,n,r){return null==t?[]:(Ho(e)||(e=null==e?[]:[e]),Ho(n=r?i:n)||(n=null==n?[]:[n]),$r(t,e,n))},Gn.over=dc,Gn.overArgs=Qo,Gn.overEvery=pc,Gn.overSome=vc,Gn.partial=Fo,Gn.partialRight=qo,Gn.partition=So,Gn.pick=Qu,Gn.pickBy=Fu,Gn.property=mc,Gn.propertyOf=function(t){return function(e){return null==t?i:Ar(t,e)}},Gn.pull=to,Gn.pullAll=eo,Gn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Vr(t,e,fi(n,2)):t},Gn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Vr(t,e,i,n):t},Gn.pullAt=no,Gn.range=gc,Gn.rangeRight=yc,Gn.rearg=Go,Gn.reject=function(t,e){return(Ho(t)?Ie:br)(t,Bo(fi(e,3)))},Gn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,a=[],i=t.length;for(e=fi(e,3);++r<i;){var o=t[r];e(o,r,t)&&(n.push(o),a.push(r))}return Jr(t,a),n},Gn.rest=function(t,e){if("function"!=typeof t)throw new Pt(o);return Xr(t,e=e===i?e:yu(e))},Gn.reverse=ro,Gn.sampleSize=function(t,e,n){return e=(n?xi(t,e,n):e===i)?1:yu(e),(Ho(t)?er:ea)(t,e)},Gn.set=function(t,e,n){return null==t?t:na(t,e,n)},Gn.setWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:na(t,e,n,r)},Gn.shuffle=function(t){return(Ho(t)?nr:ia)(t)},Gn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&xi(t,e,n)?(e=0,n=r):(e=null==e?0:yu(e),n=n===i?r:yu(n)),oa(t,e,n)):[]},Gn.sortBy=Oo,Gn.sortedUniq=function(t){return t&&t.length?la(t):[]},Gn.sortedUniqBy=function(t,e){return t&&t.length?la(t,fi(e,2)):[]},Gn.split=function(t,e,n){return n&&"number"!=typeof n&&xi(t,e,n)&&(e=n=i),(n=n===i?g:n>>>0)?(t=xu(t))&&("string"==typeof e||null!=e&&!su(e))&&!(e=ha(e))&&ln(t)?ka(gn(t),0,n):t.split(e,n):[]},Gn.spread=function(t,e){if("function"!=typeof t)throw new Pt(o);return e=null==e?0:wn(yu(e),0),Xr((function(n){var r=n[e],a=ka(n,0,e);return r&&Ee(a,r),Se(t,this,a)}))},Gn.tail=function(t){var e=null==t?0:t.length;return e?oa(t,1,e):[]},Gn.take=function(t,e,n){return t&&t.length?oa(t,0,(e=n||e===i?1:yu(e))<0?0:e):[]},Gn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?oa(t,(e=r-(e=n||e===i?1:yu(e)))<0?0:e,r):[]},Gn.takeRightWhile=function(t,e){return t&&t.length?ma(t,fi(e,3),!1,!0):[]},Gn.takeWhile=function(t,e){return t&&t.length?ma(t,fi(e,3)):[]},Gn.tap=function(t,e){return e(t),t},Gn.throttle=function(t,e,n){var r=!0,a=!0;if("function"!=typeof t)throw new Pt(o);return au(n)&&(r="leading"in n?!!n.leading:r,a="trailing"in n?!!n.trailing:a),Ro(t,e,{leading:r,maxWait:e,trailing:a})},Gn.thru=go,Gn.toArray=mu,Gn.toPairs=qu,Gn.toPairsIn=Gu,Gn.toPath=function(t){return Ho(t)?Le(t,Qi):hu(t)?[t]:Da(Bi(xu(t)))},Gn.toPlainObject=wu,Gn.transform=function(t,e,n){var r=Ho(t),a=r||Ko(t)||du(t);if(e=fi(e,4),null==n){var i=t&&t.constructor;n=a?r?new i:[]:au(t)&&eu(i)?Wn(Ht(t)):{}}return(a?Ne:Mr)(t,(function(t,r,a){return e(n,t,r,a)})),n},Gn.unary=function(t){return Po(t,1)},Gn.union=ao,Gn.unionBy=io,Gn.unionWith=oo,Gn.uniq=function(t){return t&&t.length?da(t):[]},Gn.uniqBy=function(t,e){return t&&t.length?da(t,fi(e,2)):[]},Gn.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?da(t,i,e):[]},Gn.unset=function(t,e){return null==t||pa(t,e)},Gn.unzip=uo,Gn.unzipWith=co,Gn.update=function(t,e,n){return null==t?t:va(t,e,wa(n))},Gn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:i,null==t?t:va(t,e,wa(n),r)},Gn.values=Wu,Gn.valuesIn=function(t){return null==t?[]:en(t,Lu(t))},Gn.without=so,Gn.words=ec,Gn.wrap=function(t,e){return Fo(wa(e),t)},Gn.xor=lo,Gn.xorBy=fo,Gn.xorWith=ho,Gn.zip=po,Gn.zipObject=function(t,e){return ba(t||[],e||[],ar)},Gn.zipObjectDeep=function(t,e){return ba(t||[],e||[],na)},Gn.zipWith=vo,Gn.entries=qu,Gn.entriesIn=Gu,Gn.extend=ku,Gn.extendWith=Cu,fc(Gn,Gn),Gn.add=wc,Gn.attempt=nc,Gn.camelCase=Uu,Gn.capitalize=Yu,Gn.ceil=xc,Gn.clamp=function(t,e,n){return n===i&&(n=e,e=i),n!==i&&(n=(n=_u(n))==n?n:0),e!==i&&(e=(e=_u(e))==e?e:0),lr(_u(t),e,n)},Gn.clone=function(t){return fr(t,4)},Gn.cloneDeep=function(t){return fr(t,5)},Gn.cloneDeepWith=function(t,e){return fr(t,5,e="function"==typeof e?e:i)},Gn.cloneWith=function(t,e){return fr(t,4,e="function"==typeof e?e:i)},Gn.conformsTo=function(t,e){return null==e||hr(t,e,Ru(e))},Gn.deburr=$u,Gn.defaultTo=function(t,e){return null==t||t!=t?e:t},Gn.divide=Mc,Gn.endsWith=function(t,e,n){t=xu(t),e=ha(e);var r=t.length,a=n=n===i?r:lr(yu(n),0,r);return(n-=e.length)>=0&&t.slice(n,a)==e},Gn.eq=Wo,Gn.escape=function(t){return(t=xu(t))&&K.test(t)?t.replace(J,cn):t},Gn.escapeRegExp=function(t){return(t=xu(t))&&ot.test(t)?t.replace(it,"\\$&"):t},Gn.every=function(t,e,n){var r=Ho(t)?De:gr;return n&&xi(t,e,n)&&(e=i),r(t,fi(e,3))},Gn.find=_o,Gn.findIndex=Yi,Gn.findKey=function(t,e){return qe(t,fi(e,3),Mr)},Gn.findLast=wo,Gn.findLastIndex=$i,Gn.findLastKey=function(t,e){return qe(t,fi(e,3),kr)},Gn.floor=kc,Gn.forEach=xo,Gn.forEachRight=Mo,Gn.forIn=function(t,e){return null==t?t:wr(t,fi(e,3),Lu)},Gn.forInRight=function(t,e){return null==t?t:xr(t,fi(e,3),Lu)},Gn.forOwn=function(t,e){return t&&Mr(t,fi(e,3))},Gn.forOwnRight=function(t,e){return t&&kr(t,fi(e,3))},Gn.get=Nu,Gn.gt=Uo,Gn.gte=Yo,Gn.has=function(t,e){return null!=t&&yi(t,e,Nr)},Gn.hasIn=Pu,Gn.head=Vi,Gn.identity=uc,Gn.includes=function(t,e,n,r){t=Jo(t)?t:Wu(t),n=n&&!r?yu(n):0;var a=t.length;return n<0&&(n=wn(a+n,0)),fu(t)?n<=a&&t.indexOf(e,n)>-1:!!a&&We(t,e,n)>-1},Gn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var a=null==n?0:yu(n);return a<0&&(a=wn(r+a,0)),We(t,e,a)},Gn.inRange=function(t,e,n){return e=gu(e),n===i?(n=e,e=0):n=gu(n),function(t,e,n){return t>=xn(e,n)&&t<wn(e,n)}(t=_u(t),e,n)},Gn.invoke=ju,Gn.isArguments=$o,Gn.isArray=Ho,Gn.isArrayBuffer=Vo,Gn.isArrayLike=Jo,Gn.isArrayLikeObject=Zo,Gn.isBoolean=function(t){return!0===t||!1===t||iu(t)&&Sr(t)==w},Gn.isBuffer=Ko,Gn.isDate=Xo,Gn.isElement=function(t){return iu(t)&&1===t.nodeType&&!cu(t)},Gn.isEmpty=function(t){if(null==t)return!0;if(Jo(t)&&(Ho(t)||"string"==typeof t||"function"==typeof t.splice||Ko(t)||du(t)||$o(t)))return!t.length;var e=gi(t);if(e==A||e==P)return!t.size;if(Ai(t))return!Br(t).length;for(var n in t)if(Et.call(t,n))return!1;return!0},Gn.isEqual=function(t,e){return Rr(t,e)},Gn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:i)?n(t,e):i;return r===i?Rr(t,e,i,n):!!r},Gn.isError=tu,Gn.isFinite=function(t){return"number"==typeof t&&we(t)},Gn.isFunction=eu,Gn.isInteger=nu,Gn.isLength=ru,Gn.isMap=ou,Gn.isMatch=function(t,e){return t===e||Lr(t,e,di(e))},Gn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:i,Lr(t,e,di(e),n)},Gn.isNaN=function(t){return uu(t)&&t!=+t},Gn.isNative=function(t){if(Ci(t))throw new Ct("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Er(t)},Gn.isNil=function(t){return null==t},Gn.isNull=function(t){return null===t},Gn.isNumber=uu,Gn.isObject=au,Gn.isObjectLike=iu,Gn.isPlainObject=cu,Gn.isRegExp=su,Gn.isSafeInteger=function(t){return nu(t)&&t>=-9007199254740991&&t<=v},Gn.isSet=lu,Gn.isString=fu,Gn.isSymbol=hu,Gn.isTypedArray=du,Gn.isUndefined=function(t){return t===i},Gn.isWeakMap=function(t){return iu(t)&&gi(t)==j},Gn.isWeakSet=function(t){return iu(t)&&"[object WeakSet]"==Sr(t)},Gn.join=function(t,e){return null==t?"":Fe.call(t,e)},Gn.kebabCase=Hu,Gn.last=Xi,Gn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var a=r;return n!==i&&(a=(a=yu(n))<0?wn(r+a,0):xn(a,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,a):Ge(t,Ye,a,!0)},Gn.lowerCase=Vu,Gn.lowerFirst=Ju,Gn.lt=pu,Gn.lte=vu,Gn.max=function(t){return t&&t.length?yr(t,uc,Or):i},Gn.maxBy=function(t,e){return t&&t.length?yr(t,fi(e,2),Or):i},Gn.mean=function(t){return $e(t,uc)},Gn.meanBy=function(t,e){return $e(t,fi(e,2))},Gn.min=function(t){return t&&t.length?yr(t,uc,Fr):i},Gn.minBy=function(t,e){return t&&t.length?yr(t,fi(e,2),Fr):i},Gn.stubArray=bc,Gn.stubFalse=_c,Gn.stubObject=function(){return{}},Gn.stubString=function(){return""},Gn.stubTrue=function(){return!0},Gn.multiply=Ac,Gn.nth=function(t,e){return t&&t.length?Yr(t,yu(e)):i},Gn.noConflict=function(){return me._===this&&(me._=qt),this},Gn.noop=hc,Gn.now=No,Gn.pad=function(t,e,n){t=xu(t);var r=(e=yu(e))?mn(t):0;if(!e||r>=e)return t;var a=(e-r)/2;return $a(ge(a),n)+t+$a(ve(a),n)},Gn.padEnd=function(t,e,n){t=xu(t);var r=(e=yu(e))?mn(t):0;return e&&r<e?t+$a(e-r,n):t},Gn.padStart=function(t,e,n){t=xu(t);var r=(e=yu(e))?mn(t):0;return e&&r<e?$a(e-r,n)+t:t},Gn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),kn(xu(t).replace(ut,""),e||0)},Gn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&xi(t,e,n)&&(e=n=i),n===i&&("boolean"==typeof e?(n=e,e=i):"boolean"==typeof t&&(n=t,t=i)),t===i&&e===i?(t=0,e=1):(t=gu(t),e===i?(e=t,t=0):e=gu(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var a=Cn();return xn(t+a*(e-t+he("1e-"+((a+"").length-1))),e)}return Zr(t,e)},Gn.reduce=function(t,e,n){var r=Ho(t)?ze:Je,a=arguments.length<3;return r(t,fi(e,4),n,a,vr)},Gn.reduceRight=function(t,e,n){var r=Ho(t)?Be:Je,a=arguments.length<3;return r(t,fi(e,4),n,a,mr)},Gn.repeat=function(t,e,n){return e=(n?xi(t,e,n):e===i)?1:yu(e),Kr(xu(t),e)},Gn.replace=function(){var t=arguments,e=xu(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Gn.result=function(t,e,n){var r=-1,a=(e=xa(e,t)).length;for(a||(a=1,t=i);++r<a;){var o=null==t?i:t[Qi(e[r])];o===i&&(r=a,o=n),t=eu(o)?o.call(t):o}return t},Gn.round=Tc,Gn.runInContext=t,Gn.sample=function(t){return(Ho(t)?tr:ta)(t)},Gn.size=function(t){if(null==t)return 0;if(Jo(t))return fu(t)?mn(t):t.length;var e=gi(t);return e==A||e==P?t.size:Br(t).length},Gn.snakeCase=Zu,Gn.some=function(t,e,n){var r=Ho(t)?Qe:ua;return n&&xi(t,e,n)&&(e=i),r(t,fi(e,3))},Gn.sortedIndex=function(t,e){return ca(t,e)},Gn.sortedIndexBy=function(t,e,n){return sa(t,e,fi(n,2))},Gn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=ca(t,e);if(r<n&&Wo(t[r],e))return r}return-1},Gn.sortedLastIndex=function(t,e){return ca(t,e,!0)},Gn.sortedLastIndexBy=function(t,e,n){return sa(t,e,fi(n,2),!0)},Gn.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var n=ca(t,e,!0)-1;if(Wo(t[n],e))return n}return-1},Gn.startCase=Ku,Gn.startsWith=function(t,e,n){return t=xu(t),n=null==n?0:lr(yu(n),0,t.length),e=ha(e),t.slice(n,n+e.length)==e},Gn.subtract=Sc,Gn.sum=function(t){return t&&t.length?Ze(t,uc):0},Gn.sumBy=function(t,e){return t&&t.length?Ze(t,fi(e,2)):0},Gn.template=function(t,e,n){var r=Gn.templateSettings;n&&xi(t,e,n)&&(e=i),t=xu(t),e=Cu({},e,r,ei);var a,o,u=Cu({},e.imports,r.imports,ei),c=Ru(u),s=en(u,c),l=0,f=e.interpolate||Mt,h="__p += '",d=Ot((e.escape||Mt).source+"|"+f.source+"|"+(f===et?vt:Mt).source+"|"+(e.evaluate||Mt).source+"|$","g"),p="//# sourceURL="+(Et.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ce+"]")+"\n";t.replace(d,(function(e,n,r,i,u,c){return r||(r=i),h+=t.slice(l,c).replace(kt,sn),n&&(a=!0,h+="' +\n__e("+n+") +\n'"),u&&(o=!0,h+="';\n"+u+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+e.length,e})),h+="';\n";var v=Et.call(e,"variable")&&e.variable;if(v){if(dt.test(v))throw new Ct("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(o?h.replace(Y,""):h).replace($,"$1").replace(H,"$1;"),h="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var m=nc((function(){return At(c,p+"return "+h).apply(i,s)}));if(m.source=h,tu(m))throw m;return m},Gn.times=function(t,e){if((t=yu(t))<1||t>v)return[];var n=g,r=xn(t,g);e=fi(e),t-=g;for(var a=Ke(r,e);++n<t;)e(n);return a},Gn.toFinite=gu,Gn.toInteger=yu,Gn.toLength=bu,Gn.toLower=function(t){return xu(t).toLowerCase()},Gn.toNumber=_u,Gn.toSafeInteger=function(t){return t?lr(yu(t),-9007199254740991,v):0===t?t:0},Gn.toString=xu,Gn.toUpper=function(t){return xu(t).toUpperCase()},Gn.trim=function(t,e,n){if((t=xu(t))&&(n||e===i))return Xe(t);if(!t||!(e=ha(e)))return t;var r=gn(t),a=gn(e);return ka(r,rn(r,a),an(r,a)+1).join("")},Gn.trimEnd=function(t,e,n){if((t=xu(t))&&(n||e===i))return t.slice(0,yn(t)+1);if(!t||!(e=ha(e)))return t;var r=gn(t);return ka(r,0,an(r,gn(e))+1).join("")},Gn.trimStart=function(t,e,n){if((t=xu(t))&&(n||e===i))return t.replace(ut,"");if(!t||!(e=ha(e)))return t;var r=gn(t);return ka(r,rn(r,gn(e))).join("")},Gn.truncate=function(t,e){var n=30,r="...";if(au(e)){var a="separator"in e?e.separator:a;n="length"in e?yu(e.length):n,r="omission"in e?ha(e.omission):r}var o=(t=xu(t)).length;if(ln(t)){var u=gn(t);o=u.length}if(n>=o)return t;var c=n-mn(r);if(c<1)return r;var s=u?ka(u,0,c).join(""):t.slice(0,c);if(a===i)return s+r;if(u&&(c+=s.length-c),su(a)){if(t.slice(c).search(a)){var l,f=s;for(a.global||(a=Ot(a.source,xu(mt.exec(a))+"g")),a.lastIndex=0;l=a.exec(f);)var h=l.index;s=s.slice(0,h===i?c:h)}}else if(t.indexOf(ha(a),c)!=c){var d=s.lastIndexOf(a);d>-1&&(s=s.slice(0,d))}return s+r},Gn.unescape=function(t){return(t=xu(t))&&Z.test(t)?t.replace(V,bn):t},Gn.uniqueId=function(t){var e=++zt;return xu(t)+e},Gn.upperCase=Xu,Gn.upperFirst=tc,Gn.each=xo,Gn.eachRight=Mo,Gn.first=Vi,fc(Gn,(Cc={},Mr(Gn,(function(t,e){Et.call(Gn.prototype,e)||(Cc[e]=t)})),Cc),{chain:!1}),Gn.VERSION="4.17.21",Ne(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Gn[t].placeholder=Gn})),Ne(["drop","take"],(function(t,e){$n.prototype[t]=function(n){n=n===i?1:wn(yu(n),0);var r=this.__filtered__&&!e?new $n(this):this.clone();return r.__filtered__?r.__takeCount__=xn(n,r.__takeCount__):r.__views__.push({size:xn(n,g),type:t+(r.__dir__<0?"Right":"")}),r},$n.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Ne(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;$n.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:fi(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Ne(["head","last"],(function(t,e){var n="take"+(e?"Right":"");$n.prototype[t]=function(){return this[n](1).value()[0]}})),Ne(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");$n.prototype[t]=function(){return this.__filtered__?new $n(this):this[n](1)}})),$n.prototype.compact=function(){return this.filter(uc)},$n.prototype.find=function(t){return this.filter(t).head()},$n.prototype.findLast=function(t){return this.reverse().find(t)},$n.prototype.invokeMap=Xr((function(t,e){return"function"==typeof t?new $n(this):this.map((function(n){return Ir(n,t,e)}))})),$n.prototype.reject=function(t){return this.filter(Bo(fi(t)))},$n.prototype.slice=function(t,e){t=yu(t);var n=this;return n.__filtered__&&(t>0||e<0)?new $n(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==i&&(n=(e=yu(e))<0?n.dropRight(-e):n.take(e-t)),n)},$n.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},$n.prototype.toArray=function(){return this.take(g)},Mr($n.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),a=Gn[r?"take"+("last"==e?"Right":""):e],o=r||/^find/.test(e);a&&(Gn.prototype[e]=function(){var e=this.__wrapped__,u=r?[1]:arguments,c=e instanceof $n,s=u[0],l=c||Ho(e),f=function(t){var e=a.apply(Gn,Ee([t],u));return r&&h?e[0]:e};l&&n&&"function"==typeof s&&1!=s.length&&(c=l=!1);var h=this.__chain__,d=!!this.__actions__.length,p=o&&!h,v=c&&!d;if(!o&&l){e=v?e:new $n(this);var m=t.apply(e,u);return m.__actions__.push({func:go,args:[f],thisArg:i}),new Yn(m,h)}return p&&v?t.apply(this,u):(m=this.thru(f),p?r?m.value()[0]:m.value():m)})})),Ne(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Dt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Gn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var a=this.value();return e.apply(Ho(a)?a:[],t)}return this[n]((function(n){return e.apply(Ho(n)?n:[],t)}))}})),Mr($n.prototype,(function(t,e){var n=Gn[e];if(n){var r=n.name+"";Et.call(jn,r)||(jn[r]=[]),jn[r].push({name:e,func:n})}})),jn[Ga(i,2).name]=[{name:"wrapper",func:i}],$n.prototype.clone=function(){var t=new $n(this.__wrapped__);return t.__actions__=Da(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Da(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Da(this.__views__),t},$n.prototype.reverse=function(){if(this.__filtered__){var t=new $n(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},$n.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ho(t),r=e<0,a=n?t.length:0,i=function(t,e,n){var r=-1,a=n.length;for(;++r<a;){var i=n[r],o=i.size;switch(i.type){case"drop":t+=o;break;case"dropRight":e-=o;break;case"take":e=xn(e,t+o);break;case"takeRight":t=wn(t,e-o)}}return{start:t,end:e}}(0,a,this.__views__),o=i.start,u=i.end,c=u-o,s=r?u:o-1,l=this.__iteratees__,f=l.length,h=0,d=xn(c,this.__takeCount__);if(!n||!r&&a==c&&d==c)return ga(t,this.__actions__);var p=[];t:for(;c--&&h<d;){for(var v=-1,m=t[s+=e];++v<f;){var g=l[v],y=g.iteratee,b=g.type,_=y(m);if(2==b)m=_;else if(!_){if(1==b)continue t;break t}}p[h++]=m}return p},Gn.prototype.at=yo,Gn.prototype.chain=function(){return mo(this)},Gn.prototype.commit=function(){return new Yn(this.value(),this.__chain__)},Gn.prototype.next=function(){this.__values__===i&&(this.__values__=mu(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},Gn.prototype.plant=function(t){for(var e,n=this;n instanceof Un;){var r=qi(n);r.__index__=0,r.__values__=i,e?a.__wrapped__=r:e=r;var a=r;n=n.__wrapped__}return a.__wrapped__=t,e},Gn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof $n){var e=t;return this.__actions__.length&&(e=new $n(this)),(e=e.reverse()).__actions__.push({func:go,args:[ro],thisArg:i}),new Yn(e,this.__chain__)}return this.thru(ro)},Gn.prototype.toJSON=Gn.prototype.valueOf=Gn.prototype.value=function(){return ga(this.__wrapped__,this.__actions__)},Gn.prototype.first=Gn.prototype.head,Xt&&(Gn.prototype[Xt]=function(){return this}),Gn}();"object"==a(n.amdO)&&n.amdO?(me._=_n,(r=function(){return _n}.call(e,n,e,t))===i||(t.exports=r)):ye?((ye.exports=_n)._=_n,ge._=_n):me._=_n}).call(this)},5533:function(t,e,n){t.exports=n(8811).use(n(3839)).use(n(2270)).use(n(7195)).use(n(6802)).use(n(3005)).use(n(8575)).use(n(9146)).use(n(1696)).use(n(8747)).use(n(1953)).use(n(7686)).use(n(3244)).use(n(3132)).use(n(9506)).use(n(8094)).use(n(4192)).use(n(1171)).use(n(9954)).use(n(7507)).use(n(9880)).use(n(6987))},3005:function(t){t.exports=function(t){t.installColorSpace("CMYK",["cyan","magenta","yellow","black","alpha"],{rgb:function(){return new t.RGB(1-this._cyan*(1-this._black)-this._black,1-this._magenta*(1-this._black)-this._black,1-this._yellow*(1-this._black)-this._black,this._alpha)},fromRgb:function(){var e=this._red,n=this._green,r=this._blue,a=1-e,i=1-n,o=1-r,u=1;return e||n||r?(a=(a-(u=Math.min(a,Math.min(i,o))))/(1-u),i=(i-u)/(1-u),o=(o-u)/(1-u)):u=1,new t.CMYK(a,i,o,u,this._alpha)}})}},6802:function(t,e,n){t.exports=function(t){t.use(n(7195)),t.installColorSpace("HSL",["hue","saturation","lightness","alpha"],{hsv:function(){var e,n=2*this._lightness,r=this._saturation*(n<=1?n:2-n);return e=n+r<1e-9?0:2*r/(n+r),new t.HSV(this._hue,e,(n+r)/2,this._alpha)},rgb:function(){return this.hsv().rgb()},fromRgb:function(){return this.hsv().hsl()}})}},7195:function(t){t.exports=function(t){t.installColorSpace("HSV",["hue","saturation","value","alpha"],{rgb:function(){var e,n,r,a=this._hue,i=this._saturation,o=this._value,u=Math.min(5,Math.floor(6*a)),c=6*a-u,s=o*(1-i),l=o*(1-c*i),f=o*(1-(1-c)*i);switch(u){case 0:e=o,n=f,r=s;break;case 1:e=l,n=o,r=s;break;case 2:e=s,n=o,r=f;break;case 3:e=s,n=l,r=o;break;case 4:e=f,n=s,r=o;break;case 5:e=o,n=s,r=l}return new t.RGB(e,n,r,this._alpha)},hsl:function(){var e,n=(2-this._saturation)*this._value,r=this._saturation*this._value,a=n<=1?n:2-n;return e=a<1e-9?0:r/a,new t.HSL(this._hue,e,n/2,this._alpha)},fromRgb:function(){var e,n=this._red,r=this._green,a=this._blue,i=Math.max(n,r,a),o=i-Math.min(n,r,a),u=0===i?0:o/i,c=i;if(0===o)e=0;else switch(i){case n:e=(r-a)/o/6+(r<a?1:0);break;case r:e=(a-n)/o/6+1/3;break;case a:e=(n-r)/o/6+2/3}return new t.HSV(e,u,c,this._alpha)}})}},2270:function(t,e,n){t.exports=function(t){t.use(n(3839)),t.installColorSpace("LAB",["l","a","b","alpha"],{fromRgb:function(){return this.xyz().lab()},rgb:function(){return this.xyz().rgb()},xyz:function(){var e=function(t){var e=Math.pow(t,3);return e>.008856?e:(t-16/116)/7.87},n=(this._l+16)/116,r=this._a/500+n,a=n-this._b/200;return new t.XYZ(95.047*e(r),100*e(n),108.883*e(a),this._alpha)}})}},3839:function(t){t.exports=function(t){t.installColorSpace("XYZ",["x","y","z","alpha"],{fromRgb:function(){var e=function(t){return t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92},n=e(this._red),r=e(this._green),a=e(this._blue);return new t.XYZ(.4124564*n+.3575761*r+.1804375*a,.2126729*n+.7151522*r+.072175*a,.0193339*n+.119192*r+.9503041*a,this._alpha)},rgb:function(){var e=this._x,n=this._y,r=this._z,a=function(t){return t>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t};return new t.RGB(a(3.2404542*e+-1.5371385*n+-.4985314*r),a(-.969266*e+1.8760108*n+.041556*r),a(.0556434*e+-.2040259*n+1.0572252*r),this._alpha)},lab:function(){var e=function(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29},n=e(this._x/95.047),r=e(this._y/100),a=e(this._z/108.883);return new t.LAB(116*r-16,500*(n-r),200*(r-a),this._alpha)}})}},8811:function(t,e,n){var r=n(5570).default,a=[],i=function(t){return void 0===t},o=/\s*(\.\d+|\d+(?:\.\d+)?)(%)?\s*/,u=/\s*(\.\d+|100|\d?\d(?:\.\d+)?)%\s*/,c=new RegExp("^(rgb|hsl|hsv)a?\\("+o.source+","+o.source+","+o.source+"(?:,"+/\s*(\.\d+|\d+(?:\.\d+)?)\s*/.source+")?\\)$","i");function s(t){if(Array.isArray(t)){if("string"==typeof t[0]&&"function"==typeof s[t[0]])return new s[t[0]](t.slice(1,t.length));if(4===t.length)return new s.RGB(t[0]/255,t[1]/255,t[2]/255,t[3]/255)}else if("string"==typeof t){var e=t.toLowerCase();s.namedColors[e]&&(t="#"+s.namedColors[e]),"transparent"===e&&(t="rgba(0,0,0,0)");var n=t.match(c);if(n){var a=n[1].toUpperCase(),o=i(n[8])?n[8]:parseFloat(n[8]),l="H"===a[0],f=n[3]?100:l?360:255,h=n[5]||l?100:255,d=n[7]||l?100:255;if(i(s[a]))throw new Error("color."+a+" is not installed.");return new s[a](parseFloat(n[2])/f,parseFloat(n[4])/h,parseFloat(n[6])/d,o)}t.length<6&&(t=t.replace(/^#?([0-9a-f])([0-9a-f])([0-9a-f])$/i,"$1$1$2$2$3$3"));var p=t.match(/^#?([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])$/i);if(p)return new s.RGB(parseInt(p[1],16)/255,parseInt(p[2],16)/255,parseInt(p[3],16)/255);if(s.CMYK){var v=t.match(new RegExp("^cmyk\\("+u.source+","+u.source+","+u.source+","+u.source+"\\)$","i"));if(v)return new s.CMYK(parseFloat(v[1])/100,parseFloat(v[2])/100,parseFloat(v[3])/100,parseFloat(v[4])/100)}}else if("object"===r(t)&&t.isColor)return t;return!1}s.namedColors={},s.installColorSpace=function(t,e,n){s[t]=function(n){var r=Array.isArray(n)?n:arguments;e.forEach((function(n,a){var i=r[a];if("alpha"===n)this._alpha=isNaN(i)||i>1?1:i<0?0:i;else{if(isNaN(i))throw new Error("["+t+"]: Invalid color: ("+e.join(",")+")");"hue"===n?this._hue=i<0?i-Math.floor(i):i%1:this["_"+n]=i<0?0:i>1?1:i}}),this)},s[t].propertyNames=e;var r=s[t].prototype;for(var o in["valueOf","hex","hexa","css","cssa"].forEach((function(e){r[e]=r[e]||("RGB"===t?r.hex:function(){return this.rgb()[e]()})})),r.isColor=!0,r.equals=function(n,r){i(r)&&(r=1e-10),n=n[t.toLowerCase()]();for(var a=0;a<e.length;a+=1)if(Math.abs(this["_"+e[a]]-n["_"+e[a]])>r)return!1;return!0},r.toJSON=function(){return[t].concat(e.map((function(t){return this["_"+t]}),this))},n)if(n.hasOwnProperty(o)){var u=o.match(/^from(.*)$/);u?s[u[1].toUpperCase()].prototype[t.toLowerCase()]=n[o]:r[o]=n[o]}function c(t,e){var n={};for(var r in n[e.toLowerCase()]=function(){return this.rgb()[e.toLowerCase()]()},s[e].propertyNames.forEach((function(t){var r="black"===t?"k":t.charAt(0);n[t]=n[r]=function(n,r){return this[e.toLowerCase()]()[t](n,r)}})),n)n.hasOwnProperty(r)&&void 0===s[t].prototype[r]&&(s[t].prototype[r]=n[r])}return r[t.toLowerCase()]=function(){return this},r.toString=function(){return"["+t+" "+e.map((function(t){return this["_"+t]}),this).join(", ")+"]"},e.forEach((function(t){var n="black"===t?"k":t.charAt(0);r[t]=r[n]=function(n,r){return void 0===n?this["_"+t]:r?new this.constructor(e.map((function(e){return this["_"+e]+(t===e?n:0)}),this)):new this.constructor(e.map((function(e){return t===e?n:this["_"+e]}),this))}})),a.forEach((function(e){c(t,e),c(e,t)})),a.push(t),s},s.pluginList=[],s.use=function(t){return-1===s.pluginList.indexOf(t)&&(this.pluginList.push(t),t(s)),s},s.installMethod=function(t,e){return a.forEach((function(n){s[n].prototype[t]=e})),this},s.installColorSpace("RGB",["red","green","blue","alpha"],{hex:function(){var t=(65536*Math.round(255*this._red)+256*Math.round(255*this._green)+Math.round(255*this._blue)).toString(16);return"#"+"00000".substr(0,6-t.length)+t},hexa:function(){var t=Math.round(255*this._alpha).toString(16);return"#"+"00".substr(0,2-t.length)+t+this.hex().substr(1,6)},css:function(){return"rgb("+Math.round(255*this._red)+","+Math.round(255*this._green)+","+Math.round(255*this._blue)+")"},cssa:function(){return"rgba("+Math.round(255*this._red)+","+Math.round(255*this._green)+","+Math.round(255*this._blue)+","+this._alpha+")"}}),t.exports=s},9146:function(t){t.exports=function(t){t.installMethod("clearer",(function(t){return this.alpha(isNaN(t)?-.1:-t,!0)}))}},1696:function(t,e,n){t.exports=function(t){t.use(n(8094)),t.installMethod("contrast",(function(t){var e=this.luminance(),n=t.luminance();return e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)}))}},8747:function(t,e,n){t.exports=function(t){t.use(n(6802)),t.installMethod("darken",(function(t){return this.lightness(isNaN(t)?-.1:-t,!0)}))}},1953:function(t,e,n){t.exports=function(t){t.use(n(6802)),t.installMethod("desaturate",(function(t){return this.saturation(isNaN(t)?-.1:-t,!0)}))}},7686:function(t){t.exports=function(t){function e(){var e=this.rgb(),n=.3*e._red+.59*e._green+.11*e._blue;return new t.RGB(n,n,n,e._alpha)}t.installMethod("greyscale",e).installMethod("grayscale",e)}},3244:function(t){t.exports=function(t){t.installMethod("isDark",(function(){var t=this.rgb();return(255*t._red*299+255*t._green*587+255*t._blue*114)/1e3<128}))}},3132:function(t,e,n){t.exports=function(t){t.use(n(3244)),t.installMethod("isLight",(function(){return!this.isDark()}))}},9506:function(t,e,n){t.exports=function(t){t.use(n(6802)),t.installMethod("lighten",(function(t){return this.lightness(isNaN(t)?.1:t,!0)}))}},8094:function(t){t.exports=function(t){function e(t){return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}t.installMethod("luminance",(function(){var t=this.rgb();return.2126*e(t._red)+.7152*e(t._green)+.0722*e(t._blue)}))}},4192:function(t){t.exports=function(t){t.installMethod("mix",(function(e,n){e=t(e).rgb();var r=2*(n=1-(isNaN(n)?.5:n))-1,a=this._alpha-e._alpha,i=((r*a==-1?r:(r+a)/(1+r*a))+1)/2,o=1-i,u=this.rgb();return new t.RGB(u._red*i+e._red*o,u._green*i+e._green*o,u._blue*i+e._blue*o,u._alpha*n+e._alpha*(1-n))}))}},8575:function(t){t.exports=function(t){t.namedColors={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgrey:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",grey:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"}}},1171:function(t){t.exports=function(t){t.installMethod("negate",(function(){var e=this.rgb();return new t.RGB(1-e._red,1-e._green,1-e._blue,this._alpha)}))}},9954:function(t){t.exports=function(t){t.installMethod("opaquer",(function(t){return this.alpha(isNaN(t)?.1:t,!0)}))}},7507:function(t,e,n){t.exports=function(t){t.use(n(6802)),t.installMethod("rotate",(function(t){return this.hue((t||0)/360,!0)}))}},9880:function(t,e,n){t.exports=function(t){t.use(n(6802)),t.installMethod("saturate",(function(t){return this.saturation(isNaN(t)?.1:t,!0)}))}},6987:function(t){t.exports=function(t){t.installMethod("toAlpha",(function(t){var e=this.rgb(),n=t(t).rgb(),r=new t.RGB(0,0,0,e._alpha),a=["_red","_green","_blue"];return a.forEach((function(t){e[t]<1e-10?r[t]=e[t]:e[t]>n[t]?r[t]=(e[t]-n[t])/(1-n[t]):e[t]>n[t]?r[t]=(n[t]-e[t])/n[t]:r[t]=0})),r._red>r._green?r._red>r._blue?e._alpha=r._red:e._alpha=r._blue:r._green>r._blue?e._alpha=r._green:e._alpha=r._blue,e._alpha<1e-10||(a.forEach((function(t){e[t]=(e[t]-n[t])/e._alpha+n[t]})),e._alpha*=r._alpha),e}))}},6646:function(t){if(!e)var e={map:function(t,e){var n={};return e?t.map((function(t,r){return n.index=r,e.call(n,t)})):t.slice()},naturalOrder:function(t,e){return t<e?-1:t>e?1:0},sum:function(t,e){var n={};return t.reduce(e?function(t,r,a){return n.index=a,t+e.call(n,r)}:function(t,e){return t+e},0)},max:function(t,n){return Math.max.apply(null,n?e.map(t,n):t)}};var n=function(){function t(t,e,n){return(t<<10)+(e<<5)+n}function n(t){var e=[],n=!1;function r(){e.sort(t),n=!0}return{push:function(t){e.push(t),n=!1},peek:function(t){return n||r(),void 0===t&&(t=e.length-1),e[t]},pop:function(){return n||r(),e.pop()},size:function(){return e.length},map:function(t){return e.map(t)},debug:function(){return n||r(),e}}}function r(t,e,n,r,a,i,o){var u=this;u.r1=t,u.r2=e,u.g1=n,u.g2=r,u.b1=a,u.b2=i,u.histo=o}function a(){this.vboxes=new n((function(t,n){return e.naturalOrder(t.vbox.count()*t.vbox.volume(),n.vbox.count()*n.vbox.volume())}))}function i(n,r){if(r.count()){var a=r.r2-r.r1+1,i=r.g2-r.g1+1,o=r.b2-r.b1+1,u=e.max([a,i,o]);if(1==r.count())return[r.copy()];var c,s,l,f,h=0,d=[],p=[];if(u==a)for(c=r.r1;c<=r.r2;c++){for(f=0,s=r.g1;s<=r.g2;s++)for(l=r.b1;l<=r.b2;l++)f+=n[t(c,s,l)]||0;h+=f,d[c]=h}else if(u==i)for(c=r.g1;c<=r.g2;c++){for(f=0,s=r.r1;s<=r.r2;s++)for(l=r.b1;l<=r.b2;l++)f+=n[t(s,c,l)]||0;h+=f,d[c]=h}else for(c=r.b1;c<=r.b2;c++){for(f=0,s=r.r1;s<=r.r2;s++)for(l=r.g1;l<=r.g2;l++)f+=n[t(s,l,c)]||0;h+=f,d[c]=h}return d.forEach((function(t,e){p[e]=h-t})),v(u==a?"r":u==i?"g":"b")}function v(t){var e,n,a,i,o,u=t+"1",s=t+"2",l=0;for(c=r[u];c<=r[s];c++)if(d[c]>h/2){for(a=r.copy(),i=r.copy(),o=(e=c-r[u])<=(n=r[s]-c)?Math.min(r[s]-1,~~(c+n/2)):Math.max(r[u],~~(c-1-e/2));!d[o];)o++;for(l=p[o];!l&&d[o-1];)l=p[--o];return a[s]=o,i[u]=a[s]+1,[a,i]}}}return r.prototype={volume:function(t){var e=this;return e._volume&&!t||(e._volume=(e.r2-e.r1+1)*(e.g2-e.g1+1)*(e.b2-e.b1+1)),e._volume},count:function(e){var n=this,r=n.histo;if(!n._count_set||e){var a,i,o,u=0;for(a=n.r1;a<=n.r2;a++)for(i=n.g1;i<=n.g2;i++)for(o=n.b1;o<=n.b2;o++)u+=r[t(a,i,o)]||0;n._count=u,n._count_set=!0}return n._count},copy:function(){var t=this;return new r(t.r1,t.r2,t.g1,t.g2,t.b1,t.b2,t.histo)},avg:function(e){var n=this,r=n.histo;if(!n._avg||e){var a,i,o,u,c=0,s=0,l=0,f=0;for(i=n.r1;i<=n.r2;i++)for(o=n.g1;o<=n.g2;o++)for(u=n.b1;u<=n.b2;u++)c+=a=r[t(i,o,u)]||0,s+=a*(i+.5)*8,l+=a*(o+.5)*8,f+=a*(u+.5)*8;n._avg=c?[~~(s/c),~~(l/c),~~(f/c)]:[~~(8*(n.r1+n.r2+1)/2),~~(8*(n.g1+n.g2+1)/2),~~(8*(n.b1+n.b2+1)/2)]}return n._avg},contains:function(t){var e=this,n=t[0]>>3;return gval=t[1]>>3,bval=t[2]>>3,n>=e.r1&&n<=e.r2&&gval>=e.g1&&gval<=e.g2&&bval>=e.b1&&bval<=e.b2}},a.prototype={push:function(t){this.vboxes.push({vbox:t,color:t.avg()})},palette:function(){return this.vboxes.map((function(t){return t.color}))},size:function(){return this.vboxes.size()},map:function(t){for(var e=this.vboxes,n=0;n<e.size();n++)if(e.peek(n).vbox.contains(t))return e.peek(n).color;return this.nearest(t)},nearest:function(t){for(var e,n,r,a=this.vboxes,i=0;i<a.size();i++)((n=Math.sqrt(Math.pow(t[0]-a.peek(i).color[0],2)+Math.pow(t[1]-a.peek(i).color[1],2)+Math.pow(t[2]-a.peek(i).color[2],2)))<e||void 0===e)&&(e=n,r=a.peek(i).color);return r},forcebw:function(){var t=this.vboxes;t.sort((function(t,n){return e.naturalOrder(e.sum(t.color),e.sum(n.color))}));var n=t[0].color;n[0]<5&&n[1]<5&&n[2]<5&&(t[0].color=[0,0,0]);var r=t.length-1,a=t[r].color;a[0]>251&&a[1]>251&&a[2]>251&&(t[r].color=[255,255,255])}},{quantize:function(o,u){if(!o.length||u<2||u>256)return!1;var c=function(e){var n,r,a,i,o=new Array(32768);return e.forEach((function(e){r=e[0]>>3,a=e[1]>>3,i=e[2]>>3,n=t(r,a,i),o[n]=(o[n]||0)+1})),o}(o);c.forEach((function(){0}));var s=function(t,e){var n,a,i,o=1e6,u=0,c=1e6,s=0,l=1e6,f=0;return t.forEach((function(t){n=t[0]>>3,a=t[1]>>3,i=t[2]>>3,n<o?o=n:n>u&&(u=n),a<c?c=a:a>s&&(s=a),i<l?l=i:i>f&&(f=i)})),new r(o,u,c,s,l,f,e)}(o,c),l=new n((function(t,n){return e.naturalOrder(t.count(),n.count())}));function f(t,e){for(var n,r=1,a=0;a<1e3;)if((n=t.pop()).count()){var o=i(c,n),u=o[0],s=o[1];if(!u)return;if(t.push(u),s&&(t.push(s),r++),r>=e)return;if(a++>1e3)return}else t.push(n),a++}l.push(s),f(l,.75*u);for(var h=new n((function(t,n){return e.naturalOrder(t.count()*t.volume(),n.count()*n.volume())}));l.size();)h.push(l.pop());f(h,u-h.size());for(var d=new a;h.size();)d.push(h.pop());return d}}}();t.exports=n.quantize},7914:function(t,e){var n,r,a;r=[t],n=function(t){"use strict";function e(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var a={order:2,precision:2,period:null};function i(t,e){var n=[],r=[];t.forEach((function(t,a){null!==t[1]&&(r.push(t),n.push(e[a]))}));var a=r.reduce((function(t,e){return t+e[1]}),0)/r.length,i=r.reduce((function(t,e){var n=e[1]-a;return t+n*n}),0);return 1-r.reduce((function(t,e,r){var a=n[r],i=e[1]-a[1];return t+i*i}),0)/i}function o(t,e){for(var n=t,r=t.length-1,a=[e],i=0;i<r;i++){for(var o=i,u=i+1;u<r;u++)Math.abs(n[i][u])>Math.abs(n[i][o])&&(o=u);for(var c=i;c<r+1;c++){var s=n[c][i];n[c][i]=n[c][o],n[c][o]=s}for(var l=i+1;l<r;l++)for(var f=r;f>=i;f--)n[f][l]-=n[f][i]*n[i][l]/n[i][i]}for(var h=r-1;h>=0;h--){for(var d=0,p=h+1;p<r;p++)d+=n[p][h]*a[p];a[h]=(n[r][h]-d)/n[h][h]}return a}function u(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}var c={linear:function(t,e){for(var n=[0,0,0,0,0],r=0,a=0;a<t.length;a++)null!==t[a][1]&&(r++,n[0]+=t[a][0],n[1]+=t[a][1],n[2]+=t[a][0]*t[a][0],n[3]+=t[a][0]*t[a][1],n[4]+=t[a][1]*t[a][1]);var o=r*n[2]-n[0]*n[0],c=r*n[3]-n[0]*n[1],s=0===o?0:u(c/o,e.precision),l=u(n[1]/r-s*n[0]/r,e.precision),f=function(t){return[u(t,e.precision),u(s*t+l,e.precision)]},h=t.map((function(t){return f(t[0])}));return{points:h,predict:f,equation:[s,l],r2:u(i(t,h),e.precision),string:0===l?"y = "+s+"x":"y = "+s+"x + "+l}},exponential:function(t,e){for(var n=[0,0,0,0,0,0],r=0;r<t.length;r++)null!==t[r][1]&&(n[0]+=t[r][0],n[1]+=t[r][1],n[2]+=t[r][0]*t[r][0]*t[r][1],n[3]+=t[r][1]*Math.log(t[r][1]),n[4]+=t[r][0]*t[r][1]*Math.log(t[r][1]),n[5]+=t[r][0]*t[r][1]);var a=n[1]*n[2]-n[5]*n[5],o=Math.exp((n[2]*n[3]-n[5]*n[4])/a),c=(n[1]*n[4]-n[5]*n[3])/a,s=u(o,e.precision),l=u(c,e.precision),f=function(t){return[u(t,e.precision),u(s*Math.exp(l*t),e.precision)]},h=t.map((function(t){return f(t[0])}));return{points:h,predict:f,equation:[s,l],string:"y = "+s+"e^("+l+"x)",r2:u(i(t,h),e.precision)}},logarithmic:function(t,e){for(var n=[0,0,0,0],r=t.length,a=0;a<r;a++)null!==t[a][1]&&(n[0]+=Math.log(t[a][0]),n[1]+=t[a][1]*Math.log(t[a][0]),n[2]+=t[a][1],n[3]+=Math.pow(Math.log(t[a][0]),2));var o=u((r*n[1]-n[2]*n[0])/(r*n[3]-n[0]*n[0]),e.precision),c=u((n[2]-o*n[0])/r,e.precision),s=function(t){return[u(t,e.precision),u(u(c+o*Math.log(t),e.precision),e.precision)]},l=t.map((function(t){return s(t[0])}));return{points:l,predict:s,equation:[c,o],string:"y = "+c+" + "+o+" ln(x)",r2:u(i(t,l),e.precision)}},power:function(t,e){for(var n=[0,0,0,0,0],r=t.length,a=0;a<r;a++)null!==t[a][1]&&(n[0]+=Math.log(t[a][0]),n[1]+=Math.log(t[a][1])*Math.log(t[a][0]),n[2]+=Math.log(t[a][1]),n[3]+=Math.pow(Math.log(t[a][0]),2));var o=(r*n[1]-n[0]*n[2])/(r*n[3]-Math.pow(n[0],2)),c=(n[2]-o*n[0])/r,s=u(Math.exp(c),e.precision),l=u(o,e.precision),f=function(t){return[u(t,e.precision),u(u(s*Math.pow(t,l),e.precision),e.precision)]},h=t.map((function(t){return f(t[0])}));return{points:h,predict:f,equation:[s,l],string:"y = "+s+"x^"+l,r2:u(i(t,h),e.precision)}},polynomial:function(t,e){for(var n=[],a=[],c=0,s=0,l=t.length,f=e.order+1,h=0;h<f;h++){for(var d=0;d<l;d++)null!==t[d][1]&&(c+=Math.pow(t[d][0],h)*t[d][1]);n.push(c),c=0;for(var p=[],v=0;v<f;v++){for(var m=0;m<l;m++)null!==t[m][1]&&(s+=Math.pow(t[m][0],h+v));p.push(s),s=0}a.push(p)}a.push(n);for(var g=o(a,f).map((function(t){return u(t,e.precision)})),y=function(t){return[u(t,e.precision),u(g.reduce((function(e,n,r){return e+n*Math.pow(t,r)}),0),e.precision)]},b=t.map((function(t){return y(t[0])})),_="y = ",w=g.length-1;w>=0;w--)_+=w>1?g[w]+"x^"+w+" + ":1===w?g[w]+"x + ":g[w];return{string:_,points:b,predict:y,equation:[].concat(r(g)).reverse(),r2:u(i(t,b),e.precision)}}};function s(){var t=function(t,r){return n({_round:u},t,e({},r,(function(t,e){return c[r](t,n({},a,e))})))};return Object.keys(c).reduce(t,{})}t.exports=s()},void 0===(a="function"==typeof n?n.apply(e,r):n)||(t.exports=a)},1451:function(t){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},t.exports.__esModule=!0,t.exports.default=t.exports},2659:function(t){t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports},4218:function(t,e,n){var r=n(1451);t.exports=function(t){if(Array.isArray(t))return r(t)},t.exports.__esModule=!0,t.exports.default=t.exports},6626:function(t){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports},9989:function(t){function e(t,e,n,r,a,i,o){try{var u=t[i](o),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,a)}t.exports=function(t){return function(){var n=this,r=arguments;return new Promise((function(a,i){var o=t.apply(n,r);function u(t){e(o,a,i,u,c,"next",t)}function c(t){e(o,a,i,u,c,"throw",t)}u(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},4528:function(t){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},1088:function(t,e,n){var r=n(6842),a=n(5597);function i(e,n,o){return a()?(t.exports=i=Reflect.construct.bind(),t.exports.__esModule=!0,t.exports.default=t.exports):(t.exports=i=function(t,e,n){var a=[null];a.push.apply(a,e);var i=new(Function.bind.apply(t,a));return n&&r(i,n.prototype),i},t.exports.__esModule=!0,t.exports.default=t.exports),i.apply(null,arguments)}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},8798:function(t,e,n){var r=n(6157);function a(t,e){for(var n=0;n<e.length;n++){var a=e[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,r(a.key),a)}}t.exports=function(t,e,n){return e&&a(t.prototype,e),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports},6970:function(t,e,n){var r=n(2482);t.exports=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=r(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var a=0,i=function(){};return{s:i,n:function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return u=t.done,t},e:function(t){c=!0,o=t},f:function(){try{u||null==n.return||n.return()}finally{if(c)throw o}}}},t.exports.__esModule=!0,t.exports.default=t.exports},9913:function(t,e,n){var r=n(378),a=n(5597),i=n(4776);t.exports=function(t){var e=a();return function(){var n,a=r(t);if(e){var o=r(this).constructor;n=Reflect.construct(a,arguments,o)}else n=a.apply(this,arguments);return i(this,n)}},t.exports.__esModule=!0,t.exports.default=t.exports},9057:function(t,e,n){var r=n(6157);t.exports=function(t,e,n){return(e=r(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.__esModule=!0,t.exports.default=t.exports},378:function(t){function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},7267:function(t,e,n){var r=n(6842);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&r(t,e)},t.exports.__esModule=!0,t.exports.default=t.exports},5597:function(t){t.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}},t.exports.__esModule=!0,t.exports.default=t.exports},2977:function(t){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.__esModule=!0,t.exports.default=t.exports},926:function(t){t.exports=function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,i,o,u=[],c=!0,s=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){s=!0,a=t}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return u}},t.exports.__esModule=!0,t.exports.default=t.exports},9811:function(t){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},7404:function(t){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},1448:function(t,e,n){var r=n(9057);function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}t.exports=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t},t.exports.__esModule=!0,t.exports.default=t.exports},4776:function(t,e,n){var r=n(5570).default,a=n(6626);t.exports=function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return a(t)},t.exports.__esModule=!0,t.exports.default=t.exports},9558:function(t,e,n){var r=n(5570).default;function a(){"use strict";t.exports=a=function(){return n},t.exports.__esModule=!0,t.exports.default=t.exports;var e,n={},i=Object.prototype,o=i.hasOwnProperty,u=Object.defineProperty||function(t,e,n){t[e]=n.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";function h(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(e){h=function(t,e,n){return t[e]=n}}function d(t,e,n,r){var a=e&&e.prototype instanceof b?e:b,i=Object.create(a.prototype),o=new D(r||[]);return u(i,"_invoke",{value:S(t,n,o)}),i}function p(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}n.wrap=d;var v="suspendedStart",m="executing",g="completed",y={};function b(){}function _(){}function w(){}var x={};h(x,s,(function(){return this}));var M=Object.getPrototypeOf,k=M&&M(M(I([])));k&&k!==i&&o.call(k,s)&&(x=k);var C=w.prototype=b.prototype=Object.create(x);function A(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function n(a,i,u,c){var s=p(t[a],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==r(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,u,c)}),(function(t){n("throw",t,u,c)})):e.resolve(f).then((function(t){l.value=t,u(l)}),(function(t){return n("throw",t,u,c)}))}c(s.arg)}var a;u(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,a){n(t,r,e,a)}))}return a=a?a.then(i,i):i()}})}function S(t,n,r){var a=v;return function(i,o){if(a===m)throw new Error("Generator is already running");if(a===g){if("throw"===i)throw o;return{value:e,done:!0}}for(r.method=i,r.arg=o;;){var u=r.delegate;if(u){var c=O(u,r);if(c){if(c===y)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===v)throw a=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=m;var s=p(t,n,r);if("normal"===s.type){if(a=r.done?g:"suspendedYield",s.arg===y)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(a=g,r.method="throw",r.arg=s.arg)}}}function O(t,n){var r=n.method,a=t.iterator[r];if(a===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,O(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var i=p(a,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,y;var o=i.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[s];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=function n(){for(;++a<t.length;)if(o.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(r(t)+" is not iterable")}return _.prototype=w,u(C,"constructor",{value:w,configurable:!0}),u(w,"constructor",{value:_,configurable:!0}),_.displayName=h(w,f,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===_||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,h(t,f,"GeneratorFunction")),t.prototype=Object.create(C),t},n.awrap=function(t){return{__await:t}},A(T.prototype),h(T.prototype,l,(function(){return this})),n.AsyncIterator=T,n.async=function(t,e,r,a,i){void 0===i&&(i=Promise);var o=new T(d(t,e,r,a),i);return n.isGeneratorFunction(e)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},A(C),h(C,f,"Generator"),h(C,s,(function(){return this})),h(C,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},n.values=I,D.prototype={constructor:D,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,a){return u.type="throw",u.arg=t,n.next=r,a&&(n.method="next",n.arg=e),!!a}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),s=o.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var a=r.arg;P(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},n}t.exports=a,t.exports.__esModule=!0,t.exports.default=t.exports},6842:function(t){function e(n,r){return t.exports=e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n,r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},3100:function(t,e,n){var r=n(2659),a=n(926),i=n(2482),o=n(9811);t.exports=function(t,e){return r(t)||a(t,e)||i(t,e)||o()},t.exports.__esModule=!0,t.exports.default=t.exports},4479:function(t,e,n){var r=n(4218),a=n(2977),i=n(2482),o=n(7404);t.exports=function(t){return r(t)||a(t)||i(t)||o()},t.exports.__esModule=!0,t.exports.default=t.exports},2579:function(t,e,n){var r=n(5570).default;t.exports=function(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var a=n.call(t,e||"default");if("object"!=r(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports},6157:function(t,e,n){var r=n(5570).default,a=n(2579);t.exports=function(t){var e=a(t,"string");return"symbol"==r(e)?e:String(e)},t.exports.__esModule=!0,t.exports.default=t.exports},5570:function(t){function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},2482:function(t,e,n){var r=n(1451);t.exports=function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports}},e={};function n(r){var a=e[r];if(void 0!==a)return a.exports;var i=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.amdO={},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t};var r={};return function(){"use strict";n.r(r),n.d(r,{Advisor:function(){return t.w},CHANNELS:function(){return i.pD},CHART_IDS:function(){return i.Sx},COORDINATE_SYSTEMS:function(){return i.io},DataFrame:function(){return c.Z},ENTITY_TYPES:function(){return _.e},FAMILIES:function(){return i.oW},GRAPHIC_CATEGORIES:function(){return i.kB},LEVEL_OF_MEASUREMENTS:function(){return i.qm},PURPOSES:function(){return i.Kp},RECOMMEND_RATINGS:function(){return i.X1},SHAPES:function(){return i.HS},Series:function(){return u.Z},analyzeField:function(){return o.ri},cdf:function(){return h.s},ckb:function(){return e.n},ckbDict:function(){return a.N},coefficientOfVariance:function(){return s.eu},covariance:function(){return s.AV},distinct:function(){return s.EB},generateInsightVisualizationSpec:function(){return v.c},generateTextSpec:function(){return y.Z},geometricMean:function(){return s.IS},getHeadingWeight:function(){return b.TO},getInsights:function(){return p.o},getSpecificInsight:function(){return g.hs},harmonicMean:function(){return s.s6},insightPatternsExtractor:function(){return m.ew},isBulletParagraph:function(){return b.xf},isCustomParagraph:function(){return b.uV},isCustomPhrase:function(){return b.ps},isCustomSection:function(){return b.NS},isDividerParagraph:function(){return b.aY},isEntityPhrase:function(){return b.Tv},isEntityType:function(){return b.OC},isEscapePhrase:function(){return b.FX},isFormulaPhrase:function(){return b.fc},isHeadingParagraph:function(){return b.cL},isImagePhrase:function(){return b.zu},isStandardSection:function(){return b.Mu},isTextParagraph:function(){return b.lD},isTextPhrase:function(){return b.rF},max:function(){return s.Fp},maxabs:function(){return d.D},mean:function(){return s.J6},median:function(){return s.C2},min:function(){return s.VV},missing:function(){return s.wb},normalDistributionQuantile:function(){return l.T},pcorrtest:function(){return f.Z},pearson:function(){return s.Vs},quantile:function(){return s.VR},quartile:function(){return s.gG},standardDeviation:function(){return s.IN},sum:function(){return s.Sm},tDistributionQuantile:function(){return l.D},valid:function(){return s.QF},valueMap:function(){return s.Gn},variance:function(){return s.CA}});var t=n(7047),e=n(9105),a=n(5706),i=n(3708),o=n(107),u=n(4420),c=n(7849),s=n(2616),l=n(8604),f=n(7201),h=n(609),d=n(3125),p=n(9664),v=n(7462),m=n(1484),g=n(8367),y=n(8670),b=n(2267),_=n(5244),w=n(3069),x={};for(var M in w)["default","Advisor","ckb","ckbDict","CHANNELS","CHART_IDS","COORDINATE_SYSTEMS","FAMILIES","GRAPHIC_CATEGORIES","LEVEL_OF_MEASUREMENTS","PURPOSES","RECOMMEND_RATINGS","SHAPES","analyzeField","Series","DataFrame","min","max","sum","mean","normalDistributionQuantile","tDistributionQuantile","distinct","valueMap","missing","valid","pearson","covariance","coefficientOfVariance","standardDeviation","variance","quantile","quartile","median","harmonicMean","geometricMean","pcorrtest","cdf","maxabs","getInsights","generateInsightVisualizationSpec","insightPatternsExtractor","getSpecificInsight","generateTextSpec","isCustomSection","isStandardSection","isCustomParagraph","isTextParagraph","isBulletParagraph","getHeadingWeight","isHeadingParagraph","isDividerParagraph","isEntityPhrase","isImagePhrase","isCustomPhrase","isTextPhrase","isEntityType","isEscapePhrase","isFormulaPhrase","ENTITY_TYPES"].indexOf(M)<0&&(x[M]=function(t){return w[t]}.bind(0,M));n.d(r,x)}(),r}()}));
|