@spaceandtimelabs/dapp-mi-space-time 0.1.7-227 → 0.1.7-228

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- import{m2 as o,j as e,r as t}from"./vendor-charts-983c7ae8.js";import{u as n,O as s,E as d,a as p}from"./index-0bf8a350.js";import"./vendor-editor-a0c582a1.js";import"./vendor-three-8b2e11db.js";const x=r=>{const a=o(),{height:i}=n();return e.jsx(t.Suspense,{fallback:s,children:e.jsx(d,{pageHeight:i,children:a?e.jsx(s,{}):e.jsx(p,{...r,hideSchemaSidebar:!1})})})};export{x as default};
1
+ import{m2 as o,j as e,r as t}from"./vendor-charts-c2d37c0c.js";import{u as n,O as s,E as d,a as p}from"./index-24f62d99.js";import"./vendor-editor-c82365af.js";import"./vendor-three-8b64368a.js";const x=r=>{const a=o(),{height:i}=n();return e.jsx(t.Suspense,{fallback:s,children:e.jsx(d,{pageHeight:i,children:a?e.jsx(s,{}):e.jsx(p,{...r,hideSchemaSidebar:!1})})})};export{x as default};
@@ -1 +1 @@
1
- import{iq as Ue,o_ as jt,r as h,a3 as Te,j as e,ae as Qe,aW as i,e5 as We,o$ as Et,e2 as Le,p0 as Ct,p1 as Nt,cL as Ce,el as be,eM as Ae,ad as Ne,n6 as $e,dA as Me,dL as ve,p2 as Tt,p3 as bt,p4 as yt,ex as g,eQ as at,a4 as Rt,dB as de,eS as mt,bn as Qt,ol as vt,aO as Dt,ez as It,cZ as it,cQ as _t,cC as Ee,fc as Ot,p5 as wt,f5 as Ut,R as Ht,ak as Lt,fg as At,oB as T,am as fe,dj as ce,fu as Xe,eN as Ze,bx as De,oC as Mt,eK as Je,fp as Bt,fq as Se,aZ as le,cu as Ie,aL as kt,cv as zt,eJ as _e,eI as Oe,fr as Vt,cy as Kt,p6 as Yt}from"./vendor-charts-983c7ae8.js";import{u as ye,b as Gt,c as Wt,d as ct,e as Be,f as ke,r as Fe,g as ze,C as Pe,h as qe,M as $t,V as Ve,P as Ke,i as Xt,H as Zt,j as Ye,I as V,B as M,k as Jt,l as Ft,m as Pt,n as He,N as we,o as he,L as qt,p as en,s as re,q as tn,t as nn,v as lt,w as rt,T as dt,x as sn,y as ht,z as gt,A as on,D as an,F as cn,G as et,J as ln,O as rn,K as dn,R as tt,S as hn,W as gn,U as nt,X as st,Y as ot,Z as je,_ as un,$ as xn,a0 as pn,a1 as fn,a2 as Sn,a3 as jn}from"./index-0bf8a350.js";import"./vendor-editor-a0c582a1.js";import"./vendor-three-8b2e11db.js";const En="/assets/emptyHistory-39807386.png",Cn="/assets/emptyHistory-e09c1ac9.webp",Nn="/assets/heartbeat-d012a4c0.png";Ue.extend(jt);function Tn({queryParams:s,setSortBy:B,setPageNumber:y,onPageChange:Y,onPageSizeChange:R,defaultSize:f}){var l,v,U;const{height:C,headerHeight:d}=ye(),[_,x]=h.useState(!1),[O,D]=h.useState([]),[j,w]=h.useState(null),[m,N]=h.useState({areaChartConfig:[],lineChartConfig:[]}),[I,o]=h.useState(0),u=(l=Object.keys(m))==null?void 0:l.length,t=Gt(),S=Wt(),r=ct(),L=Be(),E=ke(),p=L||E,{totalPages:Q=0,totalElements:A=0}=(S==null?void 0:S.pageable)||{},K=Te();h.useEffect(()=>()=>Fe(),[]),h.useEffect(()=>{var c,H,F,ie,Ge;if((c=r==null?void 0:r.content)!=null&&c.length){const ut=(H=r==null?void 0:r.content)==null?void 0:H.map(b=>b==null?void 0:b.queryType),pe={};(ut??[]).forEach(b=>{pe[b]?pe[b]+=1:pe[b]=1});const xt=(F=Object.entries(pe))==null?void 0:F.map(([b,St])=>({Source:b,Trafic:St}));D(xt);const pt=(ie=r==null?void 0:r.content)==null?void 0:ie.map(b=>({Timestamp:b.timestamp,Usage:b.usage,Runtime:b.runtime})),ft=(Ge=r==null?void 0:r.content)==null?void 0:Ge.map(b=>({Timestamp:b.timestamp,Usage:b.usage,DataVolume:b.responseSize}));N({areaChartConfig:pt,lineChartConfig:ft}),(s==null?void 0:s.isRecent)==="false"&&o(0)}else D([])},[r==null?void 0:r.content,s]);const k=c=>y(c),P=(c,H)=>{if(c==="systemHeartbeat"||c==="CPUSkew")return;const F=H==="ASC"?"DESC":"ASC";Fe(),B(c,F)},X=c=>{K.push("/queries/new?tabID=1"),$e(c)},q=c=>{w(c),x(!0)},G=()=>{w(null),x(!1)},Z=({timestamp:c})=>Le(c),ee=({runtime:c})=>Ct(c),te=({responseSize:c=0})=>Nt(c),ne=({cpuskew:c="59%"})=>e.jsx(Xt,{children:c}),J=({systemHeartbeat:c="58"})=>e.jsxs(Zt,{children:[e.jsx("img",{src:Nn,alt:"system-heartbeat"}),e.jsx("span",{children:c})]}),W=c=>e.jsx("span",{className:"text",children:c.queryType?c.queryType:"-"}),$=c=>e.jsx("span",{className:"text",children:c!=null&&c.usage?c.usage:"-"}),a=c=>e.jsxs(Ye,{onClick:()=>q(c),className:"queryText",children:[e.jsx("span",{className:"text",children:c.sqlText}),e.jsx(V,{tooltip:"Preview",children:e.jsx(Ce,{})})]}),z=c=>e.jsx(V,{onClick:()=>{X(c)},tooltip:i.VIEW_IN_EDITOR,children:e.jsx(be,{})}),se=()=>e.jsx(Ae,{imgPath:En,imgPathWebp:Cn,title:!(s!=null&&s.tagName)&&!(s!=null&&s.searchKeyword)?i.EMPTY_QUERY_HISTORY:i.NO_RESULT_FOUND_ON_FILTER,children:!(s!=null&&s.tagName)&&!(s!=null&&s.searchKeyword)&&e.jsx(Ne,{to:"/queries/new?tabID=1",children:e.jsx(M,{variant:"contained",color:"primary",size:"large",children:i.CREATE_NEW_QUERY})})}),ae=()=>C-d-230||300,oe=()=>{j&&$e(j)},Re=()=>e.jsx(Me,{title:t,children:t});if((S==null?void 0:S.totalElements)===0)return se();if(t)return Re();const ge=()=>{o(c=>c+1)},me=()=>{o(c=>c-1)},ue=()=>{o(0)},xe=()=>{o(u-1)},n=()=>{var ie;let c,H,F;switch(I){case 1:I===1&&(c="Usage and Data Volume Variation over time",H=ve.column_chart,F=yt);break;default:c="Usage and Runtime Trends Over Time",H=ve.area_chart,F=bt}return console.log("queryHistory",r.content),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"cardHead",children:[e.jsx("span",{className:"cardHeadTitle",children:c}),e.jsx("span",{className:"cardHeadCount",children:(ie=r==null?void 0:r.content)==null?void 0:ie.length})]}),e.jsx("div",{className:"cardBody",children:e.jsx(We,{isRunning:p,config:qe({data:H===ve.area_chart?m.areaChartConfig:m.lineChartConfig,chartConfigurationData:F}).config,type:H})})]})};return e.jsxs(e.Fragment,{children:[e.jsx(ze,{open:_,id:j==null?void 0:j.savedQueryId,text:j==null?void 0:j.sqlText,onClose:G,onClickView:oe,isHistory:!0}),(p||((v=r==null?void 0:r.content)==null?void 0:v.length)>0)&&(s==null?void 0:s.isRecent)==="false"&&e.jsxs(Qe,{container:!0,spacing:{xs:1,sm:3},children:[e.jsx(Qe,{item:!0,sm:5,xs:12,children:e.jsxs(Pe,{children:[e.jsxs("div",{className:"cardHead",children:[e.jsx("span",{className:"cardHeadTitle",children:i.TOTAL_QUERIES}),e.jsx("span",{className:"cardHeadCount",children:(U=r==null?void 0:r.content)==null?void 0:U.length})]}),e.jsx("div",{className:"cardBody",children:e.jsx(We,{isRunning:p,config:qe({data:O,chartConfigurationData:Tt}).config,type:"pie_chart"})})]})}),e.jsx(Qe,{item:!0,sm:7,xs:12,children:e.jsxs(Pe,{children:[n(),!p&&e.jsx($t,{maxSteps:u,activeStep:I,handleFirst:ue,handleLast:xe,handleNext:ge,handlePrev:me})]})})]}),e.jsx(Ve,{data:r==null?void 0:r.content,columns:Et,isAction:!0,actionComponent:c=>z(c),loading:p,rowRender:[{dataKey:"sqlText",func:a},{dataKey:"timestamp",func:Z},{dataKey:"runtime",func:ee},{dataKey:"responseSize",func:te},{dataKey:"systemHeartbeat",func:J},{dataKey:"CPUSkew",func:ne},{dataKey:"queryType",func:W},{dataKey:"usage",func:$}],rowSize:75,bodyHeight:ae(),onItemsSort:P,sortBy:s==null?void 0:s.sortBy,sortOrder:(s==null?void 0:s.sortOrder)||""}),(p?!0:(r==null?void 0:r.length)!==0)&&e.jsx(Ke,{onChange:k,count:Q,page:s.pageNo,onPageChange:Y,totalElements:A,onPageSizeChange:R,isGotoPage:!0,isPageSize:!0,pageSize:s.pageSize,defaultSize:f})]})}const bn=s=>{const{row:B,handleClose:y,handlePublishCallback:Y,open:R}=s,{id:f,queryName:C,visibility:d,slug:_}=B||{},[x,O]=h.useState(""),[D,j]=h.useState(!1),[w,m]=h.useState(!1),[N,I]=h.useState(!1),o=Jt()||(B==null?void 0:B.visibility),u=h.useRef(null),t=d===g.public;h.useEffect(()=>{if(R&&d===g.public){const p=window.location.origin+de.queriesSlug(f,_);O(p)}else O(""),I(!1),u.current=null},[R]);const S=p=>{var K,k;const Q=((k=(K=p==null?void 0:p.target)==null?void 0:K.value)==null?void 0:k.trim())||"",A=(Q==null?void 0:Q.length)>0&&mt(Q);j(A),Q!==x&&O(Q)},r=async()=>{m(!0),await en(f,C,x,o,Y)===i.RESPONSE_SUCCESS_STATUS&&y(),m(!1)},L=p=>{switch(p){case g.public:re(g.public);break;case g.private:re(g.private);break;case g.subscription:re(g.subscription);break;default:re(g.private)}},E=()=>{Qt(x).then(()=>{I(!0)})};return e.jsx(Ft,{title:i.QUERY_PUBLISH,visible:R,maxWidth:"sm",onClose:y,children:e.jsxs(Pt,{children:[e.jsxs("div",{className:"visibilityCheck",children:[e.jsx("div",{className:"label",children:"Choose the visibility for your query"}),e.jsxs(at,{variant:"contained",className:`isPublicCheck ${d===g.public&&"disabled"}`,children:[e.jsx(M,{variant:"contained",onClick:()=>{L(g.private)},color:o===g.public||o===g.subscription?"secondary":"primary",disabled:d===g.public,children:i.PRIVATE}),e.jsx(M,{variant:"contained",onClick:()=>{L(g.subscription)},color:o===g.subscription?"primary":"secondary",disabled:d===g.public,children:i.PRIVATE_TO_MY_ORG}),e.jsx(M,{variant:"contained",onClick:()=>{L(g.public)},color:o===g.public?"primary":"secondary",children:i.PUBLIC})]})]}),o===g.public&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"slugInput",children:e.jsx(He,{autoFocus:!0,label:"Unique Query Name",required:!0,placeholder:"Enter slug name",ishelpertext:1,helperText:!t&&`${x==null?void 0:x.length}/${we}`,value:x,warningText:!t&&i.MAX_LENGTH_ERROR("slug name",we),hasMax:!0,maxValue:we,onChange:S,errorText:D&&i.VIEW_NAME_ERROR("Slug"),ref:u,inputProps:{readOnly:t},endAdornment:_?e.jsx(Rt,{position:"end",children:e.jsx(V,{onClick:()=>window.open(window.location.origin+de.queriesSlug(f,_),"_blank"),children:e.jsx(be,{})})}):null})}),t&&e.jsx(he,{message:i.PUBLISHED_TEXT("query")}),o===g.public&&!t&&e.jsx(he,{message:i.PUBLISH_CONFIRM_MESSAGE("Query")})]}),e.jsxs("div",{className:"btnRow",children:[e.jsx(M,{disabled:w,variant:"contained",color:"secondary",onClick:y,className:"formBtn cancel",children:i.CANCEL}),!t&&e.jsx(M,{disabled:D||(x==null?void 0:x.length)>=50||w||o===g.public&&!(x!=null&&x.trim()),variant:"contained",color:"primary",onClick:r,className:"formBtn submit",children:w?e.jsx("img",{src:qt,alt:"loading",height:36}):i.SUBMIT}),t&&e.jsx(M,{type:"button",variant:"contained",color:"primary",onClick:E,children:N?i.COPIED:i.COPY_LINK})]})]})})};function yn({queryParams:s,setPageNumber:B,setSortBy:y,onPageChange:Y,onPageSizeChange:R,deleteQuery:f,defaultSize:C,handlePublishCallback:d}){const _=Te(),{height:x,headerHeight:O}=ye(),D=tn(),j=nn(),{totalPages:w=0,totalElements:m=0}=(j==null?void 0:j.pageable)||{},N=lt(),I=Be(),o=ke(),u=I||o,[t,S]=h.useState(!1),[r,L]=h.useState({}),[E,p]=h.useState(!1),[Q,A]=h.useState({}),K=(a,z)=>{y(a,z==="ASC"?"DESC":"ASC")},k=a=>B(a),P=a=>e.jsx(rt,{className:"queryName",onClick:()=>{_.push(`/queries/${a.id}`)},children:(a==null?void 0:a.name)||"Untitled Query"}),X=a=>a&&Le(a==null?void 0:a.modified),q=a=>a&&e.jsx(dt,{tags:a==null?void 0:a.tags}),G=a=>{L(a),S(!0)},Z=a=>e.jsxs(Ye,{onClick:()=>G(a),className:"queryText",children:[e.jsx("span",{className:"text",children:a.queryText}),e.jsx(V,{tooltip:"Preview",children:e.jsx(Ce,{})})]}),ee=()=>x-O-170||300,te=()=>{p(!1),A({}),re("")},ne=a=>e.jsxs(e.Fragment,{children:[e.jsx(Dt,{label:(a==null?void 0:a.visibility)===g.public?i.PUBLISHED:i.PUBLISH("Query"),children:e.jsx("span",{className:"publishBtn",children:e.jsx(V,{onClick:()=>{p(!0),A(a)},children:e.jsx(It,{})})})}),e.jsx(V,{onClick:()=>{_.push(`/queries/${a.id}`)},tooltip:"View",children:e.jsx(be,{})}),e.jsx(sn,{icon:!0,confirmButtonMessage:i.YES,cancelButtonMessage:i.NO,disabled:a.visibility===g.public,tooltip:i.DELETE(""),title:i.DELETE("Query"),confirmMessage:i.DELETE_CONFIRM_MESSAGE(`'${a.name||""}' query`),description:i.DELETE_QUERY_DESCRIPTION,onConfirm:z=>{z.stopPropagation(),f(a.id,a.name)}},"expire")]}),J=()=>e.jsx(Ae,{imgPath:ht,imgPathWebp:gt,title:!(s!=null&&s.tagName)&&!(s!=null&&s.searchPattern)&&!(s!=null&&s.status)?i.NO_QUERY_FOUND:i.NO_RESULT_FOUND_ON_FILTER,className:"emptyBlock",children:!(s!=null&&s.tagName)&&!(s!=null&&s.searchPattern)&&e.jsx(Ne,{to:"/queries/new?tabID=1",children:e.jsx(M,{variant:"contained",color:"primary",size:"large",children:i.CREATE_NEW_QUERY})})}),W=()=>e.jsx(Me,{title:D,children:D});if(w===0&&!u&&!D)return J();if(D)return W();const $=()=>{L({}),S(!1)};return e.jsxs(e.Fragment,{children:[e.jsx(ze,{open:t,id:r==null?void 0:r.id,text:r==null?void 0:r.queryText,queryPreview:r,onClose:$}),e.jsx(Ve,{data:N,columns:vt,isAction:!0,actionComponent:ne,actionColumnName:"Actions",rowRender:[{dataKey:"name",func:P},{dataKey:"modified",func:X},{dataKey:"tags",func:q},{dataKey:"queryText",func:Z}],loading:u,rowSize:75,bodyHeight:ee(),onItemsSort:K,sortBy:(s==null?void 0:s.sortBy)||"",sortOrder:(s==null?void 0:s.sortOrder)||"",nonSortableColumns:{tags:!0}}),(u?!0:(N==null?void 0:N.length)!==0)&&e.jsx("div",{className:"queryPagePagination",children:e.jsx(Ke,{onChange:k,count:w,page:(s==null?void 0:s.pageNo)||0,onPageChange:Y,totalElements:m,onPageSizeChange:R,isGotoPage:!0,isPageSize:!0,pageSize:(s==null?void 0:s.pageSize)||0,defaultSize:C})}),e.jsx(bn,{open:E,handleClose:te,row:Q,handlePublishCallback:d})]})}function Rn({queryParams:s,setPageNumber:B,setSortBy:y,onPageChange:Y,onPageSizeChange:R,onTagChange:f,resetTags:C,defaultSize:d}){const _=Te(),x=it(),{data:O,error:D}=_t.useGetPopularTags(Ee.stringify({entityType:Ot.SAVEDQUERY_TAG_TYPE}),x),j=!O&&!D,{height:w,headerHeight:m}=ye(),N=on(),I=an(),o=cn(),u=Be(),t=ke(),S=u||t,[r,L]=h.useState(!1),[E,p]=h.useState({}),{totalPages:Q=0,totalElements:A=0}=(I==null?void 0:I.pageable)||{},K=(a,z)=>{y(a,z==="ASC"?"DESC":"ASC")},k=a=>{B(a)},P=a=>e.jsx(rt,{className:"queryName",onClick:()=>{_.push(`/queries/${a==null?void 0:a.id}`)},children:(a==null?void 0:a.name)||"Untitled Query"}),X=a=>Le(a==null?void 0:a.modified),q=a=>a&&e.jsx(dt,{tags:a==null?void 0:a.tags}),G=a=>{p(a),L(!0)},Z=a=>e.jsxs(Ye,{onClick:()=>G(a),className:"queryText",children:[e.jsx("span",{className:"text",children:a.queryText}),e.jsx(V,{tooltip:"Preview",children:e.jsx(Ce,{})})]}),ee=({userId:a})=>Ut(a),te=()=>{p({}),L(!1)},ne=()=>w-m-230||300,J=a=>e.jsxs(e.Fragment,{children:[!x&&e.jsx(V,{onClick:()=>G(a),tooltip:i.VIEW_QUERY,children:e.jsx(Ce,{})}),x&&e.jsx(V,{onClick:()=>{_.push(`/queries/${a.id}`)},tooltip:i.VIEW_IN_EDITOR,children:e.jsx(be,{})})]}),W=()=>e.jsxs(e.Fragment,{children:[((s==null?void 0:s.tagValue)||(s==null?void 0:s.searchPattern))&&e.jsx(et,{popularTags:O,queryParams:s,loading:j,onTagChange:f,resetTags:C}),e.jsx(Ae,{imgPath:ht,imgPathWebp:gt,title:!(s!=null&&s.tagValue)&&!(s!=null&&s.searchPattern)?i.NO_ORG_QUERY_FOUND:i.NO_RESULT_FOUND_ON_FILTER,className:"emptyBlock"})]}),$=()=>e.jsx(Me,{title:N,children:N});return Q===0&&!S&&!N?W():N?$():e.jsxs("div",{children:[e.jsx(et,{popularTags:O,queryParams:s,loading:j,onTagChange:f,resetTags:C}),e.jsx(ze,{open:r,queryPreview:E,id:E==null?void 0:E.id,text:E==null?void 0:E.queryText,onClose:te}),e.jsx(Ve,{data:o,columns:wt,isAction:!0,actionComponent:a=>J(a),actionColumnName:"Actions",rowRender:[{dataKey:"userId",func:ee},{dataKey:"name",func:P},{dataKey:"modified",func:X},{dataKey:"tags",func:q},{dataKey:"queryText",func:Z}],loading:S,rowSize:75,bodyHeight:ne(),onItemsSort:K,sortBy:(s==null?void 0:s.sortBy)||"",sortOrder:(s==null?void 0:s.sortOrder)||"",nonSortableColumns:{tags:!0}}),(S?!0:(o==null?void 0:o.length)!==0)&&e.jsx(Ke,{onChange:k,count:Q,page:(s==null?void 0:s.pageNo)||0,onPageChange:Y,totalElements:A,onPageSizeChange:R,isGotoPage:!0,isPageSize:!0,pageSize:(s==null?void 0:s.pageSize)||0,defaultSize:d})]})}const mn=({tab:s})=>{var ue,xe;const y=Te(),{search:Y}=Lt(),R=it(),f=h.useRef(null),C=h.useRef(null),d=new URLSearchParams(Y),_=(d==null?void 0:d.get("sortBy"))||"",x=(d==null?void 0:d.get("sortOrder"))||"",O=(d==null?void 0:d.get("searchPattern"))||"",D=(d==null?void 0:d.get("visibility"))||"",{height:j,headerHeight:w,width:m}=ye(),N=lt(),I=ct(),[o,u]=h.useState({}),[t,S]=h.useState({from:"",to:"",duration:0}),[r,L]=h.useState(At.trending),[E,p]=h.useState(""),[Q,A]=h.useState(null),K=()=>{let n={..._e(o)};s===T.myQueries&&(n={...n,scope:Oe.private}),s===T.myOrgQuery&&(n={...n,scope:Oe.subscription,visibility:g.subscription}),delete n.isRecent,n=Ee.stringify({...n},{arrayFormat:"bracket"}),y.push(`/${s==null?void 0:s.toLowerCase()}?${n}`),s===T.queryHistory?pn({params:n,abortController:C,isRecent:(o==null?void 0:o.isRecent)==="true"}):s===T.myQueries?fn({params:n,isLoggedIn:R,abortController:C}):Sn({params:n,isLoggedIn:R,abortController:C})};h.useEffect(()=>{let n=_;n||(n="modified"),s===T.queryHistory&&n==="modified"&&(n="timestamp"),u({pageSize:d!=null&&d.get("pageSize")?Number(d==null?void 0:d.get("pageSize")):50,pageNo:d!=null&&d.get("pageNo")?Number(d==null?void 0:d.get("pageNo")):1,sortOrder:x||"DESC",sortBy:n||"",visibility:D,searchPattern:O||"",isRecent:s===T.queryHistory?"true":""})},[s]),h.useEffect(()=>{var n;fe.isEmpty(o)||(ln(!0),C!=null&&C.current&&((n=C==null?void 0:C.current)==null||n.abort()),setTimeout(K,200))},[o,r]),h.useEffect(()=>{t!=null&&t.from&&(t!=null&&t.to)&&u(n=>({...n,pageNo:1,from:t.from,to:t.to}))},[t]);const k=n=>{var U,c;const l=n.target.value;(U=f==null?void 0:f.current)!=null&&U.value&&((c=f==null?void 0:f.current)==null?void 0:c.value)!==""&&(f.current.value="");let v={..._e({...o,pageSize:50,pageNo:1,searchPattern:"",visibility:l===T.myOrgQuery?g.subscription:"",scope:l===T.myOrgQuery?Oe.subscription:"",sortBy:"",sortOrder:"",isRecent:l===T.queryHistory?"false":""})};if(l===T.views){y.push(`/${l}`);return}v=Ee.stringify({...v},{arrayFormat:"bracket"}),y.push(`/${l==null?void 0:l.toLowerCase()}?${v}`),S({from:"",to:"",duration:0})},P=async()=>{let{pageNo:n=1}=o;n-=(N==null?void 0:N.length)===1&&(o!=null&&o.pageNo)&&(o==null?void 0:o.pageNo)>1?1:0,u(l=>({...l,pageNo:n}))},X=(n,l)=>{jn(n,()=>{Yt(n),P()},l)},q=n=>{var v,U,c;let l=((c=(U=(v=n==null?void 0:n.target)==null?void 0:v.value)==null?void 0:U.toString())==null?void 0:c.trim())||"";l=Vt(l),u(H=>({...H,pageNo:1,searchPattern:l||""}))},G=n=>{var v;const l=(v=n==null?void 0:n.target)==null?void 0:v.value;u(U=>({...U,pageNo:1,visibility:l}))},Z=fe.debounce(q,500),ee=n=>{u(l=>({...l,pageNo:1,tagValue:l.tagValue===(n==null?void 0:n.value)?"":n==null?void 0:n.value}))},te=()=>{o!=null&&o.tagValue&&u(n=>({...n,pageNo:1,tagValue:""}))},ne=j-w||500,J=()=>{var n,l;return s===T.myQueries?!fe.isEmpty(N)||!!((n=o==null?void 0:o.searchPattern)!=null&&n.length):s===T.queryHistory?!fe.isEmpty(I)||!!((l=o==null?void 0:o.searchPattern)!=null&&l.length):!1},W=(n,l)=>{n&&l&&u(v=>({...v,pageNo:1,sortOrder:l,sortBy:n}))},$=n=>{u(l=>({...l,pageNo:n}))},a=n=>{u(l=>({...l,pageNo:n}))},z=n=>{u(l=>({...l,pageSize:n,pageNo:1}))},se=()=>{f.current&&(f.current.value=""),u(n=>({...n,pageNo:1,searchPattern:""}))},ae=n=>{u(l=>({...l,isRecent:n,from:"",to:"",searchPattern:""})),p(""),S({from:"",to:"",duration:0})},oe=n=>{S(l=>({...l,...n}))},Re=n=>{p(n),A(null)},ge=n=>{var U;let l=((U=n==null?void 0:n.target)==null?void 0:U.value)||0;if(l=Number(l),Ie.filter(c=>c.value===l).length){const{from:c,to:H}=Kt(Number(l));S({from:c,to:H,duration:l})}},me=async n=>{const l=Ee.stringify(_e({...o}));n===g.public?y.push(de.exploreQuery(l)):n===g.subscription?y.push(de.myOrgQuery(l)):y.push(de.myqueries(l))};return e.jsx(h.Suspense,{fallback:rn,children:e.jsx(dn,{height:ne,children:e.jsxs("main",{className:"mainContent",children:[J()&&m<ce.breakpoints.values.md&&e.jsx(M,{variant:"text",className:"createMobileBtn",children:e.jsx(Ne,{to:"/queries/new?tabID=1",onClick:n=>{n.ctrlKey||n.metaKey||n.altKey||n.shiftKey||n.button||n.defaultPrevented||Xe(1)},children:e.jsx(Ze,{})})}),e.jsxs("div",{className:"boxContent",children:[m<ce.breakpoints.values.md?e.jsx(tt,{className:"pageMobileToolbar",children:e.jsx("div",{className:"pageMobileTopBar",children:e.jsxs(hn,{children:[e.jsx(De,{value:s,onChange:k,children:Mt.map(n=>e.jsx(gn,{value:n.value,children:n.label},n.value))}),e.jsxs(nt,{className:"searchField",children:[e.jsx(He,{placeholder:i.SEARCH_ELIPSIS_CONTEXT(i.QUERIES),onChange:Z,defaultValue:(o==null?void 0:o.searchPattern)||"",inputRef:f}),e.jsx("span",{className:"searchIcon",children:(o==null?void 0:o.searchPattern)!==""?e.jsx(st,{fontSize:"small",className:"clearSearch",onClick:se}):e.jsx(Je,{})})]}),s===T.myQueries&&e.jsx(ot,{visibility:o==null?void 0:o.visibility,onFilterChange:G})]})})}):e.jsxs(tt,{className:"pageToolbar",children:[e.jsxs(Bt,{value:s,exclusive:!0,onChange:k,children:[R&&e.jsx(Se,{size:"small",className:"tabButton",value:"myQueries","aria-label":"My Queries",children:i.MY_SAVED_QUERIES}),R&&e.jsx(Se,{size:"small",className:"tabButton",value:"subscription","aria-label":"My Org Queries",children:i.MY_ORG_QUERIES}),R&&e.jsx(Se,{size:"small",className:"tabButton",value:"queryHistory","aria-label":"Query history",children:`${i.QUERY_HISTORY}`}),R&&e.jsx(Se,{size:"small",className:"tabButton",value:"views","aria-label":"Views",children:i.VIEWS})]}),e.jsxs("div",{className:"toolbarRight",children:[e.jsxs(nt,{className:"searchField",children:[e.jsx(He,{placeholder:i.SEARCH_ELIPSIS_CONTEXT(i.QUERIES),onChange:Z,defaultValue:(o==null?void 0:o.searchPattern)||"",inputRef:f}),e.jsx("span",{className:"searchIcon",children:(o==null?void 0:o.searchPattern)!==""?e.jsx(st,{fontSize:"small",className:"clearSearch",onClick:se}):e.jsx(Je,{})})]}),s===T.myQueries&&e.jsx(ot,{visibility:o==null?void 0:o.visibility,onFilterChange:G}),J()&&e.jsx(M,{color:"primary",variant:"contained",className:"createQueryBtn",children:e.jsxs(Ne,{to:"/queries/new?tabID=1",onClick:n=>{n.ctrlKey||n.metaKey||n.altKey||n.shiftKey||n.button||n.defaultPrevented||Xe(1)},children:[e.jsx("span",{className:"iconLeft addIcon",children:e.jsx(Ze,{})}),i.CREATE_NEW_QUERY]})})]})]}),s===T.queryHistory&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"filterToolbar",children:[e.jsxs("div",{className:"toggleBlock",children:[e.jsxs(at,{variant:"contained",className:"isRecentToggle",children:[e.jsx(M,{variant:"contained",onClick:()=>(o==null?void 0:o.isRecent)==="false"&&ae("true"),color:(o==null?void 0:o.isRecent)==="true"?"primary":"secondary",children:i.CURRENT_HISTORY}),e.jsx(M,{variant:"contained",onClick:()=>{(o==null?void 0:o.isRecent)==="true"&&ae("false")},color:(o==null?void 0:o.isRecent)==="false"?"primary":"secondary",children:i.HISTORICAL_HISTORY})]}),(o==null?void 0:o.isRecent)==="true"&&e.jsx(he,{message:i.CURRENT_QUERY_TEXT}),(o==null?void 0:o.isRecent)==="false"&&!(t!=null&&t.from)&&!(t!=null&&t.to)&&e.jsx(he,{message:i.HISTORICAL_WITHOUT_FILTER_QUERY_TEXT}),(o==null?void 0:o.isRecent)==="false"&&(t==null?void 0:t.from)&&(t==null?void 0:t.to)&&e.jsx(he,{message:i.HISTORICAL_QUERY_TEXT(Ue.utc(t==null?void 0:t.from).local().format("D MMM"),Ue.utc(t==null?void 0:t.to).local().format("D MMM"))})]}),e.jsx("div",{className:"filterBlock",children:(o==null?void 0:o.isRecent)==="false"&&e.jsxs(e.Fragment,{children:[E==="Duration"&&m>ce.breakpoints.values.md&&e.jsx("div",{className:"durationSelect",children:e.jsxs(De,{name:"analytics",value:t==null?void 0:t.duration,onChange:n=>{ge(n)},label:i.USAGE_OF_LAST,children:[e.jsx(le,{value:0,className:"selectPlaceholder",children:i.SELECT_DURATION}),(ue=Ie)==null?void 0:ue.map(n=>e.jsx(le,{value:n==null?void 0:n.value,selected:(n==null?void 0:n.value)===(t==null?void 0:t.duration),children:e.jsx("div",{className:"optionText",children:n.label})},n==null?void 0:n.value))]})}),E==="Range"&&m>ce.breakpoints.values.md&&e.jsxs(e.Fragment,{children:[e.jsx(je,{selectedDate:t!=null&&t.from?new Date(t==null?void 0:t.from):"",onDateChange:n=>{oe({from:new Date(n).toISOString()})},startDate:t!=null&&t.from?new Date(t==null?void 0:t.from):"",endDate:t!=null&&t.to?new Date(t==null?void 0:t.to):"",shouldConvert:!0,label:i.FROM,maxDate:t!=null&&t.to?new Date(t==null?void 0:t.to):new Date,selectsStart:!0}),e.jsx(je,{selectedDate:t!=null&&t.to?new Date(t==null?void 0:t.to):"",onDateChange:n=>{oe({to:new Date(n).toISOString()})},minDate:t!=null&&t.from?new Date(t==null?void 0:t.from):"",maxDate:new Date,label:i.TO,startDate:t!=null&&t.from?new Date(t==null?void 0:t.from):"",endDate:t!=null&&t.to?new Date(t==null?void 0:t.to):"",selectsEnd:!0,addForward:!0,shouldConvert:!0})]}),(t==null?void 0:t.from)&&(t==null?void 0:t.to)&&e.jsx(V,{tooltip:i.RESET_FILTER,onClick:()=>ae("false"),className:"resetBtn",children:e.jsx(un,{})}),e.jsx(V,{tooltip:i.FILTER,onClick:n=>A(n.currentTarget),className:"filterBtn",children:e.jsx(xn,{})}),e.jsx(kt,{anchorEl:Q,open:!!Q,onClose:()=>A(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:zt.map(({value:n})=>e.jsx(le,{selected:n===E,onClick:()=>Re(n),children:n},n))})]})})]}),m<ce.breakpoints.values.md&&e.jsxs("div",{className:"responsiveFilter",children:[E==="Duration"&&e.jsx("div",{className:"durationSelect",children:e.jsxs(De,{name:"analytics",value:t==null?void 0:t.duration,onChange:n=>{ge(n)},label:i.USAGE_OF_LAST,children:[e.jsx(le,{value:0,className:"selectPlaceholder",children:i.SELECT_DURATION}),(xe=Ie)==null?void 0:xe.map(n=>e.jsx(le,{value:n==null?void 0:n.value,selected:(n==null?void 0:n.value)===(t==null?void 0:t.duration),children:e.jsx("div",{className:"optionText",children:n.label})},n==null?void 0:n.value))]})}),E==="Range"&&e.jsxs(e.Fragment,{children:[e.jsx(je,{selectedDate:t!=null&&t.from?new Date(t==null?void 0:t.from):"",onDateChange:n=>{oe({from:new Date(n).toISOString()})},startDate:t!=null&&t.from?new Date(t==null?void 0:t.from):"",endDate:t!=null&&t.to?new Date(t==null?void 0:t.to):"",shouldConvert:!0,label:i.FROM,maxDate:t!=null&&t.to?new Date(t==null?void 0:t.to):new Date,selectsStart:!0}),e.jsx(je,{selectedDate:t!=null&&t.to?new Date(t==null?void 0:t.to):"",onDateChange:n=>{oe({to:new Date(n).toISOString()})},minDate:t!=null&&t.from?new Date(t==null?void 0:t.from):"",maxDate:new Date,label:i.TO,startDate:t!=null&&t.from?new Date(t==null?void 0:t.from):"",endDate:t!=null&&t.to?new Date(t==null?void 0:t.to):"",selectsEnd:!0,addForward:!0,shouldConvert:!0})]})]})]}),s===T.myQueries&&e.jsx(yn,{queryParams:o,setPageNumber:$,setSortBy:W,onPageChange:a,onPageSizeChange:z,deleteQuery:X,defaultSize:50,handlePublishCallback:me}),s===T.myOrgQuery&&e.jsx(Rn,{queryParams:o,setPageNumber:$,setSortBy:W,onPageChange:a,onPageSizeChange:z,deleteQuery:X,onTagChange:ee,resetTags:te,defaultSize:50}),s===T.queryHistory&&e.jsx(Tn,{queryParams:o,setPageNumber:$,setSortBy:W,onPageChange:a,onPageSizeChange:z,defaultSize:50})]})]})})})},_n=Ht.memo(mn);export{_n as default};
1
+ import{iq as Ue,o_ as jt,r as h,a3 as Te,j as e,ae as Qe,aW as i,e5 as We,o$ as Et,e2 as Le,p0 as Ct,p1 as Nt,cL as Ce,el as be,eM as Ae,ad as Ne,n6 as $e,dA as Me,dL as ve,p2 as Tt,p3 as bt,p4 as yt,ex as g,eQ as at,a4 as Rt,dB as de,eS as mt,bn as Qt,ol as vt,aO as Dt,ez as It,cZ as it,cQ as _t,cC as Ee,fc as Ot,p5 as wt,f5 as Ut,R as Ht,ak as Lt,fg as At,oB as T,am as fe,dj as ce,fu as Xe,eN as Ze,bx as De,oC as Mt,eK as Je,fp as Bt,fq as Se,aZ as le,cu as Ie,aL as kt,cv as zt,eJ as _e,eI as Oe,fr as Vt,cy as Kt,p6 as Yt}from"./vendor-charts-c2d37c0c.js";import{u as ye,b as Gt,c as Wt,d as ct,e as Be,f as ke,r as Fe,g as ze,C as Pe,h as qe,M as $t,V as Ve,P as Ke,i as Xt,H as Zt,j as Ye,I as V,B as M,k as Jt,l as Ft,m as Pt,n as He,N as we,o as he,L as qt,p as en,s as re,q as tn,t as nn,v as lt,w as rt,T as dt,x as sn,y as ht,z as gt,A as on,D as an,F as cn,G as et,J as ln,O as rn,K as dn,R as tt,S as hn,W as gn,U as nt,X as st,Y as ot,Z as je,_ as un,$ as xn,a0 as pn,a1 as fn,a2 as Sn,a3 as jn}from"./index-24f62d99.js";import"./vendor-editor-c82365af.js";import"./vendor-three-8b64368a.js";const En="/assets/emptyHistory-39807386.png",Cn="/assets/emptyHistory-e09c1ac9.webp",Nn="/assets/heartbeat-d012a4c0.png";Ue.extend(jt);function Tn({queryParams:s,setSortBy:B,setPageNumber:y,onPageChange:Y,onPageSizeChange:R,defaultSize:f}){var l,v,U;const{height:C,headerHeight:d}=ye(),[_,x]=h.useState(!1),[O,D]=h.useState([]),[j,w]=h.useState(null),[m,N]=h.useState({areaChartConfig:[],lineChartConfig:[]}),[I,o]=h.useState(0),u=(l=Object.keys(m))==null?void 0:l.length,t=Gt(),S=Wt(),r=ct(),L=Be(),E=ke(),p=L||E,{totalPages:Q=0,totalElements:A=0}=(S==null?void 0:S.pageable)||{},K=Te();h.useEffect(()=>()=>Fe(),[]),h.useEffect(()=>{var c,H,F,ie,Ge;if((c=r==null?void 0:r.content)!=null&&c.length){const ut=(H=r==null?void 0:r.content)==null?void 0:H.map(b=>b==null?void 0:b.queryType),pe={};(ut??[]).forEach(b=>{pe[b]?pe[b]+=1:pe[b]=1});const xt=(F=Object.entries(pe))==null?void 0:F.map(([b,St])=>({Source:b,Trafic:St}));D(xt);const pt=(ie=r==null?void 0:r.content)==null?void 0:ie.map(b=>({Timestamp:b.timestamp,Usage:b.usage,Runtime:b.runtime})),ft=(Ge=r==null?void 0:r.content)==null?void 0:Ge.map(b=>({Timestamp:b.timestamp,Usage:b.usage,DataVolume:b.responseSize}));N({areaChartConfig:pt,lineChartConfig:ft}),(s==null?void 0:s.isRecent)==="false"&&o(0)}else D([])},[r==null?void 0:r.content,s]);const k=c=>y(c),P=(c,H)=>{if(c==="systemHeartbeat"||c==="CPUSkew")return;const F=H==="ASC"?"DESC":"ASC";Fe(),B(c,F)},X=c=>{K.push("/queries/new?tabID=1"),$e(c)},q=c=>{w(c),x(!0)},G=()=>{w(null),x(!1)},Z=({timestamp:c})=>Le(c),ee=({runtime:c})=>Ct(c),te=({responseSize:c=0})=>Nt(c),ne=({cpuskew:c="59%"})=>e.jsx(Xt,{children:c}),J=({systemHeartbeat:c="58"})=>e.jsxs(Zt,{children:[e.jsx("img",{src:Nn,alt:"system-heartbeat"}),e.jsx("span",{children:c})]}),W=c=>e.jsx("span",{className:"text",children:c.queryType?c.queryType:"-"}),$=c=>e.jsx("span",{className:"text",children:c!=null&&c.usage?c.usage:"-"}),a=c=>e.jsxs(Ye,{onClick:()=>q(c),className:"queryText",children:[e.jsx("span",{className:"text",children:c.sqlText}),e.jsx(V,{tooltip:"Preview",children:e.jsx(Ce,{})})]}),z=c=>e.jsx(V,{onClick:()=>{X(c)},tooltip:i.VIEW_IN_EDITOR,children:e.jsx(be,{})}),se=()=>e.jsx(Ae,{imgPath:En,imgPathWebp:Cn,title:!(s!=null&&s.tagName)&&!(s!=null&&s.searchKeyword)?i.EMPTY_QUERY_HISTORY:i.NO_RESULT_FOUND_ON_FILTER,children:!(s!=null&&s.tagName)&&!(s!=null&&s.searchKeyword)&&e.jsx(Ne,{to:"/queries/new?tabID=1",children:e.jsx(M,{variant:"contained",color:"primary",size:"large",children:i.CREATE_NEW_QUERY})})}),ae=()=>C-d-230||300,oe=()=>{j&&$e(j)},Re=()=>e.jsx(Me,{title:t,children:t});if((S==null?void 0:S.totalElements)===0)return se();if(t)return Re();const ge=()=>{o(c=>c+1)},me=()=>{o(c=>c-1)},ue=()=>{o(0)},xe=()=>{o(u-1)},n=()=>{var ie;let c,H,F;switch(I){case 1:I===1&&(c="Usage and Data Volume Variation over time",H=ve.column_chart,F=yt);break;default:c="Usage and Runtime Trends Over Time",H=ve.area_chart,F=bt}return console.log("queryHistory",r.content),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"cardHead",children:[e.jsx("span",{className:"cardHeadTitle",children:c}),e.jsx("span",{className:"cardHeadCount",children:(ie=r==null?void 0:r.content)==null?void 0:ie.length})]}),e.jsx("div",{className:"cardBody",children:e.jsx(We,{isRunning:p,config:qe({data:H===ve.area_chart?m.areaChartConfig:m.lineChartConfig,chartConfigurationData:F}).config,type:H})})]})};return e.jsxs(e.Fragment,{children:[e.jsx(ze,{open:_,id:j==null?void 0:j.savedQueryId,text:j==null?void 0:j.sqlText,onClose:G,onClickView:oe,isHistory:!0}),(p||((v=r==null?void 0:r.content)==null?void 0:v.length)>0)&&(s==null?void 0:s.isRecent)==="false"&&e.jsxs(Qe,{container:!0,spacing:{xs:1,sm:3},children:[e.jsx(Qe,{item:!0,sm:5,xs:12,children:e.jsxs(Pe,{children:[e.jsxs("div",{className:"cardHead",children:[e.jsx("span",{className:"cardHeadTitle",children:i.TOTAL_QUERIES}),e.jsx("span",{className:"cardHeadCount",children:(U=r==null?void 0:r.content)==null?void 0:U.length})]}),e.jsx("div",{className:"cardBody",children:e.jsx(We,{isRunning:p,config:qe({data:O,chartConfigurationData:Tt}).config,type:"pie_chart"})})]})}),e.jsx(Qe,{item:!0,sm:7,xs:12,children:e.jsxs(Pe,{children:[n(),!p&&e.jsx($t,{maxSteps:u,activeStep:I,handleFirst:ue,handleLast:xe,handleNext:ge,handlePrev:me})]})})]}),e.jsx(Ve,{data:r==null?void 0:r.content,columns:Et,isAction:!0,actionComponent:c=>z(c),loading:p,rowRender:[{dataKey:"sqlText",func:a},{dataKey:"timestamp",func:Z},{dataKey:"runtime",func:ee},{dataKey:"responseSize",func:te},{dataKey:"systemHeartbeat",func:J},{dataKey:"CPUSkew",func:ne},{dataKey:"queryType",func:W},{dataKey:"usage",func:$}],rowSize:75,bodyHeight:ae(),onItemsSort:P,sortBy:s==null?void 0:s.sortBy,sortOrder:(s==null?void 0:s.sortOrder)||""}),(p?!0:(r==null?void 0:r.length)!==0)&&e.jsx(Ke,{onChange:k,count:Q,page:s.pageNo,onPageChange:Y,totalElements:A,onPageSizeChange:R,isGotoPage:!0,isPageSize:!0,pageSize:s.pageSize,defaultSize:f})]})}const bn=s=>{const{row:B,handleClose:y,handlePublishCallback:Y,open:R}=s,{id:f,queryName:C,visibility:d,slug:_}=B||{},[x,O]=h.useState(""),[D,j]=h.useState(!1),[w,m]=h.useState(!1),[N,I]=h.useState(!1),o=Jt()||(B==null?void 0:B.visibility),u=h.useRef(null),t=d===g.public;h.useEffect(()=>{if(R&&d===g.public){const p=window.location.origin+de.queriesSlug(f,_);O(p)}else O(""),I(!1),u.current=null},[R]);const S=p=>{var K,k;const Q=((k=(K=p==null?void 0:p.target)==null?void 0:K.value)==null?void 0:k.trim())||"",A=(Q==null?void 0:Q.length)>0&&mt(Q);j(A),Q!==x&&O(Q)},r=async()=>{m(!0),await en(f,C,x,o,Y)===i.RESPONSE_SUCCESS_STATUS&&y(),m(!1)},L=p=>{switch(p){case g.public:re(g.public);break;case g.private:re(g.private);break;case g.subscription:re(g.subscription);break;default:re(g.private)}},E=()=>{Qt(x).then(()=>{I(!0)})};return e.jsx(Ft,{title:i.QUERY_PUBLISH,visible:R,maxWidth:"sm",onClose:y,children:e.jsxs(Pt,{children:[e.jsxs("div",{className:"visibilityCheck",children:[e.jsx("div",{className:"label",children:"Choose the visibility for your query"}),e.jsxs(at,{variant:"contained",className:`isPublicCheck ${d===g.public&&"disabled"}`,children:[e.jsx(M,{variant:"contained",onClick:()=>{L(g.private)},color:o===g.public||o===g.subscription?"secondary":"primary",disabled:d===g.public,children:i.PRIVATE}),e.jsx(M,{variant:"contained",onClick:()=>{L(g.subscription)},color:o===g.subscription?"primary":"secondary",disabled:d===g.public,children:i.PRIVATE_TO_MY_ORG}),e.jsx(M,{variant:"contained",onClick:()=>{L(g.public)},color:o===g.public?"primary":"secondary",children:i.PUBLIC})]})]}),o===g.public&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"slugInput",children:e.jsx(He,{autoFocus:!0,label:"Unique Query Name",required:!0,placeholder:"Enter slug name",ishelpertext:1,helperText:!t&&`${x==null?void 0:x.length}/${we}`,value:x,warningText:!t&&i.MAX_LENGTH_ERROR("slug name",we),hasMax:!0,maxValue:we,onChange:S,errorText:D&&i.VIEW_NAME_ERROR("Slug"),ref:u,inputProps:{readOnly:t},endAdornment:_?e.jsx(Rt,{position:"end",children:e.jsx(V,{onClick:()=>window.open(window.location.origin+de.queriesSlug(f,_),"_blank"),children:e.jsx(be,{})})}):null})}),t&&e.jsx(he,{message:i.PUBLISHED_TEXT("query")}),o===g.public&&!t&&e.jsx(he,{message:i.PUBLISH_CONFIRM_MESSAGE("Query")})]}),e.jsxs("div",{className:"btnRow",children:[e.jsx(M,{disabled:w,variant:"contained",color:"secondary",onClick:y,className:"formBtn cancel",children:i.CANCEL}),!t&&e.jsx(M,{disabled:D||(x==null?void 0:x.length)>=50||w||o===g.public&&!(x!=null&&x.trim()),variant:"contained",color:"primary",onClick:r,className:"formBtn submit",children:w?e.jsx("img",{src:qt,alt:"loading",height:36}):i.SUBMIT}),t&&e.jsx(M,{type:"button",variant:"contained",color:"primary",onClick:E,children:N?i.COPIED:i.COPY_LINK})]})]})})};function yn({queryParams:s,setPageNumber:B,setSortBy:y,onPageChange:Y,onPageSizeChange:R,deleteQuery:f,defaultSize:C,handlePublishCallback:d}){const _=Te(),{height:x,headerHeight:O}=ye(),D=tn(),j=nn(),{totalPages:w=0,totalElements:m=0}=(j==null?void 0:j.pageable)||{},N=lt(),I=Be(),o=ke(),u=I||o,[t,S]=h.useState(!1),[r,L]=h.useState({}),[E,p]=h.useState(!1),[Q,A]=h.useState({}),K=(a,z)=>{y(a,z==="ASC"?"DESC":"ASC")},k=a=>B(a),P=a=>e.jsx(rt,{className:"queryName",onClick:()=>{_.push(`/queries/${a.id}`)},children:(a==null?void 0:a.name)||"Untitled Query"}),X=a=>a&&Le(a==null?void 0:a.modified),q=a=>a&&e.jsx(dt,{tags:a==null?void 0:a.tags}),G=a=>{L(a),S(!0)},Z=a=>e.jsxs(Ye,{onClick:()=>G(a),className:"queryText",children:[e.jsx("span",{className:"text",children:a.queryText}),e.jsx(V,{tooltip:"Preview",children:e.jsx(Ce,{})})]}),ee=()=>x-O-170||300,te=()=>{p(!1),A({}),re("")},ne=a=>e.jsxs(e.Fragment,{children:[e.jsx(Dt,{label:(a==null?void 0:a.visibility)===g.public?i.PUBLISHED:i.PUBLISH("Query"),children:e.jsx("span",{className:"publishBtn",children:e.jsx(V,{onClick:()=>{p(!0),A(a)},children:e.jsx(It,{})})})}),e.jsx(V,{onClick:()=>{_.push(`/queries/${a.id}`)},tooltip:"View",children:e.jsx(be,{})}),e.jsx(sn,{icon:!0,confirmButtonMessage:i.YES,cancelButtonMessage:i.NO,disabled:a.visibility===g.public,tooltip:i.DELETE(""),title:i.DELETE("Query"),confirmMessage:i.DELETE_CONFIRM_MESSAGE(`'${a.name||""}' query`),description:i.DELETE_QUERY_DESCRIPTION,onConfirm:z=>{z.stopPropagation(),f(a.id,a.name)}},"expire")]}),J=()=>e.jsx(Ae,{imgPath:ht,imgPathWebp:gt,title:!(s!=null&&s.tagName)&&!(s!=null&&s.searchPattern)&&!(s!=null&&s.status)?i.NO_QUERY_FOUND:i.NO_RESULT_FOUND_ON_FILTER,className:"emptyBlock",children:!(s!=null&&s.tagName)&&!(s!=null&&s.searchPattern)&&e.jsx(Ne,{to:"/queries/new?tabID=1",children:e.jsx(M,{variant:"contained",color:"primary",size:"large",children:i.CREATE_NEW_QUERY})})}),W=()=>e.jsx(Me,{title:D,children:D});if(w===0&&!u&&!D)return J();if(D)return W();const $=()=>{L({}),S(!1)};return e.jsxs(e.Fragment,{children:[e.jsx(ze,{open:t,id:r==null?void 0:r.id,text:r==null?void 0:r.queryText,queryPreview:r,onClose:$}),e.jsx(Ve,{data:N,columns:vt,isAction:!0,actionComponent:ne,actionColumnName:"Actions",rowRender:[{dataKey:"name",func:P},{dataKey:"modified",func:X},{dataKey:"tags",func:q},{dataKey:"queryText",func:Z}],loading:u,rowSize:75,bodyHeight:ee(),onItemsSort:K,sortBy:(s==null?void 0:s.sortBy)||"",sortOrder:(s==null?void 0:s.sortOrder)||"",nonSortableColumns:{tags:!0}}),(u?!0:(N==null?void 0:N.length)!==0)&&e.jsx("div",{className:"queryPagePagination",children:e.jsx(Ke,{onChange:k,count:w,page:(s==null?void 0:s.pageNo)||0,onPageChange:Y,totalElements:m,onPageSizeChange:R,isGotoPage:!0,isPageSize:!0,pageSize:(s==null?void 0:s.pageSize)||0,defaultSize:C})}),e.jsx(bn,{open:E,handleClose:te,row:Q,handlePublishCallback:d})]})}function Rn({queryParams:s,setPageNumber:B,setSortBy:y,onPageChange:Y,onPageSizeChange:R,onTagChange:f,resetTags:C,defaultSize:d}){const _=Te(),x=it(),{data:O,error:D}=_t.useGetPopularTags(Ee.stringify({entityType:Ot.SAVEDQUERY_TAG_TYPE}),x),j=!O&&!D,{height:w,headerHeight:m}=ye(),N=on(),I=an(),o=cn(),u=Be(),t=ke(),S=u||t,[r,L]=h.useState(!1),[E,p]=h.useState({}),{totalPages:Q=0,totalElements:A=0}=(I==null?void 0:I.pageable)||{},K=(a,z)=>{y(a,z==="ASC"?"DESC":"ASC")},k=a=>{B(a)},P=a=>e.jsx(rt,{className:"queryName",onClick:()=>{_.push(`/queries/${a==null?void 0:a.id}`)},children:(a==null?void 0:a.name)||"Untitled Query"}),X=a=>Le(a==null?void 0:a.modified),q=a=>a&&e.jsx(dt,{tags:a==null?void 0:a.tags}),G=a=>{p(a),L(!0)},Z=a=>e.jsxs(Ye,{onClick:()=>G(a),className:"queryText",children:[e.jsx("span",{className:"text",children:a.queryText}),e.jsx(V,{tooltip:"Preview",children:e.jsx(Ce,{})})]}),ee=({userId:a})=>Ut(a),te=()=>{p({}),L(!1)},ne=()=>w-m-230||300,J=a=>e.jsxs(e.Fragment,{children:[!x&&e.jsx(V,{onClick:()=>G(a),tooltip:i.VIEW_QUERY,children:e.jsx(Ce,{})}),x&&e.jsx(V,{onClick:()=>{_.push(`/queries/${a.id}`)},tooltip:i.VIEW_IN_EDITOR,children:e.jsx(be,{})})]}),W=()=>e.jsxs(e.Fragment,{children:[((s==null?void 0:s.tagValue)||(s==null?void 0:s.searchPattern))&&e.jsx(et,{popularTags:O,queryParams:s,loading:j,onTagChange:f,resetTags:C}),e.jsx(Ae,{imgPath:ht,imgPathWebp:gt,title:!(s!=null&&s.tagValue)&&!(s!=null&&s.searchPattern)?i.NO_ORG_QUERY_FOUND:i.NO_RESULT_FOUND_ON_FILTER,className:"emptyBlock"})]}),$=()=>e.jsx(Me,{title:N,children:N});return Q===0&&!S&&!N?W():N?$():e.jsxs("div",{children:[e.jsx(et,{popularTags:O,queryParams:s,loading:j,onTagChange:f,resetTags:C}),e.jsx(ze,{open:r,queryPreview:E,id:E==null?void 0:E.id,text:E==null?void 0:E.queryText,onClose:te}),e.jsx(Ve,{data:o,columns:wt,isAction:!0,actionComponent:a=>J(a),actionColumnName:"Actions",rowRender:[{dataKey:"userId",func:ee},{dataKey:"name",func:P},{dataKey:"modified",func:X},{dataKey:"tags",func:q},{dataKey:"queryText",func:Z}],loading:S,rowSize:75,bodyHeight:ne(),onItemsSort:K,sortBy:(s==null?void 0:s.sortBy)||"",sortOrder:(s==null?void 0:s.sortOrder)||"",nonSortableColumns:{tags:!0}}),(S?!0:(o==null?void 0:o.length)!==0)&&e.jsx(Ke,{onChange:k,count:Q,page:(s==null?void 0:s.pageNo)||0,onPageChange:Y,totalElements:A,onPageSizeChange:R,isGotoPage:!0,isPageSize:!0,pageSize:(s==null?void 0:s.pageSize)||0,defaultSize:d})]})}const mn=({tab:s})=>{var ue,xe;const y=Te(),{search:Y}=Lt(),R=it(),f=h.useRef(null),C=h.useRef(null),d=new URLSearchParams(Y),_=(d==null?void 0:d.get("sortBy"))||"",x=(d==null?void 0:d.get("sortOrder"))||"",O=(d==null?void 0:d.get("searchPattern"))||"",D=(d==null?void 0:d.get("visibility"))||"",{height:j,headerHeight:w,width:m}=ye(),N=lt(),I=ct(),[o,u]=h.useState({}),[t,S]=h.useState({from:"",to:"",duration:0}),[r,L]=h.useState(At.trending),[E,p]=h.useState(""),[Q,A]=h.useState(null),K=()=>{let n={..._e(o)};s===T.myQueries&&(n={...n,scope:Oe.private}),s===T.myOrgQuery&&(n={...n,scope:Oe.subscription,visibility:g.subscription}),delete n.isRecent,n=Ee.stringify({...n},{arrayFormat:"bracket"}),y.push(`/${s==null?void 0:s.toLowerCase()}?${n}`),s===T.queryHistory?pn({params:n,abortController:C,isRecent:(o==null?void 0:o.isRecent)==="true"}):s===T.myQueries?fn({params:n,isLoggedIn:R,abortController:C}):Sn({params:n,isLoggedIn:R,abortController:C})};h.useEffect(()=>{let n=_;n||(n="modified"),s===T.queryHistory&&n==="modified"&&(n="timestamp"),u({pageSize:d!=null&&d.get("pageSize")?Number(d==null?void 0:d.get("pageSize")):50,pageNo:d!=null&&d.get("pageNo")?Number(d==null?void 0:d.get("pageNo")):1,sortOrder:x||"DESC",sortBy:n||"",visibility:D,searchPattern:O||"",isRecent:s===T.queryHistory?"true":""})},[s]),h.useEffect(()=>{var n;fe.isEmpty(o)||(ln(!0),C!=null&&C.current&&((n=C==null?void 0:C.current)==null||n.abort()),setTimeout(K,200))},[o,r]),h.useEffect(()=>{t!=null&&t.from&&(t!=null&&t.to)&&u(n=>({...n,pageNo:1,from:t.from,to:t.to}))},[t]);const k=n=>{var U,c;const l=n.target.value;(U=f==null?void 0:f.current)!=null&&U.value&&((c=f==null?void 0:f.current)==null?void 0:c.value)!==""&&(f.current.value="");let v={..._e({...o,pageSize:50,pageNo:1,searchPattern:"",visibility:l===T.myOrgQuery?g.subscription:"",scope:l===T.myOrgQuery?Oe.subscription:"",sortBy:"",sortOrder:"",isRecent:l===T.queryHistory?"false":""})};if(l===T.views){y.push(`/${l}`);return}v=Ee.stringify({...v},{arrayFormat:"bracket"}),y.push(`/${l==null?void 0:l.toLowerCase()}?${v}`),S({from:"",to:"",duration:0})},P=async()=>{let{pageNo:n=1}=o;n-=(N==null?void 0:N.length)===1&&(o!=null&&o.pageNo)&&(o==null?void 0:o.pageNo)>1?1:0,u(l=>({...l,pageNo:n}))},X=(n,l)=>{jn(n,()=>{Yt(n),P()},l)},q=n=>{var v,U,c;let l=((c=(U=(v=n==null?void 0:n.target)==null?void 0:v.value)==null?void 0:U.toString())==null?void 0:c.trim())||"";l=Vt(l),u(H=>({...H,pageNo:1,searchPattern:l||""}))},G=n=>{var v;const l=(v=n==null?void 0:n.target)==null?void 0:v.value;u(U=>({...U,pageNo:1,visibility:l}))},Z=fe.debounce(q,500),ee=n=>{u(l=>({...l,pageNo:1,tagValue:l.tagValue===(n==null?void 0:n.value)?"":n==null?void 0:n.value}))},te=()=>{o!=null&&o.tagValue&&u(n=>({...n,pageNo:1,tagValue:""}))},ne=j-w||500,J=()=>{var n,l;return s===T.myQueries?!fe.isEmpty(N)||!!((n=o==null?void 0:o.searchPattern)!=null&&n.length):s===T.queryHistory?!fe.isEmpty(I)||!!((l=o==null?void 0:o.searchPattern)!=null&&l.length):!1},W=(n,l)=>{n&&l&&u(v=>({...v,pageNo:1,sortOrder:l,sortBy:n}))},$=n=>{u(l=>({...l,pageNo:n}))},a=n=>{u(l=>({...l,pageNo:n}))},z=n=>{u(l=>({...l,pageSize:n,pageNo:1}))},se=()=>{f.current&&(f.current.value=""),u(n=>({...n,pageNo:1,searchPattern:""}))},ae=n=>{u(l=>({...l,isRecent:n,from:"",to:"",searchPattern:""})),p(""),S({from:"",to:"",duration:0})},oe=n=>{S(l=>({...l,...n}))},Re=n=>{p(n),A(null)},ge=n=>{var U;let l=((U=n==null?void 0:n.target)==null?void 0:U.value)||0;if(l=Number(l),Ie.filter(c=>c.value===l).length){const{from:c,to:H}=Kt(Number(l));S({from:c,to:H,duration:l})}},me=async n=>{const l=Ee.stringify(_e({...o}));n===g.public?y.push(de.exploreQuery(l)):n===g.subscription?y.push(de.myOrgQuery(l)):y.push(de.myqueries(l))};return e.jsx(h.Suspense,{fallback:rn,children:e.jsx(dn,{height:ne,children:e.jsxs("main",{className:"mainContent",children:[J()&&m<ce.breakpoints.values.md&&e.jsx(M,{variant:"text",className:"createMobileBtn",children:e.jsx(Ne,{to:"/queries/new?tabID=1",onClick:n=>{n.ctrlKey||n.metaKey||n.altKey||n.shiftKey||n.button||n.defaultPrevented||Xe(1)},children:e.jsx(Ze,{})})}),e.jsxs("div",{className:"boxContent",children:[m<ce.breakpoints.values.md?e.jsx(tt,{className:"pageMobileToolbar",children:e.jsx("div",{className:"pageMobileTopBar",children:e.jsxs(hn,{children:[e.jsx(De,{value:s,onChange:k,children:Mt.map(n=>e.jsx(gn,{value:n.value,children:n.label},n.value))}),e.jsxs(nt,{className:"searchField",children:[e.jsx(He,{placeholder:i.SEARCH_ELIPSIS_CONTEXT(i.QUERIES),onChange:Z,defaultValue:(o==null?void 0:o.searchPattern)||"",inputRef:f}),e.jsx("span",{className:"searchIcon",children:(o==null?void 0:o.searchPattern)!==""?e.jsx(st,{fontSize:"small",className:"clearSearch",onClick:se}):e.jsx(Je,{})})]}),s===T.myQueries&&e.jsx(ot,{visibility:o==null?void 0:o.visibility,onFilterChange:G})]})})}):e.jsxs(tt,{className:"pageToolbar",children:[e.jsxs(Bt,{value:s,exclusive:!0,onChange:k,children:[R&&e.jsx(Se,{size:"small",className:"tabButton",value:"myQueries","aria-label":"My Queries",children:i.MY_SAVED_QUERIES}),R&&e.jsx(Se,{size:"small",className:"tabButton",value:"subscription","aria-label":"My Org Queries",children:i.MY_ORG_QUERIES}),R&&e.jsx(Se,{size:"small",className:"tabButton",value:"queryHistory","aria-label":"Query history",children:`${i.QUERY_HISTORY}`}),R&&e.jsx(Se,{size:"small",className:"tabButton",value:"views","aria-label":"Views",children:i.VIEWS})]}),e.jsxs("div",{className:"toolbarRight",children:[e.jsxs(nt,{className:"searchField",children:[e.jsx(He,{placeholder:i.SEARCH_ELIPSIS_CONTEXT(i.QUERIES),onChange:Z,defaultValue:(o==null?void 0:o.searchPattern)||"",inputRef:f}),e.jsx("span",{className:"searchIcon",children:(o==null?void 0:o.searchPattern)!==""?e.jsx(st,{fontSize:"small",className:"clearSearch",onClick:se}):e.jsx(Je,{})})]}),s===T.myQueries&&e.jsx(ot,{visibility:o==null?void 0:o.visibility,onFilterChange:G}),J()&&e.jsx(M,{color:"primary",variant:"contained",className:"createQueryBtn",children:e.jsxs(Ne,{to:"/queries/new?tabID=1",onClick:n=>{n.ctrlKey||n.metaKey||n.altKey||n.shiftKey||n.button||n.defaultPrevented||Xe(1)},children:[e.jsx("span",{className:"iconLeft addIcon",children:e.jsx(Ze,{})}),i.CREATE_NEW_QUERY]})})]})]}),s===T.queryHistory&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"filterToolbar",children:[e.jsxs("div",{className:"toggleBlock",children:[e.jsxs(at,{variant:"contained",className:"isRecentToggle",children:[e.jsx(M,{variant:"contained",onClick:()=>(o==null?void 0:o.isRecent)==="false"&&ae("true"),color:(o==null?void 0:o.isRecent)==="true"?"primary":"secondary",children:i.CURRENT_HISTORY}),e.jsx(M,{variant:"contained",onClick:()=>{(o==null?void 0:o.isRecent)==="true"&&ae("false")},color:(o==null?void 0:o.isRecent)==="false"?"primary":"secondary",children:i.HISTORICAL_HISTORY})]}),(o==null?void 0:o.isRecent)==="true"&&e.jsx(he,{message:i.CURRENT_QUERY_TEXT}),(o==null?void 0:o.isRecent)==="false"&&!(t!=null&&t.from)&&!(t!=null&&t.to)&&e.jsx(he,{message:i.HISTORICAL_WITHOUT_FILTER_QUERY_TEXT}),(o==null?void 0:o.isRecent)==="false"&&(t==null?void 0:t.from)&&(t==null?void 0:t.to)&&e.jsx(he,{message:i.HISTORICAL_QUERY_TEXT(Ue.utc(t==null?void 0:t.from).local().format("D MMM"),Ue.utc(t==null?void 0:t.to).local().format("D MMM"))})]}),e.jsx("div",{className:"filterBlock",children:(o==null?void 0:o.isRecent)==="false"&&e.jsxs(e.Fragment,{children:[E==="Duration"&&m>ce.breakpoints.values.md&&e.jsx("div",{className:"durationSelect",children:e.jsxs(De,{name:"analytics",value:t==null?void 0:t.duration,onChange:n=>{ge(n)},label:i.USAGE_OF_LAST,children:[e.jsx(le,{value:0,className:"selectPlaceholder",children:i.SELECT_DURATION}),(ue=Ie)==null?void 0:ue.map(n=>e.jsx(le,{value:n==null?void 0:n.value,selected:(n==null?void 0:n.value)===(t==null?void 0:t.duration),children:e.jsx("div",{className:"optionText",children:n.label})},n==null?void 0:n.value))]})}),E==="Range"&&m>ce.breakpoints.values.md&&e.jsxs(e.Fragment,{children:[e.jsx(je,{selectedDate:t!=null&&t.from?new Date(t==null?void 0:t.from):"",onDateChange:n=>{oe({from:new Date(n).toISOString()})},startDate:t!=null&&t.from?new Date(t==null?void 0:t.from):"",endDate:t!=null&&t.to?new Date(t==null?void 0:t.to):"",shouldConvert:!0,label:i.FROM,maxDate:t!=null&&t.to?new Date(t==null?void 0:t.to):new Date,selectsStart:!0}),e.jsx(je,{selectedDate:t!=null&&t.to?new Date(t==null?void 0:t.to):"",onDateChange:n=>{oe({to:new Date(n).toISOString()})},minDate:t!=null&&t.from?new Date(t==null?void 0:t.from):"",maxDate:new Date,label:i.TO,startDate:t!=null&&t.from?new Date(t==null?void 0:t.from):"",endDate:t!=null&&t.to?new Date(t==null?void 0:t.to):"",selectsEnd:!0,addForward:!0,shouldConvert:!0})]}),(t==null?void 0:t.from)&&(t==null?void 0:t.to)&&e.jsx(V,{tooltip:i.RESET_FILTER,onClick:()=>ae("false"),className:"resetBtn",children:e.jsx(un,{})}),e.jsx(V,{tooltip:i.FILTER,onClick:n=>A(n.currentTarget),className:"filterBtn",children:e.jsx(xn,{})}),e.jsx(kt,{anchorEl:Q,open:!!Q,onClose:()=>A(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:zt.map(({value:n})=>e.jsx(le,{selected:n===E,onClick:()=>Re(n),children:n},n))})]})})]}),m<ce.breakpoints.values.md&&e.jsxs("div",{className:"responsiveFilter",children:[E==="Duration"&&e.jsx("div",{className:"durationSelect",children:e.jsxs(De,{name:"analytics",value:t==null?void 0:t.duration,onChange:n=>{ge(n)},label:i.USAGE_OF_LAST,children:[e.jsx(le,{value:0,className:"selectPlaceholder",children:i.SELECT_DURATION}),(xe=Ie)==null?void 0:xe.map(n=>e.jsx(le,{value:n==null?void 0:n.value,selected:(n==null?void 0:n.value)===(t==null?void 0:t.duration),children:e.jsx("div",{className:"optionText",children:n.label})},n==null?void 0:n.value))]})}),E==="Range"&&e.jsxs(e.Fragment,{children:[e.jsx(je,{selectedDate:t!=null&&t.from?new Date(t==null?void 0:t.from):"",onDateChange:n=>{oe({from:new Date(n).toISOString()})},startDate:t!=null&&t.from?new Date(t==null?void 0:t.from):"",endDate:t!=null&&t.to?new Date(t==null?void 0:t.to):"",shouldConvert:!0,label:i.FROM,maxDate:t!=null&&t.to?new Date(t==null?void 0:t.to):new Date,selectsStart:!0}),e.jsx(je,{selectedDate:t!=null&&t.to?new Date(t==null?void 0:t.to):"",onDateChange:n=>{oe({to:new Date(n).toISOString()})},minDate:t!=null&&t.from?new Date(t==null?void 0:t.from):"",maxDate:new Date,label:i.TO,startDate:t!=null&&t.from?new Date(t==null?void 0:t.from):"",endDate:t!=null&&t.to?new Date(t==null?void 0:t.to):"",selectsEnd:!0,addForward:!0,shouldConvert:!0})]})]})]}),s===T.myQueries&&e.jsx(yn,{queryParams:o,setPageNumber:$,setSortBy:W,onPageChange:a,onPageSizeChange:z,deleteQuery:X,defaultSize:50,handlePublishCallback:me}),s===T.myOrgQuery&&e.jsx(Rn,{queryParams:o,setPageNumber:$,setSortBy:W,onPageChange:a,onPageSizeChange:z,deleteQuery:X,onTagChange:ee,resetTags:te,defaultSize:50}),s===T.queryHistory&&e.jsx(Tn,{queryParams:o,setPageNumber:$,setSortBy:W,onPageChange:a,onPageSizeChange:z,defaultSize:50})]})]})})})},_n=Ht.memo(mn);export{_n as default};
@@ -0,0 +1 @@
1
+ import{j as r,r as t}from"./vendor-charts-c2d37c0c.js";import{O as o,Q as a}from"./index-24f62d99.js";import"./vendor-editor-c82365af.js";import"./vendor-three-8b64368a.js";function m(){return r.jsx(t.Suspense,{fallback:o,children:r.jsx(a,{})})}export{m as default};
@@ -1,4 +1,4 @@
1
- var oMi=Object.defineProperty;var sMi=(e,t,r)=>t in e?oMi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ar=(e,t,r)=>(sMi(e,typeof t!="symbol"?t+"":t,r),r),dkt=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var ut=(e,t,r)=>(dkt(e,t,"read from private field"),r?r.call(e):t.get(e)),Cr=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},It=(e,t,r,n)=>(dkt(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var tK=(e,t,r,n)=>({set _(a){It(e,t,a,r)},get _(){return ut(e,t,n)}}),En=(e,t,r)=>(dkt(e,t,"access private method"),r);import{P as or,R as Ie,b as dp,d as zs,r as G,e as t$,f as lMi,g as iu,c as ri,B as ia,h as Su,j as M,_ as yu,i as Sgn,k as dtt,l as FYe,m as PX,n as uMi,q as cMi,t as pkt,u as FTr,v as dMi,$ as pMi,w as Vl,a as pp,x as Cg,T as as,y as Mgn,V as Fgn,z as nk,A as $H,C as vt,W as Bgn,D as LWt,E as FY,F as l0e,G as Tgn,H as Mk,I as e7t,J as nn,U as OWt,K as hMi,L as fMi,M as BYe,N as mMi,O as u0e,Q as gMi,S as zWt,X as xMi,Y as HWt,Z as yMi,a0 as vMi,a1 as Tw,a2 as Eb,a3 as li,a4 as hb,a5 as AMi,a6 as BT,a7 as TT,a8 as Rgn,a9 as Nde,aa as BTr,ab as bMi,ac as DMi,ad as Eg,ae as ta,af as K1,ag as TTr,ah as jX,ai as f3,aj as xu,ak as ed,al as wMi,am as Zr,an as RTr,ao as Yi,ap as Lde,aq as GWt,ar as Pgn,as as kMi,at as RT,au as jgn,av as CMi,aw as EMi,ax as UWt,ay as SMi,az as MMi,aA as Ign,aB as R3e,aC as FMi,aD as BMi,aE as TMi,aF as HB,aG as GB,aH as UB,aI as Ml,aJ as Fl,aK as RMi,aL as Sb,aM as Cd,aN as PTr,aO as bn,aP as PMi,aQ as Ngn,aR as VWt,aS as Lgn,aT as Ogn,aU as jMi,aV as WWt,aW as se,aX as oA,aY as sl,aZ as Nn,a_ as r$,a$ as Mb,b0 as IMi,b1 as c0e,b2 as ptt,b3 as NMi,b4 as Fb,b5 as d0e,b6 as hle,b7 as qq,b8 as LMi,b9 as P3e,ba as TYe,bb as jTr,bc as ITr,bd as No,be as OMi,bf as zMi,p as v5,bg as tb,bh as sm,bi as HMi,bj as GMi,bk as UMi,bl as D0,bm as iH,bn as m3,bo as VMi,bp as yU,bq as Ode,br as htt,bs as ftt,bt as WMi,bu as Ax,bv as KMi,bw as zgn,bx as so,by as _Mi,bz as Ws,bA as PT,bB as jT,bC as t7t,bD as cB,bE as qMi,bF as cg,bG as NTr,bH as YMi,bI as mtt,bJ as kv,bK as rK,bL as BY,bM as r7t,bN as IX,bO as JMi,bP as XMi,bQ as g3,bR as x3,bS as DJ,bT as n7t,bU as k4,bV as zde,bW as Hde,bX as RYe,bY as a7t,bZ as KWt,b_ as hkt,b$ as QMi,c0 as LTr,c1 as OTr,c2 as ZMi,c3 as $Mi,c4 as Hgn,c5 as zTr,c6 as j3e,c7 as I3e,c8 as e5i,c9 as t5i,ca as Ggn,cb as Ugn,cc as r5i,cd as n5i,ce as a5i,cf as i5i,cg as o5i,ch as s5i,ci as Gde,cj as l5i,ck as u5i,cl as PYe,cm as jYe,cn as IYe,co as HTr,cp as GTr,cq as c5i,cr as d5i,cs as p5i,ct as h5i,cu as gtt,cv as xtt,cw as f5i,cx as gu,cy as ytt,cz as dg,cA as oh,cB as m5i,cC as Ed,cD as g5i,cE as Vgn,cF as n$,cG as FR,cH as zo,cI as x5i,cJ as mp,cK as y5i,cL as p0e,cM as vu,cN as oH,cO as TY,cP as J2e,cQ as Hl,cR as gh,cS as Wgn,cT as Kgn,cU as _gn,cV as qgn,cW as Ygn,cX as G2,cY as v5i,cZ as Fo,c_ as _Wt,c$ as f0,d0 as aw,d1 as A5i,d2 as NYe,d3 as qWt,d4 as IT,d5 as b5i,d6 as pz,d7 as D5i,d8 as UTr,d9 as vtt,da as NT,db as NX,dc as w5i,dd as Vt,de as Jgn,df as k5i,dg as C5i,dh as E5i,di as S5i,dj as Wr,dk as Xgn,dl as BR,dm as vU,dn as Att,dp as L6,dq as Yq,dr as Iue,ds as LT,dt as M5i,du as btt,dv as a$,dw as zv,dx as Dtt,dy as F5i,dz as VTr,dA as Sd,dB as jn,dC as B5i,dD as YWt,dE as JWt,dF as Qgn,dG as T5i,dH as XWt,dI as h0e,dJ as QWt,dK as wtt,dL as Ll,dM as Zgn,dN as N3e,dO as R5i,dP as MF,dQ as o4,dR as AC,dS as FF,dT as u0,dU as bC,dV as P5i,dW as X2e,dX as WTr,dY as f0e,dZ as nK,d_ as $i,d$ as $gn,e0 as ZWt,e1 as m0e,e2 as eG,e3 as j5i,e4 as I5i,e5 as g0e,e6 as LX,e7 as tG,e8 as rG,e9 as Ai,ea as ktt,eb as om,ec as N5i,ed as TR,ee as e1n,ef as x0e,eg as Fk,eh as y0e,ei as v0e,ej as L5i,ek as Ko,el as by,em as y3,en as KTr,eo as i7t,ep as t1n,eq as $Wt,er as Jq,es as _Tr,et as O5i,eu as i$,ev as r1n,ew as z5i,ex as wa,ey as H5i,ez as AU,eA as o7t,eB as n1n,eC as a1n,eD as o$,eE as LYe,eF as s7t,eG as i1n,eH as eKt,eI as _1,eJ as gm,eK as Ey,eL as G5i,eM as Xp,eN as wJ,eO as U5i,eP as V5i,eQ as OX,eR as fkt,eS as tKt,eT as W5i,eU as ml,eV as s$,eW as K5i,eX as _5i,eY as q5i,eZ as Y5i,e_ as o1n,e$ as J5i,f0 as zX,f1 as X5i,f2 as Ctt,f3 as Ett,f4 as VB,f5 as Q5i,f6 as Ude,f7 as rb,f8 as rKt,f9 as gw,fa as nKt,fb as aKt,fc as iKt,fd as Z5i,fe as $5i,ff as eFi,fg as OYe,fh as aK,fi as z9,fj as tFi,fk as rFi,fl as T7,fm as fle,fn as zYe,fo as HYe,fp as Gy,fq as Au,fr as Stt,fs as oKt,ft as s1n,fu as WB,fv as l7t,fw as bU,fx as sKt,fy as A5,fz as lKt,fA as Mtt,fB as uKt,fC as DU,fD as l1n,fE as cKt,fF as dKt,fG as nFi,fH as aFi,fI as AE,fJ as Rw,fK as u1n,fL as qTr,fM as c1n,fN as pKt,fO as iFi,fP as A0e,fQ as d1n,fR as GYe,fS as p1n,fT as FE,fU as U1,fV as oFi,fW as sFi,fX as h1n,fY as hKt,fZ as fKt,f_ as f1n,f$ as u7t,g0 as m1n,g1 as lFi,g2 as g1n,g3 as x1n,g4 as y1n,g5 as Ftt,g6 as v1n,g7 as mKt,g8 as uFi,g9 as l$,ga as b0e,gb as cFi,gc as Nue,gd as dFi,ge as pFi,gf as sH,gg as gKt,gh as lH,gi as uH,gj as hFi,gk as Vde,gl as A1n,gm as b1n,gn as u$,go as D0e,gp as D1n,gq as fFi,gr as w1n,gs as fb,gt as YTr,gu as mFi,gv as c7t,gw as gFi,gx as xFi,gy as yFi,gz as k1n,gA as vFi,gB as AFi,gC as d7t,gD as Btt,gE as xKt,gF as C1n,gG as w0e,gH as bFi,gI as DFi,gJ as E1n,gK as wFi,gL as Q2e,gM as kFi,gN as Z2e,gO as CFi,gP as EFi,gQ as SFi,gR as MFi,gS as FFi,gT as BFi,gU as TFi,gV as yKt,gW as S1n,gX as RFi,gY as PFi,gZ as mkt,g_ as M1n,g$ as jFi,h0 as IFi,h1 as gkt,h2 as NFi,h3 as vKt,h4 as Z0,h5 as Ttt,h6 as LFi,h7 as nG,h8 as UYe,h9 as L3e,ha as JTr,hb as OFi,hc as zFi,hd as HFi,he as GFi,hf as UFi,hg as VFi,hh as WFi,hi as KFi,hj as _Fi,hk as RR,hl as KB,hm as AKt,hn as Lue,ho as VYe,hp as RY,hq as qFi,hr as F1n,hs as B1n,ht as T1n,hu as p7t,hv as iK,hw as WYe,hx as bKt,hy as xkt,hz as Wde,hA as YFi,hB as JFi,hC as XFi,hD as QFi,hE as ZFi,hF as $Fi,hG as e6i,hH as t6i,hI as R1n,hJ as P1n,hK as r6i,hL as j1n,hM as PR,hN as n6i,hO as oK,hP as a6i,hQ as i6i,hR as PY,hS as h7t,hT as f7t,hU as o6i,hV as ykt,hW as s6i,hX as l6i,hY as Rtt,hZ as u6i,h_ as c6i,h$ as d6i,i0 as p6i,i1 as h6i,i2 as I1n,i3 as Oue,i4 as O3e,i5 as N1n,i6 as L1n,i7 as f6i,i8 as DKt,i9 as m6i,ia as Ptt,ib as c$,ic as Bk,id as g6i,ie as O1n,ig as x6i,ih as z1n,ii as y6i,ij as v6i,ik as A6i,il as b6i,im as k0e,io as D6i,ip as w6i,iq as q3,ir as XTr,is as wKt,it as k6i,iu as C6i,iv as E6i,iw as S6i,ix as M6i,iy as F6i,iz as QTr,iA as B6i,iB as U2,iC as H1n,iD as T6i,iE as R6i,iF as P6i,iG as j6i,iH as G1n,iI as jtt,iJ as kKt,iK as I6i,iL as N6i,iM as U1n,iN as d$,iO as CKt,iP as EKt,iQ as $2e,iR as L6i,iS as O6i,iT as z3e,iU as KYe,iV as z6i,iW as H6i,iX as _Ye,iY as V1n,iZ as W1n,i_ as K1n,i$ as _1n,j0 as zue,j1 as G6i,j2 as q1n,j3 as U6i,j4 as V6i,j5 as W6i,j6 as K6i,j7 as _6i,j8 as q6i,j9 as ZTr,ja as Y6i,jb as J6i,jc as X6i,jd as Q6i,je as Z6i,jf as $6i,jg as m7t,jh as Y1n,ji as J1n,jj as eBi,jk as X1n,jl as HX,jm as tBi,jn as g1,jo as rBi,jp as $Tr,jq as SKt,jr as Q1n,js as Z1n,jt as $1n,ju as nBi,jv as aBi,jw as iBi,jx as oBi,jy as sBi,jz as lBi,jA as DC,jB as vkt,jC as uBi,jD as eRr,jE as cBi,jF as dBi,jG as MKt,jH as pBi,jI as exn,jJ as hBi,jK as fBi,jL as mBi,jM as tRr,jN as gBi,jO as O6,jP as Akt,jQ as xBi,jR as txn,jS as rxn,jT as yBi,jU as $l,jV as nxn,jW as vBi,jX as ABi,jY as bBi,jZ as DBi,j_ as wBi,j$ as kBi,k0 as CBi,k1 as EBi,k2 as SBi,k3 as MBi,k4 as FBi,k5 as BBi,k6 as TBi,k7 as RBi,k8 as PBi,k9 as jBi,ka as IBi,kb as NBi,kc as LBi,kd as ebe,ke as OBi,kf as zBi,kg as HBi,kh as GBi,ki as axn,kj as UBi,kk as FKt,kl as VBi,km as WBi,kn as qYe,ko as KBi,kp as _Bi,kq as rRr,kr as nRr,ks as qBi,kt as BKt,ku as YBi,kv as JBi,kw as XBi,kx as ixn,ky as oxn,kz as QBi,kA as ZBi,kB as H3e,kC as $Bi,kD as sxn,kE as lxn,kF as eTi,kG as tTi,kH as Itt,kI as yae,kJ as rTi,kK as nTi,kL as aTi,kM as iTi,kN as oTi,kO as sTi,kP as lTi,kQ as tbe,kR as aRr,kS as uTi,kT as cTi,kU as dTi,kV as pTi,kW as hTi,kX as fTi,kY as mTi,kZ as gTi,k_ as Fi,k$ as Lc,l0 as xTi,l1 as yTi,l2 as mb,l3 as vTi,l4 as ATi,l5 as Kde,l6 as uxn,l7 as Yh,l8 as bTi,l9 as DTi,la as wTi,lb as TKt,lc as cxn,ld as Ntt,le as kTi,lf as iRr,lg as CTi,lh as ETi,li as STi,lj as MTi,lk as oRr,ll as g7t,lm as FTi,ln as BTi,lo as TTi,lp as Ltt,lq as RKt,lr as Ott,ls as RTi,lt as sRr,lu as PTi,lv as jTi,lw as ITi,lx as iw,ly as NTi,lz as dxn,lA as pxn,lB as hxn,lC as YYe,lD as Nl,lE as LTi,lF as OT,lG as fxn,lH as OTi,lI as lRr,lJ as PKt,lK as zTi,lL as jKt,lM as mxn,lN as HTi,lO as GTi,lP as UTi,lQ as VTi,lR as WTi,lS as KTi,lT as R7,lU as _Ti,lV as gxn,lW as qTi,lX as xxn,lY as yxn,lZ as Qi,l_ as gl,l$ as YTi,m0 as JTi,m1 as vxn,m2 as Axn,m3 as XTi,m4 as IKt,m5 as bxn,m6 as QTi,m7 as ztt,m8 as Dxn,m9 as wxn,ma as ZTi,mb as $Ti,mc as kxn,md as Cxn,me as eRi,mf as tRi,mg as rRi,mh as uRr,mi as bkt,mj as x7t,mk as NKt,ml as JYe,mm as cRr,mn as sK,mo as dRr,mp as Exn,mq as nRi,mr as aRi,ms as iRi,mt as Sxn,mu as y7t,mv as LKt,mw as GX,mx as OKt,my as Mxn,mz as oRi,mA as sRi,mB as zKt,mC as HKt,mD as pRr,mE as lRi,mF as uRi,mG as cRi,mH as Fxn,mI as dRi,mJ as pRi,mK as hRi,mL as fRi,mM as hRr,mN as bf,mO as mRi,mP as gRi,mQ as xRi,mR as yRi,mS as vRi,mT as Bxn,mU as Dkt,mV as Txn,mW as v7t,mX as wkt,mY as ARi,mZ as bRi,m_ as Htt,m$ as DRi,n0 as Rxn,n1 as wRi,n2 as kRi,n3 as JD,n4 as CRi,n5 as mle,n6 as Pxn,n7 as ERi,n8 as jxn,n9 as SRi,na as Ixn,nb as Nxn,nc as Lxn,nd as Oxn,ne as fRr,nf as mRr,ng as MRi,nh as FRi,ni as Gtt,nj as BRi,nk as TRi,nl as zxn,nm as C0e,nn as A7t,no as RRi,np as Hxn,nq as PRi,nr as jRi,ns as IRi,nt as GKt,nu as NRi,nv as LRi,nw as Gxn,nx as Uxn,ny as vae,nz as Aae,nA as ORi,nB as gRr,nC as zRi,nD as Vxn,nE as UKt,nF as Wxn,nG as HRi,nH as GRi,nI as URi,nJ as VRi,nK as WRi,nL as Kxn,nM as VKt,nN as wU,nO as KRi,nP as _xn,nQ as _Ri,nR as qRi,nS as YRi,nT as JRi,nU as XRi,nV as QRi,nW as ZRi,nX as kkt,nY as $Ri,nZ as qxn,n_ as ePi,n$ as tPi,o0 as rPi,o1 as nPi,o2 as _de,o3 as Yxn,o4 as Jxn,o5 as aPi,o6 as Xxn,o7 as WKt,o8 as iPi,o9 as XYe,oa as xRr,ob as Hue,oc as KO,od as Uh,oe as gle,of as T4,og as Qxn,oh as QYe,oi as Zxn,oj as yRr,ok as oPi,ol as sPi,om as lPi,on as QC,oo as $xn,op as vRr,oq as rbe,or as uPi,os as cPi,ot as dPi,ou as pPi,ov as hPi,ow as nbe,ox as eyn,oy as fPi,oz as wv,oA as mPi,oB as Gue,oC as gPi,oD as xPi,oE as yPi,oF as vPi,oG as APi,oH as bPi,oI as DPi,oJ as wPi,oK as kPi,oL as CPi,oM as EPi,oN as SPi,oO as b5,oP as MPi,oQ as FPi,oR as BPi,oS as TPi,oT as RPi,oU as PPi,oV as jPi,oW as IPi,oX as NPi,oY as LPi,oZ as OPi}from"./vendor-charts-983c7ae8.js";import{_ as p$}from"./vendor-editor-a0c582a1.js";import{c as zPi,d as HPi,w as GPi,u as UPi,a as VPi,G as ARr,E as WPi,H as tyn,C as KPi,M as _Pi}from"./vendor-three-8b2e11db.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(a){if(a.ep)return;a.ep=!0;const o=r(a);fetch(a.href,o)}})();function bRr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function DRr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bRr(Object(r),!0).forEach(function(n){ryn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bRr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function G3e(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?G3e=function(t){return typeof t}:G3e=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G3e(e)}function ryn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nyn(e,t){return qPi(e)||YPi(e,t)||JPi(e,t)||XPi()}function qPi(e){if(Array.isArray(e))return e}function YPi(e,t){var r=e&&(typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"]);if(r!=null){var n=[],a=!0,o=!1,s,l;try{for(r=r.call(e);!(a=(s=r.next()).done)&&(n.push(s.value),!(t&&n.length===t));a=!0);}catch(u){o=!0,l=u}finally{try{!a&&r.return!=null&&r.return()}finally{if(o)throw l}}return n}}function JPi(e,t){if(e){if(typeof e=="string")return wRr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wRr(e,t)}}function wRr(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function XPi(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ var oMi=Object.defineProperty;var sMi=(e,t,r)=>t in e?oMi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ar=(e,t,r)=>(sMi(e,typeof t!="symbol"?t+"":t,r),r),dkt=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var ut=(e,t,r)=>(dkt(e,t,"read from private field"),r?r.call(e):t.get(e)),Cr=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},It=(e,t,r,n)=>(dkt(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);var tK=(e,t,r,n)=>({set _(a){It(e,t,a,r)},get _(){return ut(e,t,n)}}),En=(e,t,r)=>(dkt(e,t,"access private method"),r);import{P as or,R as Ie,b as dp,d as zs,r as G,e as t$,f as lMi,g as iu,c as ri,B as ia,h as Su,j as M,_ as yu,i as Sgn,k as dtt,l as FYe,m as PX,n as uMi,q as cMi,t as pkt,u as FTr,v as dMi,$ as pMi,w as Vl,a as pp,x as Cg,T as as,y as Mgn,V as Fgn,z as nk,A as $H,C as vt,W as Bgn,D as LWt,E as FY,F as l0e,G as Tgn,H as Mk,I as e7t,J as nn,U as OWt,K as hMi,L as fMi,M as BYe,N as mMi,O as u0e,Q as gMi,S as zWt,X as xMi,Y as HWt,Z as yMi,a0 as vMi,a1 as Tw,a2 as Eb,a3 as li,a4 as hb,a5 as AMi,a6 as BT,a7 as TT,a8 as Rgn,a9 as Nde,aa as BTr,ab as bMi,ac as DMi,ad as Eg,ae as ta,af as K1,ag as TTr,ah as jX,ai as f3,aj as xu,ak as ed,al as wMi,am as Zr,an as RTr,ao as Yi,ap as Lde,aq as GWt,ar as Pgn,as as kMi,at as RT,au as jgn,av as CMi,aw as EMi,ax as UWt,ay as SMi,az as MMi,aA as Ign,aB as R3e,aC as FMi,aD as BMi,aE as TMi,aF as HB,aG as GB,aH as UB,aI as Ml,aJ as Fl,aK as RMi,aL as Sb,aM as Cd,aN as PTr,aO as bn,aP as PMi,aQ as Ngn,aR as VWt,aS as Lgn,aT as Ogn,aU as jMi,aV as WWt,aW as se,aX as oA,aY as sl,aZ as Nn,a_ as r$,a$ as Mb,b0 as IMi,b1 as c0e,b2 as ptt,b3 as NMi,b4 as Fb,b5 as d0e,b6 as hle,b7 as qq,b8 as LMi,b9 as P3e,ba as TYe,bb as jTr,bc as ITr,bd as No,be as OMi,bf as zMi,p as v5,bg as tb,bh as sm,bi as HMi,bj as GMi,bk as UMi,bl as D0,bm as iH,bn as m3,bo as VMi,bp as yU,bq as Ode,br as htt,bs as ftt,bt as WMi,bu as Ax,bv as KMi,bw as zgn,bx as so,by as _Mi,bz as Ws,bA as PT,bB as jT,bC as t7t,bD as cB,bE as qMi,bF as cg,bG as NTr,bH as YMi,bI as mtt,bJ as kv,bK as rK,bL as BY,bM as r7t,bN as IX,bO as JMi,bP as XMi,bQ as g3,bR as x3,bS as DJ,bT as n7t,bU as k4,bV as zde,bW as Hde,bX as RYe,bY as a7t,bZ as KWt,b_ as hkt,b$ as QMi,c0 as LTr,c1 as OTr,c2 as ZMi,c3 as $Mi,c4 as Hgn,c5 as zTr,c6 as j3e,c7 as I3e,c8 as e5i,c9 as t5i,ca as Ggn,cb as Ugn,cc as r5i,cd as n5i,ce as a5i,cf as i5i,cg as o5i,ch as s5i,ci as Gde,cj as l5i,ck as u5i,cl as PYe,cm as jYe,cn as IYe,co as HTr,cp as GTr,cq as c5i,cr as d5i,cs as p5i,ct as h5i,cu as gtt,cv as xtt,cw as f5i,cx as gu,cy as ytt,cz as dg,cA as oh,cB as m5i,cC as Ed,cD as g5i,cE as Vgn,cF as n$,cG as FR,cH as zo,cI as x5i,cJ as mp,cK as y5i,cL as p0e,cM as vu,cN as oH,cO as TY,cP as J2e,cQ as Hl,cR as gh,cS as Wgn,cT as Kgn,cU as _gn,cV as qgn,cW as Ygn,cX as G2,cY as v5i,cZ as Fo,c_ as _Wt,c$ as f0,d0 as aw,d1 as A5i,d2 as NYe,d3 as qWt,d4 as IT,d5 as b5i,d6 as pz,d7 as D5i,d8 as UTr,d9 as vtt,da as NT,db as NX,dc as w5i,dd as Vt,de as Jgn,df as k5i,dg as C5i,dh as E5i,di as S5i,dj as Wr,dk as Xgn,dl as BR,dm as vU,dn as Att,dp as L6,dq as Yq,dr as Iue,ds as LT,dt as M5i,du as btt,dv as a$,dw as zv,dx as Dtt,dy as F5i,dz as VTr,dA as Sd,dB as jn,dC as B5i,dD as YWt,dE as JWt,dF as Qgn,dG as T5i,dH as XWt,dI as h0e,dJ as QWt,dK as wtt,dL as Ll,dM as Zgn,dN as N3e,dO as R5i,dP as MF,dQ as o4,dR as AC,dS as FF,dT as u0,dU as bC,dV as P5i,dW as X2e,dX as WTr,dY as f0e,dZ as nK,d_ as $i,d$ as $gn,e0 as ZWt,e1 as m0e,e2 as eG,e3 as j5i,e4 as I5i,e5 as g0e,e6 as LX,e7 as tG,e8 as rG,e9 as Ai,ea as ktt,eb as om,ec as N5i,ed as TR,ee as e1n,ef as x0e,eg as Fk,eh as y0e,ei as v0e,ej as L5i,ek as Ko,el as by,em as y3,en as KTr,eo as i7t,ep as t1n,eq as $Wt,er as Jq,es as _Tr,et as O5i,eu as i$,ev as r1n,ew as z5i,ex as wa,ey as H5i,ez as AU,eA as o7t,eB as n1n,eC as a1n,eD as o$,eE as LYe,eF as s7t,eG as i1n,eH as eKt,eI as _1,eJ as gm,eK as Ey,eL as G5i,eM as Xp,eN as wJ,eO as U5i,eP as V5i,eQ as OX,eR as fkt,eS as tKt,eT as W5i,eU as ml,eV as s$,eW as K5i,eX as _5i,eY as q5i,eZ as Y5i,e_ as o1n,e$ as J5i,f0 as zX,f1 as X5i,f2 as Ctt,f3 as Ett,f4 as VB,f5 as Q5i,f6 as Ude,f7 as rb,f8 as rKt,f9 as gw,fa as nKt,fb as aKt,fc as iKt,fd as Z5i,fe as $5i,ff as eFi,fg as OYe,fh as aK,fi as z9,fj as tFi,fk as rFi,fl as T7,fm as fle,fn as zYe,fo as HYe,fp as Gy,fq as Au,fr as Stt,fs as oKt,ft as s1n,fu as WB,fv as l7t,fw as bU,fx as sKt,fy as A5,fz as lKt,fA as Mtt,fB as uKt,fC as DU,fD as l1n,fE as cKt,fF as dKt,fG as nFi,fH as aFi,fI as AE,fJ as Rw,fK as u1n,fL as qTr,fM as c1n,fN as pKt,fO as iFi,fP as A0e,fQ as d1n,fR as GYe,fS as p1n,fT as FE,fU as U1,fV as oFi,fW as sFi,fX as h1n,fY as hKt,fZ as fKt,f_ as f1n,f$ as u7t,g0 as m1n,g1 as lFi,g2 as g1n,g3 as x1n,g4 as y1n,g5 as Ftt,g6 as v1n,g7 as mKt,g8 as uFi,g9 as l$,ga as b0e,gb as cFi,gc as Nue,gd as dFi,ge as pFi,gf as sH,gg as gKt,gh as lH,gi as uH,gj as hFi,gk as Vde,gl as A1n,gm as b1n,gn as u$,go as D0e,gp as D1n,gq as fFi,gr as w1n,gs as fb,gt as YTr,gu as mFi,gv as c7t,gw as gFi,gx as xFi,gy as yFi,gz as k1n,gA as vFi,gB as AFi,gC as d7t,gD as Btt,gE as xKt,gF as C1n,gG as w0e,gH as bFi,gI as DFi,gJ as E1n,gK as wFi,gL as Q2e,gM as kFi,gN as Z2e,gO as CFi,gP as EFi,gQ as SFi,gR as MFi,gS as FFi,gT as BFi,gU as TFi,gV as yKt,gW as S1n,gX as RFi,gY as PFi,gZ as mkt,g_ as M1n,g$ as jFi,h0 as IFi,h1 as gkt,h2 as NFi,h3 as vKt,h4 as Z0,h5 as Ttt,h6 as LFi,h7 as nG,h8 as UYe,h9 as L3e,ha as JTr,hb as OFi,hc as zFi,hd as HFi,he as GFi,hf as UFi,hg as VFi,hh as WFi,hi as KFi,hj as _Fi,hk as RR,hl as KB,hm as AKt,hn as Lue,ho as VYe,hp as RY,hq as qFi,hr as F1n,hs as B1n,ht as T1n,hu as p7t,hv as iK,hw as WYe,hx as bKt,hy as xkt,hz as Wde,hA as YFi,hB as JFi,hC as XFi,hD as QFi,hE as ZFi,hF as $Fi,hG as e6i,hH as t6i,hI as R1n,hJ as P1n,hK as r6i,hL as j1n,hM as PR,hN as n6i,hO as oK,hP as a6i,hQ as i6i,hR as PY,hS as h7t,hT as f7t,hU as o6i,hV as ykt,hW as s6i,hX as l6i,hY as Rtt,hZ as u6i,h_ as c6i,h$ as d6i,i0 as p6i,i1 as h6i,i2 as I1n,i3 as Oue,i4 as O3e,i5 as N1n,i6 as L1n,i7 as f6i,i8 as DKt,i9 as m6i,ia as Ptt,ib as c$,ic as Bk,id as g6i,ie as O1n,ig as x6i,ih as z1n,ii as y6i,ij as v6i,ik as A6i,il as b6i,im as k0e,io as D6i,ip as w6i,iq as q3,ir as XTr,is as wKt,it as k6i,iu as C6i,iv as E6i,iw as S6i,ix as M6i,iy as F6i,iz as QTr,iA as B6i,iB as U2,iC as H1n,iD as T6i,iE as R6i,iF as P6i,iG as j6i,iH as G1n,iI as jtt,iJ as kKt,iK as I6i,iL as N6i,iM as U1n,iN as d$,iO as CKt,iP as EKt,iQ as $2e,iR as L6i,iS as O6i,iT as z3e,iU as KYe,iV as z6i,iW as H6i,iX as _Ye,iY as V1n,iZ as W1n,i_ as K1n,i$ as _1n,j0 as zue,j1 as G6i,j2 as q1n,j3 as U6i,j4 as V6i,j5 as W6i,j6 as K6i,j7 as _6i,j8 as q6i,j9 as ZTr,ja as Y6i,jb as J6i,jc as X6i,jd as Q6i,je as Z6i,jf as $6i,jg as m7t,jh as Y1n,ji as J1n,jj as eBi,jk as X1n,jl as HX,jm as tBi,jn as g1,jo as rBi,jp as $Tr,jq as SKt,jr as Q1n,js as Z1n,jt as $1n,ju as nBi,jv as aBi,jw as iBi,jx as oBi,jy as sBi,jz as lBi,jA as DC,jB as vkt,jC as uBi,jD as eRr,jE as cBi,jF as dBi,jG as MKt,jH as pBi,jI as exn,jJ as hBi,jK as fBi,jL as mBi,jM as tRr,jN as gBi,jO as O6,jP as Akt,jQ as xBi,jR as txn,jS as rxn,jT as yBi,jU as $l,jV as nxn,jW as vBi,jX as ABi,jY as bBi,jZ as DBi,j_ as wBi,j$ as kBi,k0 as CBi,k1 as EBi,k2 as SBi,k3 as MBi,k4 as FBi,k5 as BBi,k6 as TBi,k7 as RBi,k8 as PBi,k9 as jBi,ka as IBi,kb as NBi,kc as LBi,kd as ebe,ke as OBi,kf as zBi,kg as HBi,kh as GBi,ki as axn,kj as UBi,kk as FKt,kl as VBi,km as WBi,kn as qYe,ko as KBi,kp as _Bi,kq as rRr,kr as nRr,ks as qBi,kt as BKt,ku as YBi,kv as JBi,kw as XBi,kx as ixn,ky as oxn,kz as QBi,kA as ZBi,kB as H3e,kC as $Bi,kD as sxn,kE as lxn,kF as eTi,kG as tTi,kH as Itt,kI as yae,kJ as rTi,kK as nTi,kL as aTi,kM as iTi,kN as oTi,kO as sTi,kP as lTi,kQ as tbe,kR as aRr,kS as uTi,kT as cTi,kU as dTi,kV as pTi,kW as hTi,kX as fTi,kY as mTi,kZ as gTi,k_ as Fi,k$ as Lc,l0 as xTi,l1 as yTi,l2 as mb,l3 as vTi,l4 as ATi,l5 as Kde,l6 as uxn,l7 as Yh,l8 as bTi,l9 as DTi,la as wTi,lb as TKt,lc as cxn,ld as Ntt,le as kTi,lf as iRr,lg as CTi,lh as ETi,li as STi,lj as MTi,lk as oRr,ll as g7t,lm as FTi,ln as BTi,lo as TTi,lp as Ltt,lq as RKt,lr as Ott,ls as RTi,lt as sRr,lu as PTi,lv as jTi,lw as ITi,lx as iw,ly as NTi,lz as dxn,lA as pxn,lB as hxn,lC as YYe,lD as Nl,lE as LTi,lF as OT,lG as fxn,lH as OTi,lI as lRr,lJ as PKt,lK as zTi,lL as jKt,lM as mxn,lN as HTi,lO as GTi,lP as UTi,lQ as VTi,lR as WTi,lS as KTi,lT as R7,lU as _Ti,lV as gxn,lW as qTi,lX as xxn,lY as yxn,lZ as Qi,l_ as gl,l$ as YTi,m0 as JTi,m1 as vxn,m2 as Axn,m3 as XTi,m4 as IKt,m5 as bxn,m6 as QTi,m7 as ztt,m8 as Dxn,m9 as wxn,ma as ZTi,mb as $Ti,mc as kxn,md as Cxn,me as eRi,mf as tRi,mg as rRi,mh as uRr,mi as bkt,mj as x7t,mk as NKt,ml as JYe,mm as cRr,mn as sK,mo as dRr,mp as Exn,mq as nRi,mr as aRi,ms as iRi,mt as Sxn,mu as y7t,mv as LKt,mw as GX,mx as OKt,my as Mxn,mz as oRi,mA as sRi,mB as zKt,mC as HKt,mD as pRr,mE as lRi,mF as uRi,mG as cRi,mH as Fxn,mI as dRi,mJ as pRi,mK as hRi,mL as fRi,mM as hRr,mN as bf,mO as mRi,mP as gRi,mQ as xRi,mR as yRi,mS as vRi,mT as Bxn,mU as Dkt,mV as Txn,mW as v7t,mX as wkt,mY as ARi,mZ as bRi,m_ as Htt,m$ as DRi,n0 as Rxn,n1 as wRi,n2 as kRi,n3 as JD,n4 as CRi,n5 as mle,n6 as Pxn,n7 as ERi,n8 as jxn,n9 as SRi,na as Ixn,nb as Nxn,nc as Lxn,nd as Oxn,ne as fRr,nf as mRr,ng as MRi,nh as FRi,ni as Gtt,nj as BRi,nk as TRi,nl as zxn,nm as C0e,nn as A7t,no as RRi,np as Hxn,nq as PRi,nr as jRi,ns as IRi,nt as GKt,nu as NRi,nv as LRi,nw as Gxn,nx as Uxn,ny as vae,nz as Aae,nA as ORi,nB as gRr,nC as zRi,nD as Vxn,nE as UKt,nF as Wxn,nG as HRi,nH as GRi,nI as URi,nJ as VRi,nK as WRi,nL as Kxn,nM as VKt,nN as wU,nO as KRi,nP as _xn,nQ as _Ri,nR as qRi,nS as YRi,nT as JRi,nU as XRi,nV as QRi,nW as ZRi,nX as kkt,nY as $Ri,nZ as qxn,n_ as ePi,n$ as tPi,o0 as rPi,o1 as nPi,o2 as _de,o3 as Yxn,o4 as Jxn,o5 as aPi,o6 as Xxn,o7 as WKt,o8 as iPi,o9 as XYe,oa as xRr,ob as Hue,oc as KO,od as Uh,oe as gle,of as T4,og as Qxn,oh as QYe,oi as Zxn,oj as yRr,ok as oPi,ol as sPi,om as lPi,on as QC,oo as $xn,op as vRr,oq as rbe,or as uPi,os as cPi,ot as dPi,ou as pPi,ov as hPi,ow as nbe,ox as eyn,oy as fPi,oz as wv,oA as mPi,oB as Gue,oC as gPi,oD as xPi,oE as yPi,oF as vPi,oG as APi,oH as bPi,oI as DPi,oJ as wPi,oK as kPi,oL as CPi,oM as EPi,oN as SPi,oO as b5,oP as MPi,oQ as FPi,oR as BPi,oS as TPi,oT as RPi,oU as PPi,oV as jPi,oW as IPi,oX as NPi,oY as LPi,oZ as OPi}from"./vendor-charts-c2d37c0c.js";import{_ as p$}from"./vendor-editor-c82365af.js";import{c as zPi,d as HPi,w as GPi,u as UPi,a as VPi,G as ARr,E as WPi,H as tyn,C as KPi,M as _Pi}from"./vendor-three-8b64368a.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(a){if(a.ep)return;a.ep=!0;const o=r(a);fetch(a.href,o)}})();function bRr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function DRr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bRr(Object(r),!0).forEach(function(n){ryn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bRr(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function G3e(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?G3e=function(t){return typeof t}:G3e=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G3e(e)}function ryn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nyn(e,t){return qPi(e)||YPi(e,t)||JPi(e,t)||XPi()}function qPi(e){if(Array.isArray(e))return e}function YPi(e,t){var r=e&&(typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"]);if(r!=null){var n=[],a=!0,o=!1,s,l;try{for(r=r.call(e);!(a=(s=r.next()).done)&&(n.push(s.value),!(t&&n.length===t));a=!0);}catch(u){o=!0,l=u}finally{try{!a&&r.return!=null&&r.return()}finally{if(o)throw l}}return n}}function JPi(e,t){if(e){if(typeof e=="string")return wRr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wRr(e,t)}}function wRr(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function XPi(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var $y=function(t,r,n){var a=!!n,o=Ie.useRef(n);Ie.useEffect(function(){o.current=n},[n]),Ie.useEffect(function(){if(!a||!t)return function(){};var s=function(){o.current&&o.current.apply(o,arguments)};return t.on(r,s),function(){t.off(r,s)}},[a,r,t,o])},b7t=function(t){var r=Ie.useRef(t);return Ie.useEffect(function(){r.current=t},[t]),r.current},UX=function(t){return t!==null&&G3e(t)==="object"},QPi=function(t){return UX(t)&&typeof t.then=="function"},ZPi=function(t){return UX(t)&&typeof t.elements=="function"&&typeof t.createToken=="function"&&typeof t.createPaymentMethod=="function"&&typeof t.confirmCardPayment=="function"},kRr="[object Object]",$Pi=function e(t,r){if(!UX(t)||!UX(r))return t===r;var n=Array.isArray(t),a=Array.isArray(r);if(n!==a)return!1;var o=Object.prototype.toString.call(t)===kRr,s=Object.prototype.toString.call(r)===kRr;if(o!==s)return!1;if(!o&&!n)return t===r;var l=Object.keys(t),u=Object.keys(r);if(l.length!==u.length)return!1;for(var c={},d=0;d<l.length;d+=1)c[l[d]]=!0;for(var p=0;p<u.length;p+=1)c[u[p]]=!0;var h=Object.keys(c);if(h.length!==l.length)return!1;var f=t,g=r,x=function(A){return e(f[A],g[A])};return h.every(x)},ayn=function(t,r,n){return UX(t)?Object.keys(t).reduce(function(a,o){var s=!UX(r)||!$Pi(t[o],r[o]);return n.includes(o)?(s&&console.warn("Unsupported prop change: options.".concat(o," is not a mutable property.")),a):s?DRr(DRr({},a||{}),{},ryn({},o,t[o])):a},null):null},iyn="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",CRr=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:iyn;if(t===null||ZPi(t))return t;throw new Error(r)},e7i=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:iyn;if(QPi(t))return{tag:"async",stripePromise:Promise.resolve(t).then(function(a){return CRr(a,r)})};var n=CRr(t,r);return n===null?{tag:"empty"}:{tag:"sync",stripe:n}},t7i=function(t){!t||!t._registerWrapper||!t.registerAppInfo||(t._registerWrapper({name:"react-stripe-js",version:"2.8.1"}),t.registerAppInfo({name:"react-stripe-js",version:"2.8.1",url:"https://stripe.com/docs/stripe-js/react"}))},Utt=Ie.createContext(null);Utt.displayName="ElementsContext";var oyn=function(t,r){if(!t)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(r," in an <Elements> provider."));return t},syn=function(t){var r=t.stripe,n=t.options,a=t.children,o=Ie.useMemo(function(){return e7i(r)},[r]),s=Ie.useState(function(){return{stripe:o.tag==="sync"?o.stripe:null,elements:o.tag==="sync"?o.stripe.elements(n):null}}),l=nyn(s,2),u=l[0],c=l[1];Ie.useEffect(function(){var h=!0,f=function(x){c(function(v){return v.stripe?v:{stripe:x,elements:x.elements(n)}})};return o.tag==="async"&&!u.stripe?o.stripePromise.then(function(g){g&&h&&f(g)}):o.tag==="sync"&&!u.stripe&&f(o.stripe),function(){h=!1}},[o,u,n]);var d=b7t(r);Ie.useEffect(function(){d!==null&&d!==r&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[d,r]);var p=b7t(n);return Ie.useEffect(function(){if(u.elements){var h=ayn(n,p,["clientSecret","fonts"]);h&&u.elements.update(h)}},[n,p,u.elements]),Ie.useEffect(function(){t7i(u.stripe)},[u.stripe]),Ie.createElement(Utt.Provider,{value:u},a)};syn.propTypes={stripe:or.any,options:or.object};var r7i=function(t){var r=Ie.useContext(Utt);return oyn(r,t)},n7i=function(){var t=r7i("calls useElements()"),r=t.elements;return r};or.func.isRequired;var lyn=Ie.createContext(null);lyn.displayName="CustomCheckoutSdkContext";var a7i=function(t,r){if(!t)throw new Error("Could not find CustomCheckoutProvider context; You need to wrap the part of your app that ".concat(r," in an <CustomCheckoutProvider> provider."));return t},i7i=Ie.createContext(null);i7i.displayName="CustomCheckoutContext";or.any,or.shape({clientSecret:or.string.isRequired,elementsOptions:or.object}).isRequired;var D7t=function(t){var r=Ie.useContext(lyn),n=Ie.useContext(Utt);if(r&&n)throw new Error("You cannot wrap the part of your app that ".concat(t," in both <CustomCheckoutProvider> and <Elements> providers."));return r?a7i(r,t):oyn(n,t)},o7i=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},sf=function(t,r){var n="".concat(o7i(t),"Element"),a=function(u){var c=u.id,d=u.className,p=u.options,h=p===void 0?{}:p,f=u.onBlur,g=u.onFocus,x=u.onReady,v=u.onChange,A=u.onEscape,b=u.onClick,D=u.onLoadError,E=u.onLoaderStart,F=u.onNetworksChange,B=u.onConfirm,P=u.onCancel,N=u.onShippingAddressChange,L=u.onShippingRateChange,I=D7t("mounts <".concat(n,">")),z="elements"in I?I.elements:null,H="customCheckoutSdk"in I?I.customCheckoutSdk:null,j=Ie.useState(null),T=nyn(j,2),O=T[0],U=T[1],K=Ie.useRef(null),_=Ie.useRef(null);$y(O,"blur",f),$y(O,"focus",g),$y(O,"escape",A),$y(O,"click",b),$y(O,"loaderror",D),$y(O,"loaderstart",E),$y(O,"networkschange",F),$y(O,"confirm",B),$y(O,"cancel",P),$y(O,"shippingaddresschange",N),$y(O,"shippingratechange",L),$y(O,"change",v);var Q;x&&(t==="expressCheckout"?Q=x:Q=function(){x(O)}),$y(O,"ready",Q),Ie.useLayoutEffect(function(){if(K.current===null&&_.current!==null&&(z||H)){var J=null;H?J=H.createElement(t,h):z&&(J=z.create(t,h)),K.current=J,U(J),J&&J.mount(_.current)}},[z,H,h]);var W=b7t(h);return Ie.useEffect(function(){if(K.current){var J=ayn(h,W,["paymentRequest"]);J&&"update"in K.current&&K.current.update(J)}},[h,W]),Ie.useLayoutEffect(function(){return function(){if(K.current&&typeof K.current.destroy=="function")try{K.current.destroy(),K.current=null}catch{}}},[]),Ie.createElement("div",{id:c,className:d,ref:_})},o=function(u){D7t("mounts <".concat(n,">"));var c=u.id,d=u.className;return Ie.createElement("div",{id:c,className:d})},s=r?o:a;return s.propTypes={id:or.string,className:or.string,onChange:or.func,onBlur:or.func,onFocus:or.func,onReady:or.func,onEscape:or.func,onClick:or.func,onLoadError:or.func,onLoaderStart:or.func,onNetworksChange:or.func,onConfirm:or.func,onCancel:or.func,onShippingAddressChange:or.func,onShippingRateChange:or.func,options:or.object},s.displayName=n,s.__elementType=t,s},lf=typeof window>"u",s7i=Ie.createContext(null);s7i.displayName="EmbeddedCheckoutProviderContext";var l7i=function(){var t=D7t("calls useStripe()"),r=t.stripe;return r};sf("auBankAccount",lf);sf("card",lf);var ERr=sf("cardNumber",lf),u7i=sf("cardExpiry",lf),c7i=sf("cardCvc",lf);sf("fpxBank",lf);sf("iban",lf);sf("idealBank",lf);sf("p24Bank",lf);sf("epsBank",lf);sf("payment",lf);sf("expressCheckout",lf);sf("currencySelector",lf);sf("paymentRequestButton",lf);sf("linkAuthentication",lf);sf("address",lf);sf("shippingAddress",lf);sf("paymentMethodMessaging",lf);sf("affirmMessage",lf);sf("afterpayClearpayMessage",lf);var uyn="https://js.stripe.com/v3",d7i=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,SRr="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",p7i=function(){for(var t=document.querySelectorAll('script[src^="'.concat(uyn,'"]')),r=0;r<t.length;r++){var n=t[r];if(d7i.test(n.src))return n}return null},h7i=function(t){var r=t&&!t.advancedFraudSignals?"?advancedFraudSignals=false":"",n=document.createElement("script");n.src="".concat(uyn).concat(r);var a=document.head||document.body;if(!a)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return a.appendChild(n),n},f7i=function(t,r){!t||!t._registerWrapper||t._registerWrapper({name:"stripe-js",version:"1.54.2",startTime:r})},abe=null,m7i=function(t){return abe!==null||(abe=new Promise(function(r,n){if(typeof window>"u"||typeof document>"u"){r(null);return}if(window.Stripe&&t&&console.warn(SRr),window.Stripe){r(window.Stripe);return}try{var a=p7i();a&&t?console.warn(SRr):a||(a=h7i(t)),a.addEventListener("load",function(){window.Stripe?r(window.Stripe):n(new Error("Stripe.js not available"))}),a.addEventListener("error",function(){n(new Error("Failed to load Stripe.js"))})}catch(o){n(o);return}})),abe},g7i=function(t,r,n){if(t===null)return null;var a=t.apply(void 0,r);return f7i(a,n),a},cyn=Promise.resolve().then(function(){return m7i(null)}),dyn=!1;cyn.catch(function(e){dyn||console.warn(e)});var x7i=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];dyn=!0;var a=Date.now();return cyn.then(function(o){return g7i(o,r,a)})};const pyn=Object.prototype.toString;function hyn(e){switch(pyn.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return wM(e,Error)}}function h$(e,t){return pyn.call(e)===`[object ${t}]`}function KKt(e){return h$(e,"ErrorEvent")}function MRr(e){return h$(e,"DOMError")}function y7i(e){return h$(e,"DOMException")}function v3(e){return h$(e,"String")}function _Kt(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function qKt(e){return e===null||_Kt(e)||typeof e!="object"&&typeof e!="function"}function VX(e){return h$(e,"Object")}function Vtt(e){return typeof Event<"u"&&wM(e,Event)}function v7i(e){return typeof Element<"u"&&wM(e,Element)}function A7i(e){return h$(e,"RegExp")}function Wtt(e){return!!(e&&e.then&&typeof e.then=="function")}function b7i(e){return VX(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function fyn(e){return typeof e=="number"&&e!==e}function wM(e,t){try{return e instanceof t}catch{return!1}}function myn(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function kJ(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function FRr(e,t){if(!Array.isArray(e))return"";const r=[];for(let n=0;n<e.length;n++){const a=e[n];try{myn(a)?r.push("[VueViewModel]"):r.push(String(a))}catch{r.push("[value cannot be serialized]")}}return r.join(t)}function D7i(e,t,r=!1){return v3(e)?A7i(t)?t.test(e):v3(t)?r?e===t:e.includes(t):!1:!1}function f$(e,t=[],r=!1){return t.some(n=>D7i(e,n,r))}function w7i(e,t,r=250,n,a,o,s){if(!o.exception||!o.exception.values||!s||!wM(s.originalException,Error))return;const l=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;l&&(o.exception.values=k7i(w7t(e,t,a,s.originalException,n,o.exception.values,l,0),r))}function w7t(e,t,r,n,a,o,s,l){if(o.length>=r+1)return o;let u=[...o];if(wM(n[a],Error)){BRr(s,l);const c=e(t,n[a]),d=u.length;TRr(c,a,d,l),u=w7t(e,t,r,n[a],a,[c,...u],c,d)}return Array.isArray(n.errors)&&n.errors.forEach((c,d)=>{if(wM(c,Error)){BRr(s,l);const p=e(t,c),h=u.length;TRr(p,`errors[${d}]`,h,l),u=w7t(e,t,r,c,a,[p,...u],p,h)}}),u}function BRr(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function TRr(e,t,r,n){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:r,parent_id:n}}function k7i(e,t){return e.map(r=>(r.value&&(r.value=kJ(r.value,t)),r))}function ibe(e){return e&&e.Math==Math?e:void 0}const Wl=typeof globalThis=="object"&&ibe(globalThis)||typeof window=="object"&&ibe(window)||typeof self=="object"&&ibe(self)||typeof dp=="object"&&ibe(dp)||function(){return this}()||{};function YKt(){return Wl}function gyn(e,t,r){const n=r||Wl,a=n.__SENTRY__=n.__SENTRY__||{};return a[e]||(a[e]=t())}const CJ=YKt(),C7i=80;function zT(e,t={}){if(!e)return"<unknown>";try{let r=e;const n=5,a=[];let o=0,s=0;const l=" > ",u=l.length;let c;const d=Array.isArray(t)?t:t.keyAttrs,p=!Array.isArray(t)&&t.maxStringLength||C7i;for(;r&&o++<n&&(c=E7i(r,d),!(c==="html"||o>1&&s+a.length*u+c.length>=p));)a.push(c),s+=c.length,r=r.parentNode;return a.reverse().join(l)}catch{return"<unknown>"}}function E7i(e,t){const r=e,n=[];let a,o,s,l,u;if(!r||!r.tagName)return"";if(CJ.HTMLElement&&r instanceof HTMLElement&&r.dataset&&r.dataset.sentryComponent)return r.dataset.sentryComponent;n.push(r.tagName.toLowerCase());const c=t&&t.length?t.filter(p=>r.getAttribute(p)).map(p=>[p,r.getAttribute(p)]):null;if(c&&c.length)c.forEach(p=>{n.push(`[${p[0]}="${p[1]}"]`)});else if(r.id&&n.push(`#${r.id}`),a=r.className,a&&v3(a))for(o=a.split(/\s+/),u=0;u<o.length;u++)n.push(`.${o[u]}`);const d=["aria-label","type","name","title","alt"];for(u=0;u<d.length;u++)s=d[u],l=r.getAttribute(s),l&&n.push(`[${s}="${l}"]`);return n.join("")}function S7i(){try{return CJ.document.location.href}catch{return""}}function M7i(e){return CJ.document&&CJ.document.querySelector?CJ.document.querySelector(e):null}function xyn(e){if(!CJ.HTMLElement)return null;let t=e;const r=5;for(let n=0;n<r;n++){if(!t)return null;if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}const m$=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,F7i="Sentry Logger ",k7t=["debug","info","warn","error","log","assert","trace"],ZYe={};function aG(e){if(!("console"in Wl))return e();const t=Wl.console,r={},n=Object.keys(ZYe);n.forEach(a=>{const o=ZYe[a];r[a]=t[a],t[a]=o});try{return e()}finally{n.forEach(a=>{t[a]=r[a]})}}function B7i(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return m$?k7t.forEach(r=>{t[r]=(...n)=>{e&&aG(()=>{Wl.console[r](`${F7i}[${r}]:`,...n)})}}):k7t.forEach(r=>{t[r]=()=>{}}),t}const yn=B7i(),T7i=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function R7i(e){return e==="http"||e==="https"}function g$(e,t=!1){const{host:r,path:n,pass:a,port:o,projectId:s,protocol:l,publicKey:u}=e;return`${l}://${u}${t&&a?`:${a}`:""}@${r}${o?`:${o}`:""}/${n&&`${n}/`}${s}`}function P7i(e){const t=T7i.exec(e);if(!t){aG(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[r,n,a="",o,s="",l]=t.slice(1);let u="",c=l;const d=c.split("/");if(d.length>1&&(u=d.slice(0,-1).join("/"),c=d.pop()),c){const p=c.match(/^\d+/);p&&(c=p[0])}return yyn({host:o,pass:a,path:u,projectId:c,port:s,protocol:r,publicKey:n})}function yyn(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function j7i(e){if(!m$)return!0;const{port:t,projectId:r,protocol:n}=e;return["protocol","publicKey","host","projectId"].find(s=>e[s]?!1:(yn.error(`Invalid Sentry Dsn: ${s} missing`),!0))?!1:r.match(/^\d+$/)?R7i(n)?t&&isNaN(parseInt(t,10))?(yn.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(yn.error(`Invalid Sentry Dsn: Invalid protocol ${n}`),!1):(yn.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function I7i(e){const t=typeof e=="string"?P7i(e):yyn(e);if(!(!t||!j7i(t)))return t}class BE extends Error{constructor(t,r="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=r}}function m0(e,t,r){if(!(t in e))return;const n=e[t],a=r(n);typeof a=="function"&&vyn(a,n),e[t]=a}function iG(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{m$&&yn.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function vyn(e,t){try{const r=t.prototype||{};e.prototype=t.prototype=r,iG(e,"__sentry_original__",t)}catch{}}function JKt(e){return e.__sentry_original__}function N7i(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function Ayn(e){if(hyn(e))return{message:e.message,name:e.name,stack:e.stack,...PRr(e)};if(Vtt(e)){const t={type:e.type,target:RRr(e.target),currentTarget:RRr(e.currentTarget),...PRr(e)};return typeof CustomEvent<"u"&&wM(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function RRr(e){try{return v7i(e)?zT(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function PRr(e){if(typeof e=="object"&&e!==null){const t={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}else return{}}function L7i(e,t=40){const r=Object.keys(Ayn(e));if(r.sort(),!r.length)return"[object has no keys]";if(r[0].length>=t)return kJ(r[0],t);for(let n=r.length;n>0;n--){const a=r.slice(0,n).join(", ");if(!(a.length>t))return n===r.length?a:kJ(a,t)}return""}function ex(e){return C7t(e,new Map)}function C7t(e,t){if(O7i(e)){const r=t.get(e);if(r!==void 0)return r;const n={};t.set(e,n);for(const a of Object.keys(e))typeof e[a]<"u"&&(n[a]=C7t(e[a],t));return n}if(Array.isArray(e)){const r=t.get(e);if(r!==void 0)return r;const n=[];return t.set(e,n),e.forEach(a=>{n.push(C7t(a,t))}),n}return e}function O7i(e){if(!VX(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const byn=50,jRr=/\(error: (.*)\)/,IRr=/captureMessage|captureException/;function Dyn(...e){const t=e.sort((r,n)=>r[0]-n[0]).map(r=>r[1]);return(r,n=0)=>{const a=[],o=r.split(`
3
3
  `);for(let s=n;s<o.length;s++){const l=o[s];if(l.length>1024)continue;const u=jRr.test(l)?l.replace(jRr,"$1"):l;if(!u.match(/\S*Error: /)){for(const c of t){const d=c(u);if(d){a.push(d);break}}if(a.length>=byn)break}}return H7i(a)}}function z7i(e){return Array.isArray(e)?Dyn(...e):e}function H7i(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),IRr.test(t[t.length-1].function||"")&&(t.pop(),IRr.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,byn).map(r=>({...r,filename:r.filename||t[t.length-1].filename,function:r.function||"?"}))}const Ckt="<anonymous>";function kM(e){try{return!e||typeof e!="function"?Ckt:e.name||Ckt}catch{return Ckt}}const U3e={},NRr={};function kU(e,t){U3e[e]=U3e[e]||[],U3e[e].push(t)}function CU(e,t){NRr[e]||(t(),NRr[e]=!0)}function Pw(e,t){const r=e&&U3e[e];if(r)for(const n of r)try{n(t)}catch(a){m$&&yn.error(`Error while triggering instrumentation handler.
4
4
  Type: ${e}
@@ -48123,4 +48123,4 @@ ${r}
48123
48123
  `,K2c=()=>{const{height:e,headerHeight:t}=ll(),r=e-t||500;return M.jsx(W2c,{height:r,children:M.jsx("main",{className:"mainContent",children:M.jsxs("div",{className:"container",children:[M.jsx("h1",{children:"Dreamspace Terms of Service"}),M.jsx("p",{className:"last-updated",children:M.jsx("strong",{children:"Last Updated: July 7, 2025"})}),M.jsxs("section",{children:[M.jsx("p",{children:'Welcome to Dreamspace, developed and operated by MakeInfinite Labs ("Dreamspace," "we," "us," or "our"). By accessing or using our website, development tools, smart contract services, or any related content, software, or APIs (collectively, the "Platform"), you agree to comply with and be bound by these Terms of Service (the "Terms") and our Privacy Policy.'}),M.jsxs("p",{children:["Please read these Terms carefully before using the Platform."," ",M.jsx("strong",{children:"If you do not agree to these Terms, you may not access or use the Platform."})]})]}),M.jsxs("section",{children:[M.jsx("h2",{children:"Acceptance of Terms"}),M.jsx("p",{children:"By using Dreamspace, you confirm that you:"}),M.jsxs("ul",{children:[M.jsx("li",{children:"Have read, understood, and agreed to these Terms."}),M.jsx("li",{children:"Agree to our Privacy Policy."}),M.jsx("li",{children:"Will comply with all applicable laws and regulations."}),M.jsx("li",{children:"Are at least 18 years old and legally able to enter into a binding contract."})]}),M.jsx("p",{children:'If you are using the Platform on behalf of an organization, you represent that you have authority to bind that organization, and all references to "you" or "your" apply to both you as an individual and the organization you represent.'}),M.jsx("p",{children:"SECTION 15 CONTAINS A WAIVER OF ANY RIGHT TO PARTICIPATE IN A CLASS ACTION AS WELL AS A MANDATORY ARBITRATION CLAUSE THAT GOVERNS RESOLUTION OF CERTAIN DISPUTES AND WAIVES YOUR RIGHT TO SUE IN COURT OR HAVE A TRIAL BY JURY."})]}),M.jsxs("section",{children:[M.jsx("h2",{children:"1. License to Use the Platform"}),M.jsx("p",{children:"Subject to these Terms, Dreamspace grants you a limited, personal, non-exclusive, non-transferable, revocable license to access and use our Platform for lawful purposes, including smart contract development and deployment, as permitted by your subscription plan. This license is revocable at our discretion."})]}),M.jsxs("section",{children:[M.jsx("h2",{children:"2. Eligibility and Compliance"}),M.jsx("h3",{children:"2.1 General Requirements"}),M.jsx("p",{children:"You represent and warrant that:"}),M.jsxs("ul",{children:[M.jsx("li",{children:"You are at least 18 years old;"}),M.jsx("li",{children:"You are not located in, or a citizen or resident of, any jurisdiction subject to comprehensive U.S. or international sanctions;"}),M.jsx("li",{children:"You are not listed on any U.S. or foreign government sanctions list (e.g., OFAC SDN List, EU Consolidated List);"}),M.jsx("li",{children:"You are not owned or controlled by any sanctioned individual or entity;"}),M.jsx("li",{children:"You have not previously been suspended or banned from using the Platform."})]}),M.jsx("h3",{children:"2.2 Restricted Territories"}),M.jsx("p",{children:"You may not use the Platform if you are in a jurisdiction where such use is prohibited by law or sanctions. We may implement technical restrictions (e.g., geoblocking, IP filtering) to enforce this. You agree not to bypass or attempt to bypass such restrictions."}),M.jsx("h3",{children:"2.3 Use on Behalf of Organizations"}),M.jsx("p",{children:"If you use the Platform on behalf of a legal entity, you confirm that you have authority to bind that entity to these Terms and that both you and the entity are jointly responsible for compliance."})]}),M.jsxs("section",{children:[M.jsx("h2",{children:"3. Account Registration and Wallet Integration"}),M.jsx("p",{children:"You may be required to connect a third-party wallet (e.g., MetaMask) to authenticate and access certain Platform features. Wallets are used for both identity and transaction signing. You are solely responsible for managing your wallet credentials and maintaining security. You understand that Dreamspace does not control or store your private keys and cannot recover lost wallet access."})]}),M.jsxs("section",{children:[M.jsx("h2",{children:"4. Intellectual Property Rights and Licensing"}),M.jsx("h3",{children:"4.1 Dreamspace IP"}),M.jsx("p",{children:"All rights, title, and interest in and to the Platform - including its architecture, design, codebase, algorithms, user interface, branding (including the Dreamspace name, logos, and domain names), documentation, and other original materials - are and will remain the exclusive property of MakeInfinite Labs and its licensors. These Terms do not grant you any rights or licenses in Dreamspace's intellectual property, except for the limited rights necessary to use the Platform in accordance with these Terms."}),M.jsx("h3",{children:"4.2 User Output and Licensing"}),M.jsx("p",{children:"Dreamspace does not claim ownership of the code, smart contracts, applications, or other outputs that you generate using the Platform. However, by using Dreamspace, you acknowledge and agree that:"}),M.jsxs("ul",{children:[M.jsxs("li",{children:["Any content created or generated within a miniapp project, including uploaded files, generated code, and chat messages that contribute to output, is automatically made public and is licensed under the",M.jsxs("a",{href:"https://www.apache.org/licenses/LICENSE-2.0",target:"_blank",rel:"noopener noreferrer",children:[" ","Apache 2.0 License"]}),"."]}),M.jsx("li",{children:"A LICENSE file applying the Apache 2.0 terms is programmatically included in every miniapp project."}),M.jsx("li",{children:"You are free to use, modify, distribute, and commercialize your output - subject to the terms of that license."})]}),M.jsx("p",{children:"You remain responsible for ensuring your output complies with applicable laws and does not infringe third-party rights."})]}),M.jsxs("section",{children:[M.jsx("h2",{children:"5. User Content and Responsibility"}),M.jsx("p",{children:'You may upload or submit content to the Platform, including source code, images, fonts, video, text prompts, metadata, or other digital assets ("User Content"). You represent and warrant that:'}),M.jsxs("ul",{children:[M.jsx("li",{children:"You have all rights, licenses, and permissions necessary to upload and use such content;"}),M.jsx("li",{children:"Your content does not violate any law, infringe any third-party rights, or contain unlawful, abusive, defamatory, obscene, or otherwise objectionable material."})]}),M.jsx("p",{children:"You retain ownership of your uploaded content, but acknowledge that any content included in a miniapp project will be made publicly accessible and licensed under Apache 2.0 by default."}),M.jsx("p",{children:"Dreamspace does not monitor content but reserves the right to remove or restrict access to any content that violates these Terms or applicable law."})]}),M.jsxs("section",{children:[M.jsx("h2",{children:"6. Public Content Visibility"}),M.jsxs("p",{children:["All miniapp projects, including uploaded assets (e.g., code, images) and chat interactions, are",M.jsx("strong",{children:" publicly accessible by design"}),". While Dreamspace does not actively publish this content, users with access to a project repository may view its full history. Do not upload confidential or sensitive information."]})]}),M.jsxs("section",{children:[M.jsx("h2",{children:"7. Smart Contracts and User-Deployed Code"}),M.jsx("p",{children:'You are solely responsible for the development, deployment, and legality of any smart contract or decentralized application ("dApp") you build using Dreamspace. Dreamspace provides tools to assist with smart contract generation and deployment but does not deploy contracts, take custody of assets, or participate in any resulting transactions.'}),M.jsx("p",{children:"You acknowledge that:"}),M.jsxs("ul",{children:[M.jsx("li",{children:"Smart contracts and dApps created via Dreamspace are solely your property;"}),M.jsx("li",{children:"You bear full responsibility for ensuring that smart contracts and dApps comply with all applicable laws and regulations across jurisdictions;"}),M.jsx("li",{children:"You are solely responsible for auditing and testing any code you generate or import;"}),M.jsx("li",{children:"Dreamspace is not responsible for your use or misuse of blockchain applications, smart contracts, or associated content;"}),M.jsx("li",{children:"You are responsible for any blockchain fees, gas costs, or related charges incurred;"})]}),M.jsx("p",{children:"Dreamspace does not offer legal, financial, or regulatory advice."}),M.jsx("p",{children:"Dreamspace does not act as a 'publisher' or 'issuer' of any smart contracts or tokens created using the Platform."})]}),M.jsxs("section",{children:[M.jsx("h2",{children:"8. Prohibited Uses"}),M.jsx("p",{children:"You agree not to misuse the Platform or use it in any manner that violates these Terms, applicable law, or the rights of others. Without limitation, you agree not to:"}),M.jsx("h3",{children:"Use the Platform in violation of any applicable laws or regulations, including but not limited to:"}),M.jsxs("ul",{children:[M.jsx("li",{children:"Economic sanctions, export control laws, or anti-money laundering (AML) obligations;"}),M.jsx("li",{children:"Securities, financial services, or consumer protection laws;"})]}),M.jsxs("ul",{className:"prohibited-list",children:[M.jsxs("li",{children:["Use the Platform to develop or deploy smart contracts that facilitate:",M.jsxs("ul",{children:[M.jsx("li",{children:"Fraud, financial scams, market manipulation, or unlawful token issuance;"}),M.jsx("li",{children:"Unregistered securities offerings or unlicensed financial services;"}),M.jsx("li",{children:"Money laundering, terrorist financing, or other illicit financial activity"})]})]}),M.jsx("li",{children:"Upload or deploy code that includes viruses, worms, Trojan horses, corrupted files, or other malicious software;"}),M.jsx("li",{children:"Attempt to probe, scan, penetrate, or test the vulnerability of the Platform, or circumvent any security or authentication measures;"}),M.jsx("li",{children:"Use the Platform to interfere with or disrupt networks, systems, or other users;"}),M.jsx("li",{children:"Access or attempt to access accounts, wallets, systems, or data without proper authorization;"}),M.jsx("li",{children:"Bypass, circumvent, or attempt to disable any technical restrictions, rate limits, or access controls."}),M.jsx("li",{children:"Upload, store, or transmit content that infringes or misappropriates any intellectual property or proprietary rights;"}),M.jsx("li",{children:"Submit or deploy content that is unlawful, abusive, harassing, defamatory, hateful, violent, obscene, or otherwise offensive;"}),M.jsx("li",{children:"Upload or deploy content that promotes discrimination, hate speech, or incites violence;"}),M.jsx("li",{children:"Misrepresent your identity, affiliation, or authorization to use the Platform;"}),M.jsx("li",{children:"Create or use multiple accounts to evade limitations, blocks, or suspensions;"}),M.jsx("li",{children:"Access or use the Platform if you are located in, or a citizen or resident of, a country or territory subject to comprehensive U.S. or international sanctions;"}),M.jsx("li",{children:"Use the Platform on behalf of a sanctioned individual or entity."})]}),M.jsx("p",{children:M.jsx("strong",{children:"Dreamspace reserves the right to investigate and take appropriate action — including immediate suspension, termination, or legal action — in response to any suspected violation of this section."})})]}),M.jsxs("section",{children:[M.jsx("h2",{children:"9. Services and Pricing"}),M.jsx("p",{children:"Access to certain features of the Platform may require a paid subscription. Details regarding available plans, features, pricing, and billing cycles are published on our website and may be updated from time to time."}),M.jsxs("ul",{children:[M.jsxs("li",{children:[M.jsx("strong",{children:"Recurring Billing"}),": All paid subscriptions are billed on a recurring monthly basis unless explicitly canceled by the user prior to renewal."]}),M.jsxs("li",{children:[M.jsx("strong",{children:"Pricing Changes"}),": Dreamspace reserves the right to modify subscription tiers, features, or pricing at any time. Changes will be effective upon notice, which may be provided through the Platform, by email, or by other reasonable means."]}),M.jsxs("li",{children:[M.jsx("strong",{children:"No Proration"}),": Adjustments to plan tiers (upgrades or downgrades) will take effect in the following billing cycle unless otherwise stated. No partial refunds or credits will be issued for unused time within a billing cycle."]})]})]}),M.jsxs("section",{children:[M.jsx("h2",{children:"10. Payment and Refund Policy"}),M.jsxs("ul",{children:[M.jsxs("li",{children:[M.jsx("strong",{children:"Final Sale"}),": All subscription fees and associated charges are final and non-refundable, except in cases of verified billing errors (e.g., duplicate charges or unauthorized transactions)."]}),M.jsxs("li",{children:[M.jsx("strong",{children:"Digital Nature"}),": Because access to Dreamspace services and tools begins immediately upon purchase, we do not offer refunds for any reason other than billing errors."]}),M.jsxs("li",{children:[M.jsx("strong",{children:"Payment Authorization"}),": By subscribing, you authorize Dreamspace (or its third-party payment processor) to charge your designated payment method on a recurring basis."]})]}),M.jsx("h3",{children:"Cancellation Policy"}),M.jsxs("ul",{children:[M.jsxs("li",{children:[M.jsx("strong",{children:"User-Initiated Cancellation"}),": You may cancel your subscription at any time via your account settings. Cancellation will take effect at the end of your current billing period."]}),M.jsxs("li",{children:[M.jsx("strong",{children:"No Refund for Cancellation"}),": Canceling your subscription does not entitle you to a refund or credit for any portion of the billing period already elapsed."]}),M.jsxs("li",{children:[M.jsx("strong",{children:"Expiration of Credits"}),": Any unused credits or allocations associated with a subscription plan will expire at the conclusion of the billing period and will not carry over."]})]})]}),M.jsxs("section",{children:[M.jsx("h2",{children:"11. Disclaimer of Warranties"}),M.jsx("p",{className:"uppercase",children:'THE PLATFORM, INCLUDING BUT NOT LIMITED TO ALL CONTENT, FEATURES, TOOLS, TEMPLATES, SMART CONTRACT GENERATORS, AI-GENERATED OUTPUT, AND DEPLOYMENT FUNCTIONALITY, IS PROVIDED ON AN "AS IS" AND "AS AVAILABLE" BASIS, WITHOUT WARRANTIES OF ANY KIND, WHETHER EXPRESS, IMPLIED, OR STATUTORY.'}),M.jsx("p",{className:"uppercase",children:"TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, DREAMSPACE AND ITS AFFILIATES EXPRESSLY DISCLAIM ALL WARRANTIES, INCLUDING, BUT NOT LIMITED TO:"}),M.jsxs("ul",{children:[M.jsx("li",{children:"WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, NON-INFRINGEMENT;"}),M.jsx("li",{children:"WARRANTIES REGARDING THE ACCURACY, SECURITY, OR RELIABILITY OF CODE, SMART CONTRACTS, OR DEPLOYED OUTPUT;"}),M.jsx("li",{children:"WARRANTIES THAT THE PLATFORM OR GENERATED OUTPUT IS ERROR-FREE, SECURE, FREE OF MALWARE OR VULNERABILITIES, OR THAT DEPLOYMENTS WILL FUNCTION AS INTENDED;"}),M.jsx("li",{children:"WARRANTIES THAT ANY SMART CONTRACT, APPLICATION, OR DEPLOYED MATERIALS WILL BE COMPLIANT WITH ANY LAWS, REGULATIONS, OR INDUSTRY STANDARDS IN ANY JURISDICTION."})]}),M.jsx("p",{className:"uppercase",children:"YOU ACKNOWLEDGE THAT YOU ARE SOLELY RESPONSIBLE FOR REVIEWING, AUDITING, TESTING, AND VALIDATING ANY CODE OR SMART CONTRACTS GENERATED - INCLUDING THOSE GENERATED BY AI - DEPLOYED THROUGH THE PLATFORM. DREAMSPACE DOES NOT PROVIDE LEGAL, FINANCIAL, TAX, OR SECURITY AUDIT SERVICES. USE OF ANY GENERATED CODE IS AT YOUR OWN RISK"})]}),M.jsxs("section",{children:[M.jsx("h2",{children:"12. Limitation of Liability"}),M.jsx("p",{className:"uppercase",children:"TO THE FULLEST EXTENT PERMITTED UNDER APPLICABLE LAW, IN NO EVENT SHALL DREAMSPACE, MAKEINFINITE LABS, OR THEIR RESPECTIVE OFFICERS, DIRECTORS, EMPLOYEES, AGENTS, AFFILIATES, SERVICE PROVIDERS, OR LICENSORS BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, EXEMPLARY, OR PUNITIVE DAMAGES, INCLUDING BUT NOT LIMITED TO LOSS OF PROFITS, LOSS OF DATA, SECURITY BREACHES, SMART CONTRACT FAILURES, BLOCKCHAIN FEES OR GAS COSTS, DEPLOYMENT ERRORS, OR BUSINESS INTERRUPTION, ARISING OUT OF OR RELATED TO YOUR USE OF OR INABILITY TO USE THE PLATFORM - EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES."}),M.jsx("p",{className:"uppercase",children:"WITHOUT LIMITING THE FOREGOING, IN NO EVENT SHALL DREAMSPACE'S TOTAL CUMULATIVE LIABILITY TO YOU FOR ALL CLAIMS ARISING OUT OF OR RELATED TO THESE TERMS OR THE PLATFORM EXCEED THE GREATER OF (I) THE FEES PAID BY YOU TO DREAMSPACE IN THE TWELVE (12) MONTHS IMMEDIATELY PRECEDING THE EVENT GIVING RISE TO THE CLAIM."}),M.jsx("p",{className:"uppercase",children:"THE LIMITATIONS OF THIS SECTION SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF ANY LIMITED REMEDY."})]}),M.jsxs("section",{children:[M.jsx("h2",{children:"13. Blockchain-Specific Risks"}),M.jsx("p",{className:"uppercase",children:"YOU UNDERSTAND AND ACKNOWLEDGE THAT DEPLOYMENTS TO PUBLIC BLOCKCHAINS ARE INHERENTLY RISKY AND IRREVERSIBLE. SMART CONTRACTS, ONCE DEPLOYED, MAY CONTAIN SECURITY FLAWS, VULNERABILITIES, OR ECONOMIC EXPLOITS THAT CANNOT BE UNDONE OR PATCHED."}),M.jsx("p",{className:"uppercase",children:"DREAMSPACE DOES NOT CONTROL THE OPERATION OF ANY BLOCKCHAIN NETWORK, NOR DOES IT GUARANTEE THE FUNCTIONALITY OR SUCCESS OF ANY SMART CONTRACT, TOKEN, OR APPLICATION DEPLOYED THROUGH THE PLATFORM. YOU BEAR FULL RESPONSIBILITY FOR ANY LOSSES INCURRED DUE TO CODE ERRORS, GAS FEES, TRANSACTION DELAYS, FORKS, NETWORK FAILURES, OR THIRD-PARTY ATTACKS."})]}),M.jsxs("section",{children:[M.jsx("h2",{children:"14. Indemnification"}),M.jsx("p",{children:`To the maximum extent permitted by applicable law, you agree to fully indemnify, defend, and hold harmless Dreamspace, MakeInfinite Labs, and their respective affiliates, officers, directors, employees, contractors, agents, licensors, service providers, successors, and assigns (collectively, the "Indemnified Parties") from and against any and all actual or alleged claims, demands, actions, proceedings, investigations, damages, losses, liabilities, judgments, settlements, costs, and expenses (including reasonable attorneys' fees and court costs) arising out of or related to:`}),M.jsxs("ul",{children:[M.jsx("li",{children:"Your use of or access to the Platform, including any applications, smart contracts, or other code created, generated, imported, uploaded, or deployed through it;"}),M.jsx("li",{children:"Any actual or alleged violation by you of these Terms or any applicable law, regulation, or third-party rights (including intellectual property, data protection, financial, or blockchain-related laws);"}),M.jsx("li",{children:"Any content, data, code, or smart contract you provide, deploy, or distribute using the Platform;"}),M.jsx("li",{children:"Any economic loss, legal exposure, or reputational damage caused by your deployed contracts, applications, tokens, or interactions with blockchain protocols or third parties;"}),M.jsx("li",{children:"Any unauthorized or malicious use of the Platform or related services via your account or credentials, whether or not authorized by you."})]}),M.jsx("p",{children:"Dreamspace reserves the right, at its sole discretion and expense, to assume the exclusive defense and control of any matter otherwise subject to indemnification by you. You agree to cooperate fully in the defense of any such claim and not to settle any claim without Dreamspace's prior written consent. Your indemnification obligations will survive termination or expiration of these Terms and your use of the Platform"})]}),M.jsxs("section",{children:[M.jsx("h2",{children:"15. Dispute Resolution and Arbitration"}),M.jsx("p",{children:"Please read this section carefully. It requires binding arbitration of most disputes and limits the ways in which relief may be sought. You may opt out of arbitration as explained below. This section prohibits class or representative actions or arbitrations."}),M.jsx("h3",{children:"15.1 No Representative Actions"}),M.jsx("p",{children:"You and Dreamspace agree that any dispute, claim, or controversy arising out of or relating to these Terms or the Platform will be resolved solely on an individual basis. Neither party shall bring or participate in any class, collective, consolidated, or representative proceeding or arbitration."}),M.jsx("h3",{children:"15.2 Arbitration of Disputes"}),M.jsx("p",{children:"Except for (a) small claims disputes, or (b) claims in which Dreamspace seeks injunctive or other equitable relief for the alleged unlawful use of intellectual property, unauthorized access to or misuse of the Platform, unauthorized deployment of smart contracts, violation of security protocols, or any other conduct that threatens the integrity, availability, or lawful operation of the Platform, you and Dreamspace waive the right to a jury trial and to resolve disputes in court. All other claims are subject to binding arbitration as described below."}),M.jsxs("p",{children:["Before initiating arbitration, both parties agree to attempt informal resolution. You must send a written notice of your claim to"," ",M.jsx("a",{href:"mailto:support@makeinfinite.com",children:"support@makeinfinite.com"})," that includes:"]}),M.jsxs("ul",{children:[M.jsx("li",{children:"Your name and contact information,"}),M.jsx("li",{children:"A clear description of your claim, and"}),M.jsx("li",{children:"The relief you are seeking."})]}),M.jsx("p",{children:"If the dispute is not resolved within thirty (30) days of receiving the notice, either party may initiate binding arbitration administered by JAMS or, under the limited circumstances set forth above, in court:"}),M.jsxs("ul",{children:[M.jsxs("li",{children:["For U.S. residents: under JAMS Consumer Arbitration Rules (See JAMS Consumer Rules,",M.jsxs("a",{href:"https://www.jamsadr.com/consumer-minimum-standards/",target:"_blank",rel:"noopener noreferrer",children:[" ","https://www.jamsadr.com/consumer-minimum-standards/"]}),")"]}),M.jsx("li",{children:"For non-U.S. residents: under JAMS International Arbitration Rules (or equivalent rules as applicable)."})]}),M.jsx("p",{children:"Location of arbitration:"}),M.jsxs("ul",{children:[M.jsx("li",{children:"U.S. residents: In your county of residence or remotely, by mutual agreement."}),M.jsx("li",{children:"Non-U.S. residents: Remotely via videoconference or in a mutually agreed jurisdiction."})]}),M.jsxs("p",{children:["The arbitration will be conducted in English before a single arbitrator. The JAMS rules are incorporated by reference and available at:",M.jsxs("a",{href:"https://www.jamsadr.com/rules-download",target:"_blank",rel:"noopener noreferrer",children:[" ","https://www.jamsadr.com/rules-download"]}),". You either acknowledge and agree that you have read and understood the JAMS Rules or waive your opportunity to read the JAMS Rules and waive any claim that the JAMS Rules are unfair or should not apply for any reason."]}),M.jsx("h3",{children:"15.3 Arbitration Fees"}),M.jsxs("ul",{children:[M.jsx("li",{children:"For claims initiated by you, you agree to pay the first $250 of the filing fee; Dreamspace will cover the remainder."}),M.jsx("li",{children:"For claims initiated by Dreamspace, we will pay all arbitration fees."}),M.jsx("li",{children:"Each party is responsible for its own attorneys' fees and costs unless the arbitrator determines otherwise."})]}),M.jsx("h3",{children:"15.4 Batch Arbitration"}),M.jsx("p",{children:"If 100 or more similar arbitration claims are filed against Dreamspace within a 30-day period by or with the assistance of the same firm(s) or organization(s), claims will be grouped into batches of up to 100 claims and processed together. Each batch will:"}),M.jsxs("ul",{children:[M.jsx("li",{children:"Be assigned one arbitrator,"}),M.jsx("li",{children:"Follow a consolidated procedural calendar, and"}),M.jsx("li",{children:"Result in a single decision and award."})]}),M.jsx("p",{children:"This is not a class arbitration. Disputes about batching will be resolved by a neutral administrative arbitrator appointed by JAMS, whose fees will be paid by Dreamspace."}),M.jsx("h3",{children:"15.5 FAA and Governing Law"}),M.jsx("p",{children:`You and Dreamspace agree that these Terms affect interstate commerce and that the enforceability of this Section 15 will be substantively and procedurally governed by the Federal Arbitration Act, 9 U.S.C. § 1, et seq. (the "FAA"), to the maximum extent permitted by applicable law. As specified by the FAA, these Terms and the JAMS Rules, the arbitrator will have exclusive authority to make all procedural and substantive decisions regarding any dispute and to grant any remedy that would otherwise be available in court, including the power to determine the question of arbitrability. The arbitrator may conduct only an individual arbitration and may not consolidate more than one individual's claims, preside over any type of class or representative proceeding or preside over any proceeding involving more than one individual.`}),M.jsx("h3",{children:"15.6 Confidentiality"}),M.jsx("p",{children:"All arbitration proceedings, documents, and awards shall remain confidential unless required by law or necessary to enforce an arbitration award. The arbitrator may impose further confidentiality measures as needed."}),M.jsx("h3",{children:"15.7 Time Limitation"}),M.jsx("p",{children:"Any claim under these Terms must be filed within one (1) year of when the claim arose, or it will be permanently barred."}),M.jsx("h3",{children:"15.8 Opt-Out of Arbitration"}),M.jsxs("p",{children:["You may opt out of arbitration within thirty (30) days of first accepting these Terms by emailing",M.jsx("a",{href:"mailto:support@makeinfinite.com",children:" support@makeinfinite.com"})," with your full name, physical address, and a clear statement that you are opting out. If you opt out, Section 16 (Governing Law and Jurisdiction) will apply to dispute resolution."]}),M.jsx("h3",{children:"15.9 Severability"}),M.jsx("p",{children:"If any portion of this Section 15 is found to be unenforceable or unlawful for any reason:"}),M.jsxs("ul",{children:[M.jsx("li",{children:"(a) the unenforceable provision shall be severed from these Terms;"}),M.jsx("li",{children:"(b) such severance shall not affect the remainder of Section 15 or the enforceability of individual arbitration for any remaining claims; and"}),M.jsx("li",{children:"(c) to the extent any claims must proceed on a class, collective, or representative basis, those claims shall be litigated in a court of competent jurisdiction and not in arbitration. The parties agree that litigation of such claims shall be stayed pending the outcome of any related individual arbitration."})]}),M.jsx("p",{children:"Furthermore, if any part of this Section 15 is found to prohibit an individual claim for public injunctive relief, that provision shall have no effect to the extent such relief is legally required to be available outside of arbitration. The remainder of this Section shall remain in full force and effect."})]}),M.jsxs("section",{children:[M.jsx("h2",{children:"16. Governing Law and Jurisdiction"}),M.jsx("p",{children:"These Terms and any dispute arising out of or related to them will be governed by and construed in accordance with the laws of the State of Delaware, without regard to its conflict of law principles."}),M.jsx("p",{children:"Subject to Section 15 (Arbitration), you agree that any legal proceeding not resolved through arbitration must be brought exclusively in the state or federal courts located in Orange County, California, or New Castle County, Delaware, and you consent to the personal jurisdiction of those courts."})]}),M.jsxs("section",{children:[M.jsx("h2",{children:"17. Changes to Terms"}),M.jsx("p",{children:"We reserve the right, at our sole discretion, to modify, amend, or replace these Terms at any time. Unless otherwise stated, updated Terms become effective upon posting."}),M.jsx("p",{children:"Your continued use of the Platform after the effective date of any changes constitutes your acceptance of the revised Terms. If you do not agree to the updated Terms, you must stop using the Platform immediately. It is your responsibility to review these Terms periodically for changes."})]}),M.jsxs("section",{children:[M.jsx("h2",{children:"18. Contact"}),M.jsx("p",{children:"For inquiries related to these Terms, contact:"}),M.jsxs("p",{children:[M.jsx("strong",{children:"Email:"})," ",M.jsx("a",{href:"mailto:support@makeinfinite.com",children:"support@makeinfinite.com"})]})]}),M.jsxs("section",{children:[M.jsx("h2",{children:"19. DMCA Notice and Copyright Policy"}),M.jsxs("p",{children:["Dreamspace respects intellectual property rights and complies with the Digital Millennium Copyright Act (DMCA). To report any copyright infringement, contact",M.jsx("a",{href:"mailto:support@makeinfinite.com",children:" support@makeinfinite.com"})," with:"]}),M.jsxs("ul",{children:[M.jsx("li",{children:"Your contact information."}),M.jsx("li",{children:"Identification of the copyrighted work."}),M.jsx("li",{children:"Identification of allegedly infringing material."}),M.jsx("li",{children:"A good-faith statement of infringement."}),M.jsx("li",{children:"A statement of accuracy under penalty of perjury."})]}),M.jsxs("p",{className:"copyright",children:["© ",new Date().getFullYear()," MakeInfinite Labs"]})]})]})})})},{MI_API_BASE_URL:_2c,MI_BASE_WS_URL:q2c,API_URL:Y2c,MI_API_PROXY_BASE_URL:J2c,GW_PROXY_API_URL_FOR_MI:X2c}=mp(),Q2c=e=>{const{onAuthButtonClick:t,isLoggedIn:r,loggedInUserId:n,onLogout:a,userDetail:o,subscriptionData:s,children:l,navigate:u}=e,c=li(),d=ed(),p=vPi($qn),h={API_BASE_URL:_2c,WS_BASE_URL:q2c,GW_BASE_URL:Y2c,GW_PROXY_URL:X2c,PROXY_API_BASE_URL:J2c},f=Zr.merge({},Wr,p);return M.jsx(APi,{theme:f,children:M.jsxs(bPi,{theme:f,children:[M.jsx(Sto,{}),M.jsx(yZ,{children:M.jsxs(STn,{config:h,children:[M.jsxs(nn,{sx:{display:"flex",flexDirection:"row",width:"100%"},children:[M.jsx(nn,{sx:{width:"calc(100% - 54px)",overflowX:"auto"},children:l}),M.jsx(nn,{sx:{position:"fixed",top:0,bottom:0,right:0,overflow:"hidden",zIndex:1200},children:M.jsx(Mnl,{onAuthButtonClick:t,navigate:u,onNavClick:g=>{g===Vt.dataStudio?c.push(jn.newQuery()):c.push(g)},isLoggedIn:r,onLogout:g=>{a(g,()=>{d.pathname===Vt.landingPage?window.location.reload():c.push(Vt.landingPage)})},loggedInUserId:n,subscriptionData:s,userDetail:o})})]}),M.jsx(Fnl,{})]})})]})})},Z2c=({onClose:e})=>M.jsx(Zd,{visible:!0,isHeader:!1,maxWidth:"xs",className:"missingEmailDialogue",children:M.jsxs(Dst,{children:[M.jsx("h4",{className:"title",children:se.VERIFY_EMAIL_PROMPT}),M.jsxs("ul",{children:[M.jsx("li",{children:M.jsx("span",{children:se.VERIFY_EMAIL_INFO_01})}),M.jsx("li",{children:M.jsx("span",{children:se.VERIFY_EMAIL_INFO_02})})]}),M.jsx("div",{className:"btnGroup",children:M.jsx(ur,{variant:"contained",onClick:e,style:{backgroundColor:"rgba(94, 53, 177, 0.8)",color:"#ffffff"},children:se.VERIFY_EMAIL_CONFIRMATION})})]})}),$2c=()=>{const e=G.useRef(null),t=Fo();G.useEffect(()=>{var a;if(console.log("loading initial application data",{isLoggedIn:t}),(a=e.current)==null||a.abort(),e.current=null,!t){Promise.allSettled([gxn(),y7t({})]);return}const r=new AbortController;e.current=r;const n=localStorage.getItem("userId")||"";return Promise.allSettled([DPi(),BKt(),wPi(n),kPi(),CPi(),Wgn(),EPi(),P3e(),y7t({}),SPi({})]),()=>r.abort()},[t])},ebc=["0XDESIGNER","AVAIL","AVAILTEAM","AVAX","BASE","BASETEAM","BONDEX","BUILD","CALDERA","CHAINLINK","EARLY","EMILY","NESA","POOL","PORT3","SOPHIA","SUI","SXTCOMMUNITY","VIBECODER","ZKSYNC"],sza=G.createContext(void 0),{ENABLE_JOIN_CODES:Egn}=mp(),tbc=localStorage.getItem("alphaJoinCode"),rbc=({children:e})=>{const[t,r]=G.useState(!!tbc||!Egn),n=a=>!Egn||ebc.includes(a.toUpperCase())?(r(!0),localStorage.setItem("alphaJoinCode",a),!0):!1;return M.jsx(sza.Provider,{value:{isValid:t,validate:n},children:e})},nbc=()=>{const e=G.useContext(sza);if(!e)throw new Error("useAlphaCode must be used within an AlphaCodeProvider");return e},abc="/assets/panel-bg-c4c3f71d.svg",ibc=b5("div")(()=>({position:"fixed",top:0,left:0,width:"100vw",height:"100vh",backgroundColor:"rgba(0, 0, 0, 0.8)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:2e3,pointerEvents:"auto"})),obc=b5(Cg)(()=>({display:"flex",flexDirection:"column",backgroundColor:"rgba(255, 255, 255, 0.11)",backdropFilter:"blur(20px)",borderRadius:"12px",border:"1px solid rgba(99, 53, 112)",backgroundImage:`
48124
48124
  linear-gradient(rgba(0, 0, 0.4, 0.5),
48125
48125
  rgba(0, 0, 0.4, 0.5)), url(${abc})
48126
- `,backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center",maxWidth:"1100px",width:"50%",padding:"15px",zIndex:2001,pointerEvents:"auto",position:"relative"})),sbc=b5(nn)(()=>({padding:"5px 5px",margin:"5px",borderBottom:"1px solid rgba(255, 255, 255, 0.37)"}));b5(nn)(()=>({padding:"10px 15px",backgroundColor:"rgba(217, 217, 217, 0.04)"}));const lbc=b5("div")(()=>({color:"rgba(255, 255, 255, 1)",fontSize:"18px",fontWeight:500})),ubc=b5(nn)(()=>({padding:"5px 5px",display:"flex",flexDirection:"column",width:"100%",flex:1,backgroundColor:"transparent",minHeight:0})),cbc=b5("div")(()=>({color:"rgba(255, 255, 255, 0.75)",marginBottom:"2px",fontSize:"12px",fontWeight:500})),dbc=b5("input")(()=>({padding:"2px 8px",marginBottom:"8px",minHeight:"40px",color:"rgba(255, 255, 255, 0.75)",fontSize:"16px",backgroundColor:"rgba(217, 217, 217, 0.04)",backdropFilter:"blur(20px)",borderRadius:"6px"})),pbc=b5(nk)(()=>({minWidth:"144px",minHeight:"30px",padding:"11px 22px",lineHeight:"normal",fontWeight:"400",borderRadius:"9px","&.primary":{backgroundColor:"#421ea1",color:"#ffffff",border:"1px solid rgba(255, 255, 255, 0.06)",textTransform:"none",fontSize:"0.813rem",transition:"all 0.3s ease-in-out","&:hover":{backgroundColor:"#52437c",color:"#737373",border:"1px solid #52437c"},"&:disabled":{backgroundColor:"#2d1570",color:"#595959",border:"1px solid #2d1570"}},"&.secondary":{backgroundColor:"rgba(255, 255, 255, 0.11)",color:"#ffffff",border:"1px solid rgba(255, 255, 255, 0.06)",textTransform:"none",fontSize:"0.813rem",transition:"all 0.3s ease-in-out","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.2)",color:"#ffffff",border:"1px solid rgba(255, 255, 255, 0.06)"},"&:disabled":{backgroundColor:"rgba(255, 255, 255, 0.06)",color:"#595959",border:"1px solid rgba(255, 255, 255, 0.06)"}}})),hbc=()=>{const{isValid:e,validate:t}=nbc(),[r,n]=G.useState(""),[a,o]=G.useState(!1),s=l=>{l.preventDefault(),t(r)||o(!0)};return e?M.jsx(M.Fragment,{}):Vl.createPortal(M.jsx(M.Fragment,{children:M.jsx(ibc,{sx:{zIndex:2e3},children:M.jsxs(obc,{sx:{zIndex:2e3},children:[M.jsx(sbc,{children:M.jsx(lbc,{children:"Welcome to Dreamspace"})}),M.jsxs(ubc,{sx:{position:"relative",color:"white"},children:[M.jsx(as,{sx:{margin:"5px 10px"},children:"Not everyone was meant to find this page. But you did. Welcome to the exclusive alpha version of Dreamspace. The first vibe coding canvas for crypto's creatives."}),M.jsx(as,{sx:{margin:"5px 10px"},children:"You know what to do."}),M.jsx(cbc,{sx:{mt:"30px",ml:"5px"},children:"Prove you belong:"}),M.jsx(dbc,{type:"text",name:"alpha code input",value:r,onChange:l=>n(l.target.value),placeholder:"enter code",sx:{zIndex:2e3}}),a&&M.jsx("div",{style:{color:"#ff4d4f",fontSize:"12px",marginBottom:"2px",marginLeft:"5px"},children:"Invalid alpha code"}),M.jsx(pbc,{className:"secondary",onClick:s,disabled:!1,sx:{mt:"20px"},children:"Join Alpha"})]})]})})}),document.body)},fbc=()=>{const e=EKt(),t=ixn(),[r,n]=G.useState((e==null?void 0:e.length)>0||t),[a,o]=G.useState(!1);return M.jsxs(Du,{className:"biscuitsBlock",children:[M.jsxs("div",{className:"cardHead",children:[r||a?M.jsx("div",{}):se.SAVE_BISCUIT,M.jsxs("div",{className:"headRight",children:[!a&&M.jsx(ur,{variant:"contained",color:"secondary",onClick:()=>n(!r),disabled:!(e!=null&&e.length)&&!t,children:r?se.CREATE_BISCUIT:se.SHOW_BISCUIT}),M.jsx(bn,{label:"Additional Information",children:M.jsx(an,{onClick:()=>o(s=>!s),children:a?M.jsx(Ku,{}):M.jsx(Ax,{})})})]})]}),M.jsx(sl,{in:a,timeout:"auto",unmountOnExit:!0,children:M.jsx("div",{className:"infoText",children:M.jsx("p",{style:{fontSize:"14px",color:"#999"},children:oxn.shortText})})}),M.jsx(sl,{in:!a&&!r,timeout:"auto",unmountOnExit:!0,children:M.jsx(NLa,{})}),M.jsx(sl,{in:!a&&r,timeout:"auto",unmountOnExit:!0,children:M.jsx(LLa,{setShowBiscuit:n,loading:t,biscuitContent:e})})]})},mbc=({visible:e,onClose:t})=>Fo()?M.jsx(Zd,{title:se.BISCUITS,visible:e,onClose:t,maxWidth:"md",children:M.jsxs(ta,{container:!0,spacing:2,children:[M.jsx(ta,{item:!0,xs:12,children:M.jsx(as,{variant:"body1",sx:{fontSize:"14px",color:"#999"},children:se.PERMISSIONS_BISCUITS_DESC})}),M.jsx(ta,{item:!0,xs:12,children:M.jsx(fbc,{})})]})}):(ml(!0),null),{ENV:T3e,GA_MEASUREMENT_ID:gbc,ENABLE_ZK_ETH:xbc,ENABLE_MY_ACCOUNTS_V2:ybc,ENABLE_JOIN_CODES:vbc}=mp();MPi.initialize(gbc);const ZPt=Ie.lazy(()=>b$(()=>import("./QueryEditorWrapper-fedfa8fa.js"),["assets/QueryEditorWrapper-fedfa8fa.js","assets/vendor-charts-983c7ae8.js","assets/vendor-editor-a0c582a1.js","assets/vendor-three-8b2e11db.js"])),Abc=Ie.lazy(()=>b$(()=>import("./ErdWrapper-ad6ad6a6.js"),["assets/ErdWrapper-ad6ad6a6.js","assets/vendor-charts-983c7ae8.js","assets/vendor-editor-a0c582a1.js","assets/vendor-three-8b2e11db.js"])),$Pt=Ie.lazy(()=>b$(()=>import("./Queries-811c3896.js"),["assets/Queries-811c3896.js","assets/vendor-charts-983c7ae8.js","assets/vendor-editor-a0c582a1.js","assets/vendor-three-8b2e11db.js"])),bbc=Ie.lazy(()=>b$(()=>import("./index-c41e10ec.js"),["assets/index-c41e10ec.js","assets/vendor-charts-983c7ae8.js","assets/vendor-editor-a0c582a1.js","assets/vendor-three-8b2e11db.js"])),Dbc=["sxt-mi-git-prod.space-and-time.workers.dev","sxt-mi-git-staging.space-and-time.workers.dev","git-infinite-staging.space-and-time.workers.dev","git-infinite-production.space-and-time.workers.dev"];sGi.register({request:(e,t)=>{const r=e.toString();if(Dbc.some(a=>r.includes(a)))return[e,t];const n={...t};return e&&typeof e=="string"&&e.includes("coinbase")?(n.headers={"Content-Type":"application/json"},[e,n]):[e,n]},requestError:e=>e,response:e=>e,responseError:e=>(console.log(e),Promise.reject(e))});function wbc(){$2c();const e=li(),{config:t}=cst(),r=Fb(),n=Mb(),a=FPi(),o=Fo(),s=BPi(),{search:l}=window&&window.location,u=new URLSearchParams(l);if(G.useLayoutEffect(()=>{const L=u.get("utm_campaign")||"";TPi({utmCampaign:L})},[]),!t)return null;const c=RPi(),d=SKt(),p=localStorage.getItem("userId")||"",h=()=>vbc?!localStorage.getItem("alphaJoinCode"):!1,f=MKt(),[g,x]=G.useState({open:!1,userId:"",key:""}),[v,A]=G.useState(!1),[b]=G.useState(null),D=G.useCallback((L,I=!1)=>{switch(L){case"INDEX_CONTRACT":e.push(jn.getDataFromChain(""));break;case"DATA_STUDIO":default:I?window.open(jn.newQuery(),"_blank"):e.push(jn.newQuery());break}},[e]),E=(L=!0)=>{Cd.logout(),m7t(),ml(!1),pz(),sessionStorage.removeItem("sessionId"),L&&window.location.reload()};G.useEffect(()=>{window.ethereum&&(window.ethereum.removeListener("accountsChanged",()=>{}),window.ethereum.removeListener("chainChanged",()=>{}))},[]),G.useEffect(()=>{o&&XMl(E)},[o]);const F=a3(L=>L.setUserEmail),B=a3(L=>L.setIsEmailVerified),P=a3(L=>L.showVerifyEmailDialog),N=a3(L=>L.setShowVerifyEmailDialog);return G.useEffect(()=>{(async()=>{var z,H;const I=await Hl.getEmail();I.status===200&&(F(((z=I==null?void 0:I.data)==null?void 0:z.emailAddress)??null),B(((H=I==null?void 0:I.data)==null?void 0:H.emailVerified)??!1))})()},[o]),M.jsx(yZ,{children:M.jsxs(rbc,{children:[M.jsxs(Q2c,{onAuthButtonClick:()=>ml(!0),navigate:D,isLoggedIn:o,loggedInUserId:p,onLogout:(L=!0,I)=>{try{m7t(),ml(!1),pz(),sessionStorage.removeItem("sessionId")}finally{Cd.logout()}L&&I()},subscriptionData:n,userDetail:r,children:[c&&M.jsx("div",{className:"fixedLoader",children:M.jsx(oo,{})}),M.jsxs(xxn,{children:[M.jsx($l,{exact:!0,path:Vt.landingPage,children:M.jsx(G.Suspense,{fallback:M.jsx(oo,{}),children:M.jsx(grl,{navigate:D,isLoggedIn:o,onAuthButtonClick:()=>ml(!0)})})}),M.jsx($l,{exact:!0,path:Vt.explore,children:M.jsx(G.Suspense,{fallback:M.jsx(oo,{}),children:M.jsx(Ytl,{})})}),M.jsx($l,{exact:!0,path:Vt.dataStudio,children:M.jsx(G.Suspense,{fallback:M.jsx(oo,{}),children:M.jsx(nxn,{to:jn.newQuery()})})}),M.jsx($l,{exact:!0,path:Vt.myApps,children:M.jsx(G.Suspense,{fallback:M.jsx(oo,{}),children:M.jsx(pnl,{navigate:D,isLoggedIn:o,onAuthButtonClick:()=>ml(!0)})})}),M.jsx($l,{exact:!0,path:`${Vt.myApps}/:projectId`,children:M.jsx(G.Suspense,{fallback:M.jsx(oo,{}),children:M.jsx(jtl,{navigate:D,subscriptionData:n,onChatBotPinnedClicked:()=>{}})})}),M.jsx($l,{exact:!0,path:Vt.googleCloud,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(GAc,{})]})}),M.jsx($l,{exact:!0,path:Vt.awsMarketplace,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(Nvc,{})]})}),M.jsx($l,{exact:!0,path:Vt.azureLogin,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(Pql,{})]})}),M.jsx($l,{exact:!0,path:Vt.newQuery,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(ZPt,{})]})}),M.jsx($l,{exact:!0,path:Vt.erd,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(Abc,{})]})}),M.jsx($l,{exact:!0,path:Vt.savedQuery,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(ZPt,{})]})}),M.jsx($l,{exact:!0,path:Vt.publicQuerySlug,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(ZPt,{})]})}),M.jsx(iv,{exact:!0,path:Vt.newChart,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(Gtn,{})]})}),M.jsx(iv,{exact:!0,path:Vt.updateChart,children:M.jsx(G.Suspense,{fallback:M.jsx(oo,{}),children:M.jsx(Gtn,{})})}),M.jsx(iv,{exact:!0,path:Vt.charts,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(Vzl,{})]})}),M.jsx($l,{exact:!0,path:Vt.dashboards,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(Vql,{})]})}),xbc==="true"&&M.jsx($l,{exact:!0,path:Vt.zkpay,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(oZl,{slugName:"zketh"})]})}),M.jsx(iv,{exact:!0,path:Vt.myQueries,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx($Pt,{tab:Gue.myQueries})]})}),M.jsx(iv,{exact:!0,path:Vt.queryHistory,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx($Pt,{tab:Gue.queryHistory})]})}),M.jsx($l,{exact:!0,path:Vt.myOrgQuery,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx($Pt,{tab:Gue.myOrgQuery})]})}),M.jsx(iv,{exact:!0,path:Vt.newDashboard,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(Krn,{})]})}),M.jsx($l,{exact:!0,path:Vt.viewDashboard,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(_rn,{})]})}),M.jsx($l,{exact:!0,path:Vt.publicDashboard,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(_rn,{isPublic:!0})]})}),M.jsx(iv,{exact:!0,path:Vt.updateDashboard,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(Krn,{})]})}),T3e==="dev"&&M.jsx(iv,{exact:!0,path:Vt.pipelineView,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),T3e==="dev"?M.jsx(bbc,{}):M.jsx(Gnn,{})]})}),T3e==="dev"&&M.jsx(iv,{exact:!0,path:Vt.pipelineModel,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),T3e==="dev"?M.jsx(Tql,{}):M.jsx(Gnn,{})]})}),M.jsx(iv,{exact:!0,path:Vt.sendData,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(Pvc,{})]})}),M.jsx(iv,{exact:!0,path:Vt.getDataFromChain,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(Y1c,{})]})}),ybc==="true"&&M.jsx(iv,{path:`${Vt.settings}/:subPath*`,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(bmc,{})]})}),M.jsx(iv,{exact:!0,path:Vt.views,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(B2c,{})]})}),M.jsx($l,{exact:!0,path:Vt.emailVerification,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(N2c,{})]})}),M.jsx($l,{exact:!0,path:Vt.resetPassword,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(U2c,{})]})}),M.jsx($l,{exact:!0,path:Vt.terms,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(K2c,{})]})}),M.jsx($l,{render:L=>M.jsx(yZ,{...L,children:M.jsx(y1e,{errorPageType:"404"})})})]}),s&&M.jsx(mbc,{visible:s,onClose:()=>qWt(!1)}),!h()&&f&&M.jsx(r5l,{open:f,setShowLoginDrawer:ml,isSubmit:v,setIsSubmit:A,redirectOnSuccess:b,setIsJoinCodeRequired:x}),M.jsx(Mot,{isJoinCodeRequired:g,onClose:()=>{x({open:!1,userId:"",key:""}),A(!1)},onSuccess:()=>x({open:!1,userId:"",key:""})}),a&&M.jsx(V2c,{onClose:()=>PPi(!1)}),o&&P&&M.jsx(Z2c,{onClose:()=>N(!1)})]}),M.jsx(hbc,{}),M.jsx(jPi,{}),(d==null?void 0:d.type)==="error"&&(d!=null&&d.title)?M.jsx(Yql,{}):M.jsx(Xql,{})]})})}async function kbc(e){const t=!!e.match("ignite"),{data:r,error:n}=await Hl.get(e,void 0,t);if(n)throw n;return r}const{GOOGLE_CLIENT_ID:Cbc,STRIPE_CLIENT_ID:Ebc,SENTRY_DSN:Sbc}=mp();JHi({dsn:Sbc,integrations:[new irt,new XHi],replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,tracesSampleRate:1});const Mbc=x7i(`${Ebc}`);window.localforage=IPi;NPi();Vl.render(M.jsx(syn,{stripe:Mbc,children:M.jsx(LPi,{value:{fetcher:kbc},children:M.jsx(ZHi,{clientId:Cbc,children:M.jsx(OPi,{children:M.jsx(wbc,{})})})})}),document.getElementById("root"));export{Zee as $,UEc as A,ur as B,ZEc as C,OEc as D,LEc as E,zEc as F,Jnr as G,$Ec as H,an as I,XEc as J,Uzl as K,Ts as L,kwa as M,ba as N,oo as O,wA as P,wvc as Q,k0 as R,Urr as S,_g as T,t5 as U,Sh as V,oX as W,Ku as X,xZ as Y,hR as Z,cx as _,Fyc as a,Dyc as a0,ugn as a1,_Ec as a2,YEc as a3,aKl as a4,Iil as a5,VEc as b,HEc as c,GEc as d,kOa as e,WEc as f,ADa as g,d1e as h,e3c as i,IOa as j,KEc as k,Zd as l,lDa as m,On as n,Pg as o,JEc as p,Ayc as q,qEc as r,QEc as s,yyc as t,ll as u,vyc as v,cEc as w,Mh as x,wdr as y,kdr as z};
48126
+ `,backgroundRepeat:"no-repeat",backgroundSize:"cover",backgroundPosition:"center",maxWidth:"1100px",width:"50%",padding:"15px",zIndex:2001,pointerEvents:"auto",position:"relative"})),sbc=b5(nn)(()=>({padding:"5px 5px",margin:"5px",borderBottom:"1px solid rgba(255, 255, 255, 0.37)"}));b5(nn)(()=>({padding:"10px 15px",backgroundColor:"rgba(217, 217, 217, 0.04)"}));const lbc=b5("div")(()=>({color:"rgba(255, 255, 255, 1)",fontSize:"18px",fontWeight:500})),ubc=b5(nn)(()=>({padding:"5px 5px",display:"flex",flexDirection:"column",width:"100%",flex:1,backgroundColor:"transparent",minHeight:0})),cbc=b5("div")(()=>({color:"rgba(255, 255, 255, 0.75)",marginBottom:"2px",fontSize:"12px",fontWeight:500})),dbc=b5("input")(()=>({padding:"2px 8px",marginBottom:"8px",minHeight:"40px",color:"rgba(255, 255, 255, 0.75)",fontSize:"16px",backgroundColor:"rgba(217, 217, 217, 0.04)",backdropFilter:"blur(20px)",borderRadius:"6px"})),pbc=b5(nk)(()=>({minWidth:"144px",minHeight:"30px",padding:"11px 22px",lineHeight:"normal",fontWeight:"400",borderRadius:"9px","&.primary":{backgroundColor:"#421ea1",color:"#ffffff",border:"1px solid rgba(255, 255, 255, 0.06)",textTransform:"none",fontSize:"0.813rem",transition:"all 0.3s ease-in-out","&:hover":{backgroundColor:"#52437c",color:"#737373",border:"1px solid #52437c"},"&:disabled":{backgroundColor:"#2d1570",color:"#595959",border:"1px solid #2d1570"}},"&.secondary":{backgroundColor:"rgba(255, 255, 255, 0.11)",color:"#ffffff",border:"1px solid rgba(255, 255, 255, 0.06)",textTransform:"none",fontSize:"0.813rem",transition:"all 0.3s ease-in-out","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.2)",color:"#ffffff",border:"1px solid rgba(255, 255, 255, 0.06)"},"&:disabled":{backgroundColor:"rgba(255, 255, 255, 0.06)",color:"#595959",border:"1px solid rgba(255, 255, 255, 0.06)"}}})),hbc=()=>{const{isValid:e,validate:t}=nbc(),[r,n]=G.useState(""),[a,o]=G.useState(!1),s=l=>{l.preventDefault(),t(r)||o(!0)};return e?M.jsx(M.Fragment,{}):Vl.createPortal(M.jsx(M.Fragment,{children:M.jsx(ibc,{sx:{zIndex:2e3},children:M.jsxs(obc,{sx:{zIndex:2e3},children:[M.jsx(sbc,{children:M.jsx(lbc,{children:"Welcome to Dreamspace"})}),M.jsxs(ubc,{sx:{position:"relative",color:"white"},children:[M.jsx(as,{sx:{margin:"5px 10px"},children:"Not everyone was meant to find this page. But you did. Welcome to the exclusive alpha version of Dreamspace. The first vibe coding canvas for crypto's creatives."}),M.jsx(as,{sx:{margin:"5px 10px"},children:"You know what to do."}),M.jsx(cbc,{sx:{mt:"30px",ml:"5px"},children:"Prove you belong:"}),M.jsx(dbc,{type:"text",name:"alpha code input",value:r,onChange:l=>n(l.target.value),placeholder:"enter code",sx:{zIndex:2e3}}),a&&M.jsx("div",{style:{color:"#ff4d4f",fontSize:"12px",marginBottom:"2px",marginLeft:"5px"},children:"Invalid alpha code"}),M.jsx(pbc,{className:"secondary",onClick:s,disabled:!1,sx:{mt:"20px"},children:"Join Alpha"})]})]})})}),document.body)},fbc=()=>{const e=EKt(),t=ixn(),[r,n]=G.useState((e==null?void 0:e.length)>0||t),[a,o]=G.useState(!1);return M.jsxs(Du,{className:"biscuitsBlock",children:[M.jsxs("div",{className:"cardHead",children:[r||a?M.jsx("div",{}):se.SAVE_BISCUIT,M.jsxs("div",{className:"headRight",children:[!a&&M.jsx(ur,{variant:"contained",color:"secondary",onClick:()=>n(!r),disabled:!(e!=null&&e.length)&&!t,children:r?se.CREATE_BISCUIT:se.SHOW_BISCUIT}),M.jsx(bn,{label:"Additional Information",children:M.jsx(an,{onClick:()=>o(s=>!s),children:a?M.jsx(Ku,{}):M.jsx(Ax,{})})})]})]}),M.jsx(sl,{in:a,timeout:"auto",unmountOnExit:!0,children:M.jsx("div",{className:"infoText",children:M.jsx("p",{style:{fontSize:"14px",color:"#999"},children:oxn.shortText})})}),M.jsx(sl,{in:!a&&!r,timeout:"auto",unmountOnExit:!0,children:M.jsx(NLa,{})}),M.jsx(sl,{in:!a&&r,timeout:"auto",unmountOnExit:!0,children:M.jsx(LLa,{setShowBiscuit:n,loading:t,biscuitContent:e})})]})},mbc=({visible:e,onClose:t})=>Fo()?M.jsx(Zd,{title:se.BISCUITS,visible:e,onClose:t,maxWidth:"md",children:M.jsxs(ta,{container:!0,spacing:2,children:[M.jsx(ta,{item:!0,xs:12,children:M.jsx(as,{variant:"body1",sx:{fontSize:"14px",color:"#999"},children:se.PERMISSIONS_BISCUITS_DESC})}),M.jsx(ta,{item:!0,xs:12,children:M.jsx(fbc,{})})]})}):(ml(!0),null),{ENV:T3e,GA_MEASUREMENT_ID:gbc,ENABLE_ZK_ETH:xbc,ENABLE_MY_ACCOUNTS_V2:ybc,ENABLE_JOIN_CODES:vbc}=mp();MPi.initialize(gbc);const ZPt=Ie.lazy(()=>b$(()=>import("./QueryEditorWrapper-27d9e26f.js"),["assets/QueryEditorWrapper-27d9e26f.js","assets/vendor-charts-c2d37c0c.js","assets/vendor-editor-c82365af.js","assets/vendor-three-8b64368a.js"])),Abc=Ie.lazy(()=>b$(()=>import("./ErdWrapper-a0672434.js"),["assets/ErdWrapper-a0672434.js","assets/vendor-charts-c2d37c0c.js","assets/vendor-editor-c82365af.js","assets/vendor-three-8b64368a.js"])),$Pt=Ie.lazy(()=>b$(()=>import("./Queries-d40b1ddb.js"),["assets/Queries-d40b1ddb.js","assets/vendor-charts-c2d37c0c.js","assets/vendor-editor-c82365af.js","assets/vendor-three-8b64368a.js"])),bbc=Ie.lazy(()=>b$(()=>import("./index-4c4791e6.js"),["assets/index-4c4791e6.js","assets/vendor-charts-c2d37c0c.js","assets/vendor-editor-c82365af.js","assets/vendor-three-8b64368a.js"])),Dbc=["sxt-mi-git-prod.space-and-time.workers.dev","sxt-mi-git-staging.space-and-time.workers.dev","git-infinite-staging.space-and-time.workers.dev","git-infinite-production.space-and-time.workers.dev"];sGi.register({request:(e,t)=>{const r=e.toString();if(Dbc.some(a=>r.includes(a)))return[e,t];const n={...t};return e&&typeof e=="string"&&e.includes("coinbase")?(n.headers={"Content-Type":"application/json"},[e,n]):[e,n]},requestError:e=>e,response:e=>e,responseError:e=>(console.log(e),Promise.reject(e))});function wbc(){$2c();const e=li(),{config:t}=cst(),r=Fb(),n=Mb(),a=FPi(),o=Fo(),s=BPi(),{search:l}=window&&window.location,u=new URLSearchParams(l);if(G.useLayoutEffect(()=>{const L=u.get("utm_campaign")||"";TPi({utmCampaign:L})},[]),!t)return null;const c=RPi(),d=SKt(),p=localStorage.getItem("userId")||"",h=()=>vbc?!localStorage.getItem("alphaJoinCode"):!1,f=MKt(),[g,x]=G.useState({open:!1,userId:"",key:""}),[v,A]=G.useState(!1),[b]=G.useState(null),D=G.useCallback((L,I=!1)=>{switch(L){case"INDEX_CONTRACT":e.push(jn.getDataFromChain(""));break;case"DATA_STUDIO":default:I?window.open(jn.newQuery(),"_blank"):e.push(jn.newQuery());break}},[e]),E=(L=!0)=>{Cd.logout(),m7t(),ml(!1),pz(),sessionStorage.removeItem("sessionId"),L&&window.location.reload()};G.useEffect(()=>{window.ethereum&&(window.ethereum.removeListener("accountsChanged",()=>{}),window.ethereum.removeListener("chainChanged",()=>{}))},[]),G.useEffect(()=>{o&&XMl(E)},[o]);const F=a3(L=>L.setUserEmail),B=a3(L=>L.setIsEmailVerified),P=a3(L=>L.showVerifyEmailDialog),N=a3(L=>L.setShowVerifyEmailDialog);return G.useEffect(()=>{(async()=>{var z,H;const I=await Hl.getEmail();I.status===200&&(F(((z=I==null?void 0:I.data)==null?void 0:z.emailAddress)??null),B(((H=I==null?void 0:I.data)==null?void 0:H.emailVerified)??!1))})()},[o]),M.jsx(yZ,{children:M.jsxs(rbc,{children:[M.jsxs(Q2c,{onAuthButtonClick:()=>ml(!0),navigate:D,isLoggedIn:o,loggedInUserId:p,onLogout:(L=!0,I)=>{try{m7t(),ml(!1),pz(),sessionStorage.removeItem("sessionId")}finally{Cd.logout()}L&&I()},subscriptionData:n,userDetail:r,children:[c&&M.jsx("div",{className:"fixedLoader",children:M.jsx(oo,{})}),M.jsxs(xxn,{children:[M.jsx($l,{exact:!0,path:Vt.landingPage,children:M.jsx(G.Suspense,{fallback:M.jsx(oo,{}),children:M.jsx(grl,{navigate:D,isLoggedIn:o,onAuthButtonClick:()=>ml(!0)})})}),M.jsx($l,{exact:!0,path:Vt.explore,children:M.jsx(G.Suspense,{fallback:M.jsx(oo,{}),children:M.jsx(Ytl,{})})}),M.jsx($l,{exact:!0,path:Vt.dataStudio,children:M.jsx(G.Suspense,{fallback:M.jsx(oo,{}),children:M.jsx(nxn,{to:jn.newQuery()})})}),M.jsx($l,{exact:!0,path:Vt.myApps,children:M.jsx(G.Suspense,{fallback:M.jsx(oo,{}),children:M.jsx(pnl,{navigate:D,isLoggedIn:o,onAuthButtonClick:()=>ml(!0)})})}),M.jsx($l,{exact:!0,path:`${Vt.myApps}/:projectId`,children:M.jsx(G.Suspense,{fallback:M.jsx(oo,{}),children:M.jsx(jtl,{navigate:D,subscriptionData:n,onChatBotPinnedClicked:()=>{}})})}),M.jsx($l,{exact:!0,path:Vt.googleCloud,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(GAc,{})]})}),M.jsx($l,{exact:!0,path:Vt.awsMarketplace,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(Nvc,{})]})}),M.jsx($l,{exact:!0,path:Vt.azureLogin,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(Pql,{})]})}),M.jsx($l,{exact:!0,path:Vt.newQuery,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(ZPt,{})]})}),M.jsx($l,{exact:!0,path:Vt.erd,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(Abc,{})]})}),M.jsx($l,{exact:!0,path:Vt.savedQuery,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(ZPt,{})]})}),M.jsx($l,{exact:!0,path:Vt.publicQuerySlug,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(ZPt,{})]})}),M.jsx(iv,{exact:!0,path:Vt.newChart,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(Gtn,{})]})}),M.jsx(iv,{exact:!0,path:Vt.updateChart,children:M.jsx(G.Suspense,{fallback:M.jsx(oo,{}),children:M.jsx(Gtn,{})})}),M.jsx(iv,{exact:!0,path:Vt.charts,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(Vzl,{})]})}),M.jsx($l,{exact:!0,path:Vt.dashboards,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(Vql,{})]})}),xbc==="true"&&M.jsx($l,{exact:!0,path:Vt.zkpay,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(oZl,{slugName:"zketh"})]})}),M.jsx(iv,{exact:!0,path:Vt.myQueries,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx($Pt,{tab:Gue.myQueries})]})}),M.jsx(iv,{exact:!0,path:Vt.queryHistory,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx($Pt,{tab:Gue.queryHistory})]})}),M.jsx($l,{exact:!0,path:Vt.myOrgQuery,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx($Pt,{tab:Gue.myOrgQuery})]})}),M.jsx(iv,{exact:!0,path:Vt.newDashboard,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(Krn,{})]})}),M.jsx($l,{exact:!0,path:Vt.viewDashboard,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(_rn,{})]})}),M.jsx($l,{exact:!0,path:Vt.publicDashboard,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(_rn,{isPublic:!0})]})}),M.jsx(iv,{exact:!0,path:Vt.updateDashboard,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(Krn,{})]})}),T3e==="dev"&&M.jsx(iv,{exact:!0,path:Vt.pipelineView,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),T3e==="dev"?M.jsx(bbc,{}):M.jsx(Gnn,{})]})}),T3e==="dev"&&M.jsx(iv,{exact:!0,path:Vt.pipelineModel,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),T3e==="dev"?M.jsx(Tql,{}):M.jsx(Gnn,{})]})}),M.jsx(iv,{exact:!0,path:Vt.sendData,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(Pvc,{})]})}),M.jsx(iv,{exact:!0,path:Vt.getDataFromChain,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(Y1c,{})]})}),ybc==="true"&&M.jsx(iv,{path:`${Vt.settings}/:subPath*`,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(bmc,{})]})}),M.jsx(iv,{exact:!0,path:Vt.views,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(B2c,{})]})}),M.jsx($l,{exact:!0,path:Vt.emailVerification,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(N2c,{})]})}),M.jsx($l,{exact:!0,path:Vt.resetPassword,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(U2c,{})]})}),M.jsx($l,{exact:!0,path:Vt.terms,children:M.jsxs(G.Suspense,{fallback:M.jsx(oo,{}),children:[M.jsx(Rc,{}),M.jsx(K2c,{})]})}),M.jsx($l,{render:L=>M.jsx(yZ,{...L,children:M.jsx(y1e,{errorPageType:"404"})})})]}),s&&M.jsx(mbc,{visible:s,onClose:()=>qWt(!1)}),!h()&&f&&M.jsx(r5l,{open:f,setShowLoginDrawer:ml,isSubmit:v,setIsSubmit:A,redirectOnSuccess:b,setIsJoinCodeRequired:x}),M.jsx(Mot,{isJoinCodeRequired:g,onClose:()=>{x({open:!1,userId:"",key:""}),A(!1)},onSuccess:()=>x({open:!1,userId:"",key:""})}),a&&M.jsx(V2c,{onClose:()=>PPi(!1)}),o&&P&&M.jsx(Z2c,{onClose:()=>N(!1)})]}),M.jsx(hbc,{}),M.jsx(jPi,{}),(d==null?void 0:d.type)==="error"&&(d!=null&&d.title)?M.jsx(Yql,{}):M.jsx(Xql,{})]})})}async function kbc(e){const t=!!e.match("ignite"),{data:r,error:n}=await Hl.get(e,void 0,t);if(n)throw n;return r}const{GOOGLE_CLIENT_ID:Cbc,STRIPE_CLIENT_ID:Ebc,SENTRY_DSN:Sbc}=mp();JHi({dsn:Sbc,integrations:[new irt,new XHi],replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,tracesSampleRate:1});const Mbc=x7i(`${Ebc}`);window.localforage=IPi;NPi();Vl.render(M.jsx(syn,{stripe:Mbc,children:M.jsx(LPi,{value:{fetcher:kbc},children:M.jsx(ZHi,{clientId:Cbc,children:M.jsx(OPi,{children:M.jsx(wbc,{})})})})}),document.getElementById("root"));export{Zee as $,UEc as A,ur as B,ZEc as C,OEc as D,LEc as E,zEc as F,Jnr as G,$Ec as H,an as I,XEc as J,Uzl as K,Ts as L,kwa as M,ba as N,oo as O,wA as P,wvc as Q,k0 as R,Urr as S,_g as T,t5 as U,Sh as V,oX as W,Ku as X,xZ as Y,hR as Z,cx as _,Fyc as a,Dyc as a0,ugn as a1,_Ec as a2,YEc as a3,aKl as a4,Iil as a5,VEc as b,HEc as c,GEc as d,kOa as e,WEc as f,ADa as g,d1e as h,e3c as i,IOa as j,KEc as k,Zd as l,lDa as m,On as n,Pg as o,JEc as p,Ayc as q,qEc as r,QEc as s,yyc as t,ll as u,vyc as v,cEc as w,Mh as x,wdr as y,kdr as z};
@@ -1,4 +1,4 @@
1
- import{a3 as N,r as n,j as e,j9 as V,C as E,ae as b,mp as P,bq as v,br as O,bg as S,bh as s,aW as l,bs as C,p7 as I,p8 as D,p9 as F,pa as k,pb as L,pc as q,iB as A,ja as M,pd as B}from"./vendor-charts-983c7ae8.js";import{a4 as W,a5 as _,u as U,O as $}from"./index-0bf8a350.js";import"./vendor-editor-a0c582a1.js";import"./vendor-three-8b2e11db.js";const G=[{id:"kafka_stream",type:"custom",title:"New kafka Stream",subtitle:"Indexed data",positionX:0,positionY:0,sourcePosition:"right",targetPosition:"right"},{id:"Ethereum_transactions",type:"custom",title:"Ethereum Transactions",subtitle:"Indexed data",positionX:420,positionY:0,sourcePosition:"right",targetPosition:"right"},{id:"create_new_table",type:"custom",title:"Create a New Table",subtitle:"Indexed data",positionX:1260,positionY:0,sourcePosition:"right",targetPosition:"left"}],H=[{id:"e1-1",source:1,target:2},{id:"e1-2",source:2,target:3},{id:"e1-3",source:3,target:4},{id:"e1-4",source:4,target:5}],j={nodesDataSearch:G,edgesDataSearchUnused:H},x=[{prompt:"Write sql query",promptId:6,actionType:2,View:"Open query editor vuew",viewRoute:"/pipeline/model?promptId=6",isFirst:!0},{prompt:"Explore tables from uniswap",promptId:6,actionType:5,View:"Open query editor vuew",viewRoute:"/pipeline/model",isFirst:!0},{prompt:"Load streams from kafka",promptId:6,actionType:5,View:"Open query editor vuew",viewRoute:"/pipeline/model",isFirst:!0},{prompt:"Explore blockchain data tables available",promptId:6,actionType:5,View:"Open query editor vuew",viewRoute:"/pipeline/model",isFirst:!0},{prompt:"Write a slack api integration in python",promptId:6,actionType:5,View:"Open query editor vuew",viewRoute:"/pipeline/model",isFirst:!0},{prompt:"Show ethereum schema",promptId:1,actionType:1,View:"open ethereum data model view",viewRoute:"/pipeline/model?promptId=1&selectedChain=ethereum&view=data-sets",isFirst:!0},{prompt:"Show binance schema",promptId:2,actionType:1,View:"open bnb data model view",viewRoute:"/pipeline/model?promptId=2&selectedChain=binance&view=data-sets"},{prompt:"View avalanche schema",promptId:3,actionType:1,View:"open bnb data model view",viewRoute:"/pipeline/model?promptId=3&selectedChain=avalanche&view=data-sets"},{prompt:"Explore binance schema",promptId:4,actionType:1,View:"open bnb data model view",viewRoute:"/pipeline/model?promptId=4&selectedChain=binance&view=data-sets"},{prompt:"Explore Table Transaction from ethereum Schema",promptId:5,actionType:1,View:"open etherium data model view with transaction table and its connected table",viewRoute:"/pipeline/model?promptId=5&selectedChain=ethereum&table=TRANSACTION&view=data-sets"},{prompt:"Run a query",promptId:7,actionType:2,View:"Open query editor vuew",viewRoute:"/pipeline/model?promptId=6"},{prompt:"Explore a query",promptId:8,actionType:2,View:"Open query editor vuew",viewRoute:"/pipeline/model?promptId=8"},{prompt:"Create table",promptId:14,actionType:2,View:"Open query editor view with DDL",viewRoute:"/pipeline/model?promptId=14"},{prompt:"Show data model",promptId:9,actionType:2,View:"Open data model view",viewRoute:"/pipeline/model?promptId=9",isFirst:!0},{prompt:"View data model",promptId:10,actionType:2,View:"Open data model view",viewRoute:"/pipeline/model?promptId=10"},{prompt:"Explore data model",promptId:15,actionType:2,View:"Open data model view",viewRoute:"/pipeline/model?promptId=15"},{prompt:"Python Script 1",promptId:11,actionType:4,View:"Open python script 1",viewRoute:"/pipeline/model?actionId=2&promptId=8"},{prompt:"Python Script 2",promptId:12,actionType:4,View:"Open python script 2",viewRoute:"/pipeline/model?actionId=2&promptId=8"},{prompt:"Python Script 3",promptId:13,actionType:4,View:"Open python script 3",viewRoute:"/pipeline/model?actionId=2&promptId=8"},{prompt:"Write a python script",promptId:14,actionType:4,View:"Open python script",viewRoute:"/pipeline/model?promptId=14",isFirst:!0}],X=()=>{const a=N(),r=n.useRef(!0),[d,i]=n.useState([]),[u,c]=n.useState("");n.useEffect(()=>()=>{r.current=!1},[]);const w=t=>{let p=[];t?x==null||x.forEach(o=>{var m,h,T,f;((h=(m=o==null?void 0:o.prompt)==null?void 0:m.toLowerCase())!=null&&h.includes(t==null?void 0:t.toLowerCase())||(f=t==null?void 0:t.toLowerCase())!=null&&f.includes((T=o.prompt)==null?void 0:T.toLowerCase()))&&p.push({title:o.prompt,value:o.prompt,data:o})}):p=x.filter(o=>o.isFirst).map(o=>({title:o.prompt,value:o.prompt,data:o})),i([...p])},y=t=>{r.current&&(c(t),w(t))},R=t=>{var p,o,m,h;r.current&&c(t==null?void 0:t.value),(((p=t==null?void 0:t.data)==null?void 0:p.promptId)===14||((o=t==null?void 0:t.data)==null?void 0:o.promptId)===6)&&(((m=t==null?void 0:t.data)==null?void 0:m.promptId)===6&&V("Execute_Query",!1),a.push((h=t==null?void 0:t.data)==null?void 0:h.viewRoute))};return e.jsx(W,{options:d,handleChange:y,onSelectValue:R,value:u,onFocus:()=>{w(u)},onBlur:()=>{setTimeout(()=>{r.current&&i([])},300)}})},Y=E.div`
1
+ import{a3 as N,r as n,j as e,j9 as V,C as E,ae as b,mp as P,bq as v,br as O,bg as S,bh as s,aW as l,bs as C,p7 as I,p8 as D,p9 as F,pa as k,pb as L,pc as q,iB as A,ja as M,pd as B}from"./vendor-charts-c2d37c0c.js";import{a4 as W,a5 as _,u as U,O as $}from"./index-24f62d99.js";import"./vendor-editor-c82365af.js";import"./vendor-three-8b64368a.js";const G=[{id:"kafka_stream",type:"custom",title:"New kafka Stream",subtitle:"Indexed data",positionX:0,positionY:0,sourcePosition:"right",targetPosition:"right"},{id:"Ethereum_transactions",type:"custom",title:"Ethereum Transactions",subtitle:"Indexed data",positionX:420,positionY:0,sourcePosition:"right",targetPosition:"right"},{id:"create_new_table",type:"custom",title:"Create a New Table",subtitle:"Indexed data",positionX:1260,positionY:0,sourcePosition:"right",targetPosition:"left"}],H=[{id:"e1-1",source:1,target:2},{id:"e1-2",source:2,target:3},{id:"e1-3",source:3,target:4},{id:"e1-4",source:4,target:5}],j={nodesDataSearch:G,edgesDataSearchUnused:H},x=[{prompt:"Write sql query",promptId:6,actionType:2,View:"Open query editor vuew",viewRoute:"/pipeline/model?promptId=6",isFirst:!0},{prompt:"Explore tables from uniswap",promptId:6,actionType:5,View:"Open query editor vuew",viewRoute:"/pipeline/model",isFirst:!0},{prompt:"Load streams from kafka",promptId:6,actionType:5,View:"Open query editor vuew",viewRoute:"/pipeline/model",isFirst:!0},{prompt:"Explore blockchain data tables available",promptId:6,actionType:5,View:"Open query editor vuew",viewRoute:"/pipeline/model",isFirst:!0},{prompt:"Write a slack api integration in python",promptId:6,actionType:5,View:"Open query editor vuew",viewRoute:"/pipeline/model",isFirst:!0},{prompt:"Show ethereum schema",promptId:1,actionType:1,View:"open ethereum data model view",viewRoute:"/pipeline/model?promptId=1&selectedChain=ethereum&view=data-sets",isFirst:!0},{prompt:"Show binance schema",promptId:2,actionType:1,View:"open bnb data model view",viewRoute:"/pipeline/model?promptId=2&selectedChain=binance&view=data-sets"},{prompt:"View avalanche schema",promptId:3,actionType:1,View:"open bnb data model view",viewRoute:"/pipeline/model?promptId=3&selectedChain=avalanche&view=data-sets"},{prompt:"Explore binance schema",promptId:4,actionType:1,View:"open bnb data model view",viewRoute:"/pipeline/model?promptId=4&selectedChain=binance&view=data-sets"},{prompt:"Explore Table Transaction from ethereum Schema",promptId:5,actionType:1,View:"open etherium data model view with transaction table and its connected table",viewRoute:"/pipeline/model?promptId=5&selectedChain=ethereum&table=TRANSACTION&view=data-sets"},{prompt:"Run a query",promptId:7,actionType:2,View:"Open query editor vuew",viewRoute:"/pipeline/model?promptId=6"},{prompt:"Explore a query",promptId:8,actionType:2,View:"Open query editor vuew",viewRoute:"/pipeline/model?promptId=8"},{prompt:"Create table",promptId:14,actionType:2,View:"Open query editor view with DDL",viewRoute:"/pipeline/model?promptId=14"},{prompt:"Show data model",promptId:9,actionType:2,View:"Open data model view",viewRoute:"/pipeline/model?promptId=9",isFirst:!0},{prompt:"View data model",promptId:10,actionType:2,View:"Open data model view",viewRoute:"/pipeline/model?promptId=10"},{prompt:"Explore data model",promptId:15,actionType:2,View:"Open data model view",viewRoute:"/pipeline/model?promptId=15"},{prompt:"Python Script 1",promptId:11,actionType:4,View:"Open python script 1",viewRoute:"/pipeline/model?actionId=2&promptId=8"},{prompt:"Python Script 2",promptId:12,actionType:4,View:"Open python script 2",viewRoute:"/pipeline/model?actionId=2&promptId=8"},{prompt:"Python Script 3",promptId:13,actionType:4,View:"Open python script 3",viewRoute:"/pipeline/model?actionId=2&promptId=8"},{prompt:"Write a python script",promptId:14,actionType:4,View:"Open python script",viewRoute:"/pipeline/model?promptId=14",isFirst:!0}],X=()=>{const a=N(),r=n.useRef(!0),[d,i]=n.useState([]),[u,c]=n.useState("");n.useEffect(()=>()=>{r.current=!1},[]);const w=t=>{let p=[];t?x==null||x.forEach(o=>{var m,h,T,f;((h=(m=o==null?void 0:o.prompt)==null?void 0:m.toLowerCase())!=null&&h.includes(t==null?void 0:t.toLowerCase())||(f=t==null?void 0:t.toLowerCase())!=null&&f.includes((T=o.prompt)==null?void 0:T.toLowerCase()))&&p.push({title:o.prompt,value:o.prompt,data:o})}):p=x.filter(o=>o.isFirst).map(o=>({title:o.prompt,value:o.prompt,data:o})),i([...p])},y=t=>{r.current&&(c(t),w(t))},R=t=>{var p,o,m,h;r.current&&c(t==null?void 0:t.value),(((p=t==null?void 0:t.data)==null?void 0:p.promptId)===14||((o=t==null?void 0:t.data)==null?void 0:o.promptId)===6)&&(((m=t==null?void 0:t.data)==null?void 0:m.promptId)===6&&V("Execute_Query",!1),a.push((h=t==null?void 0:t.data)==null?void 0:h.viewRoute))};return e.jsx(W,{options:d,handleChange:y,onSelectValue:R,value:u,onFocus:()=>{w(u)},onBlur:()=>{setTimeout(()=>{r.current&&i([])},300)}})},Y=E.div`
2
2
  margin-top: 50px;
3
3
  .commonTitleStyle {
4
4
  font-size: ${a=>a.theme.custom.heading.h2};
@@ -13450,7 +13450,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
13450
13450
  `,""),u=u.replace(";",""),{resourceId:u,command:i,commandType:l,schema:a}}let c="";if((p=(h=r[a])==null?void 0:h.tables)==null||p.forEach(({name:y})=>{n={...n,[y==null?void 0:y.toLowerCase()]:y}}),s==null||s.every(y=>{var E;return n[y]?(a=((E=r[a])==null?void 0:E.schema)||"PUBLIC",c=n[y],!1):!0}),!a||!c){const y=/from\s+(\S+)/i;try{const E=(v=e==null?void 0:e.toLowerCase())==null?void 0:v.match(y),T=E?(g=E[1])==null?void 0:g.split("."):[];if((T==null?void 0:T.length)===2){const[C,R]=T;a||(a=C),c||(c=R)}}catch{}}return a||(a="ETHEREUM",l="dql"),c||(c="BLOCKS",l="dql"),l||(l="dql"),u=`${a}.${c}`,u=u.replace('"',""),u=u.replace("'",""),u=(m=u.replace(`
13451
13451
  `,""))==null?void 0:m.toUpperCase(),u=u.replace(";",""),{resourceId:u,commandType:l,command:i}},iUr=e=>{switch(e){case"ethereum":return Pc.etherscan;case"polygon":return Pc.polygon;case"avalanche":return Pc.avalanche;case"binance":return Pc.binance;case"mumbai":return Pc.mumbai;case"sepolia":return Pc.sepolia;case"goerli":return Pc.goerli;case"holesky":return Pc.holesky;case"zksyncera":return Pc.zksyncera;default:return Pc.etherscan}},e4e=e=>e.replace(/\\r\\n/g," ").replace(/[\r]+/g," "),P1=e=>{if(!(e!=null&&e.length))return{fieldsMetadata:[],items:[],last:!0,queryId:1234};const{dataFrames:t,filteredDataFrames:r}=bRr(e),n=IRr(t),a=Object.keys(e[0]),i=[];return e==null||e.forEach(s=>{const l=[];a.forEach(u=>{l.push(s[u])}),i.push(l)}),{fieldsMetadata:a.map(s=>({fieldName:s,fieldTypeName:"java.lang.String",schemaName:"eth",typeName:"TRANSACTION"})),items:i,last:!0,queryId:1234,filteredDataFrames:r,dataframesObject:n,dataFrames:t}},oUr=(e="")=>{const t=localStorage.getItem("userId")||"abcd";return`https://api.dicebear.com/7.x/bottts/svg?seed=${e||t}`};function sUr(e){return new DOMParser().parseFromString(e,"text/html").documentElement.textContent}const lUr=(e,t)=>{const r=[...t];switch(e){case 1:return r.slice(0,2);case 2:return r.slice(0,1);default:return r.slice(0,3)}},uUr=e=>{var t;return e!=null&&e.length?(e==null?void 0:e.length)>1?[]:Lt.isEmpty((t=e[0])==null?void 0:t.schemaSubGroups)?j9.slice(0,1):j9:j9.slice(0,1)},cUr=e=>{const t=[];return e==null||e.forEach(r=>{t.push({color0:`rgba(${r[0]}, ${r[1]}, ${r[2]}, 0.5)`,color1:`rgba(${r[0]}, ${r[1]}, ${r[2]}, 1)`})}),t},_5r=(e,t)=>{const r=e[0]-t[0],n=e[1]-t[1],a=e[2]-t[2];return Math.sqrt(r**2+n**2+a**2)};function fUr(e,t){for(let n=0;n<(t==null?void 0:t.length);n+=1)if(_5r(e,t[n])<=100)return!0;return!1}const A5r=e=>e==null?void 0:e.replace(/rgba?\((\d+), (\d+), (\d+),? (\d*(?:\.\d+))?\)/,"rgb($1, $2, $3)"),X9=e=>{const t=e.toString(16);return t.length===1?`0${t}`:t},dUr=(e,t,r)=>`#${X9(e)}${X9(t)}${X9(r)}`,hUr=e=>/^(?=.*[a-zA-Z])(?=.*\d)(?=.*[\W_])?.{8,}$/.test(e),pUr=()=>{localStorage.setItem(ae.JOINCODE_VALUE,""),localStorage.setItem(ae.SUBSCRIPTION_TYPE,"")},vUr=()=>localStorage.getItem(ae.SUBSCRIPTION_TYPE),C5r=async e=>{if(!e)return"";try{const t=JSON.parse(e)||{},{biscuit:r={}}=t;if(Lt.isEmpty(r))return"";const{value:n=""}=r;return n}catch{return""}},gUr=()=>{const e=new Date,t=new Date;return t.setDate(e.getDate()+29),`${e.getDate()} ${e.toLocaleString("default",{month:"long"})} ${e.getFullYear()} - ${t.getDate()} ${t.toLocaleString("default",{month:"long"})} ${t.getFullYear()}`},mUr=(e="")=>(e==null?void 0:e.length)>10?`${e.slice(0,10)}...`:e,yUr=e=>!/^[a-z0-9-]+$/.test(e),EUr=e=>!/^[a-zA-Z0-9_]+$/.test(e),t4e=async e=>{const t=hi.stringify(e);try{const{data:r={},error:n=""}=await uo.createResource(t);if(n)return{code:"",publicKey:"",biscuit:"",error:n};const{code:a="",publicKey:i="",biscuit:o=""}=r||{};return{code:a,publicKey:i,biscuit:o}}catch(r){return{code:"",publicKey:"",biscuit:"",error:r}}},fy=e=>{var n;const{code:t,persist:r}=e;try{const a=hi.stringify({persist:r});t&&((n=uo.deleteResource(t,a))==null||n.then(()=>{r&&(_4e(),v6())}))}catch{}},R5r=({query:e="",publicKey:t,refreshInterval:r})=>{var c,f;const n=/\sAS\s/i,a=new RegExp(n,"i"),i=e.match(a);let o="",s="";if(i){const{index:d}=i;o=e.slice(0,d).trim(),s=d&&e.slice(d+i[0].length).trim()||""}const l=`public_key=${t}`,u=`refreshInterval=${r}`;if((c=o==null?void 0:o.toLowerCase())!=null&&c.includes("with")){o=(f=o==null?void 0:o.toLowerCase())==null?void 0:f.trim();const d=o.length,h=o[d-1];return o=o.substring(0,d-1),s=`${o},${l}${h} AS ${s}`,s}return r?`${o} WITH "${u},${l}" AS ${s}`:`${o} WITH "${l}" AS ${s}`},b5r=({query:e="",publicKey:t="",refreshInterval:r=0})=>{var c,f,d,h;if(!e||!t||(c=e==null?void 0:e.toLowerCase())!=null&&c.includes("public_key="))return e;if((f=e==null?void 0:e.toLowerCase())!=null&&f.includes("create view")||(d=e==null?void 0:e.toLowerCase())!=null&&d.includes("create materialized view")||(h=e==null?void 0:e.toLowerCase())!=null&&h.includes("create parameterized view"))return R5r({query:e,publicKey:t,refreshInterval:r});const n=e==null?void 0:e.replace(";",""),a=`public_key=${t}`,i=/\sWITH\s/i,o=new RegExp(i,"i"),s=n.match(o);let[l="",u=""]=n.split(o);if(s){l=l.trim(),u=u==null?void 0:u.replaceAll('"',"");const p=`"${u.trim()},${a}"`;return`${l} WITH ${p}`}return`${l} WITH "${a}"`},I5r=e=>!!F1(e||"",{path:[So.landingPage,So.newDashboard,So.updateDashboard,So.viewDashboard,So.publicDashboard,So.dashboards],exact:!0,strict:!1}),TUr=(e,t)=>{const r=ZNe(e,t,!1),n={};r==null||r.forEach(o=>{const s=Object.keys(o);s==null||s.forEach(l=>{n[l]||(n[l]=l.length*1.5*5+75);const u=String(o[l]).length*.9*5+100;(!n[l]||u>n[l])&&(n[l]=u)})});const a=Object.values(n);return a==null?void 0:a.map(o=>o<120?120:o>365?365:o)},SUr=e=>/^\d*\.?\d+$/.test(e),Bpe=e=>["string","number"].includes(typeof e)?e:e instanceof Array?e.map(Bpe).join(""):typeof e=="object"&&e?Bpe(e.props.children):"",O5r=({widgetDetails:e,dashboardWidgets:t,dashboardComponents:r})=>{const n={};r==null||r.forEach(({h:u,w:c,x:f,y:d})=>{const h=c+f-1;for(let p=d;p<=d+u;p+=1){n[p]||(n[p]=new Array(12).fill(!1));for(let v=0;v<12;v+=1)!n[p][v]&&v>=f&&v<=h&&(n[p][v]=!0)}}),t==null||t.forEach(({metadata:u})=>{const{h:c=0,x:f=0,w:d=0,y:h=0}=JSON.parse(u),p=d+f-1;for(let v=h;v<=h+c;v+=1){n[v]||(n[v]=new Array(12).fill(!1));for(let g=0;g<12;g+=1)!n[v][g]&&g>=f&&g<=p&&(n[v][g]=!0)}});let a=0,i=0,o=!1;const{minW:s,minH:l}=e;for(;!o;){let u=i;const c=i+s;let f=a;n[f]||(n[f]=new Array(12).fill(!1));const d=a+l;let h=!0;for(;f<d;){for(n[f]||(n[f]=new Array(12).fill(!1));u<c;)if(!n[f][u])u+=1;else{h=!1;break}if(!h){i+1+s<=12?i+=1:(a+=1,i=0);break}h&&(f+=1,u=i)}h&&f===d&&(o=!0)}return{startX:i,startY:a}},r4e=(e,t,r)=>{var u;const n=(t==null?void 0:t.length)||0,a=e!=null&&e.metadata?(u=JSON.parse(e.metadata))==null?void 0:u.components:[],i=a==null?void 0:a.length,{startX:o,startY:s}=O5r({widgetDetails:{minH:8,minW:4},dashboardWidgets:t,dashboardComponents:a}),l=r&&(r==null?void 0:r.metadata);return{i:i+n,w:4,h:8,x:o,y:s,minH:8,minW:4,maxH:12,maxW:12,...l}},N5r=()=>`Query ${cl().format("DD MMM YYYY [at] hh:mm:ss A")}`,_Ur=e=>{var t,r,n;return e?(t=e==null?void 0:e.toLowerCase())!=null&&t.includes("month")?"Monthly":(r=e==null?void 0:e.toLowerCase())!=null&&r.includes("year")?"Yearly":(n=e==null?void 0:e.toLowerCase())!=null&&n.includes("day")?"Daily":(e!=null&&e.includes("Usage Based"),"USAGE-BASED"):"USAGE-BASED"},AUr=(e=1)=>{var n,a;const t=cl(),r=t.subtract(e,"days");return{to:(n=cl(t))==null?void 0:n.toISOString(),from:(a=cl(r))==null?void 0:a.toISOString()}},CUr=e=>{const t=["th","st","nd","rd"],r=e%100;return e+(t[(r-20)%10]||t[r]||t[0])},RUr=e=>{var n,a;const{value:t="",format:r=""}=e;return!t||!r?t:r==="iso"?(n=cl(t))==null?void 0:n.toISOString():(a=cl(t))==null?void 0:a.format(r)},bUr=async(e,t,r,n,a,i,o,s,l,u)=>{var h;o&&f5r(n),EG(""),l5r(0);const f=(h=e.replace(/^\n+/,"").match(h5r))==null?void 0:h.input,d=f.trim();c5r(d),i?!l||t?await xpe(r,n,a,"","",s,l,u):l&&!t&&(u5r(),t5r(f.trim(),n),PN(f),EG("")):await xpe(r,n,a,"","",s,void 0,u)},n4e=e=>{const t={};return e==null||e.forEach(({resourceId:r,operation:n})=>{t[n==null?void 0:n.toLowerCase()]||(t[n==null?void 0:n.toLowerCase()]=[]),t[n==null?void 0:n.toLowerCase()].push(r)}),t},rT=(e,t)=>{const r=[];e==null||e.forEach(a=>{(t==null?void 0:t.every(o=>{var s;return(s=a==null?void 0:a.access)==null?void 0:s.some(l=>{var u;return((l==null?void 0:l.resourceId)===(o==null?void 0:o.resourceId)||(l==null?void 0:l.resourceId)==="*")&&((u=l==null?void 0:l.supportedOperations)==null?void 0:u.includes(o==null?void 0:o.operation))})}))&&r.push(a==null?void 0:a.biscuit)});const n=localStorage.getItem("selectedBiscuit")||"";if(n)try{const a=JSON.parse(n),{biscuit:i={}}=a,{value:o=""}=i;o&&r.push(o)}catch{}return r||[]},dO=e=>{const t=[],r=[];return e!=null&&e.length&&(e==null||e.forEach(n=>{n!=null&&n.id?r.push({tagId:n.id}):n!=null&&n.tagId?r.push({tagId:n.tagId}):t.push({value:(n==null?void 0:n.value)||"",metadata:(n==null?void 0:n.metadata)||""})})),{newTags:t,tagReferences:r}},l6=({resources:e,operation:t="SELECT"})=>e==null?void 0:e.map(r=>({resourceId:r,operation:t})),w5r=async({userId:e})=>{var r,n;if(!e)return{isUserExist:!1,gatewayUrl:""};const{data:t={}}=await gX.getIsUserExist(e);return{isUserExist:((r=t==null?void 0:t.code)==null?void 0:r.is_exist)||!1,gatewayUrl:((n=t==null?void 0:t.code)==null?void 0:n.gateway_url)||""}},a4e=async(e="")=>{var r,n;if(!e)return{isValid:!1,gatewayUrl:""};const{data:t={}}=await gX.validateJoinCode(e);return(r=t==null?void 0:t.code)!=null&&r.is_exist?{isValid:!0,gatewayUrl:((n=t==null?void 0:t.code)==null?void 0:n.gateway_url)||""}:{isValid:!1,gatewayUrl:""}},IUr=(e,t)=>!e||!t?"":` ${`${$pe(e,SB)} / ${$pe(t,SB)}`}`,OUr=({cost:e=0,multiplierValue:t=0,units:r=0})=>(r-e)*t,Fpe=e=>{try{return JSON.parse(e)}catch{return{}}},NUr=async({key:e})=>{var r,n;if(!e)return{isUserExist:!1,gatewayUrl:""};const{data:t={}}=await gX.getWalletAddressIsExist(e);return{isUserExist:((r=t==null?void 0:t.code)==null?void 0:r.is_exist)||!1,gatewayUrl:((n=t==null?void 0:t.code)==null?void 0:n.gateway_url)||""}},wUr=e=>/^\d*\.?\d*$/g.test(e),u6=({tables:e,blockchainsAndSchemas:t,schemaToBlockchainReference:r})=>{const n={};return e==null||e.forEach(a=>{var h;const{schema:i,table:o}=a,s={...a};let l="";t[i]?l="core":l=i,s.subGroup=l;const u=`${i}.${o}`;s.tableId=u;const c={},f=[];(h=a==null?void 0:a.columns)==null||h.forEach(p=>{const{column:v,relationships:g}=p,m={...p,table:o,tableId:u},y=`${u}.${v}`;m.columnId=y;const E=(g==null?void 0:g.map(({cardinality:T,column:C,schema:R,table:I})=>{const b=`${R}.${I}`,A=`${b}.${C}`;return c[`${y}.${A}`]={sourceColumn:y,tableId:b,table:I,targetColumn:A,cardinality:T==null?void 0:T.toLowerCase(),schema:R},{tableId:b,columnId:A,column:C,cardinality:T==null?void 0:T.toLowerCase(),schema:R,table:I}}))||[];m.relationships=E,f.push(m)}),s.columns=[...f],s.relations=[...Object.values(c)||[]];const d=r[i]||i;s.parentSchema=d,s.isBlockchain=!!r[i],n[u]=s}),n},LUr=e=>!!F1(e||"",{path:[So.sendData],exact:!0,strict:!1}),PUr=(e,t,r)=>{const n=r==="ASC"?1:-1;return e.sort((a,i)=>{const o=a[t],s=i[t];return o<s?-1*n:o>s?1*n:0})},L5r=e=>{if(!e)return e;const t=e.split(`
13452
13452
  `),r=[];return t==null||t.forEach((n="")=>{const[a]=n.split("--");r.push(a)}),r==null?void 0:r.join(`
13453
- `)},P5r=e=>!!F1(e||"",{path:[So.charts,So.vizard],exact:!0,strict:!1}),DUr=e=>!!F1(e||"",{path:[So.awsMarketplace,So.googleCloud,So.azureLogin],exact:!0,strict:!1}),D5r=(e,t)=>{const r=new RegExp(`^-?\\d+(?:.\\d{0,${t||-1}})?`);return e.toString().match(r)[0]},xUr=e=>{const t=new Date(e),r=t.getFullYear().toString().slice(2),n=(t.getMonth()+1).toString().padStart(2,"0"),a=t.getDate().toString().padStart(2,"0");return`${r}-${n}-${a}`};function MUr(e){const t=new Date(e),r=t.getFullYear().toString().slice(2),n=(t.getMonth()+1).toString().padStart(2,"0"),a=t.getDate().toString().padStart(2,"0"),i=t.getHours().toString().padStart(2,"0"),o=t.getMinutes().toString().padStart(2,"0"),s=t.getSeconds().toString().padStart(2,"0");return`${r}-${n}-${a} ${i}:${o}:${s}`}const{API_URL:hO}=og(),Gpe=["/dashboards","/queries","/view"];async function HS(e,t,r,n,a,i,o,s,l,u,c){var m,y,E,T,C;const f=t.includes("/pipelines/upload/script")||t.includes("/sandbox/create-pip-modules")||t.includes("/sandbox/upload-and-execute"),d=c||hO,h=f?{}:{Accept:"application/json","Content-Type":"application/json",biscuit:u||""};h!=null&&h.biscuit||delete h.biscuit;const p={method:e.toUpperCase(),credentials:"same-origin",headers:{...h}};if(a){const R=a;R.current=new AbortController,p.signal=(m=R==null?void 0:R.current)==null?void 0:m.signal}a&&l&&(a.current=new AbortController,p.signal=(y=a==null?void 0:a.current)==null?void 0:y.signal),r&&(t.includes("/pipelines/upload/script")||t.includes("/sandbox/create-pip-modules")||t.includes("/sandbox/upload-and-execute")?p.body=r:p.body=JSON.stringify(r));let v=d+t;d&&t.substring(0,1)!=="/"&&(v=`${d}/${t}`),i&&(v=hO+t),o&&(v=hO+t);let g;try{if(g=await fetch(v,p),t.includes("/smartContractCode")||t.includes("/smartContractJSCode")){const _=(E=g==null?void 0:g.body)==null?void 0:E.getReader();if(_){const L=await _.read();return _.cancel(),{data:new TextDecoder().decode(L==null?void 0:L.value),status:g.status}}return{data:await g.text(),status:g.status}}const R=await(g==null?void 0:g.text());let I="";try{I=R!=null&&R.length?JSON.parse(R):{}}catch{I=R!=null&&R.length?R:{}}if(g.ok)return{data:I,status:g.status};if(g.status===402&&(I==null?void 0:I.title)===ae.TRIAL_EXPIRED)return RNr(!0),{error:(I==null?void 0:I.title)||"Trial expired",status:g.status};const b=n?I:I.title||I.detail||I.message||((T=I[0])==null?void 0:T.message)||(I==null?void 0:I.error)||"";return Gpe.some(_=>t.includes(_))&&!t.includes("/view/materialized/last-refreshed")&&Wpe(v,e,g.status,I),{error:b,status:g.status,detail:I&&I.detail?I.detail:void 0,apiAlert:{title:I.title||"",type:I.type||"",detail:I.detail||""}}}catch(R){let I="";return(C=p==null?void 0:p.signal)!=null&&C.aborted?(n||o)&&(I=o?"Query Prompt Aborted":"Query Aborted"):I="Network error",Gpe.some(b=>t.includes(b))&&Wpe(v,e,0,{title:I,message:R.message}),{error:I,status:500}}}const x5r=async e=>{const r=await fetch(hO+e),n=await r.json();if(r.ok)return n;throw new Error("")},Ve={put(e,t){return HS("PUT",e,t)},delete(e){return HS("DELETE",e)},post(e,t,r,n,a,i,o,s,l){return HS("POST",e,t,r,n,!1,a,i,o,s,l)},get(e,t,r,n,a,i,o){return HS("GET",e,t,r,n,a,i)},patch(e,t,r){return HS("PATCH",e,t,r)},runQuery(e,t,r){return this.post(Te.executeSQL(),e,!0,t,!1,!1,r)},executeQuery(e,t,r){return this.post(Te.executeQueryById(t),e,!0,r)},getVisual(e,t){return this.get(Te.getVisual(e,t))},getQueryHistory({params:e,abortController:t,isRecent:r}){return this.get(r?Te.getRecentQueryHistory(e):Te.getHistoricalQueryHistory(e),null,!1,t)},getSavedQueries(e,t,r){return this.get(Te.getSavedQueries(e,t),null,!1,r)},getAllQueries({params:e,isLoggedIn:t=!1,abortController:r}){return this.get(Te.getAllQueries(e,t),null,!1,r)},getAllQueriesByPopular(e,t){return this.get(Te.getAllQueriesFilteredByPopular(e,t),null,!1)},getAllQueriesByMyLikes(e){return this.get(Te.getAllQueriesFilteredByMyLikes(e),null,!1)},async addLikeToQuery(e,t){return this.post(Te.addLikeToQuery(e,t),{})},async addDislikeToQuery(e,t){return this.post(Te.addDislikeToQuery(e,t),{})},async addLikeToDashboard(e,t){return this.post(Te.addLikeToDashboardId(e,t),{})},async addDislikeToDashboard(e,t){return this.post(Te.addDislikeToDashboardId(e,t),{})},async addLikeToVisual(e){return this.post(Te.addLikeToVisualId(e),{})},async addDislikeToVisual(e){return this.post(Te.addDislikeToVisualId(e),{})},async saveVisual(e){return this.post(Te.saveVisual(),e)},async saveDashboard(e){return this.post(Te.saveDashboard(),e)},async updateDashboard(e,t){return this.put(Te.updateDashboard(t),e)},async updateVisual(e,t){return this.put(Te.updateVisual(e),t)},getVisuals(e,t){return nd(Te.getVisuals(e,t),{dedupingInterval:6e3,revalidateOnFocus:!1,revalidateIfStale:!0})},getVisualsInfiniteScroll(e,t){return lRt(r=>{const n={...e,pageNo:r+1},a=hi.stringify({...mX(n)});return Te.getVisuals(a,t)},x5r,{dedupingInterval:6e3,revalidateOnFocus:!1,revalidateIfStale:!0})},useGetPopularTags(e,t){return nd(Te.getPopularTags(e,t),{dedupingInterval:6e3,revalidateOnFocus:!1})},async deleteVisual(e){return this.delete(Te.deleteVisual(e))},async publishVisual(e,t){return this.post(Te.publishVisual(e,t),{})},getQuery(e,t){return this.get(Te.getSavedQuery(e,t))},async createQuery(e){return await this.post(Te.createSavedQueries(),e)},async updateQuery(e,t){return await this.put(Te.updateSavedQueries(e),t)},async convertToMaterializedView(e,t){return this.post(Te.convertToMaterializedView(e),t)},deleteQuery(e){return Ve.delete(Te.deleteSavedQueries(e))},async publishQuery(e,t){return this.post(Te.publishQuery(e,t),{})},deleteQueryHistory(e){return Ve.delete(Te.deleteQueryHistory(e))},useGetAllDashboard(e,t){return nd(Te.getAllDashboards(e,t),{revalidateOnFocus:!1})},getDashboardById(e,t,r){return this.get(Te.getDashboardById(e,t,r))},useGetDashboardByPopular(e,t){return nd(Te.getDashboardByPopular(e,t),{revalidateOnFocus:!1})},getDashboardFilteredByMyLikes(e){return this.get(Te.getDashboardsFilteredByMyLikes(e))},useGetDashboardsFilteredByMyLikes(e){return nd(()=>e&&Te.getDashboardsFilteredByMyLikes(e),{revalidateOnFocus:!1})},getVisualsByPopular(e,t){return nd(Te.getVisualsByPopular(e,t),{revalidateOnFocus:!1})},getVisualsFilteredByMyLikes(e){return nd(()=>e&&Te.getVisualsFilteredByMyLikes(e),{revalidateOnFocus:!1})},useGetAllDashboardVisuals(e,t){return nd(Te.getDashboardVisualsContent(e,t),{revalidateOnFocus:!1})},getSchemas({isUserLoggedIn:e,scope:t="PUBLIC",sourceNetwork:r="",sxtOwned:n=""}){return Ve.get(Te.getSchemas({isUserLoggedIn:e,scope:t,sourceNetwork:r,sxtOwned:n}))},getRelationsData(e,t){return Ve.get(Te.getRelations(e,t))},getTags(e){return this.get(Te.getTags(e))},putDashboardVisuals(e,t){return this.put(Te.putDashboardVisuals(e),t)},async deleteDashboard(e){return this.delete(Te.deleteDashboard(e))},async publishDashboard(e,t){return this.post(Te.publishDashboard(e,t),{})},async getDashboardVisualsContent(e,t){return this.get(Te.getDashboardVisualsContent(e,t))},getInsightDashboard(e,t,r){return this.get(Te.getInsightDashboard(e,t,r),void 0,!1,{},!0)},getAllCommunities(){return this.get(Te.getAllCommunities(),void 0,!1,{},!0)},getAllStats(e,t){return this.get(Te.getAllStats(e,t),void 0,!1,{},!0)},getInsightNodes(e,t){return this.get(Te.getInsightNodes(e,t),void 0,!1,{},!0)},getSankeyChart(e,t){return this.get(Te.getSankeyChart(e,t),void 0,!1,{},!0)},getInsightInteractions(e,t){return this.get(Te.getInsightInteractions(e,t),void 0,!1,{},!0)},getNodeInformation(e,t,r,n){return this.get(Te.getNodeBalance(e,t,r),void 0,!1,n,!0)},getNodeInteractions(e,t,r,n){return this.get(Te.getNodeInteractions(e,t,r),void 0,!1,n,!0)},getTopTokens(e,t,r){return this.get(Te.getTopTokens(e,t,r),void 0,!1,{},!0)},getNodeDistribution(e,t,r){return this.get(Te.getNodeDistribution(e,t,r),void 0,!1,{},!0)},async createContainer(){return this.get(Te.createContainer,void 0,!1,{},!1,!1,!0)},async getAuthCode(e,t){return this.post(Te.getAuthCode(),e,!1,null,!1,!1,!1,"",t)},async getAuthCodeRegister(e,t){return this.post(Te.getAuthCodeRegister(),e,!1,null,!1,!1,!1,"",t)},async getAccessToken(e,t){return this.post(Te.getAuthToken(),e,!1,null,!1,!1,!1,"",t)},async getAccessTokenViaGoogle(e,t){return this.post(Te.getAuthTokenViaGoogle(),e,!1,null,!1,!1,!1,"",t)},async getTokenMetadata(){return this.get(Te.validateToken())},async logout(){return this.post(Te.logoutUser(),null)},async postGPT(e,t){return this.post(Te.getGPT(),e,!1,t,!0)},async uploadZipFile(e){return this.post(Te.uploadZipFile(),e,!1,null,!1,!0)},async deployPipeline(e){return this.post(Te.deployPipeline(e),e,!1,null,!1,!0)},async getUserDetail(e){return this.get(Te.getAndUpdateUserDetail(e))},async updateUserDetail(e,t){return await this.put(Te.getAndUpdateUserDetail(e),t)},async getStreamingLogs(e){return this.get(Te.getStreamingLogs(e),void 0,!1,{},!1,!1,!0)},async getSubscriptionPayConfig(){return this.get(Te.getSubscriptionPayConfig())},async getZkSubscriptionPayConfig(){return this.get(Te.getZkSubscriptionPayConfig())},async setZKSubscriptionPayConfig(e){return this.put(Te.setZKSubscriptionPayConfig(),e)},async submitZKPayment(){return this.post(Te.submitZKPayment,{})},async getSubscriptionDetails(){return this.get(Te.getSubscription())},async getSubscriptionUsers(){return this.get(Te.getSubscriptionUsers())},async removeUserSubscription(e){return this.post(Te.removeUserSubscription(e),{})},async setUserSubscriptionRole(e,t){return this.post(Te.setUserRole(e,t),{})},async inviteUser(e){return this.post(Te.inviteUser(e),{})},async joinSubscription(e){return this.post(Te.joinSubscription(e),{})},async forkQuery(e){return this.post(Te.forkQuery(e),{})},async getPaymentHistory(e){return this.get(Te.getPaymentHistory(e),null)},async getUserDataUsage(e){return this.get(Te.getUserDataUsage(e))},async getSubscriptionDataUsage(e){return this.get(Te.getSubscriptionDataUsage(e))},async getSubscriptionForACustomer(){return this.get(Te.getSubscriptionForACustomer())},executeSQL(e,t,r){return this.post(Te.executeSQL(),e,!0,t,!1,!1,r)},executePoS(e,t,r){return this.post(Te.executePoS(),e,!0,r,!1,!1,!1,t)},async getBalanceDetails(){return this.get(Te.getBalanceDetails())},async getOfferings(){return this.get(Te.getOfferings())},async getUsageConfig(){return this.get(Te.usageConfig())},async setUsageConfig(e){return this.put(Te.usageConfig(),e)},async addKey(e){return this.post(Te.keys(),e)},async getAuthCodeKey(e){return this.post(Te.authCodeKey(),e)},async checkCanUpdateUserId(){return this.get(Te.checkCanUpdateUserId())},async updateUserId(e){return this.post(Te.updateUserId(),e)},async getCurrentKeychains(){return this.get(Te.keys())},async getContractSchemas(e){return this.get(Te.getContractSchemas(e))},async getSubscriptionContractSchemas(e){return this.get(Te.getSubscriptionContractSchemas(e))},async getAggregateBlockchainMetadata(){return this.get(Te.getAggregateBlockchainMetadata())},async getViews(e,t){return this.get(Te.getViews(e,t))},async leaveSubscription(){return this.post(Te.leaveSubscription(),{})},async refreshMaterializedView(e){return this.post(Te.refreshMaterializedView(),e)},async getViewLastRefreshTime(e){return this.post(Te.getViewLastRefreshTime(),e)},async executeView(e){return this.post(Te.executeView(),e)},async getDefaultFreeQueries(){return this.get(Te.getDefaultFreeQueries(),null)},async getFreeQueriesQueryCount(){return this.get(Te.getFreeQueriesQueryCount(),null)},async forkDashboard(e){return this.post(Te.forkDashboard(e),{})},async forkVisual(e){return this.post(Te.forkVisual(e),{})},async getZKPayHistoricalBalances(){return this.get(Te.getZKPayHistoricalBalances(),null)},async getZKPayHistoricalPoints(){return this.get(Te.getZKPayHistoricalPoints())},async getZKPayCurrentPoints(){return this.get(Te.getZKPayCurrentPoints())},async getZkPayCumulativeDeposits(){return this.get(Te.getZkPayCumulativeDeposits())},async getZKPayTransactions(e=1,t=10){return this.get(Te.getZKPayTransactions(e,t))},async getZKPayZealyPoints(){return this.get(Te.getZKPayZealyPoints())},async getZKPayCurrentTokenBalance(){return this.get(Te.getZKPayCurrentTokenBalance())},async errorCorrection(e,t){return this.post(Te.getErrorCorrection(),e,!1,t,!0)},async verifyEmailToken(e){const t=`${Te.verifyEmailToken()}?emailToken=${encodeURIComponent(e)}`;return this.post(t,null)},async getEmail(){return this.get(Te.getEmail())},async saveEmail(e){return this.post(Te.saveEmail(),{email:e})},async resendVerificationEmail(){return this.post(Te.verifyResend(),null)},async forgotPassword(e){return this.post(Te.resetPasswordUnauthenticated(),e)},async resetPasswordWithToken(e,t){const r=Te.resetPasswordWithToken(),n={token:e,newPassword:t};return this.post(r,n)},async resetAuthenticatedPassword(){return this.post(Te.resetAuthenticatedPassword(),null)},async getSmartContractCode(e,t){return this.get(Te.getSmartContractCode(e,t),null)},async postSmartContractJSCode(e){return this.post(Te.postSmartContractJSCode(),e)}},$Ur={CRON_EXPRESSION_ERROR:"Please Enter Cron Expression",INVALID_CRON_EXPRESSION:"Please Enter a Valid Cron Expression",ENTER_CRON_EXPRESSION:"Please Enter a Cron Expression",CONNECTED_TO:e=>`Connected to ${e} network`,SOMETHING_WENT_WRONG:"Something went wrong! try again later",UNABLE_TO_CREATE_SUBSCRIPTION:"Unable to create subscription. Please try again later",DELETE:"Delete",FUND:"Fund",ADD_CONSUMER:"Add Consumer",ADD_FUND:"Add Fund",EDIT:"Edit",CANCEL:"Cancel",CANCEL_SUBSRIPTION:"Cancel Subscription",SUBSCRIPTION_ID:"SubscriptionId (unit64)",CONSUMER_ADDRESS:"Consumer (address)",WRITE:"Write",CREATE:"Create",CHAINLINK_SUBSCRIPTIONS_TITLE:"Chainlink Subscriptions",OWNER_ADDRESS:"Owner Address",BACK:"Back",TO_ADDRESS:"to (address)",SCHEDULE_JOB:"Schedule your job",EXAMPLE_OPTIONS:"Example options:",ORACLE_JOB_CREATED:"Oracle Job Created",FUND_ADDED:"Fund Added",ORACLE_JOB_PAUSED:"Oracle Job Paused",ORACLE_JOB_CANCELLED:"Oracle Job Cancelled",ORACLE_JOB_RESUME:"Oracle Job Resumed",ORACLE_JOB_UPDATED:"Oracle Job Updated",LINK:"Link",MY_SAVED_ORACLE_JOBS:"My Saved Oracle Jobs",REFRESH:"Refresh",POLYGON:"Polygon",ETHEREUM:"Ethereum",SEPOLIA:"Sepolia",MUMBAI:"Mumbai",PLEASE_ENTER_FUND_AMOUNT:"Please enter fund amount",PLEASE_ENTER_CONSUMER_ADDRESS:"Please enter consumer address",PLEASE_ENTER_VALID_CONSUMER_ADDRESS:"Please enter a valid consumer address",CRON_EXPRESSION_PLACEHOLDER:"*/15 * * * *",EVERY_15:"Every 15 minutes",EVERY_HOUR:"Every hour",EVERY_MONTH:"First of every month",EVERY_WEEKDAY:"30 minutes past every two hours on every weekday",MON_WED_FRI:"Monday, Wednesday, Friday at 8:00 and 16:00",EVERY_15_VALUE:"*/15 * * * *",EVERY_HOUR_VALUE:"0 * * * *",EVERY_MONTH_VALUE:"0 0 1 * *",EVERY_WEEKDAY_VALUE:"30 */2 * * 1-5",MON_WED_FRI_VALUE:"0 8,16 * * 1,3,5",WHAT_IS_CRON_EXPRESSION:"What is a CRON expression?",CRON_DESCRIPTION:"The CRON expression is a shorthand way to create a time schedule. Use the provided example buttons to experiment with different schedules and then create your own.",ACCORDING_TO_FORMAT:"Cron schedules are interpreted according to this format:",MINUTE:"minute (0 - 59)",HOUR:"hour (0 - 23)",DAY_OF_MONTH:"day of the month (1 - 31)",MONTHS:"month (1 - 12)",DAY_OF_WEEK:"day of the week (0 - 6) (Sunday to Saturday)",ALL_TIME:"All times are in UTC",RANGE_EXP:'- can be used for range e.g. "0 8-16 *"',INTERVAL_EXP:'/ can be used for interval e.g. "0 /2"',LIST_EXP:'can be used for list e.g. "0 17 0,2,4"',SPECIAL_LIMIT:"Special limitations:",NO_SPECIAL_CHAR:"no special characters: ? L W # lists can",MAX_LENGTH_WORDS:"have a max length of 26 no words",ENTER_FUND_AMOUNT_ERROR_MSG:"Please enter a fund amount",SELECT_NETWORK:"Select Network",SEPOLIA_FUND_PLACEHOLDER:"1.7",MUMBAI_FUND_PLACEHOLDER:"0.5",SHOW_MY_QUERIES:"Show My Queries",NEW_QUERY:"New Query",MY_QUERIES:"My Saved Queries",QUERY:"Query",RUN_VIEW_REQUEST:"runViewRequest",VIEW_NAME:"View Name",NFT_BALANCE:"NFT-balance",JOB_ID:"Job ID",RESOURCE_ID:"Resource ID",FUNCTION_NAME:"Function Name",RUN_QUERY_REQUEST:"runQueryRequest",BINANCE:"Binance",REMOVE_CONSUMER:"Remove Consumer",SELECT_CONSUMER_ADDRESS:"Select Consumer Address",VIEW:"view",QUERY_BODY:"query",PLEASE_CONFIRM_LINK_TRANSFER_TRANSACTION:"Please confirm LINK transfer transaction",PLEASE_WAIT_FOR_TRANSACTION_CONFIRMATION:"Please wait until the transfer is confirmed",VIEW_YOUR_TRANSACTION_HERE:"View your transaction here",CONFIRM_LINK_TRANSFER:"Confirm LINK transfer",WAITING_FOR_CONFIRMATION:"Waiting for Confirmation",SUBSCRIPTION_CREATED_SUCCESSFULLY:"Subscription Created Successfully",SUBSCRIPTION_DELETED_SUCCESSFULLY:"Subscription Deleted Successfully",FUND_ADDED_SUCCESSFULLY:"Fund Added Successfully",CONSUMER_ADDED_SUCCESSFULLY:"Consumer Added Successfully",CONSUMER_REMOVED_SUCCESSFULLY:"Consumer Removed Successfully",TRANSACTION_REJECTED:"Transaction Rejected",STATUS_CODE_400:400,STATUS_CODE_4001:4001,STATUS_CODE_4902:4902,STATUS_CODE_200:200,STATUS_CODE_201:201,STATUS_CODE_204:204,CONFIRM_CREATE_SUBSCRIPTION:"Confirm Create New Subscription",UPKEEP_ID:"The upkeep id",IS:"is",PLEASE_ENTER_VALID_AMOUNT:"Please enter valid amount",PLEASE_SELECT_CONSUMER_ADDRESS:"Please select consumer address",OPTIMIZE_GAS_HEADING:"Optimize Gas (Choose Datatype)",PIPE_ADDED__FOR_STRING_AND_BYTE:'a "|" (pipe) was added to your payload to ensure comma separation',PLEASE_SELECT_NETWORK:"Please select network",ADD_FUND_ORACLE_JOB_DESCRIPTION:"To ensure uninterrupted operation of your oracle jobs, please make sure to add LINK tokens",WALLET_NOT_WHITELISTED:"Wallet not Whitelisted",WALLET_NOT_WHITELISTED_SUBTITLE:"Your wallet is not whitelisted to use Chainlink functions subscription. ",WALLET_NOT_WHITELISTED_SUBTITLE_2:" to get the beta access of the Chainlink functions.",CHECK_WALLET_WHITELIST:"Check Wallet Whitelist",BETA_ACCESS_LINK:"Beta Access Link",BETA_ACCESS_URL:"https://chainlinkcommunity.typeform.com/requestaccess?typeform-source=chain.link",CHECK_WALLET_WHITELIST_SUBTITLE:"Please wait while we are checking if your wallet is whitelisted for chainlink functions subscription or not",OPTIMIZE_GAS_INFO_TEXT:"We only send the first row data to chain from the query results retrieved to keep the gas fee minimal.",QUERY_EDITOR_HEAD_TEXT:"Query result to send to your contract"},kUr={list:"list",editor:"editor"},UUr={MAX_STRING2D_BUFFER_SIZE:256,MAX_STRING_BUFFER_SIZE:256,MAX_UINT_VALUE:1157e74},BUr={SEPOLIA:"Sepolia",MUMBAI:"Mumbai",ETHEREUM:"Ethereum",POLYGON:"Polygon"},FUr={uint256:{key:"uint256",message:"Concatenate to Integer (Max Length: 32 bytes)",label:"Integer"},bytes:{key:"bytes",message:"Concatenate to Bytes (Max Length: 256 bytes)",label:"Bytes"},string:{key:"string",message:"Concatenate to String (Max Length: 256 bytes)",label:"String"}},M5r={loading:{},dashboardId:null,selectedDashboardDetails:null,dashboardDetail:null,queriesResult:{},layoutStateIndex:0,dashboardViewLoading:!1,layouts:[],layoutStates:[],savedLayouts:[],dragItem:null,breakPoint:"md",loadLayout:!1,infoView:!1,imgMetadata:{imgUrl:"",useImgColors:!1,chartColors:[],chartBackground:[],titleColor:""},queryError:"",isRunning:!1,durationMs:"",queryResult:"",toggleVisTable:wo.table,isOfficialDashboard:!1,isChatGPTLoading:!1,chatGPTResult:"",chatGPTError:"",saveSuggestedQuery:{queryText:"",resourceId:"",queryId:""},isWidgetConfigSet:!1,chatGptPrompt:"",isChartAddedToDash:[],isCounterAddedToDash:[],dashboardDetailLoading:!1,dashboardVisualsContent:[],dashboardAllVisualsLoading:!1,dashboardVisualLoading:!1,dashboardDetailError:void 0,dashboardDetailStatus:void 0,dashboardLoader:!1,dashDqlRunCount:0,chatGPTContext:"",widgetsDashLoader:!1,isErrOpen:!1,isEmptyRowCount:!1,isSetAsHome:{},slugName:"",isVisibilitySet:!1,slugNameError:"",isTableAddedToDash:!1,isUnsavedChangesDash:!1,visibility:"",isForkDashboard:!1},Dr=pv(()=>({...M5r}));function GUr(){return Dr(e=>e.dashboardViewLoading)}function HUr(){return Dr(e=>e.selectedDashboardDetails)}function VUr(){return Dr(e=>e.dashboardDetail)}function WUr(){return Dr(e=>{let t=e.layoutStates[e.layoutStateIndex]||[];return t=t.sort((r,n)=>r.i-n.i),t})}function YUr(){return Dr(e=>{let t=e.layoutStates[e.layoutStateIndex]||[];t=t.sort((n,a)=>n.i-a.i);const r=t.map(n=>{if(n){const{h:a,w:i,x:o,y:s,i:l,id:u,visualId:c,isResizable:f,type:d}=n;return{h:a,w:i,x:o,y:s,i:l,visualId:u,minH:n.type==="markdown"?2:EX(n),minW:4,maxH:TX(n),maxW:SX(n),isResizable:(f||!!u||!!c)&&d!=="header"}}return[]});return{[e.breakPoint]:r}})}function zUr(){return Dr(e=>e.dragItem)}function jUr(){return Dr(e=>e.layoutStates)}function XUr(){return Dr(e=>e.layoutStateIndex)}function KUr(){return Dr(e=>e.breakPoint)}function qUr(){return Dr(e=>e.infoView)}function ZUr(){return Dr(e=>e.isRunning)}function $5r(){return Dr(e=>e.imgMetadata||{})}function QUr(){return Dr(e=>e.toggleVisTable)}function JUr(){return Dr(e=>e.queryResult)}function eBr(){return Dr(e=>e.queryError)}function tBr(){return Dr(e=>e.isOfficialDashboard)}function rBr(){return Dr(e=>e.chatGPTResult||"")}function nBr(){return Dr(e=>e.chatGPTError||"")}function aBr(){return Dr(e=>e.isChatGPTLoading||!1)}function iBr(){return Dr(e=>e.isWidgetConfigSet||!1)}function oBr(){return Dr(e=>e.chatGptPrompt||"")}function sBr(){return Dr(e=>e.isChartAddedToDash||[])}function lBr(){return Dr(e=>e.isCounterAddedToDash||[])}function uBr(){return Dr(e=>e.dashboardLoader||!1)}function cBr(){return Dr(e=>e.widgetsDashLoader||!1)}function fBr(){return Dr(e=>e.dashboardDetailError||void 0)}function dBr(){return Dr(e=>e.dashboardDetailLoading||!1)}function hBr(){return Dr(e=>e.dashboardAllVisualsLoading||!1)}function pBr(){return Dr(e=>e.dashboardVisualLoading||!1)}function vBr(){return Dr(e=>e.dashboardDetailStatus||void 0)}function gBr(){return Dr(e=>e.dashDqlRunCount||0)}function mBr(){return Dr(e=>e.isErrOpen)}function yBr(){return Dr(e=>e.isEmptyRowCount||!1)}function EBr(){return Dr(e=>e.isSetAsHome)}function TBr(){return Dr(e=>e.slugName)}function SBr(){return Dr(e=>e.isVisibilitySet)}function _Br(){return Dr(e=>e.slugNameError)}function ABr(){return Dr(e=>e.isTableAddedToDash)}function CBr(){return Dr(e=>e.isUnsavedChangesDash)}function RBr(){return Dr(e=>e.visibility)}function bBr(){return Dr(e=>e.isForkDashboard)}const{getState:Hpe}=ar,k5r=e=>{const{graphType:t,...r}=e;return{chartType:t||"",...r}},U5r=e=>{const{graphType:t="",counterValue:r=0,columnName:n="",metric:a="",prefix:i="",suffix:o="",label:s="",title:l="",decimal:u=""}=e;return{chartType:t,counterValue:r,columnName:n,metric:a,prefix:i,suffix:o,label:s,title:l,decimal:u}},i4e=e=>{var v,g,m,y,E,T;const{graphType:t,graphMeta:r}=e,{axis:n,dateFormat:a,legendEnabled:i,sliderEnabled:o,metricEnabled:s}=r||{},{x:l,y:u,seriesField:c,...f}=n||{};if(t===wo.table)return k5r(e);if(t===wo.counter)return U5r(e);const d={},h={title:(((v=u==null?void 0:u.labelName)==null?void 0:v.value)??"").toUpperCase()||(((g=u==null?void 0:u.columnName)==null?void 0:g.value)??"").toUpperCase()},p={title:(((m=l==null?void 0:l.labelName)==null?void 0:m.value)??"").toUpperCase()||(((y=l==null?void 0:l.columnName)==null?void 0:y.value)??"").toUpperCase()};return a&&(p.dateFormat=a),l!=null&&l.tickLayout&&(p.tickLayout=l.tickLayout),l!=null&&l.spacing&&(p.spacing=l.spacing),l!=null&&l.unformatted&&(p.unformatted=l.unformatted),u!=null&&u.spacing&&(h.spacing=u.spacing),u!=null&&u.unformatted&&(h.unformatted=u.unformatted),u!=null&&u.position&&(h.position=u.position),u!=null&&u.metric&&(h.metric=u.metric),Object.keys(f).forEach((C,R)=>{var I,b;d[`y${R+1}Field`]={value:f[C].columnName||"",chartType:f[C].graphType||"",yAxisIndex:f[C].yAxisIndex},h[`y${R+1}Title`]=((I=f[C])==null?void 0:I.labelName)||((b=f[C])==null?void 0:b.columnName)}),{chartType:t||"",fields:{xField:(((E=l==null?void 0:l.columnName)==null?void 0:E.value)??"").toUpperCase()||"",yField:(((T=u==null?void 0:u.columnName)==null?void 0:T.value)??"").toUpperCase()||"",seriesField:(c==null?void 0:c.columnName)||null,...d,xAxisData:{...p},yAxisData:{...h},legendEnabled:i||"",sliderEnabled:o||"",metricEnabled:s||""}}},{getState:nT,setState:gr}=na,IBr=(e,t,r)=>{let n="";const{chartFields:a}=nT();t==="xField"||t==="yField"?n="title":t==="y1Field"&&(n="y1Title"),gr({chartFields:{...a,...xRr(a,e,n,(r==null?void 0:r.toString())||""),[t]:r}})},OBr=(e,t,r)=>{const{chartType:n}=r,{xField:a,yField:i,axisLabels:o,...s}=r.fields||{},l=r.fields||{},u=Lt.keys(s),c=[];u.forEach(f=>{const d={fieldId:f,inputType:"field-dropdown",label:f.replaceAll("Field","-axis"),required:!1};c.push(d)}),n===wo.counter?gr({visualId:e,queryId:t,chartType:n,counterFields:r}):n===wo.table?gr({visualId:e,queryId:t,chartType:n,tableFields:r}):gr({visualId:e,queryId:t,chartType:n,extraChartSeries:c,chartFields:l})},NBr=e=>{gr({selectedChartDetails:e})},wBr=e=>{gr({chartType:e})},LBr=e=>{gr({chartFields:e})},PBr=e=>{gr({tableFields:e})},DBr=e=>{gr({counterFields:e})},o4e=e=>{const{chart:t,type:r,metadata:n}=e,{chartType:a,fields:i}=t||e,{xField:o,yField:s,xAxisData:l,yAxisData:u,seriesField:c,legendEnabled:f,sliderEnabled:d,metricEnabled:h,...p}=i||{},v={};if(r===to.TABLE)return{...n,graphType:"table"};if(r===to.COUNTERCARD)return{...n,graphType:"counter"};Object.keys(p).forEach((m,y)=>{v[`y${y+1}`]={axisType:"",columnName:p[m].value||"",graphType:p[m].chartType||"",yAxisIndex:p[m].yAxisIndex,labelName:u&&y===0?u==null?void 0:u.y1Title:""}});const g=c&&{seriesField:{columnName:c}};return{graphType:a||"",graphMeta:{axis:{x:{axisType:"",columnName:o||"",labelName:l&&(l==null?void 0:l.title)||o||"",spacing:l&&(l==null?void 0:l.spacing),tickLayout:l&&(l==null?void 0:l.tickLayout),unformatted:l&&(l==null?void 0:l.unformatted)},y:{axisType:"",columnName:s||"",labelName:u&&(u==null?void 0:u.title)||s||"",spacing:u&&(u==null?void 0:u.spacing),position:u&&(u==null?void 0:u.position),metric:u&&(u==null?void 0:u.metric),unformatted:u&&(u==null?void 0:u.unformatted)},...v,...g},dateFormat:l&&(l==null?void 0:l.dateFormat)||"",numberFormat:"",legendEnabled:f||"",sliderEnabled:d||"",metricEnabled:h||"",showDataLabels:!1}}},SG=e=>{if(e&&(e!=null&&e.metadata)){let{metadata:t}=e;t=t?JSON.parse(t):{},t=i4e(t);const r={...e,metadata:t};gr({selectedChartDetails:r})}},xBr=async(e,t,r="false",n)=>{var C;const a=JE(),{queryResult:i,isMaterializedViewChecked:o,savedQueryIdDetails:s}=nT(),{chartName:l,chartTags:u,chartDescription:c,type:f,queryName:d,viewName:h,refreshInterval:p}=t,v=o4e(t),g=localStorage.getItem("userId")||"",{data:m={}}=s,{slug:y,queryText:E}=m;let{id:T=""}=m;if((C=Object.keys(s==null?void 0:s.data))!=null&&C.length){let{metadata:R}=s.data;const{scope:I,userId:b="",apiAlert:A}=s.data;if((R===void 0||typeof R=="object"&&R!==null&&Object.keys(R).length===0)&&(R=JSON.stringify({sourceNetwork:n})),!T||r==="true"){const _={metadata:R||"",...dO(u),description:c||"",name:d||"Untitled Query",scope:I,queryText:E,visibility:Oa.private},{data:N,error:L}=await Ve.createQuery(_);if(L)throw Je(L||"",A),L;T=N==null?void 0:N.id}else if(b!==g){const{data:_,error:N}=await Ve.forkQuery(y);if(N)throw Je(N||"",A),N;_!=null&&_.id&&(T=(_==null?void 0:_.id)||"")}}if(o&&T){const R=await d5r(h,T,p),{data:I,error:b}=R||{};if(I){const{data:A}=await Ve.getQuery(T,!0);await AX(A||{});const _={queryId:T,name:l,visualType:f,...dO(u),description:c||"",metadata:JSON.stringify(v)};let N=null;if(e?(_.id=e,N=await Ve.updateVisual(e,_)):N=await Ve.saveVisual(_),gr({chartState:y0.loading}),N!=null&&N.data){yG(),e?(Wn.visualizationUpdated({vizId:e,vizName:(_==null?void 0:_.name)||"",vizType:(_==null?void 0:_.visualType)||"",timestamp:Date.now()}),setTimeout(()=>{fr(ae.WIDGET_UPDATED_SUCCESS(ec[f]))},300)):(Wn.visualizationCreated({vizId:N==null?void 0:N.data,vizName:(_==null?void 0:_.name)||"",vizType:(_==null?void 0:_.visualType)||"",timestamp:Date.now()}),setTimeout(()=>{fr(ae.WIDGET_SAVED_SUCCESS(ec[f]))},300));const{data:L}=N;L&&SG(L),Ya(T,{data:i.items,columns:i.fieldsMetadata,warning:!1,error:!1,message:!1,filteredDataFrames:i.filteredDataFrames,dataframesObject:i.dataframesObject,dataFrames:i.dataFrame}),gr({chartState:y0.saved});const x=h2[f]||h2.GRAPH;a==null||a.push(`${So.charts}?activeTab=${x}&visualType=${f}&widgetTypeEnum=${f}`)}else N!=null&&N.error&&(Je(N==null?void 0:N.error),gr({chartState:y0.error}))}b&&Je(b||"Something went wrong")}else{const R={queryId:T,name:l,visualType:f,...dO(u),description:c||"",metadata:JSON.stringify(v)};let I=null;if(e?(R.id=e,I=await Ve.updateVisual(e,R)):I=await Ve.saveVisual(R),gr({chartState:y0.loading}),I!=null&&I.data){yG(),e?(Wn.visualizationUpdated({vizId:e,vizName:(R==null?void 0:R.name)||"",vizType:(R==null?void 0:R.visualType)||"",timestamp:Date.now()}),setTimeout(()=>{fr(ae.WIDGET_UPDATED_SUCCESS(ec[f]))},300)):(Wn.visualizationCreated({vizId:I==null?void 0:I.data,vizName:(R==null?void 0:R.name)||"",vizType:(R==null?void 0:R.visualType)||"",timestamp:Date.now()}),setTimeout(()=>{fr(ae.WIDGET_SAVED_SUCCESS(ec[f]))},300));const{data:b}=I;b&&SG(b),Ya(T,{data:i.items,columns:i.fieldsMetadata,warning:!1,error:!1,message:!1,filteredDataFrames:i.filteredDataFrames,dataframesObject:i.dataframesObject,dataFrames:i.dataFrame}),gr({chartState:y0.saved});const A=h2[f]||h2.GRAPH;a==null||a.push(`${So.charts}?activeTab=${A}&visualType=${f}&widgetTypeEnum=${f}`)}else I!=null&&I.error&&(Je(I==null?void 0:I.error),gr({chartState:y0.error}))}},MBr=async(e,t,r,n)=>{const{selectedChartDetails:a}=nT();try{gr({confirmDialogLoading:!0});const{status:i,error:o}=await Ve.deleteVisual(e);i===204?(Wn.visualizationDeleted({vizId:e,vizName:n||"",vizType:t||"",timestamp:Date.now()}),fr(ae.WIDGET_DELETED_SUCCESS(ec[t])),(a==null?void 0:a.id)===e&&gr({selectedChartDetails:null}),r()):Je(o||"")}catch(i){Je((i==null?void 0:i.message)||"")}finally{gr({confirmDialogLoading:!1})}},B5r=e=>e===Oa.subscription?fz.myOrgVisuals:(e===Oa.private,"GRAPH"),$Br=async(e,t,r)=>{try{gr({confirmDialogLoading:!0});const{selectedChartDetails:n,userSetVisibility:a}=nT(),i=JE(),o=()=>a===Oa.public?{slug:r,visibility:a}:{visibility:a},s=hi.stringify(o()),{status:l,error:u}=await Ve.publishVisual(e,s);if(l===204)Wn.visualizationPublished({vizId:e,vizName:(n==null?void 0:n.name)||"",vizType:t||"",slug:r,timestamp:Date.now()}),fr(ae.WIDGET_PUBLISH_SUCCESS(ec[t])),gr({selectedChartDetails:{...n,visibility:a},confirmDialogLoading:!1}),i==null||i.push(gf.charts(B5r(a)));else return u&&Je(u),ae.RESPONSE_ERROR_STATUS;return ae.RESPONSE_SUCCESS_STATUS}catch(n){return Je(n==null?void 0:n.message),ae.RESPONSE_ERROR_STATUS}finally{gr({confirmDialogLoading:!1})}},kBr=async(e,t)=>{try{const{data:r,status:n,error:a}=await Ve.getVisual(e,t)||{};Lt.isEmpty(r)?gr({selectedChartDetailsError:ae.RECORD_NOT_FOUND,chartDetailStatus:n}):(SG(r),gr({selectedChartDetailsError:void 0})),a&&gr({selectedChartDetailsError:a,chartDetailStatus:n})}catch{}},UBr=(e,t,r,n)=>{const{chartFields:a}=nT(),i={...a[e]};n&&(i.chartType=n==null?void 0:n.replace("_chart","")),i[t]=r,gr({chartFields:{...a,[e]:{...i}}})},BBr=()=>{gr({visualId:"",queryId:"",chartType:"",counterFields:{},queryResult:{},extraChartSeries:[],chartFields:{},savedQueryIdDetails:{}})},FBr=e=>{gr({extraChartSeries:[...e]})},GBr=async(e,t)=>{var f,d,h,p;const{queriesResult:r}=Hpe(),{queryId:n,referencedResources:a,authorizationResources:i,requiresAuthorization:o}=t;if((d=(f=r[n])==null?void 0:f.data)!=null&&d.length)return gr({queryResult:{...r[n],items:r[n].data,fieldsMetadata:r[n].columns||[]}}),null;gr({queryRunning:!0});let s={data:null};const{biscuitList:l}=Hpe(),u=rT(l,l6({resources:o?i:a}));try{s=await Ve.executeQuery({queryId:n,biscuits:u},((h=r[n])==null?void 0:h.visibility)===Oa.public?!1:e)}catch{}const c=((p=s==null?void 0:s.data)==null?void 0:p.error)||(s==null?void 0:s.error);if(c)return gr({queryError:c==null?void 0:c.title,queryRunning:!1,loading:!1,chartLoading:!1});if(s.data){const v=P1(s==null?void 0:s.data);gr({queryResult:v,queryRunning:!1,loading:!1,chartLoading:!1}),Ya(n,{data:v.items,columns:v.fieldsMetadata,warning:!1,error:!1,message:!1,filteredDataFrames:v.filteredDataFrames,dataframesObject:v.dataframesObject,dataFrames:v.dataFrame})}return!1},HBr=()=>{gr({queryResult:[],columns:[],loading:!0})},VBr=e=>{gr({loading:e})},WBr=()=>{gr({...zNe})},YBr=async(e,t,r)=>{try{const{data:n}=await Ve.getQuery(e,t);if(gr(n?{savedQueryIdDetails:{data:n},queryId:e}:{savedQueryIdDetails:{error:ae.RECORD_NOT_FOUND}}),r)return(n==null?void 0:n.name)||""}catch(n){if(gr({savedQueryIdDetails:{error:n}}),r)return""}return""},zBr=async(e,t,r,n,a)=>{const{data:i}=await Ve.getDashboardById(e==null?void 0:e.id,r),{data:o}=await Ve.getDashboardVisualsContent(e==null?void 0:e.id,r),s=i&&JSON.stringify(r4e(i,o||[],n)),l=o==null?void 0:o.map(f=>({visualId:f.id,metadata:f.dashboardVisualMetadata})),u=Lt.map(o,f=>f.id);if(!!t&&u.includes(t))return Je(ae.WIDGET_ALREADY_PRESENT);try{const{data:f,error:d="",apiAlert:h}=await Ve.putDashboardVisuals(e==null?void 0:e.id,[{visualId:t,metadata:s},...l]);return f?(fr(ae.WIDGET_PINNED_TO_DASHBOARD),A1e(()=>Ve.getDashboardVisualsContent(e==null?void 0:e.id,r)),a(!0),!1):Je(d,h)}catch(f){let d="Unknown Error";return f instanceof Error&&(d=f.message),Je(d)}},jBr=e=>{gr({queryResult:e})},XBr=e=>{const{viewModal:t}=nT();if(typeof e=="function"){const r=e(t);gr({viewModal:r})}else gr({viewModal:{...t,...e}})},KBr=e=>{gr({isCounterDecimal:e})},qBr=e=>{gr({userSetVisibility:e})},ZBr=e=>{gr({isMaterializedViewChecked:e})},QBr=e=>{gr({isAutoRefreshedVisual:e})},JBr=async e=>{try{const{status:t,error:r}=await Ve.forkVisual(e);if(t===201)return fr(ae.VISUAL_CLONE_SUCCESS),ae.RESPONSE_SUCCESS_STATUS;if(r)return Je(r),ae.RESPONSE_ERROR_STATUS}catch(t){Je((t==null?void 0:t.message)||"")}return""},eFr=e=>{gr({isFork:e})},{getState:Da,setState:St}=Dr,yX=e=>{St({layouts:e})},gA=na.setState,F5r=async(e,t,r,n,a)=>{const{loadLayout:i}=Da(),o=t[n-1]||[];(QNe(r,t[n]||[]).filter(l=>{var u,c,f,d,h;return((u=l.x)==null?void 0:u.toString())||((c=l.y)==null?void 0:c.toString())||((f=l.i)==null?void 0:f.toString())||((d=l.h)==null?void 0:d.toString())||((h=l.w)==null?void 0:h.toString())||l.name}).length>0||a)&&(i&&!a&&(e.pop(),await St({loadLayout:!1})),o.length>0&&o.length>r.length&&!a&&(e.pop(),await St({layoutStates:e})),e.push(r),await St({layoutStates:e,layoutStateIndex:e.length-1}))},D1=(e,t=!1)=>{if(!(e!=null&&e.length)){St({layoutStates:[],layoutStateIndex:0});return}const{layoutStates:r,layoutStateIndex:n}=Da();let a=[];const i=e.sort((o,s)=>Number(o.i)-Number(s.i));a=r.slice(0,n+1),F5r(a,r,i,n,t)},G5r=e=>{St({layoutStates:[e],layoutStateIndex:0})},tFr=async()=>{const{layoutStateIndex:e}=Da();await St({layoutStateIndex:Math.max(0,Number(e)-1)})},rFr=async()=>{const{layoutStates:e,layoutStateIndex:t}=Da();await St({layoutStateIndex:Math.min(e.length,t+1)})},s4e=e=>{St({isSetAsHome:{...e}})},H5r=async(e,t,r,n)=>{const a=JE(),{settings:i,userName:o,displayName:s,emailAddress:l,bio:u}=r,f={...i?JSON.parse(i):{},dashboardHomeId:t},d=JSON.stringify(f),h={userId:e,userName:o||null,displayName:s||null,emailAddress:l||null,bio:u,settings:d};try{await S4e(e,h)===ae.RESPONSE_SUCCESS_STATUS&&(fr(n),G5r([]),await CNr(e),t&&(s4e({[t]:!0}),a==null||a.push({pathname:So.landingPage,state:{id:t}})))}catch(p){Je(p==null?void 0:p.message)}},nFr=async(e,t,r)=>{const n=localStorage.getItem("userId")||"",{settings:a}=r||{},i=a?JSON.parse(a):{},{dashboardHomeId:o=""}=i;try{gA({confirmDialogLoading:!0});const{status:s,error:l,apiAlert:u}=await Ve.deleteDashboard(e);o&&o===e&&await H5r(n,"",r,ae.DASHBOARD_UNSET_AS_HOME_SUCCESS),s===204?(Wn.dashboardDeleted({dashId:e,timestamp:Date.now()}),fr(ae.DASHBOARD_DELETED_SUCCESS),t&&t()):Je(l||"",u)}catch(s){Je((s==null?void 0:s.message)||"")}finally{gA({confirmDialogLoading:!1})}},l4e=()=>{const{visibility:e,dashboardDetail:t}=Da();if(e)switch(e){case Oa.public:return ad.exploreDashboard;case Oa.subscription:return ad.myOrgDashboard;case Oa.private:return ad.myDashboard;default:return ad.myDashboard}else switch(t==null?void 0:t.visibility){case Oa.public:return ad.exploreDashboard;case Oa.subscription:return ad.myOrgDashboard;case Oa.private:return ad.myDashboard;default:return ad.myDashboard}},V5r=async(e,t)=>{try{const{selectedDashboardDetails:r}=Da(),{slug:n}=t,a=hi.stringify(t),i=JE(),{status:o,error:s,apiAlert:l}=await Ve.publishDashboard(e,a);if(o===204)fr(ae.DASHBOARD_PUBLISH_SUCCESS),St({selectedDashboardDetails:{...r,visibility:(t==null?void 0:t.visibility)||"",slug:n||null}}),i==null||i.push(`${gf.dashboards(l4e())}`),Wn.dashboardPublished({dashId:e,dashName:r==null?void 0:r.name,slug:n||null,timestamp:Date.now()});else return Je(s||ae.SLUG_NAME_ERROR("Slug"),l),!1;return!0}catch(r){return Je(r==null?void 0:r.message),!1}},aFr=e=>{var t;St({selectedDashboardDetails:e,imgMetadata:((t=e==null?void 0:e.metadata)==null?void 0:t.customImg)||{}})},iFr=e=>{St({dashboardDetail:e})},W5r=e=>{const t=o=>({markdown:8,row:5})[o]||1,r=o=>({markdown:4})[o]||12,n=o=>({markdown:12,row:5})[o]||1,a=o=>({markdown:12})[o]||12;return{...e,w:r(e.type),h:t(e.type),x:e.x||0,y:e.y||0,minH:1,minW:3,maxH:n(e.type),maxW:a(e.type),isResizable:e.type==="markdown"}},u4e=e=>e.metadata.chartType===ec.COUNTERCARD.toLowerCase()?6:8,EX=e=>e.metadata.chartType===ec.COUNTERCARD.toLowerCase()?6:(e==null?void 0:e.type)==="divider"?1:8,c4e=e=>e.metadata.chartType===ec.COUNTERCARD.toLowerCase()?5:6,TX=e=>e.metadata.chartType==="counter"?8:(e==null?void 0:e.type)==="divider"?1:12,SX=e=>e.metadata.chartType==="counter"?7:12,oFr=e=>{D1([{...e,w:c4e(e),h:u4e(e),x:e.x||0,y:e.y||0,minH:EX(e),minW:4,maxH:TX(e),maxW:SX(e)}])},sFr=(e,t,r)=>{const{layoutStateIndex:n,layoutStates:a}=Da(),i=a[n]||[],o=i==null?void 0:i.map(s=>({...s,x:t[s.i].x,y:t[s.i].y}));r?Lt.isEmpty(Lt.filter(i,s=>s.visualId===e.visualId))&&D1([...o,{...e,w:c4e(e),h:u4e(e),x:e.x||0,y:e.y||0,minH:EX(e),minW:4,maxH:TX(e),maxW:SX(e)}]):D1([...o,W5r(e)])},lFr=e=>{const{layoutStates:t,layoutStateIndex:r}=Da(),n=[...t[r]];Lt.remove(n,i=>i.i.toString()===(e==null?void 0:e.toString()));const a=n.map((i,o)=>({...i,i:o.toString()}));D1([...a],!0)},uFr=()=>{yX([]),St({layoutStates:[],layoutStateIndex:0})},Y5r=async e=>{const{dashboardVisualMetadata:t,...r}=e;if(e){const n=e.metadata&&Fpe(e.metadata),a={...r,metadata:i4e(n)};return{...t&&Fpe(t),...a,type:"visual"}}return{}},_X=async e=>{const t=[];St({dashboardVisualLoading:!0});for(let n=0;n<e.length;n+=1){const a=e&&Y5r(e[n]);t.push(a)}const r=await Promise.all(t);return r&&St({dashboardVisualLoading:!1}),r},f4e=e=>{St({dashboardVisualsContent:e})},cFr=async(e,t,r,n)=>{var a;try{St({dashboardViewLoading:!0,dashboardDetailLoading:!0,dashboardAllVisualsLoading:!0,dashboardDetailError:void 0});const{data:i,error:o,status:s}=await Ve.getDashboardById(e,t,r);if(Lt.isEmpty(i)||St({dashboardDetail:null,dashboardDetailError:ae.RECORD_NOT_FOUND,dashboardDetailStatus:s}),i){if(i.visibility==="public"&&t===!0){const u=await Ve.getDashboardFilteredByMyLikes(t);u!==void 0&&u.data&&Array.isArray(u.data)&&(i.liked=u.data.indexOf(i==null?void 0:i.id)>-1)}const l=(i==null?void 0:i.metadata)&&JSON.parse(i.metadata)||[];if(St({dashboardDetail:i,dashboardDetailLoading:!1,imgMetadata:(l==null?void 0:l.customImg)||{}}),i){const{data:u}=await Ve.getDashboardVisualsContent(i==null?void 0:i.id,t);f4e(u||[]);let f=[...(u==null?void 0:u.length)&&await _X(u||[])||[]];(a=l==null?void 0:l.components)!=null&&a.length&&f.push(...l.components),f=Lt.reject(f,d=>Lt.isEmpty(d)),f=f.map((d,h)=>(d.i=h.toString(),d)),f=f==null?void 0:f.sort((d,h)=>d.i-h.i),yX([...f]),D1([...f]),St({loadLayout:!0,savedLayouts:[...f],dashboardViewLoading:!1,dashboardAllVisualsLoading:!1,dashboardDetailError:void 0})}St({dashboardViewLoading:!1,dashboardDetailLoading:!1,dashboardAllVisualsLoading:!1})}o&&(St({dashboardViewLoading:!1,dashboardDetailLoading:!1,dashboardDetailError:o,dashboardDetailStatus:s}),n&&n()),s===404&&n&&n()}catch{}finally{St({dashboardViewLoading:!1,dashboardDetailLoading:!1})}return null};async function z5r(e){St({chatGPTResult:e})}const fFr=e=>{St({dashDqlRunCount:e})};async function j5r(e,t,r,n){var i,o,s;const a={prompt:e,metadata:{context:r,error:n}};St({isChatGPTLoading:!0,chatGptPrompt:e});try{const l=await Ve.postGPT(a,t);(l==null?void 0:l.error)===ae.QUERY_PROMPT_ABORT&&Je(ae.QUERY_PROMPT_ABORT),l!=null&&l.data&&St({isChatGPTLoading:!1,chatGPTResult:(i=l==null?void 0:l.data)==null?void 0:i.SQL,chatGPTContext:(s=(o=l==null?void 0:l.data)==null?void 0:o.metadata)==null?void 0:s.context,chatGPTError:""}),l!=null&&l.error&&(l==null?void 0:l.error)!==ae.QUERY_PROMPT_ABORT&&St({chatGPTError:l==null?void 0:l.error})}catch(l){console.error(l)}finally{St({isChatGPTLoading:!1})}}function dFr(){const{isErrOpen:e}=Da();St({isErrOpen:!e})}function X5r(e){St({isErrOpen:e})}const hFr=async(e,t,r,n,a,i,o)=>{var h,p,v,g,m;e=e4e(e),n||St({isRunning:!0});const{dashDqlRunCount:s,chatGPTResult:l,chatGPTContext:u}=Da(),{resourceId:c="ETH:BLOCK"}=t?JNe(e,t):{};let f={data:null};const d=new Date;try{const y={sqlText:e.trimEnd(),validate:!0,...o};f=await Ve.executeSQL(y,r,n);const{data:E,error:T,status:C}=f,R=(E==null?void 0:E.error)||T;if(E&&C===200){(E==null?void 0:E.length)===0&&St({isEmptyRowCount:!0});const I=f==null?void 0:f.data;f={data:{error:null,response:P1(f.data),successStatus:0}};const b=new Date-d;if(n)return{success:{queryResult:(h=f.data)==null?void 0:h.response,durationMs:b,rawQueryResult:I,isRunning:!1}};St({queryResult:(p=f.data)==null?void 0:p.response,durationMs:b,isRunning:!1,saveSuggestedQuery:{queryText:e.replace(/\n$/,"").trim()||"",resourceId:c||""},toggleVisTable:"table",isChartAddedToDash:[],isCounterAddedToDash:[],queryError:""})}if(C===422){const{commandType:I,requiredCapabilities:b}=R,A=n4e(b),_=rT(i,b);if(b!=null&&b.length&&Lt.isEmpty(_)&&!((v=A==null?void 0:A.create)!=null&&v.length))return pO(!0),vO(oy.permissionSecret),St({queryError:"Biscuit required",isRunning:!1});if(I.toLowerCase()==="dql"){let N={data:null,error:null};try{const L={sqlText:e.trimEnd(),resources:[c],biscuits:_,...o};N=await Ve.runQuery(L,r,n);const{data:x,error:w,status:P}=N,D=(E==null?void 0:E.error)||w;if(x&&P===200){(x==null?void 0:x.length)===0&&St({isEmptyRowCount:!0});const k=f==null?void 0:f.data;f={data:{error:null,response:P1(f.data),successStatus:0}};const U=new Date-d;if(n)return{success:{queryResult:(g=f.data)==null?void 0:g.response,durationMs:U,rawQueryResult:k,isRunning:!1}};St({queryResult:(m=f.data)==null?void 0:m.response,durationMs:U,isRunning:!1,saveSuggestedQuery:{queryText:e.replace(/\n$/,"").trim()||"",resourceId:c||""},toggleVisTable:"table",isChartAddedToDash:[],isCounterAddedToDash:[],queryError:""})}if(D)return D===ae.NETWORK_ERROR?St({queryError:D,isRunning:!1}):n?{error:{queryError:D,isRunning:!1}}:(D===ae.QUERY_ABORT&&Je(ae.QUERY_PROMPT_ABPRT),St({queryError:D,isRunning:!1}))}catch{}}}if(R)return R===ae.NETWORK_ERROR?St({queryError:R,isRunning:!1}):(s<3&&l&&R!==ae.QUERY_ABORT?(z5r(""),X5r(!1),j5r(a,r,u,R==null?void 0:R.detail)):s>=3&&R!==ae.QUERY_ABORT&&Je(ae.NLP_MESSAGE),n?{error:{queryError:R,isRunning:!1}}:(R===ae.QUERY_ABORT&&Je(ae.QUERY_PROMPT_ABPRT),St({queryError:R,isRunning:!1})))}catch(y){console.error("An error occurred for dashboard sql api:",y),St({queryError:y||"",isRunning:!1})}return null},K5r=async(e,t)=>{var l;const{id:r,metadata:n}=e,{dashboardVisualsContent:a}=Da(),i=n&&JSON.parse(n)||[],o=JSON.stringify(r4e(e,a)),s=a==null?void 0:a.map(u=>({visualId:u.id,metadata:u.dashboardVisualMetadata}));try{St({widgetsDashLoader:!0});const{data:u,error:c="",apiAlert:f}=await Ve.putDashboardVisuals(r,[{visualId:t,metadata:o},...s]),{data:d}=await Ve.getDashboardVisualsContent(r,!0);if(u&&d){f4e(d),fr(ae.WIDGET_ADDED),St({isWidgetConfigSet:!1,chatGPTResult:""});let p=[...d&&await _X(d)||[]];(l=i==null?void 0:i.components)!=null&&l.length&&p.push(...i.components),p=p.map((v,g)=>(v.i=g.toString(),v)),p=p==null?void 0:p.sort((v,g)=>v.i-g.i),yX([...p]),D1([...p]),St({loadLayout:!0,savedLayouts:[...p],widgetsDashLoader:!1,dashboardDetailError:void 0})}return Je(c,f)}catch(u){let c="Unknown Error";return u instanceof Error&&(c=u.message),Je(c)}finally{St({widgetsDashLoader:!1})}},pFr=async e=>{const{type:t,name:r,description:n}=e,{saveSuggestedQuery:a,dashboardDetail:i}=Da(),{queryId:o}=a,s=o4e(e),l={queryId:o,name:r,visualType:t,description:n||"",metadata:JSON.stringify(s)},u=await Ve.saveVisual(l),{data:c}=u;c!=null&&c.id&&(fr(ae.WIDGET_SAVED_SUCCESS(ec[t])),K5r(i,c==null?void 0:c.id))},vFr=()=>{St({saveSuggestedQuery:{queryText:"",resourceId:"",queryId:""}})},gFr=async e=>{const{saveSuggestedQuery:t}=Da(),r={...t,...e};if(!(t!=null&&t.queryId)){const{data:n,error:a,apiAlert:i}=await Ve.createQuery(r);if(a){Je(a,i);return}n&&(St({saveSuggestedQuery:{queryId:n.id||""}}),fr(ae.QUERY_SAVED_SUCCESS))}},mFr=()=>{St({isWidgetConfigSet:!1,isCounterAddedToDash:[]})},yFr=(e,t,r)=>{const{saveSuggestedQuery:n,isCounterAddedToDash:a}=Da(),{queryId:i}=n;gA({visualId:i||"",queryId:i,chartType:wo.counter,counterFields:e,queryResult:t}),St({isWidgetConfigSet:!0,isCounterAddedToDash:[...a,r]})},EFr=(e,t,r)=>{const{saveSuggestedQuery:n,isChartAddedToDash:a}=Da(),{queryId:i}=n,{type:o,config:s}=e,{xField:l,yField:u,xAxisData:c,yAxisData:f,axisLabels:d,seriesField:h,legendEnabled:p,sliderEnabled:v,...g}=s.configItem||{},m=Lt.keys(g),y={xField:s.xField||s.colorField,yField:s.yField||s.angleField};s.axisLabels&&(y.axisLabels=s.axisLabels);const E=[];return!h&&m.forEach(T=>{y[T]={value:typeof g[T]=="object"?g[T].value:g[T],chartType:typeof g[T]=="object"?g[T].chartType:o==null?void 0:o.replace("_chart","")};const C={fieldId:T,inputType:"field-dropdown",label:T.replaceAll("Field","-axis"),required:!1};E.push(C)}),h&&(y.seriesField=h),y.legendEnabled=p,y.sliderEnabled=v,gA({chartType:e.type,extraChartSeries:E,chartFields:y,queryResult:t,savedQueryIdDetails:{data:t},queryId:i}),St({isWidgetConfigSet:!0,isChartAddedToDash:[...a,r]}),null};function TFr(){St({queryResult:{},isRunning:!1,queryError:"",isEmptyRowCount:!1,chatGptPrompt:"",toggleVisTable:"table"})}function SFr(e){St({isOfficialDashboard:e})}function _Fr(e){St({toggleVisTable:e})}const q5r=()=>{const{layoutStates:e,layoutStateIndex:t}=Da(),r=e[t];return Lt.partition(r,n=>!!n.visualId||n.type==="visual")},Z5r=(e,t,r)=>{Lt.isEmpty(e)?Wn.dashboardUpdated({dashId:t||`${$m.uuid()}`,dashName:(r==null?void 0:r.name)||"",timestamp:Date.now()}):Wn.dashboardCreated({dashId:`${$m.uuid()}`,dashName:(r==null?void 0:r.name)||"",timestamp:Date.now()})},Q5r=e=>{const{visibility:t,dashboardDetail:r}=Da();return t===Oa.public||(r==null?void 0:r.visibility)===Oa.public?{slug:e,visibility:t||(r==null?void 0:r.visibility)}:{visibility:t||(r==null?void 0:r.visibility)}},J5r=()=>{const{dashboardDetail:e,visibility:t,isVisibilitySet:r,slugName:n}=Da();return r&&t===Oa.public||t===Oa.subscription||r&&(e==null?void 0:e.visibility)===Oa.subscription&&(t===Oa.private||t===Oa.public)||!r&&(e==null?void 0:e.visibility)===Oa.public&&n!==(e==null?void 0:e.slug)},AFr=async(e,t,r,n,a,i)=>{const[o,s]=q5r(),l={...e,metadata:JSON.stringify({components:s,customImg:t,textAreaHeight:a||0})};St({dashboardLoader:!0});let u=null;try{r?u=await Ve.updateDashboard(l,r):u=await Ve.saveDashboard(l);const{data:c,error:f}=u||{},d=JE();if(c){const h=Lt.isEmpty(c==null?void 0:c.id)?r:c==null?void 0:c.id,p=o==null?void 0:o.map(y=>{const{h:E,maxH:T,minH:C,maxW:R,minW:I,w:b,x:A,y:_,i:N,boxHeight:L}=y;return{visualId:(y==null?void 0:y.visualId)||(y==null?void 0:y.id),metadata:JSON.stringify({i:N,h:E,maxH:T,minH:C,maxW:R,minW:I,w:b,x:A,y:_,boxHeight:L})}}),{data:v,error:g="",apiAlert:m}=await Ve.putDashboardVisuals(h,p);if(St({dashboardLoader:!1}),v){let y=!0;J5r()&&(y=await V5r(h,Q5r(i))),Z5r(c,h,l),fr(r?ae.WIDGET_UPDATED_SUCCESS("Dashboard"):ae.DASHBOARD_SAVED_SUCCESS),setTimeout(()=>{y?n&&n(h,l4e()):d&&d.push(gf.updateDashboard(h))},200)}g&&Je(g,m)}else f&&Je(f)}catch(c){Je(c.message)}finally{St({dashboardLoader:!1,slugName:""})}},eNr=(e,t)=>{if(e.type===GCe.header){const r=t.headerWeight==="h2"?1.4:1;e.h=t.headerWeight==="h1"?1.6:r}},CFr=(e,t)=>{var s;const{layoutStates:r,layoutStateIndex:n}=Da(),a=r[n],i=a.map(l=>l.id===e.id?(eNr(l,t),{...l,metadata:t}):l),o=(s=a.find(l=>l.i===e.i))==null?void 0:s.metadata;if(!Lt.isEmpty(QNe(t,o))){const l=r.slice(0,n+1);l.push(i),St({layoutStates:l,layoutStateIndex:l.length-1})}},RFr=async e=>{const{layoutStateIndex:t,layoutStates:r}=Da(),n=r[t]||[],a=n.find(o=>o.i==="__dropping-elem__"),i=n.map((o,s)=>{var l,u;return{...o,...e[s],maxH:o.maxH||((l=e[s])==null?void 0:l.maxH),maxW:o.maxW||((u=e[s])==null?void 0:u.maxW)}});if(a){const o=r;o.pop(),await St({layoutStates:o})}D1([...i])},bFr=e=>{St({dragItem:e})},IFr=()=>{St({dashboardDetail:null,imgMetadata:{chartColors:[],chartBackground:[],imgUrl:"",useImgColors:!1,titleColor:""}})},OFr=()=>{St({dashboardDetailError:void 0})},NFr=async(e,t)=>{var i;const r=e.metadata&&(typeof e.metadata=="object"?e.metadata:JSON.parse(e.metadata))||[];let a=[...t&&await _X(t)||[]];return(i=r==null?void 0:r.components)!=null&&i.length&&a.push(...r.components),a=Lt.reject(a,o=>Lt.isEmpty(o)),a=a==null?void 0:a.sort((o,s)=>Number(o.i)-Number(s.i)),a},wFr=e=>{St({breakPoint:e})},LFr=()=>{St({loadLayout:!1})},PFr=e=>{St({infoView:e})},DFr=e=>{const{imgMetadata:t}=Da();St({imgMetadata:{...t,useImgColors:e}})},xFr=(e,t,r,n)=>{const{imgMetadata:a}=Da();St({imgMetadata:{...a,chartColors:e,chartBackground:t,imgUrl:r,titleColor:n}})},MFr=()=>{St({imgMetadata:{chartColors:[],chartBackground:[],imgUrl:"",useImgColors:!1,titleColor:""}})},$Fr=()=>{St({isChartAddedToDash:[],isCounterAddedToDash:[],isTableAddedToDash:!1})},kFr=e=>{St({slugName:e})},UFr=e=>{St({isVisibilitySet:e})},BFr=e=>{St({slugNameError:e})},FFr=e=>{const{saveSuggestedQuery:t}=Da(),{queryId:r=""}=t;gA({visualId:r,queryId:r,chartType:wo.table,queryResult:e}),St({isWidgetConfigSet:!0,isTableAddedToDash:!0})},GFr=e=>{St({isUnsavedChangesDash:e})},HFr=e=>{St({visibility:e})},VFr=async e=>{try{const{status:t,error:r,apiAlert:n}=await Ve.forkDashboard(e);if(t===201)return fr(ae.DASHBOARD_CLONE_SUCCESS),ae.RESPONSE_SUCCESS_STATUS;if(r)return Je(r,n),ae.RESPONSE_ERROR_STATUS}catch(t){Je((t==null?void 0:t.message)||"")}return""},WFr=e=>{St({isForkDashboard:e})},{ENABLE_ZK_ETH:tNr}=og(),YFr="https://azuremarketplace.microsoft.com/en-us/marketplace/apps/spaceandtimelabsinc1674586360724.spaceandtimedb?tab=PlansAndPrice",d4e="https://azuremarketplace.microsoft.com/view/appPricing/spaceandtimelabsinc1674586360724.spaceandtimedb/us?ReviewsMyCommentsFilter=true",zFr=[{label:"Subscription ID",dataKey:"subscriptionId",width:310},{label:"Provider",dataKey:"provider",width:310},{label:"Amount",dataKey:"amount",width:120},{label:"Currency",dataKey:"currency",width:120},{label:"Date & Time",dataKey:"timestamp",width:180}],jFr={iconStyle:"solid",showIcon:!0,style:{base:{color:_a.custom.white.A1,fontFamily:_a.typography.fontFamily,fontSize:_a.custom.fontSize.font12,fontSmoothing:"antialiased",":-webkit-autofill":{color:"black"},"::placeholder":{color:"#b2b3bdcc"}},invalid:{color:_a.custom.red}}},XFr={iconStyle:"solid",showIcon:!0,style:{base:{color:_a.custom.white.A1,fontFamily:_a.typography.fontFamily,fontSize:_a.custom.fontSize.font12,fontSmoothing:"antialiased",":-webkit-autofill":{color:"black"},"::placeholder":{color:"#b2b3bdcc"}},invalid:{color:_a.custom.red}}},KFr=tNr==="true"?[{id:"faq1",ques:"What will I be charged for?",ans:`Regardless of which pricing model you choose, you only
13453
+ `)},P5r=e=>!!F1(e||"",{path:[So.charts,So.vizard],exact:!0,strict:!1}),DUr=e=>!!F1(e||"",{path:[So.awsMarketplace,So.googleCloud,So.azureLogin],exact:!0,strict:!1}),D5r=(e,t)=>{const r=new RegExp(`^-?\\d+(?:.\\d{0,${t||-1}})?`);return e.toString().match(r)[0]},xUr=e=>{const t=new Date(e),r=t.getFullYear().toString().slice(2),n=(t.getMonth()+1).toString().padStart(2,"0"),a=t.getDate().toString().padStart(2,"0");return`${r}-${n}-${a}`};function MUr(e){const t=new Date(e),r=t.getFullYear().toString().slice(2),n=(t.getMonth()+1).toString().padStart(2,"0"),a=t.getDate().toString().padStart(2,"0"),i=t.getHours().toString().padStart(2,"0"),o=t.getMinutes().toString().padStart(2,"0"),s=t.getSeconds().toString().padStart(2,"0");return`${r}-${n}-${a} ${i}:${o}:${s}`}const{API_URL:hO}=og(),Gpe=["/dashboards","/queries","/view"];async function HS(e,t,r,n,a,i,o,s,l,u,c){var m,y,E,T,C;const f=t.includes("/pipelines/upload/script")||t.includes("/sandbox/create-pip-modules")||t.includes("/sandbox/upload-and-execute"),d=c||hO,h=f?{}:{Accept:"application/json","Content-Type":"application/json",biscuit:u||""};h!=null&&h.biscuit||delete h.biscuit;const p={method:e.toUpperCase(),credentials:"same-origin",headers:{...h}};if(a){const R=a;R.current=new AbortController,p.signal=(m=R==null?void 0:R.current)==null?void 0:m.signal}a&&l&&(a.current=new AbortController,p.signal=(y=a==null?void 0:a.current)==null?void 0:y.signal),r&&(t.includes("/pipelines/upload/script")||t.includes("/sandbox/create-pip-modules")||t.includes("/sandbox/upload-and-execute")?p.body=r:p.body=JSON.stringify(r));let v=d+t;d&&t.substring(0,1)!=="/"&&(v=`${d}/${t}`),i&&(v=hO+t),o&&(v=hO+t);let g;try{if(g=await fetch(v,p),t.includes("/smartContractCode")||t.includes("/smartContractJSCode")){const _=(E=g==null?void 0:g.body)==null?void 0:E.getReader();if(_){const L=await _.read();return _.cancel(),{data:new TextDecoder().decode(L==null?void 0:L.value),status:g.status}}return{data:await g.text(),status:g.status}}const R=await(g==null?void 0:g.text());let I="";try{I=R!=null&&R.length?JSON.parse(R):{}}catch{I=R!=null&&R.length?R:{}}if(g.ok)return{data:I,status:g.status};if(g.status===402&&(I==null?void 0:I.title)===ae.TRIAL_EXPIRED)return RNr(!0),{error:(I==null?void 0:I.title)||"Trial expired",status:g.status};const b=n?I:I.title||I.detail||I.message||((T=I[0])==null?void 0:T.message)||(I==null?void 0:I.error)||"";return Gpe.some(_=>t.includes(_))&&!t.includes("/view/materialized/last-refreshed")&&Wpe(v,e,g.status,I),{error:b,status:g.status,detail:I&&I.detail?I.detail:void 0,apiAlert:{title:I.title||"",type:I.type||"",detail:I.detail||""}}}catch(R){let I="";return(C=p==null?void 0:p.signal)!=null&&C.aborted?(n||o)&&(I=o?"Query Prompt Aborted":"Query Aborted"):I="Network error",Gpe.some(b=>t.includes(b))&&Wpe(v,e,0,{title:I,message:R.message}),{error:I,status:500}}}const x5r=async e=>{const r=await fetch(hO+e),n=await r.json();if(r.ok)return n;throw new Error("")},Ve={put(e,t){return HS("PUT",e,t)},delete(e){return HS("DELETE",e)},post(e,t,r,n,a,i,o,s,l){return HS("POST",e,t,r,n,!1,a,i,o,s,l)},get(e,t,r,n,a,i,o){return HS("GET",e,t,r,n,a,i)},patch(e,t,r){return HS("PATCH",e,t,r)},runQuery(e,t,r){return this.post(Te.executeSQL(),e,!0,t,!1,!1,r)},executeQuery(e,t,r){return this.post(Te.executeQueryById(t),e,!0,r)},getVisual(e,t){return this.get(Te.getVisual(e,t))},getQueryHistory({params:e,abortController:t,isRecent:r}){return this.get(r?Te.getRecentQueryHistory(e):Te.getHistoricalQueryHistory(e),null,!1,t)},getSavedQueries(e,t,r){return this.get(Te.getSavedQueries(e,t),null,!1,r)},getAllQueries({params:e,isLoggedIn:t=!1,abortController:r}){return this.get(Te.getAllQueries(e,t),null,!1,r)},getAllQueriesByPopular(e,t){return this.get(Te.getAllQueriesFilteredByPopular(e,t),null,!1)},getAllQueriesByMyLikes(e){return this.get(Te.getAllQueriesFilteredByMyLikes(e),null,!1)},async addLikeToQuery(e,t){return this.post(Te.addLikeToQuery(e,t),{})},async addDislikeToQuery(e,t){return this.post(Te.addDislikeToQuery(e,t),{})},async addLikeToDashboard(e,t){return this.post(Te.addLikeToDashboardId(e,t),{})},async addDislikeToDashboard(e,t){return this.post(Te.addDislikeToDashboardId(e,t),{})},async addLikeToVisual(e){return this.post(Te.addLikeToVisualId(e),{})},async addDislikeToVisual(e){return this.post(Te.addDislikeToVisualId(e),{})},async saveVisual(e){return this.post(Te.saveVisual(),e)},async saveDashboard(e){return this.post(Te.saveDashboard(),e)},async updateDashboard(e,t){return this.put(Te.updateDashboard(t),e)},async updateVisual(e,t){return this.put(Te.updateVisual(e),t)},getVisuals(e,t){return nd(Te.getVisuals(e,t),{dedupingInterval:6e3,revalidateOnFocus:!1,revalidateIfStale:!0})},getVisualsInfiniteScroll(e,t){return lRt(r=>{const n={...e,pageNo:r+1},a=hi.stringify({...mX(n)});return Te.getVisuals(a,t)},x5r,{dedupingInterval:6e3,revalidateOnFocus:!1,revalidateIfStale:!0})},useGetPopularTags(e,t){return nd(Te.getPopularTags(e,t),{dedupingInterval:6e3,revalidateOnFocus:!1})},async deleteVisual(e){return this.delete(Te.deleteVisual(e))},async publishVisual(e,t){return this.post(Te.publishVisual(e,t),{})},getQuery(e,t){return this.get(Te.getSavedQuery(e,t))},async createQuery(e){return await this.post(Te.createSavedQueries(),e)},async updateQuery(e,t){return await this.put(Te.updateSavedQueries(e),t)},async convertToMaterializedView(e,t){return this.post(Te.convertToMaterializedView(e),t)},deleteQuery(e){return Ve.delete(Te.deleteSavedQueries(e))},async publishQuery(e,t){return this.post(Te.publishQuery(e,t),{})},deleteQueryHistory(e){return Ve.delete(Te.deleteQueryHistory(e))},useGetAllDashboard(e,t){return nd(Te.getAllDashboards(e,t),{revalidateOnFocus:!1})},getDashboardById(e,t,r){return this.get(Te.getDashboardById(e,t,r))},useGetDashboardByPopular(e,t){return nd(Te.getDashboardByPopular(e,t),{revalidateOnFocus:!1})},getDashboardFilteredByMyLikes(e){return this.get(Te.getDashboardsFilteredByMyLikes(e))},useGetDashboardsFilteredByMyLikes(e){return nd(()=>e&&Te.getDashboardsFilteredByMyLikes(e),{revalidateOnFocus:!1})},getVisualsByPopular(e,t){return nd(Te.getVisualsByPopular(e,t),{revalidateOnFocus:!1})},getVisualsFilteredByMyLikes(e){return nd(()=>e&&Te.getVisualsFilteredByMyLikes(e),{revalidateOnFocus:!1})},useGetAllDashboardVisuals(e,t){return nd(Te.getDashboardVisualsContent(e,t),{revalidateOnFocus:!1})},getSchemas({isUserLoggedIn:e,scope:t="PUBLIC",sourceNetwork:r="",sxtOwned:n=""}){return Ve.get(Te.getSchemas({isUserLoggedIn:e,scope:t,sourceNetwork:r,sxtOwned:n}))},getRelationsData(e,t){return Ve.get(Te.getRelations(e,t))},getTags(e){return this.get(Te.getTags(e))},putDashboardVisuals(e,t){return this.put(Te.putDashboardVisuals(e),t)},async deleteDashboard(e){return this.delete(Te.deleteDashboard(e))},async publishDashboard(e,t){return this.post(Te.publishDashboard(e,t),{})},async getDashboardVisualsContent(e,t){return this.get(Te.getDashboardVisualsContent(e,t))},getInsightDashboard(e,t,r){return this.get(Te.getInsightDashboard(e,t,r),void 0,!1,{},!0)},getAllCommunities(){return this.get(Te.getAllCommunities(),void 0,!1,{},!0)},getAllStats(e,t){return this.get(Te.getAllStats(e,t),void 0,!1,{},!0)},getInsightNodes(e,t){return this.get(Te.getInsightNodes(e,t),void 0,!1,{},!0)},getSankeyChart(e,t){return this.get(Te.getSankeyChart(e,t),void 0,!1,{},!0)},getInsightInteractions(e,t){return this.get(Te.getInsightInteractions(e,t),void 0,!1,{},!0)},getNodeInformation(e,t,r,n){return this.get(Te.getNodeBalance(e,t,r),void 0,!1,n,!0)},getNodeInteractions(e,t,r,n){return this.get(Te.getNodeInteractions(e,t,r),void 0,!1,n,!0)},getTopTokens(e,t,r){return this.get(Te.getTopTokens(e,t,r),void 0,!1,{},!0)},getNodeDistribution(e,t,r){return this.get(Te.getNodeDistribution(e,t,r),void 0,!1,{},!0)},async createContainer(){return this.get(Te.createContainer,void 0,!1,{},!1,!1,!0)},async getAuthCode(e,t){return this.post(Te.getAuthCode(),e,!1,null,!1,!1,!1,"",t)},async getAuthCodeRegister(e,t){return this.post(Te.getAuthCodeRegister(),e,!1,null,!1,!1,!1,"",t)},async getAccessToken(e,t){return this.post(Te.getAuthToken(),e,!1,null,!1,!1,!1,"",t)},async getAccessTokenViaGoogle(e,t){return this.post(Te.getAuthTokenViaGoogle(),e,!1,null,!1,!1,!1,"",t)},async getTokenMetadata(){return this.get(Te.validateToken())},async logout(){return this.post(Te.logoutUser(),null)},async postGPT(e,t){return this.post(Te.getGPT(),e,!1,t,!0)},async uploadZipFile(e){return this.post(Te.uploadZipFile(),e,!1,null,!1,!0)},async deployPipeline(e){return this.post(Te.deployPipeline(e),e,!1,null,!1,!0)},async getUserDetail(e){return this.get(Te.getAndUpdateUserDetail(e))},async updateUserDetail(e,t){return await this.put(Te.getAndUpdateUserDetail(e),t)},async getStreamingLogs(e){return this.get(Te.getStreamingLogs(e),void 0,!1,{},!1,!1,!0)},async getSubscriptionPayConfig(){return this.get(Te.getSubscriptionPayConfig())},async getZkSubscriptionPayConfig(){return this.get(Te.getZkSubscriptionPayConfig())},async setZKSubscriptionPayConfig(e){return this.put(Te.setZKSubscriptionPayConfig(),e)},async submitZKPayment(){return this.post(Te.submitZKPayment,{})},async getSubscriptionDetails(){return this.get(Te.getSubscription())},async getSubscriptionUsers(){return this.get(Te.getSubscriptionUsers())},async removeUserSubscription(e){return this.post(Te.removeUserSubscription(e),{})},async setUserSubscriptionRole(e,t){return this.post(Te.setUserRole(e,t),{})},async inviteUser(e){return this.post(Te.inviteUser(e),{})},async joinSubscription(e){return this.post(Te.joinSubscription(e),{})},async forkQuery(e){return this.post(Te.forkQuery(e),{})},async getPaymentHistory(e){return this.get(Te.getPaymentHistory(e),null)},async getUserDataUsage(e){return this.get(Te.getUserDataUsage(e))},async getSubscriptionDataUsage(e){return this.get(Te.getSubscriptionDataUsage(e))},async getSubscriptionForACustomer(){return this.get(Te.getSubscriptionForACustomer())},executeSQL(e,t,r){return this.post(Te.executeSQL(),e,!0,t,!1,!1,r)},executePoS(e,t,r){return this.post(Te.executePoS(),e,!0,r,!1,!1,!1,t)},async getBalanceDetails(){return this.get(Te.getBalanceDetails())},async getOfferings(){return this.get(Te.getOfferings())},async getUsageConfig(){return this.get(Te.usageConfig())},async setUsageConfig(e){return this.put(Te.usageConfig(),e)},async addKey(e){return this.post(Te.keys(),e)},async getAuthCodeKey(e){return this.post(Te.authCodeKey(),e)},async checkCanUpdateUserId(){return this.get(Te.checkCanUpdateUserId())},async updateUserId(e){return this.post(Te.updateUserId(),e)},async getCurrentKeychains(){return this.get(Te.keys())},async getContractSchemas(e){return this.get(Te.getContractSchemas(e))},async getSubscriptionContractSchemas(e){return this.get(Te.getSubscriptionContractSchemas(e))},async getAggregateBlockchainMetadata(){return this.get(Te.getAggregateBlockchainMetadata())},async getViews(e,t){return this.get(Te.getViews(e,t))},async leaveSubscription(){return this.post(Te.leaveSubscription(),{})},async refreshMaterializedView(e){return this.post(Te.refreshMaterializedView(),e)},async getViewLastRefreshTime(e){return this.post(Te.getViewLastRefreshTime(),e)},async executeView(e){return this.post(Te.executeView(),e)},async getDefaultFreeQueries(){return this.get(Te.getDefaultFreeQueries(),null)},async getFreeQueriesQueryCount(){return this.get(Te.getFreeQueriesQueryCount(),null)},async forkDashboard(e){return this.post(Te.forkDashboard(e),{})},async forkVisual(e){return this.post(Te.forkVisual(e),{})},async getZKPayHistoricalBalances(){return this.get(Te.getZKPayHistoricalBalances(),null)},async getZKPayHistoricalPoints(){return this.get(Te.getZKPayHistoricalPoints())},async getZKPayCurrentPoints(){return this.get(Te.getZKPayCurrentPoints())},async getZkPayCumulativeDeposits(){return this.get(Te.getZkPayCumulativeDeposits())},async getZKPayTransactions(e=1,t=10){return this.get(Te.getZKPayTransactions(e,t))},async getZKPayZealyPoints(){return this.get(Te.getZKPayZealyPoints())},async getZKPayCurrentTokenBalance(){return this.get(Te.getZKPayCurrentTokenBalance())},async errorCorrection(e,t){return this.post(Te.getErrorCorrection(),e,!1,t,!0)},async verifyEmailToken(e){const t=`${Te.verifyEmailToken()}?emailToken=${encodeURIComponent(e)}`;return this.post(t,null)},async getEmail(){return this.get(Te.getEmail())},async saveEmail(e){return this.post(Te.saveEmail(),{email:e})},async resendVerificationEmail(){return this.post(Te.verifyResend(),null)},async forgotPassword(e){return this.post(Te.resetPasswordUnauthenticated(),e)},async resetPasswordWithToken(e,t){const r=Te.resetPasswordWithToken(),n={token:e,newPassword:t};return this.post(r,n)},async resetAuthenticatedPassword(){return this.post(Te.resetAuthenticatedPassword(),null)},async getSmartContractCode(e,t){return this.get(Te.getSmartContractCode(e,t),null)},async postSmartContractJSCode(e){return this.post(Te.postSmartContractJSCode(),e)}},$Ur={CRON_EXPRESSION_ERROR:"Please Enter Cron Expression",INVALID_CRON_EXPRESSION:"Please Enter a Valid Cron Expression",ENTER_CRON_EXPRESSION:"Please Enter a Cron Expression",CONNECTED_TO:e=>`Connected to ${e} network`,SOMETHING_WENT_WRONG:"Something went wrong! try again later",UNABLE_TO_CREATE_SUBSCRIPTION:"Unable to create subscription. Please try again later",DELETE:"Delete",FUND:"Fund",ADD_CONSUMER:"Add Consumer",ADD_FUND:"Add Fund",EDIT:"Edit",CANCEL:"Cancel",CANCEL_SUBSRIPTION:"Cancel Subscription",SUBSCRIPTION_ID:"SubscriptionId (unit64)",CONSUMER_ADDRESS:"Consumer (address)",WRITE:"Write",CREATE:"Create",CHAINLINK_SUBSCRIPTIONS_TITLE:"Chainlink Subscriptions",OWNER_ADDRESS:"Owner Address",BACK:"Back",TO_ADDRESS:"to (address)",SCHEDULE_JOB:"Schedule your job",EXAMPLE_OPTIONS:"Example options:",ORACLE_JOB_CREATED:"Oracle Job Created",FUND_ADDED:"Fund Added",ORACLE_JOB_PAUSED:"Oracle Job Paused",ORACLE_JOB_CANCELLED:"Oracle Job Cancelled",ORACLE_JOB_RESUME:"Oracle Job Resumed",ORACLE_JOB_UPDATED:"Oracle Job Updated",LINK:"Link",MY_SAVED_ORACLE_JOBS:"My Saved Oracle Jobs",REFRESH:"Refresh",POLYGON:"Polygon",ETHEREUM:"Ethereum",SEPOLIA:"Sepolia",MUMBAI:"Mumbai",PLEASE_ENTER_FUND_AMOUNT:"Please enter fund amount",PLEASE_ENTER_CONSUMER_ADDRESS:"Please enter consumer address",PLEASE_ENTER_VALID_CONSUMER_ADDRESS:"Please enter a valid consumer address",CRON_EXPRESSION_PLACEHOLDER:"*/15 * * * *",EVERY_15:"Every 15 minutes",EVERY_HOUR:"Every hour",EVERY_MONTH:"First of every month",EVERY_WEEKDAY:"30 minutes past every two hours on every weekday",MON_WED_FRI:"Monday, Wednesday, Friday at 8:00 and 16:00",EVERY_15_VALUE:"*/15 * * * *",EVERY_HOUR_VALUE:"0 * * * *",EVERY_MONTH_VALUE:"0 0 1 * *",EVERY_WEEKDAY_VALUE:"30 */2 * * 1-5",MON_WED_FRI_VALUE:"0 8,16 * * 1,3,5",WHAT_IS_CRON_EXPRESSION:"What is a CRON expression?",CRON_DESCRIPTION:"The CRON expression is a shorthand way to create a time schedule. Use the provided example buttons to experiment with different schedules and then create your own.",ACCORDING_TO_FORMAT:"Cron schedules are interpreted according to this format:",MINUTE:"minute (0 - 59)",HOUR:"hour (0 - 23)",DAY_OF_MONTH:"day of the month (1 - 31)",MONTHS:"month (1 - 12)",DAY_OF_WEEK:"day of the week (0 - 6) (Sunday to Saturday)",ALL_TIME:"All times are in UTC",RANGE_EXP:'- can be used for range e.g. "0 8-16 *"',INTERVAL_EXP:'/ can be used for interval e.g. "0 /2"',LIST_EXP:'can be used for list e.g. "0 17 0,2,4"',SPECIAL_LIMIT:"Special limitations:",NO_SPECIAL_CHAR:"no special characters: ? L W # lists can",MAX_LENGTH_WORDS:"have a max length of 26 no words",ENTER_FUND_AMOUNT_ERROR_MSG:"Please enter a fund amount",SELECT_NETWORK:"Select Network",SEPOLIA_FUND_PLACEHOLDER:"1.7",MUMBAI_FUND_PLACEHOLDER:"0.5",SHOW_MY_QUERIES:"Show My Queries",NEW_QUERY:"New Query",MY_QUERIES:"My Saved Queries",QUERY:"Query",RUN_VIEW_REQUEST:"runViewRequest",VIEW_NAME:"View Name",NFT_BALANCE:"NFT-balance",JOB_ID:"Job ID",RESOURCE_ID:"Resource ID",FUNCTION_NAME:"Function Name",RUN_QUERY_REQUEST:"runQueryRequest",BINANCE:"Binance",REMOVE_CONSUMER:"Remove Consumer",SELECT_CONSUMER_ADDRESS:"Select Consumer Address",VIEW:"view",QUERY_BODY:"query",PLEASE_CONFIRM_LINK_TRANSFER_TRANSACTION:"Please confirm LINK transfer transaction",PLEASE_WAIT_FOR_TRANSACTION_CONFIRMATION:"Please wait until the transfer is confirmed",VIEW_YOUR_TRANSACTION_HERE:"View your transaction here",CONFIRM_LINK_TRANSFER:"Confirm LINK transfer",WAITING_FOR_CONFIRMATION:"Waiting for Confirmation",SUBSCRIPTION_CREATED_SUCCESSFULLY:"Subscription Created Successfully",SUBSCRIPTION_DELETED_SUCCESSFULLY:"Subscription Deleted Successfully",FUND_ADDED_SUCCESSFULLY:"Fund Added Successfully",CONSUMER_ADDED_SUCCESSFULLY:"Consumer Added Successfully",CONSUMER_REMOVED_SUCCESSFULLY:"Consumer Removed Successfully",TRANSACTION_REJECTED:"Transaction Rejected",STATUS_CODE_400:400,STATUS_CODE_4001:4001,STATUS_CODE_4902:4902,STATUS_CODE_200:200,STATUS_CODE_201:201,STATUS_CODE_204:204,CONFIRM_CREATE_SUBSCRIPTION:"Confirm Create New Subscription",UPKEEP_ID:"The upkeep id",IS:"is",PLEASE_ENTER_VALID_AMOUNT:"Please enter valid amount",PLEASE_SELECT_CONSUMER_ADDRESS:"Please select consumer address",OPTIMIZE_GAS_HEADING:"Optimize Gas (Choose Datatype)",PIPE_ADDED__FOR_STRING_AND_BYTE:'a "|" (pipe) was added to your payload to ensure comma separation',PLEASE_SELECT_NETWORK:"Please select network",ADD_FUND_ORACLE_JOB_DESCRIPTION:"To ensure uninterrupted operation of your oracle jobs, please make sure to add LINK tokens",WALLET_NOT_WHITELISTED:"Wallet not Whitelisted",WALLET_NOT_WHITELISTED_SUBTITLE:"Your wallet is not whitelisted to use Chainlink functions subscription. ",WALLET_NOT_WHITELISTED_SUBTITLE_2:" to get the beta access of the Chainlink functions.",CHECK_WALLET_WHITELIST:"Check Wallet Whitelist",BETA_ACCESS_LINK:"Beta Access Link",BETA_ACCESS_URL:"https://chainlinkcommunity.typeform.com/requestaccess?typeform-source=chain.link",CHECK_WALLET_WHITELIST_SUBTITLE:"Please wait while we are checking if your wallet is whitelisted for chainlink functions subscription or not",OPTIMIZE_GAS_INFO_TEXT:"We only send the first row data to chain from the query results retrieved to keep the gas fee minimal.",QUERY_EDITOR_HEAD_TEXT:"Query result to send to your contract"},kUr={list:"list",editor:"editor"},UUr={MAX_STRING2D_BUFFER_SIZE:256,MAX_STRING_BUFFER_SIZE:256,MAX_UINT_VALUE:1157e74},BUr={SEPOLIA:"Sepolia",MUMBAI:"Mumbai",ETHEREUM:"Ethereum",POLYGON:"Polygon"},FUr={uint256:{key:"uint256",message:"Concatenate to Integer (Max Length: 32 bytes)",label:"Integer"},bytes:{key:"bytes",message:"Concatenate to Bytes (Max Length: 256 bytes)",label:"Bytes"},string:{key:"string",message:"Concatenate to String (Max Length: 256 bytes)",label:"String"}},M5r={loading:{},dashboardId:null,selectedDashboardDetails:null,dashboardDetail:null,queriesResult:{},layoutStateIndex:0,dashboardViewLoading:!1,layouts:[],layoutStates:[],savedLayouts:[],dragItem:null,breakPoint:"md",loadLayout:!1,infoView:!1,imgMetadata:{imgUrl:"",useImgColors:!1,chartColors:[],chartBackground:[],titleColor:""},queryError:"",isRunning:!1,durationMs:"",queryResult:"",toggleVisTable:wo.table,isOfficialDashboard:!1,isChatGPTLoading:!1,chatGPTResult:"",chatGPTError:"",saveSuggestedQuery:{queryText:"",resourceId:"",queryId:""},isWidgetConfigSet:!1,chatGptPrompt:"",isChartAddedToDash:[],isCounterAddedToDash:[],dashboardDetailLoading:!1,dashboardVisualsContent:[],dashboardAllVisualsLoading:!1,dashboardVisualLoading:!1,dashboardDetailError:void 0,dashboardDetailStatus:void 0,dashboardLoader:!1,dashDqlRunCount:0,chatGPTContext:"",widgetsDashLoader:!1,isErrOpen:!1,isEmptyRowCount:!1,isSetAsHome:{},slugName:"",isVisibilitySet:!1,slugNameError:"",isTableAddedToDash:!1,isUnsavedChangesDash:!1,visibility:"",isForkDashboard:!1},Dr=pv(()=>({...M5r}));function GUr(){return Dr(e=>e.dashboardViewLoading)}function HUr(){return Dr(e=>e.selectedDashboardDetails)}function VUr(){return Dr(e=>e.dashboardDetail)}function WUr(){return Dr(e=>{let t=e.layoutStates[e.layoutStateIndex]||[];return t=t.sort((r,n)=>r.i-n.i),t})}function YUr(){return Dr(e=>{let t=e.layoutStates[e.layoutStateIndex]||[];t=t.sort((n,a)=>n.i-a.i);const r=t.map(n=>{if(n){const{h:a,w:i,x:o,y:s,i:l,id:u,visualId:c,isResizable:f,type:d}=n;return{h:a,w:i,x:o,y:s,i:l,visualId:u,minH:n.type==="markdown"?2:EX(n),minW:4,maxH:TX(n),maxW:SX(n),isResizable:(f||!!u||!!c)&&d!=="header"}}return[]});return{[e.breakPoint]:r}})}function zUr(){return Dr(e=>e.dragItem)}function jUr(){return Dr(e=>e.layoutStates)}function XUr(){return Dr(e=>e.layoutStateIndex)}function KUr(){return Dr(e=>e.breakPoint)}function qUr(){return Dr(e=>e.infoView)}function ZUr(){return Dr(e=>e.isRunning)}function $5r(){return Dr(e=>e.imgMetadata||{})}function QUr(){return Dr(e=>e.toggleVisTable)}function JUr(){return Dr(e=>e.queryResult)}function eBr(){return Dr(e=>e.queryError)}function tBr(){return Dr(e=>e.isOfficialDashboard)}function rBr(){return Dr(e=>e.chatGPTResult||"")}function nBr(){return Dr(e=>e.chatGPTError||"")}function aBr(){return Dr(e=>e.isChatGPTLoading||!1)}function iBr(){return Dr(e=>e.isWidgetConfigSet||!1)}function oBr(){return Dr(e=>e.chatGptPrompt||"")}function sBr(){return Dr(e=>e.isChartAddedToDash||[])}function lBr(){return Dr(e=>e.isCounterAddedToDash||[])}function uBr(){return Dr(e=>e.dashboardLoader||!1)}function cBr(){return Dr(e=>e.widgetsDashLoader||!1)}function fBr(){return Dr(e=>e.dashboardDetailError||void 0)}function dBr(){return Dr(e=>e.dashboardDetailLoading||!1)}function hBr(){return Dr(e=>e.dashboardAllVisualsLoading||!1)}function pBr(){return Dr(e=>e.dashboardVisualLoading||!1)}function vBr(){return Dr(e=>e.dashboardDetailStatus||void 0)}function gBr(){return Dr(e=>e.dashDqlRunCount||0)}function mBr(){return Dr(e=>e.isErrOpen)}function yBr(){return Dr(e=>e.isEmptyRowCount||!1)}function EBr(){return Dr(e=>e.isSetAsHome)}function TBr(){return Dr(e=>e.slugName)}function SBr(){return Dr(e=>e.isVisibilitySet)}function _Br(){return Dr(e=>e.slugNameError)}function ABr(){return Dr(e=>e.isTableAddedToDash)}function CBr(){return Dr(e=>e.isUnsavedChangesDash)}function RBr(){return Dr(e=>e.visibility)}function bBr(){return Dr(e=>e.isForkDashboard)}const{getState:Hpe}=ar,k5r=e=>{const{graphType:t,...r}=e;return{chartType:t||"",...r}},U5r=e=>{const{graphType:t="",counterValue:r=0,columnName:n="",metric:a="",prefix:i="",suffix:o="",label:s="",title:l="",decimal:u=""}=e;return{chartType:t,counterValue:r,columnName:n,metric:a,prefix:i,suffix:o,label:s,title:l,decimal:u}},i4e=e=>{var v,g,m,y,E,T;const{graphType:t,graphMeta:r}=e,{axis:n,dateFormat:a,legendEnabled:i,sliderEnabled:o,metricEnabled:s}=r||{},{x:l,y:u,seriesField:c,...f}=n||{};if(t===wo.table)return k5r(e);if(t===wo.counter)return U5r(e);const d={},h={title:((v=u==null?void 0:u.labelName)==null?void 0:v.toUpperCase())||((g=u==null?void 0:u.columnName)==null?void 0:g.toUpperCase())},p={title:((m=l==null?void 0:l.labelName)==null?void 0:m.toUpperCase())||((y=l==null?void 0:l.columnName)==null?void 0:y.toUpperCase())};return a&&(p.dateFormat=a),l!=null&&l.tickLayout&&(p.tickLayout=l.tickLayout),l!=null&&l.spacing&&(p.spacing=l.spacing),l!=null&&l.unformatted&&(p.unformatted=l.unformatted),u!=null&&u.spacing&&(h.spacing=u.spacing),u!=null&&u.unformatted&&(h.unformatted=u.unformatted),u!=null&&u.position&&(h.position=u.position),u!=null&&u.metric&&(h.metric=u.metric),Object.keys(f).forEach((C,R)=>{var I,b;d[`y${R+1}Field`]={value:f[C].columnName||"",chartType:f[C].graphType||"",yAxisIndex:f[C].yAxisIndex},h[`y${R+1}Title`]=((I=f[C])==null?void 0:I.labelName)||((b=f[C])==null?void 0:b.columnName)}),{chartType:t||"",fields:{xField:((E=l==null?void 0:l.columnName)==null?void 0:E.toUpperCase())||"",yField:((T=u==null?void 0:u.columnName)==null?void 0:T.toUpperCase())||"",seriesField:(c==null?void 0:c.columnName)||null,...d,xAxisData:{...p},yAxisData:{...h},legendEnabled:i||"",sliderEnabled:o||"",metricEnabled:s||""}}},{getState:nT,setState:gr}=na,IBr=(e,t,r)=>{let n="";const{chartFields:a}=nT();t==="xField"||t==="yField"?n="title":t==="y1Field"&&(n="y1Title"),gr({chartFields:{...a,...xRr(a,e,n,(r==null?void 0:r.toString())||""),[t]:r}})},OBr=(e,t,r)=>{const{chartType:n}=r,{xField:a,yField:i,axisLabels:o,...s}=r.fields||{},l=r.fields||{},u=Lt.keys(s),c=[];u.forEach(f=>{const d={fieldId:f,inputType:"field-dropdown",label:f.replaceAll("Field","-axis"),required:!1};c.push(d)}),n===wo.counter?gr({visualId:e,queryId:t,chartType:n,counterFields:r}):n===wo.table?gr({visualId:e,queryId:t,chartType:n,tableFields:r}):gr({visualId:e,queryId:t,chartType:n,extraChartSeries:c,chartFields:l})},NBr=e=>{gr({selectedChartDetails:e})},wBr=e=>{gr({chartType:e})},LBr=e=>{gr({chartFields:e})},PBr=e=>{gr({tableFields:e})},DBr=e=>{gr({counterFields:e})},o4e=e=>{const{chart:t,type:r,metadata:n}=e,{chartType:a,fields:i}=t||e,{xField:o,yField:s,xAxisData:l,yAxisData:u,seriesField:c,legendEnabled:f,sliderEnabled:d,metricEnabled:h,...p}=i||{},v={};if(r===to.TABLE)return{...n,graphType:"table"};if(r===to.COUNTERCARD)return{...n,graphType:"counter"};Object.keys(p).forEach((m,y)=>{v[`y${y+1}`]={axisType:"",columnName:p[m].value||"",graphType:p[m].chartType||"",yAxisIndex:p[m].yAxisIndex,labelName:u&&y===0?u==null?void 0:u.y1Title:""}});const g=c&&{seriesField:{columnName:c}};return{graphType:a||"",graphMeta:{axis:{x:{axisType:"",columnName:o||"",labelName:l&&(l==null?void 0:l.title)||o||"",spacing:l&&(l==null?void 0:l.spacing),tickLayout:l&&(l==null?void 0:l.tickLayout),unformatted:l&&(l==null?void 0:l.unformatted)},y:{axisType:"",columnName:s||"",labelName:u&&(u==null?void 0:u.title)||s||"",spacing:u&&(u==null?void 0:u.spacing),position:u&&(u==null?void 0:u.position),metric:u&&(u==null?void 0:u.metric),unformatted:u&&(u==null?void 0:u.unformatted)},...v,...g},dateFormat:l&&(l==null?void 0:l.dateFormat)||"",numberFormat:"",legendEnabled:f||"",sliderEnabled:d||"",metricEnabled:h||"",showDataLabels:!1}}},SG=e=>{if(e&&(e!=null&&e.metadata)){let{metadata:t}=e;t=t?JSON.parse(t):{},t=i4e(t);const r={...e,metadata:t};gr({selectedChartDetails:r})}},xBr=async(e,t,r="false",n)=>{var C;const a=JE(),{queryResult:i,isMaterializedViewChecked:o,savedQueryIdDetails:s}=nT(),{chartName:l,chartTags:u,chartDescription:c,type:f,queryName:d,viewName:h,refreshInterval:p}=t,v=o4e(t),g=localStorage.getItem("userId")||"",{data:m={}}=s,{slug:y,queryText:E}=m;let{id:T=""}=m;if((C=Object.keys(s==null?void 0:s.data))!=null&&C.length){let{metadata:R}=s.data;const{scope:I,userId:b="",apiAlert:A}=s.data;if((R===void 0||typeof R=="object"&&R!==null&&Object.keys(R).length===0)&&(R=JSON.stringify({sourceNetwork:n})),!T||r==="true"){const _={metadata:R||"",...dO(u),description:c||"",name:d||"Untitled Query",scope:I,queryText:E,visibility:Oa.private},{data:N,error:L}=await Ve.createQuery(_);if(L)throw Je(L||"",A),L;T=N==null?void 0:N.id}else if(b!==g){const{data:_,error:N}=await Ve.forkQuery(y);if(N)throw Je(N||"",A),N;_!=null&&_.id&&(T=(_==null?void 0:_.id)||"")}}if(o&&T){const R=await d5r(h,T,p),{data:I,error:b}=R||{};if(I){const{data:A}=await Ve.getQuery(T,!0);await AX(A||{});const _={queryId:T,name:l,visualType:f,...dO(u),description:c||"",metadata:JSON.stringify(v)};let N=null;if(e?(_.id=e,N=await Ve.updateVisual(e,_)):N=await Ve.saveVisual(_),gr({chartState:y0.loading}),N!=null&&N.data){yG(),e?(Wn.visualizationUpdated({vizId:e,vizName:(_==null?void 0:_.name)||"",vizType:(_==null?void 0:_.visualType)||"",timestamp:Date.now()}),setTimeout(()=>{fr(ae.WIDGET_UPDATED_SUCCESS(ec[f]))},300)):(Wn.visualizationCreated({vizId:N==null?void 0:N.data,vizName:(_==null?void 0:_.name)||"",vizType:(_==null?void 0:_.visualType)||"",timestamp:Date.now()}),setTimeout(()=>{fr(ae.WIDGET_SAVED_SUCCESS(ec[f]))},300));const{data:L}=N;L&&SG(L),Ya(T,{data:i.items,columns:i.fieldsMetadata,warning:!1,error:!1,message:!1,filteredDataFrames:i.filteredDataFrames,dataframesObject:i.dataframesObject,dataFrames:i.dataFrame}),gr({chartState:y0.saved});const x=h2[f]||h2.GRAPH;a==null||a.push(`${So.charts}?activeTab=${x}&visualType=${f}&widgetTypeEnum=${f}`)}else N!=null&&N.error&&(Je(N==null?void 0:N.error),gr({chartState:y0.error}))}b&&Je(b||"Something went wrong")}else{const R={queryId:T,name:l,visualType:f,...dO(u),description:c||"",metadata:JSON.stringify(v)};let I=null;if(e?(R.id=e,I=await Ve.updateVisual(e,R)):I=await Ve.saveVisual(R),gr({chartState:y0.loading}),I!=null&&I.data){yG(),e?(Wn.visualizationUpdated({vizId:e,vizName:(R==null?void 0:R.name)||"",vizType:(R==null?void 0:R.visualType)||"",timestamp:Date.now()}),setTimeout(()=>{fr(ae.WIDGET_UPDATED_SUCCESS(ec[f]))},300)):(Wn.visualizationCreated({vizId:I==null?void 0:I.data,vizName:(R==null?void 0:R.name)||"",vizType:(R==null?void 0:R.visualType)||"",timestamp:Date.now()}),setTimeout(()=>{fr(ae.WIDGET_SAVED_SUCCESS(ec[f]))},300));const{data:b}=I;b&&SG(b),Ya(T,{data:i.items,columns:i.fieldsMetadata,warning:!1,error:!1,message:!1,filteredDataFrames:i.filteredDataFrames,dataframesObject:i.dataframesObject,dataFrames:i.dataFrame}),gr({chartState:y0.saved});const A=h2[f]||h2.GRAPH;a==null||a.push(`${So.charts}?activeTab=${A}&visualType=${f}&widgetTypeEnum=${f}`)}else I!=null&&I.error&&(Je(I==null?void 0:I.error),gr({chartState:y0.error}))}},MBr=async(e,t,r,n)=>{const{selectedChartDetails:a}=nT();try{gr({confirmDialogLoading:!0});const{status:i,error:o}=await Ve.deleteVisual(e);i===204?(Wn.visualizationDeleted({vizId:e,vizName:n||"",vizType:t||"",timestamp:Date.now()}),fr(ae.WIDGET_DELETED_SUCCESS(ec[t])),(a==null?void 0:a.id)===e&&gr({selectedChartDetails:null}),r()):Je(o||"")}catch(i){Je((i==null?void 0:i.message)||"")}finally{gr({confirmDialogLoading:!1})}},B5r=e=>e===Oa.subscription?fz.myOrgVisuals:(e===Oa.private,"GRAPH"),$Br=async(e,t,r)=>{try{gr({confirmDialogLoading:!0});const{selectedChartDetails:n,userSetVisibility:a}=nT(),i=JE(),o=()=>a===Oa.public?{slug:r,visibility:a}:{visibility:a},s=hi.stringify(o()),{status:l,error:u}=await Ve.publishVisual(e,s);if(l===204)Wn.visualizationPublished({vizId:e,vizName:(n==null?void 0:n.name)||"",vizType:t||"",slug:r,timestamp:Date.now()}),fr(ae.WIDGET_PUBLISH_SUCCESS(ec[t])),gr({selectedChartDetails:{...n,visibility:a},confirmDialogLoading:!1}),i==null||i.push(gf.charts(B5r(a)));else return u&&Je(u),ae.RESPONSE_ERROR_STATUS;return ae.RESPONSE_SUCCESS_STATUS}catch(n){return Je(n==null?void 0:n.message),ae.RESPONSE_ERROR_STATUS}finally{gr({confirmDialogLoading:!1})}},kBr=async(e,t)=>{try{const{data:r,status:n,error:a}=await Ve.getVisual(e,t)||{};Lt.isEmpty(r)?gr({selectedChartDetailsError:ae.RECORD_NOT_FOUND,chartDetailStatus:n}):(SG(r),gr({selectedChartDetailsError:void 0})),a&&gr({selectedChartDetailsError:a,chartDetailStatus:n})}catch{}},UBr=(e,t,r,n)=>{const{chartFields:a}=nT(),i={...a[e]};n&&(i.chartType=n==null?void 0:n.replace("_chart","")),i[t]=r,gr({chartFields:{...a,[e]:{...i}}})},BBr=()=>{gr({visualId:"",queryId:"",chartType:"",counterFields:{},queryResult:{},extraChartSeries:[],chartFields:{},savedQueryIdDetails:{}})},FBr=e=>{gr({extraChartSeries:[...e]})},GBr=async(e,t)=>{var f,d,h,p;const{queriesResult:r}=Hpe(),{queryId:n,referencedResources:a,authorizationResources:i,requiresAuthorization:o}=t;if((d=(f=r[n])==null?void 0:f.data)!=null&&d.length)return gr({queryResult:{...r[n],items:r[n].data,fieldsMetadata:r[n].columns||[]}}),null;gr({queryRunning:!0});let s={data:null};const{biscuitList:l}=Hpe(),u=rT(l,l6({resources:o?i:a}));try{s=await Ve.executeQuery({queryId:n,biscuits:u},((h=r[n])==null?void 0:h.visibility)===Oa.public?!1:e)}catch{}const c=((p=s==null?void 0:s.data)==null?void 0:p.error)||(s==null?void 0:s.error);if(c)return gr({queryError:c==null?void 0:c.title,queryRunning:!1,loading:!1,chartLoading:!1});if(s.data){const v=P1(s==null?void 0:s.data);gr({queryResult:v,queryRunning:!1,loading:!1,chartLoading:!1}),Ya(n,{data:v.items,columns:v.fieldsMetadata,warning:!1,error:!1,message:!1,filteredDataFrames:v.filteredDataFrames,dataframesObject:v.dataframesObject,dataFrames:v.dataFrame})}return!1},HBr=()=>{gr({queryResult:[],columns:[],loading:!0})},VBr=e=>{gr({loading:e})},WBr=()=>{gr({...zNe})},YBr=async(e,t,r)=>{try{const{data:n}=await Ve.getQuery(e,t);if(gr(n?{savedQueryIdDetails:{data:n},queryId:e}:{savedQueryIdDetails:{error:ae.RECORD_NOT_FOUND}}),r)return(n==null?void 0:n.name)||""}catch(n){if(gr({savedQueryIdDetails:{error:n}}),r)return""}return""},zBr=async(e,t,r,n,a)=>{const{data:i}=await Ve.getDashboardById(e==null?void 0:e.id,r),{data:o}=await Ve.getDashboardVisualsContent(e==null?void 0:e.id,r),s=i&&JSON.stringify(r4e(i,o||[],n)),l=o==null?void 0:o.map(f=>({visualId:f.id,metadata:f.dashboardVisualMetadata})),u=Lt.map(o,f=>f.id);if(!!t&&u.includes(t))return Je(ae.WIDGET_ALREADY_PRESENT);try{const{data:f,error:d="",apiAlert:h}=await Ve.putDashboardVisuals(e==null?void 0:e.id,[{visualId:t,metadata:s},...l]);return f?(fr(ae.WIDGET_PINNED_TO_DASHBOARD),A1e(()=>Ve.getDashboardVisualsContent(e==null?void 0:e.id,r)),a(!0),!1):Je(d,h)}catch(f){let d="Unknown Error";return f instanceof Error&&(d=f.message),Je(d)}},jBr=e=>{gr({queryResult:e})},XBr=e=>{const{viewModal:t}=nT();if(typeof e=="function"){const r=e(t);gr({viewModal:r})}else gr({viewModal:{...t,...e}})},KBr=e=>{gr({isCounterDecimal:e})},qBr=e=>{gr({userSetVisibility:e})},ZBr=e=>{gr({isMaterializedViewChecked:e})},QBr=e=>{gr({isAutoRefreshedVisual:e})},JBr=async e=>{try{const{status:t,error:r}=await Ve.forkVisual(e);if(t===201)return fr(ae.VISUAL_CLONE_SUCCESS),ae.RESPONSE_SUCCESS_STATUS;if(r)return Je(r),ae.RESPONSE_ERROR_STATUS}catch(t){Je((t==null?void 0:t.message)||"")}return""},eFr=e=>{gr({isFork:e})},{getState:Da,setState:St}=Dr,yX=e=>{St({layouts:e})},gA=na.setState,F5r=async(e,t,r,n,a)=>{const{loadLayout:i}=Da(),o=t[n-1]||[];(QNe(r,t[n]||[]).filter(l=>{var u,c,f,d,h;return((u=l.x)==null?void 0:u.toString())||((c=l.y)==null?void 0:c.toString())||((f=l.i)==null?void 0:f.toString())||((d=l.h)==null?void 0:d.toString())||((h=l.w)==null?void 0:h.toString())||l.name}).length>0||a)&&(i&&!a&&(e.pop(),await St({loadLayout:!1})),o.length>0&&o.length>r.length&&!a&&(e.pop(),await St({layoutStates:e})),e.push(r),await St({layoutStates:e,layoutStateIndex:e.length-1}))},D1=(e,t=!1)=>{if(!(e!=null&&e.length)){St({layoutStates:[],layoutStateIndex:0});return}const{layoutStates:r,layoutStateIndex:n}=Da();let a=[];const i=e.sort((o,s)=>Number(o.i)-Number(s.i));a=r.slice(0,n+1),F5r(a,r,i,n,t)},G5r=e=>{St({layoutStates:[e],layoutStateIndex:0})},tFr=async()=>{const{layoutStateIndex:e}=Da();await St({layoutStateIndex:Math.max(0,Number(e)-1)})},rFr=async()=>{const{layoutStates:e,layoutStateIndex:t}=Da();await St({layoutStateIndex:Math.min(e.length,t+1)})},s4e=e=>{St({isSetAsHome:{...e}})},H5r=async(e,t,r,n)=>{const a=JE(),{settings:i,userName:o,displayName:s,emailAddress:l,bio:u}=r,f={...i?JSON.parse(i):{},dashboardHomeId:t},d=JSON.stringify(f),h={userId:e,userName:o||null,displayName:s||null,emailAddress:l||null,bio:u,settings:d};try{await S4e(e,h)===ae.RESPONSE_SUCCESS_STATUS&&(fr(n),G5r([]),await CNr(e),t&&(s4e({[t]:!0}),a==null||a.push({pathname:So.landingPage,state:{id:t}})))}catch(p){Je(p==null?void 0:p.message)}},nFr=async(e,t,r)=>{const n=localStorage.getItem("userId")||"",{settings:a}=r||{},i=a?JSON.parse(a):{},{dashboardHomeId:o=""}=i;try{gA({confirmDialogLoading:!0});const{status:s,error:l,apiAlert:u}=await Ve.deleteDashboard(e);o&&o===e&&await H5r(n,"",r,ae.DASHBOARD_UNSET_AS_HOME_SUCCESS),s===204?(Wn.dashboardDeleted({dashId:e,timestamp:Date.now()}),fr(ae.DASHBOARD_DELETED_SUCCESS),t&&t()):Je(l||"",u)}catch(s){Je((s==null?void 0:s.message)||"")}finally{gA({confirmDialogLoading:!1})}},l4e=()=>{const{visibility:e,dashboardDetail:t}=Da();if(e)switch(e){case Oa.public:return ad.exploreDashboard;case Oa.subscription:return ad.myOrgDashboard;case Oa.private:return ad.myDashboard;default:return ad.myDashboard}else switch(t==null?void 0:t.visibility){case Oa.public:return ad.exploreDashboard;case Oa.subscription:return ad.myOrgDashboard;case Oa.private:return ad.myDashboard;default:return ad.myDashboard}},V5r=async(e,t)=>{try{const{selectedDashboardDetails:r}=Da(),{slug:n}=t,a=hi.stringify(t),i=JE(),{status:o,error:s,apiAlert:l}=await Ve.publishDashboard(e,a);if(o===204)fr(ae.DASHBOARD_PUBLISH_SUCCESS),St({selectedDashboardDetails:{...r,visibility:(t==null?void 0:t.visibility)||"",slug:n||null}}),i==null||i.push(`${gf.dashboards(l4e())}`),Wn.dashboardPublished({dashId:e,dashName:r==null?void 0:r.name,slug:n||null,timestamp:Date.now()});else return Je(s||ae.SLUG_NAME_ERROR("Slug"),l),!1;return!0}catch(r){return Je(r==null?void 0:r.message),!1}},aFr=e=>{var t;St({selectedDashboardDetails:e,imgMetadata:((t=e==null?void 0:e.metadata)==null?void 0:t.customImg)||{}})},iFr=e=>{St({dashboardDetail:e})},W5r=e=>{const t=o=>({markdown:8,row:5})[o]||1,r=o=>({markdown:4})[o]||12,n=o=>({markdown:12,row:5})[o]||1,a=o=>({markdown:12})[o]||12;return{...e,w:r(e.type),h:t(e.type),x:e.x||0,y:e.y||0,minH:1,minW:3,maxH:n(e.type),maxW:a(e.type),isResizable:e.type==="markdown"}},u4e=e=>e.metadata.chartType===ec.COUNTERCARD.toLowerCase()?6:8,EX=e=>e.metadata.chartType===ec.COUNTERCARD.toLowerCase()?6:(e==null?void 0:e.type)==="divider"?1:8,c4e=e=>e.metadata.chartType===ec.COUNTERCARD.toLowerCase()?5:6,TX=e=>e.metadata.chartType==="counter"?8:(e==null?void 0:e.type)==="divider"?1:12,SX=e=>e.metadata.chartType==="counter"?7:12,oFr=e=>{D1([{...e,w:c4e(e),h:u4e(e),x:e.x||0,y:e.y||0,minH:EX(e),minW:4,maxH:TX(e),maxW:SX(e)}])},sFr=(e,t,r)=>{const{layoutStateIndex:n,layoutStates:a}=Da(),i=a[n]||[],o=i==null?void 0:i.map(s=>({...s,x:t[s.i].x,y:t[s.i].y}));r?Lt.isEmpty(Lt.filter(i,s=>s.visualId===e.visualId))&&D1([...o,{...e,w:c4e(e),h:u4e(e),x:e.x||0,y:e.y||0,minH:EX(e),minW:4,maxH:TX(e),maxW:SX(e)}]):D1([...o,W5r(e)])},lFr=e=>{const{layoutStates:t,layoutStateIndex:r}=Da(),n=[...t[r]];Lt.remove(n,i=>i.i.toString()===(e==null?void 0:e.toString()));const a=n.map((i,o)=>({...i,i:o.toString()}));D1([...a],!0)},uFr=()=>{yX([]),St({layoutStates:[],layoutStateIndex:0})},Y5r=async e=>{const{dashboardVisualMetadata:t,...r}=e;if(e){const n=e.metadata&&Fpe(e.metadata),a={...r,metadata:i4e(n)};return{...t&&Fpe(t),...a,type:"visual"}}return{}},_X=async e=>{const t=[];St({dashboardVisualLoading:!0});for(let n=0;n<e.length;n+=1){const a=e&&Y5r(e[n]);t.push(a)}const r=await Promise.all(t);return r&&St({dashboardVisualLoading:!1}),r},f4e=e=>{St({dashboardVisualsContent:e})},cFr=async(e,t,r,n)=>{var a;try{St({dashboardViewLoading:!0,dashboardDetailLoading:!0,dashboardAllVisualsLoading:!0,dashboardDetailError:void 0});const{data:i,error:o,status:s}=await Ve.getDashboardById(e,t,r);if(Lt.isEmpty(i)||St({dashboardDetail:null,dashboardDetailError:ae.RECORD_NOT_FOUND,dashboardDetailStatus:s}),i){if(i.visibility==="public"&&t===!0){const u=await Ve.getDashboardFilteredByMyLikes(t);u!==void 0&&u.data&&Array.isArray(u.data)&&(i.liked=u.data.indexOf(i==null?void 0:i.id)>-1)}const l=(i==null?void 0:i.metadata)&&JSON.parse(i.metadata)||[];if(St({dashboardDetail:i,dashboardDetailLoading:!1,imgMetadata:(l==null?void 0:l.customImg)||{}}),i){const{data:u}=await Ve.getDashboardVisualsContent(i==null?void 0:i.id,t);f4e(u||[]);let f=[...(u==null?void 0:u.length)&&await _X(u||[])||[]];(a=l==null?void 0:l.components)!=null&&a.length&&f.push(...l.components),f=Lt.reject(f,d=>Lt.isEmpty(d)),f=f.map((d,h)=>(d.i=h.toString(),d)),f=f==null?void 0:f.sort((d,h)=>d.i-h.i),yX([...f]),D1([...f]),St({loadLayout:!0,savedLayouts:[...f],dashboardViewLoading:!1,dashboardAllVisualsLoading:!1,dashboardDetailError:void 0})}St({dashboardViewLoading:!1,dashboardDetailLoading:!1,dashboardAllVisualsLoading:!1})}o&&(St({dashboardViewLoading:!1,dashboardDetailLoading:!1,dashboardDetailError:o,dashboardDetailStatus:s}),n&&n()),s===404&&n&&n()}catch{}finally{St({dashboardViewLoading:!1,dashboardDetailLoading:!1})}return null};async function z5r(e){St({chatGPTResult:e})}const fFr=e=>{St({dashDqlRunCount:e})};async function j5r(e,t,r,n){var i,o,s;const a={prompt:e,metadata:{context:r,error:n}};St({isChatGPTLoading:!0,chatGptPrompt:e});try{const l=await Ve.postGPT(a,t);(l==null?void 0:l.error)===ae.QUERY_PROMPT_ABORT&&Je(ae.QUERY_PROMPT_ABORT),l!=null&&l.data&&St({isChatGPTLoading:!1,chatGPTResult:(i=l==null?void 0:l.data)==null?void 0:i.SQL,chatGPTContext:(s=(o=l==null?void 0:l.data)==null?void 0:o.metadata)==null?void 0:s.context,chatGPTError:""}),l!=null&&l.error&&(l==null?void 0:l.error)!==ae.QUERY_PROMPT_ABORT&&St({chatGPTError:l==null?void 0:l.error})}catch(l){console.error(l)}finally{St({isChatGPTLoading:!1})}}function dFr(){const{isErrOpen:e}=Da();St({isErrOpen:!e})}function X5r(e){St({isErrOpen:e})}const hFr=async(e,t,r,n,a,i,o)=>{var h,p,v,g,m;e=e4e(e),n||St({isRunning:!0});const{dashDqlRunCount:s,chatGPTResult:l,chatGPTContext:u}=Da(),{resourceId:c="ETH:BLOCK"}=t?JNe(e,t):{};let f={data:null};const d=new Date;try{const y={sqlText:e.trimEnd(),validate:!0,...o};f=await Ve.executeSQL(y,r,n);const{data:E,error:T,status:C}=f,R=(E==null?void 0:E.error)||T;if(E&&C===200){(E==null?void 0:E.length)===0&&St({isEmptyRowCount:!0});const I=f==null?void 0:f.data;f={data:{error:null,response:P1(f.data),successStatus:0}};const b=new Date-d;if(n)return{success:{queryResult:(h=f.data)==null?void 0:h.response,durationMs:b,rawQueryResult:I,isRunning:!1}};St({queryResult:(p=f.data)==null?void 0:p.response,durationMs:b,isRunning:!1,saveSuggestedQuery:{queryText:e.replace(/\n$/,"").trim()||"",resourceId:c||""},toggleVisTable:"table",isChartAddedToDash:[],isCounterAddedToDash:[],queryError:""})}if(C===422){const{commandType:I,requiredCapabilities:b}=R,A=n4e(b),_=rT(i,b);if(b!=null&&b.length&&Lt.isEmpty(_)&&!((v=A==null?void 0:A.create)!=null&&v.length))return pO(!0),vO(oy.permissionSecret),St({queryError:"Biscuit required",isRunning:!1});if(I.toLowerCase()==="dql"){let N={data:null,error:null};try{const L={sqlText:e.trimEnd(),resources:[c],biscuits:_,...o};N=await Ve.runQuery(L,r,n);const{data:x,error:w,status:P}=N,D=(E==null?void 0:E.error)||w;if(x&&P===200){(x==null?void 0:x.length)===0&&St({isEmptyRowCount:!0});const k=f==null?void 0:f.data;f={data:{error:null,response:P1(f.data),successStatus:0}};const U=new Date-d;if(n)return{success:{queryResult:(g=f.data)==null?void 0:g.response,durationMs:U,rawQueryResult:k,isRunning:!1}};St({queryResult:(m=f.data)==null?void 0:m.response,durationMs:U,isRunning:!1,saveSuggestedQuery:{queryText:e.replace(/\n$/,"").trim()||"",resourceId:c||""},toggleVisTable:"table",isChartAddedToDash:[],isCounterAddedToDash:[],queryError:""})}if(D)return D===ae.NETWORK_ERROR?St({queryError:D,isRunning:!1}):n?{error:{queryError:D,isRunning:!1}}:(D===ae.QUERY_ABORT&&Je(ae.QUERY_PROMPT_ABPRT),St({queryError:D,isRunning:!1}))}catch{}}}if(R)return R===ae.NETWORK_ERROR?St({queryError:R,isRunning:!1}):(s<3&&l&&R!==ae.QUERY_ABORT?(z5r(""),X5r(!1),j5r(a,r,u,R==null?void 0:R.detail)):s>=3&&R!==ae.QUERY_ABORT&&Je(ae.NLP_MESSAGE),n?{error:{queryError:R,isRunning:!1}}:(R===ae.QUERY_ABORT&&Je(ae.QUERY_PROMPT_ABPRT),St({queryError:R,isRunning:!1})))}catch(y){console.error("An error occurred for dashboard sql api:",y),St({queryError:y||"",isRunning:!1})}return null},K5r=async(e,t)=>{var l;const{id:r,metadata:n}=e,{dashboardVisualsContent:a}=Da(),i=n&&JSON.parse(n)||[],o=JSON.stringify(r4e(e,a)),s=a==null?void 0:a.map(u=>({visualId:u.id,metadata:u.dashboardVisualMetadata}));try{St({widgetsDashLoader:!0});const{data:u,error:c="",apiAlert:f}=await Ve.putDashboardVisuals(r,[{visualId:t,metadata:o},...s]),{data:d}=await Ve.getDashboardVisualsContent(r,!0);if(u&&d){f4e(d),fr(ae.WIDGET_ADDED),St({isWidgetConfigSet:!1,chatGPTResult:""});let p=[...d&&await _X(d)||[]];(l=i==null?void 0:i.components)!=null&&l.length&&p.push(...i.components),p=p.map((v,g)=>(v.i=g.toString(),v)),p=p==null?void 0:p.sort((v,g)=>v.i-g.i),yX([...p]),D1([...p]),St({loadLayout:!0,savedLayouts:[...p],widgetsDashLoader:!1,dashboardDetailError:void 0})}return Je(c,f)}catch(u){let c="Unknown Error";return u instanceof Error&&(c=u.message),Je(c)}finally{St({widgetsDashLoader:!1})}},pFr=async e=>{const{type:t,name:r,description:n}=e,{saveSuggestedQuery:a,dashboardDetail:i}=Da(),{queryId:o}=a,s=o4e(e),l={queryId:o,name:r,visualType:t,description:n||"",metadata:JSON.stringify(s)},u=await Ve.saveVisual(l),{data:c}=u;c!=null&&c.id&&(fr(ae.WIDGET_SAVED_SUCCESS(ec[t])),K5r(i,c==null?void 0:c.id))},vFr=()=>{St({saveSuggestedQuery:{queryText:"",resourceId:"",queryId:""}})},gFr=async e=>{const{saveSuggestedQuery:t}=Da(),r={...t,...e};if(!(t!=null&&t.queryId)){const{data:n,error:a,apiAlert:i}=await Ve.createQuery(r);if(a){Je(a,i);return}n&&(St({saveSuggestedQuery:{queryId:n.id||""}}),fr(ae.QUERY_SAVED_SUCCESS))}},mFr=()=>{St({isWidgetConfigSet:!1,isCounterAddedToDash:[]})},yFr=(e,t,r)=>{const{saveSuggestedQuery:n,isCounterAddedToDash:a}=Da(),{queryId:i}=n;gA({visualId:i||"",queryId:i,chartType:wo.counter,counterFields:e,queryResult:t}),St({isWidgetConfigSet:!0,isCounterAddedToDash:[...a,r]})},EFr=(e,t,r)=>{const{saveSuggestedQuery:n,isChartAddedToDash:a}=Da(),{queryId:i}=n,{type:o,config:s}=e,{xField:l,yField:u,xAxisData:c,yAxisData:f,axisLabels:d,seriesField:h,legendEnabled:p,sliderEnabled:v,...g}=s.configItem||{},m=Lt.keys(g),y={xField:s.xField||s.colorField,yField:s.yField||s.angleField};s.axisLabels&&(y.axisLabels=s.axisLabels);const E=[];return!h&&m.forEach(T=>{y[T]={value:typeof g[T]=="object"?g[T].value:g[T],chartType:typeof g[T]=="object"?g[T].chartType:o==null?void 0:o.replace("_chart","")};const C={fieldId:T,inputType:"field-dropdown",label:T.replaceAll("Field","-axis"),required:!1};E.push(C)}),h&&(y.seriesField=h),y.legendEnabled=p,y.sliderEnabled=v,gA({chartType:e.type,extraChartSeries:E,chartFields:y,queryResult:t,savedQueryIdDetails:{data:t},queryId:i}),St({isWidgetConfigSet:!0,isChartAddedToDash:[...a,r]}),null};function TFr(){St({queryResult:{},isRunning:!1,queryError:"",isEmptyRowCount:!1,chatGptPrompt:"",toggleVisTable:"table"})}function SFr(e){St({isOfficialDashboard:e})}function _Fr(e){St({toggleVisTable:e})}const q5r=()=>{const{layoutStates:e,layoutStateIndex:t}=Da(),r=e[t];return Lt.partition(r,n=>!!n.visualId||n.type==="visual")},Z5r=(e,t,r)=>{Lt.isEmpty(e)?Wn.dashboardUpdated({dashId:t||`${$m.uuid()}`,dashName:(r==null?void 0:r.name)||"",timestamp:Date.now()}):Wn.dashboardCreated({dashId:`${$m.uuid()}`,dashName:(r==null?void 0:r.name)||"",timestamp:Date.now()})},Q5r=e=>{const{visibility:t,dashboardDetail:r}=Da();return t===Oa.public||(r==null?void 0:r.visibility)===Oa.public?{slug:e,visibility:t||(r==null?void 0:r.visibility)}:{visibility:t||(r==null?void 0:r.visibility)}},J5r=()=>{const{dashboardDetail:e,visibility:t,isVisibilitySet:r,slugName:n}=Da();return r&&t===Oa.public||t===Oa.subscription||r&&(e==null?void 0:e.visibility)===Oa.subscription&&(t===Oa.private||t===Oa.public)||!r&&(e==null?void 0:e.visibility)===Oa.public&&n!==(e==null?void 0:e.slug)},AFr=async(e,t,r,n,a,i)=>{const[o,s]=q5r(),l={...e,metadata:JSON.stringify({components:s,customImg:t,textAreaHeight:a||0})};St({dashboardLoader:!0});let u=null;try{r?u=await Ve.updateDashboard(l,r):u=await Ve.saveDashboard(l);const{data:c,error:f}=u||{},d=JE();if(c){const h=Lt.isEmpty(c==null?void 0:c.id)?r:c==null?void 0:c.id,p=o==null?void 0:o.map(y=>{const{h:E,maxH:T,minH:C,maxW:R,minW:I,w:b,x:A,y:_,i:N,boxHeight:L}=y;return{visualId:(y==null?void 0:y.visualId)||(y==null?void 0:y.id),metadata:JSON.stringify({i:N,h:E,maxH:T,minH:C,maxW:R,minW:I,w:b,x:A,y:_,boxHeight:L})}}),{data:v,error:g="",apiAlert:m}=await Ve.putDashboardVisuals(h,p);if(St({dashboardLoader:!1}),v){let y=!0;J5r()&&(y=await V5r(h,Q5r(i))),Z5r(c,h,l),fr(r?ae.WIDGET_UPDATED_SUCCESS("Dashboard"):ae.DASHBOARD_SAVED_SUCCESS),setTimeout(()=>{y?n&&n(h,l4e()):d&&d.push(gf.updateDashboard(h))},200)}g&&Je(g,m)}else f&&Je(f)}catch(c){Je(c.message)}finally{St({dashboardLoader:!1,slugName:""})}},eNr=(e,t)=>{if(e.type===GCe.header){const r=t.headerWeight==="h2"?1.4:1;e.h=t.headerWeight==="h1"?1.6:r}},CFr=(e,t)=>{var s;const{layoutStates:r,layoutStateIndex:n}=Da(),a=r[n],i=a.map(l=>l.id===e.id?(eNr(l,t),{...l,metadata:t}):l),o=(s=a.find(l=>l.i===e.i))==null?void 0:s.metadata;if(!Lt.isEmpty(QNe(t,o))){const l=r.slice(0,n+1);l.push(i),St({layoutStates:l,layoutStateIndex:l.length-1})}},RFr=async e=>{const{layoutStateIndex:t,layoutStates:r}=Da(),n=r[t]||[],a=n.find(o=>o.i==="__dropping-elem__"),i=n.map((o,s)=>{var l,u;return{...o,...e[s],maxH:o.maxH||((l=e[s])==null?void 0:l.maxH),maxW:o.maxW||((u=e[s])==null?void 0:u.maxW)}});if(a){const o=r;o.pop(),await St({layoutStates:o})}D1([...i])},bFr=e=>{St({dragItem:e})},IFr=()=>{St({dashboardDetail:null,imgMetadata:{chartColors:[],chartBackground:[],imgUrl:"",useImgColors:!1,titleColor:""}})},OFr=()=>{St({dashboardDetailError:void 0})},NFr=async(e,t)=>{var i;const r=e.metadata&&(typeof e.metadata=="object"?e.metadata:JSON.parse(e.metadata))||[];let a=[...t&&await _X(t)||[]];return(i=r==null?void 0:r.components)!=null&&i.length&&a.push(...r.components),a=Lt.reject(a,o=>Lt.isEmpty(o)),a=a==null?void 0:a.sort((o,s)=>Number(o.i)-Number(s.i)),a},wFr=e=>{St({breakPoint:e})},LFr=()=>{St({loadLayout:!1})},PFr=e=>{St({infoView:e})},DFr=e=>{const{imgMetadata:t}=Da();St({imgMetadata:{...t,useImgColors:e}})},xFr=(e,t,r,n)=>{const{imgMetadata:a}=Da();St({imgMetadata:{...a,chartColors:e,chartBackground:t,imgUrl:r,titleColor:n}})},MFr=()=>{St({imgMetadata:{chartColors:[],chartBackground:[],imgUrl:"",useImgColors:!1,titleColor:""}})},$Fr=()=>{St({isChartAddedToDash:[],isCounterAddedToDash:[],isTableAddedToDash:!1})},kFr=e=>{St({slugName:e})},UFr=e=>{St({isVisibilitySet:e})},BFr=e=>{St({slugNameError:e})},FFr=e=>{const{saveSuggestedQuery:t}=Da(),{queryId:r=""}=t;gA({visualId:r,queryId:r,chartType:wo.table,queryResult:e}),St({isWidgetConfigSet:!0,isTableAddedToDash:!0})},GFr=e=>{St({isUnsavedChangesDash:e})},HFr=e=>{St({visibility:e})},VFr=async e=>{try{const{status:t,error:r,apiAlert:n}=await Ve.forkDashboard(e);if(t===201)return fr(ae.DASHBOARD_CLONE_SUCCESS),ae.RESPONSE_SUCCESS_STATUS;if(r)return Je(r,n),ae.RESPONSE_ERROR_STATUS}catch(t){Je((t==null?void 0:t.message)||"")}return""},WFr=e=>{St({isForkDashboard:e})},{ENABLE_ZK_ETH:tNr}=og(),YFr="https://azuremarketplace.microsoft.com/en-us/marketplace/apps/spaceandtimelabsinc1674586360724.spaceandtimedb?tab=PlansAndPrice",d4e="https://azuremarketplace.microsoft.com/view/appPricing/spaceandtimelabsinc1674586360724.spaceandtimedb/us?ReviewsMyCommentsFilter=true",zFr=[{label:"Subscription ID",dataKey:"subscriptionId",width:310},{label:"Provider",dataKey:"provider",width:310},{label:"Amount",dataKey:"amount",width:120},{label:"Currency",dataKey:"currency",width:120},{label:"Date & Time",dataKey:"timestamp",width:180}],jFr={iconStyle:"solid",showIcon:!0,style:{base:{color:_a.custom.white.A1,fontFamily:_a.typography.fontFamily,fontSize:_a.custom.fontSize.font12,fontSmoothing:"antialiased",":-webkit-autofill":{color:"black"},"::placeholder":{color:"#b2b3bdcc"}},invalid:{color:_a.custom.red}}},XFr={iconStyle:"solid",showIcon:!0,style:{base:{color:_a.custom.white.A1,fontFamily:_a.typography.fontFamily,fontSize:_a.custom.fontSize.font12,fontSmoothing:"antialiased",":-webkit-autofill":{color:"black"},"::placeholder":{color:"#b2b3bdcc"}},invalid:{color:_a.custom.red}}},KFr=tNr==="true"?[{id:"faq1",ques:"What will I be charged for?",ans:`Regardless of which pricing model you choose, you only
13454
13454
  pay for compute. Storage, indexed blockchain data, the
13455
13455
  Space and Time Studio, the API gateway, and more are
13456
13456
  always included. When you choose Pay per Compute, you
@@ -1,4 +1,4 @@
1
- import{c as ye,p as It,r as Ot}from"./vendor-charts-983c7ae8.js";var Xe={},Dt={},ln={exports:{}};(function(W,D){(function(){var S="ace",M=function(){return this}();!M&&typeof window<"u"&&(M=window);var R=function(e,n,r){if(typeof e!="string"){R.original?R.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(r=n),R.modules[e]||(R.payloads[e]=r,R.modules[e]=null)};R.modules={},R.payloads={};var m=function(e,n,r){if(typeof n=="string"){var i=a(e,n);if(i!=null)return r&&r(),i}else if(Object.prototype.toString.call(n)==="[object Array]"){for(var t=[],o=0,s=n.length;o<s;++o){var u=a(e,n[o]);if(u==null&&v.original)return;t.push(u)}return r&&r.apply(null,t)||!0}},v=function(e,n){var r=m("",e,n);return r==null&&v.original?v.original.apply(this,arguments):r},y=function(e,n){if(n.indexOf("!")!==-1){var r=n.split("!");return y(e,r[0])+"!"+y(e,r[1])}if(n.charAt(0)=="."){var i=e.split("/").slice(0,-1).join("/");for(n=i+"/"+n;n.indexOf(".")!==-1&&t!=n;){var t=n;n=n.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return n},a=function(e,n){n=y(e,n);var r=R.modules[n];if(!r){if(r=R.payloads[n],typeof r=="function"){var i={},t={id:n,uri:"",exports:i,packaged:!0},o=function(u,d){return m(n,u,d)},s=r(o,i,t);i=s||t.exports,R.modules[n]=i,delete R.payloads[n]}r=R.modules[n]=i||r}return r};function l(e){var n=M;e&&(M[e]||(M[e]={}),n=M[e]),(!n.define||!n.define.packaged)&&(R.original=n.define,n.define=R,n.define.packaged=!0),(!n.require||!n.require.packaged)&&(v.original=n.require,n.require=v,n.require.packaged=!0)}l(S)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(S,M,R){function m(v,y,a){Object.defineProperty(v,y,{value:a,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||m(String.prototype,"startsWith",function(v,y){return y=y||0,this.lastIndexOf(v,y)===y}),String.prototype.endsWith||m(String.prototype,"endsWith",function(v,y){var a=this;(y===void 0||y>a.length)&&(y=a.length),y-=v.length;var l=a.indexOf(v,y);return l!==-1&&l===y}),String.prototype.repeat||m(String.prototype,"repeat",function(v){for(var y="",a=this;v>0;)v&1&&(y+=a),(v>>=1)&&(a+=a);return y}),String.prototype.includes||m(String.prototype,"includes",function(v,y){return this.indexOf(v,y)!=-1}),Object.assign||(Object.assign=function(v){if(v==null)throw new TypeError("Cannot convert undefined or null to object");for(var y=Object(v),a=1;a<arguments.length;a++){var l=arguments[a];l!=null&&Object.keys(l).forEach(function(e){y[e]=l[e]})}return y}),Object.values||(Object.values=function(v){return Object.keys(v).map(function(y){return v[y]})}),Array.prototype.find||m(Array.prototype,"find",function(v){for(var y=this.length,a=arguments[1],l=0;l<y;l++){var e=this[l];if(v.call(a,e,l,this))return e}}),Array.prototype.findIndex||m(Array.prototype,"findIndex",function(v){for(var y=this.length,a=arguments[1],l=0;l<y;l++){var e=this[l];if(v.call(a,e,l,this))return l}}),Array.prototype.includes||m(Array.prototype,"includes",function(v,y){return this.indexOf(v,y)!=-1}),Array.prototype.fill||m(Array.prototype,"fill",function(v){for(var y=this,a=y.length>>>0,l=arguments[1],e=l>>0,n=e<0?Math.max(a+e,0):Math.min(e,a),r=arguments[2],i=r===void 0?a:r>>0,t=i<0?Math.max(a+i,0):Math.min(i,a);n<t;)y[n]=v,n++;return y}),Array.of||m(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(S,M,R){S("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(S,M,R){M.deepCopy=function m(v){if(typeof v!="object"||!v)return v;var y;if(Array.isArray(v)){y=[];for(var a=0;a<v.length;a++)y[a]=m(v[a]);return y}if(Object.prototype.toString.call(v)!=="[object Object]")return v;y={};for(var a in v)y[a]=m(v[a]);return y}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(S,M,R){M.last=function(y){return y[y.length-1]},M.stringReverse=function(y){return y.split("").reverse().join("")},M.stringRepeat=function(y,a){for(var l="";a>0;)a&1&&(l+=y),(a>>=1)&&(y+=y);return l};var m=/^\s\s*/,v=/\s\s*$/;M.stringTrimLeft=function(y){return y.replace(m,"")},M.stringTrimRight=function(y){return y.replace(v,"")},M.copyObject=function(y){var a={};for(var l in y)a[l]=y[l];return a},M.copyArray=function(y){for(var a=[],l=0,e=y.length;l<e;l++)y[l]&&typeof y[l]=="object"?a[l]=this.copyObject(y[l]):a[l]=y[l];return a},M.deepCopy=S("./deep_copy").deepCopy,M.arrayToMap=function(y){for(var a={},l=0;l<y.length;l++)a[y[l]]=1;return a},M.createMap=function(y){var a=Object.create(null);for(var l in y)a[l]=y[l];return a},M.arrayRemove=function(y,a){for(var l=0;l<=y.length;l++)a===y[l]&&y.splice(l,1)},M.escapeRegExp=function(y){return y.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},M.escapeHTML=function(y){return(""+y).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},M.getMatchOffsets=function(y,a){var l=[];return y.replace(a,function(e){l.push({offset:arguments[arguments.length-2],length:e.length})}),l},M.deferredCall=function(y){var a=null,l=function(){a=null,y()},e=function(n){return e.cancel(),a=setTimeout(l,n||0),e};return e.schedule=e,e.call=function(){return this.cancel(),y(),e},e.cancel=function(){return clearTimeout(a),a=null,e},e.isPending=function(){return a},e},M.delayedCall=function(y,a){var l=null,e=function(){l=null,y()},n=function(r){l==null&&(l=setTimeout(e,r||a))};return n.delay=function(r){l&&clearTimeout(l),l=setTimeout(e,r||a)},n.schedule=n,n.call=function(){this.cancel(),y()},n.cancel=function(){l&&clearTimeout(l),l=null},n.isPending=function(){return l},n},M.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},M.skipEmptyMatch=function(y,a,l){return l&&y.codePointAt(a)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(S,M,R){M.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},M.getOS=function(){return M.isMac?M.OS.MAC:M.isLinux?M.OS.LINUX:M.OS.WINDOWS};var m=typeof navigator=="object"?navigator:{},v=(/mac|win|linux/i.exec(m.platform)||["other"])[0].toLowerCase(),y=m.userAgent||"",a=m.appName||"";M.isWin=v=="win",M.isMac=v=="mac",M.isLinux=v=="linux",M.isIE=a=="Microsoft Internet Explorer"||a.indexOf("MSAppHost")>=0?parseFloat((y.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((y.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),M.isOldIE=M.isIE&&M.isIE<9,M.isGecko=M.isMozilla=y.match(/ Gecko\/\d+/),M.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",M.isWebKit=parseFloat(y.split("WebKit/")[1])||void 0,M.isChrome=parseFloat(y.split(" Chrome/")[1])||void 0,M.isSafari=parseFloat(y.split(" Safari/")[1])&&!M.isChrome||void 0,M.isEdge=parseFloat(y.split(" Edge/")[1])||void 0,M.isAIR=y.indexOf("AdobeAIR")>=0,M.isAndroid=y.indexOf("Android")>=0,M.isChromeOS=y.indexOf(" CrOS ")>=0,M.isIOS=/iPad|iPhone|iPod/.test(y)&&!window.MSStream,M.isIOS&&(M.isMac=!0),M.isMobile=M.isIOS||M.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(S,M,R){var m=S("./useragent"),v="http://www.w3.org/1999/xhtml";M.buildDom=function r(i,t,o){if(typeof i=="string"&&i){var s=document.createTextNode(i);return t&&t.appendChild(s),s}if(!Array.isArray(i))return i&&i.appendChild&&t&&t.appendChild(i),i;if(typeof i[0]!="string"||!i[0]){for(var u=[],d=0;d<i.length;d++){var x=r(i[d],t,o);x&&u.push(x)}return u}var b=document.createElement(i[0]),g=i[1],h=1;g&&typeof g=="object"&&!Array.isArray(g)&&(h=2);for(var d=h;d<i.length;d++)r(i[d],b,o);return h==2&&Object.keys(g).forEach(function(w){var C=g[w];w==="class"?b.className=Array.isArray(C)?C.join(" "):C:typeof C=="function"||w=="value"||w[0]=="$"?b[w]=C:w==="ref"?o&&(o[C]=b):w==="style"?typeof C=="string"&&(b.style.cssText=C):C!=null&&b.setAttribute(w,C)}),t&&t.appendChild(b),b},M.getDocumentHead=function(r){return r||(r=document),r.head||r.getElementsByTagName("head")[0]||r.documentElement},M.createElement=function(r,i){return document.createElementNS?document.createElementNS(i||v,r):document.createElement(r)},M.removeChildren=function(r){r.innerHTML=""},M.createTextNode=function(r,i){var t=i?i.ownerDocument:document;return t.createTextNode(r)},M.createFragment=function(r){var i=r?r.ownerDocument:document;return i.createDocumentFragment()},M.hasCssClass=function(r,i){var t=(r.className+"").split(/\s+/g);return t.indexOf(i)!==-1},M.addCssClass=function(r,i){M.hasCssClass(r,i)||(r.className+=" "+i)},M.removeCssClass=function(r,i){for(var t=r.className.split(/\s+/g);;){var o=t.indexOf(i);if(o==-1)break;t.splice(o,1)}r.className=t.join(" ")},M.toggleCssClass=function(r,i){for(var t=r.className.split(/\s+/g),o=!0;;){var s=t.indexOf(i);if(s==-1)break;o=!1,t.splice(s,1)}return o&&t.push(i),r.className=t.join(" "),o},M.setCssClass=function(r,i,t){t?M.addCssClass(r,i):M.removeCssClass(r,i)},M.hasCssString=function(r,i){var t=0,o;if(i=i||document,o=i.querySelectorAll("style")){for(;t<o.length;)if(o[t++].id===r)return!0}},M.removeElementById=function(r,i){i=i||document,i.getElementById(r)&&i.getElementById(r).remove()};var y,a=[];M.useStrictCSP=function(r){y=r,r==!1?l():a||(a=[])};function l(){var r=a;a=null,r&&r.forEach(function(i){e(i[0],i[1])})}function e(r,i,t){if(!(typeof document>"u")){if(a){if(t)l();else if(t===!1)return a.push([r,i])}if(!y){var o=t;!t||!t.getRootNode?o=document:(o=t.getRootNode(),(!o||o==t)&&(o=document));var s=o.ownerDocument||o;if(i&&M.hasCssString(i,o))return null;i&&(r+=`
1
+ import{c as ye,p as It,r as Ot}from"./vendor-charts-c2d37c0c.js";var Xe={},Dt={},ln={exports:{}};(function(W,D){(function(){var S="ace",M=function(){return this}();!M&&typeof window<"u"&&(M=window);var R=function(e,n,r){if(typeof e!="string"){R.original?R.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(r=n),R.modules[e]||(R.payloads[e]=r,R.modules[e]=null)};R.modules={},R.payloads={};var m=function(e,n,r){if(typeof n=="string"){var i=a(e,n);if(i!=null)return r&&r(),i}else if(Object.prototype.toString.call(n)==="[object Array]"){for(var t=[],o=0,s=n.length;o<s;++o){var u=a(e,n[o]);if(u==null&&v.original)return;t.push(u)}return r&&r.apply(null,t)||!0}},v=function(e,n){var r=m("",e,n);return r==null&&v.original?v.original.apply(this,arguments):r},y=function(e,n){if(n.indexOf("!")!==-1){var r=n.split("!");return y(e,r[0])+"!"+y(e,r[1])}if(n.charAt(0)=="."){var i=e.split("/").slice(0,-1).join("/");for(n=i+"/"+n;n.indexOf(".")!==-1&&t!=n;){var t=n;n=n.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return n},a=function(e,n){n=y(e,n);var r=R.modules[n];if(!r){if(r=R.payloads[n],typeof r=="function"){var i={},t={id:n,uri:"",exports:i,packaged:!0},o=function(u,d){return m(n,u,d)},s=r(o,i,t);i=s||t.exports,R.modules[n]=i,delete R.payloads[n]}r=R.modules[n]=i||r}return r};function l(e){var n=M;e&&(M[e]||(M[e]={}),n=M[e]),(!n.define||!n.define.packaged)&&(R.original=n.define,n.define=R,n.define.packaged=!0),(!n.require||!n.require.packaged)&&(v.original=n.require,n.require=v,n.require.packaged=!0)}l(S)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(S,M,R){function m(v,y,a){Object.defineProperty(v,y,{value:a,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||m(String.prototype,"startsWith",function(v,y){return y=y||0,this.lastIndexOf(v,y)===y}),String.prototype.endsWith||m(String.prototype,"endsWith",function(v,y){var a=this;(y===void 0||y>a.length)&&(y=a.length),y-=v.length;var l=a.indexOf(v,y);return l!==-1&&l===y}),String.prototype.repeat||m(String.prototype,"repeat",function(v){for(var y="",a=this;v>0;)v&1&&(y+=a),(v>>=1)&&(a+=a);return y}),String.prototype.includes||m(String.prototype,"includes",function(v,y){return this.indexOf(v,y)!=-1}),Object.assign||(Object.assign=function(v){if(v==null)throw new TypeError("Cannot convert undefined or null to object");for(var y=Object(v),a=1;a<arguments.length;a++){var l=arguments[a];l!=null&&Object.keys(l).forEach(function(e){y[e]=l[e]})}return y}),Object.values||(Object.values=function(v){return Object.keys(v).map(function(y){return v[y]})}),Array.prototype.find||m(Array.prototype,"find",function(v){for(var y=this.length,a=arguments[1],l=0;l<y;l++){var e=this[l];if(v.call(a,e,l,this))return e}}),Array.prototype.findIndex||m(Array.prototype,"findIndex",function(v){for(var y=this.length,a=arguments[1],l=0;l<y;l++){var e=this[l];if(v.call(a,e,l,this))return l}}),Array.prototype.includes||m(Array.prototype,"includes",function(v,y){return this.indexOf(v,y)!=-1}),Array.prototype.fill||m(Array.prototype,"fill",function(v){for(var y=this,a=y.length>>>0,l=arguments[1],e=l>>0,n=e<0?Math.max(a+e,0):Math.min(e,a),r=arguments[2],i=r===void 0?a:r>>0,t=i<0?Math.max(a+i,0):Math.min(i,a);n<t;)y[n]=v,n++;return y}),Array.of||m(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(S,M,R){S("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(S,M,R){M.deepCopy=function m(v){if(typeof v!="object"||!v)return v;var y;if(Array.isArray(v)){y=[];for(var a=0;a<v.length;a++)y[a]=m(v[a]);return y}if(Object.prototype.toString.call(v)!=="[object Object]")return v;y={};for(var a in v)y[a]=m(v[a]);return y}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(S,M,R){M.last=function(y){return y[y.length-1]},M.stringReverse=function(y){return y.split("").reverse().join("")},M.stringRepeat=function(y,a){for(var l="";a>0;)a&1&&(l+=y),(a>>=1)&&(y+=y);return l};var m=/^\s\s*/,v=/\s\s*$/;M.stringTrimLeft=function(y){return y.replace(m,"")},M.stringTrimRight=function(y){return y.replace(v,"")},M.copyObject=function(y){var a={};for(var l in y)a[l]=y[l];return a},M.copyArray=function(y){for(var a=[],l=0,e=y.length;l<e;l++)y[l]&&typeof y[l]=="object"?a[l]=this.copyObject(y[l]):a[l]=y[l];return a},M.deepCopy=S("./deep_copy").deepCopy,M.arrayToMap=function(y){for(var a={},l=0;l<y.length;l++)a[y[l]]=1;return a},M.createMap=function(y){var a=Object.create(null);for(var l in y)a[l]=y[l];return a},M.arrayRemove=function(y,a){for(var l=0;l<=y.length;l++)a===y[l]&&y.splice(l,1)},M.escapeRegExp=function(y){return y.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},M.escapeHTML=function(y){return(""+y).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},M.getMatchOffsets=function(y,a){var l=[];return y.replace(a,function(e){l.push({offset:arguments[arguments.length-2],length:e.length})}),l},M.deferredCall=function(y){var a=null,l=function(){a=null,y()},e=function(n){return e.cancel(),a=setTimeout(l,n||0),e};return e.schedule=e,e.call=function(){return this.cancel(),y(),e},e.cancel=function(){return clearTimeout(a),a=null,e},e.isPending=function(){return a},e},M.delayedCall=function(y,a){var l=null,e=function(){l=null,y()},n=function(r){l==null&&(l=setTimeout(e,r||a))};return n.delay=function(r){l&&clearTimeout(l),l=setTimeout(e,r||a)},n.schedule=n,n.call=function(){this.cancel(),y()},n.cancel=function(){l&&clearTimeout(l),l=null},n.isPending=function(){return l},n},M.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},M.skipEmptyMatch=function(y,a,l){return l&&y.codePointAt(a)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(S,M,R){M.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},M.getOS=function(){return M.isMac?M.OS.MAC:M.isLinux?M.OS.LINUX:M.OS.WINDOWS};var m=typeof navigator=="object"?navigator:{},v=(/mac|win|linux/i.exec(m.platform)||["other"])[0].toLowerCase(),y=m.userAgent||"",a=m.appName||"";M.isWin=v=="win",M.isMac=v=="mac",M.isLinux=v=="linux",M.isIE=a=="Microsoft Internet Explorer"||a.indexOf("MSAppHost")>=0?parseFloat((y.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((y.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),M.isOldIE=M.isIE&&M.isIE<9,M.isGecko=M.isMozilla=y.match(/ Gecko\/\d+/),M.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",M.isWebKit=parseFloat(y.split("WebKit/")[1])||void 0,M.isChrome=parseFloat(y.split(" Chrome/")[1])||void 0,M.isSafari=parseFloat(y.split(" Safari/")[1])&&!M.isChrome||void 0,M.isEdge=parseFloat(y.split(" Edge/")[1])||void 0,M.isAIR=y.indexOf("AdobeAIR")>=0,M.isAndroid=y.indexOf("Android")>=0,M.isChromeOS=y.indexOf(" CrOS ")>=0,M.isIOS=/iPad|iPhone|iPod/.test(y)&&!window.MSStream,M.isIOS&&(M.isMac=!0),M.isMobile=M.isIOS||M.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(S,M,R){var m=S("./useragent"),v="http://www.w3.org/1999/xhtml";M.buildDom=function r(i,t,o){if(typeof i=="string"&&i){var s=document.createTextNode(i);return t&&t.appendChild(s),s}if(!Array.isArray(i))return i&&i.appendChild&&t&&t.appendChild(i),i;if(typeof i[0]!="string"||!i[0]){for(var u=[],d=0;d<i.length;d++){var x=r(i[d],t,o);x&&u.push(x)}return u}var b=document.createElement(i[0]),g=i[1],h=1;g&&typeof g=="object"&&!Array.isArray(g)&&(h=2);for(var d=h;d<i.length;d++)r(i[d],b,o);return h==2&&Object.keys(g).forEach(function(w){var C=g[w];w==="class"?b.className=Array.isArray(C)?C.join(" "):C:typeof C=="function"||w=="value"||w[0]=="$"?b[w]=C:w==="ref"?o&&(o[C]=b):w==="style"?typeof C=="string"&&(b.style.cssText=C):C!=null&&b.setAttribute(w,C)}),t&&t.appendChild(b),b},M.getDocumentHead=function(r){return r||(r=document),r.head||r.getElementsByTagName("head")[0]||r.documentElement},M.createElement=function(r,i){return document.createElementNS?document.createElementNS(i||v,r):document.createElement(r)},M.removeChildren=function(r){r.innerHTML=""},M.createTextNode=function(r,i){var t=i?i.ownerDocument:document;return t.createTextNode(r)},M.createFragment=function(r){var i=r?r.ownerDocument:document;return i.createDocumentFragment()},M.hasCssClass=function(r,i){var t=(r.className+"").split(/\s+/g);return t.indexOf(i)!==-1},M.addCssClass=function(r,i){M.hasCssClass(r,i)||(r.className+=" "+i)},M.removeCssClass=function(r,i){for(var t=r.className.split(/\s+/g);;){var o=t.indexOf(i);if(o==-1)break;t.splice(o,1)}r.className=t.join(" ")},M.toggleCssClass=function(r,i){for(var t=r.className.split(/\s+/g),o=!0;;){var s=t.indexOf(i);if(s==-1)break;o=!1,t.splice(s,1)}return o&&t.push(i),r.className=t.join(" "),o},M.setCssClass=function(r,i,t){t?M.addCssClass(r,i):M.removeCssClass(r,i)},M.hasCssString=function(r,i){var t=0,o;if(i=i||document,o=i.querySelectorAll("style")){for(;t<o.length;)if(o[t++].id===r)return!0}},M.removeElementById=function(r,i){i=i||document,i.getElementById(r)&&i.getElementById(r).remove()};var y,a=[];M.useStrictCSP=function(r){y=r,r==!1?l():a||(a=[])};function l(){var r=a;a=null,r&&r.forEach(function(i){e(i[0],i[1])})}function e(r,i,t){if(!(typeof document>"u")){if(a){if(t)l();else if(t===!1)return a.push([r,i])}if(!y){var o=t;!t||!t.getRootNode?o=document:(o=t.getRootNode(),(!o||o==t)&&(o=document));var s=o.ownerDocument||o;if(i&&M.hasCssString(i,o))return null;i&&(r+=`
2
2
  /*# sourceURL=ace/css/`+i+" */");var u=M.createElement("style");u.appendChild(s.createTextNode(r)),i&&(u.id=i),o==s&&(o=M.getDocumentHead(s)),o.insertBefore(u,o.firstChild)}}}if(M.importCssString=e,M.importCssStylsheet=function(r,i){M.buildDom(["link",{rel:"stylesheet",href:r}],M.getDocumentHead(i))},M.scrollbarWidth=function(r){var i=M.createElement("ace_inner");i.style.width="100%",i.style.minWidth="0px",i.style.height="200px",i.style.display="block";var t=M.createElement("ace_outer"),o=t.style;o.position="absolute",o.left="-10000px",o.overflow="hidden",o.width="200px",o.minWidth="0px",o.height="150px",o.display="block",t.appendChild(i);var s=r&&r.documentElement||document&&document.documentElement;if(!s)return 0;s.appendChild(t);var u=i.offsetWidth;o.overflow="scroll";var d=i.offsetWidth;return u===d&&(d=t.clientWidth),s.removeChild(t),u-d},M.computedStyle=function(r,i){return window.getComputedStyle(r,"")||{}},M.setStyle=function(r,i,t){r[i]!==t&&(r[i]=t)},M.HAS_CSS_ANIMATION=!1,M.HAS_CSS_TRANSFORMS=!1,M.HI_DPI=m.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,m.isChromeOS&&(M.HI_DPI=!1),typeof document<"u"){var n=document.createElement("div");M.HI_DPI&&n.style.transform!==void 0&&(M.HAS_CSS_TRANSFORMS=!0),!m.isEdge&&typeof n.style.animationName<"u"&&(M.HAS_CSS_ANIMATION=!0),n=null}M.HAS_CSS_TRANSFORMS?M.translate=function(r,i,t){r.style.transform="translate("+Math.round(i)+"px, "+Math.round(t)+"px)"}:M.translate=function(r,i,t){r.style.top=Math.round(t)+"px",r.style.left=Math.round(i)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(S,M,R){/*
3
3
  * based on code from:
4
4
  *
@@ -1,4 +1,4 @@
1
- import{R as fh,r as Te,s as bc,o as dv,g as pv,a as dh,_ as Hc}from"./vendor-charts-983c7ae8.js";function mv(r,e,t){return Math.max(e,Math.min(r,t))}const hn={toVector(r,e){return r===void 0&&(r=e),Array.isArray(r)?r:[r,r]},add(r,e){return[r[0]+e[0],r[1]+e[1]]},sub(r,e){return[r[0]-e[0],r[1]-e[1]]},addTo(r,e){r[0]+=e[0],r[1]+=e[1]},subTo(r,e){r[0]-=e[0],r[1]-=e[1]}};function om(r,e,t){return e===0||Math.abs(e)===1/0?Math.pow(r,t*5):r*e*t/(e+t*r)}function am(r,e,t,n=.15){return n===0?mv(r,e,t):r<e?-om(e-r,t-e,n)+e:r>t?+om(r-t,t-e,n)+t:r}function gv(r,[e,t],[n,i]){const[[s,a],[l,u]]=r;return[am(e,s,a,n),am(t,l,u,i)]}function yv(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function xv(r){var e=yv(r,"string");return typeof e=="symbol"?e:String(e)}function wn(r,e,t){return e=xv(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function lm(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Ft(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?lm(Object(t),!0).forEach(function(n){wn(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):lm(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}const $g={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function cm(r){return r?r[0].toUpperCase()+r.slice(1):""}const vv=["enter","leave"];function _v(r=!1,e){return r&&!vv.includes(e)}function wv(r,e="",t=!1){const n=$g[r],i=n&&n[e]||e;return"on"+cm(r)+cm(i)+(_v(t,i)?"Capture":"")}const Mv=["gotpointercapture","lostpointercapture"];function Sv(r){let e=r.substring(2).toLowerCase();const t=!!~e.indexOf("passive");t&&(e=e.replace("passive",""));const n=Mv.includes(e)?"capturecapture":"capture",i=!!~e.indexOf(n);return i&&(e=e.replace("capture","")),{device:e,capture:i,passive:t}}function bv(r,e=""){const t=$g[r],n=t&&t[e]||e;return r+n}function Gc(r){return"touches"in r}function e0(r){return Gc(r)?"touch":"pointerType"in r?r.pointerType:"mouse"}function Ev(r){return Array.from(r.touches).filter(e=>{var t,n;return e.target===r.currentTarget||((t=r.currentTarget)===null||t===void 0||(n=t.contains)===null||n===void 0?void 0:n.call(t,e.target))})}function Tv(r){return r.type==="touchend"||r.type==="touchcancel"?r.changedTouches:r.targetTouches}function t0(r){return Gc(r)?Tv(r)[0]:r}function Av(r){return Ev(r).map(e=>e.identifier)}function ph(r){const e=t0(r);return Gc(r)?e.identifier:e.pointerId}function um(r){const e=t0(r);return[e.clientX,e.clientY]}const hm=40,fm=800;function Cv(r){let{deltaX:e,deltaY:t,deltaMode:n}=r;return n===1?(e*=hm,t*=hm):n===2&&(e*=fm,t*=fm),[e,t]}function Rv(r){const e={};if("buttons"in r&&(e.buttons=r.buttons),"shiftKey"in r){const{shiftKey:t,altKey:n,metaKey:i,ctrlKey:s}=r;Object.assign(e,{shiftKey:t,altKey:n,metaKey:i,ctrlKey:s})}return e}function Ic(r,...e){return typeof r=="function"?r(...e):r}function Pv(){}function Lv(...r){return r.length===0?Pv:r.length===1?r[0]:function(){let e;for(const t of r)e=t.apply(this,arguments)||e;return e}}function dm(r,e){return Object.assign({},e,r||{})}const Dv=32;class Iv{constructor(e,t,n){this.ctrl=e,this.args=t,this.key=n,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(e){this.ctrl.state[this.key]=e}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:e,shared:t,ingKey:n,args:i}=this;t[n]=e._active=e.active=e._blocked=e._force=!1,e._step=[!1,!1],e.intentional=!1,e._movement=[0,0],e._distance=[0,0],e._direction=[0,0],e._delta=[0,0],e._bounds=[[-1/0,1/0],[-1/0,1/0]],e.args=i,e.axis=void 0,e.memo=void 0,e.elapsedTime=e.timeDelta=0,e.direction=[0,0],e.distance=[0,0],e.overflow=[0,0],e._movementBound=[!1,!1],e.velocity=[0,0],e.movement=[0,0],e.delta=[0,0],e.timeStamp=0}start(e){const t=this.state,n=this.config;t._active||(this.reset(),this.computeInitial(),t._active=!0,t.target=e.target,t.currentTarget=e.currentTarget,t.lastOffset=n.from?Ic(n.from,t):t.offset,t.offset=t.lastOffset,t.startTime=t.timeStamp=e.timeStamp)}computeValues(e){const t=this.state;t._values=e,t.values=this.config.transform(e)}computeInitial(){const e=this.state;e._initial=e._values,e.initial=e.values}compute(e){const{state:t,config:n,shared:i}=this;t.args=this.args;let s=0;if(e&&(t.event=e,n.preventDefault&&e.cancelable&&t.event.preventDefault(),t.type=e.type,i.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,i.locked=!!document.pointerLockElement,Object.assign(i,Rv(e)),i.down=i.pressed=i.buttons%2===1||i.touches>0,s=e.timeStamp-t.timeStamp,t.timeStamp=e.timeStamp,t.elapsedTime=t.timeStamp-t.startTime),t._active){const L=t._delta.map(Math.abs);hn.addTo(t._distance,L)}this.axisIntent&&this.axisIntent(e);const[a,l]=t._movement,[u,f]=n.threshold,{_step:p,values:g}=t;if(n.hasCustomTransform?(p[0]===!1&&(p[0]=Math.abs(a)>=u&&g[0]),p[1]===!1&&(p[1]=Math.abs(l)>=f&&g[1])):(p[0]===!1&&(p[0]=Math.abs(a)>=u&&Math.sign(a)*u),p[1]===!1&&(p[1]=Math.abs(l)>=f&&Math.sign(l)*f)),t.intentional=p[0]!==!1||p[1]!==!1,!t.intentional)return;const d=[0,0];if(n.hasCustomTransform){const[L,D]=g;d[0]=p[0]!==!1?L-p[0]:0,d[1]=p[1]!==!1?D-p[1]:0}else d[0]=p[0]!==!1?a-p[0]:0,d[1]=p[1]!==!1?l-p[1]:0;this.restrictToAxis&&!t._blocked&&this.restrictToAxis(d);const m=t.offset,x=t._active&&!t._blocked||t.active;x&&(t.first=t._active&&!t.active,t.last=!t._active&&t.active,t.active=i[this.ingKey]=t._active,e&&(t.first&&("bounds"in n&&(t._bounds=Ic(n.bounds,t)),this.setup&&this.setup()),t.movement=d,this.computeOffset()));const[y,v]=t.offset,[[M,S],[T,b]]=t._bounds;t.overflow=[y<M?-1:y>S?1:0,v<T?-1:v>b?1:0],t._movementBound[0]=t.overflow[0]?t._movementBound[0]===!1?t._movement[0]:t._movementBound[0]:!1,t._movementBound[1]=t.overflow[1]?t._movementBound[1]===!1?t._movement[1]:t._movementBound[1]:!1;const A=t._active?n.rubberband||[0,0]:[0,0];if(t.offset=gv(t._bounds,t.offset,A),t.delta=hn.sub(t.offset,m),this.computeMovement(),x&&(!t.last||s>Dv)){t.delta=hn.sub(t.offset,m);const L=t.delta.map(Math.abs);hn.addTo(t.distance,L),t.direction=t.delta.map(Math.sign),t._direction=t._delta.map(Math.sign),!t.first&&s>0&&(t.velocity=[L[0]/s,L[1]/s],t.timeDelta=s)}}emit(){const e=this.state,t=this.shared,n=this.config;if(e._active||this.clean(),(e._blocked||!e.intentional)&&!e._force&&!n.triggerAllEvents)return;const i=this.handler(Ft(Ft(Ft({},t),e),{},{[this.aliasKey]:e.values}));i!==void 0&&(e.memo=i)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function zv([r,e],t){const n=Math.abs(r),i=Math.abs(e);if(n>i&&n>t)return"x";if(i>n&&i>t)return"y"}class n0 extends Iv{constructor(...e){super(...e),wn(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=hn.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=hn.sub(this.state.offset,this.state.lastOffset)}axisIntent(e){const t=this.state,n=this.config;if(!t.axis&&e){const i=typeof n.axisThreshold=="object"?n.axisThreshold[e0(e)]:n.axisThreshold;t.axis=zv(t._movement,i)}t._blocked=(n.lockDirection||!!n.axis)&&!t.axis||!!n.axis&&n.axis!==t.axis}restrictToAxis(e){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":e[1]=0;break;case"y":e[0]=0;break}}}const Nv=r=>r,pm=.15,i0={enabled(r=!0){return r},eventOptions(r,e,t){return Ft(Ft({},t.shared.eventOptions),r)},preventDefault(r=!1){return r},triggerAllEvents(r=!1){return r},rubberband(r=0){switch(r){case!0:return[pm,pm];case!1:return[0,0];default:return hn.toVector(r)}},from(r){if(typeof r=="function")return r;if(r!=null)return hn.toVector(r)},transform(r,e,t){const n=r||t.shared.transform;return this.hasCustomTransform=!!n,n||Nv},threshold(r){return hn.toVector(r,0)}},Fv=0,bo=Ft(Ft({},i0),{},{axis(r,e,{axis:t}){if(this.lockDirection=t==="lock",!this.lockDirection)return t},axisThreshold(r=Fv){return r},bounds(r={}){if(typeof r=="function")return s=>bo.bounds(r(s));if("current"in r)return()=>r.current;if(typeof HTMLElement=="function"&&r instanceof HTMLElement)return r;const{left:e=-1/0,right:t=1/0,top:n=-1/0,bottom:i=1/0}=r;return[[e,t],[n,i]]}}),mm={ArrowRight:(r,e=1)=>[r*e,0],ArrowLeft:(r,e=1)=>[-1*r*e,0],ArrowUp:(r,e=1)=>[0,-1*r*e],ArrowDown:(r,e=1)=>[0,r*e]};class Ov extends n0{constructor(...e){super(...e),wn(this,"ingKey","dragging")}reset(){super.reset();const e=this.state;e._pointerId=void 0,e._pointerActive=!1,e._keyboardActive=!1,e._preventScroll=!1,e._delayed=!1,e.swipe=[0,0],e.tap=!1,e.canceled=!1,e.cancel=this.cancel.bind(this)}setup(){const e=this.state;if(e._bounds instanceof HTMLElement){const t=e._bounds.getBoundingClientRect(),n=e.currentTarget.getBoundingClientRect(),i={left:t.left-n.left+e.offset[0],right:t.right-n.right+e.offset[0],top:t.top-n.top+e.offset[1],bottom:t.bottom-n.bottom+e.offset[1]};e._bounds=bo.bounds(i)}}cancel(){const e=this.state;e.canceled||(e.canceled=!0,e._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(e){const t=this.config,n=this.state;if(e.buttons!=null&&(Array.isArray(t.pointerButtons)?!t.pointerButtons.includes(e.buttons):t.pointerButtons!==-1&&t.pointerButtons!==e.buttons))return;const i=this.ctrl.setEventIds(e);t.pointerCapture&&e.target.setPointerCapture(e.pointerId),!(i&&i.size>1&&n._pointerActive)&&(this.start(e),this.setupPointer(e),n._pointerId=ph(e),n._pointerActive=!0,this.computeValues(um(e)),this.computeInitial(),t.preventScrollAxis&&e0(e)!=="mouse"?(n._active=!1,this.setupScrollPrevention(e)):t.delay>0?(this.setupDelayTrigger(e),t.triggerAllEvents&&(this.compute(e),this.emit())):this.startPointerDrag(e))}startPointerDrag(e){const t=this.state;t._active=!0,t._preventScroll=!0,t._delayed=!1,this.compute(e),this.emit()}pointerMove(e){const t=this.state,n=this.config;if(!t._pointerActive)return;const i=ph(e);if(t._pointerId!==void 0&&i!==t._pointerId)return;const s=um(e);if(document.pointerLockElement===e.target?t._delta=[e.movementX,e.movementY]:(t._delta=hn.sub(s,t._values),this.computeValues(s)),hn.addTo(t._movement,t._delta),this.compute(e),t._delayed&&t.intentional){this.timeoutStore.remove("dragDelay"),t.active=!1,this.startPointerDrag(e);return}if(n.preventScrollAxis&&!t._preventScroll)if(t.axis)if(t.axis===n.preventScrollAxis||n.preventScrollAxis==="xy"){t._active=!1,this.clean();return}else{this.timeoutStore.remove("startPointerDrag"),this.startPointerDrag(e);return}else return;this.emit()}pointerUp(e){this.ctrl.setEventIds(e);try{this.config.pointerCapture&&e.target.hasPointerCapture(e.pointerId)&&e.target.releasePointerCapture(e.pointerId)}catch{}const t=this.state,n=this.config;if(!t._active||!t._pointerActive)return;const i=ph(e);if(t._pointerId!==void 0&&i!==t._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(e);const[s,a]=t._distance;if(t.tap=s<=n.tapsThreshold&&a<=n.tapsThreshold,t.tap&&n.filterTaps)t._force=!0;else{const[l,u]=t._delta,[f,p]=t._movement,[g,d]=n.swipe.velocity,[m,x]=n.swipe.distance,y=n.swipe.duration;if(t.elapsedTime<y){const v=Math.abs(l/t.timeDelta),M=Math.abs(u/t.timeDelta);v>g&&Math.abs(f)>m&&(t.swipe[0]=Math.sign(l)),M>d&&Math.abs(p)>x&&(t.swipe[1]=Math.sign(u))}}this.emit()}pointerClick(e){!this.state.tap&&e.detail>0&&(e.preventDefault(),e.stopPropagation())}setupPointer(e){const t=this.config,n=t.device;t.pointerLock&&e.currentTarget.requestPointerLock(),t.pointerCapture||(this.eventStore.add(this.sharedConfig.window,n,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(e){this.state._preventScroll&&e.cancelable&&e.preventDefault()}setupScrollPrevention(e){this.state._preventScroll=!1,Bv(e);const t=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",t),this.eventStore.add(this.sharedConfig.window,"touch","cancel",t),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,e)}setupDelayTrigger(e){this.state._delayed=!0,this.timeoutStore.add("dragDelay",()=>{this.state._step=[0,0],this.startPointerDrag(e)},this.config.delay)}keyDown(e){const t=mm[e.key];if(t){const n=this.state,i=e.shiftKey?10:e.altKey?.1:1;this.start(e),n._delta=t(this.config.keyboardDisplacement,i),n._keyboardActive=!0,hn.addTo(n._movement,n._delta),this.compute(e),this.emit()}}keyUp(e){e.key in mm&&(this.state._keyboardActive=!1,this.setActive(),this.compute(e),this.emit())}bind(e){const t=this.config.device;e(t,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(e(t,"change",this.pointerMove.bind(this)),e(t,"end",this.pointerUp.bind(this)),e(t,"cancel",this.pointerUp.bind(this)),e("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(e("key","down",this.keyDown.bind(this)),e("key","up",this.keyUp.bind(this))),this.config.filterTaps&&e("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}}function Bv(r){"persist"in r&&typeof r.persist=="function"&&r.persist()}const Ia=typeof window<"u"&&window.document&&window.document.createElement;function r0(){return Ia&&"ontouchstart"in window}function Uv(){return r0()||Ia&&window.navigator.maxTouchPoints>1}function kv(){return Ia&&"onpointerdown"in window}function Hv(){return Ia&&"exitPointerLock"in window.document}function Gv(){try{return"constructor"in GestureEvent}catch{return!1}}const Zn={isBrowser:Ia,gesture:Gv(),touch:r0(),touchscreen:Uv(),pointer:kv(),pointerLock:Hv()},Vv=250,Wv=180,qv=.5,Xv=50,jv=250,Yv=10,gm={mouse:0,touch:0,pen:8},Jv=Ft(Ft({},bo),{},{device(r,e,{pointer:{touch:t=!1,lock:n=!1,mouse:i=!1}={}}){return this.pointerLock=n&&Zn.pointerLock,Zn.touch&&t?"touch":this.pointerLock?"mouse":Zn.pointer&&!i?"pointer":Zn.touch?"touch":"mouse"},preventScrollAxis(r,e,{preventScroll:t}){if(this.preventScrollDelay=typeof t=="number"?t:t||t===void 0&&r?Vv:void 0,!(!Zn.touchscreen||t===!1))return r||(t!==void 0?"y":void 0)},pointerCapture(r,e,{pointer:{capture:t=!0,buttons:n=1,keys:i=!0}={}}){return this.pointerButtons=n,this.keys=i,!this.pointerLock&&this.device==="pointer"&&t},threshold(r,e,{filterTaps:t=!1,tapsThreshold:n=3,axis:i=void 0}){const s=hn.toVector(r,t?n:i?1:0);return this.filterTaps=t,this.tapsThreshold=n,s},swipe({velocity:r=qv,distance:e=Xv,duration:t=jv}={}){return{velocity:this.transform(hn.toVector(r)),distance:this.transform(hn.toVector(e)),duration:t}},delay(r=0){switch(r){case!0:return Wv;case!1:return 0;default:return r}},axisThreshold(r){return r?Ft(Ft({},gm),r):gm},keyboardDisplacement(r=Yv){return r}});function Zv(r){const[e,t]=r.overflow,[n,i]=r._delta,[s,a]=r._direction;(e<0&&n>0&&s<0||e>0&&n<0&&s>0)&&(r._movement[0]=r._movementBound[0]),(t<0&&i>0&&a<0||t>0&&i<0&&a>0)&&(r._movement[1]=r._movementBound[1])}Ft(Ft({},i0),{},{device(r,e,{shared:t,pointer:{touch:n=!1}={}}){if(t.target&&!Zn.touch&&Zn.gesture)return"gesture";if(Zn.touch&&n)return"touch";if(Zn.touchscreen){if(Zn.pointer)return"pointer";if(Zn.touch)return"touch"}},bounds(r,e,{scaleBounds:t={},angleBounds:n={}}){const i=a=>{const l=dm(Ic(t,a),{min:-1/0,max:1/0});return[l.min,l.max]},s=a=>{const l=dm(Ic(n,a),{min:-1/0,max:1/0});return[l.min,l.max]};return typeof t!="function"&&typeof n!="function"?[i(),s()]:a=>[i(a),s(a)]},threshold(r,e,t){return this.lockDirection=t.axis==="lock",hn.toVector(r,this.lockDirection?[.1,3]:0)},modifierKey(r){return r===void 0?"ctrlKey":r},pinchOnWheel(r=!0){return r}});Ft(Ft({},bo),{},{mouseOnly:(r=!0)=>r});class Kv extends n0{constructor(...e){super(...e),wn(this,"ingKey","wheeling")}wheel(e){this.state._active||this.start(e),this.wheelChange(e),this.timeoutStore.add("wheelEnd",this.wheelEnd.bind(this))}wheelChange(e){const t=this.state;t._delta=Cv(e),hn.addTo(t._movement,t._delta),Zv(t),this.compute(e),this.emit()}wheelEnd(){this.state._active&&(this.state._active=!1,this.compute(),this.emit())}bind(e){e("wheel","",this.wheel.bind(this))}}const Qv=bo;Ft(Ft({},bo),{},{mouseOnly:(r=!0)=>r});const kf=new Map,$h=new Map;function $v(r){kf.set(r.key,r.engine),$h.set(r.key,r.resolver)}const NA={key:"drag",engine:Ov,resolver:Jv},FA={key:"wheel",engine:Kv,resolver:Qv};function e_(r,e){if(r==null)return{};var t={},n=Object.keys(r),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(t[i]=r[i]);return t}function t_(r,e){if(r==null)return{};var t=e_(r,e),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);for(i=0;i<s.length;i++)n=s[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}const n_={target(r){if(r)return()=>"current"in r?r.current:r},enabled(r=!0){return r},window(r=Zn.isBrowser?window:void 0){return r},eventOptions({passive:r=!0,capture:e=!1}={}){return{passive:r,capture:e}},transform(r){return r}},i_=["target","eventOptions","window","enabled","transform"];function Ec(r={},e){const t={};for(const[n,i]of Object.entries(e))switch(typeof i){case"function":t[n]=i.call(t,r[n],n,r);break;case"object":t[n]=Ec(r[n],i);break;case"boolean":i&&(t[n]=r[n]);break}return t}function r_(r,e,t={}){const n=r,{target:i,eventOptions:s,window:a,enabled:l,transform:u}=n,f=t_(n,i_);if(t.shared=Ec({target:i,eventOptions:s,window:a,enabled:l,transform:u},n_),e){const p=$h.get(e);t[e]=Ec(Ft({shared:t.shared},f),p)}else for(const p in f){const g=$h.get(p);g&&(t[p]=Ec(Ft({shared:t.shared},f[p]),g))}return t}class s0{constructor(e,t){wn(this,"_listeners",new Set),this._ctrl=e,this._gestureKey=t}add(e,t,n,i,s){const a=this._listeners,l=bv(t,n),u=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},f=Ft(Ft({},u),s);e.addEventListener(l,i,f);const p=()=>{e.removeEventListener(l,i,f),a.delete(p)};return a.add(p),p}clean(){this._listeners.forEach(e=>e()),this._listeners.clear()}}class s_{constructor(){wn(this,"_timeouts",new Map)}add(e,t,n=140,...i){this.remove(e),this._timeouts.set(e,window.setTimeout(t,n,...i))}remove(e){const t=this._timeouts.get(e);t&&window.clearTimeout(t)}clean(){this._timeouts.forEach(e=>void window.clearTimeout(e)),this._timeouts.clear()}}class o_{constructor(e){wn(this,"gestures",new Set),wn(this,"_targetEventStore",new s0(this)),wn(this,"gestureEventStores",{}),wn(this,"gestureTimeoutStores",{}),wn(this,"handlers",{}),wn(this,"config",{}),wn(this,"pointerIds",new Set),wn(this,"touchIds",new Set),wn(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),a_(this,e)}setEventIds(e){if(Gc(e))return this.touchIds=new Set(Av(e)),this.touchIds;if("pointerId"in e)return e.type==="pointerup"||e.type==="pointercancel"?this.pointerIds.delete(e.pointerId):e.type==="pointerdown"&&this.pointerIds.add(e.pointerId),this.pointerIds}applyHandlers(e,t){this.handlers=e,this.nativeHandlers=t}applyConfig(e,t){this.config=r_(e,t,this.config)}clean(){this._targetEventStore.clean();for(const e of this.gestures)this.gestureEventStores[e].clean(),this.gestureTimeoutStores[e].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...e){const t=this.config.shared,n={};let i;if(!(t.target&&(i=t.target(),!i))){if(t.enabled){for(const a of this.gestures){const l=this.config[a],u=ym(n,l.eventOptions,!!i);if(l.enabled){const f=kf.get(a);new f(this,e,a).bind(u)}}const s=ym(n,t.eventOptions,!!i);for(const a in this.nativeHandlers)s(a,"",l=>this.nativeHandlers[a](Ft(Ft({},this.state.shared),{},{event:l,args:e})),void 0,!0)}for(const s in n)n[s]=Lv(...n[s]);if(!i)return n;for(const s in n){const{device:a,capture:l,passive:u}=Sv(s);this._targetEventStore.add(i,a,"",n[s],{capture:l,passive:u})}}}}function Os(r,e){r.gestures.add(e),r.gestureEventStores[e]=new s0(r,e),r.gestureTimeoutStores[e]=new s_}function a_(r,e){e.drag&&Os(r,"drag"),e.wheel&&Os(r,"wheel"),e.scroll&&Os(r,"scroll"),e.move&&Os(r,"move"),e.pinch&&Os(r,"pinch"),e.hover&&Os(r,"hover")}const ym=(r,e,t)=>(n,i,s,a={},l=!1)=>{var u,f;const p=(u=a.capture)!==null&&u!==void 0?u:e.capture,g=(f=a.passive)!==null&&f!==void 0?f:e.passive;let d=l?n:wv(n,i,p);t&&g&&(d+="Passive"),r[d]=r[d]||[],r[d].push(s)},l_=/^on(Drag|Wheel|Scroll|Move|Pinch|Hover)/;function c_(r){const e={},t={},n=new Set;for(let i in r)l_.test(i)?(n.add(RegExp.lastMatch),t[i]=r[i]):e[i]=r[i];return[t,e,n]}function Bs(r,e,t,n,i,s){if(!r.has(t)||!kf.has(n))return;const a=t+"Start",l=t+"End",u=f=>{let p;return f.first&&a in e&&e[a](f),t in e&&(p=e[t](f)),f.last&&l in e&&e[l](f),p};i[n]=u,s[n]=s[n]||{}}function u_(r,e){const[t,n,i]=c_(r),s={};return Bs(i,t,"onDrag","drag",s,e),Bs(i,t,"onWheel","wheel",s,e),Bs(i,t,"onScroll","scroll",s,e),Bs(i,t,"onPinch","pinch",s,e),Bs(i,t,"onMove","move",s,e),Bs(i,t,"onHover","hover",s,e),{handlers:s,config:e,nativeHandlers:n}}function h_(r,e={},t,n){const i=fh.useMemo(()=>new o_(r),[]);if(i.applyHandlers(r,n),i.applyConfig(e,t),fh.useEffect(i.effect.bind(i)),fh.useEffect(()=>i.clean.bind(i),[]),e.target===void 0)return i.bind.bind(i)}function OA(r){return r.forEach($v),function(t,n){const{handlers:i,nativeHandlers:s,config:a}=u_(t,n||{});return h_(i,a,void 0,s)}}/**
1
+ import{R as fh,r as Te,s as bc,o as dv,g as pv,a as dh,_ as Hc}from"./vendor-charts-c2d37c0c.js";function mv(r,e,t){return Math.max(e,Math.min(r,t))}const hn={toVector(r,e){return r===void 0&&(r=e),Array.isArray(r)?r:[r,r]},add(r,e){return[r[0]+e[0],r[1]+e[1]]},sub(r,e){return[r[0]-e[0],r[1]-e[1]]},addTo(r,e){r[0]+=e[0],r[1]+=e[1]},subTo(r,e){r[0]-=e[0],r[1]-=e[1]}};function om(r,e,t){return e===0||Math.abs(e)===1/0?Math.pow(r,t*5):r*e*t/(e+t*r)}function am(r,e,t,n=.15){return n===0?mv(r,e,t):r<e?-om(e-r,t-e,n)+e:r>t?+om(r-t,t-e,n)+t:r}function gv(r,[e,t],[n,i]){const[[s,a],[l,u]]=r;return[am(e,s,a,n),am(t,l,u,i)]}function yv(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function xv(r){var e=yv(r,"string");return typeof e=="symbol"?e:String(e)}function wn(r,e,t){return e=xv(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function lm(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Ft(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?lm(Object(t),!0).forEach(function(n){wn(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):lm(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}const $g={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function cm(r){return r?r[0].toUpperCase()+r.slice(1):""}const vv=["enter","leave"];function _v(r=!1,e){return r&&!vv.includes(e)}function wv(r,e="",t=!1){const n=$g[r],i=n&&n[e]||e;return"on"+cm(r)+cm(i)+(_v(t,i)?"Capture":"")}const Mv=["gotpointercapture","lostpointercapture"];function Sv(r){let e=r.substring(2).toLowerCase();const t=!!~e.indexOf("passive");t&&(e=e.replace("passive",""));const n=Mv.includes(e)?"capturecapture":"capture",i=!!~e.indexOf(n);return i&&(e=e.replace("capture","")),{device:e,capture:i,passive:t}}function bv(r,e=""){const t=$g[r],n=t&&t[e]||e;return r+n}function Gc(r){return"touches"in r}function e0(r){return Gc(r)?"touch":"pointerType"in r?r.pointerType:"mouse"}function Ev(r){return Array.from(r.touches).filter(e=>{var t,n;return e.target===r.currentTarget||((t=r.currentTarget)===null||t===void 0||(n=t.contains)===null||n===void 0?void 0:n.call(t,e.target))})}function Tv(r){return r.type==="touchend"||r.type==="touchcancel"?r.changedTouches:r.targetTouches}function t0(r){return Gc(r)?Tv(r)[0]:r}function Av(r){return Ev(r).map(e=>e.identifier)}function ph(r){const e=t0(r);return Gc(r)?e.identifier:e.pointerId}function um(r){const e=t0(r);return[e.clientX,e.clientY]}const hm=40,fm=800;function Cv(r){let{deltaX:e,deltaY:t,deltaMode:n}=r;return n===1?(e*=hm,t*=hm):n===2&&(e*=fm,t*=fm),[e,t]}function Rv(r){const e={};if("buttons"in r&&(e.buttons=r.buttons),"shiftKey"in r){const{shiftKey:t,altKey:n,metaKey:i,ctrlKey:s}=r;Object.assign(e,{shiftKey:t,altKey:n,metaKey:i,ctrlKey:s})}return e}function Ic(r,...e){return typeof r=="function"?r(...e):r}function Pv(){}function Lv(...r){return r.length===0?Pv:r.length===1?r[0]:function(){let e;for(const t of r)e=t.apply(this,arguments)||e;return e}}function dm(r,e){return Object.assign({},e,r||{})}const Dv=32;class Iv{constructor(e,t,n){this.ctrl=e,this.args=t,this.key=n,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(e){this.ctrl.state[this.key]=e}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:e,shared:t,ingKey:n,args:i}=this;t[n]=e._active=e.active=e._blocked=e._force=!1,e._step=[!1,!1],e.intentional=!1,e._movement=[0,0],e._distance=[0,0],e._direction=[0,0],e._delta=[0,0],e._bounds=[[-1/0,1/0],[-1/0,1/0]],e.args=i,e.axis=void 0,e.memo=void 0,e.elapsedTime=e.timeDelta=0,e.direction=[0,0],e.distance=[0,0],e.overflow=[0,0],e._movementBound=[!1,!1],e.velocity=[0,0],e.movement=[0,0],e.delta=[0,0],e.timeStamp=0}start(e){const t=this.state,n=this.config;t._active||(this.reset(),this.computeInitial(),t._active=!0,t.target=e.target,t.currentTarget=e.currentTarget,t.lastOffset=n.from?Ic(n.from,t):t.offset,t.offset=t.lastOffset,t.startTime=t.timeStamp=e.timeStamp)}computeValues(e){const t=this.state;t._values=e,t.values=this.config.transform(e)}computeInitial(){const e=this.state;e._initial=e._values,e.initial=e.values}compute(e){const{state:t,config:n,shared:i}=this;t.args=this.args;let s=0;if(e&&(t.event=e,n.preventDefault&&e.cancelable&&t.event.preventDefault(),t.type=e.type,i.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,i.locked=!!document.pointerLockElement,Object.assign(i,Rv(e)),i.down=i.pressed=i.buttons%2===1||i.touches>0,s=e.timeStamp-t.timeStamp,t.timeStamp=e.timeStamp,t.elapsedTime=t.timeStamp-t.startTime),t._active){const L=t._delta.map(Math.abs);hn.addTo(t._distance,L)}this.axisIntent&&this.axisIntent(e);const[a,l]=t._movement,[u,f]=n.threshold,{_step:p,values:g}=t;if(n.hasCustomTransform?(p[0]===!1&&(p[0]=Math.abs(a)>=u&&g[0]),p[1]===!1&&(p[1]=Math.abs(l)>=f&&g[1])):(p[0]===!1&&(p[0]=Math.abs(a)>=u&&Math.sign(a)*u),p[1]===!1&&(p[1]=Math.abs(l)>=f&&Math.sign(l)*f)),t.intentional=p[0]!==!1||p[1]!==!1,!t.intentional)return;const d=[0,0];if(n.hasCustomTransform){const[L,D]=g;d[0]=p[0]!==!1?L-p[0]:0,d[1]=p[1]!==!1?D-p[1]:0}else d[0]=p[0]!==!1?a-p[0]:0,d[1]=p[1]!==!1?l-p[1]:0;this.restrictToAxis&&!t._blocked&&this.restrictToAxis(d);const m=t.offset,x=t._active&&!t._blocked||t.active;x&&(t.first=t._active&&!t.active,t.last=!t._active&&t.active,t.active=i[this.ingKey]=t._active,e&&(t.first&&("bounds"in n&&(t._bounds=Ic(n.bounds,t)),this.setup&&this.setup()),t.movement=d,this.computeOffset()));const[y,v]=t.offset,[[M,S],[T,b]]=t._bounds;t.overflow=[y<M?-1:y>S?1:0,v<T?-1:v>b?1:0],t._movementBound[0]=t.overflow[0]?t._movementBound[0]===!1?t._movement[0]:t._movementBound[0]:!1,t._movementBound[1]=t.overflow[1]?t._movementBound[1]===!1?t._movement[1]:t._movementBound[1]:!1;const A=t._active?n.rubberband||[0,0]:[0,0];if(t.offset=gv(t._bounds,t.offset,A),t.delta=hn.sub(t.offset,m),this.computeMovement(),x&&(!t.last||s>Dv)){t.delta=hn.sub(t.offset,m);const L=t.delta.map(Math.abs);hn.addTo(t.distance,L),t.direction=t.delta.map(Math.sign),t._direction=t._delta.map(Math.sign),!t.first&&s>0&&(t.velocity=[L[0]/s,L[1]/s],t.timeDelta=s)}}emit(){const e=this.state,t=this.shared,n=this.config;if(e._active||this.clean(),(e._blocked||!e.intentional)&&!e._force&&!n.triggerAllEvents)return;const i=this.handler(Ft(Ft(Ft({},t),e),{},{[this.aliasKey]:e.values}));i!==void 0&&(e.memo=i)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function zv([r,e],t){const n=Math.abs(r),i=Math.abs(e);if(n>i&&n>t)return"x";if(i>n&&i>t)return"y"}class n0 extends Iv{constructor(...e){super(...e),wn(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=hn.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=hn.sub(this.state.offset,this.state.lastOffset)}axisIntent(e){const t=this.state,n=this.config;if(!t.axis&&e){const i=typeof n.axisThreshold=="object"?n.axisThreshold[e0(e)]:n.axisThreshold;t.axis=zv(t._movement,i)}t._blocked=(n.lockDirection||!!n.axis)&&!t.axis||!!n.axis&&n.axis!==t.axis}restrictToAxis(e){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":e[1]=0;break;case"y":e[0]=0;break}}}const Nv=r=>r,pm=.15,i0={enabled(r=!0){return r},eventOptions(r,e,t){return Ft(Ft({},t.shared.eventOptions),r)},preventDefault(r=!1){return r},triggerAllEvents(r=!1){return r},rubberband(r=0){switch(r){case!0:return[pm,pm];case!1:return[0,0];default:return hn.toVector(r)}},from(r){if(typeof r=="function")return r;if(r!=null)return hn.toVector(r)},transform(r,e,t){const n=r||t.shared.transform;return this.hasCustomTransform=!!n,n||Nv},threshold(r){return hn.toVector(r,0)}},Fv=0,bo=Ft(Ft({},i0),{},{axis(r,e,{axis:t}){if(this.lockDirection=t==="lock",!this.lockDirection)return t},axisThreshold(r=Fv){return r},bounds(r={}){if(typeof r=="function")return s=>bo.bounds(r(s));if("current"in r)return()=>r.current;if(typeof HTMLElement=="function"&&r instanceof HTMLElement)return r;const{left:e=-1/0,right:t=1/0,top:n=-1/0,bottom:i=1/0}=r;return[[e,t],[n,i]]}}),mm={ArrowRight:(r,e=1)=>[r*e,0],ArrowLeft:(r,e=1)=>[-1*r*e,0],ArrowUp:(r,e=1)=>[0,-1*r*e],ArrowDown:(r,e=1)=>[0,r*e]};class Ov extends n0{constructor(...e){super(...e),wn(this,"ingKey","dragging")}reset(){super.reset();const e=this.state;e._pointerId=void 0,e._pointerActive=!1,e._keyboardActive=!1,e._preventScroll=!1,e._delayed=!1,e.swipe=[0,0],e.tap=!1,e.canceled=!1,e.cancel=this.cancel.bind(this)}setup(){const e=this.state;if(e._bounds instanceof HTMLElement){const t=e._bounds.getBoundingClientRect(),n=e.currentTarget.getBoundingClientRect(),i={left:t.left-n.left+e.offset[0],right:t.right-n.right+e.offset[0],top:t.top-n.top+e.offset[1],bottom:t.bottom-n.bottom+e.offset[1]};e._bounds=bo.bounds(i)}}cancel(){const e=this.state;e.canceled||(e.canceled=!0,e._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(e){const t=this.config,n=this.state;if(e.buttons!=null&&(Array.isArray(t.pointerButtons)?!t.pointerButtons.includes(e.buttons):t.pointerButtons!==-1&&t.pointerButtons!==e.buttons))return;const i=this.ctrl.setEventIds(e);t.pointerCapture&&e.target.setPointerCapture(e.pointerId),!(i&&i.size>1&&n._pointerActive)&&(this.start(e),this.setupPointer(e),n._pointerId=ph(e),n._pointerActive=!0,this.computeValues(um(e)),this.computeInitial(),t.preventScrollAxis&&e0(e)!=="mouse"?(n._active=!1,this.setupScrollPrevention(e)):t.delay>0?(this.setupDelayTrigger(e),t.triggerAllEvents&&(this.compute(e),this.emit())):this.startPointerDrag(e))}startPointerDrag(e){const t=this.state;t._active=!0,t._preventScroll=!0,t._delayed=!1,this.compute(e),this.emit()}pointerMove(e){const t=this.state,n=this.config;if(!t._pointerActive)return;const i=ph(e);if(t._pointerId!==void 0&&i!==t._pointerId)return;const s=um(e);if(document.pointerLockElement===e.target?t._delta=[e.movementX,e.movementY]:(t._delta=hn.sub(s,t._values),this.computeValues(s)),hn.addTo(t._movement,t._delta),this.compute(e),t._delayed&&t.intentional){this.timeoutStore.remove("dragDelay"),t.active=!1,this.startPointerDrag(e);return}if(n.preventScrollAxis&&!t._preventScroll)if(t.axis)if(t.axis===n.preventScrollAxis||n.preventScrollAxis==="xy"){t._active=!1,this.clean();return}else{this.timeoutStore.remove("startPointerDrag"),this.startPointerDrag(e);return}else return;this.emit()}pointerUp(e){this.ctrl.setEventIds(e);try{this.config.pointerCapture&&e.target.hasPointerCapture(e.pointerId)&&e.target.releasePointerCapture(e.pointerId)}catch{}const t=this.state,n=this.config;if(!t._active||!t._pointerActive)return;const i=ph(e);if(t._pointerId!==void 0&&i!==t._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(e);const[s,a]=t._distance;if(t.tap=s<=n.tapsThreshold&&a<=n.tapsThreshold,t.tap&&n.filterTaps)t._force=!0;else{const[l,u]=t._delta,[f,p]=t._movement,[g,d]=n.swipe.velocity,[m,x]=n.swipe.distance,y=n.swipe.duration;if(t.elapsedTime<y){const v=Math.abs(l/t.timeDelta),M=Math.abs(u/t.timeDelta);v>g&&Math.abs(f)>m&&(t.swipe[0]=Math.sign(l)),M>d&&Math.abs(p)>x&&(t.swipe[1]=Math.sign(u))}}this.emit()}pointerClick(e){!this.state.tap&&e.detail>0&&(e.preventDefault(),e.stopPropagation())}setupPointer(e){const t=this.config,n=t.device;t.pointerLock&&e.currentTarget.requestPointerLock(),t.pointerCapture||(this.eventStore.add(this.sharedConfig.window,n,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(e){this.state._preventScroll&&e.cancelable&&e.preventDefault()}setupScrollPrevention(e){this.state._preventScroll=!1,Bv(e);const t=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",t),this.eventStore.add(this.sharedConfig.window,"touch","cancel",t),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,e)}setupDelayTrigger(e){this.state._delayed=!0,this.timeoutStore.add("dragDelay",()=>{this.state._step=[0,0],this.startPointerDrag(e)},this.config.delay)}keyDown(e){const t=mm[e.key];if(t){const n=this.state,i=e.shiftKey?10:e.altKey?.1:1;this.start(e),n._delta=t(this.config.keyboardDisplacement,i),n._keyboardActive=!0,hn.addTo(n._movement,n._delta),this.compute(e),this.emit()}}keyUp(e){e.key in mm&&(this.state._keyboardActive=!1,this.setActive(),this.compute(e),this.emit())}bind(e){const t=this.config.device;e(t,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(e(t,"change",this.pointerMove.bind(this)),e(t,"end",this.pointerUp.bind(this)),e(t,"cancel",this.pointerUp.bind(this)),e("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(e("key","down",this.keyDown.bind(this)),e("key","up",this.keyUp.bind(this))),this.config.filterTaps&&e("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}}function Bv(r){"persist"in r&&typeof r.persist=="function"&&r.persist()}const Ia=typeof window<"u"&&window.document&&window.document.createElement;function r0(){return Ia&&"ontouchstart"in window}function Uv(){return r0()||Ia&&window.navigator.maxTouchPoints>1}function kv(){return Ia&&"onpointerdown"in window}function Hv(){return Ia&&"exitPointerLock"in window.document}function Gv(){try{return"constructor"in GestureEvent}catch{return!1}}const Zn={isBrowser:Ia,gesture:Gv(),touch:r0(),touchscreen:Uv(),pointer:kv(),pointerLock:Hv()},Vv=250,Wv=180,qv=.5,Xv=50,jv=250,Yv=10,gm={mouse:0,touch:0,pen:8},Jv=Ft(Ft({},bo),{},{device(r,e,{pointer:{touch:t=!1,lock:n=!1,mouse:i=!1}={}}){return this.pointerLock=n&&Zn.pointerLock,Zn.touch&&t?"touch":this.pointerLock?"mouse":Zn.pointer&&!i?"pointer":Zn.touch?"touch":"mouse"},preventScrollAxis(r,e,{preventScroll:t}){if(this.preventScrollDelay=typeof t=="number"?t:t||t===void 0&&r?Vv:void 0,!(!Zn.touchscreen||t===!1))return r||(t!==void 0?"y":void 0)},pointerCapture(r,e,{pointer:{capture:t=!0,buttons:n=1,keys:i=!0}={}}){return this.pointerButtons=n,this.keys=i,!this.pointerLock&&this.device==="pointer"&&t},threshold(r,e,{filterTaps:t=!1,tapsThreshold:n=3,axis:i=void 0}){const s=hn.toVector(r,t?n:i?1:0);return this.filterTaps=t,this.tapsThreshold=n,s},swipe({velocity:r=qv,distance:e=Xv,duration:t=jv}={}){return{velocity:this.transform(hn.toVector(r)),distance:this.transform(hn.toVector(e)),duration:t}},delay(r=0){switch(r){case!0:return Wv;case!1:return 0;default:return r}},axisThreshold(r){return r?Ft(Ft({},gm),r):gm},keyboardDisplacement(r=Yv){return r}});function Zv(r){const[e,t]=r.overflow,[n,i]=r._delta,[s,a]=r._direction;(e<0&&n>0&&s<0||e>0&&n<0&&s>0)&&(r._movement[0]=r._movementBound[0]),(t<0&&i>0&&a<0||t>0&&i<0&&a>0)&&(r._movement[1]=r._movementBound[1])}Ft(Ft({},i0),{},{device(r,e,{shared:t,pointer:{touch:n=!1}={}}){if(t.target&&!Zn.touch&&Zn.gesture)return"gesture";if(Zn.touch&&n)return"touch";if(Zn.touchscreen){if(Zn.pointer)return"pointer";if(Zn.touch)return"touch"}},bounds(r,e,{scaleBounds:t={},angleBounds:n={}}){const i=a=>{const l=dm(Ic(t,a),{min:-1/0,max:1/0});return[l.min,l.max]},s=a=>{const l=dm(Ic(n,a),{min:-1/0,max:1/0});return[l.min,l.max]};return typeof t!="function"&&typeof n!="function"?[i(),s()]:a=>[i(a),s(a)]},threshold(r,e,t){return this.lockDirection=t.axis==="lock",hn.toVector(r,this.lockDirection?[.1,3]:0)},modifierKey(r){return r===void 0?"ctrlKey":r},pinchOnWheel(r=!0){return r}});Ft(Ft({},bo),{},{mouseOnly:(r=!0)=>r});class Kv extends n0{constructor(...e){super(...e),wn(this,"ingKey","wheeling")}wheel(e){this.state._active||this.start(e),this.wheelChange(e),this.timeoutStore.add("wheelEnd",this.wheelEnd.bind(this))}wheelChange(e){const t=this.state;t._delta=Cv(e),hn.addTo(t._movement,t._delta),Zv(t),this.compute(e),this.emit()}wheelEnd(){this.state._active&&(this.state._active=!1,this.compute(),this.emit())}bind(e){e("wheel","",this.wheel.bind(this))}}const Qv=bo;Ft(Ft({},bo),{},{mouseOnly:(r=!0)=>r});const kf=new Map,$h=new Map;function $v(r){kf.set(r.key,r.engine),$h.set(r.key,r.resolver)}const NA={key:"drag",engine:Ov,resolver:Jv},FA={key:"wheel",engine:Kv,resolver:Qv};function e_(r,e){if(r==null)return{};var t={},n=Object.keys(r),i,s;for(s=0;s<n.length;s++)i=n[s],!(e.indexOf(i)>=0)&&(t[i]=r[i]);return t}function t_(r,e){if(r==null)return{};var t=e_(r,e),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);for(i=0;i<s.length;i++)n=s[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}const n_={target(r){if(r)return()=>"current"in r?r.current:r},enabled(r=!0){return r},window(r=Zn.isBrowser?window:void 0){return r},eventOptions({passive:r=!0,capture:e=!1}={}){return{passive:r,capture:e}},transform(r){return r}},i_=["target","eventOptions","window","enabled","transform"];function Ec(r={},e){const t={};for(const[n,i]of Object.entries(e))switch(typeof i){case"function":t[n]=i.call(t,r[n],n,r);break;case"object":t[n]=Ec(r[n],i);break;case"boolean":i&&(t[n]=r[n]);break}return t}function r_(r,e,t={}){const n=r,{target:i,eventOptions:s,window:a,enabled:l,transform:u}=n,f=t_(n,i_);if(t.shared=Ec({target:i,eventOptions:s,window:a,enabled:l,transform:u},n_),e){const p=$h.get(e);t[e]=Ec(Ft({shared:t.shared},f),p)}else for(const p in f){const g=$h.get(p);g&&(t[p]=Ec(Ft({shared:t.shared},f[p]),g))}return t}class s0{constructor(e,t){wn(this,"_listeners",new Set),this._ctrl=e,this._gestureKey=t}add(e,t,n,i,s){const a=this._listeners,l=bv(t,n),u=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},f=Ft(Ft({},u),s);e.addEventListener(l,i,f);const p=()=>{e.removeEventListener(l,i,f),a.delete(p)};return a.add(p),p}clean(){this._listeners.forEach(e=>e()),this._listeners.clear()}}class s_{constructor(){wn(this,"_timeouts",new Map)}add(e,t,n=140,...i){this.remove(e),this._timeouts.set(e,window.setTimeout(t,n,...i))}remove(e){const t=this._timeouts.get(e);t&&window.clearTimeout(t)}clean(){this._timeouts.forEach(e=>void window.clearTimeout(e)),this._timeouts.clear()}}class o_{constructor(e){wn(this,"gestures",new Set),wn(this,"_targetEventStore",new s0(this)),wn(this,"gestureEventStores",{}),wn(this,"gestureTimeoutStores",{}),wn(this,"handlers",{}),wn(this,"config",{}),wn(this,"pointerIds",new Set),wn(this,"touchIds",new Set),wn(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),a_(this,e)}setEventIds(e){if(Gc(e))return this.touchIds=new Set(Av(e)),this.touchIds;if("pointerId"in e)return e.type==="pointerup"||e.type==="pointercancel"?this.pointerIds.delete(e.pointerId):e.type==="pointerdown"&&this.pointerIds.add(e.pointerId),this.pointerIds}applyHandlers(e,t){this.handlers=e,this.nativeHandlers=t}applyConfig(e,t){this.config=r_(e,t,this.config)}clean(){this._targetEventStore.clean();for(const e of this.gestures)this.gestureEventStores[e].clean(),this.gestureTimeoutStores[e].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...e){const t=this.config.shared,n={};let i;if(!(t.target&&(i=t.target(),!i))){if(t.enabled){for(const a of this.gestures){const l=this.config[a],u=ym(n,l.eventOptions,!!i);if(l.enabled){const f=kf.get(a);new f(this,e,a).bind(u)}}const s=ym(n,t.eventOptions,!!i);for(const a in this.nativeHandlers)s(a,"",l=>this.nativeHandlers[a](Ft(Ft({},this.state.shared),{},{event:l,args:e})),void 0,!0)}for(const s in n)n[s]=Lv(...n[s]);if(!i)return n;for(const s in n){const{device:a,capture:l,passive:u}=Sv(s);this._targetEventStore.add(i,a,"",n[s],{capture:l,passive:u})}}}}function Os(r,e){r.gestures.add(e),r.gestureEventStores[e]=new s0(r,e),r.gestureTimeoutStores[e]=new s_}function a_(r,e){e.drag&&Os(r,"drag"),e.wheel&&Os(r,"wheel"),e.scroll&&Os(r,"scroll"),e.move&&Os(r,"move"),e.pinch&&Os(r,"pinch"),e.hover&&Os(r,"hover")}const ym=(r,e,t)=>(n,i,s,a={},l=!1)=>{var u,f;const p=(u=a.capture)!==null&&u!==void 0?u:e.capture,g=(f=a.passive)!==null&&f!==void 0?f:e.passive;let d=l?n:wv(n,i,p);t&&g&&(d+="Passive"),r[d]=r[d]||[],r[d].push(s)},l_=/^on(Drag|Wheel|Scroll|Move|Pinch|Hover)/;function c_(r){const e={},t={},n=new Set;for(let i in r)l_.test(i)?(n.add(RegExp.lastMatch),t[i]=r[i]):e[i]=r[i];return[t,e,n]}function Bs(r,e,t,n,i,s){if(!r.has(t)||!kf.has(n))return;const a=t+"Start",l=t+"End",u=f=>{let p;return f.first&&a in e&&e[a](f),t in e&&(p=e[t](f)),f.last&&l in e&&e[l](f),p};i[n]=u,s[n]=s[n]||{}}function u_(r,e){const[t,n,i]=c_(r),s={};return Bs(i,t,"onDrag","drag",s,e),Bs(i,t,"onWheel","wheel",s,e),Bs(i,t,"onScroll","scroll",s,e),Bs(i,t,"onPinch","pinch",s,e),Bs(i,t,"onMove","move",s,e),Bs(i,t,"onHover","hover",s,e),{handlers:s,config:e,nativeHandlers:n}}function h_(r,e={},t,n){const i=fh.useMemo(()=>new o_(r),[]);if(i.applyHandlers(r,n),i.applyConfig(e,t),fh.useEffect(i.effect.bind(i)),fh.useEffect(()=>i.clean.bind(i),[]),e.target===void 0)return i.bind.bind(i)}function OA(r){return r.forEach($v),function(t,n){const{handlers:i,nativeHandlers:s,config:a}=u_(t,n||{});return h_(i,a,void 0,s)}}/**
2
2
  * @license
3
3
  * Copyright 2010-2022 Three.js Authors
4
4
  * SPDX-License-Identifier: MIT
package/build/index.html CHANGED
@@ -54,10 +54,10 @@
54
54
  }
55
55
  </script>
56
56
 
57
- <script type="module" crossorigin src="/assets/index-0bf8a350.js"></script>
58
- <link rel="modulepreload" crossorigin href="/assets/vendor-charts-983c7ae8.js">
59
- <link rel="modulepreload" crossorigin href="/assets/vendor-editor-a0c582a1.js">
60
- <link rel="modulepreload" crossorigin href="/assets/vendor-three-8b2e11db.js">
57
+ <script type="module" crossorigin src="/assets/index-24f62d99.js"></script>
58
+ <link rel="modulepreload" crossorigin href="/assets/vendor-charts-c2d37c0c.js">
59
+ <link rel="modulepreload" crossorigin href="/assets/vendor-editor-c82365af.js">
60
+ <link rel="modulepreload" crossorigin href="/assets/vendor-three-8b64368a.js">
61
61
  <link rel="stylesheet" href="/assets/index-b37a4a61.css">
62
62
  </head>
63
63
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaceandtimelabs/dapp-mi-space-time",
3
- "version": "0.1.7-227",
3
+ "version": "0.1.7-228",
4
4
  "private": false,
5
5
  "files": [
6
6
  "build/**/*"
@@ -1 +0,0 @@
1
- import{j as r,r as t}from"./vendor-charts-983c7ae8.js";import{O as o,Q as a}from"./index-0bf8a350.js";import"./vendor-editor-a0c582a1.js";import"./vendor-three-8b2e11db.js";function m(){return r.jsx(t.Suspense,{fallback:o,children:r.jsx(a,{})})}export{m as default};