"use strict";(globalThis.webpackChunksuperset=globalThis.webpackChunksuperset||[]).push([[4076],{11950:(e,n,t)=>{var r=t(64836),o=t(16338);Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.HOOK_MARK=void 0;var a=o(t(67294)),l=r(t(45520));n.HOOK_MARK="RC_FORM_INTERNAL_HOOKS";var i=function(){(0,l.default)(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},u=a.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},67265:(e,n,t)=>{var r=t(16338).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(67294))},64543:(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,a=new Map;function l(e){a.delete(e)}var i=function(e){var n=o+=1;return function r(o){if(0===o)l(n),e();else{var i=t((function(){r(o-1)}));a.set(n,i)}}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),n};i.cancel=function(e){var n=a.get(e);return l(e),r(n)},n.default=i},75531:(e,n,t)=>{var r=t(64836).default;Object.defineProperty(n,"__esModule",{value:!0}),n.composeRef=s,n.fillRef=u,n.supportNodeRef=function(e){return!!(0,a.isValidElement)(e)&&(!(0,l.isFragment)(e)&&d(e))},n.supportRef=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]}))}))};var o=r(t(18698)),a=t(67294),l=t(11805),i=r(t(67265));function u(e,n){"function"==typeof e?e(n):"object"===(0,o.default)(e)&&e&&"current"in e&&(e.current=n)}function s(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];var r=n.filter((function(e){return e}));return r.length<=1?r[0]:function(e){n.forEach((function(n){u(n,e)}))}}function d(e){var n,t,r=(0,l.isMemo)(e)?e.type.type:e.type;return!!("function"!=typeof r||null!==(n=r.prototype)&&void 0!==n&&n.render)&&!!("function"!=typeof e||null!==(t=e.prototype)&&void 0!==t&&t.render)}},4591:(e,n,t)=>{t.d(n,{Z:()=>o});var r=t(97538);const o=(0,t(51995).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  `}
`},61641:(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={}))},30326:(e,n,t)=>{t.r(n),t.d(n,{default:()=>w});var r=t(51995),o=t(67190),a=t(45636),l=t(55786),i=t(10581),u=t(61988),s=t(67294),d=t(49484),c=t(4715),f=t(52004),p=t(74448),v=t(56080),m=t(78676),g=t(11965);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,a,l,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==(a=e.colors[n||"primary"])?void 0:a.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==(l=e.colors[n])?void 0:l.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)(a.default.SMART_NUMBER),F=e=>y(e),x=(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)}`:"",$=(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:a,setFocusedFilter:d,unsetFocusedFilter:f,setHoveredFilter:y,unsetHoveredFilter:w,setFilterActive:k,filterState:S,inputRef:M,filterBarOrientation:N,isOverflowingFilterBar:C}=e,[O]=n,{min:E,max:A}=O,{groupby:Z,defaultValue:R,enableSingleValue:_}=t,T=_===m.c.Minimum,H=_===m.c.Maximum,V=_===m.c.Exact,K=void 0===_,[j=""]=(0,l.Z)(Z).map(i.Z),[z,B]=(0,s.useState)(null!=R?R:[E,V?E:A]),[I,q]=(0,s.useState)({}),P=null!=z?z:[E,A],L=(0,s.useCallback)((e=>{const[n,t]=e;return V?{lower:n,upper:t}:{lower:n>E?n:null,upper:t<A?t:null}}),[A,E,V]),U=(0,s.useCallback)((e=>{B(e);const{lower:n,upper:t}=L(e);q($(n,t)),a({extraFormData:(0,v.WO)(j,n,t),filterState:{value:null!==n||null!==t?e:null,label:x(n,t)}})}),[j,L,a]),W=(0,s.useCallback)((e=>{B(e)}),[]);(0,s.useEffect)((()=>{var e;if(void 0===(null==O?void 0:O.min)&&void 0===(null==O?void 0:O.max))return;let n=null!=(e=S.value)?e:[E,A];if(H){const e=n[1]<=P[1]?n[1]:P[1];n=[E,e]}else T?n=[n[0]>=P[0]?n[0]:P[0],A]:V&&(n=[P[0],P[0]]);U(n)}),[H,T,V,JSON.stringify(S.value),JSON.stringify(n)]);const D=(0,s.useMemo)((()=>{if(S.validateMessage)return(0,g.tZ)(p.Am,{status:S.validateStatus},S.validateMessage)}),[S.validateMessage,S.validateStatus]);return(0,s.useEffect)((()=>{H&&U([E,P[1]])}),[H]),(0,s.useEffect)((()=>{T&&U([P[0],A])}),[T]),(0,s.useEffect)((()=>{V&&U([P[0],P[0]])}),[V]),(0,g.tZ)(p.un,{height:r,width:o},Number.isNaN(Number(E))||Number.isNaN(Number(A))?(0,g.tZ)("h4",null,(0,u.t)("Chosen non-numeric column")):(0,g.tZ)(p.jp,{extra:D},(0,g.tZ)(b,{tabIndex:-1,ref:M,validateStatus:S.validateStatus,orientation:N,isOverflowing:C,onFocus:d,onBlur:f,onMouseEnter:y,onMouseLeave:w,onMouseDown:()=>k(!0),onMouseUp:()=>k(!1)},H&&(0,g.tZ)(c.rb,{min:E,max:A,value:P[1],tipFormatter:F,marks:I,onAfterChange:e=>U([E,e]),onChange:e=>W([E,e])}),T&&(0,g.tZ)(h,{validateStatus:S.validateStatus,min:E,max:A,value:P[0],tipFormatter:F,marks:I,onAfterChange:e=>U([e,A]),onChange:e=>W([e,A])}),V&&(0,g.tZ)(c.rb,{min:E,max:A,included:!1,value:P[0],tipFormatter:F,marks:I,onAfterChange:e=>U([e,e]),onChange:e=>W([e,e])}),K&&(0,g.tZ)(c.rb,{range:!0,min:E,max:A,value:P,onAfterChange:U,onChange:W,tipFormatter:F,marks:I}))))}},74448:(e,n,t)=>{t.d(n,{Am:()=>u,h2:()=>a,jp:()=>i,un:()=>l});var r=t(51995),o=t(4591);const a=0,l=r.iK.div`
  min-height: ${({height:e})=>e}px;
  width: ${({width:e})=>e===a?"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}};
`},56080:(e,n,t)=>{t.d(n,{EG:()=>u,WO:()=>i,vb:()=>l});var r=t(88889),o=t(54076),a=t(61641);const l=(e,n,t=!1,r=!1)=>{const o={};return t?o.adhoc_filters=[{expressionType:a.p.Sql,clause:a.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,a)=>{if(null==t)return o.li;if("boolean"==typeof t)return t?o.Tb:o.jy;if(a===r.Z.Boolean)try{return JSON.parse(String(t).toLowerCase())?o.Tb:o.jy}catch{return o.jy}return"string"==typeof t?t:e&&a===r.Z.Temporal?e(t):n&&"number"==typeof t&&a===r.Z.Numeric?n(t):String(t)}}}}]);
//# sourceMappingURL=914095f2f05bba8443c9.chunk.js.map