"use strict";(globalThis.webpackChunksuperset=globalThis.webpackChunksuperset||[]).push([[4076],{611950:(e,n,t)=>{var r=t(564836),o=t(475263);Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.HOOK_MARK=void 0;var l=o(t(667294)),a=r(t(645520));n.HOOK_MARK="RC_FORM_INTERNAL_HOOKS";var i=function(){(0,a.default)(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},u=l.createContext({getFieldValue:i,getFieldsValue:i,getFieldError:i,getFieldsError:i,isFieldsTouched:i,isFieldTouched:i,isFieldValidating:i,isFieldsValidating:i,resetFields:i,setFields:i,setFieldsValue:i,validateFields:i,submit:i,getInternalHooks:function(){return i(),{dispatch:i,initEntityValue:i,registerField:i,useSubscribe:i,setInitialValues:i,setCallbacks:i,getFields:i,setValidateMessages:i,setPreserve:i}}});n.default=u},367265:(e,n,t)=>{var r=t(475263).default;Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,n,t){var r=o.useRef({});return"value"in r.current&&!t(r.current.condition,n)||(r.current.value=e(),r.current.condition=n),r.current.value};var o=r(t(667294))},564543:(e,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var t=function(e){return+setTimeout(e,16)},r=function(e){return clearTimeout(e)};"undefined"!=typeof window&&"requestAnimationFrame"in window&&(t=function(e){return window.requestAnimationFrame(e)},r=function(e){return window.cancelAnimationFrame(e)});var o=0,l=new Map;function a(e){l.delete(e)}var i=function(e){var n=o+=1;return function r(o){if(0===o)a(n),e();else{var i=t((function(){r(o-1)}));l.set(n,i)}}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),n};i.cancel=function(e){var n=l.get(e);return a(e),r(n)},n.default=i},475531:(e,n,t)=>{var r=t(564836).default;Object.defineProperty(n,"__esModule",{value:!0}),n.useComposeRef=n.supportRef=n.supportNodeRef=n.getNodeRef=n.fillRef=n.composeRef=void 0;var o=r(t(918698)),l=t(667294),a=t(211805),i=r(t(367265)),u=n.fillRef=function(e,n){"function"==typeof e?e(n):"object"===(0,o.default)(e)&&e&&"current"in e&&(e.current=n)},s=n.composeRef=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];var r=n.filter(Boolean);return r.length<=1?r[0]:function(e){n.forEach((function(n){u(n,e)}))}},d=(n.useComposeRef=function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return(0,i.default)((function(){return s.apply(void 0,n)}),n,(function(e,n){return e.length!==n.length||e.every((function(e,t){return e!==n[t]}))}))},n.supportRef=function(e){var n,t,r=(0,a.isMemo)(e)?e.type.type:e.type;return!!("function"!=typeof r||null!==(n=r.prototype)&&void 0!==n&&n.render||r.$$typeof===a.ForwardRef)&&!!("function"!=typeof e||null!==(t=e.prototype)&&void 0!==t&&t.render||e.$$typeof===a.ForwardRef)});function c(e){return(0,l.isValidElement)(e)&&!(0,a.isFragment)(e)}n.supportNodeRef=function(e){return c(e)&&d(e)},n.getNodeRef=Number(l.version.split(".")[0])>=19?function(e){return c(e)?e.props.ref:null}:function(e){return c(e)?e.ref:null}},804591:(e,n,t)=>{t.d(n,{Z:()=>o});var r=t(897538);const o=(0,t(751995).iK)(r.Z.Item)`
  ${({theme:e})=>`\n    .ant-form-item-label {\n      padding-bottom: ${e.gridUnit}px;\n      & > label {\n        text-transform: uppercase;\n        font-size: ${e.typography.sizes.s}px;\n        color: ${e.colors.grayscale.base};\n\n        &.ant-form-item-required:not(.ant-form-item-required-mark-optional) {\n          &::before {\n            display: none;\n          }\n          &::after {\n            display: inline-block;\n            color: ${e.colors.error.base};\n            font-size: ${e.typography.sizes.s}px;\n            content: '*';\n          }\n        }\n      }\n    }\n  `}
`},861641:(e,n,t)=>{var r,o;t.d(n,{N:()=>o,p:()=>r}),function(e){e.Simple="SIMPLE",e.Sql="SQL"}(r||(r={})),function(e){e.Having="HAVING",e.Where="WHERE"}(o||(o={}))},130326:(e,n,t)=>{t.r(n),t.d(n,{default:()=>w});var r=t(751995),o=t(767190),l=t(645636),a=t(355786),i=t(310581),u=t(61988),s=t(667294),d=t(349484),c=t(104715),f=t(52004),p=t(174448),v=t(356080),m=t(578676),g=t(135944);const h=(0,r.iK)(c.rb)`
  ${({theme:e,validateStatus:n})=>{var t,r;return`\n  .ant-slider-rail {\n    background-color: ${n?null==(t=e.colors[n])?void 0:t.light1:"#99e7f0"};\n  }\n\n  .ant-slider-track {\n    background-color: #f5f5f5;\n  }\n\n  &:hover {\n    .ant-slider-rail {\n      background-color: ${n?null==(r=e.colors[n])?void 0:r.base:"#6dd3e3"};\n    }\n\n    .ant-slider-track {\n      background-color: #e1e1e1;\n    }\n  }\n  `}}
`,b=r.iK.div`
  ${({theme:e,validateStatus:n,orientation:t,isOverflowing:r})=>{var o,l,a,i,u,s,c;return`\n    border: 1px solid transparent;\n    &:focus {\n      border: 1px solid\n        ${null==(o=e.colors[n||"primary"])?void 0:o.base};\n      outline: 0;\n      box-shadow: 0 0 0 3px\n        ${(0,d.rgba)(null==(l=e.colors[n||"primary"])?void 0:l.base,.2)};\n    }\n    & .ant-slider {\n      margin-top: ${t===f.Bp.Horizontal?0:e.gridUnit}px;\n      margin-bottom: ${t===f.Bp.Horizontal?0:5*e.gridUnit}px;\n\n      ${t===f.Bp.Horizontal&&!r&&"line-height: 1.2;"}\n\n      & .ant-slider-track {\n        background-color: ${n&&(null==(a=e.colors[n])?void 0:a.light1)};\n      }\n      & .ant-slider-handle {\n        border: ${n&&`2px solid ${null==(i=e.colors[n])?void 0:i.light1}`};\n        &:focus {\n          box-shadow: 0 0 0 3px\n            ${(0,d.rgba)(null==(u=e.colors[n||"primary"])?void 0:u.base,.2)};\n        }\n      }\n      & .ant-slider-mark {\n        font-size: ${e.typography.sizes.s}px;\n      }\n\n      &:hover {\n        & .ant-slider-track {\n          background-color: ${n&&(null==(s=e.colors[n])?void 0:s.base)};\n        }\n        & .ant-slider-handle {\n          border: ${n&&`2px solid ${null==(c=e.colors[n])?void 0:c.base}`};\n        }\n      }\n    }\n  `}}
`,y=(0,o.JB)(l.default.SMART_NUMBER),F=e=>y(e),$=(e,n)=>null!==e&&null!==n&&e===n?`x = ${y(e)}`:null!==e&&null!==n?`${y(e)} ≤ x ≤ ${y(n)}`:null!==e?`x ≥ ${y(e)}`:null!==n?`x ≤ ${y(n)}`:"",x=(e,n)=>{const t={};return null!==e&&(t[e]=y(e)),null!==n&&(t[n]=y(n)),t};function w(e){const{data:n,formData:t,height:r,width:o,setDataMask:l,setFocusedFilter:d,unsetFocusedFilter:f,setHoveredFilter:y,unsetHoveredFilter:w,setFilterActive:k,filterState:M,inputRef:N,filterBarOrientation:S,isOverflowingFilterBar:R}=e,[C]=n,{min:O,max:E}=C,{groupby:A,defaultValue:Z,enableSingleValue:_}=t,T=_===m.c.Minimum,H=_===m.c.Maximum,V=_===m.c.Exact,B=void 0===_,[K=""]=(0,a.Z)(A).map(i.Z),[j,z]=(0,s.useState)(null!=Z?Z:[O,V?O:E]),[I,q]=(0,s.useState)({}),P=null!=j?j:[O,E],L=(0,s.useCallback)((e=>{const[n,t]=e;return V?{lower:n,upper:t}:{lower:n>O?n:null,upper:t<E?t:null}}),[E,O,V]),U=(0,s.useCallback)((e=>{z(e);const{lower:n,upper:t}=L(e);q(x(n,t)),l({extraFormData:(0,v.WO)(K,n,t),filterState:{value:null!==n||null!==t?e:null,label:$(n,t)}})}),[K,L,l]),W=(0,s.useCallback)((e=>{z(e)}),[]);(0,s.useEffect)((()=>{var e;if(void 0===(null==C?void 0:C.min)&&void 0===(null==C?void 0:C.max))return;let n=null!=(e=M.value)?e:[O,E];if(H){const e=n[1]<=P[1]?n[1]:P[1];n=[O,e]}else T?n=[n[0]>=P[0]?n[0]:P[0],E]:V&&(n=[P[0],P[0]]);U(n)}),[H,T,V,JSON.stringify(M.value),JSON.stringify(n)]);const D=(0,s.useMemo)((()=>{if(M.validateMessage)return(0,g.tZ)(p.Am,{status:M.validateStatus,children:M.validateMessage})}),[M.validateMessage,M.validateStatus]);(0,s.useEffect)((()=>{H&&U([O,P[1]])}),[H]),(0,s.useEffect)((()=>{T&&U([P[0],E])}),[T]),(0,s.useEffect)((()=>{V&&U([P[0],P[0]])}),[V]);const J=E-O<=1?((e,n)=>{const t=(n-e)/20,r=`1E${Math.floor(Math.log10(t))}`;return Math.min(1,parseFloat(r))})(O,E):1;return(0,g.tZ)(p.un,{height:r,width:o,children:Number.isNaN(Number(O))||Number.isNaN(Number(E))?(0,g.tZ)("h4",{children:(0,u.t)("Chosen non-numeric column")}):(0,g.tZ)(p.jp,{extra:D,children:(0,g.BX)(b,{tabIndex:-1,ref:N,validateStatus:M.validateStatus,orientation:S,isOverflowing:R,onFocus:d,onBlur:f,onMouseEnter:y,onMouseLeave:w,onMouseDown:()=>k(!0),onMouseUp:()=>k(!1),children:[H&&(0,g.tZ)(c.rb,{min:O,max:E,step:J,value:P[1],tipFormatter:F,marks:I,onAfterChange:e=>U([O,e]),onChange:e=>W([O,e])}),T&&(0,g.tZ)(h,{validateStatus:M.validateStatus,min:O,max:E,step:J,value:P[0],tipFormatter:F,marks:I,onAfterChange:e=>U([e,E]),onChange:e=>W([e,E])}),V&&(0,g.tZ)(c.rb,{min:O,max:E,step:J,included:!1,value:P[0],tipFormatter:F,marks:I,onAfterChange:e=>U([e,e]),onChange:e=>W([e,e])}),B&&(0,g.tZ)(c.rb,{range:!0,min:O,max:E,step:J,value:P,onAfterChange:U,onChange:W,tipFormatter:F,marks:I})]})})})}},174448:(e,n,t)=>{t.d(n,{Am:()=>u,h2:()=>l,jp:()=>i,un:()=>a});var r=t(751995),o=t(804591);const l=0,a=r.iK.div`
  min-height: ${({height:e})=>e}px;
  width: ${({width:e})=>e===l?"100%":`${e}px`};
`,i=(0,r.iK)(o.Z)`
  &.ant-row.ant-form-item {
    margin: 0;
  }
`,u=r.iK.div`
  color: ${({theme:e,status:n="error"})=>{var t;return null==(t=e.colors[n])?void 0:t.base}};
`},356080:(e,n,t)=>{t.d(n,{EG:()=>u,WO:()=>i,vb:()=>a});var r=t(88889),o=t(454076),l=t(861641);const a=(e,n,t=!1,r=!1)=>{const o={};return t?o.adhoc_filters=[{expressionType:l.p.Sql,clause:l.N.Where,sqlExpression:"1 = 0"}]:null!=n&&0!==n.length&&(o.filters=[{col:e,op:r?"NOT IN":"IN",val:n}]),o},i=(e,n,t)=>{const r=[];return null!=n&&n!==t&&r.push({col:e,op:">=",val:n}),null!=t&&t!==n&&r.push({col:e,op:"<=",val:t}),null!=t&&null!=n&&t===n&&r.push({col:e,op:"==",val:t}),r.length?{filters:r}:{}};function u({timeFormatter:e,numberFormatter:n}={}){return(t,l)=>{if(null==t)return o.li;if("boolean"==typeof t)return t?o.Tb:o.jy;if(l===r.Z.Boolean)try{return JSON.parse(String(t).toLowerCase())?o.Tb:o.jy}catch{return o.jy}return"string"==typeof t?t:e&&l===r.Z.Temporal?e(t):n&&"number"==typeof t&&l===r.Z.Numeric?n(t):String(t)}}}}]);
//# sourceMappingURL=e1fe2badc0d1de13c6ba.chunk.js.map