forked from duneanalytics/DuneQueryRepo
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path2547-ce75fbd1191a0e52.js.download
2 lines (2 loc) · 14.1 KB
/
2547-ce75fbd1191a0e52.js.download
1
2
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2547],{12098:function(e,n,t){"use strict";t.d(n,{u:function(){return y}});var r=t(85893),s=t(65240),i=t.n(s),o=t(45186),c=t(32613),l=t(76350),a=t(11893),u=t(95965),d=t(78528),h=t(67294),x=t(56446);function m(e){let{state:n,setState:t}=e,s=(0,x.mB)(n.cronString);function c(e){t(n=>({...n,cronString:(0,x.ec)(n.cronString,e)}))}let[l,a]=(0,h.useState)(!1);return(0,r.jsxs)("label",{className:i().label,children:[(0,r.jsx)("span",{children:"Every"}),(0,r.jsx)(o.r,{isOpen:l,setIsOpen:a,position:"below-align-left",content:e=>{let{close:n}=e;return(0,r.jsx)(p,{selectedOption:s,setSelectedOption:c,close:n})},children:(0,r.jsxs)("button",{type:"button",children:[(0,r.jsx)("span",{className:i().fieldText,children:null!=s?s:"Unset"}),l?(0,r.jsx)(u.IconChevronUp,{}):(0,r.jsx)(d.IconChevronDown,{})]})})]})}function p(e){var n;let{selectedOption:t,setSelectedOption:s,close:i}=e,o=null!==(n=x.UV.find(e=>(0,x.u$)(e).includes(t)))&&void 0!==n?n:x.UV[0],[u,d]=(0,h.useState)(null!=o?o:"Minute"),m=(0,x.u$)(u);return(0,r.jsx)(c.s_,{children:(0,r.jsx)(c.$0,{wrapTitle:!1,title:(0,r.jsx)(l.t,{size:"M",children:x.UV.map(e=>(0,r.jsx)(a.O,{active:e===u,onClick:()=>{d(e);let n=(0,x.u$)(e);1===n.length&&(s(n[0]),i())},children:e},e))}),children:1!==m.length&&m.map(e=>(0,r.jsx)(c.ys,{selected:e===t,onClick:()=>{s(e),i()},children:e},e))})})}var f=t(75458);function j(e){var n;let{state:t,setState:s}=e,l=(0,f.l0)(t.cronString),[a,x]=(0,h.useState)(!1);return(0,r.jsxs)("label",{className:i().label,children:[(0,r.jsx)("span",{children:"At this time"}),(0,r.jsx)(o.r,{isOpen:a,setIsOpen:x,position:"below-align-left",content:e=>{let{close:n}=e;return(0,r.jsx)(c.s_,{children:(0,r.jsx)(c.$0,{maxHeight:"30.5rem",children:f.jb.map(e=>(0,r.jsx)(c.ys,{selected:e===l,onClick:()=>{s(n=>({...n,cronString:(0,f.Y0)(n.cronString,e)})),n()},children:e.display},e.display))})})},children:(0,r.jsxs)("button",{type:"button",children:[(0,r.jsx)("span",{className:i().fieldText,children:null!==(n=null==l?void 0:l.display)&&void 0!==n?n:"Unset"}),a?(0,r.jsx)(u.IconChevronUp,{}):(0,r.jsx)(d.IconChevronDown,{})]})})]})}var g=t(94184),b=t.n(g),w=t(47730);function v(e){let[n]=(0,h.useState)(!1);return(0,r.jsxs)("label",{className:b()(i().label,i().disabled),children:[(0,r.jsx)("span",{children:"Timezone"}),(0,r.jsx)(w.u,{position:"below-center",label:"More timezones coming soon!",children:(0,r.jsxs)("button",{type:"button",disabled:!0,children:[(0,r.jsx)("span",{className:i().fieldText,children:"UTC"}),n?(0,r.jsx)(u.IconChevronUp,{}):(0,r.jsx)(d.IconChevronDown,{})]})})]})}function y(e){let{state:n,setState:t}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:i().row,children:(0,r.jsx)(m,{state:n,setState:t})}),(0,x.wX)(n.cronString)&&(0,r.jsxs)("div",{className:i().row,children:[(0,r.jsx)(j,{state:n,setState:t}),(0,r.jsx)(v,{state:n,setState:t})]})]})}},85592:function(e,n,t){"use strict";t.d(n,{Ys:function(){return v},C2:function(){return b},nn:function(){return y}});var r=t(85893),s=t(65240),i=t.n(s),o=t(45186),c=t(17870),l=t(61857),a=t(95965),u=t(78528),d=t(67294);function h(e){let{selectedPerformance:n,setSelectedPerformance:t}=e,[s,h]=(0,d.useState)(!1);return(0,r.jsxs)("label",{className:i().label,children:[(0,r.jsx)("span",{children:"Execution tier"}),(0,r.jsx)(o.r,{isOpen:s,setIsOpen:h,position:"below-align-left",content:s=>{let{close:i}=s;return(0,r.jsx)(c.l,{activeContext:e.contextOwner,performanceTiers:e.performanceTiers,performance:n,setPerformance:t,close:i})},children:(0,r.jsxs)("button",{type:"button",children:[function(){let t=e.performanceTiers.find(e=>e.publicPerformanceTierKey===n);return t?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.P,{performance:t.publicPerformanceTierKey}),(0,r.jsx)("span",{className:i().fieldText,children:t.displayName})]}):(0,r.jsx)("span",{className:i().fieldText,children:"Unset"})}(),(0,r.jsx)(l.i,{size:"M",color:"text-secondary",flip:!0,owner:e.contextOwner}),s?(0,r.jsx)(a.IconChevronUp,{}):(0,r.jsx)(u.IconChevronDown,{})]})})]})}var x=t(42665),m=t(68357),p=t(43953),f=t(56446),j=t(84512),g=t(55754);function b(e){let{state:n,cost:{planMonthlyCredits:t,monthlyCredits:s}}=e,i=(0,f.mB)(n.cronString);return void 0===i?null:s>t?(0,r.jsx)(x.P,{level:"warning",title:"Not enough credits to run this query",description:(0,r.jsxs)(r.Fragment,{children:["This query's execution cost will be up to"," ",(0,r.jsxs)("strong",{children:[s," credits per month"]}),". This amount exceeds your subscription's total credit allowance. To run this query efficiently, please"," ",(0,r.jsx)("strong",{children:'toggle your plan\'s "extra credits limit" off'}),", or increase your plan's extra credits limit amount."]}),actions:(0,r.jsxs)(m.L,{size:"M",theme:"tertiary",href:function(e){switch(e.type){case"user":return"/settings/subscription";case"team":return"/settings/teams/manage/".concat(e.handle,"/subscription")}}(e.contextOwner),target:"_blank",children:["Manage subscription",(0,r.jsx)(p.IconArrowRight,{})]}),dismissable:!1}):(0,r.jsx)(x.P,{level:"info",title:function(e,n){let t=(0,j.Gs)(n);return(0,f.wX)(n)?(0,r.jsxs)(r.Fragment,{children:["This query will run continuously every ",(0,f.Y3)(e),t&&(0,r.jsxs)(r.Fragment,{children:[" ","between ",(0,g.Z)(t,"HH:mm"),"\xa0-\xa0",(0,g.Z)(new Date(t).getTime()+18e5,"HH:mm"),"\xa0UTC"]})]}):(0,r.jsxs)(r.Fragment,{children:["This query will run continuously every ",(0,f.Y3)(e),t&&(0,r.jsxs)(r.Fragment,{children:[".",(0,r.jsx)("br",{}),"The next run will be at ",(0,g.Z)(t,"HH:mm")," UTC."]})]})}(i,n.cronString),description:(0,r.jsxs)(r.Fragment,{children:["The estimated execution cost is"," ",(0,r.jsxs)("strong",{children:[s," credits"]})," per month (",Math.round(s/t*100),"% of your monthly quota)."]}),dismissable:!1})}var w=t(68444);function v(e){let{state:n,cost:{planMonthlyCredits:t,monthlyCredits:s}}=e,i=(0,f.mB)(n.cronString);return void 0===i?null:s>t?(0,r.jsx)(w.P,{level:"warning",title:"Not enough credits to run this dashboard",description:(0,r.jsxs)(r.Fragment,{children:["This dashboard's execution cost will be up to"," ",(0,r.jsxs)("strong",{children:[s," credits per month"]})," with the queries it currently contains. This amount exceeds your subscription's total credit allowance. To run this dashboard efficiently, please"," ",(0,r.jsx)("strong",{children:'toggle your plan\'s "extra credits limit" off'}),", or increase your plan's extra credits limit amount."]}),actions:(0,r.jsxs)(m.L,{size:"M",theme:"tertiary",href:function(e){switch(e.type){case"user":return"/settings/subscription";case"team":return"/settings/teams/manage/".concat(e.handle,"/subscription")}}(e.contextOwner),target:"_blank",children:["Manage subscription",(0,r.jsx)(p.IconArrowRight,{})]}),dismissable:!1}):(0,r.jsx)(w.P,{level:"info",title:function(e,n){let t=(0,j.Gs)(n);return(0,f.wX)(n)?(0,r.jsxs)(r.Fragment,{children:["This dashboard will run continuously every"," ",(0,f.Y3)(e),t&&(0,r.jsxs)(r.Fragment,{children:[" ","between ",(0,g.Z)(t,"HH:mm"),"\xa0-\xa0",(0,g.Z)(new Date(t).getTime()+18e5,"HH:mm"),"\xa0UTC"]})]}):(0,r.jsxs)(r.Fragment,{children:["This dashboard will run continuously every"," ",(0,f.Y3)(e),t&&(0,r.jsxs)(r.Fragment,{children:[".",(0,r.jsx)("br",{}),"The next run will be at ",(0,g.Z)(t,"HH:mm")," UTC."]})]})}(i,n.cronString),description:(0,r.jsxs)(r.Fragment,{children:["The estimated execution cost is"," ",(0,r.jsxs)("strong",{children:[s," credits"]})," per month (",Math.round(s/t*100),"% of your monthly quota). Adding or removing queries from this dashboard will impact the amount of credits used."]}),dismissable:!1})}function y(e){let{contextOwner:n,performanceTiers:t,state:s,setState:o,CostNotification:c,cost:l}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:i().row,children:(0,r.jsx)(h,{contextOwner:n,performanceTiers:t,selectedPerformance:s.performanceTier,setSelectedPerformance:e=>o(n=>({...n,performanceTier:e}))})}),c&&(0,r.jsx)(c,{contextOwner:n,performanceTiers:t,state:s,cost:l})]})}},98570:function(e,n,t){"use strict";t.d(n,{Z:function(){return s}});var r=t(40551);function s(e){switch(e){case"15 minutes":return 2980;case"20 minutes":return 2235;case"30 minutes":return 1490;case"1 hour":return 745;case"2 hours":return Math.ceil(372.5);case"3 hours":return Math.ceil(745/3);case"4 hours":return Math.ceil(186.25);case"6 hours":return Math.ceil(745/6);case"8 hours":return Math.ceil(93.125);case"12 hours":return Math.ceil(745/12);case"Day":return 31;case"Monday":case"Tuesday":case"Wednesday":case"Thursday":case"Friday":case"Saturday":case"Sunday":return 5;default:(0,r.U)(e)}}},75458:function(e,n,t){"use strict";t.d(n,{Y0:function(){return o},jb:function(){return s},l0:function(){return i}});var r=t(84512);let s=Array(48).fill(0).map((e,n)=>{let t=Math.floor(n/2),r=n%2==0?0:30,s="0".concat(t).slice(-2),i="0".concat(r).slice(-2);return{hour:t,minute:r,display:"".concat(s,":").concat(i)}}).reduce((e,n,t,r)=>{let s=r[(t+1)%r.length],i={start:n,end:s,display:"".concat(n.display," – ").concat(s.display)};return e.concat(i)},[]);function i(e){let{hour:n,minute:t}=(0,r.BU)(e);return s.find(e=>("*"===n||n===String(e.start.hour))&&("*"===t||t===String(e.start.minute)))}function o(e,n){return(0,r.n1)(e)({hour:"".concat(n.start.hour),minute:"".concat(n.start.minute)})}},17870:function(e,n,t){"use strict";t.d(n,{P:function(){return j},l:function(){return f}});var r=t(85893),s=t(96530),i=t.n(s),o=t(32613),c=t(1801),l=t(61857),a=t(33735),u=t(70785),d=t(47021),h=t(23735),x=t(21647),m=t(94184),p=t.n(m);function f(e){let{performance:n,setPerformance:t,performanceTiers:s}=e;return(0,r.jsxs)(o.s_,{className:i().menu,children:[(0,r.jsx)(o.$0,{title:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:i().title,children:"Query engine size"}),(0,r.jsx)(l.i,{size:"S",color:"inherit",flip:!0,owner:e.activeContext})]}),children:s.map(s=>{let l="disabled"in s&&s.disabled;return(0,r.jsx)(x.n,{as:"li",openOn:"hover",position:"left-of-center",enabled:l,content:()=>(0,r.jsx)("div",{style:{maxWidth:250,whiteSpace:"normal"},children:"upsellMessage"in s?s.upsellMessage:null}),children:(0,r.jsx)("ul",{className:p()(l&&i().optionDisabled),children:(0,r.jsxs)(o.ys,{disabled:l,active:n===s.publicPerformanceTierKey,onClick:()=>{t(s.publicPerformanceTierKey),e.close()},description:s.description,hasIconBeforeText:!0,children:[(0,r.jsx)(j,{performance:s.publicPerformanceTierKey}),(0,r.jsx)("span",{children:s.displayName}),(0,r.jsxs)(c.C,{size:"M",color:l?"neutral":"brand-blue",variant:"filled",children:[s.credits,(0,r.jsx)(h.IconCoins,{})]})]},s.publicPerformanceTierKey)})},s.publicPerformanceTierKey)})}),(0,r.jsx)(o.$0,{children:(0,r.jsx)(o.FB,{href:"/docs/query/query-executions/#query-engine-size",target:"_blank",color:"blue",children:"Learn more"})})]})}function j(e){switch(e.performance){case"free":return(0,r.jsx)(a.IconStackOne,{});case"medium":return(0,r.jsx)(u.IconStackTwo,{});case"large":return(0,r.jsx)(d.IconStackThree,{})}}},13498:function(e,n,t){"use strict";t.d(n,{G:function(){return d},z:function(){return h}});var r=t(85893),s=t(67294),i=t(94184),o=t.n(i),c=t(55907),l=t.n(c),a=t(78528),u=t(97100);let d=e=>{let{title:n,isOpen:t,setIsOpen:i,children:c,className:d}=e,h=(0,s.useCallback)(()=>i(e=>!e),[i]);return(0,r.jsxs)("div",{className:o()(l().container,d),children:[(0,r.jsxs)("div",{className:l().title,onClick:h,children:[n,t?(0,r.jsx)(a.IconChevronDown,{}):(0,r.jsx)(u.IconChevronLeft,{})]}),(0,r.jsx)("div",{className:o()(l().childContainer,t&&l().open),children:c})]})},h=e=>{let{initialIsOpen:n=!1,...t}=e,[i,o]=(0,s.useState)(n);return(0,r.jsx)(d,{...t,isOpen:i,setIsOpen:o})}},43953:function(e,n,t){"use strict";t.r(n),t.d(n,{IconArrowRight:function(){return s}});var r=t(85893);function s(){return(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1 8C1 7.72386 1.22386 7.5 1.5 7.5L13.2929 7.5L10.1464 4.35355C9.95118 4.15829 9.95118 3.84171 10.1464 3.64645C10.3417 3.45118 10.6583 3.45118 10.8536 3.64645L14.8536 7.64645C15.0488 7.84171 15.0488 8.15829 14.8536 8.35355L10.8536 12.3536C10.6583 12.5488 10.3417 12.5488 10.1464 12.3536C9.95118 12.1583 9.95118 11.8417 10.1464 11.6464L13.2929 8.5H1.5C1.22386 8.5 1 8.27614 1 8Z",fill:"currentColor"})})}},97100:function(e,n,t){"use strict";t.r(n),t.d(n,{IconChevronLeft:function(){return s}});var r=t(85893);let s=()=>(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.3536 1.64645C11.5488 1.84171 11.5488 2.15829 11.3536 2.35355L5.70711 8L11.3536 13.6464C11.5488 13.8417 11.5488 14.1583 11.3536 14.3536C11.1583 14.5488 10.8417 14.5488 10.6464 14.3536L4.64645 8.35355C4.45118 8.15829 4.45118 7.84171 4.64645 7.64645L10.6464 1.64645C10.8417 1.45118 11.1583 1.45118 11.3536 1.64645Z",fill:"currentColor"})})},33735:function(e,n,t){"use strict";t.r(n),t.d(n,{IconStackOne:function(){return s}});var r=t(85893);function s(){return(0,r.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M1 7.5L8 11.5L15 7.5L8 3.5L1 7.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})})}},70785:function(e,n,t){"use strict";t.r(n),t.d(n,{IconStackTwo:function(){return s}});var r=t(85893);function s(){return(0,r.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M1 6.5L8 10.5L15 6.5L8 2.5L1 6.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M1 9L8 13L15 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})]})}},65240:function(e){e.exports={fields:"Form_fields__ZZ9NZ",row:"Form_row__MS2I_",label:"Form_label__wkj7y",fieldText:"Form_fieldText__5puJf",disabled:"Form_disabled__jJ_AT",errorMessage:"Form_errorMessage__U5XmW"}},96530:function(e){e.exports={menu:"SelectPerformance_menu__10DfU",title:"SelectPerformance_title__QhOnb",optionDisabled:"SelectPerformance_optionDisabled__ewMhF"}},55907:function(e){e.exports={container:"Collapsible_container__P5Vej",title:"Collapsible_title__MQeL0",childContainer:"Collapsible_childContainer__sEk8E",open:"Collapsible_open__B3YmF"}}}]);
//# sourceMappingURL=2547-ce75fbd1191a0e52.js.map