var rI=Object.defineProperty;var RN=e=>{throw TypeError(e)};var iI=(e,t,n)=>t in e?rI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var FN=(e,t,n)=>iI(e,typeof t!="symbol"?t+"":t,n),Dv=(e,t,n)=>t.has(e)||RN("Cannot "+n);var q=(e,t,n)=>(Dv(e,t,"read from private field"),n?n.call(e):t.get(e)),xe=(e,t,n)=>t.has(e)?RN("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),fe=(e,t,n,r)=>(Dv(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Me=(e,t,n)=>(Dv(e,t,"access private method"),n);var Ph=(e,t,n,r)=>({set _(i){fe(e,t,i,n)},get _(){return q(e,t,r)}});function aI(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var zu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Je(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pk={exports:{}},Rg={},Ek={exports:{}},Be={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Ff=Symbol.for("react.element"),oI=Symbol.for("react.portal"),sI=Symbol.for("react.fragment"),lI=Symbol.for("react.strict_mode"),cI=Symbol.for("react.profiler"),uI=Symbol.for("react.provider"),dI=Symbol.for("react.context"),fI=Symbol.for("react.forward_ref"),hI=Symbol.for("react.suspense"),mI=Symbol.for("react.memo"),pI=Symbol.for("react.lazy"),DN=Symbol.iterator;function gI(e){return e===null||typeof e!="object"?null:(e=DN&&e[DN]||e["@@iterator"],typeof e=="function"?e:null)}var Ok={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},kk=Object.assign,Ck={};function Uc(e,t,n){this.props=e,this.context=t,this.refs=Ck,this.updater=n||Ok}Uc.prototype.isReactComponent={};Uc.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Uc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ak(){}Ak.prototype=Uc.prototype;function Iw(e,t,n){this.props=e,this.context=t,this.refs=Ck,this.updater=n||Ok}var Rw=Iw.prototype=new Ak;Rw.constructor=Iw;kk(Rw,Uc.prototype);Rw.isPureReactComponent=!0;var BN=Array.isArray,Tk=Object.prototype.hasOwnProperty,Fw={current:null},Mk={key:!0,ref:!0,__self:!0,__source:!0};function Lk(e,t,n){var r,i={},a=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(a=""+t.key),t)Tk.call(t,r)&&!Mk.hasOwnProperty(r)&&(i[r]=t[r]);var c=arguments.length-2;if(c===1)i.children=n;else if(1>>1,Y=R[U];if(0>>1;Ui(ee,W))cei(Ne,ee)?(R[U]=Ne,R[ce]=W,U=ce):(R[U]=ee,R[ae]=W,U=ae);else if(cei(Ne,W))R[U]=Ne,R[ce]=W,U=ce;else break e}}return K}function i(R,K){var W=R.sortIndex-K.sortIndex;return W!==0?W:R.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,c=s.now();e.unstable_now=function(){return s.now()-c}}var u=[],d=[],h=1,m=null,p=3,v=!1,_=!1,x=!1,y=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function j(R){for(var K=n(d);K!==null;){if(K.callback===null)r(d);else if(K.startTime<=R)r(d),K.sortIndex=K.expirationTime,t(u,K);else break;K=n(d)}}function E(R){if(x=!1,j(R),!_)if(n(u)!==null)_=!0,B(P);else{var K=n(d);K!==null&&G(E,K.startTime-R)}}function P(R,K){_=!1,x&&(x=!1,w(A),A=-1),v=!0;var W=p;try{for(j(K),m=n(u);m!==null&&(!(m.expirationTime>K)||R&&!z());){var U=m.callback;if(typeof U=="function"){m.callback=null,p=m.priorityLevel;var Y=U(m.expirationTime<=K);K=e.unstable_now(),typeof Y=="function"?m.callback=Y:m===n(u)&&r(u),j(K)}else r(u);m=n(u)}if(m!==null)var ne=!0;else{var ae=n(d);ae!==null&&G(E,ae.startTime-K),ne=!1}return ne}finally{m=null,p=W,v=!1}}var O=!1,C=null,A=-1,T=5,$=-1;function z(){return!(e.unstable_now()-$R||125U?(R.sortIndex=W,t(d,R),n(u)===null&&R===n(d)&&(x?(w(A),A=-1):x=!0,G(E,W-U))):(R.sortIndex=Y,t(u,R),_||v||(_=!0,B(P))),R},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(R){var K=p;return function(){var W=p;p=K;try{return R.apply(this,arguments)}finally{p=W}}}})(Dk);Fk.exports=Dk;var EI=Fk.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var OI=N,vr=EI;function le(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ox=Object.prototype.hasOwnProperty,kI=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,UN={},WN={};function CI(e){return ox.call(WN,e)?!0:ox.call(UN,e)?!1:kI.test(e)?WN[e]=!0:(UN[e]=!0,!1)}function AI(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function TI(e,t,n,r){if(t===null||typeof t>"u"||AI(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Un(e,t,n,r,i,a,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=s}var mn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){mn[e]=new Un(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];mn[t]=new Un(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){mn[e]=new Un(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){mn[e]=new Un(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){mn[e]=new Un(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){mn[e]=new Un(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){mn[e]=new Un(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){mn[e]=new Un(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){mn[e]=new Un(e,5,!1,e.toLowerCase(),null,!1,!1)});var Bw=/[\-:]([a-z])/g;function zw(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Bw,zw);mn[t]=new Un(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Bw,zw);mn[t]=new Un(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Bw,zw);mn[t]=new Un(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){mn[e]=new Un(e,1,!1,e.toLowerCase(),null,!1,!1)});mn.xlinkHref=new Un("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){mn[e]=new Un(e,1,!1,e.toLowerCase(),null,!0,!0)});function Uw(e,t,n,r){var i=mn.hasOwnProperty(t)?mn[t]:null;(i!==null?i.type!==0:r||!(2c||i[s]!==a[c]){var u=` `+i[s].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=s&&0<=c);break}}}finally{Uv=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Uu(e):""}function MI(e){switch(e.tag){case 5:return Uu(e.type);case 16:return Uu("Lazy");case 13:return Uu("Suspense");case 19:return Uu("SuspenseList");case 0:case 2:case 15:return e=Wv(e.type,!1),e;case 11:return e=Wv(e.type.render,!1),e;case 1:return e=Wv(e.type,!0),e;default:return""}}function ux(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case hl:return"Fragment";case fl:return"Portal";case sx:return"Profiler";case Ww:return"StrictMode";case lx:return"Suspense";case cx:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Uk:return(e.displayName||"Context")+".Consumer";case zk:return(e._context.displayName||"Context")+".Provider";case Hw:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Vw:return t=e.displayName||null,t!==null?t:ux(e.type)||"Memo";case Ha:t=e._payload,e=e._init;try{return ux(e(t))}catch{}}return null}function LI(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ux(t);case 8:return t===Ww?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function So(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Hk(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $I(e){var t=Hk(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,a.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function kh(e){e._valueTracker||(e._valueTracker=$I(e))}function Vk(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Hk(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Rm(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function dx(e,t){var n=t.checked;return St({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function VN(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=So(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function qk(e,t){t=t.checked,t!=null&&Uw(e,"checked",t,!1)}function fx(e,t){qk(e,t);var n=So(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?hx(e,t.type,n):t.hasOwnProperty("defaultValue")&&hx(e,t.type,So(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function qN(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function hx(e,t,n){(t!=="number"||Rm(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Wu=Array.isArray;function Tl(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Ch.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Nd(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var rd={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},II=["Webkit","ms","Moz","O"];Object.keys(rd).forEach(function(e){II.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),rd[t]=rd[e]})});function Yk(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||rd.hasOwnProperty(e)&&rd[e]?(""+t).trim():t+"px"}function Xk(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Yk(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var RI=St({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function gx(e,t){if(t){if(RI[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(le(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(le(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(le(61))}if(t.style!=null&&typeof t.style!="object")throw Error(le(62))}}function vx(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var yx=null;function qw(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var xx=null,Ml=null,Ll=null;function KN(e){if(e=zf(e)){if(typeof xx!="function")throw Error(le(280));var t=e.stateNode;t&&(t=Ug(t),xx(e.stateNode,e.type,t))}}function Qk(e){Ml?Ll?Ll.push(e):Ll=[e]:Ml=e}function Jk(){if(Ml){var e=Ml,t=Ll;if(Ll=Ml=null,KN(e),t)for(e=0;e>>=0,e===0?32:31-(GI(e)/KI|0)|0}var Ah=64,Th=4194304;function Hu(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function zm(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,s=n&268435455;if(s!==0){var c=s&~i;c!==0?r=Hu(c):(a&=s,a!==0&&(r=Hu(a)))}else s=n&~i,s!==0?r=Hu(s):a!==0&&(r=Hu(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Df(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-di(t),e[t]=n}function JI(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=ad),i5=" ",a5=!1;function x4(e,t){switch(e){case"keyup":return E8.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function b4(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ml=!1;function k8(e,t){switch(e){case"compositionend":return b4(t);case"keypress":return t.which!==32?null:(a5=!0,i5);case"textInput":return e=t.data,e===i5&&a5?null:e;default:return null}}function C8(e,t){if(ml)return e==="compositionend"||!e_&&x4(e,t)?(e=v4(),ym=Xw=so=null,ml=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=c5(n)}}function N4(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?N4(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function S4(){for(var e=window,t=Rm();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Rm(e.document)}return t}function t_(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function D8(e){var t=S4(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&N4(n.ownerDocument.documentElement,n)){if(r!==null&&t_(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=u5(n,a);var s=u5(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,pl=null,Sx=null,sd=null,Px=!1;function d5(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Px||pl==null||pl!==Rm(r)||(r=pl,"selectionStart"in r&&t_(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),sd&&Cd(sd,r)||(sd=r,r=Hm(Sx,"onSelect"),0yl||(e.current=Tx[yl],Tx[yl]=null,yl--)}function lt(e,t){yl++,Tx[yl]=e.current,e.current=t}var Po={},Sn=ko(Po),Yn=ko(!1),js=Po;function rc(e,t){var n=e.type.contextTypes;if(!n)return Po;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Xn(e){return e=e.childContextTypes,e!=null}function qm(){pt(Yn),pt(Sn)}function y5(e,t,n){if(Sn.current!==Po)throw Error(le(168));lt(Sn,t),lt(Yn,n)}function L4(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(le(108,LI(e)||"Unknown",i));return St({},n,r)}function Zm(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Po,js=Sn.current,lt(Sn,e),lt(Yn,Yn.current),!0}function x5(e,t,n){var r=e.stateNode;if(!r)throw Error(le(169));n?(e=L4(e,t,js),r.__reactInternalMemoizedMergedChildContext=e,pt(Yn),pt(Sn),lt(Sn,e)):pt(Yn),lt(Yn,n)}var ra=null,Wg=!1,ry=!1;function $4(e){ra===null?ra=[e]:ra.push(e)}function X8(e){Wg=!0,$4(e)}function Co(){if(!ry&&ra!==null){ry=!0;var e=0,t=Qe;try{var n=ra;for(Qe=1;e>=s,i-=s,da=1<<32-di(t)+i|n<A?(T=C,C=null):T=C.sibling;var $=p(w,C,j[A],E);if($===null){C===null&&(C=T);break}e&&C&&$.alternate===null&&t(w,C),b=a($,b,A),O===null?P=$:O.sibling=$,O=$,C=T}if(A===j.length)return n(w,C),gt&&Zo(w,A),P;if(C===null){for(;AA?(T=C,C=null):T=C.sibling;var z=p(w,C,$.value,E);if(z===null){C===null&&(C=T);break}e&&C&&z.alternate===null&&t(w,C),b=a(z,b,A),O===null?P=z:O.sibling=z,O=z,C=T}if($.done)return n(w,C),gt&&Zo(w,A),P;if(C===null){for(;!$.done;A++,$=j.next())$=m(w,$.value,E),$!==null&&(b=a($,b,A),O===null?P=$:O.sibling=$,O=$);return gt&&Zo(w,A),P}for(C=r(w,C);!$.done;A++,$=j.next())$=v(C,w,A,$.value,E),$!==null&&(e&&$.alternate!==null&&C.delete($.key===null?A:$.key),b=a($,b,A),O===null?P=$:O.sibling=$,O=$);return e&&C.forEach(function(D){return t(w,D)}),gt&&Zo(w,A),P}function y(w,b,j,E){if(typeof j=="object"&&j!==null&&j.type===hl&&j.key===null&&(j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case Oh:e:{for(var P=j.key,O=b;O!==null;){if(O.key===P){if(P=j.type,P===hl){if(O.tag===7){n(w,O.sibling),b=i(O,j.props.children),b.return=w,w=b;break e}}else if(O.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Ha&&_5(P)===O.type){n(w,O.sibling),b=i(O,j.props),b.ref=Pu(w,O,j),b.return=w,w=b;break e}n(w,O);break}else t(w,O);O=O.sibling}j.type===hl?(b=bs(j.props.children,w.mode,E,j.key),b.return=w,w=b):(E=Pm(j.type,j.key,j.props,null,w.mode,E),E.ref=Pu(w,b,j),E.return=w,w=E)}return s(w);case fl:e:{for(O=j.key;b!==null;){if(b.key===O)if(b.tag===4&&b.stateNode.containerInfo===j.containerInfo&&b.stateNode.implementation===j.implementation){n(w,b.sibling),b=i(b,j.children||[]),b.return=w,w=b;break e}else{n(w,b);break}else t(w,b);b=b.sibling}b=dy(j,w.mode,E),b.return=w,w=b}return s(w);case Ha:return O=j._init,y(w,b,O(j._payload),E)}if(Wu(j))return _(w,b,j,E);if(wu(j))return x(w,b,j,E);Dh(w,j)}return typeof j=="string"&&j!==""||typeof j=="number"?(j=""+j,b!==null&&b.tag===6?(n(w,b.sibling),b=i(b,j),b.return=w,w=b):(n(w,b),b=uy(j,w.mode,E),b.return=w,w=b),s(w)):n(w,b)}return y}var ac=D4(!0),B4=D4(!1),Ym=ko(null),Xm=null,wl=null,a_=null;function o_(){a_=wl=Xm=null}function s_(e){var t=Ym.current;pt(Ym),e._currentValue=t}function $x(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Il(e,t){Xm=e,a_=wl=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Kn=!0),e.firstContext=null)}function Br(e){var t=e._currentValue;if(a_!==e)if(e={context:e,memoizedValue:t,next:null},wl===null){if(Xm===null)throw Error(le(308));wl=e,Xm.dependencies={lanes:0,firstContext:e}}else wl=wl.next=e;return t}var ns=null;function l_(e){ns===null?ns=[e]:ns.push(e)}function z4(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,l_(t)):(n.next=i.next,i.next=n),t.interleaved=n,Na(e,r)}function Na(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Va=!1;function c_(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function U4(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ya(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function vo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,He&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Na(e,n)}return i=r.interleaved,i===null?(t.next=t,l_(r)):(t.next=i.next,i.next=t),r.interleaved=t,Na(e,n)}function bm(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Gw(e,n)}}function j5(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=s:a=a.next=s,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Qm(e,t,n,r){var i=e.updateQueue;Va=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,c=i.shared.pending;if(c!==null){i.shared.pending=null;var u=c,d=u.next;u.next=null,s===null?a=d:s.next=d,s=u;var h=e.alternate;h!==null&&(h=h.updateQueue,c=h.lastBaseUpdate,c!==s&&(c===null?h.firstBaseUpdate=d:c.next=d,h.lastBaseUpdate=u))}if(a!==null){var m=i.baseState;s=0,h=d=u=null,c=a;do{var p=c.lane,v=c.eventTime;if((r&p)===p){h!==null&&(h=h.next={eventTime:v,lane:0,tag:c.tag,payload:c.payload,callback:c.callback,next:null});e:{var _=e,x=c;switch(p=t,v=n,x.tag){case 1:if(_=x.payload,typeof _=="function"){m=_.call(v,m,p);break e}m=_;break e;case 3:_.flags=_.flags&-65537|128;case 0:if(_=x.payload,p=typeof _=="function"?_.call(v,m,p):_,p==null)break e;m=St({},m,p);break e;case 2:Va=!0}}c.callback!==null&&c.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[c]:p.push(c))}else v={eventTime:v,lane:p,tag:c.tag,payload:c.payload,callback:c.callback,next:null},h===null?(d=h=v,u=m):h=h.next=v,s|=p;if(c=c.next,c===null){if(c=i.shared.pending,c===null)break;p=c,c=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(!0);if(h===null&&(u=m),i.baseState=u,i.firstBaseUpdate=d,i.lastBaseUpdate=h,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Ps|=s,e.lanes=s,e.memoizedState=m}}function N5(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=ay.transition;ay.transition={};try{e(!1),t()}finally{Qe=n,ay.transition=r}}function aC(){return zr().memoizedState}function t9(e,t,n){var r=xo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},oC(e))sC(t,n);else if(n=z4(e,t,n,r),n!==null){var i=In();fi(n,e,r,i),lC(n,t,r)}}function n9(e,t,n){var r=xo(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(oC(e))sC(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var s=t.lastRenderedState,c=a(s,n);if(i.hasEagerState=!0,i.eagerState=c,mi(c,s)){var u=t.interleaved;u===null?(i.next=i,l_(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=z4(e,t,i,r),n!==null&&(i=In(),fi(n,e,r,i),lC(n,t,r))}}function oC(e){var t=e.alternate;return e===Nt||t!==null&&t===Nt}function sC(e,t){ld=ep=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function lC(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Gw(e,n)}}var tp={readContext:Br,useCallback:gn,useContext:gn,useEffect:gn,useImperativeHandle:gn,useInsertionEffect:gn,useLayoutEffect:gn,useMemo:gn,useReducer:gn,useRef:gn,useState:gn,useDebugValue:gn,useDeferredValue:gn,useTransition:gn,useMutableSource:gn,useSyncExternalStore:gn,useId:gn,unstable_isNewReconciler:!1},r9={readContext:Br,useCallback:function(e,t){return Si().memoizedState=[e,t===void 0?null:t],e},useContext:Br,useEffect:P5,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,_m(4194308,4,eC.bind(null,t,e),n)},useLayoutEffect:function(e,t){return _m(4194308,4,e,t)},useInsertionEffect:function(e,t){return _m(4,2,e,t)},useMemo:function(e,t){var n=Si();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Si();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=t9.bind(null,Nt,e),[r.memoizedState,e]},useRef:function(e){var t=Si();return e={current:e},t.memoizedState=e},useState:S5,useDebugValue:v_,useDeferredValue:function(e){return Si().memoizedState=e},useTransition:function(){var e=S5(!1),t=e[0];return e=e9.bind(null,e[1]),Si().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Nt,i=Si();if(gt){if(n===void 0)throw Error(le(407));n=n()}else{if(n=t(),rn===null)throw Error(le(349));Ss&30||q4(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,P5(G4.bind(null,r,a,e),[e]),r.flags|=2048,Fd(9,Z4.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=Si(),t=rn.identifierPrefix;if(gt){var n=fa,r=da;n=(r&~(1<<32-di(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Id++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[ki]=t,e[Md]=r,yC(e,t,!1,!1),t.stateNode=e;e:{switch(s=vx(n,r),n){case"dialog":ft("cancel",e),ft("close",e),i=r;break;case"iframe":case"object":case"embed":ft("load",e),i=r;break;case"video":case"audio":for(i=0;ilc&&(t.flags|=128,r=!0,Eu(a,!1),t.lanes=4194304)}else{if(!r)if(e=Jm(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Eu(a,!0),a.tail===null&&a.tailMode==="hidden"&&!s.alternate&&!gt)return vn(t),null}else 2*Lt()-a.renderingStartTime>lc&&n!==1073741824&&(t.flags|=128,r=!0,Eu(a,!1),t.lanes=4194304);a.isBackwards?(s.sibling=t.child,t.child=s):(n=a.last,n!==null?n.sibling=s:t.child=s,a.last=s)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Lt(),t.sibling=null,n=_t.current,lt(_t,r?n&1|2:n&1),t):(vn(t),null);case 22:case 23:return j_(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ar&1073741824&&(vn(t),t.subtreeFlags&6&&(t.flags|=8192)):vn(t),null;case 24:return null;case 25:return null}throw Error(le(156,t.tag))}function d9(e,t){switch(r_(t),t.tag){case 1:return Xn(t.type)&&qm(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return oc(),pt(Yn),pt(Sn),f_(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return d_(t),null;case 13:if(pt(_t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(le(340));ic()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pt(_t),null;case 4:return oc(),null;case 10:return s_(t.type._context),null;case 22:case 23:return j_(),null;case 24:return null;default:return null}}var zh=!1,bn=!1,f9=typeof WeakSet=="function"?WeakSet:Set,pe=null;function _l(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){kt(e,t,r)}else n.current=null}function Hx(e,t,n){try{n()}catch(r){kt(e,t,r)}}var R5=!1;function h9(e,t){if(Ex=Um,e=S4(),t_(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var s=0,c=-1,u=-1,d=0,h=0,m=e,p=null;t:for(;;){for(var v;m!==n||i!==0&&m.nodeType!==3||(c=s+i),m!==a||r!==0&&m.nodeType!==3||(u=s+r),m.nodeType===3&&(s+=m.nodeValue.length),(v=m.firstChild)!==null;)p=m,m=v;for(;;){if(m===e)break t;if(p===n&&++d===i&&(c=s),p===a&&++h===r&&(u=s),(v=m.nextSibling)!==null)break;m=p,p=m.parentNode}m=v}n=c===-1||u===-1?null:{start:c,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ox={focusedElem:e,selectionRange:n},Um=!1,pe=t;pe!==null;)if(t=pe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,pe=e;else for(;pe!==null;){t=pe;try{var _=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(_!==null){var x=_.memoizedProps,y=_.memoizedState,w=t.stateNode,b=w.getSnapshotBeforeUpdate(t.elementType===t.type?x:Jr(t.type,x),y);w.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var j=t.stateNode.containerInfo;j.nodeType===1?j.textContent="":j.nodeType===9&&j.documentElement&&j.removeChild(j.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(le(163))}}catch(E){kt(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,pe=e;break}pe=t.return}return _=R5,R5=!1,_}function cd(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&Hx(t,n,a)}i=i.next}while(i!==r)}}function qg(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Vx(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function wC(e){var t=e.alternate;t!==null&&(e.alternate=null,wC(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ki],delete t[Md],delete t[Ax],delete t[K8],delete t[Y8])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function _C(e){return e.tag===5||e.tag===3||e.tag===4}function F5(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||_C(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qx(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Vm));else if(r!==4&&(e=e.child,e!==null))for(qx(e,t,n),e=e.sibling;e!==null;)qx(e,t,n),e=e.sibling}function Zx(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Zx(e,t,n),e=e.sibling;e!==null;)Zx(e,t,n),e=e.sibling}var dn=null,ti=!1;function za(e,t,n){for(n=n.child;n!==null;)jC(e,t,n),n=n.sibling}function jC(e,t,n){if(Ri&&typeof Ri.onCommitFiberUnmount=="function")try{Ri.onCommitFiberUnmount(Fg,n)}catch{}switch(n.tag){case 5:bn||_l(n,t);case 6:var r=dn,i=ti;dn=null,za(e,t,n),dn=r,ti=i,dn!==null&&(ti?(e=dn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):dn.removeChild(n.stateNode));break;case 18:dn!==null&&(ti?(e=dn,n=n.stateNode,e.nodeType===8?ny(e.parentNode,n):e.nodeType===1&&ny(e,n),Od(e)):ny(dn,n.stateNode));break;case 4:r=dn,i=ti,dn=n.stateNode.containerInfo,ti=!0,za(e,t,n),dn=r,ti=i;break;case 0:case 11:case 14:case 15:if(!bn&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,s=a.destroy;a=a.tag,s!==void 0&&(a&2||a&4)&&Hx(n,t,s),i=i.next}while(i!==r)}za(e,t,n);break;case 1:if(!bn&&(_l(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(c){kt(n,t,c)}za(e,t,n);break;case 21:za(e,t,n);break;case 22:n.mode&1?(bn=(r=bn)||n.memoizedState!==null,za(e,t,n),bn=r):za(e,t,n);break;default:za(e,t,n)}}function D5(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new f9),t.forEach(function(r){var i=_9.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Xr(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~a}if(r=i,r=Lt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*p9(r/1960))-r,10e?16:e,lo===null)var r=!1;else{if(e=lo,lo=null,ip=0,He&6)throw Error(le(331));var i=He;for(He|=4,pe=e.current;pe!==null;){var a=pe,s=a.child;if(pe.flags&16){var c=a.deletions;if(c!==null){for(var u=0;uLt()-w_?xs(e,0):b_|=n),Qn(e,t)}function AC(e,t){t===0&&(e.mode&1?(t=Th,Th<<=1,!(Th&130023424)&&(Th=4194304)):t=1);var n=In();e=Na(e,t),e!==null&&(Df(e,t,n),Qn(e,n))}function w9(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),AC(e,n)}function _9(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(le(314))}r!==null&&r.delete(t),AC(e,n)}var TC;TC=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Yn.current)Kn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Kn=!1,c9(e,t,n);Kn=!!(e.flags&131072)}else Kn=!1,gt&&t.flags&1048576&&I4(t,Km,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;jm(e,t),e=t.pendingProps;var i=rc(t,Sn.current);Il(t,n),i=m_(null,t,r,e,i,n);var a=p_();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Xn(r)?(a=!0,Zm(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,c_(t),i.updater=Vg,t.stateNode=i,i._reactInternals=t,Rx(t,r,e,n),t=Bx(null,t,r,!0,a,n)):(t.tag=0,gt&&a&&n_(t),On(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(jm(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=N9(r),e=Jr(r,e),i){case 0:t=Dx(null,t,r,e,n);break e;case 1:t=L5(null,t,r,e,n);break e;case 11:t=T5(null,t,r,e,n);break e;case 14:t=M5(null,t,r,Jr(r.type,e),n);break e}throw Error(le(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Jr(r,i),Dx(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Jr(r,i),L5(e,t,r,i,n);case 3:e:{if(pC(t),e===null)throw Error(le(387));r=t.pendingProps,a=t.memoizedState,i=a.element,U4(e,t),Qm(t,r,null,n);var s=t.memoizedState;if(r=s.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=sc(Error(le(423)),t),t=$5(e,t,r,n,i);break e}else if(r!==i){i=sc(Error(le(424)),t),t=$5(e,t,r,n,i);break e}else for(hr=go(t.stateNode.containerInfo.firstChild),pr=t,gt=!0,ii=null,n=B4(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ic(),r===i){t=Sa(e,t,n);break e}On(e,t,r,n)}t=t.child}return t;case 5:return W4(t),e===null&&Lx(t),r=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,s=i.children,kx(r,i)?s=null:a!==null&&kx(r,a)&&(t.flags|=32),mC(e,t),On(e,t,s,n),t.child;case 6:return e===null&&Lx(t),null;case 13:return gC(e,t,n);case 4:return u_(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ac(t,null,r,n):On(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Jr(r,i),T5(e,t,r,i,n);case 7:return On(e,t,t.pendingProps,n),t.child;case 8:return On(e,t,t.pendingProps.children,n),t.child;case 12:return On(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,s=i.value,lt(Ym,r._currentValue),r._currentValue=s,a!==null)if(mi(a.value,s)){if(a.children===i.children&&!Yn.current){t=Sa(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var c=a.dependencies;if(c!==null){s=a.child;for(var u=c.firstContext;u!==null;){if(u.context===r){if(a.tag===1){u=ya(-1,n&-n),u.tag=2;var d=a.updateQueue;if(d!==null){d=d.shared;var h=d.pending;h===null?u.next=u:(u.next=h.next,h.next=u),d.pending=u}}a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),$x(a.return,n,t),c.lanes|=n;break}u=u.next}}else if(a.tag===10)s=a.type===t.type?null:a.child;else if(a.tag===18){if(s=a.return,s===null)throw Error(le(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),$x(s,n,t),s=a.sibling}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===t){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}On(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Il(t,n),i=Br(i),r=r(i),t.flags|=1,On(e,t,r,n),t.child;case 14:return r=t.type,i=Jr(r,t.pendingProps),i=Jr(r.type,i),M5(e,t,r,i,n);case 15:return fC(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Jr(r,i),jm(e,t),t.tag=1,Xn(r)?(e=!0,Zm(t)):e=!1,Il(t,n),cC(t,r,i),Rx(t,r,i,n),Bx(null,t,r,!0,e,n);case 19:return vC(e,t,n);case 22:return hC(e,t,n)}throw Error(le(156,t.tag))};function MC(e,t){return o4(e,t)}function j9(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Mr(e,t,n,r){return new j9(e,t,n,r)}function S_(e){return e=e.prototype,!(!e||!e.isReactComponent)}function N9(e){if(typeof e=="function")return S_(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Hw)return 11;if(e===Vw)return 14}return 2}function bo(e,t){var n=e.alternate;return n===null?(n=Mr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Pm(e,t,n,r,i,a){var s=2;if(r=e,typeof e=="function")S_(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case hl:return bs(n.children,i,a,t);case Ww:s=8,i|=8;break;case sx:return e=Mr(12,n,t,i|2),e.elementType=sx,e.lanes=a,e;case lx:return e=Mr(13,n,t,i),e.elementType=lx,e.lanes=a,e;case cx:return e=Mr(19,n,t,i),e.elementType=cx,e.lanes=a,e;case Wk:return Gg(n,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case zk:s=10;break e;case Uk:s=9;break e;case Hw:s=11;break e;case Vw:s=14;break e;case Ha:s=16,r=null;break e}throw Error(le(130,e==null?e:typeof e,""))}return t=Mr(s,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function bs(e,t,n,r){return e=Mr(7,e,r,t),e.lanes=n,e}function Gg(e,t,n,r){return e=Mr(22,e,r,t),e.elementType=Wk,e.lanes=n,e.stateNode={isHidden:!1},e}function uy(e,t,n){return e=Mr(6,e,null,t),e.lanes=n,e}function dy(e,t,n){return t=Mr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function S9(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Vv(0),this.expirationTimes=Vv(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vv(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function P_(e,t,n,r,i,a,s,c,u){return e=new S9(e,t,n,c,u),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Mr(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},c_(a),e}function P9(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(RC)}catch(e){console.error(e)}}RC(),Rk.exports=yr;var FC=Rk.exports,Z5=FC;ax.createRoot=Z5.createRoot,ax.hydrateRoot=Z5.hydrateRoot;/** * @remix-run/router v1.23.2 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Bd(){return Bd=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function C_(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function T9(){return Math.random().toString(36).substr(2,8)}function K5(e,t){return{usr:e.state,key:e.key,idx:t}}function Qx(e,t,n,r){return n===void 0&&(n=null),Bd({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Vc(t):t,{state:n,key:t&&t.key||r||T9()})}function sp(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Vc(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function M9(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:a=!1}=r,s=i.history,c=co.Pop,u=null,d=h();d==null&&(d=0,s.replaceState(Bd({},s.state,{idx:d}),""));function h(){return(s.state||{idx:null}).idx}function m(){c=co.Pop;let y=h(),w=y==null?null:y-d;d=y,u&&u({action:c,location:x.location,delta:w})}function p(y,w){c=co.Push;let b=Qx(x.location,y,w);d=h()+1;let j=K5(b,d),E=x.createHref(b);try{s.pushState(j,"",E)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;i.location.assign(E)}a&&u&&u({action:c,location:x.location,delta:1})}function v(y,w){c=co.Replace;let b=Qx(x.location,y,w);d=h();let j=K5(b,d),E=x.createHref(b);s.replaceState(j,"",E),a&&u&&u({action:c,location:x.location,delta:0})}function _(y){let w=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof y=="string"?y:sp(y);return b=b.replace(/ $/,"%20"),Bt(w,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,w)}let x={get action(){return c},get location(){return e(i,s)},listen(y){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(G5,m),u=y,()=>{i.removeEventListener(G5,m),u=null}},createHref(y){return t(i,y)},createURL:_,encodeLocation(y){let w=_(y);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:p,replace:v,go(y){return s.go(y)}};return x}var Y5;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Y5||(Y5={}));function L9(e,t,n){return n===void 0&&(n="/"),$9(e,t,n)}function $9(e,t,n,r){let i=typeof t=="string"?Vc(t):t,a=A_(i.pathname||"/",n);if(a==null)return null;let s=DC(e);I9(s);let c=null;for(let u=0;c==null&&u{let u={relativePath:c===void 0?a.path||"":c,caseSensitive:a.caseSensitive===!0,childrenIndex:s,route:a};u.relativePath.startsWith("/")&&(Bt(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let d=wo([r,u.relativePath]),h=n.concat(u);a.children&&a.children.length>0&&(Bt(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),DC(a.children,t,h,d)),!(a.path==null&&!a.index)&&t.push({path:d,score:W9(d,a.index),routesMeta:h})};return e.forEach((a,s)=>{var c;if(a.path===""||!((c=a.path)!=null&&c.includes("?")))i(a,s);else for(let u of BC(a.path))i(a,s,u)}),t}function BC(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return i?[a,""]:[a];let s=BC(r.join("/")),c=[];return c.push(...s.map(u=>u===""?a:[a,u].join("/"))),i&&c.push(...s),c.map(u=>e.startsWith("/")&&u===""?"/":u)}function I9(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:H9(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const R9=/^:[\w-]+$/,F9=3,D9=2,B9=1,z9=10,U9=-2,X5=e=>e==="*";function W9(e,t){let n=e.split("/"),r=n.length;return n.some(X5)&&(r+=U9),t&&(r+=D9),n.filter(i=>!X5(i)).reduce((i,a)=>i+(R9.test(a)?F9:a===""?B9:z9),r)}function H9(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function V9(e,t,n){let{routesMeta:r}=e,i={},a="/",s=[];for(let c=0;c{let{paramName:p,isOptional:v}=h;if(p==="*"){let x=c[m]||"";s=a.slice(0,a.length-x.length).replace(/(.)\/+$/,"$1")}const _=c[m];return v&&!_?d[p]=void 0:d[p]=(_||"").replace(/%2F/g,"/"),d},{}),pathname:a,pathnameBase:s,pattern:e}}function Z9(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),C_(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,c,u)=>(r.push({paramName:c,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function G9(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return C_(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function A_(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const K9=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Y9=e=>K9.test(e);function X9(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Vc(e):e,a;if(n)if(Y9(n))a=n;else{if(n.includes("//")){let s=n;n=n.replace(/\/\/+/g,"/"),C_(!1,"Pathnames cannot have embedded double slashes - normalizing "+(s+" -> "+n))}n.startsWith("/")?a=Q5(n.substring(1),"/"):a=Q5(n,t)}else a=t;return{pathname:a,search:eR(r),hash:tR(i)}}function Q5(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function fy(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Q9(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function zC(e,t){let n=Q9(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function UC(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Vc(e):(i=Bd({},e),Bt(!i.pathname||!i.pathname.includes("?"),fy("?","pathname","search",i)),Bt(!i.pathname||!i.pathname.includes("#"),fy("#","pathname","hash",i)),Bt(!i.search||!i.search.includes("#"),fy("#","search","hash",i)));let a=e===""||i.pathname==="",s=a?"/":i.pathname,c;if(s==null)c=n;else{let m=t.length-1;if(!r&&s.startsWith("..")){let p=s.split("/");for(;p[0]==="..";)p.shift(),m-=1;i.pathname=p.join("/")}c=m>=0?t[m]:"/"}let u=X9(i,c),d=s&&s!=="/"&&s.endsWith("/"),h=(a||s===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(d||h)&&(u.pathname+="/"),u}const wo=e=>e.join("/").replace(/\/\/+/g,"/"),J9=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),eR=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,tR=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function nR(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const WC=["post","put","patch","delete"];new Set(WC);const rR=["get",...WC];new Set(rR);/** * React Router v6.30.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function zd(){return zd=Object.assign?Object.assign.bind():function(e){for(var t=1;t{c.current=!0}),N.useCallback(function(d,h){if(h===void 0&&(h={}),!c.current)return;if(typeof d=="number"){r.go(d);return}let m=UC(d,JSON.parse(s),a,h.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:wo([t,m.pathname])),(h.replace?r.replace:r.push)(m,h.state,h)},[t,r,s,a,e])}const sR=N.createContext(null);function lR(e){let t=N.useContext(La).outlet;return t&&N.createElement(sR.Provider,{value:e},t)}function cR(){let{matches:e}=N.useContext(La),t=e[e.length-1];return t?t.params:{}}function qC(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=N.useContext(zs),{matches:i}=N.useContext(La),{pathname:a}=Us(),s=JSON.stringify(zC(i,r.v7_relativeSplatPath));return N.useMemo(()=>UC(e,JSON.parse(s),a,n==="path"),[e,s,a,n])}function uR(e,t){return dR(e,t)}function dR(e,t,n,r){Wf()||Bt(!1);let{navigator:i}=N.useContext(zs),{matches:a}=N.useContext(La),s=a[a.length-1],c=s?s.params:{};s&&s.pathname;let u=s?s.pathnameBase:"/";s&&s.route;let d=Us(),h;if(t){var m;let y=typeof t=="string"?Vc(t):t;u==="/"||(m=y.pathname)!=null&&m.startsWith(u)||Bt(!1),h=y}else h=d;let p=h.pathname||"/",v=p;if(u!=="/"){let y=u.replace(/^\//,"").split("/");v="/"+p.replace(/^\//,"").split("/").slice(y.length).join("/")}let _=L9(e,{pathname:v}),x=gR(_&&_.map(y=>Object.assign({},y,{params:Object.assign({},c,y.params),pathname:wo([u,i.encodeLocation?i.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?u:wo([u,i.encodeLocation?i.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),a,n,r);return t&&x?N.createElement(Jg.Provider,{value:{location:zd({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:co.Pop}},x):x}function fR(){let e=bR(),t=nR(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return N.createElement(N.Fragment,null,N.createElement("h2",null,"Unexpected Application Error!"),N.createElement("h3",{style:{fontStyle:"italic"}},t),n?N.createElement("pre",{style:i},n):null,null)}const hR=N.createElement(fR,null);class mR extends N.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?N.createElement(La.Provider,{value:this.props.routeContext},N.createElement(HC.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function pR(e){let{routeContext:t,match:n,children:r}=e,i=N.useContext(T_);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),N.createElement(La.Provider,{value:t},r)}function gR(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var a;if(!n)return null;if(n.errors)e=n.matches;else if((a=r)!=null&&a.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,c=(i=n)==null?void 0:i.errors;if(c!=null){let h=s.findIndex(m=>m.route.id&&(c==null?void 0:c[m.route.id])!==void 0);h>=0||Bt(!1),s=s.slice(0,Math.min(s.length,h+1))}let u=!1,d=-1;if(n&&r&&r.v7_partialHydration)for(let h=0;h=0?s=s.slice(0,d+1):s=[s[0]];break}}}return s.reduceRight((h,m,p)=>{let v,_=!1,x=null,y=null;n&&(v=c&&m.route.id?c[m.route.id]:void 0,x=m.route.errorElement||hR,u&&(d<0&&p===0?(_R("route-fallback"),_=!0,y=null):d===p&&(_=!0,y=m.route.hydrateFallbackElement||null)));let w=t.concat(s.slice(0,p+1)),b=()=>{let j;return v?j=x:_?j=y:m.route.Component?j=N.createElement(m.route.Component,null):m.route.element?j=m.route.element:j=h,N.createElement(pR,{match:m,routeContext:{outlet:h,matches:w,isDataRoute:n!=null},children:j})};return n&&(m.route.ErrorBoundary||m.route.errorElement||p===0)?N.createElement(mR,{location:n.location,revalidation:n.revalidation,component:x,error:v,children:b(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):b()},null)}var ZC=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ZC||{}),GC=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(GC||{});function vR(e){let t=N.useContext(T_);return t||Bt(!1),t}function yR(e){let t=N.useContext(iR);return t||Bt(!1),t}function xR(e){let t=N.useContext(La);return t||Bt(!1),t}function KC(e){let t=xR(),n=t.matches[t.matches.length-1];return n.route.id||Bt(!1),n.route.id}function bR(){var e;let t=N.useContext(HC),n=yR(),r=KC();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function wR(){let{router:e}=vR(ZC.UseNavigateStable),t=KC(GC.UseNavigateStable),n=N.useRef(!1);return VC(()=>{n.current=!0}),N.useCallback(function(i,a){a===void 0&&(a={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,zd({fromRouteId:t},a)))},[e,t])}const J5={};function _R(e,t,n){J5[e]||(J5[e]=!0)}function jR(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function NR(e){return lR(e.context)}function Ke(e){Bt(!1)}function SR(e){let{basename:t="/",children:n=null,location:r,navigationType:i=co.Pop,navigator:a,static:s=!1,future:c}=e;Wf()&&Bt(!1);let u=t.replace(/^\/*/,"/"),d=N.useMemo(()=>({basename:u,navigator:a,static:s,future:zd({v7_relativeSplatPath:!1},c)}),[u,c,a,s]);typeof r=="string"&&(r=Vc(r));let{pathname:h="/",search:m="",hash:p="",state:v=null,key:_="default"}=r,x=N.useMemo(()=>{let y=A_(h,u);return y==null?null:{location:{pathname:y,search:m,hash:p,state:v,key:_},navigationType:i}},[u,h,m,p,v,_,i]);return x==null?null:N.createElement(zs.Provider,{value:d},N.createElement(Jg.Provider,{children:n,value:x}))}function PR(e){let{children:t,location:n}=e;return uR(Jx(t),n)}new Promise(()=>{});function Jx(e,t){t===void 0&&(t=[]);let n=[];return N.Children.forEach(e,(r,i)=>{if(!N.isValidElement(r))return;let a=[...t,i];if(r.type===N.Fragment){n.push.apply(n,Jx(r.props.children,a));return}r.type!==Ke&&Bt(!1),!r.props.index||!r.props.children||Bt(!1);let s={id:r.props.id||a.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=Jx(r.props.children,a)),n.push(s)}),n}/** * React Router DOM v6.30.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function eb(){return eb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function OR(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function kR(e,t){return e.button===0&&(!t||t==="_self")&&!OR(e)}function tb(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function CR(e,t){let n=tb(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(a=>{n.append(i,a)})}),n}const AR=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],TR="6";try{window.__reactRouterVersion=TR}catch{}const MR="startTransition",eS=ix[MR];function LR(e){let{basename:t,children:n,future:r,window:i}=e,a=N.useRef();a.current==null&&(a.current=A9({window:i,v5Compat:!0}));let s=a.current,[c,u]=N.useState({action:s.action,location:s.location}),{v7_startTransition:d}=r||{},h=N.useCallback(m=>{d&&eS?eS(()=>u(m)):u(m)},[u,d]);return N.useLayoutEffect(()=>s.listen(h),[s,h]),N.useEffect(()=>jR(r),[r]),N.createElement(SR,{basename:t,children:n,location:c.location,navigationType:c.action,navigator:s,future:r})}const $R=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",IR=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Se=N.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:a,replace:s,state:c,target:u,to:d,preventScrollReset:h,viewTransition:m}=t,p=ER(t,AR),{basename:v}=N.useContext(zs),_,x=!1;if(typeof d=="string"&&IR.test(d)&&(_=d,$R))try{let j=new URL(window.location.href),E=d.startsWith("//")?new URL(j.protocol+d):new URL(d),P=A_(E.pathname,v);E.origin===j.origin&&P!=null?d=P+E.search+E.hash:x=!0}catch{}let y=aR(d,{relative:i}),w=RR(d,{replace:s,state:c,target:u,preventScrollReset:h,relative:i,viewTransition:m});function b(j){r&&r(j),j.defaultPrevented||w(j)}return N.createElement("a",eb({},p,{href:_||y,onClick:x||a?r:b,ref:n,target:u}))});var tS;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(tS||(tS={}));var nS;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(nS||(nS={}));function RR(e,t){let{target:n,replace:r,state:i,preventScrollReset:a,relative:s,viewTransition:c}=t===void 0?{}:t,u=qc(),d=Us(),h=qC(e,{relative:s});return N.useCallback(m=>{if(kR(m,n)){m.preventDefault();let p=r!==void 0?r:sp(d)===sp(h);u(e,{replace:p,state:i,preventScrollReset:a,relative:s,viewTransition:c})}},[d,u,h,r,i,n,e,a,s,c])}function Ws(e){let t=N.useRef(tb(e)),n=N.useRef(!1),r=Us(),i=N.useMemo(()=>CR(r.search,n.current?null:t.current),[r.search]),a=qc(),s=N.useCallback((c,u)=>{const d=tb(typeof c=="function"?c(i):c);n.current=!0,a("?"+d,u)},[a,i]);return[i,s]}var Zc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},us,Qa,Wl,pk,FR=(pk=class extends Zc{constructor(){super();xe(this,us);xe(this,Qa);xe(this,Wl);fe(this,Wl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){q(this,Qa)||this.setEventListener(q(this,Wl))}onUnsubscribe(){var t;this.hasListeners()||((t=q(this,Qa))==null||t.call(this),fe(this,Qa,void 0))}setEventListener(t){var n;fe(this,Wl,t),(n=q(this,Qa))==null||n.call(this),fe(this,Qa,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){q(this,us)!==t&&(fe(this,us,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof q(this,us)=="boolean"?q(this,us):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},us=new WeakMap,Qa=new WeakMap,Wl=new WeakMap,pk),M_=new FR,DR={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ja,$w,gk,BR=(gk=class{constructor(){xe(this,Ja,DR);xe(this,$w,!1)}setTimeoutProvider(e){fe(this,Ja,e)}setTimeout(e,t){return q(this,Ja).setTimeout(e,t)}clearTimeout(e){q(this,Ja).clearTimeout(e)}setInterval(e,t){return q(this,Ja).setInterval(e,t)}clearInterval(e){q(this,Ja).clearInterval(e)}},Ja=new WeakMap,$w=new WeakMap,gk),is=new BR;function zR(e){setTimeout(e,0)}var UR=typeof window>"u"||"Deno"in globalThis;function kn(){}function WR(e,t){return typeof e=="function"?e(t):e}function nb(e){return typeof e=="number"&&e>=0&&e!==1/0}function YC(e,t){return Math.max(e+(t||0)-Date.now(),0)}function _o(e,t){return typeof e=="function"?e(t):e}function cr(e,t){return typeof e=="function"?e(t):e}function rS(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:s,stale:c}=e;if(s){if(r){if(t.queryHash!==L_(s,t.options))return!1}else if(!Ud(t.queryKey,s))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||i&&i!==t.state.fetchStatus||a&&!a(t))}function iS(e,t){const{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Os(t.options.mutationKey)!==Os(a))return!1}else if(!Ud(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function L_(e,t){return((t==null?void 0:t.queryKeyHashFn)||Os)(e)}function Os(e){return JSON.stringify(e,(t,n)=>rb(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Ud(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Ud(e[n],t[n])):!1}var HR=Object.prototype.hasOwnProperty;function XC(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=aS(e)&&aS(t);if(!r&&!(rb(e)&&rb(t)))return t;const a=(r?e:Object.keys(e)).length,s=r?t:Object.keys(t),c=s.length,u=r?new Array(c):{};let d=0;for(let h=0;h{is.setTimeout(t,e)})}function ib(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?XC(e,t):t}function qR(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function ZR(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var $_=Symbol();function QC(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===$_?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function I_(e,t){return typeof e=="function"?e(...t):!!e}function GR(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var Wd=(()=>{let e=()=>UR;return{isServer(){return e()},setIsServer(t){e=t}}})();function ab(){let e,t;const n=new Promise((i,a)=>{e=i,t=a});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var KR=zR;function YR(){let e=[],t=0,n=c=>{c()},r=c=>{c()},i=KR;const a=c=>{t?e.push(c):i(()=>{n(c)})},s=()=>{const c=e;e=[],c.length&&i(()=>{r(()=>{c.forEach(u=>{n(u)})})})};return{batch:c=>{let u;t++;try{u=c()}finally{t--,t||s()}return u},batchCalls:c=>(...u)=>{a(()=>{c(...u)})},schedule:a,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{i=c}}}var qt=YR(),Hl,eo,Vl,vk,XR=(vk=class extends Zc{constructor(){super();xe(this,Hl,!0);xe(this,eo);xe(this,Vl);fe(this,Vl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){q(this,eo)||this.setEventListener(q(this,Vl))}onUnsubscribe(){var t;this.hasListeners()||((t=q(this,eo))==null||t.call(this),fe(this,eo,void 0))}setEventListener(t){var n;fe(this,Vl,t),(n=q(this,eo))==null||n.call(this),fe(this,eo,t(this.setOnline.bind(this)))}setOnline(t){q(this,Hl)!==t&&(fe(this,Hl,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return q(this,Hl)}},Hl=new WeakMap,eo=new WeakMap,Vl=new WeakMap,vk),cp=new XR;function QR(e){return Math.min(1e3*2**e,3e4)}function JC(e){return(e??"online")==="online"?cp.isOnline():!0}var ob=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function eA(e){let t=!1,n=0,r;const i=ab(),a=()=>i.status!=="pending",s=x=>{var y;if(!a()){const w=new ob(x);p(w),(y=e.onCancel)==null||y.call(e,w)}},c=()=>{t=!0},u=()=>{t=!1},d=()=>M_.isFocused()&&(e.networkMode==="always"||cp.isOnline())&&e.canRun(),h=()=>JC(e.networkMode)&&e.canRun(),m=x=>{a()||(r==null||r(),i.resolve(x))},p=x=>{a()||(r==null||r(),i.reject(x))},v=()=>new Promise(x=>{var y;r=w=>{(a()||d())&&x(w)},(y=e.onPause)==null||y.call(e)}).then(()=>{var x;r=void 0,a()||(x=e.onContinue)==null||x.call(e)}),_=()=>{if(a())return;let x;const y=n===0?e.initialPromise:void 0;try{x=y??e.fn()}catch(w){x=Promise.reject(w)}Promise.resolve(x).then(m).catch(w=>{var O;if(a())return;const b=e.retry??(Wd.isServer()?0:3),j=e.retryDelay??QR,E=typeof j=="function"?j(n,w):j,P=b===!0||typeof b=="number"&&nd()?void 0:v()).then(()=>{t?p(w):_()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(r==null||r(),i),cancelRetry:c,continueRetry:u,canStart:h,start:()=>(h()?_():v().then(_),i)}}var ds,yk,tA=(yk=class{constructor(){xe(this,ds)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),nb(this.gcTime)&&fe(this,ds,is.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Wd.isServer()?1/0:5*60*1e3))}clearGcTimeout(){q(this,ds)!==void 0&&(is.clearTimeout(q(this,ds)),fe(this,ds,void 0))}},ds=new WeakMap,yk);function JR(e){return{onFetch:(t,n)=>{var h,m,p,v,_;const r=t.options,i=(p=(m=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:m.fetchMore)==null?void 0:p.direction,a=((v=t.state.data)==null?void 0:v.pages)||[],s=((_=t.state.data)==null?void 0:_.pageParams)||[];let c={pages:[],pageParams:[]},u=0;const d=async()=>{let x=!1;const y=j=>{GR(j,()=>t.signal,()=>x=!0)},w=QC(t.options,t.fetchOptions),b=async(j,E,P)=>{if(x)return Promise.reject(t.signal.reason);if(E==null&&j.pages.length)return Promise.resolve(j);const C=(()=>{const z={client:t.client,queryKey:t.queryKey,pageParam:E,direction:P?"backward":"forward",meta:t.options.meta};return y(z),z})(),A=await w(C),{maxPages:T}=t.options,$=P?ZR:qR;return{pages:$(j.pages,A,T),pageParams:$(j.pageParams,E,T)}};if(i&&a.length){const j=i==="backward",E=j?eF:sS,P={pages:a,pageParams:s},O=E(r,P);c=await b(P,O,j)}else{const j=e??a.length;do{const E=u===0?s[0]??r.initialPageParam:sS(r,c);if(u>0&&E==null)break;c=await b(c,E),u++}while(u{var x,y;return(y=(x=t.options).persister)==null?void 0:y.call(x,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=d}}}function sS(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function eF(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var ql,fs,Zl,Er,hs,Xt,Mf,ms,lr,nA,ea,xk,tF=(xk=class extends tA{constructor(t){super();xe(this,lr);xe(this,ql);xe(this,fs);xe(this,Zl);xe(this,Er);xe(this,hs);xe(this,Xt);xe(this,Mf);xe(this,ms);fe(this,ms,!1),fe(this,Mf,t.defaultOptions),this.setOptions(t.options),this.observers=[],fe(this,hs,t.client),fe(this,Er,q(this,hs).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,fe(this,fs,cS(this.options)),this.state=t.state??q(this,fs),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return q(this,ql)}get promise(){var t;return(t=q(this,Xt))==null?void 0:t.promise}setOptions(t){if(this.options={...q(this,Mf),...t},t!=null&&t._type&&fe(this,ql,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=cS(this.options);n.data!==void 0&&(this.setState(lS(n.data,n.dataUpdatedAt)),fe(this,fs,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&q(this,Er).remove(this)}setData(t,n){const r=ib(this.state.data,t,this.options);return Me(this,lr,ea).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){Me(this,lr,ea).call(this,{type:"setState",state:t})}cancel(t){var r,i;const n=(r=q(this,Xt))==null?void 0:r.promise;return(i=q(this,Xt))==null||i.cancel(t),n?n.then(kn).catch(kn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return q(this,fs)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>cr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===$_||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>_o(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!YC(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=q(this,Xt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=q(this,Xt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),q(this,Er).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(q(this,Xt)&&(q(this,ms)||Me(this,lr,nA).call(this)?q(this,Xt).cancel({revert:!0}):q(this,Xt).cancelRetry()),this.scheduleGc()),q(this,Er).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Me(this,lr,ea).call(this,{type:"invalidate"})}async fetch(t,n){var d,h,m,p,v,_,x,y,w,b,j;if(this.state.fetchStatus!=="idle"&&((d=q(this,Xt))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(q(this,Xt))return q(this,Xt).continueRetry(),q(this,Xt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const E=this.observers.find(P=>P.options.queryFn);E&&this.setOptions(E.options)}const r=new AbortController,i=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(fe(this,ms,!0),r.signal)})},a=()=>{const E=QC(this.options,n),O=(()=>{const C={client:q(this,hs),queryKey:this.queryKey,meta:this.meta};return i(C),C})();return fe(this,ms,!1),this.options.persister?this.options.persister(E,O,this):E(O)},c=(()=>{const E={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:q(this,hs),state:this.state,fetchFn:a};return i(E),E})(),u=q(this,ql)==="infinite"?JR(this.options.pages):this.options.behavior;u==null||u.onFetch(c,this),fe(this,Zl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=c.fetchOptions)==null?void 0:h.meta))&&Me(this,lr,ea).call(this,{type:"fetch",meta:(m=c.fetchOptions)==null?void 0:m.meta}),fe(this,Xt,eA({initialPromise:n==null?void 0:n.initialPromise,fn:c.fetchFn,onCancel:E=>{E instanceof ob&&E.revert&&this.setState({...q(this,Zl),fetchStatus:"idle"}),r.abort()},onFail:(E,P)=>{Me(this,lr,ea).call(this,{type:"failed",failureCount:E,error:P})},onPause:()=>{Me(this,lr,ea).call(this,{type:"pause"})},onContinue:()=>{Me(this,lr,ea).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const E=await q(this,Xt).start();if(E===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(E),(v=(p=q(this,Er).config).onSuccess)==null||v.call(p,E,this),(x=(_=q(this,Er).config).onSettled)==null||x.call(_,E,this.state.error,this),E}catch(E){if(E instanceof ob){if(E.silent)return q(this,Xt).promise;if(E.revert){if(this.state.data===void 0)throw E;return this.state.data}}throw Me(this,lr,ea).call(this,{type:"error",error:E}),(w=(y=q(this,Er).config).onError)==null||w.call(y,E,this),(j=(b=q(this,Er).config).onSettled)==null||j.call(b,this.state.data,E,this),E}finally{this.scheduleGc()}}},ql=new WeakMap,fs=new WeakMap,Zl=new WeakMap,Er=new WeakMap,hs=new WeakMap,Xt=new WeakMap,Mf=new WeakMap,ms=new WeakMap,lr=new WeakSet,nA=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},ea=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...rA(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...lS(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return fe(this,Zl,t.manual?i:void 0),i;case"error":const a=t.error;return{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),qt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),q(this,Er).notify({query:this,type:"updated",action:t})})},xk);function rA(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:JC(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function lS(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function cS(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Vn,ze,Lf,En,ps,Gl,aa,to,$f,Kl,Yl,gs,vs,no,Xl,Ge,qu,sb,lb,cb,ub,db,fb,hb,iA,bk,nF=(bk=class extends Zc{constructor(t,n){super();xe(this,Ge);xe(this,Vn);xe(this,ze);xe(this,Lf);xe(this,En);xe(this,ps);xe(this,Gl);xe(this,aa);xe(this,to);xe(this,$f);xe(this,Kl);xe(this,Yl);xe(this,gs);xe(this,vs);xe(this,no);xe(this,Xl,new Set);this.options=n,fe(this,Vn,t),fe(this,to,null),fe(this,aa,ab()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(q(this,ze).addObserver(this),uS(q(this,ze),this.options)?Me(this,Ge,qu).call(this):this.updateResult(),Me(this,Ge,ub).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return mb(q(this,ze),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return mb(q(this,ze),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Me(this,Ge,db).call(this),Me(this,Ge,fb).call(this),q(this,ze).removeObserver(this)}setOptions(t){const n=this.options,r=q(this,ze);if(this.options=q(this,Vn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof cr(this.options.enabled,q(this,ze))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Me(this,Ge,hb).call(this),q(this,ze).setOptions(this.options),n._defaulted&&!lp(this.options,n)&&q(this,Vn).getQueryCache().notify({type:"observerOptionsUpdated",query:q(this,ze),observer:this});const i=this.hasListeners();i&&dS(q(this,ze),r,this.options,n)&&Me(this,Ge,qu).call(this),this.updateResult(),i&&(q(this,ze)!==r||cr(this.options.enabled,q(this,ze))!==cr(n.enabled,q(this,ze))||_o(this.options.staleTime,q(this,ze))!==_o(n.staleTime,q(this,ze)))&&Me(this,Ge,sb).call(this);const a=Me(this,Ge,lb).call(this);i&&(q(this,ze)!==r||cr(this.options.enabled,q(this,ze))!==cr(n.enabled,q(this,ze))||a!==q(this,no))&&Me(this,Ge,cb).call(this,a)}getOptimisticResult(t){const n=q(this,Vn).getQueryCache().build(q(this,Vn),t),r=this.createResult(n,t);return iF(this,r)&&(fe(this,En,r),fe(this,Gl,this.options),fe(this,ps,q(this,ze).state)),r}getCurrentResult(){return q(this,En)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&q(this,aa).status==="pending"&&q(this,aa).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){q(this,Xl).add(t)}getCurrentQuery(){return q(this,ze)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=q(this,Vn).defaultQueryOptions(t),r=q(this,Vn).getQueryCache().build(q(this,Vn),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Me(this,Ge,qu).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),q(this,En)))}createResult(t,n){var T;const r=q(this,ze),i=this.options,a=q(this,En),s=q(this,ps),c=q(this,Gl),d=t!==r?t.state:q(this,Lf),{state:h}=t;let m={...h},p=!1,v;if(n._optimisticResults){const $=this.hasListeners(),z=!$&&uS(t,n),D=$&&dS(t,r,n,i);(z||D)&&(m={...m,...rA(h.data,t.options)}),n._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:_,errorUpdatedAt:x,status:y}=m;v=m.data;let w=!1;if(n.placeholderData!==void 0&&v===void 0&&y==="pending"){let $;a!=null&&a.isPlaceholderData&&n.placeholderData===(c==null?void 0:c.placeholderData)?($=a.data,w=!0):$=typeof n.placeholderData=="function"?n.placeholderData((T=q(this,Yl))==null?void 0:T.state.data,q(this,Yl)):n.placeholderData,$!==void 0&&(y="success",v=ib(a==null?void 0:a.data,$,n),p=!0)}if(n.select&&v!==void 0&&!w)if(a&&v===(s==null?void 0:s.data)&&n.select===q(this,$f))v=q(this,Kl);else try{fe(this,$f,n.select),v=n.select(v),v=ib(a==null?void 0:a.data,v,n),fe(this,Kl,v),fe(this,to,null)}catch($){fe(this,to,$)}q(this,to)&&(_=q(this,to),v=q(this,Kl),x=Date.now(),y="error");const b=m.fetchStatus==="fetching",j=y==="pending",E=y==="error",P=j&&b,O=v!==void 0,A={status:y,fetchStatus:m.fetchStatus,isPending:j,isSuccess:y==="success",isError:E,isInitialLoading:P,isLoading:P,data:v,dataUpdatedAt:m.dataUpdatedAt,error:_,errorUpdatedAt:x,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:m.dataUpdateCount>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:b,isRefetching:b&&!j,isLoadingError:E&&!O,isPaused:m.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:E&&O,isStale:R_(t,n),refetch:this.refetch,promise:q(this,aa),isEnabled:cr(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const $=A.data!==void 0,z=A.status==="error"&&!$,D=F=>{z?F.reject(A.error):$&&F.resolve(A.data)},Z=()=>{const F=fe(this,aa,A.promise=ab());D(F)},I=q(this,aa);switch(I.status){case"pending":t.queryHash===r.queryHash&&D(I);break;case"fulfilled":(z||A.data!==I.value)&&Z();break;case"rejected":(!z||A.error!==I.reason)&&Z();break}}return A}updateResult(){const t=q(this,En),n=this.createResult(q(this,ze),this.options);if(fe(this,ps,q(this,ze).state),fe(this,Gl,this.options),q(this,ps).data!==void 0&&fe(this,Yl,q(this,ze)),lp(n,t))return;fe(this,En,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!q(this,Xl).size)return!0;const s=new Set(a??q(this,Xl));return this.options.throwOnError&&s.add("error"),Object.keys(q(this,En)).some(c=>{const u=c;return q(this,En)[u]!==t[u]&&s.has(u)})};Me(this,Ge,iA).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Me(this,Ge,ub).call(this)}},Vn=new WeakMap,ze=new WeakMap,Lf=new WeakMap,En=new WeakMap,ps=new WeakMap,Gl=new WeakMap,aa=new WeakMap,to=new WeakMap,$f=new WeakMap,Kl=new WeakMap,Yl=new WeakMap,gs=new WeakMap,vs=new WeakMap,no=new WeakMap,Xl=new WeakMap,Ge=new WeakSet,qu=function(t){Me(this,Ge,hb).call(this);let n=q(this,ze).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(kn)),n},sb=function(){Me(this,Ge,db).call(this);const t=_o(this.options.staleTime,q(this,ze));if(Wd.isServer()||q(this,En).isStale||!nb(t))return;const r=YC(q(this,En).dataUpdatedAt,t)+1;fe(this,gs,is.setTimeout(()=>{q(this,En).isStale||this.updateResult()},r))},lb=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(q(this,ze)):this.options.refetchInterval)??!1},cb=function(t){Me(this,Ge,fb).call(this),fe(this,no,t),!(Wd.isServer()||cr(this.options.enabled,q(this,ze))===!1||!nb(q(this,no))||q(this,no)===0)&&fe(this,vs,is.setInterval(()=>{(this.options.refetchIntervalInBackground||M_.isFocused())&&Me(this,Ge,qu).call(this)},q(this,no)))},ub=function(){Me(this,Ge,sb).call(this),Me(this,Ge,cb).call(this,Me(this,Ge,lb).call(this))},db=function(){q(this,gs)!==void 0&&(is.clearTimeout(q(this,gs)),fe(this,gs,void 0))},fb=function(){q(this,vs)!==void 0&&(is.clearInterval(q(this,vs)),fe(this,vs,void 0))},hb=function(){const t=q(this,Vn).getQueryCache().build(q(this,Vn),this.options);if(t===q(this,ze))return;const n=q(this,ze);fe(this,ze,t),fe(this,Lf,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},iA=function(t){qt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(q(this,En))}),q(this,Vn).getQueryCache().notify({query:q(this,ze),type:"observerResultsUpdated"})})},bk);function rF(e,t){return cr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&cr(t.retryOnMount,e)===!1)}function uS(e,t){return rF(e,t)||e.state.data!==void 0&&mb(e,t,t.refetchOnMount)}function mb(e,t,n){if(cr(t.enabled,e)!==!1&&_o(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&R_(e,t)}return!1}function dS(e,t,n,r){return(e!==t||cr(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&R_(e,n)}function R_(e,t){return cr(t.enabled,e)!==!1&&e.isStaleByTime(_o(t.staleTime,e))}function iF(e,t){return!lp(e.getCurrentResult(),t)}var If,Pi,yn,ys,Ei,Wa,wk,aF=(wk=class extends tA{constructor(t){super();xe(this,Ei);xe(this,If);xe(this,Pi);xe(this,yn);xe(this,ys);fe(this,If,t.client),this.mutationId=t.mutationId,fe(this,yn,t.mutationCache),fe(this,Pi,[]),this.state=t.state||aA(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){q(this,Pi).includes(t)||(q(this,Pi).push(t),this.clearGcTimeout(),q(this,yn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){fe(this,Pi,q(this,Pi).filter(n=>n!==t)),this.scheduleGc(),q(this,yn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){q(this,Pi).length||(this.state.status==="pending"?this.scheduleGc():q(this,yn).remove(this))}continue(){var t;return((t=q(this,ys))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,c,u,d,h,m,p,v,_,x,y,w,b,j,E,P,O,C;const n=()=>{Me(this,Ei,Wa).call(this,{type:"continue"})},r={client:q(this,If),meta:this.options.meta,mutationKey:this.options.mutationKey};fe(this,ys,eA({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(A,T)=>{Me(this,Ei,Wa).call(this,{type:"failed",failureCount:A,error:T})},onPause:()=>{Me(this,Ei,Wa).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>q(this,yn).canRun(this)}));const i=this.state.status==="pending",a=!q(this,ys).canStart();try{if(i)n();else{Me(this,Ei,Wa).call(this,{type:"pending",variables:t,isPaused:a}),q(this,yn).config.onMutate&&await q(this,yn).config.onMutate(t,this,r);const T=await((c=(s=this.options).onMutate)==null?void 0:c.call(s,t,r));T!==this.state.context&&Me(this,Ei,Wa).call(this,{type:"pending",context:T,variables:t,isPaused:a})}const A=await q(this,ys).start();return await((d=(u=q(this,yn).config).onSuccess)==null?void 0:d.call(u,A,t,this.state.context,this,r)),await((m=(h=this.options).onSuccess)==null?void 0:m.call(h,A,t,this.state.context,r)),await((v=(p=q(this,yn).config).onSettled)==null?void 0:v.call(p,A,null,this.state.variables,this.state.context,this,r)),await((x=(_=this.options).onSettled)==null?void 0:x.call(_,A,null,t,this.state.context,r)),Me(this,Ei,Wa).call(this,{type:"success",data:A}),A}catch(A){try{await((w=(y=q(this,yn).config).onError)==null?void 0:w.call(y,A,t,this.state.context,this,r))}catch(T){Promise.reject(T)}try{await((j=(b=this.options).onError)==null?void 0:j.call(b,A,t,this.state.context,r))}catch(T){Promise.reject(T)}try{await((P=(E=q(this,yn).config).onSettled)==null?void 0:P.call(E,void 0,A,this.state.variables,this.state.context,this,r))}catch(T){Promise.reject(T)}try{await((C=(O=this.options).onSettled)==null?void 0:C.call(O,void 0,A,t,this.state.context,r))}catch(T){Promise.reject(T)}throw Me(this,Ei,Wa).call(this,{type:"error",error:A}),A}finally{q(this,yn).runNext(this)}}},If=new WeakMap,Pi=new WeakMap,yn=new WeakMap,ys=new WeakMap,Ei=new WeakSet,Wa=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),qt.batch(()=>{q(this,Pi).forEach(r=>{r.onMutationUpdate(t)}),q(this,yn).notify({mutation:this,type:"updated",action:t})})},wk);function aA(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var oa,ei,Rf,_k,oF=(_k=class extends Zc{constructor(t={}){super();xe(this,oa);xe(this,ei);xe(this,Rf);this.config=t,fe(this,oa,new Set),fe(this,ei,new Map),fe(this,Rf,0)}build(t,n,r){const i=new aF({client:t,mutationCache:this,mutationId:++Ph(this,Rf)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){q(this,oa).add(t);const n=Hh(t);if(typeof n=="string"){const r=q(this,ei).get(n);r?r.push(t):q(this,ei).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(q(this,oa).delete(t)){const n=Hh(t);if(typeof n=="string"){const r=q(this,ei).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&q(this,ei).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Hh(t);if(typeof n=="string"){const r=q(this,ei).get(n),i=r==null?void 0:r.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=Hh(t);if(typeof n=="string"){const i=(r=q(this,ei).get(n))==null?void 0:r.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){qt.batch(()=>{q(this,oa).forEach(t=>{this.notify({type:"removed",mutation:t})}),q(this,oa).clear(),q(this,ei).clear()})}getAll(){return Array.from(q(this,oa))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>iS(n,r))}findAll(t={}){return this.getAll().filter(n=>iS(t,n))}notify(t){qt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return qt.batch(()=>Promise.all(t.map(n=>n.continue().catch(kn))))}},oa=new WeakMap,ei=new WeakMap,Rf=new WeakMap,_k);function Hh(e){var t;return(t=e.options.scope)==null?void 0:t.id}var sa,ro,qn,la,wa,Em,pb,jk,sF=(jk=class extends Zc{constructor(n,r){super();xe(this,wa);xe(this,sa);xe(this,ro);xe(this,qn);xe(this,la);fe(this,sa,n),this.setOptions(r),this.bindMethods(),Me(this,wa,Em).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=q(this,sa).defaultMutationOptions(n),lp(this.options,r)||q(this,sa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:q(this,qn),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Os(r.mutationKey)!==Os(this.options.mutationKey)?this.reset():((i=q(this,qn))==null?void 0:i.state.status)==="pending"&&q(this,qn).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=q(this,qn))==null||n.removeObserver(this)}onMutationUpdate(n){Me(this,wa,Em).call(this),Me(this,wa,pb).call(this,n)}getCurrentResult(){return q(this,ro)}reset(){var n;(n=q(this,qn))==null||n.removeObserver(this),fe(this,qn,void 0),Me(this,wa,Em).call(this),Me(this,wa,pb).call(this)}mutate(n,r){var i;return fe(this,la,r),(i=q(this,qn))==null||i.removeObserver(this),fe(this,qn,q(this,sa).getMutationCache().build(q(this,sa),this.options)),q(this,qn).addObserver(this),q(this,qn).execute(n)}},sa=new WeakMap,ro=new WeakMap,qn=new WeakMap,la=new WeakMap,wa=new WeakSet,Em=function(){var r;const n=((r=q(this,qn))==null?void 0:r.state)??aA();fe(this,ro,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},pb=function(n){qt.batch(()=>{var r,i,a,s,c,u,d,h;if(q(this,la)&&this.hasListeners()){const m=q(this,ro).variables,p=q(this,ro).context,v={client:q(this,sa),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(i=(r=q(this,la)).onSuccess)==null||i.call(r,n.data,m,p,v)}catch(_){Promise.reject(_)}try{(s=(a=q(this,la)).onSettled)==null||s.call(a,n.data,null,m,p,v)}catch(_){Promise.reject(_)}}else if((n==null?void 0:n.type)==="error"){try{(u=(c=q(this,la)).onError)==null||u.call(c,n.error,m,p,v)}catch(_){Promise.reject(_)}try{(h=(d=q(this,la)).onSettled)==null||h.call(d,void 0,n.error,m,p,v)}catch(_){Promise.reject(_)}}}this.listeners.forEach(m=>{m(q(this,ro))})})},jk),Oi,Nk,lF=(Nk=class extends Zc{constructor(t={}){super();xe(this,Oi);this.config=t,fe(this,Oi,new Map)}build(t,n,r){const i=n.queryKey,a=n.queryHash??L_(i,n);let s=this.get(a);return s||(s=new tF({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){q(this,Oi).has(t.queryHash)||(q(this,Oi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=q(this,Oi).get(t.queryHash);n&&(t.destroy(),n===t&&q(this,Oi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){qt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return q(this,Oi).get(t)}getAll(){return[...q(this,Oi).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>rS(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>rS(t,r)):n}notify(t){qt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){qt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){qt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Oi=new WeakMap,Nk),Et,io,ao,Ql,Jl,oo,ec,tc,Sk,cF=(Sk=class{constructor(e={}){xe(this,Et);xe(this,io);xe(this,ao);xe(this,Ql);xe(this,Jl);xe(this,oo);xe(this,ec);xe(this,tc);fe(this,Et,e.queryCache||new lF),fe(this,io,e.mutationCache||new oF),fe(this,ao,e.defaultOptions||{}),fe(this,Ql,new Map),fe(this,Jl,new Map),fe(this,oo,0)}mount(){Ph(this,oo)._++,q(this,oo)===1&&(fe(this,ec,M_.subscribe(async e=>{e&&(await this.resumePausedMutations(),q(this,Et).onFocus())})),fe(this,tc,cp.subscribe(async e=>{e&&(await this.resumePausedMutations(),q(this,Et).onOnline())})))}unmount(){var e,t;Ph(this,oo)._--,q(this,oo)===0&&((e=q(this,ec))==null||e.call(this),fe(this,ec,void 0),(t=q(this,tc))==null||t.call(this),fe(this,tc,void 0))}isFetching(e){return q(this,Et).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return q(this,io).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=q(this,Et).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=q(this,Et).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(_o(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return q(this,Et).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=q(this,Et).get(r.queryHash),a=i==null?void 0:i.state.data,s=WR(t,a);if(s!==void 0)return q(this,Et).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return qt.batch(()=>q(this,Et).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=q(this,Et).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=q(this,Et);qt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=q(this,Et);return qt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=qt.batch(()=>q(this,Et).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(kn).catch(kn)}invalidateQueries(e,t={}){return qt.batch(()=>(q(this,Et).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=qt.batch(()=>q(this,Et).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,n);return n.throwOnError||(a=a.catch(kn)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(kn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=q(this,Et).build(this,t);return n.isStaleByTime(_o(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(kn).catch(kn)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(kn).catch(kn)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return cp.isOnline()?q(this,io).resumePausedMutations():Promise.resolve()}getQueryCache(){return q(this,Et)}getMutationCache(){return q(this,io)}getDefaultOptions(){return q(this,ao)}setDefaultOptions(e){fe(this,ao,e)}setQueryDefaults(e,t){q(this,Ql).set(Os(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...q(this,Ql).values()],n={};return t.forEach(r=>{Ud(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){q(this,Jl).set(Os(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...q(this,Jl).values()],n={};return t.forEach(r=>{Ud(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...q(this,ao).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=L_(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===$_&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...q(this,ao).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){q(this,Et).clear(),q(this,io).clear()}},Et=new WeakMap,io=new WeakMap,ao=new WeakMap,Ql=new WeakMap,Jl=new WeakMap,oo=new WeakMap,ec=new WeakMap,tc=new WeakMap,Sk),oA=N.createContext(void 0),F_=e=>{const t=N.useContext(oA);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},uF=({client:e,children:t})=>(N.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),o.jsx(oA.Provider,{value:e,children:t})),sA=N.createContext(!1),dF=()=>N.useContext(sA);sA.Provider;function fF(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var hF=N.createContext(fF()),mF=()=>N.useContext(hF),pF=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?I_(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},gF=e=>{N.useEffect(()=>{e.clearReset()},[e])},vF=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||I_(n,[e.error,r])),yF=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},xF=(e,t)=>e.isLoading&&e.isFetching&&!t,bF=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,fS=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function wF(e,t,n){var p,v,_,x;const r=dF(),i=mF(),a=F_(),s=a.defaultQueryOptions(e);(v=(p=a.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||v.call(p,s);const c=a.getQueryCache().get(s.queryHash);s._optimisticResults=r?"isRestoring":"optimistic",yF(s),pF(s,i,c),gF(i);const u=!a.getQueryCache().get(s.queryHash),[d]=N.useState(()=>new t(a,s)),h=d.getOptimisticResult(s),m=!r&&e.subscribed!==!1;if(N.useSyncExternalStore(N.useCallback(y=>{const w=m?d.subscribe(qt.batchCalls(y)):kn;return d.updateResult(),w},[d,m]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),N.useEffect(()=>{d.setOptions(s)},[s,d]),bF(s,h))throw fS(s,d,i);if(vF({result:h,errorResetBoundary:i,throwOnError:s.throwOnError,query:c,suspense:s.suspense}))throw h.error;if((x=(_=a.getDefaultOptions().queries)==null?void 0:_._experimental_afterQuery)==null||x.call(_,s,h),s.experimental_prefetchInRender&&!Wd.isServer()&&xF(h,r)){const y=u?fS(s,d,i):c==null?void 0:c.promise;y==null||y.catch(kn).finally(()=>{d.updateResult()})}return s.notifyOnChangeProps?h:d.trackResult(h)}function zt(e,t){return wF(e,nF)}function hS(e,t){const n=F_(),[r]=N.useState(()=>new sF(n,e));N.useEffect(()=>{r.setOptions(e)},[r,e]);const i=N.useSyncExternalStore(N.useCallback(s=>r.subscribe(qt.batchCalls(s)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=N.useCallback((s,c)=>{r.mutate(s,c).catch(kn)},[r]);if(i.error&&I_(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}const lA=N.createContext(void 0),_F=({children:e})=>{const[t,n]=N.useState(null),[r,i]=N.useState(null),[a,s]=N.useState(!0),c="/api";N.useEffect(()=>{const m=new URLSearchParams(window.location.search),p=m.get("token"),v=m.get("error");if(v){alert(`Login failed: ${v}`),window.history.replaceState({},document.title,window.location.pathname),s(!1);return}if(p){localStorage.setItem("auth_token",p),i(p),u(p),window.history.replaceState({},document.title,window.location.pathname);return}const _=localStorage.getItem("auth_token");_?(i(_),u(_)):s(!1)},[]);const u=async m=>{try{const p=await fetch(`${c}/api/auth/me`,{headers:{Authorization:`Bearer ${m}`}});if(p.ok){const v=await p.json();n(v)}else localStorage.removeItem("auth_token"),i(null)}catch(p){console.error("Error fetching user:",p),localStorage.removeItem("auth_token"),i(null)}finally{s(!1)}},d=m=>{const p=encodeURIComponent(window.location.origin),v=`${c}/api/auth/login/${m}?redirect_uri=${p}`;window.location.href=v},h=()=>{localStorage.removeItem("auth_token"),i(null),n(null)};return o.jsx(lA.Provider,{value:{user:t,token:r,login:d,logout:h,isAuthenticated:!!t,isLoading:a},children:e})},e0=()=>{const e=N.useContext(lA);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e},Vh={Alabama:"AL",Alaska:"AK",Arizona:"AZ",Arkansas:"AR",California:"CA",Colorado:"CO",Connecticut:"CT",Delaware:"DE",Florida:"FL",Georgia:"GA",Hawaii:"HI",Idaho:"ID",Illinois:"IL",Indiana:"IN",Iowa:"IA",Kansas:"KS",Kentucky:"KY",Louisiana:"LA",Maine:"ME",Maryland:"MD",Massachusetts:"MA",Michigan:"MI",Minnesota:"MN",Mississippi:"MS",Missouri:"MO",Montana:"MT",Nebraska:"NE",Nevada:"NV","New Hampshire":"NH","New Jersey":"NJ","New Mexico":"NM","New York":"NY","North Carolina":"NC","North Dakota":"ND",Ohio:"OH",Oklahoma:"OK",Oregon:"OR",Pennsylvania:"PA","Rhode Island":"RI","South Carolina":"SC","South Dakota":"SD",Tennessee:"TN",Texas:"TX",Utah:"UT",Vermont:"VT",Virginia:"VA",Washington:"WA","West Virginia":"WV",Wisconsin:"WI",Wyoming:"WY","District of Columbia":"DC","Puerto Rico":"PR"};function gb(e){if(e&&e.length===2&&e===e.toUpperCase())return e;if(Vh[e])return Vh[e];const t=Object.keys(Vh).find(n=>n.toLowerCase()===e.toLowerCase());return t?Vh[t]:(console.warn(`State name "${e}" not found in mapping`),e)}const cA=N.createContext(void 0),jF=({children:e})=>{const{user:t,isAuthenticated:n}=e0(),[r,i]=N.useState(null);N.useEffect(()=>{if(n&&t){if(t.state&&t.city){const u=gb(t.state);i({state:u,county:t.county||"",city:t.city,school_board:t.school_board})}}else{const u=localStorage.getItem("user_location");if(u)try{const d=JSON.parse(u);d.state&&(d.state=gb(d.state)),i(d),localStorage.setItem("user_location",JSON.stringify(d))}catch(d){console.error("Failed to parse saved location:",d)}}},[t,n]);const a=u=>{i(u),n||localStorage.setItem("user_location",JSON.stringify(u))},s=()=>{i(null),localStorage.removeItem("user_location")},c=r!==null&&!!r.state&&!!r.city;return o.jsx(cA.Provider,{value:{location:r,setLocation:a,clearLocation:s,hasLocation:c},children:e})},Hf=()=>{const e=N.useContext(cA);if(e===void 0)throw new Error("useLocation must be used within a LocationProvider");return e};function NF(){const{pathname:e}=Us();return N.useEffect(()=>{window.scrollTo(0,0)},[e]),null}var SF=Object.defineProperty,PF=(e,t,n)=>t in e?SF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hy=(e,t,n)=>(PF(e,typeof t!="symbol"?t+"":t,n),n);let EF=class{constructor(){hy(this,"current",this.detect()),hy(this,"handoffState","pending"),hy(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},ws=new EF,jn=(e,t)=>{ws.isServer?N.useEffect(e,t):N.useLayoutEffect(e,t)};function Lr(e){let t=N.useRef(e);return jn(()=>{t.current=e},[e]),t}let Ye=function(e){let t=Lr(e);return H.useCallback((...n)=>t.current(...n),[t])};function uA(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Pa(){let e=[],t={addEventListener(n,r,i,a){return n.addEventListener(r,i,a),t.add(()=>n.removeEventListener(r,i,a))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let r=setTimeout(...n);return t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return uA(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,i){let a=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:i}),this.add(()=>{Object.assign(n.style,{[r]:a})})},group(n){let r=Pa();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let i of e.splice(r,1))i()}},dispose(){for(let n of e.splice(0))n()}};return t}function t0(){let[e]=N.useState(Pa);return N.useEffect(()=>()=>e.dispose(),[e]),e}function OF(){let e=typeof document>"u";return"useSyncExternalStore"in ix?(t=>t.useSyncExternalStore)(ix)(()=>()=>{},()=>!1,()=>!e):!1}function D_(){let e=OF(),[t,n]=N.useState(ws.isHandoffComplete);return t&&ws.isHandoffComplete===!1&&n(!1),N.useEffect(()=>{t!==!0&&n(!0)},[t]),N.useEffect(()=>ws.handoff(),[]),e?!1:t}var mS;let Vf=(mS=H.useId)!=null?mS:function(){let e=D_(),[t,n]=H.useState(e?()=>ws.nextId():null);return jn(()=>{t===null&&n(ws.nextId())},[t]),t!=null?""+t:void 0};function tn(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,tn),r}function qf(e){return ws.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let vb=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var rr=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(rr||{}),Zu=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Zu||{}),kF=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(kF||{});function dA(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(vb)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var B_=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(B_||{});function z_(e,t=0){var n;return e===((n=qf(e))==null?void 0:n.body)?!1:tn(t,{0(){return e.matches(vb)},1(){let r=e;for(;r!==null;){if(r.matches(vb))return!0;r=r.parentElement}return!1}})}function fA(e){let t=qf(e);Pa().nextFrame(()=>{t&&!z_(t.activeElement,0)&&AF(e)})}var CF=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(CF||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function AF(e){e==null||e.focus({preventScroll:!0})}let TF=["textarea","input"].join(",");function MF(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,TF))!=null?n:!1}function as(e,t=n=>n){return e.slice().sort((n,r)=>{let i=t(n),a=t(r);if(i===null||a===null)return 0;let s=i.compareDocumentPosition(a);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function LF(e,t){return Ko(dA(),t,{relativeTo:e})}function Ko(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:i=[]}={}){let a=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,s=Array.isArray(e)?n?as(e):e:dA(e);i.length>0&&s.length>1&&(s=s.filter(v=>!i.includes(v))),r=r??a.activeElement;let c=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,s.indexOf(r))-1;if(t&4)return Math.max(0,s.indexOf(r))+1;if(t&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=t&32?{preventScroll:!0}:{},h=0,m=s.length,p;do{if(h>=m||h+m<=0)return 0;let v=u+h;if(t&16)v=(v+m)%m;else{if(v<0)return 3;if(v>=m)return 1}p=s[v],p==null||p.focus(d),h+=c}while(p!==a.activeElement);return t&6&&MF(p)&&p.select(),2}function $F(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function IF(){return/Android/gi.test(window.navigator.userAgent)}function RF(){return $F()||IF()}function qh(e,t,n){let r=Lr(t);N.useEffect(()=>{function i(a){r.current(a)}return document.addEventListener(e,i,n),()=>document.removeEventListener(e,i,n)},[e,n])}function FF(e,t,n){let r=Lr(t);N.useEffect(()=>{function i(a){r.current(a)}return window.addEventListener(e,i,n),()=>window.removeEventListener(e,i,n)},[e,n])}function DF(e,t,n=!0){let r=N.useRef(!1);N.useEffect(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function i(s,c){if(!r.current||s.defaultPrevented)return;let u=c(s);if(u===null||!u.getRootNode().contains(u)||!u.isConnected)return;let d=function h(m){return typeof m=="function"?h(m()):Array.isArray(m)||m instanceof Set?m:[m]}(e);for(let h of d){if(h===null)continue;let m=h instanceof HTMLElement?h:h.current;if(m!=null&&m.contains(u)||s.composed&&s.composedPath().includes(m))return}return!z_(u,B_.Loose)&&u.tabIndex!==-1&&s.preventDefault(),t(s,u)}let a=N.useRef(null);qh("pointerdown",s=>{var c,u;r.current&&(a.current=((u=(c=s.composedPath)==null?void 0:c.call(s))==null?void 0:u[0])||s.target)},!0),qh("mousedown",s=>{var c,u;r.current&&(a.current=((u=(c=s.composedPath)==null?void 0:c.call(s))==null?void 0:u[0])||s.target)},!0),qh("click",s=>{RF()||a.current&&(i(s,()=>a.current),a.current=null)},!0),qh("touchend",s=>i(s,()=>s.target instanceof HTMLElement?s.target:null),!0),FF("blur",s=>i(s,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function BF(...e){return N.useMemo(()=>qf(...e),[...e])}function pS(e){var t;if(e.type)return e.type;let n=(t=e.as)!=null?t:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function hA(e,t){let[n,r]=N.useState(()=>pS(e));return jn(()=>{r(pS(e))},[e.type,e.as]),jn(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}let zF=Symbol();function pi(...e){let t=N.useRef(e);N.useEffect(()=>{t.current=e},[e]);let n=Ye(r=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(r):i.current=r)});return e.every(r=>r==null||(r==null?void 0:r[zF]))?void 0:n}function gS(e){return[e.screenX,e.screenY]}function UF(){let e=N.useRef([-1,-1]);return{wasMoved(t){let n=gS(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=gS(t)}}}function WF({container:e,accept:t,walk:n,enabled:r=!0}){let i=N.useRef(t),a=N.useRef(n);N.useEffect(()=>{i.current=t,a.current=n},[t,n]),jn(()=>{if(!e||!r)return;let s=qf(e);if(!s)return;let c=i.current,u=a.current,d=Object.assign(m=>c(m),{acceptNode:c}),h=s.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,d,!1);for(;h.nextNode();)u(h.currentNode)},[e,r,i,a])}function up(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var cc=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(cc||{}),uo=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(uo||{});function Hr({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:a=!0,name:s,mergeRefs:c}){c=c??HF;let u=mA(t,e);if(a)return Zh(u,n,r,s,c);let d=i??0;if(d&2){let{static:h=!1,...m}=u;if(h)return Zh(m,n,r,s,c)}if(d&1){let{unmount:h=!0,...m}=u;return tn(h?0:1,{0(){return null},1(){return Zh({...m,hidden:!0,style:{display:"none"}},n,r,s,c)}})}return Zh(u,n,r,s,c)}function Zh(e,t={},n,r,i){let{as:a=n,children:s,refName:c="ref",...u}=my(e,["unmount","static"]),d=e.ref!==void 0?{[c]:e.ref}:{},h=typeof s=="function"?s(t):s;"className"in u&&u.className&&typeof u.className=="function"&&(u.className=u.className(t));let m={};if(t){let p=!1,v=[];for(let[_,x]of Object.entries(t))typeof x=="boolean"&&(p=!0),x===!0&&v.push(_);p&&(m["data-headlessui-state"]=v.join(" "))}if(a===N.Fragment&&Object.keys(vS(u)).length>0){if(!N.isValidElement(h)||Array.isArray(h)&&h.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(u).map(x=>` - ${x}`).join(` `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(x=>` - ${x}`).join(` `)].join(` `));let p=h.props,v=typeof(p==null?void 0:p.className)=="function"?(...x)=>up(p==null?void 0:p.className(...x),u.className):up(p==null?void 0:p.className,u.className),_=v?{className:v}:{};return N.cloneElement(h,Object.assign({},mA(h.props,vS(my(u,["ref"]))),m,d,{ref:i(h.ref,d.ref)},_))}return N.createElement(a,Object.assign({},my(u,["ref"]),a!==N.Fragment&&d,a!==N.Fragment&&m),h)}function HF(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function mA(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](i,...a){let s=n[r];for(let c of s){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;c(i,...a)}}});return t}function br(e){var t;return Object.assign(N.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function vS(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function my(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}let VF="div";var pA=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(pA||{});function qF(e,t){var n;let{features:r=1,...i}=e,a={ref:t,"aria-hidden":(r&2)===2?!0:(n=i["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return Hr({ourProps:a,theirProps:i,slot:{},defaultTag:VF,name:"Hidden"})}let gA=br(qF),U_=N.createContext(null);U_.displayName="OpenClosedContext";var ur=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(ur||{});function W_(){return N.useContext(U_)}function vA({value:e,children:t}){return H.createElement(U_.Provider,{value:e},t)}function ZF(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&GF(n)?!1:r}function GF(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function KF(e){throw new Error("Unexpected object: "+e)}var li=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(li||{});function YF(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=r??-1;switch(e.focus){case 0:{for(let a=0;a=0;--a)if(!t.resolveDisabled(n[a],a,n))return a;return r}case 2:{for(let a=i+1;a=0;--a)if(!t.resolveDisabled(n[a],a,n))return a;return r}case 4:{for(let a=0;a(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(nt||{});function n0(){let e=N.useRef(!1);return jn(()=>(e.current=!0,()=>{e.current=!1}),[]),e}let yS=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function xS(e){var t,n;let r=(t=e.innerText)!=null?t:"",i=e.cloneNode(!0);if(!(i instanceof HTMLElement))return r;let a=!1;for(let c of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))c.remove(),a=!0;let s=a?(n=i.innerText)!=null?n:"":r;return yS.test(s)&&(s=s.replace(yS,"")),s}function XF(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let r=n.split(" ").map(i=>{let a=document.getElementById(i);if(a){let s=a.getAttribute("aria-label");return typeof s=="string"?s.trim():xS(a).trim()}return null}).filter(Boolean);if(r.length>0)return r.join(", ")}return xS(e).trim()}function QF(e){let t=N.useRef(""),n=N.useRef("");return Ye(()=>{let r=e.current;if(!r)return"";let i=r.innerText;if(t.current===i)return n.current;let a=XF(r).trim().toLowerCase();return t.current=i,n.current=a,a})}var JF=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(JF||{}),eD=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(eD||{}),tD=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e))(tD||{});function py(e,t=n=>n){let n=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,r=as(t(e.items.slice()),a=>a.dataRef.current.domRef.current),i=n?r.indexOf(n):null;return i===-1&&(i=null),{items:r,activeItemIndex:i}}let nD={1(e){return e.menuState===1?e:{...e,activeItemIndex:null,menuState:1}},0(e){return e.menuState===0?e:{...e,__demoMode:!1,menuState:0}},2:(e,t)=>{var n;let r=py(e),i=YF(t,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:a=>a.id,resolveDisabled:a=>a.dataRef.current.disabled});return{...e,...r,searchQuery:"",activeItemIndex:i,activationTrigger:(n=t.trigger)!=null?n:1}},3:(e,t)=>{let n=e.searchQuery!==""?0:1,r=e.searchQuery+t.value.toLowerCase(),i=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+n).concat(e.items.slice(0,e.activeItemIndex+n)):e.items).find(s=>{var c;return((c=s.dataRef.current.textValue)==null?void 0:c.startsWith(r))&&!s.dataRef.current.disabled}),a=i?e.items.indexOf(i):-1;return a===-1||a===e.activeItemIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeItemIndex:a,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,t)=>{let n=py(e,r=>[...r,{id:t.id,dataRef:t.dataRef}]);return{...e,...n}},6:(e,t)=>{let n=py(e,r=>{let i=r.findIndex(a=>a.id===t.id);return i!==-1&&r.splice(i,1),r});return{...e,...n,activationTrigger:1}}},H_=N.createContext(null);H_.displayName="MenuContext";function r0(e){let t=N.useContext(H_);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,r0),n}return t}function rD(e,t){return tn(t.type,nD,e,t)}let iD=N.Fragment;function aD(e,t){let{__demoMode:n=!1,...r}=e,i=N.useReducer(rD,{__demoMode:n,menuState:n?0:1,buttonRef:N.createRef(),itemsRef:N.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:a,itemsRef:s,buttonRef:c},u]=i,d=pi(t);DF([c,s],(v,_)=>{var x;u({type:1}),z_(_,B_.Loose)||(v.preventDefault(),(x=c.current)==null||x.focus())},a===0);let h=Ye(()=>{u({type:1})}),m=N.useMemo(()=>({open:a===0,close:h}),[a,h]),p={ref:d};return H.createElement(H_.Provider,{value:i},H.createElement(vA,{value:tn(a,{0:ur.Open,1:ur.Closed})},Hr({ourProps:p,theirProps:r,slot:m,defaultTag:iD,name:"Menu"})))}let oD="button";function sD(e,t){var n;let r=Vf(),{id:i=`headlessui-menu-button-${r}`,...a}=e,[s,c]=r0("Menu.Button"),u=pi(s.buttonRef,t),d=t0(),h=Ye(x=>{switch(x.key){case nt.Space:case nt.Enter:case nt.ArrowDown:x.preventDefault(),x.stopPropagation(),c({type:0}),d.nextFrame(()=>c({type:2,focus:li.First}));break;case nt.ArrowUp:x.preventDefault(),x.stopPropagation(),c({type:0}),d.nextFrame(()=>c({type:2,focus:li.Last}));break}}),m=Ye(x=>{switch(x.key){case nt.Space:x.preventDefault();break}}),p=Ye(x=>{if(ZF(x.currentTarget))return x.preventDefault();e.disabled||(s.menuState===0?(c({type:1}),d.nextFrame(()=>{var y;return(y=s.buttonRef.current)==null?void 0:y.focus({preventScroll:!0})})):(x.preventDefault(),c({type:0})))}),v=N.useMemo(()=>({open:s.menuState===0}),[s]),_={ref:u,id:i,type:hA(e,s.buttonRef),"aria-haspopup":"menu","aria-controls":(n=s.itemsRef.current)==null?void 0:n.id,"aria-expanded":s.menuState===0,onKeyDown:h,onKeyUp:m,onClick:p};return Hr({ourProps:_,theirProps:a,slot:v,defaultTag:oD,name:"Menu.Button"})}let lD="div",cD=cc.RenderStrategy|cc.Static;function uD(e,t){var n,r;let i=Vf(),{id:a=`headlessui-menu-items-${i}`,...s}=e,[c,u]=r0("Menu.Items"),d=pi(c.itemsRef,t),h=BF(c.itemsRef),m=t0(),p=W_(),v=p!==null?(p&ur.Open)===ur.Open:c.menuState===0;N.useEffect(()=>{let b=c.itemsRef.current;b&&c.menuState===0&&b!==(h==null?void 0:h.activeElement)&&b.focus({preventScroll:!0})},[c.menuState,c.itemsRef,h]),WF({container:c.itemsRef.current,enabled:c.menuState===0,accept(b){return b.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:b.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(b){b.setAttribute("role","none")}});let _=Ye(b=>{var j,E;switch(m.dispose(),b.key){case nt.Space:if(c.searchQuery!=="")return b.preventDefault(),b.stopPropagation(),u({type:3,value:b.key});case nt.Enter:if(b.preventDefault(),b.stopPropagation(),u({type:1}),c.activeItemIndex!==null){let{dataRef:P}=c.items[c.activeItemIndex];(E=(j=P.current)==null?void 0:j.domRef.current)==null||E.click()}fA(c.buttonRef.current);break;case nt.ArrowDown:return b.preventDefault(),b.stopPropagation(),u({type:2,focus:li.Next});case nt.ArrowUp:return b.preventDefault(),b.stopPropagation(),u({type:2,focus:li.Previous});case nt.Home:case nt.PageUp:return b.preventDefault(),b.stopPropagation(),u({type:2,focus:li.First});case nt.End:case nt.PageDown:return b.preventDefault(),b.stopPropagation(),u({type:2,focus:li.Last});case nt.Escape:b.preventDefault(),b.stopPropagation(),u({type:1}),Pa().nextFrame(()=>{var P;return(P=c.buttonRef.current)==null?void 0:P.focus({preventScroll:!0})});break;case nt.Tab:b.preventDefault(),b.stopPropagation(),u({type:1}),Pa().nextFrame(()=>{LF(c.buttonRef.current,b.shiftKey?rr.Previous:rr.Next)});break;default:b.key.length===1&&(u({type:3,value:b.key}),m.setTimeout(()=>u({type:4}),350));break}}),x=Ye(b=>{switch(b.key){case nt.Space:b.preventDefault();break}}),y=N.useMemo(()=>({open:c.menuState===0}),[c]),w={"aria-activedescendant":c.activeItemIndex===null||(n=c.items[c.activeItemIndex])==null?void 0:n.id,"aria-labelledby":(r=c.buttonRef.current)==null?void 0:r.id,id:a,onKeyDown:_,onKeyUp:x,role:"menu",tabIndex:0,ref:d};return Hr({ourProps:w,theirProps:s,slot:y,defaultTag:lD,features:cD,visible:v,name:"Menu.Items"})}let dD=N.Fragment;function fD(e,t){let n=Vf(),{id:r=`headlessui-menu-item-${n}`,disabled:i=!1,...a}=e,[s,c]=r0("Menu.Item"),u=s.activeItemIndex!==null?s.items[s.activeItemIndex].id===r:!1,d=N.useRef(null),h=pi(t,d);jn(()=>{if(s.__demoMode||s.menuState!==0||!u||s.activationTrigger===0)return;let P=Pa();return P.requestAnimationFrame(()=>{var O,C;(C=(O=d.current)==null?void 0:O.scrollIntoView)==null||C.call(O,{block:"nearest"})}),P.dispose},[s.__demoMode,d,u,s.menuState,s.activationTrigger,s.activeItemIndex]);let m=QF(d),p=N.useRef({disabled:i,domRef:d,get textValue(){return m()}});jn(()=>{p.current.disabled=i},[p,i]),jn(()=>(c({type:5,id:r,dataRef:p}),()=>c({type:6,id:r})),[p,r]);let v=Ye(()=>{c({type:1})}),_=Ye(P=>{if(i)return P.preventDefault();c({type:1}),fA(s.buttonRef.current)}),x=Ye(()=>{if(i)return c({type:2,focus:li.Nothing});c({type:2,focus:li.Specific,id:r})}),y=UF(),w=Ye(P=>y.update(P)),b=Ye(P=>{y.wasMoved(P)&&(i||u||c({type:2,focus:li.Specific,id:r,trigger:0}))}),j=Ye(P=>{y.wasMoved(P)&&(i||u&&c({type:2,focus:li.Nothing}))}),E=N.useMemo(()=>({active:u,disabled:i,close:v}),[u,i,v]);return Hr({ourProps:{id:r,ref:h,role:"menuitem",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,disabled:void 0,onClick:_,onFocus:x,onPointerEnter:w,onMouseEnter:w,onPointerMove:b,onMouseMove:b,onPointerLeave:j,onMouseLeave:j},theirProps:a,slot:E,defaultTag:dD,name:"Menu.Item"})}let hD=br(aD),mD=br(sD),pD=br(uD),gD=br(fD),ol=Object.assign(hD,{Button:mD,Items:pD,Item:gD});function vD(e=0){let[t,n]=N.useState(e),r=n0(),i=N.useCallback(u=>{r.current&&n(d=>d|u)},[t,r]),a=N.useCallback(u=>!!(t&u),[t]),s=N.useCallback(u=>{r.current&&n(d=>d&~u)},[n,r]),c=N.useCallback(u=>{r.current&&n(d=>d^u)},[n]);return{flags:t,addFlag:i,hasFlag:a,removeFlag:s,toggleFlag:c}}function yD({onFocus:e}){let[t,n]=N.useState(!0),r=n0();return t?H.createElement(gA,{as:"button",type:"button",features:pA.Focusable,onFocus:i=>{i.preventDefault();let a,s=50;function c(){if(s--<=0){a&&cancelAnimationFrame(a);return}if(e()){if(cancelAnimationFrame(a),!r.current)return;n(!1);return}a=requestAnimationFrame(c)}a=requestAnimationFrame(c)}}):null}const yA=N.createContext(null);function xD(){return{groups:new Map,get(e,t){var n;let r=this.groups.get(e);r||(r=new Map,this.groups.set(e,r));let i=(n=r.get(t))!=null?n:0;r.set(t,i+1);let a=Array.from(r.keys()).indexOf(t);function s(){let c=r.get(t);c>1?r.set(t,c-1):r.delete(t)}return[a,s]}}}function bD({children:e}){let t=N.useRef(xD());return N.createElement(yA.Provider,{value:t},e)}function xA(e){let t=N.useContext(yA);if(!t)throw new Error("You must wrap your component in a ");let n=wD(),[r,i]=t.current.get(e,n);return N.useEffect(()=>i,[]),r}function wD(){var e,t,n;let r=(n=(t=(e=N.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)==null?void 0:e.ReactCurrentOwner)==null?void 0:t.current)!=null?n:null;if(!r)return Symbol();let i=[],a=r;for(;a;)i.push(a.index),a=a.return;return"$."+i.join(".")}var _D=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(_D||{}),jD=(e=>(e[e.Less=-1]="Less",e[e.Equal=0]="Equal",e[e.Greater=1]="Greater",e))(jD||{}),ND=(e=>(e[e.SetSelectedIndex=0]="SetSelectedIndex",e[e.RegisterTab=1]="RegisterTab",e[e.UnregisterTab=2]="UnregisterTab",e[e.RegisterPanel=3]="RegisterPanel",e[e.UnregisterPanel=4]="UnregisterPanel",e))(ND||{});let SD={0(e,t){var n;let r=as(e.tabs,h=>h.current),i=as(e.panels,h=>h.current),a=r.filter(h=>{var m;return!((m=h.current)!=null&&m.hasAttribute("disabled"))}),s={...e,tabs:r,panels:i};if(t.index<0||t.index>r.length-1){let h=tn(Math.sign(t.index-e.selectedIndex),{[-1]:()=>1,0:()=>tn(Math.sign(t.index),{[-1]:()=>0,0:()=>0,1:()=>1}),1:()=>0});if(a.length===0)return s;let m=tn(h,{0:()=>r.indexOf(a[0]),1:()=>r.indexOf(a[a.length-1])});return{...s,selectedIndex:m===-1?e.selectedIndex:m}}let c=r.slice(0,t.index),u=[...r.slice(t.index),...c].find(h=>a.includes(h));if(!u)return s;let d=(n=r.indexOf(u))!=null?n:e.selectedIndex;return d===-1&&(d=e.selectedIndex),{...s,selectedIndex:d}},1(e,t){if(e.tabs.includes(t.tab))return e;let n=e.tabs[e.selectedIndex],r=as([...e.tabs,t.tab],a=>a.current),i=e.selectedIndex;return e.info.current.isControlled||(i=r.indexOf(n),i===-1&&(i=e.selectedIndex)),{...e,tabs:r,selectedIndex:i}},2(e,t){return{...e,tabs:e.tabs.filter(n=>n!==t.tab)}},3(e,t){return e.panels.includes(t.panel)?e:{...e,panels:as([...e.panels,t.panel],n=>n.current)}},4(e,t){return{...e,panels:e.panels.filter(n=>n!==t.panel)}}},V_=N.createContext(null);V_.displayName="TabsDataContext";function uc(e){let t=N.useContext(V_);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,uc),n}return t}let q_=N.createContext(null);q_.displayName="TabsActionsContext";function Z_(e){let t=N.useContext(q_);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Z_),n}return t}function PD(e,t){return tn(t.type,SD,e,t)}let ED=N.Fragment;function OD(e,t){let{defaultIndex:n=0,vertical:r=!1,manual:i=!1,onChange:a,selectedIndex:s=null,...c}=e;const u=r?"vertical":"horizontal",d=i?"manual":"auto";let h=s!==null,m=Lr({isControlled:h}),p=pi(t),[v,_]=N.useReducer(PD,{info:m,selectedIndex:s??n,tabs:[],panels:[]}),x=N.useMemo(()=>({selectedIndex:v.selectedIndex}),[v.selectedIndex]),y=Lr(a||(()=>{})),w=Lr(v.tabs),b=N.useMemo(()=>({orientation:u,activation:d,...v}),[u,d,v]),j=Ye(T=>(_({type:1,tab:T}),()=>_({type:2,tab:T}))),E=Ye(T=>(_({type:3,panel:T}),()=>_({type:4,panel:T}))),P=Ye(T=>{O.current!==T&&y.current(T),h||_({type:0,index:T})}),O=Lr(h?e.selectedIndex:v.selectedIndex),C=N.useMemo(()=>({registerTab:j,registerPanel:E,change:P}),[]);jn(()=>{_({type:0,index:s??n})},[s]),jn(()=>{if(O.current===void 0||v.tabs.length<=0)return;let T=as(v.tabs,$=>$.current);T.some(($,z)=>v.tabs[z]!==$)&&P(T.indexOf(v.tabs[O.current]))});let A={ref:p};return H.createElement(bD,null,H.createElement(q_.Provider,{value:C},H.createElement(V_.Provider,{value:b},b.tabs.length<=0&&H.createElement(yD,{onFocus:()=>{var T,$;for(let z of w.current)if(((T=z.current)==null?void 0:T.tabIndex)===0)return($=z.current)==null||$.focus(),!0;return!1}}),Hr({ourProps:A,theirProps:c,slot:x,defaultTag:ED,name:"Tabs"}))))}let kD="div";function CD(e,t){let{orientation:n,selectedIndex:r}=uc("Tab.List"),i=pi(t);return Hr({ourProps:{ref:i,role:"tablist","aria-orientation":n},theirProps:e,slot:{selectedIndex:r},defaultTag:kD,name:"Tabs.List"})}let AD="button";function TD(e,t){var n,r;let i=Vf(),{id:a=`headlessui-tabs-tab-${i}`,...s}=e,{orientation:c,activation:u,selectedIndex:d,tabs:h,panels:m}=uc("Tab"),p=Z_("Tab"),v=uc("Tab"),_=N.useRef(null),x=pi(_,t);jn(()=>p.registerTab(_),[p,_]);let y=xA("tabs"),w=h.indexOf(_);w===-1&&(w=y);let b=w===d,j=Ye($=>{var z;let D=$();if(D===Zu.Success&&u==="auto"){let Z=(z=qf(_))==null?void 0:z.activeElement,I=v.tabs.findIndex(F=>F.current===Z);I!==-1&&p.change(I)}return D}),E=Ye($=>{let z=h.map(D=>D.current).filter(Boolean);if($.key===nt.Space||$.key===nt.Enter){$.preventDefault(),$.stopPropagation(),p.change(w);return}switch($.key){case nt.Home:case nt.PageUp:return $.preventDefault(),$.stopPropagation(),j(()=>Ko(z,rr.First));case nt.End:case nt.PageDown:return $.preventDefault(),$.stopPropagation(),j(()=>Ko(z,rr.Last))}if(j(()=>tn(c,{vertical(){return $.key===nt.ArrowUp?Ko(z,rr.Previous|rr.WrapAround):$.key===nt.ArrowDown?Ko(z,rr.Next|rr.WrapAround):Zu.Error},horizontal(){return $.key===nt.ArrowLeft?Ko(z,rr.Previous|rr.WrapAround):$.key===nt.ArrowRight?Ko(z,rr.Next|rr.WrapAround):Zu.Error}}))===Zu.Success)return $.preventDefault()}),P=N.useRef(!1),O=Ye(()=>{var $;P.current||(P.current=!0,($=_.current)==null||$.focus({preventScroll:!0}),p.change(w),uA(()=>{P.current=!1}))}),C=Ye($=>{$.preventDefault()}),A=N.useMemo(()=>{var $;return{selected:b,disabled:($=e.disabled)!=null?$:!1}},[b,e.disabled]),T={ref:x,onKeyDown:E,onMouseDown:C,onClick:O,id:a,role:"tab",type:hA(e,_),"aria-controls":(r=(n=m[w])==null?void 0:n.current)==null?void 0:r.id,"aria-selected":b,tabIndex:b?0:-1};return Hr({ourProps:T,theirProps:s,slot:A,defaultTag:AD,name:"Tabs.Tab"})}let MD="div";function LD(e,t){let{selectedIndex:n}=uc("Tab.Panels"),r=pi(t),i=N.useMemo(()=>({selectedIndex:n}),[n]);return Hr({ourProps:{ref:r},theirProps:e,slot:i,defaultTag:MD,name:"Tabs.Panels"})}let $D="div",ID=cc.RenderStrategy|cc.Static;function RD(e,t){var n,r,i,a;let s=Vf(),{id:c=`headlessui-tabs-panel-${s}`,tabIndex:u=0,...d}=e,{selectedIndex:h,tabs:m,panels:p}=uc("Tab.Panel"),v=Z_("Tab.Panel"),_=N.useRef(null),x=pi(_,t);jn(()=>v.registerPanel(_),[v,_,c]);let y=xA("panels"),w=p.indexOf(_);w===-1&&(w=y);let b=w===h,j=N.useMemo(()=>({selected:b}),[b]),E={ref:x,id:c,role:"tabpanel","aria-labelledby":(r=(n=m[w])==null?void 0:n.current)==null?void 0:r.id,tabIndex:b?u:-1};return!b&&((i=d.unmount)==null||i)&&!((a=d.static)!=null&&a)?H.createElement(gA,{as:"span","aria-hidden":"true",...E}):Hr({ourProps:E,theirProps:d,slot:j,defaultTag:$D,features:ID,visible:b,name:"Tabs.Panel"})}let FD=br(TD),DD=br(OD),BD=br(CD),zD=br(LD),UD=br(RD),wt=Object.assign(FD,{Group:DD,List:BD,Panels:zD,Panel:UD});function WD(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function gy(e,...t){e&&t.length>0&&e.classList.add(...t)}function vy(e,...t){e&&t.length>0&&e.classList.remove(...t)}function HD(e,t){let n=Pa();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:i}=getComputedStyle(e),[a,s]=[r,i].map(u=>{let[d=0]=u.split(",").filter(Boolean).map(h=>h.includes("ms")?parseFloat(h):parseFloat(h)*1e3).sort((h,m)=>m-h);return d}),c=a+s;if(c!==0){n.group(d=>{d.setTimeout(()=>{t(),d.dispose()},c),d.addEventListener(e,"transitionrun",h=>{h.target===h.currentTarget&&d.dispose()})});let u=n.addEventListener(e,"transitionend",d=>{d.target===d.currentTarget&&(t(),u())})}else t();return n.add(()=>t()),n.dispose}function VD(e,t,n,r){let i=n?"enter":"leave",a=Pa(),s=r!==void 0?WD(r):()=>{};i==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let c=tn(i,{enter:()=>t.enter,leave:()=>t.leave}),u=tn(i,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),d=tn(i,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return vy(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),gy(e,...t.base,...c,...d),a.nextFrame(()=>{vy(e,...t.base,...c,...d),gy(e,...t.base,...c,...u),HD(e,()=>(vy(e,...t.base,...c),gy(e,...t.base,...t.entered),s()))}),a.dispose}function qD({immediate:e,container:t,direction:n,classes:r,onStart:i,onStop:a}){let s=n0(),c=t0(),u=Lr(n);jn(()=>{e&&(u.current="enter")},[e]),jn(()=>{let d=Pa();c.add(d.dispose);let h=t.current;if(h&&u.current!=="idle"&&s.current)return d.dispose(),i.current(u.current),d.add(VD(h,r.current,u.current==="enter",()=>{d.dispose(),a.current(u.current)})),d.dispose},[n])}function Ua(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let i0=N.createContext(null);i0.displayName="TransitionContext";var ZD=(e=>(e.Visible="visible",e.Hidden="hidden",e))(ZD||{});function GD(){let e=N.useContext(i0);if(e===null)throw new Error("A is used but it is missing a parent or .");return e}function KD(){let e=N.useContext(a0);if(e===null)throw new Error("A is used but it is missing a parent or .");return e}let a0=N.createContext(null);a0.displayName="NestingContext";function o0(e){return"children"in e?o0(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function bA(e,t){let n=Lr(e),r=N.useRef([]),i=n0(),a=t0(),s=Ye((v,_=uo.Hidden)=>{let x=r.current.findIndex(({el:y})=>y===v);x!==-1&&(tn(_,{[uo.Unmount](){r.current.splice(x,1)},[uo.Hidden](){r.current[x].state="hidden"}}),a.microTask(()=>{var y;!o0(r)&&i.current&&((y=n.current)==null||y.call(n))}))}),c=Ye(v=>{let _=r.current.find(({el:x})=>x===v);return _?_.state!=="visible"&&(_.state="visible"):r.current.push({el:v,state:"visible"}),()=>s(v,uo.Unmount)}),u=N.useRef([]),d=N.useRef(Promise.resolve()),h=N.useRef({enter:[],leave:[],idle:[]}),m=Ye((v,_,x)=>{u.current.splice(0),t&&(t.chains.current[_]=t.chains.current[_].filter(([y])=>y!==v)),t==null||t.chains.current[_].push([v,new Promise(y=>{u.current.push(y)})]),t==null||t.chains.current[_].push([v,new Promise(y=>{Promise.all(h.current[_].map(([w,b])=>b)).then(()=>y())})]),_==="enter"?d.current=d.current.then(()=>t==null?void 0:t.wait.current).then(()=>x(_)):x(_)}),p=Ye((v,_,x)=>{Promise.all(h.current[_].splice(0).map(([y,w])=>w)).then(()=>{var y;(y=u.current.shift())==null||y()}).then(()=>x(_))});return N.useMemo(()=>({children:r,register:c,unregister:s,onStart:m,onStop:p,wait:d,chains:h}),[c,s,r,m,p,h,d])}function YD(){}let XD=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function bS(e){var t;let n={};for(let r of XD)n[r]=(t=e[r])!=null?t:YD;return n}function QD(e){let t=N.useRef(bS(e));return N.useEffect(()=>{t.current=bS(e)},[e]),t}let JD="div",wA=cc.RenderStrategy;function eB(e,t){var n,r;let{beforeEnter:i,afterEnter:a,beforeLeave:s,afterLeave:c,enter:u,enterFrom:d,enterTo:h,entered:m,leave:p,leaveFrom:v,leaveTo:_,...x}=e,y=N.useRef(null),w=pi(y,t),b=(n=x.unmount)==null||n?uo.Unmount:uo.Hidden,{show:j,appear:E,initial:P}=GD(),[O,C]=N.useState(j?"visible":"hidden"),A=KD(),{register:T,unregister:$}=A;N.useEffect(()=>T(y),[T,y]),N.useEffect(()=>{if(b===uo.Hidden&&y.current){if(j&&O!=="visible"){C("visible");return}return tn(O,{hidden:()=>$(y),visible:()=>T(y)})}},[O,y,T,$,j,b]);let z=Lr({base:Ua(x.className),enter:Ua(u),enterFrom:Ua(d),enterTo:Ua(h),entered:Ua(m),leave:Ua(p),leaveFrom:Ua(v),leaveTo:Ua(_)}),D=QD({beforeEnter:i,afterEnter:a,beforeLeave:s,afterLeave:c}),Z=D_();N.useEffect(()=>{if(Z&&O==="visible"&&y.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[y,O,Z]);let I=P&&!E,F=E&&j&&P,B=!Z||I?"idle":j?"enter":"leave",G=vD(0),R=Ye(ae=>tn(ae,{enter:()=>{G.addFlag(ur.Opening),D.current.beforeEnter()},leave:()=>{G.addFlag(ur.Closing),D.current.beforeLeave()},idle:()=>{}})),K=Ye(ae=>tn(ae,{enter:()=>{G.removeFlag(ur.Opening),D.current.afterEnter()},leave:()=>{G.removeFlag(ur.Closing),D.current.afterLeave()},idle:()=>{}})),W=bA(()=>{C("hidden"),$(y)},A),U=N.useRef(!1);qD({immediate:F,container:y,classes:z,direction:B,onStart:Lr(ae=>{U.current=!0,W.onStart(y,ae,R)}),onStop:Lr(ae=>{U.current=!1,W.onStop(y,ae,K),ae==="leave"&&!o0(W)&&(C("hidden"),$(y))})});let Y=x,ne={ref:w};return F?Y={...Y,className:up(x.className,...z.current.enter,...z.current.enterFrom)}:U.current&&(Y.className=up(x.className,(r=y.current)==null?void 0:r.className),Y.className===""&&delete Y.className),H.createElement(a0.Provider,{value:W},H.createElement(vA,{value:tn(O,{visible:ur.Open,hidden:ur.Closed})|G.flags},Hr({ourProps:ne,theirProps:Y,defaultTag:JD,features:wA,visible:O==="visible",name:"Transition.Child"})))}function tB(e,t){let{show:n,appear:r=!1,unmount:i=!0,...a}=e,s=N.useRef(null),c=pi(s,t);D_();let u=W_();if(n===void 0&&u!==null&&(n=(u&ur.Open)===ur.Open),![!0,!1].includes(n))throw new Error("A is used but it is missing a `show={true | false}` prop.");let[d,h]=N.useState(n?"visible":"hidden"),m=bA(()=>{h("hidden")}),[p,v]=N.useState(!0),_=N.useRef([n]);jn(()=>{p!==!1&&_.current[_.current.length-1]!==n&&(_.current.push(n),v(!1))},[_,n]);let x=N.useMemo(()=>({show:n,appear:r,initial:p}),[n,r,p]);N.useEffect(()=>{if(n)h("visible");else if(!o0(m))h("hidden");else{let j=s.current;if(!j)return;let E=j.getBoundingClientRect();E.x===0&&E.y===0&&E.width===0&&E.height===0&&h("hidden")}},[n,m]);let y={unmount:i},w=Ye(()=>{var j;p&&v(!1),(j=e.beforeEnter)==null||j.call(e)}),b=Ye(()=>{var j;p&&v(!1),(j=e.beforeLeave)==null||j.call(e)});return H.createElement(a0.Provider,{value:m},H.createElement(i0.Provider,{value:x},Hr({ourProps:{...y,as:N.Fragment,children:H.createElement(_A,{ref:c,...y,...a,beforeEnter:w,beforeLeave:b})},theirProps:{},defaultTag:N.Fragment,features:wA,visible:d==="visible",name:"Transition"})))}function nB(e,t){let n=N.useContext(i0)!==null,r=W_()!==null;return H.createElement(H.Fragment,null,!n&&r?H.createElement(yb,{ref:t,...e}):H.createElement(_A,{ref:t,...e}))}let yb=br(tB),_A=br(eB),rB=br(nB),iB=Object.assign(yb,{Child:rB,Root:yb});function aB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.26 10.147a60.438 60.438 0 0 0-.491 6.347A48.62 48.62 0 0 1 12 20.904a48.62 48.62 0 0 1 8.232-4.41 60.46 60.46 0 0 0-.491-6.347m-15.482 0a50.636 50.636 0 0 0-2.658-.813A59.906 59.906 0 0 1 12 3.493a59.903 59.903 0 0 1 10.399 5.84c-.896.248-1.783.52-2.658.814m-15.482 0A50.717 50.717 0 0 1 12 13.489a50.702 50.702 0 0 1 7.74-3.342M6.75 15a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm0 0v-3.675A55.378 55.378 0 0 1 12 8.443m-7.007 11.55A5.981 5.981 0 0 0 6.75 15.75v-1.5"}))}const Eo=N.forwardRef(aB);function oB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 6h9.75M10.5 6a1.5 1.5 0 1 1-3 0m3 0a1.5 1.5 0 1 0-3 0M3.75 6H7.5m3 12h9.75m-9.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-3.75 0H7.5m9-6h3.75m-3.75 0a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m-9.75 0h9.75"}))}const jA=N.forwardRef(oB);function sB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"}))}const wS=N.forwardRef(sB);function lB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15m3 0 3-3m0 0-3-3m3 3H9"}))}const cB=N.forwardRef(lB);function uB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"}))}const Nl=N.forwardRef(uB);function dB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"}))}const xb=N.forwardRef(dB);function fB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 18 9 11.25l4.306 4.306a11.95 11.95 0 0 1 5.814-5.518l2.74-1.22m0 0-5.94-2.281m5.94 2.28-2.28 5.941"}))}const hB=N.forwardRef(fB);function mB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"}))}const NA=N.forwardRef(mB);function pB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0M3.124 7.5A8.969 8.969 0 0 1 5.292 3m13.416 0a8.969 8.969 0 0 1 2.168 4.5"}))}const Hd=N.forwardRef(pB);function gB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6.042A8.967 8.967 0 0 0 6 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 0 1 6 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 0 1 6-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0 0 18 18a8.967 8.967 0 0 0-6 2.292m0-14.25v14.25"}))}const Zf=N.forwardRef(gB);function vB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 14.15v4.25c0 1.094-.787 2.036-1.872 2.18-2.087.277-4.216.42-6.378.42s-4.291-.143-6.378-.42c-1.085-.144-1.872-1.086-1.872-2.18v-4.25m16.5 0a2.18 2.18 0 0 0 .75-1.661V8.706c0-1.081-.768-2.015-1.837-2.175a48.114 48.114 0 0 0-3.413-.387m4.5 8.006c-.194.165-.42.295-.673.38A23.978 23.978 0 0 1 12 15.75c-2.648 0-5.195-.429-7.577-1.22a2.016 2.016 0 0 1-.673-.38m0 0A2.18 2.18 0 0 1 3 12.489V8.706c0-1.081.768-2.015 1.837-2.175a48.111 48.111 0 0 1 3.413-.387m7.5 0V5.25A2.25 2.25 0 0 0 13.5 3h-3a2.25 2.25 0 0 0-2.25 2.25v.894m7.5 0a48.667 48.667 0 0 0-7.5 0M12 12.75h.008v.008H12v-.008Z"}))}const SA=N.forwardRef(vB);function yB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21v-8.25M15.75 21v-8.25M8.25 21v-8.25M3 9l9-6 9 6m-1.5 12V10.332A48.36 48.36 0 0 0 12 9.75c-2.551 0-5.056.2-7.5.582V21M3 21h18M12 6.75h.008v.008H12V6.75Z"}))}const dc=N.forwardRef(yB);function xB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 21h16.5M4.5 3h15M5.25 3v18m13.5-18v18M9 6.75h1.5m-1.5 3h1.5m-1.5 3h1.5m3-6H15m-1.5 3H15m-1.5 3H15M9 21v-3.375c0-.621.504-1.125 1.125-1.125h3.75c.621 0 1.125.504 1.125 1.125V21"}))}const Ci=N.forwardRef(xB);function bB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5"}))}const ha=N.forwardRef(bB);function wB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z"}))}const fc=N.forwardRef(wB);function _B({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 8.511c.884.284 1.5 1.128 1.5 2.097v4.286c0 1.136-.847 2.1-1.98 2.193-.34.027-.68.052-1.02.072v3.091l-3-3c-1.354 0-2.694-.055-4.02-.163a2.115 2.115 0 0 1-.825-.242m9.345-8.334a2.126 2.126 0 0 0-.476-.095 48.64 48.64 0 0 0-8.048 0c-1.131.094-1.976 1.057-1.976 2.192v4.286c0 .837.46 1.58 1.155 1.951m9.345-8.334V6.637c0-1.621-1.152-3.026-2.76-3.235A48.455 48.455 0 0 0 11.25 3c-2.115 0-4.198.137-6.24.402-1.608.209-2.76 1.614-2.76 3.235v6.226c0 1.621 1.152 3.026 2.76 3.235.577.075 1.157.14 1.74.194V21l4.155-4.155"}))}const jB=N.forwardRef(_B);function NB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12c0 1.268-.63 2.39-1.593 3.068a3.745 3.745 0 0 1-1.043 3.296 3.745 3.745 0 0 1-3.296 1.043A3.745 3.745 0 0 1 12 21c-1.268 0-2.39-.63-3.068-1.593a3.746 3.746 0 0 1-3.296-1.043 3.745 3.745 0 0 1-1.043-3.296A3.745 3.745 0 0 1 3 12c0-1.268.63-2.39 1.593-3.068a3.745 3.745 0 0 1 1.043-3.296 3.746 3.746 0 0 1 3.296-1.043A3.746 3.746 0 0 1 12 3c1.268 0 2.39.63 3.068 1.593a3.746 3.746 0 0 1 3.296 1.043 3.746 3.746 0 0 1 1.043 3.296A3.745 3.745 0 0 1 21 12Z"}))}const SB=N.forwardRef(NB);function PB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const ci=N.forwardRef(PB);function EB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const bb=N.forwardRef(EB);function OB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Vd=N.forwardRef(OB);function kB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const wb=N.forwardRef(kB);function CB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125"}))}const _S=N.forwardRef(CB);function AB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const jS=N.forwardRef(AB);function TB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5"}))}const $r=N.forwardRef(TB);function MB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"}),N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const G_=N.forwardRef(MB);function LB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m6.75 7.5 3 2.25-3 2.25m4.5 0h3m-9 8.25h13.5A2.25 2.25 0 0 0 21 18V6a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 6v12a2.25 2.25 0 0 0 2.25 2.25Z"}))}const $B=N.forwardRef(LB);function IB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 7.5-9-5.25L3 7.5m18 0-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l9 5.25m0-9v9"}))}const RB=N.forwardRef(IB);function FB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v12m-3-2.818.879.659c1.171.879 3.07.879 4.242 0 1.172-.879 1.172-2.303 0-3.182C13.536 12.219 12.768 12 12 12c-.725 0-1.45-.22-2.003-.659-1.106-.879-1.106-2.303 0-3.182s2.9-.879 4.006 0l.415.33M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const PA=N.forwardRef(FB);function DB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25M9 16.5v.75m3-3v3M15 12v5.25m-4.5-15H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"}))}const BB=N.forwardRef(DB);function zB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m5.231 13.481L15 17.25m-4.5-15H5.625c-.621 0-1.125.504-1.125 1.125v16.5c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Zm3.75 11.625a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z"}))}const UB=N.forwardRef(zB);function WB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"}))}const Ao=N.forwardRef(WB);function HB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 0 1-2.25 2.25h-15a2.25 2.25 0 0 1-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25m19.5 0v.243a2.25 2.25 0 0 1-1.07 1.916l-7.5 4.615a2.25 2.25 0 0 1-2.36 0L3.32 8.91a2.25 2.25 0 0 1-1.07-1.916V6.75"}))}const NS=N.forwardRef(HB);function VB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"}))}const qB=N.forwardRef(VB);function ZB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21a9.004 9.004 0 0 0 8.716-6.747M12 21a9.004 9.004 0 0 1-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 0 1 7.843 4.582M12 3a8.997 8.997 0 0 0-7.843 4.582m15.686 0A11.953 11.953 0 0 1 12 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0 1 21 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0 1 12 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 0 1 3 12c0-1.605.42-3.113 1.157-4.418"}))}const _b=N.forwardRef(ZB);function GB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12Z"}))}const $t=N.forwardRef(GB);function KB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 21v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21m0 0h4.5V3.545M12.75 21h7.5V10.75M2.25 21h1.5m18 0h-18M2.25 9l4.5-1.636M18.75 3l-1.5.545m0 6.205 3 1m1.5.5-1.5-.5M6.75 7.364V3h-3v18m3-13.636 10.5-3.819"}))}const YB=N.forwardRef(KB);function XB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"}))}const s0=N.forwardRef(XB);function QB({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18v-5.25m0 0a6.01 6.01 0 0 0 1.5-.189m-1.5.189a6.01 6.01 0 0 1-1.5-.189m3.75 7.478a12.06 12.06 0 0 1-4.5 0m3.75 2.383a14.406 14.406 0 0 1-3 0M14.25 18v-.192c0-.983.658-1.823 1.508-2.316a7.5 7.5 0 1 0-7.517 0c.85.493 1.509 1.333 1.509 2.316V18"}))}const JB=N.forwardRef(QB);function ez({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"}))}const tz=N.forwardRef(ez);function nz({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const nn=N.forwardRef(nz);function rz({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}),N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1 1 15 0Z"}))}const Rn=N.forwardRef(rz);function iz({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 6.75V15m6-6v8.25m.503 3.498 4.875-2.437c.381-.19.622-.58.622-1.006V4.82c0-.836-.88-1.38-1.628-1.006l-3.869 1.934c-.317.159-.69.159-1.006 0L9.503 3.252a1.125 1.125 0 0 0-1.006 0L3.622 5.689C3.24 5.88 3 6.27 3 6.695V19.18c0 .836.88 1.38 1.628 1.006l3.869-1.934c.317-.159.69-.159 1.006 0l4.994 2.497c.317.158.69.158 1.006 0Z"}))}const Ai=N.forwardRef(iz);function az({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.34 15.84c-.688-.06-1.386-.09-2.09-.09H7.5a4.5 4.5 0 1 1 0-9h.75c.704 0 1.402-.03 2.09-.09m0 9.18c.253.962.584 1.892.985 2.783.247.55.06 1.21-.463 1.511l-.657.38c-.551.318-1.26.117-1.527-.461a20.845 20.845 0 0 1-1.44-4.282m3.102.069a18.03 18.03 0 0 1-.59-4.59c0-1.586.205-3.124.59-4.59m0 9.18a23.848 23.848 0 0 1 8.835 2.535M10.34 6.66a23.847 23.847 0 0 0 8.835-2.535m0 0A23.74 23.74 0 0 0 18.795 3m.38 1.125a23.91 23.91 0 0 1 1.014 5.395m-1.014 8.855c-.118.38-.245.754-.38 1.125m.38-1.125a23.91 23.91 0 0 0 1.014-5.395m0-3.46c.495.413.811 1.035.811 1.73 0 .695-.316 1.317-.811 1.73m0-3.46a24.347 24.347 0 0 1 0 3.46"}))}const oz=N.forwardRef(az);function sz({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18.75a6 6 0 0 0 6-6v-1.5m-6 7.5a6 6 0 0 1-6-6v-1.5m6 7.5v3.75m-3.75 0h7.5M12 15.75a3 3 0 0 1-3-3V4.5a3 3 0 1 1 6 0v8.25a3 3 0 0 1-3 3Z"}))}const jb=N.forwardRef(sz);function lz({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 0 0 2.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 0 1-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 0 0-1.091-.852H4.5A2.25 2.25 0 0 0 2.25 4.5v2.25Z"}))}const EA=N.forwardRef(lz);function cz({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z"}))}const OA=N.forwardRef(cz);function uz({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.59 14.37a6 6 0 0 1-5.84 7.38v-4.8m5.84-2.58a14.98 14.98 0 0 0 6.16-12.12A14.98 14.98 0 0 0 9.631 8.41m5.96 5.96a14.926 14.926 0 0 1-5.841 2.58m-.119-8.54a6 6 0 0 0-7.381 5.84h4.8m2.581-5.84a14.927 14.927 0 0 0-2.58 5.84m2.699 2.7c-.103.021-.207.041-.311.06a15.09 15.09 0 0 1-2.448-2.448 14.9 14.9 0 0 1 .06-.312m-2.24 2.39a4.493 4.493 0 0 0-1.757 4.306 4.493 4.493 0 0 0 4.306-1.758M16.5 9a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"}))}const jo=N.forwardRef(uz);function dz({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v17.25m0 0c-1.472 0-2.882.265-4.185.75M12 20.25c1.472 0 2.882.265 4.185.75M18.75 4.97A48.416 48.416 0 0 0 12 4.5c-2.291 0-4.545.16-6.75.47m13.5 0c1.01.143 2.01.317 3 .52m-3-.52 2.62 10.726c.122.499-.106 1.028-.589 1.202a5.988 5.988 0 0 1-2.031.352 5.988 5.988 0 0 1-2.031-.352c-.483-.174-.711-.703-.59-1.202L18.75 4.971Zm-16.5.52c.99-.203 1.99-.377 3-.52m0 0 2.62 10.726c.122.499-.106 1.028-.589 1.202a5.989 5.989 0 0 1-2.031.352 5.989 5.989 0 0 1-2.031-.352c-.483-.174-.711-.703-.59-1.202L5.25 4.971Z"}))}const fz=N.forwardRef(dz);function hz({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 17.25v-.228a4.5 4.5 0 0 0-.12-1.03l-2.268-9.64a3.375 3.375 0 0 0-3.285-2.602H7.923a3.375 3.375 0 0 0-3.285 2.602l-2.268 9.64a4.5 4.5 0 0 0-.12 1.03v.228m19.5 0a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3m19.5 0a3 3 0 0 0-3-3H5.25a3 3 0 0 0-3 3m16.5 0h.008v.008h-.008v-.008Zm-3 0h.008v.008h-.008v-.008Z"}))}const mz=N.forwardRef(hz);function pz({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.217 10.907a2.25 2.25 0 1 0 0 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186 9.566-5.314m-9.566 7.5 9.566 5.314m0 0a2.25 2.25 0 1 0 3.935 2.186 2.25 2.25 0 0 0-3.935-2.186Zm0-12.814a2.25 2.25 0 1 0 3.933-2.185 2.25 2.25 0 0 0-3.933 2.185Z"}))}const gz=N.forwardRef(pz);function vz({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75m-3-7.036A11.959 11.959 0 0 1 3.598 6 11.99 11.99 0 0 0 3 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285Z"}))}const kA=N.forwardRef(vz);function yz({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"}))}const CA=N.forwardRef(yz);function xz({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.562.562 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.562.562 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5Z"}))}const bz=N.forwardRef(xz);function wz({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 18.75h-9m9 0a3 3 0 0 1 3 3h-15a3 3 0 0 1 3-3m9 0v-3.375c0-.621-.503-1.125-1.125-1.125h-.871M7.5 18.75v-3.375c0-.621.504-1.125 1.125-1.125h.872m5.007 0H9.497m5.007 0a7.454 7.454 0 0 1-.982-3.172M9.497 14.25a7.454 7.454 0 0 0 .981-3.172M5.25 4.236c-.982.143-1.954.317-2.916.52A6.003 6.003 0 0 0 7.73 9.728M5.25 4.236V4.5c0 2.108.966 3.99 2.48 5.228M5.25 4.236V2.721C7.456 2.41 9.71 2.25 12 2.25c2.291 0 4.545.16 6.75.47v1.516M7.73 9.728a6.726 6.726 0 0 0 2.748 1.35m8.272-6.842V4.5c0 2.108-.966 3.99-2.48 5.228m2.48-5.492a46.32 46.32 0 0 1 2.916.52 6.003 6.003 0 0 1-5.395 4.972m0 0a6.726 6.726 0 0 1-2.749 1.35m0 0a6.772 6.772 0 0 1-3.044 0"}))}const _z=N.forwardRef(wz);function jz({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 18.75a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m3 0h6m-9 0H3.375a1.125 1.125 0 0 1-1.125-1.125V14.25m17.25 4.5a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m3 0h1.125c.621 0 1.129-.504 1.09-1.124a17.902 17.902 0 0 0-3.213-9.193 2.056 2.056 0 0 0-1.58-.86H14.25M16.5 18.75h-2.25m0-11.177v-.958c0-.568-.422-1.048-.987-1.106a48.554 48.554 0 0 0-10.026 0 1.106 1.106 0 0 0-.987 1.106v7.635m12-6.677v6.677m0 4.5v-4.5m0 0h-12"}))}const Nz=N.forwardRef(jz);function Sz({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const Nb=N.forwardRef(Sz);function Pz({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18 18.72a9.094 9.094 0 0 0 3.741-.479 3 3 0 0 0-4.682-2.72m.94 3.198.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0 1 12 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 0 1 6 18.719m12 0a5.971 5.971 0 0 0-.941-3.197m0 0A5.995 5.995 0 0 0 12 12.75a5.995 5.995 0 0 0-5.058 2.772m0 0a3 3 0 0 0-4.681 2.72 8.986 8.986 0 0 0 3.74.477m.94-3.197a5.971 5.971 0 0 0-.94 3.197M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z"}))}const Ur=N.forwardRef(Pz);function Ez({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M22 10.5h-6m-2.25-4.125a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0ZM4 19.235v-.11a6.375 6.375 0 0 1 12.75 0v.109A12.318 12.318 0 0 1 10.374 21c-2.331 0-4.512-.645-6.374-1.766Z"}))}const SS=N.forwardRef(Ez);function Oz({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18 7.5v3m0 0v3m0-3h3m-3 0h-3m-2.25-4.125a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0ZM3 19.235v-.11a6.375 6.375 0 0 1 12.75 0v.109A12.318 12.318 0 0 1 9.374 21c-2.331 0-4.512-.645-6.374-1.766Z"}))}const Sb=N.forwardRef(Oz);function kz({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z"}))}const $i=N.forwardRef(kz);function Cz({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19.128a9.38 9.38 0 0 0 2.625.372 9.337 9.337 0 0 0 4.121-.952 4.125 4.125 0 0 0-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 0 1 8.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0 1 11.964-3.07M12 6.375a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0Zm8.25 2.25a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z"}))}const Az=N.forwardRef(Cz);function Tz({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m15.75 10.5 4.72-4.72a.75.75 0 0 1 1.28.53v11.38a.75.75 0 0 1-1.28.53l-4.72-4.72M4.5 18.75h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25h-9A2.25 2.25 0 0 0 2.25 7.5v9a2.25 2.25 0 0 0 2.25 2.25Z"}))}const AA=N.forwardRef(Tz);function Mz({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const Pb=N.forwardRef(Mz);function Lz({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const Cr=N.forwardRef(Lz),$z=[{name:"Home",href:"/",icon:s0},{name:"Explore Data",href:"/explore",icon:nn},{name:"Search",href:"/search",icon:nn},{name:"Jurisdictions",href:"/jurisdictions",icon:Rn},{section:"Families & Individuals",items:[{name:"Community Events",href:"/events",icon:Zf},{name:"Services & Resources",href:"/services",icon:$t}]},{section:"Policy & Government",items:[{name:"Policy Decisions",href:"/documents",icon:Ao},{name:"Budget Analysis",href:"/analytics",icon:fc},{name:"Elected Officials",href:"/people",icon:Ur},{name:"Policy Map",href:"/policy-map",icon:Ai}]},{section:"Community & Advocacy",items:[{name:"Nonprofits",href:"/nonprofits",icon:dc},{name:"Advocacy Topics",href:"/advocacy-topics",icon:Hd},{name:"Fact-Checking",href:"/fact-checking",icon:Eo}]},{section:"Developers",items:[{name:"Open Source",href:"/opensource",icon:$r},{name:"Hackathons",href:"/hackathons",icon:Eo}]},{name:"Settings",href:"/settings",icon:G_}];function PS(){const e=Us(),t=qc(),[n,r]=N.useState(""),[i,a]=N.useState(!1),[s,c]=N.useState(!1),{user:u,isAuthenticated:d,login:h,logout:m,isLoading:p}=e0(),{location:v,hasLocation:_}=Hf(),x="https://www.communityone.com/docs/intro",y="https://www.communityone.com/api/docs",w=b=>{b.preventDefault(),n.trim()&&t(`/search?q=${encodeURIComponent(n)}`)};return o.jsxs("div",{className:"min-h-screen",style:{backgroundColor:"#F1F5F9"},children:[o.jsx("div",{className:"fixed top-0 left-0 right-0 bg-white border-b border-gray-200 z-50",children:o.jsxs("div",{className:"flex items-center justify-between px-4 md:px-6 py-3",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("button",{onClick:()=>a(!i),className:"md:hidden p-2 rounded-lg hover:bg-gray-100 text-gray-700","aria-label":"Toggle menu",children:i?o.jsx(Cr,{className:"h-6 w-6"}):o.jsx(NA,{className:"h-6 w-6"})}),o.jsxs(Se,{to:"/",className:"flex items-center gap-2 md:gap-3",children:[o.jsx("img",{src:"/communityone_logo.svg",alt:"CommunityOne Logo",className:"h-10 md:h-12"}),o.jsx("h1",{className:"text-lg md:text-2xl font-bold",style:{color:"#354F52"},children:"Open Navigator"})]})]}),e.pathname!=="/"&&o.jsx("form",{onSubmit:w,className:"hidden md:flex flex-1 max-w-2xl mx-8",children:o.jsxs("div",{className:"relative w-full",children:[o.jsx("input",{type:"text",placeholder:"Search people, meetings, organizations, causes...",value:n,onChange:b=>r(b.target.value),className:"w-full px-4 py-2 pl-10 border border-gray-300 rounded-full focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent"}),o.jsx(nn,{className:"absolute left-3 top-2.5 h-5 w-5 text-gray-400"})]})}),o.jsxs("div",{className:"flex items-center gap-2 md:gap-4",children:[_&&v&&o.jsxs("div",{className:"hidden lg:flex items-center gap-2 px-3 py-1.5 bg-primary-50 border border-primary-200 rounded-lg",children:[o.jsx(Rn,{className:"h-4 w-4 text-primary-600 flex-shrink-0"}),o.jsxs("div",{className:"text-xs",children:[o.jsxs("div",{className:"font-semibold text-gray-900",children:[v.city,", ",v.state]}),v.county&&o.jsx("div",{className:"text-gray-700",children:v.county})]}),o.jsx("button",{onClick:()=>t("/?tab=community"),className:"text-xs text-primary-600 hover:text-primary-700 font-medium underline ml-2 flex-shrink-0",children:"Change"})]}),p?o.jsx("div",{className:"px-3 py-2",children:o.jsx("div",{className:"animate-spin h-8 w-8 border-3 border-gray-300 border-t-primary-600 rounded-full"})}):d&&u?o.jsxs(ol,{as:"div",className:"relative",children:[o.jsxs(ol.Button,{className:"flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-gray-100 transition-colors",children:[u.avatar_url?o.jsx("img",{src:u.avatar_url,alt:u.full_name||u.email,className:"h-9 w-9 rounded-full border-2 border-primary-500 shadow-sm",onError:b=>{b.currentTarget.style.display="none";const j=b.currentTarget.nextElementSibling;j&&(j.style.display="flex")}}):null,o.jsx("div",{className:"h-9 w-9 rounded-full bg-gradient-to-br from-primary-500 to-primary-600 flex items-center justify-center text-white font-bold text-sm shadow-sm",style:{display:u.avatar_url?"none":"flex"},children:(u.full_name||u.username||u.email).charAt(0).toUpperCase()}),o.jsx("span",{className:"hidden md:inline text-sm font-medium text-gray-700",children:u.full_name||u.username||u.email.split("@")[0]}),o.jsx(Vd,{className:"hidden md:block h-4 w-4 text-gray-600"})]}),o.jsx(iB,{as:N.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:o.jsxs(ol.Items,{className:"absolute right-0 mt-2 w-64 bg-white rounded-lg shadow-lg border border-gray-200 focus:outline-none z-50",children:[o.jsxs("div",{className:"px-4 py-3 border-b border-gray-200",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[u.avatar_url?o.jsx("img",{src:u.avatar_url,alt:u.full_name||u.email,className:"h-12 w-12 rounded-full border-2 border-primary-500",onError:b=>{b.currentTarget.style.display="none";const j=b.currentTarget.nextElementSibling;j&&(j.style.display="flex")}}):null,o.jsx("div",{className:"h-12 w-12 rounded-full bg-gradient-to-br from-primary-500 to-primary-600 flex items-center justify-center text-white font-bold text-lg",style:{display:u.avatar_url?"none":"flex"},children:(u.full_name||u.username||u.email).charAt(0).toUpperCase()}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-semibold text-gray-900",children:u.full_name||u.username||u.email.split("@")[0]}),o.jsx("p",{className:"text-xs text-gray-500 truncate",children:u.email})]})]}),u.oauth_provider&&o.jsxs("div",{className:"flex items-center gap-1 text-xs text-gray-400",children:[o.jsx("span",{children:"Signed in via"}),o.jsx("span",{className:"font-medium capitalize",children:u.oauth_provider})]})]}),o.jsxs("div",{className:"py-1",children:[o.jsx(ol.Item,{children:({active:b})=>o.jsxs("button",{onClick:()=>t("/profile"),className:`${b?"bg-gray-50":""} flex items-center gap-3 w-full px-4 py-2.5 text-sm text-gray-700 hover:text-gray-900`,children:[o.jsx(Nb,{className:"h-5 w-5"}),o.jsx("span",{children:"My Profile"})]})}),o.jsx(ol.Item,{children:({active:b})=>o.jsxs("button",{onClick:()=>t("/settings"),className:`${b?"bg-gray-50":""} flex items-center gap-3 w-full px-4 py-2.5 text-sm text-gray-700 hover:text-gray-900`,children:[o.jsx(G_,{className:"h-5 w-5"}),o.jsx("span",{children:"Settings"})]})}),o.jsx(ol.Item,{children:({active:b})=>o.jsxs("button",{onClick:m,className:`${b?"bg-red-50":""} flex items-center gap-3 w-full px-4 py-2.5 text-sm text-red-600 hover:text-red-700 border-t border-gray-100 mt-1`,children:[o.jsx(cB,{className:"h-5 w-5"}),o.jsx("span",{className:"font-medium",children:"Sign out"})]})})]})]})})]}):o.jsxs("div",{className:"relative",children:[o.jsxs("button",{onClick:()=>c(!s),className:"px-3 md:px-4 py-2 text-white rounded-lg transition-colors text-sm md:text-base font-medium flex items-center gap-2",style:{backgroundColor:"#354F52"},onMouseEnter:b=>b.currentTarget.style.backgroundColor="#2e4346",onMouseLeave:b=>b.currentTarget.style.backgroundColor="#354F52",children:[o.jsx(Nb,{className:"h-5 w-5"}),o.jsx("span",{className:"hidden md:inline",children:"Register"}),o.jsx(Vd,{className:"h-4 w-4"})]}),s&&o.jsxs("div",{className:"absolute right-0 mt-2 w-64 bg-white rounded-lg shadow-lg border border-gray-200 py-2 z-50",children:[o.jsx("div",{className:"px-4 py-2 border-b border-gray-200",children:o.jsx("p",{className:"text-sm font-medium text-gray-900",children:"Sign in with:"})}),o.jsxs("button",{onClick:()=>{h("google"),c(!1)},className:"flex items-center gap-3 w-full px-4 py-3 hover:bg-gray-100 transition-colors",children:[o.jsx("div",{className:"w-6 h-6 flex items-center justify-center",children:o.jsxs("svg",{viewBox:"0 0 24 24",className:"w-5 h-5",children:[o.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),o.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),o.jsx("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),o.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]})}),o.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Google"})]}),o.jsxs("button",{onClick:()=>{h("facebook"),c(!1)},className:"flex items-center gap-3 w-full px-4 py-3 hover:bg-gray-100 transition-colors",children:[o.jsx("div",{className:"w-6 h-6 flex items-center justify-center",children:o.jsx("svg",{viewBox:"0 0 24 24",className:"w-5 h-5",fill:"#1877F2",children:o.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})})}),o.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Facebook"})]}),o.jsxs("button",{onClick:()=>{h("github"),c(!1)},className:"flex items-center gap-3 w-full px-4 py-3 hover:bg-gray-100 transition-colors",children:[o.jsx("div",{className:"w-6 h-6 flex items-center justify-center",children:o.jsx("svg",{viewBox:"0 0 24 24",className:"w-5 h-5",fill:"#181717",children:o.jsx("path",{d:"M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z"})})}),o.jsx("span",{className:"text-sm font-medium text-gray-700",children:"GitHub"})]}),o.jsx("div",{className:"border-t border-gray-100 my-1"}),o.jsxs("button",{onClick:()=>{h("huggingface"),c(!1)},className:"flex items-center gap-3 w-full px-4 py-3 hover:bg-gray-100 transition-colors",children:[o.jsx("div",{className:"w-6 h-6 flex items-center justify-center",children:o.jsx("span",{className:"text-2xl",children:"🤗"})}),o.jsx("span",{className:"text-sm font-medium text-gray-700",children:"HuggingFace"})]})]})]}),o.jsxs("a",{href:x,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 md:gap-2 px-2 md:px-4 py-2 text-gray-700 hover:text-primary-600 transition-colors",children:[o.jsx(Zf,{className:"h-5 w-5"}),o.jsx("span",{className:"hidden md:inline font-medium",children:"Docs"})]}),o.jsx("a",{href:y,target:"_blank",rel:"noopener noreferrer",className:"px-2 md:px-4 py-2 text-white rounded-lg transition-colors text-sm md:text-base",style:{backgroundColor:"#354F52"},onMouseEnter:b=>b.currentTarget.style.backgroundColor="#2e4346",onMouseLeave:b=>b.currentTarget.style.backgroundColor="#354F52",children:"API"})]})]})}),o.jsxs("div",{className:` fixed top-16 inset-y-0 left-0 w-64 bg-white border-r border-gray-200 z-40 transform transition-transform duration-200 ease-in-out ${i?"translate-x-0":"-translate-x-full md:translate-x-0"} `,children:[o.jsx("nav",{className:"mt-6 px-4 overflow-y-auto h-[calc(100vh-10rem)]",children:$z.map((b,j)=>{if("section"in b&&b.section&&b.items)return o.jsxs("div",{className:"mb-6",children:[o.jsx("div",{className:"px-4 py-2 text-xs font-semibold text-gray-500 uppercase tracking-wider",children:b.section}),b.items.map(E=>{const P=e.pathname===E.href,O="external"in E&&E.external,C=` flex items-center gap-3 px-4 py-3 mb-1 rounded-lg transition-colors ${P?"bg-primary-50 text-primary-700 font-medium":"text-gray-700 hover:bg-gray-100"} `;return O?o.jsxs("a",{href:E.href,target:"_blank",rel:"noopener noreferrer",className:C,children:[o.jsx(E.icon,{className:"h-5 w-5"}),o.jsx("span",{className:"text-sm",children:E.name})]},E.name):o.jsxs(Se,{to:E.href,onClick:()=>a(!1),className:C,children:[o.jsx(E.icon,{className:"h-5 w-5"}),o.jsx("span",{className:"text-sm",children:E.name})]},E.name)})]},j);if("href"in b&&b.href){const E=e.pathname===b.href;return o.jsxs(Se,{to:b.href,onClick:()=>a(!1),className:` flex items-center gap-3 px-4 py-3 mb-2 rounded-lg transition-colors ${E?"bg-primary-50 text-primary-700 font-medium":"text-gray-700 hover:bg-gray-100"} `,children:[o.jsx(b.icon,{className:"h-6 w-6"}),o.jsx("span",{children:b.name})]},b.name)}return null})}),o.jsx("div",{className:"absolute bottom-0 left-0 right-0 p-4 border-t border-gray-200 bg-white",children:o.jsxs("div",{className:"text-sm text-gray-600",children:[o.jsx("div",{className:"font-medium mb-1",children:"Open Data Sources"}),o.jsxs("div",{className:"text-xs",children:["• ",o.jsx(Se,{to:"/jurisdictions",className:"hover:text-primary-600 hover:underline",children:"925 Jurisdictions"}),o.jsx("br",{}),"• ",o.jsx(Se,{to:"/search?types=organizations",className:"hover:text-primary-600 hover:underline",children:"43,726 Nonprofits"}),o.jsx("br",{}),"• 6,913 Meeting Pages",o.jsx("br",{}),"• ",o.jsx(Se,{to:"/search?types=contacts",className:"hover:text-primary-600 hover:underline",children:"362 Officials"})]}),o.jsx("div",{className:"mt-3 pt-3 border-t border-gray-100",children:o.jsx(Se,{to:"/#contact",className:"text-xs text-primary-600 hover:text-primary-700 hover:underline font-medium",children:"📍 Request Jurisdiction Coverage"})})]})})]}),i&&o.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-30 md:hidden",onClick:()=>a(!1)}),o.jsx("div",{className:"md:pl-64 pt-16",children:o.jsx("main",{children:o.jsx(NR,{})})})]})}let dp;dp="/api",console.log("🌐 [API] Production mode: HARDCODED relative path:",dp),console.log("🚨 [API] Ignoring all environment variables (nuclear option enabled)");console.log("📡 [API] Final base URL:",dp);console.log("🔒 [API] Page protocol:",typeof window<"u"?window.location.protocol:"N/A");class Iz{constructor(t){FN(this,"baseURL");this.baseURL=t}async request(t,n={}){const r=t.startsWith("http")?t:`${this.baseURL}${t}`;if(r.startsWith("http://")){const s=r.replace("http://","https://");throw console.error("❌ [API] BLOCKED insecure HTTP request in production:",r),console.error("❌ [API] This would cause Mixed Content errors"),console.error("❌ [API] Upgrading to HTTPS:",s),new Error(`BLOCKED: Attempted to make insecure HTTP request in production: ${r}`)}console.log("🔍 [FETCH] Request URL:",r),console.log("🔍 [FETCH] Method:",n.method||"GET");const i=localStorage.getItem("auth_token"),a={"Content-Type":"application/json",...n.headers};i&&(a.Authorization=`Bearer ${i}`);try{const s=await fetch(r,{...n,headers:a});s.status===401&&localStorage.removeItem("auth_token");let c;const u=s.headers.get("content-type");if(u&&u.includes("application/json")?c=await s.json():c=await s.text(),!s.ok)throw{response:{data:c,status:s.status,statusText:s.statusText},message:`HTTP ${s.status}: ${s.statusText}`};return console.log("✅ [FETCH] Success:",s.status),{data:c,status:s.status,statusText:s.statusText}}catch(s){throw console.error("❌ [FETCH] Error:",s),s}}async get(t,n){let r=t;if(n!=null&&n.params){const i=new URLSearchParams;Object.entries(n.params).forEach(([s,c])=>{c!=null&&i.append(s,String(c))});const a=i.toString();a&&(r=`${t}?${a}`)}return this.request(r,{method:"GET"})}async post(t,n){return this.request(t,{method:"POST",body:n?JSON.stringify(n):void 0})}async put(t,n){return this.request(t,{method:"PUT",body:n?JSON.stringify(n):void 0})}async delete(t){return this.request(t,{method:"DELETE"})}async patch(t,n){return this.request(t,{method:"PATCH",body:n?JSON.stringify(n):void 0})}}const vt=new Iz(dp);function K_({onLocationFound:e,initialAddress:t="",compact:n=!1}){const{clearLocation:r}=Hf(),[i,a]=N.useState(t),[s,c]=N.useState(!1),[u,d]=N.useState(null),[h,m]=N.useState([]),[p,v]=N.useState(null),[_,x]=N.useState(!1),[y,w]=N.useState(-1),b=N.useRef(null),j=N.useRef(null),E=async D=>{if(D.trim().length<3){m([]),x(!1);return}try{const Z=await fetch(`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(D)}&format=json&addressdetails=1&countrycodes=us&limit=5`,{headers:{"User-Agent":"CommunityOne-Navigator/1.0"}});if(!Z.ok)return;const F=(await Z.json()).reduce((B,G)=>{const R=`${G.osm_type}_${G.osm_id}`;return B.some(W=>`${W.osm_type}_${W.osm_id}`===R)||B.push(G),B},[]);m(F),x(F.length>0),w(-1)}catch(Z){console.error("Autocomplete error:",Z)}},P=D=>{a(D),d(null),b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{E(D)},300)};N.useEffect(()=>()=>{b.current&&clearTimeout(b.current)},[]);const O=async D=>{if(!D.trim()){d("Please enter an address");return}c(!0),d(null),m([]),x(!1);try{const Z=await fetch(`https://nominatim.openstreetmap.org/search?q=${encodeURIComponent(D)}&format=json&addressdetails=1&countrycodes=us&limit=5`,{headers:{"User-Agent":"CommunityOne-Navigator/1.0"}});if(!Z.ok)throw new Error("Failed to lookup address");const I=await Z.json();if(I.length===0){d("Address not found. Please try a different address or be more specific.");return}const F=I.reduce((B,G)=>{const R=`${G.osm_type}_${G.osm_id}`;return B.some(W=>`${W.osm_type}_${W.osm_id}`===R)||B.push(G),B},[]);if(F.length>1){m(F),x(!0);return}C(F[0])}catch(Z){console.error("Address lookup error:",Z),d("Failed to lookup address. Please try again.")}finally{c(!1)}},C=D=>{const Z=D.address,I=Z.state||"",F=gb(I);console.log(`🗺️ [AddressLookup] State conversion: "${I}" → "${F}"`);const B={address:D.display_name,state:F,county:Z.county||"",city:Z.city||Z.town||Z.village||Z.municipality||"",latitude:parseFloat(D.lat),longitude:parseFloat(D.lon)};if(!B.state||!B.city){d("Could not determine city and state from this address. Please be more specific."),m([]),x(!1);return}console.log("📍 [AddressLookup] Location found:",B),m([]),x(!1),v(B),e(B)},A=D=>{D.preventDefault(),y>=0&&h[y]?C(h[y]):O(i)},T=D=>{a(D.display_name),C(D)},$=D=>{if(!(!_||h.length===0))switch(D.key){case"ArrowDown":D.preventDefault(),w(Z=>ZZ>0?Z-1:-1);break;case"Enter":y>=0&&(D.preventDefault(),C(h[y]));break;case"Escape":x(!1),w(-1);break}},z=()=>{if(!navigator.geolocation){d("Geolocation is not supported by your browser");return}c(!0),d(null),m([]),navigator.geolocation.getCurrentPosition(async D=>{const{latitude:Z,longitude:I}=D.coords;try{const F=await fetch(`https://nominatim.openstreetmap.org/reverse?lat=${Z}&lon=${I}&format=json&addressdetails=1`,{headers:{"User-Agent":"CommunityOne-Navigator/1.0"}});if(!F.ok)throw new Error("Failed to reverse geocode location");const B=await F.json();a(B.display_name),C(B)}catch(F){console.error("Reverse geocoding error:",F),d("Failed to determine your location. Please enter your address manually.")}finally{c(!1)}},D=>{switch(console.error("Geolocation error:",D),c(!1),D.code){case D.PERMISSION_DENIED:d("Location access denied. Please enter your address manually or enable location permissions.");break;case D.POSITION_UNAVAILABLE:d("Location information unavailable. Please enter your address manually.");break;case D.TIMEOUT:d("Location request timed out. Please try again or enter your address manually.");break;default:d("An error occurred while getting your location. Please enter your address manually.")}},{enableHighAccuracy:!1,timeout:5e3,maximumAge:3e4})};return n?o.jsxs("form",{onSubmit:A,className:"w-full",children:[o.jsxs("div",{className:"relative",children:[o.jsx("input",{ref:j,type:"text",value:i,onChange:D=>P(D.target.value),onKeyDown:$,placeholder:"Enter your address...",className:"w-full px-4 py-2 pl-10 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 text-gray-900",disabled:s,autoComplete:"off"},"address-input-compact"),o.jsx(Rn,{className:"absolute left-3 top-2.5 h-5 w-5 text-gray-400"}),o.jsx("button",{type:"submit",disabled:s,className:"absolute right-2 top-1.5 px-3 py-1 text-white rounded-md transition-colors text-sm disabled:opacity-50",style:{backgroundColor:"#354F52"},onMouseEnter:D=>!s&&(D.currentTarget.style.backgroundColor="#2e4346"),onMouseLeave:D=>!s&&(D.currentTarget.style.backgroundColor="#354F52"),children:s?"Finding...":"Find"}),_&&h.length>0&&o.jsx("div",{className:"absolute z-50 w-full mt-1 bg-white border border-gray-300 rounded-lg shadow-lg max-h-60 overflow-y-auto",children:h.map((D,Z)=>{const I=D.address,F=I.city||I.town||I.village||I.county||"Unknown";return o.jsxs("button",{type:"button",onClick:()=>T(D),className:`w-full px-4 py-2 text-left hover:bg-gray-100 transition-colors ${Z===y?"bg-gray-100":""}`,children:[o.jsx("p",{className:"text-sm font-medium text-gray-900",children:D.display_name}),o.jsxs("p",{className:"text-xs text-gray-500",children:[F,", ",I.state]})]},`${D.osm_type}_${D.osm_id}`)})})]}),u&&o.jsx("p",{className:"mt-2 text-sm text-red-600",children:u})]}):o.jsxs("div",{className:"w-full",children:[o.jsxs("form",{onSubmit:A,className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{htmlFor:"address",className:"block text-sm font-medium text-gray-700 mb-2",children:o.jsxs("span",{className:"flex items-center gap-2",children:[o.jsx(Rn,{className:"h-5 w-5"}),"Enter Your Address"]})}),o.jsxs("div",{className:"relative",children:[o.jsx("input",{ref:j,type:"text",id:"address",name:"addresslookup",value:i,onChange:D=>P(D.target.value),onKeyDown:$,placeholder:"123 Main St, Los Angeles, CA 90001",className:"w-full px-4 py-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 text-base text-gray-900",disabled:s,autoComplete:"off"},"address-input"),_&&h.length>0&&o.jsx("div",{className:"absolute z-50 w-full mt-1 bg-white border border-gray-300 rounded-lg shadow-lg max-h-60 overflow-y-auto",children:h.map((D,Z)=>{const I=D.address,F=I.city||I.town||I.village||I.county||"Unknown";return o.jsxs("button",{type:"button",onClick:()=>T(D),className:`w-full px-4 py-3 text-left hover:bg-gray-100 transition-colors border-b border-gray-100 last:border-b-0 ${Z===y?"bg-gray-100":""}`,children:[o.jsx("p",{className:"text-sm font-medium text-gray-900",children:D.display_name}),o.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[F,", ",I.state]})]},`${D.osm_type}_${D.osm_id}`)})})]}),o.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"We'll find your local organizations based on your address"}),o.jsx("div",{className:"mt-3",children:o.jsxs("button",{type:"button",onClick:z,disabled:s,className:"w-full px-4 py-2 bg-white border-2 border-primary-300 text-primary-700 rounded-lg hover:bg-primary-50 hover:border-primary-500 transition-colors font-medium disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2",children:[o.jsxs("svg",{className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]}),o.jsx("span",{children:"Use My Current Location"})]})}),o.jsxs("div",{className:"relative my-4",children:[o.jsx("div",{className:"absolute inset-0 flex items-center",children:o.jsx("div",{className:"w-full border-t border-gray-300"})}),o.jsx("div",{className:"relative flex justify-center text-xs",children:o.jsx("span",{className:"px-2 bg-white text-gray-500",children:"or enter manually"})})]})]}),o.jsx("button",{type:"submit",disabled:s,className:"w-full px-6 py-3 text-white rounded-lg transition-colors font-medium disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2",style:{backgroundColor:"#354F52"},onMouseEnter:D=>!s&&(D.currentTarget.style.backgroundColor="#2e4346"),onMouseLeave:D=>!s&&(D.currentTarget.style.backgroundColor="#354F52"),children:s?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"animate-spin h-5 w-5 border-2 border-white border-t-transparent rounded-full"}),o.jsx("span",{children:"Looking up address..."})]}):o.jsxs(o.Fragment,{children:[o.jsx(nn,{className:"h-5 w-5"}),o.jsx("span",{children:"Find My Community"})]})})]}),u&&o.jsx("div",{className:"mt-4 p-4 bg-red-50 border border-red-200 rounded-lg",children:o.jsx("p",{className:"text-sm text-red-800",children:u})}),p&&!n&&o.jsxs("div",{className:"mt-6 border-2 border-primary-200 rounded-lg overflow-hidden bg-primary-50",children:[o.jsxs("div",{className:"bg-primary-600 px-4 py-3 flex items-center justify-between",children:[o.jsxs("h3",{className:"text-lg font-semibold text-white flex items-center gap-2",children:[o.jsx(Rn,{className:"h-5 w-5"}),"Your Local Community"]}),o.jsx("button",{onClick:()=>window.location.href="/",className:"text-sm text-white hover:text-primary-100 underline font-medium",children:"← Back to Home"})]}),o.jsxs("div",{className:"p-6 space-y-4",children:[o.jsx("p",{className:"text-sm text-gray-700 mb-4",children:"Select a jurisdiction level below to explore organizations, meeting minutes, and contacts:"}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[p.city&&o.jsx("button",{onClick:()=>{window.location.href="/?scope=city"},className:"bg-white rounded-lg p-4 shadow-sm hover:shadow-md hover:border-2 hover:border-blue-500 transition-all text-left w-full group",children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("div",{className:"p-2 bg-blue-100 rounded-lg group-hover:bg-blue-200 transition-colors",children:o.jsx("svg",{className:"h-6 w-6 text-blue-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"})})}),o.jsxs("div",{className:"flex-1",children:[o.jsx("p",{className:"text-xs font-medium text-gray-500 uppercase tracking-wider",children:"City"}),o.jsx("p",{className:"text-lg font-semibold text-gray-900 mt-1 group-hover:text-blue-600",children:p.city}),o.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"City Council"}),o.jsx("p",{className:"text-xs text-blue-600 mt-2 opacity-0 group-hover:opacity-100 transition-opacity",children:"Click to explore →"})]})]})}),p.county&&o.jsx("button",{onClick:()=>{window.location.href="/?scope=county"},className:"bg-white rounded-lg p-4 shadow-sm hover:shadow-md hover:border-2 hover:border-green-500 transition-all text-left w-full group",children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("div",{className:"p-2 bg-green-100 rounded-lg group-hover:bg-green-200 transition-colors",children:o.jsx("svg",{className:"h-6 w-6 text-green-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7"})})}),o.jsxs("div",{className:"flex-1",children:[o.jsx("p",{className:"text-xs font-medium text-gray-500 uppercase tracking-wider",children:"County"}),o.jsx("p",{className:"text-lg font-semibold text-gray-900 mt-1 group-hover:text-green-600",children:p.county}),o.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"County Board"}),o.jsx("p",{className:"text-xs text-green-600 mt-2 opacity-0 group-hover:opacity-100 transition-opacity",children:"Click to explore →"})]})]})}),p.state&&o.jsx("button",{onClick:()=>{window.location.href="/?scope=state"},className:"bg-white rounded-lg p-4 shadow-sm hover:shadow-md hover:border-2 hover:border-purple-500 transition-all text-left w-full group",children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("div",{className:"p-2 bg-purple-100 rounded-lg group-hover:bg-purple-200 transition-colors",children:o.jsx("svg",{className:"h-6 w-6 text-purple-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 21v-4m0 0V5a2 2 0 012-2h6.5l1 1H21l-3 6 3 6h-8.5l-1-1H5a2 2 0 00-2 2zm9-13.5V9"})})}),o.jsxs("div",{className:"flex-1",children:[o.jsx("p",{className:"text-xs font-medium text-gray-500 uppercase tracking-wider",children:"State"}),o.jsx("p",{className:"text-lg font-semibold text-gray-900 mt-1 group-hover:text-purple-600",children:p.state}),o.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"State Legislature"}),o.jsx("p",{className:"text-xs text-purple-600 mt-2 opacity-0 group-hover:opacity-100 transition-opacity",children:"Click to explore →"})]})]})}),p.city&&o.jsx("button",{onClick:()=>{window.location.href="/?scope=community"},className:"bg-white rounded-lg p-4 shadow-sm hover:shadow-md hover:border-2 hover:border-amber-500 transition-all text-left w-full group",children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("div",{className:"p-2 bg-amber-100 rounded-lg group-hover:bg-amber-200 transition-colors",children:o.jsx("svg",{className:"h-6 w-6 text-amber-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"})})}),o.jsxs("div",{className:"flex-1",children:[o.jsx("p",{className:"text-xs font-medium text-gray-500 uppercase tracking-wider",children:"School District"}),o.jsxs("p",{className:"text-lg font-semibold text-gray-900 mt-1 group-hover:text-amber-600",children:[p.city," Unified"]}),o.jsx("p",{className:"text-sm text-gray-600 mt-1",children:"School Board"}),o.jsx("p",{className:"text-xs text-amber-600 mt-2 opacity-0 group-hover:opacity-100 transition-opacity",children:"Click to explore →"})]})]})})]}),o.jsxs("div",{className:"pt-4 border-t border-primary-200",children:[o.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"Quick access to all local resources:"}),o.jsxs("div",{className:"flex flex-wrap gap-3",children:[o.jsx("button",{onClick:()=>{window.location.href=`/documents?state=${p.state}&city=${p.city}`},className:"flex-1 min-w-[200px] px-4 py-2 bg-white border-2 border-primary-600 text-primary-700 rounded-lg hover:bg-primary-50 transition-colors font-medium",children:"📄 All Meeting Minutes"}),o.jsx("button",{onClick:()=>{window.location.href=`/nonprofits?state=${p.state}&city=${p.city}`},className:"flex-1 min-w-[200px] px-4 py-2 bg-white border-2 border-primary-600 text-primary-700 rounded-lg hover:bg-primary-50 transition-colors font-medium",children:"🏢 All Local Organizations"})]})]}),o.jsx("div",{className:"text-center pt-2",children:o.jsx("button",{onClick:()=>{v(null),a(""),d(null),r()},className:"text-sm text-primary-600 hover:text-primary-700 font-medium underline",children:"Search Different Address"})})]})]})]})}function Rz(){const e=qc(),[t]=Ws(),[n,r]=N.useState(""),[i,a]=N.useState("city"),[s,c]=N.useState(0),[u,d]=N.useState(!1),{location:h,setLocation:m}=Hf(),p="https://www.communityone.com/docs/intro",{data:v,isLoading:_,error:x}=zt({queryKey:["search-preview-home",n,h==null?void 0:h.state],queryFn:async()=>{if(console.log("🔍 [Home] Fetching preview for:",n,"in state:",h==null?void 0:h.state),!n||n.length<2)return console.log("⚠️ [Home] Query too short, skipping"),null;const C="/search/",A={q:n,types:"causes,contacts,organizations",limit:3};h&&h.state&&(A.state=h.state,console.log("📍 [Home] Filtering by state:",h.state)),console.log("📤 [Home] API Request:",C,A);const T=await vt.get(C,{params:A});return console.log("📥 [Home] API Response:",T.data),console.log("📊 [Home] Total results:",T.data.total_results),T.data},enabled:n.length>=2&&u,staleTime:1e3});N.useEffect(()=>{console.log("🔄 [Home] Preview results updated:",{hasResults:!!v,totalResults:v==null?void 0:v.total_results,showSuggestions:u,keyword:n,isLoading:_,error:x})},[v,u,n,_,x]),N.useEffect(()=>{t.get("tab")==="community"&&c(1)},[t]),N.useEffect(()=>{h&&i==="community"&&a("city")},[h,i]);const y=C=>{const A=C.target.value;r(A),d(A.length>=2)},w=C=>{r(C),d(!1)},b=C=>{if(n.trim().length>=2){const A=new URLSearchParams;A.set("q",n),A.set("types",C),h&&h.state&&A.set("state",h.state),e(`/search?${A.toString()}`)}},j=C=>{if(C.preventDefault(),n||h){const A=new URLSearchParams;n&&A.set("search",n),i&&A.set("scope",i),h&&((i==="state"||i==="county"||i==="city"||i==="community")&&A.set("state",h.state),(i==="county"||i==="city"||i==="community")&&h.county&&A.set("county",h.county),(i==="city"||i==="community")&&A.set("city",h.city)),e(`/documents?${A.toString()}`)}},E=C=>{m({address:C.address,state:C.state,county:C.county,city:C.city,latitude:C.latitude,longitude:C.longitude})},P=[{name:"People",icon:Ur,query:"",route:"/people"},{name:"Community",icon:$r,query:"community engagement"},{name:"Budget",icon:PA,query:"budget funding"},{name:"Housing",icon:s0,query:"housing affordable"},{name:"Transport",icon:Nz,query:"transportation transit"},{name:"Health",icon:$t,query:"health dental"},{name:"Education",icon:Eo,query:"education school"},{name:"Jobs",icon:SA,query:"employment jobs"},{name:"Legal",icon:fz,query:"legal services"},{name:"Charities",icon:dc,query:"",route:"/nonprofits"}],O=C=>{C.route?C.route.startsWith("http")?window.open(C.route,"_blank"):e(C.route):C.query&&e(`/search?q=${encodeURIComponent(C.query)}`)};return o.jsxs("div",{className:"min-h-screen",style:{backgroundColor:"#F1F5F9"},children:[o.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pt-20 pb-16",children:o.jsxs("div",{className:"text-center",children:[o.jsx("h1",{className:"text-5xl font-bold mb-6",style:{color:"#354F52"},children:"Open Navigator"}),o.jsxs("p",{className:"text-xl mb-12 max-w-3xl mx-auto",style:{color:"#354F52"},children:["Track what local governments and charities say, spend—and block.",o.jsx("br",{}),"Find leaders by name. Discover causes."," ",o.jsx(Se,{to:"/jurisdictions",className:"font-semibold hover:underline",children:"925 jurisdictions"}),"."," ",o.jsx(Se,{to:"/search?types=organizations",className:"font-semibold hover:underline",children:"43,726 nonprofits"}),". All free."]}),o.jsx("div",{className:"max-w-5xl mx-auto mb-8",children:o.jsxs(wt.Group,{selectedIndex:s,onChange:c,children:[o.jsxs(wt.List,{className:"flex space-x-2 rounded-xl bg-white p-2 shadow-lg mb-6",children:[o.jsx(wt,{as:N.Fragment,children:({selected:C})=>o.jsx("button",{className:`w-full rounded-lg py-3 px-4 text-base font-medium leading-5 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 ${C?"text-white shadow":"text-gray-700 hover:bg-gray-100"}`,style:C?{backgroundColor:"#354F52"}:{},children:"🔍 Search Topics"})}),o.jsx(wt,{as:N.Fragment,children:({selected:C})=>o.jsx("button",{className:`w-full rounded-lg py-3 px-4 text-base font-medium leading-5 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 ${C?"text-white shadow":"text-gray-700 hover:bg-gray-100"}`,style:C?{backgroundColor:"#354F52"}:{},children:"📍 Find My Local Community"})})]}),o.jsxs(wt.Panels,{children:[o.jsx(wt.Panel,{children:o.jsx("div",{className:"bg-white rounded-xl shadow-lg p-8",children:o.jsx("form",{onSubmit:j,children:o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-4 items-end",children:[o.jsxs("div",{className:"lg:col-span-7",children:[o.jsx("label",{className:"block text-left text-sm font-medium text-gray-700 mb-2",children:"Search for topics, people, organizations, or causes"}),o.jsxs("div",{className:"relative",children:[o.jsx("input",{type:"text",placeholder:"Try: mayor, dental clinic, food bank, affordable housing...",value:n,onChange:y,onBlur:()=>setTimeout(()=>d(!1),200),onFocus:()=>{n.length>=2&&d(!0)},className:"w-full px-4 py-3 text-lg border-2 border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent text-gray-900"}),u&&v&&v.total_results>0&&o.jsxs("div",{className:"absolute z-10 w-full mt-2 bg-white border border-gray-200 rounded-lg shadow-xl max-h-96 overflow-y-auto",children:[v.results.causes.length>0&&o.jsxs("div",{className:"border-b border-gray-200",children:[o.jsxs("div",{className:"px-4 py-2 bg-gray-50 flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx($t,{className:"h-4 w-4 text-gray-500"}),o.jsx("span",{className:"text-xs font-semibold text-gray-700 uppercase",children:"Causes"})]}),o.jsx("button",{type:"button",onClick:()=>b("causes"),className:"text-xs text-primary-600 hover:text-primary-700 font-medium",children:"View All"})]}),v.results.causes.slice(0,3).map((C,A)=>o.jsxs("button",{type:"button",onClick:()=>w(C.title),className:"w-full text-left px-4 py-2 hover:bg-gray-50 flex items-start gap-3 transition-colors",children:[o.jsx($t,{className:"h-5 w-5 text-gray-600 mt-0.5 flex-shrink-0"}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"font-medium text-gray-900 truncate",children:C.title}),o.jsx("div",{className:"text-sm text-gray-600 truncate",children:C.subtitle})]})]},A))]}),v.results.contacts.length>0&&o.jsxs("div",{className:"border-b border-gray-200",children:[o.jsxs("div",{className:"px-4 py-2 bg-gray-50 flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx($i,{className:"h-4 w-4 text-gray-500"}),o.jsx("span",{className:"text-xs font-semibold text-gray-700 uppercase",children:"People"})]}),o.jsx("button",{type:"button",onClick:()=>b("contacts"),className:"text-xs text-primary-600 hover:text-primary-700 font-medium",children:"View All"})]}),v.results.contacts.slice(0,3).map((C,A)=>o.jsxs("button",{type:"button",onClick:()=>w(C.title),className:"w-full text-left px-4 py-2 hover:bg-gray-50 flex items-start gap-3 transition-colors",children:[o.jsx($i,{className:"h-5 w-5 text-gray-600 mt-0.5 flex-shrink-0"}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"font-medium text-gray-900 truncate",children:C.title}),o.jsx("div",{className:"text-sm text-gray-600 truncate",children:C.subtitle})]})]},A))]}),v.results.organizations.length>0&&o.jsxs("div",{children:[o.jsxs("div",{className:"px-4 py-2 bg-gray-50 flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ci,{className:"h-4 w-4 text-gray-500"}),o.jsx("span",{className:"text-xs font-semibold text-gray-700 uppercase",children:"Organizations"})]}),o.jsx("button",{type:"button",onClick:()=>b("organizations"),className:"text-xs text-primary-600 hover:text-primary-700 font-medium",children:"View All"})]}),v.results.organizations.slice(0,3).map((C,A)=>{var T,$;return o.jsxs("button",{type:"button",onClick:()=>w(C.title),className:"w-full text-left px-4 py-2 hover:bg-gray-50 flex items-start gap-3 transition-colors last:rounded-b-lg",children:[(T=C.metadata)!=null&&T.logo_url?o.jsx("img",{src:C.metadata.logo_url,alt:`${C.title} logo`,className:"h-5 w-5 rounded object-contain mt-0.5 flex-shrink-0",onError:z=>{var D;z.currentTarget.style.display="none",(D=z.currentTarget.nextElementSibling)==null||D.classList.remove("hidden")}}):null,o.jsx(Ci,{className:`h-5 w-5 text-gray-600 mt-0.5 flex-shrink-0 ${($=C.metadata)!=null&&$.logo_url?"hidden":""}`}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"font-medium text-gray-900 truncate",children:C.title}),o.jsx("div",{className:"text-sm text-gray-600 truncate",children:C.subtitle})]})]},A)})]}),o.jsx("div",{className:"px-4 py-2 bg-gray-50 text-center border-t border-gray-200",children:o.jsxs("button",{type:"submit",className:"text-sm text-primary-600 hover:text-primary-700 font-medium",children:["See all ",v.total_results," results →"]})})]})]})]}),o.jsxs("div",{className:"lg:col-span-3",children:[o.jsx("label",{className:"block text-left text-sm font-medium text-gray-700 mb-2",children:"Search In"}),h?o.jsxs("div",{className:"relative",children:[o.jsxs("select",{value:i,onChange:C=>a(C.target.value),className:"w-full px-4 py-3 text-lg border-2 border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white text-gray-900",children:[o.jsxs("option",{value:"city",children:["My City (",h.city,")"]}),o.jsxs("option",{value:"county",children:["My County (",h.county||"County",")"]}),o.jsxs("option",{value:"state",children:["My State (",h.state,")"]}),o.jsxs("option",{value:"community",children:["School Board (",h.city,")"]})]}),o.jsxs("button",{type:"button",onClick:()=>e("/?tab=community"),className:"absolute -bottom-6 left-0 right-0 text-xs text-primary-600 hover:text-primary-700 font-medium underline flex items-center justify-center gap-1",children:[o.jsx(Rn,{className:"h-3 w-3"}),"Change Location"]})]}):o.jsxs("button",{type:"button",onClick:()=>e("/?tab=community"),className:"w-full px-4 py-3 text-lg border-2 border-primary-600 rounded-lg bg-primary-50 text-primary-700 hover:bg-primary-100 transition-colors font-semibold flex items-center justify-center gap-2",children:[o.jsx(Rn,{className:"h-5 w-5"}),"Set Your Location First"]})]}),o.jsxs("div",{className:"lg:col-span-2",children:[o.jsx("label",{className:"block text-left text-sm font-medium text-gray-700 mb-2 invisible",children:"Search"}),o.jsxs("button",{type:"submit",className:"w-full text-white px-6 py-3 rounded-lg transition-colors text-lg font-semibold flex items-center justify-center gap-2",style:{backgroundColor:"#354F52"},onMouseEnter:C=>C.currentTarget.style.backgroundColor="#2e4346",onMouseLeave:C=>C.currentTarget.style.backgroundColor="#354F52",children:[o.jsx(nn,{className:"h-6 w-6"}),"Search"]})]})]})})})}),o.jsx(wt.Panel,{children:o.jsxs("div",{className:"bg-white rounded-xl shadow-lg p-8",children:[o.jsx("h2",{className:"text-2xl font-bold mb-3 text-center",style:{color:"#354F52"},children:"What's Happening in Your Community?"}),o.jsx("p",{className:"text-gray-600 text-center mb-6",children:"Enter your address to find local organizations, city councils, county boards, school districts, and charities near you"}),o.jsx(K_,{onLocationFound:E}),h&&o.jsxs("div",{className:"mt-8 p-6 bg-green-50 border-2 border-green-200 rounded-xl",children:[o.jsxs("div",{className:"flex items-start gap-3 mb-4",children:[o.jsx(ci,{className:"h-6 w-6 text-green-600 flex-shrink-0 mt-0.5"}),o.jsxs("div",{className:"flex-1",children:[o.jsx("h3",{className:"text-lg font-bold text-green-900 mb-1",children:"Location Set Successfully!"}),o.jsxs("p",{className:"text-green-700",children:["You're all set for ",o.jsxs("strong",{children:[h.city,", ",h.state]}),". Now you can search for topics in your community."]})]})]}),o.jsxs("button",{onClick:()=>c(0),className:"w-full bg-green-600 hover:bg-green-700 text-white px-6 py-4 rounded-lg font-semibold text-lg flex items-center justify-center gap-2 transition-all shadow-lg hover:shadow-xl",children:[o.jsx(nn,{className:"h-6 w-6"}),"Search Topics in My Community",o.jsx(Nl,{className:"h-5 w-5"})]})]})]})})]})]})}),o.jsxs("div",{className:"max-w-5xl mx-auto mb-6",children:[o.jsx("p",{className:"text-sm text-gray-600 text-center mb-3",children:"Popular topics:"}),o.jsx("div",{className:"flex flex-wrap justify-center gap-3",children:P.map(C=>o.jsxs("button",{onClick:()=>O(C),className:"inline-flex items-center gap-2 px-4 py-2 bg-white border-2 border-gray-300 rounded-lg hover:border-primary-500 hover:bg-primary-50 transition-colors",children:[o.jsx(C.icon,{className:"h-5 w-5 text-gray-600"}),o.jsx("span",{className:"font-medium text-gray-700",children:C.name})]},C.name))})]}),o.jsxs("p",{className:"text-sm text-gray-500",children:["By continuing, you agree to the"," ",o.jsx("a",{href:"#",className:"text-primary-600 hover:underline",children:"Terms"})," & ",o.jsx("a",{href:"#",className:"text-primary-600 hover:underline",children:"Privacy"}),"."]})]})}),o.jsx("div",{className:"py-16",style:{backgroundColor:"#354F52"},children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[o.jsx("h2",{className:"text-3xl font-bold text-center mb-12 text-white",children:"Explore the Platform"}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:[o.jsx(Se,{to:"/analytics",className:"group",children:o.jsxs("div",{className:"bg-white border-2 border-gray-200 rounded-lg p-6 hover:border-primary-500 transition-colors",children:[o.jsx(fc,{className:"h-10 w-10 text-primary-600 mb-4"}),o.jsx("h3",{className:"text-xl font-semibold mb-2",style:{color:"#354F52"},children:"Data & Trends"}),o.jsx("p",{className:"text-gray-600 mb-4",children:"Statistics, charts, and insights. See what's happening across communities."}),o.jsxs("span",{className:"text-primary-600 font-medium inline-flex items-center",children:["View Data ",o.jsx(Nl,{className:"h-4 w-4 ml-2"})]})]})}),o.jsx(Se,{to:"/documents",className:"group",children:o.jsxs("div",{className:"bg-white border-2 border-gray-200 rounded-lg p-6 hover:border-primary-500 transition-colors",children:[o.jsx(Ao,{className:"h-10 w-10 text-primary-600 mb-4"}),o.jsx("h3",{className:"text-xl font-semibold mb-2",style:{color:"#354F52"},children:"Meeting Minutes"}),o.jsx("p",{className:"text-gray-600 mb-4",children:"See what local governments are discussing, deciding, and spending"}),o.jsxs("span",{className:"text-primary-600 font-medium inline-flex items-center",children:["Browse Minutes ",o.jsx(Nl,{className:"h-4 w-4 ml-2"})]})]})}),o.jsx("a",{href:p,target:"_blank",rel:"noopener noreferrer",className:"group",children:o.jsxs("div",{className:"bg-white border-2 border-gray-200 rounded-lg p-6 hover:border-primary-500 transition-colors",children:[o.jsx(Zf,{className:"h-10 w-10 text-primary-600 mb-4"}),o.jsx("h3",{className:"text-xl font-semibold mb-2",style:{color:"#354F52"},children:"Learn More"}),o.jsx("p",{className:"text-gray-600 mb-4",children:"Discover how to track local decisions and find charities"}),o.jsxs("span",{className:"text-primary-600 font-medium inline-flex items-center",children:["Getting Started ",o.jsx(Nl,{className:"h-4 w-4 ml-2"})]})]})})]})]})}),o.jsx("div",{className:"py-16",style:{backgroundColor:"#F1F5F9"},children:o.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 text-center",children:[o.jsxs("div",{children:[o.jsx("div",{className:"text-4xl font-bold text-primary-600 mb-2",children:"2,500+"}),o.jsx("div",{className:"text-gray-600",children:"Causes Tracked"})]}),o.jsxs("div",{children:[o.jsx("div",{className:"text-4xl font-bold text-emerald-600 mb-2",children:"15,000+"}),o.jsx("div",{className:"text-gray-600",children:"Government Decisions"})]}),o.jsxs("div",{children:[o.jsx("div",{className:"text-4xl font-bold text-amber-600 mb-2",children:"8 Years"}),o.jsx("div",{className:"text-gray-600",children:"Historical Coverage"})]}),o.jsxs("div",{children:[o.jsx("div",{className:"text-4xl font-bold text-cyan-600 mb-2",children:"5,000+"}),o.jsx("div",{className:"text-gray-600",children:"Meeting Records"})]}),o.jsxs("div",{children:[o.jsx("div",{className:"text-4xl font-bold mb-2",style:{color:"#354F52"},children:"12,000+"}),o.jsx("div",{className:"text-gray-600",children:"Hours of Video"})]}),o.jsxs("div",{children:[o.jsx("div",{className:"text-4xl font-bold text-purple-600 mb-2",children:"100%"}),o.jsx("div",{className:"text-gray-600",children:"Free & Open"})]})]})})})]})}function Fz(){const e=qc(),[t]=Ws(),[n,r]=N.useState(""),[i,a]=N.useState(""),[s,c]=N.useState("hero"),[u,d]=N.useState(0),[h,m]=N.useState("city"),[p,v]=N.useState(!1),[_,x]=N.useState(!1),{location:y,setLocation:w}=Hf(),b=N.useRef(null);N.useEffect(()=>{const U=setTimeout(()=>{console.log("⏱️ [HomeModern] Debounced keyword update:",n),a(n)},300);return()=>{clearTimeout(U)}},[n]),N.useEffect(()=>{const U=Y=>{b.current&&!b.current.contains(Y.target)&&v(!1)};if(p)return document.addEventListener("mousedown",U),()=>{document.removeEventListener("mousedown",U)}},[p]);let j="https://www.communityone.com/docs",E="";typeof window<"u"&&window.location.protocol==="https:"&&(j.startsWith("http://")&&(j=j.replace("http://","https://")),E.startsWith("http://")&&(E=E.replace("http://","https://")));const{data:P,isLoading:O}=zt({queryKey:["platform-stats-all",y==null?void 0:y.state,y==null?void 0:y.county,y==null?void 0:y.city],queryFn:async()=>{if(!y||!y.state)return console.log("📊 [HomeModern] No location set, skipping stats fetch"),null;console.log("📊 [HomeModern] Fetching stats for location:",y);const[U,Y,ne]=await Promise.all([y.city?vt.get("/stats",{params:{state:y.state,county:y.county,city:y.city}}).then(ee=>(console.log("📊 [HomeModern] City stats:",ee.data),ee.data)).catch(ee=>{var ce,Ne,Ee;return console.error("❌ [HomeModern] City stats error:",((ce=ee.response)==null?void 0:ce.data)||ee.message),{error:((Ee=(Ne=ee.response)==null?void 0:Ne.data)==null?void 0:Ee.detail)||ee.message}}):Promise.resolve(null),y.county?vt.get("/stats",{params:{state:y.state,county:y.county}}).then(ee=>(console.log("📊 [HomeModern] County stats:",ee.data),ee.data)).catch(ee=>{var ce,Ne,Ee;return console.error("❌ [HomeModern] County stats error:",((ce=ee.response)==null?void 0:ce.data)||ee.message),{error:((Ee=(Ne=ee.response)==null?void 0:Ne.data)==null?void 0:Ee.detail)||ee.message}}):Promise.resolve(null),vt.get("/stats",{params:{state:y.state}}).then(ee=>(console.log("📊 [HomeModern] State stats:",ee.data),ee.data)).catch(ee=>{var ce,Ne,Ee;return console.error("❌ [HomeModern] State stats error:",((ce=ee.response)==null?void 0:ce.data)||ee.message),{error:((Ee=(Ne=ee.response)==null?void 0:Ne.data)==null?void 0:Ee.detail)||ee.message}})]),ae={city:U,county:Y,state:ne,community:U};return console.log("📊 [HomeModern] All stats loaded:",ae),ae},enabled:!!(y&&y.state),staleTime:1e3*60*60,refetchOnWindowFocus:!1}),C=U=>U==null||U===0?"0":U>=1e6?`${(U/1e6).toFixed(1)}M`:U>=1e4?`${(U/1e3).toFixed(1)}K`:U.toLocaleString(),A=P==null?void 0:P[h],T=A?{...A,jurisdictions_display:C(A.jurisdictions),nonprofits_display:C(A.nonprofits),contacts_display:C(A.contacts),causes_display:"650+",school_districts_display:C(A.school_districts)}:null;console.log("📊 [HomeModern] Current scope:",h,"Stats data:",T,"Loading:",O);const{data:$,isLoading:z,error:D}=zt({queryKey:["search-preview-home",i,y==null?void 0:y.state],queryFn:async()=>{var ne,ae;if(console.log("🔍 [HomeModern] Fetching preview for:",i,"in state:",y==null?void 0:y.state),!i||i.length<2)return console.log("⚠️ [HomeModern] Query too short, skipping"),null;const U="/search/",Y={q:i,types:"causes,contacts,organizations",limit:3};y&&y.state&&(Y.state=y.state,console.log("📍 [HomeModern] Filtering by state:",y.state)),console.log("📤 [HomeModern] API Request:",U,Y);try{const ee=await vt.get(U,{params:Y});return console.log("📥 [HomeModern] API Response:",ee.data),console.log("📊 [HomeModern] Total results:",ee.data.total_results),console.log("🎯 [HomeModern] Causes:",ee.data.results.causes.length),console.log("👥 [HomeModern] Contacts:",ee.data.results.contacts.length),console.log("🏢 [HomeModern] Organizations:",ee.data.results.organizations.length),ee.data}catch(ee){throw console.error("❌ [HomeModern] API Error:",ee),console.error("❌ [HomeModern] Error message:",ee.message),console.error("❌ [HomeModern] Error response:",(ne=ee.response)==null?void 0:ne.data),console.error("❌ [HomeModern] Error status:",(ae=ee.response)==null?void 0:ae.status),ee}},enabled:i.length>=2&&p,staleTime:1e3,retry:!1});N.useEffect(()=>{console.log("🔄 [HomeModern] Preview results updated:",{hasResults:!!$,totalResults:$==null?void 0:$.total_results,showSuggestions:p,keyword:n,isLoading:z,error:D})},[$,p,n,z,D]),N.useEffect(()=>{t.get("tab")==="community"&&d(1)},[t]),N.useEffect(()=>{const U=t.get("scope");U&&["city","county","state","community","national"].includes(U)&&(m(U),d(0))},[t]),N.useEffect(()=>{y&&h==="community"&&m("city")},[y,h]);const Z=U=>{const Y=U.target.value;console.log("⌨️ [HomeModern] Keyword changed:",Y),r(Y),v(Y.length>=2),console.log("👁️ [HomeModern] Show suggestions:",Y.length>=2)},I=U=>{r(U),v(!1);const Y=new URLSearchParams;Y.set("q",U),y&&y.state&&Y.set("state",y.state),e(`/search?${Y.toString()}`)},F=U=>{if(n.trim().length>=2){const Y=new URLSearchParams;Y.set("q",n),Y.set("types",U),y&&y.state&&Y.set("state",y.state),e(`/search?${Y.toString()}`)}},B=U=>{const Y=document.getElementById(U);if(Y){const ee=Y.getBoundingClientRect().top+window.pageYOffset-80;window.scrollTo({top:ee,behavior:"smooth"})}};N.useEffect(()=>{const U=()=>{const Y=["hero","features","how-it-works","stats","get-started"],ne=window.scrollY+100;for(const ae of Y){const ee=document.getElementById(ae);if(ee){const{offsetTop:ce,offsetHeight:Ne}=ee;if(ne>=ce&&newindow.removeEventListener("scroll",U)},[]);const G=U=>{if(U.preventDefault(),n||y){const Y=new URLSearchParams;n&&Y.set("q",n),y&&y.state&&Y.set("state",y.state),e(`/search?${Y.toString()}`)}},R=U=>{w({address:U.address,state:U.state,county:U.county,city:U.city,latitude:U.latitude,longitude:U.longitude})},K=[{id:"hero",label:"Home"},{id:"features",label:"Features"},{id:"how-it-works",label:"How It Works"},{id:"stats",label:"Impact"},{id:"get-started",label:"Documentation"},{id:"contact",label:"Contact"}],W=[{icon:Ao,title:"Policy Decisions",description:"Track 500K+ meeting pages with decision analysis, deferral patterns, and stakeholder positions",link:"/documents",color:"#354F52"},{icon:fc,title:"Budget Analysis",description:"Compare budget rhetoric to reality with $2T+ in tracked spending and delta analysis",link:"/analytics",color:"#52796F"},{icon:Ur,title:"Elected Officials",description:"Follow 362 officials across 925 jurisdictions with voting records and decision patterns",link:"/people",color:"#84A98C"},{icon:Ai,title:"Policy Map",description:"Track state legislation and bills across all sessions. Search 13,000+ bills by topic and status",link:"/policy-map",color:"#4A90E2"},{icon:dc,title:"Nonprofits & Churches",description:"43,726 nonprofits including 4,372 churches with financial data from 5 states",link:"/nonprofits",color:"#9B59B6"},{icon:Hd,title:"Fact-Checking",description:"Verify claims with integrated PolitiFact, FactCheck.org, and Google Fact Check data",link:"/debate-grader",color:"#E74C3C"}];return o.jsxs("div",{className:"min-h-screen bg-white",children:[o.jsxs("nav",{className:"fixed top-0 left-0 right-0 z-50 bg-white/95 backdrop-blur-sm border-b border-gray-200 shadow-sm",children:[o.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:o.jsxs("div",{className:"flex items-center justify-between h-20",children:[o.jsxs(Se,{to:"/",className:"flex items-center gap-3",children:[o.jsx("img",{src:"/communityone_logo.svg",alt:"CommunityOne Logo",className:"h-12"}),o.jsx("span",{className:"text-xl font-bold",style:{color:"#354F52"},children:"Open Navigator"})]}),o.jsx("div",{className:"hidden md:flex items-center gap-8",children:K.map(U=>o.jsx("button",{onClick:()=>B(U.id),className:`text-sm font-medium transition-colors ${s===U.id?"text-[#354F52] border-b-2 border-[#354F52]":"text-gray-600 hover:text-[#354F52]"} pb-1`,children:U.label},U.id))}),o.jsx(Se,{to:"/explore",className:"hidden md:block px-6 py-2.5 rounded-lg text-white font-semibold hover:shadow-lg transition-all",style:{backgroundColor:"#354F52"},children:"Explore Now"}),o.jsx("button",{onClick:()=>x(!_),className:"md:hidden p-2 rounded-lg text-gray-600 hover:bg-gray-100 transition-colors","aria-label":"Toggle menu",children:_?o.jsx(Cr,{className:"h-6 w-6"}):o.jsx(NA,{className:"h-6 w-6"})})]})}),_&&o.jsx("div",{className:"md:hidden border-t border-gray-200 bg-white",children:o.jsxs("div",{className:"px-4 py-3 space-y-1",children:[K.map(U=>o.jsx("button",{onClick:()=>{B(U.id),x(!1)},className:`block w-full text-left px-4 py-3 rounded-lg text-base font-medium transition-colors ${s===U.id?"bg-[#354F52] text-white":"text-gray-700 hover:bg-gray-100"}`,children:U.label},U.id)),o.jsx(Se,{to:"/explore",className:"block w-full text-center px-4 py-3 mt-2 rounded-lg text-white font-semibold",style:{backgroundColor:"#354F52"},onClick:()=>x(!1),children:"Explore Now"})]})})]}),o.jsx("section",{id:"hero",className:"pt-32 pb-20 px-4",style:{background:"linear-gradient(135deg, #F1F5F9 0%, #E8EEF2 100%)"},children:o.jsxs("div",{className:"max-w-7xl mx-auto text-center",children:[o.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 bg-white rounded-full shadow-sm mb-6 animate-[slideUp_0.6s_ease-out]",children:[o.jsx(CA,{className:"h-5 w-5",style:{color:"#354F52"}}),o.jsx("span",{className:"text-sm font-medium",style:{color:"#354F52"},children:"The open path to everything local"})]}),o.jsxs("h1",{className:"text-6xl md:text-7xl font-bold mb-6 animate-[slideUp_0.8s_ease-out_0.2s_both]",style:{color:"#354F52"},children:["Track Local Decisions.",o.jsx("br",{}),o.jsx("span",{className:"bg-gradient-to-r from-[#52796F] to-[#84A98C] bg-clip-text text-transparent",children:"Take Action."})]}),o.jsxs("p",{className:"text-xl md:text-2xl text-gray-600 mb-12 max-w-3xl mx-auto animate-[slideUp_0.8s_ease-out_0.4s_both]",children:["Follow leaders, charities, and causes in your community.",o.jsx("br",{}),n.length>=2&&$&&$.total_results>0?o.jsxs(o.Fragment,{children:[o.jsxs("span",{className:"font-semibold text-[#52796F]",children:[$.total_results.toLocaleString()," result",$.total_results!==1?"s":""]}),' matching "',o.jsx("span",{className:"font-bold text-[#354F52]",children:n}),'"',y&&o.jsxs(o.Fragment,{children:[" in ",o.jsx("span",{className:"font-semibold text-[#52796F]",children:y.city||y.county||y.state})]})]}):n.length>=2&&$&&$.total_results===0?o.jsx(o.Fragment,{children:o.jsxs("span",{className:"text-gray-500",children:['No results found for "',n,'"',y&&` in ${y.city||y.county||y.state}`]})}):T!=null&&T.error?o.jsxs("span",{className:"text-amber-600",children:["⚠️ Stats unavailable (",T.error,"). Using default counts."]}):T?T.level==="state"||T.level==="county"||T.level==="city"||T.level==="community"?o.jsxs(o.Fragment,{children:[T.level==="city"&&T.jurisdictions_breakdown?o.jsxs(Se,{to:`/jurisdictions?state=${T.state}&jurisdiction_details=${encodeURIComponent(JSON.stringify(T.jurisdictions_breakdown))}`,className:"font-semibold text-[#52796F] hover:text-[#354F52] no-underline hover:underline hover:decoration-2 transition-all duration-200",children:[T.jurisdictions_display," jurisdictions"]}):o.jsxs(Se,{to:`/jurisdictions?state=${T.state}${T.county?`&county=${encodeURIComponent(T.county)}`:""}${T.city?`&city=${encodeURIComponent(T.city)}`:""}`,className:"font-semibold text-[#52796F] hover:text-[#354F52] no-underline hover:underline hover:decoration-2 transition-all duration-200",children:[T.jurisdictions_display," jurisdictions"]})," • ",o.jsxs(Se,{to:`/search?types=organizations&state=${T.state}${T.county?`&county=${encodeURIComponent(T.county)}`:""}${T.city?`&city=${encodeURIComponent(T.city)}`:""}`,className:"font-semibold text-[#52796F] hover:text-[#354F52] no-underline hover:underline hover:decoration-2 transition-all duration-200",children:[T.nonprofits_display," nonprofits"]})," • ",o.jsxs(Se,{to:`/search?types=contacts&state=${T.state}${T.county?`&county=${encodeURIComponent(T.county)}`:""}${T.city?`&city=${encodeURIComponent(T.city)}`:""}`,className:"font-semibold text-[#52796F] hover:text-[#354F52] no-underline hover:underline hover:decoration-2 transition-all duration-200",children:[T.contacts_display," leaders"]})," • ",o.jsxs(Se,{to:`/search?types=causes&state=${T.state}${T.county?`&county=${encodeURIComponent(T.county)}`:""}${T.city?`&city=${encodeURIComponent(T.city)}`:""}`,className:"font-semibold text-[#52796F] hover:text-[#354F52] no-underline hover:underline hover:decoration-2 transition-all duration-200",children:[T.causes_display," causes"]})," in ",T.location," • 100% free"]}):o.jsxs(o.Fragment,{children:[o.jsxs(Se,{to:`/jurisdictions${T.state?`?state=${T.state}`:""}`,className:"font-semibold text-[#52796F] hover:text-[#354F52] no-underline hover:underline hover:decoration-2 transition-all duration-200",children:[T.jurisdictions_display," jurisdictions"]})," • ",o.jsxs(Se,{to:"/search?types=organizations",className:"font-semibold text-[#52796F] hover:text-[#354F52] no-underline hover:underline hover:decoration-2 transition-all duration-200",children:[T.nonprofits_display," nonprofits"]})," • ",o.jsxs(Se,{to:"/search?types=contacts",className:"font-semibold text-[#52796F] hover:text-[#354F52] no-underline hover:underline hover:decoration-2 transition-all duration-200",children:[T.contacts_display," leaders"]})," • ",o.jsxs(Se,{to:"/search?types=causes",className:"font-semibold text-[#52796F] hover:text-[#354F52] no-underline hover:underline hover:decoration-2 transition-all duration-200",children:[T.causes_display," causes"]})," • 100% free"]}):o.jsxs(o.Fragment,{children:[o.jsx(Se,{to:"/jurisdictions",className:"font-semibold text-[#52796F] hover:text-[#354F52] no-underline hover:underline hover:decoration-2 transition-all duration-200",children:"925 jurisdictions"})," • ",o.jsx(Se,{to:"/search?types=organizations",className:"font-semibold text-[#52796F] hover:text-[#354F52] no-underline hover:underline hover:decoration-2 transition-all duration-200",children:"43,726 nonprofits"})," • ",o.jsx(Se,{to:"/search?types=contacts",className:"font-semibold text-[#52796F] hover:text-[#354F52] no-underline hover:underline hover:decoration-2 transition-all duration-200",children:"10,000+ leaders"})," • ",o.jsx(Se,{to:"/search?types=causes",className:"font-semibold text-[#52796F] hover:text-[#354F52] no-underline hover:underline hover:decoration-2 transition-all duration-200",children:"650+ causes"})," • 100% free"]})]}),o.jsx("div",{className:"relative z-20 max-w-5xl mx-auto mb-8 animate-[slideUp_0.8s_ease-out_0.6s_both]",children:o.jsxs(wt.Group,{selectedIndex:u,onChange:d,children:[o.jsxs(wt.List,{className:"flex space-x-2 rounded-xl bg-white p-2 shadow-lg mb-6 max-w-2xl mx-auto",children:[o.jsx(wt,{as:N.Fragment,children:({selected:U})=>o.jsx("button",{className:`w-full rounded-lg py-3 px-6 text-base font-medium leading-5 focus:outline-none transition-all ${U?"text-white shadow-md":"text-gray-700 hover:bg-gray-100"}`,style:U?{backgroundColor:"#354F52"}:{},children:"🔍 Search Topics"})}),o.jsx(wt,{as:N.Fragment,children:({selected:U})=>o.jsx("button",{className:`w-full rounded-lg py-3 px-6 text-base font-medium leading-5 focus:outline-none transition-all ${U?"text-white shadow-md":"text-gray-700 hover:bg-gray-100"}`,style:U?{backgroundColor:"#354F52"}:{},children:"📍 Find My Community"})})]}),o.jsxs(wt.Panels,{children:[o.jsx(wt.Panel,{children:o.jsx("div",{className:"relative z-10 bg-white rounded-2xl shadow-xl p-8",children:o.jsx("form",{onSubmit:G,children:o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-4 items-end",children:[o.jsxs("div",{className:"lg:col-span-7",children:[o.jsx("label",{className:"block text-left text-sm font-medium text-gray-900 mb-2",children:"Search for topics, people, organizations, or causes"}),o.jsxs("div",{className:"relative",ref:b,children:[o.jsx("input",{type:"text",placeholder:"Try: mayor, dental clinic, food bank, affordable housing...",value:n,onChange:Z,onFocus:()=>{n.length>=2&&v(!0)},className:"w-full px-4 py-3 text-lg border-2 border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-[#354F52] focus:border-transparent bg-white text-gray-900"}),p&&!$&&!D&&o.jsx("div",{className:"absolute z-50 w-full mt-2 border-2 border-gray-300 rounded-lg shadow-2xl",style:{backgroundColor:"#ffffff"},children:o.jsxs("div",{className:"px-4 py-8 flex flex-col items-center justify-center gap-3",children:[o.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"}),o.jsx("p",{className:"text-sm text-gray-600",children:"Searching..."})]})}),p&&D&&o.jsx("div",{className:"absolute z-50 w-full mt-2 border-2 border-red-300 rounded-lg shadow-2xl",style:{backgroundColor:"#FEF2F2"},children:o.jsxs("div",{className:"px-4 py-3 flex items-start gap-3",children:[o.jsx("svg",{className:"h-5 w-5 text-red-500 mt-0.5 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),o.jsxs("div",{className:"flex-1",children:[o.jsx("h3",{className:"text-sm font-semibold text-red-800 mb-1",children:"Unable to Load Results"}),o.jsx("p",{className:"text-sm text-red-600",children:"We're having trouble connecting to our search service. Please try again in a moment."})]})]})}),p&&!D&&$&&$.total_results>0&&o.jsxs("div",{className:"absolute z-50 w-full mt-2 border-2 border-gray-300 rounded-lg shadow-2xl max-h-96 overflow-y-auto",style:{backgroundColor:"#ffffff"},children:[$.results.causes.length>0&&o.jsxs("div",{className:"border-b border-gray-200",children:[o.jsxs("div",{className:"px-4 py-2 bg-gray-50 flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx($t,{className:"h-4 w-4 text-gray-500"}),o.jsx("span",{className:"text-xs font-semibold text-gray-700 uppercase",children:"Causes"})]}),o.jsx("button",{type:"button",onMouseDown:U=>{U.preventDefault(),F("causes")},className:"text-xs text-primary-600 hover:text-primary-700 font-medium",children:"View All"})]}),$.results.causes.slice(0,3).map((U,Y)=>o.jsxs("button",{type:"button",onMouseDown:ne=>{ne.preventDefault(),I(U.title)},className:"w-full text-left px-4 py-2 bg-white hover:bg-gray-50 flex items-start gap-3 transition-colors",children:[o.jsx($t,{className:"h-5 w-5 text-gray-600 mt-0.5 flex-shrink-0"}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"font-medium text-gray-900 truncate",children:U.title}),o.jsx("div",{className:"text-sm text-gray-600 truncate",children:U.subtitle})]})]},Y))]}),$.results.contacts.length>0&&o.jsxs("div",{className:"border-b border-gray-200",children:[o.jsxs("div",{className:"px-4 py-2 bg-gray-50 flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx($i,{className:"h-4 w-4 text-gray-500"}),o.jsx("span",{className:"text-xs font-semibold text-gray-700 uppercase",children:"People"})]}),o.jsx("button",{type:"button",onMouseDown:U=>{U.preventDefault(),F("contacts")},className:"text-xs text-primary-600 hover:text-primary-700 font-medium",children:"View All"})]}),$.results.contacts.slice(0,3).map((U,Y)=>o.jsxs("button",{type:"button",onMouseDown:ne=>{ne.preventDefault(),I(U.title)},className:"w-full text-left px-4 py-2 bg-white hover:bg-gray-50 flex items-start gap-3 transition-colors",children:[o.jsx($i,{className:"h-5 w-5 text-gray-600 mt-0.5 flex-shrink-0"}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"font-medium text-gray-900 truncate",children:U.title}),o.jsx("div",{className:"text-sm text-gray-600 truncate",children:U.subtitle})]})]},Y))]}),$.results.organizations.length>0&&o.jsxs("div",{children:[o.jsxs("div",{className:"px-4 py-2 bg-gray-50 flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ci,{className:"h-4 w-4 text-gray-500"}),o.jsx("span",{className:"text-xs font-semibold text-gray-700 uppercase",children:"Organizations"})]}),o.jsx("button",{type:"button",onMouseDown:U=>{U.preventDefault(),F("organizations")},className:"text-xs text-primary-600 hover:text-primary-700 font-medium",children:"View All"})]}),$.results.organizations.slice(0,3).map((U,Y)=>{var ne,ae;return o.jsxs("button",{type:"button",onMouseDown:ee=>{ee.preventDefault(),I(U.title)},className:"w-full text-left px-4 py-2 bg-white hover:bg-gray-50 flex items-start gap-3 transition-colors last:rounded-b-lg",children:[(ne=U.metadata)!=null&&ne.logo_url?o.jsx("img",{src:U.metadata.logo_url,alt:`${U.title} logo`,className:"h-5 w-5 rounded object-contain mt-0.5 flex-shrink-0",onError:ee=>{var ce;ee.currentTarget.style.display="none",(ce=ee.currentTarget.nextElementSibling)==null||ce.classList.remove("hidden")}}):null,o.jsx(Ci,{className:`h-5 w-5 text-gray-600 mt-0.5 flex-shrink-0 ${(ae=U.metadata)!=null&&ae.logo_url?"hidden":""}`}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"font-medium text-gray-900 truncate",children:U.title}),o.jsx("div",{className:"text-sm text-gray-600 truncate",children:U.subtitle})]})]},Y)})]}),o.jsx("div",{className:"px-4 py-2 bg-gray-50 text-center border-t border-gray-200",children:o.jsxs("button",{type:"submit",className:"text-sm text-primary-600 hover:text-primary-700 font-medium",children:["See all ",$.total_results," results →"]})})]}),p&&!D&&!z&&$&&$.total_results===0&&o.jsx("div",{className:"absolute z-50 w-full mt-2 border-2 border-gray-300 rounded-lg shadow-2xl",style:{backgroundColor:"#ffffff"},children:o.jsxs("div",{className:"px-4 py-6 text-center",children:[o.jsx(nn,{className:"h-12 w-12 text-gray-400 mx-auto mb-3"}),o.jsx("p",{className:"text-sm font-medium text-gray-900 mb-1",children:"No results found"}),o.jsx("p",{className:"text-xs text-gray-600",children:"Try different keywords or check your spelling"})]})})]})]}),o.jsxs("div",{className:"lg:col-span-3",children:[o.jsx("label",{className:"block text-left text-sm font-medium text-gray-900 mb-2",children:"Search In"}),y?o.jsxs("div",{className:"relative",children:[o.jsxs("select",{value:h,onChange:U=>m(U.target.value),className:"w-full px-4 py-3 text-lg border-2 border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-[#354F52] focus:border-transparent bg-white text-gray-900",children:[o.jsxs("option",{value:"city",className:"text-gray-900 bg-white",children:["My City (",y.city,")"]}),o.jsxs("option",{value:"county",className:"text-gray-900 bg-white",children:["My County (",y.county||"County",")"]}),o.jsxs("option",{value:"state",className:"text-gray-900 bg-white",children:["My State (",y.state,")"]}),o.jsxs("option",{value:"community",className:"text-gray-900 bg-white",children:["School Board (",y.city,")"]})]}),o.jsxs("button",{type:"button",onClick:()=>d(1),className:"absolute -bottom-6 left-0 right-0 text-xs text-primary-600 hover:text-primary-700 font-medium underline flex items-center justify-center gap-1",children:[o.jsx(Ai,{className:"h-3 w-3"}),"Change Location"]})]}):o.jsxs("button",{type:"button",onClick:()=>d(1),className:"w-full px-4 py-3 text-lg border-2 border-[#354F52] rounded-lg bg-[#E8EFEA] text-[#354F52] hover:bg-[#d9e5db] transition-colors font-semibold flex items-center justify-center gap-2",children:[o.jsx(Ai,{className:"h-5 w-5"}),"Set Your Location First"]})]}),o.jsxs("div",{className:"lg:col-span-2",children:[o.jsx("label",{className:"block text-left text-sm font-medium text-gray-900 mb-2 invisible",children:"Search"}),o.jsxs("button",{type:"submit",className:"w-full text-white px-6 py-3 rounded-lg transition-all text-lg font-semibold flex items-center justify-center gap-2 hover:shadow-lg",style:{backgroundColor:"#354F52"},children:[o.jsx(nn,{className:"h-6 w-6"}),"Search"]})]})]})})})}),o.jsx(wt.Panel,{children:o.jsxs("div",{className:"bg-white rounded-2xl shadow-xl p-8",children:[o.jsx("h2",{className:"text-2xl font-bold mb-3 text-center",style:{color:"#354F52"},children:"What's Happening in Your Community?"}),o.jsx("p",{className:"text-gray-600 text-center mb-6",children:"Enter your address to find local organizations, city councils, county boards, school districts, and charities near you"}),o.jsx(K_,{onLocationFound:R}),y&&o.jsxs("div",{className:"mt-8 p-6 bg-green-50 border-2 border-green-200 rounded-xl",children:[o.jsxs("div",{className:"flex items-start gap-3 mb-4",children:[o.jsx(ci,{className:"h-6 w-6 text-green-600 flex-shrink-0 mt-0.5"}),o.jsxs("div",{className:"flex-1",children:[o.jsx("h3",{className:"text-lg font-bold text-green-900 mb-1",children:"Location Set Successfully!"}),o.jsxs("p",{className:"text-green-700",children:["You're all set for ",o.jsxs("strong",{children:[y.city,", ",y.state]}),". Now you can search for topics in your community."]})]})]}),o.jsxs("button",{onClick:()=>d(0),className:"w-full bg-green-600 hover:bg-green-700 text-white px-6 py-4 rounded-lg font-semibold text-lg flex items-center justify-center gap-2 transition-all shadow-lg hover:shadow-xl",children:[o.jsx(nn,{className:"h-6 w-6"}),"Search Topics in My Community",o.jsx(Nl,{className:"h-5 w-5"})]})]})]})})]})]})}),o.jsxs("div",{className:"relative z-[1] flex flex-wrap justify-center gap-8 text-sm text-gray-600 animate-[slideUp_0.8s_ease-out_0.8s_both]",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(ci,{className:"h-5 w-5 text-green-500"}),o.jsxs("span",{children:[(T==null?void 0:T.jurisdictions_display)||"90,000+"," Jurisdictions"]})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(ci,{className:"h-5 w-5 text-green-500"}),o.jsxs("span",{children:[(T==null?void 0:T.nonprofits_display)||"43,726"," Nonprofits"]})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(ci,{className:"h-5 w-5 text-green-500"}),o.jsxs("span",{children:[(T==null?void 0:T.meetings_display)||"500K+"," Meetings Analyzed"]})]})]})]})}),o.jsx("section",{id:"jurisdictions",className:"py-20 px-4 bg-gradient-to-br from-gray-50 to-blue-50",children:o.jsx("div",{className:"max-w-4xl mx-auto",children:o.jsxs("div",{className:"bg-white rounded-2xl shadow-xl p-12 text-center",children:[o.jsx(Ai,{className:"h-16 w-16 mx-auto mb-6",style:{color:"#354F52"}}),o.jsx("h2",{className:"text-4xl md:text-5xl font-bold mb-4",style:{color:"#354F52"},children:"Explore Jurisdictions"}),o.jsx("p",{className:"text-xl text-gray-600 mb-8",children:"Search and filter through 32,000+ cities, counties, and school districts across all 50 states. View meeting schedules, discovery status, and available data sources."}),o.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[o.jsxs(Se,{to:"/jurisdictions",className:"inline-flex items-center justify-center px-8 py-4 rounded-lg text-white font-semibold transition-all hover:shadow-lg",style:{backgroundColor:"#354F52"},children:[o.jsx(nn,{className:"h-5 w-5 mr-2"}),"Browse Jurisdictions"]}),o.jsx("a",{href:"#contact",className:"inline-flex items-center justify-center px-8 py-4 rounded-lg bg-white border-2 text-[#354F52] font-semibold transition-all hover:bg-gray-50",style:{borderColor:"#354F52"},children:"Request Coverage"})]})]})})}),o.jsx("section",{id:"features",className:"py-20 px-4 bg-white",children:o.jsxs("div",{className:"max-w-7xl mx-auto",children:[o.jsxs("div",{className:"text-center mb-16",children:[o.jsx("h2",{className:"text-4xl md:text-5xl font-bold mb-4",style:{color:"#354F52"},children:"Everything You Need"}),o.jsx("p",{className:"text-xl text-gray-600",children:"Powerful tools to stay informed and engaged with the most impactful details"})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:W.map((U,Y)=>o.jsxs(Se,{to:U.link,className:"group bg-gradient-to-br from-gray-50 to-white border-2 border-gray-200 rounded-2xl p-8 hover:border-[#354F52] hover:shadow-xl transition-all",children:[o.jsx("div",{className:"w-14 h-14 rounded-xl flex items-center justify-center mb-4 group-hover:scale-110 transition-transform",style:{backgroundColor:`${U.color}15`},children:o.jsx(U.icon,{className:"h-7 w-7",style:{color:U.color}})}),o.jsx("h3",{className:"text-xl font-bold mb-3",style:{color:"#354F52"},children:U.title}),o.jsx("p",{className:"text-gray-600 mb-4",children:U.description}),o.jsxs("span",{className:"inline-flex items-center gap-2 text-sm font-medium",style:{color:U.color},children:["Learn more ",o.jsx(Nl,{className:"h-4 w-4 group-hover:translate-x-1 transition-transform"})]})]},Y))})]})}),o.jsx("section",{id:"how-it-works",className:"py-20 px-4",style:{backgroundColor:"#F1F5F9"},children:o.jsxs("div",{className:"max-w-7xl mx-auto",children:[o.jsxs("div",{className:"text-center mb-16",children:[o.jsx("h2",{className:"text-4xl md:text-5xl font-bold mb-4",style:{color:"#354F52"},children:"How It Works"}),o.jsx("p",{className:"text-xl text-gray-600",children:"Get started in three simple steps"})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-12",children:[{step:"1",title:"Set Your Location",description:"Tell us where you live to see local leaders, meetings, and charities",icon:Ai},{step:"2",title:"Follow What Matters",description:"Follow leaders, organizations, and causes you care about",icon:$t},{step:"3",title:"Stay Informed",description:"Get updates on local decisions and opportunities to take action",icon:Hd}].map((U,Y)=>o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"w-20 h-20 rounded-full flex items-center justify-center mx-auto mb-6 text-3xl font-bold text-white",style:{backgroundColor:"#354F52"},children:U.step}),o.jsx(U.icon,{className:"h-12 w-12 mx-auto mb-4",style:{color:"#52796F"}}),o.jsx("h3",{className:"text-2xl font-bold mb-3",style:{color:"#354F52"},children:U.title}),o.jsx("p",{className:"text-gray-600 text-lg",children:U.description})]},Y))})]})}),o.jsx("section",{id:"stats",className:"py-20 px-4 bg-white",children:o.jsxs("div",{className:"max-w-7xl mx-auto",children:[o.jsxs("div",{className:"text-center mb-16",children:[o.jsx("h2",{className:"text-4xl md:text-5xl font-bold mb-4",style:{color:"#354F52"},children:(T==null?void 0:T.level)==="state"?`Our Impact in ${T.location}`:"Our Impact"}),o.jsxs("p",{className:"text-xl text-gray-600",children:[(T==null?void 0:T.level)==="state"?`Real numbers for ${T.location} from live data tables`:"Real numbers from real data tables",(T==null?void 0:T.last_updated)&&o.jsxs("span",{className:"text-sm text-gray-500 ml-2",children:["(updated ",new Date(T.last_updated).toLocaleDateString(),")"]})]})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:[{value:(T==null?void 0:T.jurisdictions_display)||"925",label:"Jurisdictions Tracked",description:"Cities, counties, states, and tribal governments",color:"#354F52"},{value:(T==null?void 0:T.nonprofits_display)||"43,726",label:"Nonprofits & Churches",description:T?`${T.states_with_data} states with full IRS BMF data`:"5 states with full IRS BMF data",color:"#52796F"},{value:(T==null?void 0:T.meetings_display)||"6,913",label:"Meeting Pages Analyzed",description:"AI-extracted decisions and budget items",color:"#84A98C"},{value:(T==null?void 0:T.budget_tracked)||"N/A",label:"Budget Dollars",description:"Real-time tracking and delta analysis",color:"#4A90E2"},{value:(T==null?void 0:T.contacts_display)||"362",label:"Elected Officials",description:"Voting records and decision patterns",color:"#9B59B6"},{value:(T==null?void 0:T.churches)||"4,372",label:"Churches & Congregations",description:"Community-based organizations mapped",color:"#6B8E23"},{value:(T==null?void 0:T.policy_decisions)||"N/A",label:"Policy Decisions",description:"With deferral tracking and stakeholder positions",color:"#DC143C"},{value:(T==null?void 0:T.school_districts_display)||"306",label:"School Districts",description:"NCES-validated educational boundaries",color:"#8B4513"},{value:T!=null&&T.states_with_data?`${T.states_with_data} State${T.states_with_data!==1?"s":""}`:"5 States",label:"State Coverage",description:"Including territories and tribal nations",color:"#2E8B57"},{value:(T==null?void 0:T.grant_opportunities)||"1,000s",label:"Grant Opportunities",description:"Federal, state, and foundation funding",color:"#FF6B6B"},{value:(T==null?void 0:T.fact_checks)||"N/A",label:"Fact-Checked Claims",description:"PolitiFact, FactCheck.org integration",color:"#4ECDC4"},{value:"100%",label:"Free & Open Source",description:"MIT License, HuggingFace datasets",color:"#95E1D3"}].map((Y,ne)=>o.jsxs("div",{className:"text-center p-8 rounded-2xl bg-gradient-to-br from-gray-50 to-white shadow-md hover:shadow-xl transition-shadow group",children:[o.jsx("div",{className:"text-5xl font-bold mb-2 group-hover:scale-110 transition-transform",style:{color:Y.color},children:Y.value}),o.jsx("div",{className:"text-gray-800 font-semibold mb-1",children:Y.label}),o.jsx("div",{className:"text-sm text-gray-600",children:Y.description})]},ne))})]})}),o.jsx("section",{id:"get-started",className:"py-20 px-4",style:{background:"linear-gradient(135deg, #354F52 0%, #52796F 100%)"},children:o.jsxs("div",{className:"max-w-7xl mx-auto",children:[o.jsxs("div",{className:"text-center mb-12",children:[o.jsx(Zf,{className:"h-16 w-16 mx-auto mb-6 text-white"}),o.jsx("h2",{className:"text-4xl md:text-5xl font-bold mb-6 text-white",children:"Documentation & Resources"}),o.jsx("p",{className:"text-xl text-white/90",children:"Choose your path based on your role and technical expertise"})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5 gap-6",children:[o.jsxs("a",{href:`${j}/intro`,target:"_blank",rel:"noopener noreferrer",className:"bg-white rounded-2xl p-8 shadow-xl hover:shadow-2xl transform hover:-translate-y-1 transition-all group",children:[o.jsx(jo,{className:"h-12 w-12 mb-4 group-hover:scale-110 transition-transform",style:{color:"#354F52"}}),o.jsx("h3",{className:"text-2xl font-bold mb-3",style:{color:"#354F52"},children:"Getting Started"}),o.jsx("p",{className:"text-gray-600 mb-4",children:"New here? Start with our quick introduction and dashboard overview."}),o.jsx("div",{className:"text-sm font-semibold",style:{color:"#354F52"},children:"For Everyone →"})]}),o.jsxs("a",{href:`${j}/for-families`,target:"_blank",rel:"noopener noreferrer",className:"bg-white rounded-2xl p-8 shadow-xl hover:shadow-2xl transform hover:-translate-y-1 transition-all group",children:[o.jsx($t,{className:"h-12 w-12 mb-4 group-hover:scale-110 transition-transform",style:{color:"#354F52"}}),o.jsx("h3",{className:"text-2xl font-bold mb-3",style:{color:"#354F52"},children:"Families & Individuals"}),o.jsx("p",{className:"text-gray-600 mb-4",children:"Community events, voter registration, services, and how to engage locally."}),o.jsx("div",{className:"text-sm font-semibold",style:{color:"#354F52"},children:"Community Resources →"})]}),o.jsxs("a",{href:`${j}/for-advocates`,target:"_blank",rel:"noopener noreferrer",className:"bg-white rounded-2xl p-8 shadow-xl hover:shadow-2xl transform hover:-translate-y-1 transition-all group",children:[o.jsx(Eo,{className:"h-12 w-12 mb-4 group-hover:scale-110 transition-transform",style:{color:"#354F52"}}),o.jsx("h3",{className:"text-2xl font-bold mb-3",style:{color:"#354F52"},children:"Policy Makers"}),o.jsx("p",{className:"text-gray-600 mb-4",children:"Case studies, data insights, and how to use the platform for advocacy."}),o.jsx("div",{className:"text-sm font-semibold",style:{color:"#354F52"},children:"Non-Technical →"})]}),o.jsxs("a",{href:`${j}/for-developers`,target:"_blank",rel:"noopener noreferrer",className:"bg-white rounded-2xl p-8 shadow-xl hover:shadow-2xl transform hover:-translate-y-1 transition-all group",children:[o.jsx($r,{className:"h-12 w-12 mb-4 group-hover:scale-110 transition-transform",style:{color:"#354F52"}}),o.jsx("h3",{className:"text-2xl font-bold mb-3",style:{color:"#354F52"},children:"Developers"}),o.jsx("p",{className:"text-gray-600 mb-4",children:"Setup guides, API docs, deployment instructions, and integrations."}),o.jsx("div",{className:"text-sm font-semibold",style:{color:"#354F52"},children:"Technical →"})]}),o.jsxs("a",{href:`${j}/intro`,target:"_blank",rel:"noopener noreferrer",className:"bg-white rounded-2xl p-8 shadow-xl hover:shadow-2xl transform hover:-translate-y-1 transition-all group",children:[o.jsx($B,{className:"h-12 w-12 mb-4 group-hover:scale-110 transition-transform",style:{color:"#354F52"}}),o.jsx("h3",{className:"text-2xl font-bold mb-3",style:{color:"#354F52"},children:"Full Docs"}),o.jsx("p",{className:"text-gray-600 mb-4",children:"Complete documentation including data sources, guides, and more."}),o.jsx("div",{className:"text-sm font-semibold",style:{color:"#354F52"},children:"Browse All →"})]})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mt-12 max-w-4xl mx-auto",children:[o.jsx(Se,{to:"/people",className:"px-8 py-4 bg-white rounded-xl font-semibold hover:shadow-xl transition-all text-center",style:{color:"#354F52"},children:"Browse Leaders →"}),o.jsx(Se,{to:"/nonprofits",className:"px-8 py-4 bg-white/10 border-2 border-white rounded-xl text-white font-semibold hover:bg-white/20 transition-all text-center",children:"Explore Charities →"})]})]})}),o.jsx("section",{id:"contact",className:"py-20 px-4 bg-gradient-to-br from-gray-50 to-blue-50",children:o.jsx("div",{className:"max-w-4xl mx-auto",children:o.jsxs("div",{className:"bg-white rounded-2xl shadow-xl p-12 text-center",children:[o.jsx(NS,{className:"h-16 w-16 mx-auto mb-6",style:{color:"#354F52"}}),o.jsx("h2",{className:"text-4xl md:text-5xl font-bold mb-4",style:{color:"#354F52"},children:"Get in Touch"}),o.jsx("p",{className:"text-xl text-gray-600 mb-8",children:"Questions, feedback, or ideas? We'd love to hear from you. Report bugs, request features, or ask questions about jurisdiction coverage."}),o.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[o.jsxs("a",{href:"https://github.com/getcommunityone/open-navigator-for-engagement/issues/new",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center justify-center px-8 py-4 rounded-lg text-white font-semibold transition-all hover:shadow-lg",style:{backgroundColor:"#354F52"},children:[o.jsx(NS,{className:"h-5 w-5 mr-2"}),"Contact Us on GitHub"]}),o.jsx("a",{href:"mailto:johnbowyer@communityone.com",className:"inline-flex items-center justify-center px-8 py-4 rounded-lg bg-white border-2 text-[#354F52] font-semibold transition-all hover:bg-gray-50",style:{borderColor:"#354F52"},children:"Email Us Directly"})]}),o.jsx("p",{className:"text-sm text-gray-500 mt-6",children:"Your feedback helps us improve the platform for everyone."})]})})}),o.jsx("footer",{className:"py-12 px-4 bg-gray-900 text-white",children:o.jsxs("div",{className:"max-w-7xl mx-auto text-center",children:[o.jsxs("div",{className:"flex items-center justify-center gap-3 mb-6",children:[o.jsx("img",{src:"/communityone_logo.svg",alt:"CommunityOne Logo",className:"h-10 opacity-90"}),o.jsx("span",{className:"text-xl font-bold",children:"Open Navigator"})]}),o.jsx("p",{className:"text-gray-400 mb-6",children:"Making community impact accessible to everyone"}),o.jsxs("div",{className:"flex justify-center gap-6 mb-8",children:[o.jsx("a",{href:"https://www.instagram.com/getcommunityone/",target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-white transition-colors","aria-label":"Instagram",children:o.jsx("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{d:"M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z"})})}),o.jsx("a",{href:"https://www.facebook.com/getcommunityone",target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-white transition-colors","aria-label":"Facebook",children:o.jsx("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"})})}),o.jsx("a",{href:"https://x.com/getcommunityone/",target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-white transition-colors","aria-label":"X (Twitter)",children:o.jsx("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})}),o.jsx("a",{href:"https://www.linkedin.com/company/getcommunityone",target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-white transition-colors","aria-label":"LinkedIn",children:o.jsx("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})})}),o.jsx("a",{href:"https://www.youtube.com/@getcommunityone",target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-white transition-colors","aria-label":"YouTube",children:o.jsx("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{d:"M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"})})}),o.jsx("a",{href:"https://discord.gg/uH6Dytek",target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-white transition-colors","aria-label":"Discord",children:o.jsx("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"})})}),o.jsx("a",{href:"https://github.com/getcommunityone/open-navigator-for-engagement",target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-white transition-colors","aria-label":"GitHub",children:o.jsx("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})})})]}),o.jsxs("div",{className:"flex justify-center gap-8 text-sm text-gray-400",children:[o.jsx("a",{href:`${j}/intro`,target:"_blank",rel:"noopener noreferrer",className:"hover:text-white transition-colors",children:"Documentation"}),o.jsx("a",{href:`${E}/api/docs`,target:"_blank",rel:"noopener noreferrer",className:"hover:text-white transition-colors",children:"API"}),o.jsx(Se,{to:"/explore",className:"hover:text-white transition-colors",children:"Explore"})]}),o.jsx("p",{className:"text-gray-500 text-sm mt-6",children:"© 2026 CommunityOne. All rights reserved."})]})})]})}function TA(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t-1}var RW=IW,FW=c0;function DW(e,t){var n=this.__data__,r=FW(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var BW=DW,zW=jW,UW=AW,WW=LW,HW=RW,VW=BW;function Xc(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},os=function(t){return ks(t)&&t.indexOf("%")===t.length-1},ue=function(t){return dV(t)&&!Kf(t)},pV=function(t){return De(t)},Gt=function(t){return ue(t)||ks(t)},gV=0,Yf=function(t){var n=++gV;return"".concat(t||"").concat(n)},Ln=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ue(t)&&!ks(t))return r;var a;if(os(t)){var s=t.indexOf("%");a=n*parseFloat(t.slice(0,s))/100}else a=+t;return Kf(a)&&(a=r),i&&a>n&&(a=n),a},Xa=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},vV=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function NV(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var FS={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},xa=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},DS=null,by=null,s2=function e(t){if(t===DS&&Array.isArray(by))return by;var n=[];return N.Children.forEach(t,function(r){De(r)||(oV.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),by=n,DS=t,n};function Dr(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return xa(i)}):r=[xa(t)],s2(e).forEach(function(i){var a=gr(i,"type.displayName")||gr(i,"type.name");r.indexOf(a)!==-1&&n.push(i)}),n}function or(e,t){var n=Dr(e,t);return n&&n[0]}var BS=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!ue(r)||r<=0||!ue(i)||i<=0)},SV=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],PV=function(t){return t&&t.type&&ks(t.type)&&SV.indexOf(t.type)>=0},EV=function(t,n,r,i){var a,s=(a=xy==null?void 0:xy[i])!==null&&a!==void 0?a:[];return n.startsWith("data-")||!Ce(t)&&(i&&s.includes(n)||bV.includes(n))||r&&o2.includes(n)},ke=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(N.isValidElement(t)&&(i=t.props),!Kc(i))return null;var a={};return Object.keys(i).forEach(function(s){var c;EV((c=i)===null||c===void 0?void 0:c[s],s,n,r)&&(a[s]=i[s])}),a},kb=function e(t,n){if(t===n)return!0;var r=N.Children.count(t);if(r!==N.Children.count(n))return!1;if(r===0)return!0;if(r===1)return zS(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function TV(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ab(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,a=e.className,s=e.style,c=e.title,u=e.desc,d=AV(e,CV),h=i||{width:n,height:r,x:0,y:0},m=Ie("recharts-surface",a);return H.createElement("svg",Cb({},ke(d,!0,"svg"),{className:m,width:n,height:r,style:s,viewBox:"".concat(h.x," ").concat(h.y," ").concat(h.width," ").concat(h.height)}),H.createElement("title",null,c),H.createElement("desc",null,u),t)}var MV=["children","className"];function Tb(){return Tb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $V(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Xe=H.forwardRef(function(e,t){var n=e.children,r=e.className,i=LV(e,MV),a=Ie("recharts-layer",r);return H.createElement("g",Tb({className:a},ke(i,!0),{ref:t}),n)}),hi=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;ai?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r=r?e:FV(e,t,n)}var BV=DV,zV="\\ud800-\\udfff",UV="\\u0300-\\u036f",WV="\\ufe20-\\ufe2f",HV="\\u20d0-\\u20ff",VV=UV+WV+HV,qV="\\ufe0e\\ufe0f",ZV="\\u200d",GV=RegExp("["+ZV+zV+VV+qV+"]");function KV(e){return GV.test(e)}var VA=KV;function YV(e){return e.split("")}var XV=YV,qA="\\ud800-\\udfff",QV="\\u0300-\\u036f",JV="\\ufe20-\\ufe2f",eq="\\u20d0-\\u20ff",tq=QV+JV+eq,nq="\\ufe0e\\ufe0f",rq="["+qA+"]",Mb="["+tq+"]",Lb="\\ud83c[\\udffb-\\udfff]",iq="(?:"+Mb+"|"+Lb+")",ZA="[^"+qA+"]",GA="(?:\\ud83c[\\udde6-\\uddff]){2}",KA="[\\ud800-\\udbff][\\udc00-\\udfff]",aq="\\u200d",YA=iq+"?",XA="["+nq+"]?",oq="(?:"+aq+"(?:"+[ZA,GA,KA].join("|")+")"+XA+YA+")*",sq=XA+YA+oq,lq="(?:"+[ZA+Mb+"?",Mb,GA,KA,rq].join("|")+")",cq=RegExp(Lb+"(?="+Lb+")|"+lq+sq,"g");function uq(e){return e.match(cq)||[]}var dq=uq,fq=XV,hq=VA,mq=dq;function pq(e){return hq(e)?mq(e):fq(e)}var gq=pq,vq=BV,yq=VA,xq=gq,bq=DA;function wq(e){return function(t){t=bq(t);var n=yq(t)?xq(t):void 0,r=n?n[0]:t.charAt(0),i=n?vq(n,1).join(""):t.slice(1);return r[e]()+i}}var _q=wq,jq=_q,Nq=jq("toUpperCase"),Sq=Nq;const j0=Je(Sq);function st(e){return function(){return e}}const QA=Math.cos,hp=Math.sin,gi=Math.sqrt,mp=Math.PI,N0=2*mp,$b=Math.PI,Ib=2*$b,Yo=1e-6,Pq=Ib-Yo;function JA(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return JA;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;iYo)if(!(Math.abs(m*u-d*h)>Yo)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let v=r-s,_=i-c,x=u*u+d*d,y=v*v+_*_,w=Math.sqrt(x),b=Math.sqrt(p),j=a*Math.tan(($b-Math.acos((x+p-y)/(2*w*b)))/2),E=j/b,P=j/w;Math.abs(E-1)>Yo&&this._append`L${t+E*h},${n+E*m}`,this._append`A${a},${a},0,0,${+(m*v>h*_)},${this._x1=t+P*u},${this._y1=n+P*d}`}}arc(t,n,r,i,a,s){if(t=+t,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let c=r*Math.cos(i),u=r*Math.sin(i),d=t+c,h=n+u,m=1^s,p=s?i-a:a-i;this._x1===null?this._append`M${d},${h}`:(Math.abs(this._x1-d)>Yo||Math.abs(this._y1-h)>Yo)&&this._append`L${d},${h}`,r&&(p<0&&(p=p%Ib+Ib),p>Pq?this._append`A${r},${r},0,1,${m},${t-c},${n-u}A${r},${r},0,1,${m},${this._x1=d},${this._y1=h}`:p>Yo&&this._append`A${r},${r},0,${+(p>=$b)},${m},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function l2(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Oq(t)}function c2(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function eT(e){this._context=e}eT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function S0(e){return new eT(e)}function tT(e){return e[0]}function nT(e){return e[1]}function rT(e,t){var n=st(!0),r=null,i=S0,a=null,s=l2(c);e=typeof e=="function"?e:e===void 0?tT:st(e),t=typeof t=="function"?t:t===void 0?nT:st(t);function c(u){var d,h=(u=c2(u)).length,m,p=!1,v;for(r==null&&(a=i(v=s())),d=0;d<=h;++d)!(d=v;--_)c.point(j[_],E[_]);c.lineEnd(),c.areaEnd()}w&&(j[p]=+e(y,p,m),E[p]=+t(y,p,m),c.point(r?+r(y,p,m):j[p],n?+n(y,p,m):E[p]))}if(b)return c=null,b+""||null}function h(){return rT().defined(i).curve(s).context(a)}return d.x=function(m){return arguments.length?(e=typeof m=="function"?m:st(+m),r=null,d):e},d.x0=function(m){return arguments.length?(e=typeof m=="function"?m:st(+m),d):e},d.x1=function(m){return arguments.length?(r=m==null?null:typeof m=="function"?m:st(+m),d):r},d.y=function(m){return arguments.length?(t=typeof m=="function"?m:st(+m),n=null,d):t},d.y0=function(m){return arguments.length?(t=typeof m=="function"?m:st(+m),d):t},d.y1=function(m){return arguments.length?(n=m==null?null:typeof m=="function"?m:st(+m),d):n},d.lineX0=d.lineY0=function(){return h().x(e).y(t)},d.lineY1=function(){return h().x(e).y(n)},d.lineX1=function(){return h().x(r).y(t)},d.defined=function(m){return arguments.length?(i=typeof m=="function"?m:st(!!m),d):i},d.curve=function(m){return arguments.length?(s=m,a!=null&&(c=s(a)),d):s},d.context=function(m){return arguments.length?(m==null?a=c=null:c=s(a=m),d):a},d}class iT{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function kq(e){return new iT(e,!0)}function Cq(e){return new iT(e,!1)}const u2={draw(e,t){const n=gi(t/mp);e.moveTo(n,0),e.arc(0,0,n,0,N0)}},Aq={draw(e,t){const n=gi(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},aT=gi(1/3),Tq=aT*2,Mq={draw(e,t){const n=gi(t/Tq),r=n*aT;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Lq={draw(e,t){const n=gi(t),r=-n/2;e.rect(r,r,n,n)}},$q=.8908130915292852,oT=hp(mp/10)/hp(7*mp/10),Iq=hp(N0/10)*oT,Rq=-QA(N0/10)*oT,Fq={draw(e,t){const n=gi(t*$q),r=Iq*n,i=Rq*n;e.moveTo(0,-n),e.lineTo(r,i);for(let a=1;a<5;++a){const s=N0*a/5,c=QA(s),u=hp(s);e.lineTo(u*n,-c*n),e.lineTo(c*r-u*i,u*r+c*i)}e.closePath()}},wy=gi(3),Dq={draw(e,t){const n=-gi(t/(wy*3));e.moveTo(0,n*2),e.lineTo(-wy*n,-n),e.lineTo(wy*n,-n),e.closePath()}},Nr=-.5,Sr=gi(3)/2,Rb=1/gi(12),Bq=(Rb/2+1)*3,zq={draw(e,t){const n=gi(t/Bq),r=n/2,i=n*Rb,a=r,s=n*Rb+n,c=-a,u=s;e.moveTo(r,i),e.lineTo(a,s),e.lineTo(c,u),e.lineTo(Nr*r-Sr*i,Sr*r+Nr*i),e.lineTo(Nr*a-Sr*s,Sr*a+Nr*s),e.lineTo(Nr*c-Sr*u,Sr*c+Nr*u),e.lineTo(Nr*r+Sr*i,Nr*i-Sr*r),e.lineTo(Nr*a+Sr*s,Nr*s-Sr*a),e.lineTo(Nr*c+Sr*u,Nr*u-Sr*c),e.closePath()}};function Uq(e,t){let n=null,r=l2(i);e=typeof e=="function"?e:st(e||u2),t=typeof t=="function"?t:st(t===void 0?64:+t);function i(){let a;if(n||(n=a=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),a)return n=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:st(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:st(+a),i):t},i.context=function(a){return arguments.length?(n=a??null,i):n},i}function pp(){}function gp(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function sT(e){this._context=e}sT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:gp(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:gp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Wq(e){return new sT(e)}function lT(e){this._context=e}lT.prototype={areaStart:pp,areaEnd:pp,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:gp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Hq(e){return new lT(e)}function cT(e){this._context=e}cT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:gp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Vq(e){return new cT(e)}function uT(e){this._context=e}uT.prototype={areaStart:pp,areaEnd:pp,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function qq(e){return new uT(e)}function WS(e){return e<0?-1:1}function HS(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),s=(n-e._y1)/(i||r<0&&-0),c=(a*i+s*r)/(r+i);return(WS(a)+WS(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(c))||0}function VS(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function _y(e,t,n){var r=e._x0,i=e._y0,a=e._x1,s=e._y1,c=(a-r)/3;e._context.bezierCurveTo(r+c,i+c*t,a-c,s-c*n,a,s)}function vp(e){this._context=e}vp.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:_y(this,this._t0,VS(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,_y(this,VS(this,n=HS(this,e,t)),n);break;default:_y(this,this._t0,n=HS(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function dT(e){this._context=new fT(e)}(dT.prototype=Object.create(vp.prototype)).point=function(e,t){vp.prototype.point.call(this,t,e)};function fT(e){this._context=e}fT.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function Zq(e){return new vp(e)}function Gq(e){return new dT(e)}function hT(e){this._context=e}hT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=qS(e),i=qS(t),a=0,s=1;s=0;--t)i[t]=(s[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Yq(e){return new P0(e,.5)}function Xq(e){return new P0(e,0)}function Qq(e){return new P0(e,1)}function hc(e,t){if((s=e.length)>1)for(var n=1,r,i,a=e[t[0]],s,c=a.length;n=0;)n[t]=t;return n}function Jq(e,t){return e[t]}function eZ(e){const t=[];return t.key=e,t}function tZ(){var e=st([]),t=Fb,n=hc,r=Jq;function i(a){var s=Array.from(e.apply(this,arguments),eZ),c,u=s.length,d=-1,h;for(const m of a)for(c=0,++d;c0){for(var n,r,i=0,a=e[0].length,s;i0){for(var n=0,r=e[t[0]],i,a=r.length;n0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,s;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function uZ(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var mT={symbolCircle:u2,symbolCross:Aq,symbolDiamond:Mq,symbolSquare:Lq,symbolStar:Fq,symbolTriangle:Dq,symbolWye:zq},dZ=Math.PI/180,fZ=function(t){var n="symbol".concat(j0(t));return mT[n]||u2},hZ=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*dZ;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},mZ=function(t,n){mT["symbol".concat(j0(t))]=n},d2=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,a=i===void 0?64:i,s=t.sizeType,c=s===void 0?"area":s,u=cZ(t,aZ),d=GS(GS({},u),{},{type:r,size:a,sizeType:c}),h=function(){var y=fZ(r),w=Uq().type(y).size(hZ(a,c,r));return w()},m=d.className,p=d.cx,v=d.cy,_=ke(d,!0);return p===+p&&v===+v&&a===+a?H.createElement("path",Db({},_,{className:Ie("recharts-symbols",m),transform:"translate(".concat(p,", ").concat(v,")"),d:h()})):null};d2.registerSymbol=mZ;function mc(e){"@babel/helpers - typeof";return mc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mc(e)}function Bb(){return Bb=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var b=v.inactive?d:v.color;return H.createElement("li",Bb({className:y,style:m,key:"legend-item-".concat(_)},Cs(r.props,v,_)),H.createElement(Ab,{width:s,height:s,viewBox:h,style:p},r.renderIcon(v)),H.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},x?x(w,v,_):w))})}},{key:"render",value:function(){var r=this.props,i=r.payload,a=r.layout,s=r.align;if(!i||!i.length)return null;var c={padding:0,margin:0,textAlign:a==="horizontal"?s:"left"};return H.createElement("ul",{className:"recharts-default-legend",style:c},this.renderItems())}}])}(N.PureComponent);Zd(f2,"displayName","Legend");Zd(f2,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var NZ=u0;function SZ(){this.__data__=new NZ,this.size=0}var PZ=SZ;function EZ(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var OZ=EZ;function kZ(e){return this.__data__.get(e)}var CZ=kZ;function AZ(e){return this.__data__.has(e)}var TZ=AZ,MZ=u0,LZ=J_,$Z=e2,IZ=200;function RZ(e,t){var n=this.__data__;if(n instanceof MZ){var r=n.__data__;if(!LZ||r.lengthc))return!1;var d=a.get(e),h=a.get(t);if(d&&h)return d==t&&h==e;var m=-1,p=!0,v=n&aG?new tG:void 0;for(a.set(e,t),a.set(t,e);++m-1&&e%1==0&&e-1&&e%1==0&&e<=cK}var g2=uK,dK=$a,fK=g2,hK=Ia,mK="[object Arguments]",pK="[object Array]",gK="[object Boolean]",vK="[object Date]",yK="[object Error]",xK="[object Function]",bK="[object Map]",wK="[object Number]",_K="[object Object]",jK="[object RegExp]",NK="[object Set]",SK="[object String]",PK="[object WeakMap]",EK="[object ArrayBuffer]",OK="[object DataView]",kK="[object Float32Array]",CK="[object Float64Array]",AK="[object Int8Array]",TK="[object Int16Array]",MK="[object Int32Array]",LK="[object Uint8Array]",$K="[object Uint8ClampedArray]",IK="[object Uint16Array]",RK="[object Uint32Array]",ht={};ht[kK]=ht[CK]=ht[AK]=ht[TK]=ht[MK]=ht[LK]=ht[$K]=ht[IK]=ht[RK]=!0;ht[mK]=ht[pK]=ht[EK]=ht[gK]=ht[OK]=ht[vK]=ht[yK]=ht[xK]=ht[bK]=ht[wK]=ht[_K]=ht[jK]=ht[NK]=ht[SK]=ht[PK]=!1;function FK(e){return hK(e)&&fK(e.length)&&!!ht[dK(e)]}var DK=FK;function BK(e){return function(t){return e(t)}}var ST=BK,wp={exports:{}};wp.exports;(function(e,t){var n=MA,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,s=a&&n.process,c=function(){try{var u=i&&i.require&&i.require("util").types;return u||s&&s.binding&&s.binding("util")}catch{}}();e.exports=c})(wp,wp.exports);var zK=wp.exports,UK=DK,WK=ST,tP=zK,nP=tP&&tP.isTypedArray,HK=nP?WK(nP):UK,PT=HK,VK=GG,qK=m2,ZK=tr,GK=NT,KK=p2,YK=PT,XK=Object.prototype,QK=XK.hasOwnProperty;function JK(e,t){var n=ZK(e),r=!n&&qK(e),i=!n&&!r&&GK(e),a=!n&&!r&&!i&&YK(e),s=n||r||i||a,c=s?VK(e.length,String):[],u=c.length;for(var d in e)(t||QK.call(e,d))&&!(s&&(d=="length"||i&&(d=="offset"||d=="parent")||a&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||KK(d,u)))&&c.push(d);return c}var eY=JK,tY=Object.prototype;function nY(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||tY;return e===n}var rY=nY;function iY(e,t){return function(n){return e(t(n))}}var ET=iY,aY=ET,oY=aY(Object.keys,Object),sY=oY,lY=rY,cY=sY,uY=Object.prototype,dY=uY.hasOwnProperty;function fY(e){if(!lY(e))return cY(e);var t=[];for(var n in Object(e))dY.call(e,n)&&n!="constructor"&&t.push(n);return t}var hY=fY,mY=X_,pY=g2;function gY(e){return e!=null&&pY(e.length)&&!mY(e)}var Xf=gY,vY=eY,yY=hY,xY=Xf;function bY(e){return xY(e)?vY(e):yY(e)}var E0=bY,wY=IG,_Y=qG,jY=E0;function NY(e){return wY(e,jY,_Y)}var SY=NY,rP=SY,PY=1,EY=Object.prototype,OY=EY.hasOwnProperty;function kY(e,t,n,r,i,a){var s=n&PY,c=rP(e),u=c.length,d=rP(t),h=d.length;if(u!=h&&!s)return!1;for(var m=u;m--;){var p=c[m];if(!(s?p in t:OY.call(t,p)))return!1}var v=a.get(e),_=a.get(t);if(v&&_)return v==t&&_==e;var x=!0;a.set(e,t),a.set(t,e);for(var y=s;++m-1}var EQ=PQ;function OQ(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=WQ){var d=t?null:zQ(e);if(d)return UQ(d);s=!1,i=BQ,u=new RQ}else u=t?[]:c;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function aJ(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function oJ(e){return e.value}function sJ(e,t){if(H.isValidElement(e))return H.cloneElement(e,t);if(typeof e=="function")return H.createElement(e,t);t.ref;var n=iJ(t,YQ);return H.createElement(f2,n)}var xP=1,Dl=function(e){function t(){var n;XQ(this,t);for(var r=arguments.length,i=new Array(r),a=0;axP||Math.abs(i.height-this.lastBoundingBox.height)>xP)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Ji({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,a=i.layout,s=i.align,c=i.verticalAlign,u=i.margin,d=i.chartWidth,h=i.chartHeight,m,p;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(s==="center"&&a==="vertical"){var v=this.getBBoxSnapshot();m={left:((d||0)-v.width)/2}}else m=s==="right"?{right:u&&u.right||0}:{left:u&&u.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(c==="middle"){var _=this.getBBoxSnapshot();p={top:((h||0)-_.height)/2}}else p=c==="bottom"?{bottom:u&&u.bottom||0}:{top:u&&u.top||0};return Ji(Ji({},m),p)}},{key:"render",value:function(){var r=this,i=this.props,a=i.content,s=i.width,c=i.height,u=i.wrapperStyle,d=i.payloadUniqBy,h=i.payload,m=Ji(Ji({position:"absolute",width:s||"auto",height:c||"auto"},this.getDefaultPosition(u)),u);return H.createElement("div",{className:"recharts-legend-wrapper",style:m,ref:function(v){r.wrapperNode=v}},sJ(a,Ji(Ji({},this.props),{},{payload:LT(h,d,oJ)})))}}],[{key:"getWithHeight",value:function(r,i){var a=Ji(Ji({},this.defaultProps),r.props),s=a.layout;return s==="vertical"&&ue(r.props.height)?{height:r.props.height}:s==="horizontal"?{width:r.props.width||i}:null}}])}(N.PureComponent);O0(Dl,"displayName","Legend");O0(Dl,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var bP=Gf,lJ=m2,cJ=tr,wP=bP?bP.isConcatSpreadable:void 0;function uJ(e){return cJ(e)||lJ(e)||!!(wP&&e&&e[wP])}var dJ=uJ,fJ=_T,hJ=dJ;function RT(e,t,n,r,i){var a=-1,s=e.length;for(n||(n=hJ),i||(i=[]);++a0&&n(c)?t>1?RT(c,t-1,n,r,i):fJ(i,c):r||(i[i.length]=c)}return i}var FT=RT;function mJ(e){return function(t,n,r){for(var i=-1,a=Object(t),s=r(t),c=s.length;c--;){var u=s[e?c:++i];if(n(a[u],u,a)===!1)break}return t}}var pJ=mJ,gJ=pJ,vJ=gJ(),yJ=vJ,xJ=yJ,bJ=E0;function wJ(e,t){return e&&xJ(e,t,bJ)}var DT=wJ,_J=Xf;function jJ(e,t){return function(n,r){if(n==null)return n;if(!_J(n))return e(n,r);for(var i=n.length,a=t?i:-1,s=Object(n);(t?a--:++at||a&&s&&u&&!c&&!d||r&&s&&u||!n&&u||!i)return 1;if(!r&&!a&&!d&&e=c)return u;var d=n[r];return u*(d=="desc"?-1:1)}}return e.index-t.index}var RJ=IJ,Py=n2,FJ=r2,DJ=Hi,BJ=BT,zJ=TJ,UJ=ST,WJ=RJ,HJ=tu,VJ=tr;function qJ(e,t,n){t.length?t=Py(t,function(a){return VJ(a)?function(s){return FJ(s,a.length===1?a[0]:a)}:a}):t=[HJ];var r=-1;t=Py(t,UJ(DJ));var i=BJ(e,function(a,s,c){var u=Py(t,function(d){return d(a)});return{criteria:u,index:++r,value:a}});return zJ(i,function(a,s){return WJ(a,s,n)})}var ZJ=qJ;function GJ(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var KJ=GJ,YJ=KJ,jP=Math.max;function XJ(e,t,n){return t=jP(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=jP(r.length-t,0),s=Array(a);++i0){if(++t>=see)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var dee=uee,fee=oee,hee=dee,mee=hee(fee),pee=mee,gee=tu,vee=QJ,yee=pee;function xee(e,t){return yee(vee(e,t,gee),e+"")}var bee=xee,wee=Q_,_ee=Xf,jee=p2,Nee=To;function See(e,t,n){if(!Nee(n))return!1;var r=typeof t;return(r=="number"?_ee(n)&&jee(t,n.length):r=="string"&&t in n)?wee(n[t],e):!1}var k0=See,Pee=FT,Eee=ZJ,Oee=bee,SP=k0,kee=Oee(function(e,t){if(e==null)return[];var n=t.length;return n>1&&SP(e,t[0],t[1])?t=[]:n>2&&SP(t[0],t[1],t[2])&&(t=[t[0]]),Eee(e,Pee(t,1),[])}),Cee=kee;const x2=Je(Cee);function Gd(e){"@babel/helpers - typeof";return Gd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gd(e)}function Gb(){return Gb=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(Cu,"-left"),ue(n)&&t&&ue(t.x)&&n=t.y),"".concat(Cu,"-top"),ue(r)&&t&&ue(t.y)&&rx?Math.max(h,u[r]):Math.max(m,u[r])}function Vee(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function qee(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,a=e.reverseDirection,s=e.tooltipBox,c=e.useTranslate3d,u=e.viewBox,d,h,m;return s.height>0&&s.width>0&&n?(h=OP({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:s.width,viewBox:u,viewBoxDimension:u.width}),m=OP({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:s.height,viewBox:u,viewBoxDimension:u.height}),d=Vee({translateX:h,translateY:m,useTranslate3d:c})):d=Wee,{cssProperties:d,cssClasses:Hee({translateX:h,translateY:m,coordinate:n})}}function gc(e){"@babel/helpers - typeof";return gc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gc(e)}function kP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function CP(e){for(var t=1;tAP||Math.abs(r.height-this.state.lastBoundingBox.height)>AP)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,a=i.active,s=i.allowEscapeViewBox,c=i.animationDuration,u=i.animationEasing,d=i.children,h=i.coordinate,m=i.hasPayload,p=i.isAnimationActive,v=i.offset,_=i.position,x=i.reverseDirection,y=i.useTranslate3d,w=i.viewBox,b=i.wrapperStyle,j=qee({allowEscapeViewBox:s,coordinate:h,offsetTopLeft:v,position:_,reverseDirection:x,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:w}),E=j.cssClasses,P=j.cssProperties,O=CP(CP({transition:p&&a?"transform ".concat(c,"ms ").concat(u):void 0},P),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&m?"visible":"hidden",position:"absolute",top:0,left:0},b);return H.createElement("div",{tabIndex:-1,className:E,style:O,ref:function(A){r.wrapperNode=A}},d)}}])}(N.PureComponent),nte=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},nu={isSsr:nte()};function vc(e){"@babel/helpers - typeof";return vc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vc(e)}function TP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function MP(e){for(var t=1;t0;return H.createElement(tte,{allowEscapeViewBox:s,animationDuration:c,animationEasing:u,isAnimationActive:p,active:a,coordinate:h,hasPayload:O,offset:v,position:y,reverseDirection:w,useTranslate3d:b,viewBox:j,wrapperStyle:E},fte(d,MP(MP({},this.props),{},{payload:P})))}}])}(N.PureComponent);b2(ni,"displayName","Tooltip");b2(ni,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!nu.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var hte=Wi,mte=function(){return hte.Date.now()},pte=mte,gte=/\s/;function vte(e){for(var t=e.length;t--&>e.test(e.charAt(t)););return t}var yte=vte,xte=yte,bte=/^\s+/;function wte(e){return e&&e.slice(0,xte(e)+1).replace(bte,"")}var _te=wte,jte=_te,LP=To,Nte=Gc,$P=NaN,Ste=/^[-+]0x[0-9a-f]+$/i,Pte=/^0b[01]+$/i,Ete=/^0o[0-7]+$/i,Ote=parseInt;function kte(e){if(typeof e=="number")return e;if(Nte(e))return $P;if(LP(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=LP(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=jte(e);var n=Pte.test(e);return n||Ete.test(e)?Ote(e.slice(2),n?2:8):Ste.test(e)?$P:+e}var qT=kte,Cte=To,Oy=pte,IP=qT,Ate="Expected a function",Tte=Math.max,Mte=Math.min;function Lte(e,t,n){var r,i,a,s,c,u,d=0,h=!1,m=!1,p=!0;if(typeof e!="function")throw new TypeError(Ate);t=IP(t)||0,Cte(n)&&(h=!!n.leading,m="maxWait"in n,a=m?Tte(IP(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p);function v(O){var C=r,A=i;return r=i=void 0,d=O,s=e.apply(A,C),s}function _(O){return d=O,c=setTimeout(w,t),h?v(O):s}function x(O){var C=O-u,A=O-d,T=t-C;return m?Mte(T,a-A):T}function y(O){var C=O-u,A=O-d;return u===void 0||C>=t||C<0||m&&A>=a}function w(){var O=Oy();if(y(O))return b(O);c=setTimeout(w,x(O))}function b(O){return c=void 0,p&&r?v(O):(r=i=void 0,s)}function j(){c!==void 0&&clearTimeout(c),d=0,r=u=i=c=void 0}function E(){return c===void 0?s:b(Oy())}function P(){var O=Oy(),C=y(O);if(r=arguments,i=this,u=O,C){if(c===void 0)return _(u);if(m)return clearTimeout(c),c=setTimeout(w,t),v(u)}return c===void 0&&(c=setTimeout(w,t)),s}return P.cancel=j,P.flush=E,P}var $te=Lte,Ite=$te,Rte=To,Fte="Expected a function";function Dte(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(Fte);return Rte(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ite(e,t,{leading:r,maxWait:t,trailing:i})}var Bte=Dte;const ZT=Je(Bte);function Yd(e){"@babel/helpers - typeof";return Yd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yd(e)}function RP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xh(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(Z=ZT(Z,x,{trailing:!0,leading:!1}));var I=new ResizeObserver(Z),F=P.current.getBoundingClientRect(),B=F.width,G=F.height;return z(B,G),I.observe(P.current),function(){I.disconnect()}},[z,x]);var D=N.useMemo(function(){var Z=T.containerWidth,I=T.containerHeight;if(Z<0||I<0)return null;hi(os(s)||os(u),`The width(%s) and height(%s) are both fixed numbers, maybe you don't need to use a ResponsiveContainer.`,s,u),hi(!n||n>0,"The aspect(%s) must be greater than zero.",n);var F=os(s)?Z:s,B=os(u)?I:u;n&&n>0&&(F?B=F/n:B&&(F=B*n),p&&B>p&&(B=p)),hi(F>0||B>0,`The width(%s) and height(%s) of chart should be greater than 0, please check the style of container, or the props width(%s) and height(%s), or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the height and width.`,F,B,s,u,h,m,n);var G=!Array.isArray(v)&&xa(v.type).endsWith("Chart");return H.Children.map(v,function(R){return H.isValidElement(R)?N.cloneElement(R,Xh({width:F,height:B},G?{style:Xh({height:"100%",width:"100%",maxHeight:B,maxWidth:F},R.props.style)}:{})):R})},[n,v,u,p,m,h,T,s]);return H.createElement("div",{id:y?"".concat(y):void 0,className:Ie("recharts-responsive-container",w),style:Xh(Xh({},E),{},{width:s,height:u,minWidth:h,minHeight:m,maxHeight:p}),ref:P},D)}),C0=function(t){return null};C0.displayName="Cell";function Xd(e){"@babel/helpers - typeof";return Xd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xd(e)}function BP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Qb(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||nu.isSsr)return{width:0,height:0};var r=ene(n),i=JSON.stringify({text:t,copyStyle:r});if(sl.widthCache[i])return sl.widthCache[i];try{var a=document.getElementById(zP);a||(a=document.createElement("span"),a.setAttribute("id",zP),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var s=Qb(Qb({},Jte),r);Object.assign(a.style,s),a.textContent="".concat(t);var c=a.getBoundingClientRect(),u={width:c.width,height:c.height};return sl.widthCache[i]=u,++sl.cacheCount>Qte&&(sl.cacheCount=0,sl.widthCache={}),u}catch{return{width:0,height:0}}},tne=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Qd(e){"@babel/helpers - typeof";return Qd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qd(e)}function Sp(e,t){return ane(e)||ine(e,t)||rne(e,t)||nne()}function nne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rne(e,t){if(e){if(typeof e=="string")return UP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return UP(e,t)}}function UP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function xne(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function GP(e,t){return jne(e)||_ne(e,t)||wne(e,t)||bne()}function bne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wne(e,t){if(e){if(typeof e=="string")return KP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return KP(e,t)}}function KP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return F.reduce(function(B,G){var R=G.word,K=G.width,W=B[B.length-1];if(W&&(i==null||a||W.width+K+rG.width?B:G})};if(!h)return v;for(var x="…",y=function(F){var B=m.slice(0,F),G=XT({breakAll:d,style:u,children:B+x}).wordsWithComputedWidth,R=p(G),K=R.length>s||_(R).width>Number(i);return[K,R]},w=0,b=m.length-1,j=0,E;w<=b&&j<=m.length-1;){var P=Math.floor((w+b)/2),O=P-1,C=y(O),A=GP(C,2),T=A[0],$=A[1],z=y(P),D=GP(z,1),Z=D[0];if(!T&&!Z&&(w=P+1),T&&Z&&(b=P-1),!T&&Z){E=$;break}j++}return E||v},YP=function(t){var n=De(t)?[]:t.toString().split(YT);return[{words:n}]},Sne=function(t){var n=t.width,r=t.scaleToFit,i=t.children,a=t.style,s=t.breakAll,c=t.maxLines;if((n||r)&&!nu.isSsr){var u,d,h=XT({breakAll:s,children:i,style:a});if(h){var m=h.wordsWithComputedWidth,p=h.spaceWidth;u=m,d=p}else return YP(i);return Nne({breakAll:s,children:i,maxLines:c,style:a},u,d,n,r)}return YP(i)},XP="#808080",As=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,s=t.lineHeight,c=s===void 0?"1em":s,u=t.capHeight,d=u===void 0?"0.71em":u,h=t.scaleToFit,m=h===void 0?!1:h,p=t.textAnchor,v=p===void 0?"start":p,_=t.verticalAnchor,x=_===void 0?"end":_,y=t.fill,w=y===void 0?XP:y,b=ZP(t,vne),j=N.useMemo(function(){return Sne({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:m,style:b.style,width:b.width})},[b.breakAll,b.children,b.maxLines,m,b.style,b.width]),E=b.dx,P=b.dy,O=b.angle,C=b.className,A=b.breakAll,T=ZP(b,yne);if(!Gt(r)||!Gt(a))return null;var $=r+(ue(E)?E:0),z=a+(ue(P)?P:0),D;switch(x){case"start":D=ky("calc(".concat(d,")"));break;case"middle":D=ky("calc(".concat((j.length-1)/2," * -").concat(c," + (").concat(d," / 2))"));break;default:D=ky("calc(".concat(j.length-1," * -").concat(c,")"));break}var Z=[];if(m){var I=j[0].width,F=b.width;Z.push("scale(".concat((ue(F)?F/I:1)/I,")"))}return O&&Z.push("rotate(".concat(O,", ").concat($,", ").concat(z,")")),Z.length&&(T.transform=Z.join(" ")),H.createElement("text",Jb({},ke(T,!0),{x:$,y:z,className:Ie("recharts-text",C),textAnchor:v,fill:w.includes("url")?XP:w}),j.map(function(B,G){var R=B.words.join(A?"":" ");return H.createElement("tspan",{x:$,dy:G===0?D:c,key:"".concat(R,"-").concat(G)},R)}))};function Qf(e,t){return et?1:e>=t?0:NaN}function w2(e){let t=e,n=e;e.length===1&&(t=(s,c)=>e(s)-c,n=Pne(e));function r(s,c,u,d){for(u==null&&(u=0),d==null&&(d=s.length);u>>1;n(s[h],c)<0?u=h+1:d=h}return u}function i(s,c,u,d){for(u==null&&(u=0),d==null&&(d=s.length);u>>1;n(s[h],c)>0?d=h:u=h+1}return u}function a(s,c,u,d){u==null&&(u=0),d==null&&(d=s.length);const h=r(s,c,u,d-1);return h>u&&t(s[h-1],c)>-t(s[h],c)?h-1:h}return{left:r,center:a,right:i}}function Pne(e){return(t,n)=>Qf(e(t),n)}function QT(e){return e===null?NaN:+e}function*Ene(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const One=w2(Qf),Jf=One.right;w2(QT).center;class Nn{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let r=0;for(let i=0;i0){for(s=t[--n];n>0&&(r=s,i=t[--n],s=r+i,a=i-(s-r),!a););n>0&&(a<0&&t[n-1]<0||a>0&&t[n-1]>0)&&(i=a*2,r=s+i,i==r-s&&(s=r))}return s}}class QP extends Map{constructor(t,n=Ane){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(JP(this,t))}has(t){return super.has(JP(this,t))}set(t,n){return super.set(kne(this,t),n)}delete(t){return super.delete(Cne(this,t))}}function JP({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function kne({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function Cne({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(n),e.delete(r)),n}function Ane(e){return e!==null&&typeof e=="object"?e.valueOf():e}var e1=Math.sqrt(50),t1=Math.sqrt(10),n1=Math.sqrt(2);function r1(e,t,n){var r,i=-1,a,s,c;if(t=+t,e=+e,n=+n,e===t&&n>0)return[e];if((r=t0){let u=Math.round(e/c),d=Math.round(t/c);for(u*ct&&--d,s=new Array(a=d-u+1);++it&&--d,s=new Array(a=d-u+1);++i=0?(a>=e1?10:a>=t1?5:a>=n1?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=e1?10:a>=t1?5:a>=n1?2:1)}function i1(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=e1?i*=10:a>=t1?i*=5:a>=n1&&(i*=2),t=r)&&(n=r);return n}function t3(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function e6(e,t,n=0,r=e.length-1,i=Qf){for(;r>n;){if(r-n>600){const u=r-n+1,d=t-n+1,h=Math.log(u),m=.5*Math.exp(2*h/3),p=.5*Math.sqrt(h*m*(u-m)/u)*(d-u/2<0?-1:1),v=Math.max(n,Math.floor(t-d*m/u+p)),_=Math.min(r,Math.floor(t+(u-d)*m/u+p));e6(e,t,v,_,i)}const a=e[t];let s=n,c=r;for(Au(e,n,t),i(e[r],a)>0&&Au(e,n,r);s0;)--c}i(e[n],a)===0?Au(e,n,c):(++c,Au(e,c,r)),c<=t&&(n=c+1),t<=c&&(r=c-1)}return e}function Au(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Tne(e,t,n){if(e=Float64Array.from(Ene(e)),!!(r=e.length)){if((t=+t)<=0||r<2)return t3(e);if(t>=1)return e3(e);var r,i=(r-1)*t,a=Math.floor(i),s=e3(e6(e,a).subarray(0,a+1)),c=t3(e.subarray(a+1));return s+(c-s)*(i-a)}}function Mne(e,t,n=QT){if(r=e.length){if((t=+t)<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),s=+n(e[a],a,e),c=+n(e[a+1],a+1,e);return s+(c-s)*(i-a)}}function*Lne(e){for(const t of e)yield*t}function t6(e){return Array.from(Lne(e))}function ss(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Jh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Jh(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Ine.exec(e))?new mr(t[1],t[2],t[3],1):(t=Rne.exec(e))?new mr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Fne.exec(e))?Jh(t[1],t[2],t[3],t[4]):(t=Dne.exec(e))?Jh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Bne.exec(e))?l3(t[1],t[2]/100,t[3]/100,1):(t=zne.exec(e))?l3(t[1],t[2]/100,t[3]/100,t[4]):n3.hasOwnProperty(e)?a3(n3[e]):e==="transparent"?new mr(NaN,NaN,NaN,0):null}function a3(e){return new mr(e>>16&255,e>>8&255,e&255,1)}function Jh(e,t,n,r){return r<=0&&(e=t=n=NaN),new mr(e,t,n,r)}function Wne(e){return e instanceof eh||(e=Ts(e)),e?(e=e.rgb(),new mr(e.r,e.g,e.b,e.opacity)):new mr}function o1(e,t,n,r){return arguments.length===1?Wne(e):new mr(e,t,n,r??1)}function mr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}j2(mr,o1,r6(eh,{brighter:function(e){return e=e==null?Pp:Math.pow(Pp,e),new mr(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?ef:Math.pow(ef,e),new mr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:o3,formatHex:o3,formatRgb:s3,toString:s3}));function o3(){return"#"+Cy(this.r)+Cy(this.g)+Cy(this.b)}function s3(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(e===1?")":", "+e+")")}function Cy(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function l3(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ti(e,t,n,r)}function i6(e){if(e instanceof Ti)return new Ti(e.h,e.s,e.l,e.opacity);if(e instanceof eh||(e=Ts(e)),!e)return new Ti;if(e instanceof Ti)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),s=NaN,c=a-i,u=(a+i)/2;return c?(t===a?s=(n-r)/c+(n0&&u<1?0:s,new Ti(s,c,u,e.opacity)}function Hne(e,t,n,r){return arguments.length===1?i6(e):new Ti(e,t,n,r??1)}function Ti(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}j2(Ti,Hne,r6(eh,{brighter:function(e){return e=e==null?Pp:Math.pow(Pp,e),new Ti(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?ef:Math.pow(ef,e),new Ti(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new mr(Ay(e>=240?e-240:e+120,i,r),Ay(e,i,r),Ay(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(e===1?")":", "+e+")")}}));function Ay(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const N2=e=>()=>e;function Vne(e,t){return function(n){return e+n*t}}function qne(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Zne(e){return(e=+e)==1?a6:function(t,n){return n-t?qne(t,n,e):N2(isNaN(t)?n:t)}}function a6(e,t){var n=t-e;return n?Vne(e,n):N2(isNaN(e)?t:e)}const Ep=function e(t){var n=Zne(t);function r(i,a){var s=n((i=o1(i)).r,(a=o1(a)).r),c=n(i.g,a.g),u=n(i.b,a.b),d=a6(i.opacity,a.opacity);return function(h){return i.r=s(h),i.g=c(h),i.b=u(h),i.opacity=d(h),i+""}}return r.gamma=e,r}(1);function Gne(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;in&&(a=t.slice(n,a),c[s]?c[s]+=a:c[++s]=a),(r=r[0])===(i=i[0])?c[s]?c[s]+=i:c[++s]=i:(c[++s]=null,u.push({i:s,x:ai(r,i)})),n=Ty.lastIndex;return n180?h+=360:h-d>180&&(d+=360),p.push({i:m.push(i(m)+"rotate(",null,r)-2,x:ai(d,h)})):h&&m.push(i(m)+"rotate("+h+r)}function c(d,h,m,p){d!==h?p.push({i:m.push(i(m)+"skewX(",null,r)-2,x:ai(d,h)}):h&&m.push(i(m)+"skewX("+h+r)}function u(d,h,m,p,v,_){if(d!==m||h!==p){var x=v.push(i(v)+"scale(",null,",",null,")");_.push({i:x-4,x:ai(d,m)},{i:x-2,x:ai(h,p)})}else(m!==1||p!==1)&&v.push(i(v)+"scale("+m+","+p+")")}return function(d,h){var m=[],p=[];return d=e(d),h=e(h),a(d.translateX,d.translateY,h.translateX,h.translateY,m,p),s(d.rotate,h.rotate,m,p),c(d.skewX,h.skewX,m,p),u(d.scaleX,d.scaleY,h.scaleX,h.scaleY,m,p),d=h=null,function(v){for(var _=-1,x=p.length,y;++_t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function fre(e,t,n){var r=e[0],i=e[1],a=t[0],s=t[1];return i2?hre:fre,u=d=null,m}function m(p){return p==null||isNaN(p=+p)?a:(u||(u=c(e.map(r),t,n)))(r(s(p)))}return m.invert=function(p){return s(i((d||(d=c(t,e.map(r),ai)))(p)))},m.domain=function(p){return arguments.length?(e=Array.from(p,Op),h()):e.slice()},m.range=function(p){return arguments.length?(t=Array.from(p),h()):t.slice()},m.rangeRound=function(p){return t=Array.from(p),n=S2,h()},m.clamp=function(p){return arguments.length?(s=p?!0:$n,h()):s!==$n},m.interpolate=function(p){return arguments.length?(n=p,h()):n},m.unknown=function(p){return arguments.length?(a=p,m):a},function(p,v){return r=p,i=v,h()}}function P2(){return A0()($n,$n)}function mre(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function kp(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function yc(e){return e=kp(Math.abs(e)),e?e[1]:NaN}function pre(e,t){return function(n,r){for(var i=n.length,a=[],s=0,c=e[0],u=0;i>0&&c>0&&(u+c+1>r&&(c=Math.max(1,r-u)),a.push(n.substring(i-=c,i+c)),!((u+=c+1)>r));)c=e[s=(s+1)%e.length];return a.reverse().join(t)}}function gre(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var vre=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function nf(e){if(!(t=vre.exec(e)))throw new Error("invalid format: "+e);var t;return new E2({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}nf.prototype=E2.prototype;function E2(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}E2.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function yre(e){e:for(var t=e.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Cp;function xre(e,t){var n=kp(e,t);if(!n)return Cp=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(Cp=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=r.length;return a===s?r:a>s?r+new Array(a-s+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+kp(e,Math.max(0,t+a-1))[0]}function f3(e,t){var n=kp(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const h3={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:mre,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>f3(e*100,t),r:f3,s:xre,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function m3(e){return e}var p3=Array.prototype.map,g3=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function bre(e){var t=e.grouping===void 0||e.thousands===void 0?m3:pre(p3.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?m3:gre(p3.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",c=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function d(m,p){m=nf(m);var v=m.fill,_=m.align,x=m.sign,y=m.symbol,w=m.zero,b=m.width,j=m.comma,E=m.precision,P=m.trim,O=m.type;O==="n"?(j=!0,O="g"):h3[O]||(E===void 0&&(E=12),P=!0,O="g"),(w||v==="0"&&_==="=")&&(w=!0,v="0",_="=");var C=(p&&p.prefix!==void 0?p.prefix:"")+(y==="$"?n:y==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():""),A=(y==="$"?r:/[%p]/.test(O)?s:"")+(p&&p.suffix!==void 0?p.suffix:""),T=h3[O],$=/[defgprs%]/.test(O);E=E===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function z(D){var Z=C,I=A,F,B,G;if(O==="c")I=T(D)+I,D="";else{D=+D;var R=D<0||1/D<0;if(D=isNaN(D)?u:T(Math.abs(D),E),P&&(D=yre(D)),R&&+D==0&&x!=="+"&&(R=!1),Z=(R?x==="("?x:c:x==="-"||x==="("?"":x)+Z,I=(O==="s"&&!isNaN(D)&&Cp!==void 0?g3[8+Cp/3]:"")+I+(R&&x==="("?")":""),$){for(F=-1,B=D.length;++FG||G>57){I=(G===46?i+D.slice(F+1):D.slice(F))+I,D=D.slice(0,F);break}}}j&&!w&&(D=t(D,1/0));var K=Z.length+D.length+I.length,W=K>1)+Z+D+I+W.slice(K);break;default:D=W+Z+D+I;break}return a(D)}return z.toString=function(){return m+""},z}function h(m,p){var v=Math.max(-8,Math.min(8,Math.floor(yc(p)/3)))*3,_=Math.pow(10,-v),x=d((m=nf(m),m.type="f",m),{suffix:g3[8+v/3]});return function(y){return x(_*y)}}return{format:d,formatPrefix:h}}var tm,O2,c6;wre({thousands:",",grouping:[3],currency:["$",""]});function wre(e){return tm=bre(e),O2=tm.format,c6=tm.formatPrefix,tm}function _re(e){return Math.max(0,-yc(Math.abs(e)))}function jre(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(yc(t)/3)))*3-yc(Math.abs(e)))}function Nre(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,yc(t)-yc(e))+1}function u6(e,t,n,r){var i=i1(e,t,n),a;switch(r=nf(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=jre(i,s))&&(r.precision=a),c6(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=Nre(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=_re(i))&&(r.precision=a-(r.type==="%")*2);break}}return O2(r)}function Mo(e){var t=e.domain;return e.ticks=function(n){var r=t();return r1(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return u6(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,s=r[i],c=r[a],u,d,h=10;for(c0;){if(d=JT(s,c,n),d===u)return r[i]=s,r[a]=c,t(r);if(d>0)s=Math.floor(s/d)*d,c=Math.ceil(c/d)*d;else if(d<0)s=Math.ceil(s*d)/d,c=Math.floor(c*d)/d;else break;u=d}return e},e}function Ap(){var e=P2();return e.copy=function(){return th(e,Ap())},qr.apply(e,arguments),Mo(e)}function d6(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Op),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return d6(e).unknown(t)},e=arguments.length?Array.from(e,Op):[0,1],Mo(n)}function f6(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],s;return aMath.pow(e,t)}function kre(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function x3(e){return(t,n)=>-e(-t,n)}function k2(e){const t=e(v3,y3),n=t.domain;let r=10,i,a;function s(){return i=kre(r),a=Ore(r),n()[0]<0?(i=x3(i),a=x3(a),e(Sre,Pre)):e(v3,y3),t}return t.base=function(c){return arguments.length?(r=+c,s()):r},t.domain=function(c){return arguments.length?(n(c),s()):n()},t.ticks=c=>{const u=n();let d=u[0],h=u[u.length-1];const m=h0){for(;p<=v;++p)for(_=1;_h)break;w.push(x)}}else for(;p<=v;++p)for(_=r-1;_>=1;--_)if(x=p>0?_/a(-p):_*a(p),!(xh)break;w.push(x)}w.length*2{if(c==null&&(c=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=nf(u)).precision==null&&(u.trim=!0),u=O2(u)),c===1/0)return u;const d=Math.max(1,r*c/t.ticks().length);return h=>{let m=h/a(Math.round(i(h)));return m*rn(f6(n(),{floor:c=>a(Math.floor(i(c))),ceil:c=>a(Math.ceil(i(c)))})),t}function h6(){const e=k2(A0()).domain([1,10]);return e.copy=()=>th(e,h6()).base(e.base()),qr.apply(e,arguments),e}function b3(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function w3(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function C2(e){var t=1,n=e(b3(t),w3(t));return n.constant=function(r){return arguments.length?e(b3(t=+r),w3(t)):t},Mo(n)}function m6(){var e=C2(A0());return e.copy=function(){return th(e,m6()).constant(e.constant())},qr.apply(e,arguments)}function _3(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Cre(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Are(e){return e<0?-e*e:e*e}function A2(e){var t=e($n,$n),n=1;function r(){return n===1?e($n,$n):n===.5?e(Cre,Are):e(_3(n),_3(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Mo(t)}function T2(){var e=A2(A0());return e.copy=function(){return th(e,T2()).exponent(e.exponent())},qr.apply(e,arguments),e}function Tre(){return T2.apply(null,arguments).exponent(.5)}function j3(e){return Math.sign(e)*e*e}function Mre(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function p6(){var e=P2(),t=[0,1],n=!1,r;function i(a){var s=Mre(e(a));return isNaN(s)?r:n?Math.round(s):s}return i.invert=function(a){return e.invert(j3(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,Op)).map(j3)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(n=!!a,i):n},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return p6(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},qr.apply(i,arguments),Mo(i)}function g6(){var e=[],t=[],n=[],r;function i(){var s=0,c=Math.max(1,t.length);for(n=new Array(c-1);++s0?n[c-1]:e[0],c=n?[r[n-1],t]:[r[d-1],r[d]]},s.unknown=function(u){return arguments.length&&(a=u),s},s.thresholds=function(){return r.slice()},s.copy=function(){return v6().domain([e,t]).range(i).unknown(a)},qr.apply(Mo(s),arguments)}function y6(){var e=[.5],t=[0,1],n,r=1;function i(a){return a!=null&&a<=a?t[Jf(e,a,0,r)]:n}return i.domain=function(a){return arguments.length?(e=Array.from(a),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var s=t.indexOf(a);return[e[s-1],e[s]]},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return y6().domain(e).range(t).unknown(n)},qr.apply(i,arguments)}const My=new Date,Ly=new Date;function Kt(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const s=i(a),c=i.ceil(a);return a-s(t(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,c)=>{const u=[];if(a=i.ceil(a),c=c==null?1:Math.floor(c),!(a0))return u;let d;do u.push(d=new Date(+a)),t(a,c),e(a);while(dKt(s=>{if(s>=s)for(;e(s),!a(s);)s.setTime(s-1)},(s,c)=>{if(s>=s)if(c<0)for(;++c<=0;)for(;t(s,-1),!a(s););else for(;--c>=0;)for(;t(s,1),!a(s););}),n&&(i.count=(a,s)=>(My.setTime(+a),Ly.setTime(+s),e(My),e(Ly),Math.floor(n(My,Ly))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?s=>r(s)%a===0:s=>i.count(0,s)%a===0):i)),i}const Tp=Kt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Tp.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Kt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Tp);Tp.range;const ma=1e3,Ir=ma*60,pa=Ir*60,Ea=pa*24,M2=Ea*7,N3=Ea*30,$y=Ea*365,ls=Kt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ma)},(e,t)=>(t-e)/ma,e=>e.getUTCSeconds());ls.range;const L2=Kt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ma)},(e,t)=>{e.setTime(+e+t*Ir)},(e,t)=>(t-e)/Ir,e=>e.getMinutes());L2.range;const $2=Kt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Ir)},(e,t)=>(t-e)/Ir,e=>e.getUTCMinutes());$2.range;const I2=Kt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ma-e.getMinutes()*Ir)},(e,t)=>{e.setTime(+e+t*pa)},(e,t)=>(t-e)/pa,e=>e.getHours());I2.range;const R2=Kt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*pa)},(e,t)=>(t-e)/pa,e=>e.getUTCHours());R2.range;const nh=Kt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ir)/Ea,e=>e.getDate()-1);nh.range;const T0=Kt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ea,e=>e.getUTCDate()-1);T0.range;const x6=Kt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ea,e=>Math.floor(e/Ea));x6.range;function Vs(e){return Kt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Ir)/M2)}const M0=Vs(0),Mp=Vs(1),Lre=Vs(2),$re=Vs(3),xc=Vs(4),Ire=Vs(5),Rre=Vs(6);M0.range;Mp.range;Lre.range;$re.range;xc.range;Ire.range;Rre.range;function qs(e){return Kt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/M2)}const L0=qs(0),Lp=qs(1),Fre=qs(2),Dre=qs(3),bc=qs(4),Bre=qs(5),zre=qs(6);L0.range;Lp.range;Fre.range;Dre.range;bc.range;Bre.range;zre.range;const F2=Kt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());F2.range;const D2=Kt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());D2.range;const Oa=Kt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Oa.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Kt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Oa.range;const ka=Kt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ka.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Kt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});ka.range;function b6(e,t,n,r,i,a){const s=[[ls,1,ma],[ls,5,5*ma],[ls,15,15*ma],[ls,30,30*ma],[a,1,Ir],[a,5,5*Ir],[a,15,15*Ir],[a,30,30*Ir],[i,1,pa],[i,3,3*pa],[i,6,6*pa],[i,12,12*pa],[r,1,Ea],[r,2,2*Ea],[n,1,M2],[t,1,N3],[t,3,3*N3],[e,1,$y]];function c(d,h,m){const p=hy).right(s,p);if(v===s.length)return e.every(i1(d/$y,h/$y,m));if(v===0)return Tp.every(Math.max(i1(d,h,m),1));const[_,x]=s[p/s[v-1][2]53)return null;"w"in ie||(ie.w=1),"Z"in ie?(Re=Ry(Tu(ie.y,0,1)),ut=Re.getUTCDay(),Re=ut>4||ut===0?Lp.ceil(Re):Lp(Re),Re=T0.offset(Re,(ie.V-1)*7),ie.y=Re.getUTCFullYear(),ie.m=Re.getUTCMonth(),ie.d=Re.getUTCDate()+(ie.w+6)%7):(Re=Iy(Tu(ie.y,0,1)),ut=Re.getDay(),Re=ut>4||ut===0?Mp.ceil(Re):Mp(Re),Re=nh.offset(Re,(ie.V-1)*7),ie.y=Re.getFullYear(),ie.m=Re.getMonth(),ie.d=Re.getDate()+(ie.w+6)%7)}else("W"in ie||"U"in ie)&&("w"in ie||(ie.w="u"in ie?ie.u%7:"W"in ie?1:0),ut="Z"in ie?Ry(Tu(ie.y,0,1)).getUTCDay():Iy(Tu(ie.y,0,1)).getDay(),ie.m=0,ie.d="W"in ie?(ie.w+6)%7+ie.W*7-(ut+5)%7:ie.w+ie.U*7-(ut+6)%7);return"Z"in ie?(ie.H+=ie.Z/100|0,ie.M+=ie.Z%100,Ry(ie)):Iy(ie)}}function A(se,ye,je,ie){for(var Ve=0,Re=ye.length,ut=je.length,dt,Tt;Ve=ut)return-1;if(dt=ye.charCodeAt(Ve++),dt===37){if(dt=ye.charAt(Ve++),Tt=P[dt in S3?ye.charAt(Ve++):dt],!Tt||(ie=Tt(se,je,ie))<0)return-1}else if(dt!=je.charCodeAt(ie++))return-1}return ie}function T(se,ye,je){var ie=d.exec(ye.slice(je));return ie?(se.p=h.get(ie[0].toLowerCase()),je+ie[0].length):-1}function $(se,ye,je){var ie=v.exec(ye.slice(je));return ie?(se.w=_.get(ie[0].toLowerCase()),je+ie[0].length):-1}function z(se,ye,je){var ie=m.exec(ye.slice(je));return ie?(se.w=p.get(ie[0].toLowerCase()),je+ie[0].length):-1}function D(se,ye,je){var ie=w.exec(ye.slice(je));return ie?(se.m=b.get(ie[0].toLowerCase()),je+ie[0].length):-1}function Z(se,ye,je){var ie=x.exec(ye.slice(je));return ie?(se.m=y.get(ie[0].toLowerCase()),je+ie[0].length):-1}function I(se,ye,je){return A(se,t,ye,je)}function F(se,ye,je){return A(se,n,ye,je)}function B(se,ye,je){return A(se,r,ye,je)}function G(se){return s[se.getDay()]}function R(se){return a[se.getDay()]}function K(se){return u[se.getMonth()]}function W(se){return c[se.getMonth()]}function U(se){return i[+(se.getHours()>=12)]}function Y(se){return 1+~~(se.getMonth()/3)}function ne(se){return s[se.getUTCDay()]}function ae(se){return a[se.getUTCDay()]}function ee(se){return u[se.getUTCMonth()]}function ce(se){return c[se.getUTCMonth()]}function Ne(se){return i[+(se.getUTCHours()>=12)]}function Ee(se){return 1+~~(se.getUTCMonth()/3)}return{format:function(se){var ye=O(se+="",j);return ye.toString=function(){return se},ye},parse:function(se){var ye=C(se+="",!1);return ye.toString=function(){return se},ye},utcFormat:function(se){var ye=O(se+="",E);return ye.toString=function(){return se},ye},utcParse:function(se){var ye=C(se+="",!0);return ye.toString=function(){return se},ye}}}var S3={"-":"",_:" ",0:"0"},on=/^\s*\d+/,Zre=/^%/,Gre=/[\\^$*+?|[\]().{}]/g;function Ze(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a[t.toLowerCase(),n]))}function Yre(e,t,n){var r=on.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Xre(e,t,n){var r=on.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Qre(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Jre(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function eie(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function P3(e,t,n){var r=on.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function E3(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function tie(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function nie(e,t,n){var r=on.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function rie(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function O3(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function iie(e,t,n){var r=on.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function k3(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function aie(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function oie(e,t,n){var r=on.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function sie(e,t,n){var r=on.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function lie(e,t,n){var r=on.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function cie(e,t,n){var r=Zre.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function uie(e,t,n){var r=on.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function die(e,t,n){var r=on.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function C3(e,t){return Ze(e.getDate(),t,2)}function fie(e,t){return Ze(e.getHours(),t,2)}function hie(e,t){return Ze(e.getHours()%12||12,t,2)}function mie(e,t){return Ze(1+nh.count(Oa(e),e),t,3)}function w6(e,t){return Ze(e.getMilliseconds(),t,3)}function pie(e,t){return w6(e,t)+"000"}function gie(e,t){return Ze(e.getMonth()+1,t,2)}function vie(e,t){return Ze(e.getMinutes(),t,2)}function yie(e,t){return Ze(e.getSeconds(),t,2)}function xie(e){var t=e.getDay();return t===0?7:t}function bie(e,t){return Ze(M0.count(Oa(e)-1,e),t,2)}function _6(e){var t=e.getDay();return t>=4||t===0?xc(e):xc.ceil(e)}function wie(e,t){return e=_6(e),Ze(xc.count(Oa(e),e)+(Oa(e).getDay()===4),t,2)}function _ie(e){return e.getDay()}function jie(e,t){return Ze(Mp.count(Oa(e)-1,e),t,2)}function Nie(e,t){return Ze(e.getFullYear()%100,t,2)}function Sie(e,t){return e=_6(e),Ze(e.getFullYear()%100,t,2)}function Pie(e,t){return Ze(e.getFullYear()%1e4,t,4)}function Eie(e,t){var n=e.getDay();return e=n>=4||n===0?xc(e):xc.ceil(e),Ze(e.getFullYear()%1e4,t,4)}function Oie(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ze(t/60|0,"0",2)+Ze(t%60,"0",2)}function A3(e,t){return Ze(e.getUTCDate(),t,2)}function kie(e,t){return Ze(e.getUTCHours(),t,2)}function Cie(e,t){return Ze(e.getUTCHours()%12||12,t,2)}function Aie(e,t){return Ze(1+T0.count(ka(e),e),t,3)}function j6(e,t){return Ze(e.getUTCMilliseconds(),t,3)}function Tie(e,t){return j6(e,t)+"000"}function Mie(e,t){return Ze(e.getUTCMonth()+1,t,2)}function Lie(e,t){return Ze(e.getUTCMinutes(),t,2)}function $ie(e,t){return Ze(e.getUTCSeconds(),t,2)}function Iie(e){var t=e.getUTCDay();return t===0?7:t}function Rie(e,t){return Ze(L0.count(ka(e)-1,e),t,2)}function N6(e){var t=e.getUTCDay();return t>=4||t===0?bc(e):bc.ceil(e)}function Fie(e,t){return e=N6(e),Ze(bc.count(ka(e),e)+(ka(e).getUTCDay()===4),t,2)}function Die(e){return e.getUTCDay()}function Bie(e,t){return Ze(Lp.count(ka(e)-1,e),t,2)}function zie(e,t){return Ze(e.getUTCFullYear()%100,t,2)}function Uie(e,t){return e=N6(e),Ze(e.getUTCFullYear()%100,t,2)}function Wie(e,t){return Ze(e.getUTCFullYear()%1e4,t,4)}function Hie(e,t){var n=e.getUTCDay();return e=n>=4||n===0?bc(e):bc.ceil(e),Ze(e.getUTCFullYear()%1e4,t,4)}function Vie(){return"+0000"}function T3(){return"%"}function M3(e){return+e}function L3(e){return Math.floor(+e/1e3)}var ll,S6,P6;qie({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function qie(e){return ll=qre(e),S6=ll.format,ll.parse,P6=ll.utcFormat,ll.utcParse,ll}function Zie(e){return new Date(e)}function Gie(e){return e instanceof Date?+e:+new Date(+e)}function B2(e,t,n,r,i,a,s,c,u,d){var h=P2(),m=h.invert,p=h.domain,v=d(".%L"),_=d(":%S"),x=d("%I:%M"),y=d("%I %p"),w=d("%a %d"),b=d("%b %d"),j=d("%B"),E=d("%Y");function P(O){return(u(O)t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,a)=>Tne(e,a/r))},n.copy=function(){return C6(t).domain(e)},Ra.apply(n,arguments)}function I0(){var e=0,t=.5,n=1,r=1,i,a,s,c,u,d=$n,h,m=!1,p;function v(x){return isNaN(x=+x)?p:(x=.5+((x=+h(x))-a)*(r*xt}var L6=tae,nae=R0,rae=L6,iae=tu;function aae(e){return e&&e.length?nae(e,iae,rae):void 0}var oae=aae;const F0=Je(oae);function sae(e,t){return ee.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=re.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1};ge.decimalPlaces=ge.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*mt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};ge.dividedBy=ge.div=function(e){return ba(this,new this.constructor(e))};ge.dividedToIntegerBy=ge.idiv=function(e){var t=this,n=t.constructor;return it(ba(t,new n(e),0,1),n.precision)};ge.equals=ge.eq=function(e){return!this.cmp(e)};ge.exponent=function(){return Ut(this)};ge.greaterThan=ge.gt=function(e){return this.cmp(e)>0};ge.greaterThanOrEqualTo=ge.gte=function(e){return this.cmp(e)>=0};ge.isInteger=ge.isint=function(){return this.e>this.d.length-2};ge.isNegative=ge.isneg=function(){return this.s<0};ge.isPositive=ge.ispos=function(){return this.s>0};ge.isZero=function(){return this.s===0};ge.lessThan=ge.lt=function(e){return this.cmp(e)<0};ge.lessThanOrEqualTo=ge.lte=function(e){return this.cmp(e)<1};ge.logarithm=ge.log=function(e){var t,n=this,r=n.constructor,i=r.precision,a=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(fr))throw Error(Wr+"NaN");if(n.s<1)throw Error(Wr+(n.s?"NaN":"-Infinity"));return n.eq(fr)?new r(0):(yt=!1,t=ba(rf(n,a),rf(e,a),a),yt=!0,it(t,i))};ge.minus=ge.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?D6(t,e):R6(t,(e.s=-e.s,e))};ge.modulo=ge.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Wr+"NaN");return n.s?(yt=!1,t=ba(n,e,0,1).times(e),yt=!0,n.minus(t)):it(new r(n),i)};ge.naturalExponential=ge.exp=function(){return F6(this)};ge.naturalLogarithm=ge.ln=function(){return rf(this)};ge.negated=ge.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ge.plus=ge.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?R6(t,e):D6(t,(e.s=-e.s,e))};ge.precision=ge.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(_s+e);if(t=Ut(i)+1,r=i.d.length-1,n=r*mt+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};ge.squareRoot=ge.sqrt=function(){var e,t,n,r,i,a,s,c=this,u=c.constructor;if(c.s<1){if(!c.s)return new u(0);throw Error(Wr+"NaN")}for(e=Ut(c),yt=!1,i=Math.sqrt(+c),i==0||i==1/0?(t=Ii(c.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=au((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new u(t)):r=new u(i.toString()),n=u.precision,i=s=n+3;;)if(a=r,r=a.plus(ba(c,a,s+2)).times(.5),Ii(a.d).slice(0,s)===(t=Ii(r.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(it(a,n+1,0),a.times(a).eq(c)){r=a;break}}else if(t!="9999")break;s+=4}return yt=!0,it(r,n)};ge.times=ge.mul=function(e){var t,n,r,i,a,s,c,u,d,h=this,m=h.constructor,p=h.d,v=(e=new m(e)).d;if(!h.s||!e.s)return new m(0);for(e.s*=h.s,n=h.e+e.e,u=p.length,d=v.length,u=0;){for(t=0,i=u+r;i>r;)c=a[i]+v[r]*p[i-r-1]+t,a[i--]=c%Qt|0,t=c/Qt|0;a[i]=(a[i]+t)%Qt|0}for(;!a[--s];)a.pop();return t?++n:a.shift(),e.d=a,e.e=n,yt?it(e,m.precision):e};ge.toDecimalPlaces=ge.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(zi(e,0,iu),t===void 0?t=r.rounding:zi(t,0,8),it(n,e+Ut(n)+1,t))};ge.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Ms(r,!0):(zi(e,0,iu),t===void 0?t=i.rounding:zi(t,0,8),r=it(new i(r),e+1,t),n=Ms(r,!0,e+1)),n};ge.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?Ms(i):(zi(e,0,iu),t===void 0?t=a.rounding:zi(t,0,8),r=it(new a(i),e+Ut(i)+1,t),n=Ms(r.abs(),!1,e+Ut(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};ge.toInteger=ge.toint=function(){var e=this,t=e.constructor;return it(new t(e),Ut(e)+1,t.rounding)};ge.toNumber=function(){return+this};ge.toPower=ge.pow=function(e){var t,n,r,i,a,s,c=this,u=c.constructor,d=12,h=+(e=new u(e));if(!e.s)return new u(fr);if(c=new u(c),!c.s){if(e.s<1)throw Error(Wr+"Infinity");return c}if(c.eq(fr))return c;if(r=u.precision,e.eq(fr))return it(c,r);if(t=e.e,n=e.d.length-1,s=t>=n,a=c.s,s){if((n=h<0?-h:h)<=I6){for(i=new u(fr),t=Math.ceil(r/mt+4),yt=!1;n%2&&(i=i.times(c),R3(i.d,t)),n=au(n/2),n!==0;)c=c.times(c),R3(c.d,t);return yt=!0,e.s<0?new u(fr).div(i):it(i,r)}}else if(a<0)throw Error(Wr+"NaN");return a=a<0&&e.d[Math.max(t,n)]&1?-1:1,c.s=1,yt=!1,i=e.times(rf(c,r+d)),yt=!0,i=F6(i),i.s=a,i};ge.toPrecision=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?(n=Ut(i),r=Ms(i,n<=a.toExpNeg||n>=a.toExpPos)):(zi(e,1,iu),t===void 0?t=a.rounding:zi(t,0,8),i=it(new a(i),e,t),n=Ut(i),r=Ms(i,e<=n||n<=a.toExpNeg,e)),r};ge.toSignificantDigits=ge.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(zi(e,1,iu),t===void 0?t=r.rounding:zi(t,0,8)),it(new r(n),e,t)};ge.toString=ge.valueOf=ge.val=ge.toJSON=ge[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Ut(e),n=e.constructor;return Ms(e,t<=n.toExpNeg||t>=n.toExpPos)};function R6(e,t){var n,r,i,a,s,c,u,d,h=e.constructor,m=h.precision;if(!e.s||!t.s)return t.s||(t=new h(e)),yt?it(t,m):t;if(u=e.d,d=t.d,s=e.e,i=t.e,u=u.slice(),a=s-i,a){for(a<0?(r=u,a=-a,c=d.length):(r=d,i=s,c=u.length),s=Math.ceil(m/mt),c=s>c?s+1:c+1,a>c&&(a=c,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(c=u.length,a=d.length,c-a<0&&(a=c,r=d,d=u,u=r),n=0;a;)n=(u[--a]=u[a]+d[a]+n)/Qt|0,u[a]%=Qt;for(n&&(u.unshift(n),++i),c=u.length;u[--c]==0;)u.pop();return t.d=u,t.e=i,yt?it(t,m):t}function zi(e,t,n){if(e!==~~e||en)throw Error(_s+e)}function Ii(e){var t,n,r,i=e.length-1,a="",s=e[0];if(i>0){for(a+=s,t=1;ts?1:-1;else for(c=u=0;ci[c]?1:-1;break}return u}function n(r,i,a){for(var s=0;a--;)r[a]-=s,s=r[a]1;)r.shift()}return function(r,i,a,s){var c,u,d,h,m,p,v,_,x,y,w,b,j,E,P,O,C,A,T=r.constructor,$=r.s==i.s?1:-1,z=r.d,D=i.d;if(!r.s)return new T(r);if(!i.s)throw Error(Wr+"Division by zero");for(u=r.e-i.e,C=D.length,P=z.length,v=new T($),_=v.d=[],d=0;D[d]==(z[d]||0);)++d;if(D[d]>(z[d]||0)&&--u,a==null?b=a=T.precision:s?b=a+(Ut(r)-Ut(i))+1:b=a,b<0)return new T(0);if(b=b/mt+2|0,d=0,C==1)for(h=0,D=D[0],b++;(d1&&(D=e(D,h),z=e(z,h),C=D.length,P=z.length),E=C,x=z.slice(0,C),y=x.length;y=Qt/2&&++O;do h=0,c=t(D,x,C,y),c<0?(w=x[0],C!=y&&(w=w*Qt+(x[1]||0)),h=w/O|0,h>1?(h>=Qt&&(h=Qt-1),m=e(D,h),p=m.length,y=x.length,c=t(m,x,p,y),c==1&&(h--,n(m,C16)throw Error(W2+Ut(e));if(!e.s)return new h(fr);for(yt=!1,c=m,s=new h(.03125);e.abs().gte(.1);)e=e.times(s),d+=5;for(r=Math.log(Qo(2,d))/Math.LN10*2+5|0,c+=r,n=i=a=new h(fr),h.precision=c;;){if(i=it(i.times(e),c),n=n.times(++u),s=a.plus(ba(i,n,c)),Ii(s.d).slice(0,c)===Ii(a.d).slice(0,c)){for(;d--;)a=it(a.times(a),c);return h.precision=m,t==null?(yt=!0,it(a,m)):a}a=s}}function Ut(e){for(var t=e.e*mt,n=e.d[0];n>=10;n/=10)t++;return t}function Fy(e,t,n){if(t>e.LN10.sd())throw yt=!0,n&&(e.precision=n),Error(Wr+"LN10 precision limit exceeded");return it(new e(e.LN10),t)}function Za(e){for(var t="";e--;)t+="0";return t}function rf(e,t){var n,r,i,a,s,c,u,d,h,m=1,p=10,v=e,_=v.d,x=v.constructor,y=x.precision;if(v.s<1)throw Error(Wr+(v.s?"NaN":"-Infinity"));if(v.eq(fr))return new x(0);if(t==null?(yt=!1,d=y):d=t,v.eq(10))return t==null&&(yt=!0),Fy(x,d);if(d+=p,x.precision=d,n=Ii(_),r=n.charAt(0),a=Ut(v),Math.abs(a)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)v=v.times(e),n=Ii(v.d),r=n.charAt(0),m++;a=Ut(v),r>1?(v=new x("0."+n),a++):v=new x(r+"."+n.slice(1))}else return u=Fy(x,d+2,y).times(a+""),v=rf(new x(r+"."+n.slice(1)),d-p).plus(u),x.precision=y,t==null?(yt=!0,it(v,y)):v;for(c=s=v=ba(v.minus(fr),v.plus(fr),d),h=it(v.times(v),d),i=3;;){if(s=it(s.times(h),d),u=c.plus(ba(s,new x(i),d)),Ii(u.d).slice(0,d)===Ii(c.d).slice(0,d))return c=c.times(2),a!==0&&(c=c.plus(Fy(x,d+2,y).times(a+""))),c=ba(c,new x(m),d),x.precision=y,t==null?(yt=!0,it(c,y)):c;c=u,i+=2}}function I3(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=au(n/mt),e.d=[],r=(n+1)%mt,n<0&&(r+=mt),r$p||e.e<-$p))throw Error(W2+n)}else e.s=0,e.e=0,e.d=[0];return e}function it(e,t,n){var r,i,a,s,c,u,d,h,m=e.d;for(s=1,a=m[0];a>=10;a/=10)s++;if(r=t-s,r<0)r+=mt,i=t,d=m[h=0];else{if(h=Math.ceil((r+1)/mt),a=m.length,h>=a)return e;for(d=a=m[h],s=1;a>=10;a/=10)s++;r%=mt,i=r-mt+s}if(n!==void 0&&(a=Qo(10,s-i-1),c=d/a%10|0,u=t<0||m[h+1]!==void 0||d%a,u=n<4?(c||u)&&(n==0||n==(e.s<0?3:2)):c>5||c==5&&(n==4||u||n==6&&(r>0?i>0?d/Qo(10,s-i):0:m[h-1])%10&1||n==(e.s<0?8:7))),t<1||!m[0])return u?(a=Ut(e),m.length=1,t=t-a-1,m[0]=Qo(10,(mt-t%mt)%mt),e.e=au(-t/mt)||0):(m.length=1,m[0]=e.e=e.s=0),e;if(r==0?(m.length=h,a=1,h--):(m.length=h+1,a=Qo(10,mt-r),m[h]=i>0?(d/Qo(10,s-i)%Qo(10,i)|0)*a:0),u)for(;;)if(h==0){(m[0]+=a)==Qt&&(m[0]=1,++e.e);break}else{if(m[h]+=a,m[h]!=Qt)break;m[h--]=0,a=1}for(r=m.length;m[--r]===0;)m.pop();if(yt&&(e.e>$p||e.e<-$p))throw Error(W2+Ut(e));return e}function D6(e,t){var n,r,i,a,s,c,u,d,h,m,p=e.constructor,v=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),yt?it(t,v):t;if(u=e.d,m=t.d,r=t.e,d=e.e,u=u.slice(),s=d-r,s){for(h=s<0,h?(n=u,s=-s,c=m.length):(n=m,r=d,c=u.length),i=Math.max(Math.ceil(v/mt),c)+2,s>i&&(s=i,n.length=1),n.reverse(),i=s;i--;)n.push(0);n.reverse()}else{for(i=u.length,c=m.length,h=i0;--i)u[c++]=0;for(i=m.length;i>s;){if(u[--i]0?a=a.charAt(0)+"."+a.slice(1)+Za(r):s>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Za(-i-1)+a,n&&(r=n-s)>0&&(a+=Za(r))):i>=s?(a+=Za(i+1-s),n&&(r=n-i-1)>0&&(a=a+"."+Za(r))):((r=i+1)0&&(i+1===s&&(a+="."),a+=Za(r))),e.s<0?"-"+a:a}function R3(e,t){if(e.length>t)return e.length=t,!0}function B6(e){var t,n,r;function i(a){var s=this;if(!(s instanceof i))return new i(a);if(s.constructor=i,a instanceof i){s.s=a.s,s.e=a.e,s.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(_s+a);if(a>0)s.s=1;else if(a<0)a=-a,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(a===~~a&&a<1e7){s.e=0,s.d=[a];return}return I3(s,a.toString())}else if(typeof a!="string")throw Error(_s+a);if(a.charCodeAt(0)===45?(a=a.slice(1),s.s=-1):s.s=1,Oae.test(a))I3(s,a);else throw Error(_s+a)}if(i.prototype=ge,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=B6,i.config=i.set=kae,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(_s+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(_s+n+": "+r);return this}var H2=B6(Eae);fr=new H2(1);const tt=H2;function Cae(e){return Lae(e)||Mae(e)||Tae(e)||Aae()}function Aae(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tae(e,t){if(e){if(typeof e=="string")return u1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u1(e,t)}}function Mae(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Lae(e){if(Array.isArray(e))return u1(e)}function u1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,i):e(t-s,F3(function(){for(var c=arguments.length,u=new Array(c),d=0;de.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,a=void 0;try{for(var s=e[Symbol.iterator](),c;!(r=(c=s.next()).done)&&(n.push(c.value),!(t&&n.length===t));r=!0);}catch(u){i=!0,a=u}finally{try{!r&&s.return!=null&&s.return()}finally{if(i)throw a}}return n}}function Kae(e){if(Array.isArray(e))return e}function V6(e){var t=af(e,2),n=t[0],r=t[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]}function q6(e,t,n){if(e.lte(0))return new tt(0);var r=U0.getDigitCount(e.toNumber()),i=new tt(10).pow(r),a=e.div(i),s=r!==1?.05:.1,c=new tt(Math.ceil(a.div(s).toNumber())).add(n).mul(s),u=c.mul(i);return t?u:new tt(Math.ceil(u))}function Yae(e,t,n){var r=1,i=new tt(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new tt(10).pow(U0.getDigitCount(e)-1),i=new tt(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new tt(Math.floor(e)))}else e===0?i=new tt(Math.floor((t-1)/2)):n||(i=new tt(Math.floor(e)));var s=Math.floor((t-1)/2),c=Fae(Rae(function(u){return i.add(new tt(u-s).mul(r)).toNumber()}),d1);return c(0,t)}function Z6(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new tt(0),tickMin:new tt(0),tickMax:new tt(0)};var a=q6(new tt(t).sub(e).div(n-1),r,i),s;e<=0&&t>=0?s=new tt(0):(s=new tt(e).add(t).div(2),s=s.sub(new tt(s).mod(a)));var c=Math.ceil(s.sub(e).div(a).toNumber()),u=Math.ceil(new tt(t).sub(s).div(a).toNumber()),d=c+u+1;return d>n?Z6(e,t,n,r,i+1):(d0?u+(n-d):u,c=t>0?c:c+(n-d)),{step:a,tickMin:s.sub(new tt(c).mul(a)),tickMax:s.add(new tt(u).mul(a))})}function Xae(e){var t=af(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=Math.max(i,2),c=V6([n,r]),u=af(c,2),d=u[0],h=u[1];if(d===-1/0||h===1/0){var m=h===1/0?[d].concat(h1(d1(0,i-1).map(function(){return 1/0}))):[].concat(h1(d1(0,i-1).map(function(){return-1/0})),[h]);return n>r?f1(m):m}if(d===h)return Yae(d,i,a);var p=Z6(d,h,s,a),v=p.step,_=p.tickMin,x=p.tickMax,y=U0.rangeStep(_,x.add(new tt(.1).mul(v)),v);return n>r?f1(y):y}function Qae(e,t){var n=af(e,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=V6([r,i]),c=af(s,2),u=c[0],d=c[1];if(u===-1/0||d===1/0)return[r,i];if(u===d)return[u];var h=Math.max(t,2),m=q6(new tt(d).sub(u).div(h-1),a,0),p=[].concat(h1(U0.rangeStep(new tt(u),new tt(d).sub(new tt(.99).mul(m)),m)),[d]);return r>i?f1(p):p}var Jae=W6(Xae),eoe=W6(Qae),toe="Invariant failed";function Ls(e,t){throw new Error(toe)}var noe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function wc(e){"@babel/helpers - typeof";return wc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wc(e)}function Ip(){return Ip=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function coe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function uoe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function doe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,s=-1,c=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(c<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var u=a.range,d=0;d0?i[d-1].coordinate:i[c-1].coordinate,m=i[d].coordinate,p=d>=c-1?i[0].coordinate:i[d+1].coordinate,v=void 0;if(Mn(m-h)!==Mn(p-m)){var _=[];if(Mn(p-m)===Mn(u[1]-u[0])){v=p;var x=m+u[1]-u[0];_[0]=Math.min(x,(x+h)/2),_[1]=Math.max(x,(x+h)/2)}else{v=h;var y=p+u[1]-u[0];_[0]=Math.min(m,(y+m)/2),_[1]=Math.max(m,(y+m)/2)}var w=[Math.min(m,(v+m)/2),Math.max(m,(v+m)/2)];if(t>w[0]&&t<=w[1]||t>=_[0]&&t<=_[1]){s=i[d].index;break}}else{var b=Math.min(h,p),j=Math.max(h,p);if(t>(b+m)/2&&t<=(j+m)/2){s=i[d].index;break}}}else for(var E=0;E0&&E(r[E].coordinate+r[E-1].coordinate)/2&&t<=(r[E].coordinate+r[E+1].coordinate)/2||E===c-1&&t>(r[E].coordinate+r[E-1].coordinate)/2){s=r[E].index;break}return s},V2=function(t){var n,r=t,i=r.type.displayName,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Ct(Ct({},t.type.defaultProps),t.props):t.props,s=a.stroke,c=a.fill,u;switch(i){case"Line":u=s;break;case"Area":case"Radar":u=s&&s!=="none"?s:c;break;default:u=c;break}return u},Ooe=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var s={},c=Object.keys(a),u=0,d=c.length;u=0});if(w&&w.length){var b=w[0].type.defaultProps,j=b!==void 0?Ct(Ct({},b),w[0].props):w[0].props,E=j.barSize,P=j[y];s[P]||(s[P]=[]);var O=De(E)?n:E;s[P].push({item:w[0],stackList:w.slice(1),barSize:De(O)?void 0:Ln(O,r,0)})}}return s},koe=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,a=t.sizeList,s=a===void 0?[]:a,c=t.maxBarSize,u=s.length;if(u<1)return null;var d=Ln(n,i,0,!0),h,m=[];if(s[0].barSize===+s[0].barSize){var p=!1,v=i/u,_=s.reduce(function(E,P){return E+P.barSize||0},0);_+=(u-1)*d,_>=i&&(_-=(u-1)*d,d=0),_>=i&&v>0&&(p=!0,v*=.9,_=u*v);var x=(i-_)/2>>0,y={offset:x-d,size:0};h=s.reduce(function(E,P){var O={item:P.item,position:{offset:y.offset+y.size+d,size:p?v:P.barSize}},C=[].concat(z3(E),[O]);return y=C[C.length-1].position,P.stackList&&P.stackList.length&&P.stackList.forEach(function(A){C.push({item:A,position:y})}),C},m)}else{var w=Ln(r,i,0,!0);i-2*w-(u-1)*d<=0&&(d=0);var b=(i-2*w-(u-1)*d)/u;b>1&&(b>>=0);var j=c===+c?Math.min(b,c):b;h=s.reduce(function(E,P,O){var C=[].concat(z3(E),[{item:P.item,position:{offset:w+(b+d)*O+(b-j)/2,size:j}}]);return P.stackList&&P.stackList.length&&P.stackList.forEach(function(A){C.push({item:A,position:C[C.length-1].position})}),C},m)}return h},Coe=function(t,n,r,i){var a=r.children,s=r.width,c=r.margin,u=s-(c.left||0)-(c.right||0),d=X6({children:a,legendWidth:u});if(d){var h=i||{},m=h.width,p=h.height,v=d.align,_=d.verticalAlign,x=d.layout;if((x==="vertical"||x==="horizontal"&&_==="middle")&&v!=="center"&&ue(t[v]))return Ct(Ct({},t),{},zl({},v,t[v]+(m||0)));if((x==="horizontal"||x==="vertical"&&v==="center")&&_!=="middle"&&ue(t[_]))return Ct(Ct({},t),{},zl({},_,t[_]+(p||0)))}return t},Aoe=function(t,n,r){return De(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},Q6=function(t,n,r,i,a){var s=n.props.children,c=Dr(s,W0).filter(function(d){return Aoe(i,a,d.props.direction)});if(c&&c.length){var u=c.map(function(d){return d.props.dataKey});return t.reduce(function(d,h){var m=_n(h,r);if(De(m))return d;var p=Array.isArray(m)?[D0(m),F0(m)]:[m,m],v=u.reduce(function(_,x){var y=_n(h,x,0),w=p[0]-Math.abs(Array.isArray(y)?y[0]:y),b=p[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(w,_[0]),Math.max(b,_[1])]},[1/0,-1/0]);return[Math.min(v[0],d[0]),Math.max(v[1],d[1])]},[1/0,-1/0])}return null},Toe=function(t,n,r,i,a){var s=n.map(function(c){return Q6(t,c,r,a,i)}).filter(function(c){return!De(c)});return s&&s.length?s.reduce(function(c,u){return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]):null},J6=function(t,n,r,i,a){var s=n.map(function(u){var d=u.props.dataKey;return r==="number"&&d&&Q6(t,u,d,i)||md(t,d,r,a)});if(r==="number")return s.reduce(function(u,d){return[Math.min(u[0],d[0]),Math.max(u[1],d[1])]},[1/0,-1/0]);var c={};return s.reduce(function(u,d){for(var h=0,m=d.length;h=2?Mn(c[0]-c[1])*2*d:d,n&&(t.ticks||t.niceTicks)){var h=(t.ticks||t.niceTicks).map(function(m){var p=a?a.indexOf(m):m;return{coordinate:i(p)+d,value:m,offset:d}});return h.filter(function(m){return!Kf(m.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(m,p){return{coordinate:i(m)+d,value:m,index:p,offset:d}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(m){return{coordinate:i(m)+d,value:m,offset:d}}):i.domain().map(function(m,p){return{coordinate:i(m)+d,value:a?a[m]:m,index:p,offset:d}})},Dy=new WeakMap,nm=function(t,n){if(typeof n!="function")return t;Dy.has(t)||Dy.set(t,new WeakMap);var r=Dy.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},nM=function(t,n,r){var i=t.scale,a=t.type,s=t.layout,c=t.axisType;if(i==="auto")return s==="radial"&&c==="radiusAxis"?{scale:Jd(),realScaleType:"band"}:s==="radial"&&c==="angleAxis"?{scale:Ap(),realScaleType:"linear"}:a==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:hd(),realScaleType:"point"}:a==="category"?{scale:Jd(),realScaleType:"band"}:{scale:Ap(),realScaleType:"linear"};if(ks(i)){var u="scale".concat(j0(i));return{scale:($3[u]||hd)(),realScaleType:$3[u]?u:"point"}}return Ce(i)?{scale:i}:{scale:hd(),realScaleType:"point"}},W3=1e-4,rM=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),a=Math.min(i[0],i[1])-W3,s=Math.max(i[0],i[1])+W3,c=t(n[0]),u=t(n[r-1]);(cs||us)&&t.domain([n[0],n[r-1]])}},Moe=function(t,n){if(!t)return null;for(var r=0,i=t.length;ri)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]=0?(t[c][r][0]=a,t[c][r][1]=a+u,a=t[c][r][1]):(t[c][r][0]=s,t[c][r][1]=s+u,s=t[c][r][1])}},Ioe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r=0?(t[s][r][0]=a,t[s][r][1]=a+c,a=t[s][r][1]):(t[s][r][0]=0,t[s][r][1]=0)}},Roe={sign:$oe,expand:nZ,none:hc,silhouette:rZ,wiggle:iZ,positive:Ioe},Foe=function(t,n,r){var i=n.map(function(c){return c.props.dataKey}),a=Roe[r],s=tZ().keys(i).value(function(c,u){return+_n(c,u,0)}).order(Fb).offset(a);return s(t)},Doe=function(t,n,r,i,a,s){if(!t)return null;var c=s?n.reverse():n,u={},d=c.reduce(function(m,p){var v,_=(v=p.type)!==null&&v!==void 0&&v.defaultProps?Ct(Ct({},p.type.defaultProps),p.props):p.props,x=_.stackId,y=_.hide;if(y)return m;var w=_[r],b=m[w]||{hasStack:!1,stackGroups:{}};if(Gt(x)){var j=b.stackGroups[x]||{numericAxisId:r,cateAxisId:i,items:[]};j.items.push(p),b.hasStack=!0,b.stackGroups[x]=j}else b.stackGroups[Yf("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[p]};return Ct(Ct({},m),{},zl({},w,b))},u),h={};return Object.keys(d).reduce(function(m,p){var v=d[p];if(v.hasStack){var _={};v.stackGroups=Object.keys(v.stackGroups).reduce(function(x,y){var w=v.stackGroups[y];return Ct(Ct({},x),{},zl({},y,{numericAxisId:r,cateAxisId:i,items:w.items,stackedData:Foe(t,w.items,a)}))},_)}return Ct(Ct({},m),{},zl({},p,v))},h)},iM=function(t,n){var r=n.realScaleType,i=n.type,a=n.tickCount,s=n.originalDomain,c=n.allowDecimals,u=r||n.scale;if(u!=="auto"&&u!=="linear")return null;if(a&&i==="number"&&s&&(s[0]==="auto"||s[1]==="auto")){var d=t.domain();if(!d.length)return null;var h=Jae(d,a,c);return t.domain([D0(h),F0(h)]),{niceTicks:h}}if(a&&i==="number"){var m=t.domain(),p=eoe(m,a,c);return{niceTicks:p}}return null},H3=function(t){var n=t.axis,r=t.ticks,i=t.offset,a=t.bandSize,s=t.entry,c=t.index;if(n.type==="category")return r[c]?r[c].coordinate+i:null;var u=_n(s,n.dataKey,n.domain[c]);return De(u)?null:n.scale(u)-a/2+i},Boe=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);return i<=0&&a>=0?0:a<0?a:i}return r[0]},zoe=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Ct(Ct({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(Gt(a)){var s=n[a];if(s){var c=s.items.indexOf(t);return c>=0?s.stackedData[c]:null}}return null},Uoe=function(t){return t.reduce(function(n,r){return[D0(r.concat([n[0]]).filter(ue)),F0(r.concat([n[1]]).filter(ue))]},[1/0,-1/0])},aM=function(t,n,r){return Object.keys(t).reduce(function(i,a){var s=t[a],c=s.stackedData,u=c.reduce(function(d,h){var m=Uoe(h.slice(n,r+1));return[Math.min(d[0],m[0]),Math.max(d[1],m[1])]},[1/0,-1/0]);return[Math.min(u[0],i[0]),Math.max(u[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},V3=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,q3=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,v1=function(t,n,r){if(Ce(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(ue(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(V3.test(t[0])){var a=+V3.exec(t[0])[1];i[0]=n[0]-a}else Ce(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(ue(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(q3.test(t[1])){var s=+q3.exec(t[1])[1];i[1]=n[1]+s}else Ce(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},Fp=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var a=x2(n,function(m){return m.coordinate}),s=1/0,c=1,u=a.length;ce.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},Xoe=function(t,n,r,i,a){var s=t.width,c=t.height,u=t.startAngle,d=t.endAngle,h=Ln(t.cx,s,s/2),m=Ln(t.cy,c,c/2),p=lM(s,c,r),v=Ln(t.innerRadius,p,0),_=Ln(t.outerRadius,p,p*.8),x=Object.keys(n);return x.reduce(function(y,w){var b=n[w],j=b.domain,E=b.reversed,P;if(De(b.range))i==="angleAxis"?P=[u,d]:i==="radiusAxis"&&(P=[v,_]),E&&(P=[P[1],P[0]]);else{P=b.range;var O=P,C=Voe(O,2);u=C[0],d=C[1]}var A=nM(b,a),T=A.realScaleType,$=A.scale;$.domain(j).range(P),rM($);var z=iM($,na(na({},b),{},{realScaleType:T})),D=na(na(na({},b),z),{},{range:P,radius:_,realScaleType:T,scale:$,cx:h,cy:m,innerRadius:v,outerRadius:_,startAngle:u,endAngle:d});return na(na({},y),{},sM({},w,D))},{})},Qoe=function(t,n){var r=t.x,i=t.y,a=n.x,s=n.y;return Math.sqrt(Math.pow(r-a,2)+Math.pow(i-s,2))},Joe=function(t,n){var r=t.x,i=t.y,a=n.cx,s=n.cy,c=Qoe({x:r,y:i},{x:a,y:s});if(c<=0)return{radius:c};var u=(r-a)/c,d=Math.acos(u);return i>s&&(d=2*Math.PI-d),{radius:c,angle:Yoe(d),angleInRadian:d}},ese=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),a=Math.floor(r/360),s=Math.min(i,a);return{startAngle:n-s*360,endAngle:r-s*360}},tse=function(t,n){var r=n.startAngle,i=n.endAngle,a=Math.floor(r/360),s=Math.floor(i/360),c=Math.min(a,s);return t+c*360},Y3=function(t,n){var r=t.x,i=t.y,a=Joe({x:r,y:i},n),s=a.radius,c=a.angle,u=n.innerRadius,d=n.outerRadius;if(sd)return!1;if(s===0)return!0;var h=ese(n),m=h.startAngle,p=h.endAngle,v=c,_;if(m<=p){for(;v>p;)v-=360;for(;v=m&&v<=p}else{for(;v>m;)v-=360;for(;v=p&&v<=m}return _?na(na({},n),{},{radius:s,angle:tse(v,n)}):null},cM=function(t){return!N.isValidElement(t)&&!Ce(t)&&typeof t!="boolean"?t.className:""};function cf(e){"@babel/helpers - typeof";return cf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cf(e)}var nse=["offset"];function rse(e){return sse(e)||ose(e)||ase(e)||ise()}function ise(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ase(e,t){if(e){if(typeof e=="string")return y1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y1(e,t)}}function ose(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function sse(e){if(Array.isArray(e))return y1(e)}function y1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cse(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function X3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ht(e){for(var t=1;t=0?1:-1,j,E;i==="insideStart"?(j=v+b*s,E=x):i==="insideEnd"?(j=_-b*s,E=!x):i==="end"&&(j=_+b*s,E=x),E=w<=0?E:!E;var P=ct(d,h,y,j),O=ct(d,h,y,j+(E?1:-1)*359),C="M".concat(P.x,",").concat(P.y,` A`).concat(y,",").concat(y,",0,1,").concat(E?0:1,`, `).concat(O.x,",").concat(O.y),A=De(t.id)?Yf("recharts-radial-line-"):t.id;return H.createElement("text",uf({},r,{dominantBaseline:"central",className:Ie("recharts-radial-bar-label",c)}),H.createElement("defs",null,H.createElement("path",{id:A,d:C})),H.createElement("textPath",{xlinkHref:"#".concat(A)},n))},gse=function(t){var n=t.viewBox,r=t.offset,i=t.position,a=n,s=a.cx,c=a.cy,u=a.innerRadius,d=a.outerRadius,h=a.startAngle,m=a.endAngle,p=(h+m)/2;if(i==="outside"){var v=ct(s,c,d+r,p),_=v.x,x=v.y;return{x:_,y:x,textAnchor:_>=s?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:s,y:c,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:s,y:c,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:s,y:c,textAnchor:"middle",verticalAnchor:"end"};var y=(u+d)/2,w=ct(s,c,y,p),b=w.x,j=w.y;return{x:b,y:j,textAnchor:"middle",verticalAnchor:"middle"}},vse=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,a=t.position,s=n,c=s.x,u=s.y,d=s.width,h=s.height,m=h>=0?1:-1,p=m*i,v=m>0?"end":"start",_=m>0?"start":"end",x=d>=0?1:-1,y=x*i,w=x>0?"end":"start",b=x>0?"start":"end";if(a==="top"){var j={x:c+d/2,y:u-m*i,textAnchor:"middle",verticalAnchor:v};return Ht(Ht({},j),r?{height:Math.max(u-r.y,0),width:d}:{})}if(a==="bottom"){var E={x:c+d/2,y:u+h+p,textAnchor:"middle",verticalAnchor:_};return Ht(Ht({},E),r?{height:Math.max(r.y+r.height-(u+h),0),width:d}:{})}if(a==="left"){var P={x:c-y,y:u+h/2,textAnchor:w,verticalAnchor:"middle"};return Ht(Ht({},P),r?{width:Math.max(P.x-r.x,0),height:h}:{})}if(a==="right"){var O={x:c+d+y,y:u+h/2,textAnchor:b,verticalAnchor:"middle"};return Ht(Ht({},O),r?{width:Math.max(r.x+r.width-O.x,0),height:h}:{})}var C=r?{width:d,height:h}:{};return a==="insideLeft"?Ht({x:c+y,y:u+h/2,textAnchor:b,verticalAnchor:"middle"},C):a==="insideRight"?Ht({x:c+d-y,y:u+h/2,textAnchor:w,verticalAnchor:"middle"},C):a==="insideTop"?Ht({x:c+d/2,y:u+p,textAnchor:"middle",verticalAnchor:_},C):a==="insideBottom"?Ht({x:c+d/2,y:u+h-p,textAnchor:"middle",verticalAnchor:v},C):a==="insideTopLeft"?Ht({x:c+y,y:u+p,textAnchor:b,verticalAnchor:_},C):a==="insideTopRight"?Ht({x:c+d-y,y:u+p,textAnchor:w,verticalAnchor:_},C):a==="insideBottomLeft"?Ht({x:c+y,y:u+h-p,textAnchor:b,verticalAnchor:v},C):a==="insideBottomRight"?Ht({x:c+d-y,y:u+h-p,textAnchor:w,verticalAnchor:v},C):Kc(a)&&(ue(a.x)||os(a.x))&&(ue(a.y)||os(a.y))?Ht({x:c+Ln(a.x,d),y:u+Ln(a.y,h),textAnchor:"end",verticalAnchor:"end"},C):Ht({x:c+d/2,y:u+h/2,textAnchor:"middle",verticalAnchor:"middle"},C)},yse=function(t){return"cx"in t&&ue(t.cx)};function en(e){var t=e.offset,n=t===void 0?5:t,r=lse(e,nse),i=Ht({offset:n},r),a=i.viewBox,s=i.position,c=i.value,u=i.children,d=i.content,h=i.className,m=h===void 0?"":h,p=i.textBreakAll;if(!a||De(c)&&De(u)&&!N.isValidElement(d)&&!Ce(d))return null;if(N.isValidElement(d))return N.cloneElement(d,i);var v;if(Ce(d)){if(v=N.createElement(d,i),N.isValidElement(v))return v}else v=hse(i);var _=yse(a),x=ke(i,!0);if(_&&(s==="insideStart"||s==="insideEnd"||s==="end"))return pse(i,v,x);var y=_?gse(i):vse(i);return H.createElement(As,uf({className:Ie("recharts-label",m)},x,y,{breakAll:p}),v)}en.displayName="Label";var uM=function(t){var n=t.cx,r=t.cy,i=t.angle,a=t.startAngle,s=t.endAngle,c=t.r,u=t.radius,d=t.innerRadius,h=t.outerRadius,m=t.x,p=t.y,v=t.top,_=t.left,x=t.width,y=t.height,w=t.clockWise,b=t.labelViewBox;if(b)return b;if(ue(x)&&ue(y)){if(ue(m)&&ue(p))return{x:m,y:p,width:x,height:y};if(ue(v)&&ue(_))return{x:v,y:_,width:x,height:y}}return ue(m)&&ue(p)?{x:m,y:p,width:0,height:0}:ue(n)&&ue(r)?{cx:n,cy:r,startAngle:a||i||0,endAngle:s||i||0,innerRadius:d||0,outerRadius:h||u||c||0,clockWise:w}:t.viewBox?t.viewBox:{}},xse=function(t,n){return t?t===!0?H.createElement(en,{key:"label-implicit",viewBox:n}):Gt(t)?H.createElement(en,{key:"label-implicit",viewBox:n,value:t}):N.isValidElement(t)?t.type===en?N.cloneElement(t,{key:"label-implicit",viewBox:n}):H.createElement(en,{key:"label-implicit",content:t,viewBox:n}):Ce(t)?H.createElement(en,{key:"label-implicit",content:t,viewBox:n}):Kc(t)?H.createElement(en,uf({viewBox:n},t,{key:"label-implicit"})):null:null},bse=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,a=uM(t),s=Dr(i,en).map(function(u,d){return N.cloneElement(u,{viewBox:n||a,key:"label-".concat(d)})});if(!r)return s;var c=xse(t.label,n||a);return[c].concat(rse(s))};en.parseViewBox=uM;en.renderCallByParent=bse;function wse(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var _se=wse;const jse=Je(_se);function df(e){"@babel/helpers - typeof";return df=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},df(e)}var Nse=["valueAccessor"],Sse=["data","dataKey","clockWise","id","textBreakAll"];function Pse(e){return Cse(e)||kse(e)||Ose(e)||Ese()}function Ese(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ose(e,t){if(e){if(typeof e=="string")return x1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return x1(e,t)}}function kse(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Cse(e){if(Array.isArray(e))return x1(e)}function x1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Lse(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var $se=function(t){return Array.isArray(t.value)?jse(t.value):t.value};function No(e){var t=e.valueAccessor,n=t===void 0?$se:t,r=eE(e,Nse),i=r.data,a=r.dataKey,s=r.clockWise,c=r.id,u=r.textBreakAll,d=eE(r,Sse);return!i||!i.length?null:H.createElement(Xe,{className:"recharts-label-list"},i.map(function(h,m){var p=De(a)?n(h,m):_n(h&&h.payload,a),v=De(c)?{}:{id:"".concat(c,"-").concat(m)};return H.createElement(en,Bp({},ke(h,!0),d,v,{parentViewBox:h.parentViewBox,value:p,textBreakAll:u,viewBox:en.parseViewBox(De(s)?h:J3(J3({},h),{},{clockWise:s})),key:"label-".concat(m),index:m}))}))}No.displayName="LabelList";function Ise(e,t){return e?e===!0?H.createElement(No,{key:"labelList-implicit",data:t}):H.isValidElement(e)||Ce(e)?H.createElement(No,{key:"labelList-implicit",data:t,content:e}):Kc(e)?H.createElement(No,Bp({data:t},e,{key:"labelList-implicit"})):null:null}function Rse(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=Dr(r,No).map(function(s,c){return N.cloneElement(s,{data:t,key:"labelList-".concat(c)})});if(!n)return i;var a=Ise(e.label,t);return[a].concat(Pse(i))}No.renderCallByParent=Rse;function ff(e){"@babel/helpers - typeof";return ff=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ff(e)}function b1(){return b1=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(s>d),`, `).concat(m.x,",").concat(m.y,` `);if(i>0){var v=ct(n,r,i,s),_=ct(n,r,i,d);p+="L ".concat(_.x,",").concat(_.y,` A `).concat(i,",").concat(i,`,0, `).concat(+(Math.abs(u)>180),",").concat(+(s<=d),`, `).concat(v.x,",").concat(v.y," Z")}else p+="L ".concat(n,",").concat(r," Z");return p},Use=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,s=t.cornerRadius,c=t.forceCornerRadius,u=t.cornerIsExternal,d=t.startAngle,h=t.endAngle,m=Mn(h-d),p=rm({cx:n,cy:r,radius:a,angle:d,sign:m,cornerRadius:s,cornerIsExternal:u}),v=p.circleTangency,_=p.lineTangency,x=p.theta,y=rm({cx:n,cy:r,radius:a,angle:h,sign:-m,cornerRadius:s,cornerIsExternal:u}),w=y.circleTangency,b=y.lineTangency,j=y.theta,E=u?Math.abs(d-h):Math.abs(d-h)-x-j;if(E<0)return c?"M ".concat(_.x,",").concat(_.y,` a`).concat(s,",").concat(s,",0,0,1,").concat(s*2,`,0 a`).concat(s,",").concat(s,",0,0,1,").concat(-s*2,`,0 `):dM({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:d,endAngle:h});var P="M ".concat(_.x,",").concat(_.y,` A`).concat(s,",").concat(s,",0,0,").concat(+(m<0),",").concat(v.x,",").concat(v.y,` A`).concat(a,",").concat(a,",0,").concat(+(E>180),",").concat(+(m<0),",").concat(w.x,",").concat(w.y,` A`).concat(s,",").concat(s,",0,0,").concat(+(m<0),",").concat(b.x,",").concat(b.y,` `);if(i>0){var O=rm({cx:n,cy:r,radius:i,angle:d,sign:m,isExternal:!0,cornerRadius:s,cornerIsExternal:u}),C=O.circleTangency,A=O.lineTangency,T=O.theta,$=rm({cx:n,cy:r,radius:i,angle:h,sign:-m,isExternal:!0,cornerRadius:s,cornerIsExternal:u}),z=$.circleTangency,D=$.lineTangency,Z=$.theta,I=u?Math.abs(d-h):Math.abs(d-h)-T-Z;if(I<0&&s===0)return"".concat(P,"L").concat(n,",").concat(r,"Z");P+="L".concat(D.x,",").concat(D.y,` A`).concat(s,",").concat(s,",0,0,").concat(+(m<0),",").concat(z.x,",").concat(z.y,` A`).concat(i,",").concat(i,",0,").concat(+(I>180),",").concat(+(m>0),",").concat(C.x,",").concat(C.y,` A`).concat(s,",").concat(s,",0,0,").concat(+(m<0),",").concat(A.x,",").concat(A.y,"Z")}else P+="L".concat(n,",").concat(r,"Z");return P},Wse={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},fM=function(t){var n=nE(nE({},Wse),t),r=n.cx,i=n.cy,a=n.innerRadius,s=n.outerRadius,c=n.cornerRadius,u=n.forceCornerRadius,d=n.cornerIsExternal,h=n.startAngle,m=n.endAngle,p=n.className;if(s0&&Math.abs(h-m)<360?y=Use({cx:r,cy:i,innerRadius:a,outerRadius:s,cornerRadius:Math.min(x,_/2),forceCornerRadius:u,cornerIsExternal:d,startAngle:h,endAngle:m}):y=dM({cx:r,cy:i,innerRadius:a,outerRadius:s,startAngle:h,endAngle:m}),H.createElement("path",b1({},ke(n,!0),{className:v,d:y,role:"img"}))};function hf(e){"@babel/helpers - typeof";return hf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hf(e)}function w1(){return w1=Object.assign?Object.assign.bind():function(e){for(var t=1;tnle.call(e,t));function Zs(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const ale="__v",ole="__o",sle="_owner",{getOwnPropertyDescriptor:sE,keys:lE}=Object;function lle(e,t){return e.byteLength===t.byteLength&&zp(new Uint8Array(e),new Uint8Array(t))}function cle(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function ule(e,t){return e.byteLength===t.byteLength&&zp(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function dle(e,t){return Zs(e.getTime(),t.getTime())}function fle(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function hle(e,t){return e===t}function cE(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),a=e.entries();let s,c,u=0;for(;(s=a.next())&&!s.done;){const d=t.entries();let h=!1,m=0;for(;(c=d.next())&&!c.done;){if(i[m]){m++;continue}const p=s.value,v=c.value;if(n.equals(p[0],v[0],u,m,e,t,n)&&n.equals(p[1],v[1],p[0],v[0],e,t,n)){h=i[m]=!0;break}m++}if(!h)return!1;u++}return!0}const mle=Zs;function ple(e,t,n){const r=lE(e);let i=r.length;if(lE(t).length!==i)return!1;for(;i-- >0;)if(!gM(e,t,n,r[i]))return!1;return!0}function Ru(e,t,n){const r=oE(e);let i=r.length;if(oE(t).length!==i)return!1;let a,s,c;for(;i-- >0;)if(a=r[i],!gM(e,t,n,a)||(s=sE(e,a),c=sE(t,a),(s||c)&&(!s||!c||s.configurable!==c.configurable||s.enumerable!==c.enumerable||s.writable!==c.writable)))return!1;return!0}function gle(e,t){return Zs(e.valueOf(),t.valueOf())}function vle(e,t){return e.source===t.source&&e.flags===t.flags}function uE(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),a=e.values();let s,c;for(;(s=a.next())&&!s.done;){const u=t.values();let d=!1,h=0;for(;(c=u.next())&&!c.done;){if(!i[h]&&n.equals(s.value,c.value,s.value,c.value,e,t,n)){d=i[h]=!0;break}h++}if(!d)return!1}return!0}function zp(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function yle(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function gM(e,t,n,r){return(r===sle||r===ole||r===ale)&&(e.$$typeof||t.$$typeof)?!0:ile(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const xle="[object ArrayBuffer]",ble="[object Arguments]",wle="[object Boolean]",_le="[object DataView]",jle="[object Date]",Nle="[object Error]",Sle="[object Map]",Ple="[object Number]",Ele="[object Object]",Ole="[object RegExp]",kle="[object Set]",Cle="[object String]",Ale={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},Tle="[object URL]",Mle=Object.prototype.toString;function Lle({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:s,areNumbersEqual:c,areObjectsEqual:u,arePrimitiveWrappersEqual:d,areRegExpsEqual:h,areSetsEqual:m,areTypedArraysEqual:p,areUrlsEqual:v,unknownTagComparators:_}){return function(y,w,b){if(y===w)return!0;if(y==null||w==null)return!1;const j=typeof y;if(j!==typeof w)return!1;if(j!=="object")return j==="number"?c(y,w,b):j==="function"?a(y,w,b):!1;const E=y.constructor;if(E!==w.constructor)return!1;if(E===Object)return u(y,w,b);if(Array.isArray(y))return t(y,w,b);if(E===Date)return r(y,w,b);if(E===RegExp)return h(y,w,b);if(E===Map)return s(y,w,b);if(E===Set)return m(y,w,b);const P=Mle.call(y);if(P===jle)return r(y,w,b);if(P===Ole)return h(y,w,b);if(P===Sle)return s(y,w,b);if(P===kle)return m(y,w,b);if(P===Ele)return typeof y.then!="function"&&typeof w.then!="function"&&u(y,w,b);if(P===Tle)return v(y,w,b);if(P===Nle)return i(y,w,b);if(P===ble)return u(y,w,b);if(Ale[P])return p(y,w,b);if(P===xle)return e(y,w,b);if(P===_le)return n(y,w,b);if(P===wle||P===Ple||P===Cle)return d(y,w,b);if(_){let O=_[P];if(!O){const C=rle(y);C&&(O=_[C])}if(O)return O(y,w,b)}return!1}}function $le({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:lle,areArraysEqual:n?Ru:cle,areDataViewsEqual:ule,areDatesEqual:dle,areErrorsEqual:fle,areFunctionsEqual:hle,areMapsEqual:n?By(cE,Ru):cE,areNumbersEqual:mle,areObjectsEqual:n?Ru:ple,arePrimitiveWrappersEqual:gle,areRegExpsEqual:vle,areSetsEqual:n?By(uE,Ru):uE,areTypedArraysEqual:n?By(zp,Ru):zp,areUrlsEqual:yle,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const i=am(r.areArraysEqual),a=am(r.areMapsEqual),s=am(r.areObjectsEqual),c=am(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:c})}return r}function Ile(e){return function(t,n,r,i,a,s,c){return e(t,n,c)}}function Rle({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(c,u){const{cache:d=e?new WeakMap:void 0,meta:h}=n();return t(c,u,{cache:d,equals:r,meta:h,strict:i})};if(e)return function(c,u){return t(c,u,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const a={cache:void 0,equals:r,meta:void 0,strict:i};return function(c,u){return t(c,u,a)}}const Fle=$o();$o({strict:!0});$o({circular:!0});$o({circular:!0,strict:!0});$o({createInternalComparator:()=>Zs});$o({strict:!0,createInternalComparator:()=>Zs});$o({circular:!0,createInternalComparator:()=>Zs});$o({circular:!0,createInternalComparator:()=>Zs,strict:!0});function $o(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=$le(e),s=Lle(a),c=n?n(s):Ile(s);return Rle({circular:t,comparator:s,createState:r,equals:c,strict:i})}function Dle(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function dE(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(a){n<0&&(n=a),a-n>t?(e(a),n=-1):Dle(i)};requestAnimationFrame(r)}function j1(e){"@babel/helpers - typeof";return j1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},j1(e)}function Ble(e){return Hle(e)||Wle(e)||Ule(e)||zle()}function zle(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ule(e,t){if(e){if(typeof e=="string")return fE(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fE(e,t)}}function fE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?1:w<0?0:w},x=function(w){for(var b=w>1?1:w,j=b,E=0;E<8;++E){var P=m(j)-b,O=v(j);if(Math.abs(P-b)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,a=i===void 0?8:i,s=t.dt,c=s===void 0?17:s,u=function(h,m,p){var v=-(h-m)*r,_=p*a,x=p+(v-_)*c/1e3,y=p*c/1e3+h;return Math.abs(y-m)e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wce(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function zy(e){return Sce(e)||Nce(e)||jce(e)||_ce()}function _ce(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jce(e,t){if(e){if(typeof e=="string")return O1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return O1(e,t)}}function Nce(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Sce(e){if(Array.isArray(e))return O1(e)}function O1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Hp(e){return Hp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Hp(e)}var Ca=function(e){Cce(n,e);var t=Ace(n);function n(r,i){var a;Pce(this,n),a=t.call(this,r,i);var s=a.props,c=s.isActive,u=s.attributeName,d=s.from,h=s.to,m=s.steps,p=s.children,v=s.duration;if(a.handleStyleChange=a.handleStyleChange.bind(A1(a)),a.changeStyle=a.changeStyle.bind(A1(a)),!c||v<=0)return a.state={style:{}},typeof p=="function"&&(a.state={style:h}),C1(a);if(m&&m.length)a.state={style:m[0].style};else if(d){if(typeof p=="function")return a.state={style:d},C1(a);a.state={style:u?Gu({},u,d):d}}else a.state={style:{}};return a}return Oce(n,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,s=i.canBegin;this.mounted=!0,!(!a||!s)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,s=a.isActive,c=a.canBegin,u=a.attributeName,d=a.shouldReAnimate,h=a.to,m=a.from,p=this.state.style;if(c){if(!s){var v={style:u?Gu({},u,h):h};this.state&&p&&(u&&p[u]!==h||!u&&p!==h)&&this.setState(v);return}if(!(Fle(i.to,h)&&i.canBegin&&i.isActive)){var _=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var x=_||d?m:i.to;if(this.state&&p){var y={style:u?Gu({},u,x):x};(u&&p[u]!==x||!u&&p!==x)&&this.setState(y)}this.runAnimation(Qr(Qr({},this.props),{},{from:x,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,s=i.from,c=i.to,u=i.duration,d=i.easing,h=i.begin,m=i.onAnimationEnd,p=i.onAnimationStart,v=yce(s,c,sce(d),u,this.changeStyle),_=function(){a.stopJSAnimation=v()};this.manager.start([p,h,_,u,m])}},{key:"runStepAnimation",value:function(i){var a=this,s=i.steps,c=i.begin,u=i.onAnimationStart,d=s[0],h=d.style,m=d.duration,p=m===void 0?0:m,v=function(x,y,w){if(w===0)return x;var b=y.duration,j=y.easing,E=j===void 0?"ease":j,P=y.style,O=y.properties,C=y.onAnimationEnd,A=w>0?s[w-1]:y,T=O||Object.keys(P);if(typeof E=="function"||E==="spring")return[].concat(zy(x),[a.runJSAnimation.bind(a,{from:A.style,to:P,duration:b,easing:E}),b]);var $=pE(T,b,E),z=Qr(Qr(Qr({},A.style),P),{},{transition:$});return[].concat(zy(x),[z,b,C]).filter(Kle)};return this.manager.start([u].concat(zy(s.reduce(v,[h,Math.max(p,c)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=Vle());var a=i.begin,s=i.duration,c=i.attributeName,u=i.to,d=i.easing,h=i.onAnimationStart,m=i.onAnimationEnd,p=i.steps,v=i.children,_=this.manager;if(this.unSubscribe=_.subscribe(this.handleStyleChange),typeof d=="function"||typeof v=="function"||d==="spring"){this.runJSAnimation(i);return}if(p.length>1){this.runStepAnimation(i);return}var x=c?Gu({},c,u):u,y=pE(Object.keys(x),s,d);_.start([h,a,Qr(Qr({},x),{},{transition:y}),s,m])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var s=i.duration;i.attributeName,i.easing;var c=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var u=bce(i,xce),d=N.Children.count(a),h=this.state.style;if(typeof a=="function")return a(h);if(!c||d===0||s<=0)return a;var m=function(v){var _=v.props,x=_.style,y=x===void 0?{}:x,w=_.className,b=N.cloneElement(v,Qr(Qr({},u),{},{style:Qr(Qr({},y),h),className:w}));return b};return d===1?m(N.Children.only(a)):H.createElement("div",null,N.Children.map(a,function(p){return m(p)}))}}]),n}(N.PureComponent);Ca.displayName="Animate";Ca.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Ca.propTypes={from:re.oneOfType([re.object,re.string]),to:re.oneOfType([re.object,re.string]),attributeName:re.string,duration:re.number,begin:re.number,easing:re.oneOfType([re.string,re.func]),steps:re.arrayOf(re.shape({duration:re.number.isRequired,style:re.object.isRequired,easing:re.oneOfType([re.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),re.func]),properties:re.arrayOf("string"),onAnimationEnd:re.func})),children:re.oneOfType([re.node,re.func]),isActive:re.bool,canBegin:re.bool,onAnimationEnd:re.func,shouldReAnimate:re.bool,onAnimationStart:re.func,onAnimationReStart:re.func};function gf(e){"@babel/helpers - typeof";return gf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gf(e)}function Vp(){return Vp=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,u=r>=0?1:-1,d=i>=0&&r>=0||i<0&&r<0?1:0,h;if(s>0&&a instanceof Array){for(var m=[0,0,0,0],p=0,v=4;ps?s:a[p];h="M".concat(t,",").concat(n+c*m[0]),m[0]>0&&(h+="A ".concat(m[0],",").concat(m[0],",0,0,").concat(d,",").concat(t+u*m[0],",").concat(n)),h+="L ".concat(t+r-u*m[1],",").concat(n),m[1]>0&&(h+="A ".concat(m[1],",").concat(m[1],",0,0,").concat(d,`, `).concat(t+r,",").concat(n+c*m[1])),h+="L ".concat(t+r,",").concat(n+i-c*m[2]),m[2]>0&&(h+="A ".concat(m[2],",").concat(m[2],",0,0,").concat(d,`, `).concat(t+r-u*m[2],",").concat(n+i)),h+="L ".concat(t+u*m[3],",").concat(n+i),m[3]>0&&(h+="A ".concat(m[3],",").concat(m[3],",0,0,").concat(d,`, `).concat(t,",").concat(n+i-c*m[3])),h+="Z"}else if(s>0&&a===+a&&a>0){var _=Math.min(s,a);h="M ".concat(t,",").concat(n+c*_,` A `).concat(_,",").concat(_,",0,0,").concat(d,",").concat(t+u*_,",").concat(n,` L `).concat(t+r-u*_,",").concat(n,` A `).concat(_,",").concat(_,",0,0,").concat(d,",").concat(t+r,",").concat(n+c*_,` L `).concat(t+r,",").concat(n+i-c*_,` A `).concat(_,",").concat(_,",0,0,").concat(d,",").concat(t+r-u*_,",").concat(n+i,` L `).concat(t+u*_,",").concat(n+i,` A `).concat(_,",").concat(_,",0,0,").concat(d,",").concat(t,",").concat(n+i-c*_," Z")}else h="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return h},zce=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,a=n.x,s=n.y,c=n.width,u=n.height;if(Math.abs(c)>0&&Math.abs(u)>0){var d=Math.min(a,a+c),h=Math.max(a,a+c),m=Math.min(s,s+u),p=Math.max(s,s+u);return r>=d&&r<=h&&i>=m&&i<=p}return!1},Uce={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},q2=function(t){var n=jE(jE({},Uce),t),r=N.useRef(),i=N.useState(-1),a=Mce(i,2),s=a[0],c=a[1];N.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var E=r.current.getTotalLength();E&&c(E)}catch{}},[]);var u=n.x,d=n.y,h=n.width,m=n.height,p=n.radius,v=n.className,_=n.animationEasing,x=n.animationDuration,y=n.animationBegin,w=n.isAnimationActive,b=n.isUpdateAnimationActive;if(u!==+u||d!==+d||h!==+h||m!==+m||h===0||m===0)return null;var j=Ie("recharts-rectangle",v);return b?H.createElement(Ca,{canBegin:s>0,from:{width:h,height:m,x:u,y:d},to:{width:h,height:m,x:u,y:d},duration:x,animationEasing:_,isActive:b},function(E){var P=E.width,O=E.height,C=E.x,A=E.y;return H.createElement(Ca,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:x,isActive:w,easing:_},H.createElement("path",Vp({},ke(n,!0),{className:j,d:NE(C,A,P,O,p),ref:r})))}):H.createElement("path",Vp({},ke(n,!0),{className:j,d:NE(u,d,h,m,p)}))},Wce=["points","className","baseLinePoints","connectNulls"];function Pl(){return Pl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Vce(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function SE(e){return Kce(e)||Gce(e)||Zce(e)||qce()}function qce(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zce(e,t){if(e){if(typeof e=="string")return T1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return T1(e,t)}}function Gce(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Kce(e){if(Array.isArray(e))return T1(e)}function T1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){PE(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),PE(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},gd=function(t,n){var r=Yce(t);n&&(r=[r.reduce(function(a,s){return[].concat(SE(a),SE(s))},[])]);var i=r.map(function(a){return a.reduce(function(s,c,u){return"".concat(s).concat(u===0?"M":"L").concat(c.x,",").concat(c.y)},"")}).join("");return r.length===1?"".concat(i,"Z"):i},Xce=function(t,n,r){var i=gd(t,r);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(gd(n.reverse(),r).slice(1))},Qce=function(t){var n=t.points,r=t.className,i=t.baseLinePoints,a=t.connectNulls,s=Hce(t,Wce);if(!n||!n.length)return null;var c=Ie("recharts-polygon",r);if(i&&i.length){var u=s.stroke&&s.stroke!=="none",d=Xce(n,i,a);return H.createElement("g",{className:c},H.createElement("path",Pl({},ke(s,!0),{fill:d.slice(-1)==="Z"?s.fill:"none",stroke:"none",d})),u?H.createElement("path",Pl({},ke(s,!0),{fill:"none",d:gd(n,a)})):null,u?H.createElement("path",Pl({},ke(s,!0),{fill:"none",d:gd(i,a)})):null)}var h=gd(n,a);return H.createElement("path",Pl({},ke(s,!0),{fill:h.slice(-1)==="Z"?s.fill:"none",className:c,d:h}))};function M1(){return M1=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function aue(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var oue=function(t,n,r,i,a,s){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(s,",").concat(n,"h").concat(r)},sue=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,s=t.top,c=s===void 0?0:s,u=t.left,d=u===void 0?0:u,h=t.width,m=h===void 0?0:h,p=t.height,v=p===void 0?0:p,_=t.className,x=iue(t,Jce),y=eue({x:r,y:a,top:c,left:d,width:m,height:v},x);return!ue(r)||!ue(a)||!ue(m)||!ue(v)||!ue(c)||!ue(d)?null:H.createElement("path",L1({},ke(y,!0),{className:Ie("recharts-cross",_),d:oue(r,a,m,v,c,d)}))},lue=R0,cue=L6,uue=Hi;function due(e,t){return e&&e.length?lue(e,uue(t),cue):void 0}var fue=due;const hue=Je(fue);var mue=R0,pue=Hi,gue=$6;function vue(e,t){return e&&e.length?mue(e,pue(t),gue):void 0}var yue=vue;const xue=Je(yue);var bue=["cx","cy","angle","ticks","axisLine"],wue=["ticks","tick","angle","tickFormatter","stroke"];function jc(e){"@babel/helpers - typeof";return jc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jc(e)}function vd(){return vd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _ue(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function jue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CE(e,t){for(var n=0;nME?s=i==="outer"?"start":"end":a<-ME?s=i==="outer"?"end":"start":s="middle",s}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,a=r.cy,s=r.radius,c=r.axisLine,u=r.axisLineType,d=Ho(Ho({},ke(this.props,!1)),{},{fill:"none"},ke(c,!1));if(u==="circle")return H.createElement(Z2,es({className:"recharts-polar-angle-axis-line"},d,{cx:i,cy:a,r:s}));var h=this.props.ticks,m=h.map(function(p){return ct(i,a,s,p.coordinate)});return H.createElement(Qce,es({className:"recharts-polar-angle-axis-line"},d,{points:m}))}},{key:"renderTicks",value:function(){var r=this,i=this.props,a=i.ticks,s=i.tick,c=i.tickLine,u=i.tickFormatter,d=i.stroke,h=ke(this.props,!1),m=ke(s,!1),p=Ho(Ho({},h),{},{fill:"none"},ke(c,!1)),v=a.map(function(_,x){var y=r.getTickLineCoord(_),w=r.getTickTextAnchor(_),b=Ho(Ho(Ho({textAnchor:w},h),{},{stroke:"none",fill:d},m),{},{index:x,payload:_,x:y.x2,y:y.y2});return H.createElement(Xe,es({className:Ie("recharts-polar-angle-axis-tick",cM(s)),key:"tick-".concat(_.coordinate)},Cs(r.props,_,x)),c&&H.createElement("line",es({className:"recharts-polar-angle-axis-tick-line"},p,y)),s&&t.renderTickItem(s,b,u?u(_.value,x):_.value))});return H.createElement(Xe,{className:"recharts-polar-angle-axis-ticks"},v)}},{key:"render",value:function(){var r=this.props,i=r.ticks,a=r.radius,s=r.axisLine;return a<=0||!i||!i.length?null:H.createElement(Xe,{className:Ie("recharts-polar-angle-axis",this.props.className)},s&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,i,a){var s;return H.isValidElement(r)?s=H.cloneElement(r,i):Ce(r)?s=r(i):s=H.createElement(As,es({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),s}}])}(N.PureComponent);q0(Z0,"displayName","PolarAngleAxis");q0(Z0,"axisType","angleAxis");q0(Z0,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var Fue=ET,Due=Fue(Object.getPrototypeOf,Object),Bue=Due,zue=$a,Uue=Bue,Wue=Ia,Hue="[object Object]",Vue=Function.prototype,que=Object.prototype,EM=Vue.toString,Zue=que.hasOwnProperty,Gue=EM.call(Object);function Kue(e){if(!Wue(e)||zue(e)!=Hue)return!1;var t=Uue(e);if(t===null)return!0;var n=Zue.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&EM.call(n)==Gue}var Yue=Kue;const Xue=Je(Yue);var Que=$a,Jue=Ia,ede="[object Boolean]";function tde(e){return e===!0||e===!1||Jue(e)&&Que(e)==ede}var nde=tde;const rde=Je(nde);function yf(e){"@babel/helpers - typeof";return yf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yf(e)}function Gp(){return Gp=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:p,x:u,y:d},to:{upperWidth:h,lowerWidth:m,height:p,x:u,y:d},duration:x,animationEasing:_,isActive:w},function(j){var E=j.upperWidth,P=j.lowerWidth,O=j.height,C=j.x,A=j.y;return H.createElement(Ca,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:x,easing:_},H.createElement("path",Gp({},ke(n,!0),{className:b,d:RE(C,A,E,P,O),ref:r})))}):H.createElement("g",null,H.createElement("path",Gp({},ke(n,!0),{className:b,d:RE(u,d,h,m,p)})))},mde=["option","shapeType","propTransformer","activeClassName","isActive"];function xf(e){"@babel/helpers - typeof";return xf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xf(e)}function pde(e,t){if(e==null)return{};var n=gde(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function gde(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function FE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Kp(e){for(var t=1;t0?gr(j,"paddingAngle",0):0;if(P){var C=qa(P.endAngle-P.startAngle,j.endAngle-j.startAngle),A=ot(ot({},j),{},{startAngle:b+O,endAngle:b+C(x)+O});y.push(A),b=A.endAngle}else{var T=j.endAngle,$=j.startAngle,z=qa(0,T-$),D=z(x),Z=ot(ot({},j),{},{startAngle:b+O,endAngle:b+D+O});y.push(Z),b=Z.endAngle}}),H.createElement(Xe,null,r.renderSectorsStatically(y))})}},{key:"attachKeyboardHandlers",value:function(r){var i=this;r.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var s=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[s].focus(),i.setState({sectorToFocus:s});break}case"ArrowRight":{var c=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[c].focus(),i.setState({sectorToFocus:c});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,i=r.sectors,a=r.isAnimationActive,s=this.state.prevSectors;return a&&i&&i.length&&(!s||!B0(s,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,i=this.props,a=i.hide,s=i.sectors,c=i.className,u=i.label,d=i.cx,h=i.cy,m=i.innerRadius,p=i.outerRadius,v=i.isAnimationActive,_=this.state.isAnimationFinished;if(a||!s||!s.length||!ue(d)||!ue(h)||!ue(m)||!ue(p))return null;var x=Ie("recharts-pie",c);return H.createElement(Xe,{tabIndex:this.props.rootTabIndex,className:x,ref:function(w){r.pieRef=w}},this.renderSectors(),u&&this.renderLabels(s),en.renderCallByParent(this.props,null,!1),(!v||_)&&No.renderCallByParent(this.props,s,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return i.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:r.sectors!==i.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,i){return r>i?"start":r=360?b:b-1)*u,E=y-b*v-j,P=i.reduce(function(A,T){var $=_n(T,w,0);return A+(ue($)?$:0)},0),O;if(P>0){var C;O=i.map(function(A,T){var $=_n(A,w,0),z=_n(A,h,T),D=(ue($)?$:0)/P,Z;T?Z=C.endAngle+Mn(x)*u*($!==0?1:0):Z=s;var I=Z+Mn(x)*(($!==0?v:0)+D*E),F=(Z+I)/2,B=(_.innerRadius+_.outerRadius)/2,G=[{name:z,value:$,payload:A,dataKey:w,type:p}],R=ct(_.cx,_.cy,B,F);return C=ot(ot(ot({percent:D,cornerRadius:a,name:z,tooltipPayload:G,midAngle:F,middleRadius:B,tooltipPosition:R},A),_),{},{value:_n(A,w),startAngle:Z,endAngle:I,payload:A,paddingAngle:Mn(x)*u}),C})}return ot(ot({},_),{},{sectors:O,data:i})});var Rde=Math.ceil,Fde=Math.max;function Dde(e,t,n,r){for(var i=-1,a=Fde(Rde((t-e)/(n||1)),0),s=Array(a);a--;)s[r?a:++i]=e,e+=n;return s}var Bde=Dde,zde=qT,UE=1/0,Ude=17976931348623157e292;function Wde(e){if(!e)return e===0?e:0;if(e=zde(e),e===UE||e===-UE){var t=e<0?-1:1;return t*Ude}return e===e?e:0}var AM=Wde,Hde=Bde,Vde=k0,Uy=AM;function qde(e){return function(t,n,r){return r&&typeof r!="number"&&Vde(t,n,r)&&(n=r=void 0),t=Uy(t),n===void 0?(n=t,t=0):n=Uy(n),r=r===void 0?t0&&r.handleDrag(i.changedTouches[0])}),ir(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,a=i.endIndex,s=i.onDragEnd,c=i.startIndex;s==null||s({endIndex:a,startIndex:c})}),r.detachDragEndListener()}),ir(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),ir(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),ir(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),ir(r,"handleSlideDragStart",function(i){var a=ZE(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return ofe(t,e),nfe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,a=r.endX,s=this.state.scaleValues,c=this.props,u=c.gap,d=c.data,h=d.length-1,m=Math.min(i,a),p=Math.max(i,a),v=t.getIndexInRange(s,m),_=t.getIndexInRange(s,p);return{startIndex:v-v%u,endIndex:_===h?h:_-_%u}}},{key:"getTextOfTick",value:function(r){var i=this.props,a=i.data,s=i.tickFormatter,c=i.dataKey,u=_n(a[r],c,r);return Ce(s)?s(u,r):u}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,a=i.slideMoveStartX,s=i.startX,c=i.endX,u=this.props,d=u.x,h=u.width,m=u.travellerWidth,p=u.startIndex,v=u.endIndex,_=u.onChange,x=r.pageX-a;x>0?x=Math.min(x,d+h-m-c,d+h-m-s):x<0&&(x=Math.max(x,d-s,d-c));var y=this.getIndex({startX:s+x,endX:c+x});(y.startIndex!==p||y.endIndex!==v)&&_&&_(y),this.setState({startX:s+x,endX:c+x,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var a=ZE(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,a=i.brushMoveStartX,s=i.movingTravellerId,c=i.endX,u=i.startX,d=this.state[s],h=this.props,m=h.x,p=h.width,v=h.travellerWidth,_=h.onChange,x=h.gap,y=h.data,w={startX:this.state.startX,endX:this.state.endX},b=r.pageX-a;b>0?b=Math.min(b,m+p-v-d):b<0&&(b=Math.max(b,m-d)),w[s]=d+b;var j=this.getIndex(w),E=j.startIndex,P=j.endIndex,O=function(){var A=y.length-1;return s==="startX"&&(c>u?E%x===0:P%x===0)||cu?P%x===0:E%x===0)||c>u&&P===A};this.setState(ir(ir({},s,d+b),"brushMoveStartX",r.pageX),function(){_&&O()&&_(j)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var a=this,s=this.state,c=s.scaleValues,u=s.startX,d=s.endX,h=this.state[i],m=c.indexOf(h);if(m!==-1){var p=m+r;if(!(p===-1||p>=c.length)){var v=c[p];i==="startX"&&v>=d||i==="endX"&&v<=u||this.setState(ir({},i,v),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,a=r.y,s=r.width,c=r.height,u=r.fill,d=r.stroke;return H.createElement("rect",{stroke:d,fill:u,x:i,y:a,width:s,height:c})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,a=r.y,s=r.width,c=r.height,u=r.data,d=r.children,h=r.padding,m=N.Children.only(d);return m?H.cloneElement(m,{x:i,y:a,width:s,height:c,margin:h,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(r,i){var a,s,c=this,u=this.props,d=u.y,h=u.travellerWidth,m=u.height,p=u.traveller,v=u.ariaLabel,_=u.data,x=u.startIndex,y=u.endIndex,w=Math.max(r,this.props.x),b=Wy(Wy({},ke(this.props,!1)),{},{x:w,y:d,width:h,height:m}),j=v||"Min value: ".concat((a=_[x])===null||a===void 0?void 0:a.name,", Max value: ").concat((s=_[y])===null||s===void 0?void 0:s.name);return H.createElement(Xe,{tabIndex:0,role:"slider","aria-label":j,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(P){["ArrowLeft","ArrowRight"].includes(P.key)&&(P.preventDefault(),P.stopPropagation(),c.handleTravellerMoveKeyboard(P.key==="ArrowRight"?1:-1,i))},onFocus:function(){c.setState({isTravellerFocused:!0})},onBlur:function(){c.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(p,b))}},{key:"renderSlide",value:function(r,i){var a=this.props,s=a.y,c=a.height,u=a.stroke,d=a.travellerWidth,h=Math.min(r,i)+d,m=Math.max(Math.abs(i-r)-d,0);return H.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,fillOpacity:.2,x:h,y:s,width:m,height:c})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,a=r.endIndex,s=r.y,c=r.height,u=r.travellerWidth,d=r.stroke,h=this.state,m=h.startX,p=h.endX,v=5,_={pointerEvents:"none",fill:d};return H.createElement(Xe,{className:"recharts-brush-texts"},H.createElement(As,Qp({textAnchor:"end",verticalAnchor:"middle",x:Math.min(m,p)-v,y:s+c/2},_),this.getTextOfTick(i)),H.createElement(As,Qp({textAnchor:"start",verticalAnchor:"middle",x:Math.max(m,p)+u+v,y:s+c/2},_),this.getTextOfTick(a)))}},{key:"render",value:function(){var r=this.props,i=r.data,a=r.className,s=r.children,c=r.x,u=r.y,d=r.width,h=r.height,m=r.alwaysShowText,p=this.state,v=p.startX,_=p.endX,x=p.isTextActive,y=p.isSlideMoving,w=p.isTravellerMoving,b=p.isTravellerFocused;if(!i||!i.length||!ue(c)||!ue(u)||!ue(d)||!ue(h)||d<=0||h<=0)return null;var j=Ie("recharts-brush",a),E=H.Children.count(s)===1,P=efe("userSelect","none");return H.createElement(Xe,{className:j,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:P},this.renderBackground(),E&&this.renderPanorama(),this.renderSlide(v,_),this.renderTravellerLayer(v,"startX"),this.renderTravellerLayer(_,"endX"),(x||y||w||b||m)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,a=r.y,s=r.width,c=r.height,u=r.stroke,d=Math.floor(a+c/2)-1;return H.createElement(H.Fragment,null,H.createElement("rect",{x:i,y:a,width:s,height:c,fill:u,stroke:"none"}),H.createElement("line",{x1:i+1,y1:d,x2:i+s-1,y2:d,fill:"none",stroke:"#fff"}),H.createElement("line",{x1:i+1,y1:d+2,x2:i+s-1,y2:d+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var a;return H.isValidElement(r)?a=H.cloneElement(r,i):Ce(r)?a=r(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(r,i){var a=r.data,s=r.width,c=r.x,u=r.travellerWidth,d=r.updateId,h=r.startIndex,m=r.endIndex;if(a!==i.prevData||d!==i.prevUpdateId)return Wy({prevData:a,prevTravellerWidth:u,prevUpdateId:d,prevX:c,prevWidth:s},a&&a.length?lfe({data:a,width:s,x:c,travellerWidth:u,startIndex:h,endIndex:m}):{scale:null,scaleValues:null});if(i.scale&&(s!==i.prevWidth||c!==i.prevX||u!==i.prevTravellerWidth)){i.scale.range([c,c+s-u]);var p=i.scale.domain().map(function(v){return i.scale(v)});return{prevData:a,prevTravellerWidth:u,prevUpdateId:d,prevX:c,prevWidth:s,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:p}}return null}},{key:"getIndexInRange",value:function(r,i){for(var a=r.length,s=0,c=a-1;c-s>1;){var u=Math.floor((s+c)/2);r[u]>i?c=u:s=u}return i>=r[c]?c:s}}])}(N.PureComponent);ir(Ec,"displayName","Brush");ir(Ec,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var cfe=y2;function ufe(e,t){var n;return cfe(e,function(r,i,a){return n=t(r,i,a),!n}),!!n}var dfe=ufe,ffe=xT,hfe=Hi,mfe=dfe,pfe=tr,gfe=k0;function vfe(e,t,n){var r=pfe(e)?ffe:mfe;return n&&gfe(e,t,n)&&(t=void 0),r(e,hfe(t))}var yfe=vfe;const xfe=Je(yfe);var Bi=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},GE=zT;function bfe(e,t,n){t=="__proto__"&&GE?GE(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var wfe=bfe,_fe=wfe,jfe=DT,Nfe=Hi;function Sfe(e,t){var n={};return t=Nfe(t),jfe(e,function(r,i,a){_fe(n,i,t(r,i,a))}),n}var Pfe=Sfe;const Efe=Je(Pfe);function Ofe(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Vfe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function qfe(e,t){var n=e.x,r=e.y,i=Hfe(e,Bfe),a="".concat(n),s=parseInt(a,10),c="".concat(r),u=parseInt(c,10),d="".concat(t.height||i.height),h=parseInt(d,10),m="".concat(t.width||i.width),p=parseInt(m,10);return Fu(Fu(Fu(Fu(Fu({},t),i),s?{x:s}:{}),u?{y:u}:{}),{},{height:h,width:p,name:t.name,radius:t.radius})}function YE(e){return H.createElement(OM,D1({shapeType:"rectangle",propTransformer:qfe,activeClassName:"recharts-active-bar"},e))}var Zfe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var a=ue(r)||pV(r);return a?t(r,i):(a||Ls(),n)}},Gfe=["value","background"],IM;function Oc(e){"@babel/helpers - typeof";return Oc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oc(e)}function Kfe(e,t){if(e==null)return{};var n=Yfe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Yfe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function eg(){return eg=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(F)0&&Math.abs(I)0&&(Z=Math.min((ae||0)-(I[ee-1]||0),Z))}),Number.isFinite(Z)){var F=Z/D,B=x.layout==="vertical"?r.height:r.width;if(x.padding==="gap"&&(C=F*B/2),x.padding==="no-gap"){var G=Ln(t.barCategoryGap,F*B),R=F*B/2;C=R-G-(R-G)/B*G}}}i==="xAxis"?A=[r.left+(j.left||0)+(C||0),r.left+r.width-(j.right||0)-(C||0)]:i==="yAxis"?A=u==="horizontal"?[r.top+r.height-(j.bottom||0),r.top+(j.top||0)]:[r.top+(j.top||0)+(C||0),r.top+r.height-(j.bottom||0)-(C||0)]:A=x.range,P&&(A=[A[1],A[0]]);var K=nM(x,a,p),W=K.scale,U=K.realScaleType;W.domain(w).range(A),rM(W);var Y=iM(W,ri(ri({},x),{},{realScaleType:U}));i==="xAxis"?(z=y==="top"&&!E||y==="bottom"&&E,T=r.left,$=m[O]-z*x.height):i==="yAxis"&&(z=y==="left"&&!E||y==="right"&&E,T=m[O]-z*x.width,$=r.top);var ne=ri(ri(ri({},x),Y),{},{realScaleType:U,x:T,y:$,scale:W,width:i==="xAxis"?r.width:x.width,height:i==="yAxis"?r.height:x.height});return ne.bandSize=Fp(ne,Y),!x.hide&&i==="xAxis"?m[O]+=(z?-1:1)*ne.height:x.hide||(m[O]+=(z?-1:1)*ne.width),ri(ri({},v),{},Y0({},_,ne))},{})},BM=function(t,n){var r=t.x,i=t.y,a=n.x,s=n.y;return{x:Math.min(r,a),y:Math.min(i,s),width:Math.abs(a-r),height:Math.abs(s-i)}},lhe=function(t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2;return BM({x:n,y:r},{x:i,y:a})},zM=function(){function e(t){ihe(this,e),this.scale=t}return ahe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,a=r.position;if(n!==void 0){if(a)switch(a){case"start":return this.scale(n);case"middle":{var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+s}case"end":{var c=this.bandwidth?this.bandwidth():0;return this.scale(n)+c}default:return this.scale(n)}if(i){var u=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+u}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],a=r[r.length-1];return i<=a?n>=i&&n<=a:n>=a&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])}();Y0(zM,"EPS",1e-4);var G2=function(t){var n=Object.keys(t).reduce(function(r,i){return ri(ri({},r),{},Y0({},i,zM.create(t[i])))},{});return ri(ri({},n),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=a.bandAware,c=a.position;return Efe(i,function(u,d){return n[d].apply(u,{bandAware:s,position:c})})},isInRange:function(i){return $M(i,function(a,s){return n[s].isInRange(a)})}})};function che(e){return(e%180+180)%180}var uhe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=che(i),s=a*Math.PI/180,c=Math.atan(r/n),u=s>c&&s-1?i[a?t[s]:s]:void 0}}var phe=mhe,ghe=AM;function vhe(e){var t=ghe(e),n=t%1;return t===t?n?t-n:t:0}var yhe=vhe,xhe=MT,bhe=Hi,whe=yhe,_he=Math.max;function jhe(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:whe(n);return i<0&&(i=_he(r+i,0)),xhe(e,bhe(t),i)}var Nhe=jhe,She=phe,Phe=Nhe,Ehe=She(Phe),Ohe=Ehe;const khe=Je(Ohe);var Che=wH(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),K2=N.createContext(void 0),Y2=N.createContext(void 0),UM=N.createContext(void 0),WM=N.createContext({}),HM=N.createContext(void 0),VM=N.createContext(0),qM=N.createContext(0),tO=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,a=n.offset,s=t.clipPathId,c=t.children,u=t.width,d=t.height,h=Che(a);return H.createElement(K2.Provider,{value:r},H.createElement(Y2.Provider,{value:i},H.createElement(WM.Provider,{value:a},H.createElement(UM.Provider,{value:h},H.createElement(HM.Provider,{value:s},H.createElement(VM.Provider,{value:d},H.createElement(qM.Provider,{value:u},c)))))))},Ahe=function(){return N.useContext(HM)},ZM=function(t){var n=N.useContext(K2);n==null&&Ls();var r=n[t];return r==null&&Ls(),r},The=function(){var t=N.useContext(K2);return Xa(t)},Mhe=function(){var t=N.useContext(Y2),n=khe(t,function(r){return $M(r.domain,Number.isFinite)});return n||Xa(t)},GM=function(t){var n=N.useContext(Y2);n==null&&Ls();var r=n[t];return r==null&&Ls(),r},Lhe=function(){var t=N.useContext(UM);return t},$he=function(){return N.useContext(WM)},X2=function(){return N.useContext(qM)},Q2=function(){return N.useContext(VM)};function kc(e){"@babel/helpers - typeof";return kc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kc(e)}function Ihe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rhe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*i)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-i)<=0}function yme(e,t){return tL(e,t+1)}function xme(e,t,n,r,i){for(var a=(r||[]).slice(),s=t.start,c=t.end,u=0,d=1,h=s,m=function(){var _=r==null?void 0:r[u];if(_===void 0)return{v:tL(r,d)};var x=u,y,w=function(){return y===void 0&&(y=n(_,x)),y},b=_.coordinate,j=u===0||ag(e,b,w,h,c);j||(u=0,h=s,d+=1),j&&(h=b+e*(w()/2+i),u+=d)},p;d<=a.length;)if(p=m(),p)return p.v;return[]}function Nf(e){"@babel/helpers - typeof";return Nf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nf(e)}function cO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function xn(e){for(var t=1;t0?v.coordinate-y*e:v.coordinate})}else a[p]=v=xn(xn({},v),{},{tickCoord:v.coordinate});var w=ag(e,v.tickCoord,x,c,u);w&&(u=v.tickCoord-e*(x()/2+i),a[p]=xn(xn({},v),{},{isShow:!0}))},h=s-1;h>=0;h--)d(h);return a}function Nme(e,t,n,r,i,a){var s=(r||[]).slice(),c=s.length,u=t.start,d=t.end;if(a){var h=r[c-1],m=n(h,c-1),p=e*(h.coordinate+e*m/2-d);s[c-1]=h=xn(xn({},h),{},{tickCoord:p>0?h.coordinate-p*e:h.coordinate});var v=ag(e,h.tickCoord,function(){return m},u,d);v&&(d=h.tickCoord-e*(m/2+i),s[c-1]=xn(xn({},h),{},{isShow:!0}))}for(var _=a?c-1:c,x=function(b){var j=s[b],E,P=function(){return E===void 0&&(E=n(j,b)),E};if(b===0){var O=e*(j.coordinate-e*P()/2-u);s[b]=j=xn(xn({},j),{},{tickCoord:O<0?j.coordinate-O*e:j.coordinate})}else s[b]=j=xn(xn({},j),{},{tickCoord:j.coordinate});var C=ag(e,j.tickCoord,P,u,d);C&&(u=j.tickCoord+e*(P()/2+i),s[b]=xn(xn({},j),{},{isShow:!0}))},y=0;y<_;y++)x(y);return s}function tj(e,t,n){var r=e.tick,i=e.ticks,a=e.viewBox,s=e.minTickGap,c=e.orientation,u=e.interval,d=e.tickFormatter,h=e.unit,m=e.angle;if(!i||!i.length||!r)return[];if(ue(u)||nu.isSsr)return yme(i,typeof u=="number"&&ue(u)?u:0);var p=[],v=c==="top"||c==="bottom"?"width":"height",_=h&&v==="width"?fd(h,{fontSize:t,letterSpacing:n}):{width:0,height:0},x=function(j,E){var P=Ce(d)?d(j.value,E):j.value;return v==="width"?gme(fd(P,{fontSize:t,letterSpacing:n}),_,m):fd(P,{fontSize:t,letterSpacing:n})[v]},y=i.length>=2?Mn(i[1].coordinate-i[0].coordinate):1,w=vme(a,y,v);return u==="equidistantPreserveStart"?xme(y,w,x,i,s):(u==="preserveStart"||u==="preserveStartEnd"?p=Nme(y,w,x,i,s,u==="preserveStartEnd"):p=jme(y,w,x,i,s),p.filter(function(b){return b.isShow}))}var Sme=["viewBox"],Pme=["viewBox"],Eme=["ticks"];function Tc(e){"@babel/helpers - typeof";return Tc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tc(e)}function Ol(){return Ol=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ome(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function kme(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dO(e,t){for(var n=0;n0?u(this.props):u(v)),s<=0||c<=0||!_||!_.length?null:H.createElement(Xe,{className:Ie("recharts-cartesian-axis",d),ref:function(y){r.layerReference=y}},a&&this.renderAxisLine(),this.renderTicks(_,this.state.fontSize,this.state.letterSpacing),en.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,a){var s,c=Ie(i.className,"recharts-cartesian-axis-tick-value");return H.isValidElement(r)?s=H.cloneElement(r,Wt(Wt({},i),{},{className:c})):Ce(r)?s=r(Wt(Wt({},i),{},{className:c})):s=H.createElement(As,Ol({},i,{className:"recharts-cartesian-axis-tick-value"}),a),s}}])}(N.Component);nj(ou,"displayName","CartesianAxis");nj(ou,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var Ime=["x1","y1","x2","y2","key"],Rme=["offset"];function $s(e){"@babel/helpers - typeof";return $s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$s(e)}function fO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function wn(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zme(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Ume=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,a=t.y,s=t.width,c=t.height,u=t.ry;return H.createElement("rect",{x:i,y:a,ry:u,width:s,height:c,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function iL(e,t){var n;if(H.isValidElement(e))n=H.cloneElement(e,t);else if(Ce(e))n=e(t);else{var r=t.x1,i=t.y1,a=t.x2,s=t.y2,c=t.key,u=hO(t,Ime),d=ke(u,!1);d.offset;var h=hO(d,Rme);n=H.createElement("line",cs({},h,{x1:r,y1:i,x2:a,y2:s,fill:"none",key:c}))}return n}function Wme(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var s=a.map(function(c,u){var d=wn(wn({},e),{},{x1:t,y1:c,x2:t+n,y2:c,key:"line-".concat(u),index:u});return iL(i,d)});return H.createElement("g",{className:"recharts-cartesian-grid-horizontal"},s)}function Hme(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,a=e.verticalPoints;if(!i||!a||!a.length)return null;var s=a.map(function(c,u){var d=wn(wn({},e),{},{x1:c,y1:t,x2:c,y2:t+n,key:"line-".concat(u),index:u});return iL(i,d)});return H.createElement("g",{className:"recharts-cartesian-grid-vertical"},s)}function Vme(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,a=e.width,s=e.height,c=e.horizontalPoints,u=e.horizontal,d=u===void 0?!0:u;if(!d||!t||!t.length)return null;var h=c.map(function(p){return Math.round(p+i-i)}).sort(function(p,v){return p-v});i!==h[0]&&h.unshift(0);var m=h.map(function(p,v){var _=!h[v+1],x=_?i+s-p:h[v+1]-p;if(x<=0)return null;var y=v%t.length;return H.createElement("rect",{key:"react-".concat(v),y:p,x:r,height:x,width:a,stroke:"none",fill:t[y],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return H.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},m)}function qme(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,a=e.x,s=e.y,c=e.width,u=e.height,d=e.verticalPoints;if(!n||!r||!r.length)return null;var h=d.map(function(p){return Math.round(p+a-a)}).sort(function(p,v){return p-v});a!==h[0]&&h.unshift(0);var m=h.map(function(p,v){var _=!h[v+1],x=_?a+c-p:h[v+1]-p;if(x<=0)return null;var y=v%r.length;return H.createElement("rect",{key:"react-".concat(v),x:p,y:s,width:x,height:u,stroke:"none",fill:r[y],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return H.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},m)}var Zme=function(t,n){var r=t.xAxis,i=t.width,a=t.height,s=t.offset;return tM(tj(wn(wn(wn({},ou.defaultProps),r),{},{ticks:ga(r,!0),viewBox:{x:0,y:0,width:i,height:a}})),s.left,s.left+s.width,n)},Gme=function(t,n){var r=t.yAxis,i=t.width,a=t.height,s=t.offset;return tM(tj(wn(wn(wn({},ou.defaultProps),r),{},{ticks:ga(r,!0),viewBox:{x:0,y:0,width:i,height:a}})),s.top,s.top+s.height,n)},cl={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function aL(e){var t,n,r,i,a,s,c=X2(),u=Q2(),d=$he(),h=wn(wn({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:cl.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:cl.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:cl.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:cl.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:cl.vertical,verticalFill:(s=e.verticalFill)!==null&&s!==void 0?s:cl.verticalFill,x:ue(e.x)?e.x:d.left,y:ue(e.y)?e.y:d.top,width:ue(e.width)?e.width:d.width,height:ue(e.height)?e.height:d.height}),m=h.x,p=h.y,v=h.width,_=h.height,x=h.syncWithTicks,y=h.horizontalValues,w=h.verticalValues,b=The(),j=Mhe();if(!ue(v)||v<=0||!ue(_)||_<=0||!ue(m)||m!==+m||!ue(p)||p!==+p)return null;var E=h.verticalCoordinatesGenerator||Zme,P=h.horizontalCoordinatesGenerator||Gme,O=h.horizontalPoints,C=h.verticalPoints;if((!O||!O.length)&&Ce(P)){var A=y&&y.length,T=P({yAxis:j?wn(wn({},j),{},{ticks:A?y:j.ticks}):void 0,width:c,height:u,offset:d},A?!0:x);hi(Array.isArray(T),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat($s(T),"]")),Array.isArray(T)&&(O=T)}if((!C||!C.length)&&Ce(E)){var $=w&&w.length,z=E({xAxis:b?wn(wn({},b),{},{ticks:$?w:b.ticks}):void 0,width:c,height:u,offset:d},$?!0:x);hi(Array.isArray(z),"verticalCoordinatesGenerator should return Array but instead it returned [".concat($s(z),"]")),Array.isArray(z)&&(C=z)}return H.createElement("g",{className:"recharts-cartesian-grid"},H.createElement(Ume,{fill:h.fill,fillOpacity:h.fillOpacity,x:h.x,y:h.y,width:h.width,height:h.height,ry:h.ry}),H.createElement(Wme,cs({},h,{offset:d,horizontalPoints:O,xAxis:b,yAxis:j})),H.createElement(Hme,cs({},h,{offset:d,verticalPoints:C,xAxis:b,yAxis:j})),H.createElement(Vme,cs({},h,{horizontalPoints:O})),H.createElement(qme,cs({},h,{verticalPoints:C})))}aL.displayName="CartesianGrid";function Mc(e){"@babel/helpers - typeof";return Mc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mc(e)}function Kme(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yme(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ipe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Rpe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fpe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?s:t&&t.length&&ue(i)&&ue(a)?t.slice(i,a+1):[]};function xL(e){return e==="number"?[0,"auto"]:void 0}var nw=function(t,n,r,i){var a=t.graphicalItems,s=t.tooltipAxis,c=rv(n,t);return r<0||!a||!a.length||r>=c.length?null:a.reduce(function(u,d){var h,m=(h=d.props.data)!==null&&h!==void 0?h:n;m&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(m=m.slice(t.dataStartIndex,t.dataEndIndex+1));var p;if(s.dataKey&&!s.allowDuplicatedCategory){var v=m===void 0?c:m;p=Eb(v,s.dataKey,i)}else p=m&&m[r]||c[r];return p?[].concat(Ic(u),[oM(d,p)]):u},[])},xO=function(t,n,r,i){var a=i||{x:t.chartX,y:t.chartY},s=Ype(a,r),c=t.orderedTooltipTicks,u=t.tooltipAxis,d=t.tooltipTicks,h=Eoe(s,c,d,u);if(h>=0&&d){var m=d[h]&&d[h].value,p=nw(t,n,h,m),v=Xpe(r,c,h,a);return{activeTooltipIndex:h,activeLabel:m,activePayload:p,activeCoordinate:v}}return null},Qpe=function(t,n){var r=n.axes,i=n.graphicalItems,a=n.axisType,s=n.axisIdKey,c=n.stackGroups,u=n.dataStartIndex,d=n.dataEndIndex,h=t.layout,m=t.children,p=t.stackOffset,v=eM(h,a);return r.reduce(function(_,x){var y,w=x.type.defaultProps!==void 0?te(te({},x.type.defaultProps),x.props):x.props,b=w.type,j=w.dataKey,E=w.allowDataOverflow,P=w.allowDuplicatedCategory,O=w.scale,C=w.ticks,A=w.includeHidden,T=w[s];if(_[T])return _;var $=rv(t.data,{graphicalItems:i.filter(function(Y){var ne,ae=s in Y.props?Y.props[s]:(ne=Y.type.defaultProps)===null||ne===void 0?void 0:ne[s];return ae===T}),dataStartIndex:u,dataEndIndex:d}),z=$.length,D,Z,I;Npe(w.domain,E,b)&&(D=v1(w.domain,null,E),v&&(b==="number"||O!=="auto")&&(I=md($,j,"category")));var F=xL(b);if(!D||D.length===0){var B,G=(B=w.domain)!==null&&B!==void 0?B:F;if(j){if(D=md($,j,b),b==="category"&&v){var R=vV(D);P&&R?(Z=D,D=Xp(0,z)):P||(D=Z3(G,D,x).reduce(function(Y,ne){return Y.indexOf(ne)>=0?Y:[].concat(Ic(Y),[ne])},[]))}else if(b==="category")P?D=D.filter(function(Y){return Y!==""&&!De(Y)}):D=Z3(G,D,x).reduce(function(Y,ne){return Y.indexOf(ne)>=0||ne===""||De(ne)?Y:[].concat(Ic(Y),[ne])},[]);else if(b==="number"){var K=Toe($,i.filter(function(Y){var ne,ae,ee=s in Y.props?Y.props[s]:(ne=Y.type.defaultProps)===null||ne===void 0?void 0:ne[s],ce="hide"in Y.props?Y.props.hide:(ae=Y.type.defaultProps)===null||ae===void 0?void 0:ae.hide;return ee===T&&(A||!ce)}),j,a,h);K&&(D=K)}v&&(b==="number"||O!=="auto")&&(I=md($,j,"category"))}else v?D=Xp(0,z):c&&c[T]&&c[T].hasStack&&b==="number"?D=p==="expand"?[0,1]:aM(c[T].stackGroups,u,d):D=J6($,i.filter(function(Y){var ne=s in Y.props?Y.props[s]:Y.type.defaultProps[s],ae="hide"in Y.props?Y.props.hide:Y.type.defaultProps.hide;return ne===T&&(A||!ae)}),b,h,!0);if(b==="number")D=J1(m,D,T,a,C),G&&(D=v1(G,D,E));else if(b==="category"&&G){var W=G,U=D.every(function(Y){return W.indexOf(Y)>=0});U&&(D=W)}}return te(te({},_),{},Pe({},T,te(te({},w),{},{axisType:a,domain:D,categoricalDomain:I,duplicateDomain:Z,originalDomain:(y=w.domain)!==null&&y!==void 0?y:F,isCategorical:v,layout:h})))},{})},Jpe=function(t,n){var r=n.graphicalItems,i=n.Axis,a=n.axisType,s=n.axisIdKey,c=n.stackGroups,u=n.dataStartIndex,d=n.dataEndIndex,h=t.layout,m=t.children,p=rv(t.data,{graphicalItems:r,dataStartIndex:u,dataEndIndex:d}),v=p.length,_=eM(h,a),x=-1;return r.reduce(function(y,w){var b=w.type.defaultProps!==void 0?te(te({},w.type.defaultProps),w.props):w.props,j=b[s],E=xL("number");if(!y[j]){x++;var P;return _?P=Xp(0,v):c&&c[j]&&c[j].hasStack?(P=aM(c[j].stackGroups,u,d),P=J1(m,P,j,a)):(P=v1(E,J6(p,r.filter(function(O){var C,A,T=s in O.props?O.props[s]:(C=O.type.defaultProps)===null||C===void 0?void 0:C[s],$="hide"in O.props?O.props.hide:(A=O.type.defaultProps)===null||A===void 0?void 0:A.hide;return T===j&&!$}),"number",h),i.defaultProps.allowDataOverflow),P=J1(m,P,j,a)),te(te({},y),{},Pe({},j,te(te({axisType:a},i.defaultProps),{},{hide:!0,orientation:gr(Gpe,"".concat(a,".").concat(x%2),null),domain:P,originalDomain:E,isCategorical:_,layout:h})))}return y},{})},ege=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,a=n.AxisComp,s=n.graphicalItems,c=n.stackGroups,u=n.dataStartIndex,d=n.dataEndIndex,h=t.children,m="".concat(i,"Id"),p=Dr(h,a),v={};return p&&p.length?v=Qpe(t,{axes:p,graphicalItems:s,axisType:i,axisIdKey:m,stackGroups:c,dataStartIndex:u,dataEndIndex:d}):s&&s.length&&(v=Jpe(t,{Axis:a,graphicalItems:s,axisType:i,axisIdKey:m,stackGroups:c,dataStartIndex:u,dataEndIndex:d})),v},tge=function(t){var n=Xa(t),r=ga(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:x2(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Fp(n,r)}},bO=function(t){var n=t.children,r=t.defaultShowTooltip,i=or(n,Ec),a=0,s=0;return t.data&&t.data.length!==0&&(s=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(s=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:s,activeTooltipIndex:-1,isTooltipActive:!!r}},nge=function(t){return!t||!t.length?!1:t.some(function(n){var r=xa(n&&n.type);return r&&r.indexOf("Bar")>=0})},wO=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},rge=function(t,n){var r=t.props,i=t.graphicalItems,a=t.xAxisMap,s=a===void 0?{}:a,c=t.yAxisMap,u=c===void 0?{}:c,d=r.width,h=r.height,m=r.children,p=r.margin||{},v=or(m,Ec),_=or(m,Dl),x=Object.keys(u).reduce(function(P,O){var C=u[O],A=C.orientation;return!C.mirror&&!C.hide?te(te({},P),{},Pe({},A,P[A]+C.width)):P},{left:p.left||0,right:p.right||0}),y=Object.keys(s).reduce(function(P,O){var C=s[O],A=C.orientation;return!C.mirror&&!C.hide?te(te({},P),{},Pe({},A,gr(P,"".concat(A))+C.height)):P},{top:p.top||0,bottom:p.bottom||0}),w=te(te({},y),x),b=w.bottom;v&&(w.bottom+=v.props.height||Ec.defaultProps.height),_&&n&&(w=Coe(w,i,r,n));var j=d-w.left-w.right,E=h-w.top-w.bottom;return te(te({brushBottom:b},w),{},{width:Math.max(j,0),height:Math.max(E,0)})},ige=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},bL=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,s=t.validateTooltipEventTypes,c=s===void 0?["axis"]:s,u=t.axisComponents,d=t.legendContent,h=t.formatAxisMap,m=t.defaultProps,p=function(w,b){var j=b.graphicalItems,E=b.stackGroups,P=b.offset,O=b.updateId,C=b.dataStartIndex,A=b.dataEndIndex,T=w.barSize,$=w.layout,z=w.barGap,D=w.barCategoryGap,Z=w.maxBarSize,I=wO($),F=I.numericAxisName,B=I.cateAxisName,G=nge(j),R=[];return j.forEach(function(K,W){var U=rv(w.data,{graphicalItems:[K],dataStartIndex:C,dataEndIndex:A}),Y=K.type.defaultProps!==void 0?te(te({},K.type.defaultProps),K.props):K.props,ne=Y.dataKey,ae=Y.maxBarSize,ee=Y["".concat(F,"Id")],ce=Y["".concat(B,"Id")],Ne={},Ee=u.reduce(function(Wn,nr){var Gi=b["".concat(nr.axisType,"Map")],Io=Y["".concat(nr.axisType,"Id")];Gi&&Gi[Io]||nr.axisType==="zAxis"||Ls();var X=Gi[Io];return te(te({},Wn),{},Pe(Pe({},nr.axisType,X),"".concat(nr.axisType,"Ticks"),ga(X)))},Ne),se=Ee[B],ye=Ee["".concat(B,"Ticks")],je=E&&E[ee]&&E[ee].hasStack&&zoe(K,E[ee].stackGroups),ie=xa(K.type).indexOf("Bar")>=0,Ve=Fp(se,ye),Re=[],ut=G&&Ooe({barSize:T,stackGroups:E,totalSize:ige(Ee,B)});if(ie){var dt,Tt,pn=De(ae)?Z:ae,Gr=(dt=(Tt=Fp(se,ye,!0))!==null&&Tt!==void 0?Tt:pn)!==null&&dt!==void 0?dt:0;Re=koe({barGap:z,barCategoryGap:D,bandSize:Gr!==Ve?Gr:Ve,sizeList:ut[ce],maxBarSize:pn}),Gr!==Ve&&(Re=Re.map(function(Wn){return te(te({},Wn),{},{position:te(te({},Wn.position),{},{offset:Wn.position.offset-Gr/2})})}))}var yi=K&&K.type&&K.type.getComposedData;yi&&R.push({props:te(te({},yi(te(te({},Ee),{},{displayedData:U,props:w,dataKey:ne,item:K,bandSize:Ve,barPosition:Re,offset:P,stackedData:je,layout:$,dataStartIndex:C,dataEndIndex:A}))),{},Pe(Pe(Pe({key:K.key||"item-".concat(W)},F,Ee[F]),B,Ee[B]),"animationId",O)),childIndex:kV(K,w.children),item:K})}),R},v=function(w,b){var j=w.props,E=w.dataStartIndex,P=w.dataEndIndex,O=w.updateId;if(!BS({props:j}))return null;var C=j.children,A=j.layout,T=j.stackOffset,$=j.data,z=j.reverseStackOrder,D=wO(A),Z=D.numericAxisName,I=D.cateAxisName,F=Dr(C,r),B=Doe($,F,"".concat(Z,"Id"),"".concat(I,"Id"),T,z),G=u.reduce(function(Y,ne){var ae="".concat(ne.axisType,"Map");return te(te({},Y),{},Pe({},ae,ege(j,te(te({},ne),{},{graphicalItems:F,stackGroups:ne.axisType===Z&&B,dataStartIndex:E,dataEndIndex:P}))))},{}),R=rge(te(te({},G),{},{props:j,graphicalItems:F}),b==null?void 0:b.legendBBox);Object.keys(G).forEach(function(Y){G[Y]=h(j,G[Y],R,Y.replace("Map",""),n)});var K=G["".concat(I,"Map")],W=tge(K),U=p(j,te(te({},G),{},{dataStartIndex:E,dataEndIndex:P,updateId:O,graphicalItems:F,stackGroups:B,offset:R}));return te(te({formattedGraphicalItems:U,graphicalItems:F,offset:R,stackGroups:B},W),G)},_=function(y){function w(b){var j,E,P;return Rpe(this,w),P=Bpe(this,w,[b]),Pe(P,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Pe(P,"accessibilityManager",new jpe),Pe(P,"handleLegendBBoxUpdate",function(O){if(O){var C=P.state,A=C.dataStartIndex,T=C.dataEndIndex,$=C.updateId;P.setState(te({legendBBox:O},v({props:P.props,dataStartIndex:A,dataEndIndex:T,updateId:$},te(te({},P.state),{},{legendBBox:O}))))}}),Pe(P,"handleReceiveSyncEvent",function(O,C,A){if(P.props.syncId===O){if(A===P.eventEmitterSymbol&&typeof P.props.syncMethod!="function")return;P.applySyncEvent(C)}}),Pe(P,"handleBrushChange",function(O){var C=O.startIndex,A=O.endIndex;if(C!==P.state.dataStartIndex||A!==P.state.dataEndIndex){var T=P.state.updateId;P.setState(function(){return te({dataStartIndex:C,dataEndIndex:A},v({props:P.props,dataStartIndex:C,dataEndIndex:A,updateId:T},P.state))}),P.triggerSyncEvent({dataStartIndex:C,dataEndIndex:A})}}),Pe(P,"handleMouseEnter",function(O){var C=P.getMouseInfo(O);if(C){var A=te(te({},C),{},{isTooltipActive:!0});P.setState(A),P.triggerSyncEvent(A);var T=P.props.onMouseEnter;Ce(T)&&T(A,O)}}),Pe(P,"triggeredAfterMouseMove",function(O){var C=P.getMouseInfo(O),A=C?te(te({},C),{},{isTooltipActive:!0}):{isTooltipActive:!1};P.setState(A),P.triggerSyncEvent(A);var T=P.props.onMouseMove;Ce(T)&&T(A,O)}),Pe(P,"handleItemMouseEnter",function(O){P.setState(function(){return{isTooltipActive:!0,activeItem:O,activePayload:O.tooltipPayload,activeCoordinate:O.tooltipPosition||{x:O.cx,y:O.cy}}})}),Pe(P,"handleItemMouseLeave",function(){P.setState(function(){return{isTooltipActive:!1}})}),Pe(P,"handleMouseMove",function(O){O.persist(),P.throttleTriggeredAfterMouseMove(O)}),Pe(P,"handleMouseLeave",function(O){P.throttleTriggeredAfterMouseMove.cancel();var C={isTooltipActive:!1};P.setState(C),P.triggerSyncEvent(C);var A=P.props.onMouseLeave;Ce(A)&&A(C,O)}),Pe(P,"handleOuterEvent",function(O){var C=OV(O),A=gr(P.props,"".concat(C));if(C&&Ce(A)){var T,$;/.*touch.*/i.test(C)?$=P.getMouseInfo(O.changedTouches[0]):$=P.getMouseInfo(O),A((T=$)!==null&&T!==void 0?T:{},O)}}),Pe(P,"handleClick",function(O){var C=P.getMouseInfo(O);if(C){var A=te(te({},C),{},{isTooltipActive:!0});P.setState(A),P.triggerSyncEvent(A);var T=P.props.onClick;Ce(T)&&T(A,O)}}),Pe(P,"handleMouseDown",function(O){var C=P.props.onMouseDown;if(Ce(C)){var A=P.getMouseInfo(O);C(A,O)}}),Pe(P,"handleMouseUp",function(O){var C=P.props.onMouseUp;if(Ce(C)){var A=P.getMouseInfo(O);C(A,O)}}),Pe(P,"handleTouchMove",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&P.throttleTriggeredAfterMouseMove(O.changedTouches[0])}),Pe(P,"handleTouchStart",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&P.handleMouseDown(O.changedTouches[0])}),Pe(P,"handleTouchEnd",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&P.handleMouseUp(O.changedTouches[0])}),Pe(P,"handleDoubleClick",function(O){var C=P.props.onDoubleClick;if(Ce(C)){var A=P.getMouseInfo(O);C(A,O)}}),Pe(P,"handleContextMenu",function(O){var C=P.props.onContextMenu;if(Ce(C)){var A=P.getMouseInfo(O);C(A,O)}}),Pe(P,"triggerSyncEvent",function(O){P.props.syncId!==void 0&&Vy.emit(qy,P.props.syncId,O,P.eventEmitterSymbol)}),Pe(P,"applySyncEvent",function(O){var C=P.props,A=C.layout,T=C.syncMethod,$=P.state.updateId,z=O.dataStartIndex,D=O.dataEndIndex;if(O.dataStartIndex!==void 0||O.dataEndIndex!==void 0)P.setState(te({dataStartIndex:z,dataEndIndex:D},v({props:P.props,dataStartIndex:z,dataEndIndex:D,updateId:$},P.state)));else if(O.activeTooltipIndex!==void 0){var Z=O.chartX,I=O.chartY,F=O.activeTooltipIndex,B=P.state,G=B.offset,R=B.tooltipTicks;if(!G)return;if(typeof T=="function")F=T(R,O);else if(T==="value"){F=-1;for(var K=0;K=0){var je,ie;if(Z.dataKey&&!Z.allowDuplicatedCategory){var Ve=typeof Z.dataKey=="function"?ye:"payload.".concat(Z.dataKey.toString());je=Eb(K,Ve,F),ie=W&&U&&Eb(U,Ve,F)}else je=K==null?void 0:K[I],ie=W&&U&&U[I];if(ce||ee){var Re=O.props.activeIndex!==void 0?O.props.activeIndex:I;return[N.cloneElement(O,te(te(te({},T.props),Ee),{},{activeIndex:Re})),null,null]}if(!De(je))return[se].concat(Ic(P.renderActivePoints({item:T,activePoint:je,basePoint:ie,childIndex:I,isRange:W})))}else{var ut,dt=(ut=P.getItemByXY(P.state.activeCoordinate))!==null&&ut!==void 0?ut:{graphicalItem:se},Tt=dt.graphicalItem,pn=Tt.item,Gr=pn===void 0?O:pn,yi=Tt.childIndex,Wn=te(te(te({},T.props),Ee),{},{activeIndex:yi});return[N.cloneElement(Gr,Wn),null,null]}return W?[se,null,null]:[se,null]}),Pe(P,"renderCustomized",function(O,C,A){return N.cloneElement(O,te(te({key:"recharts-customized-".concat(A)},P.props),P.state))}),Pe(P,"renderMap",{CartesianGrid:{handler:sm,once:!0},ReferenceArea:{handler:P.renderReferenceElement},ReferenceLine:{handler:sm},ReferenceDot:{handler:P.renderReferenceElement},XAxis:{handler:sm},YAxis:{handler:sm},Brush:{handler:P.renderBrush,once:!0},Bar:{handler:P.renderGraphicChild},Line:{handler:P.renderGraphicChild},Area:{handler:P.renderGraphicChild},Radar:{handler:P.renderGraphicChild},RadialBar:{handler:P.renderGraphicChild},Scatter:{handler:P.renderGraphicChild},Pie:{handler:P.renderGraphicChild},Funnel:{handler:P.renderGraphicChild},Tooltip:{handler:P.renderCursor,once:!0},PolarGrid:{handler:P.renderPolarGrid,once:!0},PolarAngleAxis:{handler:P.renderPolarAxis},PolarRadiusAxis:{handler:P.renderPolarAxis},Customized:{handler:P.renderCustomized}}),P.clipPathId="".concat((j=b.id)!==null&&j!==void 0?j:Yf("recharts"),"-clip"),P.throttleTriggeredAfterMouseMove=ZT(P.triggeredAfterMouseMove,(E=b.throttleDelay)!==null&&E!==void 0?E:1e3/60),P.state={},P}return Wpe(w,y),Dpe(w,[{key:"componentDidMount",value:function(){var j,E;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(j=this.props.margin.left)!==null&&j!==void 0?j:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var j=this.props,E=j.children,P=j.data,O=j.height,C=j.layout,A=or(E,ni);if(A){var T=A.props.defaultIndex;if(!(typeof T!="number"||T<0||T>this.state.tooltipTicks.length-1)){var $=this.state.tooltipTicks[T]&&this.state.tooltipTicks[T].value,z=nw(this.state,P,T,$),D=this.state.tooltipTicks[T].coordinate,Z=(this.state.offset.top+O)/2,I=C==="horizontal",F=I?{x:D,y:Z}:{y:D,x:Z},B=this.state.formattedGraphicalItems.find(function(R){var K=R.item;return K.type.name==="Scatter"});B&&(F=te(te({},F),B.props.points[T].tooltipPosition),z=B.props.points[T].tooltipPayload);var G={activeTooltipIndex:T,isTooltipActive:!0,activeLabel:$,activePayload:z,activeCoordinate:F};this.setState(G),this.renderCursor(A),this.accessibilityManager.setIndex(T)}}}},{key:"getSnapshotBeforeUpdate",value:function(j,E){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==E.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==j.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==j.margin){var P,O;this.accessibilityManager.setDetails({offset:{left:(P=this.props.margin.left)!==null&&P!==void 0?P:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0}})}return null}},{key:"componentDidUpdate",value:function(j){kb([or(j.children,ni)],[or(this.props.children,ni)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var j=or(this.props.children,ni);if(j&&typeof j.props.shared=="boolean"){var E=j.props.shared?"axis":"item";return c.indexOf(E)>=0?E:a}return a}},{key:"getMouseInfo",value:function(j){if(!this.container)return null;var E=this.container,P=E.getBoundingClientRect(),O=tne(P),C={chartX:Math.round(j.pageX-O.left),chartY:Math.round(j.pageY-O.top)},A=P.width/E.offsetWidth||1,T=this.inRange(C.chartX,C.chartY,A);if(!T)return null;var $=this.state,z=$.xAxisMap,D=$.yAxisMap,Z=this.getTooltipEventType(),I=xO(this.state,this.props.data,this.props.layout,T);if(Z!=="axis"&&z&&D){var F=Xa(z).scale,B=Xa(D).scale,G=F&&F.invert?F.invert(C.chartX):null,R=B&&B.invert?B.invert(C.chartY):null;return te(te({},C),{},{xValue:G,yValue:R},I)}return I?te(te({},C),I):null}},{key:"inRange",value:function(j,E){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,O=this.props.layout,C=j/P,A=E/P;if(O==="horizontal"||O==="vertical"){var T=this.state.offset,$=C>=T.left&&C<=T.left+T.width&&A>=T.top&&A<=T.top+T.height;return $?{x:C,y:A}:null}var z=this.state,D=z.angleAxisMap,Z=z.radiusAxisMap;if(D&&Z){var I=Xa(D);return Y3({x:C,y:A},I)}return null}},{key:"parseEventsOfWrapper",value:function(){var j=this.props.children,E=this.getTooltipEventType(),P=or(j,ni),O={};P&&E==="axis"&&(P.props.trigger==="click"?O={onClick:this.handleClick}:O={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var C=fp(this.props,this.handleOuterEvent);return te(te({},C),O)}},{key:"addListener",value:function(){Vy.on(qy,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Vy.removeListener(qy,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(j,E,P){for(var O=this.state.formattedGraphicalItems,C=0,A=O.length;C(await vt.get("/dashboard")).data});if(t)return o.jsx("div",{className:"flex justify-center items-center h-screen",children:o.jsx("div",{className:"text-xl text-gray-600",children:"Loading analytics..."})});const n=Object.entries((e==null?void 0:e.topics)||{}).map(([a,s])=>({name:a.replace(/_/g," ").replace(/\b\w/g,c=>c.toUpperCase()),value:s}));return o.jsx("div",{className:"min-h-screen p-8",style:{backgroundColor:"#F1F5F9"},children:o.jsxs("div",{className:"max-w-7xl mx-auto",children:[o.jsxs("div",{className:"mb-8",children:[o.jsx("h1",{className:"text-3xl font-bold mb-2",style:{color:"#354F52"},children:"Data & Trends"}),o.jsx("p",{className:"text-gray-600",children:"Statistics and insights across communities - see what's happening in local government"})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-8",children:[o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6 border-l-4 border-primary-500",children:[o.jsx("h3",{className:"text-sm font-medium text-gray-600 uppercase tracking-wide",children:"Total Documents"}),o.jsx("p",{className:"mt-2 text-4xl font-bold text-primary-600",children:((r=e==null?void 0:e.total_documents)==null?void 0:r.toLocaleString())||"0"}),o.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Meeting minutes & budgets"})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6 border-l-4 border-amber-500",children:[o.jsx("h3",{className:"text-sm font-medium text-gray-600 uppercase tracking-wide",children:"Opportunities Found"}),o.jsx("p",{className:"mt-2 text-4xl font-bold text-amber-600",children:((i=e==null?void 0:e.total_opportunities)==null?void 0:i.toLocaleString())||"0"}),o.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Advocacy windows identified"})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6 border-l-4 border-emerald-500",children:[o.jsx("h3",{className:"text-sm font-medium text-gray-600 uppercase tracking-wide",children:"States Monitored"}),o.jsx("p",{className:"mt-2 text-4xl font-bold text-emerald-600",children:(e==null?void 0:e.states_monitored)||"0"}),o.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Across the nation"})]})]}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 mb-8",children:[o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6",children:[o.jsx("h3",{className:"text-xl font-semibold mb-4 text-gray-900",children:"Policy Topics"}),n.length>0?o.jsx(DP,{width:"100%",height:300,children:o.jsxs(age,{data:n,children:[o.jsx(aL,{strokeDasharray:"3 3"}),o.jsx(tv,{dataKey:"name",angle:-45,textAnchor:"end",height:100}),o.jsx(nv,{}),o.jsx(ni,{}),o.jsx(Gs,{dataKey:"value",fill:"#0ea5e9"})]})}):o.jsx("div",{className:"h-64 flex items-center justify-center text-gray-400",children:"No topic data available"})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6",children:[o.jsx("h3",{className:"text-xl font-semibold mb-4 text-gray-900",children:"Topic Distribution"}),n.length>0?o.jsx(DP,{width:"100%",height:300,children:o.jsxs(oge,{children:[o.jsx(Fa,{data:n,cx:"50%",cy:"50%",labelLine:!1,label:a=>a.name,outerRadius:80,fill:"#8884d8",dataKey:"value",children:n.map((a,s)=>o.jsx(C0,{fill:_O[s%_O.length]},`cell-${s}`))}),o.jsx(ni,{})]})}):o.jsx("div",{className:"h-64 flex items-center justify-center text-gray-400",children:"No topic data available"})]})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6",children:[o.jsx("h3",{className:"text-xl font-semibold mb-4 text-gray-900",children:"Recent Causes"}),e!=null&&e.recent_opportunities&&e.recent_opportunities.length>0?o.jsx("div",{className:"overflow-x-auto",children:o.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[o.jsx("thead",{className:"bg-gray-50",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Location"}),o.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Topic"}),o.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Urgency"}),o.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Date"})]})}),o.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:e.recent_opportunities.map((a,s)=>o.jsxs("tr",{className:"hover:bg-gray-50",children:[o.jsxs("td",{className:"px-6 py-4 whitespace-nowrap",children:[o.jsx("div",{className:"text-sm font-medium text-gray-900",children:a.municipality}),o.jsx("div",{className:"text-sm text-gray-500",children:a.state})]}),o.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:a.topic.replace(/_/g," ")}),o.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:o.jsx("span",{className:`px-2 inline-flex text-xs leading-5 font-semibold rounded-full ${a.urgency==="critical"?"bg-red-100 text-red-800":a.urgency==="high"?"bg-orange-100 text-orange-800":a.urgency==="medium"?"bg-yellow-100 text-yellow-800":"bg-green-100 text-green-800"}`,children:a.urgency})}),o.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:new Date(a.date).toLocaleDateString()})]},s))})]})}):o.jsxs("div",{className:"text-center py-12",children:[o.jsx("p",{className:"text-gray-400 text-lg mb-4",children:"No opportunities found yet"}),o.jsx("p",{className:"text-gray-500 text-sm",children:"Run the data ingestion pipeline to analyze meetings and identify advocacy opportunities"})]})]})]})})}function lge(){const[e,t]=N.useState("all"),[n,r]=N.useState("2024");return o.jsx("div",{className:"min-h-screen p-8",style:{backgroundColor:"#F1F5F9"},children:o.jsxs("div",{className:"max-w-7xl mx-auto",children:[o.jsxs("div",{className:"mb-8",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[o.jsx(fc,{className:"h-8 w-8",style:{color:"#52796F"}}),o.jsx("h1",{className:"text-3xl font-bold",style:{color:"#354F52"},children:"Budget Analysis"})]}),o.jsx("p",{className:"text-gray-600",children:"Explore city, county, and school budgets with budget-to-minutes delta analysis"})]}),o.jsx("div",{className:"bg-white rounded-lg shadow-sm p-6 mb-8",children:o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"State"}),o.jsxs("select",{value:e,onChange:i=>t(i.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:outline-none",children:[o.jsx("option",{value:"all",children:"All States"}),o.jsx("option",{value:"AL",children:"Alabama"}),o.jsx("option",{value:"GA",children:"Georgia"}),o.jsx("option",{value:"MA",children:"Massachusetts"}),o.jsx("option",{value:"WA",children:"Washington"}),o.jsx("option",{value:"WI",children:"Wisconsin"})]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Fiscal Year"}),o.jsxs("select",{value:n,onChange:i=>r(i.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:outline-none",children:[o.jsx("option",{value:"2024",children:"FY 2024"}),o.jsx("option",{value:"2023",children:"FY 2023"}),o.jsx("option",{value:"2022",children:"FY 2022"})]})]})]})}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6 mb-8",children:[o.jsx("div",{className:"bg-white rounded-lg shadow-sm p-6 border-l-4",style:{borderColor:"#354F52"},children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium text-gray-600 uppercase tracking-wide",children:"Jurisdictions Tracked"}),o.jsx("p",{className:"mt-2 text-3xl font-bold",style:{color:"#354F52"},children:"90,000+"})]}),o.jsx(BB,{className:"h-12 w-12 text-gray-400"})]})}),o.jsx("div",{className:"bg-white rounded-lg shadow-sm p-6 border-l-4",style:{borderColor:"#52796F"},children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium text-gray-600 uppercase tracking-wide",children:"Budget Records"}),o.jsx("p",{className:"mt-2 text-3xl font-bold",style:{color:"#52796F"},children:"15,000+"})]}),o.jsx(PA,{className:"h-12 w-12 text-gray-400"})]})}),o.jsx("div",{className:"bg-white rounded-lg shadow-sm p-6 border-l-4 border-emerald-500",children:o.jsx("div",{className:"flex items-center justify-between",children:o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium text-gray-600 uppercase tracking-wide",children:"Avg Budget Increase"}),o.jsxs("p",{className:"mt-2 text-3xl font-bold text-emerald-600 flex items-center gap-2",children:["+3.2%",o.jsx(hB,{className:"h-6 w-6"})]})]})})}),o.jsx("div",{className:"bg-white rounded-lg shadow-sm p-6 border-l-4 border-amber-500",children:o.jsx("div",{className:"flex items-center justify-between",children:o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium text-gray-600 uppercase tracking-wide",children:"States Covered"}),o.jsx("p",{className:"mt-2 text-3xl font-bold text-amber-600",children:"50"})]})})})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8",children:[o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6",children:[o.jsx("h3",{className:"text-lg font-semibold mb-4",style:{color:"#354F52"},children:"Budget-to-Minutes Delta Analysis"}),o.jsxs("p",{className:"text-gray-600 mb-4",children:["Compare what governments ",o.jsx("strong",{children:"say"})," in meeting minutes versus what they ",o.jsx("strong",{children:"actually allocate"})," in budgets."]}),o.jsxs("ul",{className:"space-y-2 text-sm text-gray-700",children:[o.jsxs("li",{className:"flex items-start gap-2",children:[o.jsx("span",{className:"text-green-600 font-bold",children:"✓"}),"Track rhetoric vs. reality in budget decisions"]}),o.jsxs("li",{className:"flex items-start gap-2",children:[o.jsx("span",{className:"text-green-600 font-bold",children:"✓"}),"Identify funding priorities and gaps"]}),o.jsxs("li",{className:"flex items-start gap-2",children:[o.jsx("span",{className:"text-green-600 font-bold",children:"✓"}),"Monitor year-over-year changes"]})]})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6",children:[o.jsx("h3",{className:"text-lg font-semibold mb-4",style:{color:"#52796F"},children:"Budget Categories Tracked"}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[o.jsx("span",{className:"text-gray-700",children:"Education & Schools"}),o.jsx("span",{className:"font-semibold",children:"35%"})]}),o.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:o.jsx("div",{className:"bg-blue-600 h-2 rounded-full",style:{width:"35%"}})})]}),o.jsxs("div",{children:[o.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[o.jsx("span",{className:"text-gray-700",children:"Public Safety"}),o.jsx("span",{className:"font-semibold",children:"25%"})]}),o.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:o.jsx("div",{className:"bg-red-600 h-2 rounded-full",style:{width:"25%"}})})]}),o.jsxs("div",{children:[o.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[o.jsx("span",{className:"text-gray-700",children:"Infrastructure"}),o.jsx("span",{className:"font-semibold",children:"20%"})]}),o.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:o.jsx("div",{className:"bg-amber-600 h-2 rounded-full",style:{width:"20%"}})})]}),o.jsxs("div",{children:[o.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[o.jsx("span",{className:"text-gray-700",children:"Health & Human Services"}),o.jsx("span",{className:"font-semibold",children:"15%"})]}),o.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:o.jsx("div",{className:"bg-green-600 h-2 rounded-full",style:{width:"15%"}})})]})]})]})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-8 text-center border-2 border-dashed border-gray-300",children:[o.jsx(fc,{className:"h-16 w-16 mx-auto text-gray-400 mb-4"}),o.jsx("h3",{className:"text-xl font-semibold mb-2",style:{color:"#354F52"},children:"Budget Data Integration In Progress"}),o.jsx("p",{className:"text-gray-600 max-w-2xl mx-auto",children:"We're currently integrating budget data from cities, counties, and school districts across all 50 states. Check back soon for interactive budget comparisons, trend analysis, and meeting-to-budget correlation insights."}),o.jsx("div",{className:"mt-6",children:o.jsx("a",{href:"/documents?search=budget",className:"inline-block px-6 py-3 rounded-lg text-white transition-colors",style:{backgroundColor:"#52796F"},onMouseOver:i=>i.currentTarget.style.backgroundColor="#354F52",onMouseOut:i=>i.currentTarget.style.backgroundColor="#52796F",children:"Search Budget Meeting Minutes"})})]})]})})}function wL(e,t){const n=N.useRef(t);N.useEffect(function(){t!==n.current&&e.attributionControl!=null&&(n.current!=null&&e.attributionControl.removeAttribution(n.current),t!=null&&e.attributionControl.addAttribution(t)),n.current=t},[e,t])}function cge(e,t,n){t.center!==n.center&&e.setLatLng(t.center),t.radius!=null&&t.radius!==n.radius&&e.setRadius(t.radius)}const uge=1;function dge(e){return Object.freeze({__version:uge,map:e})}function fge(e,t){return Object.freeze({...e,...t})}const _L=N.createContext(null),jL=_L.Provider;function rj(){const e=N.useContext(_L);if(e==null)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of ");return e}function hge(e){function t(n,r){const{instance:i,context:a}=e(n).current;return N.useImperativeHandle(r,()=>i),n.children==null?null:H.createElement(jL,{value:a},n.children)}return N.forwardRef(t)}function mge(e){function t(n,r){const[i,a]=N.useState(!1),{instance:s}=e(n,a).current;N.useImperativeHandle(r,()=>s),N.useEffect(function(){i&&s.update()},[s,i,n.children]);const c=s._contentNode;return c?FC.createPortal(n.children,c):null}return N.forwardRef(t)}function pge(e){function t(n,r){const{instance:i}=e(n).current;return N.useImperativeHandle(r,()=>i),null}return N.forwardRef(t)}function ij(e,t){const n=N.useRef();N.useEffect(function(){return t!=null&&e.instance.on(t),n.current=t,function(){n.current!=null&&e.instance.off(n.current),n.current=null}},[e,t])}function iv(e,t){const n=e.pane??t.pane;return n?{...e,pane:n}:e}function gge(e,t){return function(r,i){const a=rj(),s=e(iv(r,a),a);return wL(a.map,r.attribution),ij(s.current,r.eventHandlers),t(s.current,a,r,i),s}}var rw={exports:{}};/* @preserve * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade */(function(e,t){(function(n,r){r(t)})(zu,function(n){var r="1.9.4";function i(l){var f,g,S,k;for(g=1,S=arguments.length;g"u"||!L||!L.Mixin)){l=j(l)?l:[l];for(var f=0;f0?Math.floor(l):Math.ceil(l)};R.prototype={clone:function(){return new R(this.x,this.y)},add:function(l){return this.clone()._add(W(l))},_add:function(l){return this.x+=l.x,this.y+=l.y,this},subtract:function(l){return this.clone()._subtract(W(l))},_subtract:function(l){return this.x-=l.x,this.y-=l.y,this},divideBy:function(l){return this.clone()._divideBy(l)},_divideBy:function(l){return this.x/=l,this.y/=l,this},multiplyBy:function(l){return this.clone()._multiplyBy(l)},_multiplyBy:function(l){return this.x*=l,this.y*=l,this},scaleBy:function(l){return new R(this.x*l.x,this.y*l.y)},unscaleBy:function(l){return new R(this.x/l.x,this.y/l.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=K(this.x),this.y=K(this.y),this},distanceTo:function(l){l=W(l);var f=l.x-this.x,g=l.y-this.y;return Math.sqrt(f*f+g*g)},equals:function(l){return l=W(l),l.x===this.x&&l.y===this.y},contains:function(l){return l=W(l),Math.abs(l.x)<=Math.abs(this.x)&&Math.abs(l.y)<=Math.abs(this.y)},toString:function(){return"Point("+p(this.x)+", "+p(this.y)+")"}};function W(l,f,g){return l instanceof R?l:j(l)?new R(l[0],l[1]):l==null?l:typeof l=="object"&&"x"in l&&"y"in l?new R(l.x,l.y):new R(l,f,g)}function U(l,f){if(l)for(var g=f?[l,f]:l,S=0,k=g.length;S=this.min.x&&g.x<=this.max.x&&f.y>=this.min.y&&g.y<=this.max.y},intersects:function(l){l=Y(l);var f=this.min,g=this.max,S=l.min,k=l.max,M=k.x>=f.x&&S.x<=g.x,V=k.y>=f.y&&S.y<=g.y;return M&&V},overlaps:function(l){l=Y(l);var f=this.min,g=this.max,S=l.min,k=l.max,M=k.x>f.x&&S.xf.y&&S.y=f.lat&&k.lat<=g.lat&&S.lng>=f.lng&&k.lng<=g.lng},intersects:function(l){l=ae(l);var f=this._southWest,g=this._northEast,S=l.getSouthWest(),k=l.getNorthEast(),M=k.lat>=f.lat&&S.lat<=g.lat,V=k.lng>=f.lng&&S.lng<=g.lng;return M&&V},overlaps:function(l){l=ae(l);var f=this._southWest,g=this._northEast,S=l.getSouthWest(),k=l.getNorthEast(),M=k.lat>f.lat&&S.latf.lng&&S.lng1,q$=function(){var l=!1;try{var f=Object.defineProperty({},"passive",{get:function(){l=!0}});window.addEventListener("testPassiveEventSupport",m,f),window.removeEventListener("testPassiveEventSupport",m,f)}catch{}return l}(),Z$=function(){return!!document.createElement("canvas").getContext}(),fv=!!(document.createElementNS&&ut("svg").createSVGRect),G$=!!fv&&function(){var l=document.createElement("div");return l.innerHTML="",(l.firstChild&&l.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),K$=!fv&&function(){try{var l=document.createElement("div");l.innerHTML='';var f=l.firstChild;return f.style.behavior="url(#default#VML)",f&&typeof f.adj=="object"}catch{return!1}}(),Y$=navigator.platform.indexOf("Mac")===0,X$=navigator.platform.indexOf("Linux")===0;function bi(l){return navigator.userAgent.toLowerCase().indexOf(l)>=0}var be={ie:pn,ielt9:Gr,edge:yi,webkit:Wn,android:nr,android23:Gi,androidStock:X,opera:de,chrome:Ae,gecko:Pt,safari:sn,phantom:ln,opera12:xi,win:Ks,ie3d:Rj,webkit3d:dv,gecko3d:Fj,any3d:D$,mobile:lu,mobileWebkit:B$,mobileWebkit3d:z$,msPointer:Dj,pointer:Bj,touch:U$,touchNative:zj,mobileOpera:W$,mobileGecko:H$,retina:V$,passiveEvents:q$,canvas:Z$,svg:fv,vml:K$,inlineSvg:G$,mac:Y$,linux:X$},Uj=be.msPointer?"MSPointerDown":"pointerdown",Wj=be.msPointer?"MSPointerMove":"pointermove",Hj=be.msPointer?"MSPointerUp":"pointerup",Vj=be.msPointer?"MSPointerCancel":"pointercancel",hv={touchstart:Uj,touchmove:Wj,touchend:Hj,touchcancel:Vj},qj={touchstart:r7,touchmove:lh,touchend:lh,touchcancel:lh},Ys={},Zj=!1;function Q$(l,f,g){return f==="touchstart"&&n7(),qj[f]?(g=qj[f].bind(this,g),l.addEventListener(hv[f],g,!1),g):(console.warn("wrong event specified:",f),m)}function J$(l,f,g){if(!hv[f]){console.warn("wrong event specified:",f);return}l.removeEventListener(hv[f],g,!1)}function e7(l){Ys[l.pointerId]=l}function t7(l){Ys[l.pointerId]&&(Ys[l.pointerId]=l)}function Gj(l){delete Ys[l.pointerId]}function n7(){Zj||(document.addEventListener(Uj,e7,!0),document.addEventListener(Wj,t7,!0),document.addEventListener(Hj,Gj,!0),document.addEventListener(Vj,Gj,!0),Zj=!0)}function lh(l,f){if(f.pointerType!==(f.MSPOINTER_TYPE_MOUSE||"mouse")){f.touches=[];for(var g in Ys)f.touches.push(Ys[g]);f.changedTouches=[f],l(f)}}function r7(l,f){f.MSPOINTER_TYPE_TOUCH&&f.pointerType===f.MSPOINTER_TYPE_TOUCH&&cn(f),lh(l,f)}function i7(l){var f={},g,S;for(S in l)g=l[S],f[S]=g&&g.bind?g.bind(l):g;return l=f,f.type="dblclick",f.detail=2,f.isTrusted=!1,f._simulated=!0,f}var a7=200;function o7(l,f){l.addEventListener("dblclick",f);var g=0,S;function k(M){if(M.detail!==1){S=M.detail;return}if(!(M.pointerType==="mouse"||M.sourceCapabilities&&!M.sourceCapabilities.firesTouchEvents)){var V=Jj(M);if(!(V.some(function(J){return J instanceof HTMLLabelElement&&J.attributes.for})&&!V.some(function(J){return J instanceof HTMLInputElement||J instanceof HTMLSelectElement}))){var Q=Date.now();Q-g<=a7?(S++,S===2&&f(i7(M))):S=1,g=Q}}}return l.addEventListener("click",k),{dblclick:f,simDblclick:k}}function s7(l,f){l.removeEventListener("dblclick",f.dblclick),l.removeEventListener("click",f.simDblclick)}var mv=dh(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),cu=dh(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Kj=cu==="webkitTransition"||cu==="OTransition"?cu+"End":"transitionend";function Yj(l){return typeof l=="string"?document.getElementById(l):l}function uu(l,f){var g=l.style[f]||l.currentStyle&&l.currentStyle[f];if((!g||g==="auto")&&document.defaultView){var S=document.defaultView.getComputedStyle(l,null);g=S?S[f]:null}return g==="auto"?null:g}function qe(l,f,g){var S=document.createElement(l);return S.className=f||"",g&&g.appendChild(S),S}function xt(l){var f=l.parentNode;f&&f.removeChild(l)}function ch(l){for(;l.firstChild;)l.removeChild(l.firstChild)}function Xs(l){var f=l.parentNode;f&&f.lastChild!==l&&f.appendChild(l)}function Qs(l){var f=l.parentNode;f&&f.firstChild!==l&&f.insertBefore(l,f.firstChild)}function pv(l,f){if(l.classList!==void 0)return l.classList.contains(f);var g=uh(l);return g.length>0&&new RegExp("(^|\\s)"+f+"(\\s|$)").test(g)}function Le(l,f){if(l.classList!==void 0)for(var g=_(f),S=0,k=g.length;S0?2*window.devicePixelRatio:1;function tN(l){return be.edge?l.wheelDeltaY/2:l.deltaY&&l.deltaMode===0?-l.deltaY/u7:l.deltaY&&l.deltaMode===1?-l.deltaY*20:l.deltaY&&l.deltaMode===2?-l.deltaY*60:l.deltaX||l.deltaZ?0:l.wheelDelta?(l.wheelDeltaY||l.wheelDelta)/2:l.detail&&Math.abs(l.detail)<32765?-l.detail*20:l.detail?l.detail/-32765*60:0}function Ev(l,f){var g=f.relatedTarget;if(!g)return!0;try{for(;g&&g!==l;)g=g.parentNode}catch{return!1}return g!==l}var d7={__proto__:null,on:Te,off:at,stopPropagation:Do,disableScrollPropagation:Pv,disableClickPropagation:mu,preventDefault:cn,stop:Bo,getPropagationPath:Jj,getMousePosition:eN,getWheelDelta:tN,isExternalTarget:Ev,addListener:Te,removeListener:at},nN=G.extend({run:function(l,f,g,S){this.stop(),this._el=l,this._inProgress=!0,this._duration=g||.25,this._easeOutPower=1/Math.max(S||.5,.2),this._startPos=Fo(l),this._offset=f.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=z(this._animate,this),this._step()},_step:function(l){var f=+new Date-this._startTime,g=this._duration*1e3;fthis.options.maxZoom)?this.setZoom(l):this},panInsideBounds:function(l,f){this._enforcingBounds=!0;var g=this.getCenter(),S=this._limitCenter(g,this._zoom,ae(l));return g.equals(S)||this.panTo(S,f),this._enforcingBounds=!1,this},panInside:function(l,f){f=f||{};var g=W(f.paddingTopLeft||f.padding||[0,0]),S=W(f.paddingBottomRight||f.padding||[0,0]),k=this.project(this.getCenter()),M=this.project(l),V=this.getPixelBounds(),Q=Y([V.min.add(g),V.max.subtract(S)]),J=Q.getSize();if(!Q.contains(M)){this._enforcingBounds=!0;var oe=M.subtract(Q.getCenter()),he=Q.extend(M).getSize().subtract(J);k.x+=oe.x<0?-he.x:he.x,k.y+=oe.y<0?-he.y:he.y,this.panTo(this.unproject(k),f),this._enforcingBounds=!1}return this},invalidateSize:function(l){if(!this._loaded)return this;l=i({animate:!1,pan:!0},l===!0?{animate:!0}:l);var f=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var g=this.getSize(),S=f.divideBy(2).round(),k=g.divideBy(2).round(),M=S.subtract(k);return!M.x&&!M.y?this:(l.animate&&l.pan?this.panBy(M):(l.pan&&this._rawPanBy(M),this.fire("move"),l.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(s(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:f,newSize:g}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(l){if(l=this._locateOptions=i({timeout:1e4,watch:!1},l),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var f=s(this._handleGeolocationResponse,this),g=s(this._handleGeolocationError,this);return l.watch?this._locationWatchId=navigator.geolocation.watchPosition(f,g,l):navigator.geolocation.getCurrentPosition(f,g,l),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(l){if(this._container._leaflet_id){var f=l.code,g=l.message||(f===1?"permission denied":f===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:f,message:"Geolocation error: "+g+"."})}},_handleGeolocationResponse:function(l){if(this._container._leaflet_id){var f=l.coords.latitude,g=l.coords.longitude,S=new ee(f,g),k=S.toBounds(l.coords.accuracy*2),M=this._locateOptions;if(M.setView){var V=this.getBoundsZoom(k);this.setView(S,M.maxZoom?Math.min(V,M.maxZoom):V)}var Q={latlng:S,bounds:k,timestamp:l.timestamp};for(var J in l.coords)typeof l.coords[J]=="number"&&(Q[J]=l.coords[J]);this.fire("locationfound",Q)}},addHandler:function(l,f){if(!f)return this;var g=this[l]=new f(this);return this._handlers.push(g),this.options[l]&&g.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),xt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(D(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var l;for(l in this._layers)this._layers[l].remove();for(l in this._panes)xt(this._panes[l]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(l,f){var g="leaflet-pane"+(l?" leaflet-"+l.replace("Pane","")+"-pane":""),S=qe("div",g,f||this._mapPane);return l&&(this._panes[l]=S),S},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var l=this.getPixelBounds(),f=this.unproject(l.getBottomLeft()),g=this.unproject(l.getTopRight());return new ne(f,g)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(l,f,g){l=ae(l),g=W(g||[0,0]);var S=this.getZoom()||0,k=this.getMinZoom(),M=this.getMaxZoom(),V=l.getNorthWest(),Q=l.getSouthEast(),J=this.getSize().subtract(g),oe=Y(this.project(Q,S),this.project(V,S)).getSize(),he=be.any3d?this.options.zoomSnap:1,Oe=J.x/oe.x,Fe=J.y/oe.y,Pn=f?Math.max(Oe,Fe):Math.min(Oe,Fe);return S=this.getScaleZoom(Pn,S),he&&(S=Math.round(S/(he/100))*(he/100),S=f?Math.ceil(S/he)*he:Math.floor(S/he)*he),Math.max(k,Math.min(M,S))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new R(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(l,f){var g=this._getTopLeftPoint(l,f);return new U(g,g.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(l){return this.options.crs.getProjectedBounds(l===void 0?this.getZoom():l)},getPane:function(l){return typeof l=="string"?this._panes[l]:l},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(l,f){var g=this.options.crs;return f=f===void 0?this._zoom:f,g.scale(l)/g.scale(f)},getScaleZoom:function(l,f){var g=this.options.crs;f=f===void 0?this._zoom:f;var S=g.zoom(l*g.scale(f));return isNaN(S)?1/0:S},project:function(l,f){return f=f===void 0?this._zoom:f,this.options.crs.latLngToPoint(ce(l),f)},unproject:function(l,f){return f=f===void 0?this._zoom:f,this.options.crs.pointToLatLng(W(l),f)},layerPointToLatLng:function(l){var f=W(l).add(this.getPixelOrigin());return this.unproject(f)},latLngToLayerPoint:function(l){var f=this.project(ce(l))._round();return f._subtract(this.getPixelOrigin())},wrapLatLng:function(l){return this.options.crs.wrapLatLng(ce(l))},wrapLatLngBounds:function(l){return this.options.crs.wrapLatLngBounds(ae(l))},distance:function(l,f){return this.options.crs.distance(ce(l),ce(f))},containerPointToLayerPoint:function(l){return W(l).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(l){return W(l).add(this._getMapPanePos())},containerPointToLatLng:function(l){var f=this.containerPointToLayerPoint(W(l));return this.layerPointToLatLng(f)},latLngToContainerPoint:function(l){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ce(l)))},mouseEventToContainerPoint:function(l){return eN(l,this._container)},mouseEventToLayerPoint:function(l){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(l))},mouseEventToLatLng:function(l){return this.layerPointToLatLng(this.mouseEventToLayerPoint(l))},_initContainer:function(l){var f=this._container=Yj(l);if(f){if(f._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");Te(f,"scroll",this._onScroll,this),this._containerId=u(f)},_initLayout:function(){var l=this._container;this._fadeAnimated=this.options.fadeAnimation&&be.any3d,Le(l,"leaflet-container"+(be.touch?" leaflet-touch":"")+(be.retina?" leaflet-retina":"")+(be.ielt9?" leaflet-oldie":"")+(be.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var f=uu(l,"position");f!=="absolute"&&f!=="relative"&&f!=="fixed"&&f!=="sticky"&&(l.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var l=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),It(this._mapPane,new R(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(Le(l.markerPane,"leaflet-zoom-hide"),Le(l.shadowPane,"leaflet-zoom-hide"))},_resetView:function(l,f,g){It(this._mapPane,new R(0,0));var S=!this._loaded;this._loaded=!0,f=this._limitZoom(f),this.fire("viewprereset");var k=this._zoom!==f;this._moveStart(k,g)._move(l,f)._moveEnd(k),this.fire("viewreset"),S&&this.fire("load")},_moveStart:function(l,f){return l&&this.fire("zoomstart"),f||this.fire("movestart"),this},_move:function(l,f,g,S){f===void 0&&(f=this._zoom);var k=this._zoom!==f;return this._zoom=f,this._lastCenter=l,this._pixelOrigin=this._getNewPixelOrigin(l),S?g&&g.pinch&&this.fire("zoom",g):((k||g&&g.pinch)&&this.fire("zoom",g),this.fire("move",g)),this},_moveEnd:function(l){return l&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return D(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(l){It(this._mapPane,this._getMapPanePos().subtract(l))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(l){this._targets={},this._targets[u(this._container)]=this;var f=l?at:Te;f(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&f(window,"resize",this._onResize,this),be.any3d&&this.options.transform3DLimit&&(l?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){D(this._resizeRequest),this._resizeRequest=z(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var l=this._getMapPanePos();Math.max(Math.abs(l.x),Math.abs(l.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(l,f){for(var g=[],S,k=f==="mouseout"||f==="mouseover",M=l.target||l.srcElement,V=!1;M;){if(S=this._targets[u(M)],S&&(f==="click"||f==="preclick")&&this._draggableMoved(S)){V=!0;break}if(S&&S.listens(f,!0)&&(k&&!Ev(M,l)||(g.push(S),k))||M===this._container)break;M=M.parentNode}return!g.length&&!V&&!k&&this.listens(f,!0)&&(g=[this]),g},_isClickDisabled:function(l){for(;l&&l!==this._container;){if(l._leaflet_disable_click)return!0;l=l.parentNode}},_handleDOMEvent:function(l){var f=l.target||l.srcElement;if(!(!this._loaded||f._leaflet_disable_events||l.type==="click"&&this._isClickDisabled(f))){var g=l.type;g==="mousedown"&&wv(f),this._fireDOMEvent(l,g)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(l,f,g){if(l.type==="click"){var S=i({},l);S.type="preclick",this._fireDOMEvent(S,S.type,g)}var k=this._findEventTargets(l,f);if(g){for(var M=[],V=0;V0?Math.round(l-f)/2:Math.max(0,Math.ceil(l))-Math.max(0,Math.floor(f))},_limitZoom:function(l){var f=this.getMinZoom(),g=this.getMaxZoom(),S=be.any3d?this.options.zoomSnap:1;return S&&(l=Math.round(l/S)*S),Math.max(f,Math.min(g,l))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Mt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(l,f){var g=this._getCenterOffset(l)._trunc();return(f&&f.animate)!==!0&&!this.getSize().contains(g)?!1:(this.panBy(g,f),!0)},_createAnimProxy:function(){var l=this._proxy=qe("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(l),this.on("zoomanim",function(f){var g=mv,S=this._proxy.style[g];Ro(this._proxy,this.project(f.center,f.zoom),this.getZoomScale(f.zoom,1)),S===this._proxy.style[g]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){xt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var l=this.getCenter(),f=this.getZoom();Ro(this._proxy,this.project(l,f),this.getZoomScale(f,1))},_catchTransitionEnd:function(l){this._animatingZoom&&l.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(l,f,g){if(this._animatingZoom)return!0;if(g=g||{},!this._zoomAnimated||g.animate===!1||this._nothingToAnimate()||Math.abs(f-this._zoom)>this.options.zoomAnimationThreshold)return!1;var S=this.getZoomScale(f),k=this._getCenterOffset(l)._divideBy(1-1/S);return g.animate!==!0&&!this.getSize().contains(k)?!1:(z(function(){this._moveStart(!0,g.noMoveStart||!1)._animateZoom(l,f,!0)},this),!0)},_animateZoom:function(l,f,g,S){this._mapPane&&(g&&(this._animatingZoom=!0,this._animateToCenter=l,this._animateToZoom=f,Le(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:l,zoom:f,noUpdate:S}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(s(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Mt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function f7(l,f){return new We(l,f)}var Kr=I.extend({options:{position:"topright"},initialize:function(l){x(this,l)},getPosition:function(){return this.options.position},setPosition:function(l){var f=this._map;return f&&f.removeControl(this),this.options.position=l,f&&f.addControl(this),this},getContainer:function(){return this._container},addTo:function(l){this.remove(),this._map=l;var f=this._container=this.onAdd(l),g=this.getPosition(),S=l._controlCorners[g];return Le(f,"leaflet-control"),g.indexOf("bottom")!==-1?S.insertBefore(f,S.firstChild):S.appendChild(f),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(xt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(l){this._map&&l&&l.screenX>0&&l.screenY>0&&this._map.getContainer().focus()}}),pu=function(l){return new Kr(l)};We.include({addControl:function(l){return l.addTo(this),this},removeControl:function(l){return l.remove(),this},_initControlPos:function(){var l=this._controlCorners={},f="leaflet-",g=this._controlContainer=qe("div",f+"control-container",this._container);function S(k,M){var V=f+k+" "+f+M;l[k+M]=qe("div",V,g)}S("top","left"),S("top","right"),S("bottom","left"),S("bottom","right")},_clearControlPos:function(){for(var l in this._controlCorners)xt(this._controlCorners[l]);xt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var rN=Kr.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(l,f,g,S){return g1,this._baseLayersList.style.display=l?"":"none"),this._separator.style.display=f&&l?"":"none",this},_onLayerChange:function(l){this._handlingClick||this._update();var f=this._getLayer(u(l.target)),g=f.overlay?l.type==="add"?"overlayadd":"overlayremove":l.type==="add"?"baselayerchange":null;g&&this._map.fire(g,f)},_createRadioElement:function(l,f){var g='",S=document.createElement("div");return S.innerHTML=g,S.firstChild},_addItem:function(l){var f=document.createElement("label"),g=this._map.hasLayer(l.layer),S;l.overlay?(S=document.createElement("input"),S.type="checkbox",S.className="leaflet-control-layers-selector",S.defaultChecked=g):S=this._createRadioElement("leaflet-base-layers_"+u(this),g),this._layerControlInputs.push(S),S.layerId=u(l.layer),Te(S,"click",this._onInputClick,this);var k=document.createElement("span");k.innerHTML=" "+l.name;var M=document.createElement("span");f.appendChild(M),M.appendChild(S),M.appendChild(k);var V=l.overlay?this._overlaysList:this._baseLayersList;return V.appendChild(f),this._checkDisabledLayers(),f},_onInputClick:function(){if(!this._preventClick){var l=this._layerControlInputs,f,g,S=[],k=[];this._handlingClick=!0;for(var M=l.length-1;M>=0;M--)f=l[M],g=this._getLayer(f.layerId).layer,f.checked?S.push(g):f.checked||k.push(g);for(M=0;M=0;k--)f=l[k],g=this._getLayer(f.layerId).layer,f.disabled=g.options.minZoom!==void 0&&Sg.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var l=this._section;this._preventClick=!0,Te(l,"click",cn),this.expand();var f=this;setTimeout(function(){at(l,"click",cn),f._preventClick=!1})}}),h7=function(l,f,g){return new rN(l,f,g)},Ov=Kr.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(l){var f="leaflet-control-zoom",g=qe("div",f+" leaflet-bar"),S=this.options;return this._zoomInButton=this._createButton(S.zoomInText,S.zoomInTitle,f+"-in",g,this._zoomIn),this._zoomOutButton=this._createButton(S.zoomOutText,S.zoomOutTitle,f+"-out",g,this._zoomOut),this._updateDisabled(),l.on("zoomend zoomlevelschange",this._updateDisabled,this),g},onRemove:function(l){l.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(l){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(l.shiftKey?3:1))},_createButton:function(l,f,g,S,k){var M=qe("a",g,S);return M.innerHTML=l,M.href="#",M.title=f,M.setAttribute("role","button"),M.setAttribute("aria-label",f),mu(M),Te(M,"click",Bo),Te(M,"click",k,this),Te(M,"click",this._refocusOnMap,this),M},_updateDisabled:function(){var l=this._map,f="leaflet-disabled";Mt(this._zoomInButton,f),Mt(this._zoomOutButton,f),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||l._zoom===l.getMinZoom())&&(Le(this._zoomOutButton,f),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||l._zoom===l.getMaxZoom())&&(Le(this._zoomInButton,f),this._zoomInButton.setAttribute("aria-disabled","true"))}});We.mergeOptions({zoomControl:!0}),We.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Ov,this.addControl(this.zoomControl))});var m7=function(l){return new Ov(l)},iN=Kr.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(l){var f="leaflet-control-scale",g=qe("div",f),S=this.options;return this._addScales(S,f+"-line",g),l.on(S.updateWhenIdle?"moveend":"move",this._update,this),l.whenReady(this._update,this),g},onRemove:function(l){l.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(l,f,g){l.metric&&(this._mScale=qe("div",f,g)),l.imperial&&(this._iScale=qe("div",f,g))},_update:function(){var l=this._map,f=l.getSize().y/2,g=l.distance(l.containerPointToLatLng([0,f]),l.containerPointToLatLng([this.options.maxWidth,f]));this._updateScales(g)},_updateScales:function(l){this.options.metric&&l&&this._updateMetric(l),this.options.imperial&&l&&this._updateImperial(l)},_updateMetric:function(l){var f=this._getRoundNum(l),g=f<1e3?f+" m":f/1e3+" km";this._updateScale(this._mScale,g,f/l)},_updateImperial:function(l){var f=l*3.2808399,g,S,k;f>5280?(g=f/5280,S=this._getRoundNum(g),this._updateScale(this._iScale,S+" mi",S/g)):(k=this._getRoundNum(f),this._updateScale(this._iScale,k+" ft",k/f))},_updateScale:function(l,f,g){l.style.width=Math.round(this.options.maxWidth*g)+"px",l.innerHTML=f},_getRoundNum:function(l){var f=Math.pow(10,(Math.floor(l)+"").length-1),g=l/f;return g=g>=10?10:g>=5?5:g>=3?3:g>=2?2:1,f*g}}),p7=function(l){return new iN(l)},g7='',kv=Kr.extend({options:{position:"bottomright",prefix:''+(be.inlineSvg?g7+" ":"")+"Leaflet"},initialize:function(l){x(this,l),this._attributions={}},onAdd:function(l){l.attributionControl=this,this._container=qe("div","leaflet-control-attribution"),mu(this._container);for(var f in l._layers)l._layers[f].getAttribution&&this.addAttribution(l._layers[f].getAttribution());return this._update(),l.on("layeradd",this._addAttribution,this),this._container},onRemove:function(l){l.off("layeradd",this._addAttribution,this)},_addAttribution:function(l){l.layer.getAttribution&&(this.addAttribution(l.layer.getAttribution()),l.layer.once("remove",function(){this.removeAttribution(l.layer.getAttribution())},this))},setPrefix:function(l){return this.options.prefix=l,this._update(),this},addAttribution:function(l){return l?(this._attributions[l]||(this._attributions[l]=0),this._attributions[l]++,this._update(),this):this},removeAttribution:function(l){return l?(this._attributions[l]&&(this._attributions[l]--,this._update()),this):this},_update:function(){if(this._map){var l=[];for(var f in this._attributions)this._attributions[f]&&l.push(f);var g=[];this.options.prefix&&g.push(this.options.prefix),l.length&&g.push(l.join(", ")),this._container.innerHTML=g.join(' ')}}});We.mergeOptions({attributionControl:!0}),We.addInitHook(function(){this.options.attributionControl&&new kv().addTo(this)});var v7=function(l){return new kv(l)};Kr.Layers=rN,Kr.Zoom=Ov,Kr.Scale=iN,Kr.Attribution=kv,pu.layers=h7,pu.zoom=m7,pu.scale=p7,pu.attribution=v7;var _i=I.extend({initialize:function(l){this._map=l},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});_i.addTo=function(l,f){return l.addHandler(f,this),this};var y7={Events:B},aN=be.touch?"touchstart mousedown":"mousedown",Da=G.extend({options:{clickTolerance:3},initialize:function(l,f,g,S){x(this,S),this._element=l,this._dragStartTarget=f||l,this._preventOutline=g},enable:function(){this._enabled||(Te(this._dragStartTarget,aN,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Da._dragging===this&&this.finishDrag(!0),at(this._dragStartTarget,aN,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(l){if(this._enabled&&(this._moved=!1,!pv(this._element,"leaflet-zoom-anim"))){if(l.touches&&l.touches.length!==1){Da._dragging===this&&this.finishDrag();return}if(!(Da._dragging||l.shiftKey||l.which!==1&&l.button!==1&&!l.touches)&&(Da._dragging=this,this._preventOutline&&wv(this._element),yv(),du(),!this._moving)){this.fire("down");var f=l.touches?l.touches[0]:l,g=Xj(this._element);this._startPoint=new R(f.clientX,f.clientY),this._startPos=Fo(this._element),this._parentScale=_v(g);var S=l.type==="mousedown";Te(document,S?"mousemove":"touchmove",this._onMove,this),Te(document,S?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(l){if(this._enabled){if(l.touches&&l.touches.length>1){this._moved=!0;return}var f=l.touches&&l.touches.length===1?l.touches[0]:l,g=new R(f.clientX,f.clientY)._subtract(this._startPoint);!g.x&&!g.y||Math.abs(g.x)+Math.abs(g.y)M&&(V=Q,M=J);M>g&&(f[V]=1,Av(l,f,g,S,V),Av(l,f,g,V,k))}function _7(l,f){for(var g=[l[0]],S=1,k=0,M=l.length;Sf&&(g.push(l[S]),k=S);return kf.max.x&&(g|=2),l.yf.max.y&&(g|=8),g}function j7(l,f){var g=f.x-l.x,S=f.y-l.y;return g*g+S*S}function gu(l,f,g,S){var k=f.x,M=f.y,V=g.x-k,Q=g.y-M,J=V*V+Q*Q,oe;return J>0&&(oe=((l.x-k)*V+(l.y-M)*Q)/J,oe>1?(k=g.x,M=g.y):oe>0&&(k+=V*oe,M+=Q*oe)),V=l.x-k,Q=l.y-M,S?V*V+Q*Q:new R(k,M)}function _r(l){return!j(l[0])||typeof l[0][0]!="object"&&typeof l[0][0]<"u"}function fN(l){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),_r(l)}function hN(l,f){var g,S,k,M,V,Q,J,oe;if(!l||l.length===0)throw new Error("latlngs not passed");_r(l)||(console.warn("latlngs are not flat! Only the first ring will be used"),l=l[0]);var he=ce([0,0]),Oe=ae(l),Fe=Oe.getNorthWest().distanceTo(Oe.getSouthWest())*Oe.getNorthEast().distanceTo(Oe.getNorthWest());Fe<1700&&(he=Cv(l));var Pn=l.length,Yt=[];for(g=0;gS){J=(M-S)/k,oe=[Q.x-J*(Q.x-V.x),Q.y-J*(Q.y-V.y)];break}var Hn=f.unproject(W(oe));return ce([Hn.lat+he.lat,Hn.lng+he.lng])}var N7={__proto__:null,simplify:lN,pointToSegmentDistance:cN,closestPointOnSegment:b7,clipSegment:dN,_getEdgeIntersection:mh,_getBitCode:zo,_sqClosestPointOnSegment:gu,isFlat:_r,_flat:fN,polylineCenter:hN},Tv={project:function(l){return new R(l.lng,l.lat)},unproject:function(l){return new ee(l.y,l.x)},bounds:new U([-180,-90],[180,90])},Mv={R:6378137,R_MINOR:6356752314245179e-9,bounds:new U([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(l){var f=Math.PI/180,g=this.R,S=l.lat*f,k=this.R_MINOR/g,M=Math.sqrt(1-k*k),V=M*Math.sin(S),Q=Math.tan(Math.PI/4-S/2)/Math.pow((1-V)/(1+V),M/2);return S=-g*Math.log(Math.max(Q,1e-10)),new R(l.lng*f*g,S)},unproject:function(l){for(var f=180/Math.PI,g=this.R,S=this.R_MINOR/g,k=Math.sqrt(1-S*S),M=Math.exp(-l.y/g),V=Math.PI/2-2*Math.atan(M),Q=0,J=.1,oe;Q<15&&Math.abs(J)>1e-7;Q++)oe=k*Math.sin(V),oe=Math.pow((1-oe)/(1+oe),k/2),J=Math.PI/2-2*Math.atan(M*oe)-V,V+=J;return new ee(V*f,l.x*f/g)}},S7={__proto__:null,LonLat:Tv,Mercator:Mv,SphericalMercator:ye},P7=i({},Ee,{code:"EPSG:3395",projection:Mv,transformation:function(){var l=.5/(Math.PI*Mv.R);return ie(l,.5,-l,.5)}()}),mN=i({},Ee,{code:"EPSG:4326",projection:Tv,transformation:ie(1/180,1,-1/180,.5)}),E7=i({},Ne,{projection:Tv,transformation:ie(1,0,-1,0),scale:function(l){return Math.pow(2,l)},zoom:function(l){return Math.log(l)/Math.LN2},distance:function(l,f){var g=f.lng-l.lng,S=f.lat-l.lat;return Math.sqrt(g*g+S*S)},infinite:!0});Ne.Earth=Ee,Ne.EPSG3395=P7,Ne.EPSG3857=Ve,Ne.EPSG900913=Re,Ne.EPSG4326=mN,Ne.Simple=E7;var Yr=G.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(l){return l.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(l){return l&&l.removeLayer(this),this},getPane:function(l){return this._map.getPane(l?this.options[l]||l:this.options.pane)},addInteractiveTarget:function(l){return this._map._targets[u(l)]=this,this},removeInteractiveTarget:function(l){return delete this._map._targets[u(l)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(l){var f=l.target;if(f.hasLayer(this)){if(this._map=f,this._zoomAnimated=f._zoomAnimated,this.getEvents){var g=this.getEvents();f.on(g,this),this.once("remove",function(){f.off(g,this)},this)}this.onAdd(f),this.fire("add"),f.fire("layeradd",{layer:this})}}});We.include({addLayer:function(l){if(!l._layerAdd)throw new Error("The provided object is not a Layer.");var f=u(l);return this._layers[f]?this:(this._layers[f]=l,l._mapToAdd=this,l.beforeAdd&&l.beforeAdd(this),this.whenReady(l._layerAdd,l),this)},removeLayer:function(l){var f=u(l);return this._layers[f]?(this._loaded&&l.onRemove(this),delete this._layers[f],this._loaded&&(this.fire("layerremove",{layer:l}),l.fire("remove")),l._map=l._mapToAdd=null,this):this},hasLayer:function(l){return u(l)in this._layers},eachLayer:function(l,f){for(var g in this._layers)l.call(f,this._layers[g]);return this},_addLayers:function(l){l=l?j(l)?l:[l]:[];for(var f=0,g=l.length;fthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&f[0]instanceof ee&&f[0].equals(f[g-1])&&f.pop(),f},_setLatLngs:function(l){Yi.prototype._setLatLngs.call(this,l),_r(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return _r(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var l=this._renderer._bounds,f=this.options.weight,g=new R(f,f);if(l=new U(l.min.subtract(g),l.max.add(g)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(l))){if(this.options.noClip){this._parts=this._rings;return}for(var S=0,k=this._rings.length,M;Sl.y!=k.y>l.y&&l.x<(k.x-S.x)*(l.y-S.y)/(k.y-S.y)+S.x&&(f=!f);return f||Yi.prototype._containsPoint.call(this,l,!0)}});function $7(l,f){return new tl(l,f)}var Xi=Ki.extend({initialize:function(l,f){x(this,f),this._layers={},l&&this.addData(l)},addData:function(l){var f=j(l)?l:l.features,g,S,k;if(f){for(g=0,S=f.length;g0&&k.push(k[0].slice()),k}function nl(l,f){return l.feature?i({},l.feature,{geometry:f}):bh(f)}function bh(l){return l.type==="Feature"||l.type==="FeatureCollection"?l:{type:"Feature",properties:{},geometry:l}}var Rv={toGeoJSON:function(l){return nl(this,{type:"Point",coordinates:Iv(this.getLatLng(),l)})}};ph.include(Rv),Lv.include(Rv),gh.include(Rv),Yi.include({toGeoJSON:function(l){var f=!_r(this._latlngs),g=xh(this._latlngs,f?1:0,!1,l);return nl(this,{type:(f?"Multi":"")+"LineString",coordinates:g})}}),tl.include({toGeoJSON:function(l){var f=!_r(this._latlngs),g=f&&!_r(this._latlngs[0]),S=xh(this._latlngs,g?2:f?1:0,!0,l);return f||(S=[S]),nl(this,{type:(g?"Multi":"")+"Polygon",coordinates:S})}}),Js.include({toMultiPoint:function(l){var f=[];return this.eachLayer(function(g){f.push(g.toGeoJSON(l).geometry.coordinates)}),nl(this,{type:"MultiPoint",coordinates:f})},toGeoJSON:function(l){var f=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(f==="MultiPoint")return this.toMultiPoint(l);var g=f==="GeometryCollection",S=[];return this.eachLayer(function(k){if(k.toGeoJSON){var M=k.toGeoJSON(l);if(g)S.push(M.geometry);else{var V=bh(M);V.type==="FeatureCollection"?S.push.apply(S,V.features):S.push(V)}}}),g?nl(this,{geometries:S,type:"GeometryCollection"}):{type:"FeatureCollection",features:S}}});function vN(l,f){return new Xi(l,f)}var I7=vN,wh=Yr.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(l,f,g){this._url=l,this._bounds=ae(f),x(this,g)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(Le(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){xt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(l){return this.options.opacity=l,this._image&&this._updateOpacity(),this},setStyle:function(l){return l.opacity&&this.setOpacity(l.opacity),this},bringToFront:function(){return this._map&&Xs(this._image),this},bringToBack:function(){return this._map&&Qs(this._image),this},setUrl:function(l){return this._url=l,this._image&&(this._image.src=l),this},setBounds:function(l){return this._bounds=ae(l),this._map&&this._reset(),this},getEvents:function(){var l={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(l.zoomanim=this._animateZoom),l},setZIndex:function(l){return this.options.zIndex=l,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var l=this._url.tagName==="IMG",f=this._image=l?this._url:qe("img");if(Le(f,"leaflet-image-layer"),this._zoomAnimated&&Le(f,"leaflet-zoom-animated"),this.options.className&&Le(f,this.options.className),f.onselectstart=m,f.onmousemove=m,f.onload=s(this.fire,this,"load"),f.onerror=s(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(f.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),l){this._url=f.src;return}f.src=this._url,f.alt=this.options.alt},_animateZoom:function(l){var f=this._map.getZoomScale(l.zoom),g=this._map._latLngBoundsToNewLayerBounds(this._bounds,l.zoom,l.center).min;Ro(this._image,g,f)},_reset:function(){var l=this._image,f=new U(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),g=f.getSize();It(l,f.min),l.style.width=g.x+"px",l.style.height=g.y+"px"},_updateOpacity:function(){wr(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var l=this.options.errorOverlayUrl;l&&this._url!==l&&(this._url=l,this._image.src=l)},getCenter:function(){return this._bounds.getCenter()}}),R7=function(l,f,g){return new wh(l,f,g)},yN=wh.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var l=this._url.tagName==="VIDEO",f=this._image=l?this._url:qe("video");if(Le(f,"leaflet-image-layer"),this._zoomAnimated&&Le(f,"leaflet-zoom-animated"),this.options.className&&Le(f,this.options.className),f.onselectstart=m,f.onmousemove=m,f.onloadeddata=s(this.fire,this,"load"),l){for(var g=f.getElementsByTagName("source"),S=[],k=0;k0?S:[f.src];return}j(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(f.style,"objectFit")&&(f.style.objectFit="fill"),f.autoplay=!!this.options.autoplay,f.loop=!!this.options.loop,f.muted=!!this.options.muted,f.playsInline=!!this.options.playsInline;for(var M=0;Mk?(f.height=k+"px",Le(l,M)):Mt(l,M),this._containerWidth=this._container.offsetWidth},_animateZoom:function(l){var f=this._map._latLngToNewLayerPoint(this._latlng,l.zoom,l.center),g=this._getAnchor();It(this._container,f.add(g))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var l=this._map,f=parseInt(uu(this._container,"marginBottom"),10)||0,g=this._container.offsetHeight+f,S=this._containerWidth,k=new R(this._containerLeft,-g-this._containerBottom);k._add(Fo(this._container));var M=l.layerPointToContainerPoint(k),V=W(this.options.autoPanPadding),Q=W(this.options.autoPanPaddingTopLeft||V),J=W(this.options.autoPanPaddingBottomRight||V),oe=l.getSize(),he=0,Oe=0;M.x+S+J.x>oe.x&&(he=M.x+S-oe.x+J.x),M.x-he-Q.x<0&&(he=M.x-Q.x),M.y+g+J.y>oe.y&&(Oe=M.y+g-oe.y+J.y),M.y-Oe-Q.y<0&&(Oe=M.y-Q.y),(he||Oe)&&(this.options.keepInView&&(this._autopanning=!0),l.fire("autopanstart").panBy([he,Oe]))}},_getAnchor:function(){return W(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),B7=function(l,f){return new _h(l,f)};We.mergeOptions({closePopupOnClick:!0}),We.include({openPopup:function(l,f,g){return this._initOverlay(_h,l,f,g).openOn(this),this},closePopup:function(l){return l=arguments.length?l:this._popup,l&&l.close(),this}}),Yr.include({bindPopup:function(l,f){return this._popup=this._initOverlay(_h,this._popup,l,f),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(l){return this._popup&&(this instanceof Ki||(this._popup._source=this),this._popup._prepareOpen(l||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(l){return this._popup&&this._popup.setContent(l),this},getPopup:function(){return this._popup},_openPopup:function(l){if(!(!this._popup||!this._map)){Bo(l);var f=l.layer||l.target;if(this._popup._source===f&&!(f instanceof Ba)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(l.latlng);return}this._popup._source=f,this.openPopup(l.latlng)}},_movePopup:function(l){this._popup.setLatLng(l.latlng)},_onKeyPress:function(l){l.originalEvent.keyCode===13&&this._openPopup(l)}});var jh=ji.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(l){ji.prototype.onAdd.call(this,l),this.setOpacity(this.options.opacity),l.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(l){ji.prototype.onRemove.call(this,l),l.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var l=ji.prototype.getEvents.call(this);return this.options.permanent||(l.preclick=this.close),l},_initLayout:function(){var l="leaflet-tooltip",f=l+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=qe("div",f),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+u(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(l){var f,g,S=this._map,k=this._container,M=S.latLngToContainerPoint(S.getCenter()),V=S.layerPointToContainerPoint(l),Q=this.options.direction,J=k.offsetWidth,oe=k.offsetHeight,he=W(this.options.offset),Oe=this._getAnchor();Q==="top"?(f=J/2,g=oe):Q==="bottom"?(f=J/2,g=0):Q==="center"?(f=J/2,g=oe/2):Q==="right"?(f=0,g=oe/2):Q==="left"?(f=J,g=oe/2):V.xthis.options.maxZoom||gS?this._retainParent(k,M,V,S):!1)},_retainChildren:function(l,f,g,S){for(var k=2*l;k<2*l+2;k++)for(var M=2*f;M<2*f+2;M++){var V=new R(k,M);V.z=g+1;var Q=this._tileCoordsToKey(V),J=this._tiles[Q];if(J&&J.active){J.retain=!0;continue}else J&&J.loaded&&(J.retain=!0);g+1this.options.maxZoom||this.options.minZoom!==void 0&&k1){this._setView(l,g);return}for(var Oe=k.min.y;Oe<=k.max.y;Oe++)for(var Fe=k.min.x;Fe<=k.max.x;Fe++){var Pn=new R(Fe,Oe);if(Pn.z=this._tileZoom,!!this._isValidTile(Pn)){var Yt=this._tiles[this._tileCoordsToKey(Pn)];Yt?Yt.current=!0:V.push(Pn)}}if(V.sort(function(Hn,il){return Hn.distanceTo(M)-il.distanceTo(M)}),V.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var jr=document.createDocumentFragment();for(Fe=0;Feg.max.x)||!f.wrapLat&&(l.yg.max.y))return!1}if(!this.options.bounds)return!0;var S=this._tileCoordsToBounds(l);return ae(this.options.bounds).overlaps(S)},_keyToBounds:function(l){return this._tileCoordsToBounds(this._keyToTileCoords(l))},_tileCoordsToNwSe:function(l){var f=this._map,g=this.getTileSize(),S=l.scaleBy(g),k=S.add(g),M=f.unproject(S,l.z),V=f.unproject(k,l.z);return[M,V]},_tileCoordsToBounds:function(l){var f=this._tileCoordsToNwSe(l),g=new ne(f[0],f[1]);return this.options.noWrap||(g=this._map.wrapLatLngBounds(g)),g},_tileCoordsToKey:function(l){return l.x+":"+l.y+":"+l.z},_keyToTileCoords:function(l){var f=l.split(":"),g=new R(+f[0],+f[1]);return g.z=+f[2],g},_removeTile:function(l){var f=this._tiles[l];f&&(xt(f.el),delete this._tiles[l],this.fire("tileunload",{tile:f.el,coords:this._keyToTileCoords(l)}))},_initTile:function(l){Le(l,"leaflet-tile");var f=this.getTileSize();l.style.width=f.x+"px",l.style.height=f.y+"px",l.onselectstart=m,l.onmousemove=m,be.ielt9&&this.options.opacity<1&&wr(l,this.options.opacity)},_addTile:function(l,f){var g=this._getTilePos(l),S=this._tileCoordsToKey(l),k=this.createTile(this._wrapCoords(l),s(this._tileReady,this,l));this._initTile(k),this.createTile.length<2&&z(s(this._tileReady,this,l,null,k)),It(k,g),this._tiles[S]={el:k,coords:l,current:!0},f.appendChild(k),this.fire("tileloadstart",{tile:k,coords:l})},_tileReady:function(l,f,g){f&&this.fire("tileerror",{error:f,tile:g,coords:l});var S=this._tileCoordsToKey(l);g=this._tiles[S],g&&(g.loaded=+new Date,this._map._fadeAnimated?(wr(g.el,0),D(this._fadeFrame),this._fadeFrame=z(this._updateOpacity,this)):(g.active=!0,this._pruneTiles()),f||(Le(g.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:g.el,coords:l})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),be.ielt9||!this._map._fadeAnimated?z(this._pruneTiles,this):setTimeout(s(this._pruneTiles,this),250)))},_getTilePos:function(l){return l.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(l){var f=new R(this._wrapX?h(l.x,this._wrapX):l.x,this._wrapY?h(l.y,this._wrapY):l.y);return f.z=l.z,f},_pxBoundsToTileRange:function(l){var f=this.getTileSize();return new U(l.min.unscaleBy(f).floor(),l.max.unscaleBy(f).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var l in this._tiles)if(!this._tiles[l].loaded)return!1;return!0}});function W7(l){return new yu(l)}var rl=yu.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(l,f){this._url=l,f=x(this,f),f.detectRetina&&be.retina&&f.maxZoom>0?(f.tileSize=Math.floor(f.tileSize/2),f.zoomReverse?(f.zoomOffset--,f.minZoom=Math.min(f.maxZoom,f.minZoom+1)):(f.zoomOffset++,f.maxZoom=Math.max(f.minZoom,f.maxZoom-1)),f.minZoom=Math.max(0,f.minZoom)):f.zoomReverse?f.minZoom=Math.min(f.maxZoom,f.minZoom):f.maxZoom=Math.max(f.minZoom,f.maxZoom),typeof f.subdomains=="string"&&(f.subdomains=f.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(l,f){return this._url===l&&f===void 0&&(f=!0),this._url=l,f||this.redraw(),this},createTile:function(l,f){var g=document.createElement("img");return Te(g,"load",s(this._tileOnLoad,this,f,g)),Te(g,"error",s(this._tileOnError,this,f,g)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(g.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(g.referrerPolicy=this.options.referrerPolicy),g.alt="",g.src=this.getTileUrl(l),g},getTileUrl:function(l){var f={r:be.retina?"@2x":"",s:this._getSubdomain(l),x:l.x,y:l.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var g=this._globalTileRange.max.y-l.y;this.options.tms&&(f.y=g),f["-y"]=g}return b(this._url,i(f,this.options))},_tileOnLoad:function(l,f){be.ielt9?setTimeout(s(l,this,null,f),0):l(null,f)},_tileOnError:function(l,f,g){var S=this.options.errorTileUrl;S&&f.getAttribute("src")!==S&&(f.src=S),l(g,f)},_onTileRemove:function(l){l.tile.onload=null},_getZoomForUrl:function(){var l=this._tileZoom,f=this.options.maxZoom,g=this.options.zoomReverse,S=this.options.zoomOffset;return g&&(l=f-l),l+S},_getSubdomain:function(l){var f=Math.abs(l.x+l.y)%this.options.subdomains.length;return this.options.subdomains[f]},_abortLoading:function(){var l,f;for(l in this._tiles)if(this._tiles[l].coords.z!==this._tileZoom&&(f=this._tiles[l].el,f.onload=m,f.onerror=m,!f.complete)){f.src=P;var g=this._tiles[l].coords;xt(f),delete this._tiles[l],this.fire("tileabort",{tile:f,coords:g})}},_removeTile:function(l){var f=this._tiles[l];if(f)return f.el.setAttribute("src",P),yu.prototype._removeTile.call(this,l)},_tileReady:function(l,f,g){if(!(!this._map||g&&g.getAttribute("src")===P))return yu.prototype._tileReady.call(this,l,f,g)}});function wN(l,f){return new rl(l,f)}var _N=rl.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(l,f){this._url=l;var g=i({},this.defaultWmsParams);for(var S in f)S in this.options||(g[S]=f[S]);f=x(this,f);var k=f.detectRetina&&be.retina?2:1,M=this.getTileSize();g.width=M.x*k,g.height=M.y*k,this.wmsParams=g},onAdd:function(l){this._crs=this.options.crs||l.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var f=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[f]=this._crs.code,rl.prototype.onAdd.call(this,l)},getTileUrl:function(l){var f=this._tileCoordsToNwSe(l),g=this._crs,S=Y(g.project(f[0]),g.project(f[1])),k=S.min,M=S.max,V=(this._wmsVersion>=1.3&&this._crs===mN?[k.y,k.x,M.y,M.x]:[k.x,k.y,M.x,M.y]).join(","),Q=rl.prototype.getTileUrl.call(this,l);return Q+y(this.wmsParams,Q,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+V},setParams:function(l,f){return i(this.wmsParams,l),f||this.redraw(),this}});function H7(l,f){return new _N(l,f)}rl.WMS=_N,wN.wms=H7;var Qi=Yr.extend({options:{padding:.1},initialize:function(l){x(this,l),u(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),Le(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var l={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(l.zoomanim=this._onAnimZoom),l},_onAnimZoom:function(l){this._updateTransform(l.center,l.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(l,f){var g=this._map.getZoomScale(f,this._zoom),S=this._map.getSize().multiplyBy(.5+this.options.padding),k=this._map.project(this._center,f),M=S.multiplyBy(-g).add(k).subtract(this._map._getNewPixelOrigin(l,f));be.any3d?Ro(this._container,M,g):It(this._container,M)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var l in this._layers)this._layers[l]._reset()},_onZoomEnd:function(){for(var l in this._layers)this._layers[l]._project()},_updatePaths:function(){for(var l in this._layers)this._layers[l]._update()},_update:function(){var l=this.options.padding,f=this._map.getSize(),g=this._map.containerPointToLayerPoint(f.multiplyBy(-l)).round();this._bounds=new U(g,g.add(f.multiplyBy(1+l*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),jN=Qi.extend({options:{tolerance:0},getEvents:function(){var l=Qi.prototype.getEvents.call(this);return l.viewprereset=this._onViewPreReset,l},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Qi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var l=this._container=document.createElement("canvas");Te(l,"mousemove",this._onMouseMove,this),Te(l,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Te(l,"mouseout",this._handleMouseOut,this),l._leaflet_disable_events=!0,this._ctx=l.getContext("2d")},_destroyContainer:function(){D(this._redrawRequest),delete this._ctx,xt(this._container),at(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var l;this._redrawBounds=null;for(var f in this._layers)l=this._layers[f],l._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Qi.prototype._update.call(this);var l=this._bounds,f=this._container,g=l.getSize(),S=be.retina?2:1;It(f,l.min),f.width=S*g.x,f.height=S*g.y,f.style.width=g.x+"px",f.style.height=g.y+"px",be.retina&&this._ctx.scale(2,2),this._ctx.translate(-l.min.x,-l.min.y),this.fire("update")}},_reset:function(){Qi.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(l){this._updateDashArray(l),this._layers[u(l)]=l;var f=l._order={layer:l,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=f),this._drawLast=f,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(l){this._requestRedraw(l)},_removePath:function(l){var f=l._order,g=f.next,S=f.prev;g?g.prev=S:this._drawLast=S,S?S.next=g:this._drawFirst=g,delete l._order,delete this._layers[u(l)],this._requestRedraw(l)},_updatePath:function(l){this._extendRedrawBounds(l),l._project(),l._update(),this._requestRedraw(l)},_updateStyle:function(l){this._updateDashArray(l),this._requestRedraw(l)},_updateDashArray:function(l){if(typeof l.options.dashArray=="string"){var f=l.options.dashArray.split(/[, ]+/),g=[],S,k;for(k=0;k')}}catch{}return function(l){return document.createElement("<"+l+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),V7={_initContainer:function(){this._container=qe("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Qi.prototype._update.call(this),this.fire("update"))},_initPath:function(l){var f=l._container=xu("shape");Le(f,"leaflet-vml-shape "+(this.options.className||"")),f.coordsize="1 1",l._path=xu("path"),f.appendChild(l._path),this._updateStyle(l),this._layers[u(l)]=l},_addPath:function(l){var f=l._container;this._container.appendChild(f),l.options.interactive&&l.addInteractiveTarget(f)},_removePath:function(l){var f=l._container;xt(f),l.removeInteractiveTarget(f),delete this._layers[u(l)]},_updateStyle:function(l){var f=l._stroke,g=l._fill,S=l.options,k=l._container;k.stroked=!!S.stroke,k.filled=!!S.fill,S.stroke?(f||(f=l._stroke=xu("stroke")),k.appendChild(f),f.weight=S.weight+"px",f.color=S.color,f.opacity=S.opacity,S.dashArray?f.dashStyle=j(S.dashArray)?S.dashArray.join(" "):S.dashArray.replace(/( *, *)/g," "):f.dashStyle="",f.endcap=S.lineCap.replace("butt","flat"),f.joinstyle=S.lineJoin):f&&(k.removeChild(f),l._stroke=null),S.fill?(g||(g=l._fill=xu("fill")),k.appendChild(g),g.color=S.fillColor||S.color,g.opacity=S.fillOpacity):g&&(k.removeChild(g),l._fill=null)},_updateCircle:function(l){var f=l._point.round(),g=Math.round(l._radius),S=Math.round(l._radiusY||g);this._setPath(l,l._empty()?"M0 0":"AL "+f.x+","+f.y+" "+g+","+S+" 0,"+65535*360)},_setPath:function(l,f){l._path.v=f},_bringToFront:function(l){Xs(l._container)},_bringToBack:function(l){Qs(l._container)}},Nh=be.vml?xu:ut,bu=Qi.extend({_initContainer:function(){this._container=Nh("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Nh("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){xt(this._container),at(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Qi.prototype._update.call(this);var l=this._bounds,f=l.getSize(),g=this._container;(!this._svgSize||!this._svgSize.equals(f))&&(this._svgSize=f,g.setAttribute("width",f.x),g.setAttribute("height",f.y)),It(g,l.min),g.setAttribute("viewBox",[l.min.x,l.min.y,f.x,f.y].join(" ")),this.fire("update")}},_initPath:function(l){var f=l._path=Nh("path");l.options.className&&Le(f,l.options.className),l.options.interactive&&Le(f,"leaflet-interactive"),this._updateStyle(l),this._layers[u(l)]=l},_addPath:function(l){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(l._path),l.addInteractiveTarget(l._path)},_removePath:function(l){xt(l._path),l.removeInteractiveTarget(l._path),delete this._layers[u(l)]},_updatePath:function(l){l._project(),l._update()},_updateStyle:function(l){var f=l._path,g=l.options;f&&(g.stroke?(f.setAttribute("stroke",g.color),f.setAttribute("stroke-opacity",g.opacity),f.setAttribute("stroke-width",g.weight),f.setAttribute("stroke-linecap",g.lineCap),f.setAttribute("stroke-linejoin",g.lineJoin),g.dashArray?f.setAttribute("stroke-dasharray",g.dashArray):f.removeAttribute("stroke-dasharray"),g.dashOffset?f.setAttribute("stroke-dashoffset",g.dashOffset):f.removeAttribute("stroke-dashoffset")):f.setAttribute("stroke","none"),g.fill?(f.setAttribute("fill",g.fillColor||g.color),f.setAttribute("fill-opacity",g.fillOpacity),f.setAttribute("fill-rule",g.fillRule||"evenodd")):f.setAttribute("fill","none"))},_updatePoly:function(l,f){this._setPath(l,dt(l._parts,f))},_updateCircle:function(l){var f=l._point,g=Math.max(Math.round(l._radius),1),S=Math.max(Math.round(l._radiusY),1)||g,k="a"+g+","+S+" 0 1,0 ",M=l._empty()?"M0 0":"M"+(f.x-g)+","+f.y+k+g*2+",0 "+k+-g*2+",0 ";this._setPath(l,M)},_setPath:function(l,f){l._path.setAttribute("d",f)},_bringToFront:function(l){Xs(l._path)},_bringToBack:function(l){Qs(l._path)}});be.vml&&bu.include(V7);function SN(l){return be.svg||be.vml?new bu(l):null}We.include({getRenderer:function(l){var f=l.options.renderer||this._getPaneRenderer(l.options.pane)||this.options.renderer||this._renderer;return f||(f=this._renderer=this._createRenderer()),this.hasLayer(f)||this.addLayer(f),f},_getPaneRenderer:function(l){if(l==="overlayPane"||l===void 0)return!1;var f=this._paneRenderers[l];return f===void 0&&(f=this._createRenderer({pane:l}),this._paneRenderers[l]=f),f},_createRenderer:function(l){return this.options.preferCanvas&&NN(l)||SN(l)}});var PN=tl.extend({initialize:function(l,f){tl.prototype.initialize.call(this,this._boundsToLatLngs(l),f)},setBounds:function(l){return this.setLatLngs(this._boundsToLatLngs(l))},_boundsToLatLngs:function(l){return l=ae(l),[l.getSouthWest(),l.getNorthWest(),l.getNorthEast(),l.getSouthEast()]}});function q7(l,f){return new PN(l,f)}bu.create=Nh,bu.pointsToPath=dt,Xi.geometryToLayer=vh,Xi.coordsToLatLng=$v,Xi.coordsToLatLngs=yh,Xi.latLngToCoords=Iv,Xi.latLngsToCoords=xh,Xi.getFeature=nl,Xi.asFeature=bh,We.mergeOptions({boxZoom:!0});var EN=_i.extend({initialize:function(l){this._map=l,this._container=l._container,this._pane=l._panes.overlayPane,this._resetStateTimeout=0,l.on("unload",this._destroy,this)},addHooks:function(){Te(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){at(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){xt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(l){if(!l.shiftKey||l.which!==1&&l.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),du(),yv(),this._startPoint=this._map.mouseEventToContainerPoint(l),Te(document,{contextmenu:Bo,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(l){this._moved||(this._moved=!0,this._box=qe("div","leaflet-zoom-box",this._container),Le(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(l);var f=new U(this._point,this._startPoint),g=f.getSize();It(this._box,f.min),this._box.style.width=g.x+"px",this._box.style.height=g.y+"px"},_finish:function(){this._moved&&(xt(this._box),Mt(this._container,"leaflet-crosshair")),fu(),xv(),at(document,{contextmenu:Bo,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(l){if(!(l.which!==1&&l.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(s(this._resetState,this),0);var f=new ne(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(f).fire("boxzoomend",{boxZoomBounds:f})}},_onKeyDown:function(l){l.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});We.addInitHook("addHandler","boxZoom",EN),We.mergeOptions({doubleClickZoom:!0});var ON=_i.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(l){var f=this._map,g=f.getZoom(),S=f.options.zoomDelta,k=l.originalEvent.shiftKey?g-S:g+S;f.options.doubleClickZoom==="center"?f.setZoom(k):f.setZoomAround(l.containerPoint,k)}});We.addInitHook("addHandler","doubleClickZoom",ON),We.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var kN=_i.extend({addHooks:function(){if(!this._draggable){var l=this._map;this._draggable=new Da(l._mapPane,l._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),l.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),l.on("zoomend",this._onZoomEnd,this),l.whenReady(this._onZoomEnd,this))}Le(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Mt(this._map._container,"leaflet-grab"),Mt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var l=this._map;if(l._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var f=ae(this._map.options.maxBounds);this._offsetLimit=Y(this._map.latLngToContainerPoint(f.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(f.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;l.fire("movestart").fire("dragstart"),l.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(l){if(this._map.options.inertia){var f=this._lastTime=+new Date,g=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(g),this._times.push(f),this._prunePositions(f)}this._map.fire("move",l).fire("drag",l)},_prunePositions:function(l){for(;this._positions.length>1&&l-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var l=this._map.getSize().divideBy(2),f=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=f.subtract(l).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(l,f){return l-(l-f)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var l=this._draggable._newPos.subtract(this._draggable._startPos),f=this._offsetLimit;l.xf.max.x&&(l.x=this._viscousLimit(l.x,f.max.x)),l.y>f.max.y&&(l.y=this._viscousLimit(l.y,f.max.y)),this._draggable._newPos=this._draggable._startPos.add(l)}},_onPreDragWrap:function(){var l=this._worldWidth,f=Math.round(l/2),g=this._initialWorldOffset,S=this._draggable._newPos.x,k=(S-f+g)%l+f-g,M=(S+f+g)%l-f-g,V=Math.abs(k+g)0?M:-M))-f;this._delta=0,this._startTime=null,V&&(l.options.scrollWheelZoom==="center"?l.setZoom(f+V):l.setZoomAround(this._lastMousePos,f+V))}});We.addInitHook("addHandler","scrollWheelZoom",AN);var Z7=600;We.mergeOptions({tapHold:be.touchNative&&be.safari&&be.mobile,tapTolerance:15});var TN=_i.extend({addHooks:function(){Te(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){at(this._map._container,"touchstart",this._onDown,this)},_onDown:function(l){if(clearTimeout(this._holdTimeout),l.touches.length===1){var f=l.touches[0];this._startPos=this._newPos=new R(f.clientX,f.clientY),this._holdTimeout=setTimeout(s(function(){this._cancel(),this._isTapValid()&&(Te(document,"touchend",cn),Te(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",f))},this),Z7),Te(document,"touchend touchcancel contextmenu",this._cancel,this),Te(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function l(){at(document,"touchend",cn),at(document,"touchend touchcancel",l)},_cancel:function(){clearTimeout(this._holdTimeout),at(document,"touchend touchcancel contextmenu",this._cancel,this),at(document,"touchmove",this._onMove,this)},_onMove:function(l){var f=l.touches[0];this._newPos=new R(f.clientX,f.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(l,f){var g=new MouseEvent(l,{bubbles:!0,cancelable:!0,view:window,screenX:f.screenX,screenY:f.screenY,clientX:f.clientX,clientY:f.clientY});g._simulated=!0,f.target.dispatchEvent(g)}});We.addInitHook("addHandler","tapHold",TN),We.mergeOptions({touchZoom:be.touch,bounceAtZoomLimits:!0});var MN=_i.extend({addHooks:function(){Le(this._map._container,"leaflet-touch-zoom"),Te(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Mt(this._map._container,"leaflet-touch-zoom"),at(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(l){var f=this._map;if(!(!l.touches||l.touches.length!==2||f._animatingZoom||this._zooming)){var g=f.mouseEventToContainerPoint(l.touches[0]),S=f.mouseEventToContainerPoint(l.touches[1]);this._centerPoint=f.getSize()._divideBy(2),this._startLatLng=f.containerPointToLatLng(this._centerPoint),f.options.touchZoom!=="center"&&(this._pinchStartLatLng=f.containerPointToLatLng(g.add(S)._divideBy(2))),this._startDist=g.distanceTo(S),this._startZoom=f.getZoom(),this._moved=!1,this._zooming=!0,f._stop(),Te(document,"touchmove",this._onTouchMove,this),Te(document,"touchend touchcancel",this._onTouchEnd,this),cn(l)}},_onTouchMove:function(l){if(!(!l.touches||l.touches.length!==2||!this._zooming)){var f=this._map,g=f.mouseEventToContainerPoint(l.touches[0]),S=f.mouseEventToContainerPoint(l.touches[1]),k=g.distanceTo(S)/this._startDist;if(this._zoom=f.getScaleZoom(k,this._startZoom),!f.options.bounceAtZoomLimits&&(this._zoomf.getMaxZoom()&&k>1)&&(this._zoom=f._limitZoom(this._zoom)),f.options.touchZoom==="center"){if(this._center=this._startLatLng,k===1)return}else{var M=g._add(S)._divideBy(2)._subtract(this._centerPoint);if(k===1&&M.x===0&&M.y===0)return;this._center=f.unproject(f.project(this._pinchStartLatLng,this._zoom).subtract(M),this._zoom)}this._moved||(f._moveStart(!0,!1),this._moved=!0),D(this._animRequest);var V=s(f._move,f,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=z(V,this,!0),cn(l)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,D(this._animRequest),at(document,"touchmove",this._onTouchMove,this),at(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});We.addInitHook("addHandler","touchZoom",MN),We.BoxZoom=EN,We.DoubleClickZoom=ON,We.Drag=kN,We.Keyboard=CN,We.ScrollWheelZoom=AN,We.TapHold=TN,We.TouchZoom=MN,n.Bounds=U,n.Browser=be,n.CRS=Ne,n.Canvas=jN,n.Circle=Lv,n.CircleMarker=gh,n.Class=I,n.Control=Kr,n.DivIcon=bN,n.DivOverlay=ji,n.DomEvent=d7,n.DomUtil=c7,n.Draggable=Da,n.Evented=G,n.FeatureGroup=Ki,n.GeoJSON=Xi,n.GridLayer=yu,n.Handler=_i,n.Icon=el,n.ImageOverlay=wh,n.LatLng=ee,n.LatLngBounds=ne,n.Layer=Yr,n.LayerGroup=Js,n.LineUtil=N7,n.Map=We,n.Marker=ph,n.Mixin=y7,n.Path=Ba,n.Point=R,n.PolyUtil=x7,n.Polygon=tl,n.Polyline=Yi,n.Popup=_h,n.PosAnimation=nN,n.Projection=S7,n.Rectangle=PN,n.Renderer=Qi,n.SVG=bu,n.SVGOverlay=xN,n.TileLayer=rl,n.Tooltip=jh,n.Transformation=je,n.Util=Z,n.VideoOverlay=yN,n.bind=s,n.bounds=Y,n.canvas=NN,n.circle=M7,n.circleMarker=T7,n.control=pu,n.divIcon=U7,n.extend=i,n.featureGroup=k7,n.geoJSON=vN,n.geoJson=I7,n.gridLayer=W7,n.icon=C7,n.imageOverlay=R7,n.latLng=ce,n.latLngBounds=ae,n.layerGroup=O7,n.map=f7,n.marker=A7,n.point=W,n.polygon=$7,n.polyline=L7,n.popup=B7,n.rectangle=q7,n.setOptions=x,n.stamp=u,n.svg=SN,n.svgOverlay=D7,n.tileLayer=wN,n.tooltip=z7,n.transformation=ie,n.version=r,n.videoOverlay=F7;var G7=window.L;n.noConflict=function(){return window.L=G7,this},window.L=n})})(rw,rw.exports);var av=rw.exports;function aj(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function oj(e,t){return t==null?function(r,i){const a=N.useRef();return a.current||(a.current=e(r,i)),a}:function(r,i){const a=N.useRef();a.current||(a.current=e(r,i));const s=N.useRef(r),{instance:c}=a.current;return N.useEffect(function(){s.current!==r&&(t(c,r,s.current),s.current=r)},[c,r,i]),a}}function NL(e,t){N.useEffect(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){var a;(a=t.layerContainer)==null||a.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function vge(e){return function(n){const r=rj(),i=e(iv(n,r),r);return wL(r.map,n.attribution),ij(i.current,n.eventHandlers),NL(i.current,r),i}}function yge(e,t){const n=N.useRef();N.useEffect(function(){if(t.pathOptions!==n.current){const i=t.pathOptions??{};e.instance.setStyle(i),n.current=i}},[e,t])}function xge(e){return function(n){const r=rj(),i=e(iv(n,r),r);return ij(i.current,n.eventHandlers),NL(i.current,r),yge(i.current,n),i}}function bge(e,t){const n=oj(e),r=gge(n,t);return mge(r)}function wge(e,t){const n=oj(e,t),r=xge(n);return hge(r)}function _ge(e,t){const n=oj(e,t),r=vge(n);return pge(r)}function jge(e,t,n){const{opacity:r,zIndex:i}=t;r!=null&&r!==n.opacity&&e.setOpacity(r),i!=null&&i!==n.zIndex&&e.setZIndex(i)}const Nge=wge(function({center:t,children:n,...r},i){const a=new av.CircleMarker(t,r);return aj(a,fge(i,{overlayContainer:a}))},cge);function iw(){return iw=Object.assign||function(e){for(var t=1;t(v==null?void 0:v.map)??null,[v]);const x=N.useCallback(w=>{if(w!==null&&v===null){const b=new av.Map(w,h);n!=null&&d!=null?b.setView(n,d):e!=null&&b.fitBounds(e,t),u!=null&&b.whenReady(u),_(dge(b))}},[]);N.useEffect(()=>()=>{v==null||v.map.remove()},[v]);const y=v?H.createElement(jL,{value:v},r):s??null;return H.createElement("div",iw({},p,{ref:x}),y)}const Pge=N.forwardRef(Sge),Ege=bge(function(t,n){const r=new av.Popup(t,n.overlayContainer);return aj(r,n)},function(t,n,{position:r},i){N.useEffect(function(){const{instance:s}=t;function c(d){d.popup===s&&(s.update(),i(!0))}function u(d){d.popup===s&&i(!1)}return n.map.on({popupopen:c,popupclose:u}),n.overlayContainer==null?(r!=null&&s.setLatLng(r),s.openOn(n.map)):n.overlayContainer.bindPopup(s),function(){var h;n.map.off({popupopen:c,popupclose:u}),(h=n.overlayContainer)==null||h.unbindPopup(),n.map.removeLayer(s)}},[t,n,i,r])}),Oge=_ge(function({url:t,...n},r){const i=new av.TileLayer(t,iv(n,r));return aj(i,r)},function(t,n,r){jge(t,n,r);const{url:i}=n;i!=null&&i!==r.url&&t.setUrl(i)}),Gy={critical:"#dc2626",high:"#f97316",medium:"#fbbf24",low:"#22c55e"};function kge(){const[e,t]=N.useState(null),[n,r]=N.useState(null),{data:i,isLoading:a}=zt({queryKey:["opportunities",e,n],queryFn:async()=>{const s=new URLSearchParams;return e&&s.append("state",e),n&&s.append("topic",n),(await vt.get(`/opportunities?${s}`)).data.opportunities||[]}});return a?o.jsx("div",{className:"flex justify-center items-center h-96",children:"Loading map..."}):o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"card flex gap-4",children:[o.jsxs("div",{className:"flex-1",children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Filter by State"}),o.jsxs("select",{className:"block w-full rounded-md border-gray-300 shadow-sm focus:border-primary-500 focus:ring-primary-500 text-gray-900",value:e||"",onChange:s=>t(s.target.value||null),children:[o.jsx("option",{value:"",children:"All States"}),o.jsx("option",{value:"AL",children:"Alabama"}),o.jsx("option",{value:"GA",children:"Georgia"}),o.jsx("option",{value:"IN",children:"Indiana"}),o.jsx("option",{value:"MA",children:"Massachusetts"}),o.jsx("option",{value:"WA",children:"Washington"}),o.jsx("option",{value:"WI",children:"Wisconsin"})]})]}),o.jsxs("div",{className:"flex-1",children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Filter by Topic"}),o.jsxs("select",{className:"block w-full rounded-md border-gray-300 shadow-sm focus:border-primary-500 focus:ring-primary-500 text-gray-900",value:n||"",onChange:s=>r(s.target.value||null),children:[o.jsx("option",{value:"",children:"All Topics"}),o.jsx("option",{value:"water_fluoridation",children:"Water Fluoridation"}),o.jsx("option",{value:"school_dental_screening",children:"School Dental Screening"}),o.jsx("option",{value:"medicaid_dental_expansion",children:"Medicaid Dental"})]})]})]}),o.jsxs("div",{className:"card",children:[o.jsx("h3",{className:"text-sm font-medium text-gray-700 mb-3",children:"Urgency Level"}),o.jsx("div",{className:"flex gap-6",children:Object.entries(Gy).map(([s,c])=>o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-4 h-4 rounded-full",style:{backgroundColor:c}}),o.jsx("span",{className:"text-sm capitalize text-gray-700",children:s})]},s))})]}),o.jsx("div",{className:"card h-[600px]",children:o.jsxs(Pge,{center:[39.8283,-98.5795],zoom:4,style:{height:"100%",width:"100%"},children:[o.jsx(Oge,{attribution:'© OpenStreetMap',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),i==null?void 0:i.map((s,c)=>o.jsx(Nge,{center:[s.latitude,s.longitude],radius:8,pathOptions:{fillColor:Gy[s.urgency],fillOpacity:.7,color:Gy[s.urgency],weight:2},children:o.jsx(Ege,{children:o.jsxs("div",{className:"p-2 min-w-[250px]",children:[o.jsxs("h4",{className:"font-bold text-gray-900",children:[s.municipality,", ",s.state]}),s.title&&o.jsxs("p",{className:"text-sm mt-2 text-gray-800",children:[o.jsx("strong",{children:"Bill:"})," ",s.bill_id," - ",s.title.substring(0,100),s.title.length>100?"...":""]}),o.jsxs("p",{className:"text-sm mt-1 text-gray-700",children:[o.jsx("strong",{children:"Topic:"})," ",s.topic.replace(/_/g," ")]}),o.jsxs("p",{className:"text-sm text-gray-700",children:[o.jsx("strong",{children:"Urgency:"})," ",s.urgency]}),o.jsxs("p",{className:"text-sm text-gray-700",children:[o.jsx("strong",{children:"Confidence:"})," ",(s.confidence*100).toFixed(0),"%"]}),o.jsxs("p",{className:"text-sm text-gray-700",children:[o.jsx("strong",{children:"Last Updated:"})," ",new Date(s.meeting_date).toLocaleDateString()]}),s.latest_action&&o.jsxs("p",{className:"text-sm mt-1 text-gray-700",children:[o.jsx("strong",{children:"Status:"})," ",s.latest_action.substring(0,80),s.latest_action.length>80?"...":""]})]})})},c))]})}),o.jsxs("div",{className:"card",children:[o.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Summary"}),o.jsxs("p",{className:"text-gray-600",children:["Showing ",o.jsx("strong",{children:(i==null?void 0:i.length)||0})," advocacy opportunities",e&&` in ${e}`,n&&` for ${n.replace(/_/g," ")}`]})]})]})}function Cge(){var m;const[e,t]=Ws(),[n,r]=N.useState(e.get("search")||""),[i,a]=N.useState(1),[s,c]=N.useState("all");N.useEffect(()=>{const p=e.get("search");p&&r(p)},[e]);const{data:u,isLoading:d}=zt({queryKey:["documents",n,i],queryFn:async()=>(await vt.get("/documents",{params:{search:n,page:i,limit:20}})).data}),h=p=>{p.preventDefault(),a(1),t(n?{search:n}:{})};return o.jsx("div",{className:"min-h-screen p-8",style:{backgroundColor:"#F1F5F9"},children:o.jsxs("div",{className:"max-w-7xl mx-auto",children:[o.jsxs("div",{className:"mb-8",children:[o.jsx("h1",{className:"text-3xl font-bold text-gray-900 mb-2",children:"Meeting Minutes"}),o.jsx("p",{className:"text-gray-600",children:"Search what local governments are discussing - 90,000+ cities, counties, and school districts"})]}),o.jsx("div",{className:"bg-white rounded-lg shadow-sm p-6 mb-6",children:o.jsx("form",{onSubmit:h,children:o.jsxs("div",{className:"relative",children:[o.jsx("input",{type:"text",placeholder:"Search by location, topic, keyword...",className:"w-full px-4 py-3 pl-12 border-2 border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent",value:n,onChange:p=>r(p.target.value)}),o.jsx(nn,{className:"absolute left-4 top-3.5 h-6 w-6 text-gray-400"}),o.jsx("button",{type:"submit",className:"absolute right-2 top-2 bg-neutral-600 text-white px-6 py-2 rounded-md hover:bg-neutral-700 transition-colors",children:"Search"})]})})}),o.jsx("div",{className:"bg-white rounded-lg shadow-sm p-4 mb-6 border-b border-gray-200",children:o.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.jsx("button",{onClick:()=>c("all"),className:`px-4 py-2 rounded-full font-medium transition-colors ${s==="all"?"bg-primary-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:"All"}),o.jsx("button",{onClick:()=>c("meetings"),className:`px-4 py-2 rounded-full font-medium transition-colors ${s==="meetings"?"bg-primary-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:"Meeting Minutes"}),o.jsx("button",{onClick:()=>c("budgets"),className:`px-4 py-2 rounded-full font-medium transition-colors ${s==="budgets"?"bg-primary-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:"Budgets"}),o.jsx("button",{onClick:()=>c("people"),className:`px-4 py-2 rounded-full font-medium transition-colors ${s==="people"?"bg-primary-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:"People"}),o.jsx("button",{onClick:()=>c("organizations"),className:`px-4 py-2 rounded-full font-medium transition-colors ${s==="organizations"?"bg-primary-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:"Organizations"}),o.jsx("button",{onClick:()=>c("charities"),className:`px-4 py-2 rounded-full font-medium transition-colors ${s==="charities"?"bg-primary-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:"Charities"}),o.jsx("button",{onClick:()=>c("events"),className:`px-4 py-2 rounded-full font-medium transition-colors ${s==="events"?"bg-primary-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:"Events"}),o.jsxs("button",{className:"px-4 py-2 rounded-full font-medium bg-gray-100 text-gray-700 hover:bg-gray-200 transition-colors flex items-center gap-1",children:[o.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4"})}),"All filters"]})]})}),o.jsx("div",{className:"space-y-4",children:d?o.jsx("div",{className:"card",children:"Loading documents..."}):o.jsxs(o.Fragment,{children:[(m=u==null?void 0:u.documents)==null?void 0:m.map(p=>o.jsx("div",{className:"card hover:shadow-lg transition-shadow",children:o.jsxs("div",{className:"flex justify-between items-start",children:[o.jsxs("div",{className:"flex-1",children:[o.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:p.title}),o.jsxs("p",{className:"text-sm text-gray-600 mt-1",children:[p.municipality,", ",p.state," • ",new Date(p.meeting_date).toLocaleDateString()]}),o.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:p.topics.map(v=>o.jsx("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-primary-100 text-primary-800",children:v.replace(/_/g," ")},v))})]}),o.jsx("a",{href:p.url,target:"_blank",rel:"noopener noreferrer",className:"btn-primary ml-4",children:"View Document"})]})},p.id)),o.jsxs("div",{className:"flex justify-center gap-2 mt-6",children:[o.jsx("button",{onClick:()=>a(i-1),disabled:i===1,className:"btn-secondary disabled:opacity-50",children:"Previous"}),o.jsxs("span",{className:"flex items-center px-4",children:["Page ",i," of ",(u==null?void 0:u.total_pages)||1]}),o.jsx("button",{onClick:()=>a(i+1),disabled:i>=((u==null?void 0:u.total_pages)||1),className:"btn-secondary disabled:opacity-50",children:"Next"})]})]})})]})})}function Age(){const[e,t]=N.useState(null),{data:n,isLoading:r}=zt({queryKey:["opportunities-list",e],queryFn:async()=>{const a=new URLSearchParams;return e&&a.append("urgency",e),(await vt.get(`/opportunities?${a}`)).data.opportunities||[]}}),i=async a=>{try{const s=await vt.post(`/advocacy/email/${a}`),c=new Blob([s.data.content],{type:"text/plain"}),u=window.URL.createObjectURL(c),d=document.createElement("a");d.href=u,d.download=`advocacy-email-${a}.txt`,d.click()}catch(s){console.error("Failed to generate email:",s)}};return o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"card",children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Filter by Urgency"}),o.jsx("div",{className:"flex gap-2",children:["critical","high","medium","low"].map(a=>o.jsx("button",{onClick:()=>t(e===a?null:a),className:`px-4 py-2 rounded-lg capitalize ${e===a?"bg-primary-600 text-white":"bg-gray-200 text-gray-700 hover:bg-gray-300"}`,children:a},a))})]}),o.jsx("div",{className:"space-y-4",children:r?o.jsx("div",{className:"card",children:"Loading causes..."}):n==null?void 0:n.map(a=>{var s;return o.jsxs("div",{className:"card",children:[o.jsxs("div",{className:"flex justify-between items-start mb-4",children:[o.jsxs("div",{children:[o.jsxs("h3",{className:"text-xl font-semibold text-gray-900",children:[a.municipality,", ",a.state]}),o.jsxs("p",{className:"text-sm text-gray-600 mt-1",children:[a.topic.replace(/_/g," ")," • Meeting: ",new Date(a.meeting_date).toLocaleDateString()]})]}),o.jsx("span",{className:`px-3 py-1 rounded-full text-sm font-medium ${a.urgency==="critical"?"bg-red-100 text-red-800":a.urgency==="high"?"bg-orange-100 text-orange-800":a.urgency==="medium"?"bg-yellow-100 text-yellow-800":"bg-green-100 text-green-800"}`,children:a.urgency})]}),a.talking_points&&a.talking_points.length>0&&o.jsxs("div",{className:"mb-4",children:[o.jsx("h4",{className:"font-medium text-gray-900 mb-2",children:"Key Talking Points:"}),o.jsx("ul",{className:"list-disc list-inside space-y-1",children:a.talking_points.map((c,u)=>o.jsx("li",{className:"text-sm text-gray-700",children:c},u))})]}),o.jsxs("div",{className:"flex gap-3",children:[o.jsx("button",{onClick:()=>i(a.id),className:"btn-primary",children:"Generate Email"}),((s=a.contact_info)==null?void 0:s.email)&&o.jsx("a",{href:`mailto:${a.contact_info.email}`,className:"btn-secondary",children:"Contact via Email"}),a.next_meeting&&o.jsx("button",{className:"btn-secondary",children:"📅 Add to Calendar"})]}),o.jsx("div",{className:"mt-4 pt-4 border-t border-gray-200",children:o.jsxs("div",{className:"flex items-center justify-between text-sm",children:[o.jsx("span",{className:"text-gray-600",children:"Confidence Score:"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-32 bg-gray-200 rounded-full h-2",children:o.jsx("div",{className:"bg-primary-600 h-2 rounded-full",style:{width:`${a.confidence*100}%`}})}),o.jsxs("span",{className:"font-medium",children:[(a.confidence*100).toFixed(0),"%"]})]})]})})]},a.id)})})]})}const oi=e=>{if(!e||e===0)return"$0";const t=Math.abs(e);return t>=1e9?`$${(e/1e9).toFixed(1)}B`:t>=1e6?`$${(e/1e6).toFixed(1)}M`:t>=1e3?`$${(e/1e3).toFixed(1)}K`:`$${e.toFixed(0)}`};function Tge(){const[e,t]=N.useState([]),[n,r]=N.useState(!1),[i,a]=N.useState(null),[s,c]=N.useState({location:"Tuscaloosa, AL",keyword:"dental",state:"",nteeCode:"E"}),u=async()=>{r(!0),a(null);try{const d=new URLSearchParams;s.location&&d.append("location",s.location),s.keyword&&d.append("keyword",s.keyword),s.state&&d.append("state",s.state),s.nteeCode&&d.append("ntee_code",s.nteeCode);const h=await fetch(`/api/nonprofits?${d}`);if(!h.ok)throw new Error("Failed to fetch nonprofits");const m=await h.json();t(m.nonprofits||[])}catch(d){a(d instanceof Error?d.message:"An error occurred")}finally{r(!1)}};return N.useEffect(()=>{u()},[]),o.jsx("div",{className:"min-h-screen p-8",style:{backgroundColor:"#F1F5F9"},children:o.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-3xl font-bold mb-2",style:{color:"#354F52"},children:"Local Charities"}),o.jsx("p",{className:"text-gray-600",children:"Find charities and nonprofits providing services in your community"})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Location"}),o.jsx("input",{type:"text",value:s.location,onChange:d=>c({...s,location:d.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"City, State"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Keyword"}),o.jsx("input",{type:"text",value:s.keyword,onChange:d=>c({...s,keyword:d.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"dental, health, etc."})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"NTEE Code"}),o.jsxs("select",{value:s.nteeCode,onChange:d=>c({...s,nteeCode:d.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:[o.jsx("option",{value:"",children:"All Categories"}),o.jsx("option",{value:"E",children:"Health (E)"}),o.jsx("option",{value:"E20",children:"Hospitals (E20)"}),o.jsx("option",{value:"E30",children:"Community Clinics (E30)"}),o.jsx("option",{value:"E32",children:"School-Based Health (E32)"}),o.jsx("option",{value:"B",children:"Education (B)"}),o.jsx("option",{value:"P",children:"Human Services (P)"})]})]}),o.jsx("div",{className:"flex items-end",children:o.jsx("button",{onClick:u,disabled:n,className:"w-full px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 disabled:bg-gray-400 disabled:cursor-not-allowed",children:n?"Searching...":"Search"})})]}),o.jsxs("div",{className:"mt-4 text-sm text-gray-500",children:[o.jsxs("p",{children:[o.jsx("strong",{children:"Data Sources:"})," ProPublica Nonprofit Explorer • Every.org • IRS TEOS"]}),o.jsxs("p",{className:"mt-1",children:[o.jsx("a",{href:"https://projects.propublica.org/nonprofits/api",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline",children:"ProPublica API"})," • ",o.jsx("a",{href:"https://www.every.org/nonprofit-api",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline",children:"Every.org API"})," • ",o.jsx("a",{href:"https://www.irs.gov/charities-non-profits/tax-exempt-organization-search-bulk-data-downloads",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline",children:"IRS TEOS"})]})]})]}),i&&o.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4 text-red-700",children:i}),o.jsxs("div",{className:"bg-white rounded-lg shadow-sm",children:[o.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:o.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:n?"Loading...":`Found ${e.length} Organizations`})}),o.jsx("div",{className:"divide-y divide-gray-200",children:e.length===0&&!n?o.jsx("div",{className:"px-6 py-12 text-center text-gray-500",children:"No nonprofits found. Try adjusting your search criteria."}):e.map((d,h)=>o.jsx("div",{className:"px-6 py-4 hover:bg-gray-50",children:o.jsxs("div",{className:"flex items-start justify-between",children:[o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[d.logo_url?o.jsx("img",{src:d.logo_url,alt:d.name,className:"w-12 h-12 rounded object-contain bg-gray-100 border border-gray-200",onError:m=>{m.currentTarget.style.display="none";const p=m.currentTarget.nextElementSibling;p&&(p.style.display="flex")}}):null,o.jsx("div",{className:"w-12 h-12 rounded flex items-center justify-center text-white text-lg font-bold",style:{backgroundColor:"#52796F",display:d.logo_url?"none":"flex"},children:d.name.charAt(0)}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:d.name}),o.jsxs("p",{className:"text-sm text-gray-500",children:["EIN: ",d.ein," • ",d.city,", ",d.state]})]})]}),(d.description||d.mission)&&o.jsx("p",{className:"mt-2 text-gray-600",children:d.description||d.mission}),o.jsxs("div",{className:"mt-2 flex flex-wrap gap-2",children:[d.ntee_description&&o.jsx("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 text-blue-800",children:d.ntee_description}),o.jsxs("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-gray-100 text-gray-800",children:["Source: ",d.source]})]}),(d.revenue_amount||d.asset_amount)&&o.jsxs("div",{className:"mt-3 grid grid-cols-3 gap-4 text-sm",children:[d.revenue_amount&&o.jsxs("div",{children:[o.jsx("span",{className:"text-gray-500",children:"Revenue: "}),o.jsx("span",{className:"font-medium text-gray-900",children:oi(d.revenue_amount)})]}),d.asset_amount&&o.jsxs("div",{children:[o.jsx("span",{className:"text-gray-500",children:"Assets: "}),o.jsx("span",{className:"font-medium text-gray-900",children:oi(d.asset_amount)})]}),d.income_amount&&o.jsxs("div",{children:[o.jsx("span",{className:"text-gray-500",children:"Income: "}),o.jsx("span",{className:"font-medium text-gray-900",children:oi(d.income_amount)})]})]})]}),d.website_url&&o.jsx("a",{href:d.website_url,target:"_blank",rel:"noopener noreferrer",className:"ml-4 px-4 py-2 bg-blue-600 text-white text-sm rounded-md hover:bg-blue-700",children:"Visit Website"})]})},`${d.ein}-${h}`))})]}),o.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-6",children:[o.jsx("h3",{className:"text-lg font-semibold text-blue-900 mb-2",children:"Why This Matters"}),o.jsxs("p",{className:"text-blue-800",children:[`When officials reject policy proposals with technical objections ("We can't do dental screenings - legal liability"), you can instantly show citizens the nonprofits`," ",o.jsx("strong",{children:"already doing it successfully"}),". This bypasses technocratic vetoes, creates accountability pressure, and mobilizes citizens with direct volunteer/donation pathways."]}),o.jsxs("div",{className:"mt-4 space-y-2 text-sm text-blue-700",children:[o.jsx("p",{children:"✓ Access financial data from 3+ million organizations"}),o.jsx("p",{children:"✓ Find local service providers already solving the problem"}),o.jsx("p",{children:"✓ Show working alternatives to government inaction"}),o.jsx("p",{children:"✓ All data is 100% free from public APIs"})]})]})]})})}const SL="https://datasets-server.huggingface.co";async function Mge(e,t=0,n=100){const r=new URLSearchParams({dataset:e.dataset,config:e.config||"default",split:e.split,offset:t.toString(),length:Math.min(n,100).toString()}),i=`${SL}/rows?${r}`,a=await fetch(i);if(!a.ok)throw new Error(`HuggingFace API error: ${a.statusText}`);return a.json()}async function Lge(e,t,n=0,r=100){const i=new URLSearchParams({dataset:e.dataset,config:e.config||"default",split:e.split,query:t,offset:n.toString(),length:Math.min(r,100).toString()}),a=`${SL}/search?${i}`,s=await fetch(a);if(!s.ok)throw new Error(`HuggingFace search error: ${s.statusText}`);return s.json()}async function $ge(e,t="organizations",n=1e3){const r=[];let i=0;const a=100;for(;iu.row);if(r.push(...c),c.lengthu.row):s=await $ge(t,"organizations",a),r&&(s=s.filter(c=>c.state===r)),i&&(s=s.filter(c=>{var u;return(u=c.ntee_code)==null?void 0:u.startsWith(i)})),s.slice(0,a)}const Ky="CommunityOne/one-nonprofits-organizations",jO=[{code:"",label:"All Categories"},{code:"E",label:"Health (E)"},{code:"E20",label:"Hospitals & Medical Centers (E20)"},{code:"E30",label:"Community Health Centers (E30)"},{code:"E40",label:"Reproductive Health (E40)"},{code:"E50",label:"Rehabilitative Care (E50)"},{code:"E60",label:"Health Support Services (E60)"},{code:"E70",label:"Public Health (E70)"},{code:"E80",label:"Health - General & Financing (E80)"},{code:"E90",label:"Nursing Services (E90)"},{code:"P",label:"Human Services (P)"},{code:"X",label:"Religion-Related (X)"},{code:"X20",label:"Christian (X20)"},{code:"X21",label:"Protestant (X21)"},{code:"X22",label:"Roman Catholic (X22)"},{code:"X30",label:"Jewish (X30)"},{code:"X40",label:"Islamic (X40)"},{code:"B",label:"Education (B)"},{code:"C",label:"Environment (C)"},{code:"D",label:"Animal-Related (D)"},{code:"F",label:"Mental Health (F)"},{code:"G",label:"Disease-Specific (G)"},{code:"H",label:"Medical Research (H)"}],NO=[{code:"",label:"All States"},{code:"AL",label:"Alabama"},{code:"AK",label:"Alaska"},{code:"AZ",label:"Arizona"},{code:"AR",label:"Arkansas"},{code:"CA",label:"California"},{code:"CO",label:"Colorado"},{code:"CT",label:"Connecticut"},{code:"DE",label:"Delaware"},{code:"FL",label:"Florida"},{code:"GA",label:"Georgia"},{code:"HI",label:"Hawaii"},{code:"ID",label:"Idaho"},{code:"IL",label:"Illinois"},{code:"IN",label:"Indiana"},{code:"IA",label:"Iowa"},{code:"KS",label:"Kansas"},{code:"KY",label:"Kentucky"},{code:"LA",label:"Louisiana"},{code:"ME",label:"Maine"},{code:"MD",label:"Maryland"},{code:"MA",label:"Massachusetts"},{code:"MI",label:"Michigan"},{code:"MN",label:"Minnesota"},{code:"MS",label:"Mississippi"},{code:"MO",label:"Missouri"},{code:"MT",label:"Montana"},{code:"NE",label:"Nebraska"},{code:"NV",label:"Nevada"},{code:"NH",label:"New Hampshire"},{code:"NJ",label:"New Jersey"},{code:"NM",label:"New Mexico"},{code:"NY",label:"New York"},{code:"NC",label:"North Carolina"},{code:"ND",label:"North Dakota"},{code:"OH",label:"Ohio"},{code:"OK",label:"Oklahoma"},{code:"OR",label:"Oregon"},{code:"PA",label:"Pennsylvania"},{code:"RI",label:"Rhode Island"},{code:"SC",label:"South Carolina"},{code:"SD",label:"South Dakota"},{code:"TN",label:"Tennessee"},{code:"TX",label:"Texas"},{code:"UT",label:"Utah"},{code:"VT",label:"Vermont"},{code:"VA",label:"Virginia"},{code:"WA",label:"Washington"},{code:"WV",label:"West Virginia"},{code:"WI",label:"Wisconsin"},{code:"WY",label:"Wyoming"}];function Rge(){var _,x;const[e]=Ws(),[t,n]=N.useState(e.get("search")||"dental"),[r,i]=N.useState(e.get("state")||"AL"),[a,s]=N.useState(""),[c,u]=N.useState(0),d=100;N.useEffect(()=>{const y=e.get("search"),w=e.get("state");y&&n(y),w&&i(w)},[e]);const{data:h,isLoading:m,error:p}=zt({queryKey:["nonprofits-hf",t,r,a,c],queryFn:async()=>await Ige({dataset:Ky,query:t||void 0,state:r||void 0,nteeCode:a||void 0,limit:d}),staleTime:5*60*1e3}),v=y=>({3:"501(c)(3) - Charitable",4:"501(c)(4) - Social Welfare",5:"501(c)(5) - Labor/Agricultural",6:"501(c)(6) - Business League",7:"501(c)(7) - Social/Recreational",8:"501(c)(8) - Fraternal Beneficiary",9:"501(c)(9) - Employees Association",10:"501(c)(10) - Domestic Fraternal",13:"501(c)(13) - Cemetery Company",19:"501(c)(19) - Veterans Organization"})[y||""]||`501(c)(${y})`;return o.jsx("div",{className:"min-h-screen p-8",style:{backgroundColor:"#F1F5F9"},children:o.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-3xl font-bold mb-2",style:{color:"#354F52"},children:"Nonprofit Organizations"}),o.jsx("p",{className:"text-gray-600",children:"Explore 1.9M+ U.S. nonprofits from IRS EO-BMF via HuggingFace Datasets"}),o.jsxs("div",{className:"mt-2 flex items-center gap-2 text-sm text-gray-500",children:[o.jsx("span",{className:"px-2 py-1 bg-blue-100 text-blue-700 rounded",children:"📊 Source: HuggingFace Dataset"}),o.jsx("span",{className:"px-2 py-1 bg-green-100 text-green-700 rounded",children:"✅ 1,952,238 organizations"}),o.jsx("span",{className:"px-2 py-1 bg-purple-100 text-purple-700 rounded",children:"🔄 Updated Monthly (IRS)"})]})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Search"}),o.jsx("input",{type:"text",value:t,onChange:y=>n(y.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"e.g., dental, clinic, food bank"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"State"}),o.jsx("select",{value:r,onChange:y=>i(y.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:NO.map(y=>o.jsx("option",{value:y.code,children:y.label},y.code))})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Category (NTEE)"}),o.jsx("select",{value:a,onChange:y=>s(y.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",children:jO.map(y=>o.jsx("option",{value:y.code,children:y.label},y.code))})]}),o.jsx("div",{className:"flex items-end",children:o.jsx("button",{onClick:()=>u(0),className:"w-full px-4 py-2 text-white rounded-md hover:opacity-90 transition-opacity",style:{backgroundColor:"#52796F"},children:"🔍 Search"})})]}),o.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[t&&o.jsxs("span",{className:"px-3 py-1 bg-blue-100 text-blue-700 rounded-full text-sm",children:['Query: "',t,'"']}),r&&o.jsxs("span",{className:"px-3 py-1 bg-green-100 text-green-700 rounded-full text-sm",children:["State: ",(_=NO.find(y=>y.code===r))==null?void 0:_.label]}),a&&o.jsxs("span",{className:"px-3 py-1 bg-purple-100 text-purple-700 rounded-full text-sm",children:["Category: ",(x=jO.find(y=>y.code===a))==null?void 0:x.label]})]})]}),m&&o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-12 text-center",children:[o.jsx("div",{className:"inline-block animate-spin rounded-full h-12 w-12 border-b-2 border-gray-900"}),o.jsx("p",{className:"mt-4 text-gray-600",children:"Loading nonprofits from HuggingFace..."})]}),p&&o.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-6",children:[o.jsx("h3",{className:"text-red-800 font-semibold mb-2",children:"Error Loading Data"}),o.jsx("p",{className:"text-red-600",children:p.message}),o.jsxs("p",{className:"text-sm text-red-500 mt-2",children:["Make sure the dataset is uploaded to HuggingFace. Run: ",o.jsx("code",{children:"python scripts/upload_nonprofits_to_hf.py --all"})]})]}),!m&&!p&&h&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"bg-white rounded-lg shadow-sm p-4",children:o.jsxs("p",{className:"text-gray-700",children:["Found ",o.jsx("strong",{children:h.length})," nonprofits",h.length===d&&" (showing first 100)"]})}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:h.map(y=>o.jsx("div",{className:"bg-white rounded-lg shadow-sm p-6 hover:shadow-md transition-shadow",children:o.jsxs("div",{className:"space-y-3",children:[o.jsx("h3",{className:"text-lg font-semibold",style:{color:"#354F52"},children:y.name}),o.jsxs("div",{className:"text-sm text-gray-600",children:[o.jsx("span",{className:"font-medium",children:"EIN:"})," ",y.ein]}),o.jsxs("div",{className:"text-sm text-gray-600",children:[o.jsx("span",{className:"font-medium",children:"📍 Location:"})," ",y.city&&y.state?o.jsxs(o.Fragment,{children:[y.city,", ",y.state," ",y.zip_code]}):y.state||"N/A"]}),y.ntee_code&&o.jsx("div",{className:"text-sm",children:o.jsx("span",{className:"px-2 py-1 bg-purple-100 text-purple-700 rounded text-xs",children:y.ntee_code})}),y.subsection_code&&o.jsxs("div",{className:"text-sm text-gray-600",children:[o.jsx("span",{className:"font-medium",children:"Type:"})," ",v(y.subsection_code)]}),o.jsxs("div",{className:"pt-3 border-t space-y-1",children:[o.jsxs("div",{className:"text-sm text-gray-600",children:[o.jsx("span",{className:"font-medium",children:"Assets:"})," ",oi(y.asset_amount)]}),o.jsxs("div",{className:"text-sm text-gray-600",children:[o.jsx("span",{className:"font-medium",children:"Income:"})," ",oi(y.income_amount)]}),o.jsxs("div",{className:"text-sm text-gray-600",children:[o.jsx("span",{className:"font-medium",children:"Revenue:"})," ",oi(y.revenue_amount)]})]}),y.tax_exempt_status&&o.jsx("div",{className:"text-sm",children:o.jsx("span",{className:"px-2 py-1 bg-green-100 text-green-700 rounded text-xs",children:y.tax_exempt_status==="1"?"✅ Tax-Exempt":"Status: "+y.tax_exempt_status})}),y.ruling_date&&o.jsxs("div",{className:"text-xs text-gray-500",children:["Ruling Date: ",y.ruling_date]})]})},y.ein))}),h.length===0&&o.jsxs("div",{className:"bg-gray-50 rounded-lg p-12 text-center",children:[o.jsx("p",{className:"text-gray-600 text-lg",children:"No nonprofits found matching your criteria"}),o.jsx("p",{className:"text-gray-500 text-sm mt-2",children:"Try adjusting your filters or search query"})]})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6",children:[o.jsx("h3",{className:"text-lg font-semibold mb-3",style:{color:"#354F52"},children:"📚 Data Source"}),o.jsxs("div",{className:"space-y-2 text-sm text-gray-600",children:[o.jsxs("p",{children:[o.jsx("strong",{children:"Source:"})," IRS Exempt Organizations Business Master File (EO-BMF)"]}),o.jsxs("p",{children:[o.jsx("strong",{children:"Dataset:"})," ",o.jsx("a",{href:`https://huggingface.co/datasets/${Ky}`,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline",children:Ky})]}),o.jsxs("p",{children:[o.jsx("strong",{children:"Records:"})," 1,952,238 organizations"]}),o.jsxs("p",{children:[o.jsx("strong",{children:"Updated:"})," Monthly by IRS"]}),o.jsxs("p",{children:[o.jsx("strong",{children:"License:"})," Public Domain (U.S. government data)"]}),o.jsx("p",{className:"pt-2 border-t",children:o.jsx("a",{href:"https://www.irs.gov/charities-non-profits/exempt-organizations-business-master-file-extract-eo-bmf",target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline",children:"View IRS EO-BMF Documentation →"})})]})]})]})})}function Fge(){const{user:e}=e0(),[t,n]=N.useState(!1),[r,i]=N.useState({state:(e==null?void 0:e.state)||"",county:(e==null?void 0:e.county)||"",city:(e==null?void 0:e.city)||"",school_board:(e==null?void 0:e.school_board)||""}),[a,s]=N.useState(!1),[c,u]=N.useState(null),[d,h]=N.useState({}),m="/api";N.useEffect(()=>{e&&i({state:e.state||"",county:e.county||"",city:e.city||"",school_board:e.school_board||""})},[e]);const p=x=>{i({state:x.state,county:x.county,city:x.city,school_board:r.school_board}),n(!1)},v=(x,y)=>{i(w=>({...w,[x]:y})),d[x]&&h(w=>{const b={...w};return delete b[x],b}),u(null)},_=async x=>{x.preventDefault();const y={};if(r.state.trim()||(y.state="State is required"),r.county.trim()||(y.county="County is required"),r.city.trim()||(y.city="City is required"),Object.keys(y).length>0){h(y);return}s(!0),u(null);try{const w=localStorage.getItem("auth_token");(await fetch(`${m}/api/auth/profile`,{method:"PATCH",headers:{"Content-Type":"application/json",Authorization:`Bearer ${w}`},body:JSON.stringify(r)})).ok?(u("success"),setTimeout(()=>window.location.reload(),1500)):u("error")}catch(w){console.error("Failed to update location:",w),u("error")}finally{s(!1)}};return e?o.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[o.jsx("h1",{className:"text-3xl font-bold mb-8",style:{color:"#354F52"},children:"Settings"}),o.jsxs("div",{className:"bg-white rounded-lg shadow mb-6",children:[o.jsx("div",{className:"border-b border-gray-200 px-6 py-4",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Nb,{className:"h-6 w-6 text-gray-600"}),o.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Profile Information"})]})}),o.jsx("div",{className:"px-6 py-4",children:o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Email"}),o.jsx("input",{type:"text",value:e.email,disabled:!0,className:"w-full px-4 py-2 border border-gray-300 rounded-lg bg-gray-50 text-gray-600"})]}),e.full_name&&o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Full Name"}),o.jsx("input",{type:"text",value:e.full_name,disabled:!0,className:"w-full px-4 py-2 border border-gray-300 rounded-lg bg-gray-50 text-gray-600"})]}),e.oauth_provider&&o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Sign-in Method"}),o.jsx("input",{type:"text",value:e.oauth_provider.charAt(0).toUpperCase()+e.oauth_provider.slice(1),disabled:!0,className:"w-full px-4 py-2 border border-gray-300 rounded-lg bg-gray-50 text-gray-600 capitalize"})]})]})})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow",children:[o.jsxs("div",{className:"border-b border-gray-200 px-6 py-4",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Rn,{className:"h-6 w-6 text-gray-600"}),o.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Location Preferences"})]}),o.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Help us show you relevant local government and nonprofit information"})]}),o.jsxs("form",{onSubmit:_,className:"px-6 py-4",children:[o.jsx("div",{className:"mb-6 p-4 bg-gray-50 rounded-lg",children:o.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[o.jsx("input",{type:"checkbox",checked:t,onChange:x=>n(x.target.checked),className:"rounded border-gray-300 text-primary-600 focus:ring-primary-500"}),o.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Use address lookup to auto-fill location"})]})}),t?o.jsxs("div",{className:"mb-6",children:[o.jsx(K_,{onLocationFound:p}),o.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"After finding your address, you can review and edit the details below"})]}):null,o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsxs("label",{htmlFor:"state",className:"block text-sm font-medium text-gray-700 mb-1",children:["State ",o.jsx("span",{className:"text-red-500",children:"*"})]}),o.jsx("input",{type:"text",id:"state",value:r.state,onChange:x=>v("state",x.target.value),placeholder:"e.g., California, Texas, New York",className:`w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 ${d.state?"border-red-500":"border-gray-300"}`}),d.state&&o.jsx("p",{className:"mt-1 text-sm text-red-600",children:d.state})]}),o.jsxs("div",{children:[o.jsxs("label",{htmlFor:"county",className:"block text-sm font-medium text-gray-700 mb-1",children:["County ",o.jsx("span",{className:"text-red-500",children:"*"})]}),o.jsx("input",{type:"text",id:"county",value:r.county,onChange:x=>v("county",x.target.value),placeholder:"e.g., Los Angeles County, Harris County",className:`w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 ${d.county?"border-red-500":"border-gray-300"}`}),d.county&&o.jsx("p",{className:"mt-1 text-sm text-red-600",children:d.county})]}),o.jsxs("div",{children:[o.jsxs("label",{htmlFor:"city",className:"block text-sm font-medium text-gray-700 mb-1",children:["City ",o.jsx("span",{className:"text-red-500",children:"*"})]}),o.jsx("input",{type:"text",id:"city",value:r.city,onChange:x=>v("city",x.target.value),placeholder:"e.g., Los Angeles, Houston, New York",className:`w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 ${d.city?"border-red-500":"border-gray-300"}`}),d.city&&o.jsx("p",{className:"mt-1 text-sm text-red-600",children:d.city})]}),o.jsxs("div",{children:[o.jsxs("label",{htmlFor:"school_board",className:"block text-sm font-medium text-gray-700 mb-1",children:["School Board / District ",o.jsx("span",{className:"text-gray-400 text-xs",children:"(Optional)"})]}),o.jsx("input",{type:"text",id:"school_board",value:r.school_board,onChange:x=>v("school_board",x.target.value),placeholder:"e.g., LAUSD, Houston ISD",className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"})]})]}),c&&o.jsx("div",{className:`mt-4 p-4 rounded-lg flex items-center gap-2 ${c==="success"?"bg-green-50 text-green-800":"bg-red-50 text-red-800"}`,children:c==="success"?o.jsxs(o.Fragment,{children:[o.jsx(ci,{className:"h-5 w-5"}),o.jsx("span",{children:"Settings saved successfully!"})]}):o.jsxs(o.Fragment,{children:[o.jsx(qB,{className:"h-5 w-5"}),o.jsx("span",{children:"Failed to save settings. Please try again."})]})}),o.jsx("div",{className:"mt-6",children:o.jsx("button",{type:"submit",disabled:a,className:"w-full sm:w-auto px-6 py-2.5 text-white rounded-lg transition-colors font-medium disabled:opacity-50 disabled:cursor-not-allowed",style:{backgroundColor:"#354F52"},onMouseEnter:x=>!a&&(x.currentTarget.style.backgroundColor="#2e4346"),onMouseLeave:x=>!a&&(x.currentTarget.style.backgroundColor="#354F52"),children:a?"Saving...":"Save Changes"})})]})]})]}):o.jsx("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:o.jsx("div",{className:"bg-white rounded-lg shadow p-6 text-center",children:o.jsx("p",{className:"text-gray-600",children:"Please sign in to access settings."})})})}function Dge({title:e,titleId:t,...n},r){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?N.createElement("title",{id:t},e):null,N.createElement("path",{fillRule:"evenodd",d:"M19.916 4.626a.75.75 0 0 1 .208 1.04l-9 13.5a.75.75 0 0 1-1.154.114l-6-6a.75.75 0 0 1 1.06-1.06l5.353 5.353 8.493-12.74a.75.75 0 0 1 1.04-.207Z",clipRule:"evenodd"}))}const SO=N.forwardRef(Dge);function km({type:e,id:t,initialFollowing:n=!1,initialCount:r=0,showCount:i=!0,compact:a=!1,onFollowChange:s}){const[c,u]=N.useState(n),[d,h]=N.useState(r),[m,p]=N.useState(!1),v=F_(),_=hS({mutationFn:async()=>{const b=`/social/follow/${e}/${t}`;return(await vt.post(b)).data},onSuccess:b=>{u(!0),h(b.follower_count),s==null||s(!0,b.follower_count),v.invalidateQueries({queryKey:["social","stats"]}),v.invalidateQueries({queryKey:["following",e]})}}),x=hS({mutationFn:async()=>{const b=`/social/follow/${e}/${t}`;return(await vt.delete(b)).data},onSuccess:b=>{u(!1),h(b.follower_count),s==null||s(!1,b.follower_count),v.invalidateQueries({queryKey:["social","stats"]}),v.invalidateQueries({queryKey:["following",e]})}}),y=()=>{c?x.mutate():_.mutate()},w=_.isPending||x.isPending;return a?o.jsx("button",{onClick:y,disabled:w,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),className:` inline-flex items-center gap-1.5 px-4 py-1.5 rounded-full text-sm font-medium transition-all duration-200 border ${c?m?"bg-red-50 border-red-300 text-red-700 hover:bg-red-100":"bg-white border-gray-300 text-gray-700 hover:bg-gray-50":"bg-blue-600 border-blue-600 text-white hover:bg-blue-700"} disabled:opacity-50 disabled:cursor-not-allowed `,children:w?o.jsx("span",{className:"h-4 w-4 border-2 border-t-transparent border-current rounded-full animate-spin"}):c?o.jsxs(o.Fragment,{children:[m?o.jsx(SS,{className:"h-4 w-4"}):o.jsx(SO,{className:"h-4 w-4"}),o.jsx("span",{children:m?"Unfollow":"Following"})]}):o.jsxs(o.Fragment,{children:[o.jsx(Sb,{className:"h-4 w-4"}),o.jsx("span",{children:"Follow"})]})}):o.jsxs("div",{className:"inline-flex items-center gap-3",children:[o.jsx("button",{onClick:y,disabled:w,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),className:` inline-flex items-center gap-2 px-5 py-2 rounded-lg text-sm font-semibold transition-all duration-200 border-2 ${c?m?"bg-red-50 border-red-400 text-red-700 hover:bg-red-100":"bg-white border-gray-300 text-gray-700 hover:border-gray-400":"bg-blue-600 border-blue-600 text-white hover:bg-blue-700"} disabled:opacity-50 disabled:cursor-not-allowed shadow-sm hover:shadow-md `,children:w?o.jsx("span",{className:"h-5 w-5 border-2 border-t-transparent border-current rounded-full animate-spin"}):c?o.jsxs(o.Fragment,{children:[m?o.jsx(SS,{className:"h-5 w-5"}):o.jsx(SO,{className:"h-5 w-5"}),o.jsx("span",{children:m?"Unfollow":"Following"})]}):o.jsxs(o.Fragment,{children:[o.jsx(Sb,{className:"h-5 w-5"}),o.jsx("span",{children:"Follow"})]})}),i&&o.jsxs("span",{className:"text-sm text-gray-600",children:[d.toLocaleString()," ",d===1?"follower":"followers"]})]})}const ul={"decision-makers":{title:"Decision Makers",subtitle:"People who vote on policy and budgets",icon:Ur,color:"#354F52",roles:["Community Representatives","The Decision Makers","Board Members","Policy Voters"]},support:{title:"Support Staff",subtitle:"People who help and advise",icon:Eo,color:"#64748B",roles:["Expert Advisors","Community Guides","Program Staff"]},public:{title:"Community Members",subtitle:"Residents and advocates",icon:Az,color:"#8a9d9e",roles:["Neighbors & Residents","Parents & Families","Advocates"]},"open-source":{title:"Open Source Contributors",subtitle:"Civic tech maintainers and developers",icon:$r,color:"#06B6D4",roles:["Project Maintainers","Core Contributors","Community Developers"]}};function Bge(){var j,E,P,O,C;const[e,t]=N.useState(""),[n,r]=N.useState("all"),[i,a]=N.useState("all"),[s,c]=N.useState(1),{location:u}=Hf(),h=(u==null?void 0:u.state)||"AL",m=(u==null?void 0:u.city)||null,{data:p,isLoading:v,error:_}=zt({queryKey:["people-finder",h,s],queryFn:async()=>{const A={types:"contacts",limit:100,state:h,page:s};return(await vt.get("/search",{params:A})).data},staleTime:6e4}),x=(((j=p==null?void 0:p.results)==null?void 0:j.contacts)||[]).map((A,T)=>({id:T+1,name:A.metadata.name,role:"decision-makers",specificRole:A.metadata.title||"Official",organization:A.metadata.jurisdiction||"Local Government",location:`${A.metadata.jurisdiction||""}, ${A.metadata.state||""}`.trim().replace(/^,\s*/,""),contact:void 0}));p&&!v&&console.log("PeopleFinder Debug:",{effectiveState:h,defaultCity:m,totalResults:p.total_results,contactsReturned:((P=(E=p.results)==null?void 0:E.contacts)==null?void 0:P.length)||0,peopleConverted:x.length,sampleContact:(C=(O=p.results)==null?void 0:O.contacts)==null?void 0:C[0]});const y=Array.from(new Set(x.map(A=>A.organization).filter(Boolean))).sort();N.useEffect(()=>{m&&y.includes(m)&&i==="all"&&a(m)},[m,y,i]);const w=x.reduce((A,T)=>{const $=T.organization||"Unknown";return A[$]=(A[$]||0)+1,A},{}),b=x.filter(A=>{const T=e===""||A.name.toLowerCase().includes(e.toLowerCase())||A.organization.toLowerCase().includes(e.toLowerCase())||A.location.toLowerCase().includes(e.toLowerCase())||A.specificRole.toLowerCase().includes(e.toLowerCase()),$=n==="all"||A.role===n,z=i==="all"||A.organization===i;return T&&$&&z});return o.jsxs("div",{className:"p-8",children:[o.jsxs("div",{className:"mb-8",children:[o.jsx("h1",{className:"text-3xl font-bold mb-2",style:{color:"#354F52"},children:"Find Leaders"}),o.jsxs("p",{className:"text-gray-600",children:["Discover elected officials, decision makers, and community leaders",o.jsxs("span",{className:"font-medium text-primary-600",children:[" in ",h]}),!(u!=null&&u.state)&&o.jsx("span",{className:"text-sm text-gray-500 ml-2",children:"(default state - set your location to customize)"})]})]}),v&&o.jsx("div",{className:"flex justify-center items-center py-12",children:o.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})}),_&&o.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-6 mb-8",children:[o.jsx("h3",{className:"text-red-800 font-semibold mb-2",children:"Error loading contacts"}),o.jsx("p",{className:"text-red-600 text-sm",children:_ instanceof Error?_.message:"Failed to load contacts from the API"}),o.jsx("button",{onClick:()=>window.location.reload(),className:"mt-3 px-4 py-2 bg-red-600 text-white rounded hover:bg-red-700",children:"Reload Page"})]}),!v&&!_&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"mb-6 space-y-4",children:[o.jsxs("div",{className:"relative",children:[o.jsx("input",{type:"text",placeholder:"Search by name, title, organization, or location...",value:e,onChange:A=>t(A.target.value),className:"w-full px-4 py-3 pl-12 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent text-gray-900"}),o.jsx(nn,{className:"absolute left-4 top-3.5 h-6 w-6 text-gray-400"})]}),o.jsxs("div",{className:"flex gap-4 items-center",children:[o.jsx("label",{htmlFor:"city-filter",className:"text-sm font-medium text-gray-700",children:"Filter by City/Jurisdiction:"}),o.jsxs("select",{id:"city-filter",value:i,onChange:A=>{a(A.target.value),c(1)},className:"px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 text-gray-900",children:[o.jsxs("option",{value:"all",children:["All Cities (",x.length," officials)"]}),y.map(A=>o.jsxs("option",{value:A,children:[A," (",w[A]," officials)"]},A))]}),(i!=="all"||e!==""||n!=="all")&&o.jsx("button",{onClick:()=>{a("all"),t(""),r("all"),c(1)},className:"px-4 py-2 text-sm text-gray-600 hover:text-gray-900 underline",children:"Clear all filters"})]}),o.jsxs("div",{className:"flex items-center gap-4 text-sm text-gray-600",children:[o.jsxs("span",{children:["Showing ",b.length," of ",x.length," officials"]}),i!=="all"&&o.jsxs("span",{className:"font-medium text-primary-600",children:["• Filtered to ",i]}),o.jsxs("span",{className:"text-gray-400",children:["• Page ",s," • ",h]})]})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-4 mb-8",children:[o.jsx("button",{onClick:()=>r("all"),className:`p-4 rounded-lg border-2 transition-all ${n==="all"?"border-[#354F52] bg-[#354F52] bg-opacity-10":"border-gray-200 hover:border-gray-300"}`,children:o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"font-semibold",style:{color:"#354F52"},children:"All People"}),o.jsxs("div",{className:"text-sm text-gray-500 mt-1",children:[x.length," total"]})]})}),Object.keys(ul).map(A=>{const T=ul[A],$=T.icon,z=x.filter(D=>D.role===A).length;return o.jsx("button",{onClick:()=>r(A),className:`p-4 rounded-lg border-2 transition-all ${n===A?"border-[#354F52] bg-[#354F52] bg-opacity-10":"border-gray-200 hover:border-gray-300"}`,children:o.jsxs("div",{className:"flex flex-col items-center text-center",children:[o.jsx($,{className:"h-8 w-8 mb-2",style:{color:T.color}}),o.jsx("div",{className:"font-semibold",style:{color:T.color},children:T.title}),o.jsxs("div",{className:"text-sm text-gray-500 mt-1",children:[z," people"]})]})},A)})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8",children:Object.keys(ul).map(A=>{const T=ul[A],$=T.icon;return o.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[o.jsx($,{className:"h-6 w-6",style:{color:T.color}}),o.jsx("h3",{className:"text-lg font-semibold",style:{color:T.color},children:T.title})]}),o.jsx("p",{className:"text-sm text-gray-600 mb-3",children:T.subtitle}),o.jsx("ul",{className:"space-y-1",children:T.roles.map(z=>o.jsxs("li",{className:"text-sm text-gray-700",children:["• ",z]},z))})]},A)})}),o.jsxs("div",{children:[o.jsxs("div",{className:"flex justify-between items-center mb-4",children:[o.jsxs("h2",{className:"text-xl font-semibold",style:{color:"#354F52"},children:[n==="all"?"All People":ul[n].title,o.jsxs("span",{className:"text-gray-500 font-normal ml-2",children:["(",b.length," results)"]})]}),p&&p.pagination&&o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{onClick:()=>c(A=>Math.max(1,A-1)),disabled:!p.pagination.has_prev,className:"px-3 py-1 border rounded disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-50",children:"← Prev"}),o.jsxs("span",{className:"text-sm text-gray-600",children:["Page ",s," of ",p.pagination.total_pages]}),o.jsx("button",{onClick:()=>c(A=>A+1),disabled:!p.pagination.has_next,className:"px-3 py-1 border rounded disabled:opacity-50 disabled:cursor-not-allowed hover:bg-gray-50",children:"Next →"})]})]}),b.length===0?o.jsx("div",{className:"bg-white rounded-lg shadow-md p-8 text-center",children:o.jsx("p",{className:"text-gray-500",children:"No people found matching your criteria"})}):o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:b.map(A=>{const T=ul[A.role],$=T.icon;return o.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 hover:shadow-lg transition-shadow",children:[o.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[o.jsx($,{className:"h-6 w-6 mt-1",style:{color:T.color}}),o.jsxs("div",{className:"flex-1",children:[o.jsx("h3",{className:"font-semibold text-lg",style:{color:"#354F52"},children:A.name}),o.jsx("p",{className:"text-sm font-medium",style:{color:T.color},children:A.specificRole})]})]}),o.jsxs("div",{className:"space-y-2 text-sm mb-4",children:[o.jsxs("div",{children:[o.jsx("span",{className:"font-medium text-gray-700",children:A.role==="open-source"?"Repository:":"Organization:"}),A.role==="open-source"?o.jsx("a",{href:`https://github.com/${A.organization}`,target:"_blank",rel:"noopener noreferrer",className:"text-cyan-600 hover:underline block",children:A.organization}):o.jsx("p",{className:"text-gray-600",children:A.organization})]}),o.jsxs("div",{children:[o.jsx("span",{className:"font-medium text-gray-700",children:"Location:"}),o.jsx("p",{className:"text-gray-600",children:A.location})]}),A.contact&&o.jsxs("div",{children:[o.jsx("span",{className:"font-medium text-gray-700",children:"Contact:"}),A.role==="open-source"&&A.contact.startsWith("@")?o.jsx("a",{href:`https://github.com/${A.contact.substring(1)}`,target:"_blank",rel:"noopener noreferrer",className:"text-cyan-600 hover:underline block",children:A.contact}):o.jsx("p",{className:"text-gray-600",children:A.contact})]})]}),o.jsx("div",{className:"pt-4 border-t border-gray-100",children:o.jsx(km,{type:"leader",id:A.id,initialFollowing:!1,initialCount:Math.floor(Math.random()*500),compact:!0})})]},A.id)})})]})]})]})}function zge(){const[e,t]=N.useState(""),[n,r]=N.useState(""),[i,a]=N.useState(null),[s,c]=N.useState(!1),[u,d]=N.useState(""),h=async()=>{if(!e){d("Please enter some text to grade");return}c(!0),d("");try{const v=new URLSearchParams;v.set("text",e),n&&v.set("title",n);const _=await fetch(`/api/debate-grade?${v.toString()}`,{method:"POST"});if(!_.ok)throw new Error("Failed to grade decision");const x=await _.json();a(x.debate_grade)}catch(v){d(v instanceof Error?v.message:"An error occurred")}finally{c(!1)}},m=v=>{switch(v){case"excellent":return"text-green-600";case"good":return"text-blue-600";case"fair":return"text-yellow-600";case"weak":return"text-orange-600";case"missing":return"text-red-600";default:return"text-gray-600"}},p=v=>{switch(v){case"excellent":case"good":return o.jsx(ci,{className:"h-6 w-6 text-green-600"});case"fair":return o.jsx(OA,{className:"h-6 w-6 text-yellow-600"});case"weak":case"missing":return o.jsx(Pb,{className:"h-6 w-6 text-red-600"});default:return null}};return o.jsx("div",{className:"min-h-screen p-8",style:{backgroundColor:"#F1F5F9"},children:o.jsxs("div",{className:"max-w-5xl mx-auto space-y-6",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-3xl font-bold mb-2",style:{color:"#354F52"},children:"Debate Finder"}),o.jsx("p",{className:"text-gray-600",children:"Evaluate government decisions using debate framework: Harms, Solvency, and Topicality"})]}),o.jsx("div",{className:"bg-white rounded-lg shadow-sm p-6",children:o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Decision Title (optional)"}),o.jsx("input",{type:"text",value:n,onChange:v=>r(v.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary-500",placeholder:"e.g., City Council approves dental screening program"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Decision Text"}),o.jsx("textarea",{value:e,onChange:v=>t(v.target.value),className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary-500",rows:8,placeholder:"Paste the government decision, meeting minutes, or policy text here..."})]}),u&&o.jsx("div",{className:"bg-red-50 border border-red-200 text-red-700 px-4 py-3 rounded",children:u}),o.jsx("button",{onClick:h,disabled:s,className:"px-6 py-2 text-white rounded-md transition-colors",style:{backgroundColor:"#354F52"},onMouseEnter:v=>v.currentTarget.style.backgroundColor="#2e4346",onMouseLeave:v=>v.currentTarget.style.backgroundColor="#354F52",children:s?"Grading...":"Grade This Decision"})]})}),i&&o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6",children:[o.jsxs("h2",{className:"text-2xl font-bold mb-4",style:{color:"#354F52"},children:["Overall Grade: ",o.jsx("span",{className:m(i.overall.grade),children:i.overall.grade.toUpperCase()})]}),o.jsxs("p",{className:"text-gray-700 mb-2",children:["Score: ",i.overall.score,"/5"]}),o.jsx("p",{className:"text-gray-600",children:i.overall.summary})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsx("h3",{className:"text-xl font-semibold",style:{color:"#354F52"},children:i.dimensions.harms.layperson_label}),p(i.dimensions.harms.grade)]}),o.jsxs("p",{className:"text-sm text-gray-600 mb-3 italic",children:['"',i.dimensions.harms.layperson_question,'"']}),o.jsxs("div",{className:"mb-3",children:[o.jsx("span",{className:`text-lg font-bold ${m(i.dimensions.harms.grade)}`,children:i.dimensions.harms.grade.toUpperCase()}),o.jsxs("span",{className:"text-gray-500 ml-2",children:["(",i.dimensions.harms.score,"/5)"]})]}),o.jsx("p",{className:"text-sm text-gray-700",children:i.dimensions.harms.explanation})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsx("h3",{className:"text-xl font-semibold",style:{color:"#354F52"},children:i.dimensions.solvency.layperson_label}),p(i.dimensions.solvency.grade)]}),o.jsxs("p",{className:"text-sm text-gray-600 mb-3 italic",children:['"',i.dimensions.solvency.layperson_question,'"']}),o.jsxs("div",{className:"mb-3",children:[o.jsx("span",{className:`text-lg font-bold ${m(i.dimensions.solvency.grade)}`,children:i.dimensions.solvency.grade.toUpperCase()}),o.jsxs("span",{className:"text-gray-500 ml-2",children:["(",i.dimensions.solvency.score,"/5)"]})]}),o.jsx("p",{className:"text-sm text-gray-700",children:i.dimensions.solvency.explanation})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsx("h3",{className:"text-xl font-semibold",style:{color:"#354F52"},children:i.dimensions.topicality.layperson_label}),p(i.dimensions.topicality.grade)]}),o.jsxs("p",{className:"text-sm text-gray-600 mb-3 italic",children:['"',i.dimensions.topicality.layperson_question,'"']}),o.jsxs("div",{className:"mb-3",children:[o.jsx("span",{className:`text-lg font-bold ${m(i.dimensions.topicality.grade)}`,children:i.dimensions.topicality.grade.toUpperCase()}),o.jsxs("span",{className:"text-gray-500 ml-2",children:["(",i.dimensions.topicality.score,"/5)"]})]}),o.jsx("p",{className:"text-sm text-gray-700",children:i.dimensions.topicality.explanation})]})]}),o.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-6",children:[o.jsx("h3",{className:"text-lg font-semibold text-blue-900 mb-3",children:"Understanding the Debate Framework"}),o.jsxs("div",{className:"space-y-2 text-sm text-blue-800",children:[o.jsxs("p",{children:[o.jsx("strong",{children:"The Problem (Harms):"})," Does the decision clearly explain the crisis or problem? Is there data to back it up? Who is affected?"]}),o.jsxs("p",{children:[o.jsx("strong",{children:"The Fix (Solvency):"})," Does the solution actually work? Is there a clear plan? Has it worked elsewhere?"]}),o.jsxs("p",{children:[o.jsx("strong",{children:"The Scope (Topicality):"})," Does the government body have the legal authority to do this? Is it within their jurisdiction?"]})]})]})]})]})})}function Uge({userId:e,showBreakdown:t=!1,clickable:n=!0}){const{data:r,isLoading:i}=zt({queryKey:["social","stats",e],queryFn:async()=>{const s=e?`?user_id=${e}`:"";return(await vt.get(`/social/stats${s}`)).data}});if(i)return o.jsxs("div",{className:"animate-pulse flex gap-6",children:[o.jsx("div",{className:"h-5 w-20 bg-gray-200 rounded"}),o.jsx("div",{className:"h-5 w-20 bg-gray-200 rounded"})]});if(!r)return null;const a=()=>o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center gap-6 text-sm",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ur,{className:"h-5 w-5",style:{color:"#52796F"}}),o.jsx("span",{className:"font-semibold",style:{color:"#354F52"},children:r.followers.toLocaleString()}),o.jsx("span",{className:"text-gray-600",children:r.followers===1?"Follower":"Followers"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Sb,{className:"h-5 w-5",style:{color:"#52796F"}}),o.jsx("span",{className:"font-semibold",style:{color:"#354F52"},children:r.following.toLocaleString()}),o.jsx("span",{className:"text-gray-600",children:"Following"})]})]}),t&&r.following>0&&o.jsxs("div",{className:"mt-4 grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[r.following_leaders>0&&o.jsxs("div",{className:"bg-blue-50 rounded-lg p-3",children:[o.jsx("div",{className:"font-semibold text-blue-900",children:r.following_leaders}),o.jsx("div",{className:"text-blue-700 text-xs",children:"Leaders"})]}),r.following_organizations>0&&o.jsxs("div",{className:"bg-green-50 rounded-lg p-3",children:[o.jsx("div",{className:"font-semibold text-green-900",children:r.following_organizations}),o.jsx("div",{className:"text-green-700 text-xs",children:"Charities"})]}),r.following_causes>0&&o.jsxs("div",{className:"bg-purple-50 rounded-lg p-3",children:[o.jsx("div",{className:"font-semibold text-purple-900",children:r.following_causes}),o.jsx("div",{className:"text-purple-700 text-xs",children:"Causes"})]}),r.following_users>0&&o.jsxs("div",{className:"bg-orange-50 rounded-lg p-3",children:[o.jsx("div",{className:"font-semibold text-orange-900",children:r.following_users}),o.jsx("div",{className:"text-orange-700 text-xs",children:"People"})]})]})]});return n?o.jsx(Se,{to:"/profile/following",className:"hover:opacity-75 transition-opacity",children:o.jsx(a,{})}):o.jsx(a,{})}function Yy(...e){return e.filter(Boolean).join(" ")}function Wge(){const{user:e}=e0(),[t,n]=N.useState(0),{data:r}=zt({queryKey:["following","leaders"],queryFn:async()=>(await vt.get("/social/following/leaders")).data,enabled:!!e}),{data:i}=zt({queryKey:["following","organizations"],queryFn:async()=>(await vt.get("/social/following/organizations")).data,enabled:!!e}),{data:a}=zt({queryKey:["following","causes"],queryFn:async()=>(await vt.get("/social/following/causes")).data,enabled:!!e});return e?o.jsx("div",{className:"min-h-screen p-8",style:{backgroundColor:"#F1F5F9"},children:o.jsxs("div",{className:"max-w-6xl mx-auto",children:[o.jsx("div",{className:"bg-white rounded-lg shadow-md p-8 mb-6",children:o.jsxs("div",{className:"flex items-start gap-6",children:[o.jsx("div",{className:"flex-shrink-0",children:e.avatar_url?o.jsx("img",{src:e.avatar_url,alt:e.full_name||e.email,className:"h-24 w-24 rounded-full object-cover border-4 border-gray-200"}):o.jsx("div",{className:"h-24 w-24 rounded-full flex items-center justify-center text-white text-3xl font-bold",style:{backgroundColor:"#354F52"},children:(e.full_name||e.email).charAt(0).toUpperCase()})}),o.jsxs("div",{className:"flex-1",children:[o.jsx("h1",{className:"text-3xl font-bold mb-2",style:{color:"#354F52"},children:e.full_name||"Community Member"}),o.jsx("p",{className:"text-gray-600 mb-4",children:e.email}),e.city&&e.state&&o.jsxs("p",{className:"text-sm text-gray-500 mb-4",children:["📍 ",e.city,", ",e.state]}),o.jsx(Uge,{showBreakdown:!0,clickable:!1})]}),o.jsxs("a",{href:"/settings",className:"flex items-center gap-2 px-4 py-2 border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors",children:[o.jsx(G_,{className:"h-5 w-5"}),o.jsx("span",{children:"Edit Profile"})]})]})}),o.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6",children:[o.jsx("h2",{className:"text-2xl font-bold mb-6",style:{color:"#354F52"},children:"Following"}),o.jsxs(wt.Group,{selectedIndex:t,onChange:n,children:[o.jsxs(wt.List,{className:"flex gap-2 border-b border-gray-200 mb-6",children:[o.jsx(wt,{className:({selected:s})=>Yy("px-4 py-2 font-medium text-sm border-b-2 transition-colors",s?"border-[#354F52] text-[#354F52]":"border-transparent text-gray-500 hover:text-gray-700"),children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx($i,{className:"h-5 w-5"}),"Leaders (",(r==null?void 0:r.length)||0,")"]})}),o.jsx(wt,{className:({selected:s})=>Yy("px-4 py-2 font-medium text-sm border-b-2 transition-colors",s?"border-[#354F52] text-[#354F52]":"border-transparent text-gray-500 hover:text-gray-700"),children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(dc,{className:"h-5 w-5"}),"Charities (",(i==null?void 0:i.length)||0,")"]})}),o.jsx(wt,{className:({selected:s})=>Yy("px-4 py-2 font-medium text-sm border-b-2 transition-colors",s?"border-[#354F52] text-[#354F52]":"border-transparent text-gray-500 hover:text-gray-700"),children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx($t,{className:"h-5 w-5"}),"Causes (",(a==null?void 0:a.length)||0,")"]})})]}),o.jsxs(wt.Panels,{children:[o.jsx(wt.Panel,{children:!r||r.length===0?o.jsxs("div",{className:"text-center py-12",children:[o.jsx($i,{className:"h-16 w-16 mx-auto text-gray-300 mb-4"}),o.jsx("p",{className:"text-gray-500",children:"You're not following any leaders yet"}),o.jsx("a",{href:"/people",className:"inline-block mt-4 text-blue-600 hover:text-blue-700 font-medium",children:"Find leaders to follow →"})]}):o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:r.map(s=>o.jsxs("div",{className:"flex items-start gap-4 p-4 border border-gray-200 rounded-lg hover:border-gray-300 transition-colors",children:[s.photo_url?o.jsx("img",{src:s.photo_url,alt:s.name,className:"h-16 w-16 rounded-full object-cover"}):o.jsx("div",{className:"h-16 w-16 rounded-full flex items-center justify-center text-white text-xl font-bold",style:{backgroundColor:"#354F52"},children:s.name.charAt(0)}),o.jsxs("div",{className:"flex-1",children:[o.jsxs("h3",{className:"font-semibold",style:{color:"#354F52"},children:[s.name,s.is_verified&&o.jsx("span",{className:"ml-1 text-blue-500",children:"✓"})]}),s.title&&o.jsx("p",{className:"text-sm text-gray-600",children:s.title}),s.office&&o.jsx("p",{className:"text-sm text-gray-500",children:s.office}),s.city&&s.state&&o.jsxs("p",{className:"text-xs text-gray-400 mt-1",children:[s.city,", ",s.state]}),o.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[s.follower_count.toLocaleString()," followers"]})]}),o.jsx(km,{type:"leader",id:s.id,initialFollowing:!0,initialCount:s.follower_count,showCount:!1,compact:!0})]},s.id))})}),o.jsx(wt.Panel,{children:!i||i.length===0?o.jsxs("div",{className:"text-center py-12",children:[o.jsx(dc,{className:"h-16 w-16 mx-auto text-gray-300 mb-4"}),o.jsx("p",{className:"text-gray-500",children:"You're not following any charities yet"}),o.jsx("a",{href:"/nonprofits",className:"inline-block mt-4 text-blue-600 hover:text-blue-700 font-medium",children:"Find charities to follow →"})]}):o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:i.map(s=>o.jsxs("div",{className:"flex items-start gap-4 p-4 border border-gray-200 rounded-lg hover:border-gray-300 transition-colors",children:[s.logo_url?o.jsx("img",{src:s.logo_url,alt:s.name,className:"h-16 w-16 rounded object-contain"}):o.jsx("div",{className:"h-16 w-16 rounded flex items-center justify-center text-white text-xl font-bold",style:{backgroundColor:"#52796F"},children:s.name.charAt(0)}),o.jsxs("div",{className:"flex-1",children:[o.jsxs("h3",{className:"font-semibold",style:{color:"#354F52"},children:[s.name,s.is_verified&&o.jsx("span",{className:"ml-1 text-blue-500",children:"✓"})]}),s.org_type&&o.jsx("span",{className:"inline-block px-2 py-0.5 text-xs rounded-full bg-green-100 text-green-800 capitalize mb-1",children:s.org_type}),s.description&&o.jsx("p",{className:"text-sm text-gray-600 line-clamp-2",children:s.description}),s.city&&s.state&&o.jsxs("p",{className:"text-xs text-gray-400 mt-1",children:[s.city,", ",s.state]}),o.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[s.follower_count.toLocaleString()," followers"]})]}),o.jsx(km,{type:"organization",id:s.id,initialFollowing:!0,initialCount:s.follower_count,showCount:!1,compact:!0})]},s.id))})}),o.jsx(wt.Panel,{children:!a||a.length===0?o.jsxs("div",{className:"text-center py-12",children:[o.jsx($t,{className:"h-16 w-16 mx-auto text-gray-300 mb-4"}),o.jsx("p",{className:"text-gray-500",children:"You're not following any causes yet"}),o.jsx("a",{href:"/",className:"inline-block mt-4 text-blue-600 hover:text-blue-700 font-medium",children:"Explore causes →"})]}):o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:a.map(s=>o.jsxs("div",{className:"p-4 border border-gray-200 rounded-lg hover:border-gray-300 transition-colors",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.icon_url?o.jsx("img",{src:s.icon_url,alt:s.name,className:"h-8 w-8"}):o.jsx("div",{className:"h-8 w-8 rounded-full",style:{backgroundColor:s.color||"#354F52"}}),o.jsx("h3",{className:"font-semibold flex-1",style:{color:"#354F52"},children:s.name})]}),s.description&&o.jsx("p",{className:"text-sm text-gray-600 mb-3",children:s.description}),s.category&&o.jsx("span",{className:"inline-block px-2 py-0.5 text-xs rounded-full bg-purple-100 text-purple-800 capitalize mb-2",children:s.category}),o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("p",{className:"text-xs text-gray-500",children:[s.follower_count.toLocaleString()," followers"]}),o.jsx(km,{type:"cause",id:s.id,initialFollowing:!0,initialCount:s.follower_count,showCount:!1,compact:!0})]})]},s.id))})})]})]})]})]})}):o.jsx("div",{className:"min-h-screen flex items-center justify-center",style:{backgroundColor:"#F1F5F9"},children:o.jsxs("div",{className:"text-center",children:[o.jsx("h2",{className:"text-2xl font-bold mb-4",style:{color:"#354F52"},children:"Please sign in"}),o.jsx("p",{className:"text-gray-600",children:"You need to be signed in to view your profile"})]})})}const Hge=[{title:"Policy Decisions",description:"Track decisions, budget deltas, stakeholder positions, and deferral patterns across government meetings.",icon:Ao,path:"/documents",color:"#354F52",stats:"500K+ meeting pages"},{title:"Budget Analysis",description:"Explore city, county, and school budgets with budget-to-minutes delta analysis showing rhetoric vs. reality.",icon:fc,path:"/analytics",color:"#52796F",stats:"Real-time tracking"},{title:"Elected Officials",description:"Find local, state, and school board officials with voting records and decision patterns.",icon:Ur,path:"/people",color:"#84A98C",stats:"100K+ officials"},{title:"Policy Map",description:"Track state legislation and bills across all sessions. Search and filter 13,000+ bills by topic, session, and status.",icon:Ai,path:"/policy-map",color:"#CAD2C5",stats:"13K+ bills"}],Vge=[{title:"Nonprofits & Churches",description:"Search 43,726 nonprofits including 4,372 churches with financial data from 5 states.",icon:Ci,path:"/nonprofits",color:"#354F52",stats:"43,726 organizations"},{title:"Advocacy Topics",description:"Track what your community is discussing. Find advocacy alerts and engagement opportunities.",icon:Hd,path:"/advocacy-topics",color:"#52796F",stats:"Get involved"},{title:"Grants & Funding",description:"Discover government grants, foundation funding, and program delivery outcomes for nonprofits.",icon:SA,path:"/analytics",color:"#84A98C",stats:"Find funding"},{title:"Fact-Checking",description:"Verify claims from meetings and legislation with PolitiFact, FactCheck.org, and Google Fact Check data.",icon:jb,path:"/fact-checking",color:"#CAD2C5",stats:"Verified claims"}],qge=[{title:"Open Source Projects",description:"Contribute to civic tech, data pipelines, AI models, and open government tools.",icon:$r,path:"/opensource",color:"#354F52",stats:"Join the community"},{title:"Hackathons for Good",description:"Build solutions for civic engagement, transparency, and community empowerment at our quarterly hackathons.",icon:jo,path:"/hackathons",color:"#52796F",stats:"Make an impact"}],Zge=[{title:"Community Events",description:"Discover local government meetings, public hearings, town halls, and community events you can attend.",icon:ha,path:"/events",color:"#354F52",stats:"Attend & engage"},{title:"Training & Services",description:"Find community programs, educational workshops, health services, and family support resources.",icon:Eo,path:"/services",color:"#52796F",stats:"Learn & grow"},{title:"Voter Registration",description:"Register to vote, find your polling place, check registration status, and learn about candidates.",icon:SB,path:"/analytics?topic=elections",color:"#84A98C",stats:"Make your voice heard"},{title:"Contact Your Representatives",description:"Find contact information for elected officials, city council members, and school board representatives.",icon:EA,path:"/people?view=contact",color:"#CAD2C5",stats:"100K+ officials"},{title:"Submit Feedback",description:"Provide public comments, share concerns, and participate in community decision-making processes.",icon:jB,path:"/opportunities?type=feedback",color:"#52796F",stats:"Be heard"},{title:"Community Resources",description:"Access food banks, housing assistance, healthcare, childcare, and other family support services.",icon:$t,path:"/nonprofits?category=family-services",color:"#84A98C",stats:"Get help"}];function Gge(){return N.useEffect(()=>{window.scrollTo({top:0,behavior:"smooth"})},[]),o.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 to-gray-100",children:[o.jsx("div",{className:"bg-white shadow-sm",children:o.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:o.jsxs("div",{className:"text-center",children:[o.jsx("h1",{className:"text-4xl font-bold text-gray-900 mb-3",children:"Explore Open Navigator Data"}),o.jsx("p",{className:"text-xl text-gray-600 max-w-3xl mx-auto",children:"Access comprehensive data on government decisions, budgets, demographics, nonprofits, and community engagement."})]})})}),o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[o.jsxs("div",{className:"mb-8",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"For Families & Individuals"}),o.jsx("p",{className:"text-gray-600",children:"Events, training, services, voter registration, and ways to engage with your community."})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mb-12",children:Zge.map(e=>{const t=e.icon;return o.jsxs(Se,{to:e.path,className:"group bg-white rounded-xl shadow-md hover:shadow-xl transition-all duration-300 overflow-hidden border border-gray-100 hover:border-gray-200",children:[o.jsxs("div",{className:"p-6",children:[o.jsx("div",{className:"w-14 h-14 rounded-lg flex items-center justify-center mb-4 group-hover:scale-110 transition-transform duration-300",style:{backgroundColor:`${e.color}15`},children:o.jsx("div",{style:{color:e.color},children:o.jsx(t,{className:"h-7 w-7"})})}),o.jsxs("div",{className:"mb-3",children:[o.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-1 group-hover:text-[#354F52] transition-colors",children:e.title}),e.stats&&o.jsx("p",{className:"text-sm font-medium",style:{color:e.color},children:e.stats})]}),o.jsx("p",{className:"text-gray-600 text-sm leading-relaxed",children:e.description}),o.jsx("div",{className:"mt-4 flex items-center text-sm font-medium",style:{color:e.color},children:o.jsx("span",{className:"group-hover:translate-x-1 transition-transform duration-300",children:"Explore →"})})]}),o.jsx("div",{className:"h-1 w-full transform scale-x-0 group-hover:scale-x-100 transition-transform duration-300 origin-left",style:{backgroundColor:e.color}})]},e.path)})}),o.jsxs("div",{className:"mb-8 mt-16",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"For Policy Makers & Government"}),o.jsx("p",{className:"text-gray-600",children:"Track decisions, budgets, officials, and demographic data across 90,000+ jurisdictions."})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-12",children:Hge.map(e=>{const t=e.icon;return o.jsxs(Se,{to:e.path,className:"group bg-white rounded-xl shadow-md hover:shadow-xl transition-all duration-300 overflow-hidden border border-gray-100 hover:border-gray-200",children:[o.jsxs("div",{className:"p-6",children:[o.jsx("div",{className:"w-14 h-14 rounded-lg flex items-center justify-center mb-4 group-hover:scale-110 transition-transform duration-300",style:{backgroundColor:`${e.color}15`},children:o.jsx("div",{style:{color:e.color},children:o.jsx(t,{className:"h-7 w-7"})})}),o.jsxs("div",{className:"mb-3",children:[o.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-1 group-hover:text-[#354F52] transition-colors",children:e.title}),e.stats&&o.jsx("p",{className:"text-sm font-medium",style:{color:e.color},children:e.stats})]}),o.jsx("p",{className:"text-gray-600 text-sm leading-relaxed",children:e.description}),o.jsx("div",{className:"mt-4 flex items-center text-sm font-medium",style:{color:e.color},children:o.jsx("span",{className:"group-hover:translate-x-1 transition-transform duration-300",children:"Explore →"})})]}),o.jsx("div",{className:"h-1 w-full transform scale-x-0 group-hover:scale-x-100 transition-transform duration-300 origin-left",style:{backgroundColor:e.color}})]},e.path)})}),o.jsxs("div",{className:"mb-8 mt-16",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"For Advocates & Community Members"}),o.jsx("p",{className:"text-gray-600",children:"Find nonprofits, advocacy topics, funding, and fact-checked information."})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:Vge.map(e=>{const t=e.icon;return o.jsxs(Se,{to:e.path,className:"group bg-white rounded-xl shadow-md hover:shadow-xl transition-all duration-300 overflow-hidden border border-gray-100 hover:border-gray-200",children:[o.jsxs("div",{className:"p-6",children:[o.jsx("div",{className:"w-14 h-14 rounded-lg flex items-center justify-center mb-4 group-hover:scale-110 transition-transform duration-300",style:{backgroundColor:`${e.color}15`},children:o.jsx("div",{style:{color:e.color},children:o.jsx(t,{className:"h-7 w-7"})})}),o.jsxs("div",{className:"mb-3",children:[o.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-1 group-hover:text-[#354F52] transition-colors",children:e.title}),e.stats&&o.jsx("p",{className:"text-sm font-medium",style:{color:e.color},children:e.stats})]}),o.jsx("p",{className:"text-gray-600 text-sm leading-relaxed",children:e.description}),o.jsx("div",{className:"mt-4 flex items-center text-sm font-medium",style:{color:e.color},children:o.jsx("span",{className:"group-hover:translate-x-1 transition-transform duration-300",children:"Explore →"})})]}),o.jsx("div",{className:"h-1 w-full transform scale-x-0 group-hover:scale-x-100 transition-transform duration-300 origin-left",style:{backgroundColor:e.color}})]},e.path)})}),o.jsxs("div",{className:"mb-8 mt-16",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"For Developers & Civic Tech"}),o.jsx("p",{className:"text-gray-600",children:"Build with open data, contribute to open source, and join hackathons for social good."})]}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:qge.map(e=>{const t=e.icon,n=e.path.startsWith("http"),r=o.jsxs("div",{className:"group bg-white rounded-xl shadow-md hover:shadow-xl transition-all duration-300 overflow-hidden border border-gray-100 hover:border-gray-200",children:[o.jsxs("div",{className:"p-6",children:[o.jsx("div",{className:"w-14 h-14 rounded-lg flex items-center justify-center mb-4 group-hover:scale-110 transition-transform duration-300",style:{backgroundColor:`${e.color}15`},children:o.jsx("div",{style:{color:e.color},children:o.jsx(t,{className:"h-7 w-7"})})}),o.jsxs("div",{className:"mb-3",children:[o.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-1 group-hover:text-[#354F52] transition-colors",children:e.title}),e.stats&&o.jsx("p",{className:"text-sm font-medium",style:{color:e.color},children:e.stats})]}),o.jsx("p",{className:"text-gray-600 text-sm leading-relaxed",children:e.description}),o.jsx("div",{className:"mt-4 flex items-center text-sm font-medium",style:{color:e.color},children:o.jsx("span",{className:"group-hover:translate-x-1 transition-transform duration-300",children:n?"View on GitHub →":"Explore →"})})]}),o.jsx("div",{className:"h-1 w-full transform scale-x-0 group-hover:scale-x-100 transition-transform duration-300 origin-left",style:{backgroundColor:e.color}})]});return n?o.jsx("a",{href:e.path,target:"_blank",rel:"noopener noreferrer",children:r},e.path):o.jsx(Se,{to:e.path,children:r},e.path)})}),o.jsx("div",{className:"mt-16 text-center",children:o.jsxs("div",{className:"bg-white rounded-xl shadow-md p-8 max-w-2xl mx-auto border border-gray-100",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-3",children:"Access the Complete Dataset"}),o.jsx("p",{className:"text-gray-600 mb-6",children:"All data is available on HuggingFace with full documentation, APIs, and CSV/Parquet downloads."}),o.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[o.jsx("a",{href:"https://huggingface.co/datasets/CommunityOne/open-navigator-data",target:"_blank",rel:"noopener noreferrer",className:"px-6 py-3 rounded-lg text-white font-semibold hover:shadow-lg transition-all",style:{backgroundColor:"#354F52"},children:"🤗 View on HuggingFace"}),o.jsx("a",{href:"https://www.communityone.com/docs/data-sources/data-model-erd",target:"_blank",rel:"noopener noreferrer",className:"px-6 py-3 rounded-lg font-semibold hover:shadow-lg transition-all border-2",style:{borderColor:"#354F52",color:"#354F52"},children:"📊 Explore Data Model"})]})]})})]}),o.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 pb-12 text-center",children:o.jsx(Se,{to:"/",className:"inline-flex items-center text-gray-600 hover:text-gray-900 font-medium transition-colors",children:"← Back to Home"})})]})}function Kge(){return o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[o.jsx("div",{className:"mb-8",children:o.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[o.jsx("div",{className:"p-3 bg-primary-50 rounded-lg",children:o.jsx(ha,{className:"h-8 w-8 text-primary-600"})}),o.jsxs("div",{children:[o.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Community Events"}),o.jsx("p",{className:"text-gray-600 mt-1",children:"Discover upcoming public meetings, community gatherings, and civic events"})]})]})}),o.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-xl p-8 mb-8",children:o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:"flex-shrink-0",children:o.jsx(ha,{className:"h-12 w-12 text-blue-600"})}),o.jsxs("div",{children:[o.jsx("h2",{className:"text-2xl font-bold text-blue-900 mb-2",children:"Coming Soon!"}),o.jsx("p",{className:"text-blue-800 mb-4",children:"We're building a comprehensive events calendar to help you stay engaged with your community."}),o.jsxs("div",{className:"space-y-2 text-blue-700",children:[o.jsx("h3",{className:"font-semibold",children:"What you'll find here:"}),o.jsxs("ul",{className:"list-disc list-inside space-y-1 ml-2",children:[o.jsx("li",{children:"City council meetings, school board sessions, and public hearings"}),o.jsx("li",{children:"Community forums, town halls, and neighborhood gatherings"}),o.jsx("li",{children:"Voter registration drives and civic engagement events"}),o.jsx("li",{children:"Training workshops and educational programs"})]})]})]})]})}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[o.jsxs("div",{className:"bg-white rounded-xl shadow-md p-6 border border-gray-200 opacity-60",children:[o.jsxs("div",{className:"flex items-start justify-between mb-4",children:[o.jsx("h3",{className:"text-xl font-bold text-gray-900",children:"City Council Meeting"}),o.jsx("span",{className:"px-3 py-1 bg-green-100 text-green-800 text-xs font-semibold rounded-full",children:"Upcoming"})]}),o.jsxs("div",{className:"space-y-3 text-gray-600",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(jS,{className:"h-5 w-5 text-gray-400"}),o.jsx("span",{children:"Tuesday, May 5, 2026 at 6:00 PM"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Rn,{className:"h-5 w-5 text-gray-400"}),o.jsx("span",{children:"City Hall, Main Chamber"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ur,{className:"h-5 w-5 text-gray-400"}),o.jsx("span",{children:"Open to the public"})]})]}),o.jsx("div",{className:"mt-4 pt-4 border-t border-gray-200",children:o.jsx("p",{className:"text-sm text-gray-600",children:"Budget discussions, zoning changes, and community feedback session"})})]}),o.jsxs("div",{className:"bg-white rounded-xl shadow-md p-6 border border-gray-200 opacity-60",children:[o.jsxs("div",{className:"flex items-start justify-between mb-4",children:[o.jsx("h3",{className:"text-xl font-bold text-gray-900",children:"Community Health Fair"}),o.jsx("span",{className:"px-3 py-1 bg-purple-100 text-purple-800 text-xs font-semibold rounded-full",children:"Registration Open"})]}),o.jsxs("div",{className:"space-y-3 text-gray-600",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(jS,{className:"h-5 w-5 text-gray-400"}),o.jsx("span",{children:"Saturday, May 10, 2026 at 10:00 AM"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Rn,{className:"h-5 w-5 text-gray-400"}),o.jsx("span",{children:"Community Center, 123 Main St"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ur,{className:"h-5 w-5 text-gray-400"}),o.jsx("span",{children:"Free for families"})]})]}),o.jsx("div",{className:"mt-4 pt-4 border-t border-gray-200",children:o.jsx("p",{className:"text-sm text-gray-600",children:"Free dental screenings, health resources, and family activities"})})]})]}),o.jsxs("div",{className:"mt-8 text-center",children:[o.jsx("p",{className:"text-gray-600 mb-4",children:"In the meantime, browse upcoming meetings:"}),o.jsx("a",{href:"/documents?filter=upcoming",className:"inline-flex items-center px-6 py-3 bg-primary-600 text-white rounded-lg hover:bg-primary-700 transition-colors font-semibold",children:"View Meeting Calendar →"})]})]})}function Yge(){return N.useEffect(()=>{window.scrollTo({top:0,behavior:"smooth"})},[]),o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[o.jsx("div",{className:"mb-8",children:o.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[o.jsx("div",{className:"p-3 bg-primary-50 rounded-lg",children:o.jsx($t,{className:"h-8 w-8 text-primary-600"})}),o.jsxs("div",{children:[o.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Services & Resources"}),o.jsx("p",{className:"text-gray-600 mt-1",children:"Find family services, social programs, and community support resources"})]})]})}),o.jsx("div",{className:"bg-purple-50 border border-purple-200 rounded-xl p-8 mb-8",children:o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:"flex-shrink-0",children:o.jsx($t,{className:"h-12 w-12 text-purple-600"})}),o.jsxs("div",{children:[o.jsx("h2",{className:"text-2xl font-bold text-purple-900 mb-2",children:"Coming Soon!"}),o.jsx("p",{className:"text-purple-800 mb-4",children:"We're creating a comprehensive directory of family services and community resources."}),o.jsxs("div",{className:"space-y-2 text-purple-700",children:[o.jsx("h3",{className:"font-semibold",children:"What you'll find here:"}),o.jsxs("ul",{className:"list-disc list-inside space-y-1 ml-2",children:[o.jsx("li",{children:"Healthcare services including dental clinics and mental health support"}),o.jsx("li",{children:"Educational programs, tutoring, and after-school activities"}),o.jsx("li",{children:"Food assistance, housing support, and financial aid programs"}),o.jsx("li",{children:"Legal aid, translation services, and crisis hotlines"}),o.jsx("li",{children:"Parks & recreation programs, dog parks, and community facilities"}),o.jsx("li",{children:"Senior services, youth activities, and family programs"})]})]})]})]})}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:[o.jsxs("div",{className:"bg-white rounded-xl shadow-md p-6 border border-gray-200 opacity-60",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[o.jsx("div",{className:"p-2 bg-red-100 rounded-lg",children:o.jsx($t,{className:"h-6 w-6 text-red-600"})}),o.jsx("h3",{className:"text-lg font-bold text-gray-900",children:"Health Services"})]}),o.jsxs("ul",{className:"space-y-2 text-sm text-gray-600",children:[o.jsx("li",{children:"• Free dental clinics"}),o.jsx("li",{children:"• Community health centers"}),o.jsx("li",{children:"• Mental health counseling"}),o.jsx("li",{children:"• Vision screening programs"})]})]}),o.jsxs("div",{className:"bg-white rounded-xl shadow-md p-6 border border-gray-200 opacity-60",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[o.jsx("div",{className:"p-2 bg-blue-100 rounded-lg",children:o.jsx(Eo,{className:"h-6 w-6 text-blue-600"})}),o.jsx("h3",{className:"text-lg font-bold text-gray-900",children:"Education"})]}),o.jsxs("ul",{className:"space-y-2 text-sm text-gray-600",children:[o.jsx("li",{children:"• After-school programs"}),o.jsx("li",{children:"• Tutoring services"}),o.jsx("li",{children:"• Adult education"}),o.jsx("li",{children:"• STEM workshops"})]})]}),o.jsxs("div",{className:"bg-white rounded-xl shadow-md p-6 border border-gray-200 opacity-60",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[o.jsx("div",{className:"p-2 bg-green-100 rounded-lg",children:o.jsx(s0,{className:"h-6 w-6 text-green-600"})}),o.jsx("h3",{className:"text-lg font-bold text-gray-900",children:"Basic Needs"})]}),o.jsxs("ul",{className:"space-y-2 text-sm text-gray-600",children:[o.jsx("li",{children:"• Food pantries"}),o.jsx("li",{children:"• Housing assistance"}),o.jsx("li",{children:"• Utility support"}),o.jsx("li",{children:"• Emergency shelters"})]})]}),o.jsxs("div",{className:"bg-white rounded-xl shadow-md p-6 border border-gray-200 opacity-60",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[o.jsx("div",{className:"p-2 bg-emerald-100 rounded-lg",children:o.jsx(Ai,{className:"h-6 w-6 text-emerald-600"})}),o.jsx("h3",{className:"text-lg font-bold text-gray-900",children:"Parks & Recreation"})]}),o.jsxs("ul",{className:"space-y-2 text-sm text-gray-600",children:[o.jsx("li",{children:"• Community parks"}),o.jsx("li",{children:"• Dog parks & pet areas"}),o.jsx("li",{children:"• Sports facilities"}),o.jsx("li",{children:"• Recreation programs"})]})]})]}),o.jsxs("div",{className:"mt-8 bg-gradient-to-r from-red-500 to-red-600 rounded-xl p-6 text-white",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[o.jsx(EA,{className:"h-8 w-8"}),o.jsx("h2",{className:"text-2xl font-bold",children:"Emergency Resources"})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 text-sm",children:[o.jsxs("div",{children:[o.jsx("div",{className:"font-semibold mb-1",children:"Crisis Hotline"}),o.jsx("div",{children:"988 - Suicide & Crisis Lifeline"})]}),o.jsxs("div",{children:[o.jsx("div",{className:"font-semibold mb-1",children:"Domestic Violence"}),o.jsx("div",{children:"1-800-799-7233 (SAFE)"})]}),o.jsxs("div",{children:[o.jsx("div",{className:"font-semibold mb-1",children:"Child Abuse"}),o.jsx("div",{children:"1-800-422-4453"})]})]})]}),o.jsxs("div",{className:"mt-8 text-center",children:[o.jsx("p",{className:"text-gray-600 mb-4",children:"Browse nonprofit organizations offering services:"}),o.jsx("a",{href:"/nonprofits?category=family-services",className:"inline-flex items-center px-6 py-3 bg-primary-600 text-white rounded-lg hover:bg-primary-700 transition-colors font-semibold",children:"Explore Nonprofits →"})]})]})}function Xge(){return o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[o.jsx("div",{className:"mb-8",children:o.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[o.jsx("div",{className:"p-3 bg-primary-50 rounded-lg",children:o.jsx($r,{className:"h-8 w-8 text-primary-600"})}),o.jsxs("div",{children:[o.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Developers & Civic Tech"}),o.jsx("p",{className:"text-gray-600 mt-1",children:"Build civic tech solutions with open data and open source tools"})]})]})}),o.jsxs("div",{className:"bg-gradient-to-r from-primary-600 to-primary-700 rounded-xl p-8 mb-8 text-white",children:[o.jsx("h2",{className:"text-3xl font-bold mb-4",children:"Build the Future of Civic Engagement"}),o.jsx("p",{className:"text-xl mb-6 text-primary-50",children:"Open Navigator is 100% open source. Join developers worldwide building tools for transparency, accountability, and community empowerment."}),o.jsxs("div",{className:"flex flex-wrap gap-4",children:[o.jsxs("a",{href:"https://github.com/getcommunityone/open-navigator-for-engagement",target:"_blank",rel:"noopener noreferrer",className:"px-6 py-3 bg-white text-primary-700 rounded-lg hover:bg-primary-50 transition-colors font-semibold flex items-center gap-2",children:[o.jsx($r,{className:"h-5 w-5"}),"View on GitHub"]}),o.jsxs("a",{href:"/hackathons",className:"px-6 py-3 bg-primary-500 text-white rounded-lg hover:bg-primary-400 transition-colors font-semibold border-2 border-white flex items-center gap-2",children:[o.jsx(jo,{className:"h-5 w-5"}),"Join Hackathons"]})]})]}),o.jsxs("div",{className:"mb-8",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Tech Stack"}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[o.jsxs("div",{className:"bg-white rounded-xl shadow-md p-6 border border-gray-200",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[o.jsx("div",{className:"p-2 bg-blue-100 rounded-lg",children:o.jsx(RB,{className:"h-6 w-6 text-blue-600"})}),o.jsx("h3",{className:"text-lg font-bold text-gray-900",children:"Frontend"})]}),o.jsxs("ul",{className:"space-y-2 text-sm text-gray-600",children:[o.jsx("li",{children:"• React 18 + TypeScript"}),o.jsx("li",{children:"• Vite + Tailwind CSS"}),o.jsx("li",{children:"• TanStack Query"}),o.jsx("li",{children:"• Recharts for visualizations"})]})]}),o.jsxs("div",{className:"bg-white rounded-xl shadow-md p-6 border border-gray-200",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[o.jsx("div",{className:"p-2 bg-green-100 rounded-lg",children:o.jsx(mz,{className:"h-6 w-6 text-green-600"})}),o.jsx("h3",{className:"text-lg font-bold text-gray-900",children:"Backend"})]}),o.jsxs("ul",{className:"space-y-2 text-sm text-gray-600",children:[o.jsx("li",{children:"• Python FastAPI"}),o.jsx("li",{children:"• LangChain + LangGraph"}),o.jsx("li",{children:"• OpenAI, Anthropic APIs"}),o.jsx("li",{children:"• Supabase Auth"})]})]}),o.jsxs("div",{className:"bg-white rounded-xl shadow-md p-6 border border-gray-200",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[o.jsx("div",{className:"p-2 bg-purple-100 rounded-lg",children:o.jsx(_S,{className:"h-6 w-6 text-purple-600"})}),o.jsx("h3",{className:"text-lg font-bold text-gray-900",children:"Data"})]}),o.jsxs("ul",{className:"space-y-2 text-sm text-gray-600",children:[o.jsx("li",{children:"• 925 jurisdictions"}),o.jsx("li",{children:"• 43,726 nonprofits"}),o.jsx("li",{children:"• 6,913 meeting pages"}),o.jsx("li",{children:"• Medallion architecture"})]})]})]})]}),o.jsxs("div",{className:"mb-8",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Get Started"}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs("a",{href:"https://github.com/getcommunityone/open-navigator-for-engagement#readme",target:"_blank",rel:"noopener noreferrer",className:"flex items-start gap-4 p-6 bg-white rounded-xl shadow-md border border-gray-200 hover:border-primary-300 transition-colors group",children:[o.jsx(Zf,{className:"h-8 w-8 text-primary-600 flex-shrink-0"}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-1 group-hover:text-primary-600",children:"Documentation"}),o.jsx("p",{className:"text-sm text-gray-600",children:"Setup guides, API docs, and architecture overview"})]})]}),o.jsxs("a",{href:"https://huggingface.co/datasets/CommunityOne/open-navigator-data",target:"_blank",rel:"noopener noreferrer",className:"flex items-start gap-4 p-6 bg-white rounded-xl shadow-md border border-gray-200 hover:border-primary-300 transition-colors group",children:[o.jsx(_S,{className:"h-8 w-8 text-primary-600 flex-shrink-0"}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-1 group-hover:text-primary-600",children:"Open Datasets"}),o.jsx("p",{className:"text-sm text-gray-600",children:"Download CSV/Parquet files from HuggingFace"})]})]}),o.jsxs("a",{href:"https://github.com/getcommunityone/open-navigator-for-engagement/issues",target:"_blank",rel:"noopener noreferrer",className:"flex items-start gap-4 p-6 bg-white rounded-xl shadow-md border border-gray-200 hover:border-primary-300 transition-colors group",children:[o.jsx($r,{className:"h-8 w-8 text-primary-600 flex-shrink-0"}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-1 group-hover:text-primary-600",children:"Contribute Code"}),o.jsx("p",{className:"text-sm text-gray-600",children:"Pick an issue, submit a PR, or propose new features"})]})]}),o.jsxs("a",{href:"/hackathons",className:"flex items-start gap-4 p-6 bg-white rounded-xl shadow-md border border-gray-200 hover:border-primary-300 transition-colors group",children:[o.jsx(jo,{className:"h-8 w-8 text-primary-600 flex-shrink-0"}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-lg font-bold text-gray-900 mb-1 group-hover:text-primary-600",children:"Join Hackathons"}),o.jsx("p",{className:"text-sm text-gray-600",children:"Build solutions at our quarterly civic tech hackathons"})]})]})]})]}),o.jsxs("div",{className:"bg-gray-900 rounded-xl p-6 text-white",children:[o.jsxs("h2",{className:"text-xl font-bold mb-4 flex items-center gap-2",children:[o.jsx($r,{className:"h-6 w-6"}),"API Example"]}),o.jsx("pre",{className:"bg-gray-800 rounded-lg p-4 overflow-x-auto text-sm",children:o.jsx("code",{children:`# Search meeting transcripts import requests response = requests.get( 'http://localhost:8000/api/search/', params={ 'q': 'dental health', 'state': 'AL', 'limit': 10 } ) for result in response.json()['results']: print(f"{result['title']} - {result['date']}") print(f"Score: {result['score']}") print(result['snippet']) print()`})})]})]})}function Qge(){return o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:[o.jsx("div",{className:"mb-8",children:o.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[o.jsx("div",{className:"p-3 bg-primary-50 rounded-lg",children:o.jsx(jo,{className:"h-8 w-8 text-primary-600"})}),o.jsxs("div",{children:[o.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Hackathons for Good"}),o.jsx("p",{className:"text-gray-600 mt-1",children:"Build civic tech solutions that empower communities and promote transparency"})]})]})}),o.jsx("div",{className:"bg-gradient-to-r from-purple-600 to-pink-600 rounded-xl p-8 mb-8 text-white",children:o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:"flex-shrink-0",children:o.jsx(jo,{className:"h-12 w-12"})}),o.jsxs("div",{children:[o.jsx("h2",{className:"text-3xl font-bold mb-2",children:"Quarterly Civic Tech Hackathons"}),o.jsx("p",{className:"text-lg mb-4 text-purple-50",children:"Join developers, designers, and civic advocates to build tools for social impact."}),o.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 bg-white text-purple-700 rounded-lg font-semibold",children:[o.jsx(ha,{className:"h-5 w-5"}),"Next Event: Coming Soon!"]})]})]})}),o.jsxs("div",{className:"mb-8",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-6",children:"Why Participate?"}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[o.jsxs("div",{className:"bg-white rounded-xl shadow-md p-6 border border-gray-200",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[o.jsx("div",{className:"p-2 bg-blue-100 rounded-lg",children:o.jsx(JB,{className:"h-6 w-6 text-blue-600"})}),o.jsx("h3",{className:"text-lg font-bold text-gray-900",children:"Real Impact"})]}),o.jsx("p",{className:"text-gray-600 text-sm",children:"Build tools that help communities access services, hold government accountable, and participate in democracy."})]}),o.jsxs("div",{className:"bg-white rounded-xl shadow-md p-6 border border-gray-200",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[o.jsx("div",{className:"p-2 bg-green-100 rounded-lg",children:o.jsx(Ur,{className:"h-6 w-6 text-green-600"})}),o.jsx("h3",{className:"text-lg font-bold text-gray-900",children:"Collaboration"})]}),o.jsx("p",{className:"text-gray-600 text-sm",children:"Work alongside civic advocates, policy experts, and fellow developers to solve real problems."})]}),o.jsxs("div",{className:"bg-white rounded-xl shadow-md p-6 border border-gray-200",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[o.jsx("div",{className:"p-2 bg-purple-100 rounded-lg",children:o.jsx(_z,{className:"h-6 w-6 text-purple-600"})}),o.jsx("h3",{className:"text-lg font-bold text-gray-900",children:"Recognition"})]}),o.jsx("p",{className:"text-gray-600 text-sm",children:"Win prizes, get featured in our showcase, and add meaningful projects to your portfolio."})]})]})]}),o.jsxs("div",{className:"mb-8",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Challenge Tracks"}),o.jsxs("div",{className:"space-y-4",children:[o.jsx("div",{className:"bg-white rounded-xl shadow-md p-6 border border-gray-200",children:o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:"p-3 bg-blue-100 rounded-lg",children:o.jsx($r,{className:"h-8 w-8 text-blue-600"})}),o.jsxs("div",{className:"flex-1",children:[o.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-2",children:"Data Visualization & Dashboards"}),o.jsx("p",{className:"text-gray-600 mb-3",children:"Create interactive visualizations that make government data accessible to everyday citizens."}),o.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.jsx("span",{className:"px-3 py-1 bg-blue-50 text-blue-700 text-xs font-semibold rounded-full",children:"React"}),o.jsx("span",{className:"px-3 py-1 bg-blue-50 text-blue-700 text-xs font-semibold rounded-full",children:"D3.js"}),o.jsx("span",{className:"px-3 py-1 bg-blue-50 text-blue-700 text-xs font-semibold rounded-full",children:"Data Analysis"})]})]})]})}),o.jsx("div",{className:"bg-white rounded-xl shadow-md p-6 border border-gray-200",children:o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:"p-3 bg-green-100 rounded-lg",children:o.jsx(jo,{className:"h-8 w-8 text-green-600"})}),o.jsxs("div",{className:"flex-1",children:[o.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-2",children:"AI for Civic Engagement"}),o.jsx("p",{className:"text-gray-600 mb-3",children:"Use LLMs and AI agents to summarize meetings, extract policy insights, or answer citizen questions."}),o.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.jsx("span",{className:"px-3 py-1 bg-green-50 text-green-700 text-xs font-semibold rounded-full",children:"LangChain"}),o.jsx("span",{className:"px-3 py-1 bg-green-50 text-green-700 text-xs font-semibold rounded-full",children:"RAG"}),o.jsx("span",{className:"px-3 py-1 bg-green-50 text-green-700 text-xs font-semibold rounded-full",children:"NLP"})]})]})]})}),o.jsx("div",{className:"bg-white rounded-xl shadow-md p-6 border border-gray-200",children:o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:"p-3 bg-purple-100 rounded-lg",children:o.jsx(Ur,{className:"h-8 w-8 text-purple-600"})}),o.jsxs("div",{className:"flex-1",children:[o.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-2",children:"Community Engagement Tools"}),o.jsx("p",{className:"text-gray-600 mb-3",children:"Build mobile apps, notification systems, or tools that help people participate in local government."}),o.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.jsx("span",{className:"px-3 py-1 bg-purple-50 text-purple-700 text-xs font-semibold rounded-full",children:"Mobile"}),o.jsx("span",{className:"px-3 py-1 bg-purple-50 text-purple-700 text-xs font-semibold rounded-full",children:"Notifications"}),o.jsx("span",{className:"px-3 py-1 bg-purple-50 text-purple-700 text-xs font-semibold rounded-full",children:"UX Design"})]})]})]})})]})]}),o.jsxs("div",{className:"bg-gradient-to-r from-primary-50 to-primary-100 rounded-xl p-8 border border-primary-200",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Resources for Participants"}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 text-sm",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"font-semibold text-gray-900 mb-2",children:"Data Access"}),o.jsxs("ul",{className:"space-y-1 text-gray-700",children:[o.jsx("li",{children:"• 925 jurisdiction records"}),o.jsx("li",{children:"• 43,726 nonprofit organizations"}),o.jsx("li",{children:"• 6,913 meeting pages with transcripts"}),o.jsx("li",{children:"• API access and bulk downloads"})]})]}),o.jsxs("div",{children:[o.jsx("h3",{className:"font-semibold text-gray-900 mb-2",children:"Support"}),o.jsxs("ul",{className:"space-y-1 text-gray-700",children:[o.jsx("li",{children:"• Mentors from civic tech community"}),o.jsx("li",{children:"• Technical workshops and tutorials"}),o.jsx("li",{children:"• GitHub repository with starter code"}),o.jsx("li",{children:"• Discord community for collaboration"})]})]})]})]}),o.jsx("div",{className:"mt-8 text-center",children:o.jsxs("div",{className:"bg-white rounded-xl shadow-lg p-8 max-w-2xl mx-auto border border-gray-200",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-3",children:"Join Our Community"}),o.jsx("p",{className:"text-gray-600 mb-6",children:"Get notified about upcoming hackathons, workshops, and civic tech events."}),o.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[o.jsx("a",{href:"https://github.com/getcommunityone/open-navigator-for-engagement",target:"_blank",rel:"noopener noreferrer",className:"px-6 py-3 bg-primary-600 text-white rounded-lg hover:bg-primary-700 transition-colors font-semibold",children:"Star on GitHub"}),o.jsx("a",{href:"/opportunities",className:"px-6 py-3 bg-white text-primary-600 rounded-lg hover:bg-primary-50 transition-colors font-semibold border-2 border-primary-600",children:"Browse All Opportunities"})]})]})})]})}function Jge(){const e=[{icon:$r,title:"Open Source Codebase",description:"All code is publicly available on GitHub under an open source license. Fork, contribute, or learn from our implementation.",link:"https://github.com/getcommunityone/open-navigator-for-engagement"},{icon:Ao,title:"Comprehensive Documentation",description:"Detailed documentation for developers, including API docs, data models, deployment guides, and contribution guidelines.",link:"https://www.communityone.com/docs/intro"},{icon:Ur,title:"Community Contributions",description:"Join our community of civic tech developers. Submit issues, create pull requests, or participate in discussions.",link:"https://github.com/getcommunityone/open-navigator-for-engagement/issues"},{icon:jo,title:"Hackathons & Events",description:"Participate in quarterly hackathons focused on civic engagement, government transparency, and community empowerment.",link:"/hackathons"}],t=[{category:"Frontend",tech:"React, TypeScript, Vite, TailwindCSS"},{category:"Backend",tech:"FastAPI, Python, PostgreSQL"},{category:"Data",tech:"Pandas, Parquet, HuggingFace Datasets"},{category:"Deployment",tech:"Docker, HuggingFace Spaces, Databricks"},{category:"Documentation",tech:"Docusaurus, Markdown"}];return o.jsx("div",{className:"min-h-screen p-8",style:{backgroundColor:"#F1F5F9"},children:o.jsxs("div",{className:"max-w-7xl mx-auto",children:[o.jsxs("div",{className:"mb-8",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[o.jsx($r,{className:"h-8 w-8",style:{color:"#354F52"}}),o.jsx("h1",{className:"text-3xl font-bold",style:{color:"#354F52"},children:"Open Source Projects"})]}),o.jsx("p",{className:"text-gray-600",children:"Build with us. Contribute to civic tech. Make government data accessible to everyone."})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-8 mb-8 border-l-4",style:{borderColor:"#354F52"},children:[o.jsxs("div",{className:"flex items-start justify-between mb-4",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Open Navigator"}),o.jsx("p",{className:"text-gray-600 mb-4",children:"A comprehensive platform for civic engagement, government transparency, and community empowerment."})]}),o.jsxs("a",{href:"https://github.com/getcommunityone/open-navigator-for-engagement",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 px-4 py-2 rounded-lg text-white hover:shadow-lg transition-all",style:{backgroundColor:"#354F52"},children:[o.jsx(bz,{className:"h-5 w-5"}),o.jsx("span",{children:"Star on GitHub"}),o.jsx(xb,{className:"h-4 w-4"})]})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-6",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"text-sm font-semibold text-gray-700 uppercase tracking-wide mb-2",children:"Key Features"}),o.jsxs("ul",{className:"space-y-2 text-sm text-gray-600",children:[o.jsxs("li",{className:"flex items-start gap-2",children:[o.jsx("span",{className:"text-green-600 font-bold",children:"✓"}),"Track 925 cities, counties, and school districts"]}),o.jsxs("li",{className:"flex items-start gap-2",children:[o.jsx("span",{className:"text-green-600 font-bold",children:"✓"}),"Monitor 43,726 nonprofits and community organizations"]}),o.jsxs("li",{className:"flex items-start gap-2",children:[o.jsx("span",{className:"text-green-600 font-bold",children:"✓"}),"Analyze government meeting transcripts with AI"]}),o.jsxs("li",{className:"flex items-start gap-2",children:[o.jsx("span",{className:"text-green-600 font-bold",children:"✓"}),"Open datasets on HuggingFace"]})]})]}),o.jsxs("div",{children:[o.jsx("h3",{className:"text-sm font-semibold text-gray-700 uppercase tracking-wide mb-2",children:"Languages & Tools"}),o.jsx("div",{className:"flex flex-wrap gap-2",children:["TypeScript","Python","React","FastAPI","PostgreSQL","Docker"].map(n=>o.jsx("span",{className:"px-3 py-1 rounded-full text-xs font-medium",style:{backgroundColor:"#CAD2C5",color:"#354F52"},children:n},n))})]})]}),o.jsxs("div",{className:"flex flex-wrap gap-4",children:[o.jsx("a",{href:"https://github.com/getcommunityone/open-navigator-for-engagement",target:"_blank",rel:"noopener noreferrer",className:"px-6 py-3 rounded-lg font-semibold hover:shadow-lg transition-all border-2",style:{borderColor:"#354F52",color:"#354F52"},children:"View Repository →"}),o.jsx("a",{href:"https://github.com/getcommunityone/open-navigator-for-engagement/issues",target:"_blank",rel:"noopener noreferrer",className:"px-6 py-3 rounded-lg font-semibold hover:shadow-lg transition-all border-2 border-gray-300 text-gray-700",children:"Report Issue"}),o.jsx("a",{href:"https://github.com/getcommunityone/open-navigator-for-engagement/fork",target:"_blank",rel:"noopener noreferrer",className:"px-6 py-3 rounded-lg font-semibold hover:shadow-lg transition-all border-2 border-gray-300 text-gray-700",children:"Fork Project"})]})]}),o.jsxs("div",{className:"mb-8",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-6",children:"How to Get Involved"}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:e.map(n=>{const r=n.icon,i=n.link.startsWith("http");return o.jsx("a",{href:n.link,target:i?"_blank":void 0,rel:i?"noopener noreferrer":void 0,className:"bg-white rounded-lg shadow-sm p-6 hover:shadow-md transition-shadow",children:o.jsxs("div",{className:"flex items-start gap-4",children:[o.jsx("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center flex-shrink-0",style:{backgroundColor:"#354F5215"},children:o.jsx(r,{className:"h-6 w-6",style:{color:"#354F52"}})}),o.jsxs("div",{children:[o.jsxs("h3",{className:"text-lg font-semibold text-gray-900 mb-2 flex items-center gap-2",children:[n.title,i&&o.jsx(xb,{className:"h-4 w-4"})]}),o.jsx("p",{className:"text-sm text-gray-600",children:n.description})]})]})},n.title)})})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-8 mb-8",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-6",children:"Technology Stack"}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:t.map(n=>o.jsxs("div",{children:[o.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide mb-2",style:{color:"#52796F"},children:n.category}),o.jsx("p",{className:"text-gray-700",children:n.tech})]},n.category))})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-8",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Contribution Guidelines"}),o.jsxs("div",{className:"space-y-4 text-gray-600",children:[o.jsx("p",{children:"We welcome contributions from developers of all skill levels! Here's how to get started:"}),o.jsxs("ol",{className:"list-decimal list-inside space-y-2 ml-4",children:[o.jsxs("li",{children:[o.jsx("strong",{children:"Fork the repository"})," and clone it to your local machine"]}),o.jsxs("li",{children:[o.jsx("strong",{children:"Create a new branch"})," for your feature or bug fix"]}),o.jsxs("li",{children:[o.jsx("strong",{children:"Make your changes"})," following our coding standards"]}),o.jsxs("li",{children:[o.jsx("strong",{children:"Write tests"})," for new functionality"]}),o.jsxs("li",{children:[o.jsx("strong",{children:"Submit a pull request"})," with a clear description of your changes"]})]}),o.jsxs("p",{className:"mt-4",children:["See our"," ",o.jsx("a",{href:"https://github.com/getcommunityone/open-navigator-for-engagement/blob/main/CONTRIBUTING.md",target:"_blank",rel:"noopener noreferrer",className:"font-semibold hover:underline",style:{color:"#354F52"},children:"CONTRIBUTING.md"})," ","for detailed guidelines."]})]})]})]})})}function e0e(){const e=[{icon:$t,title:"Oral Health",description:"Track dental programs, fluoridation policies, and oral health initiatives in your community.",count:"5,200+ related meetings",color:"#DC143C",keywords:["dental","fluoride","oral health","teeth"]},{icon:Eo,title:"Education",description:"Monitor school budgets, curriculum changes, and educational programs across districts.",count:"15,000+ related meetings",color:"#354F52",keywords:["schools","education","curriculum","budget"]},{icon:YB,title:"Housing & Development",description:"Follow zoning decisions, affordable housing initiatives, and development projects.",count:"8,500+ related meetings",color:"#52796F",keywords:["housing","zoning","development","affordable"]},{icon:kA,title:"Public Safety",description:"Stay informed on police budgets, fire department resources, and emergency services.",count:"12,000+ related meetings",color:"#84A98C",keywords:["police","fire","safety","emergency"]},{icon:Ur,title:"Social Services",description:"Track programs for seniors, families, mental health, and community support.",count:"7,800+ related meetings",color:"#CAD2C5",keywords:["social services","mental health","seniors","families"]},{icon:CA,title:"Environment & Sustainability",description:"Monitor climate initiatives, recycling programs, and environmental policies.",count:"6,400+ related meetings",color:"#52796F",keywords:["environment","climate","sustainability","recycling"]}],t=[{step:"1",title:"Find Your Topic",description:"Browse advocacy topics or search for specific issues affecting your community."},{step:"2",title:"Track Meetings",description:"Monitor upcoming government meetings where your topic will be discussed."},{step:"3",title:"Prepare Your Message",description:"Use our talking points and data to craft compelling testimony."},{step:"4",title:"Make Your Voice Heard",description:"Attend meetings, submit comments, or contact officials directly."}];return o.jsx("div",{className:"min-h-screen p-8",style:{backgroundColor:"#F1F5F9"},children:o.jsxs("div",{className:"max-w-7xl mx-auto",children:[o.jsxs("div",{className:"mb-8",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[o.jsx(Hd,{className:"h-8 w-8",style:{color:"#52796F"}}),o.jsx("h1",{className:"text-3xl font-bold",style:{color:"#354F52"},children:"Advocacy Topics"})]}),o.jsx("p",{className:"text-gray-600",children:"Track what your community is discussing. Find advocacy opportunities and get involved in local decision-making."})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-8 mb-8 text-center border-l-4",style:{borderColor:"#52796F"},children:[o.jsx(oz,{className:"h-12 w-12 mx-auto mb-4",style:{color:"#52796F"}}),o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-3",children:"Find Advocacy Opportunities in Your Area"}),o.jsx("p",{className:"text-gray-600 mb-6 max-w-2xl mx-auto",children:"Search meeting minutes for topics that matter to you. Get alerts when your issues are being discussed."}),o.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[o.jsx(Se,{to:"/documents",className:"px-6 py-3 rounded-lg text-white font-semibold hover:shadow-lg transition-all",style:{backgroundColor:"#52796F"},children:"Search Meeting Minutes"}),o.jsx(Se,{to:"/opportunities",className:"px-6 py-3 rounded-lg font-semibold hover:shadow-lg transition-all border-2",style:{borderColor:"#52796F",color:"#52796F"},children:"View All Opportunities"})]})]}),o.jsxs("div",{className:"mb-12",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-6",children:"Popular Advocacy Topics"}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:e.map(n=>{const r=n.icon;return o.jsxs(Se,{to:`/documents?search=${encodeURIComponent(n.keywords[0])}`,className:"bg-white rounded-lg shadow-sm p-6 hover:shadow-md transition-all group",children:[o.jsxs("div",{className:"flex items-start justify-between mb-4",children:[o.jsx("div",{className:"w-12 h-12 rounded-lg flex items-center justify-center group-hover:scale-110 transition-transform",style:{backgroundColor:`${n.color}15`},children:o.jsx(r,{className:"h-6 w-6",style:{color:n.color}})}),o.jsx("span",{className:"text-xs font-medium px-2 py-1 rounded-full",style:{backgroundColor:`${n.color}15`,color:n.color},children:n.count})]}),o.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-2 group-hover:text-primary-600 transition-colors",children:n.title}),o.jsx("p",{className:"text-sm text-gray-600 mb-3",children:n.description}),o.jsx("div",{className:"flex flex-wrap gap-1",children:n.keywords.slice(0,3).map(i=>o.jsx("span",{className:"text-xs px-2 py-1 rounded-full bg-gray-100 text-gray-700",children:i},i))}),o.jsx("div",{className:"mt-4 text-sm font-medium group-hover:translate-x-1 transition-transform",style:{color:n.color},children:"Search meetings →"})]},n.title)})})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-8 mb-8",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-6",children:"How to Advocate Effectively"}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:t.map(n=>o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"w-12 h-12 rounded-full mx-auto mb-4 flex items-center justify-center text-white text-xl font-bold",style:{backgroundColor:"#52796F"},children:n.step}),o.jsx("h3",{className:"font-semibold text-gray-900 mb-2",children:n.title}),o.jsx("p",{className:"text-sm text-gray-600",children:n.description})]},n.step))})]}),o.jsxs("div",{className:"bg-gradient-to-r from-primary-50 to-primary-100 rounded-lg p-8 text-center",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-3",children:"Ready to Make a Difference?"}),o.jsx("p",{className:"text-gray-700 mb-6 max-w-2xl mx-auto",children:"Start by searching for your community and exploring what local government is discussing. Your voice matters in local decision-making."}),o.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[o.jsx(Se,{to:"/heatmap",className:"px-6 py-3 rounded-lg text-white font-semibold hover:shadow-lg transition-all",style:{backgroundColor:"#354F52"},children:"Find Your Community"}),o.jsx(Se,{to:"/events",className:"px-6 py-3 rounded-lg font-semibold hover:shadow-lg transition-all bg-white border-2 border-gray-300 text-gray-700",children:"View Upcoming Meetings"})]})]})]})})}function t0e(){const e=[{name:"PolitiFact",description:"Fact-checking political claims with the Truth-O-Meter rating system.",url:"https://www.politifact.com",logo:"🔍",focus:"National & State Politics"},{name:"FactCheck.org",description:"Nonpartisan fact-checking by the Annenberg Public Policy Center.",url:"https://www.factcheck.org",logo:"✓",focus:"Political Claims"},{name:"Google Fact Check Explorer",description:"Search fact checks from publishers worldwide using Google's Fact Check Tools.",url:"https://toolbox.google.com/factcheck/explorer",logo:"🔎",focus:"Global Claims"},{name:"Snopes",description:"Fact-checking urban legends, internet rumors, and misinformation.",url:"https://www.snopes.com",logo:"📰",focus:"Internet & Media"}],t=[{icon:UB,title:"Find the Claim",description:"Identify specific statements made in government meetings or public discourse."},{icon:kA,title:"Check Credible Sources",description:"Use fact-checking organizations and official data sources to verify claims."},{icon:ci,title:"Evaluate Evidence",description:"Look for primary sources, statistics, and expert analysis to support or refute claims."},{icon:jb,title:"Share Findings",description:"Report misinformation and share accurate information with your community."}],n=[{type:"True",icon:ci,color:"text-green-600",bgColor:"bg-green-50",description:"Claim is accurate and supported by evidence"},{type:"Mostly True",icon:ci,color:"text-blue-600",bgColor:"bg-blue-50",description:"Claim is mostly accurate with minor omissions"},{type:"Half True",icon:OA,color:"text-yellow-600",bgColor:"bg-yellow-50",description:"Claim contains elements of truth but lacks context"},{type:"Mostly False",icon:Pb,color:"text-orange-600",bgColor:"bg-orange-50",description:"Claim contains significant inaccuracies"},{type:"False",icon:Pb,color:"text-red-600",bgColor:"bg-red-50",description:"Claim is not supported by evidence"}];return o.jsx("div",{className:"min-h-screen p-8",style:{backgroundColor:"#F1F5F9"},children:o.jsxs("div",{className:"max-w-7xl mx-auto",children:[o.jsxs("div",{className:"mb-8",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[o.jsx(jb,{className:"h-8 w-8",style:{color:"#CAD2C5"}}),o.jsx("h1",{className:"text-3xl font-bold",style:{color:"#354F52"},children:"Fact-Checking Tools"})]}),o.jsx("p",{className:"text-gray-600",children:"Verify claims from meetings and legislation with trusted fact-checking sources and tools."})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-8 mb-8 border-l-4",style:{borderColor:"#CAD2C5"},children:[o.jsxs("div",{className:"flex items-start justify-between mb-4",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Debate Framework Analyzer"}),o.jsx("p",{className:"text-gray-600 mb-4",children:"Evaluate government decisions using a debate framework that analyzes Harms, Solvency, and Topicality."})]}),o.jsx(Se,{to:"/debate-grader",className:"px-6 py-3 rounded-lg text-white font-semibold hover:shadow-lg transition-all whitespace-nowrap",style:{backgroundColor:"#52796F"},children:"Try Debate Grader →"})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[o.jsxs("div",{className:"p-4 rounded-lg bg-gray-50",children:[o.jsx("h3",{className:"font-semibold text-gray-900 mb-1",children:"Harms Analysis"}),o.jsx("p",{className:"text-sm text-gray-600",children:"Evaluates whether the decision addresses a real problem and its severity."})]}),o.jsxs("div",{className:"p-4 rounded-lg bg-gray-50",children:[o.jsx("h3",{className:"font-semibold text-gray-900 mb-1",children:"Solvency Check"}),o.jsx("p",{className:"text-sm text-gray-600",children:"Assesses if the proposed solution will actually solve the identified problem."})]}),o.jsxs("div",{className:"p-4 rounded-lg bg-gray-50",children:[o.jsx("h3",{className:"font-semibold text-gray-900 mb-1",children:"Topicality Review"}),o.jsx("p",{className:"text-sm text-gray-600",children:"Determines if the decision is within the authority and scope of the body making it."})]})]})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-8 mb-8",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-6",children:"Understanding Truth Ratings"}),o.jsx("div",{className:"space-y-3",children:n.map(r=>{const i=r.icon;return o.jsxs("div",{className:`flex items-start gap-4 p-4 rounded-lg ${r.bgColor}`,children:[o.jsx(i,{className:`h-6 w-6 flex-shrink-0 ${r.color}`}),o.jsxs("div",{children:[o.jsx("h3",{className:`font-semibold ${r.color}`,children:r.type}),o.jsx("p",{className:"text-sm text-gray-700",children:r.description})]})]},r.type)})})]}),o.jsxs("div",{className:"mb-8",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-6",children:"Trusted Fact-Checking Resources"}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:e.map(r=>o.jsxs("a",{href:r.url,target:"_blank",rel:"noopener noreferrer",className:"bg-white rounded-lg shadow-sm p-6 hover:shadow-md transition-all group",children:[o.jsxs("div",{className:"flex items-start justify-between mb-4",children:[o.jsx("div",{className:"text-4xl",children:r.logo}),o.jsx(xb,{className:"h-5 w-5 text-gray-400 group-hover:text-gray-600"})]}),o.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2 group-hover:text-primary-600 transition-colors",children:r.name}),o.jsx("p",{className:"text-sm text-gray-600 mb-3",children:r.description}),o.jsx("div",{className:"flex items-center gap-2",children:o.jsx("span",{className:"text-xs px-3 py-1 rounded-full bg-gray-100 text-gray-700 font-medium",children:r.focus})})]},r.name))})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-8 mb-8",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-6",children:"How to Fact-Check Claims"}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:t.map(r=>{const i=r.icon;return o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"w-16 h-16 rounded-full mx-auto mb-4 flex items-center justify-center",style:{backgroundColor:"#CAD2C5"},children:o.jsx(i,{className:"h-8 w-8",style:{color:"#354F52"}})}),o.jsx("h3",{className:"font-semibold text-gray-900 mb-2",children:r.title}),o.jsx("p",{className:"text-sm text-gray-600",children:r.description})]},r.title)})})]}),o.jsxs("div",{className:"bg-gradient-to-r from-blue-50 to-indigo-50 rounded-lg p-8",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Tips for Critical Thinking"}),o.jsxs("div",{className:"space-y-3 text-gray-700",children:[o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("span",{className:"text-xl flex-shrink-0",children:"💡"}),o.jsxs("p",{children:[o.jsx("strong",{children:"Question the Source:"})," Who is making the claim? Do they have expertise or potential bias?"]})]}),o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("span",{className:"text-xl flex-shrink-0",children:"📊"}),o.jsxs("p",{children:[o.jsx("strong",{children:"Look for Data:"})," Are there statistics or studies backing up the claim? Are they from credible sources?"]})]}),o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("span",{className:"text-xl flex-shrink-0",children:"🔍"}),o.jsxs("p",{children:[o.jsx("strong",{children:"Check Multiple Sources:"})," Does the claim appear in multiple independent, reliable sources?"]})]}),o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("span",{className:"text-xl flex-shrink-0",children:"⏰"}),o.jsxs("p",{children:[o.jsx("strong",{children:"Consider Context:"})," Is the claim taken out of context? When was it made, and is it still relevant?"]})]}),o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("span",{className:"text-xl flex-shrink-0",children:"🤔"}),o.jsxs("p",{children:[o.jsx("strong",{children:"Beware of Bias:"})," Does the source have a political or financial incentive to make this claim?"]})]})]})]})]})})}function n0e(){var ye,je,ie,Ve,Re,ut,dt,Tt,pn,Gr,yi,Wn,nr,Gi,Io;const e=qc(),[t,n]=Ws(),[r,i]=N.useState(()=>t.get("q")||""),[a,s]=N.useState(()=>t.get("q")||""),[c,u]=N.useState(()=>{const X=t.get("types");if(X){const de=X.split(",").filter(Ae=>["contacts","organizations","causes","meetings"].includes(Ae.trim()));return de.length>0?de:["contacts","organizations","causes"]}return["contacts","organizations","causes"]}),[d,h]=N.useState(()=>t.get("state")||""),[m,p]=N.useState(()=>parseInt(t.get("page")||"1")),[v,_]=N.useState(!1),[x,y]=N.useState(!1),[w,b]=N.useState(()=>t.get("sort")||"relevance"),[j,E]=N.useState(()=>t.get("ntee")||""),[P,O]=N.useState(()=>{const X=t.get("jurisdiction_details");if(X)try{return JSON.parse(decodeURIComponent(X))}catch{return[]}return[]}),[C,A]=N.useState(()=>{const X=t.get("state");if(X)return X;const de=t.get("jurisdiction_details");if(de)try{const Ae=JSON.parse(decodeURIComponent(de));for(const Pt of Ae){if(Pt.state)return Pt.state;if(Pt.type==="State"||Pt.type==="state")return{Massachusetts:"MA",Alabama:"AL",Georgia:"GA",Washington:"WA",Wisconsin:"WI",California:"CA",Texas:"TX","New York":"NY",Florida:"FL"}[Pt.name]||Pt.name}}catch{}return""}),[T,$]=N.useState(new Set),[z,D]=N.useState(new Set),[Z,I]=N.useState(r),F=N.useRef(null);N.useEffect(()=>{const X=setTimeout(()=>{I(r)},300);return()=>clearTimeout(X)},[r]),N.useEffect(()=>{const X=t.get("q"),de=t.get("state"),Ae=t.get("types");t.get("page"),t.get("sort"),t.get("ntee");const Pt=t.get("jurisdiction_details");if(X&&(i(X),s(X)),de)h(de),A(de);else if(Pt)try{const sn=JSON.parse(decodeURIComponent(Pt));O(sn);for(const ln of sn){if(ln.state){A(ln.state);break}if(ln.type==="State"||ln.type==="state"){const Ks={Massachusetts:"MA",Alabama:"AL",Georgia:"GA",Washington:"WA",Wisconsin:"WI",California:"CA",Texas:"TX","New York":"NY",Florida:"FL"}[ln.name]||ln.name;A(Ks);break}}}catch{O([])}if(Ae){const sn=Ae.split(",").filter(ln=>["contacts","meetings","organizations","causes"].includes(ln.trim()));sn.length>0&&u(sn)}},[t,C]);const{data:B,isFetching:G}=zt({queryKey:["search-preview",Z,C],queryFn:async()=>{if(!Z||Z.length<2)return null;const X={q:Z,types:"causes,contacts,organizations",limit:3};return C&&(X.state=C),(await vt.get("/search/",{params:X})).data},enabled:Z.length>=2&&x,staleTime:5e3}),{data:R,isLoading:K,error:W}=zt({queryKey:["unified-search",a,c,d,m,w,j],queryFn:async()=>{if(!a&&!d&&!c.length)return null;const X={types:c.join(","),limit:20,page:m};return a&&(X.q=a),d&&(X.state=d),w&&w!=="relevance"&&(X.sort=w),j&&(X.ntee_code=j),(await vt.get("/search/",{params:X})).data},enabled:a&&a.length>=2||d!==""||c.length>0}),U=X=>{if(X==null||X.preventDefault(),r.trim().length>=2||d||c.length>0){s(r),y(!1),p(1);const de={};r.trim()&&(de.q=r),d&&(de.state=d),c.length>0&&c.length<5&&(de.types=c.join(",")),w&&w!=="relevance"&&(de.sort=w),j&&(de.ntee=j),n(de)}},Y=X=>{p(X);const de={};a&&(de.q=a),d&&(de.state=d),c.length>0&&c.length<5&&(de.types=c.join(",")),w&&w!=="relevance"&&(de.sort=w),j&&(de.ntee=j),X>1&&(de.page=X.toString()),n(de),window.scrollTo({top:0,behavior:"smooth"})},ne=X=>{s(r),y(!1),u([X]);const de={q:r};d&&(de.state=d),de.types=X,w&&w!=="relevance"&&(de.sort=w),j&&(de.ntee=j),n(de)},ae=X=>{const de=c.includes(X)?c.filter(Pt=>Pt!==X):[...c,X];u(de),p(1);const Ae={};a&&(Ae.q=a),d&&(Ae.state=d),de.length>0&&de.length<5&&(Ae.types=de.join(",")),w&&w!=="relevance"&&(Ae.sort=w),j&&(Ae.ntee=j),n(Ae)},ee=X=>{$(de=>{const Ae=new Set(de);return Ae.has(X)?Ae.delete(X):Ae.add(X),Ae})},ce=X=>{D(de=>{const Ae=new Set(de);return Ae.has(X)?Ae.delete(X):Ae.add(X),Ae})},Ne=X=>{switch(X){case"contact":return o.jsx($i,{className:"h-5 w-5"});case"meeting":return o.jsx(ha,{className:"h-5 w-5"});case"organization":return o.jsx(Ci,{className:"h-5 w-5"});case"cause":return o.jsx($t,{className:"h-5 w-5"});default:return null}},Ee=X=>{switch(X){case"contact":return"bg-blue-100 text-blue-700 border-blue-200";case"meeting":return"bg-green-100 text-green-700 border-green-200";case"organization":return"bg-purple-100 text-purple-700 border-purple-200";case"cause":return"bg-pink-100 text-pink-700 border-pink-200";default:return"bg-gray-100 text-gray-700 border-gray-200"}},se=({result:X})=>{var de,Ae,Pt,sn,ln;return o.jsx("div",{className:"bg-white rounded-lg border border-gray-200 p-4 hover:shadow-md transition-shadow",children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("div",{className:`p-2 rounded-lg border ${Ee(X.type)}`,children:Ne(X.type)}),o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-start justify-between gap-2",children:[o.jsxs("div",{className:"flex-1",children:[o.jsx("h3",{onClick:()=>e(X.url),className:"font-semibold text-gray-900 cursor-pointer hover:text-blue-600 mb-1",children:X.title}),o.jsx("p",{className:"text-sm text-gray-600 mb-2",children:X.subtitle})]}),X.type==="organization"&&((de=X.metadata)!=null&&de.logo_url?o.jsx("img",{src:X.metadata.logo_url,alt:X.title,className:"w-12 h-12 rounded object-contain flex-shrink-0 bg-gray-100 border border-gray-200",onError:xi=>{xi.currentTarget.style.display="none";const Ks=xi.currentTarget.nextElementSibling;Ks&&(Ks.style.display="flex")}}):null),X.type==="organization"&&o.jsx("div",{className:"w-12 h-12 rounded flex items-center justify-center text-white text-lg font-bold flex-shrink-0",style:{backgroundColor:"#52796F",display:(Ae=X.metadata)!=null&&Ae.logo_url?"none":"flex"},children:X.title.charAt(0)})]}),o.jsx("p",{className:"text-sm text-gray-500 line-clamp-2 mb-2",children:X.description}),X.type==="organization"&&((Pt=X.metadata)==null?void 0:Pt.mission)&&o.jsx("div",{className:"mt-2 mb-2 p-3 bg-blue-50 border-l-4 border-blue-400 rounded",children:o.jsxs("p",{className:"text-sm text-gray-700 italic",children:[o.jsx("span",{className:"font-semibold text-blue-900",children:"Mission: "}),X.metadata.mission]})}),X.type==="organization"&&((sn=X.metadata)==null?void 0:sn.website)&&o.jsxs("a",{href:X.metadata.website,target:"_blank",rel:"noopener noreferrer",onClick:xi=>xi.stopPropagation(),className:"text-sm text-blue-600 hover:text-blue-800 hover:underline inline-flex items-center gap-1 mb-2",children:["🔗 ",X.metadata.website]}),X.type==="organization"&&X.metadata&&o.jsxs("div",{className:"mt-2 flex flex-wrap gap-2 text-xs",children:[X.metadata.ein&&o.jsxs("span",{className:"px-2 py-1 bg-gray-100 text-gray-700 rounded",children:["EIN: ",X.metadata.ein]}),X.metadata.revenue&&X.metadata.revenue>0&&o.jsxs("span",{className:"px-2 py-1 bg-green-100 text-green-700 rounded",children:["💰 Revenue: ",oi(X.metadata.revenue),X.metadata.tax_year&&` (${X.metadata.tax_year})`]}),X.metadata.assets&&X.metadata.assets>0&&o.jsxs("span",{className:"px-2 py-1 bg-blue-100 text-blue-700 rounded",children:["📊 Assets: ",oi(X.metadata.assets),X.metadata.tax_year&&` (${X.metadata.tax_year})`]}),X.metadata.causes&&X.metadata.causes.length>0&&o.jsxs("span",{className:"px-2 py-1 bg-purple-100 text-purple-700 rounded",children:["🏷️ ",X.metadata.causes.slice(0,3).join(", ")]})]}),X.type==="organization"&&((ln=X.metadata)==null?void 0:ln.ein)&&o.jsxs("div",{className:"mt-3",children:[o.jsxs("button",{onClick:xi=>{xi.stopPropagation(),ce(X.metadata.ein)},className:"flex items-center gap-2 text-sm text-gray-600 hover:text-gray-900 font-medium",children:[z.has(X.metadata.ein)?o.jsx(wb,{className:"h-4 w-4"}):o.jsx(Vd,{className:"h-4 w-4"}),z.has(X.metadata.ein)?"Hide":"Show"," Details"]}),z.has(X.metadata.ein)&&o.jsxs("div",{className:"mt-3 space-y-3 border-t pt-3",children:[o.jsxs("div",{children:[o.jsxs("h4",{className:"text-sm font-semibold text-gray-700 mb-2 flex items-center gap-1",children:["💰 Financial Information",X.metadata.tax_year&&o.jsxs("span",{className:"text-xs text-gray-500 font-normal",children:["(Tax Year ",X.metadata.tax_year,")"]})]}),!X.metadata.revenue&&!X.metadata.assets&&!X.metadata.income?o.jsxs("div",{className:"bg-amber-50 p-4 rounded border border-amber-200 text-sm",children:[o.jsx("p",{className:"text-amber-800 mb-2",children:o.jsx("span",{className:"font-semibold",children:"📊 Form 990 data not yet available"})}),o.jsxs("p",{className:"text-amber-700 text-xs",children:["Financial information from IRS Form 990 filings is being enriched. Check back later or visit"," ",o.jsx("a",{href:`https://projects.propublica.org/nonprofits/organizations/${X.metadata.ein}`,target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-amber-900",children:"ProPublica Nonprofit Explorer"})," ","for current data."]})]}):o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3 text-sm",children:[o.jsxs("div",{className:"bg-green-50 p-3 rounded border border-green-200",children:[o.jsx("div",{className:"text-xs text-green-700 font-medium mb-1",children:"Total Revenue"}),o.jsx("div",{className:"text-lg font-bold text-green-900",children:X.metadata.revenue!==null&&X.metadata.revenue!==void 0?oi(X.metadata.revenue):o.jsx("span",{className:"text-sm text-gray-500",children:"Pending"})})]}),o.jsxs("div",{className:"bg-blue-50 p-3 rounded border border-blue-200",children:[o.jsx("div",{className:"text-xs text-blue-700 font-medium mb-1",children:"Total Assets"}),o.jsx("div",{className:"text-lg font-bold text-blue-900",children:X.metadata.assets!==null&&X.metadata.assets!==void 0?oi(X.metadata.assets):o.jsx("span",{className:"text-sm text-gray-500",children:"Pending"})})]}),o.jsxs("div",{className:"bg-purple-50 p-3 rounded border border-purple-200",children:[o.jsx("div",{className:"text-xs text-purple-700 font-medium mb-1",children:"Net Income"}),o.jsx("div",{className:"text-lg font-bold text-purple-900",children:X.metadata.income!==null&&X.metadata.income!==void 0?oi(X.metadata.income):o.jsx("span",{className:"text-sm text-gray-500",children:"Pending"})})]})]})]}),o.jsxs("div",{children:[o.jsx("h4",{className:"text-sm font-semibold text-gray-700 mb-2 flex items-center gap-1",children:"👥 Board Members"}),o.jsx("div",{className:"bg-gray-50 p-3 rounded border border-gray-200 text-sm text-gray-600",children:"Board member information coming soon"})]}),o.jsxs("div",{children:[o.jsx("h4",{className:"text-sm font-semibold text-gray-700 mb-2 flex items-center gap-1",children:"📜 Recent Grants"}),o.jsx("div",{className:"bg-gray-50 p-3 rounded border border-gray-200 text-sm text-gray-600",children:"Grant information coming soon"})]})]})]}),o.jsx("div",{className:"mt-2",children:o.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${Ee(X.type)}`,children:[Ne(X.type),X.type.charAt(0).toUpperCase()+X.type.slice(1)]})})]})]})})};return o.jsx("div",{className:"min-h-screen bg-gray-50",children:o.jsxs("div",{className:"max-w-6xl mx-auto px-6 pb-6",children:[o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6 mb-6",children:[o.jsx("h1",{className:"text-3xl font-bold text-gray-900 mb-4",children:"Search"}),o.jsxs("form",{onSubmit:U,className:"relative",children:[o.jsxs("div",{className:"relative",children:[o.jsx("input",{ref:F,type:"text",value:r,onChange:X=>{i(X.target.value),y(!0)},onFocus:()=>y(!0),onBlur:()=>setTimeout(()=>y(!1),200),placeholder:"Search for people, meetings, organizations, causes...",className:"w-full px-12 py-3 border-2 border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent text-lg text-gray-900"}),o.jsx(nn,{className:"absolute left-4 top-3.5 h-6 w-6 text-gray-400"}),r&&o.jsx("button",{type:"button",onClick:()=>{var X;i(""),s(""),(X=F.current)==null||X.focus()},className:"absolute right-4 top-3.5 text-gray-400 hover:text-gray-600",children:o.jsx(Cr,{className:"h-6 w-6"})})]}),x&&r.length>=2&&o.jsxs("div",{className:"absolute z-10 w-full mt-2 bg-white border border-gray-200 rounded-lg shadow-xl max-h-96 overflow-y-auto",children:[(G||r!==Z)&&o.jsxs("div",{className:"px-4 py-8 text-center",children:[o.jsx("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600 mb-2"}),o.jsx("p",{className:"text-sm text-gray-600",children:"Searching..."})]}),!G&&r===Z&&B&&B.total_results>0&&o.jsxs(o.Fragment,{children:[B.results.causes.length>0&&o.jsxs("div",{className:"border-b border-gray-200",children:[o.jsxs("div",{className:"px-4 py-2 bg-gray-50 flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx($t,{className:"h-4 w-4 text-gray-500"}),o.jsx("span",{className:"text-xs font-semibold text-gray-700 uppercase",children:"Causes"})]}),B.results.causes.length>0&&o.jsx("button",{onClick:()=>ne("causes"),className:"text-xs text-primary-600 hover:text-primary-700 font-medium",children:"View All"})]}),B.results.causes.slice(0,3).map((X,de)=>o.jsxs("button",{onClick:()=>e(X.url),className:"w-full text-left px-4 py-2 hover:bg-gray-50 flex items-start gap-3 transition-colors",children:[o.jsx($t,{className:"h-5 w-5 text-gray-600 mt-0.5 flex-shrink-0"}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"font-medium text-gray-900 truncate",children:X.title}),o.jsx("div",{className:"text-sm text-gray-600 truncate",children:X.subtitle})]})]},de))]}),B.results.contacts.length>0&&o.jsxs("div",{className:"border-b border-gray-200",children:[o.jsxs("div",{className:"px-4 py-2 bg-gray-50 flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx($i,{className:"h-4 w-4 text-gray-500"}),o.jsx("span",{className:"text-xs font-semibold text-gray-700 uppercase",children:"People"})]}),B.results.contacts.length>0&&o.jsx("button",{onClick:()=>ne("contacts"),className:"text-xs text-primary-600 hover:text-primary-700 font-medium",children:"View All"})]}),B.results.contacts.slice(0,3).map((X,de)=>o.jsxs("button",{onClick:()=>e(X.url),className:"w-full text-left px-4 py-2 hover:bg-gray-50 flex items-start gap-3 transition-colors",children:[o.jsx($i,{className:"h-5 w-5 text-gray-600 mt-0.5 flex-shrink-0"}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"font-medium text-gray-900 truncate",children:X.title}),o.jsx("div",{className:"text-sm text-gray-600 truncate",children:X.subtitle})]})]},de))]}),B.results.organizations.length>0&&o.jsxs("div",{children:[o.jsxs("div",{className:"px-4 py-2 bg-gray-50 flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ci,{className:"h-4 w-4 text-gray-500"}),o.jsx("span",{className:"text-xs font-semibold text-gray-700 uppercase",children:"Organizations"})]}),B.results.organizations.length>0&&o.jsx("button",{onClick:()=>ne("organizations"),className:"text-xs text-primary-600 hover:text-primary-700 font-medium",children:"View All"})]}),B.results.organizations.slice(0,3).map((X,de)=>{var Ae,Pt;return o.jsxs("button",{onClick:()=>e(X.url),className:"w-full text-left px-4 py-2 hover:bg-gray-50 flex items-start gap-3 transition-colors last:rounded-b-lg",children:[(Ae=X.metadata)!=null&&Ae.logo_url?o.jsx("img",{src:X.metadata.logo_url,alt:X.title,className:"h-10 w-10 rounded object-contain flex-shrink-0 bg-gray-100 border border-gray-200",onError:sn=>{sn.currentTarget.style.display="none";const ln=sn.currentTarget.nextElementSibling;ln&&(ln.style.display="flex")}}):null,o.jsx("div",{className:"h-10 w-10 rounded flex items-center justify-center text-white text-sm font-bold flex-shrink-0",style:{backgroundColor:"#52796F",display:(Pt=X.metadata)!=null&&Pt.logo_url?"none":"flex"},children:X.title.charAt(0)}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"font-medium text-gray-900 truncate",children:X.title}),o.jsx("div",{className:"text-sm text-gray-600 truncate",children:X.subtitle})]})]},de)})]}),o.jsx("div",{className:"px-4 py-2 bg-gray-50 text-center border-t border-gray-200",children:o.jsxs("button",{onClick:()=>U(),className:"text-sm text-primary-600 hover:text-primary-700 font-medium",children:["See all ",B.total_results," results →"]})})]}),!G&&r===Z&&B&&B.total_results===0&&o.jsxs("div",{className:"px-4 py-8 text-center",children:[o.jsxs("p",{className:"text-gray-600",children:['No results found for "',r,'"']}),o.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Try a different search term"})]})]})]}),o.jsxs("div",{className:"mt-4 flex items-center gap-3 flex-wrap",children:[o.jsxs("button",{onClick:()=>_(!v),className:`flex items-center gap-2 px-4 py-2 rounded-lg border-2 transition-colors ${v?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-300 text-gray-700 hover:border-gray-400 hover:bg-gray-50"}`,children:[o.jsx(jA,{className:"h-5 w-5"}),"Filters",(d||w!=="relevance"||j)&&o.jsx("span",{className:"ml-1 px-2 py-0.5 bg-primary-600 text-white text-xs rounded-full",children:[d,w!=="relevance"?"sorted":null,j].filter(Boolean).length})]}),["contacts","organizations","causes","meetings"].map(X=>o.jsxs("button",{onClick:()=>ae(X),className:`flex items-center gap-2 px-4 py-2 rounded-full border-2 transition-all ${c.includes(X)?`${Ee(X)} border-current font-medium shadow-sm`:"border-gray-300 bg-white text-gray-600 hover:border-gray-400 hover:bg-gray-50"}`,children:[c.includes(X)&&o.jsx(bb,{className:"h-4 w-4 flex-shrink-0"}),Ne(X),X.charAt(0).toUpperCase()+X.slice(1)]},X))]}),(d||w!=="relevance"||j||P.length>0)&&o.jsxs("div",{className:"mt-3 flex items-center gap-2 flex-wrap",children:[o.jsx("span",{className:"text-sm text-gray-600",children:"Active filters:"}),d&&o.jsxs("span",{className:"inline-flex items-center gap-1 px-3 py-1 bg-blue-100 text-blue-800 rounded-full text-sm",children:["State: ",d,o.jsx("button",{onClick:()=>{h(""),setTimeout(()=>U(),0)},className:"hover:bg-blue-200 rounded-full p-0.5",children:o.jsx(Cr,{className:"h-3 w-3"})})]}),P.length>0&&o.jsxs("span",{className:"inline-flex items-center gap-1 px-3 py-1 bg-teal-100 text-teal-800 rounded-full text-sm",children:[o.jsx(Rn,{className:"h-3 w-3"}),P.length," Jurisdictions",o.jsx("button",{onClick:()=>{O([]);const X=new URLSearchParams(window.location.search);X.delete("jurisdiction_details"),n(X)},className:"hover:bg-teal-200 rounded-full p-0.5",children:o.jsx(Cr,{className:"h-3 w-3"})})]}),w!=="relevance"&&o.jsxs("span",{className:"inline-flex items-center gap-1 px-3 py-1 bg-purple-100 text-purple-800 rounded-full text-sm",children:["Sort: ",w==="name-asc"?"Name A-Z":w==="name-desc"?"Name Z-A":w==="revenue-desc"?"Revenue ↓":w==="revenue-asc"?"Revenue ↑":w==="assets-desc"?"Assets ↓":w==="assets-asc"?"Assets ↑":w,o.jsx("button",{onClick:()=>{b("relevance"),setTimeout(()=>U(),0)},className:"hover:bg-purple-200 rounded-full p-0.5",children:o.jsx(Cr,{className:"h-3 w-3"})})]}),j&&o.jsxs("span",{className:"inline-flex items-center gap-1 px-3 py-1 bg-green-100 text-green-800 rounded-full text-sm",children:["Category: ",j,o.jsx("button",{onClick:()=>{E(""),setTimeout(()=>U(),0)},className:"hover:bg-green-200 rounded-full p-0.5",children:o.jsx(Cr,{className:"h-3 w-3"})})]})]}),v&&o.jsxs("div",{className:"mt-4 p-4 bg-gray-50 rounded-lg border border-gray-200",children:[o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"State"}),o.jsxs("select",{value:d,onChange:X=>{h(X.target.value),p(1),setTimeout(()=>U(),0)},className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 text-gray-900 bg-white",children:[o.jsx("option",{value:"",className:"text-gray-900",children:"All States"}),o.jsx("option",{value:"AL",className:"text-gray-900",children:"Alabama"}),o.jsx("option",{value:"GA",className:"text-gray-900",children:"Georgia"}),o.jsx("option",{value:"MA",className:"text-gray-900",children:"Massachusetts"}),o.jsx("option",{value:"WA",className:"text-gray-900",children:"Washington"}),o.jsx("option",{value:"WI",className:"text-gray-900",children:"Wisconsin"})]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Sort By"}),o.jsxs("select",{value:w,onChange:X=>{b(X.target.value),p(1),setTimeout(()=>U(),0)},className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 text-gray-900 bg-white",children:[o.jsx("option",{value:"relevance",className:"text-gray-900",children:"Relevance"}),o.jsx("option",{value:"name-asc",className:"text-gray-900",children:"Name (A-Z)"}),o.jsx("option",{value:"name-desc",className:"text-gray-900",children:"Name (Z-A)"}),o.jsx("option",{value:"revenue-desc",className:"text-gray-900",children:"Revenue (High to Low)"}),o.jsx("option",{value:"revenue-asc",className:"text-gray-900",children:"Revenue (Low to High)"}),o.jsx("option",{value:"assets-desc",className:"text-gray-900",children:"Assets (High to Low)"}),o.jsx("option",{value:"assets-asc",className:"text-gray-900",children:"Assets (Low to High)"})]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Category (NTEE)"}),o.jsxs("select",{value:j,onChange:X=>{E(X.target.value),p(1),setTimeout(()=>U(),0)},className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 text-gray-900 bg-white",disabled:!c.includes("organizations"),children:[o.jsx("option",{value:"",className:"text-gray-900",children:"All Categories"}),o.jsx("option",{value:"A",className:"text-gray-900",children:"Arts & Culture"}),o.jsx("option",{value:"B",className:"text-gray-900",children:"Education"}),o.jsx("option",{value:"C",className:"text-gray-900",children:"Environment"}),o.jsx("option",{value:"D",className:"text-gray-900",children:"Animal-Related"}),o.jsx("option",{value:"E",className:"text-gray-900",children:"Health"}),o.jsx("option",{value:"F",className:"text-gray-900",children:"Mental Health"}),o.jsx("option",{value:"G",className:"text-gray-900",children:"Diseases"}),o.jsx("option",{value:"H",className:"text-gray-900",children:"Medical Research"}),o.jsx("option",{value:"I",className:"text-gray-900",children:"Crime & Legal"}),o.jsx("option",{value:"J",className:"text-gray-900",children:"Employment"}),o.jsx("option",{value:"K",className:"text-gray-900",children:"Food & Agriculture"}),o.jsx("option",{value:"L",className:"text-gray-900",children:"Housing"}),o.jsx("option",{value:"M",className:"text-gray-900",children:"Public Safety"}),o.jsx("option",{value:"N",className:"text-gray-900",children:"Recreation & Sports"}),o.jsx("option",{value:"O",className:"text-gray-900",children:"Youth Development"}),o.jsx("option",{value:"P",className:"text-gray-900",children:"Human Services"}),o.jsx("option",{value:"Q",className:"text-gray-900",children:"International"}),o.jsx("option",{value:"R",className:"text-gray-900",children:"Civil Rights"}),o.jsx("option",{value:"S",className:"text-gray-900",children:"Community"}),o.jsx("option",{value:"T",className:"text-gray-900",children:"Philanthropy"}),o.jsx("option",{value:"U",className:"text-gray-900",children:"Science"}),o.jsx("option",{value:"V",className:"text-gray-900",children:"Social Science"}),o.jsx("option",{value:"W",className:"text-gray-900",children:"Public Affairs"}),o.jsx("option",{value:"X",className:"text-gray-900",children:"Religion"}),o.jsx("option",{value:"Y",className:"text-gray-900",children:"Mutual Benefit"})]})]})]}),o.jsx("div",{className:"mt-4",children:o.jsx("button",{onClick:()=>{h(""),b("relevance"),E(""),setTimeout(()=>U(),0)},className:"px-4 py-2 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300 transition-colors",children:"Clear All Filters"})})]})]}),(a||d||R)&&o.jsxs("div",{children:[K&&o.jsxs("div",{className:"text-center py-12",children:[o.jsx("div",{className:"inline-block animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"}),o.jsx("p",{className:"mt-4 text-gray-600",children:"Searching..."})]}),W&&o.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-6 text-center",children:o.jsx("p",{className:"text-red-600",children:"Error loading search results. Please try again."})}),R&&R.total_results!==void 0&&R.pagination&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"mb-6",children:[o.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:R.query?o.jsxs(o.Fragment,{children:[R.total_results.toLocaleString(),' results for "',R.query,'"',R.total_results>0&&o.jsxs("span",{className:"text-base font-normal text-gray-600 ml-2",children:["(showing ",R.pagination.offset+1,"-",Math.min(R.pagination.offset+R.pagination.limit,R.total_results),")"]})]}):o.jsxs(o.Fragment,{children:[R.total_results.toLocaleString()," results",R.total_results>0&&o.jsxs("span",{className:"text-base font-normal text-gray-600 ml-2",children:["(showing ",R.pagination.offset+1,"-",Math.min(R.pagination.offset+R.pagination.limit,R.total_results),")"]})]})}),d&&o.jsxs("p",{className:"text-sm text-gray-600 mt-1",children:["Filtered by state: ",d]})]}),P.length>0&&o.jsxs("div",{className:"mb-6 p-6 bg-gradient-to-br from-teal-50 to-blue-50 rounded-xl border border-teal-200",children:[o.jsxs("h3",{className:"text-lg font-semibold text-gray-900 mb-3 flex items-center gap-2",children:[o.jsx(Rn,{className:"h-6 w-6 text-teal-600"}),"Your Jurisdictions"]}),o.jsxs("p",{className:"text-sm text-gray-600 mb-4",children:["When you select a city, you're connected to ",P.length," levels of government:"]}),o.jsx("div",{className:"space-y-3",children:P.map((X,de)=>{const Ae=T.has(de);return o.jsxs("div",{className:"bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden transition-all duration-200 hover:shadow-md",children:[o.jsxs("button",{onClick:()=>ee(de),className:"w-full flex items-center justify-between p-4 text-left hover:bg-gray-50 transition-colors",children:[o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"font-semibold text-gray-900",children:X.type}),o.jsx("span",{className:"text-gray-400",children:"•"}),o.jsx("span",{className:"text-gray-700",children:X.name})]}),!Ae&&o.jsx("div",{className:"text-sm text-gray-500 mt-1",children:"Click to view details and discover data sources"})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(bb,{className:"h-5 w-5 text-green-600 flex-shrink-0"}),Ae?o.jsx(wb,{className:"h-5 w-5 text-gray-400 flex-shrink-0"}):o.jsx(Vd,{className:"h-5 w-5 text-gray-400 flex-shrink-0"})]})]}),Ae&&o.jsx("div",{className:"px-4 pb-4 border-t border-gray-100 bg-gray-50",children:o.jsxs("div",{className:"mt-4 space-y-3",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsxs("div",{children:[o.jsx("div",{className:"text-xs font-medium text-gray-500 uppercase tracking-wide mb-1",children:"Type"}),o.jsx("div",{className:"text-sm text-gray-900",children:X.type})]}),o.jsxs("div",{children:[o.jsx("div",{className:"text-xs font-medium text-gray-500 uppercase tracking-wide mb-1",children:"Name"}),o.jsx("div",{className:"text-sm text-gray-900",children:X.name})]}),X.count!==void 0&&o.jsxs("div",{children:[o.jsx("div",{className:"text-xs font-medium text-gray-500 uppercase tracking-wide mb-1",children:"Count"}),o.jsx("div",{className:"text-sm text-gray-900",children:X.count.toLocaleString()})]})]}),o.jsx("div",{className:"pt-3 border-t border-gray-200",children:o.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("div",{className:"flex-shrink-0",children:o.jsx(_b,{className:"h-5 w-5 text-blue-600"})}),o.jsxs("div",{className:"flex-1",children:[o.jsx("h4",{className:"text-sm font-semibold text-blue-900 mb-1",children:"Automated Data Discovery"}),o.jsx("p",{className:"text-xs text-blue-700 mb-3",children:"Automatically find official websites, meeting agendas, YouTube channels, and social media for this jurisdiction."}),o.jsxs("button",{onClick:Pt=>{Pt.stopPropagation();const sn=`${X.name} ${X.type}`;e(`/discovery?q=${encodeURIComponent(sn)}&jurisdiction=${encodeURIComponent(X.name)}`)},className:"inline-flex items-center gap-2 px-4 py-2 bg-blue-600 text-white text-sm font-medium rounded-lg hover:bg-blue-700 transition-colors",children:[o.jsx(nn,{className:"h-4 w-4"}),"Discover Data Sources"]})]})]})})}),o.jsxs("div",{className:"pt-3 border-t border-gray-200",children:[o.jsx("div",{className:"text-xs font-medium text-gray-500 uppercase tracking-wide mb-2",children:"What We'll Discover"}),o.jsxs("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[o.jsxs("div",{className:"flex items-center gap-2 text-gray-700",children:[o.jsx(_b,{className:"h-4 w-4 text-gray-400"}),"Official Website"]}),o.jsxs("div",{className:"flex items-center gap-2 text-gray-700",children:[o.jsx(ha,{className:"h-4 w-4 text-gray-400"}),"Meeting Agendas"]}),o.jsxs("div",{className:"flex items-center gap-2 text-gray-700",children:[o.jsx(AA,{className:"h-4 w-4 text-gray-400"}),"YouTube Channels"]}),o.jsxs("div",{className:"flex items-center gap-2 text-gray-700",children:[o.jsx(Ci,{className:"h-4 w-4 text-gray-400"}),"Social Media"]})]})]})]})})]},de)})}),o.jsx("div",{className:"mt-4 p-4 bg-blue-100 rounded-lg",children:o.jsxs("p",{className:"text-sm text-blue-900",children:[o.jsx("strong",{children:"💡 Why this matters:"})," Each jurisdiction has its own meetings, budgets, and leaders that affect your daily life. Track all of them in one place."]})})]}),c.includes("contacts")&&((ye=R.results)==null?void 0:ye.contacts)&&R.results.contacts.length>0&&o.jsxs("div",{className:"mb-8",children:[o.jsxs("h3",{className:"text-lg font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[o.jsx($i,{className:"h-6 w-6 text-blue-600"}),"People (",((ie=(je=R.type_totals)==null?void 0:je.contacts)==null?void 0:ie.toLocaleString())||R.results.contacts.length,")"]}),o.jsx("div",{className:"grid grid-cols-1 gap-4",children:R.results.contacts.map((X,de)=>o.jsx(se,{result:X},de))})]}),c.includes("meetings")&&((Ve=R.results)==null?void 0:Ve.meetings)&&R.results.meetings.length>0&&o.jsxs("div",{className:"mb-8",children:[o.jsxs("h3",{className:"text-lg font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[o.jsx(ha,{className:"h-6 w-6 text-green-600"}),"Meetings (",((ut=(Re=R.type_totals)==null?void 0:Re.meetings)==null?void 0:ut.toLocaleString())||R.results.meetings.length,")"]}),o.jsx("div",{className:"grid grid-cols-1 gap-4",children:R.results.meetings.map((X,de)=>o.jsx(se,{result:X},de))})]}),c.includes("organizations")&&((dt=R.results)==null?void 0:dt.organizations)&&R.results.organizations.length>0&&o.jsxs("div",{className:"mb-8",children:[o.jsxs("h3",{className:"text-lg font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[o.jsx(Ci,{className:"h-6 w-6 text-purple-600"}),"Organizations (",((pn=(Tt=R.type_totals)==null?void 0:Tt.organizations)==null?void 0:pn.toLocaleString())||R.results.organizations.length,")"]}),o.jsx("div",{className:"grid grid-cols-1 gap-4",children:R.results.organizations.map((X,de)=>o.jsx(se,{result:X},de))})]}),c.includes("causes")&&((Gr=R.results)==null?void 0:Gr.causes)&&R.results.causes.length>0&&o.jsxs("div",{className:"mb-8",children:[o.jsxs("h3",{className:"text-lg font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[o.jsx($t,{className:"h-6 w-6 text-pink-600"}),"Causes (",((Wn=(yi=R.type_totals)==null?void 0:yi.causes)==null?void 0:Wn.toLocaleString())||R.results.causes.length,")"]}),o.jsx("div",{className:"grid grid-cols-1 gap-4",children:R.results.causes.map((X,de)=>o.jsx(se,{result:X},de))})]}),c.includes("jurisdictions")&&((nr=R.results)==null?void 0:nr.jurisdictions)&&R.results.jurisdictions.length>0&&o.jsxs("div",{className:"mb-8",children:[o.jsxs("h3",{className:"text-lg font-semibold text-gray-900 mb-4 flex items-center gap-2",children:[o.jsx(Rn,{className:"h-6 w-6 text-orange-600"}),"Jurisdictions (",((Io=(Gi=R.type_totals)==null?void 0:Gi.jurisdictions)==null?void 0:Io.toLocaleString())||R.results.jurisdictions.length,")"]}),o.jsx("div",{className:"grid grid-cols-1 gap-4",children:R.results.jurisdictions.map((X,de)=>o.jsx(se,{result:X},de))})]}),R.total_results===0&&o.jsxs("div",{className:"text-center py-12 bg-white rounded-lg border border-gray-200",children:[o.jsx(nn,{className:"h-16 w-16 text-gray-300 mx-auto mb-4"}),o.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:"No results found"}),o.jsx("p",{className:"text-gray-600",children:"Try different keywords or adjust your filters"})]}),R.total_results>0&&R.pagination.total_pages>1&&o.jsxs("div",{className:"mt-8 flex items-center justify-between bg-white rounded-lg border border-gray-200 p-4",children:[o.jsxs("div",{className:"text-sm text-gray-600",children:["Page ",R.pagination.page," of ",R.pagination.total_pages,o.jsx("span",{className:"ml-2",children:"•"}),o.jsxs("span",{className:"ml-2",children:[R.total_results," total results"]})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{onClick:()=>Y(R.pagination.page-1),disabled:!R.pagination.has_prev,className:`px-4 py-2 rounded-lg font-medium transition-colors ${R.pagination.has_prev?"bg-primary-600 text-white hover:bg-primary-700":"bg-gray-100 text-gray-400 cursor-not-allowed"}`,children:"← Previous"}),o.jsx("div",{className:"flex items-center gap-1",children:Array.from({length:Math.min(5,R.pagination.total_pages)},(X,de)=>{const Ae=Math.max(1,Math.min(R.pagination.page-2+de,R.pagination.total_pages-4))+Math.min(de,4);return Ae>R.pagination.total_pages?null:o.jsx("button",{onClick:()=>Y(Ae),className:`px-3 py-1 rounded ${Ae===R.pagination.page?"bg-primary-600 text-white font-semibold":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,children:Ae},Ae)})}),o.jsx("button",{onClick:()=>Y(R.pagination.page+1),disabled:!R.pagination.has_next,className:`px-4 py-2 rounded-lg font-medium transition-colors ${R.pagination.has_next?"bg-primary-600 text-white hover:bg-primary-700":"bg-gray-100 text-gray-400 cursor-not-allowed"}`,children:"Next →"})]})]})]})]}),!a&&o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-8",children:[(d||c.length<5)&&o.jsxs("div",{className:"mb-6 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[o.jsxs("p",{className:"text-blue-800 font-medium",children:[d&&`State filter: ${d}`,d&&c.length<5&&" • ",c.length<5&&`Type filter: ${c.join(", ")}`]}),o.jsx("p",{className:"text-blue-700 text-sm mt-1",children:"Enter a search query above to see results with these filters applied."})]}),o.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-6",children:"Try searching for:"}),o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[{query:"dental health",icon:$t,description:"Find organizations and meetings about dental health"},{query:"affordable housing",icon:Ci,description:"Discover housing-related initiatives"},{query:"school board",icon:ha,description:"View school board meetings and decisions"},{query:"mental health",icon:$t,description:"Explore mental health programs and services"}].map((X,de)=>o.jsxs("button",{onClick:()=>{i(X.query),s(X.query)},className:"text-left p-4 border-2 border-gray-200 rounded-lg hover:border-primary-500 hover:bg-primary-50 transition-colors",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[o.jsx(X.icon,{className:"h-6 w-6 text-primary-600"}),o.jsx("span",{className:"font-semibold text-gray-900",children:X.query})]}),o.jsx("p",{className:"text-sm text-gray-600",children:X.description})]},de))})]})]})})}function r0e({jurisdiction:e}){var i,a,s,c,u;const[t,n]=N.useState(!1),r=e.website||((i=e.youtube_channels)==null?void 0:i.length)||e.facebook;return o.jsxs("div",{className:"border border-gray-200 rounded-lg bg-white hover:shadow-md transition-shadow",children:[o.jsx("div",{className:"p-4",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(ci,{className:"h-5 w-5 text-green-600"}),o.jsxs("h3",{className:"font-bold text-gray-900 uppercase",children:[e.name,", ",e.state," - DISCOVERY COMPLETE!"]})]}),o.jsxs("div",{className:"mt-2 flex flex-wrap gap-3 text-sm text-gray-600",children:[e.website&&o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx(_b,{className:"h-4 w-4"}),"Website"]}),e.youtube_channels&&e.youtube_channels.length>0&&o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx(AA,{className:"h-4 w-4"}),e.youtube_channels.length," YouTube Channel",e.youtube_channels.length>1?"s":""]}),e.agenda_portal&&o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx(Ao,{className:"h-4 w-4"}),"Agenda Portal"]}),(e.facebook||e.twitter)&&o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx(gz,{className:"h-4 w-4"}),"Social Media"]})]}),r&&o.jsxs("div",{className:"mt-3",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"flex-1 bg-gray-200 rounded-full h-2",children:o.jsx("div",{className:"bg-green-600 h-2 rounded-full transition-all",style:{width:`${e.completeness}%`}})}),o.jsxs("span",{className:"text-sm font-medium text-gray-700",children:[e.completeness,"%"]})]}),o.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:["Completeness: ~",Math.round(e.completeness),"% - ",e.completeness>=75?"Good":e.completeness>=50?"Fair":"Limited"," digital infrastructure!"]})]})]}),r&&o.jsx("button",{onClick:()=>n(!t),className:"ml-4 p-2 hover:bg-gray-100 rounded-lg transition-colors",children:t?o.jsx(wb,{className:"h-5 w-5 text-gray-600"}):o.jsx(Vd,{className:"h-5 w-5 text-gray-600"})})]})}),t&&r&&o.jsxs("div",{className:"border-t border-gray-200 p-4 bg-gray-50",children:[o.jsxs("h4",{className:"text-lg font-bold text-gray-900 mb-4",children:["🎯 ",e.name.toUpperCase(),", ",e.state," FINDINGS"]}),o.jsxs("div",{className:"space-y-4",children:[e.website&&o.jsxs("div",{children:[o.jsx("h5",{className:"font-semibold text-gray-700 mb-2",children:"🌐 Official Website:"}),o.jsxs("a",{href:e.website,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline flex items-center gap-2",children:["✅ ",e.website]})]}),e.agenda_portal&&o.jsxs("div",{children:[o.jsx("h5",{className:"font-semibold text-gray-700 mb-2",children:"📄 Meeting/Agenda Portal:"}),o.jsxs("a",{href:e.agenda_portal,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline flex items-center gap-2",children:["✅ ",e.agenda_portal]})]}),e.youtube_channels&&e.youtube_channels.length>0&&o.jsxs("div",{children:[o.jsx("h5",{className:"font-semibold text-gray-700 mb-2",children:"📺 YouTube Channels:"}),e.youtube_channels.map((d,h)=>o.jsxs("div",{className:"ml-4 text-blue-600 hover:underline",children:["✅ @",d]},h))]}),(e.facebook||e.twitter)&&o.jsxs("div",{children:[o.jsx("h5",{className:"font-semibold text-gray-700 mb-2",children:"📱 Social Media:"}),o.jsxs("div",{className:"ml-4 space-y-1",children:[e.facebook&&o.jsxs("div",{className:"text-blue-600",children:["✅ Facebook: ",e.facebook]}),e.twitter&&o.jsxs("div",{className:"text-blue-600",children:["✅ Twitter: ",e.twitter]})]})]}),e.meeting_platform&&o.jsxs("div",{children:[o.jsx("h5",{className:"font-semibold text-gray-700 mb-2",children:"🏛️ Meeting Platform:"}),o.jsx("div",{className:"ml-4",children:e.meeting_platform})]}),o.jsxs("div",{className:"mt-6 border-t border-gray-300 pt-4",children:[o.jsxs("h5",{className:"font-semibold text-gray-700 mb-3",children:["📊 ",e.name.toUpperCase()," SUMMARY"]}),o.jsxs("table",{className:"min-w-full divide-y divide-gray-200 text-sm",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"bg-gray-100",children:[o.jsx("th",{className:"px-3 py-2 text-left font-semibold",children:"Category"}),o.jsx("th",{className:"px-3 py-2 text-left font-semibold",children:"Found"}),o.jsx("th",{className:"px-3 py-2 text-left font-semibold",children:"Details"})]})}),o.jsxs("tbody",{className:"divide-y divide-gray-200",children:[o.jsxs("tr",{children:[o.jsx("td",{className:"px-3 py-2",children:"Website"}),o.jsx("td",{className:"px-3 py-2",children:e.website?"✅":"❌"}),o.jsx("td",{className:"px-3 py-2 text-gray-600",children:e.website?new URL(e.website).hostname:"Not found"})]}),o.jsxs("tr",{children:[o.jsx("td",{className:"px-3 py-2",children:"YouTube"}),o.jsx("td",{className:"px-3 py-2",children:(a=e.youtube_channels)!=null&&a.length?"✅":"❌"}),o.jsxs("td",{className:"px-3 py-2 text-gray-600",children:[((s=e.youtube_channels)==null?void 0:s.length)||0," channel",((c=e.youtube_channels)==null?void 0:c.length)!==1?"s":""]})]}),o.jsxs("tr",{children:[o.jsx("td",{className:"px-3 py-2",children:"Agendas"}),o.jsx("td",{className:"px-3 py-2",children:e.agenda_portal?"✅":"❌"}),o.jsx("td",{className:"px-3 py-2 text-gray-600",children:e.agenda_portal?"Portal found":"Not available"})]}),o.jsxs("tr",{children:[o.jsx("td",{className:"px-3 py-2",children:"Social"}),o.jsx("td",{className:"px-3 py-2",children:e.facebook||e.twitter?"✅":"❌"}),o.jsx("td",{className:"px-3 py-2 text-gray-600",children:[e.facebook&&"Facebook",e.twitter&&"Twitter"].filter(Boolean).join(", ")||"None"})]}),o.jsxs("tr",{children:[o.jsx("td",{className:"px-3 py-2",children:"Platform"}),o.jsx("td",{className:"px-3 py-2",children:e.meeting_platform?"✅":"❌"}),o.jsx("td",{className:"px-3 py-2 text-gray-600",children:e.meeting_platform||"Unknown"})]})]})]})]}),o.jsxs("div",{className:"mt-4 p-3 bg-blue-50 border border-blue-200 rounded-lg",children:[o.jsx("h5",{className:"font-semibold text-blue-900 mb-2",children:"💡 KEY TAKEAWAY"}),o.jsx("p",{className:"text-sm text-blue-800",children:"The automation successfully discovered:"}),o.jsxs("ul",{className:"mt-2 space-y-1 text-sm text-blue-800",children:[e.website&&o.jsx("li",{children:"✅ Official website (automatic)"}),(((u=e.youtube_channels)==null?void 0:u.length)??0)>0&&o.jsx("li",{children:"✅ YouTube channels (automatic)"}),e.agenda_portal&&o.jsx("li",{children:"✅ Agenda portal (found via link scanning)"}),(e.facebook||e.twitter)&&o.jsx("li",{children:"✅ Social media (automatic)"})]})]})]})]}),!r&&o.jsx("div",{className:"border-t border-gray-200 p-4 bg-gray-50 text-center text-gray-500",children:o.jsx("p",{children:"No discovery data available yet. Run discovery pipeline to populate."})})]})}const Xy=[{id:"city",label:"Cities",icon:"🏙️"},{id:"county",label:"Counties",icon:"🏛️"},{id:"state",label:"States",icon:"🗺️"},{id:"school_district",label:"School Districts",icon:"🎓"},{id:"special_district",label:"Special Districts",icon:"⚙️"},{id:"town",label:"Towns",icon:"🏘️"},{id:"village",label:"Villages",icon:"🏡"}];function i0e(){const[e,t]=Ws(),[n,r]=N.useState(()=>e.get("q")||""),[i,a]=N.useState(()=>e.get("q")||""),[s,c]=N.useState(()=>{const $=e.get("levels");return $?$.split(",").filter(z=>Xy.some(D=>D.id===z)):[]}),[u,d]=N.useState(()=>e.get("state")||""),[h,m]=N.useState(()=>e.get("city")||""),[p,v]=N.useState(()=>e.get("county")||""),[_,x]=N.useState(()=>parseInt(e.get("page")||"1")),[y,w]=N.useState(!1),b=N.useRef(null);N.useEffect(()=>{const $=e.get("q"),z=e.get("state"),D=e.get("city"),Z=e.get("county"),I=e.get("levels"),F=e.get("page");if($&&(r($),a($)),z&&d(z),D&&m(D),Z&&v(Z),I){const B=I.split(",").filter(G=>Xy.some(R=>R.id===G));B.length>0&&c(B)}F&&x(parseInt(F))},[e]);const{data:j,isLoading:E,error:P}=zt({queryKey:["jurisdictions-search",i,s,u,h,p,_],queryFn:async()=>{if(!i&&!u&&!h&&!p&&!s.length)return null;const $={types:"jurisdictions",limit:20,page:_};return i&&($.q=i),u&&($.state=u),h&&($.city=h),p&&($.county=p),s.length>0&&($.jurisdiction_levels=s.join(",")),(await vt.get("/search/",{params:$})).data},enabled:i&&i.length>=2||u!==""||h!==""||p!==""||s.length>0}),O=$=>{if($==null||$.preventDefault(),n.trim().length>=2||u||h||p||s.length>0){a(n),x(1);const z={};n.trim()&&(z.q=n),u&&(z.state=u),h&&(z.city=h),p&&(z.county=p),s.length>0&&(z.levels=s.join(",")),t(z)}},C=$=>{x($);const z={};i&&(z.q=i),u&&(z.state=u),s.length>0&&(z.levels=s.join(",")),$>1&&(z.page=$.toString()),t(z),window.scrollTo({top:0,behavior:"smooth"})},A=$=>{const z=s.includes($)?s.filter(Z=>Z!==$):[...s,$];c(z),x(1);const D={};i&&(D.q=i),u&&(D.state=u),z.length>0&&(D.levels=z.join(",")),t(D)},T=$=>({city:"bg-blue-100 text-blue-700 border-blue-200",county:"bg-purple-100 text-purple-700 border-purple-200",state:"bg-green-100 text-green-700 border-green-200",school_district:"bg-yellow-100 text-yellow-700 border-yellow-200",special_district:"bg-orange-100 text-orange-700 border-orange-200",town:"bg-teal-100 text-teal-700 border-teal-200",village:"bg-pink-100 text-pink-700 border-pink-200"})[$]||"bg-gray-100 text-gray-700 border-gray-200";return o.jsx("div",{className:"min-h-screen bg-gray-50",children:o.jsxs("div",{className:"max-w-6xl mx-auto px-6 pb-6",children:[o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6 mb-6",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[o.jsx(Rn,{className:"h-8 w-8 text-primary-600"}),o.jsx("h1",{className:"text-3xl font-bold text-gray-900",children:"Jurisdiction Search"})]}),o.jsx("p",{className:"text-gray-600 mb-4",children:"Search across 90,000+ cities, counties, states, and school districts"}),o.jsx("form",{onSubmit:O,className:"relative",children:o.jsxs("div",{className:"relative",children:[o.jsx("input",{ref:b,type:"text",value:n,onChange:$=>r($.target.value),placeholder:"Search for cities, counties, states, school districts...",className:"w-full px-12 py-3 border-2 border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent text-lg text-gray-900"}),o.jsx(nn,{className:"absolute left-4 top-3.5 h-6 w-6 text-gray-400"}),n&&o.jsx("button",{type:"button",onClick:()=>{var $;r(""),a(""),($=b.current)==null||$.focus()},className:"absolute right-4 top-3.5 text-gray-400 hover:text-gray-600",children:o.jsx(Cr,{className:"h-6 w-6"})})]})}),o.jsxs("div",{className:"mt-4 flex items-center gap-3 flex-wrap",children:[o.jsxs("button",{onClick:()=>w(!y),className:`flex items-center gap-2 px-4 py-2 rounded-lg border-2 transition-colors ${y?"border-primary-500 bg-primary-50 text-primary-700":"border-gray-300 text-gray-700 hover:border-gray-400 hover:bg-gray-50"}`,children:[o.jsx(jA,{className:"h-5 w-5"}),"Filters",u&&o.jsx("span",{className:"ml-1 px-2 py-0.5 bg-primary-600 text-white text-xs rounded-full",children:"1"})]}),o.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[o.jsx("span",{className:"text-sm text-gray-600 font-medium",children:"Levels:"}),Xy.map($=>o.jsxs("button",{onClick:()=>A($.id),className:`flex items-center gap-2 px-4 py-2 rounded-full border-2 transition-all ${s.includes($.id)?`${T($.id)} border-current font-medium shadow-sm`:"border-gray-300 bg-white text-gray-600 hover:border-gray-400 hover:bg-gray-50"}`,children:[s.includes($.id)&&o.jsx(bb,{className:"h-4 w-4 flex-shrink-0"}),o.jsx("span",{children:$.icon}),o.jsx("span",{children:$.label})]},$.id))]})]}),(u||h||p||s.length>0)&&o.jsxs("div",{className:"mt-3 flex items-center gap-2 flex-wrap",children:[o.jsx("span",{className:"text-sm text-gray-600",children:"Active filters:"}),u&&o.jsxs("span",{className:"inline-flex items-center gap-1 px-3 py-1 bg-blue-100 text-blue-800 rounded-full text-sm",children:["State: ",u,o.jsx("button",{onClick:()=>{d(""),setTimeout(()=>O(),0)},className:"hover:bg-blue-200 rounded-full p-0.5",children:o.jsx(Cr,{className:"h-3 w-3"})})]}),h&&o.jsxs("span",{className:"inline-flex items-center gap-1 px-3 py-1 bg-green-100 text-green-800 rounded-full text-sm",children:["City: ",h,o.jsx("button",{onClick:()=>{m(""),setTimeout(()=>O(),0)},className:"hover:bg-green-200 rounded-full p-0.5",children:o.jsx(Cr,{className:"h-3 w-3"})})]}),p&&o.jsxs("span",{className:"inline-flex items-center gap-1 px-3 py-1 bg-amber-100 text-amber-800 rounded-full text-sm",children:["County: ",p,o.jsx("button",{onClick:()=>{v(""),setTimeout(()=>O(),0)},className:"hover:bg-amber-200 rounded-full p-0.5",children:o.jsx(Cr,{className:"h-3 w-3"})})]}),s.length>0&&o.jsxs("span",{className:"inline-flex items-center gap-1 px-3 py-1 bg-purple-100 text-purple-800 rounded-full text-sm",children:[s.length," Level",s.length>1?"s":"",o.jsx("button",{onClick:()=>{c([]),setTimeout(()=>O(),0)},className:"hover:bg-purple-200 rounded-full p-0.5",children:o.jsx(Cr,{className:"h-3 w-3"})})]})]}),y&&o.jsxs("div",{className:"mt-4 p-4 bg-gray-50 rounded-lg border border-gray-200",children:[o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"State"}),o.jsxs("select",{value:u,onChange:$=>{d($.target.value),x(1),setTimeout(()=>O(),0)},className:"w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 text-gray-900 bg-white",children:[o.jsx("option",{value:"",className:"text-gray-900",children:"All States"}),o.jsx("option",{value:"AL",className:"text-gray-900",children:"Alabama"}),o.jsx("option",{value:"AK",className:"text-gray-900",children:"Alaska"}),o.jsx("option",{value:"AZ",className:"text-gray-900",children:"Arizona"}),o.jsx("option",{value:"AR",className:"text-gray-900",children:"Arkansas"}),o.jsx("option",{value:"CA",className:"text-gray-900",children:"California"}),o.jsx("option",{value:"CO",className:"text-gray-900",children:"Colorado"}),o.jsx("option",{value:"CT",className:"text-gray-900",children:"Connecticut"}),o.jsx("option",{value:"DE",className:"text-gray-900",children:"Delaware"}),o.jsx("option",{value:"FL",className:"text-gray-900",children:"Florida"}),o.jsx("option",{value:"GA",className:"text-gray-900",children:"Georgia"}),o.jsx("option",{value:"HI",className:"text-gray-900",children:"Hawaii"}),o.jsx("option",{value:"ID",className:"text-gray-900",children:"Idaho"}),o.jsx("option",{value:"IL",className:"text-gray-900",children:"Illinois"}),o.jsx("option",{value:"IN",className:"text-gray-900",children:"Indiana"}),o.jsx("option",{value:"IA",className:"text-gray-900",children:"Iowa"}),o.jsx("option",{value:"KS",className:"text-gray-900",children:"Kansas"}),o.jsx("option",{value:"KY",className:"text-gray-900",children:"Kentucky"}),o.jsx("option",{value:"LA",className:"text-gray-900",children:"Louisiana"}),o.jsx("option",{value:"ME",className:"text-gray-900",children:"Maine"}),o.jsx("option",{value:"MD",className:"text-gray-900",children:"Maryland"}),o.jsx("option",{value:"MA",className:"text-gray-900",children:"Massachusetts"}),o.jsx("option",{value:"MI",className:"text-gray-900",children:"Michigan"}),o.jsx("option",{value:"MN",className:"text-gray-900",children:"Minnesota"}),o.jsx("option",{value:"MS",className:"text-gray-900",children:"Mississippi"}),o.jsx("option",{value:"MO",className:"text-gray-900",children:"Missouri"}),o.jsx("option",{value:"MT",className:"text-gray-900",children:"Montana"}),o.jsx("option",{value:"NE",className:"text-gray-900",children:"Nebraska"}),o.jsx("option",{value:"NV",className:"text-gray-900",children:"Nevada"}),o.jsx("option",{value:"NH",className:"text-gray-900",children:"New Hampshire"}),o.jsx("option",{value:"NJ",className:"text-gray-900",children:"New Jersey"}),o.jsx("option",{value:"NM",className:"text-gray-900",children:"New Mexico"}),o.jsx("option",{value:"NY",className:"text-gray-900",children:"New York"}),o.jsx("option",{value:"NC",className:"text-gray-900",children:"North Carolina"}),o.jsx("option",{value:"ND",className:"text-gray-900",children:"North Dakota"}),o.jsx("option",{value:"OH",className:"text-gray-900",children:"Ohio"}),o.jsx("option",{value:"OK",className:"text-gray-900",children:"Oklahoma"}),o.jsx("option",{value:"OR",className:"text-gray-900",children:"Oregon"}),o.jsx("option",{value:"PA",className:"text-gray-900",children:"Pennsylvania"}),o.jsx("option",{value:"RI",className:"text-gray-900",children:"Rhode Island"}),o.jsx("option",{value:"SC",className:"text-gray-900",children:"South Carolina"}),o.jsx("option",{value:"SD",className:"text-gray-900",children:"South Dakota"}),o.jsx("option",{value:"TN",className:"text-gray-900",children:"Tennessee"}),o.jsx("option",{value:"TX",className:"text-gray-900",children:"Texas"}),o.jsx("option",{value:"UT",className:"text-gray-900",children:"Utah"}),o.jsx("option",{value:"VT",className:"text-gray-900",children:"Vermont"}),o.jsx("option",{value:"VA",className:"text-gray-900",children:"Virginia"}),o.jsx("option",{value:"WA",className:"text-gray-900",children:"Washington"}),o.jsx("option",{value:"WV",className:"text-gray-900",children:"West Virginia"}),o.jsx("option",{value:"WI",className:"text-gray-900",children:"Wisconsin"}),o.jsx("option",{value:"WY",className:"text-gray-900",children:"Wyoming"})]})]})}),o.jsx("div",{className:"mt-4",children:o.jsx("button",{onClick:()=>{d(""),c([]),setTimeout(()=>O(),0)},className:"px-4 py-2 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300 transition-colors",children:"Clear All Filters"})})]})]}),(i||u||s.length>0||j)&&o.jsxs("div",{children:[E&&o.jsxs("div",{className:"text-center py-12",children:[o.jsx("div",{className:"inline-block animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"}),o.jsx("p",{className:"mt-4 text-gray-600",children:"Searching..."})]}),P&&o.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-6 text-center",children:o.jsx("p",{className:"text-red-600",children:"Error loading search results. Please try again."})}),j&&j.total_results!==void 0&&j.pagination&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"mb-6",children:[o.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:j.query?o.jsxs(o.Fragment,{children:[j.total_results.toLocaleString(),' jurisdictions for "',j.query,'"',j.total_results>0&&o.jsxs("span",{className:"text-base font-normal text-gray-600 ml-2",children:["(showing ",j.pagination.offset+1,"-",Math.min(j.pagination.offset+j.pagination.limit,j.total_results),")"]})]}):o.jsxs(o.Fragment,{children:[j.total_results.toLocaleString()," jurisdictions",j.total_results>0&&o.jsxs("span",{className:"text-base font-normal text-gray-600 ml-2",children:["(showing ",j.pagination.offset+1,"-",Math.min(j.pagination.offset+j.pagination.limit,j.total_results),")"]})]})}),u&&o.jsxs("p",{className:"text-sm text-gray-600 mt-1",children:["Filtered by state: ",u]})]}),o.jsx("div",{className:"space-y-4",children:j.results.jurisdictions.map(($,z)=>o.jsx(r0e,{jurisdiction:{name:$.title,state:$.metadata.state||"",website:$.metadata.website,youtube_channels:$.metadata.youtube_channels,facebook:$.metadata.facebook,twitter:$.metadata.twitter,agenda_portal:$.metadata.agenda_portal,meeting_platform:$.metadata.meeting_platform,completeness:$.metadata.completeness||0}},z))}),j.total_results===0&&o.jsxs("div",{className:"bg-gray-50 border border-gray-200 rounded-lg p-12 text-center",children:[o.jsx(Rn,{className:"h-16 w-16 text-gray-400 mx-auto mb-4"}),o.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"No jurisdictions found"}),o.jsx("p",{className:"text-gray-600",children:"Try adjusting your search terms or filters"})]}),j.total_results>0&&j.pagination.total_pages>1&&o.jsxs("div",{className:"mt-8 flex items-center justify-center gap-2",children:[o.jsx("button",{onClick:()=>C(_-1),disabled:!j.pagination.has_prev,className:`px-4 py-2 rounded-lg ${j.pagination.has_prev?"bg-white border border-gray-300 text-gray-700 hover:bg-gray-50":"bg-gray-100 text-gray-400 cursor-not-allowed"}`,children:"Previous"}),o.jsx("div",{className:"flex items-center gap-2",children:Array.from({length:Math.min(5,j.pagination.total_pages)},($,z)=>{const D=z+1;return o.jsx("button",{onClick:()=>C(D),className:`px-4 py-2 rounded-lg ${_===D?"bg-primary-600 text-white":"bg-white border border-gray-300 text-gray-700 hover:bg-gray-50"}`,children:D},D)})}),o.jsx("button",{onClick:()=>C(_+1),disabled:!j.pagination.has_next,className:`px-4 py-2 rounded-lg ${j.pagination.has_next?"bg-white border border-gray-300 text-gray-700 hover:bg-gray-50":"bg-gray-100 text-gray-400 cursor-not-allowed"}`,children:"Next"})]})]})]})]})})}var we=1e-6,Ef=1e-12,$e=Math.PI,At=$e/2,ug=$e/4,Fn=$e*2,rt=180/$e,_e=$e/180,Ue=Math.abs,su=Math.atan,Dn=Math.atan2,ve=Math.cos,lm=Math.ceil,PL=Math.exp,aw=Math.hypot,dg=Math.log,Qy=Math.pow,me=Math.sin,Rr=Math.sign||function(e){return e>0?1:e<0?-1:0},an=Math.sqrt,sj=Math.tan;function EL(e){return e>1?0:e<-1?$e:Math.acos(e)}function Bn(e){return e>1?At:e<-1?-At:Math.asin(e)}function PO(e){return(e=me(e/2))*e}function jt(){}function fg(e,t){e&&OO.hasOwnProperty(e.type)&&OO[e.type](e,t)}var EO={Feature:function(e,t){fg(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r=0?1:-1,i=r*n,a=ve(t),s=me(t),c=cw*s,u=lw*a+c*ve(i),d=c*r*me(i);hg.add(Dn(d,u)),sw=e,lw=a,cw=s}function l0e(e){return mg=new Nn,si(e,Ui),mg*2}function pg(e){return[Dn(e[1],e[0]),Bn(e[2])]}function Is(e){var t=e[0],n=e[1],r=ve(n);return[r*ve(t),r*me(t),me(n)]}function cm(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Rc(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Jy(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function um(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function gg(e){var t=an(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var bt,Gn,Ot,dr,Jo,AL,TL,Ul,yd,Ga,Aa,ia={point:uw,lineStart:CO,lineEnd:AO,polygonStart:function(){ia.point=LL,ia.lineStart=c0e,ia.lineEnd=u0e,yd=new Nn,Ui.polygonStart()},polygonEnd:function(){Ui.polygonEnd(),ia.point=uw,ia.lineStart=CO,ia.lineEnd=AO,hg<0?(bt=-(Ot=180),Gn=-(dr=90)):yd>we?dr=90:yd<-we&&(Gn=-90),Aa[0]=bt,Aa[1]=Ot},sphere:function(){bt=-(Ot=180),Gn=-(dr=90)}};function uw(e,t){Ga.push(Aa=[bt=e,Ot=e]),tdr&&(dr=t)}function ML(e,t){var n=Is([e*_e,t*_e]);if(Ul){var r=Rc(Ul,n),i=[r[1],-r[0],0],a=Rc(i,r);gg(a),a=pg(a);var s=e-Jo,c=s>0?1:-1,u=a[0]*rt*c,d,h=Ue(s)>180;h^(c*Jodr&&(dr=d)):(u=(u+360)%360-180,h^(c*Jodr&&(dr=t))),h?esr(bt,Ot)&&(Ot=e):sr(e,Ot)>sr(bt,Ot)&&(bt=e):Ot>=bt?(eOt&&(Ot=e)):e>Jo?sr(bt,e)>sr(bt,Ot)&&(Ot=e):sr(e,Ot)>sr(bt,Ot)&&(bt=e)}else Ga.push(Aa=[bt=e,Ot=e]);tdr&&(dr=t),Ul=n,Jo=e}function CO(){ia.point=ML}function AO(){Aa[0]=bt,Aa[1]=Ot,ia.point=uw,Ul=null}function LL(e,t){if(Ul){var n=e-Jo;yd.add(Ue(n)>180?n+(n>0?360:-360):n)}else AL=e,TL=t;Ui.point(e,t),ML(e,t)}function c0e(){Ui.lineStart()}function u0e(){LL(AL,TL),Ui.lineEnd(),Ue(yd)>we&&(bt=-(Ot=180)),Aa[0]=bt,Aa[1]=Ot,Ul=null}function sr(e,t){return(t-=e)<0?t+360:t}function d0e(e,t){return e[0]-t[0]}function TO(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tsr(r[0],r[1])&&(r[1]=i[1]),sr(i[0],r[1])>sr(r[0],r[1])&&(r[0]=i[0])):a.push(r=i);for(s=-1/0,n=a.length-1,t=0,r=a[n];t<=n;r=i,++t)i=a[t],(c=sr(r[1],i[0]))>s&&(s=c,bt=i[0],Ot=r[1])}return Ga=Aa=null,bt===1/0||Gn===1/0?[[NaN,NaN],[NaN,NaN]]:[[bt,Gn],[Ot,dr]]}var Ku,vg,yg,xg,bg,wg,_g,jg,dw,fw,hw,$L,IL,Cn,An,Tn,ui={sphere:jt,point:lj,lineStart:MO,lineEnd:LO,polygonStart:function(){ui.lineStart=p0e,ui.lineEnd=g0e},polygonEnd:function(){ui.lineStart=MO,ui.lineEnd=LO}};function lj(e,t){e*=_e,t*=_e;var n=ve(t);rh(n*ve(e),n*me(e),me(t))}function rh(e,t,n){++Ku,yg+=(e-yg)/Ku,xg+=(t-xg)/Ku,bg+=(n-bg)/Ku}function MO(){ui.point=h0e}function h0e(e,t){e*=_e,t*=_e;var n=ve(t);Cn=n*ve(e),An=n*me(e),Tn=me(t),ui.point=m0e,rh(Cn,An,Tn)}function m0e(e,t){e*=_e,t*=_e;var n=ve(t),r=n*ve(e),i=n*me(e),a=me(t),s=Dn(an((s=An*a-Tn*i)*s+(s=Tn*r-Cn*a)*s+(s=Cn*i-An*r)*s),Cn*r+An*i+Tn*a);vg+=s,wg+=s*(Cn+(Cn=r)),_g+=s*(An+(An=i)),jg+=s*(Tn+(Tn=a)),rh(Cn,An,Tn)}function LO(){ui.point=lj}function p0e(){ui.point=v0e}function g0e(){RL($L,IL),ui.point=lj}function v0e(e,t){$L=e,IL=t,e*=_e,t*=_e,ui.point=RL;var n=ve(t);Cn=n*ve(e),An=n*me(e),Tn=me(t),rh(Cn,An,Tn)}function RL(e,t){e*=_e,t*=_e;var n=ve(t),r=n*ve(e),i=n*me(e),a=me(t),s=An*a-Tn*i,c=Tn*r-Cn*a,u=Cn*i-An*r,d=aw(s,c,u),h=Bn(d),m=d&&-h/d;dw.add(m*s),fw.add(m*c),hw.add(m*u),vg+=h,wg+=h*(Cn+(Cn=r)),_g+=h*(An+(An=i)),jg+=h*(Tn+(Tn=a)),rh(Cn,An,Tn)}function y0e(e){Ku=vg=yg=xg=bg=wg=_g=jg=0,dw=new Nn,fw=new Nn,hw=new Nn,si(e,ui);var t=+dw,n=+fw,r=+hw,i=aw(t,n,r);return i$e?e+Math.round(-e/Fn)*Fn:e,t]}pw.invert=pw;function cj(e,t,n){return(e%=Fn)?t||n?mw(IO(e),RO(t,n)):IO(e):t||n?RO(t,n):pw}function $O(e){return function(t,n){return t+=e,[t>$e?t-Fn:t<-$e?t+Fn:t,n]}}function IO(e){var t=$O(e);return t.invert=$O(-e),t}function RO(e,t){var n=ve(e),r=me(e),i=ve(t),a=me(t);function s(c,u){var d=ve(u),h=ve(c)*d,m=me(c)*d,p=me(u),v=p*n+h*r;return[Dn(m*i-v*a,h*n-p*r),Bn(v*i+m*a)]}return s.invert=function(c,u){var d=ve(u),h=ve(c)*d,m=me(c)*d,p=me(u),v=p*i-m*a;return[Dn(m*i+p*a,h*n+v*r),Bn(v*n-h*r)]},s}function FL(e){e=cj(e[0]*_e,e[1]*_e,e.length>2?e[2]*_e:0);function t(n){return n=e(n[0]*_e,n[1]*_e),n[0]*=rt,n[1]*=rt,n}return t.invert=function(n){return n=e.invert(n[0]*_e,n[1]*_e),n[0]*=rt,n[1]*=rt,n},t}function DL(e,t,n,r,i,a){if(n){var s=ve(t),c=me(t),u=r*n;i==null?(i=t+r*Fn,a=t-u/2):(i=FO(s,i),a=FO(s,a),(r>0?ia)&&(i+=r*Fn));for(var d,h=i;r>0?h>a:h1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Cm(e,t){return Ue(e[0]-t[0])=0;--c)i.point((m=h[c])[0],m[1]);else r(p.x,p.p.x,-1,i);p=p.p}p=p.o,h=p.z,v=!v}while(!p.v);i.lineEnd()}}}function DO(e){if(t=e.length){for(var t,n=0,r=e[0],i;++n=0?1:-1,$=T*A,z=$>$e,D=y*O;if(u.add(Dn(D*T*me($),w*C+D*ve($))),s+=z?A+T*Fn:A,z^_>=n^E>=n){var Z=Rc(Is(v),Is(j));gg(Z);var I=Rc(a,Z);gg(I);var F=(z^A>=0?-1:1)*Bn(I[2]);(r>F||r===F&&(Z[0]||Z[1]))&&(c+=z^A>=0?1:-1)}}return(s<-we||s0){for(u||(i.polygonStart(),u=!0),i.lineStart(),O=0;O1&&E&2&&P.push(P.pop().concat(P.shift())),h.push(P.filter(b0e))}}return p}}function b0e(e){return e.length>1}function w0e(e,t){return((e=e.x)[0]<0?e[1]-At-we:At-e[1])-((t=t.x)[0]<0?t[1]-At-we:At-t[1])}const gw=WL(function(){return!0},_0e,N0e,[-$e,-At]);function _0e(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(a,s){var c=a>0?$e:-$e,u=Ue(a-t);Ue(u-$e)0?At:-At),e.point(r,n),e.lineEnd(),e.lineStart(),e.point(c,n),e.point(a,n),i=0):r!==c&&u>=$e&&(Ue(t-r)we?su((me(t)*(a=ve(r))*me(n)-me(r)*(i=ve(t))*me(e))/(i*a*s)):(t+r)/2}function N0e(e,t,n,r){var i;if(e==null)i=n*At,r.point(-$e,i),r.point(0,i),r.point($e,i),r.point($e,0),r.point($e,-i),r.point(0,-i),r.point(-$e,-i),r.point(-$e,0),r.point(-$e,i);else if(Ue(e[0]-t[0])>we){var a=e[0]0,i=Ue(t)>we;function a(h,m,p,v){DL(v,e,n,p,h,m)}function s(h,m){return ve(h)*ve(m)>t}function c(h){var m,p,v,_,x;return{lineStart:function(){_=v=!1,x=1},point:function(y,w){var b=[y,w],j,E=s(y,w),P=r?E?0:d(y,w):E?d(y+(y<0?$e:-$e),w):0;if(!m&&(_=v=E)&&h.lineStart(),E!==v&&(j=u(m,b),(!j||Cm(m,j)||Cm(b,j))&&(b[2]=1)),E!==v)x=0,E?(h.lineStart(),j=u(b,m),h.point(j[0],j[1])):(j=u(m,b),h.point(j[0],j[1],2),h.lineEnd()),m=j;else if(i&&m&&r^E){var O;!(P&p)&&(O=u(b,m,!0))&&(x=0,r?(h.lineStart(),h.point(O[0][0],O[0][1]),h.point(O[1][0],O[1][1]),h.lineEnd()):(h.point(O[1][0],O[1][1]),h.lineEnd(),h.lineStart(),h.point(O[0][0],O[0][1],3)))}E&&(!m||!Cm(m,b))&&h.point(b[0],b[1]),m=b,v=E,p=P},lineEnd:function(){v&&h.lineEnd(),m=null},clean:function(){return x|(_&&v)<<1}}}function u(h,m,p){var v=Is(h),_=Is(m),x=[1,0,0],y=Rc(v,_),w=cm(y,y),b=y[0],j=w-b*b;if(!j)return!p&&h;var E=t*w/j,P=-t*b/j,O=Rc(x,y),C=um(x,E),A=um(y,P);Jy(C,A);var T=O,$=cm(C,T),z=cm(T,T),D=$*$-z*(cm(C,C)-1);if(!(D<0)){var Z=an(D),I=um(T,(-$-Z)/z);if(Jy(I,C),I=pg(I),!p)return I;var F=h[0],B=m[0],G=h[1],R=m[1],K;B0^I[1]<(Ue(I[0]-F)$e^(F<=I[0]&&I[0]<=B)){var ne=um(T,(-$+Z)/z);return Jy(ne,C),[I,pg(ne)]}}}function d(h,m){var p=r?e:$e-e,v=0;return h<-p?v|=1:h>p&&(v|=2),m<-p?v|=4:m>p&&(v|=8),v}return WL(s,c,a,r?[0,-e]:[-$e,e-$e])}function S0e(e,t,n,r,i,a){var s=e[0],c=e[1],u=t[0],d=t[1],h=0,m=1,p=u-s,v=d-c,_;if(_=n-s,!(!p&&_>0)){if(_/=p,p<0){if(_0){if(_>m)return;_>h&&(h=_)}if(_=i-s,!(!p&&_<0)){if(_/=p,p<0){if(_>m)return;_>h&&(h=_)}else if(p>0){if(_0)){if(_/=v,v<0){if(_0){if(_>m)return;_>h&&(h=_)}if(_=a-c,!(!v&&_<0)){if(_/=v,v<0){if(_>m)return;_>h&&(h=_)}else if(v>0){if(_0&&(e[0]=s+h*p,e[1]=c+h*v),m<1&&(t[0]=s+m*p,t[1]=c+m*v),!0}}}}}var Yu=1e9,fm=-Yu;function ov(e,t,n,r){function i(d,h){return e<=d&&d<=n&&t<=h&&h<=r}function a(d,h,m,p){var v=0,_=0;if(d==null||(v=s(d,m))!==(_=s(h,m))||u(d,h)<0^m>0)do p.point(v===0||v===3?e:n,v>1?r:t);while((v=(v+m+4)%4)!==_);else p.point(h[0],h[1])}function s(d,h){return Ue(d[0]-e)0?0:3:Ue(d[0]-n)0?2:1:Ue(d[1]-t)0?1:0:h>0?3:2}function c(d,h){return u(d.x,h.x)}function u(d,h){var m=s(d,1),p=s(h,1);return m!==p?m-p:m===0?h[1]-d[1]:m===1?d[0]-h[0]:m===2?d[1]-h[1]:h[0]-d[0]}return function(d){var h=d,m=BL(),p,v,_,x,y,w,b,j,E,P,O,C={point:A,lineStart:D,lineEnd:Z,polygonStart:$,polygonEnd:z};function A(F,B){i(F,B)&&h.point(F,B)}function T(){for(var F=0,B=0,G=v.length;Br&&(ae-Y)*(r-ne)>(ee-ne)*(e-Y)&&++F:ee<=r&&(ae-Y)*(r-ne)<(ee-ne)*(e-Y)&&--F;return F}function $(){h=m,p=[],v=[],O=!0}function z(){var F=T(),B=O&&F,G=(p=t6(p)).length;(B||G)&&(d.polygonStart(),B&&(d.lineStart(),a(null,null,1,d),d.lineEnd()),G&&zL(p,c,F,a,d),d.polygonEnd()),h=d,p=v=_=null}function D(){C.point=I,v&&v.push(_=[]),P=!0,E=!1,b=j=NaN}function Z(){p&&(I(x,y),w&&E&&m.rejoin(),p.push(m.result())),C.point=A,E&&h.lineEnd()}function I(F,B){var G=i(F,B);if(v&&_.push([F,B]),P)x=F,y=B,w=G,P=!1,G&&(h.lineStart(),h.point(F,B));else if(G&&E)h.point(F,B);else{var R=[b=Math.max(fm,Math.min(Yu,b)),j=Math.max(fm,Math.min(Yu,j))],K=[F=Math.max(fm,Math.min(Yu,F)),B=Math.max(fm,Math.min(Yu,B))];S0e(R,K,e,t,n,r)?(E||(h.lineStart(),h.point(R[0],R[1])),h.point(K[0],K[1]),G||h.lineEnd(),O=!1):G&&(h.lineStart(),h.point(F,B),O=!1)}b=F,j=B,E=G}return C}}function P0e(){var e=0,t=0,n=960,r=500,i,a,s;return s={stream:function(c){return i&&a===c?i:i=ov(e,t,n,r)(a=c)},extent:function(c){return arguments.length?(e=+c[0][0],t=+c[0][1],n=+c[1][0],r=+c[1][1],i=a=null,s):[[e,t],[n,r]]}}}var vw,yw,Am,Tm,Fc={sphere:jt,point:jt,lineStart:E0e,lineEnd:jt,polygonStart:jt,polygonEnd:jt};function E0e(){Fc.point=k0e,Fc.lineEnd=O0e}function O0e(){Fc.point=Fc.lineEnd=jt}function k0e(e,t){e*=_e,t*=_e,yw=e,Am=me(t),Tm=ve(t),Fc.point=C0e}function C0e(e,t){e*=_e,t*=_e;var n=me(t),r=ve(t),i=Ue(e-yw),a=ve(i),s=me(i),c=r*s,u=Tm*n-Am*r*a,d=Am*n+Tm*r*a;vw.add(Dn(an(c*c+u*u),d)),yw=e,Am=n,Tm=r}function VL(e){return vw=new Nn,si(e,Fc),+vw}var xw=[null,null],A0e={type:"LineString",coordinates:xw};function Ng(e,t){return xw[0]=e,xw[1]=t,VL(A0e)}var BO={Feature:function(e,t){return Sg(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r0&&(i=Ng(e[a],e[a-1]),i>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))we}).map(p)).concat(ss(lm(a/d)*d,i,d).filter(function(j){return Ue(j%m)>we}).map(v))}return w.lines=function(){return b().map(function(j){return{type:"LineString",coordinates:j}})},w.outline=function(){return{type:"Polygon",coordinates:[_(r).concat(x(s).slice(1),_(n).reverse().slice(1),x(c).reverse().slice(1))]}},w.extent=function(j){return arguments.length?w.extentMajor(j).extentMinor(j):w.extentMinor()},w.extentMajor=function(j){return arguments.length?(r=+j[0][0],n=+j[1][0],c=+j[0][1],s=+j[1][1],r>n&&(j=r,r=n,n=j),c>s&&(j=c,c=s,s=j),w.precision(y)):[[r,c],[n,s]]},w.extentMinor=function(j){return arguments.length?(t=+j[0][0],e=+j[1][0],a=+j[0][1],i=+j[1][1],t>e&&(j=t,t=e,e=j),a>i&&(j=a,a=i,i=j),w.precision(y)):[[t,a],[e,i]]},w.step=function(j){return arguments.length?w.stepMajor(j).stepMinor(j):w.stepMinor()},w.stepMajor=function(j){return arguments.length?(h=+j[0],m=+j[1],w):[h,m]},w.stepMinor=function(j){return arguments.length?(u=+j[0],d=+j[1],w):[u,d]},w.precision=function(j){return arguments.length?(y=+j,p=VO(a,i,90),v=qO(t,e,y),_=VO(c,s,90),x=qO(r,n,y),w):y},w.extentMajor([[-180,-90+we],[180,90-we]]).extentMinor([[-180,-80-we],[180,80+we]])}function L0e(){return uj()()}function $0e(e,t){var n=e[0]*_e,r=e[1]*_e,i=t[0]*_e,a=t[1]*_e,s=ve(r),c=me(r),u=ve(a),d=me(a),h=s*ve(n),m=s*me(n),p=u*ve(i),v=u*me(i),_=2*Bn(an(PO(a-r)+s*u*PO(i-n))),x=me(_),y=_?function(w){var b=me(w*=_)/x,j=me(_-w)/x,E=j*h+b*p,P=j*m+b*v,O=j*c+b*d;return[Dn(P,E)*rt,Dn(O,an(E*E+P*P))*rt]}:function(){return[n*rt,r*rt]};return y.distance=_,y}const Of=e=>e;var tx=new Nn,bw=new Nn,ZL,GL,ww,_w,ca={point:jt,lineStart:jt,lineEnd:jt,polygonStart:function(){ca.lineStart=I0e,ca.lineEnd=F0e},polygonEnd:function(){ca.lineStart=ca.lineEnd=ca.point=jt,tx.add(Ue(bw)),bw=new Nn},result:function(){var e=tx/2;return tx=new Nn,e}};function I0e(){ca.point=R0e}function R0e(e,t){ca.point=KL,ZL=ww=e,GL=_w=t}function KL(e,t){bw.add(_w*e-ww*t),ww=e,_w=t}function F0e(){KL(ZL,GL)}var Dc=1/0,Pg=Dc,kf=-Dc,Eg=kf,Og={point:D0e,lineStart:jt,lineEnd:jt,polygonStart:jt,polygonEnd:jt,result:function(){var e=[[Dc,Pg],[kf,Eg]];return kf=Eg=-(Pg=Dc=1/0),e}};function D0e(e,t){ekf&&(kf=e),tEg&&(Eg=t)}var jw=0,Nw=0,Xu=0,kg=0,Cg=0,Cl=0,Sw=0,Pw=0,Qu=0,YL,XL,Mi,Li,Tr={point:Rs,lineStart:ZO,lineEnd:GO,polygonStart:function(){Tr.lineStart=U0e,Tr.lineEnd=W0e},polygonEnd:function(){Tr.point=Rs,Tr.lineStart=ZO,Tr.lineEnd=GO},result:function(){var e=Qu?[Sw/Qu,Pw/Qu]:Cl?[kg/Cl,Cg/Cl]:Xu?[jw/Xu,Nw/Xu]:[NaN,NaN];return jw=Nw=Xu=kg=Cg=Cl=Sw=Pw=Qu=0,e}};function Rs(e,t){jw+=e,Nw+=t,++Xu}function ZO(){Tr.point=B0e}function B0e(e,t){Tr.point=z0e,Rs(Mi=e,Li=t)}function z0e(e,t){var n=e-Mi,r=t-Li,i=an(n*n+r*r);kg+=i*(Mi+e)/2,Cg+=i*(Li+t)/2,Cl+=i,Rs(Mi=e,Li=t)}function GO(){Tr.point=Rs}function U0e(){Tr.point=H0e}function W0e(){QL(YL,XL)}function H0e(e,t){Tr.point=QL,Rs(YL=Mi=e,XL=Li=t)}function QL(e,t){var n=e-Mi,r=t-Li,i=an(n*n+r*r);kg+=i*(Mi+e)/2,Cg+=i*(Li+t)/2,Cl+=i,i=Li*e-Mi*t,Sw+=i*(Mi+e),Pw+=i*(Li+t),Qu+=i*3,Rs(Mi=e,Li=t)}function JL(e){this._context=e}JL.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,Fn);break}}},result:jt};var Ew=new Nn,nx,e$,t$,Ju,ed,Cf={point:jt,lineStart:function(){Cf.point=V0e},lineEnd:function(){nx&&n$(e$,t$),Cf.point=jt},polygonStart:function(){nx=!0},polygonEnd:function(){nx=null},result:function(){var e=+Ew;return Ew=new Nn,e}};function V0e(e,t){Cf.point=n$,e$=Ju=e,t$=ed=t}function n$(e,t){Ju-=e,ed-=t,Ew.add(an(Ju*Ju+ed*ed)),Ju=e,ed=t}function r$(){this._string=[]}r$.prototype={_radius:4.5,_circle:KO(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._string.push("M",e,",",t),this._point=1;break}case 1:{this._string.push("L",e,",",t);break}default:{this._circle==null&&(this._circle=KO(this._radius)),this._string.push("M",e,",",t,this._circle);break}}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}else return null}};function KO(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function i$(e,t){var n=4.5,r,i;function a(s){return s&&(typeof n=="function"&&i.pointRadius(+n.apply(this,arguments)),si(s,r(i))),i.result()}return a.area=function(s){return si(s,r(ca)),ca.result()},a.measure=function(s){return si(s,r(Cf)),Cf.result()},a.bounds=function(s){return si(s,r(Og)),Og.result()},a.centroid=function(s){return si(s,r(Tr)),Tr.result()},a.projection=function(s){return arguments.length?(r=s==null?(e=null,Of):(e=s).stream,a):e},a.context=function(s){return arguments.length?(i=s==null?(t=null,new r$):new JL(t=s),typeof n!="function"&&i.pointRadius(n),a):t},a.pointRadius=function(s){return arguments.length?(n=typeof s=="function"?s:(i.pointRadius(+s),+s),a):n},a.projection(e).context(t)}function q0e(e){return{stream:ih(e)}}function ih(e){return function(t){var n=new Ow;for(var r in e)n[r]=e[r];return n.stream=t,n}}function Ow(){}Ow.prototype={constructor:Ow,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function dj(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),r!=null&&e.clipExtent(null),si(n,e.stream(Og)),t(Og.result()),r!=null&&e.clipExtent(r),e}function sv(e,t,n){return dj(e,function(r){var i=t[1][0]-t[0][0],a=t[1][1]-t[0][1],s=Math.min(i/(r[1][0]-r[0][0]),a/(r[1][1]-r[0][1])),c=+t[0][0]+(i-s*(r[1][0]+r[0][0]))/2,u=+t[0][1]+(a-s*(r[1][1]+r[0][1]))/2;e.scale(150*s).translate([c,u])},n)}function fj(e,t,n){return sv(e,[[0,0],t],n)}function hj(e,t,n){return dj(e,function(r){var i=+t,a=i/(r[1][0]-r[0][0]),s=(i-a*(r[1][0]+r[0][0]))/2,c=-a*r[0][1];e.scale(150*a).translate([s,c])},n)}function mj(e,t,n){return dj(e,function(r){var i=+t,a=i/(r[1][1]-r[0][1]),s=-a*r[0][0],c=(i-a*(r[1][1]+r[0][1]))/2;e.scale(150*a).translate([s,c])},n)}var YO=16,Z0e=ve(30*_e);function XO(e,t){return+t?K0e(e,t):G0e(e)}function G0e(e){return ih({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}function K0e(e,t){function n(r,i,a,s,c,u,d,h,m,p,v,_,x,y){var w=d-r,b=h-i,j=w*w+b*b;if(j>4*t&&x--){var E=s+p,P=c+v,O=u+_,C=an(E*E+P*P+O*O),A=Bn(O/=C),T=Ue(Ue(O)-1)t||Ue((w*Z+b*I)/j-.5)>.3||s*p+c*v+u*_2?F[2]%360*_e:0,Z()):[c*rt,u*rt,d*rt]},z.angle=function(F){return arguments.length?(m=F%360*_e,Z()):m*rt},z.reflectX=function(F){return arguments.length?(p=F?-1:1,Z()):p<0},z.reflectY=function(F){return arguments.length?(v=F?-1:1,Z()):v<0},z.precision=function(F){return arguments.length?(O=XO(C,P=F*F),I()):an(P)},z.fitExtent=function(F,B){return sv(z,F,B)},z.fitSize=function(F,B){return fj(z,F,B)},z.fitWidth=function(F,B){return hj(z,F,B)},z.fitHeight=function(F,B){return mj(z,F,B)};function Z(){var F=QO(n,0,0,p,v,m).apply(null,t(a,s)),B=QO(n,r-F[0],i-F[1],p,v,m);return h=cj(c,u,d),C=mw(t,B),A=mw(h,C),O=XO(C,P),I()}function I(){return T=$=null,z}return function(){return t=e.apply(this,arguments),z.invert=t.invert&&D,Z()}}function gj(e){var t=0,n=$e/3,r=pj(e),i=r(t,n);return i.parallels=function(a){return arguments.length?r(t=a[0]*_e,n=a[1]*_e):[t*rt,n*rt]},i}function J0e(e){var t=ve(e);function n(r,i){return[r*t,me(i)/t]}return n.invert=function(r,i){return[r/t,Bn(i*t)]},n}function a$(e,t){var n=me(e),r=(n+me(t))/2;if(Ue(r)=.12&&y<.234&&x>=-.425&&x<-.214?i:y>=.166&&y<.234&&x>=-.214&&x<-.115?s:n).invert(p)},h.stream=function(p){return e&&t===p?e:e=eve([n.stream(t=p),i.stream(p),s.stream(p)])},h.precision=function(p){return arguments.length?(n.precision(p),i.precision(p),s.precision(p),m()):n.precision()},h.scale=function(p){return arguments.length?(n.scale(p),i.scale(p*.35),s.scale(p),h.translate(n.translate())):n.scale()},h.translate=function(p){if(!arguments.length)return n.translate();var v=n.scale(),_=+p[0],x=+p[1];return r=n.translate(p).clipExtent([[_-.455*v,x-.238*v],[_+.455*v,x+.238*v]]).stream(d),a=i.translate([_-.307*v,x+.201*v]).clipExtent([[_-.425*v+we,x+.12*v+we],[_-.214*v-we,x+.234*v-we]]).stream(d),c=s.translate([_-.205*v,x+.212*v]).clipExtent([[_-.214*v+we,x+.166*v+we],[_-.115*v-we,x+.234*v-we]]).stream(d),m()},h.fitExtent=function(p,v){return sv(h,p,v)},h.fitSize=function(p,v){return fj(h,p,v)},h.fitWidth=function(p,v){return hj(h,p,v)},h.fitHeight=function(p,v){return mj(h,p,v)};function m(){return e=t=null,h}return h.scale(1070)}function s$(e){return function(t,n){var r=ve(t),i=ve(n),a=e(r*i);return a===1/0?[2,0]:[a*i*me(t),a*me(n)]}}function ah(e){return function(t,n){var r=an(t*t+n*n),i=e(r),a=me(i),s=ve(i);return[Dn(t*a,r*s),Bn(r&&n*a/r)]}}var vj=s$(function(e){return an(2/(1+e))});vj.invert=ah(function(e){return 2*Bn(e/2)});function nve(){return Vi(vj).scale(124.75).clipAngle(180-.001)}var yj=s$(function(e){return(e=EL(e))&&e/me(e)});yj.invert=ah(function(e){return e});function rve(){return Vi(yj).scale(79.4188).clipAngle(180-.001)}function oh(e,t){return[e,dg(sj((At+t)/2))]}oh.invert=function(e,t){return[e,2*su(PL(t))-At]};function ive(){return l$(oh).scale(961/Fn)}function l$(e){var t=Vi(e),n=t.center,r=t.scale,i=t.translate,a=t.clipExtent,s=null,c,u,d;t.scale=function(m){return arguments.length?(r(m),h()):r()},t.translate=function(m){return arguments.length?(i(m),h()):i()},t.center=function(m){return arguments.length?(n(m),h()):n()},t.clipExtent=function(m){return arguments.length?(m==null?s=c=u=d=null:(s=+m[0][0],c=+m[0][1],u=+m[1][0],d=+m[1][1]),h()):s==null?null:[[s,c],[u,d]]};function h(){var m=$e*r(),p=t(FL(t.rotate()).invert([0,0]));return a(s==null?[[p[0]-m,p[1]-m],[p[0]+m,p[1]+m]]:e===oh?[[Math.max(p[0]-m,s),c],[Math.min(p[0]+m,u),d]]:[[s,Math.max(p[1]-m,c)],[u,Math.min(p[1]+m,d)]])}return h()}function hm(e){return sj((At+e)/2)}function c$(e,t){var n=ve(e),r=e===t?me(e):dg(n/ve(t))/dg(hm(t)/hm(e)),i=n*Qy(hm(e),r)/r;if(!r)return oh;function a(s,c){i>0?c<-At+we&&(c=-At+we):c>At-we&&(c=At-we);var u=i/Qy(hm(c),r);return[u*me(r*s),i-u*ve(r*s)]}return a.invert=function(s,c){var u=i-c,d=Rr(r)*an(s*s+u*u),h=Dn(s,Ue(u))*Rr(u);return u*r<0&&(h-=$e*Rr(s)*Rr(u)),[h/r,2*su(Qy(i/d,1/r))-At]},a}function ave(){return gj(c$).scale(109.5).parallels([30,30])}function Af(e,t){return[e,t]}Af.invert=Af;function ove(){return Vi(Af).scale(152.63)}function u$(e,t){var n=ve(e),r=e===t?me(e):(n-ve(t))/(t-e),i=n/r+e;if(Ue(r)we&&--r>0);return[e/(.8707+(a=n*n)*(-.131979+a*(-.013791+a*a*a*(.003971-.001529*a)))),n]};function fve(){return Vi(wj).scale(175.295)}function _j(e,t){return[ve(t)*me(e),me(t)]}_j.invert=ah(Bn);function hve(){return Vi(_j).scale(249.5).clipAngle(90+we)}function jj(e,t){var n=ve(t),r=1+ve(e)*n;return[n*me(e)/r,me(t)/r]}jj.invert=ah(function(e){return 2*su(e)});function mve(){return Vi(jj).scale(250).clipAngle(142)}function Nj(e,t){return[dg(sj((At+t)/2)),-e]}Nj.invert=function(e,t){return[-t,2*su(PL(e))-At]};function pve(){var e=l$(Nj),t=e.center,n=e.rotate;return e.center=function(r){return arguments.length?t([-r[1],r[0]]):(r=t(),[r[1],-r[0]])},e.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}const gve=Object.freeze(Object.defineProperty({__proto__:null,geoAlbers:o$,geoAlbersUsa:tve,geoArea:l0e,geoAzimuthalEqualArea:nve,geoAzimuthalEqualAreaRaw:vj,geoAzimuthalEquidistant:rve,geoAzimuthalEquidistantRaw:yj,geoBounds:f0e,geoCentroid:y0e,geoCircle:x0e,geoClipAntimeridian:gw,geoClipCircle:HL,geoClipExtent:P0e,geoClipRectangle:ov,geoConicConformal:ave,geoConicConformalRaw:c$,geoConicEqualArea:Ag,geoConicEqualAreaRaw:a$,geoConicEquidistant:sve,geoConicEquidistantRaw:u$,geoContains:M0e,geoDistance:Ng,geoEqualEarth:cve,geoEqualEarthRaw:xj,geoEquirectangular:ove,geoEquirectangularRaw:Af,geoGnomonic:uve,geoGnomonicRaw:bj,geoGraticule:uj,geoGraticule10:L0e,geoIdentity:dve,geoInterpolate:$0e,geoLength:VL,geoMercator:ive,geoMercatorRaw:oh,geoNaturalEarth1:fve,geoNaturalEarth1Raw:wj,geoOrthographic:hve,geoOrthographicRaw:_j,geoPath:i$,geoProjection:Vi,geoProjectionMutator:pj,geoRotation:FL,geoStereographic:mve,geoStereographicRaw:jj,geoStream:si,geoTransform:q0e,geoTransverseMercator:pve,geoTransverseMercatorRaw:Nj},Symbol.toStringTag,{value:"Module"}));function vve(e){return e}function yve(e){if(e==null)return vve;var t,n,r=e.scale[0],i=e.scale[1],a=e.translate[0],s=e.translate[1];return function(c,u){u||(t=n=0);var d=2,h=c.length,m=new Array(h);for(m[0]=(t+=c[0])*r+a,m[1]=(n+=c[1])*i+s;d1)r=jve(e,t,n);else for(i=0,r=new Array(a=e.arcs.length);i{}};function Sj(){for(var e=0,t=arguments.length,n={},r;e=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Mm.prototype=Sj.prototype={constructor:Mm,on:function(e,t){var n=this._,r=Sve(e+"",n),i,a=-1,s=r.length;if(arguments.length<2){for(;++a0)for(var n=new Array(i),r=0,i,a;r=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),nk.hasOwnProperty(t)?{space:nk[t],local:e}:e}function Eve(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===kw&&t.documentElement.namespaceURI===kw?t.createElement(e):t.createElementNS(n,e)}}function Ove(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function f$(e){var t=lv(e);return(t.local?Ove:Eve)(t)}function kve(){}function Pj(e){return e==null?kve:function(){return this.querySelector(e)}}function Cve(e){typeof e!="function"&&(e=Pj(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i=j&&(j=b+1);!(P=y[j])&&++j<_;);E._next=P||null}}return s=new Jn(s,r),s._enter=c,s._exit=u,s}function Kve(){return new Jn(this._exit||this._groups.map(v$),this._parents)}function Yve(e,t,n){var r=this.enter(),i=this,a=this.exit();return r=typeof e=="function"?e(r):r.append(e+""),t!=null&&(i=t(i)),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function Xve(e){if(!(e instanceof Jn))throw new Error("invalid merge");for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),s=new Array(r),c=0;c=0;)(s=r[i])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function Jve(e){e||(e=eye);function t(m,p){return m&&p?e(m.__data__,p.__data__):!m-!p}for(var n=this._groups,r=n.length,i=new Array(r),a=0;at?1:e>=t?0:NaN}function tye(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function nye(){return Array.from(this)}function rye(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?mye:typeof t=="function"?gye:pye)(e,t,n??"")):Bc(this.node(),e)}function Bc(e,t){return e.style.getPropertyValue(t)||y$(e).getComputedStyle(e,null).getPropertyValue(t)}function yye(e){return function(){delete this[e]}}function xye(e,t){return function(){this[e]=t}}function bye(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function wye(e,t){return arguments.length>1?this.each((t==null?yye:typeof t=="function"?bye:xye)(e,t)):this.node()[e]}function x$(e){return e.trim().split(/^|\s+/)}function Ej(e){return e.classList||new b$(e)}function b$(e){this._node=e,this._names=x$(e.getAttribute("class")||"")}b$.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function w$(e,t){for(var n=Ej(e),r=-1,i=t.length;++r=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function Kye(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n=0&&e._call.call(null,t),e=e._next;--zc}function rk(){Fs=($g=Tf.now())+cv,zc=td=0;try{sxe()}finally{zc=0,cxe(),Fs=0}}function lxe(){var e=Tf.now(),t=e-$g;t>S$&&(cv-=t,$g=e)}function cxe(){for(var e,t=Lg,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Lg=n);nd=e,Aw(r)}function Aw(e){if(!zc){td&&(td=clearTimeout(td));var t=e-Fs;t>24?(e<1/0&&(td=setTimeout(rk,e-Tf.now()-cv)),Du&&(Du=clearInterval(Du))):(Du||($g=Tf.now(),Du=setInterval(lxe,S$)),zc=1,P$(rk))}}function ik(e,t,n){var r=new Ig;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var uxe=Sj("start","end","cancel","interrupt"),dxe=[],O$=0,ak=1,Tw=2,Lm=3,ok=4,Mw=5,$m=6;function uv(e,t,n,r,i,a){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;fxe(e,n,{name:t,index:r,group:i,on:uxe,tween:dxe,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:O$})}function kj(e,t){var n=vi(e,t);if(n.state>O$)throw new Error("too late; already scheduled");return n}function qi(e,t){var n=vi(e,t);if(n.state>Lm)throw new Error("too late; already running");return n}function vi(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function fxe(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=E$(a,0,n.time);function a(d){n.state=ak,n.timer.restart(s,n.delay,n.time),n.delay<=d&&s(d-n.delay)}function s(d){var h,m,p,v;if(n.state!==ak)return u();for(h in r)if(v=r[h],v.name===n.name){if(v.state===Lm)return ik(s);v.state===ok?(v.state=$m,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete r[h]):+hTw&&r.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function Uxe(e,t,n){var r,i,a=zxe(t)?kj:qi;return function(){var s=a(this,e),c=s.on;c!==r&&(i=(r=c).copy()).on(t,n),s.on=i}}function Wxe(e,t){var n=this._id;return arguments.length<2?vi(this.node(),n).on.on(e):this.each(Uxe(n,e,t))}function Hxe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Vxe(){return this.on("end.remove",Hxe(this._id))}function qxe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Pj(e));for(var r=this._groups,i=r.length,a=new Array(i),s=0;s()=>e;function vbe(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function va(e,t,n){this.k=e,this.x=t,this.y=n}va.prototype={constructor:va,scale:function(e){return e===1?this:new va(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new va(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Aj=new va(1,0,0);va.prototype;function rx(e){e.stopImmediatePropagation()}function Bu(e){e.preventDefault(),e.stopImmediatePropagation()}function ybe(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function xbe(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function sk(){return this.__zoom||Aj}function bbe(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function wbe(){return navigator.maxTouchPoints||"ontouchstart"in this}function _be(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),s>a?(a+s)/2:Math.min(0,a)||Math.max(0,s))}function jbe(){var e=ybe,t=xbe,n=_be,r=bbe,i=wbe,a=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],c=250,u=lre,d=Sj("start","zoom","end"),h,m,p,v=500,_=150,x=0,y=10;function w(I){I.property("__zoom",sk).on("wheel.zoom",A).on("mousedown.zoom",T).on("dblclick.zoom",$).filter(i).on("touchstart.zoom",z).on("touchmove.zoom",D).on("touchend.zoom touchcancel.zoom",Z).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(I,F,B,G){var R=I.selection?I.selection():I;R.property("__zoom",sk),I!==R?P(I,F,B,G):R.interrupt().each(function(){O(this,arguments).event(G).start().zoom(null,typeof F=="function"?F.apply(this,arguments):F).end()})},w.scaleBy=function(I,F,B,G){w.scaleTo(I,function(){var R=this.__zoom.k,K=typeof F=="function"?F.apply(this,arguments):F;return R*K},B,G)},w.scaleTo=function(I,F,B,G){w.transform(I,function(){var R=t.apply(this,arguments),K=this.__zoom,W=B==null?E(R):typeof B=="function"?B.apply(this,arguments):B,U=K.invert(W),Y=typeof F=="function"?F.apply(this,arguments):F;return n(j(b(K,Y),W,U),R,s)},B,G)},w.translateBy=function(I,F,B,G){w.transform(I,function(){return n(this.__zoom.translate(typeof F=="function"?F.apply(this,arguments):F,typeof B=="function"?B.apply(this,arguments):B),t.apply(this,arguments),s)},null,G)},w.translateTo=function(I,F,B,G,R){w.transform(I,function(){var K=t.apply(this,arguments),W=this.__zoom,U=G==null?E(K):typeof G=="function"?G.apply(this,arguments):G;return n(Aj.translate(U[0],U[1]).scale(W.k).translate(typeof F=="function"?-F.apply(this,arguments):-F,typeof B=="function"?-B.apply(this,arguments):-B),K,s)},G,R)};function b(I,F){return F=Math.max(a[0],Math.min(a[1],F)),F===I.k?I:new va(F,I.x,I.y)}function j(I,F,B){var G=F[0]-B[0]*I.k,R=F[1]-B[1]*I.k;return G===I.x&&R===I.y?I:new va(I.k,G,R)}function E(I){return[(+I[0][0]+ +I[1][0])/2,(+I[0][1]+ +I[1][1])/2]}function P(I,F,B,G){I.on("start.zoom",function(){O(this,arguments).event(G).start()}).on("interrupt.zoom end.zoom",function(){O(this,arguments).event(G).end()}).tween("zoom",function(){var R=this,K=arguments,W=O(R,K).event(G),U=t.apply(R,K),Y=B==null?E(U):typeof B=="function"?B.apply(R,K):B,ne=Math.max(U[1][0]-U[0][0],U[1][1]-U[0][1]),ae=R.__zoom,ee=typeof F=="function"?F.apply(R,K):F,ce=u(ae.invert(Y).concat(ne/ae.k),ee.invert(Y).concat(ne/ee.k));return function(Ne){if(Ne===1)Ne=ee;else{var Ee=ce(Ne),se=ne/Ee[2];Ne=new va(se,Y[0]-Ee[0]*se,Y[1]-Ee[1]*se)}W.zoom(null,Ne)}})}function O(I,F,B){return!B&&I.__zooming||new C(I,F)}function C(I,F){this.that=I,this.args=F,this.active=0,this.sourceEvent=null,this.extent=t.apply(I,F),this.taps=0}C.prototype={event:function(I){return I&&(this.sourceEvent=I),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(I,F){return this.mouse&&I!=="mouse"&&(this.mouse[1]=F.invert(this.mouse[0])),this.touch0&&I!=="touch"&&(this.touch0[1]=F.invert(this.touch0[0])),this.touch1&&I!=="touch"&&(this.touch1[1]=F.invert(this.touch1[0])),this.that.__zoom=F,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(I){var F=ua(this.that).datum();d.call(I,this.that,new vbe(I,{sourceEvent:this.sourceEvent,target:w,transform:this.that.__zoom,dispatch:d}),F)}};function A(I,...F){if(!e.apply(this,arguments))return;var B=O(this,F).event(I),G=this.__zoom,R=Math.max(a[0],Math.min(a[1],G.k*Math.pow(2,r.apply(this,arguments)))),K=Vo(I);if(B.wheel)(B.mouse[0][0]!==K[0]||B.mouse[0][1]!==K[1])&&(B.mouse[1]=G.invert(B.mouse[0]=K)),clearTimeout(B.wheel);else{if(G.k===R)return;B.mouse=[K,G.invert(K)],Im(this),B.start()}Bu(I),B.wheel=setTimeout(W,_),B.zoom("mouse",n(j(b(G,R),B.mouse[0],B.mouse[1]),B.extent,s));function W(){B.wheel=null,B.end()}}function T(I,...F){if(p||!e.apply(this,arguments))return;var B=O(this,F,!0).event(I),G=ua(I.view).on("mousemove.zoom",Y,!0).on("mouseup.zoom",ne,!0),R=Vo(I,K),K=I.currentTarget,W=I.clientX,U=I.clientY;ixe(I.view),rx(I),B.mouse=[R,this.__zoom.invert(R)],Im(this),B.start();function Y(ae){if(Bu(ae),!B.moved){var ee=ae.clientX-W,ce=ae.clientY-U;B.moved=ee*ee+ce*ce>x}B.event(ae).zoom("mouse",n(j(B.that.__zoom,B.mouse[0]=Vo(ae,K),B.mouse[1]),B.extent,s))}function ne(ae){G.on("mousemove.zoom mouseup.zoom",null),axe(ae.view,B.moved),Bu(ae),B.event(ae).end()}}function $(I,...F){if(e.apply(this,arguments)){var B=this.__zoom,G=Vo(I.changedTouches?I.changedTouches[0]:I,this),R=B.invert(G),K=B.k*(I.shiftKey?.5:2),W=n(j(b(B,K),G,R),t.apply(this,F),s);Bu(I),c>0?ua(this).transition().duration(c).call(P,W,G,I):ua(this).call(w.transform,W,G,I)}}function z(I,...F){if(e.apply(this,arguments)){var B=I.touches,G=B.length,R=O(this,F,I.changedTouches.length===G).event(I),K,W,U,Y;for(rx(I),W=0;W=0)&&(n[i]=e[i]);return n}function Zr(e,t){if(e==null)return{};var n=Sbe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function fn(e,t){return Pbe(e)||Ebe(e,t)||Obe(e,t)||kbe()}function Pbe(e){if(Array.isArray(e))return e}function Ebe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,a=!1,s,c;try{for(n=n.call(e);!(i=(s=n.next()).done)&&(r.push(s.value),!(t&&r.length===t));i=!0);}catch(u){a=!0,c=u}finally{try{!i&&n.return!=null&&n.return()}finally{if(a)throw c}}return r}}function Obe(e,t){if(e){if(typeof e=="string")return ck(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ck(e,t)}}function ck(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:30,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:30,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:.5,r=Array.isArray(n)?n:[n,n],i=e/2*r[0],a=t/2*r[1];return"M".concat(0,",",0," Q",-e/2-i,",").concat(-t/2+a," ").concat(-e,",").concat(-t)}function Dbe(e){return typeof e=="string"}function Bbe(e){var t=e.geography,n=e.parseGeographies,r=N.useContext(Zi),i=r.path,a=N.useState({}),s=fn(a,2),c=s[0],u=s[1];N.useEffect(function(){(typeof window>"u"?"undefined":Lw(window))!=="undefined"&&t&&(Dbe(t)?$be(t).then(function(v){v&&u({geographies:dk(v,n),mesh:fk(v)})}):u({geographies:dk(t,n),mesh:fk(t)}))},[t,n]);var d=N.useMemo(function(){var v=c.mesh||{},_=Ibe(v.outline,v.borders,i);return{geographies:Rbe(c.geographies,i),outline:_.outline,borders:_.borders}},[c,i]),h=d.geographies,m=d.outline,p=d.borders;return{geographies:h,outline:m,borders:p}}var zbe=["geography","children","parseGeographies","className"],Mj=N.forwardRef(function(e,t){var n=e.geography,r=e.children,i=e.parseGeographies,a=e.className,s=a===void 0?"":a,c=Zr(e,zbe),u=N.useContext(Zi),d=u.path,h=u.projection,m=Bbe({geography:n,parseGeographies:i}),p=m.geographies,v=m.outline,_=m.borders;return H.createElement("g",er({ref:t,className:"rsm-geographies ".concat(s)},c),p&&p.length>0&&r({geographies:p,outline:v,borders:_,path:d,projection:h}))});Mj.displayName="Geographies";Mj.propTypes={geography:re.oneOfType([re.string,re.object,re.array]),children:re.func,parseGeographies:re.func,className:re.string};var Ube=["geography","onMouseEnter","onMouseLeave","onMouseDown","onMouseUp","onFocus","onBlur","style","className"],Lj=N.forwardRef(function(e,t){var n=e.geography,r=e.onMouseEnter,i=e.onMouseLeave,a=e.onMouseDown,s=e.onMouseUp,c=e.onFocus,u=e.onBlur,d=e.style,h=d===void 0?{}:d,m=e.className,p=m===void 0?"":m,v=Zr(e,Ube),_=N.useState(!1),x=fn(_,2),y=x[0],w=x[1],b=N.useState(!1),j=fn(b,2),E=j[0],P=j[1];function O(D){P(!0),r&&r(D)}function C(D){P(!1),y&&w(!1),i&&i(D)}function A(D){P(!0),c&&c(D)}function T(D){P(!1),y&&w(!1),u&&u(D)}function $(D){w(!0),a&&a(D)}function z(D){w(!1),s&&s(D)}return H.createElement("path",er({ref:t,tabIndex:"0",className:"rsm-geography ".concat(p),d:n.svgPath,onMouseEnter:O,onMouseLeave:C,onFocus:A,onBlur:T,onMouseDown:$,onMouseUp:z,style:h[y||E?y?"pressed":"hover":"default"]},v))});Lj.displayName="Geography";Lj.propTypes={geography:re.object,onMouseEnter:re.func,onMouseLeave:re.func,onMouseDown:re.func,onMouseUp:re.func,onFocus:re.func,onBlur:re.func,style:re.object,className:re.string};var Wbe=N.memo(Lj),Hbe=["fill","stroke","step","className"],$j=N.forwardRef(function(e,t){var n=e.fill,r=n===void 0?"transparent":n,i=e.stroke,a=i===void 0?"currentcolor":i,s=e.step,c=s===void 0?[10,10]:s,u=e.className,d=u===void 0?"":u,h=Zr(e,Hbe),m=N.useContext(Zi),p=m.path;return H.createElement("path",er({ref:t,d:p(uj().step(c)()),fill:r,stroke:a,className:"rsm-graticule ".concat(d)},h))});$j.displayName="Graticule";$j.propTypes={fill:re.string,stroke:re.string,step:re.array,className:re.string};N.memo($j);var Vbe=["value"],qbe=N.createContext(),Zbe={x:0,y:0,k:1,transformString:"translate(0 0) scale(1)"},M$=function(t){var n=t.value,r=n===void 0?Zbe:n,i=Zr(t,Vbe);return H.createElement(qbe.Provider,er({value:r},i))};M$.propTypes={x:re.number,y:re.number,k:re.number,transformString:re.string};function Gbe(e){var t=e.center,n=e.filterZoomEvent,r=e.onMoveStart,i=e.onMoveEnd,a=e.onMove,s=e.translateExtent,c=s===void 0?[[-1/0,-1/0],[1/0,1/0]]:s,u=e.scaleExtent,d=u===void 0?[1,8]:u,h=e.zoom,m=h===void 0?1:h,p=N.useContext(Zi),v=p.width,_=p.height,x=p.projection,y=fn(t,2),w=y[0],b=y[1],j=N.useState({x:0,y:0,k:1}),E=fn(j,2),P=E[0],O=E[1],C=N.useRef({x:0,y:0,k:1}),A=N.useRef(),T=N.useRef(),$=N.useRef(!1),z=fn(c,2),D=z[0],Z=z[1],I=fn(D,2),F=I[0],B=I[1],G=fn(Z,2),R=G[0],K=G[1],W=fn(d,2),U=W[0],Y=W[1];return N.useEffect(function(){var ne=ua(A.current);function ae(se){!r||$.current||r({coordinates:x.invert(uk(v,_,se.transform)),zoom:se.transform.k},se)}function ee(se){if(!$.current){var ye=se.transform,je=se.sourceEvent;O({x:ye.x,y:ye.y,k:ye.k,dragging:je}),a&&a({x:ye.x,y:ye.y,zoom:ye.k,dragging:je},se)}}function ce(se){if($.current){$.current=!1;return}var ye=x.invert(uk(v,_,se.transform)),je=fn(ye,2),ie=je[0],Ve=je[1];C.current={x:ie,y:Ve,k:se.transform.k},i&&i({coordinates:[ie,Ve],zoom:se.transform.k},se)}function Ne(se){return n?n(se):se?!se.ctrlKey&&!se.button:!1}var Ee=jbe().filter(Ne).scaleExtent([U,Y]).translateExtent([[F,B],[R,K]]).on("start",ae).on("zoom",ee).on("end",ce);T.current=Ee,ne.call(Ee)},[v,_,F,B,R,K,U,Y,x,r,a,i,n]),N.useEffect(function(){if(!(w===C.current.x&&b===C.current.y&&m===C.current.k)){var ne=x([w,b]),ae=ne[0]*m,ee=ne[1]*m,ce=ua(A.current);$.current=!0,ce.call(T.current.transform,Aj.translate(v/2-ae,_/2-ee).scale(m)),O({x:v/2-ae,y:_/2-ee,k:m}),C.current={x:w,y:b,k:m}}},[w,b,m,v,_,x]),{mapRef:A,position:P,transformString:"translate(".concat(P.x," ").concat(P.y,") scale(").concat(P.k,")")}}var Kbe=["center","zoom","minZoom","maxZoom","translateExtent","filterZoomEvent","onMoveStart","onMove","onMoveEnd","className"],L$=N.forwardRef(function(e,t){var n=e.center,r=n===void 0?[0,0]:n,i=e.zoom,a=i===void 0?1:i,s=e.minZoom,c=s===void 0?1:s,u=e.maxZoom,d=u===void 0?8:u,h=e.translateExtent,m=e.filterZoomEvent,p=e.onMoveStart,v=e.onMove,_=e.onMoveEnd,x=e.className,y=Zr(e,Kbe),w=N.useContext(Zi),b=w.width,j=w.height,E=Gbe({center:r,filterZoomEvent:m,onMoveStart:p,onMove:v,onMoveEnd:_,scaleExtent:[c,d],translateExtent:h,zoom:a}),P=E.mapRef,O=E.transformString,C=E.position;return H.createElement(M$,{value:{x:C.x,y:C.y,k:C.k,transformString:O}},H.createElement("g",{ref:P},H.createElement("rect",{width:b,height:j,fill:"transparent"}),H.createElement("g",er({ref:t,transform:O,className:"rsm-zoomable-group ".concat(x)},y))))});L$.displayName="ZoomableGroup";L$.propTypes={center:re.array,zoom:re.number,minZoom:re.number,maxZoom:re.number,translateExtent:re.arrayOf(re.array),onMoveStart:re.func,onMove:re.func,onMoveEnd:re.func,className:re.string};var Ybe=["id","fill","stroke","strokeWidth","className"],Ij=N.forwardRef(function(e,t){var n=e.id,r=n===void 0?"rsm-sphere":n,i=e.fill,a=i===void 0?"transparent":i,s=e.stroke,c=s===void 0?"currentcolor":s,u=e.strokeWidth,d=u===void 0?.5:u,h=e.className,m=h===void 0?"":h,p=Zr(e,Ybe),v=N.useContext(Zi),_=v.path,x=N.useMemo(function(){return _({type:"Sphere"})},[_]);return H.createElement(N.Fragment,null,H.createElement("defs",null,H.createElement("clipPath",{id:r},H.createElement("path",{d:x}))),H.createElement("path",er({ref:t,d:x,fill:a,stroke:c,strokeWidth:d,style:{pointerEvents:"none"},className:"rsm-sphere ".concat(m)},p)))});Ij.displayName="Sphere";Ij.propTypes={id:re.string,fill:re.string,stroke:re.string,strokeWidth:re.number,className:re.string};N.memo(Ij);var Xbe=["coordinates","children","onMouseEnter","onMouseLeave","onMouseDown","onMouseUp","onFocus","onBlur","style","className"],$$=N.forwardRef(function(e,t){var n=e.coordinates,r=e.children,i=e.onMouseEnter,a=e.onMouseLeave,s=e.onMouseDown,c=e.onMouseUp,u=e.onFocus,d=e.onBlur,h=e.style,m=h===void 0?{}:h,p=e.className,v=p===void 0?"":p,_=Zr(e,Xbe),x=N.useContext(Zi),y=x.projection,w=N.useState(!1),b=fn(w,2),j=b[0],E=b[1],P=N.useState(!1),O=fn(P,2),C=O[0],A=O[1],T=y(n),$=fn(T,2),z=$[0],D=$[1];function Z(K){A(!0),i&&i(K)}function I(K){A(!1),j&&E(!1),a&&a(K)}function F(K){A(!0),u&&u(K)}function B(K){A(!1),j&&E(!1),d&&d(K)}function G(K){E(!0),s&&s(K)}function R(K){E(!1),c&&c(K)}return H.createElement("g",er({ref:t,transform:"translate(".concat(z,", ").concat(D,")"),className:"rsm-marker ".concat(v),onMouseEnter:Z,onMouseLeave:I,onFocus:F,onBlur:B,onMouseDown:G,onMouseUp:R,style:m[j||C?j?"pressed":"hover":"default"]},_),r)});$$.displayName="Marker";$$.propTypes={coordinates:re.array,children:re.oneOfType([re.node,re.arrayOf(re.node)]),onMouseEnter:re.func,onMouseLeave:re.func,onMouseDown:re.func,onMouseUp:re.func,onFocus:re.func,onBlur:re.func,style:re.object,className:re.string};var Qbe=["from","to","coordinates","stroke","strokeWidth","fill","className"],I$=N.forwardRef(function(e,t){var n=e.from,r=n===void 0?[0,0]:n,i=e.to,a=i===void 0?[0,0]:i,s=e.coordinates,c=e.stroke,u=c===void 0?"currentcolor":c,d=e.strokeWidth,h=d===void 0?3:d,m=e.fill,p=m===void 0?"transparent":m,v=e.className,_=v===void 0?"":v,x=Zr(e,Qbe),y=N.useContext(Zi),w=y.path,b={type:"LineString",coordinates:s||[r,a]};return H.createElement("path",er({ref:t,d:w(b),className:"rsm-line ".concat(_),stroke:u,strokeWidth:h,fill:p},x))});I$.displayName="Line";I$.propTypes={from:re.array,to:re.array,coordinates:re.array,stroke:re.string,strokeWidth:re.number,fill:re.string,className:re.string};var Jbe=["subject","children","connectorProps","dx","dy","curve","className"],R$=N.forwardRef(function(e,t){var n=e.subject,r=e.children,i=e.connectorProps,a=e.dx,s=a===void 0?30:a,c=e.dy,u=c===void 0?30:c,d=e.curve,h=d===void 0?0:d,m=e.className,p=m===void 0?"":m,v=Zr(e,Jbe),_=N.useContext(Zi),x=_.projection,y=x(n),w=fn(y,2),b=w[0],j=w[1],E=Fbe(s,u,h);return H.createElement("g",er({ref:t,transform:"translate(".concat(b+s,", ").concat(j+u,")"),className:"rsm-annotation ".concat(p)},v),H.createElement("path",er({d:E,fill:"transparent",stroke:"#000"},i)),r)});R$.displayName="Annotation";R$.propTypes={subject:re.array,children:re.oneOfType([re.node,re.arrayOf(re.node)]),dx:re.number,dy:re.number,curve:re.number,connectorProps:re.object,className:re.string};const e1e="https://cdn.jsdelivr.net/npm/us-atlas@3/states-10m.json",t1e={AL:"01",AK:"02",AZ:"04",AR:"05",CA:"06",CO:"08",CT:"09",DE:"10",FL:"12",GA:"13",HI:"15",ID:"16",IL:"17",IN:"18",IA:"19",KS:"20",KY:"21",LA:"22",ME:"23",MD:"24",MA:"25",MI:"26",MN:"27",MS:"28",MO:"29",MT:"30",NE:"31",NV:"32",NH:"33",NJ:"34",NM:"35",NY:"36",NC:"37",ND:"38",OH:"39",OK:"40",OR:"41",PA:"42",RI:"44",SC:"45",SD:"46",TN:"47",TX:"48",UT:"49",VT:"50",VA:"51",WA:"53",WV:"54",WI:"55",WY:"56",DC:"11",PR:"72"},n1e=Object.fromEntries(Object.entries(t1e).map(([e,t])=>[t,e])),r1e={mandate:"#4CAF50",removal:"#F44336",study:"#9C27B0",coverage_expansion:"#4CAF50",screening:"#FF9800",provider_access:"#2196F3",expansion:"#4CAF50",coverage:"#2196F3",reimbursement:"#FF9800",eligibility:"#9C27B0",requirement:"#FF9800",curriculum:"#2196F3",reform:"#9C27B0",protection:"#4CAF50",restriction:"#F44336",support:"#4CAF50",oppose:"#F44336",regulate:"#FF9800",funding:"#2196F3",other:"#9E9E9E"},F$=e=>r1e[e]||"#9E9E9E",hk=(e,t)=>{const n=t[e];if(!n||n.total_bills===0)return"#E3F2FD";const{primary_type:r,primary_status:i}=n;let a=F$(r);return i==="enacted"?mk(a,-20):i==="failed"?mk(a,40):a},mk=(e,t)=>{const n=parseInt(e.replace("#",""),16),r=Math.round(2.55*t),i=(n>>16)+r,a=(n>>8&255)+r,s=(n&255)+r;return"#"+(16777216+(i<255?i<1?0:i:255)*65536+(a<255?a<1?0:a:255)*256+(s<255?s<1?0:s:255)).toString(16).slice(1).toUpperCase()},i1e=(e,t)=>{const n=t[e];if(!n||n.total_bills===0)return null;const{primary_status:r}=n;return r==="failed"?"crosshatch":r==="enacted"?"diagonal":null};function a1e({stateData:e,onStateClick:t,legend:n}){const[r,i]=N.useState(null),[a,s]=N.useState({x:0,y:0}),c=N.useRef(null),u=N.useRef(null),d=N.useRef(null),h=(n==null?void 0:n.types)||{};n!=null&&n.statuses;const m=y=>{if(!y||!d.current)return{x:0,y:0};const w=y.getBoundingClientRect(),b=d.current.getBoundingClientRect();return{x:w.left-b.left+w.width/2,y:w.top-b.top}};N.useEffect(()=>{const y=()=>{r&&u.current&&s(m(u.current))};if(r)return window.addEventListener("scroll",y,!0),()=>window.removeEventListener("scroll",y,!0)},[r]);const p=(y,w)=>{c.current&&(clearTimeout(c.current),c.current=null),u.current=y.target,r?r!==w&&(c.current=setTimeout(()=>{i(w),s(m(y.target))},200)):(i(w),s(m(y.target)))},v=()=>{c.current&&(clearTimeout(c.current),c.current=null)},_=()=>{i(null),c.current&&(clearTimeout(c.current),c.current=null)},x=r?e[r]:null;return o.jsxs("div",{ref:d,className:"relative",children:[o.jsx("svg",{width:"0",height:"0",children:o.jsxs("defs",{children:[o.jsxs("pattern",{id:"crosshatch",width:"10",height:"10",patternUnits:"userSpaceOnUse",children:[o.jsx("line",{x1:"0",y1:"0",x2:"10",y2:"10",stroke:"#000",strokeWidth:"1",opacity:"0.3"}),o.jsx("line",{x1:"10",y1:"0",x2:"0",y2:"10",stroke:"#000",strokeWidth:"1",opacity:"0.3"})]}),o.jsx("pattern",{id:"diagonal",width:"10",height:"10",patternUnits:"userSpaceOnUse",children:o.jsx("line",{x1:"0",y1:"0",x2:"10",y2:"10",stroke:"#000",strokeWidth:"2",opacity:"0.4"})})]})}),o.jsx(Tj,{projection:"geoAlbersUsa",projectionConfig:{scale:1e3},className:"w-full h-auto",children:o.jsx(Mj,{geography:e1e,children:({geographies:y})=>y.map(w=>{const b=w.id,j=n1e[b]||b;e[j];const E=i1e(j,e);return o.jsx(Wbe,{geography:w,fill:E?`url(#${E})`:hk(j,e),stroke:"#FFFFFF",strokeWidth:.5,style:{default:{fill:hk(j,e),outline:"none"},hover:{fill:"#607D8B",outline:"none",cursor:"pointer"},pressed:{fill:"#455A64",outline:"none"}},onClick:()=>t==null?void 0:t(j),onMouseEnter:P=>p(P,j),onMouseLeave:v},w.rsmKey)})})}),r&&x&&o.jsx("div",{className:"absolute z-50 pointer-events-auto",style:{left:`${a.x}px`,top:`${a.y-10}px`,transform:"translate(-50%, -100%)"},children:o.jsxs("div",{className:"bg-gray-900 text-white px-4 py-3 rounded-lg shadow-xl max-w-sm border border-gray-700",children:[o.jsx("button",{onClick:_,className:"absolute top-2 right-2 text-gray-400 hover:text-white transition-colors","aria-label":"Close tooltip",children:o.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),o.jsxs("div",{className:"flex items-center justify-between mb-3",children:[o.jsx("div",{className:"font-bold text-lg",children:r}),o.jsxs("div",{className:"text-xs text-gray-400",children:[x.total_bills.toLocaleString()," bill",x.total_bills!==1?"s":""]})]}),x.total_bills>0&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"mb-3 p-2 bg-gray-800 rounded-md",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:` w-3 h-3 rounded-full ${x.primary_type==="removal"?"bg-red-500":x.primary_type==="mandate"?"bg-green-500":x.primary_type==="study"?"bg-blue-500":x.primary_type==="funding"?"bg-yellow-500":"bg-gray-500"} `}),o.jsxs("div",{children:[o.jsx("div",{className:"text-sm font-semibold text-white",children:h[x.primary_type]||x.primary_type}),o.jsx("div",{className:"text-xs text-gray-400",children:"Primary Type"})]})]}),o.jsx("div",{className:` px-2 py-1 rounded text-xs font-medium ${x.primary_status==="enacted"?"bg-green-500/30 text-green-300 border border-green-500/50":x.primary_status==="failed"?"bg-red-500/30 text-red-300 border border-red-500/50":"bg-yellow-500/30 text-yellow-300 border border-yellow-500/50"} `,children:x.primary_status==="enacted"?"✓ Enacted":x.primary_status==="failed"?"✗ Failed":"⏳ Pending"})]})}),x.sample_bills&&x.sample_bills.length>0&&o.jsxs("div",{className:"mb-3 max-h-48 overflow-y-auto",children:[o.jsx("div",{className:"text-xs font-medium text-gray-300 mb-2",children:"Recent Bills by Type:"}),o.jsx("div",{className:"space-y-2",children:(()=>{const y=x.sample_bills.reduce((w,b)=>(w[b.type]||(w[b.type]=[]),w[b.type].push(b),w),{});return Object.entries(y).map(([w,b])=>o.jsxs("div",{className:"bg-gray-800/50 rounded p-2",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[o.jsx("div",{className:` w-2 h-2 rounded-full ${w==="removal"?"bg-red-500":w==="mandate"?"bg-green-500":w==="study"?"bg-blue-500":w==="funding"?"bg-yellow-500":"bg-gray-500"} `}),o.jsxs("div",{className:"text-xs font-medium text-gray-200",children:[h[w]||w," (",b.length,")"]})]}),o.jsx("div",{className:"space-y-1 ml-4",children:b.map((j,E)=>o.jsxs(Se,{to:`/bill/${j.state}-${j.bill_number}`,className:"block text-xs hover:bg-gray-700/50 rounded px-2 py-1 transition-colors group",children:[o.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o.jsx("span",{className:"font-mono text-blue-300 group-hover:text-blue-200 font-semibold",children:j.bill_number}),o.jsx("span",{className:` px-1.5 py-0.5 rounded text-[10px] font-medium ${j.status==="enacted"?"bg-green-500/20 text-green-300":j.status==="failed"?"bg-red-500/20 text-red-300":"bg-yellow-500/20 text-yellow-300"} `,children:j.status==="enacted"?"✓ Enacted":j.status==="failed"?"✗ Failed":"⏳ Pending"})]}),o.jsxs("div",{className:"text-gray-400 text-[10px] mt-0.5 flex items-center gap-1",children:[j.date&&o.jsxs("span",{className:"text-gray-500",children:["📅 ",j.date]}),j.date&&j.action&&o.jsx("span",{className:"text-gray-600",children:"•"}),o.jsx("span",{className:"flex-1 truncate",children:j.action||"Click for details"})]})]},E))})]},w))})()})]}),o.jsxs("div",{className:"grid grid-cols-3 gap-2 mb-3 text-xs",children:[o.jsxs("div",{className:"bg-green-500/10 border border-green-500/30 rounded px-2 py-1.5",children:[o.jsx("div",{className:"text-green-400 font-bold text-base",children:x.status_counts.enacted}),o.jsx("div",{className:"text-green-300/70",children:"Enacted"})]}),o.jsxs("div",{className:"bg-yellow-500/10 border border-yellow-500/30 rounded px-2 py-1.5",children:[o.jsx("div",{className:"text-yellow-400 font-bold text-base",children:x.status_counts.pending}),o.jsx("div",{className:"text-yellow-300/70",children:"Pending"})]}),o.jsxs("div",{className:"bg-red-500/10 border border-red-500/30 rounded px-2 py-1.5",children:[o.jsx("div",{className:"text-red-400 font-bold text-base",children:x.status_counts.failed}),o.jsx("div",{className:"text-red-300/70",children:"Failed"})]})]}),o.jsxs("button",{onClick:()=>t&&t(r),className:"w-full bg-blue-600 hover:bg-blue-700 text-white font-medium text-sm py-2 px-3 rounded transition-colors flex items-center justify-center gap-2",children:[o.jsx("span",{children:"View All Bills"}),o.jsx("span",{className:"text-lg",children:"→"})]})]}),x.total_bills===0&&o.jsx("div",{className:"text-gray-400 text-sm italic text-center py-2",children:"No legislation found"}),o.jsx("div",{className:"absolute left-1/2 bottom-0 transform -translate-x-1/2 translate-y-full",style:{width:0,height:0,borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderTop:"8px solid rgb(17, 24, 39)"}})]})}),o.jsxs("div",{className:"absolute bottom-4 right-4 bg-white/95 rounded-lg shadow-lg p-4 border border-gray-200 max-w-xs",children:[o.jsx("div",{className:"text-sm font-semibold text-gray-800 mb-3",children:"Legend"}),(()=>{const y=new Set;return Object.values(e).forEach(w=>{w.primary_type&&y.add(w.primary_type)}),y.size>0&&o.jsxs("div",{className:"mb-3",children:[o.jsx("div",{className:"text-xs font-medium text-gray-600 mb-2",children:"Type of Legislation"}),o.jsxs("div",{className:"space-y-1",children:[Array.from(y).sort().map(w=>o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-4 h-4 rounded flex-shrink-0",style:{backgroundColor:F$(w)}}),o.jsx("span",{className:"text-xs text-gray-700 capitalize",children:h[w]||w.replace(/_/g," ")})]},w)),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-4 h-4 rounded flex-shrink-0",style:{backgroundColor:"#E3F2FD"}}),o.jsx("span",{className:"text-xs text-gray-700",children:"No Legislation"})]})]})]})})(),o.jsxs("div",{children:[o.jsx("div",{className:"text-xs font-medium text-gray-600 mb-2",children:"Status"}),o.jsxs("div",{className:"space-y-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-4 h-4 rounded border border-gray-300 flex-shrink-0",style:{backgroundColor:"#666"}}),o.jsx("span",{className:"text-xs text-gray-700",children:"Enacted (darker)"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-4 h-4 rounded border border-gray-300 flex-shrink-0 bg-white"}),o.jsx("span",{className:"text-xs text-gray-700",children:"Pending (normal)"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-4 h-4 rounded border border-gray-300 flex-shrink-0",style:{backgroundColor:"#ddd"}}),o.jsx("span",{className:"text-xs text-gray-700",children:"Failed (lighter)"})]})]})]})]})]})}function o1e(){var F,B,G,R,K;const[e,t]=Ws(),[n,r]=N.useState("map"),[i,a]=N.useState("AL"),[s,c]=N.useState(""),[u,d]=N.useState(""),h=e.get("topic")||"",[m,p]=N.useState(h),[v,_]=N.useState(!h);N.useEffect(()=>{t(m?{topic:m}:{})},[m,t]);const[x,y]=N.useState(1),w=20,{data:b,isLoading:j,error:E}=zt({queryKey:["billsMap",m,s],queryFn:async()=>{const W=new URLSearchParams;return m&&W.append("topic",m),s&&W.append("session",s),(await vt.get(`/bills/map?${W}`)).data},enabled:n==="map"&&!v&&m!=="",retry:2,retryDelay:1e3}),{data:P}=zt({queryKey:["sessions",i],queryFn:async()=>(await vt.get(`/bills/sessions?state=${i}`)).data,enabled:n==="list",retry:2,retryDelay:1e3}),{data:O,isLoading:C,error:A}=zt({queryKey:["bills",i,s,u,x],queryFn:async()=>{const W=new URLSearchParams({state:i,limit:w.toString(),offset:((x-1)*w).toString()});return s&&W.append("session",s),u&&W.append("q",u),(await vt.get(`/bills?${W}`)).data},enabled:n==="list",retry:2,retryDelay:1e3}),T=Math.ceil(((O==null?void 0:O.total)||0)/w),$=W=>{a(W),r("list")},z=W=>{p(W),_(!1),r("map")},D=()=>{_(!0),p("")},Z=b?Object.values(b.states).filter(W=>W.total_bills>0).length:0,I=b?Object.values(b.states).reduce((W,U)=>W+U.total_bills,0):0;return o.jsx("div",{className:"min-h-screen bg-gray-50 py-8",children:o.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[o.jsx("div",{className:"mb-8",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-3xl font-bold text-gray-900 mb-1",children:"📜 Legislative Policy Map"}),o.jsx("p",{className:"text-gray-600",children:v?"Choose a topic to explore state-by-state legislation":"Track state legislation initiatives compared across the country"})]}),!v&&o.jsx("button",{onClick:D,className:"flex items-center gap-2 px-4 py-2 rounded-md font-medium bg-gray-200 text-gray-700 hover:bg-gray-300 transition-colors",children:"← Back to Topics"}),!v&&o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("button",{onClick:()=>r("map"),className:`flex items-center gap-2 px-4 py-2 rounded-md font-medium transition-colors ${n==="map"?"bg-blue-600 text-white":"bg-gray-200 text-gray-700 hover:bg-gray-300"}`,children:[o.jsx(Ai,{className:"h-5 w-5"}),"Map View"]}),o.jsxs("button",{onClick:()=>r("list"),className:`flex items-center gap-2 px-4 py-2 rounded-md font-medium transition-colors ${n==="list"?"bg-blue-600 text-white":"bg-gray-200 text-gray-700 hover:bg-gray-300"}`,children:[o.jsx(tz,{className:"h-5 w-5"}),"List View"]})]})]})}),v&&o.jsxs("div",{className:"space-y-8",children:[o.jsxs("div",{className:"text-center max-w-3xl mx-auto",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-3",children:"Select a Policy Topic"}),o.jsx("p",{className:"text-gray-600",children:"Choose a topic below to see how states across the country are addressing it through legislation"})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[o.jsxs("button",{onClick:()=>z("fluoride"),className:"bg-white rounded-xl shadow-lg p-6 hover:shadow-xl transition-all hover:scale-105 text-left border-2 border-transparent hover:border-blue-500",children:[o.jsx("div",{className:"text-5xl mb-4",children:"💧"}),o.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-2",children:"Water Fluoridation"}),o.jsx("p",{className:"text-gray-600 text-sm mb-4",children:"Track mandates, removals, funding initiatives, and studies on community water fluoridation programs"}),o.jsx("div",{className:"text-blue-600 font-medium text-sm",children:"View Legislation →"})]}),o.jsxs("button",{onClick:()=>z("dental"),className:"bg-white rounded-xl shadow-lg p-6 hover:shadow-xl transition-all hover:scale-105 text-left border-2 border-transparent hover:border-blue-500",children:[o.jsx("div",{className:"text-5xl mb-4",children:"🦷"}),o.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-2",children:"Dental Health"}),o.jsx("p",{className:"text-gray-600 text-sm mb-4",children:"Monitor coverage expansions, screening programs, provider access, and funding for dental health services"}),o.jsx("div",{className:"text-blue-600 font-medium text-sm",children:"View Legislation →"})]}),o.jsxs("button",{onClick:()=>z("oral health"),className:"bg-white rounded-xl shadow-lg p-6 hover:shadow-xl transition-all hover:scale-105 text-left border-2 border-transparent hover:border-blue-500",children:[o.jsx("div",{className:"text-5xl mb-4",children:"😁"}),o.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-2",children:"Oral Health (General)"}),o.jsx("p",{className:"text-gray-600 text-sm mb-4",children:"Explore comprehensive oral health policies including prevention, treatment, and public health initiatives"}),o.jsx("div",{className:"text-blue-600 font-medium text-sm",children:"View Legislation →"})]}),o.jsxs("button",{onClick:()=>z("medicaid"),className:"bg-white rounded-xl shadow-lg p-6 hover:shadow-xl transition-all hover:scale-105 text-left border-2 border-transparent hover:border-blue-500",children:[o.jsx("div",{className:"text-5xl mb-4",children:"🏥"}),o.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-2",children:"Medicaid"}),o.jsx("p",{className:"text-gray-600 text-sm mb-4",children:"Follow Medicaid expansions, coverage changes, reimbursement rates, and eligibility requirements"}),o.jsx("div",{className:"text-blue-600 font-medium text-sm",children:"View Legislation →"})]}),o.jsxs("button",{onClick:()=>z("education"),className:"bg-white rounded-xl shadow-lg p-6 hover:shadow-xl transition-all hover:scale-105 text-left border-2 border-transparent hover:border-blue-500",children:[o.jsx("div",{className:"text-5xl mb-4",children:"🎓"}),o.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-2",children:"Education"}),o.jsx("p",{className:"text-gray-600 text-sm mb-4",children:"View educational requirements, curriculum changes, funding initiatives, and school health programs"}),o.jsx("div",{className:"text-blue-600 font-medium text-sm",children:"View Legislation →"})]}),o.jsxs("button",{onClick:()=>z("health"),className:"bg-white rounded-xl shadow-lg p-6 hover:shadow-xl transition-all hover:scale-105 text-left border-2 border-transparent hover:border-blue-500",children:[o.jsx("div",{className:"text-5xl mb-4",children:"🏨"}),o.jsx("h3",{className:"text-xl font-bold text-gray-900 mb-2",children:"Health (General)"}),o.jsx("p",{className:"text-gray-600 text-sm mb-4",children:"Examine broader health policies including protections, restrictions, funding, and healthcare reforms"}),o.jsx("div",{className:"text-blue-600 font-medium text-sm",children:"View Legislation →"})]})]})]}),!v&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 mb-4",children:o.jsx("div",{className:"flex items-center justify-between",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("span",{className:"text-2xl",children:[m==="fluoride"&&"💧",m==="dental"&&"🦷",m==="oral health"&&"😁",m==="medicaid"&&"🏥",m==="education"&&"🎓",m==="health"&&"🏨"]}),o.jsxs("div",{children:[o.jsx("div",{className:"text-sm text-gray-600",children:"Viewing legislation for:"}),o.jsx("div",{className:"text-lg font-bold text-gray-900 capitalize",children:m==="fluoride"?"Water Fluoridation":m==="dental"?"Dental Health":m==="oral health"?"Oral Health":m==="medicaid"?"Medicaid":m==="education"?"Education":"Health"})]})]})})}),o.jsx("div",{className:"bg-white rounded-lg shadow-sm p-4 mb-4",children:o.jsxs("div",{className:"flex flex-wrap items-end gap-4",children:[n==="list"&&o.jsxs("div",{className:"flex-1 min-w-[150px]",children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"State"}),o.jsxs("select",{className:"block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 text-sm text-gray-900 py-2",value:i,onChange:W=>{a(W.target.value),y(1)},children:[o.jsx("option",{value:"AL",children:"Alabama"}),o.jsx("option",{value:"GA",children:"Georgia"}),o.jsx("option",{value:"IN",children:"Indiana"}),o.jsx("option",{value:"MA",children:"Massachusetts"}),o.jsx("option",{value:"WA",children:"Washington"}),o.jsx("option",{value:"WI",children:"Wisconsin"})]})]}),n==="list"&&o.jsxs("div",{className:"flex-1 min-w-[200px]",children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Legislative Session"}),o.jsxs("select",{className:"block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 text-sm text-gray-900 py-2",value:s,onChange:W=>{c(W.target.value),y(1)},children:[o.jsx("option",{value:"",children:"All Sessions"}),(F=P==null?void 0:P.sessions)==null?void 0:F.map(W=>o.jsxs("option",{value:W.session,children:[W.session_name," (",W.bill_count.toLocaleString()," bills)"]},W.session))]})]}),o.jsxs("div",{className:"flex-1 min-w-[250px]",children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:n==="map"?"Search Keywords":"Search Bills"}),o.jsxs("div",{className:"relative",children:[o.jsx("input",{type:"text",className:"block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 pl-10 text-sm text-gray-900 py-2",placeholder:"Search within results...",value:u,onChange:W=>d(W.target.value),onKeyPress:W=>W.key==="Enter"&&y(1)}),o.jsx(nn,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"})]})]}),(u||s)&&o.jsx("button",{type:"button",onClick:()=>{d(""),c(""),y(1)},className:"px-4 py-2 bg-gray-200 text-gray-700 rounded-md hover:bg-gray-300 transition-colors text-sm font-medium",children:"Clear"})]})}),n==="map"&&o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6 mb-6",children:[o.jsxs("div",{className:"mb-6 border-b border-gray-200 pb-4",children:[o.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:m?o.jsxs(o.Fragment,{children:[m.charAt(0).toUpperCase()+m.slice(1)," Legislation Across the US"]}):o.jsx(o.Fragment,{children:"State-by-State Legislative Policy Overview"})}),o.jsxs("p",{className:"text-base text-gray-600",children:[m==="fluoride"&&o.jsx(o.Fragment,{children:"See which states mandate water fluoridation, which have removed it, and where funding or studies are underway. Each state's color shows the primary type of legislation, while darker/lighter shades indicate whether bills have been enacted, are pending, or have failed."}),m==="dental"&&o.jsx(o.Fragment,{children:"Track dental health policies including coverage expansion, screening programs, provider access initiatives, and funding. Colors show the main focus of legislation in each state, with shading indicating current status."}),m==="medicaid"&&o.jsx(o.Fragment,{children:"Monitor Medicaid program changes across states, including expansions, coverage modifications, reimbursement adjustments, and eligibility requirements. The map shows what type of Medicaid legislation is most active in each state."}),m==="health"&&o.jsx(o.Fragment,{children:"View health-related legislation including protections, restrictions, funding initiatives, and healthcare reforms. Each state's color indicates the dominant type of health policy being considered or enacted."}),m==="education"&&o.jsx(o.Fragment,{children:"Explore educational policy across states, from new requirements and curriculum changes to funding initiatives and system reforms. Colors represent the primary focus of education legislation in each state."}),!m&&o.jsx(o.Fragment,{children:"This interactive map shows legislative activity across all 50 states. Click any state to drill down into specific bills, or use the topic filter above to focus on a particular policy area. Colors indicate the primary type of legislation, while shading shows whether bills have been enacted (darker), are pending (normal), or failed (lighter)."})]})]}),E?o.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-8 text-center",children:[o.jsx("div",{className:"text-red-600 text-5xl mb-4",children:"⚠️"}),o.jsx("h3",{className:"text-lg font-semibold text-red-900 mb-2",children:"Failed to load map data"}),o.jsx("p",{className:"text-red-700",children:String(E)})]}):j?o.jsx("div",{className:"flex justify-center items-center h-96",children:o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto mb-4"}),o.jsx("p",{className:"text-gray-600",children:"Loading map..."})]})}):o.jsx(a1e,{stateData:(b==null?void 0:b.states)||{},onStateClick:$,legend:b==null?void 0:b.legend})]}),n==="map"&&b&&o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-6",children:[o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6 border-l-4 border-blue-500",children:[o.jsx("div",{className:"text-sm font-medium text-gray-600 uppercase tracking-wide",children:"States with Legislation"}),o.jsx("div",{className:"mt-2 text-3xl font-bold text-gray-900",children:Z}),o.jsx("div",{className:"text-sm text-gray-500 mt-1",children:m?`matching "${m}"`:"all topics"})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6 border-l-4 border-green-500",children:[o.jsx("div",{className:"text-sm font-medium text-gray-600 uppercase tracking-wide",children:"Total Bills"}),o.jsx("div",{className:"mt-2 text-3xl font-bold text-gray-900",children:I.toLocaleString()}),o.jsx("div",{className:"text-sm text-gray-500 mt-1",children:"across all states"})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6 border-l-4 border-purple-500",children:[o.jsx("div",{className:"text-sm font-medium text-gray-600 uppercase tracking-wide",children:"Filter Topic"}),o.jsx("div",{className:"mt-2 text-xl font-bold text-gray-900",children:m||"All Topics"}),o.jsx("div",{className:"text-sm text-gray-500 mt-1",children:"Click map to drill down"})]})]}),n==="list"&&O&&o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-6",children:[o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6 border-l-4 border-blue-500",children:[o.jsx("div",{className:"text-sm font-medium text-gray-600 uppercase tracking-wide",children:"Total Bills"}),o.jsx("div",{className:"mt-2 text-3xl font-bold text-gray-900",children:O.total.toLocaleString()}),o.jsx("div",{className:"text-sm text-gray-500 mt-1",children:s?`in ${s}`:"all sessions"})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6 border-l-4 border-green-500",children:[o.jsx("div",{className:"text-sm font-medium text-gray-600 uppercase tracking-wide",children:"Sessions Available"}),o.jsx("div",{className:"mt-2 text-3xl font-bold text-gray-900",children:(P==null?void 0:P.total_sessions)||0}),o.jsxs("div",{className:"text-sm text-gray-500 mt-1",children:[(G=(B=P==null?void 0:P.sessions)==null?void 0:B[0])==null?void 0:G.session," - ",(K=(R=P==null?void 0:P.sessions)==null?void 0:R[P.sessions.length-1])==null?void 0:K.session]})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6 border-l-4 border-purple-500",children:[o.jsx("div",{className:"text-sm font-medium text-gray-600 uppercase tracking-wide",children:"Showing"}),o.jsx("div",{className:"mt-2 text-3xl font-bold text-gray-900",children:O.bills.length}),o.jsxs("div",{className:"text-sm text-gray-500 mt-1",children:["Page ",x," of ",T]})]})]}),n==="list"&&o.jsx(o.Fragment,{children:A?o.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-8 text-center",children:[o.jsx("div",{className:"text-red-600 text-5xl mb-4",children:"⚠️"}),o.jsx("h3",{className:"text-xl font-semibold text-red-900 mb-2",children:"Unable to Load Bills"}),o.jsx("p",{className:"text-red-700 mb-4",children:A instanceof Error?A.message:"There was an error fetching bills data. The API server may be unavailable."}),o.jsxs("div",{className:"flex gap-3 justify-center",children:[o.jsx("button",{onClick:()=>window.location.reload(),className:"px-6 py-2 bg-red-600 text-white rounded-md hover:bg-red-700 transition-colors font-medium",children:"Retry"}),o.jsx("button",{onClick:()=>r("map"),className:"px-6 py-2 bg-gray-200 text-gray-700 rounded-md hover:bg-gray-300 transition-colors font-medium",children:"Switch to Map View"})]})]}):C?o.jsxs("div",{className:"text-center py-12",children:[o.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto"}),o.jsx("p",{className:"mt-4 text-gray-600",children:"Loading bills..."})]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"space-y-4 mb-6",children:O==null?void 0:O.bills.map(W=>o.jsx("div",{className:"bg-white rounded-lg shadow-sm p-6 hover:shadow-md transition-shadow border-l-4 border-blue-500",children:o.jsx("div",{className:"flex items-start justify-between",children:o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[o.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-blue-100 text-blue-800",children:W.bill_number}),o.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-gray-100 text-gray-800",children:W.classification.join(", ")}),o.jsx("span",{className:"text-sm text-gray-500",children:W.session_name})]}),o.jsx("h3",{className:"text-lg font-semibold text-gray-900 mb-2",children:W.title}),o.jsxs("div",{className:"flex items-center gap-4 text-sm text-gray-600",children:[o.jsxs("span",{children:[o.jsx("strong",{children:"Latest Action:"})," ",W.latest_action]}),W.latest_action_date&&o.jsxs("span",{children:[o.jsx("strong",{children:"Date:"})," ",new Date(W.latest_action_date).toLocaleDateString()]})]})]})})},W.bill_id))}),T>1&&o.jsxs("div",{className:"flex items-center justify-between bg-white rounded-lg shadow-sm p-4",children:[o.jsxs("div",{className:"text-sm text-gray-600",children:["Showing ",(x-1)*w+1," to"," ",Math.min(x*w,(O==null?void 0:O.total)||0)," of"," ",O==null?void 0:O.total.toLocaleString()," bills"]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx("button",{onClick:()=>y(W=>Math.max(1,W-1)),disabled:x===1,className:"px-4 py-2 bg-gray-200 text-gray-700 rounded-md hover:bg-gray-300 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:"Previous"}),o.jsxs("span",{className:"px-4 py-2 text-gray-700",children:["Page ",x," of ",T]}),o.jsx("button",{onClick:()=>y(W=>Math.min(T,W+1)),disabled:x===T,className:"px-4 py-2 bg-gray-200 text-gray-700 rounded-md hover:bg-gray-300 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:"Next"})]})]}),!C&&!A&&O&&O.bills.length===0&&o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-12 text-center",children:[o.jsx("p",{className:"text-gray-600 text-lg",children:"No bills found matching your filters."}),o.jsx("button",{onClick:()=>{d(""),c(""),y(1)},className:"mt-4 px-6 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors",children:"Clear Filters"})]})]})})]})]})})}function s1e(){var a,s,c,u,d;const{billId:e}=cR(),{data:t,isLoading:n,error:r}=zt({queryKey:["bill",e],queryFn:async()=>(await vt.get(`/bills/${e}`)).data,enabled:!!e});if(n)return o.jsx("div",{className:"min-h-screen bg-gray-50 py-8",children:o.jsx("div",{className:"max-w-4xl mx-auto px-4",children:o.jsx("div",{className:"flex justify-center items-center h-96",children:o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto mb-4"}),o.jsx("p",{className:"text-gray-600",children:"Loading bill details..."})]})})})});if(r||!t){const h=r instanceof Error?r.message:(s=(a=r==null?void 0:r.response)==null?void 0:a.data)!=null&&s.detail?r.response.data.detail:r!=null&&r.message?r.message:"Unable to load bill details";return o.jsx("div",{className:"min-h-screen bg-gray-50 py-8",children:o.jsx("div",{className:"max-w-4xl mx-auto px-4",children:o.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-8 text-center",children:[o.jsx("div",{className:"text-red-600 text-5xl mb-4",children:"⚠️"}),o.jsx("h3",{className:"text-lg font-semibold text-red-900 mb-2",children:"Bill not found"}),o.jsx("p",{className:"text-red-700 mb-4",children:h}),o.jsxs(Se,{to:"/policy-map",className:"inline-flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors",children:[o.jsx(wS,{className:"h-5 w-5"}),"Back to Policy Map"]})]})})})}const i=(c=t.latest_action)!=null&&c.toLowerCase().includes("enact")?"green":(u=t.latest_action)!=null&&u.toLowerCase().includes("fail")||(d=t.latest_action)!=null&&d.toLowerCase().includes("veto")?"red":"yellow";return o.jsx("div",{className:"min-h-screen bg-gray-50 py-8",children:o.jsxs("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8",children:[o.jsx("div",{className:"mb-6",children:o.jsxs(Se,{to:"/policy-map",className:"inline-flex items-center gap-2 text-blue-600 hover:text-blue-700 font-medium",children:[o.jsx(wS,{className:"h-5 w-5"}),"Back to Policy Map"]})}),o.jsx("div",{className:"bg-white rounded-lg shadow-sm p-6 mb-6",children:o.jsx("div",{className:"flex items-start justify-between mb-4",children:o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[o.jsx("span",{className:"inline-flex items-center px-4 py-2 rounded-lg text-lg font-bold bg-blue-100 text-blue-800",children:t.bill_number}),o.jsx("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-gray-100 text-gray-800",children:t.state}),o.jsx("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium ${i==="green"?"bg-green-100 text-green-800":i==="red"?"bg-red-100 text-red-800":"bg-yellow-100 text-yellow-800"}`,children:t.latest_action||"Status Unknown"})]}),o.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:t.title}),o.jsxs("div",{className:"flex items-center gap-4 text-sm text-gray-600",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(dc,{className:"h-4 w-4"}),o.jsx("span",{children:t.session_name})]}),t.classification&&t.classification.length>0&&o.jsx("span",{className:"text-gray-400",children:"•"}),t.classification&&t.classification.length>0&&o.jsx("span",{children:t.classification.join(", ")})]})]})})}),o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6 mb-6",children:[o.jsxs("h2",{className:"text-lg font-bold text-gray-900 mb-4 flex items-center gap-2",children:[o.jsx(ha,{className:"h-5 w-5"}),"Timeline"]}),o.jsxs("div",{className:"space-y-3",children:[t.first_action_date&&o.jsxs("div",{className:"flex gap-4",children:[o.jsx("div",{className:"text-sm text-gray-600 w-32",children:new Date(t.first_action_date).toLocaleDateString()}),o.jsx("div",{className:"flex-1",children:o.jsx("div",{className:"text-sm font-medium text-gray-900",children:"First Action"})})]}),t.latest_action_date&&o.jsxs("div",{className:"flex gap-4",children:[o.jsx("div",{className:"text-sm text-gray-600 w-32",children:new Date(t.latest_action_date).toLocaleDateString()}),o.jsxs("div",{className:"flex-1",children:[o.jsx("div",{className:"text-sm font-medium text-gray-900",children:"Latest Action"}),o.jsx("div",{className:"text-sm text-gray-600",children:t.latest_action})]})]})]})]}),t.sponsors&&t.sponsors.length>0&&o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6 mb-6",children:[o.jsx("h2",{className:"text-lg font-bold text-gray-900 mb-4",children:"Sponsors"}),o.jsx("div",{className:"space-y-2",children:t.sponsors.map((h,m)=>o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:`px-2 py-1 text-xs font-medium rounded ${h.primary?"bg-blue-100 text-blue-800":"bg-gray-100 text-gray-800"}`,children:h.primary?"Primary":"Co-sponsor"}),o.jsx("span",{className:"text-sm text-gray-900",children:h.name})]},m))})]}),t.actions&&t.actions.length>0&&o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6 mb-6",children:[o.jsxs("h2",{className:"text-lg font-bold text-gray-900 mb-4 flex items-center gap-2",children:[o.jsx(Ao,{className:"h-5 w-5"}),"Legislative Actions"]}),o.jsx("div",{className:"space-y-3",children:t.actions.map((h,m)=>o.jsxs("div",{className:"flex gap-4 border-l-2 border-gray-200 pl-4",children:[o.jsx("div",{className:"text-sm text-gray-600 w-32",children:new Date(h.date).toLocaleDateString()}),o.jsxs("div",{className:"flex-1",children:[o.jsx("div",{className:"text-sm text-gray-900",children:h.description}),h.classification&&h.classification.length>0&&o.jsx("div",{className:"text-xs text-gray-500 mt-1",children:h.classification.join(", ")})]})]},m))})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow-sm p-6",children:[o.jsx("h2",{className:"text-lg font-bold text-gray-900 mb-4",children:"Official Sources"}),o.jsxs("div",{className:"space-y-2",children:[t.openstates_url&&o.jsx("a",{href:t.openstates_url,target:"_blank",rel:"noopener noreferrer",className:"block text-blue-600 hover:text-blue-700 text-sm hover:underline",children:"View on OpenStates →"}),t.sources&&t.sources.map((h,m)=>o.jsxs("a",{href:h.url,target:"_blank",rel:"noopener noreferrer",className:"block text-blue-600 hover:text-blue-700 text-sm hover:underline",children:[h.note||"View on Legislature Website"," →"]},m))]})]})]})})}function l1e(){return o.jsx("div",{className:"min-h-screen bg-gradient-to-b from-blue-50 to-white flex items-center justify-center px-4",children:o.jsxs("div",{className:"max-w-2xl w-full text-center",children:[o.jsxs("div",{className:"mb-8",children:[o.jsx("h1",{className:"text-9xl font-bold text-blue-600 mb-4",children:"404"}),o.jsx("div",{className:"flex justify-center mb-6",children:o.jsx("svg",{className:"w-64 h-64 text-blue-200",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1,d:"M9.172 16.172a4 4 0 015.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})})]}),o.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-4",children:"Page Not Found"}),o.jsx("p",{className:"text-lg text-gray-600 mb-8",children:"Sorry, we couldn't find the page you're looking for. The page may have been moved, deleted, or never existed."}),o.jsxs("div",{className:"bg-white rounded-lg shadow-md p-8 mb-8",children:[o.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-6",children:"Try one of these popular pages:"}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsxs(Se,{to:"/",className:"flex items-center p-4 border-2 border-gray-200 rounded-lg hover:border-blue-500 hover:bg-blue-50 transition-all group",children:[o.jsx(s0,{className:"h-6 w-6 text-gray-400 group-hover:text-blue-600 mr-3"}),o.jsxs("div",{className:"text-left",children:[o.jsx("div",{className:"font-semibold text-gray-900 group-hover:text-blue-600",children:"Home"}),o.jsx("div",{className:"text-sm text-gray-500",children:"Return to homepage"})]})]}),o.jsxs(Se,{to:"/search",className:"flex items-center p-4 border-2 border-gray-200 rounded-lg hover:border-blue-500 hover:bg-blue-50 transition-all group",children:[o.jsx(nn,{className:"h-6 w-6 text-gray-400 group-hover:text-blue-600 mr-3"}),o.jsxs("div",{className:"text-left",children:[o.jsx("div",{className:"font-semibold text-gray-900 group-hover:text-blue-600",children:"Search"}),o.jsx("div",{className:"text-sm text-gray-500",children:"Find what you need"})]})]}),o.jsxs(Se,{to:"/explore",className:"flex items-center p-4 border-2 border-gray-200 rounded-lg hover:border-blue-500 hover:bg-blue-50 transition-all group",children:[o.jsx(Ai,{className:"h-6 w-6 text-gray-400 group-hover:text-blue-600 mr-3"}),o.jsxs("div",{className:"text-left",children:[o.jsx("div",{className:"font-semibold text-gray-900 group-hover:text-blue-600",children:"Explore"}),o.jsx("div",{className:"text-sm text-gray-500",children:"Browse categories"})]})]}),o.jsxs(Se,{to:"/dashboard",className:"flex items-center p-4 border-2 border-gray-200 rounded-lg hover:border-blue-500 hover:bg-blue-50 transition-all group",children:[o.jsx(Ao,{className:"h-6 w-6 text-gray-400 group-hover:text-blue-600 mr-3"}),o.jsxs("div",{className:"text-left",children:[o.jsx("div",{className:"font-semibold text-gray-900 group-hover:text-blue-600",children:"Dashboard"}),o.jsx("div",{className:"text-sm text-gray-500",children:"View your data"})]})]})]})]}),o.jsxs("div",{className:"text-gray-600",children:[o.jsxs("p",{className:"mb-4",children:["Need help? Check out our"," ",o.jsx("a",{href:"https://www.communityone.com/docs",className:"text-blue-600 hover:text-blue-800 font-semibold",children:"documentation"})," ","or"," ",o.jsx("a",{href:"mailto:johnbowyer@communityone.com",className:"text-blue-600 hover:text-blue-800 font-semibold",children:"contact support"}),"."]}),o.jsx("p",{className:"text-sm text-gray-500",children:"Error Code: 404 • Page Not Found"})]})]})})}function c1e(){return o.jsxs(PR,{children:[o.jsx(Ke,{path:"/",element:o.jsx(Fz,{})}),o.jsx(Ke,{path:"/classic",element:o.jsx(PS,{}),children:o.jsx(Ke,{index:!0,element:o.jsx(Rz,{})})}),o.jsxs(Ke,{path:"/",element:o.jsx(PS,{}),children:[o.jsx(Ke,{path:"explore",element:o.jsx(Gge,{})}),o.jsx(Ke,{path:"search",element:o.jsx(n0e,{})}),o.jsx(Ke,{path:"jurisdictions",element:o.jsx(i0e,{})}),o.jsx(Ke,{path:"dashboard",element:o.jsx(sge,{})}),o.jsx(Ke,{path:"analytics",element:o.jsx(lge,{})}),o.jsx(Ke,{path:"people",element:o.jsx(Bge,{})}),o.jsx(Ke,{path:"heatmap",element:o.jsx(kge,{})}),o.jsx(Ke,{path:"policy-map",element:o.jsx(o1e,{})}),o.jsx(Ke,{path:"bill/:billId",element:o.jsx(s1e,{})}),o.jsx(Ke,{path:"documents",element:o.jsx(Cge,{})}),o.jsx(Ke,{path:"opportunities",element:o.jsx(Age,{})}),o.jsx(Ke,{path:"nonprofits",element:o.jsx(Tge,{})}),o.jsx(Ke,{path:"nonprofits-hf",element:o.jsx(Rge,{})}),o.jsx(Ke,{path:"debate-grader",element:o.jsx(zge,{})}),o.jsx(Ke,{path:"profile",element:o.jsx(Wge,{})}),o.jsx(Ke,{path:"settings",element:o.jsx(Fge,{})}),o.jsx(Ke,{path:"events",element:o.jsx(Kge,{})}),o.jsx(Ke,{path:"services",element:o.jsx(Yge,{})}),o.jsx(Ke,{path:"developers",element:o.jsx(Xge,{})}),o.jsx(Ke,{path:"hackathons",element:o.jsx(Qge,{})}),o.jsx(Ke,{path:"opensource",element:o.jsx(Jge,{})}),o.jsx(Ke,{path:"advocacy-topics",element:o.jsx(e0e,{})}),o.jsx(Ke,{path:"fact-checking",element:o.jsx(t0e,{})})]}),o.jsx(Ke,{path:"*",element:o.jsx(l1e,{})})]})}const u1e=new cF({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1,staleTime:5*60*1e3}}});ax.createRoot(document.getElementById("root")).render(o.jsx(H.StrictMode,{children:o.jsx(uF,{client:u1e,children:o.jsxs(LR,{future:{v7_startTransition:!0,v7_relativeSplatPath:!0},children:[o.jsx(NF,{}),o.jsx(_F,{children:o.jsx(jF,{children:o.jsx(c1e,{})})})]})})}));