"use strict";(globalThis.webpackChunksuperset=globalThis.webpackChunksuperset||[]).push([[9413],{83505:(n,t,e)=>{e.d(t,{Z:()=>r});var o=e(96540);function r(n,t){const e=(0,o.useRef)(t);return(0,o.useEffect)((()=>{e.current=n}),[n]),e.current}},70957:(n,t,e)=>{e.d(t,{S:()=>f});var o=e(2404),r=e.n(o),i=e(96540),l=e(88813),a=e(82487),s=e(83505),c=e(96453),u=e(58642),d=e(2445);const p=c.I4.div`
  ${({theme:n,top:t,left:e})=>`\n    position: absolute;\n    top: ${t}px;\n    left: ${e}px;\n    padding: ${2*n.gridUnit}px;\n    margin: ${2*n.gridUnit}px;\n    background: ${n.colors.grayscale.dark2};\n    color: ${n.colors.grayscale.light5};\n    maxWidth: 300px;\n    fontSize: ${n.typography.sizes.s}px;\n    zIndex: 9;\n    pointerEvents: none;\n  `}
`;function h(n){const{tooltip:t}=n;if(null==t)return null;const{x:e,y:o,content:r}=t,i="string"==typeof r?(0,u.nn)(r):r;return(0,d.Y)(p,{top:o,left:e,children:i})}const g=(0,i.memo)((0,i.forwardRef)(((n,t)=>{const[e,o]=(0,i.useState)(null),[c,u]=(0,i.useState)(null),[p,g]=(0,i.useState)(n.viewport),f=(0,s.Z)(n.viewport);(0,i.useImperativeHandle)(t,(()=>({setTooltip:o})),[]);const m=(0,i.useCallback)((()=>{if(c&&Date.now()-c>250){const t=n.setControlValue;t&&t("viewport",p),u(null)}}),[c,n.setControlValue,p]);(0,i.useEffect)((()=>{const n=setInterval(m,250);return clearInterval(n)}),[m]),(0,i.useEffect)((()=>{r()(n.viewport,f)||g(n.viewport)}),[f,n.viewport]);const v=(0,i.useCallback)((({viewState:n})=>{g(n),u(Date.now())}),[]),x=(0,i.useCallback)((()=>n.layers.some((n=>"function"==typeof n))?n.layers.map((n=>"function"==typeof n?n():n)):n.layers),[n.layers]),{children:y=null,height:w,width:b}=n;return(0,d.FD)(d.FK,{children:[(0,d.FD)("div",{style:{position:"relative",width:b,height:w},children:[(0,d.Y)(a.A,{controller:!0,width:b,height:w,layers:x(),viewState:p,onViewStateChange:v,children:(0,d.Y)(l.b,{preserveDrawingBuffer:!0,mapStyle:n.mapStyle||"light",mapboxApiAccessToken:n.mapboxApiAccessToken})}),y]}),(0,d.Y)(h,{tooltip:e})]})}))),f=(0,c.I4)(g)`
  .deckgl-tooltip > div {
    overflow: hidden;
    text-overflow: ellipsis;
  }
`},32548:(n,t,e)=>{e.d(t,{A:()=>r});var o=e(2445);const r=({label:n,value:t})=>(0,o.FD)("div",{children:[n,(0,o.Y)("strong",{children:t})]})},66671:(n,t,e)=>{e.d(t,{A:()=>u});var o=e(96540),r=e(96453),i=e(32142),l=e(2445);const a=r.I4.div`
  ${({theme:n})=>`\n    font-size: ${n.typography.sizes.s}px;\n    position: absolute;\n    background: ${n.colors.grayscale.light5};\n    box-shadow: 0 0 ${n.gridUnit}px ${n.colors.grayscale.light2};\n    margin: ${6*n.gridUnit}px;\n    padding: ${3*n.gridUnit}px ${5*n.gridUnit}px;\n    outline: none;\n    overflow-y: scroll;\n    max-height: 200px;\n\n    & ul {\n      list-style: none;\n      padding-left: 0;\n      margin: 0;\n\n      & li a {\n        display: flex;\n        color: ${n.colors.grayscale.base};\n        text-decoration: none;\n        padding: ${n.gridUnit}px 0;\n\n        & span {\n          margin-right: ${n.gridUnit}px;\n        }\n      }\n    }\n  `}
`,s=" - ",c=({format:n=null,forceCategorical:t=!1,position:e="tr",categories:o={},toggleCategory:r=()=>{},showSingleCategory:c=()=>{}})=>{const u=e=>{if(!n||t)return e;const o=parseFloat(e);return(0,i.ZV)(n,o)},d=t=>{if(!n)return t;if(t.includes(s)){const n=t.split(s);return u(n[0])+s+u(n[1])}return u(t)};if(0===Object.keys(o).length||null===e)return null;const p=Object.entries(o).map((([n,t])=>{var e;const o={color:`rgba(${null==(e=t.color)?void 0:e.join(", ")})`},i=t.enabled?"◼":"◻";return(0,l.Y)("li",{children:(0,l.FD)("a",{href:"#",role:"button",onClick:()=>r(n),onDoubleClick:()=>c(n),children:[(0,l.Y)("span",{style:o,children:i})," ",d(n)]})},n)})),h="t"===(null==e?void 0:e.charAt(0))?"top":"bottom",g="r"===(null==e?void 0:e.charAt(1))?"right":"left",f={position:"absolute",[h]:"0px",[g]:"10px"};return(0,l.Y)(a,{className:"dupa",style:f,children:(0,l.Y)("ul",{children:p})})},u=(0,o.memo)(c)},41857:(n,t,e)=>{e.d(t,{T:()=>i,g:()=>s});var o=e(12619),r=e(25564);function i(n,t,e,o){const i=n;let l,a,s=e;return i.js_tooltip&&(s=(0,r.A)(i.js_tooltip)),s&&(l=n=>(n.picked?t({content:s(n),x:n.x,y:n.y}):t(null),!0)),i.js_onclick_href?a=n=>{const t=(0,r.A)(i.js_onclick_href)(n);return window.open(t),!0}:i.table_filter&&void 0!==o&&(a=n=>(o(n.object[i.line_column]),!0)),{onClick:a,onHover:l,pickable:Boolean(l)}}const l={p1:.01,p5:.05,p95:.95,p99:.99},a={sum:o.sum,min:o.min,max:o.max,mean:o.mean,median:o.median,variance:o.variance,deviation:o.deviation};function s(n="sum",t=null){if("count"===n)return n=>n.length;let e;if(n in l)e=(e,r)=>{let i;return i=t?e.sort(((n,e)=>(0,o.ascending)(t(n),t(e)))):e.sort(o.ascending),(0,o.quantile)(i,l[n],r)};else{if(!(n in a))throw new Error(`Unsupported aggregation type: ${n}`);e=a[n]}return t?n=>e(n.map((n=>t(n)))):n=>e(n)}},49443:(n,t,e)=>{e.r(t),e.d(t,{hexToRGB:()=>r});var o=e(2117);function r(n,t=255){if(!n)return[0,0,0,t];const{r:e,g:r,b:i}=(0,o.Qh)(n);return[e,r,i,t]}},95490:(n,t,e)=>{e.d(t,{A:()=>s});var o=e(55016),r=e(12619);const i=[-90,90],l=[-180,180];function a([n,t],[e,o],r=.25){return n<t?[n,t]:[Math.max(e,n-r),Math.min(o,t+r)]}function s(n,{points:t,width:e,height:s,minExtent:c,maxZoom:u,offset:d,padding:p=20}){const{bearing:h,pitch:g}=n,f=function(n){const t=a((0,r.extent)(n,(n=>n[1])),i),e=a((0,r.extent)(n,(n=>n[0])),l);return[[e[0],t[0]],[e[1],t[1]]]}(t);try{return{...(0,o.Fe)({bounds:f,width:e,height:s,minExtent:c,maxZoom:u,offset:d,padding:p}),bearing:h,pitch:g}}catch(n){console.error("Could not fit viewport",n)}return n}},25564:(n,t,e)=>{e.d(t,{A:()=>c});var o=e(68961),r=e.n(o),i=e(4523),l=e(12619),a=e(49443);const s={console,_:i.Ay,colors:a,d3array:l};function c(n,t,e){const o={},i=`SAFE_EVAL_${Math.floor(1e6*Math.random())}`;o[i]={};const l=`${i}=${n}`,a={...s,...t};Object.keys(a).forEach((n=>{o[n]=a[n]}));try{return r().runInNewContext(l,o,e),o[i]}catch(n){return()=>n}}},93559:(n,t,e)=>{function o({data:n,getIndex:t,dataRange:e,replace:o}){const{startRow:r=0,endRow:i=1/0}=e,l=n.length;let a=l,s=l;for(let e=0;e<l;e++){const o=t(n[e]);if(a>e&&o>=r&&(a=e),o>=i){s=e;break}}let c=a;const u=s-a!==o.length?n.slice(s):void 0;for(let t=0;t<o.length;t++)n[c++]=o[t];if(u){for(let t=0;t<u.length;t++)n[c++]=u[t];n.length=c}return{startRow:a,endRow:a+o.length}}e.d(t,{J:()=>o})}}]);