"use strict";(globalThis.webpackChunksuperset=globalThis.webpackChunksuperset||[]).push([[2236],{11950:(e,t,n)=>{var r=n(64836),a=n(16338);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.HOOK_MARK=void 0;var o=a(n(67294)),i=r(n(45520));t.HOOK_MARK="RC_FORM_INTERNAL_HOOKS";var l=function(){(0,i.default)(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},u=o.createContext({getFieldValue:l,getFieldsValue:l,getFieldError:l,getFieldsError:l,isFieldsTouched:l,isFieldTouched:l,isFieldValidating:l,isFieldsValidating:l,resetFields:l,setFields:l,setFieldsValue:l,validateFields:l,submit:l,getInternalHooks:function(){return l(),{dispatch:l,initEntityValue:l,registerField:l,useSubscribe:l,setInitialValues:l,setCallbacks:l,getFields:l,setValidateMessages:l,setPreserve:l}}});t.default=u},67265:(e,t,n)=>{var r=n(16338).default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r=a.useRef({});return"value"in r.current&&!n(r.current.condition,t)||(r.current.value=e(),r.current.condition=t),r.current.value};var a=r(n(67294))},64543:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){return+setTimeout(e,16)},r=function(e){return clearTimeout(e)};"undefined"!=typeof window&&"requestAnimationFrame"in window&&(n=function(e){return window.requestAnimationFrame(e)},r=function(e){return window.cancelAnimationFrame(e)});var a=0,o=new Map;function i(e){o.delete(e)}var l=function(e){var t=a+=1;return function r(a){if(0===a)i(t),e();else{var l=n((function(){r(a-1)}));o.set(t,l)}}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:1),t};l.cancel=function(e){var t=o.get(e);return i(e),r(t)},t.default=l},75531:(e,t,n)=>{var r=n(64836).default;Object.defineProperty(t,"__esModule",{value:!0}),t.composeRef=s,t.fillRef=u,t.supportNodeRef=function(e){return!!(0,o.isValidElement)(e)&&(!(0,i.isFragment)(e)&&c(e))},t.supportRef=c,t.useComposeRef=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,l.default)((function(){return s.apply(void 0,t)}),t,(function(e,t){return e.length!==t.length||e.every((function(e,n){return e!==t[n]}))}))};var a=r(n(18698)),o=n(67294),i=n(11805),l=r(n(67265));function u(e,t){"function"==typeof e?e(t):"object"===(0,a.default)(e)&&e&&"current"in e&&(e.current=t)}function s(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter((function(e){return e}));return r.length<=1?r[0]:function(e){t.forEach((function(t){u(t,e)}))}}function c(e){var t,n,r=(0,i.isMemo)(e)?e.type.type:e.type;return!!("function"!=typeof r||null!==(t=r.prototype)&&void 0!==t&&t.render)&&!!("function"!=typeof e||null!==(n=e.prototype)&&void 0!==n&&n.render)}},47249:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(90317),a=n(69842),o=n(69244);function i(e,t=!1){const n=t?r.i$:r.g0,i=n("%Y-%m-%d %H:%M:%S.%L"),l=n("%Y-%m-%d %H:%M:%S"),u=n("%Y-%m-%d %H:%M"),s=n("%Y-%m-%d %H:%M"),c=n("%Y-%m-%d"),d=n("%Y-%m-%d"),f=n("%Y"),{hasMillisecond:p,hasSecond:m,hasMinute:v,hasHour:h,isNotFirstDayOfMonth:g,isNotFirstMonth:y}=t?a.Z:a.b;let S=f;return e.forEach((e=>{S===f&&y(e)&&(S=d),S===d&&g(e)&&(S=c),S===c&&h(e)&&(S=s),S===s&&v(e)&&(S=u),S===u&&m(e)&&(S=l),S===l&&p(e)&&(S=i)})),new o.Z({description:"Use the finest grain in an array of dates to format all dates in the array",formatFunc:S,id:"finest_temporal_grain",label:"Format temporal columns with the finest grain",useLocalTime:t})}},4591:(e,t,n)=>{n.d(t,{Z:()=>a});var r=n(97538);const a=(0,n(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,t,n)=>{var r,a;n.d(t,{N:()=>a,p:()=>r}),function(e){e.Simple="SIMPLE",e.Sql="SQL"}(r||(r={})),function(e){e.Having="HAVING",e.Where="WHERE"}(a||(a={}))},45181:(e,t,n)=>{n.r(t),n.d(t,{default:()=>F});var r=n(23279),a=n.n(r),o=n(67294),i=n(55786),l=n(10581),u=n(47249),s=n(61988),c=n(16355),d=n(90057),f=n(4715),p=n(27600),m=n(85633),v=n(52004),h=n(74448),g=n(56080),y=n(11965);function S(e,t){switch(t.type){case"ownState":return e.ownState={...e.ownState,...t.ownState},e;case"filterState":return JSON.stringify(e.extraFormData)!==JSON.stringify(t.extraFormData)&&(e.extraFormData=t.extraFormData),JSON.stringify(e.filterState)!==JSON.stringify(t.filterState)&&(e.filterState={...e.filterState,...t.filterState}),e;default:return e}}function F(e){const{coltypeMap:t,data:n,filterState:r,formData:F,height:b,isRefreshing:w,width:M,setDataMask:O,setHoveredFilter:N,unsetHoveredFilter:C,setFocusedFilter:x,unsetFocusedFilter:E,setFilterActive:Z,appSection:A,showOverflow:R,parentRef:T,inputRef:_,filterBarOrientation:k}=e,{enableEmptyFilter:H,multiSelect:$,showSearch:V,inverseSelection:j,defaultToFirstItem:D,searchAllOptions:I}=F,K=(0,o.useMemo)((()=>(0,i.Z)(F.groupby).map(l.Z)),[F.groupby]),[P]=K,[q]=(0,o.useState)(t),[J,L]=(0,o.useState)(""),[Y,z]=(0,d.C)(S,{extraFormData:{},filterState:r}),B=t[P],G=(0,o.useMemo)((()=>(0,g.EG)({timeFormatter:(0,u.Z)(n.map((e=>e[P])))})),[n,P]),U=(0,o.useCallback)((e=>{const t=H&&!j&&!(null!=e&&e.length),n=j&&null!=e&&e.length?(0,s.t)(" (excluded)"):"";z({type:"filterState",extraFormData:(0,g.vb)(P,e,t,j),filterState:{...r,label:null!=e&&e.length?`${(e||[]).map((e=>G(e,B))).join(", ")}${n}`:void 0,value:A===c.Tr.FilterConfigModal&&D?void 0:e}})}),[A,P,B,D,z,H,j,JSON.stringify(r),G]),W=A===c.Tr.FilterConfigModal&&D,Q=(0,o.useMemo)((()=>a()((e=>{L(e),I&&z({type:"ownState",ownState:{coltypeMap:q,search:e}})}),p.M$)),[z,q,I]),X=(0,o.useCallback)((()=>{E()}),[E]),ee=(0,o.useCallback)((e=>{const t=null===e?[null]:(0,i.Z)(e);0===t.length?U(null):U(t)}),[U]),te=0===n.length?(0,s.t)("No data"):(0,s.tn)("%s option","%s options",n.length,n.length),ne=(0,o.useMemo)((()=>{if(r.validateMessage)return(0,y.tZ)(h.Am,{status:r.validateStatus},r.validateMessage)}),[r.validateMessage,r.validateStatus]),re=(0,o.useMemo)((()=>[...new Set([...n.map((e=>e[P]))])].map((e=>({label:G(e,B),value:e,isNewOption:!1})))),[n,B,P,G]),ae=(0,o.useMemo)((()=>(!J||$||(0,m.Gq)(J,re,!0)||re.unshift({label:J,value:J,isNewOption:!0}),re)),[$,J,re]),oe=(0,o.useCallback)(((e,t)=>{const n=(0,m.mj)("label");return F.sortAscending?n(e,t):n(t,e)}),[F.sortAscending]);return(0,o.useEffect)((()=>{if(D&&void 0===r.value){const e=n[0]?K.map((e=>n[0][e])):null;void 0!==(null==e?void 0:e[0])&&U(e)}else U(W?null:r.value)}),[P,W,D,H,j,U,n,K,JSON.stringify(r.value)]),(0,o.useEffect)((()=>{O(Y)}),[JSON.stringify(Y)]),(0,y.tZ)(h.un,{height:b,width:M},(0,y.tZ)(h.jp,{validateStatus:r.validateStatus,extra:ne},(0,y.tZ)(f.Ph,{allowClear:!0,allowNewOptions:!0,allowSelectAll:!I,value:r.value||[],disabled:W,getPopupContainer:R?()=>(null==T?void 0:T.current)||document.body:e=>(null==e?void 0:e.parentNode)||document.body,showSearch:V,mode:$?"multiple":"single",placeholder:te,onSearch:Q,onBlur:X,onFocus:x,onMouseEnter:N,onMouseLeave:C,onChange:ee,ref:_,loading:w,oneLine:k===v.Bp.Horizontal,invertSelection:j,options:ae,sortComparator:oe,onDropdownVisibleChange:Z})))}},74448:(e,t,n)=>{n.d(t,{Am:()=>u,h2:()=>o,jp:()=>l,un:()=>i});var r=n(51995),a=n(4591);const o=0,i=r.iK.div`
  min-height: ${({height:e})=>e}px;
  width: ${({width:e})=>e===o?"100%":`${e}px`};
`,l=(0,r.iK)(a.Z)`
  &.ant-row.ant-form-item {
    margin: 0;
  }
`,u=r.iK.div`
  color: ${({theme:e,status:t="error"})=>{var n;return null==(n=e.colors[t])?void 0:n.base}};
`},56080:(e,t,n)=>{n.d(t,{EG:()=>u,WO:()=>l,vb:()=>i});var r=n(88889),a=n(54076),o=n(61641);const i=(e,t,n=!1,r=!1)=>{const a={};return n?a.adhoc_filters=[{expressionType:o.p.Sql,clause:o.N.Where,sqlExpression:"1 = 0"}]:null!=t&&0!==t.length&&(a.filters=[{col:e,op:r?"NOT IN":"IN",val:t}]),a},l=(e,t,n)=>{const r=[];return null!=t&&t!==n&&r.push({col:e,op:">=",val:t}),null!=n&&n!==t&&r.push({col:e,op:"<=",val:n}),null!=n&&null!=t&&n===t&&r.push({col:e,op:"==",val:n}),r.length?{filters:r}:{}};function u({timeFormatter:e,numberFormatter:t}={}){return(n,o)=>{if(null==n)return a.li;if("boolean"==typeof n)return n?a.Tb:a.jy;if(o===r.Z.Boolean)try{return JSON.parse(String(n).toLowerCase())?a.Tb:a.jy}catch{return a.jy}return"string"==typeof n?n:e&&o===r.Z.Temporal?e(n):t&&"number"==typeof n&&o===r.Z.Numeric?t(n):String(n)}}},90057:(e,t,n)=>{n.d(t,{C:()=>i,x:()=>o});var r=n(12902),a=n(67294);function o(e){var t=(0,a.useState)((function(){return(0,r.vV)("function"==typeof e?e():e,!0)})),n=t[1];return[t[0],(0,a.useCallback)((function(e){n("function"==typeof e?(0,r.Uy)(e):(0,r.vV)(e))}),[])]}function i(e,t,n){var o=(0,a.useMemo)((function(){return(0,r.Uy)(e)}),[e]);return(0,a.useReducer)(o,t,n)}}}]);
//# sourceMappingURL=6eda89a882db505f6ce8.chunk.js.map