UNPKG

@finos/perspective-viewer-datagrid

Version:

Perspective datagrid plugin based on `regular-table`

11 lines (10 loc) 109 kB
(function (root, factory) { if (typeof define === 'function' && define.amd) { define(['exports'], factory); } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') { factory(exports); } else { factory((root.perspective_datagrid = {})); } }(typeof self !== 'undefined' ? self : this, function (exports) { var vo=Object.create;var Gt=Object.defineProperty;var yo=Object.getOwnPropertyDescriptor;var wo=Object.getOwnPropertyNames;var xo=Object.getPrototypeOf,ko=Object.prototype.hasOwnProperty;var Lo=t=>Gt(t,"__esModule",{value:!0});var qt=(t,r)=>()=>(r||t((r={exports:{}}).exports,r),r.exports);var Mo=(t,r,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let l of wo(r))!ko.call(t,l)&&l!=="default"&&Gt(t,l,{get:()=>r[l],enumerable:!(i=yo(r,l))||i.enumerable});return t},dt=t=>Mo(Lo(Gt(t!=null?vo(xo(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var gt=qt((ht,pt)=>{(function(){var t,r,i,l,n,_,h,g,b,k,v,E,I,C,P,z,j,T,K,p,Z,me,V,W,oe,re,fe,ie,Se,qe,je,Be,Ve,se,Fe,Ne,Re,ue,ve,Oe,he,We,ye,we,Ee,Ue,Ce,pe,$e,vt,rr,q,or,sr,ir,lr,_e,nr,ar,cr,fr,_r,ur,dr,It,Tt,Dt,hr,pr,gr,yt,wt,br,xe,mr,Ke,Le,Ht,ee,te,Ie,xt,kt,Me=[].slice;ee=function(){var e,o,s,a,c;for(e={},c="Boolean Number String Function Array Date RegExp Undefined Null".split(" "),a=0,o=c.length;a<o;a++)s=c[a],e["[object "+s+"]"]=s.toLowerCase();return function(f){var u;return u=Object.prototype.toString.call(f),e[u]||"object"}}(),pe=function(e,o,s){return o==null&&(o=0),s==null&&(s=1),e<o&&(e=o),e>s&&(e=s),e},te=function(e){return e.length>=3?Array.prototype.slice.call(e):e[0]},Z=function(e){var o,s;for(e._clipped=!1,e._unclipped=e.slice(0),o=s=0;s<3;o=++s)o<3?((e[o]<0||e[o]>255)&&(e._clipped=!0),e[o]<0&&(e[o]=0),e[o]>255&&(e[o]=255)):o===3&&(e[o]<0&&(e[o]=0),e[o]>1&&(e[o]=1));return e._clipped||delete e._unclipped,e},l=Math.PI,xe=Math.round,W=Math.cos,Se=Math.floor,_e=Math.pow,$e=Math.log,Ke=Math.sin,Le=Math.sqrt,C=Math.atan2,q=Math.max,I=Math.abs,h=l*2,n=l/3,r=l/180,_=180/l,p=function(){return arguments[0]instanceof t?arguments[0]:function(e,o,s){s.prototype=e.prototype;var a=new s,c=e.apply(a,o);return Object(c)===c?c:a}(t,arguments,function(){})},p.default=p,E=[],typeof pt!="undefined"&&pt!==null&&pt.exports!=null&&(pt.exports=p),typeof define=="function"&&define.amd?define([],function(){return p}):(br=typeof ht!="undefined"&&ht!==null?ht:this,br.chroma=p),p.version="1.4.1",v={},b=[],k=!1,t=function(){function e(){var o,s,a,c,f,u,d,m,w;for(u=this,s=[],m=0,c=arguments.length;m<c;m++)o=arguments[m],o!=null&&s.push(o);if(s.length>1&&(d=s[s.length-1]),v[d]!=null)u._rgb=Z(v[d](te(s.slice(0,-1))));else{for(k||(b=b.sort(function(L,O){return O.p-L.p}),k=!0),w=0,f=b.length;w<f&&(a=b[w],d=a.test.apply(a,s),!d);w++);d&&(u._rgb=Z(v[d].apply(v,s)))}u._rgb==null&&console.warn("unknown format: "+s),u._rgb==null&&(u._rgb=[0,0,0]),u._rgb.length===3&&u._rgb.push(1)}return e.prototype.toString=function(){return this.hex()},e}(),p._input=v;p.brewer=T={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"]},function(){var e,o;o=[];for(e in T)o.push(T[e.toLowerCase()]=T[e]);return o}(),Ie={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",cornflower:"#6495ed",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"},p.colors=V=Ie,ye=function(){var e,o,s,a,c,f,u,d,m;return o=te(arguments),c=o[0],e=o[1],s=o[2],d=(c+16)/116,u=isNaN(e)?d:d+e/500,m=isNaN(s)?d:d-s/200,d=i.Yn*we(d),u=i.Xn*we(u),m=i.Zn*we(m),f=kt(3.2404542*u-1.5371385*d-.4985314*m),a=kt(-.969266*u+1.8760108*d+.041556*m),s=kt(.0556434*u-.2040259*d+1.0572252*m),[f,a,s,o.length>3?o[3]:1]},kt=function(e){return 255*(e<=.00304?12.92*e:1.055*_e(e,1/2.4)-.055)},we=function(e){return e>i.t1?e*e*e:i.t2*(e-i.t0)},i={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},It=function(){var e,o,s,a,c,f,u,d;return a=te(arguments),s=a[0],o=a[1],e=a[2],c=gr(s,o,e),f=c[0],u=c[1],d=c[2],[116*u-16,500*(f-u),200*(u-d)]},yt=function(e){return(e/=255)<=.04045?e/12.92:_e((e+.055)/1.055,2.4)},xt=function(e){return e>i.t3?_e(e,1/3):e/i.t2+i.t0},gr=function(){var e,o,s,a,c,f,u;return a=te(arguments),s=a[0],o=a[1],e=a[2],s=yt(s),o=yt(o),e=yt(e),c=xt((.4124564*s+.3575761*o+.1804375*e)/i.Xn),f=xt((.2126729*s+.7151522*o+.072175*e)/i.Yn),u=xt((.0193339*s+.119192*o+.9503041*e)/i.Zn),[c,f,u]},p.lab=function(){return function(e,o,s){s.prototype=e.prototype;var a=new s,c=e.apply(a,o);return Object(c)===c?c:a}(t,Me.call(arguments).concat(["lab"]),function(){})},v.lab=ye,t.prototype.lab=function(){return It(this._rgb)},P=function(e){var o,s,a,c,f,u,d,m,w,L,O;return e=function(){var M,x,A;for(A=[],x=0,M=e.length;x<M;x++)c=e[x],A.push(p(c));return A}(),e.length===2?(w=function(){var M,x,A;for(A=[],x=0,M=e.length;x<M;x++)c=e[x],A.push(c.lab());return A}(),f=w[0],u=w[1],o=function(M){var x,A;return A=function(){var N,R;for(R=[],x=N=0;N<=2;x=++N)R.push(f[x]+M*(u[x]-f[x]));return R}(),p.lab.apply(p,A)}):e.length===3?(L=function(){var M,x,A;for(A=[],x=0,M=e.length;x<M;x++)c=e[x],A.push(c.lab());return A}(),f=L[0],u=L[1],d=L[2],o=function(M){var x,A;return A=function(){var N,R;for(R=[],x=N=0;N<=2;x=++N)R.push((1-M)*(1-M)*f[x]+2*(1-M)*M*u[x]+M*M*d[x]);return R}(),p.lab.apply(p,A)}):e.length===4?(O=function(){var M,x,A;for(A=[],x=0,M=e.length;x<M;x++)c=e[x],A.push(c.lab());return A}(),f=O[0],u=O[1],d=O[2],m=O[3],o=function(M){var x,A;return A=function(){var N,R;for(R=[],x=N=0;N<=2;x=++N)R.push((1-M)*(1-M)*(1-M)*f[x]+3*(1-M)*(1-M)*M*u[x]+3*(1-M)*M*M*d[x]+M*M*M*m[x]);return R}(),p.lab.apply(p,A)}):e.length===5&&(s=P(e.slice(0,3)),a=P(e.slice(2,5)),o=function(M){return M<.5?s(M*2):a((M-.5)*2)}),o},p.bezier=function(e){var o;return o=P(e),o.scale=function(){return p.scale(o)},o},p.cubehelix=function(e,o,s,a,c){var f,u,d;return e==null&&(e=300),o==null&&(o=-1.5),s==null&&(s=1),a==null&&(a=1),c==null&&(c=[0,1]),f=0,ee(c)==="array"?u=c[1]-c[0]:(u=0,c=[c,c]),d=function(m){var w,L,O,M,x,A,N,R,X;return w=h*((e+120)/360+o*m),N=_e(c[0]+u*m,a),A=f!==0?s[0]+m*f:s,L=A*N*(1-N)/2,M=W(w),X=Ke(w),R=N+L*(-.14861*M+1.78277*X),x=N+L*(-.29227*M-.90649*X),O=N+L*(1.97294*M),p(Z([R*255,x*255,O*255,1]))},d.start=function(m){return m==null?e:(e=m,d)},d.rotations=function(m){return m==null?o:(o=m,d)},d.gamma=function(m){return m==null?a:(a=m,d)},d.hue=function(m){return m==null?s:(s=m,ee(s)==="array"?(f=s[1]-s[0],f===0&&(s=s[1])):f=0,d)},d.lightness=function(m){return m==null?c:(ee(m)==="array"?(c=m,u=m[1]-m[0]):(c=[m,m],u=0),d)},d.scale=function(){return p.scale(d)},d.hue(s),d},p.random=function(){var e,o,s,a;for(o="0123456789abcdef",e="#",s=a=0;a<6;s=++a)e+=o.charAt(Se(Math.random()*16));return new t(e)},E=[],Ne=function(e,o,s,a){var c,f,u,d;for(s==null&&(s=.5),a==null&&(a="rgb"),ee(e)!=="object"&&(e=p(e)),ee(o)!=="object"&&(o=p(o)),u=0,f=E.length;u<f;u++)if(c=E[u],a===c[0]){d=c[1](e,o,s,a);break}if(d==null)throw"color mode "+a+" is not supported";return d.alpha(e.alpha()+s*(o.alpha()-e.alpha()))},p.interpolate=Ne,t.prototype.interpolate=function(e,o,s){return Ne(this,e,o,s)},p.mix=Ne,t.prototype.mix=t.prototype.interpolate,v.rgb=function(){var e,o,s,a;o=te(arguments),s=[];for(e in o)a=o[e],s.push(a);return s},p.rgb=function(){return function(e,o,s){s.prototype=e.prototype;var a=new s,c=e.apply(a,o);return Object(c)===c?c:a}(t,Me.call(arguments).concat(["rgb"]),function(){})},t.prototype.rgb=function(e){return e==null&&(e=!0),e?this._rgb.map(Math.round).slice(0,3):this._rgb.slice(0,3)},t.prototype.rgba=function(e){return e==null&&(e=!0),e?[Math.round(this._rgb[0]),Math.round(this._rgb[1]),Math.round(this._rgb[2]),this._rgb[3]]:this._rgb.slice(0)},b.push({p:3,test:function(e){var o;if(o=te(arguments),ee(o)==="array"&&o.length===3||o.length===4&&ee(o[3])==="number"&&o[3]>=0&&o[3]<=1)return"rgb"}}),v.lrgb=v.rgb,ve=function(e,o,s,a){var c,f;return c=e._rgb,f=o._rgb,new t(Le(_e(c[0],2)*(1-s)+_e(f[0],2)*s),Le(_e(c[1],2)*(1-s)+_e(f[1],2)*s),Le(_e(c[2],2)*(1-s)+_e(f[2],2)*s),a)},g=function(e){var o,s,a,c,f,u;for(s=1/e.length,u=[0,0,0,0],c=0,a=e.length;c<a;c++)o=e[c],f=o._rgb,u[0]+=_e(f[0],2)*s,u[1]+=_e(f[1],2)*s,u[2]+=_e(f[2],2)*s,u[3]+=f[3]*s;return u[0]=Le(u[0]),u[1]=Le(u[1]),u[2]=Le(u[2]),u[3]>1&&(u[3]=1),new t(Z(u))},E.push(["lrgb",ve]),p.average=function(e,o){var s,a,c,f,u,d,m,w,L,O,M,x,A;if(o==null&&(o="rgb"),L=e.length,e=e.map(function(N){return p(N)}),m=e.splice(0,1)[0],o==="lrgb")return g(e);x=m.get(o),f=[],u=0,d=0;for(w in x)x[w]=x[w]||0,f.push(isNaN(x[w])?0:1),o.charAt(w)==="h"&&!isNaN(x[w])&&(s=x[w]/180*l,u+=W(s),d+=Ke(s));for(a=m.alpha(),M=0,O=e.length;M<O;M++){c=e[M],A=c.get(o),a+=c.alpha();for(w in x)isNaN(A[w])||(f[w]+=1,o.charAt(w)==="h"?(s=A[w]/180*l,u+=W(s),d+=Ke(s)):x[w]+=A[w])}for(w in x)if(o.charAt(w)==="h"){for(s=C(d/f[w],u/f[w])/l*180;s<0;)s+=360;for(;s>=360;)s-=360;x[w]=s}else x[w]=x[w]/f[w];return p(x,o).alpha(a/L)},je=function(e){var o,s,a,c,f,u;if(e.match(/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/))return(e.length===4||e.length===7)&&(e=e.substr(1)),e.length===3&&(e=e.split(""),e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),u=parseInt(e,16),c=u>>16,a=u>>8&255,s=u&255,[c,a,s,1];if(e.match(/^#?([A-Fa-f0-9]{8})$/))return e.length===9&&(e=e.substr(1)),u=parseInt(e,16),c=u>>24&255,a=u>>16&255,s=u>>8&255,o=xe((u&255)/255*100)/100,[c,a,s,o];if(v.css!=null&&(f=v.css(e)))return f;throw"unknown color: "+e},fr=function(e,o){var s,a,c,f,u,d,m;return o==null&&(o="auto"),u=e[0],c=e[1],a=e[2],s=e[3],o==="auto"&&(o=s<1?"rgba":"rgb"),u=Math.round(u),c=Math.round(c),a=Math.round(a),m=u<<16|c<<8|a,d="000000"+m.toString(16),d=d.substr(d.length-6),f="0"+xe(s*255).toString(16),f=f.substr(f.length-2),"#"+function(){switch(o.toLowerCase()){case"rgba":return d+f;case"argb":return f+d;default:return d}}()},v.hex=function(e){return je(e)},p.hex=function(){return function(e,o,s){s.prototype=e.prototype;var a=new s,c=e.apply(a,o);return Object(c)===c?c:a}(t,Me.call(arguments).concat(["hex"]),function(){})},t.prototype.hex=function(e){return e==null&&(e="auto"),fr(this._rgb,e)},b.push({p:4,test:function(e){if(arguments.length===1&&ee(e)==="string")return"hex"}}),se=function(){var e,o,s,a,c,f,u,d,m,w,L,O,M,x;if(e=te(arguments),c=e[0],L=e[1],u=e[2],L===0)m=a=o=u*255;else{for(x=[0,0,0],s=[0,0,0],M=u<.5?u*(1+L):u+L-u*L,O=2*u-M,c/=360,x[0]=c+1/3,x[1]=c,x[2]=c-1/3,f=d=0;d<=2;f=++d)x[f]<0&&(x[f]+=1),x[f]>1&&(x[f]-=1),6*x[f]<1?s[f]=O+(M-O)*6*x[f]:2*x[f]<1?s[f]=M:3*x[f]<2?s[f]=O+(M-O)*(2/3-x[f])*6:s[f]=O;w=[xe(s[0]*255),xe(s[1]*255),xe(s[2]*255)],m=w[0],a=w[1],o=w[2]}return e.length>3?[m,a,o,e[3]]:[m,a,o]},ur=function(e,o,s){var a,c,f,u,d;return e!==void 0&&e.length>=3&&(u=e,e=u[0],o=u[1],s=u[2]),e/=255,o/=255,s/=255,f=Math.min(e,o,s),q=Math.max(e,o,s),c=(q+f)/2,q===f?(d=0,a=Number.NaN):d=c<.5?(q-f)/(q+f):(q-f)/(2-q-f),e===q?a=(o-s)/(q-f):o===q?a=2+(s-e)/(q-f):s===q&&(a=4+(e-o)/(q-f)),a*=60,a<0&&(a+=360),[a,d,c]},p.hsl=function(){return function(e,o,s){s.prototype=e.prototype;var a=new s,c=e.apply(a,o);return Object(c)===c?c:a}(t,Me.call(arguments).concat(["hsl"]),function(){})},v.hsl=se,t.prototype.hsl=function(){return ur(this._rgb)},Fe=function(){var e,o,s,a,c,f,u,d,m,w,L,O,M,x,A,N,R,X;if(e=te(arguments),c=e[0],N=e[1],X=e[2],X*=255,N===0)m=a=o=X;else switch(c===360&&(c=0),c>360&&(c-=360),c<0&&(c+=360),c/=60,f=Se(c),s=c-f,u=X*(1-N),d=X*(1-N*s),R=X*(1-N*(1-s)),f){case 0:w=[X,R,u],m=w[0],a=w[1],o=w[2];break;case 1:L=[d,X,u],m=L[0],a=L[1],o=L[2];break;case 2:O=[u,X,R],m=O[0],a=O[1],o=O[2];break;case 3:M=[u,d,X],m=M[0],a=M[1],o=M[2];break;case 4:x=[R,u,X],m=x[0],a=x[1],o=x[2];break;case 5:A=[X,u,d],m=A[0],a=A[1],o=A[2]}return[m,a,o,e.length>3?e[3]:1]},dr=function(){var e,o,s,a,c,f,u,d,m;return u=te(arguments),f=u[0],s=u[1],e=u[2],c=Math.min(f,s,e),q=Math.max(f,s,e),o=q-c,m=q/255,q===0?(a=Number.NaN,d=0):(d=o/q,f===q&&(a=(s-e)/o),s===q&&(a=2+(e-f)/o),e===q&&(a=4+(f-s)/o),a*=60,a<0&&(a+=360)),[a,d,m]},p.hsv=function(){return function(e,o,s){s.prototype=e.prototype;var a=new s,c=e.apply(a,o);return Object(c)===c?c:a}(t,Me.call(arguments).concat(["hsv"]),function(){})},v.hsv=Fe,t.prototype.hsv=function(){return dr(this._rgb)},ir=function(e){var o,s,a;return ee(e)==="number"&&e>=0&&e<=16777215?(a=e>>16,s=e>>8&255,o=e&255,[a,s,o,1]):(console.warn("unknown num color: "+e),[0,0,0,1])},hr=function(){var e,o,s,a;return a=te(arguments),s=a[0],o=a[1],e=a[2],(s<<16)+(o<<8)+e},p.num=function(e){return new t(e,"num")},t.prototype.num=function(e){return e==null&&(e="rgb"),hr(this._rgb,e)},v.num=ir,b.push({p:1,test:function(e){if(arguments.length===1&&ee(e)==="number"&&e>=0&&e<=16777215)return"num"}}),qe=function(){var e,o,s,a,c,f,u,d,m,w,L,O,M,x,A,N,R,X,le,F;if(s=te(arguments),d=s[0],c=s[1],o=s[2],c=c/100,u=u/100*255,e=c*255,c===0)O=u=a=o;else switch(d===360&&(d=0),d>360&&(d-=360),d<0&&(d+=360),d/=60,m=Se(d),f=d-m,w=o*(1-c),L=w+e*(1-f),le=w+e*f,F=w+e,m){case 0:M=[F,le,w],O=M[0],u=M[1],a=M[2];break;case 1:x=[L,F,w],O=x[0],u=x[1],a=x[2];break;case 2:A=[w,F,le],O=A[0],u=A[1],a=A[2];break;case 3:N=[w,L,F],O=N[0],u=N[1],a=N[2];break;case 4:R=[le,w,F],O=R[0],u=R[1],a=R[2];break;case 5:X=[F,w,L],O=X[0],u=X[1],a=X[2]}return[O,u,a,s.length>3?s[3]:1]},cr=function(){var e,o,s,a,c,f,u,d,m;return m=te(arguments),d=m[0],c=m[1],o=m[2],u=Math.min(d,c,o),q=Math.max(d,c,o),a=q-u,s=a*100/255,e=u/(255-a)*100,a===0?f=Number.NaN:(d===q&&(f=(c-o)/a),c===q&&(f=2+(o-d)/a),o===q&&(f=4+(d-c)/a),f*=60,f<0&&(f+=360)),[f,s,e]},p.hcg=function(){return function(e,o,s){s.prototype=e.prototype;var a=new s,c=e.apply(a,o);return Object(c)===c?c:a}(t,Me.call(arguments).concat(["hcg"]),function(){})},v.hcg=qe,t.prototype.hcg=function(){return cr(this._rgb)},oe=function(e){var o,s,a,c,f,u,d,m;if(e=e.toLowerCase(),p.colors!=null&&p.colors[e])return je(p.colors[e]);if(f=e.match(/rgb\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*\)/)){for(d=f.slice(1,4),c=u=0;u<=2;c=++u)d[c]=+d[c];d[3]=1}else if(f=e.match(/rgba\(\s*(\-?\d+),\s*(\-?\d+)\s*,\s*(\-?\d+)\s*,\s*([01]|[01]?\.\d+)\)/))for(d=f.slice(1,5),c=m=0;m<=3;c=++m)d[c]=+d[c];else if(f=e.match(/rgb\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/)){for(d=f.slice(1,4),c=o=0;o<=2;c=++o)d[c]=xe(d[c]*2.55);d[3]=1}else if(f=e.match(/rgba\(\s*(\-?\d+(?:\.\d+)?)%,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/)){for(d=f.slice(1,5),c=s=0;s<=2;c=++s)d[c]=xe(d[c]*2.55);d[3]=+d[3]}else(f=e.match(/hsl\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*\)/))?(a=f.slice(1,4),a[1]*=.01,a[2]*=.01,d=se(a),d[3]=1):(f=e.match(/hsla\(\s*(\-?\d+(?:\.\d+)?),\s*(\-?\d+(?:\.\d+)?)%\s*,\s*(\-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)/))&&(a=f.slice(1,4),a[1]*=.01,a[2]*=.01,d=se(a),d[3]=+f[4]);return d},ar=function(e){var o;if(o=e[3]<1?"rgba":"rgb",o==="rgb")return o+"("+e.slice(0,3).map(xe).join(",")+")";if(o==="rgba")return o+"("+e.slice(0,3).map(xe).join(",")+","+e[3]+")"},wt=function(e){return xe(e*100)/100},Ve=function(e,o){var s;return s=o<1?"hsla":"hsl",e[0]=wt(e[0]||0),e[1]=wt(e[1]*100)+"%",e[2]=wt(e[2]*100)+"%",s==="hsla"&&(e[3]=o),s+"("+e.join(",")+")"},v.css=function(e){return oe(e)},p.css=function(){return function(e,o,s){s.prototype=e.prototype;var a=new s,c=e.apply(a,o);return Object(c)===c?c:a}(t,Me.call(arguments).concat(["css"]),function(){})},t.prototype.css=function(e){if(e==null&&(e="rgb"),e.slice(0,3)==="rgb")return ar(this._rgb);if(e.slice(0,3)==="hsl")return Ve(this.hsl(),this.alpha())},v.named=function(e){return je(Ie[e])},b.push({p:5,test:function(e){if(arguments.length===1&&Ie[e]!=null)return"named"}}),t.prototype.name=function(e){var o,s;arguments.length&&(Ie[e]&&(this._rgb=je(Ie[e])),this._rgb[3]=1),o=this.hex("rgb");for(s in Ie)if(o===Ie[s])return s;return o},Ee=function(){var e,o,s,a;return a=te(arguments),s=a[0],e=a[1],o=a[2],o=o*r,[s,W(o)*e,Ke(o)*e]},Ue=function(){var e,o,s,a,c,f,u,d,m,w,L;return s=te(arguments),d=s[0],c=s[1],u=s[2],w=Ee(d,c,u),e=w[0],o=w[1],a=w[2],L=ye(e,o,a),m=L[0],f=L[1],a=L[2],[m,f,a,s.length>3?s[3]:1]},We=function(){var e,o,s,a,c,f;return f=te(arguments),c=f[0],e=f[1],o=f[2],s=Le(e*e+o*o),a=(C(o,e)*_+360)%360,xe(s*1e4)===0&&(a=Number.NaN),[c,s,a]},Tt=function(){var e,o,s,a,c,f,u;return f=te(arguments),c=f[0],s=f[1],o=f[2],u=It(c,s,o),a=u[0],e=u[1],o=u[2],We(a,e,o)},p.lch=function(){var e;return e=te(arguments),new t(e,"lch")},p.hcl=function(){var e;return e=te(arguments),new t(e,"hcl")},v.lch=Ue,v.hcl=function(){var e,o,s,a;return a=te(arguments),o=a[0],e=a[1],s=a[2],Ue([s,e,o])},t.prototype.lch=function(){return Tt(this._rgb)},t.prototype.hcl=function(){return Tt(this._rgb).reverse()},nr=function(e){var o,s,a,c,f,u,d,m,w;return e==null&&(e="rgb"),m=te(arguments),d=m[0],c=m[1],o=m[2],d=d/255,c=c/255,o=o/255,f=1-Math.max(d,Math.max(c,o)),a=f<1?1/(1-f):0,s=(1-d-f)*a,u=(1-c-f)*a,w=(1-o-f)*a,[s,u,w,f]},me=function(){var e,o,s,a,c,f,u,d,m;return o=te(arguments),a=o[0],u=o[1],m=o[2],f=o[3],e=o.length>4?o[4]:1,f===1?[0,0,0,e]:(d=a>=1?0:255*(1-a)*(1-f),c=u>=1?0:255*(1-u)*(1-f),s=m>=1?0:255*(1-m)*(1-f),[d,c,s,e])},v.cmyk=function(){return me(te(arguments))},p.cmyk=function(){return function(e,o,s){s.prototype=e.prototype;var a=new s,c=e.apply(a,o);return Object(c)===c?c:a}(t,Me.call(arguments).concat(["cmyk"]),function(){})},t.prototype.cmyk=function(){return nr(this._rgb)},v.gl=function(){var e,o,s,a,c;for(a=function(){var f,u;f=te(arguments),u=[];for(o in f)c=f[o],u.push(c);return u}.apply(this,arguments),e=s=0;s<=2;e=++s)a[e]*=255;return a},p.gl=function(){return function(e,o,s){s.prototype=e.prototype;var a=new s,c=e.apply(a,o);return Object(c)===c?c:a}(t,Me.call(arguments).concat(["gl"]),function(){})},t.prototype.gl=function(){var e;return e=this._rgb,[e[0]/255,e[1]/255,e[2]/255,e[3]]},Dt=function(e,o,s){var a;return a=te(arguments),e=a[0],o=a[1],s=a[2],e=vt(e),o=vt(o),s=vt(s),.2126*e+.7152*o+.0722*s},vt=function(e){return e/=255,e<=.03928?e/12.92:_e((e+.055)/1.055,2.4)},he=function(e,o,s,a){var c,f;return c=e._rgb,f=o._rgb,new t(c[0]+s*(f[0]-c[0]),c[1]+s*(f[1]-c[1]),c[2]+s*(f[2]-c[2]),a)},E.push(["rgb",he]),t.prototype.luminance=function(e,o){var s,a,c,f,u;return o==null&&(o="rgb"),arguments.length?(f=this._rgb,e===0?f=[0,0,0,this._rgb[3]]:e===1?f=[255,255,255,this[3]]:(s=Dt(this._rgb),a=1e-7,c=20,u=function(d,m){var w,L;return L=d.interpolate(m,.5,o),w=L.luminance(),Math.abs(e-w)<a||!c--?L:w>e?u(d,L):u(L,m)},s>e?f=u(p("black"),this).rgba():f=u(this,p("white")).rgba()),p(f).alpha(this.alpha())):Dt(this._rgb)},Ht=function(e){var o,s,a,c;return c=e/100,c<66?(a=255,s=-155.25485562709179-.44596950469579133*(s=c-2)+104.49216199393888*$e(s),o=c<20?0:-254.76935184120902+.8274096064007395*(o=c-10)+115.67994401066147*$e(o)):(a=351.97690566805693+.114206453784165*(a=c-55)-40.25366309332127*$e(a),s=325.4494125711974+.07943456536662342*(s=c-50)-28.0852963507957*$e(s),o=255),[a,s,o]},pr=function(){var e,o,s,a,c,f,u,d,m;for(u=te(arguments),f=u[0],s=u[1],e=u[2],c=1e3,a=4e4,o=.4;a-c>o;)m=(a+c)*.5,d=Ht(m),d[2]/d[0]>=e/f?a=m:c=m;return xe(m)},p.temperature=p.kelvin=function(){return function(e,o,s){s.prototype=e.prototype;var a=new s,c=e.apply(a,o);return Object(c)===c?c:a}(t,Me.call(arguments).concat(["temperature"]),function(){})},v.temperature=v.kelvin=v.K=Ht,t.prototype.temperature=function(){return pr(this._rgb)},t.prototype.kelvin=t.prototype.temperature,p.contrast=function(e,o){var s,a,c,f;return((c=ee(e))==="string"||c==="number")&&(e=new t(e)),((f=ee(o))==="string"||f==="number")&&(o=new t(o)),s=e.luminance(),a=o.luminance(),s>a?(s+.05)/(a+.05):(a+.05)/(s+.05)},p.distance=function(e,o,s){var a,c,f,u,d,m,w;s==null&&(s="lab"),((d=ee(e))==="string"||d==="number")&&(e=new t(e)),((m=ee(o))==="string"||m==="number")&&(o=new t(o)),f=e.get(s),u=o.get(s),w=0;for(c in f)a=(f[c]||0)-(u[c]||0),w+=a*a;return Math.sqrt(w)},p.deltaE=function(e,o,s,a){var c,f,u,d,m,w,L,O,M,x,A,N,R,X,le,F,ze,ke,$,U,ge,y,S,H,G,D,B;for(s==null&&(s=1),a==null&&(a=1),((ze=ee(e))==="string"||ze==="number")&&(e=new t(e)),((ke=ee(o))==="string"||ke==="number")&&(o=new t(o)),$=e.lab(),c=$[0],u=$[1],m=$[2],U=o.lab(),f=U[0],d=U[1],w=U[2],L=Le(u*u+m*m),O=Le(d*d+w*w),S=c<16?.511:.040975*c/(1+.01765*c),ge=.0638*L/(1+.0131*L)+.638,F=L<1e-6?0:C(m,u)*180/l;F<0;)F+=360;for(;F>=360;)F-=360;return H=F>=164&&F<=345?.56+I(.2*W(l*(F+168)/180)):.36+I(.4*W(l*(F+35)/180)),M=L*L*L*L,le=Le(M/(M+1900)),y=ge*(le*H+1-le),X=c-f,R=L-O,A=u-d,N=m-w,x=A*A+N*N-R*R,G=X/(s*S),D=R/(a*ge),B=y,Le(G*G+D*D+x/(B*B))},t.prototype.get=function(e){var o,s,a,c,f,u;return a=this,f=e.split("."),c=f[0],o=f[1],u=a[c](),o?(s=c.indexOf(o),s>-1?u[s]:console.warn("unknown channel "+o+" in mode "+c)):u},t.prototype.set=function(e,o){var s,a,c,f,u,d;if(c=this,u=e.split("."),f=u[0],s=u[1],s)if(d=c[f](),a=f.indexOf(s),a>-1)if(ee(o)==="string")switch(o.charAt(0)){case"+":d[a]+=+o;break;case"-":d[a]+=+o;break;case"*":d[a]*=+o.substr(1);break;case"/":d[a]/=+o.substr(1);break;default:d[a]=+o}else d[a]=o;else console.warn("unknown channel "+s+" in mode "+f);else d=o;return p(d,f).alpha(c.alpha())},t.prototype.clipped=function(){return this._rgb._clipped||!1},t.prototype.alpha=function(e){return arguments.length?p.rgb([this._rgb[0],this._rgb[1],this._rgb[2],e]):this._rgb[3]},t.prototype.darken=function(e){var o,s;return e==null&&(e=1),s=this,o=s.lab(),o[0]-=i.Kn*e,p.lab(o).alpha(s.alpha())},t.prototype.brighten=function(e){return e==null&&(e=1),this.darken(-e)},t.prototype.darker=t.prototype.darken,t.prototype.brighter=t.prototype.brighten,t.prototype.saturate=function(e){var o,s;return e==null&&(e=1),s=this,o=s.lch(),o[1]+=e*i.Kn,o[1]<0&&(o[1]=0),p.lch(o).alpha(s.alpha())},t.prototype.desaturate=function(e){return e==null&&(e=1),this.saturate(-e)},t.prototype.premultiply=function(){var e,o;return o=this.rgb(),e=this.alpha(),p(o[0]*e,o[1]*e,o[2]*e,e)},z=function(e,o,s){if(!z[s])throw"unknown blend mode "+s;return z[s](e,o)},j=function(e){return function(o,s){var a,c;return a=p(s).rgb(),c=p(o).rgb(),p(e(a,c),"rgb")}},ie=function(e){return function(o,s){var a,c,f;for(f=[],a=c=0;c<=3;a=++c)f[a]=e(o[a],s[a]);return f}},sr=function(e,o){return e},or=function(e,o){return e*o/255},re=function(e,o){return e>o?o:e},Ce=function(e,o){return e>o?e:o},mr=function(e,o){return 255*(1-(1-e/255)*(1-o/255))},lr=function(e,o){return o<128?2*e*o/255:255*(1-2*(1-e/255)*(1-o/255))},K=function(e,o){return 255*(1-(1-o/255)/(e/255))},fe=function(e,o){return e===255||(e=255*(o/255)/(1-e/255),e>255)?255:e},z.normal=j(ie(sr)),z.multiply=j(ie(or)),z.screen=j(ie(mr)),z.overlay=j(ie(lr)),z.darken=j(ie(re)),z.lighten=j(ie(Ce)),z.dodge=j(ie(fe)),z.burn=j(ie(K)),p.blend=z,p.analyze=function(e){var o,s,a,c;for(a={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0},s=0,o=e.length;s<o;s++)c=e[s],c!=null&&!isNaN(c)&&(a.values.push(c),a.sum+=c,c<a.min&&(a.min=c),c>a.max&&(a.max=c),a.count+=1);return a.domain=[a.min,a.max],a.limits=function(f,u){return p.limits(a,f,u)},a},p.scale=function(e,o){var s,a,c,f,u,d,m,w,L,O,M,x,A,N,R,X,le,F,ze,ke,$,U,ge;return O="rgb",M=p("#ccc"),R=0,d=!1,u=[0,1],N=[],A=[0,0],s=!1,c=[],x=!1,L=0,w=1,f=!1,a={},X=!0,m=1,U=function(y){var S,H,G,D,B,Q;if(y==null&&(y=["#fff","#000"]),y!=null&&ee(y)==="string"&&p.brewer!=null&&(y=p.brewer[y]||p.brewer[y.toLowerCase()]||y),ee(y)==="array"){for(y.length===1&&(y=[y[0],y[0]]),y=y.slice(0),S=G=0,D=y.length-1;0<=D?G<=D:G>=D;S=0<=D?++G:--G)H=y[S],ee(H)==="string"&&(y[S]=p(H));for(N.length=0,S=Q=0,B=y.length-1;0<=B?Q<=B:Q>=B;S=0<=B?++Q:--Q)N.push(S/(y.length-1))}return $(),c=y},ze=function(y){var S,H;if(s!=null){for(H=s.length-1,S=0;S<H&&y>=s[S];)S++;return S-1}return 0},ge=function(y){return y},le=function(y){var S,H,G,D,B;return B=y,s.length>2&&(D=s.length-1,S=ze(y),G=s[0]+(s[1]-s[0])*(0+R*.5),H=s[D-1]+(s[D]-s[D-1])*(1-R*.5),B=L+(s[S]+(s[S+1]-s[S])*.5-G)/(H-G)*(w-L)),B},ke=function(y,S){var H,G,D,B,Q,J,ae,Y;if(S==null&&(S=!1),isNaN(y)||y===null)return M;if(S?Y=y:s&&s.length>2?(H=ze(y),Y=H/(s.length-2)):w!==L?Y=(y-L)/(w-L):Y=1,S||(Y=ge(Y)),m!==1&&(Y=_e(Y,m)),Y=A[0]+Y*(1-A[0]-A[1]),Y=Math.min(1,Math.max(0,Y)),B=Math.floor(Y*1e4),X&&a[B])G=a[B];else{if(ee(c)==="array")for(D=Q=0,ae=N.length-1;0<=ae?Q<=ae:Q>=ae;D=0<=ae?++Q:--Q){if(J=N[D],Y<=J){G=c[D];break}if(Y>=J&&D===N.length-1){G=c[D];break}if(Y>J&&Y<N[D+1]){Y=(Y-J)/(N[D+1]-J),G=p.interpolate(c[D],c[D+1],Y,O);break}}else ee(c)==="function"&&(G=c(Y));X&&(a[B]=G)}return G},$=function(){return a={}},U(e),F=function(y){var S;return S=p(ke(y)),x&&S[x]?S[x]():S},F.classes=function(y){var S;return y!=null?(ee(y)==="array"?(s=y,u=[y[0],y[y.length-1]]):(S=p.analyze(u),y===0?s=[S.min,S.max]:s=p.limits(S,"e",y)),F):s},F.domain=function(y){var S,H,G,D,B,Q,J;if(!arguments.length)return u;if(L=y[0],w=y[y.length-1],N=[],G=c.length,y.length===G&&L!==w)for(B=0,D=y.length;B<D;B++)H=y[B],N.push((H-L)/(w-L));else for(S=J=0,Q=G-1;0<=Q?J<=Q:J>=Q;S=0<=Q?++J:--J)N.push(S/(G-1));return u=[L,w],F},F.mode=function(y){return arguments.length?(O=y,$(),F):O},F.range=function(y,S){return U(y,S),F},F.out=function(y){return x=y,F},F.spread=function(y){return arguments.length?(R=y,F):R},F.correctLightness=function(y){return y==null&&(y=!0),f=y,$(),f?ge=function(S){var H,G,D,B,Q,J,ae,Y,de;for(H=ke(0,!0).lab()[0],G=ke(1,!0).lab()[0],ae=H>G,D=ke(S,!0).lab()[0],Q=H+(G-H)*S,B=D-Q,Y=0,de=1,J=20;Math.abs(B)>.01&&J-- >0;)(function(){return ae&&(B*=-1),B<0?(Y=S,S+=(de-S)*.5):(de=S,S+=(Y-S)*.5),D=ke(S,!0).lab()[0],B=D-Q})();return S}:ge=function(S){return S},F},F.padding=function(y){return y!=null?(ee(y)==="number"&&(y=[y,y]),A=y,F):A},F.colors=function(y,S){var H,G,D,B,Q,J,ae,Y,de;if(arguments.length<2&&(S="hex"),J=[],arguments.length===0)J=c.slice(0);else if(y===1)J=[F(.5)];else if(y>1)G=u[0],H=u[1]-G,J=function(){ae=[];for(var be=0;0<=y?be<y:be>y;0<=y?be++:be--)ae.push(be);return ae}.apply(this).map(function(be){return F(G+be/(y-1)*H)});else{if(e=[],Y=[],s&&s.length>2)for(D=de=1,Q=s.length;1<=Q?de<Q:de>Q;D=1<=Q?++de:--de)Y.push((s[D-1]+s[D])*.5);else Y=u;J=Y.map(function(be){return F(be)})}return p[S]&&(J=J.map(function(be){return be[S]()})),J},F.cache=function(y){return y!=null?(X=y,F):X},F.gamma=function(y){return y!=null?(m=y,F):m},F.nodata=function(y){return y!=null?(M=p(y),F):M},F},p.scales==null&&(p.scales={}),p.scales.cool=function(){return p.scale([p.hsl(180,1,.9),p.hsl(250,.7,.4)])},p.scales.hot=function(){return p.scale(["#000","#f00","#ff0","#fff"],[0,.25,.75,1]).mode("rgb")},p.analyze=function(e,o,s){var a,c,f,u,d,m,w;if(d={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0},s==null&&(s=function(){return!0}),a=function(L){L!=null&&!isNaN(L)&&(d.values.push(L),d.sum+=L,L<d.min&&(d.min=L),L>d.max&&(d.max=L),d.count+=1)},w=function(L,O){if(s(L,O))return o!=null&&ee(o)==="function"?a(o(L)):o!=null&&ee(o)==="string"||ee(o)==="number"?a(L[o]):a(L)},ee(e)==="array")for(u=0,f=e.length;u<f;u++)m=e[u],w(m);else for(c in e)m=e[c],w(m,c);return d.domain=[d.min,d.max],d.limits=function(L,O){return p.limits(d,L,O)},d},p.limits=function(e,o,s){var a,c,f,u,d,m,w,L,O,M,x,A,N,R,X,le,F,ze,ke,$,U,ge,y,S,H,G,D,B,Q,J,ae,Y,de,be,Ze,Je,Qe,et,tt,rt,vr,ot,st,it,lt,nt,at,ct,ft,_t,mo,Te,Lt,yr,Ae,ut;if(o==null&&(o="equal"),s==null&&(s=7),ee(e)==="array"&&(e=p.analyze(e)),H=e.min,q=e.max,mo=e.sum,Ae=e.values.sort(function(Wt,$t){return Wt-$t}),s===1)return[H,q];if(y=[],o.substr(0,1)==="c"&&(y.push(H),y.push(q)),o.substr(0,1)==="e"){for(y.push(H),$=ae=1,Ze=s-1;1<=Ze?ae<=Ze:ae>=Ze;$=1<=Ze?++ae:--ae)y.push(H+$/s*(q-H));y.push(q)}else if(o.substr(0,1)==="l"){if(H<=0)throw"Logarithmic scales are only possible for values > 0";for(G=Math.LOG10E*$e(H),S=Math.LOG10E*$e(q),y.push(H),$=ut=1,Je=s-1;1<=Je?ut<=Je:ut>=Je;$=1<=Je?++ut:--ut)y.push(_e(10,G+$/s*(S-G)));y.push(q)}else if(o.substr(0,1)==="q"){for(y.push(H),$=a=1,ot=s-1;1<=ot?a<=ot:a>=ot;$=1<=ot?++a:--a)Y=(Ae.length-1)*$/s,de=Se(Y),de===Y?y.push(Ae[de]):(be=Y-de,y.push(Ae[de]*(1-be)+Ae[de+1]*be));y.push(q)}else if(o.substr(0,1)==="k"){for(B=Ae.length,R=new Array(B),ze=new Array(s),_t=!0,Q=0,le=null,le=[],le.push(H),$=c=1,st=s-1;1<=st?c<=st:c>=st;$=1<=st?++c:--c)le.push(H+$/s*(q-H));for(le.push(q);_t;){for(U=f=0,it=s-1;0<=it?f<=it:f>=it;U=0<=it?++f:--f)ze[U]=0;for($=u=0,lt=B-1;0<=lt?u<=lt:u>=lt;$=0<=lt?++u:--u){for(yr=Ae[$],D=Number.MAX_VALUE,U=d=0,nt=s-1;0<=nt?d<=nt:d>=nt;U=0<=nt?++d:--d)ke=I(le[U]-yr),ke<D&&(D=ke,X=U);ze[X]++,R[$]=X}for(J=new Array(s),U=m=0,at=s-1;0<=at?m<=at:m>=at;U=0<=at?++m:--m)J[U]=null;for($=w=0,ct=B-1;0<=ct?w<=ct:w>=ct;$=0<=ct?++w:--w)F=R[$],J[F]===null?J[F]=Ae[$]:J[F]+=Ae[$];for(U=L=0,ft=s-1;0<=ft?L<=ft:L>=ft;U=0<=ft?++L:--L)J[U]*=1/ze[U];for(_t=!1,U=O=0,Qe=s-1;0<=Qe?O<=Qe:O>=Qe;U=0<=Qe?++O:--O)if(J[U]!==le[$]){_t=!0;break}le=J,Q++,Q>200&&(_t=!1)}for(ge={},U=M=0,et=s-1;0<=et?M<=et:M>=et;U=0<=et?++M:--M)ge[U]=[];for($=x=0,tt=B-1;0<=tt?x<=tt:x>=tt;$=0<=tt?++x:--x)F=R[$],ge[F].push(Ae[$]);for(Te=[],U=A=0,rt=s-1;0<=rt?A<=rt:A>=rt;U=0<=rt?++A:--A)Te.push(ge[U][0]),Te.push(ge[U][ge[U].length-1]);for(Te=Te.sort(function(Wt,$t){return Wt-$t}),y.push(Te[0]),$=N=1,vr=Te.length-1;N<=vr;$=N+=2)Lt=Te[$],!isNaN(Lt)&&y.indexOf(Lt)===-1&&y.push(Lt)}return y},Be=function(e,o,s){var a,c,f,u;return a=te(arguments),e=a[0],o=a[1],s=a[2],isNaN(e)&&(e=0),e/=360,e<1/3?(c=(1-o)/3,u=(1+o*W(h*e)/W(n-h*e))/3,f=1-(c+u)):e<2/3?(e-=1/3,u=(1-o)/3,f=(1+o*W(h*e)/W(n-h*e))/3,c=1-(u+f)):(e-=2/3,f=(1-o)/3,c=(1+o*W(h*e)/W(n-h*e))/3,u=1-(f+c)),u=pe(s*u*3),f=pe(s*f*3),c=pe(s*c*3),[u*255,f*255,c*255,a.length>3?a[3]:1]},_r=function(){var e,o,s,a,c,f,u,d;return u=te(arguments),f=u[0],o=u[1],e=u[2],h=Math.PI*2,f/=255,o/=255,e/=255,c=Math.min(f,o,e),a=(f+o+e)/3,d=1-c/a,d===0?s=0:(s=(f-o+(f-e))/2,s/=Math.sqrt((f-o)*(f-o)+(f-e)*(o-e)),s=Math.acos(s),e>o&&(s=h-s),s/=h),[s*360,d,a]},p.hsi=function(){return function(e,o,s){s.prototype=e.prototype;var a=new s,c=e.apply(a,o);return Object(c)===c?c:a}(t,Me.call(arguments).concat(["hsi"]),function(){})},v.hsi=Be,t.prototype.hsi=function(){return _r(this._rgb)},Re=function(e,o,s,a){var c,f,u,d,m,w,L,O,M,x,A,N,R;return a==="hsl"?(N=e.hsl(),R=o.hsl()):a==="hsv"?(N=e.hsv(),R=o.hsv()):a==="hcg"?(N=e.hcg(),R=o.hcg()):a==="hsi"?(N=e.hsi(),R=o.hsi()):(a==="lch"||a==="hcl")&&(a="hcl",N=e.hcl(),R=o.hcl()),a.substr(0,1)==="h"&&(u=N[0],x=N[1],w=N[2],d=R[0],A=R[1],L=R[2]),!isNaN(u)&&!isNaN(d)?(d>u&&d-u>180?c=d-(u+360):d<u&&u-d>180?c=d+360-u:c=d-u,f=u+s*c):isNaN(u)?isNaN(d)?f=Number.NaN:(f=d,(w===1||w===0)&&a!=="hsv"&&(M=A)):(f=u,(L===1||L===0)&&a!=="hsv"&&(M=x)),M==null&&(M=x+s*(A-x)),m=w+s*(L-w),O=p[a](f,M,m)},E=E.concat(function(){var e,o,s,a;for(s=["hsv","hsl","hsi","hcl","lch","hcg"],a=[],o=0,e=s.length;o<e;o++)rr=s[o],a.push([rr,Re]);return a}()),Oe=function(e,o,s,a){var c,f;return c=e.num(),f=o.num(),p.num(c+(f-c)*s,"num")},E.push(["num",Oe]),ue=function(e,o,s,a){var c,f,u;return f=e.lab(),u=o.lab(),c=new t(f[0]+s*(u[0]-f[0]),f[1]+s*(u[1]-f[1]),f[2]+s*(u[2]-f[2]),a)},E.push(["lab",ue])}).call(ht)});var ro=qt((Is,to)=>{to.exports.default={types:{float:{filter_operator:"==",aggregate:"sum",format:{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}},string:{filter_operator:"==",aggregate:"count"},integer:{filter_operator:"==",aggregate:"sum",format:{}},boolean:{filter_operator:"==",aggregate:"count"},datetime:{filter_operator:"==",aggregate:"count",format:{dateStyle:"short",timeStyle:"medium"},null_value:-1},date:{filter_operator:"==",aggregate:"count",format:{dateStyle:"short"},null_value:-1}}}});var so=qt((Ts,Pe)=>{var oo=ro().default;Pe.exports.get_types=function(){return Object.keys(Pe.exports.get_config().types)};Pe.exports.get_type_config=function(t){let r={};if(Pe.exports.get_config().types[t]&&Object.assign(r,Pe.exports.get_config().types[t]),r.type){let i=Pe.exports.get_type_config(r.type);return Object.assign(i,r),i}else return r};function Zt(t){return t&&typeof t=="object"&&!Array.isArray(t)}function St(t,...r){if(!r.length)return t;let i=r.shift();if(Zt(t)&&Zt(i))for(let l in i)Zt(i[l])?(t[l]||Object.assign(t,{[l]:{}}),St(t[l],i[l])):Object.assign(t,{[l]:i[l]});return St(t,...r)}globalThis.__PERSPECTIVE_CONFIG__=void 0;Pe.exports.override_config=function(t){globalThis.__PERSPECTIVE_CONFIG__&&console.warn("Config already initialized!"),globalThis.__PERSPECTIVE_CONFIG__=St(oo,t)};Pe.exports.get_config=function(){return globalThis.__PERSPECTIVE_CONFIG__||(globalThis.__PERSPECTIVE_CONFIG__=St(oo,globalThis.__TEMPLATE_CONFIG__||{})),globalThis.__PERSPECTIVE_CONFIG__}});var Ge=new WeakMap,zo=navigator.userAgent.toLowerCase().indexOf("firefox")>-1?5e6:1e7;function wr(t,r,i,l,n){var _={};return Object.keys(l).forEach(function(h){_[h]=l[h]}),_.enumerable=!!_.enumerable,_.configurable=!!_.configurable,("value"in _||_.initializer)&&(_.writable=!0),_=i.slice().reverse().reduce(function(h,g){return g(t,r,h)||h},_),n&&_.initializer!==void 0&&(_.value=_.initializer?_.initializer.call(n):void 0,_.initializer=void 0),_.initializer===void 0&&(Object.defineProperty(t,r,_),_=null),_}var Mt=0,Ye=0,xr=performance.now(),kr=(t,...r)=>t.map((i,l)=>[i,r[l]]).flat().filter(i=>!!i).join("");function Lr(t,r,i){let l=i.value,n=Symbol("regular-table throttle lock");return i.value=async function(..._){if(this[n]!==void 0&&(await this[n],this[n]!==void 0))return void await this[n];let h;this[n]=(()=>{let g,b=new Promise(k=>{g=k});return b.resolve=g,b})();try{h=await l.call(this,..._)}finally{let g=this[n];this[n]=void 0,g.resolve()}return h},i.value.flush=async function(){return await new Promise(requestAnimationFrame),await this[n]},i}var zt,Eo=(wr((zt=class extends HTMLElement{create_shadow_dom(){this.attachShadow({mode:"open"}),this.shadowRoot.innerHTML=kr` <style> ${":host{bottom:0;overflow:scroll;overflow-anchor:none;overscroll-behavior:none;-webkit-overflow-scrolling:touch}:host,div.rt-virtual-panel{position:absolute;top:0;left:0;right:0}div.rt-virtual-panel{pointer-events:none}div.rt-scroll-table-clip{position:sticky;contain:strict;overflow-anchor:none;width:100%;height:100%}div.rt-tree-container{display:flex;align-items:center;height:100%}slot{position:absolute;overflow:hidden;overflow-anchor:none}"} </style> <style> ${":host ::slotted(table){--regular-table--transform-x:0px;--regular-table--transform-y:0px;--regular-table--clip-x:0px;--regular-table--clip-y:0px}"} </style> <div class="rt-virtual-panel"></div> <div class="rt-scroll-table-clip"> ${"<slot></slot>"} </div> `;let[,t,r,i]=this.shadowRoot.children;this._sub_cell_style=t,this._table_clip=i,this._virtual_panel=r,this._setup_virtual_scroll()}_setup_virtual_scroll(){this._table_clip&&(this._virtual_mode==="both"||this._virtual_mode==="vertical"?this._table_clip.style.top="0px":this._table_clip.style.removeProperty("top"),this._virtual_mode==="both"||this._virtual_mode==="horizontal"?this._table_clip.style.left="0px":this._table_clip.style.removeProperty("left"),this._virtual_mode!=="both"?this._table_clip.style.contain="none":this._table_clip.style.removeProperty("contain"))}_calculate_viewport(t,r){let{start_row:i,end_row:l}=this._calculate_row_range(t),{start_col:n,end_col:_}=this._calculate_column_range(r);return this._nrows=t,{start_col:n,end_col:_,start_row:i,end_row:l}}_calculate_row_range(t){let{height:r}=this._container_size,i=this._column_sizes.row_height||19,l=this._view_cache.config.column_pivots.length,n=Math.max(1,this._virtual_panel.offsetHeight-this.clientHeight),_=Math.max(Math.ceil(this.scrollTop),0)/n,h=r/i-l,g=t||0,b=Math.max(0,Math.ceil(g-h))*_;return{start_row:b,end_row:Math.max(0,Math.min(b+h,t))}}_calc_start_column(){let t=this._view_cache.config.row_pivots.length,r=0,i=0,l=0;for(;i<this.scrollLeft;){let n=this._column_sizes.indices[r+t];l=this.scrollLeft-i,r+=1,i+=n!==void 0?n:60}return r+=l/(this._column_sizes.indices[r+t-1]||60),Math.max(0,r-1)}_calculate_column_range(t){if(this._virtual_mode==="none"||this._virtual_mode==="vertical")return{start_col:0,end_col:1/0};{let r=this._calc_start_column();return{start_col:r,end_col:r+(this.table_model.num_columns()||Math.min(t,Math.ceil(this._container_size.width/60)))+1}}}_max_scroll_column(t){let r=0;if(this._view_cache.config.row_pivots.length>0)for(let n of this._column_sizes.indices.slice(0,this._view_cache.config.row_pivots.length))r+=n;let i=this._view_cache.config.row_pivots.length,l=t;for(;r<this._container_size.width&&l>=0;)l--,r+=this._column_sizes.indices[l+i]||60;return Math.min(t-1,l+1)}_validate_viewport({start_col:t,end_col:r,start_row:i,end_row:l}){i=Math.floor(i),l=Math.ceil(l),t=Math.floor(t),r=Math.ceil(r);let n=this._start_col!==t,_=this._start_row!==i||this._end_row!==l||this._end_col!==r;return this._start_col=t,this._end_col=r,this._start_row=i,this._end_row=l,{invalid_column:n,invalid_row:_}}_calc_scrollable_column_width(t){let r=this._view_cache.config.row_pivots.length,i=this._max_scroll_column(t),l=r,n=0;for(;l<i+r;)n+=this._column_sizes.indices[l]||60,l++;return n}_update_virtual_panel_width(t,r){if(t)if(this._virtual_mode==="vertical"||this._virtual_mode==="none")this._virtual_panel.style.width=this._column_sizes.indices.reduce((i,l)=>i+l,0)+"px";else{let i=this._calc_scrollable_column_width(r);if(i!==0){let l=this._container_size.width+i+2;this._virtual_panel.style.width=l+"px"}else this._virtual_panel.style.width="1px"}}_update_virtual_panel_height(t){let{row_height:r=19}=this._column_sizes,i=this._view_cache.config.column_pivots.length*r,l;if(this._virtual_mode==="horizontal"||this._virtual_mode==="none")l=t*r+i;else{let n=this.clientHeight/(this._table_clip.offsetHeight-i);l=Math.min(zo,t*r*n)}this._virtual_panel.style.height=l+"px"}async draw(t={}){let r=performance.now(),{invalid_viewport:i=!0,preserve_width:l=!1}=t,{num_columns:n,num_rows:_}=await this._view_cache.view(0,0,0,0);this._container_size={width:this._virtual_mode==="none"||this._virtual_mode==="vertical"?1/0:this._table_clip.clientWidth,height:this._virtual_mode==="none"||this._virtual_mode==="horizontal"?1/0:this._table_clip.clientHeight},this._update_virtual_panel_height(_),l||this._update_virtual_panel_width(i,n);let h=this._calculate_viewport(_,n),{invalid_row:g,invalid_column:b}=this._validate_viewport(h);if(this._invalid_schema||g||b||i){let v=[],E=!0;for await(let I of this.table_model.draw(this._container_size,this._view_cache,this._selected_id,l,h,n)){I!==void 0&&(v=v.concat(I)),E&&(this.update_sub_cell_offset(h),E=!1),this._is_styling=!0;let C=this._style_callbacks;for(let P of C)await P({detail:this});if(this._is_styling=!1,!this._invalidated&&I!==void 0)break;this._invalidated=!1}this.table_model.autosize_cells(v),this.table_model.header.reset_header_cache(),l||this._update_virtual_panel_width(this._invalid_schema||b,n),this._invalid_schema=!1}else this.update_sub_cell_offset(h);var k;k=performance.now()-r,Mt=(Mt*Ye+k)/(Ye+1),Ye+=1}update_sub_cell_offset(t){var r;let i=this._column_sizes.row_height*(t.start_row%1)||0,l=this._column_sizes.indices[(this.table_model._row_headers_length||0)+Math.floor(t.start_col)]*(t.start_col%1)||0,n=(r=this._sub_cell_style.sheet)===null||r===void 0?void 0:r.cssRules[0].style;n&&(n.setProperty("--regular-table--clip-x",l+"px"),n.setProperty("--regular-table--clip-y",i+"px"),n.setProperty("--regular-table--transform-x",`-${l}px`),n.setProperty("--regular-table--transform-y",`-${i}px`))}}).prototype,"draw",[Lr],Object.getOwnPropertyDescriptor(zt.prototype,"draw"),zt.prototype),zt),Et,Co=(wr((Et=class extends Eo{register_listeners(){this.addEventListener("mousedown",this._on_click_or_dblclick.bind(this)),this.addEventListener("scroll",this._on_scroll.bind(this),{passive:!0}),this._register_glitch_scroll_listeners()}_on_scroll(t){t.stopPropagation(),this.draw({invalid_viewport:!1})}_register_glitch_scroll_listeners(){this.addEventListener("mousewheel",this._on_mousewheel.bind(this))}_on_mousewheel(t){if(!window.safari)return;let{clientWidth:r,clientHeight:i,scrollTop:l,scrollLeft:n}=this;t.preventDefault(),t.returnValue=!1;let _=Math.max(1,this._virtual_panel.offsetHeight-i),h=Math.max(1,this._virtual_panel.offsetWidth-r);this.scrollTop=Math.max(0,Math.min(_,l+t.deltaY)),this.scrollLeft=Math.max(0,Math.min(h,n+t.deltaX)),this._on_scroll(t)}_on_touchmove(t){t.stopPropagation(),t.preventDefault(),t.returnValue=!1;let{clientWidth:r,clientHeight:i}=this,l=Math.max(1,this._virtual_panel.offsetHeight-i),n=Math.max(1,this._virtual_panel.offsetWidth-r);this.scrollTop=Math.min(l,this._memo_scroll_top+(this._memo_touch_startY-t.touches[0].pageY)),this.scrollLeft=Math.min(n,this._memo_scroll_left+(this._memo_touch_startX-t.touches[0].pageX)),this._on_scroll(t)}_on_touchstart(t){this._memo_touch_startY=t.touches[0].pageY,this._memo_touch_startX=t.touches[0].pageX,this._memo_scroll_top=this.scrollTop,this._memo_scroll_left=this.scrollLeft}async _on_dblclick(t){let r=t.target;for(;r.tagName!=="TD"&&r.tagName!=="TH";)if(r=r.parentElement,!this.contains(r))return;let i=t.target.classList.contains("rt-column-resize"),l=Ge.get(r);if(i){t.stopImmediatePropagation(),r.style.minWidth="",r.style.maxWidth="",t.shiftKey?(this._column_sizes.override=[],this._column_sizes.auto=[],this._column_sizes.indices=[]):(this._column_sizes.override[l.size_key]=void 0,this._column_sizes.auto[l.size_key]=void 0,this._column_sizes.indices[l.size_key]=void 0);for(let n of t.shiftKey?[this.table_model.header.cells[this.table_model.header.cells.length-1],...this.table_model.body.cells]:this.table_model.body.cells)for(let _ of t.shiftKey?n:[n[l._virtual_x]])_&&(_.style.minWidth="",_.style.maxWidth="",_.classList.remove("rt-cell-clip"));await this.draw()}}async _on_click(t){if(t.button!==0)return;let r=t.target;for(;r.tagName!=="TD"&&r.tagName!=="TH";)if(r=r.parentElement,!this.contains(r))return;let i=t.target.classList.contains("rt-column-resize"),l=Ge.get(r);i&&(this._on_resize_column(t,r,l),t.stopImmediatePropagation())}async _on_click_or_dblclick(t){let r=performance.now();this._last_clicked_time&&r-this._last_clicked_time<500?(this._last_clicked_time=r,await this._on_dblclick(t)):(this._last_clicked_time=r,await this._on_click(t))}_on_resize_column(t,r,i){let{_virtual_x:l,size_key:n}=i,_=t.pageX,h=l+r.colSpan-1,g=this.table_model.header.get_column_header(h),b=this._column_sizes.indices[n],k=E=>this._on_resize_column_move(E,g,_,b,n,h),v=()=>{document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",v);let E=this._column_sizes.override[n],I=this._column_sizes.indices[n]!==E;this._column_sizes.indices[n]=E,I&&this.draw()};document.addEventListener("mousemove",k),document.addEventListener("mouseup",v)}async _on_resize_column_move(t,r,i,l,n,_){await new Promise(setTimeout);let h=t.pageX-i,g=Math.max(1,l+h);if(this._column_sizes.override[n]=g,h<0)await this.draw({preserve_width:!0});else{r.style.minWidth=g+"px",r.style.maxWidth=g+"px";let b=this._column_sizes.auto[n];for(let k of this.table_model.body.cells){let v=k[_];v&&(v.style.maxWidth=v.style.minWidth=g+"px",v.classList.toggle("rt-cell-clip",b>g))}}}}).prototype,"_on_resize_column_move",[Lr],Object.getOwnPropertyDescriptor(Et.prototype,"_on_resize_column_move"),Et.prototype),Et),Mr=class{constructor(r){this._name=r,this._elements=[],this._index=0}reset(){this._index=0}get(){this._elements[this._index]||(this._elements[this._index]=document.createElement(this._name));let r=this._elements[this._index];return this._index+=1,r}},Bt=class{constructor(r,i,l){this._column_sizes=r,this._container=i,this._span_factory=new Mr("span"),this.table=l,this.cells=[],this.rows=[]}num_columns(){return this._get_row(Math.max(0,this.rows.length-1)).row_container.length}num_rows()