"use strict";(globalThis.webpackChunksuperset=globalThis.webpackChunksuperset||[]).push([[1456],{79069:(e,t,o)=>{o.d(t,{Z:()=>u});var n=o(73126),s=o(67294),i=o(45697),l=o.n(i),r=o(51995),a=o(11965),h=o(82342),c=o(87253);const d={value:l().bool,label:l().string,onChange:l().func},p=r.iK.div`
  ${({theme:e})=>a.iv`
    .ControlHeader label {
      color: ${e.colors.grayscale.dark1};
    }
    span[role='checkbox'] {
      padding-right: ${2*e.gridUnit}px;
    }
  `}
`;class u extends s.Component{onChange(){this.props.onChange(!this.props.value)}renderCheckbox(){return(0,a.tZ)(c.ZP,{onChange:this.onChange.bind(this),checked:!!this.props.value})}render(){return this.props.label?(0,a.tZ)(p,null,(0,a.tZ)(h.Z,(0,n.Z)({},this.props,{leftNode:this.renderCheckbox(),onClick:this.onChange.bind(this)}))):this.renderCheckbox()}}u.propTypes=d,u.defaultProps={value:!1,onChange:()=>{}}},82199:(e,t,o)=>{o.d(t,{Z:()=>p});var n=o(67294),s=o(45697),i=o.n(s),l=o(1111),r=o(61988),a=o(11965),h=o(81315),c=o(82342);const d={ariaLabel:i().string,autoFocus:i().bool,choices:i().array,clearable:i().bool,description:i().oneOfType([i().string,i().node]),disabled:i().bool,freeForm:i().bool,isLoading:i().bool,mode:i().string,multi:i().bool,isMulti:i().bool,name:i().string.isRequired,onChange:i().func,onFocus:i().func,onSelect:i().func,onDeselect:i().func,value:i().oneOfType([i().string,i().number,i().array]),default:i().oneOfType([i().string,i().number,i().array]),showHeader:i().bool,optionRenderer:i().func,valueKey:i().string,options:i().array,placeholder:i().string,filterOption:i().func,tokenSeparators:i().arrayOf(i().string),notFoundContent:i().object,label:i().string,renderTrigger:i().bool,validationErrors:i().array,rightNode:i().node,leftNode:i().node,onClick:i().func,hovered:i().bool,tooltipOnClick:i().func,warning:i().string,danger:i().string};class p extends n.PureComponent{constructor(e){super(e),this.state={options:this.getOptions(e)},this.onChange=this.onChange.bind(this),this.handleFilterOptions=this.handleFilterOptions.bind(this)}UNSAFE_componentWillReceiveProps(e){if(!(0,l.Z)(e.choices,this.props.choices)||!(0,l.Z)(e.options,this.props.options)){const t=this.getOptions(e);this.setState({options:t})}}onChange(e){const{valueKey:t}=this.props;let o=e;Array.isArray(e)&&(o=e.map((e=>void 0!==(null==e?void 0:e[t])?e[t]:e))),"object"==typeof e&&void 0!==(null==e?void 0:e[t])&&(o=e[t]),this.props.onChange(o,[])}getOptions(e){const{choices:t,optionRenderer:o,valueKey:n}=e;let s=[];return e.options?s=e.options.map((e=>({...e,value:e[n],label:e.label||e[n],customLabel:o?o(e):void 0}))):t&&(s=t.map((e=>{if(Array.isArray(e)){const[t,o]=e.length>1?e:[e[0],e[0]];return{value:t,label:o}}return Object.is(e)?{...e,value:e[n],label:e.label||e[n]}:{value:e,label:e}}))),s}handleFilterOptions(e,t){const{filterOption:o}=this.props;return o({data:t},e)}render(){const{ariaLabel:e,autoFocus:t,clearable:o,disabled:n,filterOption:s,freeForm:i,isLoading:l,isMulti:d,label:p,multi:u,name:g,notFoundContent:C,onFocus:b,onSelect:v,onDeselect:m,placeholder:y,showHeader:f,tokenSeparators:Z,value:x,description:k,renderTrigger:S,rightNode:F,leftNode:O,validationErrors:P,onClick:w,hovered:L,tooltipOnClick:T,warning:$,danger:N}=this.props,R={name:g,label:p,description:k,renderTrigger:S,rightNode:F,leftNode:O,validationErrors:P,onClick:w,hovered:L,tooltipOnClick:T,warning:$,danger:N},X={allowNewOptions:i,autoFocus:t,ariaLabel:e||("string"==typeof p?p:(0,r.t)("Select ...")),allowClear:o,disabled:n,filterOption:!s||"function"!=typeof s||this.handleFilterOptions,header:f&&(0,a.tZ)(c.Z,R),loading:l,mode:this.props.mode||(d||u?"multiple":"single"),name:`select-${g}`,onChange:this.onChange,onFocus:b,onSelect:v,onDeselect:m,options:this.state.options,placeholder:y,sortComparator:this.props.sortComparator,value:(()=>{const e=null!=x?x:void 0!==this.props.default?this.props.default:void 0;if(null!==e||this.state.options.find((e=>null===e.value)))return e})(),tokenSeparators:Z,notFoundContent:C};return(0,a.tZ)("div",{css:e=>a.iv`
          .type-label {
            margin-right: ${2*e.gridUnit}px;
          }
          .Select__multi-value__label > span,
          .Select__option > span,
          .Select__single-value > span {
            display: flex;
            align-items: center;
          }
        `},(0,a.tZ)(h.Z,X))}}p.propTypes=d,p.defaultProps={autoFocus:!1,choices:[],clearable:!0,description:null,disabled:!1,freeForm:!1,isLoading:!1,label:null,multi:!1,onChange:()=>{},onFocus:()=>{},showHeader:!0,valueKey:"value"}},665:(e,t,o)=>{o.d(t,{Z:()=>y});var n=o(67294),s=o(45697),i=o.n(s),l=o(4715),r=o(61988),a=o(37921),h=o(99299),c=o(83734),d=o(87253),p=o(82342),u=o(82199),g=o(11965);const C="latlong",b="delimited",v="geohash",m={onChange:i().func,value:i().object,animation:i().bool,choices:i().array};class y extends n.Component{constructor(e){super(e);const t=e.value||{};let o;e.choices.length>0&&(o=e.choices[0][0]),this.state={type:t.type||C,delimiter:t.delimiter||",",latCol:t.latCol||o,lonCol:t.lonCol||o,lonlatCol:t.lonlatCol||o,reverseCheckbox:t.reverseCheckbox||!1,geohashCol:t.geohashCol||o,value:null,errors:[]},this.toggleCheckbox=this.toggleCheckbox.bind(this),this.onChange=this.onChange.bind(this),this.renderReverseCheckbox=this.renderReverseCheckbox.bind(this)}componentDidMount(){this.onChange()}onChange(){const{type:e}=this.state,t={type:e},o=[],n=(0,r.t)("Invalid lat/long configuration.");e===C?(t.latCol=this.state.latCol,t.lonCol=this.state.lonCol,t.lonCol&&t.latCol||o.push(n)):e===b?(t.lonlatCol=this.state.lonlatCol,t.delimiter=this.state.delimiter,t.reverseCheckbox=this.state.reverseCheckbox,t.lonlatCol&&t.delimiter||o.push(n)):e===v&&(t.geohashCol=this.state.geohashCol,t.reverseCheckbox=this.state.reverseCheckbox,t.geohashCol||o.push(n)),this.setState({value:t,errors:o}),this.props.onChange(t,o)}setType(e){this.setState({type:e},this.onChange)}toggleCheckbox(){this.setState((e=>({reverseCheckbox:!e.reverseCheckbox})),this.onChange)}renderLabelContent(){return this.state.errors.length>0?"N/A":this.state.type===C?`${this.state.lonCol} | ${this.state.latCol}`:this.state.type===b?`${this.state.lonlatCol}`:this.state.type===v?`${this.state.geohashCol}`:null}renderSelect(e,t){return(0,g.tZ)(u.Z,{ariaLabel:e,name:e,choices:this.props.choices,value:this.state[e],clearable:!1,onFocus:()=>{this.setType(t)},onChange:t=>{this.setState({[e]:t},this.onChange)}})}renderReverseCheckbox(){return(0,g.tZ)("span",null,(0,r.t)("Reverse lat/long "),(0,g.tZ)(d.ZP,{checked:this.state.reverseCheckbox,onChange:this.toggleCheckbox}))}renderPopoverContent(){return(0,g.tZ)("div",{style:{width:"300px"}},(0,g.tZ)(c.Z,{title:(0,r.t)("Longitude & Latitude columns"),isSelected:this.state.type===C,onSelect:this.setType.bind(this,C)},(0,g.tZ)(l.X2,{gutter:16},(0,g.tZ)(l.JX,{xs:24,md:12},(0,r.t)("Longitude"),this.renderSelect("lonCol",C)),(0,g.tZ)(l.JX,{xs:24,md:12},(0,r.t)("Latitude"),this.renderSelect("latCol",C)))),(0,g.tZ)(c.Z,{title:(0,r.t)("Delimited long & lat single column"),info:(0,r.t)("Multiple formats accepted, look the geopy.points Python library for more details"),isSelected:this.state.type===b,onSelect:this.setType.bind(this,b)},(0,g.tZ)(l.X2,{gutter:16},(0,g.tZ)(l.JX,{xs:24,md:12},(0,r.t)("Column"),this.renderSelect("lonlatCol",b)),(0,g.tZ)(l.JX,{xs:24,md:12},this.renderReverseCheckbox()))),(0,g.tZ)(c.Z,{title:(0,r.t)("Geohash"),isSelected:this.state.type===v,onSelect:this.setType.bind(this,v)},(0,g.tZ)(l.X2,{gutter:16},(0,g.tZ)(l.JX,{xs:24,md:12},(0,r.t)("Column"),this.renderSelect("geohashCol",v)),(0,g.tZ)(l.JX,{xs:24,md:12},this.renderReverseCheckbox()))))}render(){return(0,g.tZ)("div",null,(0,g.tZ)(p.Z,this.props),(0,g.tZ)(h.Z,{content:this.renderPopoverContent(),placement:"topLeft",trigger:"click"},(0,g.tZ)(a.Z,{className:"pointer"},this.renderLabelContent())))}}y.propTypes=m,y.defaultProps={onChange:()=>{},animation:!0,choices:[]}},83734:(e,t,o)=>{o.d(t,{Z:()=>r});var n=o(11965),s=(o(67294),o(51995)),i=o(58593),l=o(70707);function r({title:e,isSelected:t,children:o,onSelect:r,info:a}){const h=(0,s.Fg)();return(0,n.tZ)("div",{css:(0,n.iv)({paddingBottom:2*h.gridUnit,opacity:t?1:h.opacity.mediumHeavy},"","")},(0,n.tZ)("div",{role:"button",tabIndex:0,onClick:r,css:(0,n.iv)({display:"flex",alignItems:"center",cursor:r?"pointer":"default"},"","")},(0,n.tZ)("strong",null,e),a&&(0,n.tZ)(i.u,{title:a,css:(0,n.iv)({marginLeft:h.gridUnit},"","")},(0,n.tZ)(l.Z.InfoSolidSmall,{role:"img",width:14,height:14,iconColor:h.colors.grayscale.light1})),(0,n.tZ)(l.Z.Check,{role:"img",iconColor:t?h.colors.primary.base:h.colors.grayscale.base})),(0,n.tZ)("div",{css:(0,n.iv)({marginLeft:h.gridUnit,marginTop:h.gridUnit},"","")},o))}},9870:(e,t,o)=>{o.d(t,{Z:()=>C});var n=o(73126),s=o(67294),i=o(28216),l=o(51995),r=o(11965),a=o(61988),h=o(55786),c=o(37208),d=o(4715),p=o(82342);const u=l.iK.div`
  ${({theme:e})=>r.iv`
    display: flex;
    align-items: center;

    & > :first-child {
      margin-right: ${4*e.gridUnit}px;
      min-width: 0;
      flex: 1;
    }

    & > :nth-child(2) {
      min-width: 0;
      flex: 1;
    }
  `}
`,g=[{value:"prefix",label:(0,a.t)("Prefix")},{value:"suffix",label:(0,a.t)("Suffix")}],C=({onChange:e,value:t={},symbolSelectOverrideProps:o={},currencySelectOverrideProps:l={},symbolSelectAdditionalStyles:C,currencySelectAdditionalStyles:b,...v})=>{const m=(0,i.v9)((e=>{var t;return null==(t=e.common)?void 0:t.currencies})),y=(0,s.useMemo)((()=>(0,h.Z)(m).map((e=>({value:e,label:`${(0,c.j)({symbol:e})} (${e})`})))),[m]);return(0,r.tZ)(s.Fragment,null,(0,r.tZ)(p.Z,v),(0,r.tZ)(u,{css:r.iv`
          & > :first-child {
            ${C};
          }
          & > :nth-child(2) {
            ${b};
          }
        `,className:"currency-control-container"},(0,r.tZ)(d.Ph,(0,n.Z)({ariaLabel:(0,a.t)("Currency prefix or suffix"),options:g,placeholder:(0,a.t)("Prefix or suffix"),onChange:o=>{e({...t,symbolPosition:o})},onClear:()=>e({...t,symbolPosition:void 0}),value:null==t?void 0:t.symbolPosition,allowClear:!0},o)),(0,r.tZ)(d.Ph,(0,n.Z)({ariaLabel:(0,a.t)("Currency symbol"),options:y,placeholder:(0,a.t)("Currency"),onChange:o=>{e({...t,symbol:o})},onClear:()=>e({...t,symbol:void 0}),value:null==t?void 0:t.symbol,allowClear:!0,allowNewOptions:!0},l))))}},79684:(e,t,o)=>{o.d(t,{Z:()=>u});var n=o(23279),s=o.n(n),i=o(67294),l=o(99298),r=o(75294),a=o(27600),h=o(82342),c=o(9875),d=o(11965);const p=e=>null==e?"":String(e);class u extends i.Component{constructor(e){super(e),this.initialValue=void 0,this.onChange=e=>{var t,o;let n=e;const s=[];if(""!==e&&this.props.isFloat){const t=(0,l.Z)(e);t?s.push(t):n=e.match(/.*([.0])$/g)?e:parseFloat(e)}if(""!==e&&this.props.isInt){const t=(0,r.Z)(e);t?s.push(t):n=parseInt(e,10)}null==(t=(o=this.props).onChange)||t.call(o,n,s)},this.debouncedOnChange=s()((e=>{this.onChange(e)}),a.oP),this.onChangeWrapper=e=>{const{value:t}=e.target;this.setState({value:t},(()=>{this.debouncedOnChange(t)}))},this.initialValue=e.value,this.state={value:p(this.initialValue)}}render(){let{value:e}=this.state;return this.initialValue!==this.props.value&&(this.initialValue=this.props.value,e=p(this.props.value)),(0,d.tZ)("div",null,(0,d.tZ)(h.Z,this.props),(0,d.tZ)(c.II,{type:"text",placeholder:this.props.placeholder,onChange:this.onChangeWrapper,onFocus:this.props.onFocus,value:e,disabled:this.props.disabled,"aria-label":this.props.label}))}}}}]);
//# sourceMappingURL=02658d61544a3c7a2194.chunk.js.map