@worldresources/wri-design-systems 2.148.6 → 2.148.8
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.
- package/dist/index.cjs.js +7 -8
- package/dist/index.esm.js +874 -875
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1776,15 +1776,14 @@
|
|
|
1776
1776
|
height: 14px;
|
|
1777
1777
|
width: 14px;
|
|
1778
1778
|
}
|
|
1779
|
-
`},jn=n.forwardRef((({ariaLabel:e,icon:n,backgroundColor:o,onClick:i,showFocusState:a,count:s,mode:l,variant:c="icon"},u)=>{const d=s?(h=s)>=1e8?"99M+":h>=1e6?`${(h/1e6).toFixed(0)}M`:h>=1e5?`${(h/1e3).toFixed(0)}K`:h.toString():void 0;var h;return t.jsx("div",{css:a?
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
border: 2px solid ${p("primary",700)};
|
|
1779
|
+
`},jn=n.forwardRef((({ariaLabel:e,icon:n,backgroundColor:o,onClick:i,showFocusState:a,count:s,mode:l,variant:c="icon"},u)=>{const d=s?(h=s)>=1e8?"99M+":h>=1e6?`${(h/1e6).toFixed(0)}M`:h>=1e5?`${(h/1e3).toFixed(0)}K`:h.toString():void 0;var h;return t.jsx("div",{css:a?r.css`
|
|
1780
|
+
outline: 2px solid ${p("primary",700)};
|
|
1781
|
+
outline-offset: 2px;
|
|
1783
1782
|
border-radius: 50%;
|
|
1784
1783
|
box-shadow:
|
|
1785
1784
|
0 0 0 2px ${p("neutral",100)},
|
|
1786
1785
|
rgba(0, 0, 0, 0.05) 0px 2px 2px 4px;
|
|
1787
|
-
`):"",children:t.jsxs("button",{type:"button",css:Cn(o,!!i,!!n,l,s,c),"aria-label":e||(s?`Cluster of ${s} locations`:"simple-pin"===c?"Map pin location":"Map point"),ref:u,onClick:i,children:["cluster"===c&&d,"icon"===c&&n]})});var f})),kn={Paper:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>o.jsx(jn,{ariaLabel:e||"paper icon",icon:o.jsx(W,{color:"#79022C"}),backgroundColor:"#FFBCD4",onClick:t,ref:n,showFocusState:r}),Drop:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>o.jsx(jn,{ariaLabel:e||"drop icon",icon:o.jsx(q,{color:"#7D2A03"}),backgroundColor:"#F3A078",onClick:t,ref:n,showFocusState:r}),Plant:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>o.jsx(jn,{ariaLabel:e||"plant icon",icon:o.jsx(G,{color:"#3B6402"}),backgroundColor:"#B7E578",onClick:t,ref:n,showFocusState:r}),Point:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>o.jsx(jn,{ariaLabel:e||"point icon",backgroundColor:p("primary",500),onClick:t,ref:n,showFocusState:r})};function $n(){return"undefined"!=typeof window}function Sn(e){return On(e)?(e.nodeName||"").toLowerCase():"#document"}function En(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Rn(e){var t;return null==(t=(On(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function On(e){return!!$n()&&(e instanceof Node||e instanceof En(e).Node)}function Ln(e){return!!$n()&&(e instanceof Element||e instanceof En(e).Element)}function Tn(e){return!!$n()&&(e instanceof HTMLElement||e instanceof En(e).HTMLElement)}function Pn(e){return!(!$n()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof En(e).ShadowRoot)}const Mn=new Set(["inline","contents"]);function _n(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=qn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Mn.has(o)}const Dn=new Set(["table","td","th"]);function In(e){return Dn.has(Sn(e))}const Nn=[":popover-open",":modal"];function Vn(e){return Nn.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}const An=["transform","translate","scale","rotate","perspective"],zn=["transform","translate","scale","rotate","perspective","filter"],Bn=["paint","layout","strict","content"];function Hn(e){const t=Fn(),n=Ln(e)?qn(e):e;return An.some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||zn.some((e=>(n.willChange||"").includes(e)))||Bn.some((e=>(n.contain||"").includes(e)))}function Fn(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Zn=new Set(["html","body","#document"]);function Wn(e){return Zn.has(Sn(e))}function qn(e){return En(e).getComputedStyle(e)}function Gn(e){return Ln(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Un(e){if("html"===Sn(e))return e;const t=e.assignedSlot||e.parentNode||Pn(e)&&e.host||Rn(e);return Pn(t)?t.host:t}function Xn(e){const t=Un(e);return Wn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Tn(t)&&_n(t)?t:Xn(t)}function Yn(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Xn(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=En(o);if(i){const e=Kn(a);return t.concat(a,a.visualViewport||[],_n(o)?o:[],e&&n?Yn(e):[])}return t.concat(o,Yn(o,[],n))}function Kn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Jn=Math.min,Qn=Math.max,er=Math.round,tr=Math.floor,nr=e=>({x:e,y:e}),rr={left:"right",right:"left",bottom:"top",top:"bottom"},or={start:"end",end:"start"};function ir(e,t,n){return Qn(e,Jn(t,n))}function ar(e,t){return"function"==typeof e?e(t):e}function sr(e){return e.split("-")[0]}function lr(e){return e.split("-")[1]}function cr(e){return"x"===e?"y":"x"}function ur(e){return"y"===e?"height":"width"}const dr=new Set(["top","bottom"]);function pr(e){return dr.has(sr(e))?"y":"x"}function hr(e){return cr(pr(e))}function fr(e){return e.replace(/start|end/g,(e=>or[e]))}const xr=["left","right"],gr=["right","left"],vr=["top","bottom"],mr=["bottom","top"];function br(e,t,n,r){const o=lr(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?gr:xr:t?xr:gr;case"left":case"right":return t?vr:mr;default:return[]}}(sr(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(fr)))),i}function yr(e){return e.replace(/left|right|bottom|top/g,(e=>rr[e]))}function wr(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Cr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}const jr="data-floating-ui-focusable";function kr(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Pn(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function $r(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Sr(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function Er(e){return(null==e?void 0:e.ownerDocument)||document}function Rr(e,t,n){void 0===n&&(n=!0);return e.filter((e=>{var r;return e.parentId===t&&(!n||(null==(r=e.context)?void 0:r.open))})).flatMap((t=>[t,...Rr(e,t.id,n)]))}var Or="undefined"!=typeof document?n.useLayoutEffect:function(){};const Lr={...l}.useInsertionEffect||(e=>e());function Tr(e){const t=l.useRef((()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")}));return Lr((()=>{t.current=e})),l.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function Pr(e,t,n){let{reference:r,floating:o}=e;const i=pr(t),a=hr(t),s=ur(a),l=sr(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(lr(t)){case"start":h[a]-=p*(n&&c?-1:1);break;case"end":h[a]+=p*(n&&c?-1:1)}return h}async function Mr(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=ar(t,e),f=wr(h),x=s[p?"floating"===d?"reference":"floating":d],g=Cr(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(x)))||n?x:x.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,m=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(m))&&await(null==i.getScale?void 0:i.getScale(m))||{x:1,y:1},y=Cr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:m,strategy:l}):v);return{top:(g.top-y.top+f.top)/b.y,bottom:(y.bottom-g.bottom+f.bottom)/b.y,left:(g.left-y.left+f.left)/b.x,right:(y.right-g.right+f.right)/b.x}}const _r=new Set(["left","top"]);function Dr(e){const t=qn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Tn(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=er(n)!==i||er(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Ir(e){return Ln(e)?e:e.contextElement}function Nr(e){const t=Ir(e);if(!Tn(t))return nr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Dr(t);let a=(i?er(n.width):n.width)/r,s=(i?er(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Vr=nr(0);function Ar(e){const t=En(e);return Fn()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Vr}function zr(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Ir(e);let a=nr(1);t&&(r?Ln(r)&&(a=Nr(r)):a=Nr(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==En(e))&&t}(i,n,r)?Ar(i):nr(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=En(i),t=r&&Ln(r)?En(r):r;let n=e,o=Kn(n);for(;o&&r&&t!==n;){const e=Nr(o),t=o.getBoundingClientRect(),r=qn(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=En(o),o=Kn(n)}}return Cr({width:u,height:d,x:l,y:c})}function Br(e,t){const n=Gn(e).scrollLeft;return t?t.left+n:zr(Rn(e)).left+n}function Hr(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Br(e,n),y:n.top+t.scrollTop}}const Fr=new Set(["absolute","fixed"]);function Zr(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=En(e),r=Rn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=Fn();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}const c=Br(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else c<=25&&(i+=c);return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=Rn(e),n=Gn(e),r=e.ownerDocument.body,o=Qn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Qn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Br(e);const s=-n.scrollTop;return"rtl"===qn(r).direction&&(a+=Qn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(Rn(e));else if(Ln(t))r=function(e,t){const n=zr(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Tn(e)?Nr(e):nr(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Ar(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Cr(r)}function Wr(e,t){const n=Un(e);return!(n===t||!Ln(n)||Wn(n))&&("fixed"===qn(n).position||Wr(n,t))}function qr(e,t,n){const r=Tn(t),o=Rn(t),i="fixed"===n,a=zr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=nr(0);function c(){l.x=Br(o)}if(r||!r&&!i)if(("body"!==Sn(t)||_n(o))&&(s=Gn(t)),r){const e=zr(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=!o||r||i?nr(0):Hr(o,s);return{x:a.left+s.scrollLeft-l.x-u.x,y:a.top+s.scrollTop-l.y-u.y,width:a.width,height:a.height}}function Gr(e){return"static"===qn(e).position}function Ur(e,t){if(!Tn(e)||"fixed"===qn(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Rn(e)===n&&(n=n.ownerDocument.body),n}function Xr(e,t){const n=En(e);if(Vn(e))return n;if(!Tn(e)){let t=Un(e);for(;t&&!Wn(t);){if(Ln(t)&&!Gr(t))return t;t=Un(t)}return n}let r=Ur(e,t);for(;r&&In(r)&&Gr(r);)r=Ur(r,t);return r&&Wn(r)&&Gr(r)&&!Hn(r)?n:r||function(e){let t=Un(e);for(;Tn(t)&&!Wn(t);){if(Hn(t))return t;if(Vn(t))return null;t=Un(t)}return null}(e)||n}const Yr={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=Rn(r),s=!!t&&Vn(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=nr(1);const u=nr(0),d=Tn(r);if((d||!d&&!i)&&(("body"!==Sn(r)||_n(a))&&(l=Gn(r)),Tn(r))){const e=zr(r);c=Nr(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const p=!a||d||i?nr(0):Hr(a,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}},getDocumentElement:Rn,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?Vn(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Yn(e,[],!1).filter((e=>Ln(e)&&"body"!==Sn(e))),o=null;const i="fixed"===qn(e).position;let a=i?Un(e):e;for(;Ln(a)&&!Wn(a);){const t=qn(a),n=Hn(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&Fr.has(o.position)||_n(a)&&!n&&Wr(e,a))?r=r.filter((e=>e!==a)):o=t,a=Un(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...i,r],s=a[0],l=a.reduce(((e,n)=>{const r=Zr(t,n,o);return e.top=Qn(r.top,e.top),e.right=Jn(r.right,e.right),e.bottom=Jn(r.bottom,e.bottom),e.left=Qn(r.left,e.left),e}),Zr(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Xr,getElementRects:async function(e){const t=this.getOffsetParent||Xr,n=this.getDimensions,r=await n(e.floating);return{reference:qr(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Dr(e);return{width:t,height:n}},getScale:Nr,isElement:Ln,isRTL:function(e){return"rtl"===qn(e).direction}};function Kr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Jr(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Ir(e),u=o||i?[...c?Yn(c):[],...Yn(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const o=Rn(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:h}=c;if(s||t(),!p||!h)return;const f={rootMargin:-tr(d)+"px "+-tr(o.clientWidth-(u+p))+"px "+-tr(o.clientHeight-(d+h))+"px "+-tr(u)+"px",threshold:Qn(0,Jn(1,l))||1};let x=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!x)return a();r?a(!1,r):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==r||Kr(c,e.getBoundingClientRect())||a(),x=!1}try{r=new IntersectionObserver(g,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,f)}r.observe(e)}(!0),i}(c,n):null;let p,h=-1,f=null;a&&(f=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()})),c&&!l&&f.observe(c),f.observe(t));let x=l?zr(e):null;return l&&function t(){const r=zr(e);x&&!Kr(x,r)&&n();x=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const Qr=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=sr(n),s=lr(n),l="y"===pr(n),c=_r.has(a)?-1:1,u=i&&l?-1:1,d=ar(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof f&&(h="end"===s?-1*f:f),l?{x:h*u,y:p*c}:{x:p*c,y:h*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},eo=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=ar(e,t),c={x:n,y:r},u=await Mr(t,l),d=pr(sr(o)),p=cr(d);let h=c[p],f=c[d];if(i){const e="y"===p?"bottom":"right";h=ir(h+u["y"===p?"top":"left"],h,h-u[e])}if(a){const e="y"===d?"bottom":"right";f=ir(f+u["y"===d?"top":"left"],f,f-u[e])}const x=s.fn({...t,[p]:h,[d]:f});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[p]:i,[d]:a}}}}}},to=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:x=!0,...g}=ar(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=sr(o),m=pr(s),b=sr(s)===s,y=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=p||(b||!x?[yr(s)]:function(e){const t=yr(e);return[fr(e),t,fr(t)]}(s)),C="none"!==f;!p&&C&&w.push(...br(s,x,f,y));const j=[s,...w],k=await Mr(t,g),$=[];let S=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&$.push(k[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=lr(e),o=hr(e),i=ur(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=yr(a)),[a,yr(a)]}(o,a,y);$.push(k[e[0]],k[e[1]])}if(S=[...S,{placement:o,overflows:$}],!$.every((e=>e<=0))){var E,R;const e=((null==(E=i.flip)?void 0:E.index)||0)+1,t=j[e];if(t){if(!("alignment"===d&&m!==pr(t))||S.every((e=>pr(e.placement)!==m||e.overflows[0]>0)))return{data:{index:e,overflows:S},reset:{placement:t}}}let n=null==(R=S.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:R.placement;if(!n)switch(h){case"bestFit":{var O;const e=null==(O=S.filter((e=>{if(C){const t=pr(e.placement);return t===m||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:O[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},no=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=ar(e,t)||{};if(null==c)return{};const d=wr(u),p={x:n,y:r},h=hr(o),f=ur(h),x=await a.getDimensions(c),g="y"===h,v=g?"top":"left",m=g?"bottom":"right",b=g?"clientHeight":"clientWidth",y=i.reference[f]+i.reference[h]-p[h]-i.floating[f],w=p[h]-i.reference[h],C=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let j=C?C[b]:0;j&&await(null==a.isElement?void 0:a.isElement(C))||(j=s.floating[b]||i.floating[f]);const k=y/2-w/2,$=j/2-x[f]/2-1,S=Jn(d[v],$),E=Jn(d[m],$),R=S,O=j-x[f]-E,L=j/2-x[f]/2+k,T=ir(R,L,O),P=!l.arrow&&null!=lr(o)&&L!==T&&i.reference[f]/2-(L<R?S:E)-x[f]/2<0,M=P?L<R?L-R:L-O:0;return{[h]:p[h]+M,data:{[h]:T,centerOffset:L-T-M,...P&&{alignmentOffset:M}},reset:P}}}),ro=(e,t,n)=>{const r=new Map,o={platform:Yr,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Pr(c,r,l),p=r,h={},f=0;for(let n=0;n<s.length;n++){const{name:i,fn:x}=s[n],{x:g,y:v,data:m,reset:b}=await x({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=v?v:d,h={...h,[i]:{...h[i],...m}},b&&f<=50&&(f++,"object"==typeof b&&(b.placement&&(p=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=Pr(c,p,l))),n=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:h}})(e,t,{...o,platform:i})};var oo="undefined"!=typeof document?n.useLayoutEffect:function(){};function io(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!io(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!io(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function ao(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function so(e,t){const n=ao(e);return Math.round(t*n)/n}function lo(e){const t=l.useRef(e);return oo((()=>{t.current=e})),t}const co=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?no({element:n.current,padding:r}).fn(t):{}:n?no({element:n,padding:r}).fn(t):{};var o}}),uo=(e,t)=>({...Qr(e),options:[e,t]}),po=(e,t)=>({...eo(e),options:[e,t]}),ho=(e,t)=>({...co(e),options:[e,t]}),fo="data-floating-ui-focusable",xo="active",go="selected",vo={...l};let mo=!1,bo=0;const yo=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+bo++;const wo=vo.useId||function(){const[e,t]=l.useState((()=>mo?yo():void 0));return Or((()=>{null==e&&t(yo())}),[]),l.useEffect((()=>{mo=!0}),[]),e};let Co;"production"!==process.env.NODE_ENV&&(Co=new Set);const jo=l.createContext(null),ko=l.createContext(null),$o=()=>{var e;return(null==(e=l.useContext(jo))?void 0:e.id)||null},So=()=>l.useContext(ko);const Eo={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Ro={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Oo=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function Lo(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=wo(),i=l.useRef({}),[a]=l.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}())),s=null!=$o();if("production"!==process.env.NODE_ENV){const e=r.reference;e&&!Ln(e)&&function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var i;null!=(e=Co)&&e.has(o)||(null==(i=Co)||i.add(o),console.error(o))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,u]=l.useState(r.reference),d=Tr(((e,t,r)=>{i.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:r,nested:s}),null==n||n(e,t,r)})),p=l.useMemo((()=>({setPositionReference:u})),[]),h=l.useMemo((()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference})),[c,r.reference,r.floating]);return l.useMemo((()=>({dataRef:i,open:t,onOpenChange:d,elements:h,events:a,floatingId:o,refs:p})),[t,d,h,a,o,p])}function To(e){void 0===e&&(e={});const{nodeId:t}=e,n=Lo({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=l.useState(null),[s,u]=l.useState(null),d=(null==o?void 0:o.domReference)||i,p=l.useRef(null),h=So();Or((()=>{d&&(p.current=d)}),[d]);const f=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:u,open:d}=e,[p,h]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,x]=l.useState(r);io(f,r)||x(r);const[g,v]=l.useState(null),[m,b]=l.useState(null),y=l.useCallback((e=>{e!==k.current&&(k.current=e,v(e))}),[]),w=l.useCallback((e=>{e!==$.current&&($.current=e,b(e))}),[]),C=i||g,j=a||m,k=l.useRef(null),$=l.useRef(null),S=l.useRef(p),E=null!=u,R=lo(u),O=lo(o),L=lo(d),T=l.useCallback((()=>{if(!k.current||!$.current)return;const e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),ro(k.current,$.current,e).then((e=>{const t={...e,isPositioned:!1!==L.current};P.current&&!io(S.current,t)&&(S.current=t,c.flushSync((()=>{h(t)})))}))}),[f,t,n,O,L]);oo((()=>{!1===d&&S.current.isPositioned&&(S.current.isPositioned=!1,h((e=>({...e,isPositioned:!1}))))}),[d]);const P=l.useRef(!1);oo((()=>(P.current=!0,()=>{P.current=!1})),[]),oo((()=>{if(C&&(k.current=C),j&&($.current=j),C&&j){if(R.current)return R.current(C,j,T);T()}}),[C,j,T,R,E]);const M=l.useMemo((()=>({reference:k,floating:$,setReference:y,setFloating:w})),[y,w]),_=l.useMemo((()=>({reference:C,floating:j})),[C,j]),D=l.useMemo((()=>{const e={position:n,left:0,top:0};if(!_.floating)return e;const t=so(_.floating,p.x),r=so(_.floating,p.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...ao(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,_.floating,p.x,p.y]);return l.useMemo((()=>({...p,update:T,refs:M,elements:_,floatingStyles:D})),[p,T,M,_,D])}({...e,elements:{...o,...s&&{reference:s}}}),x=l.useCallback((e=>{const t=Ln(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),f.refs.setReference(t)}),[f.refs]),g=l.useCallback((e=>{(Ln(e)||null===e)&&(p.current=e,a(e)),(Ln(f.refs.reference.current)||null===f.refs.reference.current||null!==e&&!Ln(e))&&f.refs.setReference(e)}),[f.refs]),v=l.useMemo((()=>({...f.refs,setReference:g,setPositionReference:x,domReference:p})),[f.refs,g,x]),m=l.useMemo((()=>({...f.elements,domReference:d})),[f.elements,d]),b=l.useMemo((()=>({...f,...r,refs:v,elements:m,nodeId:t})),[f,v,m,t,r]);return Or((()=>{r.dataRef.current.floatingContext=b;const e=null==h?void 0:h.nodesRef.current.find((e=>e.id===t));e&&(e.context=b)})),l.useMemo((()=>({...f,context:b,refs:v,elements:m})),[f,v,m,b])}function Po(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[xo]:t,[go]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[fo]:""},...i,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,i]=t;var a;o&&[xo,go].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(a=r.get(n))||a.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})):e[n]=i)})),e):e),{})}}const Mo=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function _o(e,t){var n,r;void 0===t&&(t={});const{open:o,elements:i,floatingId:a}=e,{enabled:s=!0,role:c="dialog"}=t,u=wo(),d=(null==(n=i.domReference)?void 0:n.id)||u,p=l.useMemo((()=>{var e,t;return(null==(e=(t=i.floating)?t.hasAttribute(jr)?t:t.querySelector("["+jr+"]")||t:null)?void 0:e.id)||a}),[i.floating,a]),h=null!=(r=Mo.get(c))?r:c,f=null!=$o(),x=l.useMemo((()=>"tooltip"===h||"label"===c?{["aria-"+("label"===c?"labelledby":"describedby")]:o?p:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":"alertdialog"===h?"dialog":h,"aria-controls":o?p:void 0,..."listbox"===h&&{role:"combobox"},..."menu"===h&&{id:d},..."menu"===h&&f&&{role:"menuitem"},..."select"===c&&{"aria-autocomplete":"none"},..."combobox"===c&&{"aria-autocomplete":"list"}}),[h,p,f,o,d,c]),g=l.useMemo((()=>{const e={id:p,...h&&{role:h}};return"tooltip"===h||"label"===c?e:{...e,..."menu"===h&&{"aria-labelledby":d}}}),[h,p,d,c]),v=l.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:p+"-fui-option"}};switch(c){case"select":case"combobox":return{...r,"aria-selected":n}}return{}}),[p,c]);return l.useMemo((()=>s?{reference:x,floating:g,item:v}:{}),[s,x,g,v])}const Do=r.css`
|
|
1786
|
+
`:"",children:t.jsxs("button",{type:"button",css:Cn(o,!!i,!!n,l,s,c),"aria-label":e||(s?`Cluster of ${s} locations`:"simple-pin"===c?"Map pin location":"Map point"),ref:u,onClick:i,children:["cluster"===c&&d,"icon"===c&&n]})})})),kn={Paper:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>o.jsx(jn,{ariaLabel:e||"paper icon",icon:o.jsx(W,{color:"#79022C"}),backgroundColor:"#FFBCD4",onClick:t,ref:n,showFocusState:r}),Drop:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>o.jsx(jn,{ariaLabel:e||"drop icon",icon:o.jsx(q,{color:"#7D2A03"}),backgroundColor:"#F3A078",onClick:t,ref:n,showFocusState:r}),Plant:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>o.jsx(jn,{ariaLabel:e||"plant icon",icon:o.jsx(G,{color:"#3B6402"}),backgroundColor:"#B7E578",onClick:t,ref:n,showFocusState:r}),Point:({ariaLabel:e,onClick:t,triggerRef:n,showFocusState:r})=>o.jsx(jn,{ariaLabel:e||"point icon",backgroundColor:p("primary",500),onClick:t,ref:n,showFocusState:r})};function $n(){return"undefined"!=typeof window}function Sn(e){return On(e)?(e.nodeName||"").toLowerCase():"#document"}function En(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Rn(e){var t;return null==(t=(On(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function On(e){return!!$n()&&(e instanceof Node||e instanceof En(e).Node)}function Ln(e){return!!$n()&&(e instanceof Element||e instanceof En(e).Element)}function Tn(e){return!!$n()&&(e instanceof HTMLElement||e instanceof En(e).HTMLElement)}function Pn(e){return!(!$n()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof En(e).ShadowRoot)}const Mn=new Set(["inline","contents"]);function _n(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=qn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Mn.has(o)}const Dn=new Set(["table","td","th"]);function In(e){return Dn.has(Sn(e))}const Nn=[":popover-open",":modal"];function Vn(e){return Nn.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}const An=["transform","translate","scale","rotate","perspective"],zn=["transform","translate","scale","rotate","perspective","filter"],Bn=["paint","layout","strict","content"];function Hn(e){const t=Fn(),n=Ln(e)?qn(e):e;return An.some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||zn.some((e=>(n.willChange||"").includes(e)))||Bn.some((e=>(n.contain||"").includes(e)))}function Fn(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Zn=new Set(["html","body","#document"]);function Wn(e){return Zn.has(Sn(e))}function qn(e){return En(e).getComputedStyle(e)}function Gn(e){return Ln(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Un(e){if("html"===Sn(e))return e;const t=e.assignedSlot||e.parentNode||Pn(e)&&e.host||Rn(e);return Pn(t)?t.host:t}function Xn(e){const t=Un(e);return Wn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Tn(t)&&_n(t)?t:Xn(t)}function Yn(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Xn(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=En(o);if(i){const e=Kn(a);return t.concat(a,a.visualViewport||[],_n(o)?o:[],e&&n?Yn(e):[])}return t.concat(o,Yn(o,[],n))}function Kn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Jn=Math.min,Qn=Math.max,er=Math.round,tr=Math.floor,nr=e=>({x:e,y:e}),rr={left:"right",right:"left",bottom:"top",top:"bottom"},or={start:"end",end:"start"};function ir(e,t,n){return Qn(e,Jn(t,n))}function ar(e,t){return"function"==typeof e?e(t):e}function sr(e){return e.split("-")[0]}function lr(e){return e.split("-")[1]}function cr(e){return"x"===e?"y":"x"}function ur(e){return"y"===e?"height":"width"}const dr=new Set(["top","bottom"]);function pr(e){return dr.has(sr(e))?"y":"x"}function hr(e){return cr(pr(e))}function fr(e){return e.replace(/start|end/g,(e=>or[e]))}const xr=["left","right"],gr=["right","left"],vr=["top","bottom"],mr=["bottom","top"];function br(e,t,n,r){const o=lr(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?gr:xr:t?xr:gr;case"left":case"right":return t?vr:mr;default:return[]}}(sr(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(fr)))),i}function yr(e){return e.replace(/left|right|bottom|top/g,(e=>rr[e]))}function wr(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Cr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}const jr="data-floating-ui-focusable";function kr(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Pn(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function $r(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Sr(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function Er(e){return(null==e?void 0:e.ownerDocument)||document}function Rr(e,t,n){void 0===n&&(n=!0);return e.filter((e=>{var r;return e.parentId===t&&(!n||(null==(r=e.context)?void 0:r.open))})).flatMap((t=>[t,...Rr(e,t.id,n)]))}var Or="undefined"!=typeof document?n.useLayoutEffect:function(){};const Lr={...l}.useInsertionEffect||(e=>e());function Tr(e){const t=l.useRef((()=>{if("production"!==process.env.NODE_ENV)throw new Error("Cannot call an event handler while rendering.")}));return Lr((()=>{t.current=e})),l.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}function Pr(e,t,n){let{reference:r,floating:o}=e;const i=pr(t),a=hr(t),s=ur(a),l=sr(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(lr(t)){case"start":h[a]-=p*(n&&c?-1:1);break;case"end":h[a]+=p*(n&&c?-1:1)}return h}async function Mr(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=ar(t,e),f=wr(h),x=s[p?"floating"===d?"reference":"floating":d],g=Cr(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(x)))||n?x:x.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,m=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(m))&&await(null==i.getScale?void 0:i.getScale(m))||{x:1,y:1},y=Cr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:m,strategy:l}):v);return{top:(g.top-y.top+f.top)/b.y,bottom:(y.bottom-g.bottom+f.bottom)/b.y,left:(g.left-y.left+f.left)/b.x,right:(y.right-g.right+f.right)/b.x}}const _r=new Set(["left","top"]);function Dr(e){const t=qn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Tn(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=er(n)!==i||er(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Ir(e){return Ln(e)?e:e.contextElement}function Nr(e){const t=Ir(e);if(!Tn(t))return nr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Dr(t);let a=(i?er(n.width):n.width)/r,s=(i?er(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Vr=nr(0);function Ar(e){const t=En(e);return Fn()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Vr}function zr(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Ir(e);let a=nr(1);t&&(r?Ln(r)&&(a=Nr(r)):a=Nr(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==En(e))&&t}(i,n,r)?Ar(i):nr(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=En(i),t=r&&Ln(r)?En(r):r;let n=e,o=Kn(n);for(;o&&r&&t!==n;){const e=Nr(o),t=o.getBoundingClientRect(),r=qn(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=En(o),o=Kn(n)}}return Cr({width:u,height:d,x:l,y:c})}function Br(e,t){const n=Gn(e).scrollLeft;return t?t.left+n:zr(Rn(e)).left+n}function Hr(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Br(e,n),y:n.top+t.scrollTop}}const Fr=new Set(["absolute","fixed"]);function Zr(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=En(e),r=Rn(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=Fn();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}const c=Br(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else c<=25&&(i+=c);return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=Rn(e),n=Gn(e),r=e.ownerDocument.body,o=Qn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Qn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Br(e);const s=-n.scrollTop;return"rtl"===qn(r).direction&&(a+=Qn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(Rn(e));else if(Ln(t))r=function(e,t){const n=zr(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Tn(e)?Nr(e):nr(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Ar(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Cr(r)}function Wr(e,t){const n=Un(e);return!(n===t||!Ln(n)||Wn(n))&&("fixed"===qn(n).position||Wr(n,t))}function qr(e,t,n){const r=Tn(t),o=Rn(t),i="fixed"===n,a=zr(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=nr(0);function c(){l.x=Br(o)}if(r||!r&&!i)if(("body"!==Sn(t)||_n(o))&&(s=Gn(t)),r){const e=zr(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=!o||r||i?nr(0):Hr(o,s);return{x:a.left+s.scrollLeft-l.x-u.x,y:a.top+s.scrollTop-l.y-u.y,width:a.width,height:a.height}}function Gr(e){return"static"===qn(e).position}function Ur(e,t){if(!Tn(e)||"fixed"===qn(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Rn(e)===n&&(n=n.ownerDocument.body),n}function Xr(e,t){const n=En(e);if(Vn(e))return n;if(!Tn(e)){let t=Un(e);for(;t&&!Wn(t);){if(Ln(t)&&!Gr(t))return t;t=Un(t)}return n}let r=Ur(e,t);for(;r&&In(r)&&Gr(r);)r=Ur(r,t);return r&&Wn(r)&&Gr(r)&&!Hn(r)?n:r||function(e){let t=Un(e);for(;Tn(t)&&!Wn(t);){if(Hn(t))return t;if(Vn(t))return null;t=Un(t)}return null}(e)||n}const Yr={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=Rn(r),s=!!t&&Vn(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=nr(1);const u=nr(0),d=Tn(r);if((d||!d&&!i)&&(("body"!==Sn(r)||_n(a))&&(l=Gn(r)),Tn(r))){const e=zr(r);c=Nr(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const p=!a||d||i?nr(0):Hr(a,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}},getDocumentElement:Rn,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?Vn(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Yn(e,[],!1).filter((e=>Ln(e)&&"body"!==Sn(e))),o=null;const i="fixed"===qn(e).position;let a=i?Un(e):e;for(;Ln(a)&&!Wn(a);){const t=qn(a),n=Hn(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&Fr.has(o.position)||_n(a)&&!n&&Wr(e,a))?r=r.filter((e=>e!==a)):o=t,a=Un(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...i,r],s=a[0],l=a.reduce(((e,n)=>{const r=Zr(t,n,o);return e.top=Qn(r.top,e.top),e.right=Jn(r.right,e.right),e.bottom=Jn(r.bottom,e.bottom),e.left=Qn(r.left,e.left),e}),Zr(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Xr,getElementRects:async function(e){const t=this.getOffsetParent||Xr,n=this.getDimensions,r=await n(e.floating);return{reference:qr(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Dr(e);return{width:t,height:n}},getScale:Nr,isElement:Ln,isRTL:function(e){return"rtl"===qn(e).direction}};function Kr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Jr(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Ir(e),u=o||i?[...c?Yn(c):[],...Yn(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const o=Rn(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:p,height:h}=c;if(s||t(),!p||!h)return;const f={rootMargin:-tr(d)+"px "+-tr(o.clientWidth-(u+p))+"px "+-tr(o.clientHeight-(d+h))+"px "+-tr(u)+"px",threshold:Qn(0,Jn(1,l))||1};let x=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!x)return a();r?a(!1,r):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==r||Kr(c,e.getBoundingClientRect())||a(),x=!1}try{r=new IntersectionObserver(g,{...f,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,f)}r.observe(e)}(!0),i}(c,n):null;let p,h=-1,f=null;a&&(f=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()})),c&&!l&&f.observe(c),f.observe(t));let x=l?zr(e):null;return l&&function t(){const r=zr(e);x&&!Kr(x,r)&&n();x=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=f)||e.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const Qr=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=sr(n),s=lr(n),l="y"===pr(n),c=_r.has(a)?-1:1,u=i&&l?-1:1,d=ar(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:f}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof f&&(h="end"===s?-1*f:f),l?{x:h*u,y:p*c}:{x:p*c,y:h*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},eo=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=ar(e,t),c={x:n,y:r},u=await Mr(t,l),d=pr(sr(o)),p=cr(d);let h=c[p],f=c[d];if(i){const e="y"===p?"bottom":"right";h=ir(h+u["y"===p?"top":"left"],h,h-u[e])}if(a){const e="y"===d?"bottom":"right";f=ir(f+u["y"===d?"top":"left"],f,f-u[e])}const x=s.fn({...t,[p]:h,[d]:f});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[p]:i,[d]:a}}}}}},to=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:x=!0,...g}=ar(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=sr(o),m=pr(s),b=sr(s)===s,y=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=p||(b||!x?[yr(s)]:function(e){const t=yr(e);return[fr(e),t,fr(t)]}(s)),C="none"!==f;!p&&C&&w.push(...br(s,x,f,y));const j=[s,...w],k=await Mr(t,g),$=[];let S=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&$.push(k[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=lr(e),o=hr(e),i=ur(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=yr(a)),[a,yr(a)]}(o,a,y);$.push(k[e[0]],k[e[1]])}if(S=[...S,{placement:o,overflows:$}],!$.every((e=>e<=0))){var E,R;const e=((null==(E=i.flip)?void 0:E.index)||0)+1,t=j[e];if(t){if(!("alignment"===d&&m!==pr(t))||S.every((e=>pr(e.placement)!==m||e.overflows[0]>0)))return{data:{index:e,overflows:S},reset:{placement:t}}}let n=null==(R=S.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:R.placement;if(!n)switch(h){case"bestFit":{var O;const e=null==(O=S.filter((e=>{if(C){const t=pr(e.placement);return t===m||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:O[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},no=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=ar(e,t)||{};if(null==c)return{};const d=wr(u),p={x:n,y:r},h=hr(o),f=ur(h),x=await a.getDimensions(c),g="y"===h,v=g?"top":"left",m=g?"bottom":"right",b=g?"clientHeight":"clientWidth",y=i.reference[f]+i.reference[h]-p[h]-i.floating[f],w=p[h]-i.reference[h],C=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let j=C?C[b]:0;j&&await(null==a.isElement?void 0:a.isElement(C))||(j=s.floating[b]||i.floating[f]);const k=y/2-w/2,$=j/2-x[f]/2-1,S=Jn(d[v],$),E=Jn(d[m],$),R=S,O=j-x[f]-E,L=j/2-x[f]/2+k,T=ir(R,L,O),P=!l.arrow&&null!=lr(o)&&L!==T&&i.reference[f]/2-(L<R?S:E)-x[f]/2<0,M=P?L<R?L-R:L-O:0;return{[h]:p[h]+M,data:{[h]:T,centerOffset:L-T-M,...P&&{alignmentOffset:M}},reset:P}}}),ro=(e,t,n)=>{const r=new Map,o={platform:Yr,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Pr(c,r,l),p=r,h={},f=0;for(let n=0;n<s.length;n++){const{name:i,fn:x}=s[n],{x:g,y:v,data:m,reset:b}=await x({x:u,y:d,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=v?v:d,h={...h,[i]:{...h[i],...m}},b&&f<=50&&(f++,"object"==typeof b&&(b.placement&&(p=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=Pr(c,p,l))),n=-1)}return{x:u,y:d,placement:p,strategy:o,middlewareData:h}})(e,t,{...o,platform:i})};var oo="undefined"!=typeof document?n.useLayoutEffect:function(){};function io(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!io(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!io(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function ao(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function so(e,t){const n=ao(e);return Math.round(t*n)/n}function lo(e){const t=l.useRef(e);return oo((()=>{t.current=e})),t}const co=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?no({element:n.current,padding:r}).fn(t):{}:n?no({element:n,padding:r}).fn(t):{};var o}}),uo=(e,t)=>({...Qr(e),options:[e,t]}),po=(e,t)=>({...eo(e),options:[e,t]}),ho=(e,t)=>({...co(e),options:[e,t]}),fo="data-floating-ui-focusable",xo="active",go="selected",vo={...l};let mo=!1,bo=0;const yo=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+bo++;const wo=vo.useId||function(){const[e,t]=l.useState((()=>mo?yo():void 0));return Or((()=>{null==e&&t(yo())}),[]),l.useEffect((()=>{mo=!0}),[]),e};let Co;"production"!==process.env.NODE_ENV&&(Co=new Set);const jo=l.createContext(null),ko=l.createContext(null),$o=()=>{var e;return(null==(e=l.useContext(jo))?void 0:e.id)||null},So=()=>l.useContext(ko);const Eo={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Ro={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Oo=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function Lo(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=wo(),i=l.useRef({}),[a]=l.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;null==(r=e.get(t))||r.delete(n)}}}())),s=null!=$o();if("production"!==process.env.NODE_ENV){const e=r.reference;e&&!Ln(e)&&function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];const o="Floating UI: "+n.join(" ");var i;null!=(e=Co)&&e.has(o)||(null==(i=Co)||i.add(o),console.error(o))}("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `refs.setPositionReference()`","instead.")}const[c,u]=l.useState(r.reference),d=Tr(((e,t,r)=>{i.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:r,nested:s}),null==n||n(e,t,r)})),p=l.useMemo((()=>({setPositionReference:u})),[]),h=l.useMemo((()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference})),[c,r.reference,r.floating]);return l.useMemo((()=>({dataRef:i,open:t,onOpenChange:d,elements:h,events:a,floatingId:o,refs:p})),[t,d,h,a,o,p])}function To(e){void 0===e&&(e={});const{nodeId:t}=e,n=Lo({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=l.useState(null),[s,u]=l.useState(null),d=(null==o?void 0:o.domReference)||i,p=l.useRef(null),h=So();Or((()=>{d&&(p.current=d)}),[d]);const f=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:u,open:d}=e,[p,h]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,x]=l.useState(r);io(f,r)||x(r);const[g,v]=l.useState(null),[m,b]=l.useState(null),y=l.useCallback((e=>{e!==k.current&&(k.current=e,v(e))}),[]),w=l.useCallback((e=>{e!==$.current&&($.current=e,b(e))}),[]),C=i||g,j=a||m,k=l.useRef(null),$=l.useRef(null),S=l.useRef(p),E=null!=u,R=lo(u),O=lo(o),L=lo(d),T=l.useCallback((()=>{if(!k.current||!$.current)return;const e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),ro(k.current,$.current,e).then((e=>{const t={...e,isPositioned:!1!==L.current};P.current&&!io(S.current,t)&&(S.current=t,c.flushSync((()=>{h(t)})))}))}),[f,t,n,O,L]);oo((()=>{!1===d&&S.current.isPositioned&&(S.current.isPositioned=!1,h((e=>({...e,isPositioned:!1}))))}),[d]);const P=l.useRef(!1);oo((()=>(P.current=!0,()=>{P.current=!1})),[]),oo((()=>{if(C&&(k.current=C),j&&($.current=j),C&&j){if(R.current)return R.current(C,j,T);T()}}),[C,j,T,R,E]);const M=l.useMemo((()=>({reference:k,floating:$,setReference:y,setFloating:w})),[y,w]),_=l.useMemo((()=>({reference:C,floating:j})),[C,j]),D=l.useMemo((()=>{const e={position:n,left:0,top:0};if(!_.floating)return e;const t=so(_.floating,p.x),r=so(_.floating,p.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...ao(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,_.floating,p.x,p.y]);return l.useMemo((()=>({...p,update:T,refs:M,elements:_,floatingStyles:D})),[p,T,M,_,D])}({...e,elements:{...o,...s&&{reference:s}}}),x=l.useCallback((e=>{const t=Ln(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),f.refs.setReference(t)}),[f.refs]),g=l.useCallback((e=>{(Ln(e)||null===e)&&(p.current=e,a(e)),(Ln(f.refs.reference.current)||null===f.refs.reference.current||null!==e&&!Ln(e))&&f.refs.setReference(e)}),[f.refs]),v=l.useMemo((()=>({...f.refs,setReference:g,setPositionReference:x,domReference:p})),[f.refs,g,x]),m=l.useMemo((()=>({...f.elements,domReference:d})),[f.elements,d]),b=l.useMemo((()=>({...f,...r,refs:v,elements:m,nodeId:t})),[f,v,m,t,r]);return Or((()=>{r.dataRef.current.floatingContext=b;const e=null==h?void 0:h.nodesRef.current.find((e=>e.id===t));e&&(e.context=b)})),l.useMemo((()=>({...f,context:b,refs:v,elements:m})),[f,v,m,b])}function Po(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[xo]:t,[go]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[fo]:""},...i,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,i]=t;var a;o&&[xo,go].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(a=r.get(n))||a.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})):e[n]=i)})),e):e),{})}}const Mo=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function _o(e,t){var n,r;void 0===t&&(t={});const{open:o,elements:i,floatingId:a}=e,{enabled:s=!0,role:c="dialog"}=t,u=wo(),d=(null==(n=i.domReference)?void 0:n.id)||u,p=l.useMemo((()=>{var e,t;return(null==(e=(t=i.floating)?t.hasAttribute(jr)?t:t.querySelector("["+jr+"]")||t:null)?void 0:e.id)||a}),[i.floating,a]),h=null!=(r=Mo.get(c))?r:c,f=null!=$o(),x=l.useMemo((()=>"tooltip"===h||"label"===c?{["aria-"+("label"===c?"labelledby":"describedby")]:o?p:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":"alertdialog"===h?"dialog":h,"aria-controls":o?p:void 0,..."listbox"===h&&{role:"combobox"},..."menu"===h&&{id:d},..."menu"===h&&f&&{role:"menuitem"},..."select"===c&&{"aria-autocomplete":"none"},..."combobox"===c&&{"aria-autocomplete":"list"}}),[h,p,f,o,d,c]),g=l.useMemo((()=>{const e={id:p,...h&&{role:h}};return"tooltip"===h||"label"===c?e:{...e,..."menu"===h&&{"aria-labelledby":d}}}),[h,p,d,c]),v=l.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:p+"-fui-option"}};switch(c){case"select":case"combobox":return{...r,"aria-selected":n}}return{}}),[p,c]);return l.useMemo((()=>s?{reference:x,floating:g,item:v}:{}),[s,x,g,v])}const Do=r.css`
|
|
1788
1787
|
height: auto;
|
|
1789
1788
|
max-height: 512px;
|
|
1790
1789
|
width: 100%;
|
|
@@ -2656,7 +2655,7 @@ function Fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
2656
2655
|
display: flex;
|
|
2657
2656
|
justify-content: center;
|
|
2658
2657
|
align-items: center;
|
|
2659
|
-
`,Ph=(e,t)=>e.findIndex((e=>e.value===t)),Mh=(e,t)=>r.css`
|
|
2658
|
+
`,Ph=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),Mh=(e,t)=>r.css`
|
|
2660
2659
|
height: ${e?"96px":"48px"};
|
|
2661
2660
|
width: 100%;
|
|
2662
2661
|
background-color: ${p("neutral",100)};
|
|
@@ -3231,7 +3230,7 @@ function Fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3231
3230
|
opacity: 1;
|
|
3232
3231
|
}
|
|
3233
3232
|
}
|
|
3234
|
-
`,pf=(e,t)=>e.findIndex((e=>e.value===t)),hf=e=>1===e?"none":2===e?"left":"right",ff=r.css`
|
|
3233
|
+
`,pf=(e,t)=>Math.max(0,e.findIndex((e=>e.value===t))),hf=e=>1===e?"none":2===e?"left":"right",ff=r.css`
|
|
3235
3234
|
height: 28px;
|
|
3236
3235
|
width: 28px;
|
|
3237
3236
|
border-radius: 50%;
|
|
@@ -3555,7 +3554,7 @@ function Fd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Obj
|
|
|
3555
3554
|
padding: 0px;
|
|
3556
3555
|
padding-top: 8px;
|
|
3557
3556
|
color: ${i?p("neutral",500):"inherit"};
|
|
3558
|
-
`),children:o.children}):null]},`${o.label}-${o.value}`);var i,a}))})}),exports.CloseButton=re,exports.ClusterPoint=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:i,variant:a="cluster"})=>o.jsx(jn,{count:r,mode:i,onClick:e,ref:t,showFocusState:n,variant:a}),exports.ExtendableCard=({children:n,header:r,footer:o})=>t.jsx(e.Box,{css:Ki,children:t.jsx(e.Accordion.Root,{multiple:!0,children:t.jsxs(e.Accordion.Item,{value:"extendable-card-item",children:[t.jsxs(e.Accordion.ItemTrigger,{css:Ji,alignItems:"center",children:[t.jsx(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"center",children:r}),t.jsx(e.Accordion.ItemIndicator,{children:t.jsx(k,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsxs(e.Accordion.ItemContent,{children:[n,o]})]})})}),exports.Footer=({children:e,label:n="© World Resources Institute",fixed:r,filled:o,maxWidth:i})=>{const a=(new Date).getFullYear();return t.jsx("footer",{css:kh(r,o),children:t.jsxs("div",{css:$h(i),children:[t.jsx("div",{children:t.jsx(D,{height:"32px",width:"91px"})}),t.jsx("div",{css:Sh,children:e}),t.jsx("div",{children:t.jsxs("p",{css:Eh,children:[n," ",a]})})]})})},exports.IconButton=ne,exports.IconMarker=jn,exports.IconMarkers=kn,exports.InlineMessage=({label:e,caption:n,variant:r,size:o="large",icon:i=t.jsx(j,{height:"16px",width:"16px"}),onActionClick:a,actionLabel:s,isButtonRight:l})=>{let c=Of;return"info-grey"===r?c=Lf:"success"===r?c=Tf:"warning"===r?c=Pf:"error"===r&&(c=Mf),t.jsxs("div",{css:[$f(o,l),c],"aria-roledescription":"Note",children:[t.jsxs("div",{children:[t.jsxs("div",{css:Sf,children:[i,t.jsx("p",{css:Ef(o),children:e})]}),t.jsx("p",{css:Rf(o),children:n})]}),s?t.jsx(m,{label:s,variant:"info-white"===r||"info-grey"===r?"primary":"secondary",size:"large"===o?"default":"small",onClick:a}):null]})},exports.InputWithUnits=({label:r,caption:o,errorMessage:i,units:a,unitsPosition:s="end",defaultUnit:l="",defaultValue:c="",onChange:u,required:d,disabled:p})=>{const[h,f]=n.useState(c),[x,g]=n.useState(l?[l]:[a[0].value]),v=(e,t)=>{u&&u("end"===s?""+(t?`${h} ${e}`:`${e} ${x}`):""+(t?`${e} ${h}`:`${x} ${e}`))};return t.jsxs("div",{css:ot,children:[i?t.jsx("div",{css:st}):null,t.jsxs("div",{style:{marginLeft:i?"19px":"0px"},children:[t.jsxs("p",{css:it(p),"aria-label":r,children:[d?t.jsx("span",{children:"*"}):null,r]}),t.jsx("p",{css:at(p),"aria-label":o,children:o}),i?t.jsx("p",{css:lt,"aria-label":i,children:i}):null,t.jsxs(e.Group,{css:ct(!!i,s),attached:!0,children:["start"===s?t.jsx(Ht,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null,t.jsx(gt,{type:"number",value:h,disabled:p,onChange:e=>{f(e.target.value),v(e.target.value)}}),"end"===s?t.jsx(Ht,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=Ri,exports.LayerGroup=({label:r,caption:o,value:i,layerItems:a,onChangeForRadioVariant:s})=>{const[l,c]=n.useState({}),[u]=n.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(a));n.useEffect((()=>{let e={...l};a.forEach((t=>{t.isDefaultSelected&&(e={...e,["radio"===t.variant?r:t.name]:t.isDefaultSelected})})),c(e)}),[]);const d=(e,t,n,r)=>{const o={...l,[e]:t};c(o),n&&n(e,t,r)},p=Object.values(l).filter((e=>!0===e)).length,h=`${r}, ${p} Active layers on the map${o?`, ${o}`:""}`;return t.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[t.jsxs(e.Accordion.ItemTrigger,{css:Bo,alignItems:"flex-start","aria-label":h,children:[t.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[t.jsxs("span",{css:Ho,children:[r,t.jsx(At,{label:`${p} Active`,size:"small",variant:p>0?"success":"info-grey"})]}),t.jsx("div",{css:Fo,children:o})]}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx(k,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{paddingLeft:"16px",paddingRight:"16px",children:t.jsx(ze,{name:r,defaultValue:u,customGap:"0px",onChange:(e,t)=>d(e,!!t,s,t),children:a.map((e=>t.jsx(Xo,{...e,onChange:(t,n)=>d(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:n,defaultValue:r,...o})=>t.jsx("div",{css:zo,style:{width:"100%"},children:t.jsx(e.Accordion.Root,{css:{},defaultValue:r,multiple:!0,...o,children:n})}),exports.LayerItem=Xo,exports.LayerParameters=({label:r,children:o,openedByDefault:i})=>t.jsx("div",{children:t.jsx(e.Accordion.Root,{defaultValue:i?[r]:[],multiple:!0,children:t.jsxs(e.Accordion.Item,{css:Yo,value:r,children:[t.jsxs(e.Accordion.ItemTrigger,{css:Ko,children:[t.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:t.jsx("p",{css:Jo,children:r})}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx(k,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{css:Qo,children:n.Children.map(o,(e=>t.jsx("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:n,onDrag:r,onUpClick:o,onDownClick:i,onRemoveClick:a,children:s,onInfoClick:l,onOpacityChanged:c})=>t.jsxs("div",{css:ei,children:[t.jsxs("div",{css:ti,children:[t.jsx(ne,{icon:t.jsx(T,{}),"aria-label":"Drag and drop","aria-hidden":!0,onClick:r,style:{display:"none",marginBottom:"12px"}}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[t.jsx(ne,{icon:t.jsx(k,{rotate:"180"}),"aria-label":"Up",onClick:o}),t.jsx(ne,{icon:t.jsx(k,{}),"aria-label":"Down",onClick:i})]})]}),t.jsxs("div",{style:{width:"100%"},children:[t.jsxs("div",{css:ni,children:[t.jsxs("div",{children:[t.jsx("h3",{css:ri,children:e}),t.jsx("p",{css:oi,children:n})]}),t.jsx(m,{label:"Remove",size:"small",variant:"secondary",rightIcon:t.jsx(E,{}),onClick:a})]}),s,t.jsxs("div",{css:ii,children:[t.jsx(m,{label:"About data",size:"small",variant:"secondary",leftIcon:t.jsx(j,{}),onClick:l}),t.jsx(ui,{defaultValue:80,onOpacityChanged:c})]})]})]}),exports.List=({items:n,noBorder:r})=>t.jsx(e.Box,{css:Oi(r),children:n.map((e=>t.jsx(Ii,{id:e.id,icon:e.icon,label:e.label,caption:e.caption,value:e.value,variant:e.variant??"data",onItemClick:e.onItemClick},e.id??e.label)))}),exports.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:t,onExpandClick:n,onShareClick:r,onPrintClick:i,onSettingsClick:a,onQuestionClick:s,vertical:l,expanded:c,showExpandedToggle:u,ariaLabel:d})=>{const p=[{icon:o.jsx(N,{}),label:"Zoom in",ariaLabel:"zoom in",onClick:e},{icon:o.jsx(V,{}),label:"Zoom out",ariaLabel:"zoom out",onClick:t,gap:!0},{icon:o.jsx(A,{}),label:"Expand",ariaLabel:"expand",onClick:n,gap:!0},{icon:o.jsx(z,{}),label:"Share",ariaLabel:"share",onClick:r,gap:!0},{icon:o.jsx(B,{}),label:"Print",ariaLabel:"print",onClick:i,gap:!0},{icon:o.jsx(H,{}),label:"Settings",ariaLabel:"settings",onClick:a,gap:!0},{icon:o.jsx(F,{}),label:"Help",ariaLabel:"question",onClick:s}];return o.jsx(fe,{items:p,vertical:l,expanded:c,showExpandedToggle:u,ariaLabel:d||"Map controls toolbar"})},exports.MapPopUp=({open:e,onOpenChange:r,anchorRef:o,header:i,content:a,footer:s,placement:c="bottom",offset:u=30,closeOnEscape:d=!0,closeOnOutsideClick:p=!1})=>{const h=n.useRef(null),{refs:f,floatingStyles:x,context:g,middlewareData:v,placement:m}=To({open:e,onOpenChange:r,placement:c,whileElementsMounted:Jr,middleware:[uo(u),(b={fallbackAxisSideDirection:"start"},{...to(b),options:[b,y]}),po({padding:8}),ho({element:h})]});var b,y;n.useEffect((()=>{o?.current&&f.setReference(o.current)}),[o,f]);const w=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:p="pointerdown",ancestorScroll:h=!1,bubbles:f,capture:x}=t,g=So(),v=Tr("function"==typeof c?c:()=>!1),m="function"==typeof c?v:c,b=l.useRef(!1),{escapeKey:y,outsidePress:w}=Oo(f),{escapeKey:C,outsidePress:j}=Oo(x),k=l.useRef(!1),$=Tr((e=>{var t;if(!n||!a||!s||"Escape"!==e.key)return;if(k.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,l=g?Rr(g.nodesRef.current,o):[];if(!y&&(e.stopPropagation(),l.length>0)){let e=!0;if(l.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),S=Tr((e=>{var t;const n=()=>{var t;$(e),null==(t=$r(e))||t.removeEventListener("keydown",n)};null==(t=$r(e))||t.addEventListener("keydown",n)})),E=Tr((e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const a=b.current;if(b.current=!1,"click"===u&&a)return;if(n)return;if("function"==typeof m&&!m(e))return;const s=$r(e),l="[data-floating-ui-inert]",c=Er(o.floating).querySelectorAll(l);let d=Ln(s)?s:null;for(;d&&!Wn(d);){const e=Un(d);if(Wn(e)||!Ln(e))break;d=e}if(c.length&&Ln(s)&&!s.matches("html,body")&&!kr(s,o.floating)&&Array.from(c).every((e=>!kr(d,e))))return;if(Tn(s)&&L){const t=Wn(s),n=qn(s),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),a=o&&s.clientWidth>0&&s.scrollWidth>s.clientWidth,l=i&&s.clientHeight>0&&s.scrollHeight>s.clientHeight,c="rtl"===n.direction,u=l&&(c?e.offsetX<=s.offsetWidth-s.clientWidth:e.offsetX>s.clientWidth),d=a&&e.offsetY>s.clientHeight;if(u||d)return}const p=null==(t=i.current.floatingContext)?void 0:t.nodeId,h=g&&Rr(g.nodesRef.current,p).some((t=>{var n;return Sr(e,null==(n=t.context)?void 0:n.elements.floating)}));if(Sr(e,o.floating)||Sr(e,o.domReference)||h)return;const f=g?Rr(g.nodesRef.current,p):[];if(f.length>0){let e=!0;if(f.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}r(!1,e,"outside-press")})),R=Tr((e=>{var t;const n=()=>{var t;E(e),null==(t=$r(e))||t.removeEventListener(u,n)};null==(t=$r(e))||t.addEventListener(u,n)}));l.useEffect((()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=y,i.current.__outsidePressBubbles=w;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),k.current=!0}function c(){e=window.setTimeout((()=>{k.current=!1}),Fn()?5:0)}const d=Er(o.floating);s&&(d.addEventListener("keydown",C?S:$,C),d.addEventListener("compositionstart",l),d.addEventListener("compositionend",c)),m&&d.addEventListener(u,j?R:E,j);let p=[];return h&&(Ln(o.domReference)&&(p=Yn(o.domReference)),Ln(o.floating)&&(p=p.concat(Yn(o.floating))),!Ln(o.reference)&&o.reference&&o.reference.contextElement&&(p=p.concat(Yn(o.reference.contextElement)))),p=p.filter((e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)})),p.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{s&&(d.removeEventListener("keydown",C?S:$,C),d.removeEventListener("compositionstart",l),d.removeEventListener("compositionend",c)),m&&d.removeEventListener(u,j?R:E,j),p.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,s,m,u,n,r,h,a,y,w,$,C,S,E,j,R]),l.useEffect((()=>{i.current.insideReactTree=!1}),[i,m,u]);const O=l.useMemo((()=>({onKeyDown:$,...d&&{[Eo[p]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==p&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[$,r,d,p]),L=l.useMemo((()=>({onKeyDown:$,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[Ro[u]]:()=>{i.current.insideReactTree=!0}})),[$,u,i]);return l.useMemo((()=>a?{reference:O,floating:L}:{}),[a,O,L])}(g,{escapeKey:d,outsidePress:p}),C=_o(g,{role:"dialog"}),{getFloatingProps:j}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),o=l.useCallback((t=>Po(t,e,"reference")),t),i=l.useCallback((t=>Po(t,e,"floating")),n),a=l.useCallback((t=>Po(t,e,"item")),r);return l.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a})),[o,i,a])}([w,C]),{x:k,y:$}=v.arrow??{x:null,y:null},S={top:"bottom",right:"left",bottom:"top",left:"right"}[m.split("-")[0]];if(!e)return null;let E=u-1,R=4;return"left"!==S&&"right"!==S||(E=4,R=u-1),t.jsxs(t.Fragment,{children:[t.jsxs("div",{ref:f.setFloating,style:x,"aria-modal":!0,...j(),css:Do,children:[t.jsxs("div",{css:Io,children:[i,t.jsx(re,{onClick:()=>r(!1),className:"ds-map-pop-up-close-button","aria-label":"Close"})]}),t.jsx("div",{css:No,children:a}),s?t.jsx("div",{css:Vo,children:s}):null,t.jsx("div",{ref:h,css:Ao(E,R,k,$,S,u)})]}),t.jsx("div",{className:"fixed inset-0 z-[999] bg-black/20 backdrop-blur-[1px]",onClick:()=>p&&r(!1)})]})},exports.Menu=de,exports.MobileTabBar=({defaultValue:r,tabs:o,onTabClick:i,hideLabels:a,activationMode:s="manual"})=>{const[l,c]=n.useState(Ph(o,r)||0);return t.jsx("div",{css:Rh,children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:r||o?.[0]?.value,onValueChange:({value:e})=>{return c(Ph(o,t=e)),void(i&&i(t));var t},activationMode:s,children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map((n=>{const{label:r,icon:o,bagdeCount:i,"aria-label":s,...l}=n;return t.jsxs(e.Tabs.Trigger,{css:Oh,"aria-label":s||r,...l,children:[t.jsxs("div",{css:Lh,children:[o,i?t.jsx("div",{css:Th,className:"ds-badge-count",children:i}):null]}),a?null:t.jsx("p",{children:r})]},r)}))})})})},exports.Modal=({header:n,content:r,footer:o,size:i="medium",draggable:a,blocking:s,open:l,onClose:c})=>l?t.jsx(e.Dialog.Root,{open:l,onOpenChange:c,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!a&&!s,preventScroll:!a&&!s,closeOnEscape:!s,defaultOpen:!0,children:t.jsxs(e.Portal,{children:[a?null:t.jsx(e.Dialog.Backdrop,{}),t.jsx(es,{disabled:!a,children:t.jsx(e.Dialog.Positioner,{children:t.jsxs(e.Dialog.Content,{css:ts(i),children:[t.jsxs(e.Dialog.Header,{css:ns,children:[n,s?null:t.jsx(e.Dialog.CloseTrigger,{css:rs,asChild:!0,children:t.jsx(re,{})})]}),t.jsx(e.Dialog.Body,{css:os,children:r}),o?t.jsx(e.Dialog.Footer,{padding:"12px",children:o}):null]})})})]})}):null,exports.MultiActionButton=({variant:r="primary",size:o="default",mainActionLabel:i,mainActionOnClick:a=()=>{},otherActions:s=[],disabled:l,...c})=>{const[u,d]=n.useState(!1),h=l?`${i} action button with menu, disabled`:void 0;return t.jsxs(e.Group,{css:me,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":h,role:"group",children:[t.jsx(m,{css:{},label:i,variant:r,size:o,onClick:a,disabled:l,...c}),t.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>d(e),positioning:{placement:"bottom-end"},children:[t.jsx(e.Menu.Trigger,{css:ge(r),"data-group-item":!0,"data-last":!0,asChild:!0,children:t.jsx(m,{variant:r,size:o,leftIcon:t.jsx(k,{rotate:u?"180":"0",color:p("accessible","text-on-primary-mids")||p("primary",900)}),disabled:l})}),t.jsx(be,{children:s.map((({label:n,value:r,onClick:i})=>t.jsx(e.Menu.Item,{css:ve(o),onClick:i,value:r,children:n},r)))})]})]})},exports.Navbar=({logo:e,linkRouter:o,pathname:i,navigationSection:a,utilitySection:s,actionsSection:l,maxWidth:c,fixed:u,onNavbarHeightChange:d})=>{const h=n.useRef(null),f=n.useRef(null),x=n.useRef(null),[g,v]=n.useState(!1),[b,y]=n.useState(-1),[w,C]=n.useState("undefined"!=typeof window&&window?.innerWidth<=ef),[j,k]=n.useState(!1),$=o,S=n.useCallback((()=>{if(f.current&&h.current&&x.current){const e=h.current.getBoundingClientRect(),t=f.current.getBoundingClientRect(),n=x.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=ef||window.innerWidth<=b?(d?.(96),v(!0)):window.innerWidth>ef&&window.innerWidth<=1440?e.right>=t.left?(d?.(96),v(!0),y(window.innerWidth)):window.innerWidth>b&&(d?.(48),v(!1),y(-1)):(d?.(48),v(!1),y(-1)),g&&(window.innerWidth<=ef||n.right>=t.left?(C(!0),d?.(48)):(C(!1),d?.(96)))}}),[b,g]);return n.useEffect((()=>(S(),window.addEventListener("resize",S),()=>{window.removeEventListener("resize",S)})),[S]),t.jsxs("nav",{css:Mh(g&&!w,u),children:[t.jsxs("div",{css:Dh(g&&!w,c),children:[t.jsxs("div",{css:(R=g&&!w,r.css`
|
|
3557
|
+
`),children:o.children}):null]},`${o.label}-${o.value}`);var i,a}))})}),exports.CloseButton=re,exports.ClusterPoint=({onClick:e,triggerRef:t,showFocusState:n,count:r,mode:i,variant:a="cluster"})=>o.jsx(jn,{count:r,mode:i,onClick:e,ref:t,showFocusState:n,variant:a}),exports.ExtendableCard=({children:n,header:r,footer:o})=>t.jsx(e.Box,{css:Ki,children:t.jsx(e.Accordion.Root,{multiple:!0,children:t.jsxs(e.Accordion.Item,{value:"extendable-card-item",children:[t.jsxs(e.Accordion.ItemTrigger,{css:Ji,alignItems:"center",children:[t.jsx(e.Flex,{gap:3,flex:"1",overflow:"hidden",alignItems:"center",children:r}),t.jsx(e.Accordion.ItemIndicator,{children:t.jsx(k,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsxs(e.Accordion.ItemContent,{children:[n,o]})]})})}),exports.Footer=({children:e,label:n="© World Resources Institute",fixed:r,filled:o,maxWidth:i})=>{const a=(new Date).getFullYear();return t.jsx("footer",{css:kh(r,o),children:t.jsxs("div",{css:$h(i),children:[t.jsx("div",{children:t.jsx(D,{height:"32px",width:"91px"})}),t.jsx("div",{css:Sh,children:e}),t.jsx("div",{children:t.jsxs("p",{css:Eh,children:[n," ",a]})})]})})},exports.IconButton=ne,exports.IconMarker=jn,exports.IconMarkers=kn,exports.InlineMessage=({label:e,caption:n,variant:r,size:o="large",icon:i=t.jsx(j,{height:"16px",width:"16px"}),onActionClick:a,actionLabel:s,isButtonRight:l})=>{let c=Of;return"info-grey"===r?c=Lf:"success"===r?c=Tf:"warning"===r?c=Pf:"error"===r&&(c=Mf),t.jsxs("div",{css:[$f(o,l),c],"aria-roledescription":"Note",children:[t.jsxs("div",{children:[t.jsxs("div",{css:Sf,children:[i,t.jsx("p",{css:Ef(o),children:e})]}),t.jsx("p",{css:Rf(o),children:n})]}),s?t.jsx(m,{label:s,variant:"info-white"===r||"info-grey"===r?"primary":"secondary",size:"large"===o?"default":"small",onClick:a}):null]})},exports.InputWithUnits=({label:r,caption:o,errorMessage:i,units:a,unitsPosition:s="end",defaultUnit:l="",defaultValue:c="",onChange:u,required:d,disabled:p})=>{const[h,f]=n.useState(c),[x,g]=n.useState(l?[l]:[a[0].value]),v=(e,t)=>{u&&u("end"===s?""+(t?`${h} ${e}`:`${e} ${x}`):""+(t?`${e} ${h}`:`${x} ${e}`))};return t.jsxs("div",{css:ot,children:[i?t.jsx("div",{css:st}):null,t.jsxs("div",{style:{marginLeft:i?"19px":"0px"},children:[t.jsxs("p",{css:it(p),"aria-label":r,children:[d?t.jsx("span",{children:"*"}):null,r]}),t.jsx("p",{css:at(p),"aria-label":o,children:o}),i?t.jsx("p",{css:lt,"aria-label":i,children:i}):null,t.jsxs(e.Group,{css:ct(!!i,s),attached:!0,children:["start"===s?t.jsx(Ht,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null,t.jsx(gt,{type:"number",value:h,disabled:p,onChange:e=>{f(e.target.value),v(e.target.value)}}),"end"===s?t.jsx(Ht,{placeholder:"",value:x,items:a,disabled:p,onChange:e=>{g(e),v(e?.[0],!0)}}):null]})]})]})},exports.ItemCount=Ri,exports.LayerGroup=({label:r,caption:o,value:i,layerItems:a,onChangeForRadioVariant:s})=>{const[l,c]=n.useState({}),[u]=n.useState((e=>{const t=e.find((e=>"radio"===e.variant&&e.isDefaultSelected));return t?.name})(a));n.useEffect((()=>{let e={...l};a.forEach((t=>{t.isDefaultSelected&&(e={...e,["radio"===t.variant?r:t.name]:t.isDefaultSelected})})),c(e)}),[]);const d=(e,t,n,r)=>{const o={...l,[e]:t};c(o),n&&n(e,t,r)},p=Object.values(l).filter((e=>!0===e)).length,h=`${r}, ${p} Active layers on the map${o?`, ${o}`:""}`;return t.jsxs(e.Accordion.Item,{value:i,width:"100%",children:[t.jsxs(e.Accordion.ItemTrigger,{css:Bo,alignItems:"flex-start","aria-label":h,children:[t.jsxs(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:[t.jsxs("span",{css:Ho,children:[r,t.jsx(At,{label:`${p} Active`,size:"small",variant:p>0?"success":"info-grey"})]}),t.jsx("div",{css:Fo,children:o})]}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx(k,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{paddingLeft:"16px",paddingRight:"16px",children:t.jsx(ze,{name:r,defaultValue:u,customGap:"0px",onChange:(e,t)=>d(e,!!t,s,t),children:a.map((e=>t.jsx(Xo,{...e,onChange:(t,n)=>d(t,n,e.onChange)},e.label)))})})]})},exports.LayerGroupContainer=({children:n,defaultValue:r,...o})=>t.jsx("div",{css:zo,style:{width:"100%"},children:t.jsx(e.Accordion.Root,{css:{},defaultValue:r,multiple:!0,...o,children:n})}),exports.LayerItem=Xo,exports.LayerParameters=({label:r,children:o,openedByDefault:i})=>t.jsx("div",{children:t.jsx(e.Accordion.Root,{defaultValue:i?[r]:[],multiple:!0,children:t.jsxs(e.Accordion.Item,{css:Yo,value:r,children:[t.jsxs(e.Accordion.ItemTrigger,{css:Ko,children:[t.jsx(e.Box,{width:"full",display:"flex",flexDirection:"column",alignItems:"flex-start",children:t.jsx("p",{css:Jo,children:r})}),t.jsx(e.Accordion.ItemIndicator,{display:"flex",children:t.jsx(k,{color:"var(--chakra-colors-neutral-700)",height:"16px",width:"16px"})})]}),t.jsx(e.Accordion.ItemContent,{css:Qo,children:n.Children.map(o,(e=>t.jsx("div",{className:"ds-layer-parameters-item-child",children:e})))})]})})}),exports.LegendItem=({layerName:e,dataUnit:n,onDrag:r,onUpClick:o,onDownClick:i,onRemoveClick:a,children:s,onInfoClick:l,onOpacityChanged:c})=>t.jsxs("div",{css:ei,children:[t.jsxs("div",{css:ti,children:[t.jsx(ne,{icon:t.jsx(T,{}),"aria-label":"Drag and drop","aria-hidden":!0,onClick:r,style:{display:"none",marginBottom:"12px"}}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[t.jsx(ne,{icon:t.jsx(k,{rotate:"180"}),"aria-label":"Up",onClick:o}),t.jsx(ne,{icon:t.jsx(k,{}),"aria-label":"Down",onClick:i})]})]}),t.jsxs("div",{style:{width:"100%"},children:[t.jsxs("div",{css:ni,children:[t.jsxs("div",{children:[t.jsx("h3",{css:ri,children:e}),t.jsx("p",{css:oi,children:n})]}),t.jsx(m,{label:"Remove",size:"small",variant:"secondary",rightIcon:t.jsx(E,{}),onClick:a})]}),s,t.jsxs("div",{css:ii,children:[t.jsx(m,{label:"About data",size:"small",variant:"secondary",leftIcon:t.jsx(j,{}),onClick:l}),t.jsx(ui,{defaultValue:80,onOpacityChanged:c})]})]})]}),exports.List=({items:n,noBorder:r})=>t.jsx(e.Box,{css:Oi(r),children:n.map((e=>t.jsx(Ii,{id:e.id,icon:e.icon,label:e.label,caption:e.caption,value:e.value,variant:e.variant??"data",onItemClick:e.onItemClick},e.id??e.label)))}),exports.MapControlsToolbar=({onZoomInClick:e,onZoomOutClick:t,onExpandClick:n,onShareClick:r,onPrintClick:i,onSettingsClick:a,onQuestionClick:s,vertical:l,expanded:c,showExpandedToggle:u,ariaLabel:d})=>{const p=[{icon:o.jsx(N,{}),label:"Zoom in",ariaLabel:"zoom in",onClick:e},{icon:o.jsx(V,{}),label:"Zoom out",ariaLabel:"zoom out",onClick:t,gap:!0},{icon:o.jsx(A,{}),label:"Expand",ariaLabel:"expand",onClick:n,gap:!0},{icon:o.jsx(z,{}),label:"Share",ariaLabel:"share",onClick:r,gap:!0},{icon:o.jsx(B,{}),label:"Print",ariaLabel:"print",onClick:i,gap:!0},{icon:o.jsx(H,{}),label:"Settings",ariaLabel:"settings",onClick:a,gap:!0},{icon:o.jsx(F,{}),label:"Help",ariaLabel:"question",onClick:s}];return o.jsx(fe,{items:p,vertical:l,expanded:c,showExpandedToggle:u,ariaLabel:d||"Map controls toolbar"})},exports.MapPopUp=({open:e,onOpenChange:r,anchorRef:o,header:i,content:a,footer:s,placement:c="bottom",offset:u=30,closeOnEscape:d=!0,closeOnOutsideClick:p=!1})=>{const h=n.useRef(null),{refs:f,floatingStyles:x,context:g,middlewareData:v,placement:m}=To({open:e,onOpenChange:r,placement:c,whileElementsMounted:Jr,middleware:[uo(u),(b={fallbackAxisSideDirection:"start"},{...to(b),options:[b,y]}),po({padding:8}),ho({element:h})]});var b,y;n.useEffect((()=>{o?.current&&f.setReference(o.current)}),[o,f]);const w=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:p="pointerdown",ancestorScroll:h=!1,bubbles:f,capture:x}=t,g=So(),v=Tr("function"==typeof c?c:()=>!1),m="function"==typeof c?v:c,b=l.useRef(!1),{escapeKey:y,outsidePress:w}=Oo(f),{escapeKey:C,outsidePress:j}=Oo(x),k=l.useRef(!1),$=Tr((e=>{var t;if(!n||!a||!s||"Escape"!==e.key)return;if(k.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,l=g?Rr(g.nodesRef.current,o):[];if(!y&&(e.stopPropagation(),l.length>0)){let e=!0;if(l.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),S=Tr((e=>{var t;const n=()=>{var t;$(e),null==(t=$r(e))||t.removeEventListener("keydown",n)};null==(t=$r(e))||t.addEventListener("keydown",n)})),E=Tr((e=>{var t;const n=i.current.insideReactTree;i.current.insideReactTree=!1;const a=b.current;if(b.current=!1,"click"===u&&a)return;if(n)return;if("function"==typeof m&&!m(e))return;const s=$r(e),l="[data-floating-ui-inert]",c=Er(o.floating).querySelectorAll(l);let d=Ln(s)?s:null;for(;d&&!Wn(d);){const e=Un(d);if(Wn(e)||!Ln(e))break;d=e}if(c.length&&Ln(s)&&!s.matches("html,body")&&!kr(s,o.floating)&&Array.from(c).every((e=>!kr(d,e))))return;if(Tn(s)&&L){const t=Wn(s),n=qn(s),r=/auto|scroll/,o=t||r.test(n.overflowX),i=t||r.test(n.overflowY),a=o&&s.clientWidth>0&&s.scrollWidth>s.clientWidth,l=i&&s.clientHeight>0&&s.scrollHeight>s.clientHeight,c="rtl"===n.direction,u=l&&(c?e.offsetX<=s.offsetWidth-s.clientWidth:e.offsetX>s.clientWidth),d=a&&e.offsetY>s.clientHeight;if(u||d)return}const p=null==(t=i.current.floatingContext)?void 0:t.nodeId,h=g&&Rr(g.nodesRef.current,p).some((t=>{var n;return Sr(e,null==(n=t.context)?void 0:n.elements.floating)}));if(Sr(e,o.floating)||Sr(e,o.domReference)||h)return;const f=g?Rr(g.nodesRef.current,p):[];if(f.length>0){let e=!0;if(f.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}r(!1,e,"outside-press")})),R=Tr((e=>{var t;const n=()=>{var t;E(e),null==(t=$r(e))||t.removeEventListener(u,n)};null==(t=$r(e))||t.addEventListener(u,n)}));l.useEffect((()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=y,i.current.__outsidePressBubbles=w;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),k.current=!0}function c(){e=window.setTimeout((()=>{k.current=!1}),Fn()?5:0)}const d=Er(o.floating);s&&(d.addEventListener("keydown",C?S:$,C),d.addEventListener("compositionstart",l),d.addEventListener("compositionend",c)),m&&d.addEventListener(u,j?R:E,j);let p=[];return h&&(Ln(o.domReference)&&(p=Yn(o.domReference)),Ln(o.floating)&&(p=p.concat(Yn(o.floating))),!Ln(o.reference)&&o.reference&&o.reference.contextElement&&(p=p.concat(Yn(o.reference.contextElement)))),p=p.filter((e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)})),p.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{s&&(d.removeEventListener("keydown",C?S:$,C),d.removeEventListener("compositionstart",l),d.removeEventListener("compositionend",c)),m&&d.removeEventListener(u,j?R:E,j),p.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,s,m,u,n,r,h,a,y,w,$,C,S,E,j,R]),l.useEffect((()=>{i.current.insideReactTree=!1}),[i,m,u]);const O=l.useMemo((()=>({onKeyDown:$,...d&&{[Eo[p]]:e=>{r(!1,e.nativeEvent,"reference-press")},..."click"!==p&&{onClick(e){r(!1,e.nativeEvent,"reference-press")}}}})),[$,r,d,p]),L=l.useMemo((()=>({onKeyDown:$,onMouseDown(){b.current=!0},onMouseUp(){b.current=!0},[Ro[u]]:()=>{i.current.insideReactTree=!0}})),[$,u,i]);return l.useMemo((()=>a?{reference:O,floating:L}:{}),[a,O,L])}(g,{escapeKey:d,outsidePress:p}),C=_o(g,{role:"dialog"}),{getFloatingProps:j}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),o=l.useCallback((t=>Po(t,e,"reference")),t),i=l.useCallback((t=>Po(t,e,"floating")),n),a=l.useCallback((t=>Po(t,e,"item")),r);return l.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a})),[o,i,a])}([w,C]),{x:k,y:$}=v.arrow??{x:null,y:null},S={top:"bottom",right:"left",bottom:"top",left:"right"}[m.split("-")[0]];if(!e)return null;let E=u-1,R=4;return"left"!==S&&"right"!==S||(E=4,R=u-1),t.jsxs(t.Fragment,{children:[t.jsxs("div",{ref:f.setFloating,style:x,"aria-modal":!0,...j(),css:Do,children:[t.jsxs("div",{css:Io,children:[i,t.jsx(re,{onClick:()=>r(!1),className:"ds-map-pop-up-close-button","aria-label":"Close"})]}),t.jsx("div",{css:No,children:a}),s?t.jsx("div",{css:Vo,children:s}):null,t.jsx("div",{ref:h,css:Ao(E,R,k,$,S,u)})]}),t.jsx("div",{className:"fixed inset-0 z-[999] bg-black/20 backdrop-blur-[1px]",onClick:()=>p&&r(!1)})]})},exports.Menu=de,exports.MobileTabBar=({defaultValue:r,tabs:o,onTabClick:i,hideLabels:a,activationMode:s="manual"})=>{const l=o.length,[c,u]=n.useState((()=>Ph(o,r)));return t.jsx("div",{css:Rh,children:t.jsx(e.Tabs.Root,{width:"full",defaultValue:r||o?.[0]?.value,onValueChange:({value:e})=>(e=>{const t=Ph(o,e);u(t),i&&i(e)})(e),activationMode:s,children:t.jsx(e.Tabs.List,{alignItems:"center",border:"none",children:o.map(((n,r)=>{const{label:o,icon:i,bagdeCount:s,"aria-label":u,"aria-describedby":d,disabled:p,...h}=n,f=`${n.value}-str-status`,x=[`tab ${r+1} of ${l}`,c===r?"selected":"not selected"];p&&x.push("disabled");const g=[d,f].filter(Boolean).join(" ")||void 0;return t.jsxs(e.Tabs.Trigger,{css:Oh,"aria-label":u||o,"aria-disabled":!!p||void 0,"aria-describedby":g,disabled:p,...h,children:[t.jsxs("div",{css:Lh,children:[i,s?t.jsx("div",{css:Th,className:"ds-badge-count",children:s}):null]}),a?null:t.jsx("p",{children:o}),t.jsx(e.VisuallyHidden,{id:f,children:x.join(", ")})]},n.value)}))})})})},exports.Modal=({header:n,content:r,footer:o,size:i="medium",draggable:a,blocking:s,open:l,onClose:c})=>l?t.jsx(e.Dialog.Root,{open:l,onOpenChange:c,placement:"center",scrollBehavior:"inside",closeOnInteractOutside:!a&&!s,preventScroll:!a&&!s,closeOnEscape:!s,defaultOpen:!0,children:t.jsxs(e.Portal,{children:[a?null:t.jsx(e.Dialog.Backdrop,{}),t.jsx(es,{disabled:!a,children:t.jsx(e.Dialog.Positioner,{children:t.jsxs(e.Dialog.Content,{css:ts(i),children:[t.jsxs(e.Dialog.Header,{css:ns,children:[n,s?null:t.jsx(e.Dialog.CloseTrigger,{css:rs,asChild:!0,children:t.jsx(re,{})})]}),t.jsx(e.Dialog.Body,{css:os,children:r}),o?t.jsx(e.Dialog.Footer,{padding:"12px",children:o}):null]})})})]})}):null,exports.MultiActionButton=({variant:r="primary",size:o="default",mainActionLabel:i,mainActionOnClick:a=()=>{},otherActions:s=[],disabled:l,...c})=>{const[u,d]=n.useState(!1),h=l?`${i} action button with menu, disabled`:void 0;return t.jsxs(e.Group,{css:me,attached:!0,tabIndex:l?0:void 0,"aria-disabled":l,"aria-label":h,role:"group",children:[t.jsx(m,{css:{},label:i,variant:r,size:o,onClick:a,disabled:l,...c}),t.jsxs(e.Menu.Root,{onOpenChange:({open:e})=>d(e),positioning:{placement:"bottom-end"},children:[t.jsx(e.Menu.Trigger,{css:ge(r),"data-group-item":!0,"data-last":!0,asChild:!0,children:t.jsx(m,{variant:r,size:o,leftIcon:t.jsx(k,{rotate:u?"180":"0",color:p("accessible","text-on-primary-mids")||p("primary",900)}),disabled:l})}),t.jsx(be,{children:s.map((({label:n,value:r,onClick:i})=>t.jsx(e.Menu.Item,{css:ve(o),onClick:i,value:r,children:n},r)))})]})]})},exports.Navbar=({logo:e,linkRouter:o,pathname:i,navigationSection:a,utilitySection:s,actionsSection:l,maxWidth:c,fixed:u,onNavbarHeightChange:d})=>{const h=n.useRef(null),f=n.useRef(null),x=n.useRef(null),[g,v]=n.useState(!1),[b,y]=n.useState(-1),[w,C]=n.useState("undefined"!=typeof window&&window?.innerWidth<=ef),[j,k]=n.useState(!1),$=o,S=n.useCallback((()=>{if(f.current&&h.current&&x.current){const e=h.current.getBoundingClientRect(),t=f.current.getBoundingClientRect(),n=x.current.getBoundingClientRect();t.width,e.width,window.innerWidth<=ef||window.innerWidth<=b?(d?.(96),v(!0)):window.innerWidth>ef&&window.innerWidth<=1440?e.right>=t.left?(d?.(96),v(!0),y(window.innerWidth)):window.innerWidth>b&&(d?.(48),v(!1),y(-1)):(d?.(48),v(!1),y(-1)),g&&(window.innerWidth<=ef||n.right>=t.left?(C(!0),d?.(48)):(C(!1),d?.(96)))}}),[b,g]);return n.useEffect((()=>(S(),window.addEventListener("resize",S),()=>{window.removeEventListener("resize",S)})),[S]),t.jsxs("nav",{css:Mh(g&&!w,u),children:[t.jsxs("div",{css:Dh(g&&!w,c),children:[t.jsxs("div",{css:(R=g&&!w,r.css`
|
|
3559
3558
|
display: flex;
|
|
3560
3559
|
align-items: center;
|
|
3561
3560
|
justify-content: flex-start;
|