import{r as c,ak as m,aC as i,R as r,l as d,aD as p,aE as x,aF as C,C as D,am as y,aG as R,an as E,aH as N}from"./index.e25a78a1.js";const g=C,w=o=>{const[n,a]=c.exports.useState(!1),{dataset:t}=m.exports.usePreloadedQuery(g,o),e=i(),s=r.useContext(d);return r.useLayoutEffect(()=>{const{colorscale:l,config:u,state:f}=(s==null?void 0:s.state)||{};t&&(e(()=>({colorscale:l,config:u?p(u):void 0,dataset:x(t),state:f})),a(!0))},[t,s]),[t,n]},F=({prepared:o})=>{const n=c.exports.useContext(d),[a,t]=w(o),e=D(y);if(!t)return null;if(a===null)throw new R(`/datasets/${E(n)}`);return!e||e!==a.name?null:r.createElement(N,null)},P=F;export{P as default};
