"use strict";(globalThis.webpackChunksuperset=globalThis.webpackChunksuperset||[]).push([[7843],{12515:(e,t,r)=>{r.d(t,{Jp:()=>N,xW:()=>I,y8:()=>h,kN:()=>O,H6:()=>y,kP:()=>g,u:()=>R,pd:()=>U,Md:()=>D,pe:()=>w,AH:()=>b,bX:()=>v,CB:()=>G});var o=r(57557),a=r.n(o),n=r(67294),i=r(54998),s=r.n(i),l=r(11064),c=r(19427),_=r(61654),u=r(55786),E=r(86374),d=r(9679),p=r(27600),T=r(69856),S=r(80621),m=r(54076);function N(e){const{slice:t}=e;return t?t.slice_id:0}let A=0;function L(e=!1){let t=0;return e&&(t=A%E.X.length,A+=1,0===t&&(t+=1,A+=1)),E.X[t]}function I(e,t,r,o){if(null==e)return null;const a=r?"annotation_json":"slice_json";return s()(window.location.search).pathname(`/superset/${a}/${e}`).search({form_data:(0,d.o)(t,((e,t)=>null===t?void 0:t)),force:o}).toString()}function f(e="base"){return["full","json","csv","query","results","samples"].includes(e)?"/superset/explore_json/":"/superset/explore/"}function h(e,t={},r=!1){const o=new(s())("/"),a=f(e),n=o.search(!0);return Object.keys(t).forEach((e=>{n[e]=t[e]})),e===p.KD.standalone.name&&(r&&(n.force="1"),n.standalone=S._B.HIDE_NAV),o.directory(a).search(n).toString()}function O({path:e,qs:t,allowDomainSharding:r=!1}){let o=new(s())({protocol:window.location.protocol.slice(0,-1),hostname:L(r),port:window.location.port?window.location.port:"",path:e});return t&&(o=o.search(t)),o}function y({formData:e,endpointType:t="base",force:r=!1,curUrl:o=null,requestParams:a={},allowDomainSharding:n=!1,method:i="POST"}){if(!e.datasource)return null;delete e.label_colors;let l=O({path:"/",allowDomainSharding:n});o&&(l=s()(s()(o).search()));const c=f(t),_=l.search(!0),{slice_id:u,extra_filters:E,adhoc_filters:T,viz_type:S}=e;if(u){const e={slice_id:u};"GET"===i&&(e.viz_type=S,E&&E.length&&(e.extra_filters=E),T&&T.length&&(e.adhoc_filters=T)),_.form_data=(0,d.o)(e)}r&&(_.force="true"),"csv"===t&&(_.csv="true"),t===p.KD.standalone.name&&(_.standalone="1"),"query"===t&&(_.query="true"),"results"===t&&(_.results="true"),"samples"===t&&(_.samples="true");const m=Object.keys(a);return m.length&&m.forEach((e=>{a.hasOwnProperty(e)&&(_[e]=a[e])})),l.search(_).directory(c).toString()}const g=e=>{const t=(0,l.Z)().get(e.viz_type);return!!t&&t.useLegacyApi},R=({formData:e,force:t,resultFormat:r,resultType:o,setDataMask:n,ownState:i})=>{var s;const l=(null!=(s=(0,c.Z)().get(e.viz_type))?s:e=>(0,_.Z)(e,(e=>[{...e}])))({...e,force:t,result_format:r,result_type:o},{ownState:i,hooks:{setDataMask:n}});return"samples"===o&&(l.queries=l.queries.map((e=>a()(e,["row_limit","row_offset"])))),l},U=({resultType:e,resultFormat:t})=>"csv"===t?t:e;function D(e,t,r="_blank"){if(!e)return;const o=document.createElement("form");o.action=e,o.method="POST",o.target=r;const a=document.createElement("input");a.type="hidden",a.name="csrf_token",a.value=(document.getElementById("csrf_token")||{}).value,o.appendChild(a);const n=document.createElement("input");n.type="hidden",n.name="form_data",n.value=(0,d.o)(t),o.appendChild(n),document.body.appendChild(o),o.submit(),document.body.removeChild(o)}const w=({formData:e,resultFormat:t="json",resultType:r="full",force:o=!1,ownState:a={}})=>{let n,i;g(e)?(n=y({formData:e,endpointType:U({resultFormat:t,resultType:r}),allowDomainSharding:!1}),i=e):(n="/api/v1/chart/data",i=R({formData:e,force:o,resultFormat:t,resultType:r,ownState:a})),D(n,i)},b=e=>{D(y({formData:e,endpointType:"base",allowDomainSharding:!1}),e)},v=(e,t,r)=>{const o=(0,n.useCallback)(e,r);(0,n.useEffect)((()=>{const e=setTimeout((()=>{o()}),t);return()=>{clearTimeout(e)}}),[o,t])},G=(e,t,r)=>{const o=[...T.qK].map((e=>T.LT[e].operation)).indexOf(t)>=0;let a=null!=e?e:"";if(e&&t){a+=` ${t}`;const e=o&&Array.isArray(r)?r[0]:r,n=(0,u.Z)(r),i=void 0!==e&&Number.isNaN(Number(e)),s=i?"'":"",[l,c]=o?["(",")"]:["",""],_=n.map((e=>(0,m.lo)(e))).map((e=>`${s}${i?String(e).replace("'","''"):e}${s}`));n.length>0&&(a+=` ${l}${_.join(", ")}${c}`)}return a}},86374:(e,t,r)=>{r.d(t,{X:()=>n,_:()=>i});var o=r(91877),a=r(93185);const n=function(){var e;const t=document.getElementById("app");if(!t)return[];const r=new Set([window.location.hostname]);if("1"===new URLSearchParams(window.location.search).get("disableDomainSharding"))return Array.from(r);const n=JSON.parse(t.getAttribute("data-bootstrap"));return(0,o.fG)(null==n||null==(e=n.common)?void 0:e.feature_flags),(0,o.cr)(a.T.ALLOW_DASHBOARD_DOMAIN_SHARDING)&&n&&n.common&&n.common.conf&&n.common.conf.SUPERSET_WEBSERVER_DOMAINS&&n.common.conf.SUPERSET_WEBSERVER_DOMAINS.forEach((e=>{r.add(e)})),Array.from(r)}(),i=n.length>1},87183:(e,t,r)=>{r.d(t,{Y:()=>s});var o=r(51995),a=r(47933);const n=(0,o.iK)(a.ZP)`
  .ant-radio-inner {
    top: -1px;
    left: 2px;
    width: ${({theme:e})=>4*e.gridUnit}px;
    height: ${({theme:e})=>4*e.gridUnit}px;
    border-width: 2px;
    border-color: ${({theme:e})=>e.colors.grayscale.light2};
  }

  .ant-radio.ant-radio-checked {
    .ant-radio-inner {
      border-width: ${({theme:e})=>e.gridUnit+1}px;
      border-color: ${({theme:e})=>e.colors.primary.base};
    }

    .ant-radio-inner::after {
      background-color: ${({theme:e})=>e.colors.grayscale.light5};
      top: 0;
      left: 0;
      width: ${({theme:e})=>e.gridUnit+2}px;
      height: ${({theme:e})=>e.gridUnit+2}px;
    }
  }

  .ant-radio:hover,
  .ant-radio:focus {
    .ant-radio-inner {
      border-color: ${({theme:e})=>e.colors.primary.dark1};
    }
  }
`,i=(0,o.iK)(a.ZP.Group)`
  font-size: inherit;
`,s=Object.assign(n,{Group:i})},69856:(e,t,r)=>{r.d(t,{YY:()=>a,Ps:()=>n,d:()=>i,LT:()=>s,GS:()=>l,QB:()=>c,fV:()=>_,Ak:()=>u,qK:()=>E,qB:()=>d,yi:()=>p,Q_:()=>T,m_:()=>S,ft:()=>m,cM:()=>N,i2:()=>A,X5:()=>L,vM:()=>I,Qi:()=>f,Yd:()=>h,H7:()=>O,kc:()=>y,vK:()=>g});var o=r(61988);const a={AVG:"AVG",COUNT:"COUNT",COUNT_DISTINCT:"COUNT_DISTINCT",MAX:"MAX",MIN:"MIN",SUM:"SUM"},n=Object.values(a);var i;!function(e){e.EQUALS="EQUALS",e.NOT_EQUALS="NOT_EQUALS",e.LESS_THAN="LESS_THAN",e.GREATER_THAN="GREATER_THAN",e.LESS_THAN_OR_EQUAL="LESS_THAN_OR_EQUAL",e.GREATER_THAN_OR_EQUAL="GREATER_THAN_OR_EQUAL",e.IN="IN",e.NOT_IN="NOT_IN",e.ILIKE="ILIKE",e.LIKE="LIKE",e.REGEX="REGEX",e.IS_NOT_NULL="IS_NOT_NULL",e.IS_NULL="IS_NULL",e.LATEST_PARTITION="LATEST_PARTITION",e.IS_TRUE="IS_TRUE",e.IS_FALSE="IS_FALSE"}(i||(i={}));const s={[i.EQUALS]:{display:"equals",operation:"=="},[i.NOT_EQUALS]:{display:"not equals",operation:"!="},[i.GREATER_THAN]:{display:">",operation:">"},[i.LESS_THAN]:{display:"<",operation:"<"},[i.GREATER_THAN_OR_EQUAL]:{display:">=",operation:">="},[i.LESS_THAN_OR_EQUAL]:{display:"<=",operation:"<="},[i.IN]:{display:"IN",operation:"IN"},[i.NOT_IN]:{display:"NOT IN",operation:"NOT IN"},[i.LIKE]:{display:"LIKE",operation:"LIKE"},[i.ILIKE]:{display:"LIKE (case insensitive)",operation:"ILIKE"},[i.REGEX]:{display:"REGEX",operation:"REGEX"},[i.IS_NOT_NULL]:{display:"IS NOT NULL",operation:"IS NOT NULL"},[i.IS_NULL]:{display:"IS NULL",operation:"IS NULL"},[i.LATEST_PARTITION]:{display:"use latest_partition template",operation:"LATEST PARTITION"},[i.IS_TRUE]:{display:"IS TRUE",operation:"=="},[i.IS_FALSE]:{display:"IS FALSE",operation:"=="}},l=Object.values(i),c=[i.LIKE,i.ILIKE],_=[i.REGEX],u=[i.EQUALS,i.NOT_EQUALS,i.GREATER_THAN,i.LESS_THAN,i.GREATER_THAN_OR_EQUAL,i.LESS_THAN_OR_EQUAL],E=new Set([i.IN,i.NOT_IN]),d=new Set([i.LATEST_PARTITION]),p=[i.IS_NOT_NULL,i.IS_NULL,i.LATEST_PARTITION,i.IS_TRUE,i.IS_FALSE],T=/^(LONG|DOUBLE|FLOAT)?(SUM|AVG|MAX|MIN|COUNT)\([A-Z0-9_."]*\)$/i,S={time_range:(0,o.t)("Time range"),granularity_sqla:(0,o.t)("Time column"),time_grain_sqla:(0,o.t)("Time grain"),druid_time_origin:(0,o.t)("Origin"),granularity:(0,o.t)("Time granularity")},m={CLEARABLE:"clearable",DEFAULT_VALUE:"defaultValue",MULTIPLE:"multiple",SEARCH_ALL_OPTIONS:"searchAllOptions",SORT_ASCENDING:"asc",SORT_METRIC:"metric"},N=1e3,A={time_range:"__time_range",granularity_sqla:"__time_col",time_grain_sqla:"__time_grain",druid_time_origin:"__time_origin",granularity:"__granularity"},L="No filter",I="No filter";var f;!function(e){e.CONVERTED="CONVERTED",e.NOOP="NOOP",e.REVIEWING="REVIEWING",e.SNOOZED="SNOOZED",e.UNDECIDED="UNDECIDED"}(f||(f={}));const h=864e5,O=240,y=320,g=296},9679:(e,t,r)=>{function o(e){const t=new Set;return JSON.stringify(e,((e,r)=>{if("object"==typeof r&&null!==r){if(t.has(r))try{return JSON.parse(JSON.stringify(r))}catch(e){return}t.add(r)}return r}))}r.d(t,{o:()=>o})}}]);