PageSourceSearch

https://regengine.ai/assets/index-DdSURpjc.js

js regengine.ai collected 2026-10-05 15:12:40 UTC 1,489,323 bytes, 829 lines download raw bytes

vendor: 6,369 bytes, lines 1-9
1var Lq=Object.defineProperty;var ck=e=>{throw TypeError(e)};var Fq=(e,t,n)=>t in e?Lq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var qi=(e,t,n)=>Fq(e,typeof t!="symbol"?t+"":t,n),ox=(e,t,n)=>t.has(e)||ck("Cannot "+n);var z=(e,t,n)=>(ox(e,t,"read from private field"),n?n.call(e):t.get(e)),Fe=(e,t,n)=>t.has(e)?ck("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ae=(e,t,n,r)=>(ox(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),sn=(e,t,n)=>(ox(e,t,"access private method"),n);var Wh=(e,t,n,r)=>({set _(i){Ae(e,t,i,n)},get _(){return z(e,t,r)}});function Bq(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>r[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 Hh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zR={exports:{}},gy={},VR={exports:{}},Re={};/**
2 * @license React
3 * react.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var vh=Symbol.for("react.element"),Uq=Symbol.for("react.portal"),qq=Symbol.for("react.fragment"),zq=Symbol.for("react.strict_mode"),Vq=Symbol.for("react.profiler"),Wq=Symbol.for("react.provider"),Hq=Symbol.for("react.context"),Gq=Symbol.for("react.forward_ref"),Kq=Symbol.for("react.suspense"),Yq=Symbol.for("react.memo"),Xq=Symbol.for("react.lazy"),uk=Symbol.iterator;function Zq(e){return e===null||typeof e!="object"?null:(e=uk&&e[uk]||e["@@iterator"],typeof e=="function"?e:null)}var WR={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},HR=Object.assign,GR={};function fu(e,t,n){this.props=e,this.context=t,this.refs=GR,this.updater=n||WR}fu.prototype.isReactComponent={};fu.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")};fu.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function KR(){}KR.prototype=fu.prototype;function RS(e,t,n){this.props=e,this.context=t,this.refs=GR,this.updater=n||WR}var MS=RS.prototype=new KR;MS.constructor=RS;HR(MS,fu.prototype);MS.isPureReactComponent=!0;var dk=Array.isArray,YR=Object.prototype.hasOwnProperty,$S={current:null},XR={key:!0,ref:!0,__self:!0,__source:!0};function ZR(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)YR.call(t,r)&&!XR.hasOwnProperty(r)&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var c=Array(o),u=0;u<o;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return{$$typeof:vh,type:e,key:a,ref:s,props:i,_owner:$S.current}}function Qq(e,t){return{$$typeof:vh,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function DS(e){return typeof e=="object"&&e!==null&&e.$$typeof===vh}function Jq(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var fk=/\/+/g;function lx(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Jq(""+e.key):t.toString(36)}function Gp(e,t,n,r,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(a){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case vh:case Uq:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+lx(s,0):r,dk(i)?(n="",e!=null&&(n=e.replace(fk,"$&/")+"/"),Gp(i,t,n,"",function(u){return u})):i!=null&&(DS(i)&&(i=Qq(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(fk,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",dk(e))for(var o=0;o<e.length;o++){a=e[o];var c=r+lx(a,o);s+=Gp(a,t,n,c,i)}else if(c=Zq(e),typeof c=="function")for(e=c.call(e),o=0;!(a=e.next()).done;)a=a.value,c=r+lx(a,o++),s+=Gp(a,t,n,c,i);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Gh(e,t,n){if(e==null)return e;var r=[],i=0;return Gp(e,r,"","",function(a){return t.call(n,a,i++)}),r}function ez(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Tn={current:null},Kp={transition:null},tz={ReactCurrentDispatcher:Tn,ReactCurrentBatchConfig:Kp,ReactCurrentOwner:$S};function QR(){throw Error("act(...) is not supported in production builds of React.")}Re.Children={map:Gh,forEach:function(e,t,n){Gh(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Gh(e,function(){t++}),t},toArray:function(e){return Gh(e,function(t){return t})||[]},only:function(e){if(!DS(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Re.Component=fu;Re.Fragment=qq;Re.Profiler=Vq;Re.PureComponent=RS;
vendor: 5,089 bytes, lines 9-25
9Re.StrictMode=zq;Re.Suspense=Kq;Re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tz;Re.act=QR;Re.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=HR({},e.props),i=e.key,a=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,s=$S.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(c in t)YR.call(t,c)&&!XR.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&o!==void 0?o[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){o=Array(c);for(var u=0;u<c;u++)o[u]=arguments[u+2];r.children=o}return{$$typeof:vh,type:e.type,key:i,ref:a,props:r,_owner:s}};Re.createContext=function(e){return e={$$typeof:Hq,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Wq,_context:e},e.Consumer=e};Re.createElement=ZR;Re.createFactory=function(e){var t=ZR.bind(null,e);return t.type=e,t};Re.createRef=function(){return{current:null}};Re.forwardRef=function(e){return{$$typeof:Gq,render:e}};Re.isValidElement=DS;Re.lazy=function(e){return{$$typeof:Xq,_payload:{_status:-1,_result:e},_init:ez}};Re.memo=function(e,t){return{$$typeof:Yq,type:e,compare:t===void 0?null:t}};Re.startTransition=function(e){var t=Kp.transition;Kp.transition={};try{e()}finally{Kp.transition=t}};Re.unstable_act=QR;Re.useCallback=function(e,t){return Tn.current.useCallback(e,t)};Re.useContext=function(e){return Tn.current.useContext(e)};Re.useDebugValue=function(){};Re.useDeferredValue=function(e){return Tn.current.useDeferredValue(e)};Re.useEffect=function(e,t){return Tn.current.useEffect(e,t)};Re.useId=function(){return Tn.current.useId()};Re.useImperativeHandle=function(e,t,n){return Tn.current.useImperativeHandle(e,t,n)};Re.useInsertionEffect=function(e,t){return Tn.current.useInsertionEffect(e,t)};Re.useLayoutEffect=function(e,t){return Tn.current.useLayoutEffect(e,t)};Re.useMemo=function(e,t){return Tn.current.useMemo(e,t)};Re.useReducer=function(e,t,n){return Tn.current.useReducer(e,t,n)};Re.useRef=function(e){return Tn.current.useRef(e)};Re.useState=function(e){return Tn.current.useState(e)};Re.useSyncExternalStore=function(e,t,n){return Tn.current.useSyncExternalStore(e,t,n)};Re.useTransition=function(){return Tn.current.useTransition()};Re.version="18.3.1";VR.exports=Re;var w=VR.exports;const C=qe(w),LS=Bq({__proto__:null,default:C},[w]);/**
10 * @license React
11 * react-jsx-runtime.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var nz=w,rz=Symbol.for("react.element"),iz=Symbol.for("react.fragment"),az=Object.prototype.hasOwnProperty,sz=nz.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,oz={key:!0,ref:!0,__self:!0,__source:!0};function JR(e,t,n){var r,i={},a=null,s=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)az.call(t,r)&&!oz.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:rz,type:e,key:a,ref:s,props:i,_owner:sz.current}}gy.Fragment=iz;gy.jsx=JR;gy.jsxs=JR;zR.exports=gy;var l=zR.exports,e2={exports:{}},or={},t2={exports:{}},n2={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */(function(e){function t(N,I){var F=N.length;N.push(I);e:for(;0<F;){var V=F-1>>>1,U=N[V];if(0<i(U,I))N[V]=I,N[F]=U,F=V;else break e}}function n(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var I=N[0],F=N.pop();if(F!==I){N[0]=F;e:for(var V=0,U=N.length,G=U>>>1;V<G;){var te=2*(V+1)-1,xe=N[te],Me=te+1,Y=N[Me];if(0>i(xe,F))Me<U&&0>i(Y,xe)?(N[V]=Y,N[Me]=F,V=Me):(N[V]=xe,N[te]=F,V=te);else if(Me<U&&0>i(Y,F))N[V]=Y,N[Me]=F,V=Me;else break e}}return I}function i(N,I){var F=N.sortIndex-I.sortIndex;return F!==0?F:N.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var s=Date,o=s.now();e.unstable_now=function(){return s.now()-o}}var c=[],u=[],f=1,d=null,h=3,p=!1,g=!1,m=!1,y=typeof setTimeout=="function"?setTimeout:null,v=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 x(N){for(var I=n(u);I!==null;){if(I.callback===null)r(u);else if(I.startTime<=N)r(u),I.sortIndex=I.expirationTime,t(c,I);else break;I=n(u)}}function j(N){if(m=!1,x(N),!g)if(n(c)!==null)g=!0,D(S);else{var I=n(u);I!==null&&M(j,I.startTime-N)}}function S(N,I){g=!1,m&&(m=!1,v(k),k=-1),p=!0;var F=h;try{for(x(I),d=n(c);d!==null&&(!(d.expirationTime>I)||N&&!P());){var V=d.callback;
vendor: 9,155 bytes, lines 25-34
25if(typeof V=="function"){d.callback=null,h=d.priorityLevel;var U=V(d.expirationTime<=I);I=e.unstable_now(),typeof U=="function"?d.callback=U:d===n(c)&&r(c),x(I)}else r(c);d=n(c)}if(d!==null)var G=!0;else{var te=n(u);te!==null&&M(j,te.startTime-I),G=!1}return G}finally{d=null,h=F,p=!1}}var _=!1,A=null,k=-1,E=5,T=-1;function P(){return!(e.unstable_now()-T<E)}function O(){if(A!==null){var N=e.unstable_now();T=N;var I=!0;try{I=A(!0,N)}finally{I?$():(_=!1,A=null)}}else _=!1}var $;if(typeof b=="function")$=function(){b(O)};else if(typeof MessageChannel<"u"){var R=new MessageChannel,L=R.port2;R.port1.onmessage=O,$=function(){L.postMessage(null)}}else $=function(){y(O,0)};function D(N){A=N,_||(_=!0,$())}function M(N,I){k=y(function(){N(e.unstable_now())},I)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(N){N.callback=null},e.unstable_continueExecution=function(){g||p||(g=!0,D(S))},e.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<N?Math.floor(1e3/N):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(N){switch(h){case 1:case 2:case 3:var I=3;break;default:I=h}var F=h;h=I;try{return N()}finally{h=F}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(N,I){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var F=h;h=N;try{return I()}finally{h=F}},e.unstable_scheduleCallback=function(N,I,F){var V=e.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?V+F:V):F=V,N){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=F+U,N={id:f++,callback:I,priorityLevel:N,startTime:F,expirationTime:U,sortIndex:-1},F>V?(N.sortIndex=F,t(u,N),n(c)===null&&N===n(u)&&(m?(v(k),k=-1):m=!0,M(j,F-V))):(N.sortIndex=U,t(c,N),g||p||(g=!0,D(S))),N},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(N){var I=h;return function(){var F=h;h=I;try{return N.apply(this,arguments)}finally{h=F}}}})(n2);t2.exports=n2;var lz=t2.exports;/**
26 * @license React
27 * react-dom.production.min.js
28 *
29 * Copyright (c) Facebook, Inc. and its affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var cz=w,ir=lz;function H(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r2=new Set,Gd={};function nl(e,t){Ac(e,t),Ac(e+"Capture",t)}function Ac(e,t){for(Gd[e]=t,e=0;e<t.length;e++)r2.add(t[e])}var sa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),r0=Object.prototype.hasOwnProperty,uz=/^[: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]*$/,hk={},pk={};function dz(e){return r0.call(pk,e)?!0:r0.call(hk,e)?!1:uz.test(e)?pk[e]=!0:(hk[e]=!0,!1)}function fz(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 hz(e,t,n,r){if(t===null||typeof t>"u"||fz(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 On(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 rn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){rn[e]=new On(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];rn[t]=new On(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){rn[e]=new On(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){rn[e]=new On(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){rn[e]=new On(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){rn[e]=new On(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){rn[e]=new On(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){rn[e]=new On(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){rn[e]=new On(e,5,!1,e.toLowerCase(),null,!1,!1)});var FS=/[\-:]([a-z])/g;function BS(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(FS,BS);rn[t]=new On(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(FS,BS);rn[t]=new On(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(FS,BS);rn[t]=new On(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){rn[e]=new On(e,1,!1,e.toLowerCase(),null,!1,!1)});rn.xlinkHref=new On("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){rn[e]=new On(e,1,!1,e.toLowerCase(),null,!0,!0)});function US(e,t,n,r){var i=rn.hasOwnProperty(t)?rn[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(hz(t,n,i,r)&&(n=null),r||i===null?dz(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var xa=cz.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Kh=Symbol.for("react.element"),Nl=Symbol.for("react.portal"),Il=Symbol.for("react.fragment"),qS=Symbol.for("react.strict_mode"),i0=Symbol.for("react.profiler"),i2=Symbol.for("react.provider"),a2=Symbol.for("react.context"),zS=Symbol.for("react.forward_ref"),a0=Symbol.for("react.suspense"),s0=Symbol.for("react.suspense_list"),VS=Symbol.for("react.memo"),Fa=Symbol.for("react.lazy"),s2=Symbol.for("react.offscreen"),mk=Symbol.iterator;function qu(e){return e===null||typeof e!="object"?null:(e=mk&&e[mk]||e["@@iterator"],typeof e=="function"?e:null)}var bt=Object.assign,cx;function pd(e){if(cx===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);cx=t&&t[1]||""}return`
34`+cx+e}var ux=!1;function dx(e,t){if(!e||ux)return"";ux=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}
vendor: 16,737 bytes, lines 34-37
34catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
35`),a=r.stack.split(`
36`),s=i.length-1,o=a.length-1;1<=s&&0<=o&&i[s]!==a[o];)o--;for(;1<=s&&0<=o;s--,o--)if(i[s]!==a[o]){if(s!==1||o!==1)do if(s--,o--,0>o||i[s]!==a[o]){var c=`
37`+i[s].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=s&&0<=o);break}}}finally{ux=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?pd(e):""}function pz(e){switch(e.tag){case 5:return pd(e.type);case 16:return pd("Lazy");case 13:return pd("Suspense");case 19:return pd("SuspenseList");case 0:case 2:case 15:return e=dx(e.type,!1),e;case 11:return e=dx(e.type.render,!1),e;case 1:return e=dx(e.type,!0),e;default:return""}}function o0(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 Il:return"Fragment";case Nl:return"Portal";case i0:return"Profiler";case qS:return"StrictMode";case a0:return"Suspense";case s0:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case a2:return(e.displayName||"Context")+".Consumer";case i2:return(e._context.displayName||"Context")+".Provider";case zS:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case VS:return t=e.displayName||null,t!==null?t:o0(e.type)||"Memo";case Fa:t=e._payload,e=e._init;try{return o0(e(t))}catch{}}return null}function mz(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 o0(t);case 8:return t===qS?"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 vs(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function o2(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function gz(e){var t=o2(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 Yh(e){e._valueTracker||(e._valueTracker=gz(e))}function l2(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=o2(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function xm(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 l0(e,t){var n=t.checked;return bt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function gk(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=vs(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 c2(e,t){t=t.checked,t!=null&&US(e,"checked",t,!1)}function c0(e,t){c2(e,t);var n=vs(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")?u0(e,t.type,n):t.hasOwnProperty("defaultValue")&&u0(e,t.type,vs(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function yk(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 u0(e,t,n){(t!=="number"||xm(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var md=Array.isArray;function ec(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+vs(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function d0(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(H(91));return bt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function vk(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(H(92));if(md(n)){if(1<n.length)throw Error(H(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:vs(n)}}function u2(e,t){var n=vs(t.value),r=vs(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function xk(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function d2(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function f0(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?d2(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Xh,f2=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Xh=Xh||document.createElement("div"),Xh.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Xh.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Kd(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ad={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},yz=["Webkit","ms","Moz","O"];Object.keys(Ad).forEach(function(e){yz.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ad[t]=Ad[e]})});function h2(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ad.hasOwnProperty(e)&&Ad[e]?(""+t).trim():t+"px"}function p2(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=h2(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var vz=bt({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 h0(e,t){if(t){if(vz[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(H(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(H(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(H(61))}if(t.style!=null&&typeof t.style!="object")throw Error(H(62))}}function p0(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 m0=null;function WS(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var g0=null,tc=null,nc=null;function bk(e){if(e=wh(e)){if(typeof g0!="function")throw Error(H(280));var t=e.stateNode;t&&(t=wy(t),g0(e.stateNode,e.type,t))}}function m2(e){tc?nc?nc.push(e):nc=[e]:tc=e}function g2(){if(tc){var e=tc,t=nc;if(nc=tc=null,bk(e),t)for(e=0;e<t.length;e++)bk(t[e])}}function y2(e,t){return e(t)}function v2(){}var fx=!1;function x2(e,t,n){if(fx)return e(t,n);fx=!0;try{return y2(e,t,n)}finally{fx=!1,(tc!==null||nc!==null)&&(v2(),g2())}}function Yd(e,t){var n=e.stateNode;if(n===null)return null;var r=wy(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(H(231,t,typeof n));return n}var y0=!1;if(sa)try{var zu={};Object.defineProperty(zu,"passive",{get:function(){y0=!0}}),window.addEventListener("test",zu,zu),window.removeEventListener("test",zu,zu)}catch{y0=!1}function xz(e,t,n,r,i,a,s,o,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(f){this.onError(f)}}var kd=!1,bm=null,wm=!1,v0=null,bz={onError:function(e){kd=!0,bm=e}};function wz(e,t,n,r,i,a,s,o,c){kd=!1,bm=null,xz.apply(bz,arguments)}function Sz(e,t,n,r,i,a,s,o,c){if(wz.apply(this,arguments),kd){if(kd){var u=bm;kd=!1,bm=null}else throw Error(H(198));wm||(wm=!0,v0=u)}}function rl(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function b2(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function wk(e){if(rl(e)!==e)throw Error(H(188))}function jz(e){var t=e.alternate;if(!t){if(t=rl(e),t===null)throw Error(H(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return wk(i),e;if(a===r)return wk(i),t;a=a.sibling}throw Error(H(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,o=i.child;o;){if(o===n){s=!0,n=i,r=a;break}if(o===r){s=!0,r=i,n=a;break}o=o.sibling}if(!s){for(o=a.child;o;){if(o===n){s=!0,n=a,r=i;break}if(o===r){s=!0,r=a,n=i;break}o=o.sibling}if(!s)throw Error(H(189))}}if(n.alternate!==r)throw Error(H(190))}if(n.tag!==3)throw Error(H(188));return n.stateNode.current===n?e:t}function w2(e){return e=jz(e),e!==null?S2(e):null}function S2(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=S2(e);if(t!==null)return t;e=e.sibling}return null}var j2=ir.unstable_scheduleCallback,Sk=ir.unstable_cancelCallback,_z=ir.unstable_shouldYield,Az=ir.unstable_requestPaint,Et=ir.unstable_now,kz=ir.unstable_getCurrentPriorityLevel,HS=ir.unstable_ImmediatePriority,_2=ir.unstable_UserBlockingPriority,Sm=ir.unstable_NormalPriority,Ez=ir.unstable_LowPriority,A2=ir.unstable_IdlePriority,yy=null,Ei=null;function Cz(e){if(Ei&&typeof Ei.onCommitFiberRoot=="function")try{Ei.onCommitFiberRoot(yy,e,void 0,(e.current.flags&128)===128)}catch{}}var si=Math.clz32?Math.clz32:Oz,Pz=Math.log,Tz=Math.LN2;function Oz(e){return e>>>=0,e===0?32:31-(Pz(e)/Tz|0)|0}var Zh=64,Qh=4194304;function gd(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 jm(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 o=s&~i;o!==0?r=gd(o):(a&=s,a!==0&&(r=gd(a)))}else s=n&~i,s!==0?r=gd(s):a!==0&&(r=gd(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;0<t;)n=31-si(t),i=1<<n,r|=e[n],t&=~i;return r}function Nz(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Iz(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var s=31-si(a),o=1<<s,c=i[s];c===-1?(!(o&n)||o&r)&&(i[s]=Nz(o,t)):c<=t&&(e.expiredLanes|=o),a&=~o}}function x0(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function k2(){var e=Zh;return Zh<<=1,!(Zh&4194240)&&(Zh=64),e}function hx(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function xh(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-si(t),e[t]=n}function Rz(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<n;){var i=31-si(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function GS(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-si(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Ge=0;function E2(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var C2,KS,P2,T2,O2,b0=!1,Jh=[],as=null,ss=null,os=null,Xd=new Map,Zd=new Map,Wa=[],Mz="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function jk(e,t){switch(e){case"focusin":case"focusout":as=null;break;case"dragenter":case"dragleave":ss=null;break;case"mouseover":case"mouseout":os=null;break;case"pointerover":case"pointerout":Xd.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zd.delete(t.pointerId)}}function Vu(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=wh(t),t!==null&&KS(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function $z(e,t,n,r,i){switch(t){case"focusin":return as=Vu(as,e,t,n,r,i),!0;case"dragenter":return ss=Vu(ss,e,t,n,r,i),!0;case"mouseover":return os=Vu(os,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return Xd.set(a,Vu(Xd.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,Zd.set(a,Vu(Zd.get(a)||null,e,t,n,r,i)),!0}return!1}function N2(e){var t=ho(e.target);if(t!==null){var n=rl(t);if(n!==null){if(t=n.tag,t===13){if(t=b2(n),t!==null){e.blockedOn=t,O2(e.priority,function(){P2(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Yp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=w0(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);m0=r,n.target.dispatchEvent(r),m0=null}else return t=wh(n),t!==null&&KS(t),e.blockedOn=n,!1;t.shift()}return!0}function _k(e,t,n){Yp(e)&&n.delete(t)}function Dz(){b0=!1,as!==null&&Yp(as)&&(as=null),ss!==null&&Yp(ss)&&(ss=null),os!==null&&Yp(os)&&(os=null),Xd.forEac
vendor: 12,844 bytes, line 37
37h(_k),Zd.forEach(_k)}function Wu(e,t){e.blockedOn===t&&(e.blockedOn=null,b0||(b0=!0,ir.unstable_scheduleCallback(ir.unstable_NormalPriority,Dz)))}function Qd(e){function t(i){return Wu(i,e)}if(0<Jh.length){Wu(Jh[0],e);for(var n=1;n<Jh.length;n++){var r=Jh[n];r.blockedOn===e&&(r.blockedOn=null)}}for(as!==null&&Wu(as,e),ss!==null&&Wu(ss,e),os!==null&&Wu(os,e),Xd.forEach(t),Zd.forEach(t),n=0;n<Wa.length;n++)r=Wa[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Wa.length&&(n=Wa[0],n.blockedOn===null);)N2(n),n.blockedOn===null&&Wa.shift()}var rc=xa.ReactCurrentBatchConfig,_m=!0;function Lz(e,t,n,r){var i=Ge,a=rc.transition;rc.transition=null;try{Ge=1,YS(e,t,n,r)}finally{Ge=i,rc.transition=a}}function Fz(e,t,n,r){var i=Ge,a=rc.transition;rc.transition=null;try{Ge=4,YS(e,t,n,r)}finally{Ge=i,rc.transition=a}}function YS(e,t,n,r){if(_m){var i=w0(e,t,n,r);if(i===null)jx(e,t,r,Am,n),jk(e,r);else if($z(i,e,t,n,r))r.stopPropagation();else if(jk(e,r),t&4&&-1<Mz.indexOf(e)){for(;i!==null;){var a=wh(i);if(a!==null&&C2(a),a=w0(e,t,n,r),a===null&&jx(e,t,r,Am,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else jx(e,t,r,null,n)}}var Am=null;function w0(e,t,n,r){if(Am=null,e=WS(r),e=ho(e),e!==null)if(t=rl(e),t===null)e=null;else if(n=t.tag,n===13){if(e=b2(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Am=e,null}function I2(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(kz()){case HS:return 1;case _2:return 4;case Sm:case Ez:return 16;case A2:return 536870912;default:return 16}default:return 16}}var Ja=null,XS=null,Xp=null;function R2(){if(Xp)return Xp;var e,t=XS,n=t.length,r,i="value"in Ja?Ja.value:Ja.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===i[a-r];r++);return Xp=i.slice(e,1<r?1-r:void 0)}function Zp(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ep(){return!0}function Ak(){return!1}function lr(e){function t(n,r,i,a,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=a,this.target=s,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(a):a[o]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?ep:Ak,this.isPropagationStopped=Ak,this}return bt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ep)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ep)},persist:function(){},isPersistent:ep}),t}var hu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ZS=lr(hu),bh=bt({},hu,{view:0,detail:0}),Bz=lr(bh),px,mx,Hu,vy=bt({},bh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:QS,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Hu&&(Hu&&e.type==="mousemove"?(px=e.screenX-Hu.screenX,mx=e.screenY-Hu.screenY):mx=px=0,Hu=e),px)},movementY:function(e){return"movementY"in e?e.movementY:mx}}),kk=lr(vy),Uz=bt({},vy,{dataTransfer:0}),qz=lr(Uz),zz=bt({},bh,{relatedTarget:0}),gx=lr(zz),Vz=bt({},hu,{animationName:0,elapsedTime:0,pseudoElement:0}),Wz=lr(Vz),Hz=bt({},hu,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Gz=lr(Hz),Kz=bt({},hu,{data:0}),Ek=lr(Kz),Yz={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Xz={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Zz={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Qz(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Zz[e])?!!t[e]:!1}function QS(){return Qz}var Jz=bt({},bh,{key:function(e){if(e.key){var t=Yz[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Zp(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Xz[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:QS,charCode:function(e){return e.type==="keypress"?Zp(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Zp(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),e8=lr(Jz),t8=bt({},vy,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ck=lr(t8),n8=bt({},bh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:QS}),r8=lr(n8),i8=bt({},hu,{propertyName:0,elapsedTime:0,pseudoElement:0}),a8=lr(i8),s8=bt({},vy,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),o8=lr(s8),l8=[9,13,27,32],JS=sa&&"CompositionEvent"in window,Ed=null;sa&&"documentMode"in document&&(Ed=document.documentMode);var c8=sa&&"TextEvent"in window&&!Ed,M2=sa&&(!JS||Ed&&8<Ed&&11>=Ed),Pk=" ",Tk=!1;function $2(e,t){switch(e){case"keyup":return l8.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function D2(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Rl=!1;function u8(e,t){switch(e){case"compositionend":return D2(t);case"keypress":return t.which!==32?null:(Tk=!0,Pk);case"textInput":return e=t.data,e===Pk&&Tk?null:e;default:return null}}function d8(e,t){if(Rl)return e==="compositionend"||!JS&&$2(e,t)?(e=R2(),Xp=XS=Ja=null,Rl=!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.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return M2&&t.locale!=="ko"?null:t.data;default:return null}}var f8={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ok(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!f8[e.type]:t==="textarea"}function L2(e,t,n,r){m2(r),t=km(t,"onChange"),0<t.length&&(n=new ZS("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Cd=null,Jd=null;function h8(e){Y2(e,0)}function xy(e){var t=Dl(e);if(l2(t))return e}function p8(e,t){if(e==="change")return t}var F2=!1;if(sa){var yx;if(sa){var vx="oninput"in document;if(!vx){var Nk=document.createElement("div");Nk.setAttribute("oninput","return;"),vx=typeof Nk.oninput=="function"}yx=vx}else yx=!1;F2=yx&&(!document.documentMode||9<document.documentMode)}function Ik(){Cd&&(Cd.detachEvent("onpropertychange",B2),Jd=Cd=null)}function B2(e){if(e.propertyName==="value"&&xy(Jd)){var t=[];L2(t,Jd,e,WS(e)),x2(h8,t)}}function m8(e,t,n){e==="focusin"?(Ik(),Cd=t,Jd=n,Cd.attachEvent("onpropertychange",B2)):e==="focusout"&&Ik()}function g8(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return xy(Jd)}function y8(e,t){if(e==="click")return xy(t)}function v8(e,t){if(e==="input"||e==="change")return xy(t)}function x8(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var li=typeof Object.is=="function"?Object.is:x8;function ef(e,t){if(li(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!r0.call(t,i)||!li(e[i],t[i]))return!1}return!0}function Rk(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Mk(e,t){var n=Rk(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=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=Rk(n)}}function U2(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?U2(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function q2(){for(var e=window,t=xm();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=xm(e.document)}return t}function ej(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 b8(e){var t=q2(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&U2(n.ownerDocument.documentElement,n)){if(r!==null&&ej(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=Mk(n,a);var s=Mk(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<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var w8=sa&&"documentMode"in document&&11>=document.documentMode,Ml=null,S0=null,Pd=null,j0=!1;function $k(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;j0||Ml==null||Ml!==xm(r)||(r=Ml,"selectionStart"in r&&ej(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}),Pd&&ef(Pd,r)||(Pd=r,r=km(S0,"onSelect"),0<r.length&&(t=new ZS("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ml)))}function tp(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var $l={animationend:tp("Animation","AnimationEnd"),animationiteration:tp("Animation","AnimationIteration"),animationstart:tp("Animation","AnimationStart"),transitionend:tp("Transition","TransitionEnd")},xx={},z2={};sa&&(z2=document.createElement("div").style,"AnimationEvent"in window||(delete $l.animationend.animation,delete $l.animationiteration.animation,delete $l.animationstart.animation),"TransitionEvent"in window||delete $l.transitionend.transition);function by(e){if(xx[e])return xx[e];if(!$l[e])return e;var t=$l[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in z2)return xx[e]=t[n];return e}var V2=by("animationend"),W2=by("animationiteration"),H2=by("animationstart"),G2=by("transitionend"),K2=ne
vendor: 6,025 bytes, line 37
37w Map,Dk="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Cs(e,t){K2.set(e,t),nl(t,[e])}for(var bx=0;bx<Dk.length;bx++){var wx=Dk[bx],S8=wx.toLowerCase(),j8=wx[0].toUpperCase()+wx.slice(1);Cs(S8,"on"+j8)}Cs(V2,"onAnimationEnd");Cs(W2,"onAnimationIteration");Cs(H2,"onAnimationStart");Cs("dblclick","onDoubleClick");Cs("focusin","onFocus");Cs("focusout","onBlur");Cs(G2,"onTransitionEnd");Ac("onMouseEnter",["mouseout","mouseover"]);Ac("onMouseLeave",["mouseout","mouseover"]);Ac("onPointerEnter",["pointerout","pointerover"]);Ac("onPointerLeave",["pointerout","pointerover"]);nl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));nl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));nl("onBeforeInput",["compositionend","keypress","textInput","paste"]);nl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));nl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));nl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var yd="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),_8=new Set("cancel close invalid load scroll toggle".split(" ").concat(yd));function Lk(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Sz(r,t,void 0,e),e.currentTarget=null}function Y2(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var s=r.length-1;0<=s;s--){var o=r[s],c=o.instance,u=o.currentTarget;if(o=o.listener,c!==a&&i.isPropagationStopped())break e;Lk(i,o,u),a=c}else for(s=0;s<r.length;s++){if(o=r[s],c=o.instance,u=o.currentTarget,o=o.listener,c!==a&&i.isPropagationStopped())break e;Lk(i,o,u),a=c}}}if(wm)throw e=v0,wm=!1,v0=null,e}function lt(e,t){var n=t[C0];n===void 0&&(n=t[C0]=new Set);var r=e+"__bubble";n.has(r)||(X2(t,e,2,!1),n.add(r))}function Sx(e,t,n){var r=0;t&&(r|=4),X2(n,e,r,t)}var np="_reactListening"+Math.random().toString(36).slice(2);function tf(e){if(!e[np]){e[np]=!0,r2.forEach(function(n){n!=="selectionchange"&&(_8.has(n)||Sx(n,!1,e),Sx(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[np]||(t[np]=!0,Sx("selectionchange",!1,t))}}function X2(e,t,n,r){switch(I2(t)){case 1:var i=Lz;break;case 4:i=Fz;break;default:i=YS}n=i.bind(null,t,n,e),i=void 0,!y0||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function jx(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var o=r.stateNode.containerInfo;if(o===i||o.nodeType===8&&o.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var c=s.tag;if((c===3||c===4)&&(c=s.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;s=s.return}for(;o!==null;){if(s=ho(o),s===null)return;if(c=s.tag,c===5||c===6){r=a=s;continue e}o=o.parentNode}}r=r.return}x2(function(){var u=a,f=WS(n),d=[];e:{var h=K2.get(e);if(h!==void 0){var p=ZS,g=e;switch(e){case"keypress":if(Zp(n)===0)break e;case"keydown":case"keyup":p=e8;break;case"focusin":g="focus",p=gx;break;case"focusout":g="blur",p=gx;break;case"beforeblur":case"afterblur":p=gx;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=kk;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=qz;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=r8;break;case V2:case W2:case H2:p=Wz;break;case G2:p=a8;break;case"scroll":p=Bz;break;case"wheel":p=o8;break;case"copy":case"cut":case"paste":p=Gz;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Ck}var m=(t&4)!==0,y=!m&&e==="scroll",v=m?h!==null?h+"Capture":null:h;m=[];for(var b=u,x;b!==null;){x=b;var j=x.stateNode;if(x.tag===5&&j!==null&&(x=j,v!==null&&(j=Yd(b,v),j!=null&&m.push(nf(b,j,x)))),y)break;b=b.return}0<m.length&&(h=new p(h,g,null,n,f),d.push({event:h,listeners:m}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==m0&&(g=n.relatedTarget||n.fromElement)&&(ho(g)||g[oa]))break e;if((p||h)&&(h=f.window===f?f:(h=f.ownerDocument)?h.defaultView||h.parentWindow:window,p?(g=n.relatedTarget||n.toElement,p=u,g=g?ho(g):null,g!==null&&(y=rl(g),g!==y||g.tag!==5&&g.tag!==6)&&(g=null)):(p=null,g=u),p!==g)){if(m=kk,j="onMouseLeave",v="onMouseEnter",b="mouse",(e==="pointerout"||e==="pointerover")&&(m=Ck,j="onPointerLeave",v="onPointerEnter",b="pointer"),y=p==null?h:Dl(p),x=g==null?h:Dl(g),h=new m(j,b+"leave",p,n,f),h.target=y,h.relatedTarget=x,j=null,ho(f)===u&&(m=new m(v,b+"enter",g,n,f),m.target=x,m.relatedTarget=y,j=m),y=j,p&&g)t:{for(m=p,v=g,b=0,x=m;x;x=hl(x))b++;for(x=0,j=v;j;j=hl(j))x++;for(;0<b-x;)m=hl(m),b--;for(;0<x-b;)v=hl(v),x--;for(;b--;){if(m===v||v!==null&&m===v.alternate)break t;m=hl(m),v=hl(v)}m=null}else m=null;p!==null&&Fk(d,h,p,m,!1),g!==null&&y!==null&&Fk(d,y,g,m,!0)}}
vendor: 4,113 bytes, lines 37-38
37e:{if(h=u?Dl(u):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var S=p8;else if(Ok(h))if(F2)S=v8;else{S=g8;var _=m8}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(S=y8);if(S&&(S=S(e,u))){L2(d,S,n,f);break e}_&&_(e,h,u),e==="focusout"&&(_=h._wrapperState)&&_.controlled&&h.type==="number"&&u0(h,"number",h.value)}switch(_=u?Dl(u):window,e){case"focusin":(Ok(_)||_.contentEditable==="true")&&(Ml=_,S0=u,Pd=null);break;case"focusout":Pd=S0=Ml=null;break;case"mousedown":j0=!0;break;case"contextmenu":case"mouseup":case"dragend":j0=!1,$k(d,n,f);break;case"selectionchange":if(w8)break;case"keydown":case"keyup":$k(d,n,f)}var A;if(JS)e:{switch(e){case"compositionstart":var k="onCompositionStart";break e;case"compositionend":k="onCompositionEnd";break e;case"compositionupdate":k="onCompositionUpdate";break e}k=void 0}else Rl?$2(e,n)&&(k="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(k="onCompositionStart");k&&(M2&&n.locale!=="ko"&&(Rl||k!=="onCompositionStart"?k==="onCompositionEnd"&&Rl&&(A=R2()):(Ja=f,XS="value"in Ja?Ja.value:Ja.textContent,Rl=!0)),_=km(u,k),0<_.length&&(k=new Ek(k,e,null,n,f),d.push({event:k,listeners:_}),A?k.data=A:(A=D2(n),A!==null&&(k.data=A)))),(A=c8?u8(e,n):d8(e,n))&&(u=km(u,"onBeforeInput"),0<u.length&&(f=new Ek("onBeforeInput","beforeinput",null,n,f),d.push({event:f,listeners:u}),f.data=A))}Y2(d,t)})}function nf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function km(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=Yd(e,n),a!=null&&r.unshift(nf(e,a,i)),a=Yd(e,t),a!=null&&r.push(nf(e,a,i))),e=e.return}return r}function hl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Fk(e,t,n,r,i){for(var a=t._reactName,s=[];n!==null&&n!==r;){var o=n,c=o.alternate,u=o.stateNode;if(c!==null&&c===r)break;o.tag===5&&u!==null&&(o=u,i?(c=Yd(n,a),c!=null&&s.unshift(nf(n,c,o))):i||(c=Yd(n,a),c!=null&&s.push(nf(n,c,o)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var A8=/\r\n?/g,k8=/\u0000|\uFFFD/g;function Bk(e){return(typeof e=="string"?e:""+e).replace(A8,`
38`).replace(k8,"")}function rp(e,t,n){if(t=Bk(t),Bk(e)!==t&&n)throw Error(H(425))}function Em(){}var _0=null,A0=null;function k0(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var E0=typeof setTimeout=="function"?setTimeout:void 0,E8=typeof clearTimeout=="function"?clearTimeout:void 0,Uk=typeof Promise=="function"?Promise:void 0,C8=typeof queueMicrotask=="function"?queueMicrotask:typeof Uk<"u"?function(e){return Uk.resolve(null).then(e).catch(P8)}:E0;function P8(e){setTimeout(function(){throw e})}function _x(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Qd(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Qd(t)}function ls(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function qk(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var pu=Math.random().toString(36).slice(2),ji="__reactFiber$"+pu,rf="__reactProps$"+pu,oa="__reactContainer$"+pu,C0="__reactEvents$"+pu,T8="__reactListeners$"+pu,O8="__reactHandles$"+pu;function ho(e){var t=e[ji];if(t)return t;for(var n=e.parentNode;n;){if(t=n[oa]||n[ji]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=qk(e);e!==null;){if(n=e[ji])return n;e=qk(e)}return t}e=n,n=e.parentNode}return null}function wh(e){return e=e[ji]||e[oa],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Dl(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(H(33))}function wy(e){return e[rf]||null}var P0=[],Ll=-1;function Ps(e){return{current:e}}function dt(e){0>
vendor: 4,736 bytes, line 38
38Ll||(e.current=P0[Ll],P0[Ll]=null,Ll--)}function it(e,t){Ll++,P0[Ll]=e.current,e.current=t}var xs={},mn=Ps(xs),Dn=Ps(!1),Fo=xs;function kc(e,t){var n=e.type.contextTypes;if(!n)return xs;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 Ln(e){return e=e.childContextTypes,e!=null}function Cm(){dt(Dn),dt(mn)}function zk(e,t,n){if(mn.current!==xs)throw Error(H(168));it(mn,t),it(Dn,n)}function Z2(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(H(108,mz(e)||"Unknown",i));return bt({},n,r)}function Pm(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||xs,Fo=mn.current,it(mn,e),it(Dn,Dn.current),!0}function Vk(e,t,n){var r=e.stateNode;if(!r)throw Error(H(169));n?(e=Z2(e,t,Fo),r.__reactInternalMemoizedMergedChildContext=e,dt(Dn),dt(mn),it(mn,e)):dt(Dn),it(Dn,n)}var Yi=null,Sy=!1,Ax=!1;function Q2(e){Yi===null?Yi=[e]:Yi.push(e)}function N8(e){Sy=!0,Q2(e)}function Ts(){if(!Ax&&Yi!==null){Ax=!0;var e=0,t=Ge;try{var n=Yi;for(Ge=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Yi=null,Sy=!1}catch(i){throw Yi!==null&&(Yi=Yi.slice(e+1)),j2(HS,Ts),i}finally{Ge=t,Ax=!1}}return null}var Fl=[],Bl=0,Tm=null,Om=0,vr=[],xr=0,Bo=null,Zi=1,Qi="";function to(e,t){Fl[Bl++]=Om,Fl[Bl++]=Tm,Tm=e,Om=t}function J2(e,t,n){vr[xr++]=Zi,vr[xr++]=Qi,vr[xr++]=Bo,Bo=e;var r=Zi;e=Qi;var i=32-si(r)-1;r&=~(1<<i),n+=1;var a=32-si(t)+i;if(30<a){var s=i-i%5;a=(r&(1<<s)-1).toString(32),r>>=s,i-=s,Zi=1<<32-si(t)+i|n<<i|r,Qi=a+e}else Zi=1<<a|n<<i|r,Qi=e}function tj(e){e.return!==null&&(to(e,1),J2(e,1,0))}function nj(e){for(;e===Tm;)Tm=Fl[--Bl],Fl[Bl]=null,Om=Fl[--Bl],Fl[Bl]=null;for(;e===Bo;)Bo=vr[--xr],vr[xr]=null,Qi=vr[--xr],vr[xr]=null,Zi=vr[--xr],vr[xr]=null}var er=null,Jn=null,ht=!1,ri=null;function eM(e,t){var n=wr(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Wk(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,er=e,Jn=ls(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,er=e,Jn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Bo!==null?{id:Zi,overflow:Qi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=wr(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,er=e,Jn=null,!0):!1;default:return!1}}function T0(e){return(e.mode&1)!==0&&(e.flags&128)===0}function O0(e){if(ht){var t=Jn;if(t){var n=t;if(!Wk(e,t)){if(T0(e))throw Error(H(418));t=ls(n.nextSibling);var r=er;t&&Wk(e,t)?eM(r,n):(e.flags=e.flags&-4097|2,ht=!1,er=e)}}else{if(T0(e))throw Error(H(418));e.flags=e.flags&-4097|2,ht=!1,er=e}}}function Hk(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;er=e}function ip(e){if(e!==er)return!1;if(!ht)return Hk(e),ht=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!k0(e.type,e.memoizedProps)),t&&(t=Jn)){if(T0(e))throw tM(),Error(H(418));for(;t;)eM(e,t),t=ls(t.nextSibling)}if(Hk(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(H(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Jn=ls(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Jn=null}}else Jn=er?ls(e.stateNode.nextSibling):null;return!0}function tM(){for(var e=Jn;e;)e=ls(e.nextSibling)}function Ec(){Jn=er=null,ht=!1}function rj(e){ri===null?ri=[e]:ri.push(e)}var I8=xa.ReactCurrentBatchConfig;function Gu(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(H(309));var r=n.stateNode}if(!r)throw Error(H(147,e));var i=r,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(s){var o=i.refs;s===null?delete o[a]:o[a]=s},t._stringRef=a,t)}if(typeof e!="string")throw Error(H(284));if(!n._owner)throw Error(H(290,e))}return e}function ap(e,t){throw e=Object.prototype.toString.call(t),Error(H(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Gk(e){var t=e._init;return t(e._payload)}function nM(e){function t(v,b){if(e){var x=v.deletions;x===null?(v.deletions=[b],v.flags|=16):x.push(b)}}function n(v,b){if(!e)return null;for(;b!==null;)t(v,b),b=b.sibling;return null}function r(v,b){for(v=new Map;b!==null;
vendor: 4,292 bytes, line 38
38)b.key!==null?v.set(b.key,b):v.set(b.index,b),b=b.sibling;return v}function i(v,b){return v=fs(v,b),v.index=0,v.sibling=null,v}function a(v,b,x){return v.index=x,e?(x=v.alternate,x!==null?(x=x.index,x<b?(v.flags|=2,b):x):(v.flags|=2,b)):(v.flags|=1048576,b)}function s(v){return e&&v.alternate===null&&(v.flags|=2),v}function o(v,b,x,j){return b===null||b.tag!==6?(b=Nx(x,v.mode,j),b.return=v,b):(b=i(b,x),b.return=v,b)}function c(v,b,x,j){var S=x.type;return S===Il?f(v,b,x.props.children,j,x.key):b!==null&&(b.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Fa&&Gk(S)===b.type)?(j=i(b,x.props),j.ref=Gu(v,b,x),j.return=v,j):(j=im(x.type,x.key,x.props,null,v.mode,j),j.ref=Gu(v,b,x),j.return=v,j)}function u(v,b,x,j){return b===null||b.tag!==4||b.stateNode.containerInfo!==x.containerInfo||b.stateNode.implementation!==x.implementation?(b=Ix(x,v.mode,j),b.return=v,b):(b=i(b,x.children||[]),b.return=v,b)}function f(v,b,x,j,S){return b===null||b.tag!==7?(b=Io(x,v.mode,j,S),b.return=v,b):(b=i(b,x),b.return=v,b)}function d(v,b,x){if(typeof b=="string"&&b!==""||typeof b=="number")return b=Nx(""+b,v.mode,x),b.return=v,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Kh:return x=im(b.type,b.key,b.props,null,v.mode,x),x.ref=Gu(v,null,b),x.return=v,x;case Nl:return b=Ix(b,v.mode,x),b.return=v,b;case Fa:var j=b._init;return d(v,j(b._payload),x)}if(md(b)||qu(b))return b=Io(b,v.mode,x,null),b.return=v,b;ap(v,b)}return null}function h(v,b,x,j){var S=b!==null?b.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return S!==null?null:o(v,b,""+x,j);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Kh:return x.key===S?c(v,b,x,j):null;case Nl:return x.key===S?u(v,b,x,j):null;case Fa:return S=x._init,h(v,b,S(x._payload),j)}if(md(x)||qu(x))return S!==null?null:f(v,b,x,j,null);ap(v,x)}return null}function p(v,b,x,j,S){if(typeof j=="string"&&j!==""||typeof j=="number")return v=v.get(x)||null,o(b,v,""+j,S);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case Kh:return v=v.get(j.key===null?x:j.key)||null,c(b,v,j,S);case Nl:return v=v.get(j.key===null?x:j.key)||null,u(b,v,j,S);case Fa:var _=j._init;return p(v,b,x,_(j._payload),S)}if(md(j)||qu(j))return v=v.get(x)||null,f(b,v,j,S,null);ap(b,j)}return null}function g(v,b,x,j){for(var S=null,_=null,A=b,k=b=0,E=null;A!==null&&k<x.length;k++){A.index>k?(E=A,A=null):E=A.sibling;var T=h(v,A,x[k],j);if(T===null){A===null&&(A=E);break}e&&A&&T.alternate===null&&t(v,A),b=a(T,b,k),_===null?S=T:_.sibling=T,_=T,A=E}if(k===x.length)return n(v,A),ht&&to(v,k),S;if(A===null){for(;k<x.length;k++)A=d(v,x[k],j),A!==null&&(b=a(A,b,k),_===null?S=A:_.sibling=A,_=A);return ht&&to(v,k),S}for(A=r(v,A);k<x.length;k++)E=p(A,v,k,x[k],j),E!==null&&(e&&E.alternate!==null&&A.delete(E.key===null?k:E.key),b=a(E,b,k),_===null?S=E:_.sibling=E,_=E);return e&&A.forEach(function(P){return t(v,P)}),ht&&to(v,k),S}function m(v,b,x,j){var S=qu(x);if(typeof S!="function")throw Error(H(150));if(x=S.call(x),x==null)throw Error(H(151));for(var _=S=null,A=b,k=b=0,E=null,T=x.next();A!==null&&!T.done;k++,T=x.next()){A.index>k?(E=A,A=null):E=A.sibling;var P=h(v,A,T.value,j);if(P===null){A===null&&(A=E);break}e&&A&&P.alternate===null&&t(v,A),b=a(P,b,k),_===null?S=P:_.sibling=P,_=P,A=E}if(T.done)return n(v,A),ht&&to(v,k),S;if(A===null){for(;!T.done;k++,T=x.next())T=d(v,T.value,j),T!==null&&(b=a(T,b,k),_===null?S=T:_.sibling=T,_=T);return ht&&to(v,k),S}for(A=r(v,A);!T.done;k++,T=x.next())T=p(A,v,k,T.value,j),T!==null&&(e&&T.alternate!==null&&A.delete(T.key===null?k:T.key),b=a(T,b,k),_===null?S=T:_.sibling=T,_=T);return e&&A.forEach(function(O){return t(v,O)}),ht&&to(v,k),S}function y(v,b,x,j){if(typeof x=="object"&&x!==null&&x.type===Il&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Kh:e:{for(var S=x.key,_=b;_!==null;){if(_.key===S){if(S=x.type,S===Il){if(_.tag===7){n(v,_.sibling),b=i(_,x.props.children),b.return=v,v=b;break e}}else if(_.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Fa&&Gk(S)===_.type){n(v,_.sibling),b=i(_,x.props),b.ref=Gu(v,_,x),b.return=v,v=b;break e}n(v,_);break}else t(v,_);_=_.sibling}x.type===Il?(b=Io(x.props.children,v.mode,j,x.key),b.return=v,v=b):(j=im(x.type,x.key,x.props,null,v.mode,j),j.ref=Gu(v,b,x),j.return=v,v=j)}return s(v);
vendor: 4,479 bytes, line 38
38case Nl:e:{for(_=x.key;b!==null;){if(b.key===_)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){n(v,b.sibling),b=i(b,x.children||[]),b.return=v,v=b;break e}else{n(v,b);break}else t(v,b);b=b.sibling}b=Ix(x,v.mode,j),b.return=v,v=b}return s(v);case Fa:return _=x._init,y(v,b,_(x._payload),j)}if(md(x))return g(v,b,x,j);if(qu(x))return m(v,b,x,j);ap(v,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(n(v,b.sibling),b=i(b,x),b.return=v,v=b):(n(v,b),b=Nx(x,v.mode,j),b.return=v,v=b),s(v)):n(v,b)}return y}var Cc=nM(!0),rM=nM(!1),Nm=Ps(null),Im=null,Ul=null,ij=null;function aj(){ij=Ul=Im=null}function sj(e){var t=Nm.current;dt(Nm),e._currentValue=t}function N0(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 ic(e,t){Im=e,ij=Ul=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Mn=!0),e.firstContext=null)}function Er(e){var t=e._currentValue;if(ij!==e)if(e={context:e,memoizedValue:t,next:null},Ul===null){if(Im===null)throw Error(H(308));Ul=e,Im.dependencies={lanes:0,firstContext:e}}else Ul=Ul.next=e;return t}var po=null;function oj(e){po===null?po=[e]:po.push(e)}function iM(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,oj(t)):(n.next=i.next,i.next=n),t.interleaved=n,la(e,r)}function la(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 Ba=!1;function lj(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function aM(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 ta(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function cs(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,De&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,la(e,n)}return i=r.interleaved,i===null?(t.next=t,oj(r)):(t.next=i.next,i.next=t),r.interleaved=t,la(e,n)}function Qp(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,GS(e,n)}}function Kk(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 Rm(e,t,n,r){var i=e.updateQueue;Ba=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var c=o,u=c.next;c.next=null,s===null?a=u:s.next=u,s=c;var f=e.alternate;f!==null&&(f=f.updateQueue,o=f.lastBaseUpdate,o!==s&&(o===null?f.firstBaseUpdate=u:o.next=u,f.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;s=0,f=u=c=null,o=a;do{var h=o.lane,p=o.eventTime;if((r&h)===h){f!==null&&(f=f.next={eventTime:p,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var g=e,m=o;switch(h=t,p=n,m.tag){case 1:if(g=m.payload,typeof g=="function"){d=g.call(p,d,h);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=m.payload,h=typeof g=="function"?g.call(p,d,h):g,h==null)break e;d=bt({},d,h);break e;case 2:Ba=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[o]:h.push(o))}else p={eventTime:p,lane:h,tag:o.tag,payload:o.payload,callback:o.callback,next:null},f===null?(u=f=p,c=d):f=f.next=p,s|=h;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;h=o,o=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(f===null&&(c=d),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=f,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);qo|=s,e.lanes=s,e.memoizedState=d}}function Yk(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;
vendor: 1,566 bytes, line 38
38if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(H(191,i));i.call(r)}}}var Sh={},Ci=Ps(Sh),af=Ps(Sh),sf=Ps(Sh);function mo(e){if(e===Sh)throw Error(H(174));return e}function cj(e,t){switch(it(sf,t),it(af,e),it(Ci,Sh),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:f0(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=f0(t,e)}dt(Ci),it(Ci,t)}function Pc(){dt(Ci),dt(af),dt(sf)}function sM(e){mo(sf.current);var t=mo(Ci.current),n=f0(t,e.type);t!==n&&(it(af,e),it(Ci,n))}function uj(e){af.current===e&&(dt(Ci),dt(af))}var yt=Ps(0);function Mm(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var kx=[];function dj(){for(var e=0;e<kx.length;e++)kx[e]._workInProgressVersionPrimary=null;kx.length=0}var Jp=xa.ReactCurrentDispatcher,Ex=xa.ReactCurrentBatchConfig,Uo=0,xt=null,Ut=null,Gt=null,$m=!1,Td=!1,of=0,R8=0;function on(){throw Error(H(321))}function fj(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!li(e[n],t[n]))return!1;return!0}function hj(e,t,n,r,i,a){if(Uo=a,xt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Jp.current=e===null||e.memoizedState===null?L8:F8,e=n(r,i),Td){a=0;
vendor: 5,131 bytes, line 38
38do{if(Td=!1,of=0,25<=a)throw Error(H(301));a+=1,Gt=Ut=null,t.updateQueue=null,Jp.current=B8,e=n(r,i)}while(Td)}if(Jp.current=Dm,t=Ut!==null&&Ut.next!==null,Uo=0,Gt=Ut=xt=null,$m=!1,t)throw Error(H(300));return e}function pj(){var e=of!==0;return of=0,e}function xi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Gt===null?xt.memoizedState=Gt=e:Gt=Gt.next=e,Gt}function Cr(){if(Ut===null){var e=xt.alternate;e=e!==null?e.memoizedState:null}else e=Ut.next;var t=Gt===null?xt.memoizedState:Gt.next;if(t!==null)Gt=t,Ut=e;else{if(e===null)throw Error(H(310));Ut=e,e={memoizedState:Ut.memoizedState,baseState:Ut.baseState,baseQueue:Ut.baseQueue,queue:Ut.queue,next:null},Gt===null?xt.memoizedState=Gt=e:Gt=Gt.next=e}return Gt}function lf(e,t){return typeof t=="function"?t(e):t}function Cx(e){var t=Cr(),n=t.queue;if(n===null)throw Error(H(311));n.lastRenderedReducer=e;var r=Ut,i=r.baseQueue,a=n.pending;if(a!==null){if(i!==null){var s=i.next;i.next=a.next,a.next=s}r.baseQueue=i=a,n.pending=null}if(i!==null){a=i.next,r=r.baseState;var o=s=null,c=null,u=a;do{var f=u.lane;if((Uo&f)===f)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:f,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(o=c=d,s=r):c=c.next=d,xt.lanes|=f,qo|=f}u=u.next}while(u!==null&&u!==a);c===null?s=r:c.next=o,li(r,t.memoizedState)||(Mn=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do a=i.lane,xt.lanes|=a,qo|=a,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Px(e){var t=Cr(),n=t.queue;if(n===null)throw Error(H(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do a=e(a,s.action),s=s.next;while(s!==i);li(a,t.memoizedState)||(Mn=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function oM(){}function lM(e,t){var n=xt,r=Cr(),i=t(),a=!li(r.memoizedState,i);if(a&&(r.memoizedState=i,Mn=!0),r=r.queue,mj(dM.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||Gt!==null&&Gt.memoizedState.tag&1){if(n.flags|=2048,cf(9,uM.bind(null,n,r,i,t),void 0,null),Yt===null)throw Error(H(349));Uo&30||cM(n,t,i)}return i}function cM(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=xt.updateQueue,t===null?(t={lastEffect:null,stores:null},xt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function uM(e,t,n,r){t.value=n,t.getSnapshot=r,fM(t)&&hM(e)}function dM(e,t,n){return n(function(){fM(t)&&hM(e)})}function fM(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!li(e,n)}catch{return!0}}function hM(e){var t=la(e,1);t!==null&&oi(t,e,1,-1)}function Xk(e){var t=xi();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:lf,lastRenderedState:e},t.queue=e,e=e.dispatch=D8.bind(null,xt,e),[t.memoizedState,e]}function cf(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=xt.updateQueue,t===null?(t={lastEffect:null,stores:null},xt.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function pM(){return Cr().memoizedState}function em(e,t,n,r){var i=xi();xt.flags|=e,i.memoizedState=cf(1|t,n,void 0,r===void 0?null:r)}function jy(e,t,n,r){var i=Cr();r=r===void 0?null:r;var a=void 0;if(Ut!==null){var s=Ut.memoizedState;if(a=s.destroy,r!==null&&fj(r,s.deps)){i.memoizedState=cf(t,n,a,r);return}}xt.flags|=e,i.memoizedState=cf(1|t,n,a,r)}function Zk(e,t){return em(8390656,8,e,t)}function mj(e,t){return jy(2048,8,e,t)}function mM(e,t){return jy(4,2,e,t)}function gM(e,t){return jy(4,4,e,t)}function yM(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function vM(e,t,n){return n=n!=null?n.concat([e]):null,jy(4,4,yM.bind(null,t,e),n)}function gj(){}function xM(e,t){var n=Cr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&fj(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function bM(e,t){var n=Cr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&fj(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function wM(e,t,n){return Uo&21?(li(n,t)||(n=k2(),xt.lanes|=n,qo|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Mn=!0),e.memoizedState=n)}function M8(e,t){var n=Ge;Ge=n!==0&&4>n?n:4,e(!0);var r=Ex.transition;Ex.transition={};try{e(!1),t()}finally{Ge=n,Ex.transition=r}}function SM(){return Cr().memoizedState}function $8(e,t,n){var r=ds(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},jM(e))_M(t,n);else if(n=iM(e,t,n,r),n!==null){var i=An();oi(n,e,r,i),AM(n,t,r)}}function D8(e,t,n){var r=ds(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(jM(e))_M(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,o=a(s,n);
vendor: 8,892 bytes, lines 38-40
38if(i.hasEagerState=!0,i.eagerState=o,li(o,s)){var c=t.interleaved;c===null?(i.next=i,oj(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=iM(e,t,i,r),n!==null&&(i=An(),oi(n,e,r,i),AM(n,t,r))}}function jM(e){var t=e.alternate;return e===xt||t!==null&&t===xt}function _M(e,t){Td=$m=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function AM(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,GS(e,n)}}var Dm={readContext:Er,useCallback:on,useContext:on,useEffect:on,useImperativeHandle:on,useInsertionEffect:on,useLayoutEffect:on,useMemo:on,useReducer:on,useRef:on,useState:on,useDebugValue:on,useDeferredValue:on,useTransition:on,useMutableSource:on,useSyncExternalStore:on,useId:on,unstable_isNewReconciler:!1},L8={readContext:Er,useCallback:function(e,t){return xi().memoizedState=[e,t===void 0?null:t],e},useContext:Er,useEffect:Zk,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,em(4194308,4,yM.bind(null,t,e),n)},useLayoutEffect:function(e,t){return em(4194308,4,e,t)},useInsertionEffect:function(e,t){return em(4,2,e,t)},useMemo:function(e,t){var n=xi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=xi();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=$8.bind(null,xt,e),[r.memoizedState,e]},useRef:function(e){var t=xi();return e={current:e},t.memoizedState=e},useState:Xk,useDebugValue:gj,useDeferredValue:function(e){return xi().memoizedState=e},useTransition:function(){var e=Xk(!1),t=e[0];return e=M8.bind(null,e[1]),xi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=xt,i=xi();if(ht){if(n===void 0)throw Error(H(407));n=n()}else{if(n=t(),Yt===null)throw Error(H(349));Uo&30||cM(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Zk(dM.bind(null,r,a,e),[e]),r.flags|=2048,cf(9,uM.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=xi(),t=Yt.identifierPrefix;if(ht){var n=Qi,r=Zi;n=(r&~(1<<32-si(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=of++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=R8++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},F8={readContext:Er,useCallback:xM,useContext:Er,useEffect:mj,useImperativeHandle:vM,useInsertionEffect:mM,useLayoutEffect:gM,useMemo:bM,useReducer:Cx,useRef:pM,useState:function(){return Cx(lf)},useDebugValue:gj,useDeferredValue:function(e){var t=Cr();return wM(t,Ut.memoizedState,e)},useTransition:function(){var e=Cx(lf)[0],t=Cr().memoizedState;return[e,t]},useMutableSource:oM,useSyncExternalStore:lM,useId:SM,unstable_isNewReconciler:!1},B8={readContext:Er,useCallback:xM,useContext:Er,useEffect:mj,useImperativeHandle:vM,useInsertionEffect:mM,useLayoutEffect:gM,useMemo:bM,useReducer:Px,useRef:pM,useState:function(){return Px(lf)},useDebugValue:gj,useDeferredValue:function(e){var t=Cr();return Ut===null?t.memoizedState=e:wM(t,Ut.memoizedState,e)},useTransition:function(){var e=Px(lf)[0],t=Cr().memoizedState;return[e,t]},useMutableSource:oM,useSyncExternalStore:lM,useId:SM,unstable_isNewReconciler:!1};function Yr(e,t){if(e&&e.defaultProps){t=bt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function I0(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:bt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var _y={isMounted:function(e){return(e=e._reactInternals)?rl(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=An(),i=ds(e),a=ta(r,i);a.payload=t,n!=null&&(a.callback=n),t=cs(e,a,i),t!==null&&(oi(t,e,i,r),Qp(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=An(),i=ds(e),a=ta(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=cs(e,a,i),t!==null&&(oi(t,e,i,r),Qp(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=An(),r=ds(e),i=ta(n,r);i.tag=2,t!=null&&(i.callback=t),t=cs(e,i,r),t!==null&&(oi(t,e,r,n),Qp(t,e,r))}};function Qk(e,t,n,r,i,a,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,a,s):t.prototype&&t.prototype.isPureReactComponent?!ef(n,r)||!ef(i,a):!0}function kM(e,t,n){var r=!1,i=xs,a=t.contextType;return typeof a=="object"&&a!==null?a=Er(a):(i=Ln(t)?Fo:mn.current,r=t.contextTypes,a=(r=r!=null)?kc(e,i):xs),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=_y,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Jk(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&_y.enqueueReplaceState(t,t.state,null)}function R0(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},lj(e);var a=t.contextType;typeof a=="object"&&a!==null?i.context=Er(a):(a=Ln(t)?Fo:mn.current,i.context=kc(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(I0(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&_y.enqueueReplaceState(i,i.state,null),Rm(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Tc(e,t){try{var n="",r=t;do n+=pz(r),r=r.return;while(r);var i=n}catch(a){i=`
39Error generating stack: `+a.message+`
40`+a.stack}return{value:e,source:t,stack:i,digest:null}}function Tx(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function M0(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var U8=typeof WeakMap=="function"?WeakMap:Map;function EM(e,t,n){n=ta(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Fm||(Fm=!0,W0=r),M0(e,t)},n}function CM(e,t,n){n=ta(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){M0(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(n.callback=function(){M0(e,t),typeof r!="function"&&(us===null?us=new Set([this]):us.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function eE(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new U8;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=tV.bind(null,e,t,n),t.then(e,e))}function tE(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function nE(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=ta(-1,1),t.tag=2,cs(n,t,1))),n.lanes|=1),e)}var q8=xa.ReactCurrentOwner,Mn=!1;function vn(e,t,n,r){t.child=e===null?rM(t,null,n,r):Cc(t,e.child,n,r)}function rE(e,t,n,r,i){n=n.render;var a=t.ref;return ic(t,i),r=hj(e,t,n,r,a,i),n=pj(),e!==null&&!Mn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ca(e,t,i)):(ht&&n&&tj(t),t.flags|=1,vn(e,t,r,i),t.child)}function iE(e,t,n,r,i){if(e===null){var a=n.type;return typeof a=="function"&&!_j(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,PM(e,t,a,r,i)):(e=im(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&i)){var s=a.memoizedProps;if(n=n.compare,n=n!==null?n:ef,n(s,r)&&e.ref===t.ref)return ca(e,t,i)}return t.flags|=1,e=fs(a,r),e.ref=t.ref,e.return=t,t.child=e}function PM(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(ef(a,r)&&e.ref===t.ref)if(Mn=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(Mn=!0);else return t.lanes=e.lanes,ca(e,t,i)}return $0(e,t,n,r,i)}function TM(e,t,n){var r=t.pendingProps,i=r.children,a=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},it(zl,Gn),Gn|=n;else{if(!(n&1073741824))return e=a!==null?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,it(zl,Gn),Gn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a!==null?a.baseLanes:n,it(zl,Gn),Gn|=r}else a!==null?(r=a.baseLanes|n,t.memoizedState=null):r=n,it(zl,Gn),Gn|=r;return vn(e,t,i,n),t.child}function OM(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}
vendor: 5,298 bytes, line 40
40function $0(e,t,n,r,i){var a=Ln(n)?Fo:mn.current;return a=kc(t,a),ic(t,i),n=hj(e,t,n,r,a,i),r=pj(),e!==null&&!Mn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ca(e,t,i)):(ht&&r&&tj(t),t.flags|=1,vn(e,t,n,i),t.child)}function aE(e,t,n,r,i){if(Ln(n)){var a=!0;Pm(t)}else a=!1;if(ic(t,i),t.stateNode===null)tm(e,t),kM(t,n,r),R0(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,o=t.memoizedProps;s.props=o;var c=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=Er(u):(u=Ln(n)?Fo:mn.current,u=kc(t,u));var f=n.getDerivedStateFromProps,d=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==r||c!==u)&&Jk(t,s,r,u),Ba=!1;var h=t.memoizedState;s.state=h,Rm(t,r,s,i),c=t.memoizedState,o!==r||h!==c||Dn.current||Ba?(typeof f=="function"&&(I0(t,n,f,r),c=t.memoizedState),(o=Ba||Qk(t,n,o,r,h,c,u))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),s.props=r,s.state=c,s.context=u,r=o):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,aM(e,t),o=t.memoizedProps,u=t.type===t.elementType?o:Yr(t.type,o),s.props=u,d=t.pendingProps,h=s.context,c=n.contextType,typeof c=="object"&&c!==null?c=Er(c):(c=Ln(n)?Fo:mn.current,c=kc(t,c));var p=n.getDerivedStateFromProps;(f=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==d||h!==c)&&Jk(t,s,r,c),Ba=!1,h=t.memoizedState,s.state=h,Rm(t,r,s,i);var g=t.memoizedState;o!==d||h!==g||Dn.current||Ba?(typeof p=="function"&&(I0(t,n,p,r),g=t.memoizedState),(u=Ba||Qk(t,n,u,r,h,g,c)||!1)?(f||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,g,c),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,g,c)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),s.props=r,s.state=g,s.context=c,r=u):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return D0(e,t,n,r,a,i)}function D0(e,t,n,r,i,a){OM(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&Vk(t,n,!1),ca(e,t,a);r=t.stateNode,q8.current=t;var o=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Cc(t,e.child,null,a),t.child=Cc(t,null,o,a)):vn(e,t,o,a),t.memoizedState=r.state,i&&Vk(t,n,!0),t.child}function NM(e){var t=e.stateNode;t.pendingContext?zk(e,t.pendingContext,t.pendingContext!==t.context):t.context&&zk(e,t.context,!1),cj(e,t.containerInfo)}function sE(e,t,n,r,i){return Ec(),rj(i),t.flags|=256,vn(e,t,n,r),t.child}var L0={dehydrated:null,treeContext:null,retryLane:0};function F0(e){return{baseLanes:e,cachePool:null,transitions:null}}function IM(e,t,n){var r=t.pendingProps,i=yt.current,a=!1,s=(t.flags&128)!==0,o;if((o=s)||(o=e!==null&&e.memoizedState===null?!1:(i&2)!==0),o?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),it(yt,i&1),e===null)return O0(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,a?(r=t.mode,a=t.child,s={mode:"hidden",children:s},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=s):a=Ey(s,r,0,null),e=Io(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=F0(n),t.memoizedState=L0,e):yj(t,s));if(i=e.memoizedState,i!==null&&(o=i.dehydrated,o!==null))return z8(e,t,s,r,o,i,n);if(a){a=r.fallback,s=t.mode,i=e.child,o=i.sibling;var c={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=fs(i,c),r.subtreeFlags=i.subtreeFlags&14680064),o!==null?a=fs(o,a):(a=Io(a,s,n,null),a.flags|=2),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,s=e.child.memoizedState,s=s===null?F0(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},a.memoizedState=s,a.childLanes=e.childLanes&~n,t.memoizedState=L0,r}return a=e.child,e=a.sibling,r=fs(a,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function yj(e,t){return t=Ey({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function sp(e,t,n,r){return r!==null&&rj(r),Cc(t,e.child,null,n),e=yj(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}
vendor: 7,626 bytes, line 40
40function z8(e,t,n,r,i,a,s){if(n)return t.flags&256?(t.flags&=-257,r=Tx(Error(H(422))),sp(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=Ey({mode:"visible",children:r.children},i,0,null),a=Io(a,i,s,null),a.flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,t.mode&1&&Cc(t,e.child,null,s),t.child.memoizedState=F0(s),t.memoizedState=L0,a);if(!(t.mode&1))return sp(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var o=r.dgst;return r=o,a=Error(H(419)),r=Tx(a,r,void 0),sp(e,t,s,r)}if(o=(s&e.childLanes)!==0,Mn||o){if(r=Yt,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,la(e,i),oi(r,e,i,-1))}return jj(),r=Tx(Error(H(421))),sp(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=nV.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,Jn=ls(i.nextSibling),er=t,ht=!0,ri=null,e!==null&&(vr[xr++]=Zi,vr[xr++]=Qi,vr[xr++]=Bo,Zi=e.id,Qi=e.overflow,Bo=t),t=yj(t,r.children),t.flags|=4096,t)}function oE(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),N0(e.return,t,n)}function Ox(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function RM(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(vn(e,t,r.children,n),r=yt.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&oE(e,n,t);else if(e.tag===19)oE(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(it(yt,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Mm(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ox(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Mm(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ox(t,!0,n,null,a);break;case"together":Ox(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function tm(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ca(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),qo|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(H(153));if(t.child!==null){for(e=t.child,n=fs(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=fs(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function V8(e,t,n){switch(t.tag){case 3:NM(t),Ec();break;case 5:sM(t);break;case 1:Ln(t.type)&&Pm(t);break;case 4:cj(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;it(Nm,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(it(yt,yt.current&1),t.flags|=128,null):n&t.child.childLanes?IM(e,t,n):(it(yt,yt.current&1),e=ca(e,t,n),e!==null?e.sibling:null);it(yt,yt.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return RM(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),it(yt,yt.current),r)break;return null;case 22:case 23:return t.lanes=0,TM(e,t,n)}return ca(e,t,n)}var MM,B0,$M,DM;MM=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};B0=function(){};$M=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,mo(Ci.current);var a=null;switch(n){case"input":i=l0(e,i),r=l0(e,r),a=[];break;case"select":i=bt({},i,{value:void 0}),r=bt({},r,{value:void 0}),a=[];break;case"textarea":i=d0(e,i),r=d0(e,r),a=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Em)}h0(n,r);var s;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var o=i[u];for(s in o)o.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Gd.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in r){var c=r[u];if(o=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&c!==o&&(c!=null||o!=null))if(u==="style")if(o){for(s in o)!o.hasOwnProperty(s)||c&&c.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in c)c.hasOwnProperty(s)&&o[s]!==c[s]&&(n||(n={}),n[s]=c[s])}else n||(a||(a=[]),a.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,o=o?o.__html:void 0,c!=null&&o!==c&&(a=a||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(a=a||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Gd.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&lt("scroll",e),a||o===c||(a=[])):(a=a||[]).push(u,c))}n&&(a=a||[]).push("style",n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}};DM=function(e,t,n,r){n!==r&&(t.flags|=4)};function Ku(e,t){if(!ht)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ln(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function W8(e,t,n){var r=t.pendingProps;switch(nj(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ln(t),null;case 1:return Ln(t.type)&&Cm(),ln(t),null;case 3:return r=t.stateNode,Pc(),dt(Dn),dt(mn),dj(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ip(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ri!==null&&(K0(ri),ri=null))),B0(e,t),ln(t),null;case 5:uj(t);var i=mo(sf.current);if(n=t.type,e!==null&&t.stateNode!=null)$M(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(H(166));return ln(t),null}if(e=mo(Ci.current),ip(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[ji]=t,r[rf]=a,e=(t.mode&1)!==0,n){case"dialog":lt("cancel",r),lt("close",r);break;case"iframe":case"object":case"embed":lt("load",r);break;case"video":case"audio":for(i=0;i<yd.length;i++)lt(yd[i],r);break;case"source":lt("error",r);break;case"img":case"image":case"link":lt("error",r),lt("load",r);break;case"details":lt("toggle",r);break;case"input":gk(r,a),lt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},lt("invalid",r);break;case"textarea":vk(r,a),lt("invalid",r)}h0(n,a),i=null;for(var s in a)if(a.hasOwnProperty(s)){var o=a[s];
vendor: 28,963 bytes, line 40
40s==="children"?typeof o=="string"?r.textContent!==o&&(a.suppressHydrationWarning!==!0&&rp(r.textContent,o,e),i=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(a.suppressHydrationWarning!==!0&&rp(r.textContent,o,e),i=["children",""+o]):Gd.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&lt("scroll",r)}switch(n){case"input":Yh(r),yk(r,a,!0);break;case"textarea":Yh(r),xk(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=Em)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=d2(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/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[ji]=t,e[rf]=r,MM(e,t,!1,!1),t.stateNode=e;e:{switch(s=p0(n,r),n){case"dialog":lt("cancel",e),lt("close",e),i=r;break;case"iframe":case"object":case"embed":lt("load",e),i=r;break;case"video":case"audio":for(i=0;i<yd.length;i++)lt(yd[i],e);i=r;break;case"source":lt("error",e),i=r;break;case"img":case"image":case"link":lt("error",e),lt("load",e),i=r;break;case"details":lt("toggle",e),i=r;break;case"input":gk(e,r),i=l0(e,r),lt("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=bt({},r,{value:void 0}),lt("invalid",e);break;case"textarea":vk(e,r),i=d0(e,r),lt("invalid",e);break;default:i=r}h0(n,i),o=i;for(a in o)if(o.hasOwnProperty(a)){var c=o[a];a==="style"?p2(e,c):a==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&f2(e,c)):a==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Kd(e,c):typeof c=="number"&&Kd(e,""+c):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Gd.hasOwnProperty(a)?c!=null&&a==="onScroll"&&lt("scroll",e):c!=null&&US(e,a,c,s))}switch(n){case"input":Yh(e),yk(e,r,!1);break;case"textarea":Yh(e),xk(e);break;case"option":r.value!=null&&e.setAttribute("value",""+vs(r.value));break;case"select":e.multiple=!!r.multiple,a=r.value,a!=null?ec(e,!!r.multiple,a,!1):r.defaultValue!=null&&ec(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Em)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ln(t),null;case 6:if(e&&t.stateNode!=null)DM(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(H(166));if(n=mo(sf.current),mo(Ci.current),ip(t)){if(r=t.stateNode,n=t.memoizedProps,r[ji]=t,(a=r.nodeValue!==n)&&(e=er,e!==null))switch(e.tag){case 3:rp(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&rp(r.nodeValue,n,(e.mode&1)!==0)}a&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[ji]=t,t.stateNode=r}return ln(t),null;case 13:if(dt(yt),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ht&&Jn!==null&&t.mode&1&&!(t.flags&128))tM(),Ec(),t.flags|=98560,a=!1;else if(a=ip(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(H(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(H(317));a[ji]=t}else Ec(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ln(t),a=!1}else ri!==null&&(K0(ri),ri=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||yt.current&1?qt===0&&(qt=3):jj())),t.updateQueue!==null&&(t.flags|=4),ln(t),null);case 4:return Pc(),B0(e,t),e===null&&tf(t.stateNode.containerInfo),ln(t),null;case 10:return sj(t.type._context),ln(t),null;case 17:return Ln(t.type)&&Cm(),ln(t),null;case 19:if(dt(yt),a=t.memoizedState,a===null)return ln(t),null;if(r=(t.flags&128)!==0,s=a.rendering,s===null)if(r)Ku(a,!1);else{if(qt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=Mm(e),s!==null){for(t.flags|=128,Ku(a,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)a=n,e=r,a.flags&=14680066,s=a.alternate,s===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=s.childLanes,a.lanes=s.lanes,a.child=s.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=s.memoizedProps,a.memoizedState=s.memoizedState,a.updateQueue=s.updateQueue,a.type=s.type,e=s.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return it(yt,yt.current&1|2),t.child}e=e.sibling}a.tail!==null&&Et()>Oc&&(t.flags|=128,r=!0,Ku(a,!1),t.lanes=4194304)}else{if(!r)if(e=Mm(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ku(a,!0),a.tail===null&&a.tailMode==="hidden"&&!s.alternate&&!ht)return ln(t),null}else 2*Et()-a.renderingStartTime>Oc&&n!==1073741824&&(t.flags|=128,r=!0,Ku(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=Et(),t.sibling=null,n=yt.current,it(yt,r?n&1|2:n&1),t):(ln(t),null);case 22:case 23:return Sj(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Gn&1073741824&&(ln(t),t.subtreeFlags&6&&(t.flags|=8192)):ln(t),null;case 24:return null;case 25:return null}throw Error(H(156,t.tag))}function H8(e,t){switch(nj(t),t.tag){case 1:return Ln(t.type)&&Cm(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Pc(),dt(Dn),dt(mn),dj(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return uj(t),null;case 13:if(dt(yt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(H(340));Ec()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return dt(yt),null;case 4:return Pc(),null;case 10:return sj(t.type._context),null;case 22:case 23:return Sj(),null;case 24:return null;default:return null}}var op=!1,fn=!1,G8=typeof WeakSet=="function"?WeakSet:Set,ne=null;function ql(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){At(e,t,r)}else n.current=null}function U0(e,t,n){try{n()}catch(r){At(e,t,r)}}var lE=!1;function K8(e,t){if(_0=_m,e=q2(),ej(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,o=-1,c=-1,u=0,f=0,d=e,h=null;t:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(o=s+i),d!==a||r!==0&&d.nodeType!==3||(c=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)h=d,d=p;for(;;){if(d===e)break t;if(h===n&&++u===i&&(o=s),h===a&&++f===r&&(c=s),(p=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=p}n=o===-1||c===-1?null:{start:o,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(A0={focusedElem:e,selectionRange:n},_m=!1,ne=t;ne!==null;)if(t=ne,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ne=e;else for(;ne!==null;){t=ne;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var m=g.memoizedProps,y=g.memoizedState,v=t.stateNode,b=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:Yr(t.type,m),y);v.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(H(163))}}catch(j){At(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,ne=e;break}ne=t.return}return g=lE,lE=!1,g}function Od(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&&U0(t,n,a)}i=i.next}while(i!==r)}}function Ay(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 q0(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 LM(e){var t=e.alternate;t!==null&&(e.alternate=null,LM(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ji],delete t[rf],delete t[C0],delete t[T8],delete t[O8])),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 FM(e){return e.tag===5||e.tag===3||e.tag===4}function cE(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||FM(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 z0(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=Em));else if(r!==4&&(e=e.child,e!==null))for(z0(e,t,n),e=e.sibling;e!==null;)z0(e,t,n),e=e.sibling}function V0(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(V0(e,t,n),e=e.sibling;e!==null;)V0(e,t,n),e=e.sibling}var en=null,ei=!1;function Oa(e,t,n){for(n=n.child;n!==null;)BM(e,t,n),n=n.sibling}function BM(e,t,n){if(Ei&&typeof Ei.onCommitFiberUnmount=="function")try{Ei.onCommitFiberUnmount(yy,n)}catch{}switch(n.tag){case 5:fn||ql(n,t);case 6:var r=en,i=ei;en=null,Oa(e,t,n),en=r,ei=i,en!==null&&(ei?(e=en,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):en.removeChild(n.stateNode));break;case 18:en!==null&&(ei?(e=en,n=n.stateNode,e.nodeType===8?_x(e.parentNode,n):e.nodeType===1&&_x(e,n),Qd(e)):_x(en,n.stateNode));break;case 4:r=en,i=ei,en=n.stateNode.containerInfo,ei=!0,Oa(e,t,n),en=r,ei=i;break;case 0:case 11:case 14:case 15:if(!fn&&(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)&&U0(n,t,s),i=i.next}while(i!==r)}Oa(e,t,n);break;case 1:if(!fn&&(ql(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){At(n,t,o)}Oa(e,t,n);break;case 21:Oa(e,t,n);break;case 22:n.mode&1?(fn=(r=fn)||n.memoizedState!==null,Oa(e,t,n),fn=r):Oa(e,t,n);break;default:Oa(e,t,n)}}function uE(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new G8),t.forEach(function(r){var i=rV.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function qr(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e,s=t,o=s;e:for(;o!==null;){switch(o.tag){case 5:en=o.stateNode,ei=!1;break e;case 3:en=o.stateNode.containerInfo,ei=!0;break e;case 4:en=o.stateNode.containerInfo,ei=!0;break e}o=o.return}if(en===null)throw Error(H(160));BM(a,s,i),en=null,ei=!1;var c=i.alternate;c!==null&&(c.return=null),i.return=null}catch(u){At(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)UM(t,e),t=t.sibling}function UM(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(qr(t,e),yi(e),r&4){try{Od(3,e,e.return),Ay(3,e)}catch(m){At(e,e.return,m)}try{Od(5,e,e.return)}catch(m){At(e,e.return,m)}}break;case 1:qr(t,e),yi(e),r&512&&n!==null&&ql(n,n.return);break;case 5:if(qr(t,e),yi(e),r&512&&n!==null&&ql(n,n.return),e.flags&32){var i=e.stateNode;try{Kd(i,"")}catch(m){At(e,e.return,m)}}if(r&4&&(i=e.stateNode,i!=null)){var a=e.memoizedProps,s=n!==null?n.memoizedProps:a,o=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{o==="input"&&a.type==="radio"&&a.name!=null&&c2(i,a),p0(o,s);var u=p0(o,a);for(s=0;s<c.length;s+=2){var f=c[s],d=c[s+1];f==="style"?p2(i,d):f==="dangerouslySetInnerHTML"?f2(i,d):f==="children"?Kd(i,d):US(i,f,d,u)}switch(o){case"input":c0(i,a);break;case"textarea":u2(i,a);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var p=a.value;p!=null?ec(i,!!a.multiple,p,!1):h!==!!a.multiple&&(a.defaultValue!=null?ec(i,!!a.multiple,a.defaultValue,!0):ec(i,!!a.multiple,a.multiple?[]:"",!1))}i[rf]=a}catch(m){At(e,e.return,m)}}break;case 6:if(qr(t,e),yi(e),r&4){if(e.stateNode===null)throw Error(H(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(m){At(e,e.return,m)}}break;case 3:if(qr(t,e),yi(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Qd(t.containerInfo)}catch(m){At(e,e.return,m)}break;case 4:qr(t,e),yi(e);break;case 13:qr(t,e),yi(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(bj=Et())),r&4&&uE(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(fn=(u=fn)||f,qr(t,e),fn=u):qr(t,e),yi(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!f&&e.mode&1)for(ne=e,f=e.child;f!==null;){for(d=ne=f;ne!==null;){switch(h=ne,p=h.child,h.tag){case 0:case 11:case 14:case 15:Od(4,h,h.return);break;case 1:ql(h,h.return);var g=h.stateNode;if(typeof g.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(m){At(r,n,m)}}break;case 5:ql(h,h.return);break;case 22:if(h.memoizedState!==null){fE(d);continue}}p!==null?(p.return=h,ne=p):fE(d)}f=f.sibling}e:for(f=null,d=e;;){if(d.tag===5){if(f===null){f=d;try{i=d.stateNode,u?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(o=d.stateNode,c=d.memoizedProps.style,s=c!=null&&c.hasOwnProperty("display")?c.display:null,o.style.display=h2("display",s))}catch(m){At(e,e.return,m)}}}else if(d.tag===6){if(f===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){At(e,e.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;f===d&&(f=null),d=d.return}f===d&&(f=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:qr(t,e),yi(e),r&4&&uE(e);break;case 21:break;default:qr(t,e),yi(e)}}function yi(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(FM(n)){var r=n;break e}n=n.return}throw Error(H(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Kd(i,""),r.flags&=-33);var a=cE(e);V0(e,a,i);break;case 3:case 4:var s=r.stateNode.containerInfo,o=cE(e);z0(e,o,s);break;default:throw Error(H(161))}}catch(c){At(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Y8(e,t,n){ne=e,qM(e)}function qM(e,t,n){for(var r=(e.mode&1)!==0;ne!==null;){var i=ne,a=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||op;if(!s){var o=i.alternate,c=o!==null&&o.memoizedState!==null||fn;o=op;var u=fn;if(op=s,(fn=c)&&!u)for(ne=i;ne!==null;)s=ne,c=s.child,s.tag===22&&s.memoizedState!==null?hE(i):c!==null?(c.return=s,ne=c):hE(i);for(;a!==null;)ne=a,qM(a),a=a.sibling;ne=i,op=o,fn=u}dE(e)}else i.subtreeFlags&8772&&a!==null?(a.return=i,ne=a):dE(e)}}function dE(e){for(;ne!==null;){var t=ne;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:fn||Ay(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!fn)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Yr(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&Yk(t,a,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Yk(t,s,n)}break;case 5:var o=t.stateNode;if(n===null&&t.flags&4){n=o;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var f=u.memoizedState;if(f!==null){var d=f.dehydrated;d!==null&&Qd(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(H(163))}fn||t.flags&512&&q0(t)}catch(h){At(t,t.return,h)}}if(t===e){ne=null;break}if(n=t.sibling,n!==null){n.return=t.return,ne=n;break}ne=t.return}}function fE(e){for(;ne!==null;){var t=ne;if(t===e){ne=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ne=n;break}ne=t.return}}function hE(e){for(;ne!==null;){var t=ne;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ay(4,t)}catch(c){At(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(c){At(t,i,c)}}var a=t.return;try{q0(t)}catch(c){At(t,a,c)}break;case 5:var s=t.return;try{q0(t)}catch(c){At(t,s,c)}}}catch(c){At(t,t.return,c)}if(t===e){ne=null;break}var o=t.sibling;if(o!==null){o.return=t.return,ne=o;break}ne=t.return}}var X8=Math.ceil,Lm=xa.ReactCurrentDispatcher,vj=xa.ReactCurrentOwner,_r=xa.ReactCurrentBatchConfig,De=0,Yt=null,It=null,nn=0,Gn=0,zl=Ps(0),qt=0,uf=null,qo=0,ky=0,xj=0,Nd=null,Rn=null,bj=0,Oc=1/0,Hi=null,Fm=!1,W0=null,us=null,lp=!1,es=null,Bm=0,Id=0,H0=null,nm=-1,rm=0;function An(){return De&6?Et():nm!==-1?nm:nm=Et()}function ds(e){return e.mode&1?De&2&&nn!==0?nn&-nn:I8.transition!==null?(rm===0&&(rm=k2()),rm):(e=Ge,e!==0||(e=window.event,e=e===void 0?16:I2(e.type)),e):1}function oi(e,t,n,r){if(50<Id)throw Id=0,H0=null,Error(H(185));xh(e,n,r),(!(De&2)||e!==Yt)&&(e===Yt&&(!(De&2)&&(ky|=n),qt===4&&Ha(e,nn)),Fn(e,r),n===1&&De===0&&!(t.mode&1)&&(Oc=Et()+500,Sy&&Ts()))}function Fn(e,t){var n=e.callbackNode;Iz(e,t);var r=jm(e,e===Yt?nn:0);if(r===0)n!==null&&Sk(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Sk(n),t===1)e.tag===0?N8(pE.bind(null,e)):Q2(pE.bind(null,e)),C8(function(){!(De&6)&&Ts()}),n=null;else{switch(E2(r)){case 1:n=HS;break;case 4:n=_2;break;case 16:n=Sm;break;case 536870912:n=A2;break;default:n=Sm}n=XM(n,zM.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function zM(e,t){if(nm=-1,rm=0,De&6)throw Error(H(327));var n=e.callbackNode;if(ac()&&e.callbackNode!==n)return null;var r=jm(e,e===Yt?nn:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Um(e,r);else{t=r;var i=De;De|=2;var a=WM();(Yt!==e||nn!==t)&&(Hi=null,Oc=Et()+500,No(e,t));do try{J8();break}catch(o){VM(e,o)}while(!0);aj(),Lm.current=a,De=i,It!==null?t=0:(Yt=null,nn=0,t=qt)}if(t!==0){if(t===2&&(i=x0(e),i!==0&&(r=i,t=G0(e,i))),t===1)throw n=uf,No(e,0),Ha(e,r),Fn(e,Et()),n;if(t===6)Ha(e,r);else{if(i=e.current.alternate,!(r&30)&&!Z8(i)&&(t=Um(e,r),t===2&&(a=x0(e),a!==0&&(r=a,t=G0(e,a))),t===1))throw n=uf,No(e,0),Ha(e,r),Fn(e,Et()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(H(345));case 2:no(e,Rn,Hi);break;case 3:if(Ha(e,r),(r&130023424)===r&&(t=bj+500-Et(),10<t)){if(jm(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){An(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=E0(no.bind(null,e,Rn,Hi),t);break}no(e,Rn,Hi);break;case 4:if(Ha(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-si(r);a=1<<s,s=t[s],s>i&&(i=s),r&=~a}if(r=i,r=Et()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*X8(r/1960))-r,10<r){e.timeoutHandle=E0(no.bind(null,e,Rn,Hi),r);break}no(e,Rn,Hi);break;case 5:no(e,Rn,Hi);break;default:throw Error(H(329))}}}return Fn(e,Et()),e.callbackNode===n?zM.bind(null,e):null}function G0(e,t){var n=Nd;return e.current.memoizedState.isDehydrated&&(No(e,t).flags|=256),e=Um(e,t),e!==2&&(t=Rn,Rn=n,t!==null&&K0(t)),e}function K0(e){Rn===null?Rn=e:Rn.push.apply(Rn,e)}function Z8(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!li(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ha(e,t){for(t&=~xj,t&=~ky,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-si(t),r=1<<n;e[n]=-1,t&=~r}}function pE(e){if(De&6)throw Error(H(327));ac();var t=jm(e,0);if(!(t&1))return Fn(e,Et()),null;var n=Um(e,t);if(e.tag!==0&&n===2){var r=x0(e);r!==0&&(t=r,n=G0(e,r))}if(n===1)throw n=uf,No(e,0),Ha(e,t),Fn(e,Et()),n;if(n===6)throw Error(H(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,no(e,Rn,Hi),Fn(e,Et()),null}function wj(e,t){var n=De;De|=1;try{return e(t)}finally{De=n,De===0&&(Oc=Et()+500,Sy&&Ts())}}function zo(e){es!==null&&es.tag===0&&!(De&6)&&ac();var t=De;De|=1;var n=_r.transition,r=Ge;try{if(_r.transition=null,Ge=1,e)return e()}finally{Ge=r,_r.transition=n,De=t,!(De&6)&&Ts()}}function Sj(){Gn=zl.current,dt(zl)}function No(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,E8(n)),It!==null)for(n=It.return;n!==null;){var r=n;switch(nj(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Cm();break;case 3:Pc(),dt(Dn),dt(mn),dj();break;case 5:uj(r);break;case 4:Pc();break;case 13:dt(yt);break;case 19:dt(yt);break;case 10:sj(r.type._context);break;case 22:case 23:Sj()}n=n.return}if(Yt=e,It=e=fs(e.current,null),nn=Gn=t,qt=0,uf=null,xj=ky=qo=0,Rn=Nd=null,po!==null){for(t=0;t<po.length;t++)if(n=po[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var s=a.next;a.next=i,r.next=s}n.pending=r}po=null}return e}function VM(e,t){do{var n=It;try{if(aj(),Jp.current=Dm,$m){for(var r=xt.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}$m=!1}if(Uo=0,Gt=Ut=xt=null,Td=!1,of=0,vj.current=null,n===null||n.return===null){qt=1,uf=t,It=null;break}e:{var a=e,s=n.return,o=n,c=t;if(t=nn,o.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,f=o,d=f.tag;if(!(f.mode&1)&&(d===0||d===11||d===15)){var h=f.alternate;h?(f.updateQueue=h.updateQueue,f.memoizedState=h.memoizedState,f.lanes=h.lanes):(f.updateQueue=null,f.memoizedState=null)}var p=tE(s);if(p!==null){p.flags&=-257,nE(p,s,o,a,t),p.mode&1&&eE(a,u,t),t=p,c=u;var g=t.updateQueue;if(g===null){var m=new Set;m.add(c),t.updateQueue=m}else g.add(c);break e}else{if(!(t&1)){eE(a,u,t),jj();break e}c=Error(H(426))}}else if(ht&&o.mode&1){var y=tE(s);if(y!==null){!(y.flags&65536)&&(y.flags|=256),nE(y,s,o,a,t),rj(Tc(c,o));break e}}a=c=Tc(c,o),qt!==4&&(qt=2),Nd===null?Nd=[a]:Nd.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var v=EM(a,c,t);Kk(a,v);break e;case 1:o=c;var b=a.type,x=a.stateNode;if(!(a.flags&128)&&(typeof b.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(us===null||!us.has(x)))){a.flags|=65536,t&=-t,a.lanes|=t;var j=CM(a,o,t);Kk(a,j);break e}}a=a.return}while(a!==null)}GM(n)}catch(S){t=S,It===n&&n!==null&&(It=n=n.return);continue}break}while(!0)}function WM(){var e=Lm.current;return Lm.current=Dm,e===null?Dm:e}function jj(){(qt===0||qt===3||qt===2)&&(qt=4),Yt===null||!(qo&268435455)&&!(ky&268435455)||Ha(Yt,nn)}function Um(e,t){var n=De;De|=2;var r=WM();(Yt!==e||nn!==t)&&(Hi=null,No(e,t));do try{Q8();break}catch(i){VM(e,i)}while(!0);if(aj(),De=n,Lm.current=r,It!==null)throw Error(H(261));return Yt=null,nn=0,qt}function Q8(){for(;It!==null;)HM(It)}function J8(){for(;It!==null&&!_z();)HM(It)}function HM(e){var t=YM(e.alternate,e,Gn);e.memoizedProps=e.pendingProps,t===null?GM(e):It=t,vj.current=null}function GM(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=H8(n,t),n!==null){n.flags&=32767,It=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{qt=6,It=null;return}}else if(n=W8(n,t,Gn),n!==null){It=n;return}if(t=t.sibling,t!==null){It=t;return}It=t=e}while(t!==null);qt===0&&(qt=5)}function no(e,t,n){var r=Ge,i=_r.transition;try{_r.transition=null,Ge=1,eV(e,t,n,r)}finally{_r.transition=i,Ge=r}return null}function eV(e,t,n,r){do ac();while(es!==null);if(De&6)throw Error(H(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(H(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(Rz(e,a),e===Yt&&(It=Yt=null,nn=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||lp||(lp=!0,XM(Sm,function(){return ac(),null})),a=(n.flags&15990)!==0,n.subtreeFlags&15990||a){a=_r.transition,_r.transition=null;var s=Ge;Ge=1;var o=De;De|=4,vj.current=null,K8(e,n),UM(n,e),b8(A0),_m=!!_0,A0=_0=null,e.current=n,Y8(n),Az(),De=o,Ge=s,_r.transition=a}else e.current=n;if(lp&&(lp=!1,es=e,Bm=i),a=e.pendingLanes,a===0&&(us=null),Cz(n.stateNode),Fn(e,Et()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Fm)throw Fm=!1,e=W0,W0=null,e;return Bm&1&&e.tag!==0&&ac(),a=e.pendingLanes,a&1?e===H0?Id++:(Id=0,H0=e):Id=0,Ts(),null}function ac(){if(es!==null){var e=E2(Bm),t=_r.transition,n=Ge;try{if(_r.transition=null,Ge=16>e?16:e,es===null)var r=!1;else{if(e=es,es=null,Bm=0,De&6)throw Error(H(331));var i=De;for(De|=4,ne=e.current;ne!==null;){var a=ne,s=a.child;if(ne.flags&16){var o=a.deletions;if(o!==null){for(var c=0;c<o.length;c++){var u=o[c];for(ne=u;ne!==null;){var f=ne;switch(f.tag){case 0:case 11:case 15:Od(8,f,a)}var d=f.child;if(d!==null)d.return=f,ne=d;else for(;ne!==null;){f=ne;var h=f.sibling,p=f.return;if(LM(f),f===u){ne=null;break}if(h!==null){h.return=p,ne=h;break}ne=p}}}var g=a.alternate;if(g!==null){var m=g.child;if(m!==null){g.child=null;do{var y=m.sibling;m.sibling=null,m=y}while(m!==null)}}ne=a}}if(a.subtreeFlags&2064&&s!==null)s.return=a,ne=s;else e:for(;ne!==null;){if(a=ne,a.flags&2048)switch(a.tag){case 0:case 11:case 15:Od(9,a,a.return)}var v=a.sibling;if(v!==null){v.return=a.return,ne=v;break e}ne=a.return}}var b=e.current;for(ne=b;ne!==null;){s=ne;var x=s.child;if(s.subtreeFlags&2064&&x!==null)x.return=s,ne=x;else e:for(s=b;ne!==null;){if(o=ne,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:Ay(9,o)}}catch(S){At(o,o.return,S)}if(o===s){ne=null;break e}var j=o.sibling;if(j!==null){j.return=o.return,ne=j;break e}ne=o.return}}if(De=i,Ts(),Ei&&typeof Ei.onPostCommitFiberRoot=="function")try{Ei.onPostCommitFiberRoot(yy,e)}catch{}r=!0}return r}finally{Ge=n,_r.transition=t}}return!1}function mE(e,t,n){t=Tc(n,t),t=EM(e,t,1),e=cs(e,t,1),t=An(),e!==null&&(xh(e,1,t),Fn(e,t))}function At(e,t,n){if(e.tag===3)mE(e,e,n);else for(;t!==null;){if(t.tag===3){mE(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(us===null||!us.has(r))){e=Tc(n,e),e=CM(t,e,1),t=cs(t,e,1),e=An(),t!==null&&(xh(t,1,e),Fn(t,e));break}}t=t.return}}function tV(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=An(),e.pingedLanes|=e.suspendedLanes&n,Yt===e&&(nn&n)===n&&(qt===4||qt===3&&(nn&130023424)===nn&&500>Et()-bj?No(e,0):xj|=n),Fn(e,t)}function KM(e,t){t===0&&(e.mode&1?(t=Qh,Qh<<=1,!(Qh&130023424)&&(Qh=4194304)):t=1);var n=An();e=la(e,t),e!==null&&(xh(e,t,n),Fn(e,n))}function nV(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),KM(e,n)}function rV(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(H(314))}r!==null&&r.delete(t),KM(e,n)}var YM;YM=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Dn.current)Mn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Mn=!1,V8(e,t,n);Mn=!!(e.flags&131072)}else Mn=!1,ht&&t.flags&1048576&&J2(t,Om,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;tm(e,t),e=t.pendingProps;var i=kc(t,mn.current);ic(t,n),i=hj(null,t,r,e,i,n);var a=pj();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,Ln(r)?(a=!0,Pm(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,lj(t),i.updater=_y,t.stateNode=i,i._reactInternals=t,R0(t,r,e,n),t=D0(null,t,r,!0,a,n)):(t.tag=0,ht&&a&&tj(t),vn(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(tm(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=aV(r),e=Yr(r,e),i){case 0:t=$0(null,t,r,e,n);break e;case 1:t=aE(null,t,r,e,n);break e;case 11:t=rE(null,t,r,e,n);break e;case 14:t=iE(null,t,r,Yr(r.type,e),n);break e}throw Error(H(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Yr(r,i),$0(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Yr(r,i),aE(e,t,r,i,n);case 3:e:{if(NM(t),e===null)throw Error(H(387));
vendor: 4,729 bytes, line 40
40r=t.pendingProps,a=t.memoizedState,i=a.element,aM(e,t),Rm(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=Tc(Error(H(423)),t),t=sE(e,t,r,n,i);break e}else if(r!==i){i=Tc(Error(H(424)),t),t=sE(e,t,r,n,i);break e}else for(Jn=ls(t.stateNode.containerInfo.firstChild),er=t,ht=!0,ri=null,n=rM(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ec(),r===i){t=ca(e,t,n);break e}vn(e,t,r,n)}t=t.child}return t;case 5:return sM(t),e===null&&O0(t),r=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,s=i.children,k0(r,i)?s=null:a!==null&&k0(r,a)&&(t.flags|=32),OM(e,t),vn(e,t,s,n),t.child;case 6:return e===null&&O0(t),null;case 13:return IM(e,t,n);case 4:return cj(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Cc(t,null,r,n):vn(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Yr(r,i),rE(e,t,r,i,n);case 7:return vn(e,t,t.pendingProps,n),t.child;case 8:return vn(e,t,t.pendingProps.children,n),t.child;case 12:return vn(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,it(Nm,r._currentValue),r._currentValue=s,a!==null)if(li(a.value,s)){if(a.children===i.children&&!Dn.current){t=ca(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var o=a.dependencies;if(o!==null){s=a.child;for(var c=o.firstContext;c!==null;){if(c.context===r){if(a.tag===1){c=ta(-1,n&-n),c.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?c.next=c:(c.next=f.next,f.next=c),u.pending=c}}a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),N0(a.return,n,t),o.lanes|=n;break}c=c.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(H(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),N0(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}vn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,ic(t,n),i=Er(i),r=r(i),t.flags|=1,vn(e,t,r,n),t.child;case 14:return r=t.type,i=Yr(r,t.pendingProps),i=Yr(r.type,i),iE(e,t,r,i,n);case 15:return PM(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Yr(r,i),tm(e,t),t.tag=1,Ln(r)?(e=!0,Pm(t)):e=!1,ic(t,n),kM(t,r,i),R0(t,r,i,n),D0(null,t,r,!0,e,n);case 19:return RM(e,t,n);case 22:return TM(e,t,n)}throw Error(H(156,t.tag))};function XM(e,t){return j2(e,t)}function iV(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 wr(e,t,n,r){return new iV(e,t,n,r)}function _j(e){return e=e.prototype,!(!e||!e.isReactComponent)}function aV(e){if(typeof e=="function")return _j(e)?1:0;if(e!=null){if(e=e.$$typeof,e===zS)return 11;if(e===VS)return 14}return 2}function fs(e,t){var n=e.alternate;return n===null?(n=wr(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 im(e,t,n,r,i,a){var s=2;if(r=e,typeof e=="function")_j(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Il:return Io(n.children,i,a,t);case qS:s=8,i|=8;break;case i0:return e=wr(12,n,t,i|2),e.elementType=i0,e.lanes=a,e;case a0:return e=wr(13,n,t,i),e.elementType=a0,e.lanes=a,e;case s0:return e=wr(19,n,t,i),e.elementType=s0,e.lanes=a,e;case s2:return Ey(n,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case i2:s=10;break e;case a2:s=9;break e;case zS:s=11;break e;case VS:s=14;break e;case Fa:s=16,r=null;break e}throw Error(H(130,e==null?e:typeof e,""))}return t=wr(s,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function Io(e,t,n,r){return e=wr(7,e,r,t),e.lanes=n,e}function Ey(e,t,n,r){return e=wr(22,e,r,t),e.elementType=s2,e.lanes=n,e.stateNode={isHidden:!1},e}function Nx(e,t,n){return e=wr(6,e,null,t),e.lanes=n,e}
vendor: 7,752 bytes, line 40
40function Ix(e,t,n){return t=wr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function sV(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=hx(0),this.expirationTimes=hx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hx(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Aj(e,t,n,r,i,a,s,o,c){return e=new sV(e,t,n,o,c),t===1?(t=1,a===!0&&(t|=8)):t=0,a=wr(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},lj(a),e}function oV(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Nl,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function ZM(e){if(!e)return xs;e=e._reactInternals;e:{if(rl(e)!==e||e.tag!==1)throw Error(H(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ln(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(H(171))}if(e.tag===1){var n=e.type;if(Ln(n))return Z2(e,n,t)}return t}function QM(e,t,n,r,i,a,s,o,c){return e=Aj(n,r,!0,e,i,a,s,o,c),e.context=ZM(null),n=e.current,r=An(),i=ds(n),a=ta(r,i),a.callback=t??null,cs(n,a,i),e.current.lanes=i,xh(e,i,r),Fn(e,r),e}function Cy(e,t,n,r){var i=t.current,a=An(),s=ds(i);return n=ZM(n),t.context===null?t.context=n:t.pendingContext=n,t=ta(a,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=cs(i,t,s),e!==null&&(oi(e,i,s,a),Qp(e,i,s)),s}function qm(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function gE(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function kj(e,t){gE(e,t),(e=e.alternate)&&gE(e,t)}function lV(){return null}var JM=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ej(e){this._internalRoot=e}Py.prototype.render=Ej.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(H(409));Cy(e,t,null,null)};Py.prototype.unmount=Ej.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;zo(function(){Cy(null,e,null,null)}),t[oa]=null}};function Py(e){this._internalRoot=e}Py.prototype.unstable_scheduleHydration=function(e){if(e){var t=T2();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Wa.length&&t!==0&&t<Wa[n].priority;n++);Wa.splice(n,0,e),n===0&&N2(e)}};function Cj(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ty(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function yE(){}function cV(e,t,n,r,i){if(i){if(typeof r=="function"){var a=r;r=function(){var u=qm(s);a.call(u)}}var s=QM(t,r,e,0,null,!1,!1,"",yE);return e._reactRootContainer=s,e[oa]=s.current,tf(e.nodeType===8?e.parentNode:e),zo(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var o=r;r=function(){var u=qm(c);o.call(u)}}var c=Aj(e,0,!1,null,null,!1,!1,"",yE);return e._reactRootContainer=c,e[oa]=c.current,tf(e.nodeType===8?e.parentNode:e),zo(function(){Cy(t,c,n,r)}),c}function Oy(e,t,n,r,i){var a=n._reactRootContainer;if(a){var s=a;if(typeof i=="function"){var o=i;i=function(){var c=qm(s);o.call(c)}}Cy(t,s,e,i)}else s=cV(n,t,e,i,r);return qm(s)}C2=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=gd(t.pendingLanes);n!==0&&(GS(t,n|1),Fn(t,Et()),!(De&6)&&(Oc=Et()+500,Ts()))}break;case 13:zo(function(){var r=la(e,1);if(r!==null){var i=An();oi(r,e,1,i)}}),kj(e,1)}};KS=function(e){if(e.tag===13){var t=la(e,134217728);if(t!==null){var n=An();oi(t,e,134217728,n)}kj(e,134217728)}};P2=function(e){if(e.tag===13){var t=ds(e),n=la(e,t);if(n!==null){var r=An();oi(n,e,t,r)}kj(e,t)}};T2=function(){return Ge};O2=function(e,t){var n=Ge;try{return Ge=e,t()}finally{Ge=n}};g0=function(e,t,n){switch(t){case"input":if(c0(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=wy(r);if(!i)throw Error(H(90));l2(r),c0(r,i)}}}break;case"textarea":u2(e,n);break;case"select":t=n.value,t!=null&&ec(e,!!n.multiple,t,!1)}};y2=wj;v2=zo;var uV={usingClientEntryPoint:!1,Events:[wh,Dl,wy,m2,g2,wj]},Yu={findFiberByHostInstance:ho,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},dV={bundleType:Yu.bundleType,version:Yu.version,rendererPackageName:Yu.rendererPackageName,rendererConfig:Yu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:xa.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=w2(e),e===null?null:e.stateNode},findFiberByHostInstance:Yu.findFiberByHostInstance||lV,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var cp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!cp.isDisabled&&cp.supportsFiber)try{yy=cp.inject(dV),Ei=cp}catch{}}or.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=uV;or.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Cj(t))throw Error(H(200));return oV(e,t,null,n)};or.createRoot=function(e,t){if(!Cj(e))throw Error(H(299));var n=!1,r="",i=JM;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Aj(e,1,!1,null,null,n,!1,r,i),e[oa]=t.current,tf(e.nodeType===8?e.parentNode:e),new Ej(t)};or.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(H(188)):(e=Object.keys(e).join(","),Error(H(268,e)));return e=w2(t),e=e===null?null:e.stateNode,e};or.flushSync=function(e){return zo(e)};or.hydrate=function(e,t,n){if(!Ty(t))throw Error(H(200));return Oy(null,e,t,!0,n)};or.hydrateRoot=function(e,t,n){if(!Cj(e))throw Error(H(405));var r=n!=null&&n.hydratedSources||null,i=!1,a="",s=JM;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=QM(t,null,e,1,n??null,i,!1,a,s),e[oa]=t.current,tf(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Py(t)};or.render=function(e,t,n){if(!Ty(t))throw Error(H(200));return Oy(null,e,t,!1,n)};or.unmountComponentAtNode=function(e){if(!Ty(e))throw Error(H(40));return e._reactRootContainer?(zo(function(){Oy(null,null,e,!1,function(){e._reactRootContainer=null,e[oa]=null})}),!0):!1};or.unstable_batchedUpdates=wj;or.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Ty(n))throw Error(H(200));if(e==null||e._reactInternals===void 0)throw Error(H(38));return Oy(e,t,n,!1,r)};or.version="18.3.1-next-f1338f8080-20240426";
40function e$(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e$)}catch(e){console.error(e)}}e$(),e2.exports=or;var il=e2.exports;const t$=qe(il);var n$,vE=il;n$=vE.createRoot,vE.hydrateRoot;const fV=1,hV=1e6;let Rx=0;function pV(){return Rx=(Rx+1)%Number.MAX_SAFE_INTEGER,Rx.toString()}const Mx=new Map,xE=e=>{if(Mx.has(e))return;const t=setTimeout(()=>{Mx.delete(e),Rd({type:"REMOVE_TOAST",toastId:e})},hV);Mx.set(e,t)},mV=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,fV)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?xE(n):e.toasts.forEach(r=>{xE(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},am=[];let sm={toasts:[]};function Rd(e){sm=mV(sm,e),am.forEach(t=>{t(sm)})}function gV({...e}){const t=pV(),n=i=>Rd({type:"UPDATE_TOAST",toast:{...i,id:t}}),r=()=>Rd({type:"DISMISS_TOAST",toastId:t});return Rd({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function ba(){const[e,t]=w.useState(sm);return w.useEffect(()=>(am.push(t),()=>{const n=am.indexOf(t);n>-1&&am.splice(n,1)}),[e]),{...e,toast:gV,dismiss:n=>Rd({type:"DISMISS_TOAST",toastId:n})}}function me(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function bE(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function r$(...e){return t=>{let n=!1;const r=e.map(i=>{const a=bE(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():bE(e[i],null)}}}}function ze(...e){return w.useCallback(r$(...e),e)}function yV(e,t){const n=w.createContext(t),r=a=>{const{children:s,...o}=a,c=w.useMemo(()=>o,Object.values(o));return l.jsx(n.Provider,{value:c,children:s})};r.displayName=e+"Provider";function i(a){const s=w.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function wa(e,t=[]){let n=[];function r(a,s){const o=w.createContext(s),c=n.length;n=[...n,s];const u=d=>{var v;const{scope:h,children:p,...g}=d,m=((v=h==null?void 0:h[e])==null?void 0:v[c])||o,y=w.useMemo(()=>g,Object.values(g));return l.jsx(m.Provider,{value:y,children:p})};u.displayName=a+"Provider";function f(d,h){var m;const p=((m=h==null?void 0:h[e])==null?void 0:m[c])||o,g=w.useContext(p);if(g)return g;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[u,f]}const i=()=>{const a=n.map(s=>w.createContext(s));return function(o){const c=(o==null?void 0:o[e])||a;return w.useMemo(()=>({[`__scope${e}`]:{...o,[e]:c}}),[o,c])}};return i.scopeName=e,[r,vV(i,...t)]}function vV(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const s=r.reduce((o,{useScope:c,scopeName:u})=>{const d=c(a)[`__scope${u}`];return{...o,...d}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Vo(e){const t=bV(e),n=w.forwardRef((r,i)=>{const{children:a,...s}=r,o=w.Children.toArray(a),c=o.find(SV);if(c){const u=c.props.children,f=o.map(d=>d===c?w.Children.count(u)>1?w.Children.only(null):w.isValidElement(u)?u.props.children:null:d);return l.jsx(t,{...s,ref:i,children:w.isValidElement(u)?w.cloneElement(u,void 0,f):null})}return l.jsx(t,{...s,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}var xV=Vo("Slot");function bV(e){const t=w.forwardRef((n,r)=>{const{children:i,...a}=n;if(w.isValidElement(i)){const s=_V(i),o=jV(a,i.props);return i.type!==w.Fragment&&(o.ref=r?r$(r,s):s),w.cloneElement(i,o)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var i$=Symbol("radix.slottable");function wV(e){const t=({children:n})=>l.jsx(l.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=i$,t}function SV(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===i$}function jV(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...o)=>{const c=a(...o);return i(...o),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}
vendor: 9,308 bytes, line 40
40:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function _V(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function a$(e){const t=e+"CollectionProvider",[n,r]=wa(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:y,children:v}=m,b=C.useRef(null),x=C.useRef(new Map).current;return l.jsx(i,{scope:y,itemMap:x,collectionRef:b,children:v})};s.displayName=t;const o=e+"CollectionSlot",c=Vo(o),u=C.forwardRef((m,y)=>{const{scope:v,children:b}=m,x=a(o,v),j=ze(y,x.collectionRef);return l.jsx(c,{ref:j,children:b})});u.displayName=o;const f=e+"CollectionItemSlot",d="data-radix-collection-item",h=Vo(f),p=C.forwardRef((m,y)=>{const{scope:v,children:b,...x}=m,j=C.useRef(null),S=ze(y,j),_=a(f,v);return C.useEffect(()=>(_.itemMap.set(j,{ref:j,...x}),()=>void _.itemMap.delete(j))),l.jsx(h,{[d]:"",ref:S,children:b})});p.displayName=f;function g(m){const y=a(e+"CollectionConsumer",m);return C.useCallback(()=>{const b=y.collectionRef.current;if(!b)return[];const x=Array.from(b.querySelectorAll(`[${d}]`));return Array.from(y.itemMap.values()).sort((_,A)=>x.indexOf(_.ref.current)-x.indexOf(A.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:s,Slot:u,ItemSlot:p},g,r]}var AV=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Pe=AV.reduce((e,t)=>{const n=Vo(`Primitive.${t}`),r=w.forwardRef((i,a)=>{const{asChild:s,...o}=i,c=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...o,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function s$(e,t){e&&il.flushSync(()=>e.dispatchEvent(t))}function ci(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function kV(e,t=globalThis==null?void 0:globalThis.document){const n=ci(e);w.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var EV="DismissableLayer",Y0="dismissableLayer.update",CV="dismissableLayer.pointerDownOutside",PV="dismissableLayer.focusOutside",wE,o$=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),mu=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:o,...c}=e,u=w.useContext(o$),[f,d]=w.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=w.useState({}),g=ze(t,A=>d(A)),m=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(y),b=f?m.indexOf(f):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,j=b>=v,S=OV(A=>{const k=A.target,E=[...u.branches].some(T=>T.contains(k));!j||E||(i==null||i(A),s==null||s(A),A.defaultPrevented||o==null||o())},h),_=NV(A=>{const k=A.target;[...u.branches].some(T=>T.contains(k))||(a==null||a(A),s==null||s(A),A.defaultPrevented||o==null||o())},h);return kV(A=>{b===u.layers.size-1&&(r==null||r(A),!A.defaultPrevented&&o&&(A.preventDefault(),o()))},h),w.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(wE=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),SE(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=wE)}},[f,h,n,u]),w.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),SE())},[f,u]),w.useEffect(()=>{const A=()=>p({});return document.addEventListener(Y0,A),()=>document.removeEventListener(Y0,A)},[]),l.jsx(Pe.div,{...c,ref:g,style:{pointerEvents:x?j?"auto":"none":void 0,...e.style},onFocusCapture:me(e.onFocusCapture,_.onFocusCapture),onBlurCapture:me(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:me(e.onPointerDownCapture,S.onPointerDownCapture)})});mu.displayName=EV;var TV="DismissableLayerBranch",l$=w.forwardRef((e,t)=>{const n=w.useContext(o$),r=w.useRef(null),i=ze(t,r);return w.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),l.jsx(Pe.div,{...e,ref:i})});l$.displayName=TV;function OV(e,t=globalThis==null?void 0:globalThis.document){const n=ci(e),r=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const a=o=>{if(o.target&&!r.current){let c=function(){c$(CV,n,u,{discrete:!0})};const u={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function NV(e,t=globalThis==null?void 0:globalThis.document){const n=ci(e),r=w.useRef(!1);return w.useEffect(()=>{const i=a=>{a.target&&!r.current&&c$(PV,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function SE(){const e=new CustomEvent(Y0);document.dispatchEvent(e)}function c$(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?s$(i,a):i.dispatchEvent(a)}var IV=mu,RV=l$,an=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},MV="Portal",jh=w.forwardRef((e,t)=>{var o;const{container:n,...r}=e,[i,a]=w.useState(!1);an(()=>a(!0),[]);const s=n||i&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return s?t$.createPortal(l.jsx(Pe.div,{...r,ref:t}),s):null});jh.displayName=MV;function $V(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var Sa=e=>{const{present:t,children:n}=e,r=DV(t),i=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),a=ze(r.ref,LV(i));return typeof n=="function"||r.isPresent?w.cloneElement(i,{ref:a}):null};Sa.displayName="Presence";function DV(e){const[t,n]=w.useState(),r=w.useRef(null),i=w.useRef(e),a=w.useRef("none"),s=e?"mounted":"unmounted",[o,c]=$V(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const u=up(r.current);a.current=o==="mounted"?u:"none"},[o]),an(()=>{const u=r.current,f=i.current;if(f!==e){const h=a.current,p=up(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),an(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,d=p=>{const m=up(r.current).includes(p.animationName);if(p.target===t&&m&&(c("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},h=p=>{p.target===t&&(a.current=up(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:w.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function up(e){return(e==null?void 0:e.animationName)||"none"}function LV(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var FV=LS[" useInsertionEffect ".trim().toString()]||an;function Wo({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,a,s]=BV({defaultProp:t,onChange:n}),o=e!==void 0,c=o?e:i;{const f=w.useRef(e!==void 0);w.useEffect(()=>{const d=f.current;d!==o&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=o},[o,r])}const u=w.useCallback(f=>{var d;if(o){const h=UV(f)?f(e):f;h!==e&&((d=s.current)==null||d.call(s,h))}else a(f)},[o,e,a,s]);return[c,u]}function BV({defaultProp:e,onChange:t}){const[n,r]=w.useState(e),i=w.useRef(n),a=w.useRef(t);return FV(()=>{a.current=t},[t]),w.useEffect(()=>{var s;i.current!==n&&((s=a.current)==null||s.call(a,n),i.current=n)},[n,i]),[n,r,a]}function UV(e){return typeof e=="function"}var u$=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),qV="VisuallyHidden",Ny=w.forwardRef((e,t)=>
40l.jsx(Pe.span,{...e,ref:t,style:{...u$,...e.style}}));Ny.displayName=qV;var zV=Ny,Pj="ToastProvider",[Tj,VV,WV]=a$("Toast"),[d$,GNe]=wa("Toast",[WV]),[HV,Iy]=d$(Pj),f$=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:i="right",swipeThreshold:a=50,children:s}=e,[o,c]=w.useState(null),[u,f]=w.useState(0),d=w.useRef(!1),h=w.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Pj}\`. Expected non-empty \`string\`.`),l.jsx(Tj.Provider,{scope:t,children:l.jsx(HV,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:a,toastCount:u,viewport:o,onViewportChange:c,onToastAdd:w.useCallback(()=>f(p=>p+1),[]),onToastRemove:w.useCallback(()=>f(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:h,children:s})})};f$.displayName=Pj;var h$="ToastViewport",GV=["F8"],X0="toast.viewportPause",Z0="toast.viewportResume",p$=w.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=GV,label:i="Notifications ({hotkey})",...a}=e,s=Iy(h$,n),o=VV(n),c=w.useRef(null),u=w.useRef(null),f=w.useRef(null),d=w.useRef(null),h=ze(t,d,s.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=s.toastCount>0;w.useEffect(()=>{const y=v=>{var x;r.length!==0&&r.every(j=>v[j]||v.code===j)&&((x=d.current)==null||x.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),w.useEffect(()=>{const y=c.current,v=d.current;if(g&&y&&v){const b=()=>{if(!s.isClosePausedRef.current){const _=new CustomEvent(X0);v.dispatchEvent(_),s.isClosePausedRef.current=!0}},x=()=>{if(s.isClosePausedRef.current){const _=new CustomEvent(Z0);v.dispatchEvent(_),s.isClosePausedRef.current=!1}},j=_=>{!y.contains(_.relatedTarget)&&x()},S=()=>{y.contains(document.activeElement)||x()};return y.addEventListener("focusin",b),y.addEventListener("focusout",j),y.addEventListener("pointermove",b),y.addEventListener("pointerleave",S),window.addEventListener("blur",b),window.addEventListener("focus",x),()=>{y.removeEventListener("focusin",b),y.removeEventListener("focusout",j),y.removeEventListener("pointermove",b),y.removeEventListener("pointerleave",S),window.removeEventListener("blur",b),window.removeEventListener("focus",x)}}},[g,s.isClosePausedRef]);const m=w.useCallback(({tabbingDirection:y})=>{const b=o().map(x=>{const j=x.ref.current,S=[j,...s6(j)];return y==="forwards"?S:S.reverse()});return(y==="forwards"?b.reverse():b).flat()},[o]);return w.useEffect(()=>{const y=d.current;if(y){const v=b=>{var S,_,A;const x=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!x){const k=document.activeElement,E=b.shiftKey;if(b.target===y&&E){(S=u.current)==null||S.focus();return}const O=m({tabbingDirection:E?"backwards":"forwards"}),$=O.findIndex(R=>R===k);$x(O.slice($+1))?b.preventDefault():E?(_=u.current)==null||_.focus():(A=f.current)==null||A.focus()}};return y.addEventListener("keydown",v),()=>y.removeEventListener("keydown",v)}},[o,m]),l.jsxs(RV,{ref:c,role:"region","aria-label":i.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&l.jsx(Q0,{ref:u,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"forwards"});$x(y)}}),l.jsx(Tj.Slot,{scope:n,children:l.jsx(Pe.ol,{tabIndex:-1,...a,ref:h})}),g&&l.jsx(Q0,{ref:f,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"backwards"});$x(y)}})]})});p$.displayName=h$;var m$="ToastFocusProxy",Q0=w.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,a=Iy(m$,n);return l.jsx(Ny,{"aria-hidden":!0,tabIndex:0,...i,ref:t,style:{position:"fixed"},onFocus:s=>{var u;const o=s.relatedTarget;!((u=a.viewport)!=null&&u.contains(o))&&r()}})});Q0.displayName=m$;var _h="Toast",KV="toast.swipeStart",YV="toast.swipeMove",XV="toast.swipeCancel",ZV="toast.swipeEnd",g$=w.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:i,onOpenChange:a,...s}=e,[o,c]=Wo({prop:r,defaultProp:i??!0,onChange:a,caller:_h});return l.jsx(Sa,{present:n||o,children:l.jsx(e6,{open:o,...s,ref:t,onClose:()=>c(!1),onPause:ci(e.onPause),onResume:ci(e.onResume),onSwipeStart:me(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:me(e.onSwipeMove,u=>{const{x:f,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:me(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:me(e.onSwipeEnd,u=>{const{x:f,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),c(!1)})})})});g$.displayName=_h;var[QV,JV]=d$(_h,{onClose(){}}),e6=w.forwardRef((e,t)=>
40{const{__scopeToast:n,type:r="foreground",duration:i,open:a,onClose:s,onEscapeKeyDown:o,onPause:c,onResume:u,onSwipeStart:f,onSwipeMove:d,onSwipeCancel:h,onSwipeEnd:p,...g}=e,m=Iy(_h,n),[y,v]=w.useState(null),b=ze(t,R=>v(R)),x=w.useRef(null),j=w.useRef(null),S=i||m.duration,_=w.useRef(0),A=w.useRef(S),k=w.useRef(0),{onToastAdd:E,onToastRemove:T}=m,P=ci(()=>{var L;(y==null?void 0:y.contains(document.activeElement))&&((L=m.viewport)==null||L.focus()),s()}),O=w.useCallback(R=>{!R||R===1/0||(window.clearTimeout(k.current),_.current=new Date().getTime(),k.current=window.setTimeout(P,R))},[P]);w.useEffect(()=>{const R=m.viewport;if(R){const L=()=>{O(A.current),u==null||u()},D=()=>{const M=new Date().getTime()-_.current;A.current=A.current-M,window.clearTimeout(k.current),c==null||c()};return R.addEventListener(X0,D),R.addEventListener(Z0,L),()=>{R.removeEventListener(X0,D),R.removeEventListener(Z0,L)}}},[m.viewport,S,c,u,O]),w.useEffect(()=>{a&&!m.isClosePausedRef.current&&O(S)},[a,S,m.isClosePausedRef,O]),w.useEffect(()=>(E(),()=>T()),[E,T]);const $=w.useMemo(()=>y?j$(y):null,[y]);return m.viewport?l.jsxs(l.Fragment,{children:[$&&l.jsx(t6,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:$}),l.jsx(QV,{scope:n,onClose:P,children:il.createPortal(l.jsx(Tj.ItemSlot,{scope:n,children:l.jsx(IV,{asChild:!0,onEscapeKeyDown:me(o,()=>{m.isFocusedToastEscapeKeyDownRef.current||P(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:l.jsx(Pe.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":m.swipeDirection,...g,ref:b,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:me(e.onKeyDown,R=>{R.key==="Escape"&&(o==null||o(R.nativeEvent),R.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,P()))}),onPointerDown:me(e.onPointerDown,R=>{R.button===0&&(x.current={x:R.clientX,y:R.clientY})}),onPointerMove:me(e.onPointerMove,R=>{if(!x.current)return;const L=R.clientX-x.current.x,D=R.clientY-x.current.y,M=!!j.current,N=["left","right"].includes(m.swipeDirection),I=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,F=N?I(0,L):0,V=N?0:I(0,D),U=R.pointerType==="touch"?10:2,G={x:F,y:V},te={originalEvent:R,delta:G};M?(j.current=G,dp(YV,d,te,{discrete:!1})):jE(G,m.swipeDirection,U)?(j.current=G,dp(KV,f,te,{discrete:!1}),R.target.setPointerCapture(R.pointerId)):(Math.abs(L)>U||Math.abs(D)>U)&&(x.current=null)}),onPointerUp:me(e.onPointerUp,R=>{const L=j.current,D=R.target;if(D.hasPointerCapture(R.pointerId)&&D.releasePointerCapture(R.pointerId),j.current=null,x.current=null,L){const M=R.currentTarget,N={originalEvent:R,delta:L};jE(L,m.swipeDirection,m.swipeThreshold)?dp(ZV,p,N,{discrete:!0}):dp(XV,h,N,{discrete:!0}),M.addEventListener("click",I=>I.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),t6=e=>{const{__scopeToast:t,children:n,...r}=e,i=Iy(_h,t),[a,s]=w.useState(!1),[o,c]=w.useState(!1);return i6(()=>s(!0)),w.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),o?null:l.jsx(jh,{asChild:!0,children:l.jsx(Ny,{...r,children:a&&l.jsxs(l.Fragment,{children:[i.label," ",n]})})})},n6="ToastTitle",y$=w.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return l.jsx(Pe.div,{...r,ref:t})});y$.displayName=n6;var r6="ToastDescription",v$=w.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return l.jsx(Pe.div,{...r,ref:t})});v$.displayName=r6;var x$="ToastAction",b$=w.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?l.jsx(S$,{altText:n,asChild:!0,children:l.jsx(Oj,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${x$}\`. Expected non-empty \`string\`.`),null)});b$.displayName=x$;var w$="ToastClose",Oj=w.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,i=JV(w$,n);return l.jsx(S$,{asChild:!0,children:l.jsx(Pe.button,{type:"button",...r,ref:t,onClick:me(e.onClick,i.onClose)})})});Oj.displayName=w$;var S$=w.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...i}=e;return l.jsx(Pe.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function j$(e){const t=[];
vendor: 3,823 bytes, lines 40-60
40return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),a6(r)){const i=r.ariaHidden||r.hidden||r.style.display==="none",a=r.dataset.radixToastAnnounceExclude==="";if(!i)if(a){const s=r.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...j$(r))}}),t}function dp(e,t,n,{discrete:r}){const i=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?s$(i,a):i.dispatchEvent(a)}var jE=(e,t,n=0)=>{const r=Math.abs(e.x),i=Math.abs(e.y),a=r>i;return t==="left"||t==="right"?a&&r>n:!a&&i>n};function i6(e=()=>{}){const t=ci(e);an(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function a6(e){return e.nodeType===e.ELEMENT_NODE}function s6(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function $x(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var o6=f$,_$=p$,A$=g$,k$=y$,E$=v$,C$=b$,P$=Oj;function T$(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<i;t++)e[t]&&(n=T$(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ce(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=T$(e))&&(r&&(r+=" "),r+=t);return r}const _E=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,AE=Ce,Ry=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return AE(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:a}=t,s=Object.keys(i).map(u=>{const f=n==null?void 0:n[u],d=a==null?void 0:a[u];if(f===null)return null;const h=_E(f)||_E(d);return i[u][h]}),o=n&&Object.entries(n).reduce((u,f)=>{let[d,h]=f;return h===void 0||(u[d]=h),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:d,className:h,...p}=f;return Object.entries(p).every(g=>{let[m,y]=g;return Array.isArray(y)?y.includes({...a,...o}[m]):{...a,...o}[m]===y})?[...u,d,h]:u},[]);return AE(e,s,c,n==null?void 0:n.class,n==null?void 0:n.className)};/**
41 * @license lucide-react v0.462.0 - ISC
42 *
43 * This source code is licensed under the ISC license.
44 * See the LICENSE file in the root directory of this source tree.
45 */const l6=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),O$=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
46 * @license lucide-react v0.462.0 - ISC
47 *
48 * This source code is licensed under the ISC license.
49 * See the LICENSE file in the root directory of this source tree.
50 */var c6={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
51 * @license lucide-react v0.462.0 - ISC
52 *
53 * This source code is licensed under the ISC license.
54 * See the LICENSE file in the root directory of this source tree.
55 */const u6=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:s,...o},c)=>w.createElement("svg",{ref:c,...c6,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:O$("lucide",i),...o},[...s.map(([u,f])=>w.createElement(u,f)),...Array.isArray(a)?a:[a]]));/**
56 * @license lucide-react v0.462.0 - ISC
57 *
58 * This source code is licensed under the ISC license.
59 * See the LICENSE file in the root directory of this source tree.
60 */const ue=(e,t)=>
60{const n=w.forwardRef(({className:r,...i},a)=>w.createElement(u6,{ref:a,iconNode:t,className:O$(`lucide-${l6(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
61 * @license lucide-react v0.462.0 - ISC
62 *
63 * This source code is licensed under the ISC license.
64 * See the LICENSE file in the root directory of this source tree.
65 */const kn=ue("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
66 * @license lucide-react v0.462.0 - ISC
67 *
68 * This source code is licensed under the ISC license.
69 * See the LICENSE file in the root directory of this source tree.
70 */const gu=ue("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
71 * @license lucide-react v0.462.0 - ISC
72 *
73 * This source code is licensed under the ISC license.
74 * See the LICENSE file in the root directory of this source tree.
75 */const d6=ue("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
76 * @license lucide-react v0.462.0 - ISC
77 *
78 * This source code is licensed under the ISC license.
79 * See the LICENSE file in the root directory of this source tree.
80 */const Nj=ue("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
81 * @license lucide-react v0.462.0 - ISC
82 *
83 * This source code is licensed under the ISC license.
84 * See the LICENSE file in the root directory of this source tree.
85 */const al=ue("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
86 * @license lucide-react v0.462.0 - ISC
87 *
88 * This source code is licensed under the ISC license.
89 * See the LICENSE file in the root directory of this source tree.
90 */const J0=ue("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);/**
91 * @license lucide-react v0.462.0 - ISC
92 *
93 * This source code is licensed under the ISC license.
94 * See the LICENSE file in the root directory of this source tree.
95 */const N$=ue("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
96 * @license lucide-react v0.462.0 - ISC
97 *
98 * This source code is licensed under the ISC license.
99 * See the LICENSE file in the root directory of this source tree.
100 */const f6=ue("Car",[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]]);/**
101 * @license lucide-react v0.462.0 - ISC
102 *
103 * This source code is licensed under the ISC license.
104 * See the LICENSE file in the root directory of this source tree.
105 */const h6=ue("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
106 * @license lucide-react v0.462.0 - ISC
107 *
108 * This source code is licensed under the ISC license.
109 * See the LICENSE file in the root directory of this source tree.
110 */const p6=ue("ChartPie",[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",ke
110y:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]]);/**
111 * @license lucide-react v0.462.0 - ISC
112 *
113 * This source code is licensed under the ISC license.
114 * See the LICENSE file in the root directory of this source tree.
115 */const ua=ue("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
116 * @license lucide-react v0.462.0 - ISC
117 *
118 * This source code is licensed under the ISC license.
119 * See the LICENSE file in the root directory of this source tree.
120 */const Ij=ue("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
121 * @license lucide-react v0.462.0 - ISC
122 *
123 * This source code is licensed under the ISC license.
124 * See the LICENSE file in the root directory of this source tree.
125 */const m6=ue("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
126 * @license lucide-react v0.462.0 - ISC
127 *
128 * This source code is licensed under the ISC license.
129 * See the LICENSE file in the root directory of this source tree.
130 */const g6=ue("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
131 * @license lucide-react v0.462.0 - ISC
132 *
133 * This source code is licensed under the ISC license.
134 * See the LICENSE file in the root directory of this source tree.
135 */const I$=ue("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
136 * @license lucide-react v0.462.0 - ISC
137 *
138 * This source code is licensed under the ISC license.
139 * See the LICENSE file in the root directory of this source tree.
140 */const Rj=ue("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
141 * @license lucide-react v0.462.0 - ISC
142 *
143 * This source code is licensed under the ISC license.
144 * See the LICENSE file in the root directory of this source tree.
145 */const kE=ue("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
146 * @license lucide-react v0.462.0 - ISC
147 *
148 * This source code is licensed under the ISC license.
149 * See the LICENSE file in the root directory of this source tree.
150 */const EE=ue("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
151 * @license lucide-react v0.462.0 - ISC
152 *
153 * This source code is licensed under the ISC license.
154 * See the LICENSE file in the root directory of this source tree.
155 */const Nr=ue("ClipboardCheck",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]]);/**
156 * @license lucide-react v0.462.0 - ISC
157 *
158 * This source code is licensed under the ISC license.
159 * See the LICENSE file in the root directory of this source tree.
160 */const zm=ue("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/**
161 * @license lucide-react v0.462.0 - ISC
162 *
163 * This source code is licensed under the ISC license.
164 * See the LICENSE file in the root directory of this source tree.
165 */const R$=ue("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
166 * @license lucide-react v0.462.0 - ISC
167 *
168 * This source code is licensed under the ISC license.
169 * See the LICENSE file in the root directory of this source tree.
170 */const Nc=ue("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
171 * @license lucide-react v0.462.0 - ISC
172 *
173 * This source code is licensed under the ISC license.
174 * See the LICENSE file in the root directory of this source tree.
175 */const y6=ue("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}
175],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
176 * @license lucide-react v0.462.0 - ISC
177 *
178 * This source code is licensed under the ISC license.
179 * See the LICENSE file in the root directory of this source tree.
180 */const Mj=ue("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
181 * @license lucide-react v0.462.0 - ISC
182 *
183 * This source code is licensed under the ISC license.
184 * See the LICENSE file in the root directory of this source tree.
185 */const v6=ue("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
186 * @license lucide-react v0.462.0 - ISC
187 *
188 * This source code is licensed under the ISC license.
189 * See the LICENSE file in the root directory of this source tree.
190 */const x6=ue("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
191 * @license lucide-react v0.462.0 - ISC
192 *
193 * This source code is licensed under the ISC license.
194 * See the LICENSE file in the root directory of this source tree.
195 */const b6=ue("Factory",[["path",{d:"M2 20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8l-7 5V8l-7 5V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"159hny"}],["path",{d:"M17 18h1",key:"uldtlt"}],["path",{d:"M12 18h1",key:"s9uhes"}],["path",{d:"M7 18h1",key:"1neino"}]]);/**
196 * @license lucide-react v0.462.0 - ISC
197 *
198 * This source code is licensed under the ISC license.
199 * See the LICENSE file in the root directory of this source tree.
200 */const Bn=ue("FileCheck",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]]);/**
201 * @license lucide-react v0.462.0 - ISC
202 *
203 * This source code is licensed under the ISC license.
204 * See the LICENSE file in the root directory of this source tree.
205 */const w6=ue("FileDown",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]]);/**
206 * @license lucide-react v0.462.0 - ISC
207 *
208 * This source code is licensed under the ISC license.
209 * See the LICENSE file in the root directory of this source tree.
210 */const yu=ue("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
211 * @license lucide-react v0.462.0 - ISC
212 *
213 * This source code is licensed under the ISC license.
214 * See the LICENSE file in the root directory of this source tree.
215 */const M$=ue("FlaskConical",[["path",{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2",key:"pzvekw"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M7 16h10",key:"wp8him"}]]);/**
216 * @license lucide-react v0.462.0 - ISC
217 *
218 * This source code is licensed under the ISC license.
219 * See the LICENSE file in the root directory of this source tree.
220 */const $$=ue("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
221 * @license lucide-react v0.462.0 - ISC
222 *
223 * This source code is licensed under the ISC license.
224 * See the LICENSE file in the root directory of this source tree.
225 */const S6=ue("Landmark",[["line",{x1:"3",x2:"21",y1:"22",y2:"22",key:"j8o0r"}],["line",{x1:"6",x2:"6",y1:"18",y2:"11",key:"10tf0k"}],["line",{x1:"10",x2:"10",y1:"18",y2:"11",key:"54lgf6"}],["line",{x1:"14",x2:"14",y1:"18",y2:"11",key:"380y"}],["line",{x1:"18",x2:"18",y1:"18",y2:"11",key:"1kevvc"}],["polygon",{points:"12 2 20 7 4 7",key:"jkujk7"}]]);/**
226 * @license lucide-react v0.462.0 - ISC
227 *
228 * This source code is licensed under the ISC license.
229 * See the LICENSE file in the root directory of this source tree.
230 */const j6=ue("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
231 * @license lucide-react v0.462.0 - ISC
232 *
233 * This source code is licensed under the ISC license.
234 * See the LICENSE file in the root directory of this source tree.
235 */const $j=ue("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
236 * @license lucide-react v0.462.0 - ISC
237 *
238 * This source code is licensed under the ISC license.
239 * See the LICENSE file in the root directory of this source tree.
240 */const D$=ue("LockOpen",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]]);/**
241 * @license lucide-react v0.462.0 - ISC
242 *
243 * This source code is licensed under the ISC license.
244 * See the LICENSE file in the root directory of this source tree.
245 */const Dj=ue("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
246 * @license lucide-react v0.462.0 - ISC
247 *
248 * This source code is licensed under the ISC license.
249 * See the LICENSE file in the root directory of this source tree.
250 */const _6=ue("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
251 * @license lucide-react v0.462.0 - ISC
252 *
253 * This source code is licensed under the ISC license.
254 * See the LICENSE file in the root directory of this source tree.
255 */const L$=ue("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
256 * @license lucide-react v0.462.0 - ISC
257 *
258 * This source code is licensed under the ISC license.
259 * See the LICENSE file in the root directory of this source tree.
260 */const A6=ue("Plane",[["path",{d:"M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z",key:"1v9wt8"}]]);/**
261 * @license lucide-react v0.462.0 - ISC
262 *
263 * This source code is licensed under the ISC license.
264 * See the LICENSE file in the root directory of this source tree.
265 */const k6=ue("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
266 * @license lucide-react v0.462.0 - ISC
267 *
268 * This source code is licensed under the ISC license.
269 * See the LICENSE file in the root directory of this source tree.
270 */const Ir=ue("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
271 * @license lucide-react v0.462.0 - ISC
272 *
273 * This source code is licensed under the ISC license.
274 * See the LICENSE file in the root directory of this source tree.
275 */const E6=ue("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
276 * @license lucide-react v0.462.0 - ISC
277 *
278 * This source code is licensed under the ISC license.
279 * See the LICENSE file in the root directory of this source tree.
280 */const C6=ue("Scale",[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]]);/**
281 * @license lucide-react v0.462.0 - ISC
282 *
283 * This source code is licensed under the ISC license.
284 * See the LICENSE file in the root directory of this source tree.
285 */const Ah=ue("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
286 * @license lucide-react v0.462.0 - ISC
287 *
288 * This source code is licensed under the ISC license.
289 * See the LICENSE file in the root directory of this source tree.
290 */const F$=ue("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
291 * @license lucide-react v0.462.0 - ISC
292 *
293 * This source code is licensed under the ISC license.
294 * See the LICENSE file in the root directory of this source tree.
295 */const Lj=ue("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);/**
296 * @license lucide-react v0.462.0 - ISC
297 *
298 * This source code is licensed under the ISC license.
299 * See the LICENSE file in the root directory of this source tree.
300 */const B$=ue("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
vendor: 8,935 bytes, lines 300-340
300y:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
301 * @license lucide-react v0.462.0 - ISC
302 *
303 * This source code is licensed under the ISC license.
304 * See the LICENSE file in the root directory of this source tree.
305 */const Pt=ue("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
306 * @license lucide-react v0.462.0 - ISC
307 *
308 * This source code is licensed under the ISC license.
309 * See the LICENSE file in the root directory of this source tree.
310 */const P6=ue("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
311 * @license lucide-react v0.462.0 - ISC
312 *
313 * This source code is licensed under the ISC license.
314 * See the LICENSE file in the root directory of this source tree.
315 */const cr=ue("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
316 * @license lucide-react v0.462.0 - ISC
317 *
318 * This source code is licensed under the ISC license.
319 * See the LICENSE file in the root directory of this source tree.
320 */const T6=ue("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
321 * @license lucide-react v0.462.0 - ISC
322 *
323 * This source code is licensed under the ISC license.
324 * See the LICENSE file in the root directory of this source tree.
325 */const Vm=ue("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
326 * @license lucide-react v0.462.0 - ISC
327 *
328 * This source code is licensed under the ISC license.
329 * See the LICENSE file in the root directory of this source tree.
330 */const U$=ue("Webhook",[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]]);/**
331 * @license lucide-react v0.462.0 - ISC
332 *
333 * This source code is licensed under the ISC license.
334 * See the LICENSE file in the root directory of this source tree.
335 */const kh=ue("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
336 * @license lucide-react v0.462.0 - ISC
337 *
338 * This source code is licensed under the ISC license.
339 * See the LICENSE file in the root directory of this source tree.
340 */const O6=ue("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Fj="-",N6=e=>{const t=R6(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const o=s.split(Fj);return o[0]===""&&o.length!==1&&o.shift(),q$(o,t)||I6(s)},getConflictingClassGroupIds:(s,o)=>{const c=n[s]||[];return o&&r[s]?[...c,...r[s]]:c}}},q$=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?q$(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(Fj);return(s=t.validators.find(({validator:o})=>o(a)))==null?void 0:s.classGroupId},CE=/^\[(.+)\]$/,I6=e=>{if(CE.test(e)){const t=CE.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},R6=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return $6(Object.entries(e.classGroups),n).forEach(([a,s])=>{ew(s,r,a,t)}),r},ew=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:PE(t,i);a.classGroupId=n;return}if(typeof i=="function"){if(M6(i)){ew(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([a,s])=>{ew(s,PE(t,a),n,r)})})},PE=(e,t)=>{let n=e;return t.split(Fj).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},M6=e=>e.isThemeGetter,$6=(e,t)=>t?e.map(([n,r])=>{const i=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([s,o])=>[t+s,o])):a);return[n,i]}):e,D6=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(a,s)=>{n.set(a,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let s=n.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return i(a,s),s},set(a,s){n.has(a)?n.set(a,s):i(a,s)}}},z$="!",L6=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,s=o=>{const c=[];let u=0,f=0,d;for(let y=0;y<o.length;y++){let v=o[y];if(u===0){if(v===i&&(r||o.slice(y,y+a)===t)){c.push(o.slice(f,y)),f=y+a;continue}if(v==="/"){d=y;continue}}v==="["?u++:v==="]"&&u--}const h=c.length===0?o:o.substring(f),p=h.startsWith(z$),g=p?h.substring(1):h,m=d&&d>f?d-f:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:m}};return n?o=>n({className:o,parseClassName:s}):s},F6=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},B6=e=>({cache:D6(e.cacheSize),parseClassName:L6(e),...N6(e)}),U6=/\s+/,q6=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],s=e.trim().split(U6);let o="";for(let c=s.length-1;c>=0;c-=1){const u=s[c],{modifiers:f,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:p}=n(u);let g=!!p,m=r(g?h.substring(0,p):h);if(!m){if(!g){o=u+(o.length>0?" "+o:o);continue}if(m=r(h),!m){o=u+(o.length>0?" "+o:o);continue}g=!1}const y=F6(f).join(":"),v=d?y+z$:y,b=v+m;if(a.includes(b))continue;a.push(b);const x=i(m,g);for(let j=0;j<x.length;++j){const S=x[j];a.push(v+S)}o=u+(o.length>0?" "+o:o)}return o};function z6(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=V$(t))&&(r&&(r+=" "),r+=n);return r}const V$=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=V$(e[r]))&&(n&&(n+=" "),n+=t);return n};function V6(e,...t){let n,r,i,a=s;function s(c){const u=t.reduce((f,d)=>d(f),e());return n=B6(u),r=n.cache.get,i=n.cache.set,a=o,o(c)}function o(c){const u=r(c);if(u)return u;const f=q6(c,n);return i(c,f),f}return function(){return a(z6.apply(null,arguments))}}const ot=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},W$=/^\[(?:([a-z-]+):)?(.+)\]$/i,W6=/^\d+\/\d+$/,H6=new Set(["px","full","screen"]),G6=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,K6=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Y6=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,X6=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Z6=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,zi=e=>sc(e)||H6.has(e)||W6.test(e),Na=e=>vu(e,"length",aW),sc=e=>!!e&&!Number.isNaN(Number(e)),Dx=e=>vu(e,"number",sc),Xu=e=>!!e&&Number.isInteger(Number(e)),Q6=e=>e.endsWith("%")&&sc(e.slice(0,-1)),Ee=e=>W$.test(e),Ia=e=>G6.test(e),J6=new Set(["length","size","percentage"]),eW=e=>vu(e,J6,H$),tW=e=>vu(e,"position",H$),nW=new Set(["image","url"]),rW=e=>vu(e,nW,oW),iW=e=>vu(e,"",sW),Zu=()=>!0,vu=(e,t,n)=>{const r=W$.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},aW=e=>K6.test(e)&&!Y6.test(e),H$=()=>!1,sW=e=>X6.test(e),oW=e=>Z6.test(e),lW=()=>{const e=ot("colors"),t=ot("spacing"),n=ot("blur"),r=ot("brightness"),i=ot("borderColor"),a=ot("borderRadius"),s=ot("borderSpacing"),o=ot("borderWidth"),c=ot("contrast"),u=ot("grayscale"),f=ot("hueRotate"),d=ot("invert"),h=ot("gap"),p=ot("gradientColorStops"),g=ot("gradientColorStopPositions"),m=ot("inset"),y=ot("margin"),v=ot("opacity"),b=ot("padding"),x=ot("saturate"),j=ot("scale"),S=ot("sepia"),_=ot("skew"),A=ot("space"),k=ot("translate"),E=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto",Ee,t],O=()=>[Ee,t],$=()=>["",zi,Na],R=()=>["auto",sc,Ee],L=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["solid","dashed","dotted","double","none"],M=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],N=()=>["start","end","center","between","around","evenly","stretch"],I=()=>["","0",Ee],F=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[sc,Ee];return{cacheSize:500,separator:":",theme:{colors:[Zu],spacing:[zi,Na],blur:["none","",Ia,Ee],brightness:V(),borderColor:[e],borderRadius:["n
340one","","full",Ia,Ee],borderSpacing:O(),borderWidth:$(),contrast:V(),grayscale:I(),hueRotate:V(),invert:I(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[Q6,Na],inset:P(),margin:P(),opacity:V(),padding:O(),saturate:V(),scale:V(),sepia:I(),skew:V(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",Ee]}],container:["container"],columns:[{columns:[Ia]}],"break-after":[{"break-after":F()}],"break-before":[{"break-before":F()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...L(),Ee]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Xu,Ee]}],basis:[{basis:P()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ee]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:["first","last","none",Xu,Ee]}],"grid-cols":[{"grid-cols":[Zu]}],"col-start-end":[{col:["auto",{span:["full",Xu,Ee]},Ee]}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":[Zu]}],"row-start-end":[{row:["auto",{span:[Xu,Ee]},Ee]}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ee]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ee]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...N()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...N(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...N(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ee,t]}],"min-w":[{"min-w":[Ee,t,"min","max","fit"]}],"max-w":[{"max-w":[Ee,t,"none","full","min","max","fit","prose",{screen:[Ia]},Ia]}],h:[{h:[Ee,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ee,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ee,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ee,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ia,Na]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Dx]}],"font-family":[{font:[Zu]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ee]}],"line-clamp":[{"line-clamp":["none",sc,Dx]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",zi,Ee]}],"list-image":[{"list-image":["none",Ee]}],"list-style-type":[{list:["none","disc","decimal",Ee]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",zi,Na]}],"underline-offset":[{"underline-offset":["auto",zi,Ee]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ee]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...L(),tW]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",eW]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},rW]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}
vendor: 4,885 bytes, line 340
340],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-s":[{"border-s":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...D(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:D()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...D()]}],"outline-offset":[{"outline-offset":[zi,Ee]}],"outline-w":[{outline:[zi,Na]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[zi,Na]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ia,iW]}],"shadow-color":[{shadow:[Zu]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...M(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":M()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Ia,Ee]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ee]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",Ee]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ee]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[j]}],"scale-x":[{"scale-x":[j]}],"scale-y":[{"scale-y":[j]}],rotate:[{rotate:[Xu,Ee]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ee]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ee]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}
vendor: 4,942 bytes, line 340
340],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ee]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[zi,Na,Dx]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},cW=V6(lW);function ve(...e){return cW(Ce(e))}const uW=o6,G$=w.forwardRef(({className:e,...t},n)=>l.jsx(_$,{ref:n,className:ve("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));G$.displayName=_$.displayName;const dW=Ry("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),K$=w.forwardRef(({className:e,variant:t,...n},r)=>l.jsx(A$,{ref:r,className:ve(dW({variant:t}),e),...n}));K$.displayName=A$.displayName;const fW=w.forwardRef(({className:e,...t},n)=>l.jsx(C$,{ref:n,className:ve("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));fW.displayName=C$.displayName;const Y$=w.forwardRef(({className:e,...t},n)=>l.jsx(P$,{ref:n,className:ve("absolute right-2 top-2 rounded-md p-1 text-foreground
340/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:l.jsx(kh,{className:"h-4 w-4"})}));Y$.displayName=P$.displayName;const X$=w.forwardRef(({className:e,...t},n)=>l.jsx(k$,{ref:n,className:ve("text-sm font-semibold",e),...t}));X$.displayName=k$.displayName;const Z$=w.forwardRef(({className:e,...t},n)=>l.jsx(E$,{ref:n,className:ve("text-sm opacity-90",e),...t}));Z$.displayName=E$.displayName;function hW(){const{toasts:e}=ba();return l.jsxs(uW,{children:[e.map(function({id:t,title:n,description:r,action:i,...a}){return l.jsxs(K$,{...a,children:[l.jsxs("div",{className:"grid gap-1",children:[n&&l.jsx(X$,{children:n}),r&&l.jsx(Z$,{children:r})]}),i,l.jsx(Y$,{})]},t)}),l.jsx(G$,{})]})}var TE=["light","dark"],pW="(prefers-color-scheme: dark)",mW=w.createContext(void 0),gW={setTheme:e=>{},themes:[]},yW=()=>{var e;return(e=w.useContext(mW))!=null?e:gW};w.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:a,value:s,attrs:o,nonce:c})=>{let u=a==="system",f=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${o.map(g=>`'${g}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,d=i?TE.includes(a)&&a?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${a}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",h=(g,m=!1,y=!0)=>{let v=s?s[g]:g,b=m?g+"|| ''":`'${v}'`,x="";return i&&y&&!m&&TE.includes(g)&&(x+=`d.style.colorScheme = '${g}';`),n==="class"?m||v?x+=`c.add(${b})`:x+="null":v&&(x+=`d[s](n,${b})`),x},p=e?`!function(){${f}${h(e)}}()`:r?`!function(){try{${f}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${pW}',m=window.matchMedia(t);if(m.media!==t||m.matches){${h("dark")}}else{${h("light")}}}else if(e){${s?`var x=${JSON.stringify(s)};`:""}${h(s?"x[e]":"e",!0)}}${u?"":"else{"+h(a,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${f}var e=localStorage.getItem('${t}');if(e){${s?`var x=${JSON.stringify(s)};`:""}${h(s?"x[e]":"e",!0)}}else{${h(a,!1,!1)};}${d}}catch(t){}}();`;return w.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:p}})});var vW=e=>{switch(e){case"success":return wW;case"info":return jW;case"warning":return SW;case"error":return _W;default:return null}},xW=Array(12).fill(0),bW=({visible:e,className:t})=>C.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},C.createElement("div",{className:"sonner-spinner"},xW.map((n,r)=>C.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),wW=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),SW=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},C.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),jW=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),_W=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},C.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"}
340)),AW=C.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},C.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),C.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),kW=()=>{let[e,t]=C.useState(document.hidden);return C.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},tw=1,EW=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,i=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:tw++,a=this.toasts.find(o=>o.id===i),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),a?this.toasts=this.toasts.map(o=>o.id===i?(this.publish({...o,...e,id:i,title:n}),{...o,...e,id:i,dismissible:s,title:n}):o):this.addToast({title:n,...r,dismissible:s,id:i}),i},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
340this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),i=n!==void 0,a,s=r.then(async c=>{if(a=["resolve",c],C.isValidElement(c))i=!1,this.create({id:n,type:"default",message:c});else if(PW(c)&&!c.ok){i=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,f=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:n,type:"error",message:u,description:f})}else if(t.success!==void 0){i=!1;let u=typeof t.success=="function"?await t.success(c):t.success,f=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"success",message:u,description:f})}}).catch(async c=>{if(a=["reject",c],t.error!==void 0){i=!1;let u=typeof t.error=="function"?await t.error(c):t.error,f=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"error",message:u,description:f})}}).finally(()=>{var c;i&&(this.dismiss(n),n=void 0),(c=t.finally)==null||c.call(t)}),o=()=>new Promise((c,u)=>s.then(()=>a[0]==="reject"?u(a[1]):c(a[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:o}:Object.assign(n,{unwrap:o})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||tw++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},In=new EW,CW=(e,t)=>{let n=(t==null?void 0:t.id)||tw++;return In.addToast({title:e,...t,id:n}),n},PW=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",TW=CW,OW=()=>In.toasts,NW=()=>In.getActiveToasts(),$e=Object.assign(TW,{success:In.success,info:In.info,warning:In.warning,error:In.error,custom:In.custom,message:In.message,promise:In.promise,dismiss:In.dismiss,loading:In.loading},{getHistory:OW,getToasts:NW});function IW(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}IW(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
340left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
340:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
340--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
341`);function fp(e){return e.label!==void 0}var RW=3,MW="32px",$W="16px",OE=4e3,DW=356,LW=14,FW=20,BW=200;function zr(...e){return e.filter(Boolean).join(" ")}function UW(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var qW=e=>{var t,n,r,i,a,s,o,c,u,f,d;let{invert:h,toast:p,unstyled:g,interacting:m,setHeights:y,visibleToasts:v,heights:b,index:x,toasts:j,expanded:S,removeToast:_,defaultRichColors:A,closeButton:k,style:E,cancelButtonStyle:T,actionButtonStyle:P,className:O="",descriptionClassName:$="",duration:R,position:L,gap:D,loadingIcon:M,expandByDefault:N,classNames:I,icons:F,closeButtonAriaLabel:V="Close toast",pauseWhenPageIsHidden:U}=e,[G,te]=C.useState(null),[xe,Me]=C.useState(null),[Y,we]=C.useState(!1),[W,Q]=C.useState(!1),[Z,B]=C.useState(!1),[Te,be]=C.useState(!1),[Qe,Ye]=C.useState(!1),[wt,Nn]=C.useState(0),[zn,Ws]=C.useState(0),Vn=C.useRef(p.duration||R||OE),gi=C.useRef(null),Lr=C.useRef(null),qh=x===0,zh=x+1<=v,dr=p.type,ul=p.dismissible!==!1,Oq=p.className||"",Nq=p.descriptionClassName||"",Vh=C.useMemo(()=>b.findIndex(_e=>_e.toastId===p.id)||0,[b,p.id]),Iq=C.useMemo(()=>{var _e;return(_e=p.closeButton)!=null?_e:k},[p.closeButton,k]),ak=C.useMemo(()=>p.duration||R||OE,[p.duration,R]),ax=C.useRef(0),dl=C.useRef(0),sk=C.useRef(0),fl=C.useRef(null),[Rq,Mq]=L.split("-"),ok=C.useMemo(()=>b.reduce((_e,Xe,ft)=>ft>=Vh?_e:_e+Xe.height,0),[b,Vh]),lk=kW(),$q=p.invert||h,sx=dr==="loading";dl.current=C.useMemo(()=>Vh*D+ok,[Vh,ok]),C.useEffect(()=>{Vn.current=ak},[ak]),C.useEffect(()=>{we(!0)},[]),C.useEffect(()=>{let _e=Lr.current;if(_e){let Xe=_e.getBoundingClientRect().height;return Ws(Xe),y(ft=>[{toastId:p.id,height:Xe,position:p.position},...ft]),()=>y(ft=>ft.filter(Fr=>Fr.toastId!==p.id))}},[y,p.id]),C.useLayoutEffect(()=>{if(!Y)return;let _e=Lr.current,Xe=_e.style.height;_e.style.height="auto";let ft=_e.getBoundingClientRect().height;_e.style.height=Xe,Ws(ft),y(Fr=>Fr.find(Br=>Br.toastId===p.id)?Fr.map(Br=>Br.toastId===p.id?{...Br,height:ft}:Br):[{toastId:p.id,height:ft,position:p.position},...Fr])},[Y,p.title,p.description,y,p.id]);let Ca=C.useCallback(()=>{Q(!0),Nn(dl.current),y(_e=>_e.filter(Xe=>Xe.toastId!==p.id)),setTimeout(()=>{_(p)},BW)},[p,_,y,dl]);C.useEffect(()=>{if(p.promise&&dr==="loading"||p.duration===1/0||p.type==="loading")return;let _e;return S||m||U&&lk?(()=>{if(sk.current<ax.current){let Xe=new Date().getTime()-ax.current;Vn.current=Vn.current-Xe}
341sk.current=new Date().getTime()})():Vn.current!==1/0&&(ax.current=new Date().getTime(),_e=setTimeout(()=>{var Xe;(Xe=p.onAutoClose)==null||Xe.call(p,p),Ca()},Vn.current)),()=>clearTimeout(_e)},[S,m,p,dr,U,lk,Ca]),C.useEffect(()=>{p.delete&&Ca()},[Ca,p.delete]);function Dq(){var _e,Xe,ft;return F!=null&&F.loading?C.createElement("div",{className:zr(I==null?void 0:I.loader,(_e=p==null?void 0:p.classNames)==null?void 0:_e.loader,"sonner-loader"),"data-visible":dr==="loading"},F.loading):M?C.createElement("div",{className:zr(I==null?void 0:I.loader,(Xe=p==null?void 0:p.classNames)==null?void 0:Xe.loader,"sonner-loader"),"data-visible":dr==="loading"},M):C.createElement(bW,{className:zr(I==null?void 0:I.loader,(ft=p==null?void 0:p.classNames)==null?void 0:ft.loader),visible:dr==="loading"})}return C.createElement("li",{tabIndex:0,ref:Lr,className:zr(O,Oq,I==null?void 0:I.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,I==null?void 0:I.default,I==null?void 0:I[dr],(n=p==null?void 0:p.classNames)==null?void 0:n[dr]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:A,"data-styled":!(p.jsx||p.unstyled||g),"data-mounted":Y,"data-promise":!!p.promise,"data-swiped":Qe,"data-removed":W,"data-visible":zh,"data-y-position":Rq,"data-x-position":Mq,"data-index":x,"data-front":qh,"data-swiping":Z,"data-dismissible":ul,"data-type":dr,"data-invert":$q,"data-swipe-out":Te,"data-swipe-direction":xe,"data-expanded":!!(S||N&&Y),style:{"--index":x,"--toasts-before":x,"--z-index":j.length-x,"--offset":`${W?wt:dl.current}px`,"--initial-height":N?"auto":`${zn}px`,...E,...p.style},onDragEnd:()=>{B(!1),te(null),fl.current=null},onPointerDown:_e=>{sx||!ul||(gi.current=new Date,Nn(dl.current),_e.target.setPointerCapture(_e.pointerId),_e.target.tagName!=="BUTTON"&&(B(!0),fl.current={x:_e.clientX,y:_e.clientY}))},onPointerUp:()=>{var _e,Xe,ft,Fr;if(Te||!ul)return;fl.current=null;let Br=Number(((_e=Lr.current)==null?void 0:_e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Pa=Number(((Xe=Lr.current)==null?void 0:Xe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Hs=new Date().getTime()-((ft=gi.current)==null?void 0:ft.getTime()),Ur=G==="x"?Br:Pa,Ta=Math.abs(Ur)/Hs;if(Math.abs(Ur)>=FW||Ta>.11){Nn(dl.current),(Fr=p.onDismiss)==null||Fr.call(p,p),Me(G==="x"?Br>0?"right":"left":Pa>0?"down":"up"),Ca(),be(!0),Ye(!1);return}B(!1),te(null)},onPointerMove:_e=>{var Xe,ft,Fr,Br;if(!fl.current||!ul||((Xe=window.getSelection())==null?void 0:Xe.toString().length)>0)return;let Pa=_e.clientY-fl.current.y,Hs=_e.clientX-fl.current.x,Ur=(ft=e.swipeDirections)!=null?ft:UW(L);!G&&(Math.abs(Hs)>1||Math.abs(Pa)>1)&&te(Math.abs(Hs)>Math.abs(Pa)?"x":"y");let Ta={x:0,y:0};G==="y"?(Ur.includes("top")||Ur.includes("bottom"))&&(Ur.includes("top")&&Pa<0||Ur.includes("bottom")&&Pa>0)&&(Ta.y=Pa):G==="x"&&(Ur.includes("left")||Ur.includes("right"))&&(Ur.includes("left")&&Hs<0||Ur.includes("right")&&Hs>0)&&(Ta.x=Hs),(Math.abs(Ta.x)>0||Math.abs(Ta.y)>0)&&Ye(!0),(Fr=Lr.current)==null||Fr.style.setProperty("--swipe-amount-x",`${Ta.x}px`),(Br=Lr.current)==null||Br.style.setProperty("--swipe-amount-y",`${Ta.y}px`)}},Iq&&!p.jsx?C.createElement("button",{"aria-label":V,"data-disabled":sx,"data-close-button":!0,onClick:sx||!ul?()=>{}:()=>{var _e;Ca(),(_e=p.onDismiss)==null||_e.call(p,p)},className:zr(I==null?void 0:I.closeButton,(i=p==null?void 0:p.classNames)==null?void 0:i.closeButton)},(a=F==null?void 0:F.close)!=null?a:AW):null,p.jsx||w.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:C.createElement(C.Fragment,null,dr||p.icon||p.promise?C.createElement("div",{"data-icon":"",className:zr(I==null?void 0:I.icon,(s=p==null?void 0:p.classNames)==null?void 0:s.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||Dq():null,p.type!=="loading"?p.icon||(F==null?void 0:F[dr])||vW(dr):null):null,C.createElement("div",{"data-content":"",className:zr(I==null?void 0:I.content,(o=p==null?void 0:p.classNames)==null?void 0:o.content)},C.createElement("div",{"data-title":"",className:zr(I==null?void 0:I.title,(c=p==null?void 0:p.classNames)==null?void 0:c.title)},typeof p.title=="function"?p.title():p.title),p.description?C.createElement("div",{"data-description":"",className:zr($,Nq,I==null?void 0:I.description,(u=p==null?void 0:p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),w.isValidElement(p.cancel)?p.cancel:p.cancel&&fp(p.cancel)?C.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||T,onClick:_e=>{var Xe,ft;fp(p.cancel)&&ul&&((ft=(Xe=p.cancel).onClick)==null||ft.call(Xe,_e),Ca())},className:zr(I==null?void 0:I.cancelButton,(f=p==null?void 0:p.classNames)==null?void 0:f.cancelButton)},p.cancel.label):null,w.isValidElement(p.action)?p.action:p.action&&fp(p.action)?C.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||P,onClick:_e=>{var Xe,ft;fp(p.action)&&((ft=(Xe=p.action).onClick)==null||ft.call(Xe,_e),!_e.defaultPrevented&&Ca())},className:zr(I==null?void 0:I.actionButton,(d=p==null?void 0:p.classNames)==null?void 0:d.actionButton)},p.action.label):null))};function NE(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function zW(e,t){let n={};return[e,t].forEach((r,i)=>{let a=i===1,s=a?"--mobile-offset":"--offset",o=a?$W:MW;function c(u){["top","right","bottom","left"].forEach(f=>{n[`${s}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${s}-${u}`]=o:n[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(o)}),n}var VW=w.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:a,closeButton:s,className:o,offset:c,mobileOffset:u,theme:f="light",richColors:d,duration:h,style:p,visibleToasts:g=RW,toastOptions:m,dir:y=NE(),gap:v=LW,loadingIcon:b,icons:x,containerAriaLabel:j="Notifications",pauseWhenPageIsHidden:S}=e,[_,A]=C.useState([]),k=C.useMemo(()=>Array.from(new Set([r].concat(_.filter(U=>U.position).map(U=>U.position)))),[_,r]),[E,T]=C.useState([]),[P,O]=C.useState(!1),[$,R]=C.useState(!1),[L,D]=C.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
341k":"light"),M=C.useRef(null),N=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),I=C.useRef(null),F=C.useRef(!1),V=C.useCallback(U=>{A(G=>{var te;return(te=G.find(xe=>xe.id===U.id))!=null&&te.delete||In.dismiss(U.id),G.filter(({id:xe})=>xe!==U.id)})},[]);return C.useEffect(()=>In.subscribe(U=>{if(U.dismiss){A(G=>G.map(te=>te.id===U.id?{...te,delete:!0}:te));return}setTimeout(()=>{t$.flushSync(()=>{A(G=>{let te=G.findIndex(xe=>xe.id===U.id);return te!==-1?[...G.slice(0,te),{...G[te],...U},...G.slice(te+1)]:[U,...G]})})})}),[]),C.useEffect(()=>{if(f!=="system"){D(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?D("dark"):D("light")),typeof window>"u")return;let U=window.matchMedia("(prefers-color-scheme: dark)");try{U.addEventListener("change",({matches:G})=>{D(G?"dark":"light")})}catch{U.addListener(({matches:te})=>{try{D(te?"dark":"light")}catch(xe){console.error(xe)}})}},[f]),C.useEffect(()=>{_.length<=1&&O(!1)},[_]),C.useEffect(()=>{let U=G=>{var te,xe;i.every(Me=>G[Me]||G.code===Me)&&(O(!0),(te=M.current)==null||te.focus()),G.code==="Escape"&&(document.activeElement===M.current||(xe=M.current)!=null&&xe.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[i]),C.useEffect(()=>{if(M.current)return()=>{I.current&&(I.current.focus({preventScroll:!0}),I.current=null,F.current=!1)}},[M.current]),C.createElement("section",{ref:t,"aria-label":`${j} ${N}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},k.map((U,G)=>{var te;let[xe,Me]=U.split("-");return _.length?C.createElement("ol",{key:U,dir:y==="auto"?NE():y,tabIndex:-1,ref:M,className:o,"data-sonner-toaster":!0,"data-theme":L,"data-y-position":xe,"data-lifted":P&&_.length>1&&!a,"data-x-position":Me,style:{"--front-toast-height":`${((te=E[0])==null?void 0:te.height)||0}px`,"--width":`${DW}px`,"--gap":`${v}px`,...p,...zW(c,u)},onBlur:Y=>{F.current&&!Y.currentTarget.contains(Y.relatedTarget)&&(F.current=!1,I.current&&(I.current.focus({preventScroll:!0}),I.current=null))},onFocus:Y=>{Y.target instanceof HTMLElement&&Y.target.dataset.dismissible==="false"||F.current||(F.current=!0,I.current=Y.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{$||O(!1)},onDragEnd:()=>O(!1),onPointerDown:Y=>{Y.target instanceof HTMLElement&&Y.target.dataset.dismissible==="false"||R(!0)},onPointerUp:()=>R(!1)},_.filter(Y=>!Y.position&&G===0||Y.position===U).map((Y,we)=>{var W,Q;return C.createElement(qW,{key:Y.id,icons:x,index:we,toast:Y,defaultRichColors:d,duration:(W=m==null?void 0:m.duration)!=null?W:h,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:n,visibleToasts:g,closeButton:(Q=m==null?void 0:m.closeButton)!=null?Q:s,interacting:$,position:U,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:V,toasts:_.filter(Z=>Z.position==Y.position),heights:E.filter(Z=>Z.position==Y.position),setHeights:T,expandByDefault:a,gap:v,loadingIcon:b,expanded:P,pauseWhenPageIsHidden:S,swipeDirections:e.swipeDirections})})):null}))});const WW=({...e})=>{const{theme:t="system"}=yW();return l.jsx(VW,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var HW=LS[" useId ".trim().toString()]||(()=>{}),GW=0;function Ro(e){const[t,n]=w.useState(HW());return an(()=>{n(r=>r??String(GW++))},[e]),t?`radix-${t}`:""}const KW=["top","right","bottom","left"],bs=Math.min,Xn=Math.max,Wm=Math.round,hp=Math.floor,Pi=e=>({x:e,y:e}
vendor: 10,346 bytes, line 341
341),YW={left:"right",right:"left",bottom:"top",top:"bottom"},XW={start:"end",end:"start"};function nw(e,t,n){return Xn(e,bs(t,n))}function da(e,t){return typeof e=="function"?e(t):e}function fa(e){return e.split("-")[0]}function xu(e){return e.split("-")[1]}function Bj(e){return e==="x"?"y":"x"}function Uj(e){return e==="y"?"height":"width"}const ZW=new Set(["top","bottom"]);function Ai(e){return ZW.has(fa(e))?"y":"x"}function qj(e){return Bj(Ai(e))}function QW(e,t,n){n===void 0&&(n=!1);const r=xu(e),i=qj(e),a=Uj(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Hm(s)),[s,Hm(s)]}function JW(e){const t=Hm(e);return[rw(e),t,rw(t)]}function rw(e){return e.replace(/start|end/g,t=>XW[t])}const IE=["left","right"],RE=["right","left"],eH=["top","bottom"],tH=["bottom","top"];function nH(e,t,n){switch(e){case"top":case"bottom":return n?t?RE:IE:t?IE:RE;case"left":case"right":return t?eH:tH;default:return[]}}function rH(e,t,n,r){const i=xu(e);let a=nH(fa(e),n==="start",r);return i&&(a=a.map(s=>s+"-"+i),t&&(a=a.concat(a.map(rw)))),a}function Hm(e){return e.replace(/left|right|bottom|top/g,t=>YW[t])}function iH(e){return{top:0,right:0,bottom:0,left:0,...e}}function Q$(e){return typeof e!="number"?iH(e):{top:e,right:e,bottom:e,left:e}}function Gm(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ME(e,t,n){let{reference:r,floating:i}=e;const a=Ai(t),s=qj(t),o=Uj(s),c=fa(t),u=a==="y",f=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,h=r[o]/2-i[o]/2;let p;switch(c){case"top":p={x:f,y:r.y-i.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(xu(t)){case"start":p[s]-=h*(n&&u?-1:1);break;case"end":p[s]+=h*(n&&u?-1:1);break}return p}const aH=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:s}=n,o=a.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:d}=ME(u,r,c),h=r,p={},g=0;for(let m=0;m<o.length;m++){const{name:y,fn:v}=o[m],{x:b,y:x,data:j,reset:S}=await v({x:f,y:d,initialPlacement:r,placement:h,strategy:i,middlewareData:p,rects:u,platform:s,elements:{reference:e,floating:t}});f=b??f,d=x??d,p={...p,[y]:{...p[y],...j}},S&&g<=50&&(g++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(u=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:f,y:d}=ME(u,h,c)),m=-1)}return{x:f,y:d,placement:h,strategy:i,middlewareData:p}};async function df(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:s,elements:o,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=da(t,e),g=Q$(p),y=o[h?d==="floating"?"reference":"floating":d],v=Gm(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(y)))==null||n?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(o.floating)),boundary:u,rootBoundary:f,strategy:c})),b=d==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(o.floating)),j=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},S=Gm(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:b,offsetParent:x,strategy:c}):b);return{top:(v.top-S.top+g.top)/j.y,bottom:(S.bottom-v.bottom+g.bottom)/j.y,left:(v.left-S.left+g.left)/j.x,right:(S.right-v.right+g.right)/j.x}}const sH=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:s,elements:o,middlewareData:c}=t,{element:u,padding:f=0}=da(e,t)||{};if(u==null)return{};const d=Q$(f),h={x:n,y:r},p=qj(i),g=Uj(p),m=await s.getDimensions(u),y=p==="y",v=y?"top":"left",b=y?"bottom":"right",x=y?"clientHeight":"clientWidth",j=a.reference[g]+a.reference[p]-h[p]-a.floating[g],S=h[p]-a.reference[p],_=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let A=_?_[x]:0;(!A||!await(s.isElement==null?void 0:s.isElement(_)))&&(A=o.floating[x]||a.floating[g]);const k=j/2-S/2,E=A/2-m[g]/2-1,T=bs(d[v],E),P=bs(d[b],E),O=T,$=A-m[g]-P,R=A/2-m[g]/2+k,L=nw(O,R,$),D=!c.arrow&&xu(i)!=null&&R!==L&&a.reference[g]/2-(R<O?T:P)-m[g]/2<0,M=D?R<O?R-O:R-$:0;return{[p]:h[p]+M,data:{[p]:L,centerOffset:R-L-M,...D&&{alignmentOffset:M}},reset:D}}}),oH=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:s,initialPlacement:o,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...y}=da(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const v=fa(i),b=Ai(o),x=fa(o)===o,j=await(c.isRTL==null?void 0:c.isRTL(u.floating)),S=h||(x||!m?[Hm(o)]:JW(o)),_=g!=="none";!h&&_&&S.push(...rH(o,m,g,j));const A=[o,...S],k=await df(t,y),E=[];let T=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&E.push(k[v]),d){const R=QW(i,s,j);E.push(k[R[0]],k[R[1]])}if(T=[...T,{placement:i,overflows:E}],!E.every(R=>R<=0)){var P,O;const R=(((P=a.flip)==null?void 0:P.index)||0)+1,L=A[R];if(L&&(!(d==="alignment"?b!==Ai(L):!1)||T.every(N=>N.overflows[0]>0&&Ai(N.placement)===b)))return{data:{index:R,overflows:T},reset:{placement:L}};let D=(O=T.filter(M=>M.overflows[0]<=0).sort((M,N)=>M.overflows[1]-N.overflows[1])[0])==null?void 0:O.placement;if(!D)switch(p){case"bestFit":{var $;const M=($=T.filter(N=>{if(_){const I=Ai(N.placement);return I===b||I==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(I=>I>0).reduce((I,F)=>I+F,0)]).sort((N,I)=>N[1]-I[1])[0])==null?void 0:$[0];M&&(D=M);break}case"initialPlacement":D=o;break}if(i!==D)return{reset:{placement:D}}}return{}}}};function $E(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function DE(e){return KW.some(t=>e[t]>=0)}const lH=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=da(e,t);switch(r){case"referenceHidden":{const a=await df(t,{...i,elementContext:"reference"}),s=$E(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:DE(s)}}}case"escaped":{const a=await df(t,{...i,altBoundary:!0}),s=$E(a,n.floating);return{data:{escapedOffsets:s,escaped:DE(s)}}}default:return{}}}}},J$=new Set(["left","top"]);async function cH(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=fa(n),o=xu(n),c=Ai(n)==="y",u=J$.has(s)?-1:1,f=a&&c?-1:1,d=da(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return o&&typeof g=="number"&&(p=o==="end"?g*-1:g),c?{x:p*f,y:h*u}:{x:h*u,y:p*f}}const uH=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:s,middlewareData:o}=t,c=await cH(t,e);return s===((n=o.offset)==null?void 0:n.placement)&&(r=o.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:s}}}}},dH=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:o={fn:y=>{let{x:v,y:b}=y;return{x:v,y:b}}},...c}=da(e,t),u={x:n,y:r},f=await df(t,c),d=Ai(fa(i)),h=Bj(d);let p=u[h],g=u[d];if(a){const y=h==="y"?"top":"left",v=h==="y"?"bottom":"right",b=p+f[y],x=p-f[v];p=nw(b,p,x)}if(s){const y=d==="y"?"top":"left",v=d==="y"?"bottom":"right",b=g+f[y],x=g-f[v];g=nw(b,g,x)}const m=o.fn({...t,[h]:p,[d]:g});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:a,[d]:s}}}}}},fH=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:a,middlewareData:s}=t,{offset:o=0,mainAxis:c=!0,crossAxis:u=!0}=da(e,t),f={x:n,y:r},d=Ai(i),h=Bj(d);let p=f[h],g=f[d];const m=da(o,t),y=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const x=h==="y"?"height":"width",j=a.reference[h]-a.floating[x]+y.mainAxis,S=a.reference[h]+a.reference[x]-y.mainAxis;p<j?p=j:p>S&&(p=S)}if(u){var v,b;const x=h==="y"?"width":"height",j=J$.has(fa(i)),S=a.reference[d]-a.floating[x]+(j&&((v=s.offset)==null?void 0:v[d])||0)+(j?0:y.crossAxis),_=a.reference[d]+a.reference[x]+(j?0:((b=s.offset)==null?void 0:b[d])||0)-(j?y.crossAxis:0);g<S?g=S:g>_&&(g=_)}return{[h]:p,[d]:g}}}},hH=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:s,elements:o}=t,{apply:c=()=>{},...u}=da(e,t),f=await df(t,u),d=fa(i),h=xu(i),p=Ai(i)==="y",{width:g,height:m}=a.floating;let y,v;d==="top"||d==="bottom"?(y=d,v=h===(await(s.isRTL==null?void 0:s.isRTL(o.floating))?"start":"end")?"left":"right"):(v=d,y=h==="end"?"top":"bottom");const b=m-f.top-f.bottom,x=g-f.left-f.right,j=bs(m-f[y],b),S=bs(g-f[v],x),_=!t.middlewareData.shift;let A=j,k=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(A=b),_&&!h){const T=Xn(f.left,0),P=Xn(f.right,0),O=Xn(f.top,0),$=Xn(f.bottom,0);p?k=g-2*(T!==0||P!==0?T+P:Xn(f.left,f.right)):A=m-2*(O!==0||$!==0?O+$:Xn(f.top,f.bottom))}await c({...t,availableWidth:k,availableHeight:A});const E=await s.getDimensions(o.floating);return g!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}};function My(){return typeof window<"u"}function bu(e){return eD(e)?(e.nodeName||"").toLowerCase():"#document"}function tr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Fi(e){var t;return(t=(eD(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function eD(e){return My()?e instanceof Node||e instanceof tr(e).Node:!1}function ui(e){return My()?e instanceof Element||e instanceof tr(e).Element:!1}function Mi(e){return My()?e instanceof HTMLElement||e instanceof tr(e).HTMLElement:!1}function LE(e){return!My()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof tr(e).ShadowRoot}const pH=new Set(["inline","contents"]);function Eh(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=di(e);
vendor: 4,121 bytes, line 341
341return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!pH.has(i)}const mH=new Set(["table","td","th"]);function gH(e){return mH.has(bu(e))}const yH=[":popover-open",":modal"];function $y(e){return yH.some(t=>{try{return e.matches(t)}catch{return!1}})}const vH=["transform","translate","scale","rotate","perspective"],xH=["transform","translate","scale","rotate","perspective","filter"],bH=["paint","layout","strict","content"];function zj(e){const t=Vj(),n=ui(e)?di(e):e;return vH.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||xH.some(r=>(n.willChange||"").includes(r))||bH.some(r=>(n.contain||"").includes(r))}function wH(e){let t=ws(e);for(;Mi(t)&&!Ic(t);){if(zj(t))return t;if($y(t))return null;t=ws(t)}return null}function Vj(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const SH=new Set(["html","body","#document"]);function Ic(e){return SH.has(bu(e))}function di(e){return tr(e).getComputedStyle(e)}function Dy(e){return ui(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ws(e){if(bu(e)==="html")return e;const t=e.assignedSlot||e.parentNode||LE(e)&&e.host||Fi(e);return LE(t)?t.host:t}function tD(e){const t=ws(e);return Ic(t)?e.ownerDocument?e.ownerDocument.body:e.body:Mi(t)&&Eh(t)?t:tD(t)}function ff(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=tD(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),s=tr(i);if(a){const o=iw(s);return t.concat(s,s.visualViewport||[],Eh(i)?i:[],o&&n?ff(o):[])}return t.concat(i,ff(i,[],n))}function iw(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function nD(e){const t=di(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Mi(e),a=i?e.offsetWidth:n,s=i?e.offsetHeight:r,o=Wm(n)!==a||Wm(r)!==s;return o&&(n=a,r=s),{width:n,height:r,$:o}}function Wj(e){return ui(e)?e:e.contextElement}function oc(e){const t=Wj(e);if(!Mi(t))return Pi(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=nD(t);let s=(a?Wm(n.width):n.width)/r,o=(a?Wm(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!o||!Number.isFinite(o))&&(o=1),{x:s,y:o}}const jH=Pi(0);function rD(e){const t=tr(e);return!Vj()||!t.visualViewport?jH:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _H(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==tr(e)?!1:t}function Ho(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=Wj(e);let s=Pi(1);t&&(r?ui(r)&&(s=oc(r)):s=oc(e));const o=_H(a,n,r)?rD(a):Pi(0);let c=(i.left+o.x)/s.x,u=(i.top+o.y)/s.y,f=i.width/s.x,d=i.height/s.y;if(a){const h=tr(a),p=r&&ui(r)?tr(r):r;let g=h,m=iw(g);for(;m&&r&&p!==g;){const y=oc(m),v=m.getBoundingClientRect(),b=di(m),x=v.left+(m.clientLeft+parseFloat(b.paddingLeft))*y.x,j=v.top+(m.clientTop+parseFloat(b.paddingTop))*y.y;c*=y.x,u*=y.y,f*=y.x,d*=y.y,c+=x,u+=j,g=tr(m),m=iw(g)}}return Gm({width:f,height:d,x:c,y:u})}function Hj(e,t){const n=Dy(e).scrollLeft;return t?t.left+n:Ho(Fi(e)).left+n}function iD(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:Hj(e,r)),a=r.top+t.scrollTop;return{x:i,y:a}}function AH(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",s=Fi(r),o=t?$y(t.floating):!1;if(r===s||o&&a)return n;let c={scrollLeft:0,scrollTop:0},u=Pi(1);const f=Pi(0),d=Mi(r);if((d||!d&&!a)&&((bu(r)!=="body"||Eh(s))&&(c=Dy(r)),Mi(r))){const p=Ho(r);u=oc(r),f.x=p.x+r.clientLeft,f.y=p.y+r.clientTop}const h=s&&!d&&!a?iD(s,c,!0):Pi(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x+h.x,y:n.y*u.y-c.scrollTop*u.y+f.y+h.y}}function kH(e){return Array.from(e.getClientRects())}function EH(e){const t=Fi(e),n=Dy(e),r=e.ownerDocument.body,i=Xn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Xn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Hj(e);const o=-n.scrollTop;return di(r).direction==="rtl"&&(s+=Xn(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:s,y:o}}
vendor: 4,850 bytes, line 341
341function CH(e,t){const n=tr(e),r=Fi(e),i=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,o=0,c=0;if(i){a=i.width,s=i.height;const u=Vj();(!u||u&&t==="fixed")&&(o=i.offsetLeft,c=i.offsetTop)}return{width:a,height:s,x:o,y:c}}const PH=new Set(["absolute","fixed"]);function TH(e,t){const n=Ho(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Mi(e)?oc(e):Pi(1),s=e.clientWidth*a.x,o=e.clientHeight*a.y,c=i*a.x,u=r*a.y;return{width:s,height:o,x:c,y:u}}function FE(e,t,n){let r;if(t==="viewport")r=CH(e,n);else if(t==="document")r=EH(Fi(e));else if(ui(t))r=TH(t,n);else{const i=rD(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Gm(r)}function aD(e,t){const n=ws(e);return n===t||!ui(n)||Ic(n)?!1:di(n).position==="fixed"||aD(n,t)}function OH(e,t){const n=t.get(e);if(n)return n;let r=ff(e,[],!1).filter(o=>ui(o)&&bu(o)!=="body"),i=null;const a=di(e).position==="fixed";let s=a?ws(e):e;for(;ui(s)&&!Ic(s);){const o=di(s),c=zj(s);!c&&o.position==="fixed"&&(i=null),(a?!c&&!i:!c&&o.position==="static"&&!!i&&PH.has(i.position)||Eh(s)&&!c&&aD(e,s))?r=r.filter(f=>f!==s):i=o,s=ws(s)}return t.set(e,r),r}function NH(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?$y(t)?[]:OH(t,this._c):[].concat(n),r],o=s[0],c=s.reduce((u,f)=>{const d=FE(t,f,i);return u.top=Xn(d.top,u.top),u.right=bs(d.right,u.right),u.bottom=bs(d.bottom,u.bottom),u.left=Xn(d.left,u.left),u},FE(t,o,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function IH(e){const{width:t,height:n}=nD(e);return{width:t,height:n}}function RH(e,t,n){const r=Mi(t),i=Fi(t),a=n==="fixed",s=Ho(e,!0,a,t);let o={scrollLeft:0,scrollTop:0};const c=Pi(0);function u(){c.x=Hj(i)}if(r||!r&&!a)if((bu(t)!=="body"||Eh(i))&&(o=Dy(t)),r){const p=Ho(t,!0,a,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else i&&u();a&&!r&&i&&u();const f=i&&!r&&!a?iD(i,o):Pi(0),d=s.left+o.scrollLeft-c.x-f.x,h=s.top+o.scrollTop-c.y-f.y;return{x:d,y:h,width:s.width,height:s.height}}function Lx(e){return di(e).position==="static"}function BE(e,t){if(!Mi(e)||di(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Fi(e)===n&&(n=n.ownerDocument.body),n}function sD(e,t){const n=tr(e);if($y(e))return n;if(!Mi(e)){let i=ws(e);for(;i&&!Ic(i);){if(ui(i)&&!Lx(i))return i;i=ws(i)}return n}let r=BE(e,t);for(;r&&gH(r)&&Lx(r);)r=BE(r,t);return r&&Ic(r)&&Lx(r)&&!zj(r)?n:r||wH(e)||n}const MH=async function(e){const t=this.getOffsetParent||sD,n=this.getDimensions,r=await n(e.floating);return{reference:RH(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function $H(e){return di(e).direction==="rtl"}const DH={convertOffsetParentRelativeRectToViewportRelativeRect:AH,getDocumentElement:Fi,getClippingRect:NH,getOffsetParent:sD,getElementRects:MH,getClientRects:kH,getDimensions:IH,getScale:oc,isElement:ui,isRTL:$H};function oD(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function LH(e,t){let n=null,r;const i=Fi(e);function a(){var o;clearTimeout(r),(o=n)==null||o.disconnect(),n=null}function s(o,c){o===void 0&&(o=!1),c===void 0&&(c=1),a();const u=e.getBoundingClientRect(),{left:f,top:d,width:h,height:p}=u;if(o||t(),!h||!p)return;const g=hp(d),m=hp(i.clientWidth-(f+h)),y=hp(i.clientHeight-(d+p)),v=hp(f),x={rootMargin:-g+"px "+-m+"px "+-y+"px "+-v+"px",threshold:Xn(0,bs(1,c))||1};let j=!0;function S(_){const A=_[0].intersectionRatio;if(A!==c){if(!j)return s();A?s(!1,A):r=setTimeout(()=>{s(!1,1e-7)},1e3)}A===1&&!oD(u,e.getBoundingClientRect())&&s(),j=!1}try{n=new IntersectionObserver(S,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(e)}return s(!0),a}function FH(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Wj(e),f=i||a?[...u?ff(u):[],...ff(t)]:[];f.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const d=u&&o?LH(u,n):null;let h=-1,p=null;s&&(p=new ResizeObserver(v=>{let[b]=v;b&&b.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let g,m=c?Ho(e):null;c&&y();function y(){const v=Ho(e);m&&!oD(m,v)&&n(),m=v,g=requestAnimationFrame(y)}return n(),()=>{var v;f.forEach(b=>{i&&b.removeEventListener("scroll",n),a&&b.removeEventListener("resize",n)}),d==null||d(),(v=p)==null||v.disconnect(),p=null,c&&cancelAnimationFrame(g)}}const BH=uH,UH=dH,qH=oH,zH=hH,VH=lH,UE=sH,WH=fH,HH=(e,t,n)=>{const r=new Map,i={platform:DH,...n},a={...i.platform,_c:r};return aH(e,t,{...i,platform:a})};var GH=typeof document<"u",KH=function(){},om=GH?w.useLayoutEffect:KH;function Km(e,t){if(e===t)return!0;
vendor: 4,143 bytes, line 341
341if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Km(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!Km(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function lD(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function qE(e,t){const n=lD(e);return Math.round(t*n)/n}function Fx(e){const t=w.useRef(e);return om(()=>{t.current=e}),t}function YH(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:s}={},transform:o=!0,whileElementsMounted:c,open:u}=e,[f,d]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=w.useState(r);Km(h,r)||p(r);const[g,m]=w.useState(null),[y,v]=w.useState(null),b=w.useCallback(N=>{N!==_.current&&(_.current=N,m(N))},[]),x=w.useCallback(N=>{N!==A.current&&(A.current=N,v(N))},[]),j=a||g,S=s||y,_=w.useRef(null),A=w.useRef(null),k=w.useRef(f),E=c!=null,T=Fx(c),P=Fx(i),O=Fx(u),$=w.useCallback(()=>{if(!_.current||!A.current)return;const N={placement:t,strategy:n,middleware:h};P.current&&(N.platform=P.current),HH(_.current,A.current,N).then(I=>{const F={...I,isPositioned:O.current!==!1};R.current&&!Km(k.current,F)&&(k.current=F,il.flushSync(()=>{d(F)}))})},[h,t,n,P,O]);om(()=>{u===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(N=>({...N,isPositioned:!1})))},[u]);const R=w.useRef(!1);om(()=>(R.current=!0,()=>{R.current=!1}),[]),om(()=>{if(j&&(_.current=j),S&&(A.current=S),j&&S){if(T.current)return T.current(j,S,$);$()}},[j,S,$,T,E]);const L=w.useMemo(()=>({reference:_,floating:A,setReference:b,setFloating:x}),[b,x]),D=w.useMemo(()=>({reference:j,floating:S}),[j,S]),M=w.useMemo(()=>{const N={position:n,left:0,top:0};if(!D.floating)return N;const I=qE(D.floating,f.x),F=qE(D.floating,f.y);return o?{...N,transform:"translate("+I+"px, "+F+"px)",...lD(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:I,top:F}},[n,o,D.floating,f.x,f.y]);return w.useMemo(()=>({...f,update:$,refs:L,elements:D,floatingStyles:M}),[f,$,L,D,M])}const XH=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?UE({element:r.current,padding:i}).fn(n):{}:r?UE({element:r,padding:i}).fn(n):{}}}},ZH=(e,t)=>({...BH(e),options:[e,t]}),QH=(e,t)=>({...UH(e),options:[e,t]}),JH=(e,t)=>({...WH(e),options:[e,t]}),e9=(e,t)=>({...qH(e),options:[e,t]}),t9=(e,t)=>({...zH(e),options:[e,t]}),n9=(e,t)=>({...VH(e),options:[e,t]}),r9=(e,t)=>({...XH(e),options:[e,t]});var i9="Arrow",cD=w.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return l.jsx(Pe.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});cD.displayName=i9;var a9=cD;function Gj(e){const[t,n]=w.useState(void 0);return an(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let s,o;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;s=u.inlineSize,o=u.blockSize}else s=e.offsetWidth,o=e.offsetHeight;n({width:s,height:o})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Kj="Popper",[uD,wu]=wa(Kj),[s9,dD]=uD(Kj),fD=e=>{const{__scopePopper:t,children:n}=e,[r,i]=w.useState(null);return l.jsx(s9,{scope:t,anchor:r,onAnchorChange:i,children:n})};fD.displayName=Kj;var hD="PopperAnchor",pD=w.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=dD(hD,n),s=w.useRef(null),o=ze(t,s);return w.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:l.jsx(Pe.div,{...i,ref:o})});pD.displayName=hD;var Yj="PopperContent",[o9,l9]=uD(Yj),mD=w.forwardRef((e,t)=>
vendor: 4,303 bytes, line 341
341{var Y,we,W,Q,Z,B;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:s=0,arrowPadding:o=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:g,...m}=e,y=dD(Yj,n),[v,b]=w.useState(null),x=ze(t,Te=>b(Te)),[j,S]=w.useState(null),_=Gj(j),A=(_==null?void 0:_.width)??0,k=(_==null?void 0:_.height)??0,E=r+(a!=="center"?"-"+a:""),T=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},P=Array.isArray(u)?u:[u],O=P.length>0,$={padding:T,boundary:P.filter(u9),altBoundary:O},{refs:R,floatingStyles:L,placement:D,isPositioned:M,middlewareData:N}=YH({strategy:"fixed",placement:E,whileElementsMounted:(...Te)=>FH(...Te,{animationFrame:p==="always"}),elements:{reference:y.anchor},middleware:[ZH({mainAxis:i+k,alignmentAxis:s}),c&&QH({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?JH():void 0,...$}),c&&e9({...$}),t9({...$,apply:({elements:Te,rects:be,availableWidth:Qe,availableHeight:Ye})=>{const{width:wt,height:Nn}=be.reference,zn=Te.floating.style;zn.setProperty("--radix-popper-available-width",`${Qe}px`),zn.setProperty("--radix-popper-available-height",`${Ye}px`),zn.setProperty("--radix-popper-anchor-width",`${wt}px`),zn.setProperty("--radix-popper-anchor-height",`${Nn}px`)}}),j&&r9({element:j,padding:o}),d9({arrowWidth:A,arrowHeight:k}),h&&n9({strategy:"referenceHidden",...$})]}),[I,F]=vD(D),V=ci(g);an(()=>{M&&(V==null||V())},[M,V]);const U=(Y=N.arrow)==null?void 0:Y.x,G=(we=N.arrow)==null?void 0:we.y,te=((W=N.arrow)==null?void 0:W.centerOffset)!==0,[xe,Me]=w.useState();return an(()=>{v&&Me(window.getComputedStyle(v).zIndex)},[v]),l.jsx("div",{ref:R.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:M?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:xe,"--radix-popper-transform-origin":[(Q=N.transformOrigin)==null?void 0:Q.x,(Z=N.transformOrigin)==null?void 0:Z.y].join(" "),...((B=N.hide)==null?void 0:B.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(o9,{scope:n,placedSide:I,onArrowChange:S,arrowX:U,arrowY:G,shouldHideArrow:te,children:l.jsx(Pe.div,{"data-side":I,"data-align":F,...m,ref:x,style:{...m.style,animation:M?void 0:"none"}})})})});mD.displayName=Yj;var gD="PopperArrow",c9={top:"bottom",right:"left",bottom:"top",left:"right"},yD=w.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=l9(gD,r),s=c9[a.placedSide];return l.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:l.jsx(a9,{...i,ref:n,style:{...i.style,display:"block"}})})});yD.displayName=gD;function u9(e){return e!==null}var d9=e=>({name:"transformOrigin",options:e,fn(t){var y,v,b;const{placement:n,rects:r,middlewareData:i}=t,s=((y=i.arrow)==null?void 0:y.centerOffset)!==0,o=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[u,f]=vD(n),d={start:"0%",center:"50%",end:"100%"}[f],h=(((v=i.arrow)==null?void 0:v.x)??0)+o/2,p=(((b=i.arrow)==null?void 0:b.y)??0)+c/2;let g="",m="";return u==="bottom"?(g=s?d:`${h}px`,m=`${-c}px`):u==="top"?(g=s?d:`${h}px`,m=`${r.floating.height+c}px`):u==="right"?(g=`${-c}px`,m=s?d:`${p}px`):u==="left"&&(g=`${r.floating.width+c}px`,m=s?d:`${p}px`),{data:{x:g,y:m}}}});function vD(e){const[t,n="center"]=e.split("-");return[t,n]}var xD=fD,Ly=pD,Xj=mD,Zj=yD,[Fy,KNe]=wa("Tooltip",[wu]),Qj=wu(),bD="TooltipProvider",f9=700,zE="tooltip.open",[h9,wD]=Fy(bD),SD=e=>{const{__scopeTooltip:t,delayDuration:n=f9,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,s=w.useRef(!0),o=w.useRef(!1),c=w.useRef(0);return w.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),l.jsx(h9,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:w.useCallback(()=>{window.clearTimeout(c.current),s.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:o,onPointerInTransitChange:w.useCallback(u=>{o.current=u}
vendor: 5,739 bytes, line 341
341,[]),disableHoverableContent:i,children:a})};SD.displayName=bD;var jD="Tooltip",[YNe,By]=Fy(jD),aw="TooltipTrigger",p9=w.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=By(aw,n),a=wD(aw,n),s=Qj(n),o=w.useRef(null),c=ze(t,o,i.onTriggerChange),u=w.useRef(!1),f=w.useRef(!1),d=w.useCallback(()=>u.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),l.jsx(Ly,{asChild:!0,...s,children:l.jsx(Pe.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:c,onPointerMove:me(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),f.current=!0)}),onPointerLeave:me(e.onPointerLeave,()=>{i.onTriggerLeave(),f.current=!1}),onPointerDown:me(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:me(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:me(e.onBlur,i.onClose),onClick:me(e.onClick,i.onClose)})})});p9.displayName=aw;var m9="TooltipPortal",[XNe,g9]=Fy(m9,{forceMount:void 0}),Rc="TooltipContent",_D=w.forwardRef((e,t)=>{const n=g9(Rc,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...a}=e,s=By(Rc,e.__scopeTooltip);return l.jsx(Sa,{present:r||s.open,children:s.disableHoverableContent?l.jsx(AD,{side:i,...a,ref:t}):l.jsx(y9,{side:i,...a,ref:t})})}),y9=w.forwardRef((e,t)=>{const n=By(Rc,e.__scopeTooltip),r=wD(Rc,e.__scopeTooltip),i=w.useRef(null),a=ze(t,i),[s,o]=w.useState(null),{trigger:c,onClose:u}=n,f=i.current,{onPointerInTransitChange:d}=r,h=w.useCallback(()=>{o(null),d(!1)},[d]),p=w.useCallback((g,m)=>{const y=g.currentTarget,v={x:g.clientX,y:g.clientY},b=S9(v,y.getBoundingClientRect()),x=j9(v,b),j=_9(m.getBoundingClientRect()),S=k9([...x,...j]);o(S),d(!0)},[d]);return w.useEffect(()=>()=>h(),[h]),w.useEffect(()=>{if(c&&f){const g=y=>p(y,f),m=y=>p(y,c);return c.addEventListener("pointerleave",g),f.addEventListener("pointerleave",m),()=>{c.removeEventListener("pointerleave",g),f.removeEventListener("pointerleave",m)}}},[c,f,p,h]),w.useEffect(()=>{if(s){const g=m=>{const y=m.target,v={x:m.clientX,y:m.clientY},b=(c==null?void 0:c.contains(y))||(f==null?void 0:f.contains(y)),x=!A9(v,s);b?h():x&&(h(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[c,f,s,u,h]),l.jsx(AD,{...e,ref:a})}),[v9,x9]=Fy(jD,{isInside:!1}),b9=wV("TooltipContent"),AD=w.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:s,...o}=e,c=By(Rc,n),u=Qj(n),{onClose:f}=c;return w.useEffect(()=>(document.addEventListener(zE,f),()=>document.removeEventListener(zE,f)),[f]),w.useEffect(()=>{if(c.trigger){const d=h=>{const p=h.target;p!=null&&p.contains(c.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,f]),l.jsx(mu,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:f,children:l.jsxs(Xj,{"data-state":c.stateAttribute,...u,...o,ref:t,style:{...o.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(b9,{children:r}),l.jsx(v9,{scope:n,isInside:!0,children:l.jsx(zV,{id:c.contentId,role:"tooltip",children:i||r})})]})})});_D.displayName=Rc;var kD="TooltipArrow",w9=w.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Qj(n);return x9(kD,n).isInside?null:l.jsx(Zj,{...i,...r,ref:t})});w9.displayName=kD;function S9(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function j9(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function _9(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function A9(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const o=t[a],c=t[s],u=o.x,f=o.y,d=c.x,h=c.y;f>r!=h>r&&n<(d-u)*(r-f)/(h-f)+u&&(i=!i)}return i}function k9(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),E9(t)}function E9(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(i.y-s.y)>=(a.y-s.y)*(i.x-s.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(i.y-s.y)>=(a.y-s.y)*(i.x-s.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var C9=SD,ED=_D;const P9=C9,T9=w.forwardRef(({className:e,sideOffset:t=4,...n},r)=>l.jsx(ED,{ref:r,sideOffset:t,className:ve("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
341de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));T9.displayName=ED.displayName;var Uy=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(){}},qy=typeof window>"u"||"Deno"in globalThis;function Xr(){}function O9(e,t){return typeof e=="function"?e(t):e}function N9(e){return typeof e=="number"&&e>=0&&e!==1/0}function I9(e,t){return Math.max(e+(t||0)-Date.now(),0)}function sw(e,t){return typeof e=="function"?e(t):e}function R9(e,t){return typeof e=="function"?e(t):e}function VE(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:s,stale:o}=e;if(s){if(r){if(t.queryHash!==Jj(s,t.options))return!1}else if(!pf(t.queryKey,s))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||i&&i!==t.state.fetchStatus||a&&!a(t))}function WE(e,t){const{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(hf(t.options.mutationKey)!==hf(a))return!1}else if(!pf(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Jj(e,t){return((t==null?void 0:t.queryKeyHashFn)||hf)(e)}function hf(e){return JSON.stringify(e,(t,n)=>ow(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function pf(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>pf(e[n],t[n])):!1}function CD(e,t){if(e===t)return e;const n=HE(e)&&HE(t);if(n||ow(e)&&ow(t)){const r=n?e:Object.keys(e),i=r.length,a=n?t:Object.keys(t),s=a.length,o=n?[]:{},c=new Set(r);let u=0;for(let f=0;f<s;f++){const d=n?f:a[f];(!n&&c.has(d)||n)&&e[d]===void 0&&t[d]===void 0?(o[d]=void 0,u++):(o[d]=CD(e[d],t[d]),o[d]===e[d]&&e[d]!==void 0&&u++)}return i===s&&u===i?e:o}return t}function HE(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ow(e){if(!GE(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!GE(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function GE(e){return Object.prototype.toString.call(e)==="[object Object]"}function M9(e){return new Promise(t=>{setTimeout(t,e)})}function $9(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?CD(e,t):t}function D9(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function L9(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var e_=Symbol();function PD(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===e_?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Ao,Ka,yc,MR,F9=(MR=class extends Uy{constructor(){super();Fe(this,Ao);Fe(this,Ka);Fe(this,yc);Ae(this,yc,t=>{if(!qy&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){z(this,Ka)||this.setEventListener(z(this,yc))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,Ka))==null||t.call(this),Ae(this,Ka,void 0))}setEventListener(t){var n;Ae(this,yc,t),(n=z(this,Ka))==null||n.call(this),Ae(this,Ka,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){z(this,Ao)!==t&&(Ae(this,Ao,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof z(this,Ao)=="boolean"?z(this,Ao):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ao=new WeakMap,Ka=new WeakMap,yc=new WeakMap,MR),TD=new F9,vc,Ya,xc,$R,B9=($R=class extends Uy{constructor(){super();Fe(this,vc,!0);Fe(this,Ya);Fe(this,xc);Ae(this,xc,t=>{if(!qy&&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(){z(this,Ya)||this.setEventListener(z(this,xc))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,Ya))==null||t.call(this),Ae(this,Ya,void 0))}setEventListener(t){var n;Ae(this,xc,t),(n=z(this,Ya))==null||n.call(this),Ae(this,Ya,t(this.setOnline.bind(this)))}setOnline(t){z(this,vc)!==t&&(Ae(this,vc,t),this.listeners.forEac
vendor: 3,679 bytes, line 341
341h(r=>{r(t)}))}isOnline(){return z(this,vc)}},vc=new WeakMap,Ya=new WeakMap,xc=new WeakMap,$R),Ym=new B9;function U9(){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}function q9(e){return Math.min(1e3*2**e,3e4)}function OD(e){return(e??"online")==="online"?Ym.isOnline():!0}var ND=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Bx(e){return e instanceof ND}function ID(e){let t=!1,n=0,r=!1,i;const a=U9(),s=m=>{var y;r||(h(new ND(m)),(y=e.abort)==null||y.call(e))},o=()=>{t=!0},c=()=>{t=!1},u=()=>TD.isFocused()&&(e.networkMode==="always"||Ym.isOnline())&&e.canRun(),f=()=>OD(e.networkMode)&&e.canRun(),d=m=>{var y;r||(r=!0,(y=e.onSuccess)==null||y.call(e,m),i==null||i(),a.resolve(m))},h=m=>{var y;r||(r=!0,(y=e.onError)==null||y.call(e,m),i==null||i(),a.reject(m))},p=()=>new Promise(m=>{var y;i=v=>{(r||u())&&m(v)},(y=e.onPause)==null||y.call(e)}).then(()=>{var m;i=void 0,r||(m=e.onContinue)==null||m.call(e)}),g=()=>{if(r)return;let m;const y=n===0?e.initialPromise:void 0;try{m=y??e.fn()}catch(v){m=Promise.reject(v)}Promise.resolve(m).then(d).catch(v=>{var _;if(r)return;const b=e.retry??(qy?0:3),x=e.retryDelay??q9,j=typeof x=="function"?x(n,v):x,S=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,v);if(t||!S){h(v);return}n++,(_=e.onFail)==null||_.call(e,n,v),M9(j).then(()=>u()?void 0:p()).then(()=>{t?h(v):g()})})};return{promise:a,cancel:s,continue:()=>(i==null||i(),a),cancelRetry:o,continueRetry:c,canStart:f,start:()=>(f()?g():p().then(g),a)}}var z9=e=>setTimeout(e,0);function V9(){let e=[],t=0,n=o=>{o()},r=o=>{o()},i=z9;const a=o=>{t?e.push(o):i(()=>{n(o)})},s=()=>{const o=e;e=[],o.length&&i(()=>{r(()=>{o.forEach(c=>{n(c)})})})};return{batch:o=>{let c;t++;try{c=o()}finally{t--,t||s()}return c},batchCalls:o=>(...c)=>{a(()=>{o(...c)})},schedule:a,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{i=o}}}var xn=V9(),ko,DR,RD=(DR=class{constructor(){Fe(this,ko)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),N9(this.gcTime)&&Ae(this,ko,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(qy?1/0:5*60*1e3))}clearGcTimeout(){z(this,ko)&&(clearTimeout(z(this,ko)),Ae(this,ko,void 0))}},ko=new WeakMap,DR),bc,Eo,yr,Co,un,gh,Po,Qr,Wi,LR,W9=(LR=class extends RD{constructor(t){super();Fe(this,Qr);Fe(this,bc);Fe(this,Eo);Fe(this,yr);Fe(this,Co);Fe(this,un);Fe(this,gh);Fe(this,Po);Ae(this,Po,!1),Ae(this,gh,t.defaultOptions),this.setOptions(t.options),this.observers=[],Ae(this,Co,t.client),Ae(this,yr,z(this,Co).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Ae(this,bc,G9(this.options)),this.state=t.state??z(this,bc),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=z(this,un))==null?void 0:t.promise}setOptions(t){this.options={...z(this,gh),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&z(this,yr).remove(this)}setData(t,n){const r=$9(this.state.data,t,this.options);return sn(this,Qr,Wi).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){sn(this,Qr,Wi).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=z(this,un))==null?void 0:r.promise;return(i=z(this,un))==null||i.cancel(t),n?n.then(Xr).catch(Xr):Prom
vendor: 1,602 bytes, line 341
341ise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(z(this,bc))}isActive(){return this.observers.some(t=>R9(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===e_||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>sw(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:!I9(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=z(this,un))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=z(this,un))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),z(this,yr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(z(this,un)&&(z(this,Po)?z(this,un).cancel({revert:!0}):z(this,un).cancelRetry()),this.scheduleGc()),z(this,yr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||sn(this,Qr,Wi).call(this,{type:"invalidate"})}
vendor: 13,738 bytes, line 341
341fetch(t,n){var u,f,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(z(this,un))return z(this,un).continueRetry(),z(this,un).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(p=>p.options.queryFn);h&&this.setOptions(h.options)}const r=new AbortController,i=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(Ae(this,Po,!0),r.signal)})},a=()=>{const h=PD(this.options,n),g=(()=>{const m={client:z(this,Co),queryKey:this.queryKey,meta:this.meta};return i(m),m})();return Ae(this,Po,!1),this.options.persister?this.options.persister(h,g,this):h(g)},o=(()=>{const h={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:z(this,Co),state:this.state,fetchFn:a};return i(h),h})();(u=this.options.behavior)==null||u.onFetch(o,this),Ae(this,Eo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=o.fetchOptions)==null?void 0:f.meta))&&sn(this,Qr,Wi).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const c=h=>{var p,g,m,y;Bx(h)&&h.silent||sn(this,Qr,Wi).call(this,{type:"error",error:h}),Bx(h)||((g=(p=z(this,yr).config).onError)==null||g.call(p,h,this),(y=(m=z(this,yr).config).onSettled)==null||y.call(m,this.state.data,h,this)),this.scheduleGc()};return Ae(this,un,ID({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:h=>{var p,g,m,y;if(h===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(v){c(v);return}(g=(p=z(this,yr).config).onSuccess)==null||g.call(p,h,this),(y=(m=z(this,yr).config).onSettled)==null||y.call(m,h,this.state.error,this),this.scheduleGc()},onError:c,onFail:(h,p)=>{sn(this,Qr,Wi).call(this,{type:"failed",failureCount:h,error:p})},onPause:()=>{sn(this,Qr,Wi).call(this,{type:"pause"})},onContinue:()=>{sn(this,Qr,Wi).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),z(this,un).start()}},bc=new WeakMap,Eo=new WeakMap,yr=new WeakMap,Co=new WeakMap,un=new WeakMap,gh=new WeakMap,Po=new WeakMap,Qr=new WeakSet,Wi=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,...H9(r.data,this.options),fetchMeta:t.meta??null};case"success":return Ae(this,Eo,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Bx(i)&&i.revert&&z(this,Eo)?{...z(this,Eo),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),xn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),z(this,yr).notify({query:this,type:"updated",action:t})})},LR);function H9(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:OD(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function G9(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 bi,FR,K9=(FR=class extends Uy{constructor(t={}){super();Fe(this,bi);this.config=t,Ae(this,bi,new Map)}build(t,n,r){const i=n.queryKey,a=n.queryHash??Jj(i,n);let s=this.get(a);return s||(s=new W9({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){z(this,bi).has(t.queryHash)||(z(this,bi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=z(this,bi).get(t.queryHash);n&&(t.destroy(),n===t&&z(this,bi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){xn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return z(this,bi).get(t)}getAll(){return[...z(this,bi).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>VE(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>VE(t,r)):n}notify(t){xn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){xn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){xn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},bi=new WeakMap,FR),wi,yn,To,Si,Ma,BR,Y9=(BR=class extends RD{constructor(t){super();Fe(this,Si);Fe(this,wi);Fe(this,yn);Fe(this,To);this.mutationId=t.mutationId,Ae(this,yn,t.mutationCache),Ae(this,wi,[]),this.state=t.state||X9(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){z(this,wi).includes(t)||(z(this,wi).push(t),this.clearGcTimeout(),z(this,yn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Ae(this,wi,z(this,wi).filter(n=>n!==t)),this.scheduleGc(),z(this,yn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){z(this,wi).length||(this.state.status==="pending"?this.scheduleGc():z(this,yn).remove(this))}continue(){var t;return((t=z(this,To))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,s,o,c,u,f,d,h,p,g,m,y,v,b,x,j,S,_,A,k;const n=()=>{sn(this,Si,Ma).call(this,{type:"continue"})};Ae(this,To,ID({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(E,T)=>{sn(this,Si,Ma).call(this,{type:"failed",failureCount:E,error:T})},onPause:()=>{sn(this,Si,Ma).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>z(this,yn).canRun(this)}));const r=this.state.status==="pending",i=!z(this,To).canStart();try{if(r)n();else{sn(this,Si,Ma).call(this,{type:"pending",variables:t,isPaused:i}),await((s=(a=z(this,yn).config).onMutate)==null?void 0:s.call(a,t,this));const T=await((c=(o=this.options).onMutate)==null?void 0:c.call(o,t));T!==this.state.context&&sn(this,Si,Ma).call(this,{type:"pending",context:T,variables:t,isPaused:i})}const E=await z(this,To).start();return await((f=(u=z(this,yn).config).onSuccess)==null?void 0:f.call(u,E,t,this.state.context,this)),await((h=(d=this.options).onSuccess)==null?void 0:h.call(d,E,t,this.state.context)),await((g=(p=z(this,yn).config).onSettled)==null?void 0:g.call(p,E,null,this.state.variables,this.state.context,this)),await((y=(m=this.options).onSettled)==null?void 0:y.call(m,E,null,t,this.state.context)),sn(this,Si,Ma).call(this,{type:"success",data:E}),E}catch(E){try{throw await((b=(v=z(this,yn).config).onError)==null?void 0:b.call(v,E,t,this.state.context,this)),await((j=(x=this.options).onError)==null?void 0:j.call(x,E,t,this.state.context)),await((_=(S=z(this,yn).config).onSettled)==null?void 0:_.call(S,void 0,E,this.state.variables,this.state.context,this)),await((k=(A=this.options).onSettled)==null?void 0:k.call(A,void 0,E,t,this.state.context)),E}finally{sn(this,Si,Ma).call(this,{type:"error",error:E})}}finally{z(this,yn).runNext(this)}}},wi=new WeakMap,yn=new WeakMap,To=new WeakMap,Si=new WeakSet,Ma=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),xn.batch(()=>{z(this,wi).forEach(r=>{r.onMutationUpdate(t)}),z(this,yn).notify({mutation:this,type:"updated",action:t})})},BR);function X9(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Xi,Jr,yh,UR,Z9=(UR=class extends Uy{constructor(t={}){super();Fe(this,Xi);Fe(this,Jr);Fe(this,yh);this.config=t,Ae(this,Xi,new Set),Ae(this,Jr,new Map),Ae(this,yh,0)}build(t,n,r){const i=new Y9({mutationCache:this,mutationId:++Wh(this,yh)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){z(this,Xi).add(t);const n=pp(t);if(typeof n=="string"){const r=z(this,Jr).get(n);r?r.push(t):z(this,Jr).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(z(this,Xi).delete(t)){const n=pp(t);if(typeof n=="string"){const r=z(this,Jr).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&z(this,Jr).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=pp(t);if(typeof n=="string"){const r=z(this,Jr).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=pp(t);if(typeof n=="string"){const i=(r=z(this,Jr).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(){xn.batch(()=>{z(this,Xi).forEach(t=>{this.notify({type:"removed",mutation:t})}),z(this,Xi).clear(),z(this,Jr).clear()})}getAll(){return Array.from(z(this,Xi))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>WE(n,r))}findAll(t={}){return this.getAll().filter(n=>WE(t,n))}notify(t){xn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return xn.batch(()=>Promise.all(t.map(n=>n.continue().catch(Xr))))}},Xi=new WeakMap,Jr=new WeakMap,yh=new WeakMap,UR);function pp(e){var t;return(t=e.options.scope)==null?void 0:t.id}function KE(e){return{onFetch:(t,n)=>{var f,d,h,p,g;const r=t.options,i=(h=(d=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:d.fetchMore)==null?void 0:h.direction,a=((p=t.state.data)==null?void 0:p.pages)||[],s=((g=t.state.data)==null?void 0:g.pageParams)||[];let o={pages:[],pageParams:[]},c=0;const u=async()=>{let m=!1;const y=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},v=PD(t.options,t.fetchOptions),b=async(x,j,S)=>{if(m)return Promise.reject();if(j==null&&x.pages.length)return Promise.resolve(x);const A=(()=>{const P={client:t.client,queryKey:t.queryKey,pageParam:j,direction:S?"backward":"forward",meta:t.options.meta};return y(P),P})(),k=await v(A),{maxPages:E}=t.options,T=S?L9:D9;return{pages:T(x.pages,k,E),pageParams:T(x.pageParams,j,E)}};if(i&&a.length){const x=i==="backward",j=x?Q9:YE,S={pages:a,pageParams:s},_=j(r,S);o=await b(S,_,x)}else{const x=e??a.length;do{const j=c===0?s[0]??r.initialPageParam:YE(r,o);if(c>0&&j==null)break;o=await b(o,j),c++}while(c<x)}return o};t.options.persister?t.fetchFn=()=>{var m,y;return(y=(m=t.options).persister)==null?void 0:y.call(m,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function YE(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 Q9(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 St,Xa,Za,wc,Sc,Qa,jc,_c,qR,J9=(qR=class{constructor(e={}){Fe(this,St);Fe(this,Xa);Fe(this,Za);Fe(this,wc);Fe(this,Sc);Fe(this,Qa);Fe(this,jc);Fe(this,_c);Ae(this,St,e.queryCache||new K9),Ae(this,Xa,e.mutationCache||new Z9),Ae(this,Za,e.defaultOptions||{}),Ae(this,wc,new Map),Ae(this,Sc,new Map),Ae(this,Qa,0)}mount(){Wh(this,Qa)._++,z(this,Qa)===1&&(Ae(this,jc,TD.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,St).onFocus())})),Ae(this,_c,Ym.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,St).onOnline())})))}unmount(){var e,t;Wh(this,Qa)._--,z(this,Qa)===0&&((e=z(this,jc))==null||e.call(this),Ae(this,jc,void 0),(t=z(this,_c))==null||t.call(this),Ae(this,_c,void 0))}isFetching(e){return z(this,St).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return z(this,Xa).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=z(this,St).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=z(this,St).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(sw(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return z(this,St).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=z(this,St).get(r.queryHash),a=i==null?void 0:i.state.data,s=O9(t,a);if(s!==void 0)return z(this,St).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return xn.batch(()=>z(this,St).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=z(this,St).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=z(this,St);xn.batch(()=>
341{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=z(this,St);return xn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=xn.batch(()=>z(this,St).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Xr).catch(Xr)}invalidateQueries(e,t={}){return xn.batch(()=>(z(this,St).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=xn.batch(()=>z(this,St).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,n);return n.throwOnError||(a=a.catch(Xr)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(Xr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=z(this,St).build(this,t);return n.isStaleByTime(sw(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Xr).catch(Xr)}fetchInfiniteQuery(e){return e.behavior=KE(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Xr).catch(Xr)}ensureInfiniteQueryData(e){return e.behavior=KE(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ym.isOnline()?z(this,Xa).resumePausedMutations():Promise.resolve()}getQueryCache(){return z(this,St)}getMutationCache(){return z(this,Xa)}getDefaultOptions(){return z(this,Za)}setDefaultOptions(e){Ae(this,Za,e)}setQueryDefaults(e,t){z(this,wc).set(hf(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...z(this,wc).values()],n={};return t.forEach(r=>{pf(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){z(this,Sc).set(hf(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...z(this,Sc).values()],n={};return t.forEach(r=>{pf(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...z(this,Za).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Jj(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===e_&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...z(this,Za).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){z(this,St).clear(),z(this,Xa).clear()}},St=new WeakMap,Xa=new WeakMap,Za=new WeakMap,wc=new WeakMap,Sc=new WeakMap,Qa=new WeakMap,jc=new WeakMap,_c=new WeakMap,qR),eG=w.createContext(void 0),tG=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),l.jsx(eG.Provider,{value:e,children:t}));/**
342 * @remix-run/router v1.23.0
343 *
344 * Copyright (c) Remix Software Inc.
345 *
346 * This source code is licensed under the MIT license found in the
347 * LICENSE.md file in the root directory of this source tree.
348 *
349 * @license MIT
350 */function mf(){return mf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mf.apply(this,arguments)}var ts;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ts||(ts={}));const XE="popstate";function nG(e){e===void 0&&(e={});function t(r,i){let{pathname:a,search:s,hash:o}=r.location;return lw("",{pathname:a,search:s,hash:o},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Xm(i)}return iG(t,n,null,e)}function Ct(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function MD(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function rG(){return Math.random().toString(36).substr(2,8)}function ZE(e,t){return{usr:e.state,key:e.key,idx:t}}function lw(e,t,n,r){return n===void 0&&(n=null),mf({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Su(t):t,{state:n,key:t&&t.key||r||rG()})}function Xm(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 Su(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 iG(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:a=!1}=r,s=i.history,o=ts.Pop,c=null,u=f();u==null&&(u=0,s.replaceState(mf({},s.state,{idx:u}),""));function f(){return(s.state||{idx:null}).idx}function d(){o=ts.Pop;let y=f(),v=y==null?null:y-u;u=y,c&&c({action:o,location:m.location,delta:v})}function h(y,v){o=ts.Push;let b=lw(m.location,y,v);u=f()+1;let x=ZE(b,u),j=m.createHref(b);
vendor: 3,348 bytes, line 350
350try{s.pushState(x,"",j)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;i.location.assign(j)}a&&c&&c({action:o,location:m.location,delta:1})}function p(y,v){o=ts.Replace;let b=lw(m.location,y,v);u=f();let x=ZE(b,u),j=m.createHref(b);s.replaceState(x,"",j),a&&c&&c({action:o,location:m.location,delta:0})}function g(y){let v=i.location.origin!=="null"?i.location.origin:i.location.href,b=typeof y=="string"?y:Xm(y);return b=b.replace(/ $/,"%20"),Ct(v,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,v)}let m={get action(){return o},get location(){return e(i,s)},listen(y){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(XE,d),c=y,()=>{i.removeEventListener(XE,d),c=null}},createHref(y){return t(i,y)},createURL:g,encodeLocation(y){let v=g(y);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:h,replace:p,go(y){return s.go(y)}};return m}var QE;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(QE||(QE={}));function aG(e,t,n){return n===void 0&&(n="/"),sG(e,t,n,!1)}function sG(e,t,n,r){let i=typeof t=="string"?Su(t):t,a=t_(i.pathname||"/",n);if(a==null)return null;let s=$D(e);oG(s);let o=null;for(let c=0;o==null&&c<s.length;++c){let u=vG(a);o=gG(s[c],u,r)}return o}function $D(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(a,s,o)=>{let c={relativePath:o===void 0?a.path||"":o,caseSensitive:a.caseSensitive===!0,childrenIndex:s,route:a};c.relativePath.startsWith("/")&&(Ct(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=hs([r,c.relativePath]),f=n.concat(c);a.children&&a.children.length>0&&(Ct(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),$D(a.children,t,f,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:pG(u,a.index),routesMeta:f})};return e.forEach((a,s)=>{var o;if(a.path===""||!((o=a.path)!=null&&o.includes("?")))i(a,s);else for(let c of DD(a.path))i(a,s,c)}),t}function DD(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=DD(r.join("/")),o=[];return o.push(...s.map(c=>c===""?a:[a,c].join("/"))),i&&o.push(...s),o.map(c=>e.startsWith("/")&&c===""?"/":c)}function oG(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:mG(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const lG=/^:[\w-]+$/,cG=3,uG=2,dG=1,fG=10,hG=-2,JE=e=>e==="*";function pG(e,t){let n=e.split("/"),r=n.length;return n.some(JE)&&(r+=hG),t&&(r+=uG),n.filter(i=>!JE(i)).reduce((i,a)=>i+(lG.test(a)?cG:a===""?dG:fG),r)}function mG(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 gG(e,t,n){let{routesMeta:r}=e,i={},a="/",s=[];for(let o=0;o<r.length;++o){let c=r[o],u=o===r.length-1,f=a==="/"?t:t.slice(a.length)||"/",d=eC({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},f),h=c.route;if(!d&&u&&n&&!r[r.length-1].route.index&&(d=eC({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},f)),!d)return null;
vendor: 6,834 bytes, lines 350-359
350Object.assign(i,d.params),s.push({params:i,pathname:hs([a,d.pathname]),pathnameBase:SG(hs([a,d.pathnameBase])),route:h}),d.pathnameBase!=="/"&&(a=hs([a,d.pathnameBase]))}return s}function eC(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=yG(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],s=a.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:r.reduce((u,f,d)=>{let{paramName:h,isOptional:p}=f;if(h==="*"){let m=o[d]||"";s=a.slice(0,a.length-m.length).replace(/(.)\/+$/,"$1")}const g=o[d];return p&&!g?u[h]=void 0:u[h]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:s,pattern:e}}function yG(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),MD(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,o,c)=>(r.push({paramName:o,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function vG(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return MD(!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 t_(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)||"/"}function xG(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Su(e):e;return{pathname:n?n.startsWith("/")?n:bG(n,t):t,search:jG(r),hash:_G(i)}}function bG(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 Ux(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 <Link to="..."> and the router will parse it for you.'}function wG(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function n_(e,t){let n=wG(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function r_(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Su(e):(i=mf({},e),Ct(!i.pathname||!i.pathname.includes("?"),Ux("?","pathname","search",i)),Ct(!i.pathname||!i.pathname.includes("#"),Ux("#","pathname","hash",i)),Ct(!i.search||!i.search.includes("#"),Ux("#","search","hash",i)));let a=e===""||i.pathname==="",s=a?"/":i.pathname,o;if(s==null)o=n;else{let d=t.length-1;if(!r&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),d-=1;i.pathname=h.join("/")}o=d>=0?t[d]:"/"}let c=xG(i,o),u=s&&s!=="/"&&s.endsWith("/"),f=(a||s===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||f)&&(c.pathname+="/"),c}const hs=e=>e.join("/").replace(/\/\/+/g,"/"),SG=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),jG=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,_G=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function AG(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const LD=["post","put","patch","delete"];new Set(LD);const kG=["get",...LD];new Set(kG);/**
351 * React Router v6.30.1
352 *
353 * Copyright (c) Remix Software Inc.
354 *
355 * This source code is licensed under the MIT license found in the
356 * LICENSE.md file in the root directory of this source tree.
357 *
358 * @license MIT
359 */function gf(){return gf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gf.apply(this,arguments)}const i_=w.createContext(null),EG=w.createContext(null),Os=w.createContext(null),zy=w.createContext(null),Ns=w.createContext({outlet:null,matches:[],isDataRoute:!1}),FD=w.createContext(null);function CG(e,t){let{relative:n}=t===void 0?{}:t;ju()||Ct(!1);let{basename:r,navigator:i}=w.useContext(Os),{hash:a,pathname:s,search:o}=qD(e,{relative:n}),c=s;return r!=="/"&&(c=s==="/"?r:hs([r,s])),i.createHref({pathname:c,search:o,hash:a})}function ju(){return w.useContext(zy)!=null}function Is(){return ju()||Ct(!1),w.useContext(zy).location}function BD(e){w.useContext(Os).static||w.useLayoutEffect(e)}function UD(){let{isDataRoute:e}=w.useContext(Ns);return e?UG():PG()}function PG(){ju()||Ct(!1);let e=w.useContext(i_),{basename:t,future:n,navigator:r}=w.useContext(Os),{matches:i}=w.useContext(Ns),{pathname:a}=Is(),s=JSON.stringify(n_(i,n.v7_relativeSplatPath)),o=w.useRef(!1);return BD(()=>{o.current=!0}),w.useCallback(function(u,f){if(f===void 0&&(f={}),!o.current)return;if(typeof u=="number"){r.go(u);return}let d=r_(u,JSON.parse(s),a,f.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:hs([t,d.pathname])),(f.replace?r.replace:r.push)(d,f.state,f)},[t,r,s,a,e])}function qD(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=w.useContext(Os),{matches:i}=w.useContext(Ns),{pathname:a}=Is(),s=JSON.stringify(n_(i,r.v7_relativeSplatPath));return w.useMemo(()=>r_(e,JSON.parse(s),a,n==="path"),[e,s,a,n])}function TG(e,t){return OG(e,t)}function OG(e,t,n,r){ju()||Ct(!1);let{navigator:i}=w.useContext(Os),{matches:a}=w.useContext(Ns),s=a[a.length-1],o=s?s.params:{};s&&s.pathname;let c=s?s.pathnameBase:"/";s&&s.route;let u=Is(),f;if(t){var d;let y=typeof t=="string"?Su(t):t;c==="/"||(d=y.pathname)!=null&&d.startsWith(c)||Ct(!1),f=y}else f=u;let h=f.pathname||"/",p=h;if(c!=="/"){let y=c.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(y.length).join("/")}let g=aG(e,{pathname:p}),m=$G(g&&g.map(y=>Object.assign({},y,{params:Object.assign({},o,y.params),pathname:hs([c,i.encodeLocation?i.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?c:hs([c,i.encodeLocation?i.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),a,n,r);return t&&m?w.createElement(zy.Provider,{value:{location:gf({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:ts.Pop}},m):m}function NG(){let e=BG(),t=AG(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 w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application 
359Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},t),n?w.createElement("pre",{style:i},n):null,null)}const IG=w.createElement(NG,null);class RG extends w.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?w.createElement(Ns.Provider,{value:this.props.routeContext},w.createElement(FD.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function MG(e){let{routeContext:t,match:n,children:r}=e,i=w.useContext(i_);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),w.createElement(Ns.Provider,{value:t},r)}function $G(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,o=(i=n)==null?void 0:i.errors;if(o!=null){let f=s.findIndex(d=>d.route.id&&(o==null?void 0:o[d.route.id])!==void 0);f>=0||Ct(!1),s=s.slice(0,Math.min(s.length,f+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f<s.length;f++){let d=s[f];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=f),d.route.id){let{loaderData:h,errors:p}=n,g=d.route.loader&&h[d.route.id]===void 0&&(!p||p[d.route.id]===void 0);if(d.route.lazy||g){c=!0,u>=0?s=s.slice(0,u+1):s=[s[0]];break}}}return s.reduceRight((f,d,h)=>{let p,g=!1,m=null,y=null;n&&(p=o&&d.route.id?o[d.route.id]:void 0,m=d.route.errorElement||IG,c&&(u<0&&h===0?(g=!0,y=null):u===h&&(g=!0,y=d.route.hydrateFallbackElement||null)));let v=t.concat(s.slice(0,h+1)),b=()=>{let x;return p?x=m:g?x=y:d.route.Component?x=w.createElement(d.route.Component,null):d.route.element?x=d.route.element:x=f,w.createElement(MG,{match:d,routeContext:{outlet:f,matches:v,isDataRoute:n!=null},children:x})};return n&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?w.createElement(RG,{location:n.location,revalidation:n.revalidation,component:m,error:p,children:b(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):b()},null)}var zD=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(zD||{}),Zm=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}(Zm||{});function DG(e){let t=w.useContext(i_);return t||Ct(!1),t}function LG(e){let t=w.useContext(EG);return t||Ct(!1),t}function FG(e){let t=w.useContext(Ns);return t||Ct(!1),t}function VD(e){let t=FG(),n=t.matches[t.matches.length-1];return n.route.id||Ct(!1),n.route.id}function BG(){var e;let t=w.useContext(FD),n=LG(Zm.UseRouteError),r=VD(Zm.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function UG(){let{router:e}=DG(zD.UseNavigateStable),t=VD(Zm.UseNavigateStable),n=w.useRef(!1);return BD(()=>{n.current=!0}),w.useCallback(function(i,a){a===void 0&&(a={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,gf({fromRouteId:t},a)))},[e,t])}function qG(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function a_(e){let{to:t,replace:n,state:r,relative:i}=e;ju()||Ct(!1);let{future:a,static:s}=w.useContext(Os),{matches:o}=w.useContext(Ns),{pathname:c}=Is(),u=UD(),f=r_(t,n_(o,a.v7_relativeSplatPath),c,i==="path"),d=JSON.stringify(f);return w.useEffect(()=>u(JSON.parse(d),{replace:n,state:r,relative:i}),[u,d,i,n,r]),null}function oe(e){Ct(!1)}function zG(e){let{basename:t="/",children:n=null,location:r,navigationType:i=ts.Pop,navigator:a,static:s=!1,future:o}=e;ju()&&Ct(!1);let c=t.replace(/^\/*/,"/"),u=w.useMemo(()=>({basename:c,navigator:a,static:s,future:gf({v7_relativeSplatPath:!1},o)}),[c,o,a,s]);typeof r=="string"&&(r=Su(r));let{pathname:f="/",search:d="",hash:h="",state:p=null,key:g="default"}=r,m=w.useMemo(()=>{let y=t_(f,c);return y==null?null:{location:{pathname:y,search:d,hash:h,state:p,key:g},navigationType:i}},[c,f,d,h,p,g,i]);return m==null?null:w.createElement(Os.Provider,{value:u},w.createElement(zy.Provider,{children:n,value:m}))}function VG(e){let{children:t,location:n}=e;return TG(cw(t),n)}new Promise(()=>{});function cw(e,t){t===void 0&&(t=[]);let n=[];
359return w.Children.forEach(e,(r,i)=>{if(!w.isValidElement(r))return;let a=[...t,i];if(r.type===w.Fragment){n.push.apply(n,cw(r.props.children,a));return}r.type!==oe&&Ct(!1),!r.props.index||!r.props.children||Ct(!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=cw(r.props.children,a)),n.push(s)}),n}/**
360 * React Router DOM v6.30.1
361 *
362 * Copyright (c) Remix Software Inc.
363 *
364 * This source code is licensed under the MIT license found in the
365 * LICENSE.md file in the root directory of this source tree.
366 *
367 * @license MIT
368 */function uw(){return uw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uw.apply(this,arguments)}function WG(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function HG(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function GG(e,t){return e.button===0&&(!t||t==="_self")&&!HG(e)}const KG=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],YG="6";try{window.__reactRouterVersion=YG}catch{}const XG="startTransition",tC=LS[XG];function ZG(e){let{basename:t,children:n,future:r,window:i}=e,a=w.useRef();a.current==null&&(a.current=nG({window:i,v5Compat:!0}));let s=a.current,[o,c]=w.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},f=w.useCallback(d=>{u&&tC?tC(()=>c(d)):c(d)},[c,u]);return w.useLayoutEffect(()=>s.listen(f),[s,f]),w.useEffect(()=>qG(r),[r]),w.createElement(zG,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:s,future:r})}const QG=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",JG=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ge=w.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:a,replace:s,state:o,target:c,to:u,preventScrollReset:f,viewTransition:d}=t,h=WG(t,KG),{basename:p}=w.useContext(Os),g,m=!1;if(typeof u=="string"&&JG.test(u)&&(g=u,QG))try{let x=new URL(window.location.href),j=u.startsWith("//")?new URL(x.protocol+u):new URL(u),S=t_(j.pathname,p);j.origin===x.origin&&S!=null?u=S+j.search+j.hash:m=!0}catch{}let y=CG(u,{relative:i}),v=eK(u,{replace:s,state:o,target:c,preventScrollReset:f,relative:i,viewTransition:d});function b(x){r&&r(x),x.defaultPrevented||v(x)}return w.createElement("a",uw({},h,{href:g||y,onClick:m||a?r:b,ref:n,target:c}))});var nC;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(nC||(nC={}));var rC;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(rC||(rC={}));function eK(e,t){let{target:n,replace:r,state:i,preventScrollReset:a,relative:s,viewTransition:o}=t===void 0?{}:t,c=UD(),u=Is(),f=qD(e,{relative:s});return w.useCallback(d=>{if(GG(d,n)){d.preventDefault();let h=r!==void 0?r:Xm(u)===Xm(f);c(e,{replace:h,state:i,preventScrollReset:a,relative:s,viewTransition:o})}},[u,c,f,r,i,n,e,a,s,o])}var tK=typeof Element<"u",nK=typeof Map=="function",rK=typeof Set=="function",iK=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function lm(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!lm(e[r],t[r]))return!1;return!0}var a;if(nK&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(a=e.entries();!(r=a.next()).done;)if(!t.has(r.value[0]))return!1;for(a=e.entries();!(r=a.next()).done;)if(!lm(r.value[1],t.get(r.value[0])))return!1;return!0}if(rK&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(a=e.entries();!(r=a.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(iK&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(tK&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!lm(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var aK=function(t,n){try{return lm(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const sK=qe(aK);var oK=function(e,t,n,r,i,a,s,o){if(!e){var c;if(t===void 0)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,i,a,s,o],f=0;c=new Error(t.replace(/%s/g,function(){return u[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}},lK=oK;const iC=qe(lK);var cK=function(t,n,r,i){var a=r?r.call(i,t,n):void 0;if(a!==void 0)return!!a;if(t===n)return!0;
368if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;var s=Object.keys(t),o=Object.keys(n);if(s.length!==o.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(n),u=0;u<s.length;u++){var f=s[u];if(!c(f))return!1;var d=t[f],h=n[f];if(a=r?r.call(i,d,h,f):void 0,a===!1||a===void 0&&d!==h)return!1}return!0};const uK=qe(cK);var WD=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(WD||{}),qx={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},aC=Object.values(WD),Vy={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},HD=Object.entries(Vy).reduce((e,[t,n])=>(e[n]=t,e),{}),ai="data-rh",lc={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},cc=(e,t)=>{for(let n=e.length-1;n>=0;n-=1){const r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},dK=e=>{let t=cc(e,"title");const n=cc(e,lc.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,()=>t);const r=cc(e,lc.DEFAULT_TITLE);return t||r||void 0},fK=e=>cc(e,lc.ON_CHANGE_CLIENT_STATE)||(()=>{}),zx=(e,t)=>t.filter(n=>typeof n[e]<"u").map(n=>n[e]).reduce((n,r)=>({...n,...r}),{}),hK=(e,t)=>t.filter(n=>typeof n.base<"u").map(n=>n.base).reverse().reduce((n,r)=>{if(!n.length){const i=Object.keys(r);for(let a=0;a<i.length;a+=1){const o=i[a].toLowerCase();if(e.indexOf(o)!==-1&&r[o])return n.concat(r)}}return n},[]),pK=e=>console&&typeof console.warn=="function"&&console.warn(e),Qu=(e,t,n)=>{const r={};return n.filter(i=>Array.isArray(i[e])?!0:(typeof i[e]<"u"&&pK(`Helmet: ${e} should be of type "Array". Instead found type "${typeof i[e]}"`),!1)).map(i=>i[e]).reverse().reduce((i,a)=>{const s={};a.filter(c=>{let u;const f=Object.keys(c);for(let h=0;h<f.length;h+=1){const p=f[h],g=p.toLowerCase();t.indexOf(g)!==-1&&!(u==="rel"&&c[u].toLowerCase()==="canonical")&&!(g==="rel"&&c[g].toLowerCase()==="stylesheet")&&(u=g),t.indexOf(p)!==-1&&(p==="innerHTML"||p==="cssText"||p==="itemprop")&&(u=p)}if(!u||!c[u])return!1;const d=c[u].toLowerCase();return r[u]||(r[u]={}),s[u]||(s[u]={}),r[u][d]?!1:(s[u][d]=!0,!0)}).reverse().forEach(c=>i.push(c));const o=Object.keys(s);for(let c=0;c<o.length;c+=1){const u=o[c],f={...r[u],...s[u]};r[u]=f}return i},[]).reverse()},mK=(e,t)=>{if(Array.isArray(e)&&e.length){for(let n=0;n<e.length;n+=1)if(e[n][t])return!0}return!1},gK=e=>({baseTag:hK(["href"],e),bodyAttributes:zx("bodyAttributes",e),defer:cc(e,lc.DEFER),encode:cc(e,lc.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:zx("htmlAttributes",e),linkTags:Qu("link",["rel","href"],e),metaTags:Qu("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:Qu("noscript",["innerHTML"],e),onChangeClientState:fK(e),scriptTags:Qu("script",["src","innerHTML"],e),styleTags:Qu("style",["cssText"],e),title:dK(e),titleAttributes:zx("titleAttributes",e),prioritizeSeoTags:mK(e,lc.PRIORITIZE_SEO_TAGS)}),GD=e=>Array.isArray(e)?e.join(""):e,yK=(e,t)=>{const n=Object.keys(e);for(let r=0;r<n.length;r+=1)if(t[n[r]]&&t[n[r]].includes(e[n[r]]))return!0;return!1},Vx=(e,t)=>Array.isArray(e)?e.reduce((n,r)=>(yK(r,t)?n.priority.push(r):n.default.push(r),n),{priority:[],default:[]}):{default:e,priority:[]},sC=(e,t)=>({...e,[t]:void 0}),vK=["noscript","script","style"],dw=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"),KD=e=>Object.keys(e).reduce((t,n)=>{const r=typeof e[n]<"u"?`${n}="${e[n]}"`:`${n}`;return t?`${t} ${r}`:r},""),xK=(e,t,n,r)=>{const i=KD(n),a=GD(t);return i?`<${e} ${ai}="true" ${i}>${dw(a,r)}</${e}>`:`<${e} ${ai}="true">${dw(a,r)}</${e}>`},bK=(e,t,n=!0)=>t.reduce((r,i)=>{const a=i,s=Object.keys(a).filter(u=>!(u==="innerHTML"||u==="cssText")).reduce((u,f)=>{const d=typeof a[f]>"u"?f:`${f}="${dw(a[f],n)}"`;return u?`${u} ${d}`:d},""),o=a.innerHTML||a.cssText||"",c=vK.indexOf(e)===-1;return`${r}<${e} ${ai}="true" ${s}${c?"/>":`>${o}</${e}>`}`},""),YD=(e,t={})=>Object.keys(e).reduce((n,r)=>{const i=Vy[r];return n[i||r]=e[r],n},t),wK=(e,t,n)=>{const r={key:t,[ai]:!0},i=YD(n,r);return[C.createElement("title",i,t)]},cm=(e,t)=>t.map((n,r)=>{const i={key:r,[ai]:!0};
368return Object.keys(n).forEach(a=>{const o=Vy[a]||a;if(o==="innerHTML"||o==="cssText"){const c=n.innerHTML||n.cssText;i.dangerouslySetInnerHTML={__html:c}}else i[o]=n[a]}),C.createElement(e,i)}),gr=(e,t,n=!0)=>{switch(e){case"title":return{toComponent:()=>wK(e,t.title,t.titleAttributes),toString:()=>xK(e,t.title,t.titleAttributes,n)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>YD(t),toString:()=>KD(t)};default:return{toComponent:()=>cm(e,t),toString:()=>bK(e,t,n)}}},SK=({metaTags:e,linkTags:t,scriptTags:n,encode:r})=>{const i=Vx(e,qx.meta),a=Vx(t,qx.link),s=Vx(n,qx.script);return{priorityMethods:{toComponent:()=>[...cm("meta",i.priority),...cm("link",a.priority),...cm("script",s.priority)],toString:()=>`${gr("meta",i.priority,r)} ${gr("link",a.priority,r)} ${gr("script",s.priority,r)}`},metaTags:i.default,linkTags:a.default,scriptTags:s.default}},jK=e=>{const{baseTag:t,bodyAttributes:n,encode:r=!0,htmlAttributes:i,noscriptTags:a,styleTags:s,title:o="",titleAttributes:c,prioritizeSeoTags:u}=e;let{linkTags:f,metaTags:d,scriptTags:h}=e,p={toComponent:()=>[],toString:()=>""};return u&&({priorityMethods:p,linkTags:f,metaTags:d,scriptTags:h}=SK(e)),{priority:p,base:gr("base",t,r),bodyAttributes:gr("bodyAttributes",n,r),htmlAttributes:gr("htmlAttributes",i,r),link:gr("link",f,r),meta:gr("meta",d,r),noscript:gr("noscript",a,r),script:gr("script",h,r),style:gr("style",s,r),title:gr("title",{title:o,titleAttributes:c},r)}},fw=jK,mp=[],s_=!!(typeof window<"u"&&window.document&&window.document.createElement),hw=class{constructor(e,t){qi(this,"instances",[]);qi(this,"canUseDOM",s_);qi(this,"context");qi(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?mp:this.instances,add:e=>{(this.canUseDOM?mp:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?mp:this.instances).indexOf(e);(this.canUseDOM?mp:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=fw({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},_K=parseInt(C.version.split(".")[0],10),pw=_K>=19,AK={},XD=C.createContext(AK),Oo,ZD=(Oo=class extends w.Component{constructor(n){super(n);qi(this,"helmetData");pw?this.helmetData=null:this.helmetData=new hw(this.props.context||{},Oo.canUseDOM)}render(){return pw?C.createElement(C.Fragment,null,this.props.children):C.createElement(XD.Provider,{value:this.helmetData.value},this.props.children)}},qi(Oo,"canUseDOM",s_),Oo),pl=(e,t)=>{const n=document.head||document.querySelector("head"),r=n.querySelectorAll(`${e}[${ai}]`),i=[].slice.call(r),a=[];let s;return t&&t.length&&t.forEach(o=>{const c=document.createElement(e);for(const u in o)if(Object.prototype.hasOwnProperty.call(o,u))if(u==="innerHTML")c.innerHTML=o.innerHTML;else if(u==="cssText"){const f=o.cssText;c.appendChild(document.createTextNode(f))}else{const f=u,d=typeof o[f]>"u"?"":o[f];c.setAttribute(u,d)}c.setAttribute(ai,"true"),i.some((u,f)=>(s=f,c.isEqualNode(u)))?i.splice(s,1):a.push(c)}
368),i.forEach(o=>{var c;return(c=o.parentNode)==null?void 0:c.removeChild(o)}),a.forEach(o=>n.appendChild(o)),{oldTags:i,newTags:a}},mw=(e,t)=>{const n=document.getElementsByTagName(e)[0];if(!n)return;const r=n.getAttribute(ai),i=r?r.split(","):[],a=[...i],s=Object.keys(t);for(const o of s){const c=t[o]||"";n.getAttribute(o)!==c&&n.setAttribute(o,c),i.indexOf(o)===-1&&i.push(o);const u=a.indexOf(o);u!==-1&&a.splice(u,1)}for(let o=a.length-1;o>=0;o-=1)n.removeAttribute(a[o]);i.length===a.length?n.removeAttribute(ai):n.getAttribute(ai)!==s.join(",")&&n.setAttribute(ai,s.join(","))},kK=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=GD(e)),mw("title",t)},oC=(e,t)=>{const{baseTag:n,bodyAttributes:r,htmlAttributes:i,linkTags:a,metaTags:s,noscriptTags:o,onChangeClientState:c,scriptTags:u,styleTags:f,title:d,titleAttributes:h}=e;mw("body",r),mw("html",i),kK(d,h);const p={baseTag:pl("base",n),linkTags:pl("link",a),metaTags:pl("meta",s),noscriptTags:pl("noscript",o),scriptTags:pl("script",u),styleTags:pl("style",f)},g={},m={};Object.keys(p).forEach(y=>{const{newTags:v,oldTags:b}=p[y];v.length&&(g[y]=v),b.length&&(m[y]=p[y].oldTags)}),t&&t(),c(e,g,m)},Ju=null,EK=e=>{Ju&&cancelAnimationFrame(Ju),e.defer?Ju=requestAnimationFrame(()=>{oC(e,()=>{Ju=null})}):(oC(e),Ju=null)},CK=EK,lC=class extends w.Component{constructor(){super(...arguments);qi(this,"rendered",!1)}shouldComponentUpdate(t){return!uK(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:n}=this.props.context;let r=null;const i=gK(t.get().map(a=>{const{context:s,...o}=a.props;return o}));ZD.canUseDOM?CK(i):fw&&(r=fw(i)),n(r)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},um=[],cC=e=>{const t={};for(const n of Object.keys(e))t[HD[n]||n]=e[n];return t},Gs=e=>{const t={};for(const n of Object.keys(e)){const r=Vy[n];t[r||n]=e[n]}return t},uC=(e,t)=>{if(!s_)return;const n=document.getElementsByTagName(e)[0];if(!n)return;const r="data-rh-managed",i=n.getAttribute(r),a=i?i.split(","):[],s=Object.keys(t);for(const o of a)s.includes(o)||n.removeAttribute(o);for(const o of s){const c=t[o];c==null||c===!1?n.removeAttribute(o):c===!0?n.setAttribute(o,""):n.setAttribute(o,String(c))}s.length>0?n.setAttribute(r,s.join(",")):n.removeAttribute(r)},Wx=()=>{const e={},t={};for(const n of um){const{htmlAttributes:r,bodyAttributes:i}=n.props;r&&Object.assign(e,cC(r)),i&&Object.assign(t,cC(i))}uC("html",e),uC("body",t)},PK=class extends w.Component{componentDidMount(){um.push(this),Wx()}componentDidUpdate(){Wx()}componentWillUnmount(){const e=um.indexOf(this);e!==-1&&um.splice(e,1),Wx()}resolveTitle(){const{title:e,titleTemplate:t,defaultTitle:n}=this.props;return e&&t?t.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||n||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const t=this.props.titleAttributes||{};return C.createElement("title",Gs(t),e)}renderBase(){const{base:e}=this.props;return e?C.createElement("base",Gs(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>C.createElement("meta",{key:n,...Gs(t)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>C.createElement("link",{key:n,...Gs(t)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>{const{innerHTML:r,...i}=t,a=Gs(i);return r&&(a.dangerouslySetInnerHTML={__html:r}),C.createElement("script",{key:n,...a})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>{const{cssText:r,...i}=t,a=Gs(i);return r&&(a.dangerouslySetInnerHTML={__html:r}),C.createElement("style",{key:n,...a})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,n)=>{const{innerHTML:r,...i}=t,a=Gs(i);return r&&(a.dangerouslySetInnerHTML={__html:r}),C.createElement("noscript",{key:n,...a})})}render(){return C.createElement(C.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},n0,QD=(n0=class extends w.Component{shouldComponentUpdate(e){return!sK(sC(this.props,"helmetData"),sC(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,n,r){return{...t,[e.type]:[...t[e.type]||[],{...n,...this.mapNestedChildrenToProps(e,r)}]}}mapObjectTypeChildren(e,t,n,r){switch(e.type){case"title":return{...t,[e.type]:r,titleAttributes:{...n}};case"body":return{...t,bodyAttributes:{...n}};case"html":return{...t,htmlAttributes:{...n}};default:return{...t,[e.type]:{...n}}}}mapArrayTypeChildrenToProps(e,t){let n={...t};return Object.keys(e).forEach(r=>{n={...n,[r]:e[r]}}),n}
368warnOnInvalidChildren(e,t){return iC(aC.some(n=>e.type===n),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${aC.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),iC(!t||typeof t=="string"||Array.isArray(t)&&!t.some(n=>typeof n!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let n={};return C.Children.forEach(e,r=>{if(!r||!r.props)return;const{children:i,...a}=r.props,s=Object.keys(a).reduce((c,u)=>(c[HD[u]||u]=a[u],c),{});let{type:o}=r;switch(typeof o=="symbol"?o=o.toString():this.warnOnInvalidChildren(r,i),o){case"Symbol(react.fragment)":t=this.mapChildrenToProps(i,t);break;case"link":case"meta":case"noscript":case"script":case"style":n=this.flattenArrayTypeChildren(r,n,s,i);break;default:t=this.mapObjectTypeChildren(r,t,s,i);break}}),this.mapArrayTypeChildrenToProps(n,t)}render(){const{children:e,...t}=this.props;let n={...t},{helmetData:r}=t;if(e&&(n=this.mapChildrenToProps(e,n)),r&&!(r instanceof hw)){const i=r;r=new hw(i.context,!0),delete n.helmetData}return pw?C.createElement(PK,{...n}):r?C.createElement(lC,{...n,context:r.value}):C.createElement(XD.Consumer,null,i=>C.createElement(lC,{...n,context:i}))}},qi(n0,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),n0);const o_=w.createContext({});function l_(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const JD=typeof window<"u",eL=JD?w.useLayoutEffect:w.useEffect,Wy=w.createContext(null);function c_(e,t){e.indexOf(t)===-1&&e.push(t)}function u_(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const $i=(e,t,n)=>n>t?t:n<e?e:n;let Hy=()=>{},Mc=()=>{};const ha={},tL=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function nL(e){return typeof e=="object"&&e!==null}const rL=e=>/^0[^.\s]+$/u.test(e);function d_(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ar=e=>e,TK=(e,t)=>n=>t(e(n)),Ch=(...e)=>e.reduce(TK),yf=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class f_{constructor(){this.subscriptions=[]}add(t){return c_(this.subscriptions,t),()=>u_(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let a=0;a<i;a++){const s=this.subscriptions[a];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ti=e=>e*1e3,Sr=e=>e/1e3;function iL(e,t){return t?e*(1e3/t):0}const aL=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,OK=1e-7,NK=12;function IK(e,t,n,r,i){let a,s,o=0;do s=t+(n-t)/2,a=aL(s,r,i)-e,a>0?n=s:t=s;while(Math.abs(a)>OK&&++o<NK);return s}function Ph(e,t,n,r){if(e===t&&n===r)return Ar;const i=a=>IK(a,0,1,e,n);return a=>a===0||a===1?a:aL(i(a),t,r)}const sL=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,oL=e=>t=>1-e(1-t),lL=Ph(.33,1.53,.69,.99),h_=oL(lL),cL=sL(h_),uL=e=>(e*=2)<1?.5*h_(e):.5*(2-Math.pow(2,-10*(e-1))),p_=e=>1-Math.sin(Math.acos(e)),dL=oL(p_),fL=sL(p_),RK=Ph(.42,0,1,1),MK=Ph(0,0,.58,1),hL=Ph(.42,0,.58,1),$K=e=>Array.isArray(e)&&typeof e[0]!="number",pL=e=>Array.isArray(e)&&typeof e[0]=="number",dC={linear:Ar,easeIn:RK,easeInOut:hL,easeOut:MK,circIn:p_,circInOut:fL,circOut:dL,backIn:h_,backInOut:cL,backOut:lL,anticipate:uL},DK=e=>typeof e=="string",fC=e=>{if(pL(e)){Mc(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,i]=e;return Ph(t,n,r,i)}else if(DK(e))return Mc(dC[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),dC[e];return e},gp=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],hC={value:null,addProjectionMetrics:null};function LK(e,t){let n=new Set,r=new Set,i=!1,a=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1},c=0;function u(d){s.has(d)&&(f.schedule(d),e()),c++,d(o)}const f={schedule:(d,h=!1,p=!1)=>{const m=p&&i?n:r;return h&&s.add(d),m.has(d)||m.add(d),d},cancel:d=>
vendor: 21,293 bytes, line 368
368{r.delete(d),s.delete(d)},process:d=>{if(o=d,i){a=!0;return}i=!0,[n,r]=[r,n],n.forEach(u),t&&hC.value&&hC.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,f.process(d))}};return f}const FK=40;function mL(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,s=gp.reduce((x,j)=>(x[j]=LK(a,t?j:void 0),x),{}),{setup:o,read:c,resolveKeyframes:u,preUpdate:f,update:d,preRender:h,render:p,postRender:g}=s,m=()=>{const x=ha.useManualTiming?i.timestamp:performance.now();n=!1,ha.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(x-i.timestamp,FK),1)),i.timestamp=x,i.isProcessing=!0,o.process(i),c.process(i),u.process(i),f.process(i),d.process(i),h.process(i),p.process(i),g.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(m))},y=()=>{n=!0,r=!0,i.isProcessing||e(m)};return{schedule:gp.reduce((x,j)=>{const S=s[j];return x[j]=(_,A=!1,k=!1)=>(n||y(),S.schedule(_,A,k)),x},{}),cancel:x=>{for(let j=0;j<gp.length;j++)s[gp[j]].cancel(x)},state:i,steps:s}}const{schedule:at,cancel:Ss,state:tn,steps:Hx}=mL(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ar,!0);let dm;function BK(){dm=void 0}const bn={now:()=>(dm===void 0&&bn.set(tn.isProcessing||ha.useManualTiming?tn.timestamp:performance.now()),dm),set:e=>{dm=e,queueMicrotask(BK)}},gL=e=>t=>typeof t=="string"&&t.startsWith(e),yL=gL("--"),UK=gL("var(--"),m_=e=>UK(e)?qK.test(e.split("/*")[0].trim()):!1,qK=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function pC(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const _u={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},vf={..._u,transform:e=>$i(0,1,e)},yp={..._u,default:1},Md=e=>Math.round(e*1e5)/1e5,g_=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function zK(e){return e==null}const VK=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,y_=(e,t)=>n=>!!(typeof n=="string"&&VK.test(n)&&n.startsWith(e)||t&&!zK(n)&&Object.prototype.hasOwnProperty.call(n,t)),vL=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,a,s,o]=r.match(g_);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(s),alpha:o!==void 0?parseFloat(o):1}},WK=e=>$i(0,255,e),Gx={..._u,transform:e=>Math.round(WK(e))},go={test:y_("rgb","red"),parse:vL("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Gx.transform(e)+", "+Gx.transform(t)+", "+Gx.transform(n)+", "+Md(vf.transform(r))+")"};function HK(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const gw={test:y_("#"),parse:HK,transform:go.transform},Th=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),$a=Th("deg"),Oi=Th("%"),ae=Th("px"),GK=Th("vh"),KK=Th("vw"),mC={...Oi,parse:e=>Oi.parse(e)/100,transform:e=>Oi.transform(e*100)},Vl={test:y_("hsl","hue"),parse:vL("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Oi.transform(Md(t))+", "+Oi.transform(Md(n))+", "+Md(vf.transform(r))+")"},Nt={test:e=>go.test(e)||gw.test(e)||Vl.test(e),parse:e=>go.test(e)?go.parse(e):Vl.test(e)?Vl.parse(e):gw.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?go.transform(e):Vl.transform(e),getAnimatableNone:e=>{const t=Nt.parse(e);return t.alpha=0,Nt.transform(t)}},YK=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function XK(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(g_))==null?void 0:t.length)||0)+(((n=e.match(YK))==null?void 0:n.length)||0)>0}const xL="number",bL="color",ZK="var",QK="var(",gC="${}",JK=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function xf(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const o=t.replace(JK,c=>(Nt.test(c)?(r.color.push(a),i.push(bL),n.push(Nt.parse(c))):c.startsWith(QK)?(r.var.push(a),i.push(ZK),n.push(c)):(r.number.push(a),i.push(xL),n.push(parseFloat(c))),++a,gC)).split(gC);return{values:n,split:o,indexes:r,types:i}}function wL(e){return xf(e).values}function SL(e){const{split:t,types:n}=xf(e),r=t.length;return i=>{let a="";for(let s=0;s<r;s++)if(a+=t[s],i[s]!==void 0){const o=n[s];o===xL?a+=Md(i[s]):o===bL?a+=Nt.transform(i[s]):a+=i[s]}return a}}const e7=e=>typeof e=="number"?0:Nt.test(e)?Nt.getAnimatableNone(e):e;function t7(e){const t=wL(e);return SL(e)(t.map(e7))}const js={test:XK,parse:wL,createTransformer:SL,getAnimatableNone:t7};function Kx(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function n7({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,s=0;if(!t)i=a=s=n;else{const o=n<.5?n*(1+t):n+t-n*t,c=2*n-o;i=Kx(c,o,e+1/3),a=Kx(c,o,e),s=Kx(c,o,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(s*255),alpha:r}}function Qm(e,t){return n=>n>0?t:e}const vt=(e,t,n)=>e+(t-e)*n,Yx=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},r7=[gw,go,Vl],i7=e=>r7.find(t=>t.test(e));function yC(e){const t=i7(e);if(Hy(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===Vl&&(n=n7(n)),n}const vC=(e,t)=>{const n=yC(e),r=yC(t);if(!n||!r)return Qm(e,t);const i={...n};return a=>(i.red=Yx(n.red,r.red,a),i.green=Yx(n.green,r.green,a),i.blue=Yx(n.blue,r.blue,a),i.alpha=vt(n.alpha,r.alpha,a),go.transform(i))},yw=new Set(["none","hidden"]);function a7(e,t){return yw.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function s7(e,t){return n=>vt(e,t,n)}function v_(e){return typeof e=="number"?s7:typeof e=="string"?m_(e)?Qm:Nt.test(e)?vC:c7:Array.isArray(e)?jL:typeof e=="object"?Nt.test(e)?vC:o7:Qm}function jL(e,t){const n=[...e],r=n.length,i=e.map((a,s)=>v_(a)(a,t[s]));return a=>{for(let s=0;s<r;s++)n[s]=i[s](a);return n}}function o7(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=v_(e[i])(e[i],t[i]));return i=>{for(const a in r)n[a]=r[a](i);return n}}function l7(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],s=e.indexes[a][r[a]],o=e.values[s]??0;n[i]=o,r[a]++}return n}const c7=(e,t)=>{const n=js.createTransformer(t),r=xf(e),i=xf(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?yw.has(e)&&!i.values.length||yw.has(t)&&!r.values.length?a7(e,t):Ch(jL(l7(r,i),i.values),n):(Hy(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Qm(e,t))};function _L(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?vt(e,t,n):v_(e)(e,t)}const u7=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>at.update(t,n),stop:()=>Ss(t),now:()=>tn.isProcessing?tn.timestamp:bn.now()}},AL=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let a=0;a<i;a++)r+=Math.round(e(a/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Jm=2e4;function x_(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Jm;)t+=n,r=e.next(t);return t>=Jm?1/0:t}function d7(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(x_(r),Jm);return{type:"keyframes",ease:a=>r.next(i*a).value/t,duration:Sr(i)}}const f7=5;function kL(e,t,n){const r=Math.max(t-f7,0);return iL(n-e(r),t-r)}const gt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Xx=.001;function h7({duration:e=gt.duration,bounce:t=gt.bounce,velocity:n=gt.velocity,mass:r=gt.mass}){let i,a;Hy(e<=Ti(gt.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=$i(gt.minDamping,gt.maxDamping,s),e=$i(gt.minDuration,gt.maxDuration,Sr(e)),s<1?(i=u=>{const f=u*s,d=f*e,h=f-n,p=vw(u,s),g=Math.exp(-d);return Xx-h/p*g},a=u=>{const d=u*s*e,h=d*n+n,p=Math.pow(s,2)*Math.pow(u,2)*e,g=Math.exp(-d),m=vw(Math.pow(u,2),s);return(-i(u)+Xx>0?-1:1)*((h-p)*g)/m}):(i=u=>{const f=Math.exp(-u*e),d=(u-n)*e+1;return-Xx+f*d},a=u=>{const f=Math.exp(-u*e),d=(n-u)*(e*e);return f*d});const o=5/e,c=m7(i,a,o);if(e=Ti(e),isNaN(c))return{stiffness:gt.stiffness,damping:gt.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const p7=12;function m7(e,t,n){let r=n;for(let i=1;i<p7;i++)r=r-e(r)/t(r);return r}function vw(e,t){return e*Math.sqrt(1-t*t)}const g7=["duration","bounce"],y7=["stiffness","damping","mass"];function xC(e,t){return t.some(n=>e[n]!==void 0)}function v7(e){let t={velocity:gt.velocity,stiffness:gt.stiffness,damping:gt.damping,mass:gt.mass,isResolvedFromDuration:!1,...e};if(!xC(e,y7)&&xC(e,g7))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*$i(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:gt.mass,stiffness:i,damping:a}}else{const n=h7(e);t={...t,...n,mass:gt.mass},t.isResolvedFromDuration=!0}return t}function eg(e=gt.visualDuration,t=gt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const a=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],o={done:!1,value:a},{stiffness:c,damping:u,mass:f,duration:d,velocity:h,isResolvedFromDuration:p}=v7({...n,velocity:-Sr(n.velocity||0)}),g=h||0,m=u/(2*Math.sqrt(c*f)),y=s-a,v=Sr(Math.sqrt(c/f)),b=Math.abs(y)<5;r||(r=b?gt.restSpeed.granular:gt.restSpeed.default),i||(i=b?gt.restDelta.granular:gt.restDelta.default);let x;if(m<1){const S=vw(v,m);x=_=>{const A=Math.exp(-m*v*_);return s-A*((g+m*v*y)/S*Math.sin(S*_)+y*Math.cos(S*_))}}else if(m===1)x=S=>s-Math.exp(-v*S)*(y+(g+v*y)*S);else{const S=v*Math.sqrt(m*m-1);x=_=>{const A=Math.exp(-m*v*_),k=Math.min(S*_,300);return s-A*((g+m*v*y)*Math.sinh(k)+S*y*Math.cosh(k))/S}}const j={calculatedDuration:p&&d||null,next:S=>{const _=x(S);if(p)o.done=S>=d;else{let A=S===0?g:0;m<1&&(A=S===0?Ti(g):kL(x,S,_));const k=Math.abs(A)<=r,E=Math.abs(s-_)<=i;o.done=k&&E}return o.value=o.done?s:_,o},toString:()=>{const S=Math.min(x_(j),Jm),_=AL(A=>j.next(S*A).value,S,30);return S+"ms "+_},toTransition:()=>{}};return j}eg.applyToOptions=e=>{const t=d7(e,100,eg);return e.ease=t.ease,e.duration=Ti(t.duration),e.type="keyframes",e};function xw({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:s,min:o,max:c,restDelta:u=.5,restSpeed:f}){const d=e[0],h={done:!1,value:d},p=k=>o!==void 0&&k<o||c!==void 0&&k>c,g=k=>o===void 0?c:c===void 0||Math.abs(o-k)<Math.abs(c-k)?o:c;let m=n*t;const y=d+m,v=s===void 0?y:s(y);v!==y&&(m=v-d);const b=k=>-m*Math.exp(-k/r),x=k=>v+b(k),j=k=>{const E=b(k),T=x(k);h.done=Math.abs(E)<=u,h.value=h.done?v:T};let S,_;const A=k=>{p(h.value)&&(S=k,_=eg({keyframes:[h.value,g(h.value)],velocity:kL(x,k,h.value),damping:i,stiffness:a,restDelta:u,restSpeed:f}))};return A(0),{calculatedDuration:null,next:k=>{let E=!1;return!_&&S===void 0&&(E=!0,j(k),A(k)),S!==void 0&&k>=S?_.next(k-S):(!E&&j(k),h)}}}function x7(e,t,n){const r=[],i=n||ha.mix||_L,a=e.length-1;for(let s=0;s<a;s++){let o=i(e[s],e[s+1]);if(t){const c=Array.isArray(t)?t[s]||Ar:t;o=Ch(c,o)}r.push(o)}return r}function b7(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;if(Mc(a===t.length,"Both input and output ranges must be the same length","range-length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=x7(t,r,i),c=o.length,u=f=>{if(s&&f<e[0])return t[0];let d=0;if(c>1)for(;d<e.length-2&&!(f<e[d+1]);d++);const h=yf(e[d],e[d+1],f);return o[d](h)};return n?f=>u($i(e[0],e[a-1],f)):u}function w7(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=yf(0,t,r);e.push(vt(n,1,i))}}function S7(e){const t=[0];return w7(t,e.length-1),t}function j7(e,t){return e.map(n=>n*t)}function _7(e,t){return e.map(()=>t||hL).splice(0,e.length-1)}function $d({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=$K(r)?r.map(fC):fC(r),a={done:!1,value:t[0]},s=j7(n&&n.length===t.length?n:S7(t),e),o=b7(s,t,{ease:Array.isArray(i)?i:_7(t,i)});return{calculatedDuration:e,next:c=>(a.value=o(c),a.done=c>=e,a)}}const A7=e=>e!==null;function b_(e,{repeat:t,repeatType:n="loop"},r,i=1){const a=e.filter(A7),o=i<0||t&&n!=="loop"&&t%2===1?0:a.length-1;return!o||r===void 0?a[o]:r}const k7={decay:xw,inertia:xw,tween:$d,keyframes:$d,spring:eg};function EL(e){typeof e.type=="string"&&(e.type=k7[e.type])}class w_{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const E7=e=>e/100;class S_ extends w_{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,i;const{motionValue:n}=this.options;n&&n.updatedAt!==bn.now()&&this.tick(bn.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;EL(t);const{type:n=$d,repeat:r=0,repeatDelay:i=0,repeatType:a,velocity:s=0}=t;let{keyframes:o}=t;const c=n||$d;c!==$d&&typeof o[0]!="number"&&(this.mixKeyframes=Ch(E7,_L(o[0],o[1])),o=[0,100]);const u=c({...t,keyframes:o});a==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...o].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=x_(u));const{calculatedDuration:f}=u;this.calculatedDuration=f,this.resolvedDuration=f+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:a,mirroredGenerator:s,resolvedDuration:o,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:f,repeat:d,repeatType:h,repeatDelay:p,type:g,onUpdate:m,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),b=this.playbackSpeed>=0?v<0:v>i;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let x=this.currentTime,j=r;if(d){const k=Math.min(this.currentTime,i)/o;let E=Math.floor(k),T=k%1;!T&&k>=1&&(T=1),T===1&&E--,E=Math.min(E,d+1),!!(E%2)&&(h==="reverse"?(T=1-T,p&&(T-=p/o)):h==="mirror"&&(j=s)),x=$i(0,1,T)*o}const S=b?{done:!1,value:f[0]}:j.next(x);a&&(S.value=a(S.value));let{done:_}=S;!b&&c!==null&&(_=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&_);return A&&g!==xw&&(S.value=b_(f,this.options,y,this.speed)),m&&m(S.value),A&&this.finish(),S}then(t,n){return this.finished.then(t,n)}get duration(){return Sr(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Sr(t)}get time(){return Sr(this.currentTime)}set time(t){var n;t=Ti(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(bn.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Sr(this.currentTime))}play(){var i,a;if(this.isStopped)return;const{driver:t=u7,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),(a=(i=this.options).onPlay)==null||a.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(bn.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function C7(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const yo=e=>e*180/Math.PI,bw=e=>{const t=yo(Math.atan2(e[1],e[0]));return ww(t)},P7={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:bw,rotateZ:bw,skewX:e=>yo(Math.atan(e[1])),skewY:e=>yo(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ww=e=>(e=e%360,e<0&&(e+=360),e),bC=bw,wC=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),SC=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),T7={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:wC,scaleY:SC,scale:e=>(wC(e)+SC(e))/2,rotateX:e=>ww(yo(Math.atan2(e[6],e[5]))),rotateY:e=>ww(yo(Math.atan2(-e[2],e[0]))),rotateZ:bC,rotate:bC,skewX:e=>yo(Math.atan(e[4])),skewY:e=>yo(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Sw(e){return e.includes("scale")?1:0}function jw(e,t){if(!e||e==="none")return Sw(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=T7,i=n;else{const o=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=P7,i=o}if(!i)return Sw(t);const a=r[t],s=i[1].split(",").map(N7);return typeof a=="function"?a(s):s[a]}const O7=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return jw(n,t)};function N7(e){return parseFloat(e.trim())}const Au=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ku=new Set(Au),jC=e=>e===_u||e===ae,I7=new Set(["x","y","z"]),R7=Au.filter(e=>!I7.has(e));function M7(e){const t=[];return R7.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ns={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>jw(t,"x"),y:(e,{transform:t})=>jw(t,"y")};ns.translateX=ns.x;ns.translateY=ns.y;const Mo=new Set;let _w=!1,Aw=!1,kw=!1;function CL(){if(Aw){const e=Array.from(Mo).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=M7(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([a,s])=>{var o;(o=r.getValue(a))==null||o.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Aw=!1,_w=!1,Mo.forEach(e=>e.complete(kw)),Mo.clear()}function PL(){Mo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Aw=!0)})}function $7(){kw=!0,PL(),CL(),kw=!1}class j_{constructor(t,n,r,i,a,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=a,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Mo.add(this),_w||(_w=!0,at.read(PL),at.resolveKeyframes(CL))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const a=i==null?void 0:i.get(),s=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const o=r.readValue(n,s);o!=null&&(t[0]=o)}t[0]===void 0&&(t[0]=s),i&&a===void 0&&i.set(t[0])}C7(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Mo.delete(this)}cancel(){this.state==="scheduled"&&(Mo.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const D7=e=>e.startsWith("--");
368function L7(e,t,n){D7(t)?e.style.setProperty(t,n):e.style[t]=n}const F7=d_(()=>window.ScrollTimeline!==void 0),B7={};function U7(e,t){const n=d_(e);return()=>B7[t]??n()}const TL=U7(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),vd=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,_C={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:vd([0,.65,.55,1]),circOut:vd([.55,0,1,.45]),backIn:vd([.31,.01,.66,-.59]),backOut:vd([.33,1.53,.69,.99])};function OL(e,t){if(e)return typeof e=="function"?TL()?AL(e,t):"ease-out":pL(e)?vd(e):Array.isArray(e)?e.map(n=>OL(n,t)||_C.easeOut):_C[e]}function q7(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:s="loop",ease:o="easeOut",times:c}={},u=void 0){const f={[t]:n};c&&(f.offset=c);const d=OL(o,i);Array.isArray(d)&&(f.easing=d);const h={delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:s==="reverse"?"alternate":"normal"};return u&&(h.pseudoElement=u),e.animate(f,h)}function NL(e){return typeof e=="function"&&"applyToOptions"in e}function z7({type:e,...t}){return NL(e)&&TL()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class V7 extends w_{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:a,allowFlatten:s=!1,finalKeyframe:o,onComplete:c}=t;this.isPseudoElement=!!a,this.allowFlatten=s,this.options=t,Mc(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=z7(t);this.animation=q7(n,r,i,u,a),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const f=b_(i,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(f):L7(n,r,f),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,r,i;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((i=(r=this.animation).commitStyles)==null||i.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return Sr(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Sr(t)}get time(){return Sr(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ti(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&F7()?(this.animation.timeline=t,Ar):n(this)}}const IL={anticipate:uL,backInOut:cL,circInOut:fL};function W7(e){return e in IL}function H7(e){typeof e.ease=="string"&&W7(e.ease)&&(e.ease=IL[e.ease])}const Zx=10;class G7 extends V7{constructor(t){H7(t),EL(t),super(t),t.startTime!==void 0&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:a,...s}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const o=new S_({...s,autoplay:!1}),c=Math.max(Zx,bn.now()-this.startTime),u=$i(0,Zx,c-Zx);n.setWithVelocity(o.sample(Math.max(0,c-u)).value,o.sample(c).value,u),o.stop()}}const AC=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(js.test(e)||e==="0")&&!e.startsWith("url("));function K7(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Y7(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],s=AC(i,t),o=AC(a,t);return Hy(s===o,`You are trying to animate ${t} from "${i}" to "${a}". "${s?a:i}" is not an animatable value.`,"value-not-animatable"),!s||!o?!1:K7(e)||(n==="spring"||NL(n))&&r}function Ew(e){e.duration=0,e.type="keyframes"}const X7=new Set(["opacity","clipPath","filter","transform"]),Z7=d_(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Q7(e){var f;const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:s}=e;if(!(((f=t==null?void 0:t.owner)==null?void 0:f.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return Z7()&&n&&X7.has(n)&&(n!=="transform"||!u)&&!c&&!r&&i!=="mirror"&&a!==0&&s!=="inertia"}const J7=40;class eY extends w_{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:s="loop",keyframes:o,name:c,motionValue:u,element:f,...d}){var g;super(),this.stop=()=>{var m,y;this._animation&&(this._animation.stop(),(m=this.stopTimeline)==null||m.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=bn.now();const h={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:a,repeatType:s,name:c,motionValue:u,element:f,...d},p=(f==null?void 0:f.KeyframeResolver)||j_;this.keyframeResolver=new p(o,(m,y,v)=>this.onKeyframesResolved(m,y,h,!v),c,u,f),(g=this.keyframeResolver)==null||g.scheduleResolve()}onKeyframesResolved(t,n,r,i){var y,v;this.keyframeResolver=void 0;const{name:a,type:s,velocity:o,delay:c,isHandoff:u,onUpdate:f}=r;this.resolvedAt=bn.now(),Y7(t,a,s,o)||((ha.instantAnimations||!c)&&(f==null||f(b_(t,r,n))),t[0]=t[t.length-1],Ew(r),r.repeat=0);const h={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>J7?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t}
vendor: 36,506 bytes, line 368
368,p=!u&&Q7(h),g=(v=(y=h.motionValue)==null?void 0:y.owner)==null?void 0:v.current,m=p?new G7({...h,element:g}):new S_(h);m.finished.then(()=>{this.notifyFinished()}).catch(Ar),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),$7()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}function RL(e,t,n,r=0,i=1){const a=Array.from(e).sort((u,f)=>u.sortNodePosition(f)).indexOf(t),s=e.size,o=(s-1)*r;return typeof n=="function"?n(a,s):i===1?a*r:o-a*r}const tY=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function nY(e){const t=tY.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}const rY=4;function ML(e,t,n=1){Mc(n<=rY,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,i]=nY(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const s=a.trim();return tL(s)?parseFloat(s):s}return m_(i)?ML(i,t,n+1):i}const iY={type:"spring",stiffness:500,damping:25,restSpeed:10},aY=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),sY={type:"keyframes",duration:.8},oY={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},lY=(e,{keyframes:t})=>t.length>2?sY:ku.has(e)?e.startsWith("scale")?aY(t[1]):iY:oY,cY=e=>e!==null;function uY(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(cY),a=t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}function __(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}function dY({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:s,repeatDelay:o,from:c,elapsed:u,...f}){return!!Object.keys(f).length}const A_=(e,t,n,r={},i,a)=>s=>{const o=__(r,e)||{},c=o.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Ti(c);const f={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-u,onUpdate:h=>{t.set(h),o.onUpdate&&o.onUpdate(h)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:a?void 0:i};dY(o)||Object.assign(f,lY(e,f)),f.duration&&(f.duration=Ti(f.duration)),f.repeatDelay&&(f.repeatDelay=Ti(f.repeatDelay)),f.from!==void 0&&(f.keyframes[0]=f.from);let d=!1;if((f.type===!1||f.duration===0&&!f.repeatDelay)&&(Ew(f),f.delay===0&&(d=!0)),(ha.instantAnimations||ha.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(d=!0,Ew(f),f.delay=0),f.allowFlatten=!o.type&&!o.ease,d&&!a&&t.get()!==void 0){const h=uY(f.keyframes,o);if(h!==void 0){at.update(()=>{f.onUpdate(h),f.onComplete()});return}}return o.isSync?new S_(f):new eY(f)};function kC(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function k_(e,t,n,r){if(typeof t=="function"){const[i,a]=kC(r);t=t(n!==void 0?n:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=kC(r);t=t(n!==void 0?n:e.custom,i,a)}return t}function uc(e,t,n){const r=e.getProps();return k_(r,t,n!==void 0?n:r.custom,e)}const $L=new Set(["width","height","top","left","right","bottom",...Au]),EC=30,fY=e=>!isNaN(parseFloat(e));class hY{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var a;const i=bn.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((a=this.events.change)==null||a.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=bn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=fY(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new f_);const r=this.events[t].add(n);return t==="change"?()=>{r(),at.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=bn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>EC)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,EC);return iL(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function $c(e,t){return new hY(e,t)}const Cw=e=>Array.isArray(e);function pY(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,$c(n))}function mY(e){return Cw(e)?e[e.length-1]||0:e}function gY(e,t){const n=uc(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const s in a){const o=mY(a[s]);pY(e,s,o)}}const pn=e=>!!(e&&e.getVelocity);function yY(e){return!!(pn(e)&&e.add)}function Pw(e,t){const n=e.getValue("willChange");if(yY(n))return n.add(t);if(!n&&ha.WillChange){const r=new ha.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function E_(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const vY="framerAppearId",DL="data-"+E_(vY);function LL(e){return e.props[DL]}function xY({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function FL(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:s,...o}=t;const c=a==null?void 0:a.reduceMotion;r&&(a=r);const u=[],f=i&&e.animationState&&e.animationState.getState()[i];for(const d in o){const h=e.getValue(d,e.latestValues[d]??null),p=o[d];if(p===void 0||f&&xY(f,d))continue;const g={delay:n,...__(a||{},d)},m=h.get();if(m!==void 0&&!h.isAnimating&&!Array.isArray(p)&&p===m&&!g.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const x=LL(e);if(x){const j=window.MotionHandoffAnimation(x,d,at);j!==null&&(g.startTime=j,y=!0)}}Pw(e,d);const v=c??e.shouldReduceMotion;h.start(A_(d,h,p,v&&$L.has(d)?{type:!1}:g,e,y));const b=h.animation;b&&u.push(b)}return s&&Promise.all(u).then(()=>{at.update(()=>{s&&gY(e,s)})}),u}function Tw(e,t,n={}){var c;const r=uc(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const a=r?()=>Promise.all(FL(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:f=0,staggerChildren:d,staggerDirection:h}=i;return bY(e,t,u,f,d,h,n)}:()=>Promise.resolve(),{when:o}=i;if(o){const[u,f]=o==="beforeChildren"?[a,s]:[s,a];return u().then(()=>f())}else return Promise.all([a(),s(n.delay)])}function bY(e,t,n=0,r=0,i=0,a=1,s){const o=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),o.push(Tw(c,t,{...s,delay:n+(typeof r=="function"?0:r)+RL(e.variantChildren,c,r,i,a)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(o)}function wY(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>Tw(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=Tw(e,t,n);else{const i=typeof t=="function"?uc(e,t,n.custom):t;r=Promise.all(FL(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const SY={test:e=>e==="auto",parse:e=>e},BL=e=>t=>t.test(e),UL=[_u,ae,Oi,$a,KK,GK,SY],CC=e=>UL.find(BL(e));function jY(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||rL(e):!0}const _Y=new Set(["brightness","contrast","saturate","opacity"]);function AY(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(g_)||[];if(!r)return e;const i=n.replace(r,"");let a=_Y.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const kY=/\b([a-z-]*)\(.*?\)/gu,Ow={...js,getAnimatableNone:e=>{const t=e.match(kY);return t?t.map(AY).join(" "):e}},PC={..._u,transform:Math.round},EY={rotate:$a,rotateX:$a,rotateY:$a,rotateZ:$a,scale:yp,scaleX:yp,scaleY:yp,scaleZ:yp,skew:$a,skewX:$a,skewY:$a,distance:ae,translateX:ae,translateY:ae,translateZ:ae,x:ae,y:ae,z:ae,perspective:ae,transformPerspective:ae,opacity:vf,originX:mC,originY:mC,originZ:ae},C_={borderWidth:ae,borderTopWidth:ae,borderRightWidth:ae,borderBottomWidth:ae,borderLeftWidth:ae,borderRadius:ae,borderTopLeftRadius:ae,borderTopRightRadius:ae,borderBottomRightRadius:ae,borderBottomLeftRadius:ae,width:ae,maxWidth:ae,height:ae,maxHeight:ae,top:ae,right:ae,bottom:ae,left:ae,inset:ae,insetBlock:ae,insetBlockStart:ae,insetBlockEnd:ae,insetInline:ae,insetInlineStart:ae,insetInlineEnd:ae,padding:ae,paddingTop:ae,paddingRight:ae,paddingBottom:ae,paddingLeft:ae,paddingBlock:ae,paddingBlockStart:ae,paddingBlockEnd:ae,paddingInline:ae,paddingInlineStart:ae,paddingInlineEnd:ae,margin:ae,marginTop:ae,marginRight:ae,marginBottom:ae,marginLeft:ae,marginBlock:ae,marginBlockStart:ae,marginBlockEnd:ae,marginInline:ae,marginInlineStart:ae,marginInlineEnd:ae,fontSize:ae,backgroundPositionX:ae,backgroundPositionY:ae,...EY,zIndex:PC,fillOpacity:vf,strokeOpacity:vf,numOctaves:PC},CY={...C_,color:Nt,backgroundColor:Nt,outlineColor:Nt,fill:Nt,stroke:Nt,borderColor:Nt,borderTopColor:Nt,borderRightColor:Nt,borderBottomColor:Nt,borderLeftColor:Nt,filter:Ow,WebkitFilter:Ow},qL=e=>CY[e];function zL(e,t){let n=qL(e);return n!==Ow&&(n=js),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const PY=new Set(["auto","none","0"]);function TY(e,t,n){let r=0,i;for(;r<e.length&&!i;){const a=e[r];typeof a=="string"&&!PY.has(a)&&xf(a).values.length&&(i=e[r]),r++}if(i&&n)for(const a of t)e[a]=zL(n,i)}class OY extends j_{constructor(t,n,r,i,a){super(t,n,r,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let f=0;f<t.length;f++){let d=t[f];if(typeof d=="string"&&(d=d.trim(),m_(d))){const h=ML(d,n.current);h!==void 0&&(t[f]=h),f===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!$L.has(r)||t.length!==2)return;const[i,a]=t,s=CC(i),o=CC(a),c=pC(i),u=pC(a);if(c!==u&&ns[r]){this.needsMeasurement=!0;return}if(s!==o)if(jC(s)&&jC(o))for(let f=0;f<t.length;f++){const d=t[f];typeof d=="string"&&(t[f]=parseFloat(d))}else ns[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||jY(t[i]))&&r.push(i);r.length&&TY(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ns[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var o;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const a=r.length-1,s=r[a];r[a]=ns[n](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),(o=this.removedTransforms)!=null&&o.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function NY(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){const i=document.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(r=>r!=null)}const VL=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Nw(e){return nL(e)&&"offsetHeight"in e}const{schedule:P_,cancel:ZNe}=mL(queueMicrotask,!1),Gr={x:!1,y:!1};function WL(){return Gr.x||Gr.y}function IY(e){return e==="x"||e==="y"?Gr[e]?null:(Gr[e]=!0,()=>{Gr[e]=!1}):Gr.x||Gr.y?null:(Gr.x=Gr.y=!0,()=>{Gr.x=Gr.y=!1})}function HL(e,t){const n=NY(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function TC(e){return!(e.pointerType==="touch"||WL())}function RY(e,t,n={}){const[r,i,a]=HL(e,n),s=o=>{if(!TC(o))return;const{target:c}=o,u=t(c,o);if(typeof u!="function"||!c)return;const f=d=>{TC(d)&&(u(d),c.removeEventListener("pointerleave",f))};c.addEventListener("pointerleave",f,i)};return r.forEach(o=>{o.addEventListener("pointerenter",s,i)}),a}const GL=(e,t)=>t?e===t?!0:GL(e,t.parentElement):!1,T_=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,MY=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function $Y(e){return MY.has(e.tagName)||e.isContentEditable===!0}const DY=new Set(["INPUT","SELECT","TEXTAREA"]);function LY(e){return DY.has(e.tagName)||e.isContentEditable===!0}const fm=new WeakSet;function OC(e){return t=>{t.key==="Enter"&&e(t)}}function Qx(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const FY=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=OC(()=>{if(fm.has(n))return;Qx(n,"down");const i=OC(()=>{Qx(n,"up")}),a=()=>Qx(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",a,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function NC(e){return T_(e)&&!WL()}function BY(e,t,n={}){const[r,i,a]=HL(e,n),s=o=>{const c=o.currentTarget;if(!NC(o))return;fm.add(c);const u=t(c,o),f=(p,g)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",h),fm.has(c)&&fm.delete(c),NC(p)&&typeof u=="function"&&u(p,{success:g})},d=p=>{f(p,c===window||c===document||n.useGlobalTarget||GL(c,p.target))},h=p=>{f(p,!1)};window.addEventListener("pointerup",d,i),window.addEventListener("pointercancel",h,i)};return r.forEach(o=>{(n.useGlobalTarget?window:o).addEventListener("pointerdown",s,i),Nw(o)&&(o.addEventListener("focus",u=>FY(u,i)),!$Y(o)&&!o.hasAttribute("tabindex")&&(o.tabIndex=0))}),a}function KL(e){return nL(e)&&"ownerSVGElement"in e}function UY(e){return KL(e)&&e.tagName==="svg"}const qY=[...UL,Nt,js],zY=e=>qY.find(BL(e)),IC=()=>({translate:0,scale:1,origin:0,originPoint:0}),Wl=()=>({x:IC(),y:IC()}),RC=()=>({min:0,max:0}),Bt=()=>({x:RC(),y:RC()}),Iw={current:null},YL={current:!1},VY=typeof window<"u";function WY(){if(YL.current=!0,!!VY)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Iw.current=e.matches;e.addEventListener("change",t),t()}else Iw.current=!1}const HY=new WeakMap;function Gy(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function bf(e){return typeof e=="string"||Array.isArray(e)}const O_=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],N_=["initial",...O_];function Ky(e){return Gy(e.animate)||N_.some(t=>bf(e[t]))}function XL(e){return!!(Ky(e)||e.variants)}function GY(e,t,n){for(const r in t){const i=t[r],a=n[r];if(pn(i))e.addValue(r,i);else if(pn(a))e.addValue(r,$c(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){const s=e.getValue(r);s.liveStyle===!0?s.jump(i):s.hasAnimated||s.set(i)}else{const s=e.getStaticValue(r);e.addValue(r,$c(s!==void 0?s:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const MC=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let tg={};function ZL(e){tg=e}function KY(){return tg}class YY{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,skipAnimations:a,blockInitialAnimation:s,visualState:o},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=j_,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=bn.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,at.render(this.render,!1,!0))};const{latestValues:u,renderState:f}=o;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=f,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=a,this.options=c,this.blockInitialAnimation=!!s,this.isControllingVariants=Ky(n),this.isVariantNode=XL(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in h){const g=h[p];u[p]!==void 0&&pn(g)&&g.set(u[p])}}mount(t){var n;this.current=t,HY.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(YL.current||WY(),this.shouldReduceMotion=Iw.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),Ss(this.notifyUpdate),Ss(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=ku.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&at.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;typeof window<"u"&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in tg){const n=tg[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Bt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<MC.length;r++){const i=MC[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,s=t[a];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=GY(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=$c(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(tL(r)||rL(r))?r=parseFloat(r):!zY(r)&&js.test(n)&&(r=zL(t,n)),this.setBaseTarget(t,pn(r)?r.get():r)),pn(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var a;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const s=k_(this.props,n,(a=this.presenceContext)==null?void 0:a.custom);s&&(r=s[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!pn(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new f_),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){P_.render(this.render)}}class QL extends YY{constructor(){super(...arguments),this.KeyframeResolver=OY}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;pn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Rs{constructor(t){this.isMounted=!1,this.node=t}update(){}}function JL({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function XY({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function ZY(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Jx(e){return e===void 0||e===1}function Rw({scale:e,scaleX:t,scaleY:n}){return!Jx(e)||!Jx(t)||!Jx(n)}function ro(e){return Rw(e)||e4(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function e4(e){return $C(e.x)||$C(e.y)}function $C(e){return e&&e!=="0%"}function ng(e,t,n){const r=e-n,i=t*r;return n+i}function DC(e,t,n,r,i){return i!==void 0&&(e=ng(e,i,r)),ng(e,n,r)+t}function Mw(e,t=0,n=1,r,i){e.min=DC(e.min,t,n,r,i),e.max=DC(e.max,t,n,r,i)}function t4(e,{x:t,y:n}){Mw(e.x,t.translate,t.scale,t.originPoint),Mw(e.y,n.translate,n.scale,n.originPoint)}const LC=.999999999999,FC=1.0000000000001;function QY(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,s;for(let o=0;o<i;o++){a=n[o],s=a.projectionDelta;const{visualElement:c}=a.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Gl(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,t4(e,s)),r&&ro(a.latestValues)&&Gl(e,a.latestValues))}t.x<FC&&t.x>LC&&(t.x=1),t.y<FC&&t.y>LC&&(t.y=1)}function Hl(e,t){e.min=e.min+t,e.max=e.max+t}function BC(e,t,n,r,i=.5){const a=vt(e.min,e.max,i);Mw(e,t,n,a,r)}function Gl(e,t){BC(e.x,t.x,t.scaleX,t.scale,t.originX),BC(e.y,t.y,t.scaleY,t.scale,t.originY)}function n4(e,t){return JL(ZY(e.getBoundingClientRect(),t))}function JY(e,t,n){const r=n4(e,n),{scroll:i}=t;return i&&(Hl(r.x,i.offset.x),Hl(r.y,i.offset.y)),r}const eX={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},tX=Au.length;function nX(e,t,n){let r="",i=!0;for(let a=0;a<tX;a++){const s=Au[a],o=e[s];if(o===void 0)continue;let c=!0;if(typeof o=="number")c=o===(s.startsWith("scale")?1:0);else{const u=parseFloat(o);c=s.startsWith("scale")?u===1:u===0}if(!c||n){const u=VL(o,C_[s]);if(!c){i=!1;const f=eX[s]||s;r+=`${f}(${u}) `}n&&(t[s]=u)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function I_(e,t,n){const{style:r,vars:i,transformOrigin:a}=e;let s=!1,o=!1;for(const c in t){const u=t[c];if(ku.has(c)){s=!0;continue}else if(yL(c)){i[c]=u;continue}else{const f=VL(u,C_[c]);c.startsWith("origin")?(o=!0,a[c]=f):r[c]=f}}if(t.transform||(s||n?r.transform=nX(t,e.transform,n):r.transform&&(r.transform="none")),o){const{originX:c="50%",originY:u="50%",originZ:f=0}=a;r.transformOrigin=`${c} ${u} ${f}`}}function r4(e,{style:t,vars:n},r,i){const a=e.style;let s;for(s in t)a[s]=t[s];i==null||i.applyProjectionStyles(a,r);for(s in n)a.setProperty(s,n[s])}function UC(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ed={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ae.test(e))e=parseFloat(e);else return e;const n=UC(e,t.target.x),r=UC(e,t.target.y);return`${n}% ${r}%`}},rX={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=js.parse(e);if(i.length>5)return r;const a=js.createTransformer(e),s=typeof i[0]!="number"?1:0,o=n.x.scale*t.x,c=n.y.scale*t.y;i[0+s]/=o,i[1+s]/=c;const u=vt(o,c,.5);return typeof i[2+s]=="number"&&(i[2+s]/=u),typeof i[3+s]=="number"&&(i[3+s]/=u),a(i)}},$w={borderRadius:{...ed,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ed,borderTopRightRadius:ed,borderBottomLeftRadius:ed,borderBottomRightRadius:ed,boxShadow:rX};function i4(e,{layout:t,layoutId:n}){return ku.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!$w[e]||e==="opacity")}function R_(e,t,n){var s;const r=e.style,i=t==null?void 0:t.style,a={};if(!r)return a;for(const o in r)(pn(r[o])||i&&pn(i[o])||i4(o,e)||((s=n==null?void 0:n.getValue(o))==null?void 0:s.liveStyle)!==void 0)&&(a[o]=r[o]);return a}function iX(e){return window.getComputedStyle(e)}class aX extends QL{constructor(){super(...arguments),this.type="html",this.renderInstance=r4}readValueFromInstance(t,n){var r;if(ku.has(n))return(r=this.projection)!=null&&r.isProjecting?Sw(n):O7(t,n);{const i=iX(t),a=(yL(n)?i.getPropertyValue(n):i[n])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:n}){return n4(t,n)}build(t,n,r){I_(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return R_(t,n,r)}}const sX={offset:"stroke-dashoffset",array:"stroke-dasharray"},oX={offset:"strokeDashoffset",array:"strokeDasharray"};function lX(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?sX:oX;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}const cX=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function a4(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:s=0,...o},c,u,f){if(I_(e,o,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h}=e;d.transform&&(h.transform=d.transform,delete d.transform),(h.transform||d.transformOrigin)&&(h.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),h.transform&&(h.transformBox=(f==null?void 0:f.transformBox)??"fill-box",delete d.transformBox);for(const p of cX)d[p]!==void 0&&(h[p]=d[p],delete d[p]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&lX(d,i,a,s,!1)}const s4=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),o4=e=>typeof e=="string"&&e.toLowerCase()==="svg";function uX(e,t,n,r){r4(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(s4.has(i)?i:E_(i),t.attrs[i])}function l4(e,t,n){const r=R_(e,t,n);for(const i in e)if(pn(e[i])||pn(t[i])){const a=Au.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[a]=e[i]}return r}class dX extends QL{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Bt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ku.has(n)){const r=qL(n);return r&&r.default||0}return n=s4.has(n)?n:E_(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return l4(t,n,r)}build(t,n,r){a4(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){uX(t,n,r,i)}mount(t){this.isSVGTag=o4(t.tagName),super.mount(t)}}const fX=N_.length;function c4(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?c4(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<fX;n++){const r=N_[n],i=e.props[r];(bf(i)||i===!1)&&(t[r]=i)}return t}function u4(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const hX=[...O_].reverse(),pX=O_.length;function mX(e){return t=>Promise.all(t.map(({animation:n,options:r})=>wY(e,n,r)))}function gX(e){let t=mX(e),n=qC(),r=!0;const i=c=>(u,f)=>{var h;const d=uc(e,f,c==="exit"?(h=e.presenceContext)==null?void 0:h.custom:void 0);if(d){const{transition:p,transitionEnd:g,...m}=d;u={...u,...m,...g}}return u};function a(c){t=c(e)}function s(c){const{props:u}=e,f=c4(e.parent)||{},d=[],h=new Set;let p={},g=1/0;for(let y=0;y<pX;y++){const v=hX[y],b=n[v],x=u[v]!==void 0?u[v]:f[v],j=bf(x),S=v===c?b.isActive:null;S===!1&&(g=y);let _=x===f[v]&&x!==u[v]&&j;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),b.protectedKeys={...p},!b.isActive&&S===null||!x&&!b.prevProp||Gy(x)||typeof x=="boolean")continue;const A=yX(b.prevProp,x);let k=A||v===c&&b.isActive&&!_&&j||y>g&&j,E=!1;const T=Array.isArray(x)?x:[x];let P=T.reduce(i(v),{});S===!1&&(P={});const{prevResolvedValues:O={}}=b,$={...O,...P},R=M=>{k=!0,h.has(M)&&(E=!0,h.delete(M)),b.needsAnimating[M]=!0;const N=e.getValue(M);N&&(N.liveStyle=!1)};for(const M in $){const N=P[M],I=O[M];if(p.hasOwnProperty(M))continue;let F=!1;Cw(N)&&Cw(I)?F=!u4(N,I):F=N!==I,F?N!=null?R(M):h.add(M):N!==void 0&&h.has(M)?R(M):b.protectedKeys[M]=!0}b.prevProp=x,b.prevResolvedValues=P,b.isActive&&(p={...p,...P}),r&&e.blockInitialAnimation&&(k=!1);const L=_&&A;k&&(!L||E)&&d.push(...T.map(M=>{const N={type:v};if(typeof M=="string"&&r&&!L&&e.manuallyAnimateOnMount&&e.parent){const{parent:I}=e,F=uc(I,M);if(I.enteringChildren&&F){const{delayChildren:V}=F.transition||{};N.delay=RL(I.enteringChildren,e,V)}}return{animation:M,options:N}}))}if(h.size){const y={};if(typeof u.initial!="boolean"){const v=uc(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(y.transition=v.transition)}h.forEach(v=>{const b=e.getBaseTarget(v),x=e.getValue(v);x&&(x.liveStyle=!0),y[v]=b??null}),d.push({animation:y})}let m=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function o(c,u){var d;if(n[c].isActive===u)return Promise.resolve();(d=e.variantChildren)==null||d.forEach(h=>{var p;return(p=h.animationState)==null?void 0:p.setActive(c,u)}),n[c].isActive=u;const f=s(c);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:s,setActive:o,setAnimateFunction:a,getState:()=>n,reset:()=>{n=qC()}}}function yX(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!u4(t,e):!1}function Ks(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function qC(){return{animate:Ks(!0),whileInView:Ks(),whileHover:Ks(),whileTap:Ks(),whileDrag:Ks(),whileFocus:Ks(),exit:Ks()}}function zC(e,t){e.min=t.min,e.max=t.max}function Vr(e,t){zC(e.x,t.x),zC(e.y,t.y)}function VC(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const d4=1e-4,vX=1-d4,xX=1+d4,f4=.01,bX=0-f4,wX=0+f4;function wn(e){return e.max-e.min}function SX(e,t,n){return Math.abs(e-t)<=n}function WC(e,t,n,r=.5){e.origin=r,e.originPoint=vt(t.min,t.max,e.origin),e.scale=wn(n)/wn(t),e.translate=vt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=vX&&e.scale<=xX||isNaN(e.scale))&&(e.scale=1),(e.translate>=bX&&e.translate<=wX||isNaN(e.translate))&&(e.translate=0)}function Dd(e,t,n,r){WC(e.x,t.x,n.x,r?r.originX:void 0),WC(e.y,t.y,n.y,r?r.originY:void 0)}function HC(e,t,n){e.min=n.min+t.min,e.max=e.min+wn(t)}function jX(e,t,n){HC(e.x,t.x,n.x),HC(e.y,t.y,n.y)}function GC(e,t,n){e.min=t.min-n.min,e.max=e.min+wn(t)}function rg(e,t,n){GC(e.x,t.x,n.x),GC(e.y,t.y,n.y)}function KC(e,t,n,r,i){return e-=t,e=ng(e,1/n,r),i!==void 0&&(e=ng(e,1/i,r)),e}function _X(e,t=0,n=1,r=.5,i,a=e,s=e){if(Oi.test(t)&&(t=parseFloat(t),t=vt(s.min,s.max,t/100)-s.min),typeof t!="number")return;let o=vt(a.min,a.max,r);e===a&&(o-=t),e.min=KC(e.min,t,n,o,i),e.max=KC(e.max,t,n,o,i)}function YC(e,t,[n,r,i],a,s){_X(e,t[n],t[r],t[i],t.scale,a,s)}const AX=["x","scaleX","originX"],kX=["y","scaleY","originY"];function XC(e,t,n,r){YC(e.x,t,AX,n?n.x:void 0,r?r.x:void 0),YC(e.y,t,kX,n?n.y:void 0,r?r.y:void 0)}function ZC(e){return e.translate===0&&e.scale===1}function h4(e){return ZC(e.x)&&ZC(e.y)}function QC(e,t){return e.min===t.min&&e.max===t.max}function EX(e,t){return QC(e.x,t.x)&&QC(e.y,t.y)}function JC(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function p4(e,t){return JC(e.x,t.x)&&JC(e.y,t.y)}function eP(e){return wn(e.x)/wn(e.y)}function tP(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function mr(e){return[e("x"),e("y")]}function CX(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((i||a||s)&&(r=`translate3d(${i}px, ${a}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:f,rotateX:d,rotateY:h,skewX:p,skewY:g}=n;u&&(r=`perspective(${u}px) ${r}`),f&&(r+=`rotate(${f}deg) `),d&&(r+=`rotateX(${d}deg) `),h&&(r+=`rotateY(${h}deg) `),p&&(r+=`skewX(${p}deg) `),g&&(r+=`skewY(${g}deg) `)}const o=e.x.scale*t.x,c=e.y.scale*t.y;return(o!==1||c!==1)&&(r+=`scale(${o}, ${c})`),r||"none"}const m4=["TopLeft","TopRight","BottomLeft","BottomRight"],PX=m4.length,nP=e=>typeof e=="string"?parseFloat(e):e,rP=e=>typeof e=="number"||ae.test(e);function TX(e,t,n,r,i,a){i?(e.opacity=vt(0,n.opacity??1,OX(r)),e.opacityExit=vt(t.opacity??1,0,NX(r))):a&&(e.opacity=vt(t.opacity??1,n.opacity??1,r));for(let s=0;s<PX;s++){const o=`border${m4[s]}
368Radius`;let c=iP(t,o),u=iP(n,o);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||rP(c)===rP(u)?(e[o]=Math.max(vt(nP(c),nP(u),r),0),(Oi.test(u)||Oi.test(c))&&(e[o]+="%")):e[o]=u}(t.rotate||n.rotate)&&(e.rotate=vt(t.rotate||0,n.rotate||0,r))}function iP(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const OX=g4(0,.5,dL),NX=g4(.5,.95,Ar);function g4(e,t,n){return r=>r<e?0:r>t?1:n(yf(e,t,r))}function IX(e,t,n){const r=pn(e)?e:$c(e);return r.start(A_("",r,t,n)),r.animation}function wf(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const RX=(e,t)=>e.depth-t.depth;class MX{constructor(){this.children=[],this.isDirty=!1}add(t){c_(this.children,t),this.isDirty=!0}remove(t){u_(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(RX),this.isDirty=!1,this.children.forEach(t)}}function $X(e,t){const n=bn.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(Ss(r),e(a-t))};return at.setup(r,!0),()=>Ss(r)}function hm(e){return pn(e)?e.get():e}class DX{constructor(){this.members=[]}add(t){c_(this.members,t),t.scheduleRender()}remove(t){if(u_(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender();const i=r.options.layoutDependency,a=t.options.layoutDependency;i!==void 0&&a!==void 0&&i===a||(t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0));const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const pm={hasAnimatedSinceResize:!0,hasEverUpdated:!1},eb=["","X","Y","Z"],LX=1e3;let FX=0;function tb(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function y4(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=LL(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",at,!(i||a))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&y4(r)}function v4({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},o=t==null?void 0:t()){this.id=FX++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(qX),this.nodes.forEach(HX),this.nodes.forEach(GX),this.nodes.forEach(zX)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new MX)}
vendor: 17,356 bytes, line 368
368addEventListener(s,o){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new f_),this.eventHandlers.get(s).add(o)}notifyListeners(s,...o){const c=this.eventHandlers.get(s);c&&c.notify(...o)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=KL(s)&&!UY(s),this.instance=s;const{layoutId:o,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||o)&&(this.isLayoutDirty=!0),e){let f,d=0;const h=()=>this.root.updateBlockedByResize=!1;at.read(()=>{d=window.innerWidth}),e(s,()=>{const p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,f&&f(),f=$X(h,250),pm.hasAnimatedSinceResize&&(pm.hasAnimatedSinceResize=!1,this.nodes.forEach(oP)))})}o&&this.root.registerSharedNode(o,this),this.options.animate!==!1&&u&&(o||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:d,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||QX,{onLayoutAnimationStart:m,onLayoutAnimationComplete:y}=u.getProps(),v=!this.targetLayout||!p4(this.targetLayout,p),b=!d&&h;if(this.options.layoutRoot||this.resumeFrom||b||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...__(g,"layout"),onPlay:m,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(f,b)}else d||oP(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ss(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(KX),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&y4(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const d=this.path[f];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:o,layout:c}=this.options;if(o===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(aP);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(sP);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(WX),this.nodes.forEach(BX),this.nodes.forEach(UX)):this.nodes.forEach(sP),this.clearAllSnapshots();const o=bn.now();tn.delta=$i(0,1e3/60,o-tn.timestamp),tn.timestamp=o,tn.isProcessing=!0,Hx.update.process(tn),Hx.preRender.process(tn),Hx.render.process(tn),tn.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,P_.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(VX),this.sharedNodes.forEach(YX)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,at.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){at.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!wn(this.snapshot.measuredBox.x)&&!wn(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=Bt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let o=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(o=!1),o&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,o=this.projectionDelta&&!h4(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,f=u!==this.prevTransformTemplateValue;s&&this.instance&&(o||ro(this.latestValues)||f)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const o=this.measurePageBox();let c=this.removeElementScroll(o);return s&&(c=this.removeTransform(c)),JX(c),{animationId:this.root.animationId,measuredBox:o,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:s}=this.options;if(!s)return Bt();const o=s.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(eZ))){const{scroll:f}=this.root;f&&(Hl(o.x,f.offset.x),Hl(o.y,f.offset.y))}return o}removeElementScroll(s){var c;const o=Bt();if(Vr(o,s),(c=this.scroll)!=null&&c.wasRoot)return o;for(let u=0;u<this.path.length;u++){const f=this.path[u],{scroll:d,options:h}=f;f!==this.root&&d&&h.layoutScroll&&(d.wasRoot&&Vr(o,s),Hl(o.x,d.offset.x),Hl(o.y,d.offset.y))}return o}applyTransform(s,o=!1){const c=Bt();Vr(c,s);for(let u=0;u<this.path.length;u++){const f=this.path[u];!o&&f.options.layoutScroll&&f.scroll&&f!==f.root&&Gl(c,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),ro(f.latestValues)&&Gl(c,f.latestValues)}return ro(this.latestValues)&&Gl(c,this.latestValues),c}removeTransform(s){const o=Bt();Vr(o,s);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!ro(u.latestValues))continue;Rw(u.latestValues)&&u.updateSnapshot();const f=Bt(),d=u.measurePageBox();Vr(f,d),XC(o,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,f)}return ro(this.latestValues)&&XC(o,this.latestValues),o}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==tn.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var p;const o=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=o.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=o.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=o.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==o;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(p=this.parent)!=null&&p.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:d}=this.options;if(!this.layout||!(f||d))return;this.resolvedRelativeTargetAt=tn.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Bt(),this.targetWithTransforms=Bt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),jX(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Vr(this.target,this.layout.layoutBox),t4(this.target,this.targetDelta)):Vr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Rw(this.parent.latestValues)||e4(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(s,o,c){this.relativeParent=s,this.linkedParentVersion=s.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Bt(),this.relativeTargetOrigin=Bt(),rg(this.relativeTargetOrigin,o,c),Vr(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var g;const s=this.getLead(),o=!!this.resumingFrom||this!==s;let c=!0;if((this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty)&&(c=!1),o&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===tn.timestamp&&(c=!1),c)return;const{layout:u,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||f))return;Vr(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;QY(this.layoutCorrected,this.treeScale,this.path,o),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=Bt());const{target:p}=s;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(VC(this.prevProjectionDelta.x,this.projectionDelta.x),VC(this.prevProjectionDelta.y,this.projectionDelta.y)),Dd(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!tP(this.projectionDelta.x,this.prevProjectionDelta.x)||!tP(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var o;if((o=this.options.visualElement)==null||o.scheduleRender(),s){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Wl(),this.projectionDelta=Wl(),this.projectionDeltaWithTransform=Wl()}setAnimationOrigin(s,o=!1){const c=this.snapshot,u=c?c.latestValues:{},f={...this.latestValues},d=Wl();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const h=Bt(),p=c?c.source:void 0,g=this.layout?this.layout.source:void 0,m=p!==g,y=this.getStack(),v=!y||y.members.length<=1,b=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(ZX));this.animationProgress=0;let x;this.mixTargetDelta=j=>{const S=j/1e3;lP(d.x,s.x,S),lP(d.y,s.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(rg(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),XX(this.relativeTarget,this.relativeTargetOrigin,h,S),x&&EX(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=Bt()),Vr(x,this.relativeTarget)),m&&(this.animationValues=f,TX(f,u,this.latestValues,S,b,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){var o,c,u;this.notifyListeners("animationStart"),(o=this.currentAnimation)==null||o.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(Ss(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=at.update(()=>{pm.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=$c(0)),this.currentAnimation=IX(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:f=>{this.mixTargetDelta(f),s.onUpdate&&s.onUpdate(f)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(LX),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:o,target:c,layout:u,latestValues:f}=s;if(!(!o||!c||!u)){if(this!==s&&this.layout&&u&&x4(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||Bt();const d=wn(this.layout.layoutBox.x);c.x.min=s.target.x.min,c.x.max=c.x.min+d;const h=wn(this.layout.layoutBox.y);c.y.min=s.target.y.min,c.y.max=c.y.min+h}Vr(o,c),Gl(o,f),Dd(this.projectionDeltaWithTransform,this.layoutCorrected,o,f)}}registerSharedNode(s,o){this.sharedNodes.has(s)||this.sharedNodes.set(s,new DX),this.sharedNodes.get(s).add(o);const u=o.options.initialPromotionConfig;o.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(o):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var o;const{layoutId:s}=this.options;return s?((o=this.getStack())==null?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:s}=this.options;return s?(o=this.getStack())==null?void 0:o.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:o,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),s&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let o=!1;const{latestValues:c}=s;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(o=!0),!o)return;const u={};c.z&&tb("z",s,u,this.animationValues);for(let f=0;f<eb.length;f++)tb(`rotate${eb[f]}`,s,u,this.animationValues),tb(`skew${eb[f]}`,s,u,this.animationValues);s.render();for(const f in u)s.setStaticValue(f,u[f]),this.animationValues&&(this.animationValues[f]=u[f]);s.scheduleRender()}applyProjectionStyles(s,o){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=hm(o==null?void 0:o.pointerEvents)||"",s.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=hm(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!ro(this.latestValues)&&(s.transform=c?c({},""):"none",this.hasProjected=!1);return}s.visibility="";const f=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=CX(this.projectionDeltaWithTransform,this.treeScale,f);c&&(d=c(f,d)),s.transform=d;const{x:h,y:p}=this.projectionDelta;s.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,u.animationValues?s.opacity=u===this?f.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:s.opacity=u===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const g in $w){if(f[g]===void 0)continue;const{correct:m,applyTo:y,isCSSVariable:v}=$w[g],b=d==="none"?f[g]:m(f[g],u);if(y){const x=y.length;for(let j=0;j<x;j++)s[y[j]]=b}else v?this.options.visualElement.renderState.vars[g]=b:s[g]=b}this.options.layoutId&&(s.pointerEvents=u===this?hm(o==null?void 0:o.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}
vendor: 4,236 bytes, line 368
368resetTree(){this.root.nodes.forEach(s=>{var o;return(o=s.currentAnimation)==null?void 0:o.stop()}),this.root.nodes.forEach(aP),this.root.sharedNodes.clear()}}}function BX(e){e.updateLayout()}function UX(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:a}=e.options,s=t.source!==e.layout.source;a==="size"?mr(d=>{const h=s?t.measuredBox[d]:t.layoutBox[d],p=wn(h);h.min=r[d].min,h.max=h.min+p}):x4(a,t.layoutBox,r)&&mr(d=>{const h=s?t.measuredBox[d]:t.layoutBox[d],p=wn(r[d]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const o=Wl();Dd(o,r,t.layoutBox);const c=Wl();s?Dd(c,e.applyTransform(i,!0),t.measuredBox):Dd(c,r,t.layoutBox);const u=!h4(o);let f=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:h,layout:p}=d;if(h&&p){const g=Bt();rg(g,t.layoutBox,h.layoutBox);const m=Bt();rg(m,r,p.layoutBox),p4(g,m)||(f=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=g,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:o,hasLayoutChanged:u,hasRelativeLayoutChanged:f})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function qX(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function zX(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function VX(e){e.clearSnapshot()}function aP(e){e.clearMeasurements()}function sP(e){e.isLayoutDirty=!1}function WX(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function oP(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function HX(e){e.resolveTargetDelta()}function GX(e){e.calcProjection()}function KX(e){e.resetSkewAndRotation()}function YX(e){e.removeLeadSnapshot()}function lP(e,t,n){e.translate=vt(t.translate,0,n),e.scale=vt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function cP(e,t,n,r){e.min=vt(t.min,n.min,r),e.max=vt(t.max,n.max,r)}function XX(e,t,n,r){cP(e.x,t.x,n.x,r),cP(e.y,t.y,n.y,r)}function ZX(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const QX={duration:.45,ease:[.4,0,.1,1]},uP=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),dP=uP("applewebkit/")&&!uP("chrome/")?Math.round:Ar;function fP(e){e.min=dP(e.min),e.max=dP(e.max)}function JX(e){fP(e.x),fP(e.y)}function x4(e,t,n){return e==="position"||e==="preserve-aspect"&&!SX(eP(t),eP(n),.2)}function eZ(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const tZ=v4({attachResizeListener:(e,t)=>wf(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),nb={current:void 0},b4=v4({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!nb.current){const e=new tZ({});e.mount(window),e.setOptions({layoutScroll:!0}),nb.current=e}return nb.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),M_=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function hP(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function nZ(...e){return t=>{let n=!1;const r=e.map(i=>{const a=hP(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():hP(e[i],null)}}}}function rZ(...e){return w.useCallback(nZ(...e),e)}class iZ extends w.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,
vendor: 5,528 bytes, lines 368-376
368i=Nw(r)&&r.offsetWidth||0,a=Nw(r)&&r.offsetHeight||0,s=this.props.sizeRef.current;s.height=n.offsetHeight||0,s.width=n.offsetWidth||0,s.top=n.offsetTop,s.left=n.offsetLeft,s.right=i-s.width-s.left,s.bottom=a-s.height-s.top}return null}componentDidUpdate(){}render(){return this.props.children}}function aZ({children:e,isPresent:t,anchorX:n,anchorY:r,root:i}){var d;const a=w.useId(),s=w.useRef(null),o=w.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=w.useContext(M_),u=((d=e.props)==null?void 0:d.ref)??(e==null?void 0:e.ref),f=rZ(s,u);return w.useInsertionEffect(()=>{const{width:h,height:p,top:g,left:m,right:y,bottom:v}=o.current;if(t||!s.current||!h||!p)return;const b=n==="left"?`left: ${m}`:`right: ${y}`,x=r==="bottom"?`bottom: ${v}`:`top: ${g}`;s.current.dataset.motionPopId=a;const j=document.createElement("style");c&&(j.nonce=c);const S=i??document.head;return S.appendChild(j),j.sheet&&j.sheet.insertRule(`
369          [data-motion-pop-id="${a}"] {
370            position: absolute !important;
371            width: ${h}px !important;
372            height: ${p}px !important;
373            ${b}px !important;
374            ${x}px !important;
375          }
376        `),()=>{S.contains(j)&&S.removeChild(j)}},[t]),l.jsx(iZ,{isPresent:t,childRef:s,sizeRef:o,children:w.cloneElement(e,{ref:f})})}const sZ=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:s,anchorX:o,anchorY:c,root:u})=>{const f=l_(oZ),d=w.useId();let h=!0,p=w.useMemo(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:g=>{f.set(g,!0);for(const m of f.values())if(!m)return;r&&r()},register:g=>(f.set(g,!1),()=>f.delete(g))}),[n,f,r]);return a&&h&&(p={...p}),w.useMemo(()=>{f.forEach((g,m)=>f.set(m,!1))},[n]),w.useEffect(()=>{!n&&!f.size&&r&&r()},[n]),s==="popLayout"&&(e=l.jsx(aZ,{isPresent:n,anchorX:o,anchorY:c,root:u,children:e})),l.jsx(Wy.Provider,{value:p,children:e})};function oZ(){return new Map}function w4(e=!0){const t=w.useContext(Wy);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,a=w.useId();w.useEffect(()=>{if(e)return i(a)},[e]);const s=w.useCallback(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,s]:[!0]}const vp=e=>e.key||"";function pP(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const S4=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a="sync",propagate:s=!1,anchorX:o="left",anchorY:c="top",root:u})=>{const[f,d]=w4(s),h=w.useMemo(()=>pP(e),[e]),p=s&&!f?[]:h.map(vp),g=w.useRef(!0),m=w.useRef(h),y=l_(()=>new Map),v=w.useRef(new Set),[b,x]=w.useState(h),[j,S]=w.useState(h);eL(()=>{g.current=!1,m.current=h;for(let k=0;k<j.length;k++){const E=vp(j[k]);p.includes(E)?(y.delete(E),v.current.delete(E)):y.get(E)!==!0&&y.set(E,!1)}},[j,p.length,p.join("-")]);const _=[];if(h!==b){let k=[...h];for(let E=0;E<j.length;E++){const T=j[E],P=vp(T);p.includes(P)||(k.splice(E,0,T),_.push(T))}return a==="wait"&&_.length&&(k=_),S(pP(k)),x(h),null}const{forceRender:A}=w.useContext(o_);return l.jsx(l.Fragment,{children:j.map(k=>{const E=vp(k),T=s&&!f?!1:h===j||p.includes(E),P=()=>{if(v.current.has(E))return;if(v.current.add(E),y.has(E))y.set(E,!0);else return;let O=!0;y.forEach($=>{$||(O=!1)}),O&&(A==null||A(),S(m.current),s&&(d==null||d()),r&&r())};return l.jsx(sZ,{isPresent:T,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:u,onExitComplete:T?void 0:P,anchorX:o,anchorY:c,children:k},E)})})},j4=w.createContext({strict:!1}),mP={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let gP=!1;function lZ(){if(gP)return;const e={};for(const t in mP)e[t]={isEnabled:n=>mP[t].some(r=>!!n[r])};ZL(e),gP=!0}function _4(){return lZ(),KY()}function cZ(e){const t=_4();for(const n in e)t[n]={...t[n],...e[n]};ZL(t)}const uZ=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ig(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||uZ.has(e)}let A4=e=>!ig(e);function dZ(e){typeof e=="function"&&(A4=t=>t.startsWith("on")?!ig(t):e(t))}try{dZ(require("@emotion/is-prop-valid").default)}catch{}function fZ(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(A4(i)||n===!0&&ig(i)||!t&&!ig(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const Yy=w.createContext({});function hZ(e,t){if(Ky(e)){const{initial:n,animate:r}=e;return{initial:n===!1||bf(n)?n:void 0,animate:bf(r)?r:void 0}}return e.inherit!==!1?t:{}}function pZ(e){const{initial:t,animate:n}=hZ(e,w.useContext(Yy));return w.useMemo(()=>({initial:t,animate:n}),[yP(t),yP(n)])}function yP(e){return Array.isArray(e)?e.join(" "):e}const $_=()=>({style:{},transform:{},transformOrigin:{},vars:{}});
vendor: 4,369 bytes, line 376
376function k4(e,t,n){for(const r in t)!pn(t[r])&&!i4(r,n)&&(e[r]=t[r])}function mZ({transformTemplate:e},t){return w.useMemo(()=>{const n=$_();return I_(n,t,e),Object.assign({},n.vars,n.style)},[t])}function gZ(e,t){const n=e.style||{},r={};return k4(r,n,e),Object.assign(r,mZ(e,t)),r}function yZ(e,t){const n={},r=gZ(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const E4=()=>({...$_(),attrs:{}});function vZ(e,t,n,r){const i=w.useMemo(()=>{const a=E4();return a4(a,t,o4(r),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};k4(a,e.style,e),i.style={...a,...i.style}}return i}const xZ=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function D_(e){return typeof e!="string"||e.includes("-")?!1:!!(xZ.indexOf(e)>-1||/[A-Z]/u.test(e))}function bZ(e,t,n,{latestValues:r},i,a=!1,s){const c=(s??D_(e)?vZ:yZ)(t,r,i,e),u=fZ(t,typeof e=="string",a),f=e!==w.Fragment?{...u,...c,ref:n}:{},{children:d}=t,h=w.useMemo(()=>pn(d)?d.get():d,[d]);return w.createElement(e,{...f,children:h})}function wZ({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:SZ(n,r,i,e),renderState:t()}}function SZ(e,t,n,r){const i={},a=r(e,{});for(const h in a)i[h]=hm(a[h]);let{initial:s,animate:o}=e;const c=Ky(e),u=XL(e);t&&u&&!c&&e.inherit!==!1&&(s===void 0&&(s=t.initial),o===void 0&&(o=t.animate));let f=n?n.initial===!1:!1;f=f||s===!1;const d=f?o:s;if(d&&typeof d!="boolean"&&!Gy(d)){const h=Array.isArray(d)?d:[d];for(let p=0;p<h.length;p++){const g=k_(e,h[p]);if(g){const{transitionEnd:m,transition:y,...v}=g;for(const b in v){let x=v[b];if(Array.isArray(x)){const j=f?x.length-1:0;x=x[j]}x!==null&&(i[b]=x)}for(const b in m)i[b]=m[b]}}}return i}const C4=e=>(t,n)=>{const r=w.useContext(Yy),i=w.useContext(Wy),a=()=>wZ(e,t,r,i);return n?a():l_(a)},jZ=C4({scrapeMotionValuesFromProps:R_,createRenderState:$_}),_Z=C4({scrapeMotionValuesFromProps:l4,createRenderState:E4}),AZ=Symbol.for("motionComponentSymbol");function kZ(e,t,n){const r=w.useRef(n);w.useInsertionEffect(()=>{r.current=n});const i=w.useRef(null);return w.useCallback(a=>{var o;a&&((o=e.onMount)==null||o.call(e,a)),t&&(a?t.mount(a):t.unmount());const s=r.current;if(typeof s=="function")if(a){const c=s(a);typeof c=="function"&&(i.current=c)}else i.current?(i.current(),i.current=null):s(a);else s&&(s.current=a)},[t])}const P4=w.createContext({});function xd(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function EZ(e,t,n,r,i,a){var x,j;const{visualElement:s}=w.useContext(Yy),o=w.useContext(j4),c=w.useContext(Wy),u=w.useContext(M_),f=u.reducedMotion,d=u.skipAnimations,h=w.useRef(null),p=w.useRef(!1);r=r||o.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:s,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:f,skipAnimations:d,isSVG:a}),p.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const g=h.current,m=w.useContext(P4);g&&!g.projection&&i&&(g.type==="html"||g.type==="svg")&&CZ(h.current,n,i,m);const y=w.useRef(!1);w.useInsertionEffect(()=>{g&&y.current&&g.update(n,c)});const v=n[DL],b=w.useRef(!!v&&!((x=window.MotionHandoffIsComplete)!=null&&x.call(window,v))&&((j=window.MotionHasOptimisedAnimation)==null?void 0:j.call(window,v)));return eL(()=>{p.current=!0,g&&(y.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),b.current&&g.animationState&&g.animationState.animateChanges())}),w.useEffect(()=>{g&&(!b.current&&g.animationState&&g.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var S;(S=window.MotionHandoffMarkAsComplete)==null||S.call(window,v)}),b.current=!1),g.enteringChildren=void 0)}),g}function CZ(e,t,n,r){const{layoutId:i,layout:a,drag:s,dragConstraints:o,layoutScroll:c,layoutRoot:u,layoutCrossfade:f}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:T4(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!s||o&&xd(o),visualElement:e,animationType:typeof a=="str
376ing"?a:"both",initialPromotionConfig:r,crossfade:f,layoutScroll:c,layoutRoot:u})}function T4(e){if(e)return e.options.allowProjection!==!1?e.projection:T4(e.parent)}function rb(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&cZ(r);const a=n?n==="svg":D_(e),s=a?_Z:jZ;function o(u,f){let d;const h={...w.useContext(M_),...u,layoutId:PZ(u)},{isStatic:p}=h,g=pZ(u),m=s(u,p);if(!p&&JD){TZ();const y=OZ(h);d=y.MeasureLayout,g.visualElement=EZ(e,m,h,i,y.ProjectionNode,a)}return l.jsxs(Yy.Provider,{value:g,children:[d&&g.visualElement?l.jsx(d,{visualElement:g.visualElement,...h}):null,bZ(e,u,kZ(m,g.visualElement,f),m,p,t,a)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const c=w.forwardRef(o);return c[AZ]=e,c}function PZ({layoutId:e}){const t=w.useContext(o_).id;return t&&e!==void 0?t+"-"+e:e}function TZ(e,t){w.useContext(j4).strict}function OZ(e){const t=_4(),{drag:n,layout:r}=t;if(!n&&!r)return{};const i={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function NZ(e,t){if(typeof Proxy>"u")return rb;const n=new Map,r=(a,s)=>rb(a,s,e,t),i=(a,s)=>r(a,s);return new Proxy(i,{get:(a,s)=>s==="create"?r:(n.has(s)||n.set(s,rb(s,void 0,e,t)),n.get(s))})}const IZ=(e,t)=>t.isSVG??D_(e)?new dX(t):new aX(t,{allowProjection:e!==w.Fragment});class RZ extends Rs{constructor(t){super(t),t.animationState||(t.animationState=gX(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Gy(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let MZ=0;class $Z extends Rs{constructor(){super(...arguments),this.id=MZ++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const DZ={animation:{Feature:RZ},exit:{Feature:$Z}};function Oh(e){return{point:{x:e.pageX,y:e.pageY}}}const LZ=e=>t=>T_(t)&&e(t,Oh(t));function Ld(e,t,n,r){return wf(e,t,LZ(n),r)}const O4=({current:e})=>e?e.ownerDocument.defaultView:null,vP=(e,t)=>Math.abs(e-t);function FZ(e,t){const n=vP(e.x,t.x),r=vP(e.y,t.y);return Math.sqrt(n**2+r**2)}const xP=new Set(["auto","scroll"]);class N4{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:a=!1,distanceThreshold:s=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=ab(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,m=FZ(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!m)return;const{point:y}=p,{timestamp:v}=tn;this.history.push({...y,timestamp:v});const{onStart:b,onMove:x}=this.handlers;g||(b&&b(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,p)},this.handlePointerMove=(p,g)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=ib(g,this.transformPagePoint),at.update(this.updatePoint,!0)},this.handlePointerUp=(p,g)=>{this.end();const{onEnd:m,onSessionEnd:y,resumeAnimation:v}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=ab(p.type==="pointercancel"?this.lastMoveEventInfo:ib(g,this.transformPagePoint),this.history);this.startEvent&&m&&m(p,b),y&&y(p,b)},!T_(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=i||window;const c=Oh(t),u=ib(c,this.transformPagePoint),{point:f}=u,{timestamp:d}=tn;this.history=[{...f,timestamp:d}];const{onSessionStart:h}=n;h&&h(t,ab(u,this.history)),this.removeListeners=Ch(Ld(this.contextWindow,"pointermove",this.handlePointerMove),Ld(this.contextWindow,"pointerup",this.handlePointerUp),Ld(this.contextWindow,"pointercancel",this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(xP.has(r.overflowX)||xP.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener("scroll",this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,i=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},a={x:i.x-n.x,y:i.y-n.y};a.x===0&&a.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=a.x,this.lastMoveEventInfo.point.y+=a.y):this.history.length>0&&(this.history[0].x-=a.x,this.history[0].y-=a.y),this.scrollPositions.set(t,i),at.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ss(this.updatePoint)}}function ib(e,t){return t?{point:t(e.point)}:e}function bP(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ab({point:e},t){return{point:e,delta:bP(e,I4(t)),offset:bP(e,BZ(t)),velocity:UZ(t,.1)}}function BZ(e){return e[0]}function I4(e){return e[e.length-1]}function UZ(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=I4(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Ti(t)));)n--;if(!r)return{x:0,y:0};const a=Sr(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const s={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function qZ(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?vt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?vt(n,e,r.max):Math.min(e,n)),e}function wP(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function zZ(e,{top:t,left:n,bottom:r,right:i}){return{x:wP(e.x,n,i),y:wP(e.y,t,r)}}function SP(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function VZ(e,t){return{x:SP(e.x,t.x),y:SP(e.y,t.y)}}function WZ(e,t){let n=.5;const r=wn(e),i=wn(t);return i>r?n=yf(t.min,t.max-r,e.min):r>i&&(n=yf(e.min,e.max-i,t.min)),$i(0,1,n)}function HZ(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Dw=.35;function GZ(e=Dw){return e===!1?e=0:e===!0&&(e=Dw),{x:jP(e,"left","right"),y:jP(e,"top","bottom")}}function jP(e,t,n){return{min:_P(e,t),max:_P(e,n)}}function _P(e,t){return typeof e=="number"?e:e[t]||0}const KZ=new WeakMap;class YZ{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Bt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const a=d=>{n?(this.stopAnimation(),this.snapToCursor(Oh(d).point)):this.pauseAnimation()},s=(d,h)=>{this.stopAnimation();const{drag:p,dragPropagation:g,onDragStart:m}=this.getProps();if(p&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=IY(p),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),mr(v=>{let b=this.getAxisMotionValue(v).get()||0;if(Oi.test(b)){const{projection:x}=this.visualElement;if(x&&x.layout){const j=x.layout.layoutBox[v];j&&(b=wn(j)*(parseFloat(b)/100))}}this.originPoint[v]=b}),m&&at.update(()=>m(d,h),!1,!0),Pw(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},o=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h;const{dragPropagation:p,dragDirectionLock:g,onDirectionLock:m,onDrag:y}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:v}=h;if(g&&this.currentDirection===null){this.currentDirection=XZ(v),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",h.point,v),this.updateAxis("y",h.point,v),this.visualElement.render(),y&&at.update(()=>y(d,h),!1,!0)},c=(d,h)=>{this.latestPointerEvent=d,this.latestPanInfo=h,this.stop(d,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>mr(d=>{var h;return this.getAnimationState(d)==="paused"&&((h=this.getAxisMotionValue(d).animation)==null?void 0:h.play())}),{dragSnapToOrigin:f}=this.getProps();this.panSession=new N4(t,{onSessionStart:a,onStart:s,onMove:o,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:f,distanceThreshold:r,contextWindow:O4(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!i||!r)return;const{velocity:s}=i;this.startAnimation(s);const{onDragEnd:o}=this.getProps();o&&at.postRender(()=>o(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!xp(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=qZ(s,this.constraints[t],this.elastic[t])),a.set(s)}resolveConstraints(){var a;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)==null?void 0:a.layout,i=this.constraints;t&&xd(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=zZ(r.layoutBox,t):this.constraints=!1,this.elastic=GZ(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&mr(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=HZ(r.layoutBox[s],this.constraints[s])
vendor: 5,899 bytes, line 376
376)})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!xd(t))return!1;const r=t.current;Mc(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=JY(r,i.root,this.visualElement.getTransformPagePoint());let s=VZ(i.layout.layoutBox,a);if(n){const o=n(XY(s));this.hasMutatedConstraints=!!o,o&&(s=JL(o))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:s,onDragTransitionEnd:o}=this.getProps(),c=this.constraints||{},u=mr(f=>{if(!xp(f,n,this.currentDirection))return;let d=c&&c[f]||{};s&&(d={min:0,max:0});const h=i?200:1e6,p=i?40:1e7,g={type:"inertia",velocity:r?t[f]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(f,g)});return Promise.all(u).then(o)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Pw(this.visualElement,t),r.start(A_(t,r,0,n,this.visualElement,!1))}stopAnimation(){mr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){mr(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){mr(n=>{const{drag:r}=this.getProps();if(!xp(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:o}=i.layout.layoutBox[n],c=a.get()||0;a.set(t[n]-vt(s,o,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!xd(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};mr(s=>{const o=this.getAxisMotionValue(s);if(o&&this.constraints!==!1){const c=o.get();i[s]=WZ({min:c,max:c},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),mr(s=>{if(!xp(s,t,null))return;const o=this.getAxisMotionValue(s),{min:c,max:u}=this.constraints[s];o.set(vt(c,u,i[s]))})}addListeners(){if(!this.visualElement.current)return;KZ.set(this.visualElement,this);const t=this.visualElement.current,n=Ld(t,"pointerdown",c=>{const{drag:u,dragListener:f=!0}=this.getProps(),d=c.target,h=d!==t&&LY(d);u&&f&&!h&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();xd(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),at.read(r);const s=wf(window,"resize",()=>this.scalePositionWithinConstraints()),o=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(mr(f=>{const d=this.getAxisMotionValue(f);d&&(this.originPoint[f]+=c[f].translate,d.set(d.get()+c[f].translate))}),this.visualElement.render())});return()=>{s(),n(),a(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:s=Dw,dragMomentum:o=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:s,dragMomentum:o}}}function xp(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function XZ(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class ZZ extends Rs{constructor(t){super(t),this.removeGroupControls=Ar,this.removeListeners=Ar,this.controls=new YZ(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ar}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const sb=e=>(t,n)=>{e&&at.update(()=>e(t,n),!1,!0)};class QZ extends Rs{constructor(){super(...arguments),this.removePointerDownListener=Ar}onPointerDown(t){this.session=new N4(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:O4(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:sb(t),onStart:sb(n),onMove:sb(r),onEnd:(a,s)=>{delete this.session,i&&at.postRender(()=>i(a,s))}}}mount(){this.removePointerDownListener=Ld(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let ob=!1;class JZ extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),ob&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),pm.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,{projection:s}=r;return s&&(s.isPresent=a,t.layoutDependency!==n&&s.setOptions({...s.options,layoutDependency:n}),ob=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==a?s.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?s.promote():s.relegate()||at.postRender(()=>
vendor: 4,354 bytes, line 376
376{const o=s.getStack();(!o||!o.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),P_.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;ob=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function R4(e){const[t,n]=w4(),r=w.useContext(o_);return l.jsx(JZ,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(P4),isPresent:t,safeToRemove:n})}const eQ={pan:{Feature:QZ},drag:{Feature:ZZ,ProjectionNode:b4,MeasureLayout:R4}};function AP(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,a=r[i];a&&at.postRender(()=>a(t,Oh(t)))}class tQ extends Rs{mount(){const{current:t}=this.node;t&&(this.unmount=RY(t,(n,r)=>(AP(this.node,r,"Start"),i=>AP(this.node,i,"End"))))}unmount(){}}class nQ extends Rs{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ch(wf(this.node.current,"focus",()=>this.onFocus()),wf(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function kP(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),a=r[i];a&&at.postRender(()=>a(t,Oh(t)))}class rQ extends Rs{mount(){const{current:t}=this.node;t&&(this.unmount=BY(t,(n,r)=>(kP(this.node,r,"Start"),(i,{success:a})=>kP(this.node,i,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Lw=new WeakMap,lb=new WeakMap,iQ=e=>{const t=Lw.get(e.target);t&&t(e)},aQ=e=>{e.forEach(iQ)};function sQ({root:e,...t}){const n=e||document;lb.has(n)||lb.set(n,{});const r=lb.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(aQ,{root:e,...t})),r[i]}function oQ(e,t,n){const r=sQ(t);return Lw.set(e,n),r.observe(e),()=>{Lw.delete(e),r.unobserve(e)}}const lQ={some:0,all:1};class cQ extends Rs{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:a}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:lQ[i]},o=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,a&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:f,onViewportLeave:d}=this.node.getProps(),h=u?f:d;h&&h(c)};return oQ(this.node.current,s,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(uQ(t,n))&&this.startObserver()}unmount(){}}function uQ({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const dQ={inView:{Feature:cQ},tap:{Feature:rQ},focus:{Feature:nQ},hover:{Feature:tQ}},fQ={layout:{ProjectionNode:b4,MeasureLayout:R4}},hQ={...DZ,...dQ,...eQ,...fQ},nr=NZ(hQ,IZ),pQ={sm:{height:20,fontSize:14,lineWidth:1.5,gap:6},md:{height:28,fontSize:18,lineWidth:2,gap:8},lg:{height:36,fontSize:22,lineWidth:2.5,gap:10},hero:{height:48,fontSize:30,lineWidth:3,gap:12}};function Vt({className:e="",size:t="md",animate:n=!1}){const r=pQ[t],i=Math.round(r.height*1.2);return l.jsxs("div",{className:`inline-flex items-center ${e}`,style:{gap:r.gap},children:[n?l.jsx(nr.div,{initial:{scaleY:0,originY:"100%"},animate:{scaleY:1},transition:{duration:.4,ease:"easeOut"},style:{width:r.lineWidth,height:i,background:"linear-gradient(to bottom, var(--spine-top), var(--spine-bottom))",borderRadius:r.lineWidth}}):l.jsx("div",{style:{width:r.lineWidth,height:i,background:"linear-gradient(to bottom, var(--spine-top), var(--spine-bottom))",borderRadius:r.lineWidth}}),n?l.jsx(nr.span,{initial:{opacity:0}
376,animate:{opacity:1},transition:{duration:.4,delay:.4,ease:"easeOut"},className:"text-foreground font-normal lowercase",style:{fontSize:r.fontSize,letterSpacing:"-0.01em",lineHeight:1},children:"regengine.ai"}):l.jsx("span",{className:"text-foreground font-normal lowercase",style:{fontSize:r.fontSize,letterSpacing:"-0.01em",lineHeight:1},children:"regengine.ai"})]})}const EP=[{href:"/platform",label:"Platform"},{href:"/features",label:"Features"},{href:"/solutions",label:"Solutions"},{href:"/knowledge-hub",label:"Knowledge Hub"},{href:"/about",label:"About"},{href:"/demo",label:"Demo"},{href:"/contact",label:"Contact"}];function mQ(){const[e,t]=w.useState(!1),n=Is(),r=i=>{if(t(!1),i.startsWith("/#")){const a=i.replace("/#","");if(n.pathname==="/"){const s=document.getElementById(a);s==null||s.scrollIntoView({behavior:"smooth"})}}};return l.jsxs("nav",{className:"fixed top-0 left-0 right-0 z-50 bg-background/90 backdrop-blur-md border-b border-border",children:[l.jsx("div",{className:"section-container-wide",children:l.jsxs("div",{className:"flex h-14 items-center justify-between",children:[l.jsx(ge,{to:"/",className:"focus-ring rounded",children:l.jsx(Vt,{size:"sm"})}),l.jsx("div",{className:"hidden md:flex items-center gap-8",children:EP.map(i=>l.jsx(ge,{to:i.href,onClick:()=>r(i.href),className:`text-sm transition-colors font-normal ${n.pathname===i.href||n.pathname.startsWith(i.href+"/")?"text-primary":"text-muted-foreground hover:text-foreground"}`,children:i.label},i.href))}),l.jsx("button",{onClick:()=>t(!e),className:"md:hidden p-2 text-muted-foreground hover:text-foreground focus-ring rounded transition-colors","aria-label":e?"Close menu":"Open menu",children:e?l.jsx(kh,{size:20}):l.jsx(L$,{size:20})})]})}),l.jsx(S4,{children:e&&l.jsx(nr.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"md:hidden border-t border-border bg-background",children:l.jsx("div",{className:"section-container py-4 space-y-3",children:EP.map(i=>l.jsx(ge,{to:i.href,onClick:()=>r(i.href),className:"block text-muted-foreground hover:text-foreground transition-colors py-2 font-normal",children:i.label},i.href))})})})]})}const gQ={Platform:[{label:"Overview",href:"/platform"},{label:"Features",href:"/features"},{label:"Demo",href:"/demo"}],Features:[{label:"Regulatory AI Search",href:"/features/regulatory-ai-search"},{label:"Knowledge Graph",href:"/features/regulatory-knowledge-graph"},{label:"AI Copilot",href:"/features/ai-compliance-copilot"},{label:"SOP Mapping",href:"/features/regulation-sop-mapping"},{label:"Change Monitoring",href:"/features/regulatory-change-monitoring"}],Solutions:[{label:"Pharmaceutical",href:"/industries/pharma"},{label:"Biotech",href:"/industries/biotech"},{label:"CROs",href:"/industries/cro"},{label:"Medical Devices",href:"/industries/medical-devices"},{label:"Healthcare Tech",href:"/industries/healthcare-technology"}],Company:[{label:"About",href:"/about"},{label:"Knowledge Hub",href:"/knowledge-hub"},{label:"Contact",href:"/contact"}]};function yQ(){return l.jsx("footer",{className:"border-t border-border py-16",children:l.jsxs("div",{className:"section-container-wide",children:[l.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-8 mb-12",children:[l.jsxs("div",{className:"col-span-2 md:col-span-1",children:[l.jsx(Vt,{size:"sm"}),l.jsx("p",{className:"text-muted-foreground text-sm mt-4 max-w-xs",children:"AI-powered regulatory intelligence for life sciences and healthcare."})]}),Object.entries(gQ).map(([e,t])=>l.jsxs("div",{children:[l.jsx("h4",{className:"font-semibold text-foreground text-sm mb-4",children:e}),l.jsx("ul",{className:"space-y-2",children:t.map(n=>l.jsx("li",{children:l.jsx(ge,{to:n.href,className:"text-sm text-muted-foreground hover:text-foreground transition-colors",children:n.label})},n.href))})]},e))]}),l.jsxs("div",{className:"border-t border-border pt-8 flex flex-col md:flex-row items-center justify-between gap-4 text-sm text-muted-foreground",children:[l.jsxs("span",{children:["© ",new Date().getFullYear()," RegEngine.ai"]}),l.jsxs("div",{className:"flex gap-6",children:[l.jsx(ge,{to:"/platform",className:"hover:text-foreground transition-colors",children:"Platform"}),l.jsx(ge,{to:"/contact",className:"hover:text-foreground transition-colors",children:"Contact"})]})]})]})})}function vQ(){return l.jsx("div",{className:"fixed inset-0 pointer-events-none overflow-hidden z-0",children:l.jsx("div",{className:"absolute inset-0 opacity-[0.03]",style:{backgroundImage:`
377            linear-gradient(to right, hsl(220 20% 60%) 1px, transparent 1px),
378            linear-gradient(to bottom, hsl(220 20% 60%) 1px, transparent 1px)
379          `,backgroundSize:"48px 48px"}})})}function $t({children:e,showFooter:t=!0}){return l.jsxs("div",{className:"min-h-screen flex flex-col bg-background relative",children:[l.jsx(vQ,{}),l.jsx(mQ,{}),l.jsx("main",{className:"flex-1 pt-14 relative z-10",children:e}),t&&l.jsx(yQ,{})]})}function xQ(){return l.jsx("section",{className:"relative py-24 md:py-32 lg:py-40",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"max-w-2xl",children:[l.jsx(Vt,{size:"lg",className:"mb-10",animate:!0}),l.jsxs("h1",{className:"text-4xl md:text-5xl lg:text-6xl font-bold leading-tight mb-8 tracking-tight",children:["The AI Compliance"," ",l.jsx("span",{className:"text-primary",children:"Control Plane"})]}),l.jsx("p",{className:"text-foreground font-medium text-xl mb-6",children:"Every AI action. Every decision. Every approval. Every time."}),l.jsxs("p",{className:"text-xl text-muted-foreground mb-6 leading-relaxed",children:["Continuous traceability, auditability, and governance across every AI model, workflow, and decision—",l.jsx("span",{className:"text-foreground font-medium",children:"in real time"}),"."]}),l.jsx("p",{className:"text-muted-foreground mb-12",children:"AI moves fast. Regulations move slower. RegEngine ensures compliance keeps up."}),l.jsxs("div",{className:"flex flex-wrap gap-6",children:[l.jsx(ge,{to:"/demo",className:"btn-outline-brand",children:"Request a demo"}),l.jsx("a",{href:"#capabilities",className:"link-arrow",children:"Explore capabilities"})]})]})})})}function bQ(){const e=["Capture every AI decision and action","Enforce approval and oversight controls","Maintain immutable audit trails","Map AI behavior to regulatory requirements","Provide real-time compliance visibility"];return l.jsx("section",{className:"py-20 md:py-28 border-t border-border",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"max-w-2xl",children:[l.jsx("h2",{className:"text-3xl md:text-4xl font-semibold mb-8",children:"What Is an AI Compliance Control Plane?"}),l.jsxs("div",{className:"prose-section",children:[l.jsxs("p",{className:"text-lg text-muted-foreground leading-relaxed mb-6",children:["An ",l.jsx("span",{className:"text-foreground font-medium",children:"AI Compliance Control Plane"})," is the foundational layer that governs how AI systems operate, make decisions, and evolve—while maintaining continuous regulatory alignment."]}),l.jsx("p",{className:"text-muted-foreground leading-relaxed mb-8",children:"RegEngine sits above your AI models, data pipelines, and workflows to:"}),l.jsx("ul",{className:"space-y-3 mb-8",children:e.map(t=>l.jsxs("li",{className:"flex items-start gap-3",children:[l.jsx("span",{className:"w-1.5 h-1.5 bg-primary rounded-sm mt-2 shrink-0"}),l.jsx("span",{className:"text-foreground",children:t})]},t))}),l.jsx("p",{className:"text-foreground font-medium",children:"If your organization uses AI in regulated environments, you need a control plane."})]})]})})})}
379function wQ(){const e=["Undocumented AI decisions","No model traceability","Manual audits","Fragmented governance","Regulatory exposure"];return l.jsx("section",{className:"py-20 md:py-28 border-t border-border",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"max-w-2xl",children:[l.jsx("div",{className:"mono-label mb-4",children:"// THE_PROBLEM"}),l.jsx("h2",{className:"text-3xl md:text-4xl font-semibold mb-8",children:"Why RegEngine Exists"}),l.jsxs("div",{className:"space-y-6",children:[l.jsx("p",{className:"text-lg text-muted-foreground",children:"Most AI systems were built for performance—not compliance."}),l.jsx("p",{className:"text-muted-foreground",children:"That creates risk:"}),l.jsx("ul",{className:"space-y-2 mb-8",children:e.map(t=>l.jsxs("li",{className:"flex items-center gap-3 text-foreground",children:[l.jsx("span",{className:"w-1.5 h-1.5 bg-destructive rounded-sm"}),t]},t))}),l.jsxs("p",{className:"text-muted-foreground",children:["RegEngine was built to solve this ",l.jsx("span",{className:"text-foreground font-medium",children:"at the infrastructure level"}),"."]}),l.jsx("p",{className:"text-foreground font-medium",children:"We don't bolt compliance on afterward. We engineer it into every AI action."})]})]})})})}const CP=[{number:"01",code:"CONNECT",title:"Connect",description:"Integrate RegEngine with your AI models, data pipelines, and workflows."},{number:"02",code:"OBSERVE",title:"Observe",description:"Every AI action, decision, and approval is captured automatically."},{number:"03",code:"CONTROL",title:"Control",description:"Apply governance, approvals, and risk thresholds in real time."},{number:"04",code:"PROVE",title:"Prove",description:"Generate audit-ready evidence instantly—no scrambling, no spreadsheets."}];function SQ(){return l.jsx("section",{id:"how-it-works",className:"py-20 md:py-28 scroll-mt-14 border-t border-border relative",children:l.jsxs("div",{className:"section-container",children:[l.jsx("div",{className:"mono-label mb-4",children:"// PROCESS"}),l.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-12",children:"How it works"}),l.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-6 mb-10",children:CP.map((e,t)=>l.jsxs("div",{className:"rage-card p-6 relative group",children:[l.jsx("div",{className:"absolute top-0 left-0 w-2 h-2 border-t border-l border-primary/50"}),l.jsx("div",{className:"absolute top-0 right-0 w-2 h-2 border-t border-r border-primary/50"}),l.jsxs("span",{className:"font-mono text-primary text-xs mb-3 block",children:[e.code,"_",e.number]}),l.jsx("h3",{className:"font-semibold text-foreground mb-2 text-lg",children:e.title}),l.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:e.description}),t<CP.length-1&&l.jsx("div",{className:"hidden lg:block absolute top-1/2 -right-3 w-6 h-px bg-gradient-to-r from-border to-transparent"})]},e.number))}),l.jsxs("div",{className:"flex items-center gap-3 text-sm font-mono text-primary/80",children:[l.jsx("span",{className:"w-1.5 h-1.5 bg-primary rounded-sm"}),"Runtime enforcement + audit evidence, by default."]})]})})}
379const jQ=[{code:"CONTINUOUS",title:"Continuous AI Compliance",description:"Compliance is not a quarterly exercise. Real-time monitoring, automated evidence generation, always-on audit readiness."},{code:"DECISION_LOG",title:"AI Decision Logging",description:"Every AI decision is logged, contextualized, and preserved. Inputs, outputs, model version, confidence scores, human approvals."},{code:"TRACEABILITY",title:"Model Traceability & Lineage",description:"Know which model made which decision, using what data, under which approval, at what time. This is defensible AI."},{code:"APPROVAL",title:"Approval & Oversight Workflows",description:"Human-in-the-loop controls, risk-based approval thresholds, role-based authorization, segregation of duties."},{code:"RISK_MGMT",title:"AI Risk Management",description:"Risk registers, control mapping, impact assessments, regulatory alignment. Move from reactive to governed AI."}];function _Q(){return l.jsx("section",{id:"capabilities",className:"py-20 md:py-28 scroll-mt-14 border-t border-border",children:l.jsxs("div",{className:"section-container",children:[l.jsx("div",{className:"mono-label mb-4",children:"// CORE_CAPABILITIES"}),l.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-12",children:"Core Capabilities"}),l.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-4 mb-10",children:jQ.map(e=>l.jsxs("div",{className:"rage-card p-6 group relative overflow-hidden",children:[l.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-primary/5 to-transparent translate-x-[-100%] group-hover:animate-scan-line"}),l.jsx("span",{className:"font-mono text-xs text-primary/60 mb-3 block",children:e.code}),l.jsx("h3",{className:"font-semibold text-foreground mb-2",children:e.title}),l.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:e.description})]},e.code))}),l.jsx("p",{className:"text-sm text-muted-foreground font-mono",children:"// Nothing is lost. Nothing is guesswork."})]})})}const AQ=[{code:"HEALTH",title:"Healthcare",points:["Clinical AI oversight","HIPAA-aligned governance","Explainability and auditability"]},{code:"LIFESCI",title:"Life Sciences",points:["GxP-aligned AI controls","Validation-ready evidence","Inspection-ready at all times"]},{code:"FINSERV",title:"Financial Services",points:["Model risk management","Decision traceability","Regulatory defensibility"]}];function kQ(){return l.jsx("section",{id:"use-cases",className:"py-20 md:py-28 scroll-mt-14 border-t border-border",children:l.jsxs("div",{className:"section-container",children:[l.jsx("div",{className:"mono-label mb-4",children:"// INDUSTRIES"}),l.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-6",children:"Built for Regulated Industries"}),l.jsxs("p",{className:"text-lg text-muted-foreground mb-12 max-w-2xl",children:["RegEngine is designed for environments where ",l.jsx("span",{className:"text-foreground font-medium",children:"failure is not an option"}),"."]}),l.jsx("div",{className:"grid md:grid-cols-3 gap-6 max-w-4xl",children:AQ.map(e=>l.jsxs("div",{className:"rage-card p-6 group",children:[l.jsxs("span",{className:"font-mono text-xs text-primary/60 mb-2 block",children:["SECTOR_",e.code]}),l.jsx("h3",{className:"font-semibold text-foreground mb-4 text-lg",children:e.title}),l.jsx("ul",{className:"space-y-2",children:e.points.map(t=>l.jsxs("li",{className:"flex items-start gap-2 text-sm text-muted-foreground",children:[l.jsx("span",{className:"w-1 h-1 bg-primary rounded-full mt-2 shrink-0"}),t]},t))})]},e.code))})]})})}const EQ=()=>l.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",className:"w-8 h-8",stroke:"currentColor",strokeWidth:"1.5",children:[l.jsx("path",{d:"M17 2L7 12L17 22",strokeLinecap:"square"}),l.jsx("path",{d:"M21 3V21",strokeLinecap:"square"}),l.jsx("path",{d:"M7 12L3 9V15L7 12Z",fill:"currentColor",stroke:"none"})]}),CQ=()=>l.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",className:"w-8 h-8",stroke:"currentColor",strokeWidth:"1.5",children:[l.jsx("path",{d:"M12 2L21 7V17L12 22L3 17V7L12 2Z",strokeLinecap:"square"}),l.jsx("path",{d:"M12 8L16 10.5V15.5L12 18L8 15.5V10.5L12 8Z",fill:"currentColor",stroke:"none"})]}),PQ=[{code:"VSCODE_EXT",name:"RegOps Code Assist",platform:"VS Code Marketplace",description:"AI governance and compliance integration for Visual Studio Code. Enforce policies, capture audit trails, and ensure compliant AI usage directly in your IDE.",href:"https://marketplace.visualstudio.com/publishers/RageTank-ai",icon:EQ}
379,{code:"OPENVSX_EXT",name:"RegOps Code Assist",platform:"Open VSX Registry",description:"The same powerful RegOps extension available for open-source IDEs. Full compatibility with VS Codium, Gitpod, and other Open VSX-compatible editors.",href:"https://open-vsx.org/extension/ragetank-ai/regops-code-assist",icon:CQ}];function TQ(){return l.jsx("section",{id:"developer-tools",className:"py-20 md:py-28 scroll-mt-14 border-t border-border",children:l.jsxs("div",{className:"section-container",children:[l.jsx("div",{className:"mono-label mb-4",children:"// DEV_TOOLS"}),l.jsx("h2",{className:"text-3xl md:text-4xl font-semibold mb-4",children:"Developer tools"}),l.jsx("p",{className:"text-muted-foreground mb-12 max-w-xl",children:"Integrate RegEngine governance directly into your development workflow."}),l.jsx("div",{className:"grid md:grid-cols-2 gap-6 max-w-4xl",children:PQ.map(e=>l.jsxs("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"rage-card p-6 group block",children:[l.jsxs("div",{className:"flex items-start justify-between mb-4",children:[l.jsx("div",{className:"text-muted-foreground group-hover:text-primary transition-colors",children:l.jsx(e.icon,{})}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"font-mono text-xs text-primary/60",children:e.code}),l.jsx(v6,{className:"w-4 h-4 text-muted-foreground group-hover:text-primary transition-colors"})]})]}),l.jsx("h3",{className:"font-semibold text-foreground mb-1 group-hover:text-primary transition-colors",children:e.name}),l.jsx("p",{className:"text-sm text-primary/80 mb-3",children:e.platform}),l.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:e.description})]},e.code))})]})})}function OQ(){const e=["Purpose-built for AI compliance","Continuous, not point-in-time","Infrastructure-level control","Regulator-ready by design","Built by compliance and technology leaders"],t=[{code:"API",label:"API-first"},{code:"CLOUD",label:"Cloud-native"},{code:"MODEL",label:"Model-agnostic"},{code:"VENDOR",label:"Vendor-neutral"}];return l.jsx("section",{className:"py-20 md:py-28 border-t border-border relative",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"grid md:grid-cols-2 gap-16",children:[l.jsxs("div",{children:[l.jsx("div",{className:"mono-label mb-4",children:"// ARCHITECTURE"}),l.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-8",children:"Designed for Scale"}),l.jsx("div",{className:"flex flex-wrap gap-3 mb-6",children:t.map(n=>l.jsxs("div",{className:"flex items-center gap-2 rage-card px-3 py-2",children:[l.jsx("span",{className:"font-mono text-xs text-primary/60",children:n.code}),l.jsx("span",{className:"text-sm text-foreground",children:n.label})]},n.code))}),l.jsxs("p",{className:"text-muted-foreground",children:["From a single model to ",l.jsx("span",{className:"text-foreground font-medium",children:"enterprise-wide AI ecosystems"}),"."]})]}),l.jsxs("div",{children:[l.jsx("div",{className:"mono-label mb-4",children:"// WHY_REGENGINE"}),l.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-8",children:"Why Enterprises Choose RegEngine"}),l.jsx("ul",{className:"space-y-3 mb-6",children:e.map(n=>l.jsxs("li",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"w-1.5 h-1.5 bg-primary rounded-sm"}),l.jsx("span",{className:"text-foreground",children:n})]},n))}),l.jsx("p",{className:"text-sm text-muted-foreground font-mono",children:"// This is not governance theater. This is operational AI control."})]})]})})})}var Be;(function(e){e.assertEqual=i=>{};function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const s of i)a[s]=s;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),s={};for(const o of a)s[o]=i[o];return e.objectValues(s)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const s in i)Object.prototype.hasOwnProperty.call(i,s)&&a.push(s);return a},e.find=(i,a)=>{for(const s of i)if(a(s))return s},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(s=>typeof s=="string"?`'${s}'`:s).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(Be||(Be={}));var PP;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(PP||(PP={}));const se=Be.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ua=e=>{switch(typeof e){case"undefined":return se.undefined;case"string":return se.string;case"number":return Number.isNaN(e)?se.nan:se.number;case"boolean":return se.boolean;case"function":return se.function;case"bigint":return se.bigint;case"symbol":return se.symbol;
vendor: 4,991 bytes, line 379
379case"object":return Array.isArray(e)?se.array:e===null?se.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?se.promise:typeof Map<"u"&&e instanceof Map?se.map:typeof Set<"u"&&e instanceof Set?se.set:typeof Date<"u"&&e instanceof Date?se.date:se.object;default:return se.unknown}},K=Be.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class pa extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(a){return a.message},r={_errors:[]},i=a=>{for(const s of a.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let o=r,c=0;for(;c<s.path.length;){const u=s.path[c];c===s.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(n(s))):o[u]=o[u]||{_errors:[]},o=o[u],c++}}};return i(this),r}static assert(t){if(!(t instanceof pa))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Be.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)if(i.path.length>0){const a=i.path[0];n[a]=n[a]||[],n[a].push(t(i))}else r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}pa.create=e=>new pa(e);const Fw=(e,t)=>{let n;switch(e.code){case K.invalid_type:e.received===se.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case K.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Be.jsonStringifyReplacer)}`;break;case K.unrecognized_keys:n=`Unrecognized key(s) in object: ${Be.joinValues(e.keys,", ")}`;break;case K.invalid_union:n="Invalid input";break;case K.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Be.joinValues(e.options)}`;break;case K.invalid_enum_value:n=`Invalid enum value. Expected ${Be.joinValues(e.options)}, received '${e.received}'`;break;case K.invalid_arguments:n="Invalid function arguments";break;case K.invalid_return_type:n="Invalid function return type";break;case K.invalid_date:n="Invalid date";break;case K.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Be.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case K.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case K.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case K.custom:n="Invalid input";break;case K.invalid_intersection_types:n="Intersection results could not be merged";break;case K.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case K.not_finite:n="Number must be finite";break;default:n=t.defaultError,Be.assertNever(e)}return{message:n}};let NQ=Fw;function IQ(){return NQ}const RQ=e=>
vendor: 17,801 bytes, line 379
379{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],s={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let o="";const c=r.filter(u=>!!u).slice().reverse();for(const u of c)o=u(s,{data:t,defaultError:o}).message;return{...i,path:a,message:o}};function J(e,t){const n=IQ(),r=RQ({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Fw?void 0:Fw].filter(i=>!!i)});e.common.issues.push(r)}class ar{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Se;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const a=await i.key,s=await i.value;r.push({key:a,value:s})}return ar.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:s}=i;if(a.status==="aborted"||s.status==="aborted")return Se;a.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof s.value<"u"||i.alwaysSet)&&(r[a.value]=s.value)}return{status:t.value,value:r}}}const Se=Object.freeze({status:"aborted"}),bd=e=>({status:"dirty",value:e}),Rr=e=>({status:"valid",value:e}),TP=e=>e.status==="aborted",OP=e=>e.status==="dirty",Dc=e=>e.status==="valid",ag=e=>typeof Promise<"u"&&e instanceof Promise;var le;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(le||(le={}));class _s{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const NP=(e,t)=>{if(Dc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new pa(e.common.issues);return this._error=n,this._error}}};function Ne(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(s,o)=>{const{message:c}=e;return s.code==="invalid_enum_value"?{message:c??o.defaultError}:typeof o.data>"u"?{message:c??r??o.defaultError}:s.code!=="invalid_type"?{message:o.defaultError}:{message:c??n??o.defaultError}},description:i}}class Le{get description(){return this._def.description}_getType(t){return Ua(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Ua(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ar,ctx:{common:t.parent.common,data:t.data,parsedType:Ua(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(ag(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ua(t)},i=this._parseSync({data:t,path:r.path,parent:r});return NP(r,i)}"~validate"(t){var r,i;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ua(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:n});return Dc(a)?{value:a.value}:{issues:n.common.issues}}catch(a){(i=(r=a==null?void 0:a.message)==null?void 0:r.toLowerCase())!=null&&i.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(a=>Dc(a)?{value:a.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Ua(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(ag(i)?i:Promise.resolve(i));return NP(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const s=t(i),o=()=>a.addIssue({code:K.custom,...r(i)});return typeof Promise<"u"&&s instanceof Promise?s.then(c=>c?!0:(o(),!1)):s?!0:(o(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Fc({schema:this,typeName:je.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return ps.create(this,this._def)}nullable(){return Bc.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ni.create(this)}promise(){return cg.create(this,this._def)}or(t){return og.create([this,t],this._def)}and(t){return lg.create(this,t,this._def)}transform(t){return new Fc({...Ne(this._def),schema:this,typeName:je.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Uw({...Ne(this._def),innerType:this,defaultValue:n,typeName:je.ZodDefault})}brand(){return new rJ({typeName:je.ZodBranded,type:this,...Ne(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new qw({...Ne(this._def),innerType:this,catchValue:n,typeName:je.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return L_.create(this,t)}readonly(){return zw.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const MQ=/^c[^\s-]{8,}$/i,$Q=/^[0-9a-z]+$/,DQ=/^[0-9A-HJKMNP-TV-Z]{26}$/i,LQ=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,FQ=/^[a-z0-9_-]{21}$/i,BQ=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,UQ=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,qQ=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,zQ="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let cb;const VQ=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,WQ=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,HQ=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,GQ=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,KQ=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,YQ=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,M4="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",XQ=new RegExp(`^${M4}$`);function $4(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function ZQ(e){return new RegExp(`^${$4(e)}$`)}function QQ(e){let t=`${M4}T${$4(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function JQ(e,t){return!!((t==="v4"||!t)&&VQ.test(e)||(t==="v6"||!t)&&HQ.test(e))}function eJ(e,t){if(!BQ.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||"typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||t&&i.alg!==t)}catch{return!1}}function tJ(e,t){return!!((t==="v4"||!t)&&WQ.test(e)||(t==="v6"||!t)&&GQ.test(e))}class rs extends Le{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==se.string){const a=this._getOrReturnCtx(t);return J(a,{code:K.invalid_type,expected:se.string,received:a.parsedType}),Se}const r=new ar;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),J(i,{code:K.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),J(i,{code:K.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const s=t.data.length>a.value,o=t.data.length<a.value;(s||o)&&(i=this._getOrReturnCtx(t,i),s?J(i,{code:K.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):o&&J(i,{code:K.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")qQ.test(t.data)||(i=this._getOrReturnCtx(t,i),J(i,{validation:"email",code:K.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")cb||(cb=new RegExp(zQ,"u")),cb.test(t.data)||(i=this._getOrReturnCtx(t,i),J(i,{validation:"emoji",code:K.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")LQ.test(t.data)||(i=this._getOrReturnCtx(t,i),J(i,{validation:"uuid",code:K.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")FQ.test(t.data)||(i=this._getOrReturnCtx(t,i),J(i,{validation:"nanoid",code:K.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")MQ.test(t.data)||(i=this._getOrReturnCtx(t,i),J(i,{validation:"cuid",code:K.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")$Q.test(t.data)||(i=this._getOrReturnCtx(t,i),J(i,{validation:"cuid2",code:K.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")DQ.test(t.data)||(i=this._getOrReturnCtx(t,i),J(i,{validation:"ulid",code:K.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),J(i,{validation:"url",code:K.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),J(i,{validation:"regex",code:K.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),J(i,{code:K.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),J(i,{code:K.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),J(i,{code:K.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?QQ(a).test(t.data)||(i=this._getOrReturnCtx(t,i),J(i,{code:K.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?XQ.test(t.data)||(i=this._getOrReturnCtx(t,i),J(i,{code:K.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?ZQ(a).test(t.data)||(i=this._getOrReturnCtx(t,i),J(i,{code:K.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?UQ.test(t.data)||(i=this._getOrReturnCtx(t,i),J(i,{validation:"duration",code:K.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?JQ(t.data,a.version)||(i=this._getOrReturnCtx(t,i),J(i,{validation:"ip",code:K.invalid_string,message:a.message}),r.dirty()):a.kind==="jwt"?eJ(t.data,a.alg)||(i=this._getOrReturnCtx(t,i),J(i,{validation:"jwt",code:K.invalid_string,message:a.message}),r.dirty()):a.kind==="cidr"?tJ(t.data,a.version)||(i=this._getOrReturnCtx(t,i),J(i,{validation:"cidr",code:K.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?KQ.test(t.data)||(i=this._getOrReturnCtx(t,i),J(i,{validation:"base64",code:K.invalid_string,message:a.message}),r.dirty()):a.kind==="base64url"?YQ.test(t.data)||(i=this._getOrReturnCtx(t,i),J(i,{validation:"base64url",code:K.invalid_string,message:a.message}),r.dirty()):Be.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:K.invalid_string,...le.errToObj(r)})}_addCheck(t){return new rs({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...le.errToObj(t)})}url(t){return this._addCheck({kind:"url",...le.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...le.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...le.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...le.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...le.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...le.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...le.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...le.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...le.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...le.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...le.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...le.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...le.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...le.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...le.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...le.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...le.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...le.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...le.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...le.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...le.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...le.errToObj(n)})}nonempty(t){return this.min(1,le.errToObj(t))}trim(){return new rs({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new rs({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new rs({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}
vendor: 4,658 bytes, line 379
379get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}rs.create=e=>new rs({checks:[],typeName:je.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...Ne(e)});function nJ(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=Number.parseInt(e.toFixed(i).replace(".","")),s=Number.parseInt(t.toFixed(i).replace(".",""));return a%s/10**i}class Sf extends Le{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==se.number){const a=this._getOrReturnCtx(t);return J(a,{code:K.invalid_type,expected:se.number,received:a.parsedType}),Se}let r;const i=new ar;for(const a of this._def.checks)a.kind==="int"?Be.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),J(r,{code:K.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:K.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:K.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?nJ(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),J(r,{code:K.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),J(r,{code:K.not_finite,message:a.message}),i.dirty()):Be.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,le.toString(n))}setLimit(t,n,r,i){return new Sf({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:le.toString(i)}]})}_addCheck(t){return new Sf({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:le.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:le.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:le.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:le.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Be.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}
vendor: 4,116 bytes, line 379
379}Sf.create=e=>new Sf({checks:[],typeName:je.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ne(e)});class jf extends Le{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==se.bigint)return this._getInvalidInput(t);let r;const i=new ar;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:K.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),J(r,{code:K.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),J(r,{code:K.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):Be.assertNever(a);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return J(n,{code:K.invalid_type,expected:se.bigint,received:n.parsedType}),Se}gte(t,n){return this.setLimit("min",t,!0,le.toString(n))}gt(t,n){return this.setLimit("min",t,!1,le.toString(n))}lte(t,n){return this.setLimit("max",t,!0,le.toString(n))}lt(t,n){return this.setLimit("max",t,!1,le.toString(n))}setLimit(t,n,r,i){return new jf({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:le.toString(i)}]})}_addCheck(t){return new jf({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:le.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:le.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:le.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:le.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:le.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}jf.create=e=>new jf({checks:[],typeName:je.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...Ne(e)});class IP extends Le{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==se.boolean){const r=this._getOrReturnCtx(t);return J(r,{code:K.invalid_type,expected:se.boolean,received:r.parsedType}),Se}return Rr(t.data)}}IP.create=e=>new IP({typeName:je.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ne(e)});class sg extends Le{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==se.date){const a=this._getOrReturnCtx(t);return J(a,{code:K.invalid_type,expected:se.date,received:a.parsedType}),Se}if(Number.isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return J(a,{code:K.invalid_date}),Se}const r=new ar;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),J(i,{code:K.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),J(i,{code:K.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):Be.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new sg({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:le.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:le.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}sg.create=e=>new sg({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:je.ZodD
vendor: 18,053 bytes, line 379
379ate,...Ne(e)});class RP extends Le{_parse(t){if(this._getType(t)!==se.symbol){const r=this._getOrReturnCtx(t);return J(r,{code:K.invalid_type,expected:se.symbol,received:r.parsedType}),Se}return Rr(t.data)}}RP.create=e=>new RP({typeName:je.ZodSymbol,...Ne(e)});class MP extends Le{_parse(t){if(this._getType(t)!==se.undefined){const r=this._getOrReturnCtx(t);return J(r,{code:K.invalid_type,expected:se.undefined,received:r.parsedType}),Se}return Rr(t.data)}}MP.create=e=>new MP({typeName:je.ZodUndefined,...Ne(e)});class $P extends Le{_parse(t){if(this._getType(t)!==se.null){const r=this._getOrReturnCtx(t);return J(r,{code:K.invalid_type,expected:se.null,received:r.parsedType}),Se}return Rr(t.data)}}$P.create=e=>new $P({typeName:je.ZodNull,...Ne(e)});class DP extends Le{constructor(){super(...arguments),this._any=!0}_parse(t){return Rr(t.data)}}DP.create=e=>new DP({typeName:je.ZodAny,...Ne(e)});class LP extends Le{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Rr(t.data)}}LP.create=e=>new LP({typeName:je.ZodUnknown,...Ne(e)});class As extends Le{_parse(t){const n=this._getOrReturnCtx(t);return J(n,{code:K.invalid_type,expected:se.never,received:n.parsedType}),Se}}As.create=e=>new As({typeName:je.ZodNever,...Ne(e)});class FP extends Le{_parse(t){if(this._getType(t)!==se.undefined){const r=this._getOrReturnCtx(t);return J(r,{code:K.invalid_type,expected:se.void,received:r.parsedType}),Se}return Rr(t.data)}}FP.create=e=>new FP({typeName:je.ZodVoid,...Ne(e)});class Ni extends Le{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==se.array)return J(n,{code:K.invalid_type,expected:se.array,received:n.parsedType}),Se;if(i.exactLength!==null){const s=n.data.length>i.exactLength.value,o=n.data.length<i.exactLength.value;(s||o)&&(J(n,{code:s?K.too_big:K.too_small,minimum:o?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(J(n,{code:K.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(J(n,{code:K.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,o)=>i.type._parseAsync(new _s(n,s,n.path,o)))).then(s=>ar.mergeArray(r,s));const a=[...n.data].map((s,o)=>i.type._parseSync(new _s(n,s,n.path,o)));return ar.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new Ni({...this._def,minLength:{value:t,message:le.toString(n)}})}max(t,n){return new Ni({...this._def,maxLength:{value:t,message:le.toString(n)}})}length(t,n){return new Ni({...this._def,exactLength:{value:t,message:le.toString(n)}})}nonempty(t){return this.min(1,t)}}Ni.create=(e,t)=>new Ni({type:e,minLength:null,maxLength:null,exactLength:null,typeName:je.ZodArray,...Ne(t)});function El(e){if(e instanceof _t){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=ps.create(El(r))}return new _t({...e._def,shape:()=>t})}else return e instanceof Ni?new Ni({...e._def,type:El(e.element)}):e instanceof ps?ps.create(El(e.unwrap())):e instanceof Bc?Bc.create(El(e.unwrap())):e instanceof Go?Go.create(e.items.map(t=>El(t))):e}class _t extends Le{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Be.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==se.object){const u=this._getOrReturnCtx(t);return J(u,{code:K.invalid_type,expected:se.object,received:u.parsedType}),Se}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:s}=this._getCached(),o=[];if(!(this._def.catchall instanceof As&&this._def.unknownKeys==="strip"))for(const u in i.data)s.includes(u)||o.push(u);const c=[];for(const u of s){const f=a[u],d=i.data[u];c.push({key:{status:"valid",value:u},value:f._parse(new _s(i,d,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof As){const u=this._def.unknownKeys;if(u==="passthrough")for(const f of o)c.push({key:{status:"valid",value:f},value:{status:"valid",value:i.data[f]}});else if(u==="strict")o.length>0&&(J(i,{code:K.unrecognized_keys,keys:o}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const f of o){const d=i.data[f];c.push({key:{status:"valid",value:f},value:u._parse(new _s(i,d,i.path,f)),alwaysSet:f in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const f of c){const d=await f.key,h=await f.value;u.push({key:d,value:h,alwaysSet:f.alwaysSet})}return u}).then(u=>ar.mergeObjectSync(r,u)):ar.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return le.errToObj,new _t({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var a,s;const i=((s=(a=this._def).errorMap)==null?void 0:s.call(a,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:le.errToObj(t).message??i}:{message:i}}}:{}})}strip(){return new _t({...this._def,unknownKeys:"strip"})}passthrough(){return new _t({...this._def,unknownKeys:"passthrough"})}extend(t){return new _t({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new _t({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:je.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new _t({...this._def,catchall:t})}pick(t){const n={};for(const r of Be.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new _t({...this._def,shape:()=>n})}omit(t){const n={};for(const r of Be.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new _t({...this._def,shape:()=>n})}deepPartial(){return El(this)}partial(t){const n={};for(const r of Be.objectKeys(this.shape)){const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}return new _t({...this._def,shape:()=>n})}required(t){const n={};for(const r of Be.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof ps;)a=a._def.innerType;n[r]=a}return new _t({...this._def,shape:()=>n})}keyof(){return D4(Be.objectKeys(this.shape))}}_t.create=(e,t)=>new _t({shape:()=>e,unknownKeys:"strip",catchall:As.create(),typeName:je.ZodObject,...Ne(t)});_t.strictCreate=(e,t)=>new _t({shape:()=>e,unknownKeys:"strict",catchall:As.create(),typeName:je.ZodObject,...Ne(t)});_t.lazycreate=(e,t)=>new _t({shape:e,unknownKeys:"strip",catchall:As.create(),typeName:je.ZodObject,...Ne(t)});class og extends Le{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return n.common.issues.push(...o.ctx.common.issues),o.result;const s=a.map(o=>new pa(o.ctx.common.issues));return J(n,{code:K.invalid_union,unionErrors:s}),Se}if(n.common.async)return Promise.all(r.map(async a=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(i);{let a;const s=[];for(const c of r){const u={...n,common:{...n.common,issues:[]},parent:null},f=c._parseSync({data:n.data,path:n.path,parent:u});if(f.status==="valid")return f;f.status==="dirty"&&!a&&(a={result:f,ctx:u}),u.common.issues.length&&s.push(u.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const o=s.map(c=>new pa(c));return J(n,{code:K.invalid_union,unionErrors:o}),Se}}get options(){return this._def.options}}og.create=(e,t)=>new og({options:e,typeName:je.ZodUnion,...Ne(t)});function Bw(e,t){const n=Ua(e),r=Ua(t);if(e===t)return{valid:!0,data:e};if(n===se.object&&r===se.object){const i=Be.objectKeys(t),a=Be.objectKeys(e).filter(o=>i.indexOf(o)!==-1),s={...e,...t};for(const o of a){const c=Bw(e[o],t[o]);if(!c.valid)return{valid:!1};s[o]=c.data}return{valid:!0,data:s}}else if(n===se.array&&r===se.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const s=e[a],o=t[a],c=Bw(s,o);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return n===se.date&&r===se.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class lg extends Le{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,s)=>{if(TP(a)||TP(s))return Se;const o=Bw(a.value,s.value);return o.valid?((OP(a)||OP(s))&&n.dirty(),{status:n.value,value:o.data}):(J(r,{code:K.invalid_intersection_types}),Se)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,s])=>i(a,s)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}lg.create=(e,t,n)=>new lg({left:e,right:t,typeName:je.ZodIntersection,...Ne(n)});class Go extends Le{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.array)return J(r,{code:K.invalid_type,expected:se.array,received:r.parsedType}),Se;if(r.data.length<this._def.items.length)return J(r,{code:K.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Se;!this._def.rest&&r.data.length>this._def.items.length&&(J(r,{code:K.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((s,o)=>{const c=this._def.items[o]||this._def.rest;return c?c._parse(new _s(r,s,r.path,o)):null}).filter(s=>!!s);return r.common.async?Promise.all(a).then(s=>ar.mergeArray(n,s)):ar.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new Go({...this._def,rest:t})}}Go.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Go({items:e,typeName:je.ZodTuple,rest:null,...Ne(t)})};class BP extends Le{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.map)return J(r,{code:K.invalid_type,expected:se.map,received:r.parsedType}),Se;const i=this._def.keyType,a=this._def.valueType,s=[...r.data.entries()].map(([o,c],u)=>({key:i._parse(new _s(r,o,r.path,[u,"key"])),value:a._parse(new _s(r,c,r.path,[u,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const c of s){const u=await c.key,f=await c.value;if(u.status==="aborted"||f.status==="aborted")return Se;(u.status==="dirty"||f.status==="dirty")&&n.dirty(),o.set(u.value,f.value)}return{status:n.value,value:o}})}else{const o=new Map;for(const c of s){const u=c.key,f=c.value;if(u.status==="aborted"||f.status==="aborted")return Se;(u.status==="dirty"||f.status==="dirty")&&n.dirty(),o.set(u.value,f.value)}return{status:n.value,value:o}}}}BP.create=(e,t,n)=>new BP({valueType:t,keyType:e,typeName:je.ZodMap,...Ne(n)});class _f extends Le{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==se.set)return J(r,{code:K.invalid_type,expected:se.set,received:r.parsedType}),Se;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(J(r,{code:K.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(J(r,{code:K.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function s(c){const u=new Set;for(const f of c){if(f.status==="aborted")return Se;f.status==="dirty"&&n.dirty(),u.add(f.value)}return{status:n.value,value:u}}const o=[...r.data.values()].map((c,u)=>a._parse(new _s(r,c,r.path,u)));return r.common.async?Promise.all(o).then(c=>s(c)):s(o)}min(t,n){return new _f({...this._def,minSize:{value:t,message:le.toString(n)}})}max(t,n){return new _f({...this._def,maxSize:{value:t,message:le.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}_f.create=(e,t)=>new _f({valueType:e,minSize:null,maxSize:null,typeName:je.ZodSet,...Ne(t)});class UP extends Le{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}UP.create=(e,t)=>new UP({getter:e,typeName:je.ZodLazy,...Ne(t)});class qP extends Le{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return J(n,{received:n.data,code:K.invalid_literal,expected:this._def.value}),Se}return{status:"valid",value:t.data}}get value(){return this._def.value}}qP.create=(e,t)=>new qP({value:e,typeName:je.ZodLiteral,...Ne(t)});function D4(e,t){return new Lc({values:e,typeName:je.ZodEnum,...Ne(t)})}class Lc extends Le{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return J(n,{expected:Be.joinValues(r),received:n.parsedType,code:K.invalid_type}),Se}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return J(n,{received:n.data,code:K.invalid_enum_value,options:r}),Se}return Rr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Lc.create(t,{...this._def,...n})}exclude(t,n=this._def){return Lc.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Lc.create=D4;class zP extends Le{_parse(t){const n=Be.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==se.string&&r.parsedType!==se.number){const i=Be.objectValues(n);return J(r,{expected:Be.joinValues(i),received:r.parsedType,code:K.invalid_type}),Se}if(this._cache||(this._cache=new Set(Be.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const i=Be.objectValues(n);return J(r,{received:r.data,code:K.invalid_enum_value,options:i}),Se}return Rr(t.data)}get enum(){return this._def.values}}zP.create=(e,t)=>new zP({values:e,typeName:je.ZodNativeEnum,...Ne(t)});class cg extends Le{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==se.promise&&n.common.async===!1)return J(n,{code:K.invalid_type,expected:se.promise,received:n.parsedType}),Se;const r=n.parsedType===se.promise?n.data:Promise.resolve(n.data);return Rr(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}cg.create=(e,t)=>new cg({type:e,typeName:je.ZodPromise,...Ne(t)});class Fc extends Le{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===je.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:s=>{J(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const s=i.transform(r.data,a);if(r.common.async)return Promise.resolve(s).then(async o=>{if(n.value==="aborted")return Se;const c=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return c.status==="aborted"?Se:c.status==="dirty"||n.value==="dirty"?bd(c.value):c});{if(n.value==="aborted")return Se;const o=this._def.schema._parseSync({data:s,path:r.path,parent:r});return o.status==="aborted"?Se:o.status==="dirty"||n.value==="dirty"?bd(o.value):o}}if(i.type==="refinement"){const s=o=>{const c=i.refinement(o,a);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Se:(o.status==="dirty"&&n.dirty(),s(o.value),{status:n.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?Se:(o.status==="dirty"&&n.dirty(),s(o.value).then(()=>({status:n.value,value:o.value}))))}if(i.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Dc(s))return Se;const o=i.transform(s.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>Dc(s)?Promise.resolve(i.transform(s.value,a)).then(o=>({status:n.value,value:o})):Se);Be.assertNever(i)}}Fc.create=(e,t,n)=>new Fc({schema:e,typeName:je.ZodEffects,effect:t,...Ne(n)});Fc.createWithPreprocess=(e,t,n)=>new Fc({schema:t,effect:{type:"preprocess",transform:e},typeName:je.ZodEffects,...Ne(n)});class ps extends Le{_parse(t){return this._getType(t)===se.undefined?Rr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ps.create=(e,t)=>new ps({innerType:e,typeName:je.ZodOptional,...Ne(t)});class Bc extends Le{_parse(t){return this._getType(t)===se.null?Rr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Bc.create=(e,t)=>new Bc({innerType:e,typeName:je.ZodNullable,...Ne(t)});class Uw extends Le{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===se.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Uw.create=(e,t)=>new Uw({innerType:e,typeName:je.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ne(t)});class qw extends Le{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return ag(i)?i.then(a=>
379({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new pa(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new pa(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}qw.create=(e,t)=>new qw({innerType:e,typeName:je.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ne(t)});class VP extends Le{_parse(t){if(this._getType(t)!==se.nan){const r=this._getOrReturnCtx(t);return J(r,{code:K.invalid_type,expected:se.nan,received:r.parsedType}),Se}return{status:"valid",value:t.data}}}VP.create=e=>new VP({typeName:je.ZodNaN,...Ne(e)});class rJ extends Le{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class L_ extends Le{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Se:a.status==="dirty"?(n.dirty(),bd(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Se:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new L_({in:t,out:n,typeName:je.ZodPipeline})}}class zw extends Le{_parse(t){const n=this._def.innerType._parse(t),r=i=>(Dc(i)&&(i.value=Object.freeze(i.value)),i);return ag(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}zw.create=(e,t)=>new zw({innerType:e,typeName:je.ZodReadonly,...Ne(t)});_t.lazycreate;var je;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(je||(je={}));const vo=rs.create;As.create;Ni.create;const L4=_t.create;_t.strictCreate;og.create;lg.create;Go.create;const iJ=Lc.create;cg.create;ps.create;Bc.create;var _i=function(){return _i=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},_i.apply(this,arguments)};function Eu(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function aJ(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(f){try{u(r.next(f))}catch(d){s(d)}}function c(f){try{u(r.throw(f))}catch(d){s(d)}}function u(f){f.done?a(f.value):i(f.value).then(o,c)}u((r=r.apply(e,t||[])).next())})}function sJ(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}const oJ=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class F_ extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}}class lJ extends F_{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class WP extends F_{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class HP extends F_{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Vw;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(Vw||(Vw={}));
379class cJ{constructor(t,{headers:n={},customFetch:r,region:i=Vw.Any}={}){this.url=t,this.headers=n,this.region=i,this.fetch=oJ(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return aJ(this,arguments,void 0,function*(n,r={}){var i;let a,s;try{const{headers:o,method:c,body:u,signal:f,timeout:d}=r;let h={},{region:p}=r;p||(p=this.region);const g=new URL(`${this.url}/${n}`);p&&p!=="any"&&(h["x-region"]=p,g.searchParams.set("forceFunctionRegion",p));let m;u&&(o&&!Object.prototype.hasOwnProperty.call(o,"Content-Type")||!o)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(h["Content-Type"]="application/octet-stream",m=u):typeof u=="string"?(h["Content-Type"]="text/plain",m=u):typeof FormData<"u"&&u instanceof FormData?m=u:(h["Content-Type"]="application/json",m=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?m=JSON.stringify(u):m=u;let y=f;d&&(s=new AbortController,a=setTimeout(()=>s.abort(),d),f?(y=s.signal,f.addEventListener("abort",()=>s.abort())):y=s.signal);const v=yield this.fetch(g.toString(),{method:c||"POST",headers:Object.assign(Object.assign(Object.assign({},h),this.headers),o),body:m,signal:y}).catch(S=>{throw new lJ(S)}),b=v.headers.get("x-relay-error");if(b&&b==="true")throw new WP(v);if(!v.ok)throw new HP(v);let x=((i=v.headers.get("Content-Type"))!==null&&i!==void 0?i:"text/plain").split(";")[0].trim(),j;return x==="application/json"?j=yield v.json():x==="application/octet-stream"||x==="application/pdf"?j=yield v.blob():x==="text/event-stream"?j=v:x==="multipart/form-data"?j=yield v.formData():j=yield v.text(),{data:j,error:null,response:v}}catch(o){return{data:null,error:o,response:o instanceof HP||o instanceof WP?o.context:void 0}}finally{a&&clearTimeout(a)}})}}var uJ=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
379de=e.code}},dJ=class{constructor(e){var t,n,r;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(n=e.isMaybeSingle)!==null&&n!==void 0?n:!1,this.urlLengthLimit=(r=e.urlLengthLimit)!==null&&r!==void 0?r:8e3,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}then(e,t){var n=this;this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const r=this.fetch;let i=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async a=>{let s=null,o=null,c=null,u=a.status,f=a.statusText;if(a.ok){var d,h;if(n.method!=="HEAD"){var p;const v=await a.text();v===""||(n.headers.get("Accept")==="text/csv"||n.headers.get("Accept")&&(!((p=n.headers.get("Accept"))===null||p===void 0)&&p.includes("application/vnd.pgrst.plan+text"))?o=v:o=JSON.parse(v))}const m=(d=n.headers.get("Prefer"))===null||d===void 0?void 0:d.match(/count=(exact|planned|estimated)/),y=(h=a.headers.get("content-range"))===null||h===void 0?void 0:h.split("/");m&&y&&y.length>1&&(c=parseInt(y[1])),n.isMaybeSingle&&n.method==="GET"&&Array.isArray(o)&&(o.length>1?(s={code:"PGRST116",details:`Results contain ${o.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},o=null,c=null,u=406,f="Not Acceptable"):o.length===1?o=o[0]:o=null)}else{var g;const m=await a.text();try{s=JSON.parse(m),Array.isArray(s)&&a.status===404&&(o=[],s=null,u=200,f="OK")}catch{a.status===404&&m===""?(u=204,f="No Content"):s={message:m}}if(s&&n.isMaybeSingle&&(!(s==null||(g=s.details)===null||g===void 0)&&g.includes("0 rows"))&&(s=null,u=200,f="OK"),s&&n.shouldThrowOnError)throw new uJ(s)}return{error:s,data:o,count:c,status:u,statusText:f}});return this.shouldThrowOnError||(i=i.catch(a=>{var s;let o="",c="",u="";const f=a==null?void 0:a.cause;if(f){var d,h,p,g;const v=(d=f==null?void 0:f.message)!==null&&d!==void 0?d:"",b=(h=f==null?void 0:f.code)!==null&&h!==void 0?h:"";o=`${(p=a==null?void 0:a.name)!==null&&p!==void 0?p:"FetchError"}: ${a==null?void 0:a.message}`,o+=`
380
381Caused by: ${(g=f==null?void 0:f.name)!==null&&g!==void 0?g:"Error"}: ${v}`,b&&(o+=` (${b})`),f!=null&&f.stack&&(o+=`
382${f.stack}`)}else{var m;o=(m=a==null?void 0:a.stack)!==null&&m!==void 0?m:""}const y=this.url.toString().length;return(a==null?void 0:a.name)==="AbortError"||(a==null?void 0:a.code)==="ABORT_ERR"?(u="",c="Request was aborted (timeout or manual cancellation)",y>this.urlLengthLimit&&(c+=`. Note: Your request URL is ${y} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((f==null?void 0:f.name)==="HeadersOverflowError"||(f==null?void 0:f.code)==="UND_ERR_HEADERS_OVERFLOW")&&(u="",c="HTTP headers exceeded server limits (typically 16KB)",y>this.urlLengthLimit&&(c+=`. Your request URL is ${y} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{error:{message:`${(s=a==null?void 0:a.name)!==null&&s!==void 0?s:"FetchError"}: ${a==null?void 0:a.message}`,details:o,hint:c,code:u},data:null,count:null,status:0,statusText:""}})),i.then(e,t)}returns(){return this}overrideTypes(){return this}},fJ=class extends dJ{select(e){let t=!1;const n=(e??"*").split("").map(r=>/\s/.test(r)&&!t?"":(r==='"'&&(t=!t),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:n,foreignTable:r,referencedTable:i=r}={}){const a=i?`${i}.order`:"order",s=this.url.searchParams.get(a);return this.url.searchParams.set(a,`${s?`${s},`:""}${e}.${t?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:n=t}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,t,{foreignTable:n,referencedTable:r=n}={}){const i=typeof r>"u"?"offset":`${r}.offset`,a=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(i,`${e}`),this.url.searchParams.set(a,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
382explain({analyze:e=!1,verbose:t=!1,settings:n=!1,buffers:r=!1,wal:i=!1,format:a="text"}={}){var s;const o=[e?"analyze":null,t?"verbose":null,n?"settings":null,r?"buffers":null,i?"wal":null].filter(Boolean).join("|"),c=(s=this.headers.get("Accept"))!==null&&s!==void 0?s:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${a}; for="${c}"; options=${o};`),a==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const GP=new RegExp("[,()]");var Cl=class extends fJ{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&GP.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`in.(${n})`),this}notIn(e,t){const n=Array.from(new Set(t)).map(r=>typeof r=="string"&&GP.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`not.in.(${n})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:n,type:r}={}){let i="";r==="plain"?i="pl":r==="phrase"?i="ph":r==="websearch"&&(i="w");const a=n===void 0?"":`(${n})`;return this.url.searchParams.append(e,`${i}fts${a}.${t}`),this}match(e){return Object.entries(e).forEach(([t,n])=>{this.url.searchParams.append(t,`eq.${n}`)}),this}not(e,t,n){return this.url.searchParams.append(e,`not.${t}.${n}`),this}or(e,{foreignTable:t,referencedTable:n=t}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${e})`),this}filter(e,t,n){return this.url.searchParams.append(e,`${t}.${n}`),this}},hJ=class{constructor(e,{headers:t={},schema:n,fetch:r,urlLengthLimit:i=8e3}){this.url=e,this.headers=new Headers(t),this.schema=n,this.fetch=r,this.urlLengthLimit=i}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:n=!1,count:r}=t??{},i=n?"HEAD":"GET";let a=!1;const s=(e??"*").split("").map(u=>/\s/.test(u)&&!a?"":(u==='"'&&(a=!a),u)).join(""),{url:o,headers:c}=this.cloneRequestState();return o.searchParams.set("select",s),r&&c.append("Prefer",`count=${r}`),new Cl({method:i,url:o,headers:c,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}insert(e,{count:t,defaultToNull:n=!0}={}){var r;const i="POST",{url:a,headers:s}=this.cloneRequestState();if(t&&s.append("Prefer",`count=${t}`),n||s.append("Prefer","missing=default"),Array.isArray(e)){const o=e.reduce((c,u)=>c.concat(Object.keys(u)),[]);if(o.length>0){const c=[...new Set(o)].map(u=>`"${u}"`);a.searchParams.set("columns",c.join(","))}}return new Cl({method:i,url:a,headers:s,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit})}upsert(e,{onConflict:t,ignoreDuplicates:n=!1,count:r,defaultToNull:i=!0}={}){var a;const s="POST",{url:o,headers:c}=this.cloneRequestState();if(c.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),t!==void 0&&o.searchParams.set("on_conflict",t),r&&c.append("Prefer",`count=${r}`),i||c.append("Prefer","missing=default"),Array.isArray(e)){const u=e.reduce((f,d)=>f.concat(Object.keys(d)),[]);if(u.length>0){const f=[...new Set(u)].map(d=>`"${d}"`);o.searchParams.set("columns",f.join(","))}}return new Cl({method:s,url:o,headers:c,schema:this.schema,body:e,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit})}update(e,{count:t}={}){var n;const r="PATCH",{url:i,headers:a}=this.cloneRequestState();return t&&a.append("Prefer",`count=${t}`),new Cl({method:r,url:i,headers:a,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit})}delete({count:e}={}){var t;const n="DELETE",{url:r,headers:i}=this.cloneRequestState();return e&&i.append("Prefer",`count=${e}`),new Cl({method:n,url:r,headers:i,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit})}};function Af(e){"@babel/helpers - typeof";return Af=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},Af(e)}function pJ(e,t){if(Af(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Af(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mJ(e){var t=pJ(e,"string");return Af(t)=="symbol"?t:t+""}function gJ(e,t,n){return(t=mJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,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 bp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
382t%2?KP(Object(n),!0).forEach(function(r){gJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var yJ=class F4{constructor(t,{headers:n={},schema:r,fetch:i,timeout:a,urlLengthLimit:s=8e3}={}){this.url=t,this.headers=new Headers(n),this.schemaName=r,this.urlLengthLimit=s;const o=i??globalThis.fetch;a!==void 0&&a>0?this.fetch=(c,u)=>{const f=new AbortController,d=setTimeout(()=>f.abort(),a),h=u==null?void 0:u.signal;if(h){if(h.aborted)return clearTimeout(d),o(c,u);const p=()=>{clearTimeout(d),f.abort()};return h.addEventListener("abort",p,{once:!0}),o(c,bp(bp({},u),{},{signal:f.signal})).finally(()=>{clearTimeout(d),h.removeEventListener("abort",p)})}return o(c,bp(bp({},u),{},{signal:f.signal})).finally(()=>clearTimeout(d))}:this.fetch=o}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new hJ(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}schema(t){return new F4(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}rpc(t,n={},{head:r=!1,get:i=!1,count:a}={}){var s;let o;const c=new URL(`${this.url}/rpc/${t}`);let u;const f=p=>p!==null&&typeof p=="object"&&(!Array.isArray(p)||p.some(f)),d=r&&Object.values(n).some(f);d?(o="POST",u=n):r||i?(o=r?"HEAD":"GET",Object.entries(n).filter(([p,g])=>g!==void 0).map(([p,g])=>[p,Array.isArray(g)?`{${g.join(",")}}`:`${g}`]).forEach(([p,g])=>{c.searchParams.append(p,g)})):(o="POST",u=n);const h=new Headers(this.headers);return d?h.set("Prefer",a?`count=${a},return=minimal`:"return=minimal"):a&&h.set("Prefer",`count=${a}`),new Cl({method:o,url:c,headers:h,schema:this.schemaName,body:u,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit})}};class vJ{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const n=globalThis.process;if(n){const r=n.versions;if(r&&r.node){const i=r.node,a=parseInt(i.replace(/^v/,"").split(".")[0]);return a>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${a} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${a} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
383import ws from "ws"
384new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let n=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(n+=`
385
386Suggested solution: ${t.workaround}`),new Error(n)}static createWebSocket(t,n){const r=this.getWebSocketConstructor();return new r(t,n)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const xJ="2.94.1",bJ=`realtime-js/${xJ}`,wJ="1.0.0",B4="2.0.0",YP=B4,Ww=1e4,SJ=1e3,jJ=100;var qa;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(qa||(qa={}));var Ft;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(Ft||(Ft={}));var ti;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(ti||(ti={}));var Hw;(function(e){e.websocket="websocket"})(Hw||(Hw={}));var co;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(co||(co={}));class _J{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,n){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(t));let r=[t.join_ref,t.ref,t.topic,t.event,t.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(t){var n;return this._isArrayBuffer((n=t.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var n,r;const i=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,i)}_encodeJsonUserBroadcastPush(t){var n,r;const i=(r=(n=t.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},s=new TextEncoder().encode(JSON.stringify(i)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,s)}_encodeUserBroadcastPush(t,n,r){var i,a;const s=t.topic,o=(i=t.ref)!==null&&i!==void 0?i:"",c=(a=t.join_ref)!==null&&a!==void 0?a:"",u=t.payload.event,f=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},d=Object.keys(f).length===0?"":JSON.stringify(f);
386if(c.length>255)throw new Error(`joinRef length ${c.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`ref length ${o.length} exceeds maximum of 255`);if(s.length>255)throw new Error(`topic length ${s.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`metadata length ${d.length} exceeds maximum of 255`);const h=this.USER_BROADCAST_PUSH_META_LENGTH+c.length+o.length+s.length+u.length+d.length,p=new ArrayBuffer(this.HEADER_LENGTH+h);let g=new DataView(p),m=0;g.setUint8(m++,this.KINDS.userBroadcastPush),g.setUint8(m++,c.length),g.setUint8(m++,o.length),g.setUint8(m++,s.length),g.setUint8(m++,u.length),g.setUint8(m++,d.length),g.setUint8(m++,n),Array.from(c,v=>g.setUint8(m++,v.charCodeAt(0))),Array.from(o,v=>g.setUint8(m++,v.charCodeAt(0))),Array.from(s,v=>g.setUint8(m++,v.charCodeAt(0))),Array.from(u,v=>g.setUint8(m++,v.charCodeAt(0))),Array.from(d,v=>g.setUint8(m++,v.charCodeAt(0)));var y=new Uint8Array(p.byteLength+r.byteLength);return y.set(new Uint8Array(p),0),y.set(new Uint8Array(r),p.byteLength),y.buffer}decode(t,n){if(this._isArrayBuffer(t)){let r=this._binaryDecode(t);return n(r)}if(typeof t=="string"){const r=JSON.parse(t),[i,a,s,o,c]=r;return n({join_ref:i,ref:a,topic:s,event:o,payload:c})}return n({})}_binaryDecode(t){const n=new DataView(t),r=n.getUint8(0),i=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,n,i)}}_decodeUserBroadcast(t,n,r){const i=n.getUint8(1),a=n.getUint8(2),s=n.getUint8(3),o=n.getUint8(4);let c=this.HEADER_LENGTH+4;const u=r.decode(t.slice(c,c+i));c=c+i;const f=r.decode(t.slice(c,c+a));c=c+a;const d=r.decode(t.slice(c,c+s));c=c+s;const h=t.slice(c,t.byteLength),p=o===this.JSON_ENCODING?JSON.parse(r.decode(h)):h,g={type:this.BROADCAST_EVENT,event:f,payload:p};return s>0&&(g.meta=JSON.parse(d)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:g}}_isArrayBuffer(t){var n;return t instanceof ArrayBuffer||((n=t==null?void 0:t.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(t,n){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([r])=>n.includes(r)))}}class U4{constructor(t,n){this.callback=t,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=n}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var tt;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(tt||(tt={}));const XP=(e,t,n={})=>{var r;const i=(r=n.skipTypes)!==null&&r!==void 0?r:[];return t?Object.keys(t).reduce((a,s)=>(a[s]=AJ(s,e,t,i),a),{}):{}},AJ=(e,t,n,r)=>{const i=t.find(o=>o.name===e),a=i==null?void 0:i.type,s=n[e];return a&&!r.includes(a)?q4(a,s):Gw(s)},q4=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return PJ(t,n)}switch(e){case tt.bool:return kJ(t);case tt.float4:case tt.float8:case tt.int2:case tt.int4:case tt.int8:case tt.numeric:case tt.oid:return EJ(t);case tt.json:case tt.jsonb:return CJ(t);case tt.timestamp:return TJ(t);case tt.abstime:case tt.date:case tt.daterange:case tt.int4range:case tt.int8range:case tt.money:case tt.reltime:case tt.text:case tt.time:case tt.timestamptz:case tt.timetz:case tt.tsrange:case tt.tstzrange:return Gw(t);default:return Gw(t)}},Gw=e=>e,kJ=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},EJ=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},CJ=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},PJ=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let a;const s=e.slice(1,n);try{a=JSON.parse("["+s+"]")}catch{a=s?s.split(","):[]}return a.map(o=>q4(t,o))}return e},TJ=e=>typeof e=="string"?e.replace(" ","T"):e,z4=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};
386class ub{constructor(t,n,r={},i=Ww){this.channel=t,this.event=n,this.payload=r,this.timeout=i,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,n){var r;return this._hasReceived(t)&&n((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:t,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:n})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:n}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(n))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var ZP;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(ZP||(ZP={}));class Fd{constructor(t,n){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},i=>{const{onJoin:a,onLeave:s,onSync:o}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Fd.syncState(this.state,i,a,s),this.pendingDiffs.forEach(c=>{this.state=Fd.syncDiff(this.state,c,a,s)}),this.pendingDiffs=[],o()}),this.channel._on(r.diff,{},i=>{const{onJoin:a,onLeave:s,onSync:o}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=Fd.syncDiff(this.state,i,a,s),o())}),this.onJoin((i,a,s)=>{this.channel._trigger("presence",{event:"join",key:i,currentPresences:a,newPresences:s})}),this.onLeave((i,a,s)=>{this.channel._trigger("presence",{event:"leave",key:i,currentPresences:a,leftPresences:s})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,n,r,i){const a=this.cloneDeep(t),s=this.transformState(n),o={},c={};return this.map(a,(u,f)=>{s[u]||(c[u]=f)}),this.map(s,(u,f)=>{const d=a[u];if(d){const h=f.map(y=>y.presence_ref),p=d.map(y=>y.presence_ref),g=f.filter(y=>p.indexOf(y.presence_ref)<0),m=d.filter(y=>h.indexOf(y.presence_ref)<0);g.length>0&&(o[u]=g),m.length>0&&(c[u]=m)}else o[u]=f}),this.syncDiff(a,{joins:o,leaves:c},r,i)}static syncDiff(t,n,r,i){const{joins:a,leaves:s}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return r||(r=()=>{}),i||(i=()=>{}),this.map(a,(o,c)=>{var u;const f=(u=t[o])!==null&&u!==void 0?u:[];if(t[o]=this.cloneDeep(c),f.length>0){const d=t[o].map(p=>p.presence_ref),h=f.filter(p=>d.indexOf(p.presence_ref)<0);t[o].unshift(...h)}r(o,f,c)}),this.map(s,(o,c)=>{let u=t[o];if(!u)return;const f=c.map(d=>d.presence_ref);u=u.filter(d=>f.indexOf(d.presence_ref)<0),t[o]=u,i(o,u,c),u.length===0&&delete t[o]}),t}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const i=t[r];return"metas"in i?n[r]=i.metas.map(a=>(a.presence_ref=a.phx_ref,delete a.phx_ref,delete a.phx_ref_prev,a)):n[r]=i,n},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var QP;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(QP||(QP={}));var Bd;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(Bd||(Bd={}));var Gi;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Gi||(Gi={}));class Kl{constructor(t,n={config:{}},r){var i,a;if(this.topic=t,this.params=n,this.socket=r,this.bindings={},this.state=Ft.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.timeout=this.socket.timeout,this.joinPush=new ub(this,ti.join,this.params,this.timeout),this.rejoinTimer=new U4(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Ft.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(s=>s.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Ft.closed,this.socket._remove(this)}),this._onError(s=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,s),this.state=Ft.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Ft.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",s=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,s),this.state=Ft.errored,this.rejoinTimer.scheduleTimeout())}),this._on(ti.reply,{},(s,o)=>{this._trigger(this._replyEventName(o),s)}),this.presence=new Fd(this),this.broadcastEndpointURL=z4(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((a=(i=this.params.config)===null||i===void 0?void 0:i.broadcast)===null||a===void 0)&&a.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,n=this.timeout){var r,i,a;if(this.socket.isConnected()||this.socket.connect(),this.state==Ft.closed){const{config:{broadcast:s,presence:o,private:c}}=this.params,u=(i=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(p=>p.filter))!==null&&i!==void 0?i:[],f=!!this.bindings[Bd.PRESENCE]&&this.bindings[Bd.PRESENCE].length>0||((a=this.params.config.presence)===null||a===void 0?void 0:a.enabled)===!0,d={},h={broadcast:s,presence:Object.assign(Object.assign({},o),{enabled:f}),postgres_changes:u,private:c};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(p=>t==null?void 0:t(Gi.CHANNEL_ERROR,p)),this._onClose(()=>t==null?void 0:t(Gi.CLOSED)),this.updateJoinPayload(Object.assign({config:h},d)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",async({postgres_changes:p})=>{var g;if(this.socket._isManualToken()||this.socket.setAuth(),p===void 0){t==null||t(Gi.SUBSCRIBED);return}else{const m=this.bindings.postgres_changes,y=(g=m==null?void 0:m.length)!==null&&g!==void 0?g:0,v=[];for(let b=0;b<y;
386b++){const x=m[b],{filter:{event:j,schema:S,table:_,filter:A}}=x,k=p&&p[b];if(k&&k.event===j&&Kl.isFilterValueEqual(k.schema,S)&&Kl.isFilterValueEqual(k.table,_)&&Kl.isFilterValueEqual(k.filter,A))v.push(Object.assign(Object.assign({},x),{id:k.id}));else{this.unsubscribe(),this.state=Ft.errored,t==null||t(Gi.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=v,t&&t(Gi.SUBSCRIBED);return}}).receive("error",p=>{this.state=Ft.errored,t==null||t(Gi.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(p).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(Gi.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){return this.state===Ft.joined&&t===Bd.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(async()=>await this.subscribe())),this._on(t,n,r)}async httpSend(t,n,r={}){var i;if(n==null)return Promise.reject("Payload is required for httpSend()");const a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const s={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:n,private:this.private}]})},o=await this._fetchWithTimeout(this.broadcastEndpointURL,s,(i=r.timeout)!==null&&i!==void 0?i:this.timeout);if(o.status===202)return{success:!0};let c=o.statusText;try{const u=await o.json();c=u.error||u.message||c}catch{}return Promise.reject(new Error(c))}async send(t,n={}){var r,i;if(!this._canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated 
386in the future. Please use httpSend() explicitly for REST delivery.");const{event:a,payload:s}=t,o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c={method:"POST",headers:o,body:JSON.stringify({messages:[{topic:this.subTopic,event:a,payload:s,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((i=u.body)===null||i===void 0?void 0:i.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(a=>{var s,o,c;const u=this._push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((c=(o=(s=this.params)===null||s===void 0?void 0:s.config)===null||o===void 0?void 0:o.broadcast)===null||c===void 0)&&c.ack)&&a("ok"),u.receive("ok",()=>a("ok")),u.receive("error",()=>a("error")),u.receive("timeout",()=>a("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=Ft.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(ti.close,"leave",this._joinRef())};this.joinPush.destroy();let r=null;return new Promise(i=>{r=new ub(this,ti.leave,{},t),r.receive("ok",()=>{n(),i("ok")}).receive("timeout",()=>{n(),i("timed out")}).receive("error",()=>{i("error")}),r.send(),this._canPush()||r.trigger("ok",{})}).finally(()=>{r==null||r.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Ft.closed,this.bindings={}}async _fetchWithTimeout(t,n,r){const i=new AbortController,a=setTimeout(()=>i.abort(),r),s=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:i.signal}));return clearTimeout(a),s}_push(t,n,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let i=new ub(this,t,n,r);return this._canPush()?i.send():this._addToPushBuffer(i),i}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>jJ){const n=this.pushBuffer.shift();n&&(n.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${n.event}`,n.payload))}}_onMessage(t,n,r){return n}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,n,r){var i,a;const s=t.toLocaleLowerCase(),{close:o,error:c,leave:u,join:f}=ti;if(r&&[o,c,u,f].indexOf(s)>=0&&r!==this._joinRef())return;let h=this._onMessage(s,n,r);if(n&&!h)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(s)?(i=this.bindings.postgres_changes)===null||i===void 0||i.filter(p=>{var g,m,y;return((g=p.filter)===null||g===void 0?void 0:g.event)==="*"||((y=(m=p.filter)===null||m===void 0?void 0:m.event)===null||y===void 0?void 0:y.toLocaleLowerCase())===s}).map(p=>p.callback(h,r)):(a=this.bindings[s])===null||a===void 0||a.filter(p=>{var g,m,y,v,b,x;if(["broadcast","presence","postgres_changes"].includes(s))if("id"in p){const j=p.id,S=(g=p.filter)===null||g===void 0?void 0:g.event;return j&&((m=n.ids)===null||m===void 0?void 0:m.includes(j))&&(S==="*"||(S==null?void 0:S.toLocaleLowerCase())===((y=n.data)===null||y===void 0?void 0:y.type.toLocaleLowerCase()))}else{const j=(b=(v=p==null?void 0:p.filter)===null||v===void 0?void 0:v.event)===null||b===void 0?void 0:b.toLocaleLowerCase();return j==="*"||j===((x=n==null?void 0:n.event)===null||x===void 0?void 0:x.toLocaleLowerCase())}else return p.type.toLocaleLowerCase()===s}).map(p=>{if(typeof h=="object"&&"ids"in h){const g=h.data,{schema:m,table:y,commit_timestamp:v,type:b,errors:x}=g;h=Object.assign(Object.assign({},{schema:m,table:y,commit_timestamp:v,eventType:b,new:{},old:{},errors:x}),this._getPayloadRecords(g))}p.callback(h,r)})}_isClosed(){return this.state===Ft.closed}_isJoined(){return this.state===Ft.joined}_isJoining(){return this.state===Ft.joining}_isLeaving(){return this.state===Ft.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,n,r){const i=t.toLocaleLowerCase(),a={type:i,filter:n,callback:r};return this.bindings[i]?this.bindings[i].push(a):this.bindings[i]=[a],this}_off(t,n){const r=t.toLocaleLowerCase();return this.bindings[r]&&(this.bindings[r]=this.bindings[r].filter(i=>{var a;return!(((a=i.type)===null||a===void 0?void 0:a.toLocaleLowerCase())===r&&Kl.isEqual(i.filter,n))})),this}static isEqual(t,n){if(Object.keys(t).length!==Object.keys(n).length)return!1;for(const r in t)if(t[r]!==n[r])return!1;return!0}static isFilterValueEqual(t,n){return(t??void 0)===(n??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(ti.close,{},t)}_onError(t){this._on(ti.error,{},n=>t(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Ft.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=XP(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=XP(t.columns,t.old_record)),n}}const db=()=>{},wp={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},OJ=[1e3,2e3,5e3,1e4],NJ=1e4,IJ=`
387  addEventListener("message", (e) => {
388    if (e.data.event === "start") {
389      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
390    }
391  });`;class RJ{constructor(t,n){var r;if(this.accessTokenValue=null,this.apiKey=null,this._manuallySetToken=!1,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=Ww,this.transport=null,this.heartbeatIntervalMs=wp.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=db,this.ref=0,this.reconnectTimer=null,this.vsn=YP,this.logger=
391db,this.conn=null,this.sendBuffer=[],this.serializer=new _J,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._heartbeatSentAt=null,this._resolveFetch=i=>i?(...a)=>i(...a):(...a)=>fetch(...a),!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey,this.endPoint=`${t}/${Hw.websocket}`,this.httpEndpoint=z4(t),this._initializeOptions(n),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=vJ.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const n=t.message;throw n.includes("Node.js")?new Error(`${n}
392
393To use Realtime in Node.js, you need to provide a WebSocket implementation:
394
395Option 1: Use Node.js 22+ which has native WebSocket support
396Option 2: Install and provide the "ws" package:
397
398  npm install ws
399
400  import ws from "ws"
401  const client = new RealtimeClient(url, {
402    ...options,
403    transport: ws
404  })`):new Error(`WebSocket not available: ${n}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(t,n){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const r=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(r),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(t?this.conn.close(t,n??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,n,r){this.logger(t,n,r)}connectionState(){switch(this.conn&&this.conn.readyState){case qa.connecting:return co.Connecting;case qa.open:return co.Open;case qa.closing:return co.Closing;default:return co.Closed}}isConnected(){return this.connectionState()===co.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,n={config:{}}){const r=`realtime:${t}`,i=this.getChannels().find(a=>a.topic===r);if(i)return i;{const a=new Kl(`realtime:${t}`,n,this);return this.channels.push(a),a}}push(t){const{topic:n,event:r,payload:i,ref:a}=t,s=()=>{this.encode(t,o=>{var c;(c=this.conn)===null||c===void 0||c.send(o)})};this.log("push",`${n} ${r} (${a})`,i),this.isConnected()?s():this.sendBuffer.push(s)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var t;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(n){this.log("error","error in heartbeat callback",n)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this._heartbeatSentAt=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(n){this.log("error","error in heartbeat callback",n)}this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(SJ,"heartbeat timeout"),setTimeout(()=>{var n;this.isConnected()||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout()},wp.HEARTBEAT_TIMEOUT_FALLBACK);return}this._heartbeatSentAt=Date.now(),this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(n){this.log("error","error in heartbeat callback",n)}this._setAuthSafely("heartbeat")}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let n=this.channels.find(r=>r.topic===t&&(r._isJoined()||r._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${t}"`),n.unsubscribe())}_remove(t){this.channels=this.channels.filter(n=>n.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,n=>
404{if(n.topic==="phoenix"&&n.event==="phx_reply"&&n.ref&&n.ref===this.pendingHeartbeatRef){const u=this._heartbeatSentAt?Date.now()-this._heartbeatSentAt:void 0;try{this.heartbeatCallback(n.payload.status==="ok"?"ok":"error",u)}catch(f){this.log("error","error in heartbeat callback",f)}this._heartbeatSentAt=null,this.pendingHeartbeatRef=null}const{topic:r,event:i,payload:a,ref:s}=n,o=s?`(${s})`:"",c=a.status||"";this.log("receive",`${c} ${r} ${i} ${o}`.trim(),a),this.channels.filter(u=>u._isMember(r)).forEach(u=>u._trigger(i,a,s)),this._triggerStateCallbacks("message",n)})}_clearTimer(t){var n;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((n=this.reconnectTimer)===null||n===void 0||n.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t),this.conn.readyState===qa.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===qa.open||this.conn.readyState===qa.connecting)try{this.conn.close()}catch(t){this.log("error","Error closing connection",t)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this._terminateWorker(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.flushSendBuffer()}).catch(n=>{this.log("error","error waiting for auth on connect",n),this.flushSendBuffer()}),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_onConnClose(t){var n;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(n=this.reconnectTimer)===null||n===void 0||n.scheduleTimeout(),this._triggerStateCallbacks("close",t)}_onConnError(t){this._setConnectionState("disconnected"),this.log("transport",`${t}`),this._triggerChanError(),this._triggerStateCallbacks("error",t);try{this.heartbeatCallback("error")}catch(n){this.log("error","error in heartbeat callback",n)}}_triggerChanError(){this.channels.forEach(t=>t._trigger(ti.error))}_appendParams(t,n){if(Object.keys(n).length===0)return t;const r=t.match(/\?/)?"&":"?",i=new URLSearchParams(n);return`${t}${r}${i}`}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([IJ],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_setConnectionState(t,n=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=n)}async _performAuth(t=null){let n,r=!1;if(t)n=t,r=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(i){this.log("error","Error fetching access token from callback",i),n=this.accessTokenValue}else n=this.accessTokenValue;r?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEac
404h(i=>{const a={access_token:n,version:bJ};n&&i.updateJoinPayload(a),i.joinedOnce&&i._isJoined()&&i._push(ti.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${t}`,n)})}_triggerStateCallbacks(t,n){try{this.stateChangeCallbacks[t].forEach(r=>{try{r(n)}catch(i){this.log("error",`error in ${t} callback`,i)}})}catch(r){this.log("error",`error triggering ${t} callbacks`,r)}}_setupReconnectionTimer(){this.reconnectTimer=new U4(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},wp.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var n,r,i,a,s,o,c,u,f,d,h,p;switch(this.transport=(n=t==null?void 0:t.transport)!==null&&n!==void 0?n:null,this.timeout=(r=t==null?void 0:t.timeout)!==null&&r!==void 0?r:Ww,this.heartbeatIntervalMs=(i=t==null?void 0:t.heartbeatIntervalMs)!==null&&i!==void 0?i:wp.HEARTBEAT_INTERVAL,this.worker=(a=t==null?void 0:t.worker)!==null&&a!==void 0?a:!1,this.accessToken=(s=t==null?void 0:t.accessToken)!==null&&s!==void 0?s:null,this.heartbeatCallback=(o=t==null?void 0:t.heartbeatCallback)!==null&&o!==void 0?o:db,this.vsn=(c=t==null?void 0:t.vsn)!==null&&c!==void 0?c:YP,t!=null&&t.params&&(this.params=t.params),t!=null&&t.logger&&(this.logger=t.logger),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(u=t==null?void 0:t.reconnectAfterMs)!==null&&u!==void 0?u:g=>OJ[g-1]||NJ,this.vsn){case wJ:this.encode=(f=t==null?void 0:t.encode)!==null&&f!==void 0?f:(g,m)=>m(JSON.stringify(g)),this.decode=(d=t==null?void 0:t.decode)!==null&&d!==void 0?d:(g,m)=>m(JSON.parse(g));break;case B4:this.encode=(h=t==null?void 0:t.encode)!==null&&h!==void 0?h:this.serializer.encode.bind(this.serializer),this.decode=(p=t==null?void 0:t.decode)!==null&&p!==void 0?p:this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl}}}var kf=class extends Error{constructor(e,t){var n;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((n=t.icebergType)==null?void 0:n.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function MJ(e,t,n){const r=new URL(t,e);if(n)for(const[i,a]of Object.entries(n))a!==void 0&&r.searchParams.set(i,a);return r.toString()}async function $J(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function DJ(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:i,body:a,headers:s}){const o=MJ(e.baseUrl,r,i),c=await $J(e.auth),u=await t(o,{method:n,headers:{...a?{"Content-Type":"application/json"}:{},...c,...s},body:a?JSON.stringify(a):void 0}),f=await u.text(),d=(u.headers.get("content-type")||"").includes("application/json"),h=d&&f?JSON.parse(f):f;if(!u.ok){const p=d?h:void 0,g=p==null?void 0:p.error;throw new kf((g==null?void 0:g.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:g==null?void 0:g.type,icebergCode:g==null?void 0:g.code,details:p})}return{status:u.status,headers:u.headers,data:h}}}}function Sp(e){return e.join("�")}var LJ=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Sp(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(e,t){const n={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Sp(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Sp(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Sp(e.namespace)}`}),!0}catch(t){if(t instanceof kf&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(n){if(n instanceof kf&&n.status===409)return;throw n}}};function ml(e){return e.join("�")}var FJ=class{constructor(e,t="",n){this.client=e,this.prefix=t,this.accessDelegation=n}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ml(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ml(e.namespace)}/tables`,body:t,headers:n})).data.metadata}async updateTable(e,t){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ml(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${ml(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ml(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${ml(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(n){if(n instanceof kf&&n.status===404)return!1;throw n}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(n){if(n instanceof kf&&n.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw n}}},BJ=class{constructor(e){var r;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const n=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=DJ({baseUrl:n,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(r=e.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new LJ(this.client,t),this.tableOps=new FJ(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
404async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}},Xy=class extends Error{constructor(e,t="storage",n,r){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=r}};function Zy(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var jp=class extends Xy{constructor(e,t,n,r="storage"){super(e,r,t,n),this.name=r==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},V4=class extends Xy{constructor(e,t,n="storage"){super(e,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};const UJ=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),qJ=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Kw=e=>{if(Array.isArray(e))return e.map(n=>Kw(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const i=n.replace(/([-_][a-z])/gi,a=>a.toUpperCase().replace(/[-_]/g,""));t[i]=Kw(r)}),t},zJ=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function Ef(e){"@babel/helpers - typeof";return Ef=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},Ef(e)}function VJ(e,t){if(Ef(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ef(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function WJ(e){var t=VJ(e,"string");return Ef(t)=="symbol"?t:t+""}function HJ(e,t,n){return(t=WJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JP(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 pe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JP(Object(n),!0).forEach(function(r){HJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JP(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const eT=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},GJ=async(e,t,n,r)=>{if(e&&typeof e=="object"&&"status"in e&&"ok"in e&&typeof e.status=="number"&&!(n!=null&&n.noResolveJson)){const i=e,a=i.status||500;if(typeof i.json=="function")i.json().then(s=>{const o=(s==null?void 0:s.statusCode)||(s==null?void 0:s.code)||a+"";t(new jp(eT(s),a,o,r))}).catch(()=>{if(r==="vectors"){const s=a+"";t(new jp(i.statusText||`HTTP ${a} error`,a,s,r))}else{const s=a+"";t(new jp(i.statusText||`HTTP ${a} error`,a,s,r))}});else{const s=a+"";t(new jp(i.statusText||`HTTP ${a} error`,a,s,r))}}else t(new V4(eT(e),e,r))},KJ=(e,t,n,r)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||e==="HEAD"||!r?pe(pe({},i),n):(qJ(r)?(i.headers=pe({"Content-Type":"application/json"},t==null?void 0:t.headers),i.body=JSON.stringify(r)):i.body=r,t!=null&&t.duplex&&(i.duplex=t.duplex),pe(pe({},i),n))};async function td(e,t,n,r,i,a,s){return new Promise((o,c)=>{e(n,KJ(t,r,i,a)).then(u=>{if(!u.ok)throw u;if(r!=null&&r.noResolveJson)return u;if(s==="vectors"){const f=u.headers.get("content-type");if(u.headers.get("content-length")==="0"||u.status===204)return{};if(!f||!f.includes("application/json"))return{}}return u.json()}).then(u=>o(u)).catch(u=>GJ(u,c,r,s))})}function W4(e="storage"){return{get:async(t,n,r,i)=>td(t,"GET",n,r,i,void 0,e),post:async(t,n,r,i,a)=>td(t,"POST",n,i,a,r,e),put:async(t,n,r,i,a)=>td(t,"PUT",n,i,a,r,e),head:async(t,n,r,i)=>td(t,"HEAD",n,pe(pe({},r),{},{noResolveJson:!0}),i,void 0,e),remove:async(t,n,r,i,a)=>td(t,"DELETE",n,i,a,r,e)}}const YJ=W4("storage"),{get:Cf,post:Zr,put:Yw,head:XJ,remove:B_}=YJ,Zn=W4("vectors");var Cu=class{constructor(e,t={},n,r="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.fetch=UJ(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(Zy(n))return{data:null,error:n};throw n}}},ZJ=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Zy(t))return{data:null,error:t};throw t}}};let H4;H4=Symbol.toStringTag;var QJ=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[H4]="BlobDownloadBuilder",this.promise=null}asStream(){return new ZJ(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(Zy(t))return{data:null,error:t};throw t}}};const JJ={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},tT={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};
404var eee=class extends Cu{constructor(e,t={},n,r){super(e,t,r,"storage"),this.bucketId=n}async uploadOrUpdate(e,t,n,r){var i=this;return i.handleOperation(async()=>{let a;const s=pe(pe({},tT),r);let o=pe(pe({},i.headers),e==="POST"&&{"x-upsert":String(s.upsert)});const c=s.metadata;typeof Blob<"u"&&n instanceof Blob?(a=new FormData,a.append("cacheControl",s.cacheControl),c&&a.append("metadata",i.encodeMetadata(c)),a.append("",n)):typeof FormData<"u"&&n instanceof FormData?(a=n,a.has("cacheControl")||a.append("cacheControl",s.cacheControl),c&&!a.has("metadata")&&a.append("metadata",i.encodeMetadata(c))):(a=n,o["cache-control"]=`max-age=${s.cacheControl}`,o["content-type"]=s.contentType,c&&(o["x-metadata"]=i.toBase64(i.encodeMetadata(c))),(typeof ReadableStream<"u"&&a instanceof ReadableStream||a&&typeof a=="object"&&"pipe"in a&&typeof a.pipe=="function")&&!s.duplex&&(s.duplex="half")),r!=null&&r.headers&&(o=pe(pe({},o),r.headers));const u=i._removeEmptyFolders(t),f=i._getFinalPath(u),d=await(e=="PUT"?Yw:Zr)(i.fetch,`${i.url}/object/${f}`,a,pe({headers:o},s!=null&&s.duplex?{duplex:s.duplex}:{}));return{path:u,id:d.Id,fullPath:d.Key}})}async upload(e,t,n){return this.uploadOrUpdate("POST",e,t,n)}async uploadToSignedUrl(e,t,n,r){var i=this;const a=i._removeEmptyFolders(e),s=i._getFinalPath(a),o=new URL(i.url+`/object/upload/sign/${s}`);return o.searchParams.set("token",t),i.handleOperation(async()=>{let c;const u=pe({upsert:tT.upsert},r),f=pe(pe({},i.headers),{"x-upsert":String(u.upsert)});return typeof Blob<"u"&&n instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),c.append("",n)):typeof FormData<"u"&&n instanceof FormData?(c=n,c.append("cacheControl",u.cacheControl)):(c=n,f["cache-control"]=`max-age=${u.cacheControl}`,f["content-type"]=u.contentType),{path:a,fullPath:(await Yw(i.fetch,o.toString(),c,{headers:f})).Key}})}async createSignedUploadUrl(e,t){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(e);const i=pe({},n.headers);t!=null&&t.upsert&&(i["x-upsert"]="true");const a=await Zr(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:i}),s=new URL(n.url+a.url),o=s.searchParams.get("token");if(!o)throw new Xy("No token returned by API");return{signedUrl:s.toString(),path:e,token:o}})}async update(e,t,n){return this.uploadOrUpdate("PUT",e,t,n)}async move(e,t,n){var r=this;return r.handleOperation(async()=>await Zr(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,de
404stinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(e,t,n){var r=this;return r.handleOperation(async()=>({path:(await Zr(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:e,destinationKey:t,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(e,t,n){var r=this;return r.handleOperation(async()=>{let i=r._getFinalPath(e),a=await Zr(r.fetch,`${r.url}/object/sign/${i}`,pe({expiresIn:t},n!=null&&n.transform?{transform:n.transform}:{}),{headers:r.headers});const s=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return{signedUrl:encodeURI(`${r.url}${a.signedURL}${s}`)}})}async createSignedUrls(e,t,n){var r=this;return r.handleOperation(async()=>{const i=await Zr(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:t,paths:e},{headers:r.headers}),a=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return i.map(s=>pe(pe({},s),{},{signedUrl:s.signedURL?encodeURI(`${r.url}${s.signedURL}${a}`):null}))})}download(e,t){const n=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",r=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),i=r?`?${r}`:"",a=this._getFinalPath(e),s=()=>Cf(this.fetch,`${this.url}/${n}/${a}${i}`,{headers:this.headers,noResolveJson:!0});return new QJ(s,this.shouldThrowOnError)}async info(e){var t=this;const n=t._getFinalPath(e);return t.handleOperation(async()=>Kw(await Cf(t.fetch,`${t.url}/object/info/${n}`,{headers:t.headers})))}async exists(e){var t=this;const n=t._getFinalPath(e);try{return await XJ(t.fetch,`${t.url}/object/${n}`,{headers:t.headers}),{data:!0,error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(Zy(r)&&r instanceof V4){const i=r.originalError;if([400,404].includes(i==null?void 0:i.status))return{data:!1,error:r}}throw r}}getPublicUrl(e,t){const n=this._getFinalPath(e),r=[],i=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";i!==""&&r.push(i);const a=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",s=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});s!==""&&r.push(s);let o=r.join("&");return o!==""&&(o=`?${o}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${n}${o}`)}}}async remove(e){var t=this;return t.handleOperation(async()=>await B_(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,n){var r=this;return r.handleOperation(async()=>{const i=pe(pe(pe({},JJ),t),{},{prefix:e||""});return await Zr(r.fetch,`${r.url}/object/list/${r.bucketId}`,i,{headers:r.headers},n)})}async listV2(e,t){var n=this;return n.handleOperation(async()=>{const r=pe({},e);return await Zr(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},t)})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}};const tee="2.94.1",Nh={"X-Client-Info":`storage-js/${tee}`};var nee=class extends Cu{constructor(e,t={},n,r){const i=new URL(e);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes("storage.supabase.")&&(i.hostname=i.hostname.replace("supabase.","storage.supabase."));const a=i.href.replace(/\/$/,""),s=pe(pe({},Nh),t);super(a,s,n,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=t.listBucketOptionsToQueryString(e);return await Cf(t.fetch,`${t.url}/bucket${n}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Cf(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var n=this;return n.handleOperation(async()=>await Zr(n.fetch,`${n.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async updateBucket(e,t){var n=this;return n.handleOperation(async()=>await Yw(n.fetch,`${n.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await Zr(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await B_(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}}
404,ree=class extends Cu{constructor(e,t={},n){const r=e.replace(/\/$/,""),i=pe(pe({},Nh),t);super(r,i,n,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Zr(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const n=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&n.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&n.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&n.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&n.set("sortOrder",e.sortOrder),e!=null&&e.search&&n.set("search",e.search);const r=n.toString(),i=r?`${t.url}/bucket?${r}`:`${t.url}/bucket`;return await Cf(t.fetch,i,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await B_(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!zJ(e))throw new Xy("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const n=new BJ({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),r=this.shouldThrowOnError;return new Proxy(n,{get(i,a){const s=i[a];return typeof s!="function"?s:async(...o)=>{try{return{data:await s.apply(i,o),error:null}}catch(c){if(r)throw c;return{data:null,error:c}}}}})}},iee=class extends Cu{constructor(e,t={},n){const r=e.replace(/\/$/,""),i=pe(pe({},Nh),{},{"Content-Type":"application/json"},t);super(r,i,n,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await Zn.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var n=this;return n.handleOperation(async()=>await Zn.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await Zn.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var n=this;return n.handleOperation(async()=>await Zn.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:n.headers})||{})}},aee=class extends Cu{constructor(e,t={},n){const r=e.replace(/\/$/,""),i=pe(pe({},Nh),{},{"Content-Type":"application/json"},t);super(r,i,n,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Zn.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await Zn.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await Zn.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await Zn.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Zn.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},see=class extends Cu{constructor(e,t={},n){const r=e.replace(/\/$/,""),i=pe(pe({},Nh),{},{"Content-Type":"application/json"},t);super(r,i,n,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Zn.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Zn.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await Zn.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Zn.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},oee=class extends see{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new lee(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,n=this;return t().call(n,e)}async getBucket(e){var t=()=>super.getBucket,n=this;return t().call(n,e)}async listBuckets(e={}){var t=()=>super.listBuckets,n=this;return t().call(n,e)}async deleteBucket(e){var t=()=>super.deleteBucket,n=this;return t().call(n,e)}},lee=class extends iee{constructor(e,t,n,r){super(e,t,r),this.vectorBucketName=n}async createIndex(e){var t=()=>super.createIndex,n=this;return t().call(n,pe(pe({},e),{},{vectorBucketName:n.vectorBucketName}))}
404async listIndexes(e={}){var t=()=>super.listIndexes,n=this;return t().call(n,pe(pe({},e),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,n=this;return t().call(n,n.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,n=this;return t().call(n,n.vectorBucketName,e)}index(e){return new cee(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},cee=class extends aee{constructor(e,t,n,r,i){super(e,t,i),this.vectorBucketName=n,this.indexName=r}async putVectors(e){var t=()=>super.putVectors,n=this;return t().call(n,pe(pe({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(e){var t=()=>super.getVectors,n=this;return t().call(n,pe(pe({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,n=this;return t().call(n,pe(pe({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,n=this;return t().call(n,pe(pe({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,n=this;return t().call(n,pe(pe({},e),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},uee=class extends nee{constructor(e,t={},n,r){super(e,t,n,r)}from(e){return new eee(this.url,this.headers,e,this.fetch)}get vectors(){return new oee(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new ree(this.url+"/iceberg",this.headers,this.fetch)}};const G4="2.94.1",Pl=30*1e3,Xw=3,fb=Xw*Pl,dee="http://localhost:9999",fee="supabase.auth.token",hee={"X-Client-Info":`gotrue-js/${G4}`},Zw="X-Supabase-Api-Version",K4={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},pee=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,mee=10*60*1e3;class Pf extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function ce(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class gee extends Pf{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function yee(e){return ce(e)&&e.name==="AuthApiError"}class uo extends Pf{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class ja extends Pf{constructor(t,n,r,i){super(t,r,i),this.name=n,this.status=r}}class Wn extends ja{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function hb(e){return ce(e)&&e.name==="AuthSessionMissingError"}class gl extends ja{constructor(){super("Auth session or user missing","AuthInvalidToken
404ResponseError",500,void 0)}}class _p extends ja{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Ap extends ja{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function vee(e){return ce(e)&&e.name==="AuthImplicitGrantRedirectError"}class nT extends ja{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class xee extends ja{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class Qw extends ja{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function pb(e){return ce(e)&&e.name==="AuthRetryableFetchError"}class rT extends ja{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}class Jw extends ja{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const ug="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),iT=` 	
405\r=`.split(""),bee=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<iT.length;t+=1)e[iT[t].charCodeAt(0)]=-2;for(let t=0;t<ug.length;t+=1)e[ug[t].charCodeAt(0)]=t;return e})();function aT(e,t,n){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(ug[r]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const r=t.queue>>t.queuedBits-6&63;n(ug[r]),t.queuedBits-=6}}function Y4(e,t,n){const r=bee[e];if(r>-1)for(t.queue=t.queue<<6|r,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function sT(e){const t=[],n=s=>{t.push(String.fromCodePoint(s))},r={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},a=s=>{jee(s,r,n)};for(let s=0;s<e.length;s+=1)Y4(e.charCodeAt(s),i,a);return t.join("")}function wee(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function See(e,t){for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r>55295&&r<=56319){const i=(r-55296)*1024&65535;r=(e.charCodeAt(n+1)-56320&65535|i)+65536,n+=1}wee(r,t)}}function jee(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let r=1;r<6;r+=1)if(!(e>>7-r&1)){t.utf8seq=r;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&n(t.codepoint)}}function dc(e){const t=[],n={queue:0,queuedBits:0},r=i=>{t.push(i)};for(let i=0;i<e.length;i+=1)Y4(e.charCodeAt(i),n,r);return new Uint8Array(t)}function _ee(e){const t=[];return See(e,n=>t.push(n)),new Uint8Array(t)}function xo(e){const t=[],n={queue:0,queuedBits:0},r=i=>{t.push(i)};return e.forEach(i=>aT(i,n,r)),aT(null,n,r),t.join("")}function Aee(e){return Math.round(Date.now()/1e3)+e}function kee(){return Symbol("auth-callback")}const Qt=()=>typeof window<"u"&&typeof document<"u",Ys={tested:!1,writable:!1},X4=()=>{if(!Qt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Ys.tested)return Ys.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Ys.tested=!0,Ys.writable=!0}catch{Ys.tested=!0,Ys.writable=!1}return Ys.writable};function Eee(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEac
405h((i,a)=>{t[a]=i})}catch{}return n.searchParams.forEach((r,i)=>{t[i]=r}),t}const Z4=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),Cee=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Tl=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Xs=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},Zt=async(e,t)=>{await e.removeItem(t)};class Qy{constructor(){this.promise=new Qy.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}Qy.promiseConstructor=Promise;function kp(e){const t=e.split(".");if(t.length!==3)throw new Jw("Invalid JWT structure");for(let r=0;r<t.length;r++)if(!pee.test(t[r]))throw new Jw("JWT not in base64url format");return{header:JSON.parse(sT(t[0])),payload:JSON.parse(sT(t[1])),signature:dc(t[2]),raw:{header:t[0],payload:t[1]}}}async function Pee(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function Tee(e,t){return new Promise((r,i)=>{(async()=>{for(let a=0;a<1/0;a++)try{const s=await e(a);if(!t(a,null,s)){r(s);return}}catch(s){if(!t(a,s)){i(s);return}}})()})}function Oee(e){return("0"+e.toString(16)).substr(-2)}function Nee(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let i="";for(let a=0;a<56;a++)i+=n.charAt(Math.floor(Math.random()*r));return i}return crypto.getRandomValues(t),Array.from(t,Oee).join("")}async function Iee(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),i=new Uint8Array(r);return Array.from(i).map(a=>String.fromCharCode(a)).join("")}async function Ree(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await Iee(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function yl(e,t,n=!1){const r=Nee();let i=r;n&&(i+="/PASSWORD_RECOVERY"),await Tl(e,`${t}-code-verifier`,i);const a=await Ree(r);return[a,r===a?"plain":"s256"]}const Mee=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function $ee(e){const t=e.headers.get(Zw);if(!t||!t.match(Mee))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function Dee(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function Lee(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const Fee=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function vl(e){if(!Fee.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function mb(){const e={};return new Proxy(e,{get:(t,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function Bee(e,t){return new Proxy(e,{get:(n,r,i)=>{if(r==="__isInsecureUserWarningProxy")return!0;if(typeof r=="symbol"){const a=r.toString();if(a==="Symbol(Symbol.toPrimitive)"||a==="Symbol(Symbol.toStringTag)"||a==="Symbol(util.inspect.custom)"||a==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,r,i)}return!t.value&&typeof r=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(n,r,i)}})}function oT(e){return JSON.parse(JSON.stringify(e))}const io=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),Uee=[502,503,504];async function lT(e){var t;if(!Cee(e))throw new Qw(io(e),0);if(Uee.includes(e.status))throw new Qw(io(e),e.status);let n;try{n=await e.json()}catch(a){throw new uo(io(a),a)}let r;const i=$ee(e);if(i&&i.getTime()>=K4["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new rT(io(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new Wn}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((a,s)=>a&&typeof s=="string",!0))throw new rT(io(n),e.status,n.weak_password.reasons);throw new gee(io(n),e.status||500,r)}const qee=(e,t,n,r)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))};async function he(e,t,n,r){var i;const a=Object.assign({},r==null?void 0:r.headers);a[Zw]||(a[Zw]=K4["2024-01-01"].name),r!=null&&r.jwt&&(a.Authorization=`Bearer ${r.jwt}`);const s=(i=r==null?void 0:r.query)!==null&&i!==void 0?i:{};r!=null&&r.redirectTo&&(s.redirect_to=r.redirectTo);const o=Object.keys(s).length?"?"+new URLSearchParams(s).toString():"",c=await zee(e,t,n+o,{headers:a,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(c):{data:Object.assign({},c),error:null}}async function zee(e,t,n,r,i,a){const s=qee(t,r,i,a);let o;try{o=await e(n,Object.assign({},s))}catch(c){throw console.error(c),new Qw(io(c),0)}if(o.ok||await lT(o),r!=null&&r.noResolveJson)return o;try{return await o.json()}catch(c){await lT(c)}}function Hr(e){var t;let n=null;Hee(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=Aee(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function cT(e){const t=Hr(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Ga(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function Vee(e){return{data:e,error:null}}function Wee(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:a}=e,s=Eu(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),o={action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:a},c=Object.assign({},s);return{data:{properties:o,user:c},error:null}}function uT(e){return e}function Hee(e){return e.access_token&&e.refresh_token&&e.expires_in}const gb=["global","local","others"];class Gee{constructor({url:t="",headers:n={},fetch:r}){this.url=t,this.headers=n,this.fetch=Z4(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)}}async signOut(t,n=gb[0]){if(gb.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${gb.join(", ")}`);try{return await he(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(ce(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await he(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Ga})}catch(r){if(ce(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=Eu(t,["options"]),i=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(i.new_email=r==null?void 0:r.newEmail,delete i.newEmail),await he(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i,headers:this.headers,xform:Wee,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(ce(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await he(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Ga})}catch(n){if(ce(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,i,a,s,o,c;try{const u={nextPage:null,lastPage:0,total:0},f=await he(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(a=(i=t==null?void 0:t.perPage)===null||i===void 0?void 0:i.toString())!==null&&a!==void 0?a:""},xform:uT});if(f.error)throw f.error;const d=await f.json(),h=(s=f.headers.get("x-total-count"))!==null&&s!==void 0?s:0,p=(c=(o=f.headers.get("link"))===null||o===void 0?void 0:o.split(","))!==null&&c!==void 0?c:[];return p.length>
4050&&(p.forEach(g=>{const m=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),y=JSON.parse(g.split(";")[1].split("=")[1]);u[`${y}Page`]=m}),u.total=parseInt(h)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(ce(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){vl(t);try{return await he(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Ga})}catch(n){if(ce(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){vl(t);try{return await he(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:Ga})}catch(r){if(ce(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){vl(t);try{return await he(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:Ga})}catch(r){if(ce(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){vl(t.userId);try{const{data:n,error:r}=await he(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:n,error:r}}catch(n){if(ce(n))return{data:null,error:n};throw n}}async _deleteFactor(t){vl(t.userId),vl(t.id);try{return{data:await he(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(ce(n))return{data:null,error:n};throw n}}async _listOAuthClients(t){var n,r,i,a,s,o,c;try{const u={nextPage:null,lastPage:0,total:0},f=await he(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(a=(i=t==null?void 0:t.perPage)===null||i===void 0?void 0:i.toString())!==null&&a!==void 0?a:""},xform:uT});if(f.error)throw f.error;const d=await f.json(),h=(s=f.headers.get("x-total-count"))!==null&&s!==void 0?s:0,p=(c=(o=f.headers.get("link"))===null||o===void 0?void 0:o.split(","))!==null&&c!==void 0?c:[];return p.length>0&&(p.forEach(g=>{const m=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),y=JSON.parse(g.split(";")[1].split("=")[1]);u[`${y}Page`]=m}),u.total=parseInt(h)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(ce(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await he(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ce(n))return{data:null,error:n};throw n}}async _getOAuthClient(t){try{return await he(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ce(n))return{data:null,error:n};throw n}}async _updateOAuthClient(t,n){try{return await he(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(ce(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(t){try{return await he(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(ce(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(t){try{return await he(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(ce(n))return{data:null,error:n};throw n}}}function dT(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}const xl={debug:!!(globalThis&&X4()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Q4 extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class Kee extends Q4{}async function Yee(e,t,n){xl.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;return t>0&&setTimeout(()=>{r.abort(),xl.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal}
405,async i=>{if(i){xl.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await n()}finally{xl.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw xl.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new Kee(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(xl.debug)try{const a=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(a,null,"  "))}catch(a){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",a)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await n()}}))}function Xee(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function J4(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}" is invalid.`);return e.toLowerCase()}function Zee(e){return parseInt(e,16)}function Qee(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,r=>r.toString(16).padStart(2,"0")).join("")}function Jee(e){var t;const{chainId:n,domain:r,expirationTime:i,issuedAt:a=new Date,nonce:s,notBefore:o,requestId:c,resources:u,scheme:f,uri:d,version:h}=e;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!r)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(s&&s.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${s}`);if(!d)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(h!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${h}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
406`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const p=J4(e.address),g=f?`${f}://${r}`:r,m=e.statement?`${e.statement}
407`:"",y=`${g} wants you to sign in with your Ethereum account:
408${p}
409
410${m}`;let v=`URI: ${d}
411Version: ${h}
412Chain ID: ${n}${s?`
413Nonce: ${s}`:""}
414Issued At: ${a.toISOString()}`;if(i&&(v+=`
415Expiration Time: ${i.toISOString()}`),o&&(v+=`
416Not Before: ${o.toISOString()}`),c&&(v+=`
417Request ID: ${c}`),u){let b=`
418Resources:`;for(const x of u){if(!x||typeof x!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${x}`);b+=`
419- ${x}`}v+=b}return`${y}
420${v}`}class Ot extends Error{constructor({message:t,code:n,cause:r,name:i}){var a;super(t,{cause:r}),this.__isWebAuthnError=!0,this.name=(a=i??(r instanceof Error?r.name:void 0))!==null&&a!==void 0?a:"Unknown Error",this.code=n}}class dg extends Ot{constructor(t,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:t}),this.name="WebAuthnUnknownError",this.originalError=n}}function ete({error:e,options:t}){var n,r,i;const{publicKey:a}=t;if(!a)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Ot({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((n=a.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new Ot({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((r=a.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new Ot({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((i=a.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new Ot({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new Ot({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Ot({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return a.pubKeyCredParams.filter(o=>o.type==="public-key").length===0?new Ot({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Ot({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const s=window.location.hostname;
420if(e3(s)){if(a.rp.id!==s)return new Ot({message:`The RP ID "${a.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Ot({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(a.user.id.byteLength<1||a.user.id.byteLength>64)return new Ot({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new Ot({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Ot({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function tte({error:e,options:t}){const{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Ot({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Ot({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const r=window.location.hostname;if(e3(r)){if(n.rpId!==r)return new Ot({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Ot({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Ot({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Ot({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class nte{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const rte=new nte;function ite(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:n,excludeCredentials:r}=e,i=Eu(e,["challenge","user","excludeCredentials"]),a=dc(t).buffer,s=Object.assign(Object.assign({},n),{id:dc(n.id).buffer}),o=Object.assign(Object.assign({},i),{challenge:a,user:s});if(r&&r.length>0){o.excludeCredentials=new Array(r.length);for(let c=0;c<r.length;c++){const u=r[c];o.excludeCredentials[c]=Object.assign(Object.assign({},u),{id:dc(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return o}function ate(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:n}=e,r=Eu(e,["challenge","allowCredentials"]),i=dc(t).buffer,a=Object.assign(Object.assign({},r),{challenge:i});if(n&&n.length>0){a.allowCredentials=new Array(n.length);for(let s=0;s<n.length;s++){const o=n[s];a.allowCredentials[s]=Object.assign(Object.assign({},o),{id:dc(o.id).buffer,type:o.type||"public-key",transports:o.transports})}}return a}function ste(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e;return{id:e.id,rawId:e.id,response:{attestationObject:xo(new Uint8Array(e.response.attestationObject)),clientDataJSON:xo(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function ote(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const n=e,r=e.getClientExtensionResults(),i=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:xo(new Uint8Array(i.authenticatorData)),clientDataJSON:xo(new Uint8Array(i.clientDataJSON)),signature:xo(new Uint8Array(i.signature)),userHandle:i.userHandle?xo(new Uint8Array(i.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(t=n.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function e3(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function fT(){var e,t;return!!(Qt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function lte(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new dg("Browser returned unexpected credential type",t)}:{data:null,error:new dg("Empty credential response",t)}}
420catch(t){return{data:null,error:ete({error:t,options:e})}}}async function cte(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new dg("Browser returned unexpected credential type",t)}:{data:null,error:new dg("Empty credential response",t)}}catch(t){return{data:null,error:tte({error:t,options:e})}}}const ute={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},dte={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function fg(...e){const t=i=>i!==null&&typeof i=="object"&&!Array.isArray(i),n=i=>i instanceof ArrayBuffer||ArrayBuffer.isView(i),r={};for(const i of e)if(i)for(const a in i){const s=i[a];if(s!==void 0)if(Array.isArray(s))r[a]=s;else if(n(s))r[a]=s;else if(t(s)){const o=r[a];t(o)?r[a]=fg(o,s):r[a]=fg(s)}else r[a]=s}return r}function fte(e,t){return fg(ute,e,t||{})}function hte(e,t){return fg(dte,e,t||{})}class pte{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:n,friendlyName:r,signal:i},a){var s;try{const{data:o,error:c}=await this.client.mfa.challenge({factorId:t,webauthn:n});if(!o)return{data:null,error:c};const u=i??rte.createNewAbortSignal();if(o.webauthn.type==="create"){const{user:f}=o.webauthn.credential_options.publicKey;if(!f.name){const d=r;if(d)f.name=`${f.id}:${d}`;else{const p=(await this.client.getUser()).data.user,g=((s=p==null?void 0:p.user_metadata)===null||s===void 0?void 0:s.name)||(p==null?void 0:p.email)||(p==null?void 0:p.id)||"User";f.name=`${f.id}:${g}`}}f.displayName||(f.displayName=f.name)}switch(o.webauthn.type){case"create":{const f=fte(o.webauthn.credential_options.publicKey,a==null?void 0:a.create),{data:d,error:h}=await lte({publicKey:f,signal:u});return d?{data:{factorId:t,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:d}},error:null}:{data:null,error:h}}case"request":{const f=hte(o.webauthn.credential_options.publicKey,a==null?void 0:a.request),{data:d,error:h}=await cte(Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:f,signal:u}));return d?{data:{factorId:t,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:d}},error:null}:{data:null,error:h}}}}catch(o){return ce(o)?{data:null,error:o}:{data:null,error:new uo("Unexpected error in challenge",o)}}}async _verify({challengeId:t,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:t,webauthn:r})}async _authenticate({factorId:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:i}={}},a){if(!n)return{data:null,error:new Pf("rpId is required for WebAuthn authentication")};try{if(!fT())return{data:null,error:new uo("Browser does not support WebAuthn",null)};const{data:s,error:o}=await this.challenge({factorId:t,webauthn:{rpId:n,rpOrigins:r},signal:i},{request:a});if(!s)return{data:null,error:o};const{webauthn:c}=s;return this._verify({factorId:t,challengeId:s.challengeId,webauthn:{type:c.type,rpId:n,rpOrigins:r,credential_response:c.credential_response}})}catch(s){return ce(s)?{data:null,error:s}:{data:null,error:new uo("Unexpected error in authenticate",s)}}}async _register({friendlyName:t,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:i}={}},a){if(!n)return{data:null,error:new Pf("rpId is required for WebAuthn registration")};try{if(!fT())return{data:null,error:new uo("Browser does not support WebAuthn",null)};const{data:s,error:o}=await this._enroll({friendlyName:t});if(!s)return await this.client.mfa.listFactors().then(f=>{var d;return(d=f.data)===null||d===void 0?void 0:d.all.find(h=>h.factor_type==="webauthn"&&h.friendly_name===t&&h.status!=="unverified")}).then(f=>f?this.client.mfa.unenroll({factorId:f==null?void 0:f.id}):void 0),{data:null,error:o};const{data:c,error:u}=await this._challenge({factorId:s.id,friendlyName:s.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:i},{create:a});return c?this._verify({factorId:s.id,challengeId:c.challengeId,webauthn:{rpId:n,rpOrigins:r,type:c.webauthn.type,credential_response:c.webauthn.credential_response}}):{data:null,error:u}}catch(s){return ce(s)?{data:null,error:s}:{data:null,error:new uo("Unexpected error in register",s)}}}}Xee();const mte={url:dee,storageKey:fee,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:hee,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:1e4};async function hT(e,t,n){return await n()}const bl={};class Tf{get jwks(){var t,n;return(n=(t=bl[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(t){bl[this.storageKey]=Object.assign(Object.assign({},bl[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,n;return(n=(t=bl[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){bl[this.storageKey]=Object.assign(Object.assign({},bl[this.storageKey]),{cachedAt:t})}constructor(t){var n,r,i;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const a=Object.assign(Object.assign({},mte),t);if(this.storageKey=a.storageKey,this.instanceID=(n=Tf.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,Tf.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!a.debug,typeof a.debug=="function"&&(this.logger=a.debug),this.instanceID>0&&Qt()){const s=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(s),this.logDebugMessages&&console.trace(s)}if(this.persistSession=a.persistSession,this.autoRefreshToken=a.autoRefreshToken,this.admin=new Gee({url:a.url,headers:a.headers,fetch:a.fetch}),this.url=a.url,this.headers=a.headers,this.fetch=Z4(a.fetch),this.lock=a.lock||hT,this.detectSessionInUrl=a.detectSessionInUrl,this.flowType=a.flowType,this.hasCustomAuthorizationHeader=a.hasCustomAuthorizationHeader,this.throwOnError=a.throwOnError,this.lockAcquireTimeout=a.lockAcquireTimeout,a.lock?this.lock=a.lock:this.persistSession&&Qt()&&(!((r=globalThis==null?void 0:globalThis.navigator)===null||r===void 0)&&r.locks)?this.lock=Yee:this.lock=hT,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new pte(this)}
420,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(a.storage?this.storage=a.storage:X4()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=dT(this.memoryStorage)),a.userStorage&&(this.userStorage=a.userStorage)):(this.memoryStorage={},this.storage=dT(this.memoryStorage)),Qt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(s){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",s)}(i=this.broadcastChannel)===null||i===void 0||i.addEventListener("message",async s=>{this._debug("received broadcast notification from other tab or client",s);try{await this._notifyAllSubscribers(s.data.event,s.data.session,!1)}catch(o){this._debug("#broadcastChannel","error",o)}})}this.initialize().catch(s=>{this._debug("#initialize()","error",s)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${G4}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let n={},r="none";if(Qt()&&(n=Eee(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),Qt()&&this.detectSessionInUrl&&r!=="none"){const{data:i,error:a}=await this._getSessionFromURL(n,r);if(a){if(this._debug("#_initialize()","error detecting session from URL",a),vee(a)){const c=(t=a.details)===null||t===void 0?void 0:t.code;if(c==="identity_already_exists"||c==="identity_not_found"||c==="single_identity_not_deletable")return{error:a}}return{error:a}}const{session:s,redirectType:o}=i;return this._debug("#_initialize()","detected session in URL",s,"redirect type",o),await this._saveSession(s),setTimeout(async()=>{o==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",s):await this._notifyAllSubscribers("SIGNED_IN",s)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return ce(n)?this._returnResult({error:n}):this._returnResult({error:new uo("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,i;try{const a=await he(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(i=t==null?void 0:t.options)===null||i===void 0?void 0:i.captchaToken}},xform:Hr}),{data:s,error:o}=a;if(o||!s)return this._returnResult({data:{user:null,session:null},error:o});const c=s.session,u=s.user;return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(a){if(ce(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signUp(t){var n,r,i;try{let a;if("email"in t){const{email:f,password:d,options:h}=t;let p=null,g=null;this.flowType==="pkce"&&([p,g]=await yl(this.storage,this.storageKey)),a=await he(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:h==null?void 0:h.emailRedirectTo,body:{email:f,password:d,data:(n=h==null?void 0:h.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken},code_challenge:p,code_challenge_method:g},xform:Hr})}else if("phone"in t){const{phone:f,password:d,options:h}=t;a=await he(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:f,password:d,data:(r=h==null?void 0:h.data)!==null&&r!==void 0?r:{},channel:(i=h==null?void 0:h.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken}},xform:Hr})}else throw new _p("You must provide either an email or phone number and a password");const{data:s,error:o}=a;if(o||!s)return await Zt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:o});const c=s.session,u=s.user;return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(a){if(await Zt(this.storage,`${this.storageKey}-code-verifier`),ce(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async signInWithPassword(t){try{let n;if("email"in t){const{email:a,password:s,options:o}=t;n=await he(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:a,password:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:cT})}else if("phone"in t){const{phone:a,password:s,options:o}=t;n=await he(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:a,password:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:cT})}else throw new _p("You must provide either an email or phone number and a password");const{data:r,error:i}=n;if(i)return this._returnResult({data:{user:null,session:null},error:i});if(!r||!r.session||!r.user){const a=new gl;return this._returnResult({data:{user:null,session:null},error:a})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:i})}catch(n){if(ce(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(t){var n,r,i,a;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(i=t.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(a=t.o
420ptions)===null||a===void 0?void 0:a.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:n}=t;switch(n){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(t){var n,r,i,a,s,o,c,u,f,d,h;let p,g;if("message"in t)p=t.message,g=t.signature;else{const{chain:m,wallet:y,statement:v,options:b}=t;let x;if(Qt())if(typeof y=="object")x=y;else{const E=window;if("ethereum"in E&&typeof E.ethereum=="object"&&"request"in E.ethereum&&typeof E.ethereum.request=="function")x=E.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof y!="object"||!(b!=null&&b.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");x=y}const j=new URL((n=b==null?void 0:b.url)!==null&&n!==void 0?n:window.location.href),S=await x.request({method:"eth_requestAccounts"}).then(E=>E).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!S||S.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const _=J4(S[0]);let A=(r=b==null?void 0:b.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!A){const E=await x.request({method:"eth_chainId"});A=Zee(E)}const k={domain:j.host,address:_,statement:v,uri:j.href,version:"1",chainId:A,nonce:(i=b==null?void 0:b.signInWithEthereum)===null||i===void 0?void 0:i.nonce,issuedAt:(s=(a=b==null?void 0:b.signInWithEthereum)===null||a===void 0?void 0:a.issuedAt)!==null&&s!==void 0?s:new Date,expirationTime:(o=b==null?void 0:b.signInWithEthereum)===null||o===void 0?void 0:o.expirationTime,notBefore:(c=b==null?void 0:b.signInWithEthereum)===null||c===void 0?void 0:c.notBefore,requestId:(u=b==null?void 0:b.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(f=b==null?void 0:b.signInWithEthereum)===null||f===void 0?void 0:f.resources};p=Jee(k),g=await x.request({method:"personal_sign",params:[Qee(p),_]})}try{const{data:m,error:y}=await he(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:p,signature:g},!((d=t.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:Hr});if(y)throw y;if(!m||!m.session||!m.user){const v=new gl;return this._returnResult({data:{user:null,session:null},error:v})}return m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),this._returnResult({data:Object.assign({},m),error:y})}catch(m){if(ce(m))return this._returnResult({data:{user:null,session:null},error:m});throw m}}async signInWithSolana(t){var n,r,i,a,s,o,c,u,f,d,h,p;let g,m;if("message"in t)g=t.message,m=t.signature;else{const{chain:y,wallet:v,statement:b,options:x}=t;let j;if(Qt())if(typeof v=="object")j=v;else{const _=window;if("solana"in _&&typeof _.solana=="object"&&("signIn"in _.solana&&typeof _.solana.signIn=="function"||"signMessage"in _.solana&&typeof _.solana.signMessage=="function"))j=_.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof v!="object"||!(x!=null&&x.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");j=v}const S=new URL((n=x==null?void 0:x.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in j&&j.signIn){const _=await j.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},x==null?void 0:x.signInWithSolana),{version:"1",domain:S.host,uri:S.href}),b?{statement:b}:null));let A;if(Array.isArray(_)&&_[0]&&typeof _[0]=="object")A=_[0];else if(_&&typeof _=="object"&&"signedMessage"in _&&"signature"in _)A=_;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in A&&"signature"in A&&(typeof A.signedMessage=="string"||A.signedMessage instanceof Uint8Array)&&A.signature instanceof Uint8Array)g=typeof A.signedMessage=="string"?A.signedMessage:new TextDecoder().decode(A.signedMessage),m=A.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in j)||typeof j.signMessage!="function"||!("publicKey"in j)||typeof j!="object"||!j.publicKey||!("toBase58"in j.publicKey)||typeof j.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");g=[`${S.host} wants you to sign in with your Solana account:`,j.publicKey.toBase58(),...b?["",b,""]:[""],"Version: 1",`URI: ${S.href}`,`Issued At: ${(i=(r=x==null?void 0:x.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&i!==void 0?i:new Date().toISOString()}`,...!((a=x==null?void 0:x.signInWithSolana)===null||a===void 0)&&a.notBefore?[`Not Before: ${x.signInWithSolana.notBefore}`]:[],...!((s=x==null?void 0:x.signInWithSolana)===null||s===void 0)&&s.expirationTime?[`Expiration Time: ${x.signInWithSolana.expirationTime}`]:[],...!((o=x==null?void 0:x.signInWithSolana)===null||o===void 0)&&o.chainId?[`Chain ID: ${x.signInWithSolana.chainId}`]:[],...!((c=x==null?void 0:x.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${x.signInWithSolana.nonce}`]:[],...!((u=x==null?void 0:x.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${x.signInWithSolana.requestId}`]:[],...!((d=(f=x==null?void 0:x.signInWithSolana)===null||f===void 0?void 0:f.resources)===null||d===void 0)&&d.length?["Resources",...x.signInWithSolana.resources.map(A=>`- ${A}`)]:[]].join(`
421`);const _=await j.signMessage(new TextEncoder().encode(g),"utf8");if(!_||!(_ instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=_}}try{const{data:y,error:v}=await he(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:g,signature:xo(m)}
421,!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(p=t.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:Hr});if(v)throw v;if(!y||!y.session||!y.user){const b=new gl;return this._returnResult({data:{user:null,session:null},error:b})}return y.session&&(await this._saveSession(y.session),await this._notifyAllSubscribers("SIGNED_IN",y.session)),this._returnResult({data:Object.assign({},y),error:v})}catch(y){if(ce(y))return this._returnResult({data:{user:null,session:null},error:y});throw y}}async _exchangeCodeForSession(t){const n=await Xs(this.storage,`${this.storageKey}-code-verifier`),[r,i]=(n??"").split("/");try{if(!r&&this.flowType==="pkce")throw new xee;const{data:a,error:s}=await he(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:Hr});if(await Zt(this.storage,`${this.storageKey}-code-verifier`),s)throw s;if(!a||!a.session||!a.user){const o=new gl;return this._returnResult({data:{user:null,session:null,redirectType:null},error:o})}return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),this._returnResult({data:Object.assign(Object.assign({},a),{redirectType:i??null}),error:s})}catch(a){if(await Zt(this.storage,`${this.storageKey}-code-verifier`),ce(a))return this._returnResult({data:{user:null,session:null,redirectType:null},error:a});throw a}}async signInWithIdToken(t){try{const{options:n,provider:r,token:i,access_token:a,nonce:s}=t,o=await he(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:i,access_token:a,nonce:s,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:Hr}),{data:c,error:u}=o;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!c||!c.session||!c.user){const f=new gl;return this._returnResult({data:{user:null,session:null},error:f})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",c.session)),this._returnResult({data:c,error:u})}catch(n){if(ce(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(t){var n,r,i,a,s;try{if("email"in t){const{email:o,options:c}=t;let u=null,f=null;this.flowType==="pkce"&&([u,f]=await yl(this.storage,this.storageKey));const{error:d}=await he(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:o,data:(n=c==null?void 0:c.data)!==null&&n!==void 0?n:{},create_user:(r=c==null?void 0:c.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:u,code_challenge_method:f},redirectTo:c==null?void 0:c.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:d})}if("phone"in t){const{phone:o,options:c}=t,{data:u,error:f}=await he(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:o,data:(i=c==null?void 0:c.data)!==null&&i!==void 0?i:{},create_user:(a=c==null?void 0:c.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},channel:(s=c==null?void 0:c.channel)!==null&&s!==void 0?s:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:f})}throw new _p("You must provide either an email or phone number.")}catch(o){if(await Zt(this.storage,`${this.storageKey}-code-verifier`),ce(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async verifyOtp(t){var n,r;try{let i,a;"options"in t&&(i=(n=t.options)===null||n===void 0?void 0:n.redirectTo,a=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:s,error:o}=await he(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:a}}),redirectTo:i,xform:Hr});if(o)throw o;if(!s)throw new Error("An error occurred on token verification.");const c=s.session,u=s.user;return c!=null&&c.access_token&&(await this._saveSession(c),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(i){if(ce(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithSSO(t){var n,r,i,a,s;try{let o=null,c=null;this.flowType==="pkce"&&([o,c]=await yl(this.storage,this.storageKey));const u=await he(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((i=t==null?void 0:t.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}
421:null),{skip_http_redirect:!0,code_challenge:o,code_challenge_method:c}),headers:this.headers,xform:Vee});return!((a=u.data)===null||a===void 0)&&a.url&&Qt()&&!(!((s=t.options)===null||s===void 0)&&s.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(o){if(await Zt(this.storage,`${this.storageKey}-code-verifier`),ce(o))return this._returnResult({data:null,error:o});throw o}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new Wn;const{error:i}=await he(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:i})})}catch(t){if(ce(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:r,type:i,options:a}=t,{error:s}=await he(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},redirectTo:a==null?void 0:a.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:s})}else if("phone"in t){const{phone:r,type:i,options:a}=t,{data:s,error:o}=await he(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:s==null?void 0:s.message_id},error:o})}throw new _p("You must provide either an email or phone number and a type")}catch(n){if(ce(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),i=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await i}catch{}})()),i}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const i=[...this.pendingInLock];await Promise.all(i),this.pendingInLock.splice(0,i.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await Xs(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<fb:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.userStorage){const s=await Xs(this.userStorage,this.storageKey+"-user");s!=null&&s.user?t.user=s.user:t.user=mb()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const s={value:this.suppressGetSessionWarning};t.user=Bee(t.user,s),s.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:i,error:a}=await this._callRefreshToken(t.refresh_token);return a?this._returnResult({data:{session:null},error:a}):this._returnResult({data:{session:i},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(t){try{return t?await he(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Ga}):await this._useSession(async n=>{var r,i,a;const{data:s,error:o}=n;
421if(o)throw o;return!(!((r=s.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Wn}:await he(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(a=(i=s.session)===null||i===void 0?void 0:i.access_token)!==null&&a!==void 0?a:void 0,xform:Ga})})}catch(n){if(ce(n))return hb(n)&&(await this._removeSession(),await Zt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:i,error:a}=r;if(a)throw a;if(!i.session)throw new Wn;const s=i.session;let o=null,c=null;this.flowType==="pkce"&&t.email!=null&&([o,c]=await yl(this.storage,this.storageKey));const{data:u,error:f}=await he(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:o,code_challenge_method:c}),jwt:s.access_token,xform:Ga});if(f)throw f;return s.user=u.user,await this._saveSession(s),await this._notifyAllSubscribers("USER_UPDATED",s),this._returnResult({data:{user:s.user},error:null})})}catch(r){if(await Zt(this.storage,`${this.storageKey}-code-verifier`),ce(r))return this._returnResult({data:{user:null},error:r});throw r}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new Wn;const n=Date.now()/1e3;let r=n,i=!0,a=null;const{payload:s}=kp(t.access_token);if(s.exp&&(r=s.exp,i=r<=n),i){const{data:o,error:c}=await this._callRefreshToken(t.refresh_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!o)return{data:{user:null,session:null},error:null};a=o}else{const{data:o,error:c}=await this._getUser(t.access_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});a={access_token:t.access_token,refresh_token:t.refresh_token,user:o.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(a),await this._notifyAllSubscribers("SIGNED_IN",a)}return this._returnResult({data:{user:a.user,session:a},error:null})}catch(n){if(ce(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:s,error:o}=n;if(o)throw o;t=(r=s.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new Wn;const{data:i,error:a}=await this._callRefreshToken(t.refresh_token);return a?this._returnResult({data:{user:null,session:null},error:a}):i?this._returnResult({data:{user:i.user,session:i},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(ce(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(t,n){try{if(!Qt())throw new Ap("No browser detected.");if(t.error||t.error_description||t.error_code)throw new Ap(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new nT("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Ap("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new nT("No code detected.");const{data:b,error:x}=await this._exchangeCodeForSession(t.code);if(x)throw x;const j=new URL(window.location.href);return j.searchParams.delete("code"),window.history.replaceState(window.history.state,"",j.toString()),{data:{session:b.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:i,access_token:a,refresh_token:s,expires_in:o,expires_at:c,token_type:u}=t;if(!a||!o||!s||!u)throw new Ap("No session defined in URL");const f=Math.round(Date.now()/1e3),d=parseInt(o);let h=f+d;c&&(h=parseInt(c));const p=h-f;
421p*1e3<=Pl&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${p}s, should have been closer to ${d}s`);const g=h-d;f-g>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",g,h,f):f-g<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",g,h,f);const{data:m,error:y}=await this._getUser(a);if(y)throw y;const v={provider_token:r,provider_refresh_token:i,access_token:a,expires_in:d,expires_at:h,refresh_token:s,token_type:u,user:m.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:v,redirectType:t.type},error:null})}catch(r){if(ce(r))return this._returnResult({data:{session:null,redirectType:null},error:r});throw r}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const n=await Xs(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:i,error:a}=n;if(a&&!hb(a))return this._returnResult({error:a});const s=(r=i.session)===null||r===void 0?void 0:r.access_token;if(s){const{error:o}=await this.admin.signOut(s,t);if(o&&!(yee(o)&&(o.status===404||o.status===401||o.status===403)||hb(o)))return this._returnResult({error:o})}return t!=="others"&&(await this._removeSession(),await Zt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const n=kee(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,i;try{const{data:{session:a},error:s}=n;if(s)throw s;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",a)),this._debug("INITIAL_SESSION","callback id",t,"session",a)}catch(a){await((i=this.stateChangeEmitters.get(t))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",a),console.error(a)}})}async resetPasswordForEmail(t,n={}){let r=null,i=null;this.flowType==="pkce"&&([r,i]=await yl(this.storage,this.storageKey,!0));try{return await he(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:i,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(a){if(await Zt(this.storage,`${this.storageKey}-code-verifier`),ce(a))return this._returnResult({data:null,error:a});throw a}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(n){if(ce(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var n;try{const{data:r,error:i}=await this._useSession(async a=>{var s,o,c,u,f;const{data:d,error:h}=a;if(h)throw h;const p=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(s=t.options)===null||s===void 0?void 0:s.redirectTo,scopes:(o=t.options)===null||o===void 0?void 0:o.scopes,queryParams:(c=t.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return await he(this.fetch,"GET",p,{headers:this.headers,jwt:(f=(u=d.session)===null||u===void 0?void 0:u.access_token)!==null&&f!==void 0?f:void 0})});if(i)throw i;return Qt()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),this._returnResult({data:{provider:t.provider,url:r==null?void 0:r.url},error:null})}catch(r){if(ce(r))return this._returnResult({data:{provider:t.provider,url:null},error:r});throw r}}async linkIdentityIdToken(t){return await this._useSession(async n=>{var r;try{const{error:i,data:{session:a}}=n;if(i)throw i;const{options:s,provider:o,token:c,access_token:u,nonce:f}=t,d=await he(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=a==null?void 0:a.access_token)!==null&&r!==void 0?r:void 0,body:{provider:o,id_token:c,access_token:u,nonce:f,link_identity:!0,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},xform:Hr}),{data:h,error:p}=d;return p?this._returnResult({data:{user:null,session:null},error:p}):!h||!h.session||!h.user?this._returnResult({data:{user:null,session:null},error:new gl}):(h.session&&(await this._saveSession(h.session),await this._notifyAllSubscribers("USER_UPDATED",h.session)),this._returnResult({data:h,error:p}))}catch(i){if(await Zt(this.storage,`${this.storageKey}-code-verifier`),ce(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}})}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,i;const{data:a,error:s}=n;if(s)throw s;
421return await he(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(i=(r=a.session)===null||r===void 0?void 0:r.access_token)!==null&&i!==void 0?i:void 0})})}catch(n){if(ce(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await Tee(async i=>(i>0&&await Pee(200*Math.pow(2,i-1)),this._debug(n,"refreshing attempt",i),await he(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Hr})),(i,a)=>{const s=200*Math.pow(2,i);return a&&pb(a)&&Date.now()+s-r<Pl})}catch(r){if(this._debug(n,"error",r),ce(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",r),Qt()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r},error:null}}async _recoverAndRefresh(){var t,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const i=await Xs(this.storage,this.storageKey);if(i&&this.userStorage){let s=await Xs(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!s&&(s={user:i.user},await Tl(this.userStorage,this.storageKey+"-user",s)),i.user=(t=s==null?void 0:s.user)!==null&&t!==void 0?t:mb()}else if(i&&!i.user&&!i.user){const s=await Xs(this.storage,this.storageKey+"-user");s&&(s!=null&&s.user)?(i.user=s.user,await Zt(this.storage,this.storageKey+"-user"),await Tl(this.storage,this.storageKey,i)):i.user=mb()}if(this._debug(r,"session from storage",i),!this._isValidSession(i)){this._debug(r,"session is not valid"),i!==null&&await this._removeSession();return}const a=((n=i.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<fb;if(this._debug(r,`session has${a?"":" not"} expired with margin of ${fb}s`),a){if(this.autoRefreshToken&&i.refresh_token){const{error:s}=await this._callRefreshToken(i.refresh_token);s&&(console.error(s),pb(s)||(this._debug(r,"refresh failed with a non-retryable error, removing the session",s),await this._removeSession()))}}else if(i.user&&i.user.__isUserNotAvailableProxy===!0)try{const{data:s,error:o}=await this._getUser(i.access_token);!o&&(s!=null&&s.user)?(i.user=s.user,await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(s){console.error("Error getting user data:",s),this._debug(r,"error getting user data, skipping SIGNED_IN notification",s)}else await this._notifyAllSubscribers("SIGNED_IN",i)}catch(i){this._debug(r,"error",i),console.error(i);return}finally{this._debug(r,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new Wn;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const i=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(i,"begin");try{this.refreshingDeferred=new Qy;const{data:a,error:s}=await this._refreshAccessToken(t);if(s)throw s;if(!a.session)throw new Wn;await this._saveSession(a.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",a.session);const o={data:a.session,error:null};return this.refreshingDeferred.resolve(o),o}catch(a){if(this._debug(i,"error",a),ce(a)){const s={data:null,error:a};return pb(a)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(s),s}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(a),a}finally{this.refreshingDeferred=null,this._debug(i,"end")}}async _notifyAllSubscribers(t,n,r=!0){const i=`#_notifyAllSubscribers(${t})`;this._debug(i,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const a=[],s=Array.from(this.stateChangeEmitters.values()).map(async o=>{try{await o.callback(t,n)}catch(c){a.push(c)}});if(await Promise.all(s),a.length>0){for(let o=0;o<a.length;o+=1)console.error(a[o]);throw a[0]}}finally{this._debug(i,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await Zt(this.storage,`${this.storageKey}-code-verifier`);const n=Object.assign({},t),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await Tl(this.userStorage,this.storageKey+"-user",{user:n.user});const i=Object.assign({},n);delete i.user;const a=oT(i);await Tl(this.storage,this.storageKey,a)}else{const i=oT(n);await Tl(this.storage,this.storageKey,i)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Zt(this.storage,this.storageKey),await Zt(this.storage,this.storageKey+"-code-verifier"),await Zt(this.storage,this.storageKey+"-user"),this.userStorage&&await Zt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;
421try{t&&Qt()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Pl);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const i=Math.floor((r.expires_at*1e3-t)/Pl);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${Pl}ms, refresh threshold is ${Xw} ticks`),i<=Xw&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof Q4)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Qt()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){const i=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&i.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&i.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[a,s]=await yl(this.storage,this.storageKey),o=new URLSearchParams({code_challenge:`${encodeURIComponent(a)}`,code_challenge_method:`${encodeURIComponent(s)}`});i.push(o.toString())}if(r!=null&&r.queryParams){const a=new URLSearchParams(r.queryParams);i.push(a.toString())}return r!=null&&r.skipBrowserRedirect&&i.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${i.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:i,error:a}=n;return a?this._returnResult({data:null,error:a}):await he(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(ce(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,i;const{data:a,error:s}=n;if(s)return this._returnResult({data:null,error:s});const o=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:c,error:u}=await he(this.fetch,"POST",`${this.url}/factors`,{body:o,headers:this.headers,jwt:(r=a==null?void 0:a.session)===null||r===void 0?void 0:r.access_token});return u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&c.type==="totp"&&(!((i=c==null?void 0:c.totp)===null||i===void 0)&&i.qr_code)&&(c.totp.qr_code=`data:image/svg+xml;utf-8,${c.totp.qr_code}`),this._returnResult({data:c,error:null}))})}catch(n){if(ce(n))return this._returnResult({data:null,error:n});throw n}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:i,error:a}=n;
421if(a)return this._returnResult({data:null,error:a});const s=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?ste(t.webauthn.credential_response):ote(t.webauthn.credential_response)})}:{code:t.code}),{data:o,error:c}=await he(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:s,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return c?this._returnResult({data:null,error:c}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+o.expires_in},o)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",o),this._returnResult({data:o,error:c}))})}catch(n){if(ce(n))return this._returnResult({data:null,error:n});throw n}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async n=>{var r;const{data:i,error:a}=n;if(a)return this._returnResult({data:null,error:a});const s=await he(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});if(s.error)return s;const{data:o}=s;if(o.type!=="webauthn")return{data:o,error:null};switch(o.webauthn.type){case"create":return{data:Object.assign(Object.assign({},o),{webauthn:Object.assign(Object.assign({},o.webauthn),{credential_options:Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:ite(o.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},o),{webauthn:Object.assign(Object.assign({},o.webauthn),{credential_options:Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:ate(o.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(n){if(ce(n))return this._returnResult({data:null,error:n});throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){var t;const{data:{user:n},error:r}=await this.getUser();if(r)return{data:null,error:r};const i={all:[],phone:[],totp:[],webauthn:[]};for(const a of(t=n==null?void 0:n.factors)!==null&&t!==void 0?t:[])i.all.push(a),a.status==="verified"&&i[a.factor_type].push(a);return{data:i,error:null}}async _getAuthenticatorAssuranceLevel(t){var n,r,i,a;if(t)try{const{payload:p}=kp(t);let g=null;p.aal&&(g=p.aal);let m=g;const{data:{user:y},error:v}=await this.getUser(t);if(v)return this._returnResult({data:null,error:v});((r=(n=y==null?void 0:y.factors)===null||n===void 0?void 0:n.filter(j=>j.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(m="aal2");const x=p.amr||[];return{data:{currentLevel:g,nextLevel:m,currentAuthenticationMethods:x},error:null}}catch(p){if(ce(p))return this._returnResult({data:null,error:p});throw p}const{data:{session:s},error:o}
421=await this.getSession();if(o)return this._returnResult({data:null,error:o});if(!s)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:c}=kp(s.access_token);let u=null;c.aal&&(u=c.aal);let f=u;((a=(i=s.user.factors)===null||i===void 0?void 0:i.filter(p=>p.status==="verified"))!==null&&a!==void 0?a:[]).length>0&&(f="aal2");const h=c.amr||[];return{data:{currentLevel:u,nextLevel:f,currentAuthenticationMethods:h},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async n=>{const{data:{session:r},error:i}=n;return i?this._returnResult({data:null,error:i}):r?await he(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:r.access_token,xform:a=>({data:a,error:null})}):this._returnResult({data:null,error:new Wn})})}catch(n){if(ce(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:i},error:a}=r;if(a)return this._returnResult({data:null,error:a});if(!i)return this._returnResult({data:null,error:new Wn});const s=await he(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"approve"},xform:o=>({data:o,error:null})});return s.data&&s.data.redirect_url&&Qt()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(s.data.redirect_url),s})}catch(r){if(ce(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(t,n){try{return await this._useSession(async r=>{const{data:{session:i},error:a}=r;if(a)return this._returnResult({data:null,error:a});if(!i)return this._returnResult({data:null,error:new Wn});const s=await he(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"deny"},xform:o=>({data:o,error:null})});return s.data&&s.data.redirect_url&&Qt()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(s.data.redirect_url),s})}catch(r){if(ce(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;return r?this._returnResult({data:null,error:r}):n?await he(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new Wn})})}catch(t){if(ce(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async n=>{const{data:{session:r},error:i}=n;return i?this._returnResult({data:null,error:i}):r?(await he(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new Wn})})}catch(n){if(ce(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(t,n={keys:[]}){let r=n.keys.find(o=>o.kid===t);if(r)return r;const i=Date.now();if(r=this.jwks.keys.find(o=>o.kid===t),r&&this.jwks_cached_at+mee>i)return r;const{data:a,error:s}=await he(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(s)throw s;return!a.keys||a.keys.length===0||(this.jwks=a,this.jwks_cached_at=i,r=a.keys.find(o=>o.kid===t),!r)?null:r}async getClaims(t,n={}){try{let r=t;if(!r){const{data:p,error:g}
421=await this.getSession();if(g||!p.session)return this._returnResult({data:null,error:g});r=p.session.access_token}const{header:i,payload:a,signature:s,raw:{header:o,payload:c}}=kp(r);n!=null&&n.allowExpired||Dee(a.exp);const u=!i.alg||i.alg.startsWith("HS")||!i.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(i.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!u){const{error:p}=await this.getUser(r);if(p)throw p;return{data:{claims:a,header:i,signature:s},error:null}}const f=Lee(i.alg),d=await crypto.subtle.importKey("jwk",u,f,!0,["verify"]);if(!await crypto.subtle.verify(f,d,s,_ee(`${o}.${c}`)))throw new Jw("Invalid JWT signature");return{data:{claims:a,header:i,signature:s},error:null}}catch(r){if(ce(r))return this._returnResult({data:null,error:r});throw r}}}Tf.nextInstanceID={};const gte=Tf,yte="2.94.1";let wd="";typeof Deno<"u"?wd="deno":typeof document<"u"?wd="web":typeof navigator<"u"&&navigator.product==="ReactNative"?wd="react-native":wd="node";const vte={"X-Client-Info":`supabase-js-${wd}/${yte}`},xte={headers:vte},bte={schema:"public"},wte={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},Ste={};function Of(e){"@babel/helpers - typeof";return Of=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},Of(e)}function jte(e,t){if(Of(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Of(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _te(e){var t=jte(e,"string");return Of(t)=="symbol"?t:t+""}function Ate(e,t,n){return(t=_te(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pT(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 jt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pT(Object(n),!0).forEach(function(r){Ate(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const kte=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),Ete=()=>Headers,Cte=(e,t,n)=>{const r=kte(n),i=Ete();return async(a,s)=>{var o;const c=(o=await t())!==null&&o!==void 0?o:e;let u=new i(s==null?void 0:s.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${c}`),r(a,jt(jt({},s),{},{headers:u}))}};function Pte(e){return e.endsWith("/")?e:e+"/"}function Tte(e,t){var n,r;const{db:i,auth:a,realtime:s,global:o}=e,{db:c,auth:u,realtime:f,global:d}=t,h={db:jt(jt({},c),i),auth:jt(jt({},u),a),realtime:jt(jt({},f),s),storage:{},global:jt(jt(jt({},d),o),{},{headers:jt(jt({},(n=d==null?void 0:d.headers)!==null&&n!==void 0?n:{}),(r=o==null?void 0:o.headers)!==null&&r!==void 0?r:{})}),accessToken:async()=>""};return e.accessToken?h.accessToken=e.accessToken:delete h.accessToken,h}function Ote(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(Pte(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var Nte=class extends gte{constructor(e){super(e)}},Ite=class{constructor(e,t,n){var r,i;this.supabaseUrl=e,this.supabaseKey=t;const a=Ote(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",a),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",a),this.storageUrl=new URL("storage/v1",a),this.functionsUrl=new URL("functions/v1",a);const s=`sb-${a.hostname.split(".")[0]}-auth-token`,o={db:bte,realtime:Ste,auth:jt(jt({},wte),{},{storageKey:s}),global:xte},c=Tte(n??{},o);if(this.storageKey=(r=c.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(i=c.global.headers)!==null&&i!==void 0?i:{},c.accessToken)this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(f,d)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(d)} is not possible`)}});else{var u;this.auth=this._initSupabaseAuthClient((u=c.auth)!==null&&u!==void 0?u:{},this.headers,c.global.fetch)}this.fetch=Cte(t,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(jt({headers:this.headers,accessToken:this._getAccessToken.bind(this)},c.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(f=>this.realtime.setAuth(f)).catch(f=>console.warn("Failed to set initial Realtime auth token:",f)),this.rest=new yJ(new URL("rest/v1",a).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch,timeout:c.db.timeout,urlLengthLimit:c.db.urlLengthLimit}),this.storage=new uee(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new cJ(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,t={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,n)}
421channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,n;if(e.accessToken)return await e.accessToken();const{data:r}=await e.auth.getSession();return(t=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:i,storageKey:a,flowType:s,lock:o,debug:c,throwOnError:u},f,d){const h={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new Nte({url:this.authUrl.href,headers:jt(jt({},h),f),storageKey:a,autoRefreshToken:e,persistSession:t,detectSessionInUrl:n,storage:r,userStorage:i,flowType:s,lock:o,debug:c,throwOnError:u,fetch:d,hasCustomAuthorizationHeader:Object.keys(this.headers).some(p=>p.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new RJ(this.realtimeUrl.href,jt(jt({},e),{},{params:jt(jt({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const Rte=(e,t,n)=>new Ite(e,t,n);function Mte(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const n=t.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=18:!1}Mte()&&console.warn("⚠️  Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const $te="https://wghbmuwvqmbrsrmfdzva.supabase.co",Dte="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6IndnaGJtdXd2cW1icnNybWZkenZhIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzAyODk3OTMsImV4cCI6MjA4NTg2NTc5M30.eqfFIH2iVIYK4l2oGsLZHPYGZorlWXtU4ZiU3FDwTmk",mt=Rte($te,Dte,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),yb="6LfhlWEsAAAAAB7h0wXYo0sfMEESZ2odgfikqMEy";function U_(){const[e,t]=w.useState(!1);return w.useEffect(()=>{if(document.querySelector('script[src*="recaptcha"]')){window.grecaptcha&&window.grecaptcha.ready(()=>t(!0));return}const r=document.createElement("script");return r.src=`https://www.google.com/recaptcha/api.js?render=${yb}`,r.async=!0,r.defer=!0,r.onload=()=>{window.grecaptcha.ready(()=>t(!0))},document.head.appendChild(r),()=>{}},[]),{executeRecaptcha:w.useCallback(async r=>{if(!e||!window.grecaptcha||!yb)return console.warn("reCAPTCHA not loaded yet"),null;try{return await window.grecaptcha.execute(yb,{action:r})}catch(i){return console.error("reCAPTCHA execution failed:",i),null}},[e]),isLoaded:e}}const Lte=L4({name:vo().trim().min(1,{message:"Name is required"}).max(100,{message:"Name must be less than 100 characters"}),email:vo().trim().email({message:"Invalid email address"}).max(255,{message:"Email must be less than 255 characters"}),inquiryType:iJ(["general","customer","investor","press","partnership","support"],{errorMap:()=>({message:"Please select an inquiry type"})}),message:vo().trim().min(1,{message:"Message is required"}).max(2e3,{message:"Message must be less than 2000 characters"})}),Fte=[{value:"general",label:"General Inquiry"},{value:"customer",label:"Customer Inquiry"},{value:"investor",label:"Investor Relations"},{value:"press",label:"Press & Media"},{value:"partnership",label:"Partnership"},{value:"support",label:"Technical Support"}];function Bte(){const[e,t]=w.useState({name:"",email:"",inquiryType:"general",message:""}),[n,r]=w.useState({}),[i,a]=w.useState("idle"),[s,o]=w.useState(""),{executeRecaptcha:c,isLoaded:u}=U_(),f=h=>{const{name:p,value:g}=h.target;t(m=>({...m,[p]:g})),n[p]&&r(m=>({...m,[p]:void 0}))},d=async h=>{h.preventDefault(),a("loading"),r({}),o("");const p=Lte.safeParse(e);if(!p.success){const g={};
421p.error.errors.forEach(m=>{m.path[0]&&(g[m.path[0]]=m.message)}),r(g),a("idle");return}try{const g=await c("contact_form");if(!g)throw new Error("Unable to verify you're not a robot. Please refresh and try again.");const{data:m,error:y}=await mt.functions.invoke("send-contact-email",{body:{...p.data,recaptchaToken:g}});if(y)throw new Error(y.message||"Failed to send message");if(m!=null&&m.error)throw new Error(m.error);a("success"),t({name:"",email:"",inquiryType:"general",message:""})}catch(g){a("error"),o(g.message||"Failed to send message. Please try again.")}};return l.jsx("section",{id:"contact",className:"py-20 md:py-28 scroll-mt-14 border-t border-border",children:l.jsxs("div",{className:"section-container",children:[l.jsx("div",{className:"mono-label mb-4",children:"// CONTACT"}),l.jsx("h2",{className:"text-3xl md:text-4xl font-semibold mb-4",children:"Get in touch"}),l.jsx("p",{className:"text-muted-foreground mb-12 max-w-xl",children:"Whether you're a customer, investor, press, or partner—we'd love to hear from you."}),l.jsx("div",{className:"max-w-xl",children:i==="success"?l.jsxs("div",{className:"rage-card p-8 text-center",children:[l.jsx(Rj,{className:"w-12 h-12 text-primary mx-auto mb-4"}),l.jsx("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Message sent"}),l.jsx("p",{className:"text-muted-foreground mb-6",children:"Thank you for reaching out. We'll get back to you shortly."}),l.jsx("button",{onClick:()=>a("idle"),className:"text-primary hover:text-primary/80 font-medium transition-colors",children:"Send another message →"})]}):l.jsxs("form",{onSubmit:d,className:"space-y-6",children:[l.jsxs("div",{children:[l.jsxs("label",{htmlFor:"name",className:"block text-sm font-medium text-foreground mb-2",children:["Name ",l.jsx("span",{className:"text-primary",children:"*"})]}),l.jsx("input",{type:"text",id:"name",name:"name",value:e.name,onChange:f,maxLength:100,required:!0,className:`w-full bg-background border ${n.name?"border-red-500":"border-border"} rounded px-4 py-3 text-foreground placeholder-muted-foreground focus:outline-none focus:border-primary transition-colors`,placeholder:"Your name"}),n.name&&l.jsx("p",{className:"text-red-500 text-sm mt-1",children:n.name})]}),l.jsxs("div",{children:[l.jsxs("label",{htmlFor:"email",className:"block text-sm font-medium text-foreground mb-2",children:["Email ",l.jsx("span",{className:"text-primary",children:"*"})]}),l.jsx("input",{type:"email",id:"email",name:"email",value:e.email,onChange:f,maxLength:255,required:!0,className:`w-full bg-background border ${n.email?"border-red-500":"border-border"} rounded px-4 py-3 text-foreground placeholder-muted-foreground focus:outline-none focus:border-primary transition-colors`,placeholder:"[email protected]"}),n.email&&l.jsx("p",{className:"text-red-500 text-sm mt-1",children:n.email})]}),l.jsxs("div",{children:[l.jsxs("label",{htmlFor:"inquiryType",className:"block text-sm font-medium text-foreground mb-2",children:["Inquiry type ",l.jsx("span",{className:"text-primary",children:"*"})]}),l.jsx("select",{id:"inquiryType",name:"inquiryType",value:e.inquiryType,onChange:f,required:!0,className:`w-full bg-background border ${n.inquiryType?"border-red-500":"border-border"} rounded px-4 py-3 text-foreground focus:outline-none focus:border-primary transition-colors`,children:Fte.map(h=>l.jsx("option",{value:h.value,children:h.label},h.value))}),n.inquiryType&&l.jsx("p",{className:"text-red-500 text-sm mt-1",children:n.inquiryType})]}),l.jsxs("div",{children:[l.jsxs("label",{htmlFor:"message",className:"block text-sm font-medium text-foreground mb-2",children:["Message ",l.jsx("span",{className:"text-primary",children:"*"})]}),l.jsx("textarea",{id:"message",name:"message",value:e.message,onChange:f,rows:5,maxLength:2e3,required:!0,className:`w-full bg-background border ${n.message?"border-red-500":"border-border"} rounded px-4 py-3 text-foreground placeholder-muted-foreground focus:outline-none focus:border-primary transition-colors resize-none`,placeholder:"How can we help?"}),l.jsxs("div",{className:"flex justify-between items-center mt-1",children:[n.message&&l.jsx("p",{className:"text-red-500 text-sm",children:n.message}),l.jsxs("p",{className:"text-muted-foreground text-xs ml-auto",children:[e.message.length,"/2000"]})]})]}),i==="error"&&l.jsxs("div",{className:"flex items-center gap-2 text-red-500 text-sm",children:[l.jsx(I$,{className:"w-4 h-4"}),l.jsx("span",{children:s})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsx("button",{type:"submit",disabled:i==="loading"||!u,className:"inline-flex items-center gap-2 bg-primary text-background font-semibold px-6 py-3 rounded hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:i==="loading"?l.jsxs(l.Fragment,{children:[l.jsx($j,{className:"w-4 h-4 animate-spin"}),"Sending..."]}):l.jsxs(l.Fragment,{children:[l.jsx(F$,{className:"w-4 h-4"}),"Send message"]})}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:["This site is protected by reCAPTCHA and the Google"," ",l.jsx("a",{href:"https://policies.google.com/privacy",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Privacy Policy"})," ","and"," ",l.jsx("a",{href:"https://policies.google.com/terms",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Terms of Service"})," ","apply."]})]})]})})]})})}
421function Ute(){const e=["Transparent","Accountable","Defensible","Compliant"];return l.jsx("section",{className:"py-20 md:py-28 border-t border-border",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"max-w-2xl",children:[l.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-6",children:"The Future of AI Compliance"}),l.jsx("p",{className:"text-muted-foreground mb-6",children:"Regulations will evolve. Models will change. Audits will increase."}),l.jsx("p",{className:"text-foreground mb-4",children:"RegEngine ensures your AI remains:"}),l.jsx("div",{className:"flex flex-wrap gap-3 mb-8",children:e.map(t=>l.jsx("span",{className:"infra-card px-3 py-1 text-sm text-foreground",children:t},t))}),l.jsxs("p",{className:"text-lg text-foreground font-medium mb-8",children:["If AI touches regulated decisions in your organization,"," ",l.jsx("span",{className:"text-primary",children:"RegEngine is no longer optional"}),"."]}),l.jsxs("div",{className:"flex flex-wrap gap-6",children:[l.jsx(ge,{to:"/demo",className:"btn-outline-brand",children:"Request a demo"}),l.jsx("a",{href:"#contact",className:"link-arrow",children:"Talk to an expert"})]})]})})})}const qte=()=>l.jsxs($t,{children:[l.jsx(xQ,{}),l.jsx(bQ,{}),l.jsx(wQ,{}),l.jsx(_Q,{}),l.jsx(SQ,{}),l.jsx(kQ,{}),l.jsx(OQ,{}),l.jsx(TQ,{}),l.jsx(Bte,{}),l.jsx(Ute,{})]}),zte=Ry("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"border border-primary/70 bg-transparent text-foreground hover:bg-[hsl(var(--primary)/0.08)]",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-border bg-transparent hover:bg-secondary",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-secondary hover:text-secondary-foreground",link:"text-foreground underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-6",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),ie=w.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>{const s=r?xV:"button";return l.jsx(s,{className:ve(zte({variant:t,size:n,className:e})),ref:a,...i})});ie.displayName="Button";const mT={"prior-auth":{title:"Prior Authorization",icon:Nr,context:"CMS-regulated prior authorization for specialty medication",prompt:"Draft a prior authorization request for Humira for a patient with rheumatoid arthritis who has failed methotrexate therapy."},"clinical-notes":{title:"Clinical Notes",icon:yu,context:"HIPAA-governed clinical documentation",prompt:"Generate a clinical note for a 45-year-old patient presenting with chest pain and shortness of breath."},"clinical-trial":{title:"Clinical Trial Protocol",icon:M$,context:"FDA/ICH-regulated protocol development",prompt:"Draft a Phase 2 clinical trial protocol section for a novel oncology therapeutic targeting solid tumors."}},Vte=[{name:"21 CFR Part 11 audit trail",passed:!0},{name:"HIPAA PHI handling",passed:!0},{name:"ICH role approvals required",passed:!0},{name:"Output release gating active",passed:!0}],Wte={"prior-auth":`PRIOR AUTHORIZATION REQUEST
422
423Patient: [REDACTED]
424Medication: Humira (adalimumab) 40mg
425Diagnosis: Rheumatoid Arthritis (M05.79)
426
427Clinical Justification:
428Patient has documented history of RA with inadequate response to conventional DMARD therapy (methotrexate 25mg weekly x 12 weeks). Current disease activity score (DAS28) indicates moderate-to-severe disease activity.
429
430Supporting Documentation:
431- Rheumatology consultation dated [DATE]
432- Laboratory results confirming diagnosis
433- Prior authorization history
434
435This request meets CMS medical necessity criteria for biologic DMARD therapy.
436
437[PENDING COMPLIANCE APPROVAL]`,"clinical-notes":`CLINICAL NOTE - [DATE/TIME]
438
439Chief Complaint: Chest pain and shortness of breath
440
441History of Present Illness:
44245-year-old patient presents with acute onset chest pain described as pressure-like, radiating to left arm. Associated with dyspnea on exertion. Symptoms began approximately 2 hours prior to presentation.
443
444Assessment:
445Differential includes acute coronary syndrome, pulmonary embolism, or musculoskeletal etiology. Recommend immediate ECG, troponin levels, and chest imaging.
446
447Plan:
4481. 12-lead ECG - STAT
4492. Cardiac biomarkers
4503. Chest X-ray
4514. Continuous monitoring
452
453[PENDING CLINICIAN REVIEW]`,"clinical-trial":`CLINICAL TRIAL PROTOCOL - PHASE 2
454Study Title: Efficacy and Safety of [COMPOUND] in Solid Tumors
455
4561. STUDY OBJECTIVES
457Primary: Evaluate objective response rate (ORR) per RECIST 1.1
458Secondary: Progression-free survival, duration of response, safety profile
459
4602. STUDY DESIGN
461Multicenter, open-label, single-arm Phase 2 study
462Target enrollment: 120 patients
463Treatment duration: Until progression or unacceptable toxicity
464
4653. ELIGIBILITY CRITERIA
466- Histologically confirmed solid tumor
467- Measurable disease per RECIST 1.1
468- ECOG performance status 0-1
469- Adequate organ function
470
471[PENDING MULTI-ROLE APPROVAL: Regulatory, Biostatistics, Clinical Ops]`};function Hte(){const[e,t]=w.useState("prior-auth"),[n,r]=w.useState({output:"",policyChecks:[],status:"idle"}),i=()=>{r({output:"",policyChecks:[],status:"generating"}),setTimeout(()=>{r({output:Wte[e],policyChecks:Vte,status:"locked"})},1500)},a=()=>{r(c=>({...c,status:"approved"}))},s=()=>{r({output:"",policyChecks:[],status:"idle"})},o=mT[e];return l.jsx($t,{children:l.jsxs("div",{className:"section-container py-12 md:py-20",children:[l.jsxs(nr.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"max-w-3xl mb-12",children:[l.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[l.jsx(Vt,{size:"md"}),l.jsx("h1",{className:"text-3xl md:text-4xl font-bold",children:"Platform Demo"})]}),l.jsx("p",{className:"text-lg text-muted-foreground",children:"Interactive examples of governed AI workflows."})]}),l.jsx("div",{className:"flex flex-wrap gap-3 mb-8",children:Object.entries(mT).map(([c,u])=>l.jsxs("button",{onClick:()=>{t(c),s()},className:`flex items-center gap-2 px-4 py-2 rounded-lg border transition-all focus-ring ${e===c?"bg-primary text-primary-foreground border-primary":"bg-card border-border hover:border-primary/50"}`,children:[l.jsx(u.icon,{className:"w-4 h-4"}),u.title]},c))}),l.jsxs("div",{className:"grid lg:grid-cols-2 gap-6",children:[l.jsxs("div",{className:"glass-card p-6",children:[l.jsx("h3",{className:"text-lg font-semibold mb-4",children:"AI Input"}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-sm font-medium text-muted-foreground mb-2",children:"Regulatory Context"}),l.jsx("div",{className:"p-3 rounded-lg bg-secondary/50 text-sm",children:o.context})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-sm font-medium text-muted-foreground mb-2",children:"Prompt"}),l.jsx("div",{className:"p-3 rounded-lg bg-secondary/50 text-sm",children:o.prompt})]}),l.jsxs(ie,{onClick:i,disabled:n.status!=="idle",className:"w-full",children:[l.jsx(k6,{className:"w-4 h-4"}),"Run Demo"]})]})]}),l.jsxs("div",{className:"glass-card p-6",children:[l.jsxs("div",{className:"flex items-center justify-between mb-4",children:[l.jsx("h3",{className:"text-lg font-semibold",children:"Output"}),l.jsxs("div",{className:"flex items-center gap-2",children:[n.status==="locked"&&l.jsxs("span",{className:"flex items-center gap-1 text-sm text-warning",children:[l.jsx(Dj,{className:"w-4 h-4"})," LOCKED"]}),n.status==="approved"&&l.jsxs("span",{className:"flex items-center gap-1 text-sm text-success",children:[l.jsx(D$,{className:"w-4 h-4"})," APPROVED"]})]})]}),l.jsxs("div",{className:"min-h-[300px] p-4 rounded-lg bg-secondary/30 border border-border/50 mb-4",children:[n.status==="generating"&&l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[l.jsx("div",{className:"w-4 h-4 border-2 border-primary border-t-transparent rounded-full animate-spin"}),"Generating output..."]}),n.output&&l.jsx("pre",{className:"text-sm whitespace-pre-wrap font-mono",children:n.output})]}),n.policyChecks.length>0&&l.jsxs("div",{className:"mb-4",children:[l.jsx("h4",{className:"text-sm font-medium mb-2",children:"Policy Enforcement"}),l.jsx("div",{className:"space-y-2",children:n.policyChecks.map(c=>l.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[c.passed?l.jsx(ua,{className:"w-4 h-4 text-success"}):l.jsx(kh,{className:"w-4 h-4 text-destructive"}),c.name]},c.name))})]}),n.status==="locked"&&l.jsx(ie,{onClick:a,className:"w-full",children:"Submit for Approval"}),n.status==="approved"&&l.jsx(ie,{onClick:s,variant:"outline",className:"w-full",children:"Reset Demo"})]})]}),n.status==="approved"&&l.jsxs(nr.div,{initial:{opacity:0,y:20}
471,animate:{opacity:1,y:0},className:"mt-8 glass-card p-6",children:[l.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Audit Trail Preview"}),l.jsxs("div",{className:"grid md:grid-cols-4 gap-4 text-sm",children:[l.jsxs("div",{className:"p-3 rounded-lg bg-secondary/30",children:[l.jsx("p",{className:"text-muted-foreground mb-1",children:"Transaction ID"}),l.jsxs("p",{className:"font-mono",children:["TXN-",Date.now()]})]}),l.jsxs("div",{className:"p-3 rounded-lg bg-secondary/30",children:[l.jsx("p",{className:"text-muted-foreground mb-1",children:"Policy Applied"}),l.jsx("p",{children:o.context})]}),l.jsxs("div",{className:"p-3 rounded-lg bg-secondary/30",children:[l.jsx("p",{className:"text-muted-foreground mb-1",children:"Approval Status"}),l.jsx("p",{className:"text-success",children:"All roles approved"})]}),l.jsxs("div",{className:"p-3 rounded-lg bg-secondary/30",children:[l.jsx("p",{className:"text-muted-foreground mb-1",children:"Evidence Package"}),l.jsx("p",{className:"text-primary",children:"Ready for export"})]})]})]})]})})}const Oe=w.forwardRef(({className:e,type:t,...n},r)=>l.jsx("input",{type:t,className:ve("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));Oe.displayName="Input";var Gte="Label",t3=w.forwardRef((e,t)=>l.jsx(Pe.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));t3.displayName=Gte;var n3=t3;const Kte=Ry("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ee=w.forwardRef(({className:e,...t},n)=>l.jsx(n3,{ref:n,className:ve(Kte(),e),...t}));ee.displayName=n3.displayName;const Rt=w.forwardRef(({className:e,...t},n)=>l.jsx("textarea",{className:ve("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
471ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));Rt.displayName="Textarea";const gT={serviceName:"",displayName:"",description:"",contactEmail:"",apiVersion:"v1",documentationUrl:"",requiredFields:"",contextOfUse:"",riskLevel:"medium",regulatoryScope:"",provider:"openai",modelId:"gpt-4",temperature:"0.7",maxTokens:"2048",systemInstruction:"",userInstruction:"",constraints:""};function Yte(){const[e,t]=w.useState(gT),[n,r]=w.useState(!1),[i,a]=w.useState(!1),{toast:s}=ba(),o=h=>{const{name:p,value:g}=h.target;t(m=>({...m,[p]:g}))},c=h=>{h.preventDefault();const p=JSON.parse(localStorage.getItem("regengine_registrations")||"[]"),g={...e,id:crypto.randomUUID(),createdAt:new Date().toISOString(),status:"pending"};p.push(g),localStorage.setItem("regengine_registrations",JSON.stringify(p)),r(!0),s({title:"Service registered",description:"Your service is pending verification."})},u=`/integrations/webhook/${e.serviceName||"{service_name}"}`,f=()=>{navigator.clipboard.writeText(JSON.stringify(e,null,2)),a(!0),setTimeout(()=>a(!1),2e3)},d=()=>{t(gT),r(!1)};return n?l.jsx($t,{children:l.jsx("div",{className:"section-container py-12 md:py-20",children:l.jsxs(nr.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"glass-card p-8 max-w-2xl mx-auto text-center",children:[l.jsx("div",{className:"w-16 h-16 rounded-full bg-success/20 flex items-center justify-center mx-auto mb-6",children:l.jsx(ua,{className:"w-8 h-8 text-success"})}),l.jsx("h2",{className:"text-2xl font-bold mb-4",children:"AI Service Registered"}),l.jsx("p",{className:"text-muted-foreground mb-6",children:"Your AI service is now governed by RegEngine.ai."}),l.jsxs("div",{className:"p-4 rounded-lg bg-secondary/50 text-left mb-6",children:[l.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Webhook endpoint:"}),l.jsx("code",{className:"text-sm text-primary break-all",children:u})]}),l.jsx(ie,{onClick:d,variant:"outline",children:"Register Another Service"})]})})}):l.jsx($t,{children:l.jsxs("div",{className:"section-container py-12 md:py-20",children:[l.jsxs(nr.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"max-w-3xl mb-8",children:[l.jsx("h1",{className:"text-3xl md:text-4xl font-bold mb-4",children:"Register an AI Service"}),l.jsx("p",{className:"text-lg text-muted-foreground",children:"Bring any AI system under RegEngine.ai governance."})]}),l.jsxs("div",{className:"grid lg:grid-cols-3 gap-8",children:[l.jsxs("form",{onSubmit:c,className:"lg:col-span-2 space-y-8",children:[l.jsxs("div",{className:"glass-card p-6",children:[l.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Service Information"}),l.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[l.jsxs("div",{children:[l.jsx(ee,{htmlFor:"serviceName",children:"Service Name *"}),l.jsx(Oe,{id:"serviceName",name:"serviceName",value:e.serviceName,onChange:o,required:!0,placeholder:"my-service",className:"mt-1.5"})]}),l.jsxs("div",{children:[l.jsx(ee,{htmlFor:"displayName",children:"Display Name *"}),l.jsx(Oe,{id:"displayName",name:"displayName",value:e.displayName,onChange:o,required:!0,placeholder:"My AI Service",className:"mt-1.5"})]}),l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx(ee,{htmlFor:"description",children:"Description"}),l.jsx(Rt,{id:"description",name:"description",value:e.description,onChange:o,placeholder:"Describe your service...",className:"mt-1.5"})]}),l.jsxs("div",{children:[l.jsx(ee,{htmlFor:"contactEmail",children:"Contact Email"}),l.jsx(Oe,{id:"contactEmail",name:"contactEmail",type:"email",value:e.contactEmail,onChange:o,placeholder:"[email protected]",className:"mt-1.5"})]}),l.jsxs("div",{children:[l.jsx(ee,{htmlFor:"apiVersion",children:"API Version"}),l.jsx(Oe,{id:"apiVersion",name:"apiVersion",value:e.apiVersion,onChange:o,placeholder:"v1",className:"mt-1.5"})]}),l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx(ee,{htmlFor:"documentationUrl",children:"Documentation URL"}),l.jsx(Oe,{id:"documentationUrl",name:"documentationUrl",type:"url",value:e.documentationUrl,onChange:o,placeholder:"https://docs.example.com",className:"mt-1.5"})]})]})]}),l.jsxs("div",{className:"glass-card p-6",children:[l.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Transformation Configuration"}),l.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx(ee,{htmlFor:"requiredFields",children:"Required Fields *"}),l.jsx(Oe,{id:"requiredFields",name:"requiredFields",value:e.requiredFields,onChange:o,required:!0,placeholder:"patient_id, context, request_type",className:"mt-1.5"})]}),l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx(ee,{htmlFor:"contextOfUse",children:"Context of Use *"}),l.jsx(Rt,{id:"contextOfUse",name:"contextOfUse",value:e.contextOfUse,onChange:o,required:!0,placeholder:"Describe the regulatory context...",className:"mt-1.5"})]}),l.jsxs("div",{children:[l.jsx(ee,{htmlFor:"riskLevel",children:"Risk Level *"}),l.jsxs("select",{id:"riskLevel",name:"riskLevel",value:e.riskLevel,onChange:o,className:"mt-1.5 w-full h-10 rounded-lg border border-input bg-background px-3 text-sm focus-ring",children:[l.jsx("option",{value:"low",children:"Low"}),l.jsx("option",{value:"medium",children:"Medium"}),l.jsx("option",{value:"high",children:"High"})]})]}),l.jsxs("div",{children:[l.jsx(ee,{htmlFor:"regulatoryScope",children:"Regulatory 
471Scope *"}),l.jsx(Oe,{id:"regulatoryScope",name:"regulatoryScope",value:e.regulatoryScope,onChange:o,required:!0,placeholder:"FDA, HIPAA, ICH",className:"mt-1.5"})]})]})]}),l.jsxs("div",{className:"glass-card p-6",children:[l.jsx("h3",{className:"text-lg font-semibold mb-4",children:"AI Model Configuration"}),l.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[l.jsxs("div",{children:[l.jsx(ee,{htmlFor:"provider",children:"Provider *"}),l.jsxs("select",{id:"provider",name:"provider",value:e.provider,onChange:o,className:"mt-1.5 w-full h-10 rounded-lg border border-input bg-background px-3 text-sm focus-ring",children:[l.jsx("option",{value:"openai",children:"OpenAI"}),l.jsx("option",{value:"anthropic",children:"Anthropic"})]})]}),l.jsxs("div",{children:[l.jsx(ee,{htmlFor:"modelId",children:"Model ID *"}),l.jsx(Oe,{id:"modelId",name:"modelId",value:e.modelId,onChange:o,required:!0,placeholder:"gpt-4",className:"mt-1.5"})]}),l.jsxs("div",{children:[l.jsx(ee,{htmlFor:"temperature",children:"Temperature *"}),l.jsx(Oe,{id:"temperature",name:"temperature",type:"number",step:"0.1",min:"0",max:"2",value:e.temperature,onChange:o,required:!0,className:"mt-1.5"})]}),l.jsxs("div",{children:[l.jsx(ee,{htmlFor:"maxTokens",children:"Max Tokens *"}),l.jsx(Oe,{id:"maxTokens",name:"maxTokens",type:"number",value:e.maxTokens,onChange:o,required:!0,className:"mt-1.5"})]})]})]}),l.jsxs("div",{className:"glass-card p-6",children:[l.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Prompt Configuration"}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx(ee,{htmlFor:"systemInstruction",children:"System Instruction *"}),l.jsx(Rt,{id:"systemInstruction",name:"systemInstruction",value:e.systemInstruction,onChange:o,required:!0,placeholder:"You are a compliance-aware AI assistant...",className:"mt-1.5",rows:3})]}),l.jsxs("div",{children:[l.jsx(ee,{htmlFor:"userInstruction",children:"User Instruction *"}),l.jsx(Rt,{id:"userInstruction",name:"userInstruction",value:e.userInstruction,onChange:o,required:!0,placeholder:"Template for user prompts...",className:"mt-1.5",rows:3})]}),l.jsxs("div",{children:[l.jsx(ee,{htmlFor:"constraints",children:"Constraints *"}),l.jsx(Rt,{id:"constraints",name:"constraints",value:e.constraints,onChange:o,required:!0,placeholder:"Output constraints and guardrails...",className:"mt-1.5",rows:3})]})]})]}),l.jsxs("div",{className:"flex gap-4",children:[l.jsx(ie,{type:"submit",size:"lg",children:"Register Service"}),l.jsx(ie,{type:"button",variant:"outline",size:"lg",onClick:d,children:"Cancel"})]})]}),l.jsx("div",{className:"lg:col-span-1",children:l.jsxs("div",{className:"glass-card p-6 sticky top-24",children:[l.jsxs("div",{className:"flex items-center justify-between mb-4",children:[l.jsx("h3",{className:"text-sm font-semibold",children:"JSON Payload Preview"}),l.jsx(ie,{variant:"ghost",size:"sm",onClick:f,children:i?l.jsx(ua,{className:"w-4 h-4"}):l.jsx(Nc,{className:"w-4 h-4"})})]}),l.jsx("pre",{className:"text-xs text-muted-foreground overflow-auto max-h-[600px] p-3 rounded-lg bg-secondary/50",children:JSON.stringify(e,null,2)})]})})]})]})})}const yT=[{id:"1",transactionId:"TXN-2024-001",service:"Prior Authorization",context:"CMS-regulated",risk:"high",requiredRoles:["Clinician","Compliance"],status:"pending",createdAt:new Date().toISOString(),prompt:"Draft a prior authorization request for Humira for rheumatoid arthritis.",policy:"CMS coverage determination guidelines, HIPAA PHI handling, Part 11 audit trail",output:`PRIOR AUTHORIZATION REQUEST
472
473Patient: [REDACTED]
474Medication: Humira (adalimumab) 40mg
475Diagnosis: Rheumatoid Arthritis (M05.79)
476
477Clinical Justification:
478Patient has documented history of RA with inadequate response to conventional DMARD therapy.`,approvals:[{role:"Clinician",approved:!1},{role:"Compliance",approved:!1}]},{id:"2",transactionId:"TXN-2024-002",service:"Clinical Notes",context:"HIPAA-governed",risk:"medium",requiredRoles:["Clinician"],status:"pending",createdAt:new Date(Date.now()-36e5).toISOString(),prompt:"Generate clinical note for chest pain presentation.",policy:"HIPAA minimum necessary standard, institutional documentation guidelines",output:`CLINICAL NOTE
479
480Chief Complaint: Chest pain and shortness of breath
481
482History of Present Illness:
48345-year-old patient presents with acute onset chest pain.`,approvals:[{role:"Clinician",approved:!1}]},{id:"3",transactionId:"TXN-2024-003",service:"Clinical Trial Protocol",context:"FDA/ICH-regulated",risk:"high",requiredRoles:["Regulatory","Biostatistics","Clinical Ops"],status:"approved",createdAt:new Date(Date.now()-864e5).toISOString(),prompt:"Draft Phase 2 protocol section for oncology therapeutic.",policy:"21 CFR Part 312, ICH E6(R2) GCP, institutional IRB requirements",output:`CLINICAL TRIAL PROTOCOL - PHASE 2
484
485Study Title: Efficacy and Safety Study
486
4871. STUDY OBJECTIVES
488Primary: Evaluate objective response rate (ORR)`,approvals:[{role:"Regulatory",approved:!0,approvedAt:new Date(Date.now()-432e5).toISOString()},{role:"Biostatistics",approved:!0,approvedAt:new Date(Date.now()-216e5).toISOString()},{role:"Clinical Ops",approved:!0,approvedAt:new Date(Date.now()-72e5).toISOString()}]}];function Xte(){const[e,t]=w.useState([]),[n,r]=w.useState(null);w.useEffect(()=>{const o=localStorage.getItem("regengine_approvals");o?t(JSON.parse(o)):(t(yT),localStorage.setItem("regengine_approvals",JSON.stringify(yT)))},[]);const i=(o,c)=>{t(u=>{const f=u.map(d=>{if(d.id===o){const h=d.approvals.map(g=>g.role===c?{...g,approved:!0,approvedAt:new Date().toISOString()}:g),p=h.every(g=>g.approved);return{...d,approvals:h,status:p?"approved":"pending"}}return d});return localStorage.setItem("regengine_approvals",JSON.stringify(f)),f})},a=o=>{switch(o){case"high":return"text-destructive";case"medium":return"text-warning";default:return"text-success"}},s=o=>new Date(o).toLocaleString();return l.jsx($t,{children:l.jsxs("div",{className:"section-container py-12 md:py-20",children:[l.jsxs(nr.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"mb-8",children:[l.jsx("h1",{className:"text-3xl md:text-4xl font-bold mb-4",children:"Approval Queue"}),l.jsx("p",{className:"text-lg text-muted-foreground",children:"No AI output is released without required approvals."})]}),l.jsx("div",{className:"glass-card overflow-hidden",children:l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full",children:[l.jsx("thead",{className:"bg-secondary/50",children:l.jsxs("tr",{children:[l.jsx("th",{className:"text-left p-4 text-sm font-medium text-muted-foreground",children:"Transaction ID"}),l.jsx("th",{className:"text-left p-4 text-sm font-medium text-muted-foreground",children:"Service"}),l.jsx("th",{className:"text-left p-4 text-sm font-medium text-muted-foreground",children:"Context"}),l.jsx("th",{className:"text-left p-4 text-sm font-medium text-muted-foreground",children:"Risk"}),l.jsx("th",{className:"text-left p-4 text-sm font-medium text-muted-foreground",children:"Required Roles"}),l.jsx("th",{className:"text-left p-4 text-sm font-medium text-muted-foreground",children:"Status"}),l.jsx("th",{className:"text-left p-4 text-sm font-medium text-muted-foreground",children:"Created"}),l.jsx("th",{className:"text-left p-4 text-sm font-medium text-muted-foreground",children:"Action"})]})}),l.jsx("tbody",{children:e.map(o=>l.jsxs("tr",{className:"border-t border-border/50 hover:bg-secondary/20",children:[l.jsx("td",{className:"p-4 text-sm font-mono",children:o.transactionId}),l.jsx("td",{className:"p-4 text-sm",children:o.service}),l.jsx("td",{className:"p-4 text-sm text-muted-foreground",children:o.context}),l.jsx("td",{className:"p-4",children:l.jsx("span",{className:`text-sm font-medium capitalize ${a(o.risk)}`,children:o.risk})}),l.jsx("td",{className:"p-4",children:l.jsx("div",{className:"flex flex-wrap gap-1",children:o.requiredRoles.map(c=>l.jsx("span",{className:"badge-pill text-xs",children:c},c))})}),l.jsx("td",{className:"p-4",children:l.jsxs("span",{className:`inline-flex items-center gap-1 text-sm ${o.status==="approved"?"text-success":"text-warning"}`,children:[o.status==="approved"?l.jsx(D$,{className:"w-4 h-4"}):l.jsx(Dj,{className:"w-4 h-4"}),o.status.toUpperCase()]})}),l.jsx("td",{className:"p-4 text-sm text-muted-foreground",children:l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx(R$,{className:"w-3 h-3"}),s(o.createdAt)]})}),l.jsx("td",{className:"p-4",children:l.jsxs(ie,{variant:"ghost",size:"sm",onClick:()=>r(o),children:[l.jsx(x6,{className:"w-4 h-4"}),"View"]})})]},o.id))})]})})}),l.jsx(S4,{children:n&&l.jsxs(l.Fragment,{children:[l.jsx(nr.div,{initial:{opacity:0}
488,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-background/80 backdrop-blur-sm z-50",onClick:()=>r(null)}),l.jsx(nr.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:30,stiffness:300},className:"fixed right-0 top-0 bottom-0 w-full max-w-2xl bg-card border-l border-border z-50 overflow-y-auto",children:l.jsxs("div",{className:"p-6",children:[l.jsxs("div",{className:"flex items-center justify-between mb-6",children:[l.jsx("h2",{className:"text-xl font-bold",children:n.transactionId}),l.jsx(ie,{variant:"ghost",size:"sm",onClick:()=>r(null),children:l.jsx(kh,{className:"w-4 h-4"})})]}),l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-2",children:"Prompt Snapshot"}),l.jsx("div",{className:"p-4 rounded-lg bg-secondary/50 text-sm",children:n.prompt})]}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-2",children:"Policy Snapshot"}),l.jsx("div",{className:"p-4 rounded-lg bg-secondary/50 text-sm",children:n.policy})]}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-2",children:"Approval Checklist"}),l.jsx("div",{className:"space-y-2",children:n.approvals.map(o=>l.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg bg-secondary/30",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[o.approved?l.jsx(ua,{className:"w-5 h-5 text-success"}):l.jsx("div",{className:"w-5 h-5 rounded-full border-2 border-muted-foreground"}),l.jsx("span",{className:"font-medium",children:o.role}),o.approvedAt&&l.jsx("span",{className:"text-xs text-muted-foreground",children:s(o.approvedAt)})]}),!o.approved&&n.status==="pending"&&l.jsx(ie,{size:"sm",onClick:()=>i(n.id,o.role),children:"Approve"})]},o.role))})]}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-2",children:"Output Preview"}),l.jsx("div",{className:"p-4 rounded-lg bg-secondary/50 text-sm font-mono whitespace-pre-wrap",children:n.output})]}),l.jsxs(ie,{variant:"outline",className:"w-full",children:[l.jsx(w6,{className:"w-4 h-4 mr-2"}),"Export Evidence PDF"]})]})]})})]})})]})})}const Zte=()=>{const e=Is();return w.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),l.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:l.jsxs("div",{className:"text-center",children:[l.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),l.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),l.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},Qte={initial:{opacity:0}
488,animate:{opacity:1},transition:{duration:.5}};function Jte(){return l.jsxs("section",{className:"relative py-28 md:py-40 lg:py-52 overflow-hidden",children:[l.jsx(nr.div,{className:"absolute left-8 md:left-16 lg:left-24 top-1/2 -translate-y-1/2",initial:{scaleY:0,originY:"100%"},animate:{scaleY:1},transition:{duration:.4,ease:"easeOut"},children:l.jsx("div",{className:"rounded-full",style:{width:4,height:"min(70vh, 500px)",background:"linear-gradient(to bottom, var(--spine-top), var(--spine-bottom))"}})}),l.jsx("div",{className:"section-container",children:l.jsx("div",{className:"max-w-2xl ml-8 md:ml-16",children:l.jsxs(nr.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.4,duration:.5},children:[l.jsxs("h1",{className:"text-4xl md:text-5xl lg:text-7xl font-bold leading-[1.1] mb-8 tracking-tight",children:["Regulatory Intelligence.",l.jsx("br",{}),l.jsx("span",{className:"text-primary",children:"Engineered."})]}),l.jsx("p",{className:"text-xl md:text-2xl text-muted-foreground mb-6 leading-relaxed max-w-xl",children:"AI-native infrastru
488cture for compliance, validation, and regulatory execution."}),l.jsxs("p",{className:"text-base text-muted-foreground/70 mb-12 max-w-lg leading-relaxed",children:["We're not another compliance dashboard.",l.jsx("br",{}),"We're the system beneath it."]}),l.jsxs("div",{className:"flex flex-wrap gap-4 mb-12",children:[l.jsx("a",{href:"#demo",className:"btn-outline-brand",children:"Come Find Us"}),l.jsx("a",{href:"#demo",className:"btn-outline-brand border-muted-foreground/30",children:"Tell Us Your Problem"})]}),l.jsx("div",{className:"text-muted-foreground/50 text-sm font-mono tracking-wider",children:"SXSW 2026 — Austin, Texas"})]})})})]})}function ene(){return l.jsx("section",{className:"py-24 md:py-32 border-t border-border",children:l.jsx("div",{className:"section-container",children:l.jsx("div",{className:"max-w-2xl",children:l.jsxs(nr.div,{...Qte,viewport:{once:!0},whileInView:"animate",initial:"initial",children:[l.jsx("h2",{className:"text-3xl md:text-5xl font-bold leading-tight mb-12 tracking-tight",children:"Compliance Is Broken."}),l.jsxs("div",{className:"space-y-2 text-lg md:text-xl text-muted-foreground mb-12",children:[l.jsx("p",{children:"Spreadsheets."}),l.jsx("p",{children:"Manual audits."}),l.jsx("p",{children:"Static policies."}),l.jsx("p",{children:"Last-minute defense drills."})]}),l.jsxs("div",{className:"space-y-4 text-lg text-muted-foreground/70 leading-relaxed",children:[l.jsx("p",{children:"Regulation hasn't caught up to AI."}),l.jsx("p",{children:"And AI hasn't been built for regulation."})]}),l.jsx("p",{className:"text-xl md:text-2xl text-foreground font-semibold mt-10",children:"That gap is risk."})]})})})})}function tne(){return l.jsx("section",{className:"py-24 md:py-32 border-t border-border bg-card",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"max-w-2xl",children:[l.jsx("h2",{className:"text-3xl md:text-5xl font-bold leading-tight mb-12 tracking-tight",children:"Infrastructure, Not Paperwork."}),l.jsx("p",{className:"text-lg text-muted-foreground mb-10 leading-relaxed",children:"RegEngine replaces fragmented workflows with a programmable regulatory spine."}),l.jsxs("div",{className:"space-y-3 text-lg text-muted-foreground mb-12",children:[l.jsxs("p",{children:["Validation becomes ",l.jsx("span",{className:"text-foreground",children:"structured"}),"."]}),l.jsxs("p",{children:["Compliance becomes ",l.jsx("span",{className:"text-foreground",children:"executable"}),"."]}),l.jsxs("p",{children:["Audit defense becomes ",l.jsx("span",{className:"text-foreground",children:"built-in"}),"."]})]}),l.jsxs("div",{className:"space-y-2 text-muted-foreground/50 text-base",children:[l.jsx("p",{children:"No chaos."}),l.jsx("p",{children:"No scramble."}),l.jsx("p",{children:"No panic."})]})]})})})}function nne(){const e=["A consulting firm","A GRC dashboard","A document repository","A workflow toy"],t=["A validation engine","A compliance execution layer","A regulatory intelligence core","An audit-ready system of record"];return l.jsx("section",{className:"py-24 md:py-32 border-t border-border",children:l.jsxs("div",{className:"section-container",children:[l.jsxs("h2",{className:"text-3xl md:text-5xl font-bold leading-tight mb-16 tracking-tight",children:["AI-Native Regulatory",l.jsx("br",{}),"Infrastructure."]}),l.jsxs("div",{className:"grid md:grid-cols-2 gap-16",children:[l.jsxs("div",{children:[l.jsx("p",{className:"mono-label mb-6",children:"We are not"}),l.jsx("div",{className:"space-y-4",children:e.map(n=>l.jsx("p",{className:"text-muted-foreground/50 text-lg line-through decoration-border",children:n},n))})]}),l.jsxs("div",{children:[l.jsx("p",{className:"mono-label mb-6",children:"We are"}),l.jsx("div",{className:"space-y-4",children:t.map(n=>l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"w-4 h-px bg-primary"}),l.jsx("p",{className:"text-foreground text-lg",children:n})]},n))})]})]})]})})}function rne(){const e=["Life Sciences","Health Tech","Financial Services","AI Platforms"];return l.jsx("section",{className:"py-20 md:py-28 border-t border-border bg-card",children:l.jsxs("div",{className:"section-container",children:[l.jsx("div",{className:"flex flex-wrap items-center gap-0 mb-8",children:e.map((t,n)=>l.jsxs("div",{className:"flex items-center",children:[l.jsx("span",{className:"text-foreground text-lg md:text-xl font-normal py-2 px-4",children:t}),n<e.length-1&&l.jsx("div",{className:"w-px h-5 bg-border mx-2"})]},t))}),l.jsx("p",{className:"text-muted-foreground text-base max-w-lg",children:"If regulation matters, infrastru
488cture matters more."})]})})}function ine(){return l.jsx("section",{className:"py-24 md:py-32 border-t border-border",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"max-w-2xl",children:[l.jsx("h2",{className:"text-3xl md:text-5xl font-bold leading-tight mb-12 tracking-tight",children:"Why Now."}),l.jsxs("div",{className:"space-y-4 text-lg text-muted-foreground leading-relaxed mb-10",children:[l.jsx("p",{children:"AI adoption is accelerating."}),l.jsx("p",{children:"Regulation is tightening."}),l.jsx("p",{children:"Enterprise risk tolerance is shrinking."})]}),l.jsxs("div",{className:"border-l border-primary/30 pl-6 space-y-3",children:[l.jsx("p",{className:"text-muted-foreground/60",children:"Most compliance tools were built for paper processes."}),l.jsx("p",{className:"text-foreground text-lg font-medium",children:"RegEngine was built for intelligent systems."})]})]})})})}function ane(){return l.jsx("section",{className:"py-24 md:py-32 border-t border-border bg-card",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"max-w-2xl",children:[l.jsxs("h2",{className:"text-3xl md:text-5xl font-bold leading-tight mb-12 tracking-tight",children:["Make Compliance",l.jsx("br",{}),"Programmable."]}),l.jsxs("div",{className:"space-y-4 text-lg text-muted-foreground leading-relaxed mb-10",children:[l.jsxs("p",{children:["Turn regulatory burden into ",l.jsx("span",{className:"text-foreground",children:"operational advantage"}),"."]}),l.jsxs("p",{children:["Turn audit defense into ",l.jsx("span",{className:"text-foreground",children:"architectural strength"}),"."]}),l.jsxs("p",{children:["Turn enforcement into ",l.jsx("span",{className:"text-foreground",children:"engineering"}),"."]})]}),l.jsx("p",{className:"text-muted-foreground/50 text-base mt-10",children:"This is infrastructure."})]})})})}function sne(){const[e,t]=w.useState({name:"",email:"",message:""}),[n,r]=w.useState("idle"),{executeRecaptcha:i}=U_(),a=async s=>{if(s.preventDefault(),!(!e.name.trim()||!e.email.trim())){r("loading");try{const o=await i("sxsw_connect"),{error:c}=await mt.functions.invoke("send-contact-email",{body:{name:e.name.trim(),email:e.email.trim(),inquiryType:"general",message:`[SXSW Connect] ${e.message.trim()||"I'd like to connect at SXSW."}`,recaptchaToken:o}});if(c)throw c;r("success")}catch{r("error")}}};return l.jsx("section",{id:"demo",className:"py-24 md:py-32 border-t border-border",style:{background:"hsl(216 50% 5%)"},children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"grid md:grid-cols-2 gap-16 items-start",children:[l.jsxs("div",{children:[l.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-10 tracking-tight",children:"Find Us. Talk With Us."}),l.jsxs("div",{className:"space-y-6 text-lg text-muted-foreground leading-relaxed mb-10",children:[l.jsx("p",{children:"We're not doing booth demos or scripted walkthroughs."}),l.jsx("p",{children:"We want to hear what you're actually dealing with — the regulatory headaches, the audit scrambles, the gaps between your tools and your obligations."}),l.jsxs("p",{children:["Tell us the problem you're trying to solve.",l.jsx("br",{}),"We'll tell you honestly if we can help."]})]}),l.jsxs("div",{className:"border-l border-primary/30 pl-6 space-y-3 mb-10",children:[l.jsx("p",{className:"text-muted-foreground/60 text-base",children:"No pitch decks. No sales theater."}),l.jsx("p",{className:"text-foreground text-lg font-medium",children:"Just a real conversation about what's broken and what could be better."})]}),l.jsxs("div",{className:"space-y-2 text-muted-foreground/40 text-sm font-mono tracking-wider",children:[l.jsx("p",{children:"SXSW 2026 — Austin, Texas"}),l.jsx("p",{children:"Grab a coffee. Pull up a chair."})]})]}),l.jsxs("div",{children:[l.jsx("p",{className:"mono-label mb-6",children:"// LET'S CONNECT"}),n==="success"?l.jsxs("div",{className:"flex items-start gap-3 text-primary py-8",children:[l.jsx(Rj,{className:"w-5 h-5 mt-1 shrink-0"}),l.jsxs("div",{children:[l.jsx("p",{className:"text-lg font-medium mb-2",children:"We'll reach out soon."}),l.jsx("p",{className:"text-muted-foreground text-base",children:"Looking forward to the conversation."})]})]}):l.jsxs("form",{onSubmit:a,className:"space-y-4",children:[l.jsx("input",{type:"text",placeholder:"Your name",required:!0,maxLength:100,value:e.name,onChange:s=>t(o=>({...o,name:s.target.value})),className:"w-full bg-background border border-border rounded-md px-4 py-3 text-foreground placeholder:text-muted-foreground
488/50 focus:outline-none focus:ring-1 focus:ring-primary"}),l.jsx("input",{type:"email",placeholder:"Your email",required:!0,maxLength:255,value:e.email,onChange:s=>t(o=>({...o,email:s.target.value})),className:"w-full bg-background border border-border rounded-md px-4 py-3 text-foreground placeholder:text-muted-foreground/50 focus:outline-none focus:ring-1 focus:ring-primary"}),l.jsx("textarea",{placeholder:"What problem are you working to solve?",maxLength:2e3,rows:4,value:e.message,onChange:s=>t(o=>({...o,message:s.target.value})),className:"w-full bg-background border border-border rounded-md px-4 py-3 text-foreground placeholder:text-muted-foreground/50 focus:outline-none focus:ring-1 focus:ring-primary resize-none"}),l.jsxs("button",{type:"submit",disabled:n==="loading",className:"btn-outline-brand inline-flex items-center gap-2",children:[n==="loading"?l.jsx($j,{className:"w-4 h-4 animate-spin"}):null,n==="error"?"Try Again":"Let's Talk"]})]})]})]})})})}function one(){return l.jsx("footer",{className:"border-t border-border py-12",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-6",children:[l.jsxs("div",{className:"space-y-3",children:[l.jsx(Vt,{size:"sm"}),l.jsx("p",{className:"text-muted-foreground/50 text-sm",children:"AI-native regulatory infrastructure."})]}),l.jsx("span",{className:"text-muted-foreground/40 text-sm font-mono tracking-wider",children:"Austin — SXSW 2026"})]})})})}function lne(){return l.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[l.jsx(Jte,{}),l.jsx(ene,{}),l.jsx(tne,{}),l.jsx(nne,{}),l.jsx(rne,{}),l.jsx(ine,{}),l.jsx(ane,{}),l.jsx(sne,{}),l.jsx(one,{})]})}function _a({title:e,description:t,canonical:n,ogType:r="website",noindex:i=!1}){const a=e.includes("RegEngine")?e:`${e} — RegEngine`,o=n?`https://regengine.ai${n}`:void 0;return l.jsxs(QD,{children:[l.jsx("title",{children:a}),l.jsx("meta",{name:"description",content:t}),i&&l.jsx("meta",{name:"robots",content:"noindex, nofollow"}),o&&l.jsx("link",{rel:"canonical",href:o}),l.jsx("meta",{property:"og:title",content:a}),l.jsx("meta",{property:"og:description",content:t}),l.jsx("meta",{property:"og:type",content:r}),o&&l.jsx("meta",{property:"og:url",content:o}),l.jsx("meta",{name:"twitter:title",content:a}),l.jsx("meta",{name:"twitter:description",content:t})]})}function Jy({data:e}){return l.jsx(QD,{children:l.jsx("script",{type:"application/ld+json",children:JSON.stringify(e)})})}function cne(){return l.jsx(Jy,{data:{"@context":"https://schema.org","@type":"Organization",name:"RegEngine",url:"https://regengine.ai",logo:"https://regengine.ai/favicon.svg",description:"AI-powered regulatory intelligence and compliance platform for life sciences, pharma, and healthcare.",sameAs:["https://twitter.com/RegEngineAI"],contactPoint:{"@type":"ContactPoint",contactType:"sales",url:"https://regengine.ai/contact"}}})}function r3(){return l.jsx(Jy,{data:{"@context":"https://schema.org","@type":"SoftwareApplication",name:"RegEngine",applicationCategory:"BusinessApplication",operatingSystem:"Web",description:"AI-powered regulatory intelligence platform. Search regulations, map to SOPs, monitor changes, and generate compliance insights.",url:"https://regengine.ai",offers:{"@type":"Offer",category:"Enterprise Software"},featureList:["Regulatory AI Search","Regulatory Knowledge Graph","AI Compliance Copilot","Regulation-to-SOP Mapping","Regulatory Change Monitoring","AI Decision Logging","Approval Workflows","Regulatory Intelligence Database"]}})}function q_({faqs:e}){return l.jsx(Jy,{data:{"@context":"https://schema.org","@type":"FAQPage",mainEntity:e.map(t=>({"@type":"Question",name:t.question,acceptedAnswer:{"@type":"Answer",text:t.answer}}))}})}function une({title:e,description:t,url:n,datePublished:r}){return l.jsx(Jy,{data:{"@context":"https://schema.org","@type":"Article",headline:e,description:t,url:`https://regengine.ai${n}`,datePublished:r,author:{"@type":"Organization",name:"RegEngine"},publisher:{"@type":"Organization",name:"RegEngine",logo:{"@type":"ImageObject",url:"https://regengine.ai/favicon.svg"}}}})}const dne=[{icon:Ah,label:"Regulatory AI Search",href:"/features/regulatory-ai-search",description:"Natural language search across regulatory frameworks."},{icon:Lj,label:"Knowledge Graph",href:"/features/regulatory-knowledge-graph",description:"Map relationships across regulations, SOPs, and controls."},{icon:Nj,label:"AI Compliance Copilot",href:"/features/ai-compliance-copilot",description:"Ask questions, get traceable answers from source regulations."},{icon:yu,label:"SOP Mapping",href:"/features/regulation-sop-mapping",description:"Automatically map regulations to standard operating procedures."},{icon:gu,label:"Change Monitoring",href:"/features/regulatory-change-monitoring",description:"Track regulatory updates across jurisdictions in real time."},{icon:Mj,label:"Intelligence Database",href:"/features/regulatory-intelligence-database",description:"Centralized, searchable regulatory intelligence repository."},{icon:Nr,label:"Decision Logging",href:"/features/ai-decision-logging",description:"Immutable audit trails for every AI-generated output."},{icon:Pt,label:"Approval Workflows",href:"/features/approval-workflows",description:"Human-in-the-loop controls and role-based authorization."}],fne=[{label:"Pharmaceutical",href:"/industries/pharma"},{label:"Biotech",href:"/industries/biotech"},{label:"CROs",href:"/industries/cro"},{label:"Healthcare Technology",href:"/industries/healthcare-technology"},{label:"Medical Devices",href:"/industries/medical-devices"},{label:"Life Sciences",href:"/industries/life-sciences"}],vT=[{question:"What is a regulatory AI platform?",answer:"A regulatory AI platform uses artificial intelligence to interpret, organize, and operationalize regulatory requirements. Unlike manual compliance systems, it enables team
488s to search regulations in natural language, automatically map requirements to internal controls, and monitor regulatory changes in real time."},{question:"How does RegEngine differ from traditional regulatory information management?",answer:"Traditional RIM systems store documents. RegEngine transforms regulations into machine-readable intelligence—searchable, mappable, and actionable. It uses knowledge graphs to model regulatory relationships and AI to surface relevant requirements instantly."},{question:"Which regulatory frameworks does RegEngine support?",answer:"RegEngine supports FDA (21 CFR), EU MDR, IVDR, ICH guidelines, GxP frameworks (GLP, GMP, GCP, GDP), HIPAA, SOX, ISO 13485, ISO 14971, EU AI Act, and more. The platform is designed to handle multi-jurisdictional compliance."},{question:"Is RegEngine compliant with 21 CFR Part 11?",answer:"Yes. RegEngine is built with 21 CFR Part 11 compliance in mind, including electronic signatures, audit trails, access controls, and data integrity measures that satisfy FDA requirements for electronic records."},{question:"Can RegEngine integrate with existing quality management systems?",answer:"Yes. RegEngine provides APIs and integration connectors for leading QMS platforms, document management systems, and clinical trial management systems. It is designed to augment your existing compliance infrastructure."}];function hne(){return l.jsxs($t,{children:[l.jsx(_a,{title:"Regulatory AI Platform — RegEngine",description:"The AI brain for regulatory intelligence. Search, map, and operationalize regulatory requirements across GxP, FDA, and global frameworks. Built for life sciences and healthcare.",canonical:"/platform"}),l.jsx(r3,{}),l.jsx(q_,{faqs:vT}),l.jsx("section",{className:"py-24 md:py-32 border-b border-border",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"max-w-2xl",children:[l.jsx(Vt,{size:"lg",className:"mb-10",animate:!0}),l.jsx("div",{className:"mono-label mb-4",children:"// PLATFORM"}),l.jsxs("h1",{className:"text-4xl md:text-5xl lg:text-6xl font-bold leading-tight mb-8 tracking-tight",children:["The AI Brain for"," ",l.jsx("span",{className:"text-primary",children:"Regulatory Intelligence"})]}),l.jsx("p",{className:"text-xl text-muted-foreground mb-6 leading-relaxed",children:"RegEngine transforms complex regulatory frameworks into machine-readable intelligence that organizations can act on instantly. Search regulations, map requirements to SOPs, monitor changes, and generate compliance insights—all powered by AI."}),l.jsx("p",{className:"text-muted-foreground mb-12",children:"Purpose-built for pharmaceutical companies, biotech startups, CROs, and regulated life sciences organizations."}),l.jsxs("div",{className:"flex flex-wrap gap-6",children:[l.jsx(ge,{to:"/demo",className:"btn-outline-brand",children:"Request a demo"}),l.jsx(ge,{to:"/features",className:"link-arrow",children:"Explore capabilities"})]})]})})}),l.jsx("section",{className:"py-20 md:py-28 border-b border-border",children:l.jsxs("div",{className:"section-container",children:[l.jsx("div",{className:"mono-label mb-4",children:"// CAPABILITIES"}),l.jsx("h2",{className:"text-3xl md:text-4xl font-semibold mb-4",children:"Everything You Need for AI-Powered Compliance"}),l.jsx("p",{className:"text-muted-foreground mb-12 max-w-2xl",children:"RegEngine provides end-to-end regulatory intelligence—from searching and understanding regulations to operationalizing compliance across your organization."}),l.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-4 gap-4",children:dne.map(e=>l.jsxs(ge,{to:e.href,className:"infra-card p-6 group hover:border-primary/30 transition-all",children:[l.jsx(e.icon,{className:"w-6 h-6 text-primary mb-3"}),l.jsx("h3",{className:"font-semibold text-foreground mb-2 text-sm",children:e.label}),l.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:e.description})]},e.href))})]})}),l.jsx("section",{className:"py-20 md:py-28 border-b border-border",children:l.jsxs("div",{className:"section-container",children:[l.jsx("div",{className:"mono-label mb-4",children:"// ARCHITECTURE"}),l.jsx("h2",{className:"text-3xl md:text-4xl font-semibold mb-8",children:"Built for Regulated Environments"}),l.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[l.jsxs("div",{className:"infra-card p-6",children:[l.jsx("span",{className:"font-mono text-xs text-primary/60 block mb-3",children:"LAYER_01"}),l.jsx("h3",{className:"font-semibold mb-2",children:"Regulatory Data Layer"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Ingest, parse, and structure regulatory documents from FDA, EMA, ICH, and global bodies into a unified knowledge graph."})]}),l.jsxs("div",{className:"infra-card p-6",children:[l.jsx("span",{className:"font-mono text-xs text-primary/60 block mb-3",children:"LAYER_02"}),l.jsx("h3",{className:"font-semibold mb-2",children:"Intelligence Engine"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"AI models trained on regulatory corpora that understand compliance context, obligations, and inter-regulatory dependencies."})]}),l.jsxs("div",{className:"infra-card p-6",children:[l.jsx("span",{className:"font-mono text-xs text-primary/60 block mb-3",children:"LAYER_03"}),l.jsx("h3",{className:"font-semibold mb-2",children:"Compliance Operations"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Workflow automation, approval routing, change monitoring, and audit-ready evidence generation for your compliance team."})]})]})]})}),l.jsx("section",{className:"py-20 md:py-28 border-b border-border",children:l.jsxs("div",{className:"section-container",children:[l.jsx("div",{className:"mono-label mb-4",children:"// INDUSTRIES"}),l.jsx("h2",{className:"text-3xl md:text-4xl font-semibold mb-8",children:"Solutions for Regulated Industries"}),l.jsx("p",{className:"text-muted-foreground mb-8 max-w-2xl",children:"RegEngine is purpose-built for organizations where AI compliance is not optional."}),l.jsx("div",{className:"flex flex-wrap gap-3",children:fne.map(e=>l.jsxs(ge,{to:e.href,className:"infra-card px-5 py-3 text-sm text-foreground hover:text-primary transition-colors",children:[e.label," →"]},e.href))})]})}),l.jsx("section",{className:"py-20 md:py-28 border-b border-border",children:l.jsxs("div",{className:"section-container",children:[l.jsx("h2",{className:"text-3xl md:text-4xl font-semibold mb-12",children:"Frequently Asked Questions"}),l.jsx("div",{className:"space-y-8 max-w-2xl",children:vT.map((e,t)=>l.jsxs("div",{children:[l.jsx("h3",{className:"font-semibold text-foreground mb-2",children:e.question}),l.jsx("p",{className:"text-muted-foreground leading-relaxed",children:e.answer})]},t))})]})}),l.jsx("section",{className:"py-20 md:py-28",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"max-w-2xl",children:[l.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-6",children:"Ready to Modernize Your Regulatory Operations?"}),l.jsx("p",{className:"text-muted-foreground mb-8",children:"See how RegEngine replaces manual regulatory intelligence with AI-powered compliance infrastru
488cture."}),l.jsxs("div",{className:"flex flex-wrap gap-6",children:[l.jsx(ge,{to:"/demo",className:"btn-outline-brand",children:"Request a demo"}),l.jsx(ge,{to:"/knowledge-hub",className:"link-arrow",children:"Explore the Knowledge Hub"})]})]})})})]})}const pne=[{icon:Ah,code:"SEARCH",label:"Regulatory AI Search",href:"/features/regulatory-ai-search",description:"Search regulatory requirements in natural language across FDA, EMA, ICH, and global frameworks. Get instant, traceable answers with source citations."},{icon:Lj,code:"KNOWLEDGE_GRAPH",label:"Regulatory Knowledge Graph",href:"/features/regulatory-knowledge-graph",description:"Model regulatory relationships, dependencies, and hierarchies in a queryable knowledge graph. Visualize how regulations connect to your controls and SOPs."},{icon:Nj,code:"COPILOT",label:"AI Compliance Copilot",href:"/features/ai-compliance-copilot",description:"An AI assistant trained on regulatory corpora. Ask compliance questions, draft responses, and surface relevant requirements without manual research."},{icon:yu,code:"SOP_MAPPING",label:"Regulation-to-SOP Mapping",href:"/features/regulation-sop-mapping",description:"Automatically map regulatory requirements to your standard operating procedures. Identify gaps, overlaps, and missing controls instantly."},{icon:gu,code:"CHANGE_MONITORING",label:"Regulatory Change Monitoring",href:"/features/regulatory-change-monitoring",description:"Track regulatory updates across jurisdictions in real time. Get alerts when changes impact your products, processes, or compliance posture."},{icon:Mj,code:"INTELLIGENCE_DB",label:"Regulatory Intelligence Database",href:"/features/regulatory-intelligence-database",description:"A centralized, AI-indexed repository of regulatory intelligence. Structured, searchable, and continuously updated from authoritative sources."},{icon:Nr,code:"DECISION_LOG",label:"AI Decision Logging",href:"/features/ai-decision-logging",description:"Immutable audit trails for every AI-generated output. Track inputs, model versions, confidence scores, and human approvals for defensible compliance."},{icon:Pt,code:"APPROVALS",label:"Approval Workflows",href:"/features/approval-workflows",description:"Human-in-the-loop controls, risk-based approval thresholds, role-based authorization, and segregation of duties for regulated AI workflows."}];function mne(){return l.jsxs($t,{children:[l.jsx(_a,{title:"AI Compliance Features — RegEngine",description:"Regulatory AI search, knowledge graphs, compliance copilot, SOP mapping, change monitoring, decision logging, and approval workflows. Enterprise compliance features.",canonical:"/features"}),l.jsx("section",{className:"py-24 md:py-32 border-b border-border",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"max-w-2xl",children:[l.jsx(Vt,{size:"sm",className:"mb-6"}),l.jsx("div",{className:"mono-label mb-4",children:"// FEATURES"}),l.jsxs("h1",{className:"text-4xl md:text-5xl font-bold leading-tight mb-8 tracking-tight",children:["AI Compliance ",l.jsx("span",{className:"text-primary",children:"Features"})]}),l.jsx("p",{className:"text-xl text-muted-foreground mb-6 leading-relaxed",children:"Every capability you need to transform regulatory compliance from manual burden to intelligent infrastru
488cture."}),l.jsx(ge,{to:"/platform",className:"link-arrow",children:"Learn about the platform"})]})})}),l.jsx("section",{className:"py-20 md:py-28 border-b border-border",children:l.jsx("div",{className:"section-container",children:l.jsx("div",{className:"grid md:grid-cols-2 gap-6",children:pne.map(e=>l.jsx(ge,{to:e.href,className:"infra-card p-8 group hover:border-primary/30 transition-all",children:l.jsxs("div",{className:"flex items-start gap-4",children:[l.jsx(e.icon,{className:"w-8 h-8 text-primary shrink-0 mt-1"}),l.jsxs("div",{children:[l.jsx("span",{className:"font-mono text-xs text-primary/60 block mb-2",children:e.code}),l.jsx("h2",{className:"text-xl font-semibold text-foreground mb-3",children:e.label}),l.jsx("p",{className:"text-muted-foreground leading-relaxed mb-4",children:e.description}),l.jsxs("span",{className:"text-sm text-primary inline-flex items-center gap-1 group-hover:gap-2 transition-all",children:["Learn more ",l.jsx(kn,{className:"w-3 h-3"})]})]})]})},e.href))})})}),l.jsx("section",{className:"py-20 md:py-28",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"max-w-2xl",children:[l.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-6",children:"See Every Feature in Action"}),l.jsx("p",{className:"text-muted-foreground mb-8",children:"Schedule a platform walkthrough and see how RegEngine transforms your regulatory operations."}),l.jsxs("div",{className:"flex flex-wrap gap-6",children:[l.jsx(ge,{to:"/demo",className:"btn-outline-brand",children:"Request a demo"}),l.jsx(ge,{to:"/knowledge-hub",className:"link-arrow",children:"Explore the Knowledge Hub"})]})]})})})]})}const gne=[{label:"Pharmaceutical",href:"/industries/pharma",description:"FDA, EMA, and GxP compliance automation for drug development, manufacturing, and post-market surveillance."},{label:"Biotech",href:"/industries/biotech",description:"Scalable compliance infrastructure for biotech companies from discovery through commercialization."},{label:"CROs",href:"/industries/cro",description:"Multi-sponsor, multi-protocol compliance management for contract research organizations."},{label:"Healthcare Technology",href:"/industries/healthcare-technology",description:"HIPAA, HITECH, and clinical AI governance for digital health platforms and health IT."},{label:"Medical Devices",href:"/industries/medical-devices",description:"EU MDR, FDA 510(k), and ISO 13485 compliance intelligence for medical device companies."},{label:"Digital Health",href:"/industries/digital-health",description:"SaMD classification, FDA digital health guidance, and real-world evidence compliance."},{label:"Life Sciences",href:"/industries/life-sciences",description:"Cross-functional regulatory intelligence for life sciences organizations."},{label:"Financial Services",href:"/industries/financial-services",description:"AI governance and model risk management for financial institutions."},{label:"Healthcare",href:"/industries/healthcare",description:"Clinical AI oversight and HIPAA-aligned governance for healthcare providers."},{label:"Aerospace",href:"/industries/aerospace",description:"Safety-critical AI compliance and DO-178C governance."},{label:"Automotive",href:"/industries/automotive",description:"ADAS and autonomous vehicle AI compliance frameworks."},{label:"Energy",href:"/industries/energy",description:"NERC CIP and energy sector AI governance."}];function yne(){return l.jsxs($t,{children:[l.jsx(_a,{title:"AI Regulatory Compliance Solutions — RegEngine",description:"AI compliance solutions for pharma, biotech, CROs, medical devices, healthcare technology, and life sciences. Industry-specific regulatory intelligence.",canonical:"/solutions"}),l.jsx("section",{className:"py-24 md:py-32 border-b border-border",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"max-w-2xl",children:[l.jsx(Vt,{size:"sm",className:"mb-6"}),l.jsx("div",{className:"mono-label mb-4",children:"// SOLUTIONS"}),l.jsxs("h1",{className:"text-4xl md:text-5xl font-bold leading-tight mb-8 tracking-tight",children:["AI Compliance ",l.jsx("span",{className:"text-primary",children:"Solutions"})]}),l.jsx("p",{className:"text-xl text-muted-foreground mb-6 leading-relaxed",children:"Industry-specific regulatory intelligence. RegEngine adapts to the compliance frameworks, workflows, and audit requirements unique to your sector."}),l.jsx(ge,{to:"/platform",className:"link-arrow",children:"Learn about the platform"})]})})}),l.jsx("section",{className:"py-20 md:py-28",children:l.jsx("div",{className:"section-container",children:l.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:gne.map(e=>l.jsxs(ge,{to:e.href,className:"infra-card p-6 group hover:border-primary/30 transition-all",children:[l.jsx("h2",{className:"text-lg font-semibold text-foreground mb-3",children:e.label}),l.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed mb-4",children:e.description}),l.jsxs("span",{className:"text-sm text-primary inline-flex items-center gap-1 group-hover:gap-2 transition-all",children:["Learn more ",l.jsx(kn,{className:"w-3 h-3"})]})]},e.href))})})})]})}const vne=[{title:"The Future of Regulatory AI in Life Sciences",href:"/knowledge-hub/future-of-regulatory-ai",category:"FOUNDATIONS",readTime:"8 min"},{title:"How AI Can Interpret FDA Regulations",href:"/knowledge-hub/ai-fda-compliance",category:"FDA",readTime:"10 min"},{title:"AI for GxP Compliance Management",href:"/knowledge-hub/ai-gxp-compliance",category:"GxP",readTime:"9 min"},{title:"Regulatory Knowledge Graphs Explained",href:"/knowledge-hub/regulatory-knowledge-graphs-explained",category:"TECHNOLOGY",readTime:"7 min"},{title:"Building Machine-Readable Regulations",href:"/knowledge-hub/machine-readable-regulations",category:"TECHNOLOGY",readTime:"8 min"},{title:"AI Copilots for Regulatory Affairs Teams",href:"/knowledge-hub/ai-copilots-regulatory-affairs",category:"USE CASES",readTime:"6 min"},{title:"AI for Clinical Trial Compliance",href:"/knowledge-hub/ai-clinical-trial-compliance",category:"CLINICAL",readTime:"9 min"},{title:"AI for SOP Intelligence and Mapping",href:"/knowledge-hub/ai-sop-intelligence",category:"USE CASES",readTime:"7 min"},{title:"How to Build an AI Regulatory Intelligence Platform",href:"/knowledge-hub/building-ai-regulatory-platform",category:"STRATEGY",readTime:"12 min"},{title:"AI Regulatory Change Management",href:"/knowledge-hub/ai-regulatory-change-management",category:"OPERATIONS",readTime:"8 min"}];function xne(){return l.jsxs($t,{children:[l.jsx(_a,{title:"Regulatory AI Knowledge Hub — RegEngine",description:"Expert insights on regulatory AI, GxP compliance, FDA intelligence, knowledge graphs, and AI-powered compliance automation. Resources for regulatory affairs teams.",canonical:"/knowledge-hub"}),l.jsx("section",{className:"py-24 md:py-32 border-b border-border",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"max-w-2xl",children:[l.jsx(Vt,{size:"sm",className:"mb-6"}),l.jsx("div",{className:"mono-label mb-4",children:"// KNOWLEDGE HUB"}),l.jsxs("h1",{className:"text-4xl md:text-5xl font-bold leading-tight mb-8 tracking-tight",children:["Regulatory AI ",l.jsx("span",{className:"text-primary",children:"Knowledge Hub"})]}),l.jsx("p",{className:"text-xl text-muted-foreground leading-relaxed",children:"Deep-dive articles on regulatory intelligence, AI compliance, GxP automation, and the future of machine-readable regulations. Written for compliance leaders, CTOs, and regulatory affairs teams."})]})})}),l.jsx("section",{className:"py-20 md:py-28",children:l.jsx("div",{className:"section-container",children:l.jsx("div",{className:"space-y-4",children:vne.map(e=>l.jsxs(ge,{to:e.href,className:"infra-card p-6 flex items-start justify-between gap-4 group hover:border-primary/30 transition-all block",children:[l.jsxs("div",{children:[l.jsx("span",{className:"font-mono text-xs text-primary/60 block mb-2",children:e.category}),l.jsx("h2",{className:"text-lg font-semibold text-foreground group-hover:text-primary transition-colors mb-1",children:e.title}),l.jsxs("span",{className:"text-sm text-muted-foreground",children:[e.readTime," read"]})]}),l.jsx(kn,{className:"w-4 h-4 text-muted-foreground group-hover:text-primary transition-colors shrink-0 mt-2"})]},e.href))})})}),l.jsx("section",{className:"py-16 border-t border-border",children:l.jsxs("div",{className:"section-container text-center",children:[l.jsx("p",{className:"text-muted-foreground mb-6",children:"Want to see these concepts in action?"}),l.jsx(ge,{to:"/demo",className:"btn-outline-brand",children:"Request a demo"})]})})]})}function bne(){return l.jsxs($t,{children:[l.jsx(_a,{title:"About RegEngine — AI Regulatory Intelligence Company",description:"RegEngine builds AI-powered regulatory intelligence infrastru
488cture for life sciences, pharma, and healthcare. We turn complex regulations into machine-readable intelligence.",canonical:"/about"}),l.jsx(cne,{}),l.jsx("section",{className:"py-24 md:py-32 border-b border-border",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"max-w-2xl",children:[l.jsx(Vt,{size:"lg",className:"mb-10",animate:!0}),l.jsx("div",{className:"mono-label mb-4",children:"// ABOUT"}),l.jsxs("h1",{className:"text-4xl md:text-5xl font-bold leading-tight mb-8 tracking-tight",children:["Building the AI Brain for"," ",l.jsx("span",{className:"text-primary",children:"Regulatory Intelligence"})]}),l.jsx("p",{className:"text-xl text-muted-foreground mb-6 leading-relaxed",children:"RegEngine was founded on a simple premise: regulatory compliance should not require armies of consultants and spreadsheets. AI can read, interpret, and operationalize regulations faster and more accurately than manual processes."}),l.jsx("p",{className:"text-muted-foreground mb-6 leading-relaxed",children:"We are building infrastructure that transforms complex regulatory frameworks—FDA, EMA, ICH, GxP, HIPAA, EU AI Act—into machine-readable intelligence that organizations can search, map, and act on instantly."}),l.jsx("p",{className:"text-muted-foreground leading-relaxed",children:"Our platform serves pharmaceutical companies, biotech startups, CROs, medical device companies, and healthcare technology organizations that need AI-powered compliance without sacrificing auditability or control."})]})})}),l.jsx("section",{className:"py-20 md:py-28 border-b border-border",children:l.jsxs("div",{className:"section-container",children:[l.jsx("h2",{className:"text-3xl md:text-4xl font-semibold mb-12",children:"What We Believe"}),l.jsxs("div",{className:"grid md:grid-cols-3 gap-6 max-w-4xl",children:[l.jsxs("div",{className:"infra-card p-6",children:[l.jsx("h3",{className:"font-semibold mb-3",children:"Regulations Are Data"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Regulatory text can be structured, indexed, and queried like any other dataset—when you have the right AI infrastructure."})]}),l.jsxs("div",{className:"infra-card p-6",children:[l.jsx("h3",{className:"font-semibold mb-3",children:"Compliance Is Engineering"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"The future of compliance is software engineering—automated, testable, version-controlled, and continuously validated."})]}),l.jsxs("div",{className:"infra-card p-6",children:[l.jsx("h3",{className:"font-semibold mb-3",children:"AI Must Be Governed"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"AI in regulated environments requires audit trails, human oversight, and defensible decision records. No exceptions."})]})]})]})}),l.jsx("section",{className:"py-20 md:py-28",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"max-w-2xl",children:[l.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-6",children:"Work With Us"}),l.jsx("p",{className:"text-muted-foreground mb-8",children:"We are building the future of regulatory AI. If you want to see what RegEngine can do for your organization, get in touch."}),l.jsxs("div",{className:"flex flex-wrap gap-6",children:[l.jsx(ge,{to:"/demo",className:"btn-outline-brand",children:"Request a demo"}),l.jsx(ge,{to:"/platform",className:"link-arrow",children:"Explore the platform"})]})]})})})]})}const wne=L4({name:vo().trim().min(1,{message:"Name is required"}).max(100,{message:"Name must be less than 100 characters"}),email:vo().trim().email({message:"Invalid email address"}).max(255,{message:"Email must be less than 255 characters"}),company:vo().trim().min(1,{message:"Company is required"}).max(100,{message:"Company must be less than 100 characters"}),message:vo().trim().min(1,{message:"Message is required"}).max(2e3,{message:"Message must be less than 2000 characters"})});function Ms({industry:e,headline:t="Let's Talk",subheadline:n="Tell us what you're working on — we'll share how we can help."}){const[r,i]=w.useState({name:"",email:"",company:"",message:""}),[a,s]=w.useState({}),[o,c]=w.useState("idle"),[u,f]=w.useState(""),{executeRecaptcha:d,isLoaded:h}=U_(),p=m=>{const{name:y,value:v}=m.target;i(b=>({...b,[y]:v})),a[y]&&s(b=>({...b,[y]:void 0}))},g=async m=>{m.preventDefault(),c("loading"),s({}),f("");const y=wne.safeParse(r);if(!y.success){const v={};
488y.error.errors.forEach(b=>{b.path[0]&&(v[b.path[0]]=b.message)}),s(v),c("idle");return}try{const v=await d("contact_form");if(!v)throw new Error("Unable to verify you're not a robot. Please refresh and try again.");const{data:b,error:x}=await mt.functions.invoke("send-contact-email",{body:{...y.data,recaptchaToken:v,inquiryType:"customer",message:`[${e} Landing Page]
489
490Company: ${y.data.company}
491
492${y.data.message}`}});if(x)throw new Error(x.message||"Failed to send message");if(b!=null&&b.error)throw new Error(b.error);c("success"),i({name:"",email:"",company:"",message:""})}catch(v){c("error"),f(v.message||"Failed to send message. Please try again.")}};return l.jsxs("div",{className:"max-w-lg w-full",children:[l.jsx("div",{className:"mono-label mb-4",children:"// LET'S CONNECT"}),l.jsx("h2",{className:"text-2xl md:text-3xl font-semibold mb-2",children:t}),l.jsx("p",{className:"text-muted-foreground mb-8",children:n}),o==="success"?l.jsxs("div",{className:"rage-card p-8 text-center",children:[l.jsx(Rj,{className:"w-12 h-12 text-primary mx-auto mb-4"}),l.jsx("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Message sent"}),l.jsx("p",{className:"text-muted-foreground mb-6",children:"Thank you for reaching out. A member of our team will c
492ontact you within 24 hours."}),l.jsx("button",{onClick:()=>c("idle"),className:"text-primary hover:text-primary/80 font-medium transition-colors",children:"Send another message →"})]}):l.jsxs("form",{onSubmit:g,className:"space-y-5",children:[l.jsxs("div",{children:[l.jsxs("label",{htmlFor:"name",className:"block text-sm font-medium text-foreground mb-2",children:["Name ",l.jsx("span",{className:"text-primary",children:"*"})]}),l.jsx("input",{type:"text",id:"name",name:"name",value:r.name,onChange:p,maxLength:100,required:!0,className:`w-full bg-background border ${a.name?"border-red-500":"border-border"} rounded px-4 py-3 text-foreground placeholder-muted-foreground focus:outline-none focus:border-primary transition-colors`,placeholder:"Your name"}),a.name&&l.jsx("p",{className:"text-red-500 text-sm mt-1",children:a.name})]}),l.jsxs("div",{children:[l.jsxs("label",{htmlFor:"email",className:"block text-sm font-medium text-foreground mb-2",children:["Work Email ",l.jsx("span",{className:"text-primary",children:"*"})]}),l.jsx("input",{type:"email",id:"email",name:"email",value:r.email,onChange:p,maxLength:255,required:!0,className:`w-full bg-background border ${a.email?"border-red-500":"border-border"} rounded px-4 py-3 text-foreground placeholder-muted-foreground focus:outline-none focus:border-primary transition-colors`,placeholder:"[email protected]"}),a.email&&l.jsx("p",{className:"text-red-500 text-sm mt-1",children:a.email})]}),l.jsxs("div",{children:[l.jsxs("label",{htmlFor:"company",className:"block text-sm font-medium text-foreground mb-2",children:["Company ",l.jsx("span",{className:"text-primary",children:"*"})]}),l.jsx("input",{type:"text",id:"company",name:"company",value:r.company,onChange:p,maxLength:100,required:!0,className:`w-full bg-background border ${a.company?"border-red-500":"border-border"} rounded px-4 py-3 text-foreground placeholder-muted-foreground focus:outline-none focus:border-primary transition-colors`,placeholder:"Your company"}),a.company&&l.jsx("p",{className:"text-red-500 text-sm mt-1",children:a.company})]}),l.jsxs("div",{children:[l.jsxs("label",{htmlFor:"message",className:"block text-sm font-medium text-foreground mb-2",children:["How can we help? ",l.jsx("span",{className:"text-primary",children:"*"})]}),l.jsx("textarea",{id:"message",name:"message",value:r.message,onChange:p,rows:4,maxLength:2e3,required:!0,className:`w-full bg-background border ${a.message?"border-red-500":"border-border"} rounded px-4 py-3 text-foreground placeholder-muted-foreground focus:outline-none focus:border-primary transition-colors resize-none`,placeholder:"Tell us about your AI compliance needs..."}),a.message&&l.jsx("p",{className:"text-red-500 text-sm mt-1",children:a.message})]}),o==="error"&&l.jsxs("div",{className:"flex items-center gap-2 text-red-500 text-sm",children:[l.jsx(I$,{className:"w-4 h-4"}),l.jsx("span",{children:u})]}),l.jsxs("div",{className:"space-y-3",children:[l.jsx("button",{type:"submit",disabled:o==="loading"||!h,className:"w-full inline-flex items-center justify-center gap-2 bg-primary text-background font-semibold px-6 py-3 rounded hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:o==="loading"?l.jsxs(l.Fragment,{children:[l.jsx($j,{className:"w-4 h-4 animate-spin"}),"Sending..."]}):l.jsxs(l.Fragment,{children:[l.jsx(F$,{className:"w-4 h-4"}),"Start a Conversation"]})}),l.jsxs("p",{className:"text-xs text-muted-foreground text-center",children:["This site is protected by reCAPTCHA and the Google"," ",l.jsx("a",{href:"https://policies.google.com/privacy",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Privacy Policy"})," ","and"," ",l.jsx("a",{href:"https://policies.google.com/terms",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Terms of Service"})," ","apply."]})]})]})]})}function Sne(){return l.jsxs($t,{children:[l.jsx(_a,{title:"Contact RegEngine — Request a Demo",description:"Get in touch with RegEngine to discuss AI-powered regulatory compliance for your organization. Request a demo, schedule a platform walkthrough, or talk to an expert.",canonical:"/contact"}),l.jsx("section",{className:"py-24 md:py-32",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 lg:gap-16 items-start",children:[l.jsxs("div",{children:[l.jsx(Vt,{size:"sm",className:"mb-6"}),l.jsx("div",{className:"mono-label mb-4",children:"// CONTACT"}),l.jsxs("h1",{className:"text-4xl md:text-5xl font-bold leading-tight mb-6 tracking-tight",children:["Let's Talk ",l.jsx("span",{className:"text-primary",children:"Regulatory AI"})]}),l.jsx("p",{className:"text-xl text-muted-foreground mb-8 leading-relaxed",children:"Whether you're exploring AI compliance for the first time or looking to modernize your regulatory operations, we're here to help."}),l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"infra-card p-6",children:[l.jsx("h3",{className:"font-semibold mb-2",children:"Platform Demo"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"See RegEngine's capabilities in action with a guided walkthrough tailored to your industry."})]}),l.jsxs("div",{className:"infra-card p-6",children:[l.jsx("h3",{className:"font-semibold mb-2",children:"Technical Discussion"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Talk to our engineering team about integration, architecture, and deployment options."})]}),l.jsxs("div",{className:"infra-card p-6",children:[l.jsx("h3",{className:"font-semibold mb-2",children:"Partnership"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Explore integration partnerships, reseller programs, and technology alliances."})]})]})]}),l.jsx("div",{className:"lg:sticky lg:top-24",children:l.jsx("div",{className:"infra-card p-8",children:l.jsx(Ms,{industry:"General",headline:"Get in Touch",subheadline:"Tell us about your regulatory AI needs."})})})]})})})]})}function jne(){const e=[{icon:Pt,title:"HIPAA-Aligned Governance",description:"Automatic enforcement of data handling policies across all AI interactions with protected health information."},{icon:Bn,title:"Clinical AI Oversight",description:"Human-in-the-loop controls for AI-assisted diagnoses, treatment recommendations, and clinical decisions."},{icon:al,title:"Model Explainability",description:"Full audit trails showing exactly how AI models reached conclusions—critical for patient safety and regulatory review."},{icon:Nr,title:"Inspection-Ready Evidence",description:"Generate compliance documentation instantly for FDA, HHS, and state health department audits."}];return l.jsxs($t,{children:[l.jsx("section",{className:"py-20 md:py-28 border-b border-border",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 lg:gap-16 items-start",children:[l.jsxs("div",{children:[l.jsx(Vt,{size:"sm",className:"mb-6"}),l.jsx("div",{className:"mono-label mb-4",children:"// HEALTHCARE"}),l.jsxs("h1",{className:"text-4xl md:text-5xl font-bold leading-tight mb-6 tracking-tight",children:["AI Compliance for ",l.jsx("span",{className:"text-primary",children:"Healthcare"})]}),l.jsx("p",{className:"text-xl text-muted-foreground mb-8 leading-relaxed",children:"Deploy AI with confidence. RegEngine ensures every clinical AI decision is traceable, explainable, and HIPAA-compliant—in real time."}),l.jsxs("div",{className:"space-y-4 mb-8",children:[l.jsxs("div",{className:"flex items-center gap-3 text-foreground",children:[l.jsx("div",{className:"w-2 h-2 bg-primary rounded-full"}),l.jsx("span",{children:"FDA 21 CFR Part 11 compliant audit trails"})]}),l.jsxs("div",{className:"flex items-center gap-3 text-foreground",children:[l.jsx("div",{className:"w-2 h-2 bg-primary rounded-full"}),l.jsx("span",{children:"Real-time PHI handling governance"})]}),l.jsxs("div",{className:"flex items-center gap-3 text-foreground",children:[l.jsx("div",{className:"w-2 h-2 bg-primary rounded-full"}),l.jsx("span",{children:"Clinical decision support oversight"})]})]}),l.jsxs(ge,{to:"/",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[l.jsx(kn,{className:"w-4 h-4 rotate-180"}),"Back to homepage"]})]}),l.jsx("div",{className:"lg:sticky lg:top-24",children:l.jsx("div",{className:"infra-card p-8",children:l.jsx(Ms,{industry:"Healthcare",headline:"Talk to a Healthcare Expert",subheadline:"Learn how RegEngine helps healthcare organizations deploy AI safely."})})})]})})}),l.jsx("section",{className:"py-20 md:py-28",children:l.jsxs("div",{className:"section-container",children:[l.jsx("h2",{className:"text-3xl md:text-4xl font-semibold mb-12",children:"Built for Healthcare Compliance"}),l.jsx("div",{className:"grid md:grid-cols-2 gap-8",children:e.map((t,n)=>l.jsxs("div",{className:"infra-card p-6",children:[l.jsx(t.icon,{className:"w-8 h-8 text-primary mb-4"}),l.jsx("h3",{className:"text-lg font-semibold text-foreground mb-2",children:t.title}),l.jsx("p",{className:"text-muted-foreground",children:t.description})]},n))})]})}),l.jsx("section",{className:"py-16 border-t border-border",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-8 text-muted-foreground text-sm",children:[l.jsx("span",{className:"font-mono",children:"HIPAA"}),l.jsx("span",{className:"text-border",children:"|"}),l.jsx("span",{className:"font-mono",children:"FDA 21 CFR Part 11"}),l.jsx("span",{className:"text-border",children:"|"}),l.jsx("span",{className:"font-mono",children:"SOC 2 Type II"}),l.jsx("span",{className:"text-border",children:"|"}),l.jsx("span",{className:"font-mono",children:"HITRUST"})]})})})]})}
492function _ne(){const e=[{icon:M$,title:"GxP-Aligned AI Controls",description:"Built-in governance for GLP, GCP, GMP, and GDP requirements across your entire AI lifecycle."},{icon:Bn,title:"Validation-Ready Evidence",description:"Automatic generation of IQ/OQ/PQ documentation and validation protocols for AI systems."},{icon:zm,title:"Regulatory Submission Support",description:"Traceable AI decision logs ready for FDA, EMA, and PMDA submissions and inspections."},{icon:Pt,title:"Data Integrity by Design",description:"ALCOA+ principles enforced at the infrastructure level—attributable, legible, contemporaneous, original, accurate."}];return l.jsxs($t,{children:[l.jsx("section",{className:"py-20 md:py-28 border-b border-border",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 lg:gap-16 items-start",children:[l.jsxs("div",{children:[l.jsx(Vt,{size:"sm",className:"mb-6"}),l.jsx("div",{className:"mono-label mb-4",children:"// LIFE SCIENCES"}),l.jsxs("h1",{className:"text-4xl md:text-5xl font-bold leading-tight mb-6 tracking-tight",children:["AI Compliance for ",l.jsx("span",{className:"text-primary",children:"Life Sciences"})]}),l.jsx("p",{className:"text-xl text-muted-foreground mb-8 leading-relaxed",children:"From drug discovery to manufacturing, RegEngine provides GxP-aligned governance for every AI model, every workflow, every decision."}),l.jsxs("div",{className:"space-y-4 mb-8",children:[l.jsxs("div",{className:"flex items-center gap-3 text-foreground",children:[l.jsx("div",{className:"w-2 h-2 bg-primary rounded-full"}),l.jsx("span",{children:"Computer System Validation (CSV) ready"})]}),l.jsxs("div",{className:"flex items-center gap-3 text-foreground",children:[l.jsx("div",{className:"w-2 h-2 bg-primary rounded-full"}),l.jsx("span",{children:"21 CFR Part 11 electronic records compliance"})]}),l.jsxs("div",{className:"flex items-center gap-3 text-foreground",children:[l.jsx("div",{className:"w-2 h-2 bg-primary rounded-full"}),l.jsx("span",{children:"Inspection-ready at all times"})]})]}),l.jsxs(ge,{to:"/",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[l.jsx(kn,{className:"w-4 h-4 rotate-180"}),"Back to homepage"]})]}),l.jsx("div",{className:"lg:sticky lg:top-24",children:l.jsx("div",{className:"infra-card p-8",children:l.jsx(Ms,{industry:"Life Sciences",headline:"Talk to a Life Sciences Expert",subheadline:"Learn how RegEngine helps pharma and biotech companies deploy AI with confidence."})})})]})})}),l.jsx("section",{className:"py-20 md:py-28",children:l.jsxs("div",{className:"section-container",children:[l.jsx("h2",{className:"text-3xl md:text-4xl font-semibold mb-12",children:"Built for GxP Compliance"}),l.jsx("div",{className:"grid md:grid-cols-2 gap-8",children:e.map((t,n)=>l.jsxs("div",{className:"infra-card p-6",children:[l.jsx(t.icon,{className:"w-8 h-8 text-primary mb-4"}),l.jsx("h3",{className:"text-lg font-semibold text-foreground mb-2",children:t.title}),l.jsx("p",{className:"text-muted-foreground",children:t.description})]},n))})]})}),l.jsx("section",{className:"py-16 border-t border-border",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-8 text-muted-foreground text-sm",children:[l.jsx("span",{className:"font-mono",children:"GxP"}),l.jsx("span",{className:"text-border",children:"|"}),l.jsx("span",{className:"font-mono",children:"21 CFR Part 11"}),l.jsx("span",{className:"text-border",children:"|"}),l.jsx("span",{className:"font-mono",children:"EU Annex 11"}),l.jsx("span",{className:"text-border",children:"|"}),l.jsx("span",{className:"font-mono",children:"ICH Guidelines"})]})})})]})}function Ane(){const e=[{icon:S6,title:"SR 11-7 Compliance",description:"AI model risk management controls aligned with Federal Reserve supervisory guidance for banking institutions."},{icon:Bn,title:"EU AI Act Readiness",description:"High-risk AI system requirements including transparency, human oversight, and risk management documentation."},{icon:C6,title:"Fair Lending Controls",description:"Bias detection and explainability features to support ECOA, Fair Housing Act, and state fair lending requirements."},{icon:Pt,title:"Examination-Ready Evidence",description:"Generate documentation packages for OCC, FDIC, CFPB, and state banking regulator examinations."}];return l.jsxs($t,{children:[l.jsx("section",{className:"py-20 md:py-28 border-b border-border",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 lg:gap-16 items-start",children:[l.jsxs("div",{children:[l.jsx(Vt,{size:"sm",className:"mb-6"}),l.jsx("div",{className:"mono-label mb-4",children:"// FINANCIAL SERVICES"}),l.jsxs("h1",{className:"text-4xl md:text-5xl font-bold leading-tight mb-6 tracking-tight",children:["AI Compliance for ",l.jsx("span",{className:"text-primary",children:"Financial Services"})]}),l.jsx("p",{className:"text-xl text-muted-foreground mb-8 leading-relaxed",children:"Deploy AI with regulatory confidence. RegEngine provides continuous model risk management and decision traceability for banking, insurance, and capital markets."}),l.jsxs("div",{className:"space-y-4 mb-8",children:[l.jsxs("div",{className:"flex items-center gap-3 text-foreground",children:[l.jsx("div",{className:"w-2 h-2 bg-primary rounded-full"}),l.jsx("span",{children:"SR 11-7 model risk management"})]}),l.jsxs("div",{className:"flex items-center gap-3 text-foreground",children:[l.jsx("div",{className:"w-2 h-2 bg-primary rounded-full"}),l.jsx("span",{children:"Fair lending and bias monitoring"})]}),l.jsxs("div",{className:"flex items-center gap-3 text-foreground",children:[l.jsx("div",{className:"w-2 h-2 bg-primary rounded-full"}),l.jsx("span",{children:"Examiner-ready documentation"})]})]}),l.jsxs(ge,{to:"/",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[l.jsx(kn,{className:"w-4 h-4 rotate-180"}),"Back to homepage"]})]}),l.jsx("div",{className:"lg:sticky lg:top-24",children:l.jsx("div",{className:"infra-card p-8",children:l.jsx(Ms,{industry:"Financial Services",headline:"Talk to a Financial Services Expert",subheadline:"Learn how RegEngine helps banks and financial institutions deploy AI safely."})})})]})})}),l.jsx("section",{className:"py-20 md:py-28",children:l.jsxs("div",{className:"section-container",children:[l.jsx("h2",{className:"text-3xl md:text-4xl font-semibold mb-12",children:"Built for Financial Regulation"}),l.jsx("div",{className:"grid md:grid-cols-2 gap-8",children:e.map((t,n)=>l.jsxs("div",{className:"infra-card p-6",children:[l.jsx(t.icon,{className:"w-8 h-8 text-primary mb-4"}),l.jsx("h3",{className:"text-lg font-semibold text-foreground mb-2",children:t.title}),l.jsx("p",{className:"text-muted-foreground",children:t.description})]},n))})]})}),l.jsx("section",{className:"py-16 border-t border-border",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-8 text-muted-foreground text-sm",children:[l.jsx("span",{className:"font-mono",children:"SR 11-7"}),l.jsx("span",{className:"text-border",children:"|"}),l.jsx("span",{className:"font-mono",children:"ECOA / Reg B"}),l.jsx("span",{className:"text-border",children:"|"}),l.jsx("span",{className:"font-mono",children:"SOC 2 Type II"}),l.jsx("span",{className:"text-border",children:"|"}),l.jsx("span",{className:"font-mono",children:"SOX"})]})})})]})}function kne(){const e=[{icon:A6,title:"DO-178C Alignment",description:"AI governance controls designed to support certification objectives for airborne software systems."},{icon:Bn,title:"Safety-Critical Traceability",description:"Complete lineage from requirements to AI model outputs with full verification evidence."},{icon:Dj,title:"ITAR/Export Control Ready",description:"Data handling controls and access governance for defense and export-controlled AI systems."}
492,{icon:Pt,title:"Certification Evidence",description:"Generate DER/DAR-ready documentation packages for FAA, EASA, and defense authority reviews."}];return l.jsxs($t,{children:[l.jsx("section",{className:"py-20 md:py-28 border-b border-border",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 lg:gap-16 items-start",children:[l.jsxs("div",{children:[l.jsx(Vt,{size:"sm",className:"mb-6"}),l.jsx("div",{className:"mono-label mb-4",children:"// AEROSPACE & DEFENSE"}),l.jsxs("h1",{className:"text-4xl md:text-5xl font-bold leading-tight mb-6 tracking-tight",children:["AI Compliance for ",l.jsx("span",{className:"text-primary",children:"Aerospace & Defense"})]}),l.jsx("p",{className:"text-xl text-muted-foreground mb-8 leading-relaxed",children:"Mission-critical AI requires mission-critical governance. RegEngine provides DO-178C aligned controls for aviation, space, and defense applications."}),l.jsxs("div",{className:"space-y-4 mb-8",children:[l.jsxs("div",{className:"flex items-center gap-3 text-foreground",children:[l.jsx("div",{className:"w-2 h-2 bg-primary rounded-full"}),l.jsx("span",{children:"DO-178C / DO-254 alignment"})]}),l.jsxs("div",{className:"flex items-center gap-3 text-foreground",children:[l.jsx("div",{className:"w-2 h-2 bg-primary rounded-full"}),l.jsx("span",{children:"MIL-STD compliant documentation"})]}),l.jsxs("div",{className:"flex items-center gap-3 text-foreground",children:[l.jsx("div",{className:"w-2 h-2 bg-primary rounded-full"}),l.jsx("span",{children:"ITAR/EAR data handling controls"})]})]}),l.jsxs(ge,{to:"/",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[l.jsx(kn,{className:"w-4 h-4 rotate-180"}),"Back to homepage"]})]}),l.jsx("div",{className:"lg:sticky lg:top-24",children:l.jsx("div",{className:"infra-card p-8",children:l.jsx(Ms,{industry:"Aerospace & Defense",headline:"Talk to an A&D Expert",subheadline:"Learn how RegEngine helps aerospace and defense organizations deploy AI with certification confidence."})})})]})})}),l.jsx("section",{className:"py-20 md:py-28",children:l.jsxs("div",{className:"section-container",children:[l.jsx("h2",{className:"text-3xl md:text-4xl font-semibold mb-12",children:"Built for Safety-Critical Systems"}),l.jsx("div",{className:"grid md:grid-cols-2 gap-8",children:e.map((t,n)=>l.jsxs("div",{className:"infra-card p-6",children:[l.jsx(t.icon,{className:"w-8 h-8 text-primary mb-4"}),l.jsx("h3",{className:"text-lg font-semibold text-foreground mb-2",children:t.title}),l.jsx("p",{className:"text-muted-foreground",children:t.description})]},n))})]})}),l.jsx("section",{className:"py-16 border-t border-border",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-8 text-muted-foreground text-sm",children:[l.jsx("span",{className:"font-mono",children:"DO-178C"}),l.jsx("span",{className:"text-border",children:"|"}),l.jsx("span",{className:"font-mono",children:"DO-254"}),l.jsx("span",{className:"text-border",children:"|"}),l.jsx("span",{className:"font-mono",children:"MIL-STD"}),l.jsx("span",{className:"text-border",children:"|"}),l.jsx("span",{className:"font-mono",children:"ITAR"})]})})})]})}function Ene(){const e=[{icon:f6,title:"ISO 26262 Alignment",description:"AI governance controls designed to support functional safety requirements for automotive systems."},{icon:Bn,title:"UNECE R155/R156 Support",description:"Cybersecurity and software update management controls for connected and autonomous vehicles."},{icon:y6,title:"ASPICE Readiness",description:"Process-aligned AI lifecycle management with full traceability from requirements to deployment."},{icon:Pt,title:"Type Approval Evidence",description:"Generate documentation packages for homologation authorities and OEM audit requirements."}];return l.jsxs($t,{children:[l.jsx("section",{className:"py-20 md:py-28 border-b border-border",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 lg:gap-16 items-start",children:[l.jsxs("div",{children:[l.jsx(Vt,{size:"sm",className:"mb-6"}),l.jsx("div",{className:"mono-label mb-4",children:"// AUTOMOTIVE"}),l.jsxs("h1",{className:"text-4xl md:text-5xl font-bold leading-tight mb-6 tracking-tight",children:["AI Compliance for ",l.jsx("span",{className:"text-primary",children:"Automotive"})]}),l.jsx("p",{className:"text-xl text-muted-foreground mb-8 leading-relaxed",children:"From ADAS to autonomous vehicles, RegEngine provides ISO 26262 aligned governance for automotive AI systems at every ASIL level."}),l.jsxs("div",{className:"space-y-4 mb-8",children:[l.jsxs("div",{className:"flex items-center gap-3 text-foreground",children:[l.jsx("div",{className:"w-2 h-2 bg-primary rounded-full"}),l.jsx("span",{children:"ISO 26262 functional safety alignment"})]}),l.jsxs("div",{className:"flex items-center gap-3 text-foreground",children:[l.jsx("div",{className:"w-2 h-2 bg-primary rounded-full"}),l.jsx("span",{children:"ISO 21448 SOTIF compliance"})]}),l.jsxs("div",{className:"flex items-center gap-3 text-foreground",children:[l.jsx("div",{className:"w-2 h-2 bg-primary rounded-full"}),l.jsx("span",{children:"UNECE WP.29 readiness"})]})]}),l.jsxs(ge,{to:"/",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[l.jsx(kn,{className:"w-4 h-4 rotate-180"}),"Back to homepage"]})]}),l.jsx("div",{className:"lg:sticky lg:top-24",children:l.jsx("div",{className:"infra-card p-8",children:l.jsx(Ms,{industry:"Automotive",headline:"Talk to an Automotive Expert",subheadline:"Learn how RegEngine helps OEMs and Tier 1s deploy AI with safety certification confidence."})})})]})})}),l.jsx("section",{className:"py-20 md:py-28",children:l.jsxs("div",{className:"section-container",children:[l.jsx("h2",{className:"text-3xl md:text-4xl font-semibold mb-12",children:"Built for Automotive Safety"}),l.jsx("div",{className:"grid md:grid-cols-2 gap-8",children:e.map((t,n)=>l.jsxs("div",{className:"infra-card p-6",children:[l.jsx(t.icon,{className:"w-8 h-8 text-primary mb-4"}),l.jsx("h3",{className:"text-lg font-semibold text-foreground mb-2",children:t.title}),l.jsx("p",{className:"text-muted-foreground",children:t.description})]},n))})]})}),l.jsx("section",{className:"py-16 border-t border-border",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-8 text-muted-foreground text-sm",children:[l.jsx("span",{className:"font-mono",children:"ISO 26262"}),l.jsx("span",{className:"text-border",children:"|"}),l.jsx("span",{className:"font-mono",children:"ISO 21448"}),l.jsx("span",{className:"text-border",children:"|"}),l.jsx("span",{className:"font-mono",children:"UNECE WP.29"}),l.jsx("span",{className:"text-border",children:"|"}),l.jsx("span",{className:"font-mono",children:"ASPICE"})]})})})]})}function Cne(){const e=[{icon:O6,title:"NERC CIP Alignment",description:"AI governance controls designed to support critical infrastru
492cture protection requirements for grid operations."},{icon:Bn,title:"IEC 62443 Compliance",description:"Industrial cybersecurity controls for AI systems in operational technology environments."},{icon:b6,title:"Process Safety AI",description:"Human-in-the-loop controls and audit trails for AI-assisted decisions in safety-critical operations."},{icon:Pt,title:"Regulatory Evidence",description:"Generate documentation for FERC, state PUC, NRC, and international energy authority reviews."}];return l.jsxs($t,{children:[l.jsx("section",{className:"py-20 md:py-28 border-b border-border",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 lg:gap-16 items-start",children:[l.jsxs("div",{children:[l.jsx(Vt,{size:"sm",className:"mb-6"}),l.jsx("div",{className:"mono-label mb-4",children:"// ENERGY & UTILITIES"}),l.jsxs("h1",{className:"text-4xl md:text-5xl font-bold leading-tight mb-6 tracking-tight",children:["AI Compliance for ",l.jsx("span",{className:"text-primary",children:"Energy & Utilities"})]}),l.jsx("p",{className:"text-xl text-muted-foreground mb-8 leading-relaxed",children:"Critical infrastructure requires critical governance. RegEngine provides NERC CIP and IEC 62443 aligned controls for energy sector AI systems."}),l.jsxs("div",{className:"space-y-4 mb-8",children:[l.jsxs("div",{className:"flex items-center gap-3 text-foreground",children:[l.jsx("div",{className:"w-2 h-2 bg-primary rounded-full"}),l.jsx("span",{children:"NERC CIP compliance support"})]}),l.jsxs("div",{className:"flex items-center gap-3 text-foreground",children:[l.jsx("div",{className:"w-2 h-2 bg-primary rounded-full"}),l.jsx("span",{children:"IEC 62443 industrial security"})]}),l.jsxs("div",{className:"flex items-center gap-3 text-foreground",children:[l.jsx("div",{className:"w-2 h-2 bg-primary rounded-full"}),l.jsx("span",{children:"Process safety oversight"})]})]}),l.jsxs(ge,{to:"/",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[l.jsx(kn,{className:"w-4 h-4 rotate-180"}),"Back to homepage"]})]}),l.jsx("div",{className:"lg:sticky lg:top-24",children:l.jsx("div",{className:"infra-card p-8",children:l.jsx(Ms,{industry:"Energy & Utilities",headline:"Talk to an Energy Expert",subheadline:"Learn how RegEngine helps energy companies deploy AI with regulatory confidence."})})})]})})}),l.jsx("section",{className:"py-20 md:py-28",children:l.jsxs("div",{className:"section-container",children:[l.jsx("h2",{className:"text-3xl md:text-4xl font-semibold mb-12",children:"Built for Critical Infrastructure"}),l.jsx("div",{className:"grid md:grid-cols-2 gap-8",children:e.map((t,n)=>l.jsxs("div",{className:"infra-card p-6",children:[l.jsx(t.icon,{className:"w-8 h-8 text-primary mb-4"}),l.jsx("h3",{className:"text-lg font-semibold text-foreground mb-2",children:t.title}),l.jsx("p",{className:"text-muted-foreground",children:t.description})]},n))})]})}),l.jsx("section",{className:"py-16 border-t border-border",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-8 text-muted-foreground text-sm",children:[l.jsx("span",{className:"font-mono",children:"NERC CIP"}),l.jsx("span",{className:"text-border",children:"|"}),l.jsx("span",{className:"font-mono",children:"IEC 62443"}),l.jsx("span",{className:"text-border",children:"|"}),l.jsx("span",{className:"font-mono",children:"API Standards"}),l.jsx("span",{className:"text-border",children:"|"}),l.jsx("span",{className:"font-mono",children:"NRC"})]})})})]})}function Pu({metaTitle:e,metaDescription:t,canonical:n,label:r,industry:i,headline:a,subtitle:s,bulletPoints:o,benefits:c,complianceFrameworks:u,faqs:f,relatedIndustries:d,relatedFeatures:h}){return l.jsxs($t,{children:[l.jsx(_a,{title:e,description:t,canonical:n}),l.jsx(q_,{faqs:f}),l.jsx("section",{className:"py-20 md:py-28 border-b border-border",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 lg:gap-16 items-start",children:[l.jsxs("div",{children:[l.jsx(Vt,{size:"sm",className:"mb-6"}),l.jsxs("div",{className:"mono-label mb-4",children:["// ",r]}),l.jsxs("h1",{className:"text-4xl md:text-5xl font-bold leading-tight mb-6 tracking-tight",children:["AI Compliance for ",l.jsx("span",{className:"text-primary",children:i})]}),l.jsx("p",{className:"text-xl text-muted-foreground mb-8 leading-relaxed",children:s}),l.jsx("div",{className:"space-y-4 mb-8",children:o.map((p,g)=>l.jsxs("div",{className:"flex items-center gap-3 text-foreground",children:[l.jsx("div",{className:"w-2 h-2 bg-primary rounded-full"}),l.jsx("span",{children:p})]},g))}),l.jsxs(ge,{to:"/",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[l.jsx(kn,{className:"w-4 h-4 rotate-180"}),"Back to homepage"]})]}),l.jsx("div",{className:"lg:sticky lg:top-24",children:l.jsx("div",{className:"infra-card p-8",children:l.jsx(Ms,{industry:i,headline:`Talk to a ${i} Expert`,subheadline:`Learn how RegEngine helps ${i.toLowerCase()} organizations deploy AI safely.`})})})]})})}),l.jsx("section",{className:"py-20 md:py-28 border-b border-border",children:l.jsxs("div",{className:"section-container",children:[l.jsxs("h2",{className:"text-3xl md:text-4xl font-semibold mb-12",children:["Built for ",i," Compliance"]}),l.jsx("div",{className:"grid md:grid-cols-2 gap-8",children:c.map((p,g)=>l.jsxs("div",{className:"infra-card p-6",children:[l.jsx(p.icon,{className:"w-8 h-8 text-primary mb-4"}),l.jsx("h3",{className:"text-lg font-semibold text-foreground mb-2",children:p.title}),l.jsx("p",{className:"text-muted-foreground",children:p.description})]},g))})]})}),f.length>0&&l.jsx("section",{className:"py-20 md:py-28 border-b border-border",children:l.jsxs("div",{className:"section-container",children:[l.jsx("h2",{className:"text-3xl md:text-4xl font-semibold mb-12",children:"Frequently Asked Questions"}),l.jsx("div",{className:"space-y-6 max-w-2xl",children:f.map((p,g)=>l.jsxs("div",{children:[l.jsx("h3",{className:"font-semibold text-foreground mb-2",children:p.question}),l.jsx("p",{className:"text-muted-foreground leading-relaxed",children:p.answer})]},g))})]})}),l.jsx("section",{className:"py-16 border-b border-border",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"grid md:grid-cols-2 gap-8",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Related Industries"}),l.jsx("div",{className:"flex flex-wrap gap-3",children:d.map(p=>l.jsxs(ge,{to:p.href,className:"infra-card px-4 py-2 text-sm text-foreground hover:text-primary transition-colors inline-flex items-center gap-2",children:[p.label,l.jsx(kn,{className:"w-3 h-3"})]},p.href))})]}),l.jsxs("div",{children:[l.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Platform Features"}),l.jsx("div",{className:"flex flex-wrap gap-3",children:h.map(p=>l.jsxs(ge,{to:p.href,className:"infra-card px-4 py-2 text-sm text-foreground hover:text-primary transition-colors inline-flex items-center gap-2",children:[p.label,l.jsx(kn,{className:"w-3 h-3"})]},p.href))})]})]})})}),l.jsx("section",{className:"py-16",children:l.jsx("div",{className:"section-container",children:l.jsx("div",{className:"flex flex-wrap items-center justify-center gap-8 text-muted-foreground text-sm",children:u.map((p,g)=>l.jsxs("span",{className:"font-mono",children:[p,g<u.length-1&&l.jsx("span",{className:"ml-8 text-border",children:"|"})]},g))})})})]})}function Pne(){return l.jsx(Pu,{metaTitle:"AI Compliance for Pharmaceutical Companies — RegEngine",metaDescription:"Automate FDA, EMA, and GxP compliance with AI. Regulatory intelligence, SOP mapping, change monitoring, and audit-ready evidence for pharmaceutical organizations.",canonical:"/industries/pharma",label:"PHARMACEUTICAL",industry:"Pharmaceutical",headline:"AI Compliance for Pharmaceutical Companies",subtitle:"Operationalize regulatory intelligence across drug development, manufacturing, and post-market surveillance with AI-powered compliance infrastru
492cture.",bulletPoints:["FDA 21 CFR Part 11 compliant audit trails","GMP/GLP/GCP compliance automation","ICH guideline mapping and monitoring","Real-time regulatory change intelligence"],benefits:[{icon:Pt,title:"GxP Compliance Automation",description:"Automate compliance across GMP, GLP, GCP, and GDP frameworks. Map regulatory requirements to manufacturing, laboratory, and clinical SOPs automatically."},{icon:Bn,title:"Submission Intelligence",description:"AI-powered research for regulatory submissions. Search requirements across FDA, EMA, PMDA, and other agencies simultaneously."},{icon:al,title:"Regulatory Change Monitoring",description:"Track changes across ICH, FDA, EMA, and global regulatory bodies. Get alerts when updates impact your products or processes."},{icon:Nr,title:"Audit-Ready Evidence",description:"Generate compliance documentation instantly for FDA inspections, EMA audits, and partner due diligence."}],complianceFrameworks:["FDA 21 CFR","EMA","ICH","GMP","GLP","GCP","GDP"],faqs:[{question:"How does RegEngine help with FDA submissions?",answer:"RegEngine provides AI-powered search across FDA guidance documents, regulations, and precedent submissions. It maps requirements to your SOPs and generates compliance evidence packages for submission readiness."},{question:"Can RegEngine monitor ICH guideline changes?",answer:"Yes. RegEngine continuously monitors ICH for new and revised guidelines, analyzing their impact on your compliance posture and notifying relevant teams."},{question:"Does RegEngine support multi-site pharmaceutical operations?",answer:"Yes. RegEngine supports multi-site, multi-jurisdiction compliance management with role-based access, site-specific configurations, and centralized regulatory intelligence."}],relatedIndustries:[{label:"Biotech",href:"/industries/biotech"},{label:"CROs",href:"/industries/cro"},{label:"Life Sciences",href:"/industries/life-sciences"}],relatedFeatures:[{label:"Regulatory AI Search",href:"/features/regulatory-ai-search"},{label:"SOP Mapping",href:"/features/regulation-sop-mapping"},{label:"Change Monitoring",href:"/features/regulatory-change-monitoring"}]})}function Tne(){return l.jsx(Pu,{metaTitle:"AI Compliance for Biotech Companies — RegEngine",metaDescription:"Scalable AI compliance infrastructure for biotech companies. Regulatory intelligence from discovery through commercialization. FDA, EMA, and ICH coverage.",canonical:"/industries/biotech",label:"BIOTECH",industry:"Biotech",headline:"AI Compliance for Biotech",subtitle:"Scale your compliance infrastructure alongside your science. RegEngine gives biotech companies enterprise-grade regulatory intelligence without enterprise-grade overhead.",bulletPoints:["Regulatory intelligence from preclinical through commercialization","IND/NDA/BLA submission requirement mapping","CMC regulatory guidance search and analysis","Scalable compliance as your organization grows"],benefits:[{icon:Pt,title:"Scale-Ready Compliance",description:"Start with the regulatory intelligence you need now and scale as you advance through clinical stages. No over-engineering required."},{icon:Bn,title:"Submission-Ready Intelligence",description:"Map IND, NDA, and BLA requirements automatically. Understand what each regulatory authority requires before you begin drafting."},{icon:al,title:"CMC Regulatory AI",description:"Search and analyze CMC-related regulations across FDA, EMA, and ICH. Understand chemistry, manufacturing, and controls requirements quickly."},{icon:Nr,title:"Investor-Grade Compliance",description:"Demonstrate regulatory preparedness to investors and partners with structured compliance evidence and gap analyses."}],complianceFrameworks:["FDA","EMA","ICH","GLP","GMP","GCP"],faqs:[{question:"Is RegEngine suitable for early-stage biotech?",answer:"Yes. RegEngine is designed to scale with your organization. Early-stage companies can start with regulatory search and intelligence, then add SOP mapping, change monitoring, and approval workflows as they grow."},{question:"Can RegEngine help with IND submissions?",answer:"Yes. RegEngine maps IND requirements across FDA divisions, helps identify required studies and documentation, and generates compliance checklists for submission readiness."},{question:"How does RegEngine support partnership due diligence?",answer:"RegEngine generates comprehensive compliance coverage reports that demonstrate your regulatory awareness and preparedness to potential partners, acquirers, and investors."}],relatedIndustries:[{label:"Pharmaceutical",href:"/industries/pharma"},{label:"CROs",href:"/industries/cro"},{label:"Life Sciences",href:"/industries/life-sciences"}],relatedFeatures:[{label:"AI Compliance Copilot",href:"/features/ai-compliance-copilot"},{label:"Knowledge Graph",href:"/features/regulatory-knowledge-graph"},{label:"Intelligence Database",href:"/features/regulatory-intelligence-database"}]})}function One(){return l.jsx(Pu,{metaTitle:"AI Compliance for Contract Research Organizations — RegEngine",metaDescription:"Multi-sponsor, multi-protocol compliance management for CROs. Regulatory intelligence across ICH-GCP, FDA, and EMA. AI-powered compliance for clinical research.",canonical:"/industries/cro",label:"CONTRACT_RESEARCH",industry:"CROs",headline:"AI Compliance for CROs",subtitle:"Manage multi-sponsor, multi-protocol compliance across jurisdictions with AI-powered regulatory intelligence. Scale your compliance operations without scaling your team.",bulletPoints:["Multi-sponsor compliance management","ICH-GCP requirement mapping per protocol","Cross-jurisdictional regulatory intelligence","Sponsor-ready audit evidence packages"],benefits:[{icon:Pt,title:"Multi-Sponsor Governance",description:"Manage compliance requirements across multiple sponsors, protocols, and therapeutic areas with role-based access and sponsor-specific configurations."},{icon:Bn,title:"Protocol-Level Compliance",description:"Map ICH-GCP and jurisdiction-specific requirements to each protocol. Identify compliance gaps before they become audit findings."},{icon:al,title:"Cross-Jurisdictional Intelligence",description:"When a trial spans multiple countries, understand each jurisdiction's requirements side by side. Compare and reconcile regulatory differences instantly."},{icon:Nr,title:"Sponsor Audit Readiness",description:"Generate sponsor-ready compliance documentation packages. Demonstrate protocol-level regulatory adherence with full traceability."}],complianceFrameworks:["ICH-GCP","FDA 21 CFR","EU CTR","MHRA","PMDA","GLP"],faqs:[{question:"Can RegEngine handle multiple sponsors simultaneously?",answer:"Yes. RegEngine supports multi-tenant compliance management where each sponsor's protocols, requirements, and compliance evidence are maintained separately with appropriate access controls."},{question:"How does RegEngine help with multi-country clinical trials?",answer:"RegEngine provides side-by-side comparison of regulatory requirements across jurisdictions, helping C
492ROs understand and reconcile differences in clinical trial regulations for each country involved."},{question:"Can sponsors access their compliance data?",answer:"Yes. RegEngine supports configurable sponsor access portals where sponsors can review compliance status, audit trails, and evidence packages for their specific protocols."}],relatedIndustries:[{label:"Pharmaceutical",href:"/industries/pharma"},{label:"Biotech",href:"/industries/biotech"},{label:"Life Sciences",href:"/industries/life-sciences"}],relatedFeatures:[{label:"SOP Mapping",href:"/features/regulation-sop-mapping"},{label:"Approval Workflows",href:"/features/approval-workflows"},{label:"Decision Logging",href:"/features/ai-decision-logging"}]})}function Nne(){return l.jsx(Pu,{metaTitle:"AI Compliance for Healthcare Technology Companies — RegEngine",metaDescription:"HIPAA, HITECH, and clinical AI governance for digital health platforms. AI compliance for health IT, EHR systems, and healthcare data analytics.",canonical:"/industries/healthcare-technology",label:"HEALTH_TECH",industry:"Healthcare Technology",headline:"AI Compliance for Healthcare Technology",subtitle:"Build compliant healthcare AI products from the start. RegEngine provides regulatory intelligence for HIPAA, HITECH, FDA digital health guidance, and clinical AI governance.",bulletPoints:["HIPAA and HITECH compliance intelligence","FDA Software as Medical Device (SaMD) guidance","Clinical AI governance and oversight frameworks","Healthcare data privacy and security requirements"],benefits:[{icon:Pt,title:"HIPAA Compliance Intelligence",description:"Search and understand HIPAA requirements for your specific product. Map privacy and security rules to your technical controls and operational procedures."},{icon:Bn,title:"SaMD Classification Support",description:"Understand FDA SaMD classification requirements and map the appropriate regulatory pathway for your healthcare software product."},{icon:al,title:"Clinical AI Governance",description:"Implement governance frameworks for clinical AI including model validation, bias monitoring, and outcome tracking with full audit trails."},{icon:Nr,title:"Interoperability Compliance",description:"Navigate ONC, CMS, and TEFCA interoperability requirements. Understand FHIR compliance and information blocking rules."}],complianceFrameworks:["HIPAA","HITECH","FDA SaMD","ONC","TEFCA","SOC 2"],faqs:[{question:"Does RegEngine cover FDA digital health guidance?",answer:"Yes. RegEngine indexes FDA's digital health guidance documents, SaMD framework, and related regulations. You can search for requirements specific to your product category and intended use."},{question:"Can RegEngine help with HIPAA risk assessments?",answer:"Yes. RegEngine maps HIPAA security and privacy rule requirements and helps identify which controls your organization needs based on your specific operations and data handling practices."},{question:"How does RegEngine support health tech startups?",answer:"RegEngine provides immediate access to regulatory intelligence without requiring a large compliance team. Startups can understand their regulatory obligations early and build compliance into their products from the start."}],relatedIndustries:[{label:"Healthcare",href:"/industries/healthcare"},{label:"Digital Health",href:"/industries/digital-health"},{label:"Medical Devices",href:"/industries/medical-devices"}],relatedFeatures:[{label:"Regulatory AI Search",href:"/features/regulatory-ai-search"},{label:"AI Compliance Copilot",href:"/features/ai-compliance-copilot"},{label:"Change Monitoring",href:"/features/regulatory-change-monitoring"}]})}function Ine(){return l.jsx(Pu,{metaTitle:"AI Compliance for Medical Device Companies — RegEngine",metaDescription:"EU MDR, FDA 510(k), and ISO 13485 compliance intelligence for medical device companies. AI-powered regulatory intelligence for device classification and submission.",canonical:"/industries/medical-devices",label:"MEDICAL_DEVICES",industry:"Medical Devices",headline:"AI Compliance for Medical Devices",subtitle:"Navigate complex medical device regulations with AI-powered intelligence. From classification to post-market surveillance, RegEngine covers the full device lifecycle.",bulletPoints:["EU MDR and IVDR compliance intelligence","FDA 510(k) and PMA pathway guidance","ISO 13485 and ISO 14971 requirement mapping","Post-market surveillance compliance tracking"],benefits:[{icon:Pt,title:"Device Classification Intelligence",description:"Understand classification requirements across FDA, EU MDR, and other jurisdictions. Map your device against classification criteria with AI-assisted analysis."},{icon:Bn,title:"Submission Pathway Guidance",description:"Navigate 510(k), PMA, De Novo, and CE marking pathways with AI-powered regulatory search. Compare requirements across submission types."},{icon:al,title:"Standards Mapping",description:"Map ISO 13485, ISO 14971, IEC 62304, and other standards to your qual
492ity management system. Identify gaps and overlaps automatically."},{icon:Nr,title:"Post-Market Compliance",description:"Track post-market surveillance requirements, vigilance reporting obligations, and PMCF study requirements across jurisdictions."}],complianceFrameworks:["EU MDR","FDA 510(k)","ISO 13485","ISO 14971","IEC 62304","IVDR"],faqs:[{question:"Does RegEngine support EU MDR compliance?",answer:"Yes. RegEngine provides comprehensive EU MDR intelligence including classification rules, essential requirements, technical documentation guidance, and UDI requirements."},{question:"Can RegEngine help with 510(k) submissions?",answer:"Yes. RegEngine maps 510(k) submission requirements, helps identify predicate devices through regulatory search, and generates compliance checklists for submission readiness."},{question:"How does RegEngine handle AI/ML-based medical devices?",answer:"RegEngine includes FDA's AI/ML-based SaMD framework, predetermined change control plans, and Good Machine Learning Practice guidance. It helps AI medical device companies understand the evolving regulatory landscape."}],relatedIndustries:[{label:"Healthcare Technology",href:"/industries/healthcare-technology"},{label:"Digital Health",href:"/industries/digital-health"},{label:"Pharmaceutical",href:"/industries/pharma"}],relatedFeatures:[{label:"Knowledge Graph",href:"/features/regulatory-knowledge-graph"},{label:"SOP Mapping",href:"/features/regulation-sop-mapping"},{label:"Intelligence Database",href:"/features/regulatory-intelligence-database"}]})}function Rne(){return l.jsx(Pu,{metaTitle:"AI Compliance for Digital Health Companies — RegEngine",metaDescription:"SaMD classification, FDA digital health guidance, and real-world evidence compliance for digital health platforms. AI-powered regulatory intelligence.",canonical:"/industries/digital-health",label:"DIGITAL_HEALTH",industry:"Digital Health",headline:"AI Compliance for Digital Health",subtitle:"Build regulated digital health products with confidence. RegEngine provides AI-powered regulatory intelligence for SaMD, DTx, and digital biomarker companies.",bulletPoints:["FDA Digital Health Center of Excellence guidance","SaMD and DTx regulatory pathway intelligence","Real-world evidence and real-world data compliance","International digital health regulatory comparison"],benefits:[{icon:Pt,title:"SaMD Regulatory Intelligence",description:"Navigate the SaMD framework with AI-powered search across FDA, IMDRF, and international guidance documents. Understand your classification and regulatory pathway."},{icon:Bn,title:"DTx Compliance",description:"Digital therapeutics face unique regulatory challenges. RegEngine maps DTx-specific requirements across clinical evidence, cybersecurity, and reimbursement regulations."},{icon:al,title:"RWE/RWD Compliance",description:"Understand regulatory requirements for real-world evidence and real-world data. Map FDA and EMA guidance on RWE use in regulatory submissions."},{icon:Nr,title:"Cybersecurity Requirements",description:"Map FDA premarket cybersecurity guidance, postmarket cybersecurity requirements, and HIPAA security rules to your product architecture."}],complianceFrameworks:["FDA DHCoE","IMDRF SaMD","HIPAA","EU MDR","GDPR","ISO 27001"],faqs:[{question:"How does RegEngine classify digital health products?",answer:"RegEngine provides intelligence on FDA's Clinical Decision Support criteria, SaMD classification (IMDRF framework), and Digital Health Center of Excellence policies to help you understand your product's regulatory classification."},{question:"Does RegEngine cover international digital health regulations?",answer:"Yes. RegEngine indexes digital health regulations from FDA, EMA, MHRA, TGA, Health Canada, and other jurisdictions, enabling cross-border regulatory comparison."},{question:"Can RegEngine help with Digital Health Pre-Cert?",answer:"RegEngine tracks FDA's evolving digital health policies and Software Precertification program developments, helping companies stay current with this rapidly changing regulatory landscape."}],relatedIndustries:[{label:"Healthcare Technology",href:"/industries/healthcare-technology"},{label:"Medical Devices",href:"/industries/medical-devices"},{label:"Biotech",href:"/industries/biotech"}],relatedFeatures:[{label:"AI Compliance Copilot",href:"/features/ai-compliance-copilot"},{label:"Regulatory AI Search",href:"/features/regulatory-ai-search"},{label:"Change Monitoring",href:"/features/regulatory-change-monitoring"}]})}function $s({metaTitle:e,metaDescription:t,canonical:n,label:r,headline:i,highlightedWord:a,subtitle:s,description:o,icon:c,details:u,useCases:f,faqs:d,relatedFeatures:h}){return l.jsxs($t,{children:[l.jsx(_a,{title:e,description:t,canonical:n}),l.jsx(r3,{}),l.jsx(q_,{faqs:d}),l.jsx("section",{className:"py-20 md:py-28 border-b border-border",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"max-w-2xl",children:[l.jsx(Vt,{size:"sm",className:"mb-6"}),l.jsxs("div",{className:"mono-label mb-4",children:["// ",r]}),l.jsxs("h1",{className:"text-4xl md:text-5xl font-bold leading-tight mb-6 tracking-tight",children:[i," ",l.jsx("span",{className:"text-primary",children:a})]}),l.jsx("p",{className:"text-xl text-muted-foreground mb-4 leading-relaxed",children:s}),l.jsx("p",{className:"text-muted-foreground mb-8 leading-relaxed",children:o}),l.jsxs("div",{className:"flex flex-wrap gap-6",children:[l.jsx(ge,{to:"/demo",className:"btn-outline-brand",children:"Request a demo"}),l.jsx(ge,{to:"/platform",className:"link-arrow",children:"Explore platform"})]})]})})}),l.jsx("section",{className:"py-20 md:py-28 border-b border-border",children:l.jsxs("div",{className:"section-container",children:[l.jsx("h2",{className:"text-3xl md:text-4xl font-semibold mb-12",children:"How It Works"}),l.jsx("div",{className:"grid md:grid-cols-2 gap-6",children:u.map((p,g)=>l.jsxs("div",{className:"infra-card p-6",children:[l.jsx("span",{className:"font-mono text-xs text-primary/60 mb-3 block",children:String(g+1).padStart(2,"0")}),l.jsx("h3",{className:"font-semibold text-foreground mb-2",children:p.title}),l.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:p.description})]},g))})]})}),l.jsx("section",{className:"py-20 md:py-28 border-b border-border",children:l.jsxs("div",{className:"section-container",children:[l.jsx("h2",{className:"text-3xl md:text-4xl font-semibold mb-8",children:"Use Cases"}),l.jsx("div",{className:"grid md:grid-cols-2 gap-4",children:f.map((p,g)=>l.jsxs("div",{className:"flex items-start gap-3 p-4 infra-card",children:[l.jsx("div",{className:"w-2 h-2 bg-primary rounded-full mt-2 shrink-0"}),l.jsx("p",{className:"text-foreground",children:p})]},g))})]})}),l.jsx("section",{className:"py-20 md:py-28 border-b border-border",children:l.jsxs("div",{className:"section-container",children:[l.jsx("h2",{className:"text-3xl md:text-4xl font-semibold mb-12",children:"Frequently Asked Questions"}),l.jsx("div",{className:"space-y-6 max-w-2xl",children:d.map((p,g)=>l.jsxs("div",{children:[l.jsx("h3",{className:"font-semibold text-foreground mb-2",children:p.question}),l.jsx("p",{className:"text-muted-foreground leading-relaxed",children:p.answer})]},g))})]})}),l.jsx("section",{className:"py-16 border-b border-border",children:l.jsxs("div",{className:"section-container",children:[l.jsx("h2",{className:"text-2xl font-semibold mb-6",children:"Related Capabilities"}),l.jsx("div",{className:"flex flex-wrap gap-3",children:h.map(p=>l.jsxs(ge,{to:p.href,className:"infra-card px-4 py-2 text-sm text-foreground hover:text-primary transition-colors inline-flex items-center gap-2",children:[p.label,l.jsx(kn,{className:"w-3 h-3"})]},p.href))})]})}),l.jsx("section",{className:"py-20 md:py-28",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"max-w-2xl",children:[l.jsx("h2",{className:"text-3xl md:text-4xl font-bold mb-6",children:"See It In Action"}),l.jsx("p",{className:"text-muted-foreground mb-8",children:"Schedule a walkthrough and see how RegEngine transforms your regulatory operations."}),l.jsxs("div",{className:"flex flex-wrap gap-6",children:[l.jsx(ge,{to:"/demo",className:"btn-outline-brand",children:"Request a demo"}),l.jsx("a",{href:"/contact",className:"link-arrow",children:"Talk to an expert"})]})]})})})]})}function Mne(){return l.jsx($s,{metaTitle:"Regulatory AI Search Engine — RegEngine",metaDescription:"Search regulatory requirements in natural language across FDA, EMA, ICH, and global frameworks. Get instant, traceable answers with source citations.",canonical:"/features/regulatory-ai-search",label:"REGULATORY_AI_SEARCH",headline:"Natural Language",highlightedWord:"Regulatory 
492Search",subtitle:"Search regulatory requirements the way you think—not the way databases are structured.",description:"RegEngine's AI search engine indexes thousands of regulatory documents, guidance texts, and compliance frameworks. Ask questions in plain language and receive precise, cited answers mapped directly to source regulations.",icon:Ah,details:[{title:"Semantic Search",description:"Go beyond keyword matching. RegEngine understands regulatory context, synonyms, and relationships to return relevant results even when your query doesn't match the exact regulatory language."},{title:"Source Citations",description:"Every search result links back to the specific regulation, section, and paragraph. Full traceability from question to regulatory source."},{title:"Cross-Framework Search",description:"Search across FDA, EMA, ICH, WHO, and other regulatory bodies simultaneously. Compare requirements across jurisdictions in a single query."},{title:"Regulatory Q&A",description:"Ask compliance questions naturally: 'What are the data integrity requirements for GMP?' and get structured, cited answers instantly."}],useCases:["Regulatory affairs teams researching requirements for new submissions","Quality teams verifying compliance against specific regulations","Clinical operations checking protocol requirements against ICH guidelines","Auditors searching for evidence requirements across frameworks","Regulatory strategists comparing requirements across jurisdictions","Training teams building compliance curricula from source regulations"],faqs:[{question:"Which regulatory frameworks can I search?",answer:"RegEngine indexes FDA (21 CFR), EU regulations (MDR, IVDR), ICH guidelines, GxP frameworks, HIPAA, ISO standards (13485, 14971), EU AI Act, and more. New frameworks are continuously added."},{question:"How accurate is the AI search?",answer:"RegEngine's search is trained specifically on regulatory corpora, achieving high precision for compliance queries. Every result includes source citations so you can verify against the original regulation."},{question:"Can I search internal documents alongside regulations?",answer:"Yes. RegEngine can index your internal SOPs, policies, and procedures alongside external regulations, enabling cross-referencing between your controls and regulatory requirements."}],relatedFeatures:[{label:"Knowledge Graph",href:"/features/regulatory-knowledge-graph"},{label:"AI Compliance Copilot",href:"/features/ai-compliance-copilot"},{label:"Intelligence Database",href:"/features/regulatory-intelligence-database"}]})}function $ne(){return l.jsx($s,{metaTitle:"Regulatory Knowledge Graph — AI-Powered — RegEngine",metaDescription:"Map regulatory relationships across FDA, EMA, ICH, and GxP frameworks with AI-powered knowledge graphs. Visualize dependencies, hierarchies, and control mappings.",canonical:"/features/regulatory-knowledge-graph",label:"KNOWLEDGE_GRAPH",headline:"Regulatory",highlightedWord:"Knowledge Graph",subtitle:"Model the entire regulatory landscape as a queryable, interconnected graph.",description:"RegEngine's knowledge graph transforms flat regulatory documents into structured, interconnected intelligence. See how regulations relate to each other, map requirements to controls, and trace dependencies across jurisdictions.",icon:Lj,details:[{title:"Entity Extraction",description:"AI automatically identifies regulatory entities—requirements, definitions, obligations, exemptions—and creates structured nodes in the knowledge graph."},{title:"Relationship Mapping",description:"Map relationships between regulations, guidance documents, SOPs, controls, and organizational processes. Understand how a change in one regulation cascades across your compliance posture."},{title:"Visual Graph Explorer",description:"Interactive visualization of regulatory relationships. Navigate the compliance landscape visually, exploring connections between frameworks, requirements, and your internal controls."},{title:"Graph Queries",description:"Query the knowledge graph programmatically. Ask questions like 'Show all FDA requirements that impact our manufacturing SOPs' and get structured results."}
492],useCases:["Mapping regulatory requirements to internal controls and SOPs","Impact analysis when regulations change across jurisdictions","Identifying gaps in compliance coverage across frameworks","Visualizing regulatory dependencies for audit preparation","Building regulatory intelligence dashboards for leadership","Cross-referencing ICH guidelines with FDA and EMA requirements"],faqs:[{question:"What is a regulatory knowledge graph?",answer:"A regulatory knowledge graph is a structured representation of regulatory information where regulations, requirements, obligations, and controls are modeled as interconnected nodes. This enables AI-powered querying, impact analysis, and relationship discovery across regulatory frameworks."},{question:"How does RegEngine build the knowledge graph?",answer:"RegEngine uses NLP and domain-specific AI models to parse regulatory documents, extract entities and relationships, and construct the graph automatically. The graph is continuously updated as regulations change."},{question:"Can I add custom nodes and relationships?",answer:"Yes. You can add your internal SOPs, controls, policies, and processes as nodes in the graph and define custom relationships to regulatory requirements."}],relatedFeatures:[{label:"Regulatory AI Search",href:"/features/regulatory-ai-search"},{label:"SOP Mapping",href:"/features/regulation-sop-mapping"},{label:"Change Monitoring",href:"/features/regulatory-change-monitoring"}]})}function Dne(){return l.jsx($s,{metaTitle:"AI Compliance Copilot for Regulatory Teams — RegEngine",metaDescription:"Ask regulatory questions in natural language. Get instant, traceable answers mapped to source regulations. AI copilot for regulatory affairs and compliance teams.",canonical:"/features/ai-compliance-copilot",label:"AI_COPILOT",headline:"AI Compliance",highlightedWord:"Copilot",subtitle:"Your AI-powered regulatory affairs assistant—trained on real regulations, not marketing content.",description:"RegEngine's AI Copilot is trained on regulatory corpora from FDA, EMA, ICH, and other bodies. Ask compliance questions in natural language and get traceable, cited answers. Draft regulatory responses, surface requirements, and accelerate research—all with full audit trails.",icon:Nj,details:[{title:"Regulatory Q&A",description:"Ask questions like 'What are the electronic signature requirements under 21 CFR Part 11?' and receive structured answers with citations to specific regulatory sections."},{title:"Draft Assistance",description:"Generate first drafts of regulatory responses, compliance assessments, and gap analyses. The Copilot provides suggestions grounded in actual regulatory text."},{title:"Contextual Intelligence",description:"The Copilot understands your regulatory context—your industry, product type, target markets—and tailors responses accordingly."},{title:"Audit-Ready Outputs",description:"Every Copilot interaction generates an audit trail. Track which questions were asked, what answers were provided, and which regulations were cited."}],useCases:["Regulatory affairs teams answering compliance questions quickly","Quality teams drafting deviation investigations with regulatory context","Submission teams researching requirements for new market entries","Compliance officers preparing for regulatory inspections","Training teams creating regulatory awareness materials","R&D teams understanding regulatory impact on product development"],faqs:[{question:"How is RegEngine's AI Copilot different from ChatGPT?",answer:"RegEngine's Copilot is trained specifically on regulatory corpora and always cites source regulations. Unlike general-purpose AI, it doesn't hallucinate regulatory requirements. Every answer is traceable to specific regulatory text."},{question:"Can the Copilot access our internal documents?",answer:"Yes. The Copilot can be configured to reference your internal SOPs, policies, and procedures alongside external regulations, providing context-specific guidance."},{question:"Is Copilot usage logged for compliance?",answer:"Yes. Every interaction is logged with timestamps, user identity, questions asked, responses generated, and regulations cited—creating a complete audit trail."}],relatedFeatures:[{label:"Regulatory AI Search",href:"/features/regulatory-ai-search"},{label:"Knowledge Graph",href:"/features/regulatory-knowledge-graph"},{label:"Decision Logging",href:"/features/ai-decision-logging"}]})}function Lne(){return l.jsx($s,{metaTitle:"Regulation-to-SOP Mapping with AI — RegEngine",metaDescription:"Automatically map regulatory requirements to standard operating procedures. Identify compliance gaps, overlaps, and missing controls with AI-powered SOP intelligence.",canonical:"/features/regulation-sop-mapping",label:"SOP_MAPPING",headline:"Regulation-to-SOP",highlightedWord:"Mapping",subt
492itle:"Automatically connect every regulatory requirement to the SOPs and controls that address it.",description:"RegEngine uses AI to analyze your SOPs and map them against regulatory requirements. Identify gaps where requirements aren't covered, overlaps where multiple SOPs address the same regulation, and areas where your controls need updating.",icon:yu,details:[{title:"Automated Mapping",description:"Upload your SOPs and RegEngine automatically identifies which regulatory requirements each procedure addresses. No manual cross-referencing required."},{title:"Gap Analysis",description:"Instantly see which regulatory requirements lack corresponding SOPs or controls. Prioritize remediation based on risk and regulatory impact."},{title:"Coverage Reports",description:"Generate compliance coverage reports showing the percentage of regulatory requirements addressed by your SOPs, broken down by framework and category."},{title:"Change Impact",description:"When a regulation changes, instantly see which SOPs need updating. When an SOP changes, verify it still satisfies all mapped requirements."}],useCases:["Quality teams building traceability matrices for audits","Regulatory teams assessing compliance coverage before submissions","Process improvement teams identifying redundant or overlapping controls","Audit preparation teams generating evidence of regulatory coverage","New product teams mapping regulatory requirements to operational procedures","M&A teams assessing regulatory compliance of target companies"],faqs:[{question:"What SOP formats does RegEngine support?",answer:"RegEngine can process SOPs in PDF, Word, HTML, and structured text formats. It uses AI to extract procedural content regardless of document format or structure."},{question:"How accurate is the automated mapping?",answer:"RegEngine's mapping AI achieves high accuracy for regulatory-to-SOP alignment. All mappings include confidence scores and can be reviewed and adjusted by compliance teams."},{question:"Can I export traceability matrices?",answer:"Yes. RegEngine generates audit-ready traceability matrices that can be exported in multiple formats for regulatory submissions and inspection preparation."}],relatedFeatures:[{label:"Knowledge Graph",href:"/features/regulatory-knowledge-graph"},{label:"Change Monitoring",href:"/features/regulatory-change-monitoring"},{label:"AI Compliance Copilot",href:"/features/ai-compliance-copilot"}]})}function Fne(){return l.jsx($s,{metaTitle:"Regulatory Change Monitoring Software — RegEngine",metaDescription:"Track regulatory updates across jurisdictions in real time. Get alerts when changes impact your products, processes, or compliance posture. AI-powered change intelligence.",canonical:"/features/regulatory-change-monitoring",label:"CHANGE_MONITORING",headline:"Regulatory Change",highlightedWord:"Monitoring",subtitle:"Never be caught off guard by a regulatory change again.",description:"RegEngine continuously monitors regulatory bodies worldwide for updates, revisions, and new guidance. When changes are detected, AI analyzes the impact on your specific compliance posture and notifies the right teams with actionable intelligence.",icon:gu,details:[{title:"Continuous Monitoring",description:"RegEngine monitors FDA, EMA, ICH, and other regulatory bodies 24/7 for new publications, revisions, and guidance documents."},{title:"Impact Analysis",description:"When a change is detected, AI automatically assesses how it affects your mapped SOPs, controls, and compliance posture. Get impact scores and affected areas."},{title:"Smart Notifications",description:"Configurable alerts based on regulatory body, framework, product type, or impact severity. Route notifications to the right teams automatically."},{title:"Change History",description:"Full audit trail of regulatory changes, your response actions, and compliance updates. Demonstrate proactive regulatory monitoring to auditors."}],useCases:["Regulatory intelligence teams tracking multi-jurisdictional changes","Quality teams updating SOPs in response to regulatory revisions","Compliance officers maintaining awareness of evolving requirements","Product teams assessing regulatory impact on development roadmaps","Executive teams understanding regulatory risk exposure","Audit teams demonstrating proactive regulatory monitoring"],faqs:[{question:"Which regulatory bodies does RegEngine monitor?",answer:"RegEngine monitors major regulatory bodies including FDA, EMA, MHRA, TGA, Health Canada, PMDA, ICH, WHO, and many others. Coverage is continuously expanding to include additional national and regional authorities."},{question:"How quickly are regulatory changes detected?",answer:"RegEngine monitors regulatory sources continuously. Most changes are detected and analyzed within hours of publication, with critical changes flagged for immediate review."},{question:"Can I customize which changes I'm notified about?",answer:"Yes. You can configure notification rules based on regulatory body, framework, product category, geographic scope, and impact severity to ensure you only receive relevant alerts."}],relatedFeatures:[{label:"SOP Mapping",href:"/features/regulation-sop-mapping"},{label:"Knowledge Graph",href:"/features/regulatory-knowledge-graph"},{label:"Intelligence Database",href:"/features/regulatory-intelligence-database"}]})}function Bne(){return l.jsx($s,{metaTitle:"Regulatory Intelligence Database — RegEngine",metaDescription:"Centralized, AI-indexed regulatory intelligence repository. Structured, searchable, and continuously updated from authoritative sources. Built for regulated industries.",canonical:"/features/regulatory-intelligence-database",label:"INTELLIGENCE_DATABASE",headline:"Regulatory Intelligence",highlightedWord:"Database",subtitle:"A single source of truth for all regulatory intelligence across your organization.",description:"RegEngine's intelligence database is a centralized, AI-indexed repository of regulatory knowledge. It ingests regulations from authoritative sources, structures them into searchable intelligence, and continuously updates as frameworks evolve.",icon:Mj,details:[{title:"Authoritative Sources",description:"Ingests directly from regulatory body publications—FDA Federal Register, EMA guidance, ICH guidelines, and more. No intermediary curation delays."},{title:"AI Indexing",description:"Every regulation is parsed, structured, and indexed by AI. Requirements, obligations, definitions, and exemptions are extracted and categorized automatically."},{title:"Version Control",description:"Full version history for every regulation. Compare versions, track changes over time, and understand the evolution of regulatory requirements."},{title:"API Access",description:"Programmatic access to the entire regulatory intelligence database. Build custom integrations, dashboards, and workflows on top of structured regulatory data."}],useCases:["Regulatory affairs teams maintaining a single source of regulatory truth","Quality systems integrating regulatory intelligence into QMS platforms","Research teams building regulatory-aware product development workflows","IT teams integrating regulatory data into enterprise compliance systems","Analytics teams building regulatory intelligence dashboards","Training teams accessing up-to-date regulatory content for programs"],faqs:[{question:"How often is the database updated?",answer:"The database is updated continuously as regulatory bodies publish new documents, revisions, and guidance. Critical updates are processed within hours of publication."},{question:"Can I add proprietary regulatory intelligence?",answer:"Yes. You can enrich the database with your internal regulatory interpretations, company-specific guidance, and custom classifications alongside the authoritative source content."},{question:"Is the database accessible via API?",answer:"Yes. RegEngine provides RESTful APIs and SDK libraries for programmatic access to the full regulatory intelligence database, enabling custom integrations and workflows."}],relatedFeatures:[{label:"Regulatory AI Search",href:"/features/regulatory-ai-search"},{label:"Change Monitoring",href:"/features/regulatory-change-monitoring"},{label:"Knowledge Graph",href:"/features/regulatory-knowledge-graph"}]})}function Une(){return l.jsx($s,{metaTitle:"AI Decision Logging & Audit Trail
492s — RegEngine",metaDescription:"Immutable audit trails for every AI-generated output. Track inputs, model versions, confidence scores, and human approvals. Defensible AI compliance.",canonical:"/features/ai-decision-logging",label:"DECISION_LOGGING",headline:"AI Decision",highlightedWord:"Logging",subtitle:"Every AI decision recorded. Every output traceable. Every approval documented.",description:"RegEngine automatically logs every AI-generated decision with full context: inputs, model version, parameters, confidence scores, human approvals, and timestamps. Create defensible audit trails that satisfy regulatory inspectors and internal governance teams.",icon:Nr,details:[{title:"Complete Context Capture",description:"Every AI interaction is logged with inputs, outputs, model version, configuration parameters, confidence scores, and processing metadata."},{title:"Immutable Audit Trail",description:"Decision logs are immutable and tamper-evident. Once recorded, entries cannot be modified or deleted—ensuring compliance with 21 CFR Part 11 and similar requirements."},{title:"Human Approval Tracking",description:"Track which humans reviewed, approved, or rejected AI outputs. Record their identity, role, timestamp, and any comments or modifications."},{title:"Export & Reporting",description:"Generate audit-ready reports from decision logs. Export in formats suitable for regulatory submissions, inspections, and internal governance reviews."}],useCases:["Clinical AI systems requiring FDA-compliant decision audit trails","Manufacturing AI with GMP documentation requirements","Financial AI models subject to model risk management regulations","Healthcare AI requiring HIPAA-compliant activity logging","Quality systems needing traceable AI-assisted decisions","Any AI system subject to the EU AI Act transparency requirements"],faqs:[{question:"Does decision logging comply with 21 CFR Part 11?",answer:"Yes. RegEngine's decision logging includes electronic signatures, immutable records, access controls, and audit trail capabilities designed to satisfy 21 CFR Part 11 requirements for electronic records."},{question:"How long are decision logs retained?",answer:"Decision logs are retained according to your organization's configured retention policies. RegEngine supports configurable retention periods to meet different regulatory requirements."},{question:"Can decision logs be exported for regulatory submissions?",answer:"Yes. Logs can be exported in multiple formats suitable for regulatory submissions, including structured data exports and formatted audit reports."}],relatedFeatures:[{label:"Approval Workflows",href:"/features/approval-workflows"},{label:"AI Compliance Copilot",href:"/features/ai-compliance-copilot"},{label:"Regulatory AI Search",href:"/features/regulatory-ai-search"}]})}function qne(){return l.jsx($s,{metaTitle:"AI Approval Workflows for Regulated Industries — RegEngine",metaDescription:"Human-in-the-loop controls, risk-based approval thresholds, role-based authorization, and segregation of duties for regulated AI workflows.",canonical:"/features/approval-workflows",label:"APPROVAL_WORKFLOWS",headline:"Approval",highlightedWord:"Workflows",subtitle:"Human-in-the-loop controls for every AI decision that matters.",description:"RegEngine's approval workflows ensure that AI outputs in regulated environments receive appropriate human oversight. Configure risk-based thresholds, role-based authorization, multi-level approvals, and segregation of duties—all with complete audit trails.",icon:Pt,details:[{title:"Risk-Based Thresholds",description:"Configure approval requirements based on risk level. Low-risk AI outputs can be auto-approved while high-risk decisions require multi-level human review."},{title:"Role-Based Authorization",description:"Define approval authorities based on organizational roles. Ensure only qualified personnel can approve specific types of AI outputs."},{title:"Multi-Level Approvals",description:"Configure sequential or parallel approval chains for complex decisions. Support for multi-department, multi-role approval workflows."},{title:"Segregation of Duties",description:"Enforce separation between AI operators, reviewers, and approvers. Prevent conflicts of interest in AI decision governance."}],useCases:["Clinical AI requiring physician sign-off on generated recommendations","Manufacturing AI outputs needing quality and regulatory approval","Prior authorization systems requiring clinical and compliance review","Regulatory submissions needing multi-department approval chains","AI-generated content requiring legal and compliance clearance","Pharmacovigilance AI requiring safety officer review"],faqs:[{question:"Can approval workflows be customized per use case?",answer:"Yes. Each AI workflow can have its own approval configuration with custom thresholds, required roles, escalation paths, and timeout policies."},{question:"What happens when an approval is rejected?",answer:"Rejected outputs are logged with the reviewer's feedback and routed back to the appropriate team. The AI output is blocked from downstream use until the issue is resolved and re-approved."},{question:"Does the system support electronic signatures?",answer:"Yes. RegEngine supports electronic signatures compliant with 21 CFR Part 11, EU eIDAS, and other regulatory requirements for electronic records."}],relatedFeatures:[{label:"Decision Logging",href:"/features/ai-decision-logging"},{label:"AI Compliance Copilot",href:"/features/ai-compliance-copilot"},{label:"SOP Mapping",href:"/features/regulation-sop-mapping"}]})}function Bi({metaTitle:e,metaDescription:t,canonical:n,category:r,title:i,subtitle:a,datePublished:s,readTime:o,sections:c,relatedArticles:u,relatedFeatures:f}){return l.jsxs($t,{children:[l.jsx(_a,{title:e,description:t,canonical:n,ogType:"article"}),l.jsx(une,{title:e,description:t,url:n,datePublished:s}),l.jsx("article",{className:"py-20 md:py-28",children:l.jsx("div",{className:"section-container",children:l.jsxs("div",{className:"max-w-2xl",children:[l.jsxs(ge,{to:"/knowledge-hub",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors mb-8",children:[l.jsx(kn,{className:"w-4 h-4 rotate-180"}),"Knowledge Hub"]}),l.jsxs("div",{className:"mono-label mb-4",children:["// ",r]}),l.jsx("h1",{className:"text-3xl md:text-4xl font-bold leading-tight mb-4 tracking-tight",children:i}),l.jsx("p",{className:"text-xl text-muted-foreground mb-6 leading-relaxed",children:a}),l.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground mb-12 font-mono",children:[l.jsx("span",{children:s}),l.jsx("span",{children:"·"}),l.jsxs("span",{children:[o," read"]})]}),l.jsx("div",{className:"prose-section",children:c.map((d,h)=>l.jsxs("div",{className:"mb-10",children:[l.jsx("h2",{className:"text-2xl font-semibold mb-4",children:d.heading}),d.content.split(`
493
494`).map((p,g)=>l.jsx("p",{className:"text-muted-foreground leading-relaxed mb-4",children:p},g))]},h))}),l.jsxs("div",{className:"infra-card p-8 my-12",children:[l.jsx("h3",{className:"text-xl font-semibold mb-3",children:"See RegEngine in Action"}),l.jsx("p",{className:"text-muted-foreground mb-6",children:"Discover how RegEngine operationalizes regulatory intelligence with AI."}),l.jsxs("div",{className:"flex flex-wrap gap-4",children:[l.jsx(ge,{to:"/demo",className:"btn-outline-brand",children:"Request a demo"}),l.jsx(ge,{to:"/platform",className:"link-arrow",children:"Explore platform"})]})]}),u.length>0&&l.jsxs("div",{className:"mb-10",children:[l.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Related Articles"}),l.jsx("div",{className:"space-y-3",children:u.map(d=>l.jsxs(ge,{to:d.href,className:"block text-foreground hover:text-primary transition-colors",children:[d.label," →"]},d.href))})]}),f.length>0&&l.jsxs("div",{children:[l.jsx("h3",{className:"text-lg font-semibold mb-4",children:"Related Features"}),l.jsx("div",{className:"flex flex-wrap gap-3",children:f.map(d=>l.jsxs(ge,{to:d.href,className:"infra-card px-4 py-2 text-sm text-foreground hover:text-primary transition-colors inline-flex items-center gap-2",children:[d.label,l.jsx(kn,{className:"w-3 h-3"})]},d.href))})]})]})})})]})}function zne(){return l.jsx(Bi,{metaTitle:"The Future of Regulatory AI in Life Sciences — RegEngine",metaDescription:"How artificial intelligence is transforming regulatory affairs in life sciences. From manual compliance to intelligent, automated regulatory operations.",canonical:"/knowledge-hub/future-of-regulatory-ai",category:"FOUNDATIONS",title:"The Future of Regulatory AI in Life Sciences",subtitle:"Regulatory affairs is undergoing its most significant transformation in decades. AI is not replacing compliance—it is making compliance intelligent, automated, and proactive.",datePublished:"2026-01-15",readTime:"8 min",sections:[{heading:"The Current State of Regulatory Compliance",content:`Most regulatory affairs teams still operate with manual processes—searching through PDF documents, maintaining spreadsheets of regulatory requirements, and manually cross-referencing SOPs against regulations. This approach was adequate when the regulatory landscape was simpler and slower-moving.
495
496Today, the volume of regulatory output has increased dramatically. The FDA alone publishes thousands of guidance documents, rules, and notices annually. The EU MDR, IVDR, EU AI Act, and other frameworks add additional layers of complexity. Organizations operating across multiple jurisdictions face an exponentially growing compliance burden.`},{heading:"What Regulatory AI Actually Means",content:`Regulatory AI is not about replacing regulatory professionals with chatbots. It is about building infrastru
496cture that transforms regulatory text into machine-readable, searchable, and actionable intelligence.
497
498This means regulations are parsed into structured data. Requirements are extracted and categorized. Relationships between regulations are modeled in knowledge graphs. Changes are detected and analyzed automatically. Compliance evidence is generated from system records rather than assembled manually.
499
500The result is a shift from reactive compliance—scrambling to respond to audits and changes—to proactive regulatory operations where compliance is continuously maintained and verifiable.`},{heading:"Key Capabilities Emerging",content:`Several AI capabilities are converging to enable this transformation. Natural language processing allows regulations to be searched semantically rather than by keyword. Knowledge graphs model complex regulatory relationships that were previously only understood by experienced professionals. Machine learning enables automated classification of regulatory requirements by type, obligation level, and applicability.
501
502Perhaps most importantly, AI can now perform regulatory change analysis—detecting when a regulation is updated and automatically assessing how that change impacts an organization's compliance posture, SOPs, and operational procedures.`},{heading:"The Role of Knowledge Graphs in Regulatory Intelligence",content:`Regulatory knowledge graphs are emerging as a foundational technology for regulatory AI. By modeling regulations as interconnected entities—requirements, definitions, obligations, exemptions, guidance documents—knowledge graphs enable queries that were previously impossible.
503
504For example, a knowledge graph can answer: 'Show me all FDA requirements that reference data integrity and apply to manufacturing operations.' This type of query across flat document repositories would require hours of manual research. In a knowledge graph, it takes seconds.`},{heading:"What This Means for Regulatory Affairs Teams",content:`The future of regulatory affairs is not fewer people—it is more capable people. AI handles the research, monitoring, mapping, and evidence generation. Regulatory professionals focus on strategy, interpretation, risk assessment, and stakeholder management.
505
506Organizations that adopt regulatory AI infrastructure will have a significant competitive advantage: faster submissions, fewer audit findings, and lower compliance costs. Those that don't will struggle to keep up with the accelerating pace of regulatory change.`}],relatedArticles:[{label:"How AI Can Interpret FDA Regulations",href:"/knowledge-hub/ai-fda-compliance"},{label:"Regulatory Knowledge Graphs Explained",href:"/knowledge-hub/regulatory-knowledge-graphs-explained"},{label:"Building an AI Regulatory Intelligence Platform",href:"/knowledge-hub/building-ai-regulatory-platform"}],relatedFeatures:[{label:"Platform Overview",href:"/platform"},{label:"Regulatory AI Search",href:"/features/regulatory-ai-search"},{label:"Knowledge Graph",href:"/features/regulatory-knowledge-graph"}]})}function Vne(){return l.jsx(Bi,{metaTitle:"How AI Can Interpret FDA Regulations — RegEngine",metaDescription:"Deep dive into how artificial intelligence interprets, structures, and operationalizes FDA regulatory requirements for pharmaceutical and medical device companies.",canonical:"/knowledge-hub/ai-fda-compliance",category:"FDA",title:"How AI Can Interpret FDA Regulations",subtitle:"FDA regulations are among the most complex regulatory frameworks in the world. AI is changing how organizations understand, navigate, and operationalize FDA requirements.",datePublished:"2026-01-22",readTime:"10 min",sections:[{heading:"The Complexity of FDA's Regulatory Framework",content:`The FDA's regulatory framework spans thousands of pages across the Code of Federal Regulations (CFR), guidance documents, warning letters, advisory committee proceedings, and Federal Register notices. Title 21 of the CFR alone contains hundreds of parts covering food, drugs, biologics, medical devices, and more.
507
508For a pharmaceutical company, understanding their compliance obligations requires navigating 21 CFR Parts 210/211 (GMP), Part 11 (electronic records), Part 312 (IND), Part 314 (NDA), and dozens of associated guidance documents. This is before considering FDA-specific guidance on topics like data integrity, process validation, and computer system validation.`},{heading:"How AI Processes Regulatory Text",content:`AI interprets FDA regulations through several techniques. Natural language processing (NLP) models parse regulatory text to identify obligations, definitions, requirements, and exemptions. Named entity recognition identifies regulatory entities like forms, submission types, and compliance standards.
509
510Semantic analysis goes beyond keyword matching to understand the meaning and context of regulatory language. When a regulation states 'shall establish and follow written procedures,' AI understands this is a mandatory requirement for documented SOPs—not just a suggestion.
511
512This structured understanding allows AI to categorize, index, and relate regulatory requirements in ways that make them searchable, comparable, and actionable.`},{heading:"Practical Applications for FDA Compliance",content:`AI-powered FDA compliance enables several practical applications. Regulatory search allows teams to ask questions like 'What are the FDA requirements for electronic batch records?' and receive structured answers with specific CFR citations.
513
514Gap analysis identifies where an organization's current SOPs and controls fall short of FDA requirements. Regulatory change monitoring tracks FDA publications and analyzes their impact on existing compliance programs.
515
516Submission support helps teams understand the requirements for INDs, NDAs, BLAs, 510(k)s, and PMAs by mapping the regulatory pathway and required documentation.`},{heading:"21 CFR Part 11 and AI Systems",content:`The intersection of 21 CFR Part 11 and AI systems deserves special attention. AI systems that generate or process electronic records in regulated environments must comply with Part 11 requirements for audit trails, electronic signatures, and system validation.
517
518This creates an interesting recursive challenge: the AI system that helps you comply with Part 11 must itself be Part 11 compliant. This requires immutable decision logging, validated algorithms, and documented system architecture—capabilities that purpose-built regulatory AI platforms must provide natively.`},{heading:"The Path Forward",content:`FDA itself is actively exploring how AI can improve regulatory processes. The agency has published frameworks for AI/ML-based medical devices, discussed the use of AI in pharmacovigilance, and explored how real-world data can support regulatory decisions.
519
520For regulated organizations, the message is clear: AI-powered FDA compliance is not a future concept—it is a present necessity. Organizations that build AI-powered regulatory intelligence infrastructure now will be better positioned to navigate the increasingly complex FDA landscape.`}],relatedArticles:[{label:"The Future of Regulatory AI in Life Sciences",href:"/knowledge-hub/future-of-regulatory-ai"},{label:"AI for GxP Compliance Management",href:"/knowledge-hub/ai-gxp-compliance"},{label:"AI for Clinical Trial Compliance",href:"/knowledge-hub/ai-clinical-trial-compliance"}],relatedFeatures:[{label:"Regulatory AI Search",href:"/features/regulatory-ai-search"},{label:"Intelligence Database",href:"/features/regulatory-intelligence-database"},{label:"Decision Logging",href:"/features/ai-decision-logging"}]})}function Wne(){return l.jsx(Bi,{metaTitle:"AI for GxP Compliance Management — RegEngine",metaDescription:"How AI automates GxP compliance across GMP, GLP, GCP, and GDP frameworks. Practical guide to AI-powered Good Practice compliance for life sciences.",canonical:"/knowledge-hub/ai-gxp-compliance",category:"GxP",title:"AI for GxP Compliance Management",subtitle:"GxP frameworks—GMP, GLP, GCP, GDP—form the foundation of life sciences compliance. AI is transforming how organizations implement, monitor, and demonstrate GxP adherence.",datePublished:"2026-02-01",readTime:"9 min",sections:[{heading:"Understanding the GxP Landscape",content:`GxP is an umbrella term for Good Practice quality guidelines. GMP (Good Manufacturing Practice) governs pharmaceutical and medical device manufacturing. GLP (Good Laboratory Practice) covers non-clinical laboratory studies. GCP (Good Clinical Practice) defines standards for clinical trials. GDP (Good Distribution Practice) ensures product quality throughout the supply chain.
521
522Each framework has its own regulatory sources, guidelines, and inspection criteria. Organizations operating across the product lifecycle must maintain compliance with multiple GxP frameworks simultaneously—often across multiple jurisdictions with varying local requirements.`},{heading:"Where AI Adds Value in GxP",content:`AI adds value at every stage of GxP compliance. For GMP, AI can monitor regulatory changes across FDA, EMA, PIC/S, and WHO guidelines simultaneously, alerting quality teams when updates affect manufacturing operations.
523
524For GLP, AI helps map study protocols against regulatory requirements, ensuring that non-clinical studies are designed with compliance built in from the start.
525
526For GCP, AI monitors ICH-GCP guideline updates and maps requirements to clinical trial protocols, helping clinical operations teams maintain compliance across multi-country studies.
527
528For GDP, AI tracks serialization and traceability requirements across jurisdictions, helping supply chain teams navigate the complex landscape of pharmaceutical distribution regulations.`},{heading:"AI-Powered SOP Management for GxP",content:`Standard Operating Procedures are the operational backbone of GxP compliance. AI transforms SOP management by automatically mapping SOPs to regulatory requirements, identifying gaps where requirements are not addressed, and flagging SOPs that need updating when regulations change.
529
530This eliminates the manual cross-referencing that quality teams spend hundreds of hours performing annually. Instead of maintaining spreadsheet-based traceability matrices, organizations can generate them automatically from AI-powered regulatory mappings.`},{heading:"Data Integrity and ALCOA+ with AI",content:`Data integrity is a cornerstone of GxP compliance, governed by the ALCOA+ principles: Attributable, Legible, Contemporaneous, Original, Accurate, Complete, Consistent, Enduring, and Available.
531
532AI systems used in GxP environments must themselves comply with these principles. This means AI-generated outputs must be attributable to specific models and configurations, contemporaneously timestamped, and maintained in their original form. RegEngine's decision logging addresses these requirements natively.`},{heading:"Building a GxP-Ready AI Compliance Program",content:`Organizations implementing AI for GxP compliance should start by mapping their current GxP obligations across all applicable frameworks. Then, identify the highest-value use cases—typically regulatory change monitoring and SOP mapping—and implement AI capabilities incrementally.
533
534Critically, ensure that the AI platform itself is validated for use in a GxP environment. This means documented system architecture, validated algorithms, qualified infrastructure, and complete audit trails for every AI interaction.`}],relatedArticles:[{label:"How AI Can Interpret FDA Regulations",href:"/knowledge-hub/ai-fda-compliance"},{label:"AI for SOP Intelligence and Mapping",href:"/knowledge-hub/ai-sop-intelligence"},{label:"AI for Clinical Trial Compliance",href:"/knowledge-hub/ai-clinical-trial-compliance"}],relatedFeatures:[{label:"SOP Mapping",href:"/features/regulation-sop-mapping"},{label:"Change Monitoring",href:"/features/regulatory-change-monitoring"},{label:"Approval Workflows",href:"/features/approval-workflows"}]})}function Hne(){return l.jsx(Bi,{metaTitle:"Regulatory Knowledge Graphs Explained — RegEngine",metaDescription:"What are regulatory knowledge graphs? How AI-powered knowledge graphs transform regulatory intelligence by modeling relationships between regulations, requirements, and controls.",canonical:"/knowledge-hub/regulatory-knowledge-graphs-explained",category:"TECHNOLOGY",title:"Regulatory Knowledge Graphs Explained",subtitle:"Knowledge graphs are the foundation of modern regulatory intelligence. They transform flat regulatory documents into structured, queryable, interconnected networks of compliance knowledge.",datePublished:"2026-02-08",readTime:"7 min",sections:[{heading:"What Is a Knowledge Graph?",content:`A knowledge graph is a data structure that represents information as a network of entities and relationships. Unlike traditional databases that store data in tables, knowledge graphs model real-world relationships between concepts.
535
536In the regulatory context, a knowledge graph might represent: 'FDA 21 CFR 211.68 (entity) REQUIRES (relationship) automatic equipment recording (entity) for (relationship) production operations (entity).' This structure enables AI to answer complex queries about regulatory relationships that would be impossible with keyword search alone.`},{heading:"Why Regulations Need Knowledge Graphs",content:`Regulatory frameworks are inherently interconnected. An FDA regulation may reference ICH guidelines, which in turn reference ISO standards. A single manufacturing process may be governed by requirements from multiple CFR parts, guidance documents, and industry standards.
537
538Traditional document management systems treat each regulation as an isolated file. Knowledge graphs capture the relationships between regulations, creating a unified, navigable map of the entire regulatory landscape.
539
540This is transformative for compliance teams. Instead of manually researching which regulations apply to a specific process, they can query the graph: 'Show all requirements that apply to sterile manufacturing in the EU market.'`},{heading:"How Regulatory Knowledge Graphs Are Built",content:`Building a regulatory knowledge graph involves several AI-powered steps. First, NLP models parse regulatory documents to extract entities—requirements, definitions, obligations, exemptions, and references.
541
542Next, relationship extraction algorithms identify how these entities relate to each other. A regulation may 'require,' 'reference,' 'supersede,' 'amend,' or 'exempt' other regulations or requirements.
543
544Finally, the extracted entities and relationships are loaded into a graph database, creating a queryable knowledge structure that grows as new regulations are added and existing ones are updated.`},{heading:"Practical Applications",content:`Regulatory knowledge graphs enable several powerful applications. Impact analysis determines which internal procedures are affected when a regulation changes. Gap analysis identifies requirements that lack corresponding controls. Compliance mapping shows how your SOPs address regulatory requirements across frameworks.
545
546For organizations operating across jurisdictions, knowledge graphs enable regulatory comparison—understanding how FDA, EMA, and PMDA requirements differ for the same product type or process.`},{heading:"The Future of Regulatory Knowledge Graphs",content:`As AI capabilities advance, regulatory knowledge graphs will become increasingly sophisticated. Automated reasoning will enable the graph to infer compliance obligations from complex regulatory combinations. Predictive analytics will forecast regulatory trends based on historical patterns.
547
548Organizations that invest in knowledge graph infrastructure now are building the foundation for increasingly intelligent regulatory operations.`}],relatedArticles:[{label:"Building Machine-Readable Regulations",href:"/knowledge-hub/machine-readable-regulations"},{label:"The Future of Regulatory AI in Life Sciences",href:"/knowledge-hub/future-of-regulatory-ai"},{label:"Building an AI Regulatory Intelligence Platform",href:"/knowledge-hub/building-ai-regulatory-platform"}],relatedFeatures:[{label:"Regulatory Knowledge Graph",href:"/features/regulatory-knowledge-graph"},{label:"Regulatory AI Search",href:"/features/regulatory-ai-search"},{label:"Intelligence Database",href:"/features/regulatory-intelligence-database"}]})}function Gne(){return l.jsx(Bi,{metaTitle:"Building Machine-Readable Regulations — RegEngine",metaDescription:"How to transform regulatory text into structured, machine-readable data. The infrastructure layer that enables AI-powered regulatory compliance.",canonical:"/knowledge-hub/machine-readable-regulations",category:"TECHNOLOGY",title:"Building Machine-Readable Regulations",subtitle:"The foundation of regulatory AI is structured, machine-readable regulatory data. Without it, AI is just guessing. With it, AI can reason about compliance.",datePublished:"2026-02-15",readTime:"8 min",sections:[{heading:"The Problem with Regulatory Documents",content:`Regulations exist primarily as human-readable text—PDF documents, web pages, and published notices. While readable by compliance professionals, this format is fundamentally incompatible with automated processing.
549
550A human reading 21 CFR Part 211 understands context, cross-references, and implications. A machine sees a sequence of characters. Bridging this gap—making regulations machine-readable—is the essential infrastructure challenge for regulatory AI.`},{heading:"What Machine-Readable Means",content:`Machine-readable regulations are regulatory requirements that have been structured into a format that software can process, query, and reason about. This includes extracting individual requirements from regulatory text, categorizing them by type (mandatory, recommended, informational), linking them to related requirements, and assigning metadata.
551
552The result is a structured dataset where each regulatory requirement is a discrete, addressable, queryable entity—not just text on a page.`},{heading:"The Technology Stack",content:`Building machine-readable regulations requires several technologies working together. Document parsing extracts text from various formats (PDF, HTML, XML). NLP models identify sentence boundaries, requirement structures, and regulatory language patterns.
553
554Entity extraction identifies regulatory concepts—product types, process categories, compliance activities, referenced standards. Relationship extraction connects related requirements across documents.
555
556Finally, a structured storage layer—typically a combination of graph databases and search indexes—makes the processed regulations queryable and accessible via APIs.`},{heading:"Standards and Initiatives",content:`Several standards bodies and government initiatives are working toward machine-readable regulations. The OASIS LegalDocML standard provides XML schemas for legislative documents. The US government's regulations.gov platform publishes some regulatory data in structured formats.
557
558However, most regulatory content still requires AI processing to become truly machine-readable. This is where platforms like RegEngine add value—providing the AI infrastructure to transform unstructured regulatory text into structured, actionable intelligence.`},{heading:"Why This Matters for Your Organization",content:`Machine-readable regulations are the foundation that enables every other regulatory AI capability: intelligent search, automated mapping, change analysis, and compliance automation.
559
560Organizations don't need to build this infrastructure themselves. Platforms like RegEngine provide pre-built regulatory intelligence databases that transform regulatory text into structured, queryable data—enabling your compliance team to focus on strategy rather than document research.`}],relatedArticles:[{label:"Regulatory Knowledge Graphs Explained",href:"/knowledge-hub/regulatory-knowledge-graphs-explained"},{label:"The Future of Regulatory AI in Life Sciences",href:"/knowledge-hub/future-of-regulatory-ai"},{label:"Building an AI Regulatory Intelligence Platform",href:"/knowledge-hub/building-ai-regulatory-platform"}],relatedFeatures:[{label:"Intelligence Database",href:"/features/regulatory-intelligence-database"},{label:"Knowledge Graph",href:"/features/regulatory-knowledge-graph"},{label:"Regulatory AI Search",href:"/features/regulatory-ai-search"}]})}function Kne(){return l.jsx(Bi,{metaTitle:"AI Copilots for Regulatory Affairs Teams — RegEngine",metaDescription:"How AI copilots are transforming regulatory affairs workflows. From research acceleration to draft assistance, AI is augmenting regulatory professionals.",canonical:"/knowledge-hub/ai-copilots-regulatory-affairs",category:"USE CASES",title:"AI Copilots for Regulatory Affairs Teams",subtitle:"Regulatory affairs teams spend the majority of their time on research and documentation. AI copilots are changing this equation dramatically.",datePublished:"2026-02-22",readTime:"6 min",sections:[{heading:"The Regulatory Research Bottleneck",content:`Regulatory affairs professionals are highly skilled knowledge workers who spend a disproportionate amount of time on research—searching through regulatory databases, reading guidance documents, cross-referencing requirements, and compiling findings.
561
562A single regulatory question can take hours of research. Multiply this across dozens of questions per week, and regulatory team
562s become bottlenecks for product development, quality operations, and business decisions.`},{heading:"What an AI Copilot Does",content:`An AI copilot for regulatory affairs is not a replacement for regulatory expertise—it is a research accelerator. It allows regulatory professionals to ask questions in natural language and receive structured, cited answers.
563
564Instead of searching through PDF documents, the copilot searches across structured regulatory databases and knowledge graphs. It returns relevant requirements with specific citations, enabling the regulatory professional to verify, interpret, and apply the information.
565
566The copilot can also draft initial versions of regulatory assessments, gap analyses, and compliance responses—providing a starting point that the professional refines based on their expertise and judgment.`},{heading:"Critical Requirements for Regulatory Copilots",content:`Not every AI assistant is suitable for regulatory work. A regulatory AI copilot must provide source citations for every answer—traceability to the specific regulation, section, and paragraph. It must not hallucinate requirements that don't exist.
567
568It must maintain audit trails of all interactions, creating a record of what was asked, what was answered, and which regulations were referenced. And it must understand regulatory context—the difference between 'shall' and 'should,' between requirements and recommendations.
569
570General-purpose AI tools like ChatGPT lack these capabilities. Purpose-built regulatory copilots are essential for compliance-critical work.`},{heading:"Practical Workflow Integration",content:`The highest-value integration points for regulatory copilots include pre-submission research (understanding requirements for new markets or product types), deviation investigations (finding regulatory context for quality events), and audit preparation (compiling regulatory evidence packages).
571
572In each case, the copilot reduces hours of manual research to minutes of AI-assisted inquiry, allowing regulatory professionals to focus their expertise on interpretation and strategy rather than document searching.`}],relatedArticles:[{label:"The Future of Regulatory AI in Life Sciences",href:"/knowledge-hub/future-of-regulatory-ai"},{label:"AI for SOP Intelligence and Mapping",href:"/knowledge-hub/ai-sop-intelligence"},{label:"How AI Can Interpret FDA Regulations",href:"/knowledge-hub/ai-fda-compliance"}],relatedFeatures:[{label:"AI Compliance Copilot",href:"/features/ai-compliance-copilot"},{label:"Regulatory AI Search",href:"/features/regulatory-ai-search"},{label:"Decision Logging",href:"/features/ai-decision-logging"}]})}function Yne(){return l.jsx(Bi,{metaTitle:"AI for Clinical Trial Compliance — RegEngine",metaDescription:"How AI enhances clinical trial compliance across ICH-GCP, FDA, and EMA requirements. Protocol compliance, site monitoring, and regulatory intelligence for clinical research.",canonical:"/knowledge-hub/ai-clinical-trial-compliance",category:"CLINICAL",title:"AI for Clinical Trial Compliance",subtitle:"Clinical trials are among the most heavily regulated activities in the world. AI is emerging as essential infrastructure for maintaining compliance across protocols, jurisdictions, and sponsors.",datePublished:"2026-03-01",readTime:"9 min",sections:[{heading:"The Clinical Trial Compliance Challenge",content:`Clinical trials must comply with ICH-GCP guidelines, local regulations in each participating country, sponsor-specific requirements, IRB/EC conditions, and protocol-specific compliance obligations. A single Phase III trial operating in 20 countries faces hundreds of distinct regulatory requirements.
573
574Managing this compliance manually is not only time-consuming—it creates risk. Missed requirements can result in regulatory holds, data integrity issues, and ultimately patient safety concerns.`},{heading:"AI for Protocol Compliance Mapping",content:`AI can automatically map clinical trial protocols against ICH-GCP requirements and country-specific regulations. This creates a compliance matrix that identifies which protocol activities address which regulatory requirements—and where gaps exist.
575
576When protocol amendments are made, AI immediately reassesses compliance mapping, identifying any new regulatory requirements that the amendment triggers or existing requirements that may no longer be addressed.`},{heading:"Regulatory Intelligence for Clinical Operations",content:`Clinical operations teams need real-time regulatory intelligence to manage trials effectively. AI monitors regulatory changes across participating countries, alerting teams when local regulations change in ways that affect ongoing trials.
577
578This is particularly valuable for multinational trials where regulatory landscapes vary significantly. A regulatory change in one country may require protocol modifications, consent form updates, or additional reporting—AI identifies these impacts proactively.`},{heading:"AI-Assisted Site Monitoring",content:`Site monitoring visits generate significant compliance documentation. AI can help monitors prepare by identifying which regulatory requirements are most relevant to each site's activities and regulatory jurisdiction.
579
580Post-visit, AI can analyze monitoring reports against regulatory requirements to identify trends, recurring issues, and potential systemic compliance risks across the trial portfolio.`}
580,{heading:"The Role of Audit Trails",content:`Clinical trial AI systems must maintain comprehensive audit trails. Every AI-generated recommendation, compliance assessment, or regulatory mapping must be traceable to its source data and reasoning. This is not optional—it is a regulatory requirement under ICH-GCP and supporting regulations.
581
582Purpose-built regulatory AI platforms provide this auditability natively, ensuring that AI-assisted clinical trial compliance is itself compliant with the standards it helps enforce.`}],relatedArticles:[{label:"AI for GxP Compliance Management",href:"/knowledge-hub/ai-gxp-compliance"},{label:"How AI Can Interpret FDA Regulations",href:"/knowledge-hub/ai-fda-compliance"},{label:"AI Copilots for Regulatory Affairs Teams",href:"/knowledge-hub/ai-copilots-regulatory-affairs"}],relatedFeatures:[{label:"Approval Workflows",href:"/features/approval-workflows"},{label:"Change Monitoring",href:"/features/regulatory-change-monitoring"},{label:"SOP Mapping",href:"/features/regulation-sop-mapping"}]})}function Xne(){return l.jsx(Bi,{metaTitle:"AI for SOP Intelligence and Mapping — RegEngine",metaDescription:"How AI transforms SOP management by automating regulatory mapping, gap analysis, and change impact assessment. Intelligent SOP compliance for regulated industries.",canonical:"/knowledge-hub/ai-sop-intelligence",category:"USE CASES",title:"AI for SOP Intelligence and Mapping",subtitle:"Standard Operating Procedures are the bridge between regulations and operations. AI is making this bridge smarter, more traceable, and continuously validated.",datePublished:"2026-03-05",readTime:"7 min",sections:[{heading:"The SOP Compliance Problem",content:`Every regulated organization maintains hundreds—s
582ometimes thousands—of SOPs. Each SOP should address specific regulatory requirements. But maintaining the mapping between SOPs and regulations is a manual, error-prone process.
583
584Traceability matrices linking SOPs to regulatory requirements are typically maintained in spreadsheets, updated periodically, and often outdated. When a regulation changes, identifying which SOPs are affected requires manual review. When an SOP is revised, verifying it still satisfies all regulatory requirements is equally manual.`},{heading:"AI-Powered SOP Analysis",content:`AI can read and understand SOP content—not just as text, but as procedural instructions that address specific regulatory requirements. By parsing SOP content and comparing it against structured regulatory requirements, AI identifies which requirements each SOP addresses.
585
586This automated mapping eliminates the manual cross-referencing that quality teams spend significant time performing. More importantly, it provides continuous validation—as SOPs and regulations change, the mapping is updated automatically.`},{heading:"Gap Analysis and Coverage Reports",content:`Once SOPs are mapped to regulatory requirements, AI can instantly identify gaps—requirements that lack corresponding SOPs or controls. It can also identify overlaps—multiple SOPs addressing the same requirement, which may indicate redundancy or conflicting procedures.
587
588Coverage reports provide leadership with clear visibility into the organization's compliance posture: what percentage of FDA requirements are addressed by SOPs, which areas have gaps, and where remediation should be prioritized.`},{heading:"Change Impact Assessment",content:`When a regulation changes, AI immediately identifies which SOPs are affected. It assesses the impact severity—is this a minor wording change or a substantive requirement change that requires SOP revision?
589
590Conversely, when an SOP is revised, AI verifies that the revised version still satisfies all mapped regulatory requirements. This bidirectional change assessment ensures that compliance is maintained through both regulatory and operational changes.`}],relatedArticles:[{label:"AI for GxP Compliance Management",href:"/knowledge-hub/ai-gxp-compliance"},{label:"AI Copilots for Regulatory Affairs Teams",href:"/knowledge-hub/ai-copilots-regulatory-affairs"},{label:"AI Regulatory Change Management",href:"/knowledge-hub/ai-regulatory-change-management"}],relatedFeatures:[{label:"SOP Mapping",href:"/features/regulation-sop-mapping"},{label:"Knowledge Graph",href:"/features/regulatory-knowledge-graph"},{label:"Change Monitoring",href:"/features/regulatory-change-monitoring"}]})}function Zne(){return l.jsx(Bi,{metaTitle:"How to Build an AI Regulatory Intelligence Platform — RegEngine",metaDescription:"Architecture guide for building an AI regulatory intelligence platform. Data layer, intelligence engine, compliance operations, and the build vs. buy decision.",canonical:"/knowledge-hub/building-ai-regulatory-platform",category:"STRATEGY",title:"How to Build an AI Regulatory Intelligence Platform",subtitle:"A technical architecture guide for organizations evaluating whether to build or buy AI regulatory intelligence infrastructure.",datePublished:"2026-02-10",readTime:"12 min",sections:[{heading:"The Three-Layer Architecture",content:`An AI regulatory intelligence platform requires three foundational layers. The Data Layer ingests, parses, and structures regulatory content from authoritative sources. The Intelligence Layer applies AI models to extract, classify, and relate regulatory requirements. The Operations Layer delivers intelligence to compliance teams through search, mapping, monitoring, and workflow capabilities.
591
592Each layer has distinct technical requirements and challenges that must be addressed for the platform to deliver value.`},{heading:"Layer 1: Regulatory Data Infrastructure",content:`The data layer must ingest regulatory content from diverse sources—FDA's Federal Register, EMA's guidance portal, ICH's publication system, and dozens of other regulatory bodies worldwide. Content arrives in various formats: PDF, HTML, XML, and occasionally structured data.
593
594Parsing this content into a consistent, structured format requires sophisticated document processing. Tables, cross-references, footnotes, and hierarchical document structures must be preserved and linked. Version control is essential—you need to track how every regulation evolves over time.
595
596This layer alone requires significant engineering investment. Organizations building in-house must maintain parsers for each regulatory source, handle format changes when agencies update their publishing systems, and ensure continuous ingestion as new content is published.`},{heading:"Layer 2: AI Intelligence Engine",content:`The intelligence layer transforms structured regulatory text into actionable knowledge. This requires domain-specific NLP models trained on regulatory corpora—general-purpose language models perform poorly on regulatory text because they lack understanding of compliance-specific language and concepts.
597
598Key capabilities include: requirement extraction (identifying mandatory vs. recommended requirements), entity recognition (identifying product types, process categories, and referenced standards), relationship extraction (connecting requirements across documents), and semantic search (enabling natural language queries against regulatory content).
599
600Training and maintaining these models requires regulatory domain expertise, 
600curated training data, and continuous evaluation against ground-truth compliance assessments.`},{heading:"Layer 3: Compliance Operations",content:`The operations layer is where regulatory intelligence becomes actionable. It includes search interfaces for regulatory research, mapping tools for SOP-to-regulation traceability, monitoring systems for regulatory change detection, and workflow engines for approval routing.
601
602This layer must be designed for regulated environments—with audit trails, role-based access controls, electronic signature capabilities, and data integrity measures that satisfy 21 CFR Part 11 and equivalent requirements.
603
604Integration with existing systems (QMS, EDMS, CTMS) is also critical. A regulatory intelligence platform that operates in isolation provides limited value.`},{heading:"Build vs. Buy: The Realistic Assessment",content:`Building an AI regulatory intelligence platform from scratch requires expertise in regulatory affairs, NLP/AI engineering, knowledge graph technology, and compliance software development. Most organizations underestimate the ongoing maintenance burden—regulatory sources change, AI models require retraining, and compliance requirements evolve.
605
606Purpose-built platforms like RegEngine provide all three layers as a managed service, allowing organizations to focus on applying regulatory intelligence rather than building the infrastructure to generate it. The build path makes sense only for the largest organizations with unique requirements that cannot be met by existing platforms.`}],relatedArticles:[{label:"Regulatory Knowledge Graphs Explained",href:"/knowledge-hub/regulatory-knowledge-graphs-explained"},{label:"Building Machine-Readable Regulations",href:"/knowledge-hub/machine-readable-regulations"},{label:"The Future of Regulatory AI in Life Sciences",href:"/knowledge-hub/future-of-regulatory-ai"}],relatedFeatures:[{label:"Platform Overview",href:"/platform"},{label:"Intelligence Database",href:"/features/regulatory-intelligence-database"},{label:"Knowledge Graph",href:"/features/regulatory-knowledge-graph"}]})}function Qne(){return l.jsx(Bi,{metaTitle:"AI Regulatory Change Management — RegEngine",metaDescription:"How AI transforms regulatory change management from reactive scrambling to proactive intelligence. Automated monitoring, impact analysis, and response workflows.",canonical:"/knowledge-hub/ai-regulatory-change-management",category:"OPERATIONS",title:"AI Regulatory Change Management",subtitle:"Regulatory change is inevitable. The question is whether your organization responds reactively or manages change proactively with AI-powered intelligence.",datePublished:"2026-03-08",readTime:"8 min",sections:[{heading:"The Regulatory Change Problem",content:`Regulatory bodies worldwide publish thousands of updates annually—new regulations, revised guidance, draft rules, enforcement actions, and policy changes. For organizations operating across multiple jurisdictions, tracking these changes is a full-time job.
607
608The consequences of missing a regulatory change can be severe: non-compliance, warning letters, product holds, and in the worst cases, patient safety events. Yet most organizations rely on manual monitoring—subscribing to email lists, periodically checking regulatory websites, and depending on trade publications.`},{heading:"AI-Powered Change Detection",content:`AI transforms regulatory change monitoring from a manual process to an automated intelligence system. AI monitors regulatory sources continuously, detecting new publications, revisions to existing documents, and withdrawn or superseded regulations.
609
610But detection alone is not enough. The value of AI lies in analysis—understanding what a change means for your specific organization. When FDA revises a guidance document, AI analyzes the changes, identifies which of your SOPs and processes are affected, and assesses the severity of the impact.`},{heading:"Impact Analysis and Prioritization",content:`Not all regulatory changes require the same response. A minor wording clarification may need only documentation. A substantive new requirement may require SOP revisions, process changes, training, and system updates.
611
612AI performs impact analysis by mapping regulatory changes against your knowledge graph of SOPs, controls, and processes. It generates impact scores based on the breadth and depth of affected operations, helping compliance teams prioritize their response efforts.`},{heading:"Change Response Workflows",content:`Once a change is detected and analyzed, AI can route the response to appropriate teams. A GMP-related change goes to quality. A clinical trial regulation change goes to clinical operations. A data privacy update goes to IT and legal.
613
614Each response can be tracked through configurable workflows with approval requirements, deadlines, and evidence documentation—creating an auditable record that demonstrates proactive regulatory change management.`},{heading:"Demonstrating Proactive Compliance",content:`During regulatory inspections, demonstrating that your organization proactively monitors and responds to regulatory changes is a significant differentiator. AI-powered change management creates a complete audit trail: when a change was detected, how it was asse
614ssed, who responded, what actions were taken, and when the response was completed.
615
616This evidence of proactive compliance is increasingly expected by regulatory authorities and can significantly reduce the risk and severity of inspection findings.`}],relatedArticles:[{label:"AI for SOP Intelligence and Mapping",href:"/knowledge-hub/ai-sop-intelligence"},{label:"AI for GxP Compliance Management",href:"/knowledge-hub/ai-gxp-compliance"},{label:"The Future of Regulatory AI in Life Sciences",href:"/knowledge-hub/future-of-regulatory-ai"}],relatedFeatures:[{label:"Change Monitoring",href:"/features/regulatory-change-monitoring"},{label:"SOP Mapping",href:"/features/regulation-sop-mapping"},{label:"Approval Workflows",href:"/features/approval-workflows"}]})}function ev(){const[e,t]=w.useState(null),[n,r]=w.useState(!0);return w.useEffect(()=>{const{data:{subscription:a}}=mt.auth.onAuthStateChange((s,o)=>{t((o==null?void 0:o.user)??null),r(!1)});return mt.auth.getSession().then(({data:{session:s}})=>{t((s==null?void 0:s.user)??null),r(!1)}),()=>a.unsubscribe()},[]),{user:e,loading:n,signOut:async()=>{await mt.auth.signOut()}}}function Jne({children:e}){const{user:t,loading:n}=ev();return n?l.jsx("div",{className:"flex items-center justify-center min-h-screen bg-background",children:l.jsx("div",{className:"animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full"})}):t?l.jsx(l.Fragment,{children:e}):l.jsx(a_,{to:"/compliance-plane/login",replace:!0})}function ere(){const{user:e,loading:t}=ev(),[n,r]=w.useState(""),[i,a]=w.useState(""),[s,o]=w.useState(!1);if(t)return null;if(e)return l.jsx(a_,{to:"/compliance-plane",replace:!0});const c=async u=>{u.preventDefault(),o(!0);const{error:f}=await mt.auth.signInWithPassword({email:n,password:i});f&&($e.error(f.message),o(!1))};return l.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:l.jsxs("div",{className:"w-full max-w-sm space-y-6",children:[l.jsxs("div",{className:"text-center space-y-2",children:[l.jsx(Pt,{className:"w-10 h-10 text-primary mx-auto"}),l.jsx("h1",{className:"text-2xl font-bold",children:"Compliance Plane"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Sign in to your account"})]}),l.jsxs("form",{onSubmit:c,className:"space-y-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(ee,{htmlFor:"email",children:"Email"}),l.jsx(Oe,{id:"email",type:"email",value:n,onChange:u=>r(u.target.value),required:!0})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(ee,{htmlFor:"password",children:"Password"}),l.jsx(Oe,{id:"password",type:"password",value:i,onChange:u=>a(u.target.value),required:!0})]}),l.jsx(ie,{type:"submit",className:"w-full",disabled:s,children:s?"Signing in…":"Sign in"})]}),l.jsxs("p",{className:"text-center text-sm text-muted-foreground",children:["No account?"," ",l.jsx(ge,{to:"/compliance-plane/signup",className:"text-primary hover:underline",children:"Create one"})]})]})})}function tre(){const{user:e,loading:t}=ev(),[n,r]=w.useState(""),[i,a]=w.useState(""),[s,o]=w.useState(""),[c,u]=w.useState(""),[f,d]=w.useState(!1),[h,p]=w.useState(!1);if(t)return null;if(e)return l.jsx(a_,{to:"/compliance-plane",replace:!0});const g=async m=>{if(m.preventDefault(),i.length<6){$e.error("Password must be at least 6 characters");return}d(!0);const{error:y}=await mt.auth.signUp({email:n,password:i,options:{data:{full_name:s,company_name:c},emailRedirectTo:window.location.origin+"/compliance-plane"}});d(!1),y?$e.error(y.message):p(!0)};return h?l.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:l.jsxs("div",{className:"w-full max-w-sm text-center space-y-4",children:[l.jsx(Pt,{className:"w-10 h-10 text-primary mx-auto"}),l.jsx("h1",{className:"text-2xl font-bold",children:"Check your email"}),l.jsxs("p",{className:"text-muted-foreground",children:["We sent a verification link to ",l.jsx("strong",{children:n}),". Click the link to activate your account."]}),l.jsx(ge,{to:"/compliance-plane/login",className:"text-primary hover:underline text-sm",children:"Back to sign in"})]})}):l.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:l.jsxs("div",{className:"w-full max-w-sm space-y-6",children:[l.jsxs("div",{className:"text-center space-y-2",children:[l.jsx(Pt,{className:"w-10 h-10 text-primary mx-auto"}),l.jsx("h1",{className:"text-2xl font-bold",children:"Create your account"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Get started with Compliance Plane"})]}),l.jsxs("form",{onSubmit:g,className:"space-y-4",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsx(ee,{htmlFor:"fullName",children:"Full name"}),l.jsx(Oe,{id:"fullName",value:s,onChange:m=>o(m.target.value),required:!0})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(ee,{htmlFor:"companyName",children:"Company name"}),l.jsx(Oe,{id:"companyName",value:c,onChange:m=>u(m.target.value)})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(ee,{htmlFor:"email",children:"Email"}),l.jsx(Oe,{id:"email",type:"email",value:n,onChange:m=>r(m.target.value),required:!0})]}),l.jsxs("div",{className:"space-y-2",children:[l.jsx(ee,{htmlFor:"password",children:"Password"}),l.jsx(Oe,{id:"password",type:"password",value:i,onChange:m=>a(m.target.value),required:!0,minLength:6})]}),l.jsx(ie,{type:"submit",className:"w-full",disabled:f,children:f?"Creating account…":"Create account"})]}),l.jsxs("p",{className:"text-center text-sm text-muted-foreground",children:["Already have an account?"," ",l.jsx(ge,{to:"/compliance-plane/login",className:"text-primary hover:underline",children:"Sign in"})]})]})})}var vb=0;function z_(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??xT()),document.body.insertAdjacentElement("beforeend",e[1]??xT()),vb++,()=>{vb===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),vb--}},[])}function xT(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.
vendor: 5,402 bytes, line 616
616style.position="fixed",e.style.pointerEvents="none",e}var xb="focusScope.autoFocusOnMount",bb="focusScope.autoFocusOnUnmount",bT={bubbles:!1,cancelable:!0},nre="FocusScope",tv=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=e,[o,c]=w.useState(null),u=ci(i),f=ci(a),d=w.useRef(null),h=ze(t,m=>c(m)),p=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let m=function(x){if(p.paused||!o)return;const j=x.target;o.contains(j)?d.current=j:Da(d.current,{select:!0})},y=function(x){if(p.paused||!o)return;const j=x.relatedTarget;j!==null&&(o.contains(j)||Da(d.current,{select:!0}))},v=function(x){if(document.activeElement===document.body)for(const S of x)S.removedNodes.length>0&&Da(o)};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const b=new MutationObserver(v);return o&&b.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),b.disconnect()}}},[r,o,p.paused]),w.useEffect(()=>{if(o){ST.add(p);const m=document.activeElement;if(!o.contains(m)){const v=new CustomEvent(xb,bT);o.addEventListener(xb,u),o.dispatchEvent(v),v.defaultPrevented||(rre(lre(i3(o)),{select:!0}),document.activeElement===m&&Da(o))}return()=>{o.removeEventListener(xb,u),setTimeout(()=>{const v=new CustomEvent(bb,bT);o.addEventListener(bb,f),o.dispatchEvent(v),v.defaultPrevented||Da(m??document.body,{select:!0}),o.removeEventListener(bb,f),ST.remove(p)},0)}}},[o,u,f,p]);const g=w.useCallback(m=>{if(!n&&!r||p.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(y&&v){const b=m.currentTarget,[x,j]=ire(b);x&&j?!m.shiftKey&&v===j?(m.preventDefault(),n&&Da(x,{select:!0})):m.shiftKey&&v===x&&(m.preventDefault(),n&&Da(j,{select:!0})):v===b&&m.preventDefault()}},[n,r,p.paused]);return l.jsx(Pe.div,{tabIndex:-1,...s,ref:h,onKeyDown:g})});tv.displayName=nre;function rre(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Da(r,{select:t}),document.activeElement!==n)return}function ire(e){const t=i3(e),n=wT(t,e),r=wT(t.reverse(),e);return[n,r]}function i3(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function wT(e,t){for(const n of e)if(!are(n,{upTo:t}))return n}function are(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function sre(e){return e instanceof HTMLInputElement&&"select"in e}function Da(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&sre(e)&&t&&e.select()}}var ST=ore();function ore(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=jT(e,t),e.unshift(t)},remove(t){var n;e=jT(e,t),(n=e[0])==null||n.resume()}}}function jT(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function lre(e){return e.filter(t=>t.tagName!=="A")}var cre=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},wl=new WeakMap,Ep=new WeakMap,Cp={},wb=0,a3=function(e){return e&&(e.host||a3(e.parentNode))},ure=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=a3(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},dre=function(e,t,n,r){var i=ure(t,Array.isArray(e)?e:[e]);Cp[n]||(Cp[n]=new WeakMap);var a=Cp[n],s=[],o=new Set,c=new Set(i),u=function(d){!d||o.has(d)||(o.add(d),u(d.parentNode))};i.forEach(u);var f=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(h){if(o.has(h))f(h);else try{var p=h.getAttribute(r),g=p!==null&&p!=="false",m=(wl.get(h)||0)+1,y=(a.get(h)||0)+1;wl.set(h,m),a.set(h,y),s.push(h),m===1&&g&&Ep.set(h,!0),y===1&&h.setAttribute(n,"true"),g||h.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",h,v)}})};return f(t),o.clear(),wb++,function(){s.forEach(function(d){var h=wl.get(d)-1,p=a.get(d)-1;wl.set(d,h),a.set(d,p),h||(Ep.has(d)||d.removeAttribute(r),Ep.delete(d)),p||d.removeAttribute(n)}),wb--,wb||(wl=new WeakMap,wl=new WeakMap,Ep=new WeakMap,Cp={})}},V_=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=cre(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),dre(r,i,n,"aria-hidden")):function(){return null}},mm="right-scroll-bar-position",gm="width-before-scroll-bar",fre="with-scroll-bars-hidden",hre="--removed-body-scroll-bar-size";function Sb(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function pre(e,t){var n=w.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var mre=typeof window<"u"?w.useLayoutEffect:w.useEffect,_T=new WeakMap;function gre(e,t){var n=pre(null,function(r){return e.forEach(function(i){return Sb(i,r)})});return mre(function(){var r=_T.get(n);if(r){var i=new Set(r),a=new Set(e),s=n.current;
vendor: 4,224 bytes, lines 616-631
616i.forEach(function(o){a.has(o)||Sb(o,null)}),a.forEach(function(o){i.has(o)||Sb(o,s)})}_T.set(n,e)},[e]),n}function yre(e){return e}function vre(e,t){t===void 0&&(t=yre);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(o){return o!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(o){return a(o)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var o=n;n=[],o.forEach(a),s=n}var c=function(){var f=s;s=[],f.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(f){s.push(f),u()},filter:function(f){return s=s.filter(f),n}}}};return i}function xre(e){e===void 0&&(e={});var t=vre(null);return t.options=_i({async:!0,ssr:!1},e),t}var s3=function(e){var t=e.sideCar,n=Eu(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return w.createElement(r,_i({},n))};s3.isSideCarExport=!0;function bre(e,t){return e.useMedium(t),s3}var o3=xre(),jb=function(){},nv=w.forwardRef(function(e,t){var n=w.useRef(null),r=w.useState({onScrollCapture:jb,onWheelCapture:jb,onTouchMoveCapture:jb}),i=r[0],a=r[1],s=e.forwardProps,o=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,h=e.sideCar,p=e.noRelative,g=e.noIsolation,m=e.inert,y=e.allowPinchZoom,v=e.as,b=v===void 0?"div":v,x=e.gapMode,j=Eu(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=h,_=gre([n,t]),A=_i(_i({},j),i);return w.createElement(w.Fragment,null,f&&w.createElement(S,{sideCar:o3,removeScrollBar:u,shards:d,noRelative:p,noIsolation:g,inert:m,setCallbacks:a,allowPinchZoom:!!y,lockRef:n,gapMode:x}),s?w.cloneElement(w.Children.only(o),_i(_i({},A),{ref:_})):w.createElement(b,_i({},A,{className:c,ref:_}),o))});nv.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};nv.classNames={fullWidth:gm,zeroRight:mm};var wre=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Sre(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=wre();return t&&e.setAttribute("nonce",t),e}function jre(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function _re(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Are=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Sre())&&(jre(t,n),_re(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},kre=function(){var e=Are();return function(t,n){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},l3=function(){var e=kre(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Ere={left:0,top:0,right:0,gap:0},_b=function(e){return parseInt(e||"",10)||0},Cre=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[_b(n),_b(r),_b(i)]},Pre=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ere;var t=Cre(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Tre=l3(),fc="data-scroll-locked",Ore=function(e,t,n,r){var i=e.left,a=e.top,s=e.right,o=e.gap;return n===void 0&&(n="margin"),`
617  .`.concat(fre,` {
618   overflow: hidden `).concat(r,`;
619   padding-right: `).concat(o,"px ").concat(r,`;
620  }
621  body[`).concat(fc,`] {
622    overflow: hidden `).concat(r,`;
623    overscroll-behavior: contain;
624    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
625    padding-left: `.concat(i,`px;
626    padding-top: `).concat(a,`px;
627    padding-right: `).concat(s,`px;
628    margin-left:0;
629    margin-top:0;
630    margin-right: `).concat(o,"px ").concat(r,`;
631    `),n==="padding"&&"padding-right: ".concat(o,"px ").concat(r,";
631")].filter(Boolean).join(""),`
632  }
633  
634  .`).concat(mm,` {
635    right: `).concat(o,"px ").concat(r,`;
636  }
637  
638  .`).concat(gm,` {
639    margin-right: `).concat(o,"px ").concat(r,`;
640  }
641  
642  .`).concat(mm," .").concat(mm,` {
643    right: 0 `).concat(r,`;
644  }
645  
646  .`).concat(gm," .").concat(gm,` {
647    margin-right: 0 `).concat(r,`;
648  }
649  
650  body[`).concat(fc,`] {
651    `).concat(hre,": ").concat(o,`px;
652  }
653`)},AT=function(){var e=parseInt(document.body.getAttribute(fc)||"0",10);return isFinite(e)?e:0},Nre=function(){w.useEffect(function(){return document.body.setAttribute(fc,(AT()+1).toString()),function(){var e=AT()-1;e<=0?document.body.removeAttribute(fc):document.body.setAttribute(fc,e.toString())}},[])},Ire=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;Nre();var a=w.useMemo(function(){return Pre(i)},[i]);return w.createElement(Tre,{styles:Ore(a,!t,i,n?"":"!important")})},e1=!1;if(typeof window<"u")try{var Pp=Object.defineProperty({},"passive",{get:function(){return e1=!0,!0}});window.addEventListener("test",Pp,Pp),window.removeEventListener("test",Pp,Pp)}catch{e1=!1}var Sl=e1?{passive:!1}:!1,Rre=function(e){return e.tagName==="TEXTAREA"},c3=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Rre(e)&&n[t]==="visible")},Mre=function(e){return c3(e,"overflowY")},$re=function(e){return c3(e,"overflowX")},kT=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=u3(e,r);if(i){var a=d3(e,r),s=a[1],o=a[2];if(s>o)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Dre=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Lre=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},u3=function(e,t){return e==="v"?Mre(t):$re(t)},d3=function(e,t){return e==="v"?Dre(t):Lre(t)},Fre=function(e,t){return e==="h"&&t==="rtl"?-1:1},Bre=function(e,t,n,r,i){var a=Fre(e,window.getComputedStyle(t).direction),s=a*r,o=n.target,c=t.contains(o),u=!1,f=s>0,d=0,h=0;do{if(!o)break;var p=d3(e,o),g=p[0],m=p[1],y=p[2],v=m-y-a*g;(g||v)&&u3(e,o)&&(d+=v,h+=g);var b=o.parentNode;o=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!c&&o!==document.body||c&&(t.contains(o)||t===o));return(f&&(Math.abs(d)<1||!i)||!f&&(Math.abs(h)<1||!i))&&(u=!0),u},Tp=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ET=function(e){return[e.deltaX,e.deltaY]},CT=function(e){return e&&"current"in e?e.current:e},Ure=function(e,t){return e[0]===t[0]&&e[1]===t[1]},qre=function(e){return`
654  .block-interactivity-`.concat(e,` {pointer-events: none;}
655  .allow-interactivity-`).concat(e,` {pointer-events: all;}
656`)},zre=0,jl=[];function Vre(e){var t=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),i=w.useState(zre++)[0],a=w.useState(l3)[0],s=w.useRef(e);w.useEffect(function(){s.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=sJ([e.lockRef.current],(e.shards||[]).map(CT),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var o=w.useCallback(function(m,y){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!s.current.allowPinchZoom;var v=Tp(m),b=n.current,x="deltaX"in m?m.deltaX:b[0]-v[0],j="deltaY"in m?m.deltaY:b[1]-v[1],S,_=m.target,A=Math.abs(x)>Math.abs(j)?"h":"v";if("touches"in m&&A==="h"&&_.type==="range")return!1;var k=kT(A,_);if(!k)return!0;if(k?S=A:(S=A==="v"?"h":"v",k=kT(A,_)),!k)return!1;if(!r.current&&"changedTouches"in m&&(x||j)&&(r.current=S),!S)return!0;var E=r.current||S;return Bre(E,y,m,E==="h"?x:j,!0)},[]),c=w.useCallback(function(m){var y=m;if(!(!jl.length||jl[jl.length-1]!==a)){var v="deltaY"in y?ET(y):Tp(y),b=t.current.filter(function(S){return S.name===y.type&&(S.target===y.target||y.target===S.shadowParent)&&Ure(S.delta,v)}
vendor: 4,725 bytes, line 656
656)[0];if(b&&b.should){y.cancelable&&y.preventDefault();return}if(!b){var x=(s.current.shards||[]).map(CT).filter(Boolean).filter(function(S){return S.contains(y.target)}),j=x.length>0?o(y,x[0]):!s.current.noIsolation;j&&y.cancelable&&y.preventDefault()}}},[]),u=w.useCallback(function(m,y,v,b){var x={name:m,delta:y,target:v,should:b,shadowParent:Wre(v)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(j){return j!==x})},1)},[]),f=w.useCallback(function(m){n.current=Tp(m),r.current=void 0},[]),d=w.useCallback(function(m){u(m.type,ET(m),m.target,o(m,e.lockRef.current))},[]),h=w.useCallback(function(m){u(m.type,Tp(m),m.target,o(m,e.lockRef.current))},[]);w.useEffect(function(){return jl.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",c,Sl),document.addEventListener("touchmove",c,Sl),document.addEventListener("touchstart",f,Sl),function(){jl=jl.filter(function(m){return m!==a}),document.removeEventListener("wheel",c,Sl),document.removeEventListener("touchmove",c,Sl),document.removeEventListener("touchstart",f,Sl)}},[]);var p=e.removeScrollBar,g=e.inert;return w.createElement(w.Fragment,null,g?w.createElement(a,{styles:qre(i)}):null,p?w.createElement(Ire,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Wre(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Hre=bre(o3,Vre);var rv=w.forwardRef(function(e,t){return w.createElement(nv,_i({},e,{ref:t,sideCar:Hre}))});rv.classNames=nv.classNames;var iv="Popover",[f3,JNe]=wa(iv,[wu]),Ih=wu(),[Gre,Ds]=f3(iv),h3=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:s=!1}=e,o=Ih(t),c=w.useRef(null),[u,f]=w.useState(!1),[d,h]=Wo({prop:r,defaultProp:i??!1,onChange:a,caller:iv});return l.jsx(xD,{...o,children:l.jsx(Gre,{scope:t,contentId:Ro(),triggerRef:c,open:d,onOpenChange:h,onOpenToggle:w.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:u,onCustomAnchorAdd:w.useCallback(()=>f(!0),[]),onCustomAnchorRemove:w.useCallback(()=>f(!1),[]),modal:s,children:n})})};h3.displayName=iv;var p3="PopoverAnchor",Kre=w.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Ds(p3,n),a=Ih(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:o}=i;return w.useEffect(()=>(s(),()=>o()),[s,o]),l.jsx(Ly,{...a,...r,ref:t})});Kre.displayName=p3;var m3="PopoverTrigger",g3=w.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Ds(m3,n),a=Ih(n),s=ze(t,i.triggerRef),o=l.jsx(Pe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":w3(i.open),...r,ref:s,onClick:me(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?o:l.jsx(Ly,{asChild:!0,...a,children:o})});g3.displayName=m3;var W_="PopoverPortal",[Yre,Xre]=f3(W_,{forceMount:void 0}),y3=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=Ds(W_,t);return l.jsx(Yre,{scope:t,forceMount:n,children:l.jsx(Sa,{present:n||a.open,children:l.jsx(jh,{asChild:!0,container:i,children:r})})})};y3.displayName=W_;var Uc="PopoverContent",v3=w.forwardRef((e,t)=>{const n=Xre(Uc,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=Ds(Uc,e.__scopePopover);return l.jsx(Sa,{present:r||a.open,children:a.modal?l.jsx(Qre,{...i,ref:t}):l.jsx(Jre,{...i,ref:t})})});v3.displayName=Uc;var Zre=Vo("PopoverContent.RemoveScroll"),Qre=w.forwardRef((e,t)=>{const n=Ds(Uc,e.__scopePopover),r=w.useRef(null),i=ze(t,r),a=w.useRef(!1);return w.useEffect(()=>{const s=r.current;if(s)return V_(s)},[]),l.jsx(rv,{as:Zre,allowPinchZoom:!0,children:l.jsx(x3,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:me(e.onCloseAutoFocus,s=>{var o;s.preventDefault(),a.current||(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:me(e.onPointerDownOutside,s=>{const o=s.detail.originalEvent,c=o.button===0&&o.ctrlKey===!0,u=o.button===2||c;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:me(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),Jre=w.forwardRef((e,t)=>{const n=Ds(Uc,e.__scopePopover),r=w.useRef(!1),i=w.useRef(!1);return l.jsx(x3,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,o;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(o=n.triggerRef.current)==null||o.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),x3=w.forwardRef((e,t)=>
656{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:o,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:f,...d}=e,h=Ds(Uc,n),p=Ih(n);return z_(),l.jsx(tv,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:l.jsx(mu,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:o,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1),children:l.jsx(Xj,{"data-state":w3(h.open),role:"dialog",id:h.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),b3="PopoverClose",eie=w.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Ds(b3,n);return l.jsx(Pe.button,{type:"button",...r,ref:t,onClick:me(e.onClick,()=>i.onOpenChange(!1))})});eie.displayName=b3;var tie="PopoverArrow",nie=w.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Ih(n);return l.jsx(Zj,{...i,...r,ref:t})});nie.displayName=tie;function w3(e){return e?"open":"closed"}var rie=h3,iie=g3,aie=y3,S3=v3;const sie=rie,oie=iie,j3=w.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},i)=>l.jsx(aie,{children:l.jsx(S3,{ref:i,align:t,sideOffset:n,className:ve("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));j3.displayName=S3.displayName;function de(e){return mt.from(e)}async function sr(){const{data:{user:e}}=await mt.auth.getUser();if(!e)return null;const{data:t}=await de("profiles").select("tenant_id").eq("id",e.id).single();return(t==null?void 0:t.tenant_id)??null}function Je(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function ks(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const _3=6048e5,lie=864e5,Op=43200,PT=1440;let cie={};function Rh(){return cie}function Nf(e,t){var o,c,u,f;const n=Rh(),r=(t==null?void 0:t.weekStartsOn)??((c=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,i=Je(e),a=i.getDay(),s=(a<r?7:0)+a-r;return i.setDate(i.getDate()-s),i.setHours(0,0,0,0),i}function hg(e){return Nf(e,{weekStartsOn:1})}function A3(e){const t=Je(e),n=t.getFullYear(),r=ks(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const i=hg(r),a=ks(e,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const s=hg(a);return t.getTime()>=i.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function TT(e){const t=Je(e);return t.setHours(0,0,0,0),t}function pg(e){const t=Je(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function uie(e,t){const n=TT(e),r=TT(t),i=+n-pg(n),a=+r-pg(r);return Math.round((i-a)/lie)}function die(e){const t=A3(e),n=ks(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),hg(n)}function ym(e,t){const n=Je(e),r=Je(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function fie(e){return ks(e,Date.now())}function hie(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function pie(e){if(!hie(e)&&typeof e!="number")return!1;const t=Je(e);return!isNaN(Number(t))}function mie(e,t){const n=Je(e),r=Je(t),i=n.getFullYear()-r.getFullYear(),a=n.getMonth()-r.getMonth();return i*12+a}function gie(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function yie(e,t){return+Je(e)-+Je(t)}function vie(e){const t=Je(e);return t.setHours(23,59,59,999),t}function xie(e){const t=Je(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function bie(e){const t=Je(e);return+vie(t)==+xie(t)}function wie(e,t){const n=Je(e),r=Je(t),i=ym(n,r),a=Math.abs(mie(n,r));let s;if(a<1)s=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*a);let o=ym(n,r)===-i;bie(Je(e))&&a===1&&ym(e,r)===1&&(o=!1),s=i*(a-Number(o))}return s===0?0:s}function Sie(e,t,n){const r=yie(e,t)/1e3;return gie(n==null?void 0:n.roundingMethod)(r)}function jie(e){const t=Je(e),n=ks(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}const _ie={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Aie=(e,t,n)=>{let r;const i=_ie[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Ab(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const kie={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Eie={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Cie={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Pie={date:Ab({formats:kie,defaultWidth:"full"}),time:Ab({formats:Eie,defaultWidth:"full"}),dateTime:Ab({formats:Cie,defaultWidth:"full"})},Tie={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Oie=(e,t,n,r)=>Tie[e];
vendor: 16,061 bytes, line 656
656function nd(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,o=n!=null&&n.width?String(n.width):s;i=e.formattingValues[o]||e.formattingValues[s]}else{const s=e.defaultWidth,o=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[o]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}const Nie={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Iie={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Rie={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Mie={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},$ie={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Die={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Lie=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Fie={ordinalNumber:Lie,era:nd({values:Nie,defaultWidth:"wide"}),quarter:nd({values:Iie,defaultWidth:"wide",argumentCallback:e=>e-1}),month:nd({values:Rie,defaultWidth:"wide"}),day:nd({values:Mie,defaultWidth:"wide"}),dayPeriod:nd({values:$ie,defaultWidth:"wide",formattingValues:Die,defaultFormattingWidth:"wide"})};function rd(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const s=a[0],o=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(o)?Uie(o,d=>d.test(s)):Bie(o,d=>d.test(s));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const f=t.slice(s.length);return{value:u,rest:f}}}function Bie(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Uie(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function qie(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;const o=t.slice(i.length);return{value:s,rest:o}}}const zie=/^(\d+)(th|st|nd|rd)?/i,Vie=/\d+/i,Wie={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Hie={any:[/^b/i,/^(a|c)/i]},Gie={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Kie={any:[/1/i,/2/i,/3/i,/4/i]},Yie={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Xie={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Zie={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Qie={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Jie={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},eae={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},tae={ordinalNumber:qie({matchPattern:zie,parsePattern:Vie,valueCallback:e=>parseInt(e,10)}),era:rd({matchPatterns:Wie,defaultMatchWidth:"wide",parsePatterns:Hie,defaultParseWidth:"any"}),quarter:rd({matchPatterns:Gie,defaultMatchWidth:"wide",parsePatterns:Kie,defaultParseWidth:"any",valueCallback:e=>e+1}),month:rd({matchPatterns:Yie,defaultMatchWidth:"wide",parsePatterns:Xie,defaultParseWidth:"any"}),day:rd({matchPatterns:Zie,defaultMatchWidth:"wide",parsePatterns:Qie,defaultParseWidth:"any"}),dayPeriod:rd({matchPatterns:Jie,defaultMatchWidth:"any",parsePatterns:eae,defaultParseWidth:"any"})},k3={code:"en-US",formatDistance:Aie,formatLong:Pie,formatRelative:Oie,localize:Fie,match:tae,options:{weekStartsOn:0,firstWeekContainsDate:1}};function nae(e){const t=Je(e);return uie(t,jie(t))+1}function rae(e){const t=Je(e),n=+hg(t)-+die(t);return Math.round(n/_3)+1}function E3(e,t){var f,d,h,p;const n=Je(e),r=n.getFullYear(),i=Rh(),a=(t==null?void 0:t.firstWeekContainsDate)??((d=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??i.firstWeekContainsDate??((p=(h=i.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,s=ks(e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const o=Nf(s,t),c=ks(e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);const u=Nf(c,t);return n.getTime()>=o.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function iae(e,t){var o,c,u,f;const n=Rh(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,i=E3(e,t),a=ks(e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),Nf(a,t)}function aae(e,t){const n=Je(e),r=+Nf(n,t)-+iae(n,t);return Math.round(r/_3)+1}function We(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Ra={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return We(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):We(n+1,2)},d(e,t){return We(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return We(e.getHours()%12||12,t.length)},H(e,t){return We(e.getHours(),t.length)},m(e,t){return We(e.getMinutes(),t.length)},s(e,t){return We(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return We(i,t.length)}},_l={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},OT={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Ra.y(e,t)},Y:function(e,t,n,r){const i=E3(e,r),a=i>0?i:1-i;if(t==="YY"){const s=a%100;return We(s,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):We(a,t.length)},R:function(e,t){const n=A3(e);return We(n,t.length)},u:function(e,t){const n=e.getFullYear();return We(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return We(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return We(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Ra.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return We(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=aae(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):We(i,t.length)},I:function(e,t,n){const r=rae(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):We(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Ra.d(e,t)},D:function(e,t,n){const r=nae(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):We(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return We(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return We(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return We(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=_l.noon:r===0?i=_l.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=_l.evening:r>=12?i=_l.afternoon:r>=4?i=_l.morning:i=_l.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Ra.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ra.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):We(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):We(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ra.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ra.s(e,t)},S:function(e,t){return Ra.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return IT(r);case"XXXX":case"XX":return ao(r);case"XXXXX":case"XXX":default:return ao(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return IT(r);case"xxxx":case"xx":return ao(r);case"xxxxx":case"xxx":default:return ao(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+NT(r,":");case"OOOO":default:return"GMT"+ao(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+NT(r,":");case"zzzz":default:return"GMT"+ao(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return We(r,t.length)},T:function(e,t,n){const r=e.getTime();return We(r,t.length)}};function NT(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+We(a,2)}function IT(e,t){return e%60===0?(e>0?"-":"+")+We(Math.abs(e)/60,2):ao(e,t)}function ao(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=We(Math.trunc(r/60),2),a=We(r%60,2);return n+i+t+a}const RT=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},C3=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},sae=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return RT(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",RT(r,t)).replace("{{time}}",C3(i,t))},oae={p:C3,P:sae},lae=/^D+$/,cae=/^Y+$/,uae=["D","DD","YY","YYYY"];function dae(e){return lae.test(e)}function fae(e){return cae.test(e)}function hae(e,t,n){const r=pae(e,t,n);if(console.warn(r),uae.includes(e))throw new RangeError(r)}function pae(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const mae=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,gae=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,yae=/^'([^]*?)'?$/,vae=/''/g,xae=/[a-zA-Z]/;function kb(e,t,n){var f,d,h,p;const r=Rh(),i=r.locale??k3,a=r.firstWeekContainsDate??((d=(f=r.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??1,s=r.weekStartsOn??((p=(h=r.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??0,o=Je(e);
656if(!pie(o))throw new RangeError("Invalid time value");let c=t.match(gae).map(g=>{const m=g[0];if(m==="p"||m==="P"){const y=oae[m];return y(g,i.formatLong)}return g}).join("").match(mae).map(g=>{if(g==="''")return{isToken:!1,value:"'"};const m=g[0];if(m==="'")return{isToken:!1,value:bae(g)};if(OT[m])return{isToken:!0,value:g};if(m.match(xae))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:g}});i.localize.preprocessor&&(c=i.localize.preprocessor(o,c));const u={firstWeekContainsDate:a,weekStartsOn:s,locale:i};return c.map(g=>{if(!g.isToken)return g.value;const m=g.value;(fae(m)||dae(m))&&hae(m,t,String(e));const y=OT[m[0]];return y(o,m,i.localize,u)}).join("")}function bae(e){const t=e.match(yae);return t?t[1].replace(vae,"'"):e}function wae(e,t,n){const r=Rh(),i=(n==null?void 0:n.locale)??r.locale??k3,a=2520,s=ym(e,t);if(isNaN(s))throw new RangeError("Invalid time value");const o=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:s});let c,u;s>0?(c=Je(t),u=Je(e)):(c=Je(e),u=Je(t));const f=Sie(u,c),d=(pg(u)-pg(c))/1e3,h=Math.round((f-d)/60);let p;if(h<2)return n!=null&&n.includeSeconds?f<5?i.formatDistance("lessThanXSeconds",5,o):f<10?i.formatDistance("lessThanXSeconds",10,o):f<20?i.formatDistance("lessThanXSeconds",20,o):f<40?i.formatDistance("halfAMinute",0,o):f<60?i.formatDistance("lessThanXMinutes",1,o):i.formatDistance("xMinutes",1,o):h===0?i.formatDistance("lessThanXMinutes",1,o):i.formatDistance("xMinutes",h,o);if(h<45)return i.formatDistance("xMinutes",h,o);if(h<90)return i.formatDistance("aboutXHours",1,o);if(h<PT){const g=Math.round(h/60);return i.formatDistance("aboutXHours",g,o)}else{if(h<a)return i.formatDistance("xDays",1,o);if(h<Op){const g=Math.round(h/PT);return i.formatDistance("xDays",g,o)}else if(h<Op*2)return p=Math.round(h/Op),i.formatDistance("aboutXMonths",p,o)}if(p=wie(u,c),p<12){const g=Math.round(h/Op);return i.formatDistance("xMonths",g,o)}else{const g=p%12,m=Math.trunc(p/12);return g<3?i.formatDistance("aboutXYears",m,o):g<9?i.formatDistance("overXYears",m,o):i.formatDistance("almostXYears",m+1,o)}}function H_(e,t){return wae(e,fie(e),t)}function Sae(){const[e,t]=w.useState([]),[n,r]=w.useState(!1),i=e.filter(o=>!o.read_at).length;async function a(){const{data:o}=await de("notifications").select("*").order("created_at",{ascending:!1}).limit(20);o&&t(o)}async function s(){const o=e.filter(c=>!c.read_at).map(c=>c.id);o.length!==0&&(await Promise.all(o.map(c=>de("notifications").update({read_at:new Date().toISOString()}).eq("id",c))),a())}return w.useEffect(()=>{a();const o=mt.channel("notifications-realtime").on("postgres_changes",{event:"INSERT",schema:"public",table:"notifications"},()=>{a()}).subscribe();return()=>{mt.removeChannel(o)}},[]),l.jsxs(sie,{open:n,onOpenChange:r,children:[l.jsx(oie,{asChild:!0,children:l.jsxs(ie,{variant:"ghost",size:"sm",className:"relative",children:[l.jsx(gu,{className:"w-4 h-4"}),i>0&&l.jsx("span",{className:"absolute -top-0.5 -right-0.5 bg-destructive text-destructive-foreground text-[10px] font-bold rounded-full w-4 h-4 flex items-center justify-center",children:i>9?"9+":i})]})}),l.jsxs(j3,{className:"w-80 p-0",align:"end",children:[l.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border",children:[l.jsx("span",{className:"text-sm font-semibold",children:"Notifications"}),i>0&&l.jsx("button",{onClick:s,className:"text-xs text-primary hover:underline",children:"Mark all read"})]}),l.jsx("div",{className:"max-h-80 overflow-y-auto",children:e.length===0?l.jsx("p",{className:"text-sm text-muted-foreground p-4 text-center",children:"No notifications yet"}):e.map(o=>l.jsx("div",{className:ve("px-4 py-3 border-b border-border last:border-0 hover:bg-muted/50 transition-colors",!o.read_at&&"bg-primary/5"),children:l.jsxs("div",{className:"flex items-start gap-2",children:[!o.read_at&&l.jsx("span",{className:"mt-1.5 w-2 h-2 rounded-full bg-primary shrink-0"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"text-sm font-medium truncate",children:o.title}),o.body&&l.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 line-clamp-2",children:o.body}),l.jsx("p",{className:"text-[10px] text-muted-foreground mt-1",children:H_(new Date(o.created_at),{addSuffix:!0})})]})]})},o.id))})]})]})}const jae=[{href:"/compliance-plane",label:"Dashboard",icon:j6},{href:"/compliance-plane/frameworks",label:"Frameworks",icon:Pt},{href:"/compliance-plane/controls",label:"Controls",icon:Bn},{href:"/compliance-plane/evidence",label:"Evidence",icon:Ah},{href:"/compliance-plane/policies",label:"Policies",icon:yu},{href:"/compliance-plane/risks",label:"Risks",icon:Vm},{href:"/compliance-plane/findings",label:"Findings",icon:J0},{href:"/compliance-plane/capas",label:"CAPAs",icon:zm},{href:"/compliance-plane/audits",label:"Audits",icon:zm},{href:"/compliance-plane/vendors",label:"Vendors",icon:N$},{href:"/compliance-plane/approvals",label:"Approvals",icon:P6},{href:"/compliance-plane/guardrails",label:"Guardrails",icon:B$},{href:"/compliance-plane/notifications",label:"Notifications",icon:gu},{href:"/compliance-plane/api-keys",label:"API Keys",icon:$$},{href:"/compliance-plane/api-docs",label:"API Docs",icon:d6},{href:"/compliance-plane/webhooks",label:"Webhooks",icon:U$}];function gn({children:e}){const{user:t,signOut:n}=ev(),r=Is(),[i,a]=w.useState(!1);return l.jsxs("div",{className:"min-h-screen bg-background flex",children:[l.jsxs("aside",{className:ve("fixed inset-y-0 left-0 z-40 w-60 bg-card border-r border-border flex flex-col transition-transform lg:translate-x-0 lg:static",i?"translate-x-0":"-translate-x-full"),children:[l.jsx("div",{className:"p-4 border-b border-border",children:l.jsxs(ge,{to:"/compliance-plane",className:"flex items-center gap-2",children:[l.jsx(Pt,{className:"w-5 h-5 text-primary"}),l.jsx("span",{className:"font-bold text-sm tracking-wide",children:"COMPLIANCE PLANE"})]})}),l.jsx("nav",{className:"flex-1 p-2 space-y-0.5 overflow-y-auto",children:jae.map(s=>{const o=r.pathname===s.href;return l.jsxs(ge,{to:s.href,onClick:()=>a(!1),className:ve("flex items-center gap-3 px-3 py-2 rounded-md text-sm transition-colors",o?"bg-primary/10 text-primary font-medium":"text-muted-foreground hover:bg-muted hover:text-foreground"),children:[l.jsx(s.icon,{className:"w-4 h-4 shrink-0"}),s.label]},s.href)})}),l.jsxs("div",{className:"p-3 border-t border-border space-y-2",children:[l.jsx("p",{className:"text-xs text-muted-foreground truncate px-3",children:t==null?void 0:t.email}),l.jsxs(ie,{variant:"ghost",size:"sm",className:"w-full justify-start gap-2 text-muted-foreground",onClick:n,children:[l.jsx(_6,{className:"w-4 h-4"}),"Sign out"]})]})]}),i&&l.jsx("div",{className:"fixed inset-0 bg-background/80 backdrop-blur-sm z-30 lg:hidden",onClick:()=>a(!1)}),l.jsxs("div",{className:"flex-1 flex flex-col min-h-screen",children:[l.jsxs("header",{className:"h-12 border-b border-border flex items-center justify-between px-4",children:[l.jsxs("div",{className:"flex items-center lg:hidden",children:[l.jsx(ie,{variant:"ghost",size:"sm",onClick:()=>a(!0),children:l.jsx(L$,{className:"w-5 h-5"})}),l.jsx("span",{className:"ml-3 font-semibold text-sm",children:"Compliance Plane"})]}),l.jsx("div",{className:"ml-auto",children:l.jsx(Sae,{})})]}),l.jsx("main",{className:"flex-1 p-4 lg:p-6 overflow-auto",children:e})]})]})}var _ae=Array.isArray,Un=_ae,Aae=typeof Hh=="object"&&Hh&&Hh.Object===Object&&Hh,P3=Aae,kae=P3,Eae=typeof self=="object"&&self&&self.Object===Object&&self,Cae=kae||Eae||Function("return this")(),Ui=Cae,Pae=Ui,Tae=Pae.Symbol,Mh=Tae,MT=Mh,T3=Object.prototype,Oae=T3.hasOwnProperty,Nae=T3.toString,id=MT?MT.toStringTag:void 0;function Iae(e){var t=Oae.call(e,id),n=e[id];try{e[id]=void 0;var r=!0}catch{}var i=Nae.call(e);return r&&(t?e[id]=n:delete e[id]),i}var Rae=Iae,Mae=Object.prototype,$ae=Mae.toString;function Dae(e){return $ae.call(e)}var Lae=Dae,$T=Mh,Fae=Rae,Bae=Lae,Uae="[object Null]",qae="[object Undef
656ined]",DT=$T?$T.toStringTag:void 0;function zae(e){return e==null?e===void 0?qae:Uae:DT&&DT in Object(e)?Fae(e):Bae(e)}var Aa=zae;function Vae(e){return e!=null&&typeof e=="object"}var ka=Vae,Wae=Aa,Hae=ka,Gae="[object Symbol]";function Kae(e){return typeof e=="symbol"||Hae(e)&&Wae(e)==Gae}var Tu=Kae,Yae=Un,Xae=Tu,Zae=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qae=/^\w*$/;function Jae(e,t){if(Yae(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Xae(e)?!0:Qae.test(e)||!Zae.test(e)||t!=null&&e in Object(t)}var G_=Jae;function ese(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ls=ese;const Ou=qe(Ls);var tse=Aa,nse=Ls,rse="[object AsyncFunction]",ise="[object Function]",ase="[object GeneratorFunction]",sse="[object Proxy]";function ose(e){if(!nse(e))return!1;var t=tse(e);return t==ise||t==ase||t==rse||t==sse}var K_=ose;const ke=qe(K_);var lse=Ui,cse=lse["__core-js_shared__"],use=cse,Eb=use,LT=function(){var e=/[^.]+$/.exec(Eb&&Eb.keys&&Eb.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function dse(e){return!!LT&&LT in e}var fse=dse,hse=Function.prototype,pse=hse.toString;function mse(e){if(e!=null){try{return pse.call(e)}catch{}try{return e+""}catch{}}return""}var O3=mse,gse=K_,yse=fse,vse=Ls,xse=O3,bse=/[\\^$.*+?()[\]{}|]/g,wse=/^\[object .+?Constructor\]$/,Sse=Function.prototype,jse=Object.prototype,_se=Sse.toString,Ase=jse.hasOwnProperty,kse=RegExp("^"+_se.call(Ase).replace(bse,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ese(e){if(!vse(e)||yse(e))return!1;var t=gse(e)?kse:wse;return t.test(xse(e))}var Cse=Ese;function Pse(e,t){return e==null?void 0:e[t]}var Tse=Pse,Ose=Cse,Nse=Tse;function Ise(e,t){var n=Nse(e,t);return Ose(n)?n:void 0}var sl=Ise,Rse=sl,Mse=Rse(Object,"create"),av=Mse,FT=av;function $se(){this.__data__=FT?FT(null):{},this.size=0}var Dse=$se;function Lse(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Fse=Lse,Bse=av,Use="__lodash_hash_undefined__",qse=Object.prototype,zse=qse.hasOwnProperty;function Vse(e){var t=this.__data__;if(Bse){var n=t[e];return n===Use?void 0:n}return zse.call(t,e)?t[e]:void 0}var Wse=Vse,Hse=av,Gse=Object.prototype,Kse=Gse.hasOwnProperty;function Yse(e){var t=this.__data__;return Hse?t[e]!==void 0:Kse.call(t,e)}var Xse=Yse,Zse=av,Qse="__lodash_hash_undefined__";function Jse(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Zse&&t===void 0?Qse:t,this}var eoe=Jse,toe=Dse,noe=Fse,roe=Wse,ioe=Xse,aoe=eoe;function Nu(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Nu.prototype.clear=toe;Nu.prototype.delete=noe;Nu.prototype.get=roe;Nu.prototype.has=ioe;Nu.prototype.set=aoe;var soe=Nu;function ooe(){this.__data__=[],this.size=0}var loe=ooe;function coe(e,t){return e===t||e!==e&&t!==t}var Y_=coe,uoe=Y_;function doe(e,t){for(var n=e.length;n--;)if(uoe(e[n][0],t))return n;return-1}var sv=doe,foe=sv,hoe=Array.prototype,poe=hoe.splice;function moe(e){var t=this.__data__,n=foe(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():poe.call(t,n,1),--this.size,!0}var goe=moe,yoe=sv;function voe(e){var t=this.__data__,n=yoe(t,e);return n<0?void 0:t[n][1]}var xoe=voe,boe=sv;function woe(e){return boe(this.__data__,e)>-1}var Soe=woe,joe=sv;function _oe(e,t){var n=this.__data__,r=joe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Aoe=_oe,koe=loe,Eoe=goe,Coe=xoe,Poe=Soe,Toe=Aoe;function Iu(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Iu.prototype.clear=koe;Iu.prototype.delete=Eoe;Iu.prototype.get=Coe;Iu.prototype.has=Poe;Iu.prototype.set=Toe;var ov=Iu,Ooe=sl,Noe=Ui,Ioe=Ooe(Noe,"Map"),X_=Ioe,BT=soe,Roe=ov,Moe=X_;function $oe(){this.size=0,this.__data__={hash:new BT,map:new(Moe||Roe),string:new BT}}var Doe=$oe;function Loe(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Foe=Loe,Boe=Foe;function Uoe(e,t){var n=e.__data__;return Boe(t)?n[typeof t=="string"?"string":"hash"]:n.map}var lv=Uoe,qoe=lv;function zoe(e){var t=qoe(this,e).delete(e);return this.size-=t?1:0,t}var Voe=zoe,Woe=lv;function Hoe(e){return Woe(this,e).get(e)}var Goe=Hoe,Koe=lv;function Yoe(e){return Koe(this,e).has(e)}var Xoe=Yoe,Zoe=lv;function Qoe(e,t){var n=Zoe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var Joe=Qoe,ele=Doe,tle=Voe,nle=Goe,rle=Xoe,ile=Joe;function Ru(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ru.prototype.clear=ele;Ru.prototype.delete=tle;Ru.prototype.get=nle;Ru.prototype.has=rle;Ru.prototype.set=ile;var Z_=Ru,N3=Z_,ale="Expected a function";function Q_(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ale);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var s=e.apply(this,r);return n.cache=a.set(i,s)||a,s};return n.cache=new(Q_.Cache||N3),n}Q_.Cache=N3;var I3=Q_;const sle=qe(I3);var ole=I3,lle=500;function cle(e){var t=ole(e,function(r){return n.size===lle&&n.clear(),r}),n=t.cache;return t}var ule=cle,dle=ule,fle=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,hle=/\\(\\)?/g,ple=dle(function(e){var t=[];
656return e.charCodeAt(0)===46&&t.push(""),e.replace(fle,function(n,r,i,a){t.push(i?a.replace(hle,"$1"):r||n)}),t}),mle=ple;function gle(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var J_=gle,UT=Mh,yle=J_,vle=Un,xle=Tu,ble=1/0,qT=UT?UT.prototype:void 0,zT=qT?qT.toString:void 0;function R3(e){if(typeof e=="string")return e;if(vle(e))return yle(e,R3)+"";if(xle(e))return zT?zT.call(e):"";var t=e+"";return t=="0"&&1/e==-ble?"-0":t}var wle=R3,Sle=wle;function jle(e){return e==null?"":Sle(e)}var M3=jle,_le=Un,Ale=G_,kle=mle,Ele=M3;function Cle(e,t){return _le(e)?e:Ale(e,t)?[e]:kle(Ele(e))}var $3=Cle,Ple=Tu,Tle=1/0;function Ole(e){if(typeof e=="string"||Ple(e))return e;var t=e+"";return t=="0"&&1/e==-Tle?"-0":t}var cv=Ole,Nle=$3,Ile=cv;function Rle(e,t){t=Nle(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Ile(t[n++])];return n&&n==r?e:void 0}var eA=Rle,Mle=eA;function $le(e,t,n){var r=e==null?void 0:Mle(e,t);return r===void 0?n:r}var D3=$le;const rr=qe(D3);function Dle(e){return e==null}var Lle=Dle;const Ie=qe(Lle);var Fle=Aa,Ble=Un,Ule=ka,qle="[object String]";function zle(e){return typeof e=="string"||!Ble(e)&&Ule(e)&&Fle(e)==qle}var Vle=zle;const Ko=qe(Vle);var L3={exports:{}},Ke={};/**
657 * @license React
658 * react-is.production.min.js
659 *
660 * Copyright (c) Facebook, Inc. and its affiliates.
661 *
662 * This source code is licensed under the MIT license found in the
663 * LICENSE file in the root directory of this source tree.
664 */var tA=Symbol.for("react.element"),nA=Symbol.for("react.portal"),uv=Symbol.for("react.fragment"),dv=Symbol.for("react.strict_mode"),fv=Symbol.for("react.profiler"),hv=Symbol.for("react.provider"),pv=Symbol.for("react.context"),Wle=Symbol.for("react.server_context"),mv=Symbol.for("react.forward_ref"),gv=Symbol.for("react.suspense"),yv=Symbol.for("react.suspense_list"),vv=Symbol.for("react.memo"),xv=Symbol.for("react.lazy"),Hle=Symbol.for("react.offscreen"),F3;F3=Symbol.for("react.module.reference");function Mr(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case tA:switch(e=e.type,e){case uv:case fv:case dv:case gv:case yv:return e;default:switch(e=e&&e.$$typeof,e){case Wle:case pv:case mv:case xv:case vv:case hv:return e;default:return t}}case nA:return t}}}Ke.ContextConsumer=pv;Ke.ContextProvider=hv;Ke.Element=tA;Ke.ForwardRef=mv;Ke.Fragment=uv;Ke.Lazy=xv;Ke.Memo=vv;Ke.Portal=nA;Ke.Profiler=fv;Ke.StrictMode=dv;Ke.Suspense=gv;Ke.SuspenseList=yv;Ke.isAsyncMode=function(){return!1};Ke.isConcurrentMode=function(){return!1};Ke.isContextConsumer=function(e){return Mr(e)===pv};Ke.isContextProvider=function(e){return Mr(e)===hv};Ke.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===tA};Ke.isForwardRef=function(e){return Mr(e)===mv};Ke.isFragment=function(e){return Mr(e)===uv};Ke.isLazy=function(e){return Mr(e)===xv};Ke.isMemo=function(e){return Mr(e)===vv};Ke.isPortal=function(e){return Mr(e)===nA};Ke.isProfiler=function(e){return Mr(e)===fv};Ke.isStrictMode=function(e){return Mr(e)===dv};Ke.isSuspense=function(e){return Mr(e)===gv};Ke.isSuspenseList=function(e){return Mr(e)===yv};Ke.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===uv||e===fv||e===dv||e===gv||e===yv||e===Hle||typeof e=="object"&&e!==null&&(e.$$typeof===xv||e.$$typeof===vv||e.$$typeof===hv||e.$$typeof===pv||e.$$typeof===mv||e.$$typeof===F3||e.getModuleId!==void 0)};Ke.typeOf=Mr;
vendor: 6,044 bytes, line 664
664L3.exports=Ke;var Gle=L3.exports,Kle=Aa,Yle=ka,Xle="[object Number]";function Zle(e){return typeof e=="number"||Yle(e)&&Kle(e)==Xle}var B3=Zle;const Qle=qe(B3);var Jle=B3;function ece(e){return Jle(e)&&e!=+e}var tce=ece;const $h=qe(tce);var Sn=function(t){return t===0?0:t>0?1:-1},bo=function(t){return Ko(t)&&t.indexOf("%")===t.length-1},X=function(t){return Qle(t)&&!$h(t)},nce=function(t){return Ie(t)},zt=function(t){return X(t)||Ko(t)},rce=0,Dh=function(t){var n=++rce;return"".concat(t||"").concat(n)},jn=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(!X(t)&&!Ko(t))return r;var a;if(bo(t)){var s=t.indexOf("%");a=n*parseFloat(t.slice(0,s))/100}else a=+t;return $h(a)&&(a=r),i&&a>n&&(a=n),a},Ol=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},ice=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i<n;i++)if(!r[t[i]])r[t[i]]=!0;else return!0;return!1},za=function(t,n){return X(t)&&X(n)?function(r){return t+r*(n-t)}:function(){return n}};function t1(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):rr(r,t))===n})}var ace=function(t,n){return X(t)&&X(n)?t-n:Ko(t)&&Ko(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function hc(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function n1(e){"@babel/helpers - typeof";return n1=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},n1(e)}var sce=["viewBox","children"],oce=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],VT=["points","pathLength"],Cb={svg:sce,polygon:VT,polyline:VT},rA=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onF
664ocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],mg=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(w.isValidElement(t)&&(r=t.props),!Ou(r))return null;var i={};return Object.keys(r).forEach(function(a){rA.includes(a)&&(i[a]=n||function(s){return r[a](r,s)})}),i},lce=function(t,n,r){return function(i){return t(n,r,i),null}},Yo=function(t,n,r){if(!Ou(t)||n1(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(a){var s=t[a];rA.includes(a)&&typeof s=="function"&&(i||(i={}),i[a]=lce(s,n,r))}),i},cce=["children"],uce=["children"];function WT(e,t){if(e==null)return{};var n=dce(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function dce(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 HT={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"},na=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},GT=null,Pb=null,iA=function e(t){if(t===GT&&Array.isArray(Pb))return Pb;var n=[];return w.Children.forEach(t,function(r){Ie(r)||(Gle.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),Pb=n,GT=t,n};function kr(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return na(i)}):r=[na(t)],iA(e).forEach(function(i){var a=rr(i,"type.displayName")||rr(i,"type.n
664ame");r.indexOf(a)!==-1&&n.push(i)}),n}function Kn(e,t){var n=kr(e,t);return n&&n[0]}var KT=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!X(r)||r<=0||!X(i)||i<=0)},fce=["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"],hce=function(t){return t&&t.type&&Ko(t.type)&&fce.indexOf(t.type)>=0},pce=function(t,n,r,i){var a,s=(a=Cb==null?void 0:Cb[i])!==null&&a!==void 0?a:[];return n.startsWith("data-")||!ke(t)&&(i&&s.includes(n)||oce.includes(n))||r&&rA.includes(n)},ye=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(w.isValidElement(t)&&(i=t.props),!Ou(i))return null;var a={};
664return Object.keys(i).forEach(function(s){var o;pce((o=i)===null||o===void 0?void 0:o[s],s,n,r)&&(a[s]=i[s])}),a},r1=function e(t,n){if(t===n)return!0;var r=w.Children.count(t);if(r!==w.Children.count(n))return!1;if(r===0)return!0;if(r===1)return YT(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var a=t[i],s=n[i];if(Array.isArray(a)||Array.isArray(s)){if(!e(a,s))return!1}else if(!YT(a,s))return!1}return!0},YT=function(t,n){if(Ie(t)&&Ie(n))return!0;if(!Ie(t)&&!Ie(n)){var r=t.props||{},i=r.children,a=WT(r,cce),s=n.props||{},o=s.children,c=WT(s,uce);return i&&o?hc(a,c)&&r1(i,o):!i&&!o?hc(a,c):!1}return!1},XT=function(t,n){var r=[],i={};return iA(t).forEach(function(a,s){if(hce(a))r.push(a);else if(a){var o=na(a.type),c=n[o]||{},u=c.handler,f=c.once;if(u&&(!f||!i[o])){var d=u(a,o,s);r.push(d),i[o]=!0}}}),r},mce=function(t){var n=t&&t.type;return n&&HT[n]?HT[n]:null},gce=function(t,n){return iA(n).indexOf(t)},yce=["children","width","height","viewBox","className","style","title","desc"];function i1(){return i1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i1.apply(this,arguments)}function vce(e,t){if(e==null)return{};var n=xce(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function xce(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 a1(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,a=e.className,s=e.style,o=e.title,c=e.desc,u=vce(e,yce),f=i||{width:n,height:r,x:0,y:0},d=Ce("recharts-surface",a);return C.createElement("svg",i1({},ye(u,!0,"svg"),{className:d,width:n,height:r,style:s,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),C.createElement("title",null,o),C.createElement("desc",null,c),t)}var bce=["children","className"];function s1(){return s1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s1.apply(this,arguments)}function wce(e,t){if(e==null)return{};var n=Sce(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Sce(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 He=C.forwardRef(function(e,t){var n=e.children,r=e.className,i=wce(e,bce),a=Ce("recharts-layer",r);return C.createElement("g",s1({className:a},ye(i,!0),{ref:t}),n)}),ra=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a]};function jce(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?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<i;)a[r]=e[r+t];return a}var _ce=jce,Ace=_ce;function kce(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:Ace(e,t,n)}var Ece=kce,Cce="\\ud800-\\udfff",Pce="\\u0300-\\u036f",Tce="\\ufe20-\\ufe2f",Oce="\\u20d0-\\u20ff",Nce=Pce+Tce+Oce,Ice="\\ufe0e\\ufe0f",Rce="\\u200d",Mce=RegExp("["+Rce+Cce+Nce+Ice+"]");function $ce(e){return Mce.test(e)}var U3=$ce;function Dce(e){return e.split("")}var Lce=Dce,q3="\\ud800-\\udfff",Fce="\\u0300-\\u036f",Bce="\\ufe20-\\ufe2f",Uce="\\u20d0-\\u20ff",qce=Fce+Bce+Uce,zce="\\ufe0e\\ufe0f",Vce="["+q3+"]",o1="["+qce+"]",l1="\\ud83c[\\udffb-\\udfff]",Wce="(?:"+o1+"|"+l1+")",z3="[^"+q3+"]",V3="(?:\\ud83c[\\udde6-\\uddff]){2}",W3="[\\ud800-\\udbff][\\udc00-\\udfff]",Hce="\\u200d",H3=Wce+"?",G3="["+zce+"]?",Gce="(?:"+Hce+"(?:"+[z3,V3,W3].join("|")+")"+G3+H3+")*",Kce=G3+H3+Gce,Yce="(?:"+[z3+o1+"?",o1,V3,W3,Vce].join("|")+")",Xce=RegExp(l1+"(?="+l1+")|"+Yce+Kce,"g");function Zce(e){return e.match(Xce)||[]}var Qce=Zce,Jce=Lce,eue=U3,tue=Qce;function nue(e){return eue(e)?tue(e):Jce(e)}var rue=nue,iue=Ece,aue=U3,sue=rue,oue=M3;function lue(e){return function(t){t=oue(t);var n=aue(t)?sue(t):void 0,r=n?n[0]:t.charAt(0),i=n?iue(n,1).join(""):t.slice(1);return r[e]()+i}}var cue=lue,uue=cue,due=uue("toUpperCase"),fue=due;const bv=qe(fue);function rt(e){return function(){return e}}const K3=Math.cos,gg=Math.sin,pi=Math.sqrt,yg=Math.PI,wv=2*yg,c1=Math.PI,u1=2*c1,so=1e-6,hue=u1-so;function Y3(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function pue(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Y3;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class mue{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Y3:pue(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,a,s){this._append`C${+t},${+n},${+r},${+i},${this._x1=+a},${this._y1=+s}`}arcTo(t,n,r,i,a){if(t=+t,n=+n,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,o=this._y1,c=r-t,u=i-n,f=s-t,d=o-n,h=f*f+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(h>so)if(!(Math.abs(d*c-u*f)>so)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-s,g=i-o,m=c*c+u*u,y=p*p+g*g,v=Math.sqrt(m),b=Math.sqrt(h),x=a*Math.tan((c1-Math.acos((m+h-y)/(2*v*b)))/2),j=x/b,S=x/v;Math.abs(j-1)>so&&this._append`L${t+j*f},${n+j*d}`,this._append`A${a},${a},0,0,${+(d*p>f*g)},${this._x1=t+S*c},${this._y1=n+S*u}`}}
664arc(t,n,r,i,a,s){if(t=+t,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(i),c=r*Math.sin(i),u=t+o,f=n+c,d=1^s,h=s?i-a:a-i;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>so||Math.abs(this._y1-f)>so)&&this._append`L${u},${f}`,r&&(h<0&&(h=h%u1+u1),h>hue?this._append`A${r},${r},0,1,${d},${t-o},${n-c}A${r},${r},0,1,${d},${this._x1=u},${this._y1=f}`:h>so&&this._append`A${r},${r},0,${+(h>=c1)},${d},${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 aA(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 mue(t)}function sA(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function X3(e){this._context=e}X3.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 Sv(e){return new X3(e)}function Z3(e){return e[0]}function Q3(e){return e[1]}function J3(e,t){var n=rt(!0),r=null,i=Sv,a=null,s=aA(o);e=typeof e=="function"?e:e===void 0?Z3:rt(e),t=typeof t=="function"?t:t===void 0?Q3:rt(t);function o(c){var u,f=(c=sA(c)).length,d,h=!1,p;for(r==null&&(a=i(p=s())),u=0;u<=f;++u)!(u<f&&n(d=c[u],u,c))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+e(d,u,c),+t(d,u,c));if(p)return a=null,p+""||null}return o.x=function(c){return arguments.length?(e=typeof c=="function"?c:rt(+c),o):e},o.y=function(c){return arguments.length?(t=typeof c=="function"?c:rt(+c),o):t},o.defined=function(c){return arguments.length?(n=typeof c=="function"?c:rt(!!c),o):n},o.curve=function(c){return arguments.length?(i=c,r!=null&&(a=i(r)),o):i},o.context=function(c){return arguments.length?(c==null?r=a=null:a=i(r=c),o):r},o}function Np(e,t,n){var r=null,i=rt(!0),a=null,s=Sv,o=null,c=aA(u);e=typeof e=="function"?e:e===void 0?Z3:rt(+e),t=typeof t=="function"?t:rt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?Q3:rt(+n);function u(d){var h,p,g,m=(d=sA(d)).length,y,v=!1,b,x=new Array(m),j=new Array(m);for(a==null&&(o=s(b=c())),h=0;h<=m;++h){if(!(h<m&&i(y=d[h],h,d))===v)if(v=!v)p=h,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),g=h-1;g>=p;--g)o.point(x[g],j[g]);o.lineEnd(),o.areaEnd()}v&&(x[h]=+e(y,h,d),j[h]=+t(y,h,d),o.point(r?+r(y,h,d):x[h],n?+n(y,h,d):j[h]))}if(b)return o=null,b+""||null}function f(){return J3().defined(i).curve(s).context(a)}return u.x=function(d){return arguments.length?(e=typeof d=="function"?d:rt(+d),r=null,u):e},u.x0=function(d){return arguments.length?(e=typeof d=="function"?d:rt(+d),u):e},u.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:rt(+d),u):r},u.y=function(d){return arguments.length?(t=typeof d=="function"?d:rt(+d),n=null,u):t},u.y0=function(d){return arguments.length?(t=typeof d=="function"?d:rt(+d),u):t},u.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:rt(+d),u):n},u.lineX0=u.lineY0=function(){return f().x(e).y(t)},u.lineY1=function(){return f().x(e).y(n)},u.lineX1=function(){return f().x(r).y(t)},u.defined=function(d){return arguments.length?(i=typeof d=="function"?d:rt(!!d),u):i},u.curve=function(d){return arguments.length?(s=d,a!=null&&(o=s(a)),u):s},u.context=function(d){return arguments.length?(d==null?a=o=null:o=s(a=d),u):a},u}class eF{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 gue(e){return new eF(e,!0)}function yue(e){return new eF(e,!1)}const oA={draw(e,t){const n=pi(t/yg);e.moveTo(n,0),e.arc(0,0,n,0,wv)}},vue={draw(e,t){const n=pi(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()}},tF=pi(1/3),xue=tF*2,bue={draw(e,t){const n=pi(t/xue),r=n*tF;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},wue={draw(e,t){const n=pi(t),r=-n/2;e.rect(r,r,n,n)}}
vendor: 7,514 bytes, line 664
664,Sue=.8908130915292852,nF=gg(yg/10)/gg(7*yg/10),jue=gg(wv/10)*nF,_ue=-K3(wv/10)*nF,Aue={draw(e,t){const n=pi(t*Sue),r=jue*n,i=_ue*n;e.moveTo(0,-n),e.lineTo(r,i);for(let a=1;a<5;++a){const s=wv*a/5,o=K3(s),c=gg(s);e.lineTo(c*n,-o*n),e.lineTo(o*r-c*i,c*r+o*i)}e.closePath()}},Tb=pi(3),kue={draw(e,t){const n=-pi(t/(Tb*3));e.moveTo(0,n*2),e.lineTo(-Tb*n,-n),e.lineTo(Tb*n,-n),e.closePath()}},fr=-.5,hr=pi(3)/2,d1=1/pi(12),Eue=(d1/2+1)*3,Cue={draw(e,t){const n=pi(t/Eue),r=n/2,i=n*d1,a=r,s=n*d1+n,o=-a,c=s;e.moveTo(r,i),e.lineTo(a,s),e.lineTo(o,c),e.lineTo(fr*r-hr*i,hr*r+fr*i),e.lineTo(fr*a-hr*s,hr*a+fr*s),e.lineTo(fr*o-hr*c,hr*o+fr*c),e.lineTo(fr*r+hr*i,fr*i-hr*r),e.lineTo(fr*a+hr*s,fr*s-hr*a),e.lineTo(fr*o+hr*c,fr*c-hr*o),e.closePath()}};function Pue(e,t){let n=null,r=aA(i);e=typeof e=="function"?e:rt(e||oA),t=typeof t=="function"?t:rt(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:rt(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:rt(+a),i):t},i.context=function(a){return arguments.length?(n=a??null,i):n},i}function vg(){}function xg(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 rF(e){this._context=e}rF.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:xg(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:xg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Tue(e){return new rF(e)}function iF(e){this._context=e}iF.prototype={areaStart:vg,areaEnd:vg,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:xg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Oue(e){return new iF(e)}function aF(e){this._context=e}aF.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:xg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Nue(e){return new aF(e)}function sF(e){this._context=e}sF.prototype={areaStart:vg,areaEnd:vg,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 Iue(e){return new sF(e)}function ZT(e){return e<0?-1:1}function QT(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),o=(a*i+s*r)/(r+i);return(ZT(a)+ZT(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function JT(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Ob(e,t,n){var r=e._x0,i=e._y0,a=e._x1,s=e._y1,o=(a-r)/3;e._context.bezierCurveTo(r+o,i+o*t,a-o,s-o*n,a,s)}function bg(e){this._context=e}bg.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:Ob(this,this._t0,JT(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,Ob(this,JT(this,n=QT(this,e,t)),n);break;default:Ob(this,this._t0,n=QT(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function oF(e){this._context=new lF(e)}(oF.prototype=Object.create(bg.prototype)).point=function(e,t){bg.prototype.point.call(this,t,e)};function lF(e){this._context=e}lF.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 Rue(e){return new bg(e)}function Mue(e){return new oF(e)}function cF(e){this._context=e}cF.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=eO(e),i=eO(t),a=0,s=1;s<n;++a,++s)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[s],t[s]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function eO(e){var t,n=e.length-1,r,i=new Array(n),a=new Array(n),s=new Array(n);for(i[0]=0,a[0]=2,s[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,s[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,s[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,s[t]-=r*s[t-1];for(i[n-1]=s[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(s[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function $ue(e){return new cF(e)}function jv(e,t){this._context=e,this._t=t}jv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=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;
vendor: 12,000 bytes, lines 664-667
664default:{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 Due(e){return new jv(e,.5)}function Lue(e){return new jv(e,0)}function Fue(e){return new jv(e,1)}function qc(e,t){if((s=e.length)>1)for(var n=1,r,i,a=e[t[0]],s,o=a.length;n<s;++n)for(i=a,a=e[t[n]],r=0;r<o;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function f1(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Bue(e,t){return e[t]}function Uue(e){const t=[];return t.key=e,t}function que(){var e=rt([]),t=f1,n=qc,r=Bue;function i(a){var s=Array.from(e.apply(this,arguments),Uue),o,c=s.length,u=-1,f;for(const d of a)for(o=0,++u;o<c;++o)(s[o][u]=[0,+r(d,s[o].key,u,a)]).data=d;for(o=0,f=sA(t(s));o<c;++o)s[f[o]].index=o;return n(s,f),s}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:rt(Array.from(a)),i):e},i.value=function(a){return arguments.length?(r=typeof a=="function"?a:rt(+a),i):r},i.order=function(a){return arguments.length?(t=a==null?f1:typeof a=="function"?a:rt(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(n=a??qc,i):n},i}function zue(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,s;i<a;++i){for(s=n=0;n<r;++n)s+=e[n][i][1]||0;if(s)for(n=0;n<r;++n)e[n][i][1]/=s}qc(e,t)}}function Vue(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var s=0,o=0;s<i;++s)o+=e[s][n][1]||0;r[n][1]+=r[n][0]=-o/2}qc(e,t)}}function Wue(e,t){if(!(!((s=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,s;r<a;++r){for(var o=0,c=0,u=0;o<s;++o){for(var f=e[t[o]],d=f[r][1]||0,h=f[r-1][1]||0,p=(d-h)/2,g=0;g<o;++g){var m=e[t[g]],y=m[r][1]||0,v=m[r-1][1]||0;p+=y-v}c+=d,u+=p*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=u/c)}i[r-1][1]+=i[r-1][0]=n,qc(e,t)}}function If(e){"@babel/helpers - typeof";return If=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},If(e)}var Hue=["type","size","sizeType"];function h1(){return h1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h1.apply(this,arguments)}function tO(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 nO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tO(Object(n),!0).forEach(function(r){Gue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gue(e,t,n){return t=Kue(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kue(e){var t=Yue(e,"string");return If(t)=="symbol"?t:t+""}function Yue(e,t){if(If(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(If(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xue(e,t){if(e==null)return{};var n=Zue(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Zue(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 uF={symbolCircle:oA,symbolCross:vue,symbolDiamond:bue,symbolSquare:wue,symbolStar:Aue,symbolTriangle:kue,symbolWye:Cue},Que=Math.PI/180,Jue=function(t){var n="symbol".concat(bv(t));return uF[n]||oA},ede=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*Que;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}},tde=function(t,n){uF["symbol".concat(bv(t))]=n},lA=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,a=i===void 0?64:i,s=t.sizeType,o=s===void 0?"area":s,c=Xue(t,Hue),u=nO(nO({},c),{},{type:r,size:a,sizeType:o}),f=function(){var y=Jue(r),v=Pue().type(y).size(ede(a,o,r));return v()},d=u.className,h=u.cx,p=u.cy,g=ye(u,!0);return h===+h&&p===+p&&a===+a?C.createElement("path",h1({},g,{className:Ce("recharts-symbols",d),transform:"translate(".concat(h,", ").concat(p,")"),d:f()})):null};lA.registerSymbol=tde;function zc(e){"@babel/helpers - typeof";return zc=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},zc(e)}function p1(){return p1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p1.apply(this,arguments)}function rO(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 nde(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rO(Object(n),!0).forEach(function(r){Rf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ide(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fF(r.key),r)}}function ade(e,t,n){return t&&ide(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function sde(e,t,n){return t=wg(t),ode(e,dF()?Reflect.construct(t,n||[],wg(e).constructor):t.apply(e,n))}function ode(e,t){if(t&&(zc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lde(e)}function lde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(dF=function(){return!!e})()}function wg(e){return wg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},wg(e)}function cde(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m1(e,t)}function m1(e,t){return m1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},m1(e,t)}function Rf(e,t,n){return t=fF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fF(e){var t=ude(e,"string");return zc(t)=="symbol"?t:t+""}function ude(e,t){if(zc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(zc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pr=32,cA=function(e){function t(){return rde(this,t),sde(this,t,arguments)}return cde(t,e),ade(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,a=pr/2,s=pr/6,o=pr/3,c=r.inactive?i:r.color;if(r.type==="plainline")return C.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:a,x2:pr,y2:a,className:"recharts-legend-icon"});if(r.type==="line")return C.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(a,"h").concat(o,`
665            A`).concat(s,",").concat(s,",0,1,1,").concat(2*o,",").concat(a,`
666            H`).concat(pr,"M").concat(2*o,",").concat(a,`
667            A`).concat(s,",").concat(s,",0,1,1,").concat(o,",").concat(a),className:"recharts-legend-icon"});if(r.type==="rect")return C.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(pr/8,"h").concat(pr,"v").concat(pr*3/4,"h").concat(-pr,"z"),className:"recharts-legend-icon"});if(C.isValidElement(r.legendIcon)){var u=nde({},r);return delete u.legendIcon,C.cloneElement(r.legendIcon,u)}return C.createElement(lA,{fill:c,cx:a,cy:a,size:pr,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,a=i.payload,s=i.iconSize,o=i.layout,c=i.formatter,u=i.inactiveColor,f={x:0,y:0,width:pr,height:pr},d={display:o==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(p,g){var m=p.formatter||c,y=Ce(Rf(Rf({"recharts-legend-item":!0},"legend-item-".concat(g),!0),"inactive",p.inactive));if(p.type==="none")return null;var v=ke(p.value)?null:p.value;ra(!ke(p.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var b=p.inactive?u:p.color;return C.createElement("li",p1({className:y,style:d,key:"legend-item-".concat(g)},Yo(r.props,p,g)),C.createElement(a1,{width:s,height:s,viewBox:f,style:h},r.renderIcon(p)),C.createElement("span",{className:"recharts-legend-item-text",style:{color:b}},m?m(v,p,g):v))})}},{key:"render",value:function(){var r=this.props,i=r.payload,a=r.layout,s=r.align;if(!i||!i.length)return null;var o={padding:0,margin:0,textAlign:a==="horizontal"?s:"left"};return C.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])}(w.PureComponent);Rf(cA,"displayName","Legend");Rf(cA,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var dde=ov;function fde(){this.__data__=new dde,this.size=0}var hde=fde;function pde(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var mde=pde;function gde(e){return this.__data__.get(e)}var yde=gde;function vde(e){return this.__data__.has(e)}var xde=vde,bde=ov,wde=X_,Sde=Z_,jde=200;function _de(e,t){var n=this.__data__;if(n instanceof bde){var r=n.__data__;if(!wde||r.length<jde-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Sde(r)}return n.set(e,t),this.size=n.size,this}var Ade=_de,kde=ov,Ede=hde,Cde=mde,Pde=yde,Tde=xde,Ode=Ade;function Mu(e){var t=this.__data__=new kde(e);this.size=t.size}Mu.prototype.clear=Ede;Mu.prototype.delete=Cde;Mu.prototype.get=Pde;Mu.prototype.has=Tde;Mu.prototype.set=Ode;var hF=Mu,Nde="__lodash_hash_undefined__";function Ide(e){return this.__data__.set(e,Nde),this}var Rde=Ide;function Mde(e){return this.__data__.has(e)}var $de=Mde,Dde=Z_,Lde=Rde,Fde=$de;function Sg(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Dde;++t<n;)this.add(e[t])}Sg.prototype.add=Sg.prototype.push=Lde;Sg.prototype.has=Fde;var pF=Sg;function Bde(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var mF=Bde;function Ude(e,t){return e.has(t)}var gF=Ude,qde=pF,zde=mF,Vde=gF,Wde=1,Hde=2;function Gde(e,t,n,r,i,a){var s=n&Wde,o=e.length,c=t.length;if(o!=c&&!(s&&c>o))return!1;var u=a.get(e),f=a.get(t);if(u&&f)return u==t&&f==e;var d=-1,h=!0,p=n&Hde?new qde:void 0;for(a.set(e,t),a.set(t,e);++d<o;){var g=e[d],m=t[d];if(r)var y=s?r(m,g,d,t,e,a):r(g,m,d,e,t,a);if(y!==void 0){if(y)continue;h=!1;break}
vendor: 7,062 bytes, line 667
667if(p){if(!zde(t,function(v,b){if(!Vde(p,b)&&(g===v||i(g,v,n,r,a)))return p.push(b)})){h=!1;break}}else if(!(g===m||i(g,m,n,r,a))){h=!1;break}}return a.delete(e),a.delete(t),h}var yF=Gde,Kde=Ui,Yde=Kde.Uint8Array,Xde=Yde;function Zde(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}var Qde=Zde;function Jde(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var uA=Jde,iO=Mh,aO=Xde,efe=Y_,tfe=yF,nfe=Qde,rfe=uA,ife=1,afe=2,sfe="[object Boolean]",ofe="[object Date]",lfe="[object Error]",cfe="[object Map]",ufe="[object Number]",dfe="[object RegExp]",ffe="[object Set]",hfe="[object String]",pfe="[object Symbol]",mfe="[object ArrayBuffer]",gfe="[object DataView]",sO=iO?iO.prototype:void 0,Nb=sO?sO.valueOf:void 0;function yfe(e,t,n,r,i,a,s){switch(n){case gfe:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case mfe:return!(e.byteLength!=t.byteLength||!a(new aO(e),new aO(t)));case sfe:case ofe:case ufe:return efe(+e,+t);case lfe:return e.name==t.name&&e.message==t.message;case dfe:case hfe:return e==t+"";case cfe:var o=nfe;case ffe:var c=r&ife;if(o||(o=rfe),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;r|=afe,s.set(e,t);var f=tfe(o(e),o(t),r,i,a,s);return s.delete(e),f;case pfe:if(Nb)return Nb.call(e)==Nb.call(t)}return!1}var vfe=yfe;function xfe(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var vF=xfe,bfe=vF,wfe=Un;function Sfe(e,t,n){var r=t(e);return wfe(e)?r:bfe(r,n(e))}var jfe=Sfe;function _fe(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var s=e[n];t(s,n,e)&&(a[i++]=s)}return a}var Afe=_fe;function kfe(){return[]}var Efe=kfe,Cfe=Afe,Pfe=Efe,Tfe=Object.prototype,Ofe=Tfe.propertyIsEnumerable,oO=Object.getOwnPropertySymbols,Nfe=oO?function(e){return e==null?[]:(e=Object(e),Cfe(oO(e),function(t){return Ofe.call(e,t)}))}:Pfe,Ife=Nfe;function Rfe(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Mfe=Rfe,$fe=Aa,Dfe=ka,Lfe="[object Arguments]";function Ffe(e){return Dfe(e)&&$fe(e)==Lfe}var Bfe=Ffe,lO=Bfe,Ufe=ka,xF=Object.prototype,qfe=xF.hasOwnProperty,zfe=xF.propertyIsEnumerable,Vfe=lO(function(){return arguments}())?lO:function(e){return Ufe(e)&&qfe.call(e,"callee")&&!zfe.call(e,"callee")},dA=Vfe,jg={exports:{}};function Wfe(){return!1}var Hfe=Wfe;jg.exports;(function(e,t){var n=Ui,r=Hfe,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,s=a&&a.exports===i,o=s?n.Buffer:void 0,c=o?o.isBuffer:void 0,u=c||r;e.exports=u})(jg,jg.exports);var bF=jg.exports,Gfe=9007199254740991,Kfe=/^(?:0|[1-9]\d*)$/;function Yfe(e,t){var n=typeof e;return t=t??Gfe,!!t&&(n=="number"||n!="symbol"&&Kfe.test(e))&&e>-1&&e%1==0&&e<t}var fA=Yfe,Xfe=9007199254740991;function Zfe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Xfe}var hA=Zfe,Qfe=Aa,Jfe=hA,ehe=ka,the="[object Arguments]",nhe="[object Array]",rhe="[object Boolean]",ihe="[object Date]",ahe="[object Error]",she="[object Function]",ohe="[object Map]",lhe="[object Number]",che="[object Object]",uhe="[object RegExp]",dhe="[object Set]",fhe="[object String]",hhe="[object WeakMap]",phe="[object ArrayBuffer]",mhe="[object DataView]",ghe="[object Float32Array]",yhe="[object Float64Array]",vhe="[object Int8Array]",xhe="[object Int16Array]",bhe="[object Int32Array]",whe="[object Uint8Array]",She="[object Uint8ClampedArray]",jhe="[object Uint16Array]",_he="[object Uint32Array]",ct={};ct[ghe]=ct[yhe]=ct[vhe]=ct[xhe]=ct[bhe]=ct[whe]=ct[She]=ct[jhe]=ct[_he]=!0;ct[the]=ct[nhe]=ct[phe]=ct[rhe]=ct[mhe]=ct[ihe]=ct[ahe]=ct[she]=ct[ohe]=ct[lhe]=ct[che]=ct[uhe]=ct[dhe]=ct[fhe]=ct[hhe]=!1;function Ahe(e){return ehe(e)&&Jfe(e.length)&&!!ct[Qfe(e)]}var khe=Ahe;function Ehe(e){return function(t){return e(t)}}var wF=Ehe,_g={exports:{}};_g.exports;(function(e,t){var n=P3,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,s=a&&n.process,o=function(){try{var c=i&&i.require&&i.require("util").types;return c||s&&s.binding&&s.binding("util")}catch{}}();e.exports=o})(_g,_g.exports);var Che=_g.exports,Phe=khe,The=wF,cO=Che,uO=cO&&cO.isTypedArray,Ohe=uO?The(uO):Phe,SF=Ohe,Nhe=Mfe,Ihe=dA,Rhe=Un,Mhe=bF,$he=fA,Dhe=SF,Lhe=Object.prototype,Fhe=Lhe.hasOwnProperty;function Bhe(e,t){var n=Rhe(e),r=!n&&Ihe(e),i=!n&&!r&&Mhe(e),a=!n&&!r&&!i&&Dhe(e),s=n||r||i||a,o=s?Nhe(e.length,String):[],c=o.length;for(var u in e)(t||Fhe.call(e,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||$he(u,c)))&&o.push(u);return o}var Uhe=Bhe,qhe=Object.prototype;function zhe(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||qhe;return e===n}var Vhe=zhe;function Whe(e,t){return function(n){return e(t(n))}}var jF=Whe,Hhe=jF,Ghe=Hhe(Object.keys,Object),Khe=Ghe,Yhe=Vhe,Xhe=Khe,Zhe=Object.prototype,Qhe=Zhe.hasOwnProperty;function Jhe(e){if(!Yhe(e))return Xhe(e);var t=[];for(var n in Object(e))Qhe.call(e,n)&&n!="constructor"&&t.push(n);return t}var epe=Jhe,tpe=K_,npe=hA;function rpe(e){return e!=null&&npe(e.length)&&!tpe(e)}var _v=rpe,ipe=Uhe,ape=epe,spe=_v;function ope(e){return spe(e)?ipe(e):ape(e)}var pA=ope,lpe=jfe,cpe=Ife,upe=pA;function dpe(e){return lpe(e,upe,cpe)}var fpe=dpe,dO=fpe,hpe=1,ppe=Object.prototype,mpe=ppe.hasOwnProperty;function gpe(e,t,n,r,i,a){var s=n&hpe,o=dO(e),c=o.length,u=dO(t),f=u.length;if(c!=f&&!s)return!1;for(var d=c;d--;){var h=o[d];if(!(s?h in t:mpe.call(t,h)))return!1}var p=a.get(e),g=a.get(t);if(p&&g)return p==t&&g==e;var m=!0;a.set(e,t),a.set(t,e);for(var y=s;++d<c;){h=o[d];var v=e[h],b=t[h];if(r)var x=s?r(b,v,h,t,e,a):r(v,b,h,e,t,a);if(!(x===void 0?v===b||i(v,b,n,r,a):x)){m=!1;break}y||(y=h=="constructor")}if(m&&!y){var j=e.constructor,S=t.constructor;j!=S&&"constructor"in e&&"constructor"in t&&!(typeof j=="function"&&j instanceof j&&typeof S=="function"&&S instanceof S)&&(m=!1)}return a.delete(e),a.delete(t),m}var ype=gpe,vpe=sl,xpe=Ui,bpe=vpe(xpe,"DataView"),wpe=bpe,Spe=sl,jpe=Ui,_pe=Spe(jpe,"Promise"),Ape=_pe,kpe=sl,Epe=Ui,Cpe=kpe(Epe,"Set"),_F=Cpe,Ppe=sl,Tpe=Ui,Ope=Ppe(Tpe,"WeakMap"),Npe=Ope,g1=wpe,y1=X_,v1=Ape,x1=_F,b1=Npe,AF=Aa,$u=O3,fO="[object Map]",Ipe="[object Object]",hO="[object Promise]",pO="[object Set]",mO="[object WeakMap]",gO="[object DataView]",Rpe=$u(g1),Mpe=$u(y1),$pe=$u(v1),Dpe=$u(x1),Lpe=$u(b1),oo=AF;(g1&&oo(new g1(new ArrayBuffer(1)))!=gO||y1&&oo(new y1)!=fO||v1&&oo(v1.resolve())!=hO||x1&&oo(new x1)!=pO||b1&&oo(new b1)!=mO)&&(oo=function(e){var t=AF(e),n=t==Ipe?e.constructor:void 0,r=n?$u(n):"";if(r)switch(r){case Rpe:return gO;case Mpe:return fO;case $pe:return hO;case Dpe:return pO;case Lpe:return mO}return t});var Fpe=oo,Ib=hF,Bpe=yF,Upe=vfe,qpe=ype,yO=Fpe,vO=Un,xO=bF,zpe=SF,Vpe=1,bO="[object Arguments]",wO="[object Array]",Ip="[object Object]",Wpe=Object.prototype,SO=Wpe.hasOwnProperty;function Hpe(e,t,n,r,i,a){var s=vO(e),o=vO(t),c=s?wO:yO(e),u=o?wO:yO(t);c=c==bO?Ip:c,u=u==bO?Ip:u;var f=c==Ip,d=u==Ip,h=c==u;if(h&&xO(e)){if(!xO(t))return!1;s=!0,f=!1}if(h&&!f)return a||(a=new Ib),s||zpe(e)?Bpe(e,t,n,r,i,a):Upe(e,t,c,n,r,i,a);if(!(n&Vpe)){var p=f&&SO.call(e,"__wrapped__"),g=d&&SO.call(t,"__wrapped__");
vendor: 3,134 bytes, line 667
667if(p||g){var m=p?e.value():e,y=g?t.value():t;return a||(a=new Ib),i(m,y,n,r,a)}}return h?(a||(a=new Ib),qpe(e,t,n,r,i,a)):!1}var Gpe=Hpe,Kpe=Gpe,jO=ka;function kF(e,t,n,r,i){return e===t?!0:e==null||t==null||!jO(e)&&!jO(t)?e!==e&&t!==t:Kpe(e,t,n,r,kF,i)}var mA=kF,Ype=hF,Xpe=mA,Zpe=1,Qpe=2;function Jpe(e,t,n,r){var i=n.length,a=i,s=!r;if(e==null)return!a;for(e=Object(e);i--;){var o=n[i];if(s&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i<a;){o=n[i];var c=o[0],u=e[c],f=o[1];if(s&&o[2]){if(u===void 0&&!(c in e))return!1}else{var d=new Ype;if(r)var h=r(u,f,c,e,t,d);if(!(h===void 0?Xpe(f,u,Zpe|Qpe,r,d):h))return!1}}return!0}var eme=Jpe,tme=Ls;function nme(e){return e===e&&!tme(e)}var EF=nme,rme=EF,ime=pA;function ame(e){for(var t=ime(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,rme(i)]}return t}var sme=ame;function ome(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var CF=ome,lme=eme,cme=sme,ume=CF;function dme(e){var t=cme(e);return t.length==1&&t[0][2]?ume(t[0][0],t[0][1]):function(n){return n===e||lme(n,e,t)}}var fme=dme;function hme(e,t){return e!=null&&t in Object(e)}var pme=hme,mme=$3,gme=dA,yme=Un,vme=fA,xme=hA,bme=cv;function wme(e,t,n){t=mme(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var s=bme(t[r]);if(!(a=e!=null&&n(e,s)))break;e=e[s]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&xme(i)&&vme(s,i)&&(yme(e)||gme(e)))}var Sme=wme,jme=pme,_me=Sme;function Ame(e,t){return e!=null&&_me(e,t,jme)}var kme=Ame,Eme=mA,Cme=D3,Pme=kme,Tme=G_,Ome=EF,Nme=CF,Ime=cv,Rme=1,Mme=2;function $me(e,t){return Tme(e)&&Ome(t)?Nme(Ime(e),t):function(n){var r=Cme(n,e);return r===void 0&&r===t?Pme(n,e):Eme(t,r,Rme|Mme)}}var Dme=$me;function Lme(e){return e}var Du=Lme;function Fme(e){return function(t){return t==null?void 0:t[e]}}var Bme=Fme,Ume=eA;function qme(e){return function(t){return Ume(t,e)}}var zme=qme,Vme=Bme,Wme=zme,Hme=G_,Gme=cv;function Kme(e){return Hme(e)?Vme(Gme(e)):Wme(e)}var Yme=Kme,Xme=fme,Zme=Dme,Qme=Du,Jme=Un,ege=Yme;function tge(e){return typeof e=="function"?e:e==null?Qme:typeof e=="object"?Jme(e)?Zme(e[0],e[1]):Xme(e):ege(e)}var Fs=tge;function nge(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var rge=nge;function ige(e){return e!==e}var age=ige;function sge(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}var oge=sge,lge=rge,cge=age,uge=oge;function dge(e,t,n){return t===t?uge(e,t,n):lge(e,cge,n)}var fge=dge,hge=fge;function pge(e,t){var n=e==null?0:e.length;return!!n&&hge(e,t,0)>-1}var mge=pge;function gge(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var yge=gge;function vge(){}var xge=vge,Rb=_F,bge=xge,wge=uA,Sge=1/0,jge=Rb&&1/wge(new Rb([,-0]))[1]==Sge?function(e){return new Rb(e)}:bge,_ge=jge,Age=pF,kge=mge,Ege=yge,Cge=gF,Pge=_ge,Tge=uA,Oge=200;function Nge(e,t,n){var r=-1,i=kge,a=e.length,s=!0,o=[],c=o;if(n)s=!1,i=Ege;else if(a>=Oge){var u=t?null:Pge(e);if(u)return Tge(u);s=!1,i=Cge,c=new Age}else c=t?[]:o;e:for(;++r<a;){var f=e[r],d=t?t(f):f;if(f=n||f!==0?f:0,s&&d===d){for(var h=c.length;h--;)if(c[h]===d)continue e;t&&c.push(d),o.push(f)}
vendor: 4,613 bytes, line 667
667else i(c,d,n)||(c!==o&&c.push(d),o.push(f))}return o}var Ige=Nge,Rge=Fs,Mge=Ige;function $ge(e,t){return e&&e.length?Mge(e,Rge(t)):[]}var Dge=$ge;const _O=qe(Dge);function PF(e,t,n){return t===!0?_O(e,n):ke(t)?_O(e,t):e}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)}var Lge=["ref"];function AO(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 Vi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AO(Object(n),!0).forEach(function(r){Av(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,OF(r.key),r)}}function Bge(e,t,n){return t&&kO(e.prototype,t),n&&kO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Uge(e,t,n){return t=Ag(t),qge(e,TF()?Reflect.construct(t,n||[],Ag(e).constructor):t.apply(e,n))}function qge(e,t){if(t&&(Vc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zge(e)}function zge(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function TF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(TF=function(){return!!e})()}function Ag(e){return Ag=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ag(e)}function Vge(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&w1(e,t)}function w1(e,t){return w1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},w1(e,t)}function Av(e,t,n){return t=OF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OF(e){var t=Wge(e,"string");return Vc(t)=="symbol"?t:t+""}function Wge(e,t){if(Vc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Vc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hge(e,t){if(e==null)return{};var n=Gge(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Gge(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 Kge(e){return e.value}function Yge(e,t){if(C.isValidElement(e))return C.cloneElement(e,t);if(typeof e=="function")return C.createElement(e,t);t.ref;var n=Hge(t,Lge);return C.createElement(cA,n)}var EO=1,pc=function(e){function t(){var n;Fge(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=Uge(this,t,[].concat(i)),Av(n,"lastBoundingBox",{width:-1,height:-1}),n}return Vge(t,e),Bge(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>EO||Math.abs(i.height-this.lastBoundingBox.height)>EO)&&(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))}}
667,{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Vi({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,a=i.layout,s=i.align,o=i.verticalAlign,c=i.margin,u=i.chartWidth,f=i.chartHeight,d,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(s==="center"&&a==="vertical"){var p=this.getBBoxSnapshot();d={left:((u||0)-p.width)/2}}else d=s==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(o==="middle"){var g=this.getBBoxSnapshot();h={top:((f||0)-g.height)/2}}else h=o==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return Vi(Vi({},d),h)}},{key:"render",value:function(){var r=this,i=this.props,a=i.content,s=i.width,o=i.height,c=i.wrapperStyle,u=i.payloadUniqBy,f=i.payload,d=Vi(Vi({position:"absolute",width:s||"auto",height:o||"auto"},this.getDefaultPosition(c)),c);return C.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(p){r.wrapperNode=p}},Yge(a,Vi(Vi({},this.props),{},{payload:PF(f,u,Kge)})))}}],[{key:"getWithHeight",value:function(r,i){var a=Vi(Vi({},this.defaultProps),r.props),s=a.layout;return s==="vertical"&&X(r.props.height)?{height:r.props.height}:s==="horizontal"?{width:r.props.width||i}:null}}])}(w.PureComponent);Av(pc,"displayName","Legend");Av(pc,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var CO=Mh,Xge=dA,Zge=Un,PO=CO?CO.isConcatSpreadable:void 0;function Qge(e){return Zge(e)||Xge(e)||!!(PO&&e&&e[PO])}var Jge=Qge,eye=vF,tye=Jge;function NF(e,t,n,r,i){var a=-1,s=e.length;for(n||(n=tye),i||(i=[]);++a<s;){var o=e[a];t>0&&n(o)?t>1?NF(o,t-1,n,r,i):eye(i,o):r||(i[i.length]=o)}return i}var IF=NF;function nye(e){return function(t,n,r){for(var i=-1,a=Object(t),s=r(t),o=s.length;o--;){var c=s[e?o:++i];if(n(a[c],c,a)===!1)break}return t}}var rye=nye,iye=rye,aye=iye(),sye=aye,oye=sye,lye=pA;function cye(e,t){return e&&oye(e,t,lye)}var RF=cye,uye=_v;function dye(e,t){return function(n,r){if(n==null)return n;if(!uye(n))return e(n,r);for(var i=n.length,a=t?i:-1,s=Object(n);(t?a--:++a<i)&&r(s[a],a,s)!==!1;);return n}}var fye=dye,hye=RF,pye=fye,mye=pye(hye),gA=mye,gye=gA,yye=_v;function vye(e,t){var n=-1,r=yye(e)?Array(e.length):[];return gye(e,function(i,a,s){r[++n]=t(i,a,s)}),r}var MF=vye;function xye(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}var bye=xye,TO=Tu;function wye(e,t){if(e!==t){var n=e!==void 0,r=e===null,i=e===e,a=TO(e),s=t!==void 0,o=t===null,c=t===t,u=TO(t);if(!o&&!u&&!a&&e>t||a&&s&&c&&!o&&!u||r&&s&&c||!n&&c||!i)return 1;if(!r&&!a&&!u&&e<t||u&&n&&i&&!r&&!a||o&&n&&i||!s&&i||!c)return-1}return 0}var Sye=wye,jye=Sye;function _ye(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,s=i.length,o=n.length;++r<s;){var c=jye(i[r],a[r]);if(c){if(r>=o)return c;var u=n[r];return c*(u=="desc"?-1:1)}}return e.index-t.index}var Aye=_ye,Mb=J_,kye=eA,Eye=Fs,Cye=MF,Pye=bye,Tye=wF,Oye=Aye,Nye=Du,Iye=Un;function Rye(e,t,n){t.length?t=Mb(t,function(a){return Iye(a)?function(s){return kye(s,a.length===1?a[0]:a)}:a}):t=[Nye];var r=-1;t=Mb(t,Tye(Eye));var i=Cye(e,function(a,s,o){var c=Mb(t,function(u){return u(a)});return{criteria:c,index:++r,value:a}});return Pye(i,function(a,s){return Oye(a,s,n)})}var Mye=Rye;function $ye(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 Dye=$ye,Lye=Dye,OO=Math.max;function Fye(e,t,n){return t=OO(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=OO(r.length-t,0),s=Array(a);++i<a;)s[i]=r[t+i];i=-1;for(var o=Array(t+1);++i<t;)o[i]=r[i];return o[t]=n(s),Lye(e,this,o)}}var Bye=Fye;function Uye(e){return function(){return e}}var qye=Uye,zye=sl,Vye=function(){try{var e=zye(Object,"defineProperty");return e({},"",{}),e}catch{}}(),$F=Vye,Wye=qye,NO=$F,Hye=Du,Gye=NO?function(e,t){return NO(e,"toString",{configurable:!0,enumerable:!1,value:Wye(t),writable:!0})}:Hye,Kye=Gye,Yye=800,Xye=16,Zye=Date.now;function Qye(e){var t=0,n=0;return function(){var r=Zye(),i=Xye-(r-n);if(n=r,i>0){if(++t>=Yye)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Jye=Qye,eve=Kye,tve=Jye,nve=tve(eve),rve=nve,ive=Du,ave=Bye,sve=rve;function ove(e,t){return sve(ave(e,t,ive),e+"")}var lve=ove,cve=Y_,uve=_v,dve=fA,fve=Ls;function hve(e,t,n){if(!fve(n))return!1;var r=typeof t;return(r=="number"?uve(n)&&dve(t,n.length):r=="string"&&t in n)?cve(n[t],e):!1}var kv=hve,pve=IF,mve=Mye,gve=lve,IO=kv,yve=gve(function(e,t){if(e==null)return[];var n=t.length;return n>1&&IO(e,t[0],t[1])?t=[]:n>2&&IO(t[0],t[1],t[2])&&(t=[t[0]]),mve(e,pve(t,1),[])}),vve=yve;const yA=qe(vve);function Mf(e){"@babel/helpers - typeof";return Mf=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},Mf(e)}function S1(){return S1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},S1.apply(this,arguments)}function xve(e,t){return jve(e)||Sve(e,t)||wve(e,t)||bve()}
vendor: 28,653 bytes, lines 667-674
667function bve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
668In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wve(e,t){if(e){if(typeof e=="string")return RO(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 RO(e,t)}}function RO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Sve(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,s,o=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function jve(e){if(Array.isArray(e))return e}function MO(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 $b(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?MO(Object(n),!0).forEach(function(r){_ve(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _ve(e,t,n){return t=Ave(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ave(e){var t=kve(e,"string");return Mf(t)=="symbol"?t:t+""}function kve(e,t){if(Mf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Mf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Eve(e){return Array.isArray(e)&&zt(e[0])&&zt(e[1])?e.join(" ~ "):e}var Cve=function(t){var n=t.separator,r=n===void 0?" : ":n,i=t.contentStyle,a=i===void 0?{}:i,s=t.itemStyle,o=s===void 0?{}:s,c=t.labelStyle,u=c===void 0?{}:c,f=t.payload,d=t.formatter,h=t.itemSorter,p=t.wrapperClassName,g=t.labelClassName,m=t.label,y=t.labelFormatter,v=t.accessibilityLayer,b=v===void 0?!1:v,x=function(){if(f&&f.length){var O={padding:0,margin:0},$=(h?yA(f,h):f).map(function(R,L){if(R.type==="none")return null;var D=$b({display:"block",paddingTop:4,paddingBottom:4,color:R.color||"#000"},o),M=R.formatter||d||Eve,N=R.value,I=R.name,F=N,V=I;if(M&&F!=null&&V!=null){var U=M(N,I,R,L,f);if(Array.isArray(U)){var G=xve(U,2);F=G[0],V=G[1]}else F=U}return C.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(L),style:D},zt(V)?C.createElement("span",{className:"recharts-tooltip-item-name"},V):null,zt(V)?C.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,C.createElement("span",{className:"recharts-tooltip-item-value"},F),C.createElement("span",{className:"recharts-tooltip-item-unit"},R.unit||""))});return C.createElement("ul",{className:"recharts-tooltip-item-list",style:O},$)}return null},j=$b({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),S=$b({margin:0},u),_=!Ie(m),A=_?m:"",k=Ce("recharts-default-tooltip",p),E=Ce("recharts-tooltip-label",g);_&&y&&f!==void 0&&f!==null&&(A=y(m,f));var T=b?{role:"status","aria-live":"assertive"}:{};return C.createElement("div",S1({className:k,style:j},T),C.createElement("p",{className:E,style:S},C.isValidElement(A)?A:"".concat(A)),x())};function $f(e){"@babel/helpers - typeof";return $f=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},$f(e)}function Rp(e,t,n){return t=Pve(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pve(e){var t=Tve(e,"string");return $f(t)=="symbol"?t:t+""}function Tve(e,t){if($f(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if($f(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ad="recharts-tooltip-wrapper",Ove={visibility:"hidden"};function Nve(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Ce(ad,Rp(Rp(Rp(Rp({},"".concat(ad,"-right"),X(n)&&t&&X(t.x)&&n>=t.x),"".concat(ad,"-left"),X(n)&&t&&X(t.x)&&n<t.x),"".concat(ad,"-bottom"),X(r)&&t&&X(t.y)&&r>=t.y),"".concat(ad,"-top"),X(r)&&t&&X(t.y)&&r<t.y))}function $O(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,a=e.position,s=e.reverseDirection,o=e.tooltipDimension,c=e.viewBox,u=e.viewBoxDimension;if(a&&X(a[r]))return a[r];var f=n[r]-o-i,d=n[r]+i;if(t[r])return s[r]?f:d;if(s[r]){var h=f,p=c[r];return h<p?Math.max(d,c[r]):Math.max(f,c[r])}var g=d+o,m=c[r]+u;return g>m?Math.max(f,c[r]):Math.max(d,c[r])}function Ive(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 Rve(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,a=e.reverseDirection,s=e.tooltipBox,o=e.useTranslate3d,c=e.viewBox,u,f,d;return s.height>0&&s.width>0&&n?(f=$O({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:s.width,viewBox:c,viewBoxDimension:c.width}),d=$O({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:s.height,viewBox:c,viewBoxDimension:c.height}),u=Ive({translateX:f,translateY:d,useTranslate3d:o})):u=Ove,{cssProperties:u,cssClasses:Nve({translateX:f,translateY:d,coordinate:n})}}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 DO(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 LO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DO(Object(n),!0).forEach(function(r){_1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Mve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $ve(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,LF(r.key),r)}}function Dve(e,t,n){return t&&$ve(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lve(e,t,n){return t=kg(t),Fve(e,DF()?Reflect.construct(t,n||[],kg(e).constructor):t.apply(e,n))}function Fve(e,t){if(t&&(Wc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Bve(e)}function Bve(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function DF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(DF=function(){return!!e})()}function kg(e){return kg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},kg(e)}function Uve(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j1(e,t)}function j1(e,t){return j1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},j1(e,t)}function _1(e,t,n){return t=LF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LF(e){var t=qve(e,"string");return Wc(t)=="symbol"?t:t+""}function qve(e,t){if(Wc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Wc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var FO=1,zve=function(e){function t(){var n;Mve(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=Lve(this,t,[].concat(i)),_1(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),_1(n,"handleKeyDown",function(s){if(s.key==="Escape"){var o,c,u,f;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(o=(c=n.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&o!==void 0?o:0,y:(u=(f=n.props.coordinate)===null||f===void 0?void 0:f.y)!==null&&u!==void 0?u:0}})}}),n}return Uve(t,e),Dve(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>FO||Math.abs(r.height-this.state.lastBoundingBox.height)>FO)&&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,o=i.animationDuration,c=i.animationEasing,u=i.children,f=i.coordinate,d=i.hasPayload,h=i.isAnimationActive,p=i.offset,g=i.position,m=i.reverseDirection,y=i.useTranslate3d,v=i.viewBox,b=i.wrapperStyle,x=Rve({allowEscapeViewBox:s,coordinate:f,offsetTopLeft:p,position:g,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:v}),j=x.cssClasses,S=x.cssProperties,_=LO(LO({transition:h&&a?"transform ".concat(o,"ms ").concat(c):void 0},S),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&d?"visible":"hidden",position:"absolute",top:0,left:0},b);return C.createElement("div",{tabIndex:-1,className:j,style:_,ref:function(k){r.wrapperNode=k}},u)}}])}(w.PureComponent),Vve=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},ia={isSsr:Vve(),get:function(t){return ia[t]},set:function(t,n){if(typeof t=="string")ia[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(i){ia[i]=t[i]})}}};function Hc(e){"@babel/helpers - typeof";return Hc=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},Hc(e)}function BO(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 UO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BO(Object(n),!0).forEach(function(r){vA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hve(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,BF(r.key),r)}}function Gve(e,t,n){return t&&Hve(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Kve(e,t,n){return t=Eg(t),Yve(e,FF()?Reflect.construct(t,n||[],Eg(e).constructor):t.apply(e,n))}function Yve(e,t){if(t&&(Hc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Xve(e)}function Xve(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function FF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(FF=function(){return!!e})()}function Eg(e){return Eg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Eg(e)}function Zve(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A1(e,t)}function A1(e,t){return A1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},A1(e,t)}function vA(e,t,n){return t=BF(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BF(e){var t=Qve(e,"string");return Hc(t)=="symbol"?t:t+""}function Qve(e,t){if(Hc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Hc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jve(e){return e.dataKey}function exe(e,t){return C.isValidElement(e)?C.cloneElement(e,t):typeof e=="function"?C.createElement(e,t):C.createElement(Cve,t)}var Yn=function(e){function t(){return Wve(this,t),Kve(this,t,arguments)}return Zve(t,e),Gve(t,[{key:"render",value:function(){var r=this,i=this.props,a=i.active,s=i.allowEscapeViewBox,o=i.animationDuration,c=i.animationEasing,u=i.content,f=i.coordinate,d=i.filterNull,h=i.isAnimationActive,p=i.offset,g=i.payload,m=i.payloadUniqBy,y=i.position,v=i.reverseDirection,b=i.useTranslate3d,x=i.viewBox,j=i.wrapperStyle,S=g??[];d&&S.length&&(S=PF(g.filter(function(A){return A.value!=null&&(A.hide!==!0||r.props.includeHidden)}),m,Jve));var _=S.length>0;return C.createElement(zve,{allowEscapeViewBox:s,animationDuration:o,animationEasing:c,isAnimationActive:h,active:a,coordinate:f,hasPayload:_,offset:p,position:y,reverseDirection:v,useTranslate3d:b,viewBox:x,wrapperStyle:j},exe(u,UO(UO({},this.props),{},{payload:S})))}}])}(w.PureComponent);vA(Yn,"displayName","Tooltip");vA(Yn,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!ia.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 txe=Ui,nxe=function(){return txe.Date.now()},rxe=nxe,ixe=/\s/;function axe(e){for(var t=e.length;t--&&ixe.test(e.charAt(t)););return t}var sxe=axe,oxe=sxe,lxe=/^\s+/;function cxe(e){return e&&e.slice(0,oxe(e)+1).replace(lxe,"")}var uxe=cxe,dxe=uxe,qO=Ls,fxe=Tu,zO=NaN,hxe=/^[-+]0x[0-9a-f]+$/i,pxe=/^0b[01]+$/i,mxe=/^0o[0-7]+$/i,gxe=parseInt;function yxe(e){if(typeof e=="number")return e;if(fxe(e))return zO;if(qO(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=qO(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=dxe(e);var n=pxe.test(e);return n||mxe.test(e)?gxe(e.slice(2),n?2:8):hxe.test(e)?zO:+e}var UF=yxe,vxe=Ls,Db=rxe,VO=UF,xxe="Expected a function",bxe=Math.max,wxe=Math.min;function Sxe(e,t,n){var r,i,a,s,o,c,u=0,f=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(xxe);t=VO(t)||0,vxe(n)&&(f=!!n.leading,d="maxWait"in n,a=d?bxe(VO(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h);function p(_){var A=r,k=i;return r=i=void 0,u=_,s=e.apply(k,A),s}function g(_){return u=_,o=setTimeout(v,t),f?p(_):s}function m(_){var A=_-c,k=_-u,E=t-A;return d?wxe(E,a-k):E}function y(_){var A=_-c,k=_-u;return c===void 0||A>=t||A<0||d&&k>=a}function v(){var _=Db();if(y(_))return b(_);o=setTimeout(v,m(_))}function b(_){return o=void 0,h&&r?p(_):(r=i=void 0,s)}function x(){o!==void 0&&clearTimeout(o),u=0,r=c=i=o=void 0}function j(){return o===void 0?s:b(Db())}function S(){var _=Db(),A=y(_);if(r=arguments,i=this,c=_,A){if(o===void 0)return g(c);if(d)return clearTimeout(o),o=setTimeout(v,t),p(c)}return o===void 0&&(o=setTimeout(v,t)),s}return S.cancel=x,S.flush=j,S}var jxe=Sxe,_xe=jxe,Axe=Ls,kxe="Expected a function";function Exe(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(kxe);return Axe(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),_xe(e,t,{leading:r,maxWait:t,trailing:i})}var Cxe=Exe;const qF=qe(Cxe);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)}function WO(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;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WO(Object(n),!0).forEach(function(r){Pxe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Pxe(e,t,n){return t=Txe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Txe(e){var t=Oxe(e,"string");return Df(t)=="symbol"?t:t+""}function Oxe(e,t){if(Df(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Df(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Nxe(e,t){return $xe(e)||Mxe(e,t)||Rxe(e,t)||Ixe()}function Ixe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
669In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rxe(e,t){if(e){if(typeof e=="string")return HO(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 HO(e,t)}}function HO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Mxe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,s,o=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function $xe(e){if(Array.isArray(e))return e}var $p=w.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,i=r===void 0?{width:-1,height:-1}:r,a=e.width,s=a===void 0?"100%":a,o=e.height,c=o===void 0?"100%":o,u=e.minWidth,f=u===void 0?0:u,d=e.minHeight,h=e.maxHeight,p=e.children,g=e.debounce,m=g===void 0?0:g,y=e.id,v=e.className,b=e.onResize,x=e.style,j=x===void 0?{}:x,S=w.useRef(null),_=w.useRef();_.current=b,w.useImperativeHandle(t,function(){return Object.defineProperty(S.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),S.current},configurable:!0})});var A=w.useState({containerWidth:i.width,containerHeight:i.height}),k=Nxe(A,2),E=k[0],T=k[1],P=w.useCallback(function($,R){T(function(L){var D=Math.round($),M=Math.round(R);return L.containerWidth===D&&L.containerHeight===M?L:{containerWidth:D,containerHeight:M}})},[]);w.useEffect(function(){var $=function(I){var F,V=I[0].contentRect,U=V.width,G=V.height;P(U,G),(F=_.current)===null||F===void 0||F.call(_,U,G)};m>0&&($=qF($,m,{trailing:!0,leading:!1}));var R=new ResizeObserver($),L=S.current.getBoundingClientRect(),D=L.width,M=L.height;return P(D,M),R.observe(S.current),function(){R.disconnect()}},[P,m]);var O=w.useMemo(function(){var $=E.containerWidth,R=E.containerHeight;if($<0||R<0)return null;ra(bo(s)||bo(c),`The width(%s) and height(%s) are both fixed numbers,
670       maybe you don't need to use a ResponsiveContainer.`,s,c),ra(!n||n>0,"The aspect(%s) must be greater than zero.",n);var L=bo(s)?$:s,D=bo(c)?R:c;n&&n>0&&(L?D=L/n:D&&(L=D*n),h&&D>h&&(D=h)),ra(L>0||D>0,`The width(%s) and height(%s) of chart should be greater than 0,
671       please check the style of container, or the props width(%s) and height(%s),
672       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
673       height and width.`,L,D,s,c,f,d,n);var M=!Array.isArray(p)&&na(p.type).endsWith("Chart");return C.Children.map(p,function(N){return C.isValidElement(N)?w.cloneElement(N,Mp({width:L,height:D},M?{style:Mp({height:"100%",width:"100%",maxHeight:D,maxWidth:L},N.props.style)}:{})):N})},[n,p,c,h,d,f,E,s]);return C.createElement("div",{id:y?"".concat(y):void 0,className:Ce("recharts-responsive-container",v),style:Mp(Mp({},j),{},{width:s,height:c,minWidth:f,minHeight:d,maxHeight:h}),ref:S},O)}),wo=function(t){return null};wo.displayName="Cell";function Lf(e){"@babel/helpers - typeof";return Lf=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},Lf(e)}function GO(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 k1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GO(Object(n),!0).forEach(function(r){Dxe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Dxe(e,t,n){return t=Lxe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lxe(e){var t=Fxe(e,"string");return Lf(t)=="symbol"?t:t+""}function Fxe(e,t){if(Lf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Lf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Al={widthCache:{},cacheCount:0},Bxe=2e3,Uxe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},KO="recharts_measurement_span";function qxe(e){var t=k1({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var Ud=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||ia.isSsr)return{width:0,height:0};var r=qxe(n),i=JSON.stringify({text:t,copyStyle:r});if(Al.widthCache[i])return Al.widthCache[i];try{var a=document.getElementById(KO);a||(a=document.createElement("span"),a.setAttribute("id",KO),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var s=k1(k1({},Uxe),r);Object.assign(a.style,s),a.textContent="".concat(t);var o=a.getBoundingClientRect(),c={width:o.width,height:o.height};return Al.widthCache[i]=c,++Al.cacheCount>Bxe&&(Al.cacheCount=0,Al.widthCache={}),c}catch{return{width:0,height:0}}},zxe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};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 Cg(e,t){return Gxe(e)||Hxe(e,t)||Wxe(e,t)||Vxe()}function Vxe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
674In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wxe(e,t){if(e){if(typeof e=="string")return YO(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 YO(e,t)}}function YO(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Hxe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,s,o=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function Gxe(e){if(Array.isArray(e))return e}function Kxe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Xxe(r.key),r)}}function Yxe(e,t,n){return t&&XO(e.prototype,t),n&&XO(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xxe(e){var t=Zxe(e,"string");return Ff(t)=="symbol"?t:t+""}function Zxe(e,t){if(Ff(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ff(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ZO=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,QO=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Qxe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Jxe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,zF={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},ebe=Object.keys(zF),Yl="NaN";function tbe(e,t){return e*zF[t]}var Dp=function(){function e(t,n){Kxe(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!Qxe.test(n)&&(this.num=NaN,this.unit=""),ebe.includes(n)&&(this.num=tbe(t,n),this.unit="px")}return Yxe(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var r,i=(r=Jxe.exec(n))!==null&&r!==void 0?r:[],a=Cg(i,3),s=a[1],o=a[2];return new e(parseFloat(s),o??"")}}])}();function VF(e){if(e.includes(Yl))return Yl;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=ZO.exec(t))!==null&&n!==void 0?n:[],i=Cg(r,4),a=i[1],s=i[2],o=i[3],c=Dp.parse(a??""),u=Dp.parse(o??""),f=s==="*"?c.multiply(u):c.divide(u);if(f.isNaN())return Yl;t=t.replace(ZO,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var d,h=(d=QO.exec(t))!==null&&d!==void 0?d:[],p=Cg(h,4),g=p[1],m=p[2],y=p[3],v=Dp.parse(g??""),b=Dp.parse(y??""),x=m==="+"?v.add(b):v.subtract(b);if(x.isNaN())return Yl;t=t.replace(QO,x.toString())}return t}var JO=/\(([^()]*)\)/;function nbe(e){for(var t=e;t.includes("(");){var n=JO.exec(t),r=Cg(n,2),i=r[1];t=t.replace(JO,VF(i))}return t}function rbe(e){var t=e.replace(/\s+/g,"");return t=nbe(t),t=VF(t),t}function ibe(e){try{return rbe(e)}catch{return Yl}}
674function Lb(e){var t=ibe(e.slice(5,-1));return t===Yl?"":t}var abe=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],sbe=["dx","dy","angle","className","breakAll"];function E1(){return E1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},E1.apply(this,arguments)}function eN(e,t){if(e==null)return{};var n=obe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function obe(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 tN(e,t){return dbe(e)||ube(e,t)||cbe(e,t)||lbe()}function lbe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
675In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cbe(e,t){if(e){if(typeof e=="string")return nN(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 nN(e,t)}}function nN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ube(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,s,o=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function dbe(e){if(Array.isArray(e))return e}var WF=/[ \f\n\r\t\v\u2028\u2029]+/,HF=function(t){var n=t.children,r=t.breakAll,i=t.style;try{var a=[];Ie(n)||(r?a=n.toString().split(""):a=n.toString().split(WF));var s=a.map(function(c){return{word:c,width:Ud(c,i).width}}),o=r?0:Ud(" ",i).width;return{wordsWithComputedWidth:s,spaceWidth:o}}catch{return null}},fbe=function(t,n,r,i,a){var s=t.maxLines,o=t.children,c=t.style,u=t.breakAll,f=X(s),d=o,h=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return L.reduce(function(D,M){var N=M.word,I=M.width,F=D[D.length-1];if(F&&(i==null||a||F.width+I+r<Number(i)))F.words.push(N),F.width+=I+r;else{var V={words:[N],width:I};D.push(V)}return D},[])},p=h(n),g=function(L){return L.reduce(function(D,M){return D.width>M.width?D:M})};if(!f)return p;for(var m="…",y=function(L){var D=d.slice(0,L),M=HF({breakAll:u,style:c,children:D+m}).wordsWithComputedWidth,N=h(M),I=N.length>s||g(N).width>Number(i);return[I,N]},v=0,b=d.length-1,x=0,j;v<=b&&x<=d.length-1;){var S=Math.floor((v+b)/2),_=S-1,A=y(_),k=tN(A,2),E=k[0],T=k[1],P=y(S),O=tN(P,1),$=O[0];if(!E&&!$&&(v=S+1),E&&$&&(b=S-1),!E&&$){j=T;break}x++}return j||p},rN=function(t){var n=Ie(t)?[]:t.toString().split(WF);return[{words:n}]},hbe=function(t){var n=t.width,r=t.scaleToFit,i=t.children,a=t.style,s=t.breakAll,o=t.maxLines;if((n||r)&&!ia.isSsr){var c,u,f=HF({breakAll:s,children:i,style:a});if(f){var d=f.wordsWithComputedWidth,h=f.spaceWidth;c=d,u=h}else return rN(i);return fbe({breakAll:s,children:i,maxLines:o,style:a},c,u,n,r)}return rN(i)},iN="#808080",Xo=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,s=t.lineHeight,o=s===void 0?"1em":s,c=t.capHeight,u=c===void 0?"0.71em":c,f=t.scaleToFit,d=f===void 0?!1:f,h=t.textAnchor,p=h===void 0?"start":h,g=t.verticalAnchor,m=g===void 0?"end":g,y=t.fill,v=y===void 0?iN:y,b=eN(t,abe),x=w.useMemo(function(){return hbe({breakAll:b.breakAll,children:b.children,maxLines:b.maxLines,scaleToFit:d,style:b.style,width:b.width})},[b.breakAll,b.children,b.maxLines,d,b.style,b.width]),j=b.dx,S=b.dy,_=b.angle,A=b.className,k=b.breakAll,E=eN(b,sbe);if(!zt(r)||!zt(a))return null;var T=r+(X(j)?j:0),P=a+(X(S)?S:0),O;switch(m){case"start":O=Lb("calc(".concat(u,")"));break;case"middle":O=Lb("calc(".concat((x.length-1)/2," * -").concat(o," + (").concat(u," / 2))"));break;default:O=Lb("calc(".concat(x.length-1," * -").concat(o,")"));break}var $=[];if(d){var R=x[0].width,L=b.width;$.push("scale(".concat((X(L)?L/R:1)/R,")"))}return _&&$.push("rotate(".concat(_,", ").concat(T,", ").concat(P,")")),$.length&&(E.transform=$.join(" ")),C.createElement("text",E1({},ye(E,!0),{x:T,y:P,className:Ce("recharts-text",A),textAnchor:p,fill:v.includes("url")?iN:v}),x.map(function(D,M){var N=D.words.join(k?"":" ");return C.createElement("tspan",{x:T,dy:M===0?O:o,key:"".concat(N,"-").concat(M)},N)}))};function ms(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function pbe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function xA(e){let t,n,r;e.length!==2?(t=ms,n=(o,c)=>ms(e(o),c),r=(o,c)=>e(o)-c):(t=e===ms||e===pbe?e:mbe,n=e,r=e);function i(o,c,u=0,f=o.length){if(u<f){if(t(c,c)!==0)return f;do{const d=u+f>>>1;n(o[d],c)<0?u=d+1:f=d}while(u<f)}return u}function a(o,c,u=0,f=o.length){if(u<f){if(t(c,c)!==0)return f;do{const d=u+f>>>1;n(o[d],c)<=0?u=d+1:f=d}while(u<f)}return u}function s(o,c,u=0,f=o.length){const d=i(o,c,u,f-1);return d>u&&r(o[d-1],c)>-r(o[d],c)?d-1:d}return{left:i,center:s,right:a}}function mbe(){return 0}function GF(e){return e===null?NaN:+e}function*gbe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const ybe=xA(ms),Lh=ybe.right;xA(GF).center;class aN extends Map{constructor(t,n=bbe){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(sN(this,t))}has(t){return super.has(sN(this,t))}set(t,n){return super.set(vbe(this,t),n)}delete(t){return super.delete(xbe(this,t))}}function sN({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function vbe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function xbe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function bbe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function wbe(e=ms){if(e===ms)return KF;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function KF(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const Sbe=Math.sqrt(50),jbe=Math.sqrt(10),_be=Math.sqrt(2);function Pg(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),s=a>=Sbe?10:a>=jbe?5:a>=_be?2:1;let o,c,u;return i<0?(u=Math.pow(10,-i)/s,o=Math.round(e*u),c=Math.round(t*u),o/u<e&&++o,c/u>t&&--c,u=-u):(u=Math.pow(10,i)*s,o=Math.round(e/u),c=Math.round(t/u),o*u<e&&++o,c*u>t&&--c),c<o&&.5<=n&&n<2?Pg(e,t,n*2):[o,c,u]}function C1(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,a,s]=r?Pg(t,e,n):Pg(e,t,n);if(!(a>=i))return[];const o=a-i+1,c=new Array(o);if(r)if(s<0)for(let u=0;u<o;++u)c[u]=(a-u)/-s;else for(let u=0;u<o;++u)c[u]=(a-u)*s;else if(s<0)for(let u=0;u<o;++u)c[u]=(i+u)/-s;else for(let u=0;u<o;++u)c[u]=(i+u)*s;return c}
675function P1(e,t,n){return t=+t,e=+e,n=+n,Pg(e,t,n)[2]}function T1(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?P1(t,e,n):P1(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function oN(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function lN(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function YF(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?KF:wbe(i);r>n;){if(r-n>600){const c=r-n+1,u=t-n+1,f=Math.log(c),d=.5*Math.exp(2*f/3),h=.5*Math.sqrt(f*d*(c-d)/c)*(u-c/2<0?-1:1),p=Math.max(n,Math.floor(t-u*d/c+h)),g=Math.min(r,Math.floor(t+(c-u)*d/c+h));YF(e,t,p,g,i)}const a=e[t];let s=n,o=r;for(sd(e,n,t),i(e[r],a)>0&&sd(e,n,r);s<o;){for(sd(e,s,o),++s,--o;i(e[s],a)<0;)++s;for(;i(e[o],a)>0;)--o}i(e[n],a)===0?sd(e,n,o):(++o,sd(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function sd(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Abe(e,t,n){if(e=Float64Array.from(gbe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return lN(e);if(t>=1)return oN(e);var r,i=(r-1)*t,a=Math.floor(i),s=oN(YF(e,a).subarray(0,a+1)),o=lN(e.subarray(a+1));return s+(o-s)*(i-a)}}function kbe(e,t,n=GF){if(!(!(r=e.length)||isNaN(t=+t))){if(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),o=+n(e[a+1],a+1,e);return s+(o-s)*(i-a)}}function Ebe(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<i;)a[r]=e+r*n;return a}function $r(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Ea(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const O1=Symbol("implicit");function bA(){var e=new aN,t=[],n=[],r=O1;function i(a){let s=e.get(a);if(s===void 0){if(r!==O1)return r;e.set(a,s=t.push(a)-1)}return n[s%n.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new aN;for(const s of a)e.has(s)||e.set(s,t.push(s)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return bA(t,n).unknown(r)},$r.apply(i,arguments),i}function Bf(){var e=bA().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,s,o=!1,c=0,u=0,f=.5;delete e.unknown;function d(){var h=t().length,p=i<r,g=p?i:r,m=p?r:i;a=(m-g)/Math.max(1,h-c+u*2),o&&(a=Math.floor(a)),g+=(m-g-a*(h-c))*f,s=a*(1-c),o&&(g=Math.round(g),s=Math.round(s));var y=Ebe(h).map(function(v){return g+a*v});return n(p?y.reverse():y)}return e.domain=function(h){return arguments.length?(t(h),d()):t()},e.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,o=!0,d()},e.bandwidth=function(){return s},e.step=function(){return a},e.round=function(h){return arguments.length?(o=!!h,d()):o},e.padding=function(h){return arguments.length?(c=Math.min(1,u=+h),d()):c},e.paddingInner=function(h){return arguments.length?(c=Math.min(1,h),d()):c},e.paddingOuter=function(h){return arguments.length?(u=+h,d()):u},e.align=function(h){return arguments.length?(f=Math.max(0,Math.min(1,h)),d()):f},e.copy=function(){return Bf(t(),[r,i]).round(o).paddingInner(c).paddingOuter(u).align(f)},$r.apply(d(),arguments)}function XF(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return XF(t())},e}function qd(){return XF(Bf.apply(null,arguments).paddingInner(1))}function wA(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ZF(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Fh(){}var Uf=.7,Tg=1/Uf,mc="\\s*([+-]?\\d+)\\s*",qf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ii="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Cbe=/^#([0-9a-f]{3,8})$/,Pbe=new RegExp(`^rgb\\(${mc},${mc},${mc}\\)$`),Tbe=new RegExp(`^rgb\\(${Ii},${Ii},${Ii}\\)$`),Obe=new RegExp(`^rgba\\(${mc},${mc},${mc},${qf}\\)$`),Nbe=new RegExp(`^rgba\\(${Ii},${Ii},${Ii},${qf}\\)$`),Ibe=new RegExp(`^hsl\\(${qf},${Ii},${Ii}\\)$`),Rbe=new RegExp(`^hsla\\(${qf},${Ii},${Ii},${qf}\\)$`),cN={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};wA(Fh,zf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:uN,formatHex:uN,formatHex8:Mbe,formatHsl:$be,formatRgb:dN,toString:dN});function uN(){return this.rgb().formatHex()}function Mbe(){return this.rgb().formatHex8()}function $be(){return QF(this).formatHsl()}function dN(){return this.rgb().formatRgb()}function zf(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Cbe.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?fN(t):n===3?new $n(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Lp(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Lp(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=Pbe.exec(e))?new $n(t[1],t[2],t[3],1):(t=Tbe.exec(e))?new $n(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Obe.exec(e))?Lp(t[1],t[2],t[3],t[4]):(t=Nbe.exec(e))?Lp(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Ibe.exec(e))?mN(t[1],t[2]/100,t[3]/100,1):(t=Rbe.exec(e))?mN(t[1],t[2]/100,t[3]/100,t[4]):cN.hasOwnProperty(e)?fN(cN[e]):e==="transparent"?new $n(NaN,NaN,NaN,0):null}function fN(e){return new $n(e>>16&255,e>>8&255,e&255,1)}function Lp(e,t,n,r){return r<=0&&(e=t=n=NaN),new $n(e,t,n,r)}function Dbe(e){return e instanceof Fh||(e=zf(e)),e?(e=e.rgb(),new $n(e.r,e.g,e.b,e.opacity)):new $n}function N1(e,t,n,r){return arguments.length===1?Dbe(e):new $n(e,t,n,r??1)}function $n(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}wA($n,N1,ZF(Fh,{brighter(e){return e=e==null?Tg:Math.pow(Tg,e),new $n(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Uf:Math.pow(Uf,e),new $n(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new $n($o(this.r),$o(this.g),$o(this.b),Og(this.opacity))},displayable(){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:hN,formatHex:hN,formatHex8:Lbe,formatRgb:pN,toString:pN}));function hN(){return`#${So(this.r)}${So(this.g)}${So(this.b)}`}function Lbe(){return`#${So(this.r)}${So(this.g)}${So(this.b)}${So((isNaN(this.opacity)?1:this.opacity)*255)}`}function pN(){const e=Og(this.opacity);return`${e===1?"rgb(":"rgba("}${$o(this.r)}, ${$o(this.g)}, ${$o(this.b)}${e===1?")":`, ${e})`}`}function Og(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function $o(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function So(e){return e=$o(e),(e<16?"0":"")+e.toString(16)}function mN(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ii(e,t,n,r)}function QF(e){if(e instanceof ii)return new ii(e.h,e.s,e.l,e.opacity);if(e instanceof Fh||(e=zf(e)),!e)return new ii;if(e instanceof ii)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,o=a-i,c=(a+i)/2;return o?(t===a?s=(n-r)/o+(n<r)*6:n===a?s=(r-t)/o+2:s=(t-n)/o+4,o/=c<.5?a+i:2-a-i,s*=60):o=c>0&&c<1?0:s,new ii(s,o,c,e.opacity)}function Fbe(e,t,n,r){return arguments.length===1?QF(e):new ii(e,t,n,r??1)}function ii(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}wA(ii,Fbe,ZF(Fh,{brighter(e){return e=e==null?Tg:Math.pow(Tg,e),new ii(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Uf:Math.pow(Uf,e),new ii(this.h,this.s,this.l*e,this.opacity)},rgb(){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 $n(Fb(e>=240?e-240:e+120,i,r),Fb(e,i,r),Fb(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new ii(gN(this.h),Fp(this.s),Fp(this.l),Og(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Og(this.opacity);return`${e===1?"hsl(":"hsla("}${gN(this.h)}, ${Fp(this.s)*100}%, ${Fp(this.l)*100}%${e===1?")":`, ${e})`}`}}));function gN(e){return e=(e||0)%360,e<0?e+360:e}function Fp(e){return Math.max(0,Math.min(1,e||0))}function Fb(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 SA=e=>()=>e;function Bbe(e,t){return function(n){return e+n*t}}function Ube(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 qbe(e){return(e=+e)==1?JF:function(t,n){return n-t?Ube(t,n,e):SA(isNaN(t)?n:t)}}function JF(e,t){var n=t-e;return n?Bbe(e,n):SA(isNaN(e)?t:e)}const yN=function e(t){var n=qbe(t);function r(i,a){var s=n((i=N1(i)).r,(a=N1(a)).r),o=n(i.g,a.g),c=n(i.b,a.b),u=JF(i.opacity,a.opacity);return function(f){return i.r=s(f),i.g=o(f),i.b=c(f),i.opacity=u(f),i+""}}return r.gamma=e,r}(1);function zbe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function Vbe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Wbe(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),a=new Array(n),s;for(s=0;s<r;++s)i[s]=Lu(e[s],t[s]);for(;s<n;++s)a[s]=t[s];return function(o){for(s=0;s<r;++s)a[s]=i[s](o);return a}}function Hbe(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Ng(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Gbe(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Lu(e[i],t[i]):r[i]=t[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var I1=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Bb=new RegExp(I1.source,"g");function Kbe(e){return function(){return e}}function Ybe(e){return function(t){return e(t)+""}}function Xbe(e,t){var n=I1.lastIndex=Bb.lastIndex=0,r,i,a,s=-1,o=[],c=[];for(e=e+"",t=t+"";(r=I1.exec(e))&&(i=Bb.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),o[s]?o[s]+=a:o[++s]=a),(r=r[0])===(i=i[0])?o[s]?o[s]+=i:o[++s]=i:(o[++s]=null,c.push({i:s,x:Ng(r,i)})),n=Bb.lastIndex;return n<t.length&&(a=t.slice(n),o[s]?o[s]+=a:o[++s]=a),o.length<2?c[0]?Ybe(c[0].x):Kbe(t):(t=c.length,function(u){for(var f=0,d;f<t;++f)o[(d=c[f]).i]=d.x(u);return o.join("")})}function Lu(e,t){var n=typeof t,r;return t==null||n==="boolean"?SA(t):(n==="number"?Ng:n==="string"?(r=zf(t))?(t=r,yN):Xbe:t instanceof zf?yN:t instanceof Date?Hbe:Vbe(t)?zbe:Array.isArray(t)?Wbe:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Gbe:Ng)(e,t)}function jA(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Zbe(e,t){t===void 0&&(t=e,e=Lu);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(s){var o=Math.max(0,Math.min(r-1,Math.floor(s*=r)));return a[o](s-o)}}function Qbe(e){return function(){return e}}function Ig(e){return+e}var vN=[0,1];function _n(e){return e}function R1(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Qbe(isNaN(t)?NaN:.5)}function Jbe(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function e0e(e,t,n){var r=e[0],i=e[1],a=t[0],s=t[1];return i<r?(r=R1(i,r),a=n(s,a)):(r=R1(r,i),a=n(a,s)),function(o){return a(r(o))}}function t0e(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),s=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<r;)i[s]=R1(e[s],e[s+1]),a[s]=n(t[s],t[s+1]);return function(o){var c=Lh(e,o,1,r)-1;return a[c](i[c](o))}}function Bh(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Ev(){var e=vN,t=vN,n=Lu,r,i,a,s=_n,o,c,u;function f(){var h=Math.min(e.length,t.length);return s!==_n&&(s=Jbe(e[0],e[h-1])),o=h>2?t0e:e0e,c=u=null,d}function d(h){return h==null||isNaN(h=+h)?a:(c||(c=o(e.map(r),t,n)))(r(s(h)))}
vendor: 4,247 bytes, line 675
675return d.invert=function(h){return s(i((u||(u=o(t,e.map(r),Ng)))(h)))},d.domain=function(h){return arguments.length?(e=Array.from(h,Ig),f()):e.slice()},d.range=function(h){return arguments.length?(t=Array.from(h),f()):t.slice()},d.rangeRound=function(h){return t=Array.from(h),n=jA,f()},d.clamp=function(h){return arguments.length?(s=h?!0:_n,f()):s!==_n},d.interpolate=function(h){return arguments.length?(n=h,f()):n},d.unknown=function(h){return arguments.length?(a=h,d):a},function(h,p){return r=h,i=p,f()}}function _A(){return Ev()(_n,_n)}function n0e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Rg(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Gc(e){return e=Rg(Math.abs(e)),e?e[1]:NaN}function r0e(e,t){return function(n,r){for(var i=n.length,a=[],s=0,o=e[0],c=0;i>0&&o>0&&(c+o+1>r&&(o=Math.max(1,r-c)),a.push(n.substring(i-=o,i+o)),!((c+=o+1)>r));)o=e[s=(s+1)%e.length];return a.reverse().join(t)}}function i0e(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var a0e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Vf(e){if(!(t=a0e.exec(e)))throw new Error("invalid format: "+e);var t;return new AA({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]})}Vf.prototype=AA.prototype;function AA(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+""}AA.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 s0e(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var eB;function o0e(e,t){var n=Rg(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(eB=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")+Rg(e,Math.max(0,t+a-1))[0]}function xN(e,t){var n=Rg(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 bN={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:n0e,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)=>xN(e*100,t),r:xN,s:o0e,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function wN(e){return e}var SN=Array.prototype.map,jN=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function l0e(e){var t=e.grouping===void 0||e.thousands===void 0?wN:r0e(SN.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?wN:i0e(SN.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(d){d=Vf(d);var h=d.fill,p=d.align,g=d.sign,m=d.symbol,y=d.zero,v=d.width,b=d.comma,x=d.precision,j=d.trim,S=d.type;S==="n"?(b=!0,S="g"):bN[S]||(x===void 0&&(x=12),j=!0,S="g"),(y||h==="0"&&p==="=")&&(y=!0,h="0",p="=");var _=m==="$"?n:m==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",A=m==="$"?r:/[%p]/.test(S)?s:"",k=bN[S],E=/[defgprs%]/.test(S);x=x===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function T(P){var O=_,$=A,R,L,D;if(S==="c")$=k(P)+$,P="";else{P=+P;var M=P<0||1/P<0;if(P=isNaN(P)?c:k(Math.abs(P),x),j&&(P=s0e(P)),M&&+P==0&&g!=="+"&&(M=!1),O
vendor: 4,201 bytes, line 675
675=(M?g==="("?g:o:g==="-"||g==="("?"":g)+O,$=(S==="s"?jN[8+eB/3]:"")+$+(M&&g==="("?")":""),E){for(R=-1,L=P.length;++R<L;)if(D=P.charCodeAt(R),48>D||D>57){$=(D===46?i+P.slice(R+1):P.slice(R))+$,P=P.slice(0,R);break}}}b&&!y&&(P=t(P,1/0));var N=O.length+P.length+$.length,I=N<v?new Array(v-N+1).join(h):"";switch(b&&y&&(P=t(I+P,I.length?v-$.length:1/0),I=""),p){case"<":P=O+P+$+I;break;case"=":P=O+I+P+$;break;case"^":P=I.slice(0,N=I.length>>1)+O+P+$+I.slice(N);break;default:P=I+O+P+$;break}return a(P)}return T.toString=function(){return d+""},T}function f(d,h){var p=u((d=Vf(d),d.type="f",d)),g=Math.max(-8,Math.min(8,Math.floor(Gc(h)/3)))*3,m=Math.pow(10,-g),y=jN[8+g/3];return function(v){return p(m*v)+y}}return{format:u,formatPrefix:f}}var Bp,kA,tB;c0e({thousands:",",grouping:[3],currency:["$",""]});function c0e(e){return Bp=l0e(e),kA=Bp.format,tB=Bp.formatPrefix,Bp}function u0e(e){return Math.max(0,-Gc(Math.abs(e)))}function d0e(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Gc(t)/3)))*3-Gc(Math.abs(e)))}function f0e(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Gc(t)-Gc(e))+1}function nB(e,t,n,r){var i=T1(e,t,n),a;switch(r=Vf(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=d0e(i,s))&&(r.precision=a),tB(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=f0e(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=u0e(i))&&(r.precision=a-(r.type==="%")*2);break}}return kA(r)}function Bs(e){var t=e.domain;return e.ticks=function(n){var r=t();return C1(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return nB(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],o=r[a],c,u,f=10;for(o<s&&(u=s,s=o,o=u,u=i,i=a,a=u);f-- >0;){if(u=P1(s,o,n),u===c)return r[i]=s,r[a]=o,t(r);if(u>0)s=Math.floor(s/u)*u,o=Math.ceil(o/u)*u;else if(u<0)s=Math.ceil(s*u)/u,o=Math.floor(o*u)/u;else break;c=u}return e},e}function Mg(){var e=_A();return e.copy=function(){return Bh(e,Mg())},$r.apply(e,arguments),Bs(e)}function rB(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,Ig),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return rB(e).unknown(t)},e=arguments.length?Array.from(e,Ig):[0,1],Bs(n)}function iB(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],s;return a<i&&(s=n,n=r,r=s,s=i,i=a,a=s),e[n]=t.floor(i),e[r]=t.ceil(a),e}function _N(e){return Math.log(e)}function AN(e){return Math.exp(e)}function h0e(e){return-Math.log(-e)}function p0e(e){return-Math.exp(-e)}function m0e(e){return isFinite(e)?+("1e"+e):e<0?0:e}function g0e(e){return e===10?m0e:e===Math.E?Math.exp:t=>Math.pow(e,t)}function y0e(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 kN(e){return(t,n)=>-e(-t,n)}function EA(e){const t=e(_N,AN),n=t.domain;let r=10,i,a;function s(){return i=y0e(r),a=g0e(r),n()[0]<0?(i=kN(i),a=kN(a),e(h0e,p0e)):e(_N,AN),t}return t.base=function(o){return arguments.length?(r=+o,s()):r},t.domain=function(o){return arguments.length?(n(o),s()):n()},t.ticks=o=>{const c=n();let u=c[0],f=c[c.length-1];const d=f<u;d&&([u,f]=[f,u]);let h=i(u),p=i(f),g,m;const y=o==null?10:+o;let v=[];if(!(r%1)&&p-h<y){if(h=Math.floor(h),p=Math.ceil(p),u>0){for(;h<=p;++h)for(g=1;g<r;++g)if(m=h<0?g/a(-h):g*a(h),!(m<u)){if(m>f)break;v.push(m)}}else for(;h<=p;++h)for(g=r-1;g>=1;--g)if(m=h>0?g/a(-h):g*a(h),!(m<u)){if(m>f)break;v.push(m)}v.length*2<y&&(v=C1(u,f,y))}else v=C1(h,p,Math.min(p-h,y)).map(a);return d?v.reverse():v},t.tickFormat=(o,c)=>{if(o==null&&(o=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=Vf(c)).precision==null&&(c.trim=!0),c=kA(c)),o===1/0)return c;const u=Math.max(1,r*o/t.ticks().length);return f=>{let d=f/a(Math.round(i(f)));return d*r<r-.5&&(d*=r),d<=u?c(f):""}},t.nice=()=>n(iB(n(),{floor:o=>a(Math.floor(i(o))),ceil:o=>a(Math.ceil(i(o)))})),t}function aB(){const e=EA(Ev()).domain([1,10]);return e.copy=()=>Bh(e,aB()).base(e.base()),$r.apply(e,arguments),e}
675function EN(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function CN(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function CA(e){var t=1,n=e(EN(t),CN(t));return n.constant=function(r){return arguments.length?e(EN(t=+r),CN(t)):t},Bs(n)}function sB(){var e=CA(Ev());return e.copy=function(){return Bh(e,sB()).constant(e.constant())},$r.apply(e,arguments)}function PN(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function v0e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function x0e(e){return e<0?-e*e:e*e}function PA(e){var t=e(_n,_n),n=1;function r(){return n===1?e(_n,_n):n===.5?e(v0e,x0e):e(PN(n),PN(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Bs(t)}function TA(){var e=PA(Ev());return e.copy=function(){return Bh(e,TA()).exponent(e.exponent())},$r.apply(e,arguments),e}function b0e(){return TA.apply(null,arguments).exponent(.5)}function TN(e){return Math.sign(e)*e*e}function w0e(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function oB(){var e=_A(),t=[0,1],n=!1,r;function i(a){var s=w0e(e(a));return isNaN(s)?r:n?Math.round(s):s}return i.invert=function(a){return e.invert(TN(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,Ig)).map(TN)),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 oB(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},$r.apply(i,arguments),Bs(i)}function lB(){var e=[],t=[],n=[],r;function i(){var s=0,o=Math.max(1,t.length);for(n=new Array(o-1);++s<o;)n[s-1]=kbe(e,s/o);return a}function a(s){return s==null||isNaN(s=+s)?r:t[Lh(n,s)]}return a.invertExtent=function(s){var o=t.indexOf(s);return o<0?[NaN,NaN]:[o>0?n[o-1]:e[0],o<n.length?n[o]:e[e.length-1]]},a.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let o of s)o!=null&&!isNaN(o=+o)&&e.push(o);return e.sort(ms),i()},a.range=function(s){return arguments.length?(t=Array.from(s),i()):t.slice()},a.unknown=function(s){return arguments.length?(r=s,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return lB().domain(e).range(t).unknown(r)},$r.apply(a,arguments)}function cB(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function s(c){return c!=null&&c<=c?i[Lh(r,c,0,n)]:a}function o(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*t-(c-n)*e)/(n+1);return s}return s.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,o()):[e,t]},s.range=function(c){return arguments.length?(n=(i=Array.from(c)).length-1,o()):i.slice()},s.invertExtent=function(c){var u=i.indexOf(c);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},s.unknown=function(c){return arguments.length&&(a=c),s},s.thresholds=function(){return r.slice()},s.copy=function(){return cB().domain([e,t]).range(i).unknown(a)},$r.apply(Bs(s),arguments)}function uB(){var e=[.5],t=[0,1],n,r=1;function i(a){return a!=null&&a<=a?t[Lh(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 uB().domain(e).range(t).unknown(n)},$r.apply(i,arguments)}const Ub=new Date,qb=new Date;function Wt(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),o=i.ceil(a);return a-s<o-a?s:o},i.offset=(a,s)=>(t(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,o)=>{const c=[];if(a=i.ceil(a),o=o==null?1:Math.floor(o),!(a<s)||!(o>0))return c;let u;do c.push(u=new Date(+a)),t(a,o),e(a);while(u<a&&a<s);return c},i.filter=a=>Wt(s=>{if(s>=s)for(;e(s),!a(s);)s.setTime(s-1)},(s,o)=>
vendor: 4,390 bytes, line 675
675{if(s>=s)if(o<0)for(;++o<=0;)for(;t(s,-1),!a(s););else for(;--o>=0;)for(;t(s,1),!a(s););}),n&&(i.count=(a,s)=>(Ub.setTime(+a),qb.setTime(+s),e(Ub),e(qb),Math.floor(n(Ub,qb))),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 $g=Wt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);$g.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Wt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):$g);$g.range;const Ji=1e3,jr=Ji*60,ea=jr*60,ma=ea*24,OA=ma*7,ON=ma*30,zb=ma*365,jo=Wt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ji)},(e,t)=>(t-e)/Ji,e=>e.getUTCSeconds());jo.range;const NA=Wt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ji)},(e,t)=>{e.setTime(+e+t*jr)},(e,t)=>(t-e)/jr,e=>e.getMinutes());NA.range;const IA=Wt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*jr)},(e,t)=>(t-e)/jr,e=>e.getUTCMinutes());IA.range;const RA=Wt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ji-e.getMinutes()*jr)},(e,t)=>{e.setTime(+e+t*ea)},(e,t)=>(t-e)/ea,e=>e.getHours());RA.range;const MA=Wt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ea)},(e,t)=>(t-e)/ea,e=>e.getUTCHours());MA.range;const Uh=Wt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*jr)/ma,e=>e.getDate()-1);Uh.range;const Cv=Wt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ma,e=>e.getUTCDate()-1);Cv.range;const dB=Wt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ma,e=>Math.floor(e/ma));dB.range;function ol(e){return Wt(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())*jr)/OA)}const Pv=ol(0),Dg=ol(1),S0e=ol(2),j0e=ol(3),Kc=ol(4),_0e=ol(5),A0e=ol(6);Pv.range;Dg.range;S0e.range;j0e.range;Kc.range;_0e.range;A0e.range;function ll(e){return Wt(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)/OA)}const Tv=ll(0),Lg=ll(1),k0e=ll(2),E0e=ll(3),Yc=ll(4),C0e=ll(5),P0e=ll(6);Tv.range;Lg.range;k0e.range;E0e.range;Yc.range;C0e.range;P0e.range;const $A=Wt(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());$A.range;const DA=Wt(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());DA.range;const ga=Wt(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());ga.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Wt(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)});ga.range;const ya=Wt(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());ya.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Wt(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)});ya.range;function fB(e,t,n,r,i,a){const s=[[jo,1,Ji],[jo,5,5*Ji],[jo,15,15*Ji],[jo,30,30*Ji],[a,1,jr],[a,5,5*jr],[a,15,15*jr],[a,30,30*jr],[i,1,ea],[i,3,3*ea],[i,6,6*ea],[i,12,12*ea],[r,1,ma],[r,2,2*ma],[n,1,OA],[t,1,ON],[t,3,3*ON],[e,1,zb]];function o(u,f,d){const h=f<u;h&&([u,f]=[f,u]);const p=d&&typeof d.range=="function"?d:c(u,f,d),g=p?p.range(u,+f+1):[];return h?g.reverse():g}function c(u,f,d){const h=Math.abs(f-u)/d,p=xA(([,,y])=>y).right(s,h);if(p===s.length)return e.every(T1(u/zb,f/zb,d));if(p===0)return $g.every(Math.max(T1(u,f,d),1));const[g,m]=s[h/s[p-1][2]<s[p][2]/h?p-1:p];return g.every(m)}return[o,c]}const[T0e,O0e]=fB(ya,DA,Tv,dB,MA,IA),[N0e,I0e]=fB(ga,$A,Pv,Uh,RA,NA);function Vb(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Wb(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}
vendor: 8,495 bytes, line 675
675function od(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function R0e(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,s=e.shortDays,o=e.months,c=e.shortMonths,u=ld(i),f=cd(i),d=ld(a),h=cd(a),p=ld(s),g=cd(s),m=ld(o),y=cd(o),v=ld(c),b=cd(c),x={a:M,A:N,b:I,B:F,c:null,d:DN,e:DN,f:rwe,g:hwe,G:mwe,H:ewe,I:twe,j:nwe,L:hB,m:iwe,M:awe,p:V,q:U,Q:BN,s:UN,S:swe,u:owe,U:lwe,V:cwe,w:uwe,W:dwe,x:null,X:null,y:fwe,Y:pwe,Z:gwe,"%":FN},j={a:G,A:te,b:xe,B:Me,c:null,d:LN,e:LN,f:bwe,g:Twe,G:Nwe,H:ywe,I:vwe,j:xwe,L:mB,m:wwe,M:Swe,p:Y,q:we,Q:BN,s:UN,S:jwe,u:_we,U:Awe,V:kwe,w:Ewe,W:Cwe,x:null,X:null,y:Pwe,Y:Owe,Z:Iwe,"%":FN},S={a:T,A:P,b:O,B:$,c:R,d:MN,e:MN,f:X0e,g:RN,G:IN,H:$N,I:$N,j:H0e,L:Y0e,m:W0e,M:G0e,p:E,q:V0e,Q:Q0e,s:J0e,S:K0e,u:F0e,U:B0e,V:U0e,w:L0e,W:q0e,x:L,X:D,y:RN,Y:IN,Z:z0e,"%":Z0e};x.x=_(n,x),x.X=_(r,x),x.c=_(t,x),j.x=_(n,j),j.X=_(r,j),j.c=_(t,j);function _(W,Q){return function(Z){var B=[],Te=-1,be=0,Qe=W.length,Ye,wt,Nn;for(Z instanceof Date||(Z=new Date(+Z));++Te<Qe;)W.charCodeAt(Te)===37&&(B.push(W.slice(be,Te)),(wt=NN[Ye=W.charAt(++Te)])!=null?Ye=W.charAt(++Te):wt=Ye==="e"?" ":"0",(Nn=Q[Ye])&&(Ye=Nn(Z,wt)),B.push(Ye),be=Te+1);return B.push(W.slice(be,Te)),B.join("")}}function A(W,Q){return function(Z){var B=od(1900,void 0,1),Te=k(B,W,Z+="",0),be,Qe;if(Te!=Z.length)return null;if("Q"in B)return new Date(B.Q);if("s"in B)return new Date(B.s*1e3+("L"in B?B.L:0));if(Q&&!("Z"in B)&&(B.Z=0),"p"in B&&(B.H=B.H%12+B.p*12),B.m===void 0&&(B.m="q"in B?B.q:0),"V"in B){if(B.V<1||B.V>53)return null;"w"in B||(B.w=1),"Z"in B?(be=Wb(od(B.y,0,1)),Qe=be.getUTCDay(),be=Qe>4||Qe===0?Lg.ceil(be):Lg(be),be=Cv.offset(be,(B.V-1)*7),B.y=be.getUTCFullYear(),B.m=be.getUTCMonth(),B.d=be.getUTCDate()+(B.w+6)%7):(be=Vb(od(B.y,0,1)),Qe=be.getDay(),be=Qe>4||Qe===0?Dg.ceil(be):Dg(be),be=Uh.offset(be,(B.V-1)*7),B.y=be.getFullYear(),B.m=be.getMonth(),B.d=be.getDate()+(B.w+6)%7)}else("W"in B||"U"in B)&&("w"in B||(B.w="u"in B?B.u%7:"W"in B?1:0),Qe="Z"in B?Wb(od(B.y,0,1)).getUTCDay():Vb(od(B.y,0,1)).getDay(),B.m=0,B.d="W"in B?(B.w+6)%7+B.W*7-(Qe+5)%7:B.w+B.U*7-(Qe+6)%7);return"Z"in B?(B.H+=B.Z/100|0,B.M+=B.Z%100,Wb(B)):Vb(B)}}function k(W,Q,Z,B){for(var Te=0,be=Q.length,Qe=Z.length,Ye,wt;Te<be;){if(B>=Qe)return-1;if(Ye=Q.charCodeAt(Te++),Ye===37){if(Ye=Q.charAt(Te++),wt=S[Ye in NN?Q.charAt(Te++):Ye],!wt||(B=wt(W,Z,B))<0)return-1}else if(Ye!=Z.charCodeAt(B++))return-1}return B}function E(W,Q,Z){var B=u.exec(Q.slice(Z));return B?(W.p=f.get(B[0].toLowerCase()),Z+B[0].length):-1}function T(W,Q,Z){var B=p.exec(Q.slice(Z));return B?(W.w=g.get(B[0].toLowerCase()),Z+B[0].length):-1}function P(W,Q,Z){var B=d.exec(Q.slice(Z));return B?(W.w=h.get(B[0].toLowerCase()),Z+B[0].length):-1}function O(W,Q,Z){var B=v.exec(Q.slice(Z));return B?(W.m=b.get(B[0].toLowerCase()),Z+B[0].length):-1}function $(W,Q,Z){var B=m.exec(Q.slice(Z));return B?(W.m=y.get(B[0].toLowerCase()),Z+B[0].length):-1}function R(W,Q,Z){return k(W,t,Q,Z)}function L(W,Q,Z){return k(W,n,Q,Z)}function D(W,Q,Z){return k(W,r,Q,Z)}function M(W){return s[W.getDay()]}function N(W){return a[W.getDay()]}function I(W){return c[W.getMonth()]}function F(W){return o[W.getMonth()]}function V(W){return i[+(W.getHours()>=12)]}function U(W){return 1+~~(W.getMonth()/3)}function G(W){return s[W.getUTCDay()]}function te(W){return a[W.getUTCDay()]}function xe(W){return c[W.getUTCMonth()]}function Me(W){return o[W.getUTCMonth()]}function Y(W){return i[+(W.getUTCHours()>=12)]}function we(W){return 1+~~(W.getUTCMonth()/3)}return{format:function(W){var Q=_(W+="",x);return Q.toString=function(){return W},Q},parse:function(W){var Q=A(W+="",!1);return Q.toString=function(){return W},Q},utcFormat:function(W){var Q=_(W+="",j);return Q.toString=function(){return W},Q},utcParse:function(W){var Q=A(W+="",!0);return Q.toString=function(){return W},Q}}}var NN={"-":"",_:" ",0:"0"},Xt=/^\s*\d+/,M0e=/^%/,$0e=/[\\^$*+?|[\]().{}]/g;function Ue(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function D0e(e){return e.replace($0e,"\\$&")}function ld(e){return new RegExp("^(?:"+e.map(D0e).join("|")+")","i")}function cd(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function L0e(e,t,n){var r=Xt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function F0e(e,t,n){var r=Xt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function B0e(e,t,n){var r=Xt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function U0e(e,t,n){var r=Xt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function q0e(e,t,n){var r=Xt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function IN(e,t,n){var r=Xt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function RN(e,t,n){var r=Xt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function z0e(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 V0e(e,t,n){var r=Xt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function W0e(e,t,n){var r=Xt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function MN(e,t,n){var r=Xt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function H0e(e,t,n){var r=Xt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function $N(e,t,n){var r=Xt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function G0e(e,t,n){var r=Xt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function K0e(e,t,n){var r=Xt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Y0e(e,t,n){var r=Xt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function X0e(e,t,n){var r=Xt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Z0e(e,t,n){var r=M0e.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Q0e(e,t,n){var r=Xt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function J0e(e,t,n){var r=Xt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function DN(e,t){return Ue(e.getDate(),t,2)}function ewe(e,t){return Ue(e.getHours(),t,2)}function twe(e,t){return Ue(e.getHours()%12||12,t,2)}function nwe(e,t){return Ue(1+Uh.count(ga(e),e),t,3)}function hB(e,t){return Ue(e.getMilliseconds(),t,3)}function rwe(e,t){return hB(e,t)+"000"}function iwe(e,t){return Ue(e.getMonth()+1,t,2)}function awe(e,t){return Ue(e.getMinutes(),t,2)}function swe(e,t){return Ue(e.getSeconds(),t,2)}function owe(e){var t=e.getDay();return t===0?7:t}function lwe(e,t){return Ue(Pv.count(ga(e)-1,e),t,2)}function pB(e){var t=e.getDay();return t>=4||t===0?Kc(e):Kc.ceil(e)}function cwe(e,t){return e=pB(e),Ue(Kc.count(ga(e),e)+(ga(e).getDay()===4),t,2)}function uwe(e){return e.getDay()}function dwe(e,t){return Ue(Dg.count(ga(e)-1,e),t,2)}function fwe(e,t){return Ue(e.getFullYear()%100,t,2)}function hwe(e,t){return e=pB(e),Ue(e.getFullYear()%100,t,2)}function pwe(e,t){return Ue(e.getFullYear()%1e4,t,4)}function mwe(e,t){var n=e.getDay();return e=n>=4||n===0?Kc(e):Kc.ceil(e),Ue(e.getFullYear()%1e4,t,4)}function gwe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ue(t/60|0,"0",2)+Ue(t%60,"0",2)}function LN(e,t){return Ue(e.getUTCDate(),t,2)}function ywe(e,t){return Ue(e.getUTCHours(),t,2)}function vwe(e,t){return Ue(e.getUTCHours()%12||12,t,2)}function xwe(e,t){return Ue(1+Cv.count(ya(e),e),t,3)}function mB(e,t){return Ue(e.getUTCMilliseconds(),t,3)}function bwe(e,t){return mB(e,t)+"000"}function wwe(e,t){return Ue(e.getUTCMonth()+1,t,2)}function Swe(e,t){return Ue(e.getUTCMinutes(),t,2)}function jwe(e,t){return Ue(e.getUTCSeconds(),t,2)}function _we(e){var t=e.getUTCDay();return t===0?7:t}function Awe(e,t){return Ue(Tv.count(ya(e)-1,e),t,2)}function gB(e){var t=e.getUTCDay();return t>=4||t===0?Yc(e):Yc.ceil(e)}function kwe(e,t){return e=gB(e),Ue(Yc.count(ya(e),e)+(ya(e).getUTCDay()===4),t,2)}function Ewe(e){return e.getUTCDay()}function Cwe(e,t){return Ue(Lg.count(ya(e)-1,e),t,2)}function Pwe(e,t){return Ue(e.getUTCFullYear()%100,t,2)}function Twe(e,t){return e=gB(e),Ue(e.getUTCFullYear()%100,t,2)}function Owe(e,t){return Ue(e.getUTCFullYear()%1e4,t,4)}function Nwe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Yc(e):Yc.ceil(e),Ue(e.getUTCFullYear()%1e4,t,4)}function Iwe(){return"+0000"}function FN(){return"%"}function BN(e){return+e}function UN(e){return Math.floor(+e/1e3)}var kl,yB,vB;Rwe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
675ay","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 Rwe(e){return kl=R0e(e),yB=kl.format,kl.parse,vB=kl.utcFormat,kl.utcParse,kl}function Mwe(e){return new Date(e)}function $we(e){return e instanceof Date?+e:+new Date(+e)}function LA(e,t,n,r,i,a,s,o,c,u){var f=_A(),d=f.invert,h=f.domain,p=u(".%L"),g=u(":%S"),m=u("%I:%M"),y=u("%I %p"),v=u("%a %d"),b=u("%b %d"),x=u("%B"),j=u("%Y");function S(_){return(c(_)<_?p:o(_)<_?g:s(_)<_?m:a(_)<_?y:r(_)<_?i(_)<_?v:b:n(_)<_?x:j)(_)}return f.invert=function(_){return new Date(d(_))},f.domain=function(_){return arguments.length?h(Array.from(_,$we)):h().map(Mwe)},f.ticks=function(_){var A=h();return e(A[0],A[A.length-1],_??10)},f.tickFormat=function(_,A){return A==null?S:u(A)},f.nice=function(_){var A=h();return(!_||typeof _.range!="function")&&(_=t(A[0],A[A.length-1],_??10)),_?h(iB(A,_)):f},f.copy=function(){return Bh(f,LA(e,t,n,r,i,a,s,o,c,u))},f}function Dwe(){return $r.apply(LA(N0e,I0e,ga,$A,Pv,Uh,RA,NA,jo,yB).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Lwe(){return $r.apply(LA(T0e,O0e,ya,DA,Tv,Cv,MA,IA,jo,vB).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Ov(){var e=0,t=1,n,r,i,a,s=_n,o=!1,c;function u(d){return d==null||isNaN(d=+d)?c:s(i===0?.5:(d=(a(d)-n)*i,o?Math.max(0,Math.min(1,d)):d))}u.domain=function(d){return arguments.length?([e,t]=d,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(d){return arguments.length?(o=!!d,u):o},u.interpolator=function(d){return arguments.length?(s=d,u):s};function f(d){return function(h){var p,g;return arguments.length?([p,g]=h,s=d(p,g),u):[s(0),s(1)]}}return u.range=f(Lu),u.rangeRound=f(jA),u.unknown=function(d){return arguments.length?(c=d,u):c},function(d){return a=d,n=d(e),r=d(t),i=n===r?0:1/(r-n),u}}function Us(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function xB(){var e=Bs(Ov()(_n));return e.copy=function(){return Us(e,xB())},Ea.apply(e,arguments)}function bB(){var e=EA(Ov()).domain([1,10]);return e.copy=function(){return Us(e,bB()).base(e.base())},Ea.apply(e,arguments)}function wB(){var e=CA(Ov());return e.copy=function(){return Us(e,wB()).constant(e.constant())},Ea.apply(e,arguments)}function FA(){var e=PA(Ov());return e.copy=function(){return Us(e,FA()).exponent(e.exponent())},Ea.apply(e,arguments)}function Fwe(){return FA.apply(null,arguments).exponent(.5)}function SB(){var e=[],t=_n;function n(r){if(r!=null&&!isNaN(r=+r))return t((Lh(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(ms),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,a)=>Abe(e,a/r))},n.copy=function(){return SB(t).domain(e)},Ea.apply(n,arguments)}function Nv(){var e=0,t=.5,n=1,r=1,i,a,s,o,c,u=_n,f,d=!1,h;function p(m){return isNaN(m=+m)?h:(m=.5+((m=+f(m))-a)*(r*m<r*a?o:c),u(d?Math.max(0,Math.min(1,m)):m))}p.domain=function(m){return arguments.length?([e,t,n]=m,i=f(e=+e),a=f(t=+t),s=f(n=+n),o=i===a?0:.5/(a-i),c=a===s?0:.5/(s-a),r=a<i?-1:1,p):[e,t,n]},p.clamp=function(m){return arguments.length?(d=!!m,p):d},p.interpolator=function(m){return arguments.length?(u=m,p):u};function g(m){return function(y){var v,b,x;return arguments.length?([v,b,x]=y,u=Zbe(m,[v,b,x]),p):[u(0),u(.5),u(1)]}}return p.range=g(Lu),p.rangeRound=g(jA),p.unknown=function(m){return arguments.length?(h=m,p):h},function(m){return f=m,i=m(e),a=m(t),s=m(n),o=i===a?0:.5/(a-i),c=a===s?0:.5/(s-a),r=a<i?-1:1,p}}function jB(){var e=Bs(Nv()(_n));return e.copy=function(){return Us(e,jB())},Ea.apply(e,arguments)}function _B(){var e=EA(Nv()).domain([.1,1,10]);return e.copy=function(){return Us(e,_B()).base(e.base())},Ea.apply(e,arguments)}function AB(){var e=CA(Nv());return e.copy=function(){return Us(e,AB()).constant(e.constant())},Ea.apply(e,arguments)}function BA(){var e=PA(Nv());return e.copy=function(){return Us(e,BA()).exponent(e.exponent())},Ea.apply(e,arguments)}function Bwe(){return BA.apply(null,arguments).exponent(.5)}const qN=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Bf,scaleDiverging:jB,scaleDivergingLog:_B,scaleDivergingPow:BA,scaleDivergingSqrt:Bwe,scaleDivergingSymlog:AB,scaleIdentity:rB,scaleImplicit:O1,scaleLinear:Mg,scaleLog:aB,scaleOrdinal:bA,scalePoint:qd,scalePow:TA,scaleQuantile:lB,scaleQuantize:cB,scaleRadial:oB,scaleSequential:xB,scaleSequentialLog:bB,scaleSequentialPow:FA,scaleSequentialQuantile:SB,scaleSequentialSqrt:Fwe,scaleSequentialSymlog:wB,scaleSqrt:b0e,scaleSymlog:sB,scaleThreshold:uB,scaleTime:Dwe,scaleUtc:Lwe,tickFormat:nB},Symbol.toStringTag,{value:"Module"}));var Uwe=Tu;function qwe(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],s=t(a);if(s!=null&&(o===void 0?s===s&&!Uwe(s):n(s,o)))var o=s,c=a}return c}var Iv=qwe;function zwe(e,t){return e>t}var kB=zwe,Vwe=Iv,Wwe=kB,Hwe=Du;function Gwe(e){return e&&e.length?Vwe(e,Hwe,Wwe):void 0}var Kwe=Gwe;const Rv=qe(Kwe);function Ywe(e,t){return e<t}var EB=Ywe,Xwe=Iv,Zwe=EB,Qwe=Du;function Jwe(e){return e&&e.length?Xwe(e,Qwe,Zwe):void 0}var e1e=Jwe;
vendor: 62,445 bytes, lines 675-702
675const Mv=qe(e1e);var t1e=J_,n1e=Fs,r1e=MF,i1e=Un;function a1e(e,t){var n=i1e(e)?t1e:r1e;return n(e,n1e(t))}var s1e=a1e,o1e=IF,l1e=s1e;function c1e(e,t){return o1e(l1e(e,t),1)}var u1e=c1e;const d1e=qe(u1e);var f1e=mA;function h1e(e,t){return f1e(e,t)}var p1e=h1e;const $v=qe(p1e);var Fu=1e9,m1e={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},qA,pt=!0,Pr="[DecimalError] ",Do=Pr+"Invalid argument: ",UA=Pr+"Exponent out of range: ",Bu=Math.floor,lo=Math.pow,g1e=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Qn,Ht=1e7,ut=7,CB=9007199254740991,Fg=Bu(CB/ut),re={};re.absoluteValue=re.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};re.comparedTo=re.cmp=function(e){var t,n,r,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1};re.decimalPlaces=re.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*ut;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};re.dividedBy=re.div=function(e){return aa(this,new this.constructor(e))};re.dividedToIntegerBy=re.idiv=function(e){var t=this,n=t.constructor;return et(aa(t,new n(e),0,1),n.precision)};re.equals=re.eq=function(e){return!this.cmp(e)};re.exponent=function(){return Mt(this)};re.greaterThan=re.gt=function(e){return this.cmp(e)>0};re.greaterThanOrEqualTo=re.gte=function(e){return this.cmp(e)>=0};re.isInteger=re.isint=function(){return this.e>this.d.length-2};re.isNegative=re.isneg=function(){return this.s<0};re.isPositive=re.ispos=function(){return this.s>0};re.isZero=function(){return this.s===0};re.lessThan=re.lt=function(e){return this.cmp(e)<0};re.lessThanOrEqualTo=re.lte=function(e){return this.cmp(e)<1};re.logarithm=re.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(Qn))throw Error(Pr+"NaN");if(n.s<1)throw Error(Pr+(n.s?"NaN":"-Infinity"));return n.eq(Qn)?new r(0):(pt=!1,t=aa(Wf(n,a),Wf(e,a),a),pt=!0,et(t,i))};re.minus=re.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?OB(t,e):PB(t,(e.s=-e.s,e))};re.modulo=re.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Pr+"NaN");return n.s?(pt=!1,t=aa(n,e,0,1).times(e),pt=!0,n.minus(t)):et(new r(n),i)};re.naturalExponential=re.exp=function(){return TB(this)};re.naturalLogarithm=re.ln=function(){return Wf(this)};re.negated=re.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};re.plus=re.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?PB(t,e):OB(t,(e.s=-e.s,e))};re.precision=re.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Do+e);if(t=Mt(i)+1,r=i.d.length-1,n=r*ut+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};re.squareRoot=re.sqrt=function(){var e,t,n,r,i,a,s,o=this,c=o.constructor;if(o.s<1){if(!o.s)return new c(0);throw Error(Pr+"NaN")}for(e=Mt(o),pt=!1,i=Math.sqrt(+o),i==0||i==1/0?(t=ki(o.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Bu((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 c(t)):r=new c(i.toString()),n=c.precision,i=s=n+3;;)if(a=r,r=a.plus(aa(o,a,s+2)).times(.5),ki(a.d).slice(0,s)===(t=ki(r.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(et(a,n+1,0),a.times(a).eq(o)){r=a;break}}else if(t!="9999")break;s+=4}return pt=!0,et(r,n)};re.times=re.mul=function(e){var t,n,r,i,a,s,o,c,u,f=this,d=f.constructor,h=f.d,p=(e=new d(e)).d;if(!f.s||!e.s)return new d(0);for(e.s*=f.s,n=f.e+e.e,c=h.length,u=p.length,c<u&&(a=h,h=p,p=a,s=c,c=u,u=s),a=[],s=c+u,r=s;r--;)a.push(0);for(r=u;--r>=0;){for(t=0,i=c+r;i>r;)o=a[i]+p[r]*h[i-r-1]+t,a[i--]=o%Ht|0,t=o/Ht|0;a[i]=(a[i]+t)%Ht|0}for(;!a[--s];)a.pop();return t?++n:a.shift(),e.d=a,e.e=n,pt?et(e,d.precision):e};re.toDecimalPlaces=re.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Di(e,0,Fu),t===void 0?t=r.rounding:Di(t,0,8),et(n,e+Mt(n)+1,t))};re.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Zo(r,!0):(Di(e,0,Fu),t===void 0?t=i.rounding:Di(t,0,8),r=et(new i(r),e+1,t),n=Zo(r,!0,e+1)),n};re.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?Zo(i):(Di(e,0,Fu),t===void 0?t=a.rounding:Di(t,0,8),r=et(new a(i),e+Mt(i)+1,t),n=Zo(r.abs(),!1,e+Mt(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};re.toInteger=re.toint=function(){var e=this,t=e.constructor;return et(new t(e),Mt(e)+1,t.rounding)};re.toNumber=function(){return+this};re.toPower=re.pow=function(e){var t,n,r,i,a,s,o=this,c=o.constructor,u=12,f=+(e=new c(e));if(!e.s)return new c(Qn);if(o=new c(o),!o.s){if(e.s<1)throw Error(Pr+"Infinity");return o}if(o.eq(Qn))return o;if(r=c.precision,e.eq(Qn))return et(o,r);if(t=e.e,n=e.d.length-1,s=t>=n,a=o.s,s){if((n=f<0?-f:f)<=CB){for(i=new c(Qn),t=Math.ceil(r/ut+4),pt=!1;n%2&&(i=i.times(o),VN(i.d,t)),n=Bu(n/2),n!==0;)o=o.times(o),VN(o.d,t);return pt=!0,e.s<0?new c(Qn).div(i):et(i,r)}}else if(a<0)throw Error(Pr+"NaN");return a=a<0&&e.d[Math.max(t,n)]&1?-1:1,o.s=1,pt=!1,i=e.times(Wf(o,r+u)),pt=!0,i=TB(i),i.s=a,i};re.toPrecision=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?(n=Mt(i),r=Zo(i,n<=a.toExpNeg||n>=a.toExpPos)):(Di(e,1,Fu),t===void 0?t=a.rounding:Di(t,0,8),i=et(new a(i),e,t),n=Mt(i),r=Zo(i,e<=n||n<=a.toExpNeg,e)),r};re.toSignificantDigits=re.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Di(e,1,Fu),t===void 0?t=r.rounding:Di(t,0,8)),et(new r(n),e,t)};re.toString=re.valueOf=re.val=re.toJSON=re[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Mt(e),n=e.constructor;return Zo(e,t<=n.toExpNeg||t>=n.toExpPos)};function PB(e,t){var n,r,i,a,s,o,c,u,f=e.constructor,d=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),pt?et(t,d):t;if(c=e.d,u=t.d,s=e.e,i=t.e,c=c.slice(),a=s-i,a){for(a<0?(r=c,a=-a,o=u.length):(r=u,i=s,o=c.length),s=Math.ceil(d/ut),o=s>o?s+1:o+1,a>o&&(a=o,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(o=c.length,a=u.length,o-a<0&&(a=o,r=u,u=c,c=r),n=0;a;)n=(c[--a]=c[a]+u[a]+n)/Ht|0,c[a]%=Ht;for(n&&(c.unshift(n),++i),o=c.length;c[--o]==0;)c.pop();return t.d=c,t.e=i,pt?et(t,d):t}function Di(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Do+e)}function ki(e){var t,n,r,i=e.length-1,a="",s=e[0];if(i>0){for(a+=s,t=1;t<i;t++)r=e[t]+"",n=ut-r.length,n&&(a+=Va(n)),a+=r;s=e[t],r=s+"",n=ut-r.length,n&&(a+=Va(n))}else if(s===0)return"0";for(;s%10===0;)s/=10;return a+s}var aa=function(){function e(r,i){var a,s=0,o=r.length;for(r=r.slice();o--;)a=r[o]*i+s,r[o]=a%Ht|0,s=a/Ht|0;return s&&r.unshift(s),r}function t(r,i,a,s){var o,c;if(a!=s)c=a>s?1:-1;else for(o=c=0;o<a;o++)if(r[o]!=i[o]){c=r[o]>i[o]?1:-1;break}return c}function n(r,i,a){for(var s=0;a--;)r[a]-=s,s=r[a]<i[a]?1:0,r[a]=s*Ht+r[a]-i[a];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,a,s){var o,c,u,f,d,h,p,g,m,y,v,b,x,j,S,_,A,k,E=r.constructor,T=r.s==i.s?1:-1,P=r.d,O=i.d;if(!r.s)return new E(r);if(!i.s)throw Error(Pr+"Division by zero");for(c=r.e-i.e,A=O.length,S=P.length,p=new E(T),g=p.d=[],u=0;O[u]==(P[u]||0);)++u;if(O[u]>(P[u]||0)&&--c,a==null?b=a=E.precision:s?b=a+(Mt(r)-Mt(i))+1:b=a,b<0)return new E(0);if(b=b/ut+2|0,u=0,A==1)for(f=0,O=O[0],b++;(u<S||f)&&b--;u++)x=f*Ht+(P[u]||0),g[u]=x/O|0,f=x%O|0;else{for(f=Ht/(O[0]+1)|0,f>1&&(O=e(O,f),P=e(P,f),A=O.length,S=P.length),j=A,m=P.slice(0,A),y=m.length;y<A;)m[y++]=0;k=O.slice(),k.unshift(0),_=O[0],O[1]>=Ht/2&&++_;do f=0,o=t(O,m,A,y),o<0?(v=m[0],A!=y&&(v=v*Ht+(m[1]||0)),f=v/_|0,f>1?(f>=Ht&&(f=Ht-1),d=e(O,f),h=d.length,y=m.length,o=t(d,m,h,y),o==1&&(f--,n(d,A<h?k:O,h))):(f==0&&(o=f=1),d=O.slice()),h=d.length,h<y&&d.unshift(0),n(m,d,y),o==-1&&(y=m.length,o=t(O,m,A,y),o<1&&(f++,n(m,A<y?k:O,y))),y=m.length):o===0&&(f++,m=[0]),g[u++]=f,o&&m[0]?m[y++]=P[j]||0:(m=[P[j]],y=1);while((j++<S||m[0]!==void 0)&&b--)}return g[0]||g.shift(),p.e=c,et(p,s?a+Mt(p)+1:a)}}();function TB(e,t){var n,r,i,a,s,o,c=0,u=0,f=e.constructor,d=f.precision;if(Mt(e)>16)throw Error(UA+Mt(e));if(!e.s)return new f(Qn);for(t==null?(pt=!1,o=d):o=t,s=new f(.03125);e.abs().gte(.1);)e=e.times(s),u+=5;for(r=Math.log(lo(2,u))/Math.LN10*2+5|0,o+=r,n=i=a=new f(Qn),f.precision=o;;){if(i=et(i.times(e),o),n=n.times(++c),s=a.plus(aa(i,n,o)),ki(s.d).slice(0,o)===ki(a.d).slice(0,o)){for(;u--;)a=et(a.times(a),o);return f.precision=d,t==null?(pt=!0,et(a,d)):a}a=s}}function Mt(e){for(var t=e.e*ut,n=e.d[0];n>=10;n/=10)t++;return t}function Hb(e,t,n){if(t>e.LN10.sd())throw pt=!0,n&&(e.precision=n),Error(Pr+"LN10 precision limit exceeded");return et(new e(e.LN10),t)}function Va(e){for(var t="";e--;)t+="0";return t}function Wf(e,t){var n,r,i,a,s,o,c,u,f,d=1,h=10,p=e,g=p.d,m=p.constructor,y=m.precision;if(p.s<1)throw Error(Pr+(p.s?"NaN":"-Infinity"));if(p.eq(Qn))return new m(0);if(t==null?(pt=!1,u=y):u=t,p.eq(10))return t==null&&(pt=!0),Hb(m,u);if(u+=h,m.precision=u,n=ki(g),r=n.charAt(0),a=Mt(p),Math.abs(a)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=ki(p.d),r=n.charAt(0),d++;a=Mt(p),r>1?(p=new m("0."+n),a++):p=new m(r+"."+n.slice(1))}else return c=Hb(m,u+2,y).times(a+""),p=Wf(new m(r+"."+n.slice(1)),u-h).plus(c),m.precision=y,t==null?(pt=!0,et(p,y)):p;for(o=s=p=aa(p.minus(Qn),p.plus(Qn),u),f=et(p.times(p),u),i=3;;){if(s=et(s.times(f),u),c=o.plus(aa(s,new m(i),u)),ki(c.d).slice(0,u)===ki(o.d).slice(0,u))return o=o.times(2),a!==0&&(o=o.plus(Hb(m,u+2,y).times(a+""))),o=aa(o,new m(d),u),m.precision=y,t==null?(pt=!0,et(o,y)):o;o=c,i+=2}}function zN(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=Bu(n/ut),e.d=[],r=(n+1)%ut,n<0&&(r+=ut),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=ut;r<i;)e.d.push(+t.slice(r,r+=ut));t=t.slice(r),r=ut-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),pt&&(e.e>Fg||e.e<-Fg))throw Error(UA+n)}else e.s=0,e.e=0,e.d=[0];return e}function et(e,t,n){var r,i,a,s,o,c,u,f,d=e.d;for(s=1,a=d[0];a>=10;a/=10)s++;if(r=t-s,r<0)r+=ut,i=t,u=d[f=0];else{if(f=Math.ceil((r+1)/ut),a=d.length,f>=a)return e;for(u=a=d[f],s=1;a>=10;a/=10)s++;r%=ut,i=r-ut+s}if(n!==void 0&&(a=lo(10,s-i-1),o=u/a%10|0,c=t<0||d[f+1]!==void 0||u%a,c=n<4?(o||c)&&(n==0||n==(e.s<0?3:2)):o>5||o==5&&(n==4||c||n==6&&(r>0?i>0?u/lo(10,s-i):0:d[f-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return c?(a=Mt(e),d.length=1,t=t-a-1,d[0]=lo(10,(ut-t%ut)%ut),e.e=Bu(-t/ut)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=f,a=1,f--):(d.length=f+1,a=lo(10,ut-r),d[f]=i>0?(u/lo(10,s-i)%lo(10,i)|0)*a:0),c)for(;;)if(f==0){(d[0]+=a)==Ht&&(d[0]=1,++e.e);break}else{if(d[f]+=a,d[f]!=Ht)break;d[f--]=0,a=1}for(r=d.length;d[--r]===0;)d.pop();if(pt&&(e.e>Fg||e.e<-Fg))throw Error(UA+Mt(e));return e}function OB(e,t){var n,r,i,a,s,o,c,u,f,d,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),pt?et(t,p):t;if(c=e.d,d=t.d,r=t.e,u=e.e,c=c.slice(),s=u-r,s){for(f=s<0,f?(n=c,s=-s,o=d.length):(n=d,r=u,o=c.length),i=Math.max(Math.ceil(p/ut),o)+2,s>i&&(s=i,n.length=1),n.reverse(),i=s;i--;)n.push(0);n.reverse()}else{for(i=c.length,o=d.length,f=i<o,f&&(o=i),i=0;i<o;i++)if(c[i]!=d[i]){f=c[i]<d[i];break}s=0}for(f&&(n=c,c=d,d=n,t.s=-t.s),o=c.length,i=d.length-o;i>0;--i)c[o++]=0;for(i=d.length;i>s;){if(c[--i]<d[i]){for(a=i;a&&c[--a]===0;)c[a]=Ht-1;--c[a],c[i]+=Ht}c[i]-=d[i]}for(;c[--o]===0;)c.pop();for(;c[0]===0;c.shift())--r;return c[0]?(t.d=c,t.e=r,pt?et(t,p):t):new h(0)}function Zo(e,t,n){var r,i=Mt(e),a=ki(e.d),s=a.length;return t?(n&&(r=n-s)>0?a=a.charAt(0)+"."+a.slice(1)+Va(r):s>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Va(-i-1)+a,n&&(r=n-s)>0&&(a+=Va(r))):i>=s?(a+=Va(i+1-s),n&&(r=n-i-1)>0&&(a=a+"."+Va(r))):((r=i+1)<s&&(a=a.slice(0,r)+"."+a.slice(r)),n&&(r=n-s)>0&&(i+1===s&&(a+="."),a+=Va(r))),e.s<0?"-"+a:a}function VN(e,t){if(e.length>t)return e.length=t,!0}function NB(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(Do+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 zN(s,a.toString())}else if(typeof a!="string")throw Error(Do+a);if(a.charCodeAt(0)===45?(a=a.slice(1),s.s=-1):s.s=1,g1e.test(a))zN(s,a);else throw Error(Do+a)}if(i.prototype=re,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=NB,i.config=i.set=y1e,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function y1e(e){if(!e||typeof e!="object")throw Error(Pr+"Object expected");var t,n,r,i=["precision",1,Fu,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(Bu(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(Do+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Do+n+": "+r);return this}var qA=NB(m1e);Qn=new qA(1);const Ze=qA;function v1e(e){return S1e(e)||w1e(e)||b1e(e)||x1e()}function x1e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
676In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b1e(e,t){if(e){if(typeof e=="string")return M1(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 M1(e,t)}}function w1e(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function S1e(e){if(Array.isArray(e))return M1(e)}function M1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var j1e=function(t){return t},IB={"@@functional/placeholder":!0},RB=function(t){return t===IB},WN=function(t){return function n(){return arguments.length===0||arguments.length===1&&RB(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},_1e=function e(t,n){return t===1?n:WN(function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var s=i.filter(function(o){return o!==IB}).length;return s>=t?n.apply(void 0,i):e(t-s,WN(function(){for(var o=arguments.length,c=new Array(o),u=0;u<o;u++)c[u]=arguments[u];var f=i.map(function(d){return RB(d)?c.shift():d});return n.apply(void 0,v1e(f).concat(c))}))})},Dv=function(t){return _1e(t.length,t)},$1=function(t,n){for(var r=[],i=t;i<n;++i)r[i-t]=i;return r},A1e=Dv(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),k1e=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return j1e;var i=n.reverse(),a=i[0],s=i.slice(1);return function(){return s.reduce(function(o,c){return c(o)},a.apply(void 0,arguments))}},D1=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},MB=function(t){var n=null,r=null;return function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return n&&a.every(function(o,c){return o===n[c]})||(n=a,r=t.apply(void 0,a)),r}};function E1e(e){var t;return e===0?t=1:t=Math.floor(new Ze(e).abs().log(10).toNumber())+1,t}function C1e(e,t,n){for(var r=new Ze(e),i=0,a=[];r.lt(t)&&i<1e5;)a.push(r.toNumber()),r=r.add(n),i++;return a}var P1e=Dv(function(e,t,n){var r=+e,i=+t;return r+n*(i-r)}),T1e=Dv(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),O1e=Dv(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const Lv={rangeStep:C1e,getDigitCount:E1e,interpolateNumber:P1e,uninterpolateNumber:T1e,uninterpolateTruncation:O1e};function L1(e){return R1e(e)||I1e(e)||$B(e)||N1e()}function N1e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
677In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function I1e(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function R1e(e){if(Array.isArray(e))return F1(e)}function Hf(e,t){return D1e(e)||$1e(e,t)||$B(e,t)||M1e()}function M1e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
678In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $B(e,t){if(e){if(typeof e=="string")return F1(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 F1(e,t)}}function F1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $1e(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,a=void 0;try{for(var s=e[Symbol.iterator](),o;!(r=(o=s.next()).done)&&(n.push(o.value),!(t&&n.length===t));r=!0);}catch(c){i=!0,a=c}finally{try{!r&&s.return!=null&&s.return()}finally{if(i)throw a}}return n}}function D1e(e){if(Array.isArray(e))return e}function DB(e){var t=Hf(e,2),n=t[0],r=t[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]}function LB(e,t,n){if(e.lte(0))return new Ze(0);var r=Lv.getDigitCount(e.toNumber()),i=new Ze(10).pow(r),a=e.div(i),s=r!==1?.05:.1,o=new Ze(Math.ceil(a.div(s).toNumber())).add(n).mul(s),c=o.mul(i);return t?c:new Ze(Math.ceil(c))}function L1e(e,t,n){var r=1,i=new Ze(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new Ze(10).pow(Lv.getDigitCount(e)-1),i=new Ze(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new Ze(Math.floor(e)))}else e===0?i=new Ze(Math.floor((t-1)/2)):n||(i=new Ze(Math.floor(e)));var s=Math.floor((t-1)/2),o=k1e(A1e(function(c){return i.add(new Ze(c-s).mul(r)).toNumber()}),$1);return o(0,t)}function FB(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 Ze(0),tickMin:new Ze(0),tickMax:new Ze(0)};var a=LB(new Ze(t).sub(e).div(n-1),r,i),s;e<=0&&t>=0?s=new Ze(0):(s=new Ze(e).add(t).div(2),s=s.sub(new Ze(s).mod(a)));var o=Math.ceil(s.sub(e).div(a).toNumber()),c=Math.ceil(new Ze(t).sub(s).div(a).toNumber()),u=o+c+1;return u>n?FB(e,t,n,r,i+1):(u<n&&(c=t>0?c+(n-u):c,o=t>0?o:o+(n-u)),{step:a,tickMin:s.sub(new Ze(o).mul(a)),tickMax:s.add(new Ze(c).mul(a))})}function F1e(e){var t=Hf(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),o=DB([n,r]),c=Hf(o,2),u=c[0],f=c[1];if(u===-1/0||f===1/0){var d=f===1/0?[u].concat(L1($1(0,i-1).map(function(){return 1/0}))):[].concat(L1($1(0,i-1).map(function(){return-1/0})),[f]);return n>r?D1(d):d}if(u===f)return L1e(u,i,a);var h=FB(u,f,s,a),p=h.step,g=h.tickMin,m=h.tickMax,y=Lv.rangeStep(g,m.add(new Ze(.1).mul(p)),p);return n>r?D1(y):y}function B1e(e,t){var n=Hf(e,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=DB([r,i]),o=Hf(s,2),c=o[0],u=o[1];if(c===-1/0||u===1/0)return[r,i];if(c===u)return[c];var f=Math.max(t,2),d=LB(new Ze(u).sub(c).div(f-1),a,0),h=[].concat(L1(Lv.rangeStep(new Ze(c),new Ze(u).sub(new Ze(.99).mul(d)),d)),[u]);return r>i?D1(h):h}var U1e=MB(F1e),q1e=MB(B1e),z1e="Invariant failed";function Qo(e,t){throw new Error(z1e)}var V1e=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Xc(e){"@babel/helpers - typeof";return Xc=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},Xc(e)}function Bg(){return Bg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bg.apply(this,arguments)}function W1e(e,t){return Y1e(e)||K1e(e,t)||G1e(e,t)||H1e()}function H1e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
679In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function G1e(e,t){if(e){if(typeof e=="string")return HN(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 HN(e,t)}}function HN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function K1e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,s,o=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function Y1e(e){if(Array.isArray(e))return e}function X1e(e,t){if(e==null)return{};var n=Z1e(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Z1e(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 Q1e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J1e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qB(r.key),r)}}function eSe(e,t,n){return t&&J1e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function tSe(e,t,n){return t=Ug(t),nSe(e,BB()?Reflect.construct(t,n||[],Ug(e).constructor):t.apply(e,n))}function nSe(e,t){if(t&&(Xc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rSe(e)}function rSe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function BB(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(BB=function(){return!!e})()}function Ug(e){return Ug=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ug(e)}function iSe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&B1(e,t)}function B1(e,t){return B1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},B1(e,t)}function UB(e,t,n){return t=qB(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qB(e){var t=aSe(e,"string");return Xc(t)=="symbol"?t:t+""}function aSe(e,t){if(Xc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Xc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Fv=function(e){function t(){return Q1e(this,t),tSe(this,t,arguments)}return iSe(t,e),eSe(t,[{key:"render",value:function(){var r=this.props,i=r.offset,a=r.layout,s=r.width,o=r.dataKey,c=r.data,u=r.dataPointFormatter,f=r.xAxis,d=r.yAxis,h=X1e(r,V1e),p=ye(h,!1);this.props.direction==="x"&&f.type!=="number"&&Qo();var g=c.map(function(m){var y=u(m,o),v=y.x,b=y.y,x=y.value,j=y.errorVal;if(!j)return null;var S=[],_,A;if(Array.isArray(j)){var k=W1e(j,2);_=k[0],A=k[1]}else _=A=j;if(a==="vertical"){var E=f.scale,T=b+i,P=T+s,O=T-s,$=E(x-_),R=E(x+A);S.push({x1:R,y1:P,x2:R,y2:O}),S.push({x1:$,y1:T,x2:R,y2:T}),S.push({x1:$,y1:P,x2:$,y2:O})}else if(a==="horizontal"){var L=d.scale,D=v+i,M=D-s,N=D+s,I=L(x-_),F=L(x+A);S.push({x1:M,y1:F,x2:N,y2:F}),S.push({x1:D,y1:I,x2:D,y2:F}),S.push({x1:M,y1:I,x2:N,y2:I})}return C.createElement(He,Bg({className:"recharts-errorBar",key:"bar-".concat(S.map(function(V){return"".concat(V.x1,"-").concat(V.x2,"-").concat(V.y1,"-").concat(V.y2)}))},p),S.map(function(V){return C.createElement("line",Bg({},V,{key:"line-".concat(V.x1,"-").concat(V.x2,"-").concat(V.y1,"-").concat(V.y2)}))}))});return C.createElement(He,{className:"recharts-errorBars"},g)}}])}(C.Component);UB(Fv,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});UB(Fv,"displayName","ErrorBar");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 GN(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 Zs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GN(Object(n),!0).forEach(function(r){sSe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sSe(e,t,n){return t=oSe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oSe(e){var t=lSe(e,"string");return Gf(t)=="symbol"?t:t+""}function lSe(e,t){if(Gf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Gf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var zB=function(t){var n=t.children,r=t.formattedGraphicalItems,i=t.legendWidth,a=t.legendContent,s=Kn(n,pc);if(!s)return null;var o=pc.defaultProps,c=o!==void 0?Zs(Zs({},o),s.props):{},u;return s.props&&s.props.payload?u=s.props&&s.props.payload:a==="children"?u=(r||[]).reduce(function(f,d){var h=d.item,p=d.props,g=p.sectors||p.data||[];return f.concat(g.map(function(m){return{type:s.props.iconType||h.props.legendType,value:m.name,color:m.fill,payload:m}}))},[]):u=(r||[]).map(function(f){var d=f.item,h=d.type.defaultProps,p=h!==void 0?Zs(Zs({},h),d.props):{},g=p.dataKey,m=p.name,y=p.legendType,v=p.hide;return{inactive:v,dataKey:g,type:c.iconType||y||"square",color:zA(d),value:m||g,payload:p}}),Zs(Zs(Zs({},c),pc.getWithHeight(s,i)),{},{payload:u,item:s})};function Kf(e){"@babel/helpers - typeof";return Kf=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},Kf(e)}function KN(e){return fSe(e)||dSe(e)||uSe(e)||cSe()}function cSe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
680In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uSe(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 dSe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function fSe(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++)r[n]=e[n];return r}function YN(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 kt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YN(Object(n),!0).forEach(function(r){gc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YN(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gc(e,t,n){return t=hSe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hSe(e){var t=pSe(e,"string");return Kf(t)=="symbol"?t:t+""}function pSe(e,t){if(Kf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Kf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hn(e,t,n){return Ie(e)||Ie(t)?n:zt(t)?rr(e,t,n):ke(t)?t(e):n}function zd(e,t,n,r){var i=d1e(e,function(o){return hn(o,t)});if(n==="number"){var a=i.filter(function(o){return X(o)||parseFloat(o)});return a.length?[Mv(a),Rv(a)]:[1/0,-1/0]}var s=r?i.filter(function(o){return!Ie(o)}):i;return s.map(function(o){return zt(o)||o instanceof Date?o:""})}var mSe=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,s=-1,o=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(o<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var c=a.range,u=0;u<o;u++){var f=u>0?i[u-1].coordinate:i[o-1].coordinate,d=i[u].coordinate,h=u>=o-1?i[0].coordinate:i[u+1].coordinate,p=void 0;if(Sn(d-f)!==Sn(h-d)){var g=[];if(Sn(h-d)===Sn(c[1]-c[0])){p=h;var m=d+c[1]-c[0];g[0]=Math.min(m,(m+f)/2),g[1]=Math.max(m,(m+f)/2)}else{p=f;var y=h+c[1]-c[0];g[0]=Math.min(d,(y+d)/2),g[1]=Math.max(d,(y+d)/2)}var v=[Math.min(d,(p+d)/2),Math.max(d,(p+d)/2)];if(t>v[0]&&t<=v[1]||t>=g[0]&&t<=g[1]){s=i[u].index;break}}else{var b=Math.min(f,h),x=Math.max(f,h);if(t>(b+d)/2&&t<=(x+d)/2){s=i[u].index;break}}}else for(var j=0;j<o;j++)if(j===0&&t<=(r[j].coordinate+r[j+1].coordinate)/2||j>0&&j<o-1&&t>(r[j].coordinate+r[j-1].coordinate)/2&&t<=(r[j].coordinate+r[j+1].coordinate)/2||j===o-1&&t>(r[j].coordinate+r[j-1].coordinate)/2){s=r[j].index;break}return s},zA=function(t){var n,r=t,i=r.type.displayName,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?kt(kt({},t.type.defaultProps),t.props):t.props,s=a.stroke,o=a.fill,c;switch(i){case"Line":c=s;break;case"Area":case"Radar":c=s&&s!=="none"?s:o;break;default:c=o;break}return c},gSe=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var s={},o=Object.keys(a),c=0,u=o.length;c<u;c++)for(var f=a[o[c]].stackGroups,d=Object.keys(f),h=0,p=d.length;h<p;h++){var g=f[d[h]],m=g.items,y=g.cateAxisId,v=m.filter(function(A){return na(A.type).indexOf("Bar")>=0});if(v&&v.length){var b=v[0].type.defaultProps,x=b!==void 0?kt(kt({},b),v[0].props):v[0].props,j=x.barSize,S=x[y];s[S]||(s[S]=[]);var _=Ie(j)?n:j;s[S].push({item:v[0],stackList:v.slice(1),barSize:Ie(_)?void 0:jn(_,r,0)})}}return s},ySe=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,a=t.sizeList,s=a===void 0?[]:a,o=t.maxBarSize,c=s.length;if(c<1)return null;var u=jn(n,i,0,!0),f,d=[];if(s[0].barSize===+s[0].barSize){var h=!1,p=i/c,g=s.reduce(function(j,S){return j+S.barSize||0},0);g+=(c-1)*u,g>=i&&(g-=(c-1)*u,u=0),g>=i&&p>0&&(h=!0,p*=.9,g=c*p);var m=(i-g)/2>>0,y={offset:m-u,size:0};f=s.reduce(function(j,S){var _={item:S.item,position:{offset:y.offset+y.size+u,size:h?p:S.barSize}},A=[].concat(KN(j),[_]);return y=A[A.length-1].position,S.stackList&&S.stackList.length&&S.stackList.forEach(function(k){A.push({item:k,position:y})}),A},d)}else{var v=jn(r,i,0,!0);i-2*v-(c-1)*u<=0&&(u=0);var b=(i-2*v-(c-1)*u)/c;b>1&&(b>>=0);var x=o===+o?Math.min(b,o):b;f=s.reduce(function(j,S,_){var A=[].concat(KN(j),[{item:S.item,position:{offset:v+(b+u)*_+(b-x)/2,size:x}}]);return S.stackList&&S.stackList.length&&S.stackList.forEach(function(k){A.push({item:k,position:A[A.length-1].position})}),A},d)}return f},vSe=function(t,n,r,i){var a=r.children,s=r.width,o=r.margin,c=s-(o.left||0)-(o.right||0),u=zB({children:a,legendWidth:c});if(u){var f=i||{},d=f.width,h=f.height,p=u.align,g=u.verticalAlign,m=u.layout;if((m==="vertical"||m==="horizontal"&&g==="middle")&&p!=="center"&&X(t[p]))return kt(kt({},t),{},gc({},p,t[p]+(d||0)));if((m==="horizontal"||m==="vertical"&&p==="center")&&g!=="middle"&&X(t[g]))return kt(kt({},t),{},gc({},g,t[g]+(h||0)))}return t},xSe=function(t,n,r){return Ie(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},VB=function(t,n,r,i,a){var s=n.props.children,o=kr(s,Fv).filter(function(u){return xSe(i,a,u.props.direction)});if(o&&o.length){var c=o.map(function(u){return u.props.dataKey});return t.reduce(function(u,f){var d=hn(f,r);if(Ie(d))return u;var h=Array.isArray(d)?[Mv(d),Rv(d)]:[d,d],p=c.reduce(function(g,m){var y=hn(f,m,0),v=h[0]-Math.abs(Array.isArray(y)?y[0]:y),b=h[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(v,g[0]),Math.max(b,g[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},bSe=function(t,n,r,i,a){var s=n.map(function(o){return VB(t,o,r,a,i)}).filter(function(o){return!Ie(o)});return s&&s.length?s.reduce(function(o,c){return[Math.min(o[0],c[0]),Math.max(o[1],c[1])]},[1/0,-1/0]):null},WB=function(t,n,r,i,a){var s=n.map(function(c){var u=c.props.dataKey;return r==="number"&&u&&VB(t,c,u,i)||zd(t,u,r,a)});if(r==="number")return s.reduce(function(c,u){return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]);var o={};return s.reduce(function(c,u){for(var f=0,d=u.length;f<d;f++)o[u[f]]||(o[u[f]]=!0,c.push(u[f]));return c},[])},HB=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},_o=function(t,n,r){if(!t)return null;var i=t.scale,a=t.duplicateDomain,s=t.type,o=t.range,c=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,u=(n||r)&&s==="category"&&i.bandwidth?i.bandwidth()/c:0;if(u=t.axisType==="angleAxis"&&(o==null?void 0:o.length)>=2?Sn(o[0]-o[1])*2*u:u,n&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(d){var h=a?a.indexOf(d):d;return{coordinate:i(h)+u,value:d,offset:u}});return f.filter(function(d){return!$h(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,h){return{coordinate:i(d)+u,value:d,index:h,offset:u}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(d){return{coordinate:i(d)+u,value:d,offset:u}}):i.domain().map(function(d,h){return{coordinate:i(d)+u,value:a?a[d]:d,index:h,offset:u}})},Gb=new WeakMap,Up=function(t,n){if(typeof n!="function")return t;Gb.has(t)||Gb.set(t,new WeakMap);var r=Gb.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},GB=function(t,n,r){var i=t.scale,a=t.type,s=t.layout,o=t.axisType;if(i==="auto")return s==="radial"&&o==="radiusAxis"?{scale:Bf(),realScaleType:"band"}:s==="radial"&&o==="angleAxis"?{scale:Mg(),realScaleType:"linear"}:a==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:qd(),realScaleType:"point"}:a==="category"?{scale:Bf(),realScaleType:"band"}:{scale:Mg(),realScaleType:"linear"};if(Ko(i)){var c="scale".concat(bv(i));return{scale:(qN[c]||qd)(),realScaleType:qN[c]?c:"point"}}return ke(i)?{scale:i}:{scale:qd(),realScaleType:"point"}},XN=1e-4,KB=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])-XN,s=Math.max(i[0],i[1])+XN,o=t(n[0]),c=t(n[r-1]);(o<a||o>s||c<a||c>s)&&t.domain([n[0],n[r-1]])}},wSe=function(t,n){if(!t)return null;for(var r=0,i=t.length;r<i;r++)if(t[r].item===n)return t[r].position;return null},SSe=function(t,n){if(!n||n.length!==2||!X(n[0])||!X(n[1]))return t;var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]),a=[t[0],t[1]];return(!X(t[0])||t[0]<r)&&(a[0]=r),(!X(t[1])||t[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<r&&(a[1]=r),a},jSe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var a=0,s=0,o=0;o<n;++o){var c=$h(t[o][r][1])?t[o][r][0]:t[o][r][1];c>=0?(t[o][r][0]=a,t[o][r][1]=a+c,a=t[o][r][1]):(t[o][r][0]=s,t[o][r][1]=s+c,s=t[o][r][1])}},_Se=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var a=0,s=0;s<n;++s){var o=$h(t[s][r][1])?t[s][r][0]:t[s][r][1];o>=0?(t[s][r][0]=a,t[s][r][1]=a+o,a=t[s][r][1]):(t[s][r][0]=0,t[s][r][1]=0)}},ASe={sign:jSe,expand:zue,none:qc,silhouette:Vue,wiggle:Wue,positive:_Se},kSe=function(t,n,r){var i=n.map(function(o){return o.props.dataKey}),a=ASe[r],s=que().keys(i).value(function(o,c){return+hn(o,c,0)}).order(f1).offset(a);return s(t)},ESe=function(t,n,r,i,a,s){if(!t)return null;var o=s?n.reverse():n,c={},u=o.reduce(function(d,h){var p,g=(p=h.type)!==null&&p!==void 0&&p.defaultProps?kt(kt({},h.type.defaultProps),h.props):h.props,m=g.stackId,y=g.hide;if(y)return d;var v=g[r],b=d[v]||{hasStack:!1,stackGroups:{}};if(zt(m)){var x=b.stackGroups[m]||{numericAxisId:r,cateAxisId:i,items:[]};x.items.push(h),b.hasStack=!0,b.stackGroups[m]=x}else b.stackGroups[Dh("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[h]};return kt(kt({},d),{},gc({},v,b))},c),f={};return Object.keys(u).reduce(function(d,h){var p=u[h];if(p.hasStack){var g={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(m,y){var v=p.stackGroups[y];return kt(kt({},m),{},gc({},y,{numericAxisId:r,cateAxisId:i,items:v.items,stackedData:kSe(t,v.items,a)}))},g)}return kt(kt({},d),{},gc({},h,p))},f)},YB=function(t,n){var r=n.realScaleType,i=n.type,a=n.tickCount,s=n.originalDomain,o=n.allowDecimals,c=r||n.scale;if(c!=="auto"&&c!=="linear")return null;if(a&&i==="number"&&s&&(s[0]==="auto"||s[1]==="auto")){var u=t.domain();if(!u.length)return null;var f=U1e(u,a,o);return t.domain([Mv(f),Rv(f)]),{niceTicks:f}}if(a&&i==="number"){var d=t.domain(),h=q1e(d,a,o);return{niceTicks:h}}return null},ZN=function(t){var n=t.axis,r=t.ticks,i=t.offset,a=t.bandSize,s=t.entry,o=t.index;if(n.type==="category")return r[o]?r[o].coordinate+i:null;var c=hn(s,n.dataKey,n.domain[o]);return Ie(c)?null:n.scale(c)-a/2+i},CSe=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]},PSe=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?kt(kt({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(zt(a)){var s=n[a];if(s){var o=s.items.indexOf(t);return o>=0?s.stackedData[o]:null}}return null},TSe=function(t){return t.reduce(function(n,r){return[Mv(r.concat([n[0]]).filter(X)),Rv(r.concat([n[1]]).filter(X))]},[1/0,-1/0])},XB=function(t,n,r){return Object.keys(t).reduce(function(i,a){var s=t[a],o=s.stackedData,c=o.reduce(function(u,f){var d=TSe(f.slice(n,r+1));return[Math.min(u[0],d[0]),Math.max(u[1],d[1])]},[1/0,-1/0]);return[Math.min(c[0],i[0]),Math.max(c[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},QN=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,JN=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,q1=function(t,n,r){if(ke(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(X(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(QN.test(t[0])){var a=+QN.exec(t[0])[1];i[0]=n[0]-a}else ke(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(X(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(JN.test(t[1])){var s=+JN.exec(t[1])[1];i[1]=n[1]+s}else ke(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},qg=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=yA(n,function(d){return d.coordinate}),s=1/0,o=1,c=a.length;o<c;o++){var u=a[o],f=a[o-1];s=Math.min((u.coordinate||0)-(f.coordinate||0),s)}return s===1/0?0:s}return r?void 0:0},eI=function(t,n,r){return!t||!t.length||$v(t,rr(r,"type.defaultProps.domain"))?n:t},ZB=function(t,n){var r=t.type.defaultProps?kt(kt({},t.type.defaultProps),t.props):t.props,i=r.dataKey,a=r.name,s=r.unit,o=r.formatter,c=r.tooltipType,u=r.chartType,f=r.hide;return kt(kt({},ye(t,!1)),{},{dataKey:i,unit:s,formatter:o,name:a||i,color:zA(t),value:hn(n,i),type:c,payload:n,chartType:u,hide:f})};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 tI(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 Ki(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tI(Object(n),!0).forEach(function(r){QB(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function QB(e,t,n){return t=OSe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OSe(e){var t=NSe(e,"string");return Yf(t)=="symbol"?t:t+""}function NSe(e,t){if(Yf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Yf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ISe(e,t){return DSe(e)||$Se(e,t)||MSe(e,t)||RSe()}function RSe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
681In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MSe(e,t){if(e){if(typeof e=="string")return nI(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 nI(e,t)}}function nI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $Se(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,s,o=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function DSe(e){if(Array.isArray(e))return e}var zg=Math.PI/180,LSe=function(t){return t*180/Math.PI},st=function(t,n,r,i){return{x:t+Math.cos(-zg*i)*r,y:n+Math.sin(-zg*i)*r}},JB=function(t,n){var r=arguments.length>2&&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},FSe=function(t,n,r,i,a){var s=t.width,o=t.height,c=t.startAngle,u=t.endAngle,f=jn(t.cx,s,s/2),d=jn(t.cy,o,o/2),h=JB(s,o,r),p=jn(t.innerRadius,h,0),g=jn(t.outerRadius,h,h*.8),m=Object.keys(n);return m.reduce(function(y,v){var b=n[v],x=b.domain,j=b.reversed,S;if(Ie(b.range))i==="angleAxis"?S=[c,u]:i==="radiusAxis"&&(S=[p,g]),j&&(S=[S[1],S[0]]);else{S=b.range;var _=S,A=ISe(_,2);c=A[0],u=A[1]}var k=GB(b,a),E=k.realScaleType,T=k.scale;T.domain(x).range(S),KB(T);var P=YB(T,Ki(Ki({},b),{},{realScaleType:E})),O=Ki(Ki(Ki({},b),P),{},{range:S,radius:g,realScaleType:E,scale:T,cx:f,cy:d,innerRadius:p,outerRadius:g,startAngle:c,endAngle:u});return Ki(Ki({},y),{},QB({},v,O))},{})},BSe=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))},USe=function(t,n){var r=t.x,i=t.y,a=n.cx,s=n.cy,o=BSe({x:r,y:i},{x:a,y:s});if(o<=0)return{radius:o};var c=(r-a)/o,u=Math.acos(c);return i>s&&(u=2*Math.PI-u),{radius:o,angle:LSe(u),angleInRadian:u}},qSe=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}},zSe=function(t,n){var r=n.startAngle,i=n.endAngle,a=Math.floor(r/360),s=Math.floor(i/360),o=Math.min(a,s);return t+o*360},rI=function(t,n){var r=t.x,i=t.y,a=USe({x:r,y:i},n),s=a.radius,o=a.angle,c=n.innerRadius,u=n.outerRadius;if(s<c||s>u)return!1;if(s===0)return!0;var f=qSe(n),d=f.startAngle,h=f.endAngle,p=o,g;if(d<=h){for(;p>h;)p-=360;for(;p<d;)p+=360;g=p>=d&&p<=h}else{for(;p>d;)p-=360;for(;p<h;)p+=360;g=p>=h&&p<=d}return g?Ki(Ki({},n),{},{radius:s,angle:zSe(p,n)}):null},e5=function(t){return!w.isValidElement(t)&&!ke(t)&&typeof t!="boolean"?t.className:""};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)}var VSe=["offset"];function WSe(e){return YSe(e)||KSe(e)||GSe(e)||HSe()}function HSe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
682In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GSe(e,t){if(e){if(typeof e=="string")return z1(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 z1(e,t)}}function KSe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function YSe(e){if(Array.isArray(e))return z1(e)}function z1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function XSe(e,t){if(e==null)return{};var n=ZSe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ZSe(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 iI(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 Lt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iI(Object(n),!0).forEach(function(r){QSe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function QSe(e,t,n){return t=JSe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JSe(e){var t=eje(e,"string");return Xf(t)=="symbol"?t:t+""}function eje(e,t){if(Xf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Xf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Zf(){return Zf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zf.apply(this,arguments)}var tje=function(t){var n=t.value,r=t.formatter,i=Ie(t.children)?n:t.children;return ke(r)?r(i):i},nje=function(t,n){var r=Sn(n-t),i=Math.min(Math.abs(n-t),360);return r*i},rje=function(t,n,r){var i=t.position,a=t.viewBox,s=t.offset,o=t.className,c=a,u=c.cx,f=c.cy,d=c.innerRadius,h=c.outerRadius,p=c.startAngle,g=c.endAngle,m=c.clockWise,y=(d+h)/2,v=nje(p,g),b=v>=0?1:-1,x,j;i==="insideStart"?(x=p+b*s,j=m):i==="insideEnd"?(x=g-b*s,j=!m):i==="end"&&(x=g+b*s,j=m),j=v<=0?j:!j;var S=st(u,f,y,x),_=st(u,f,y,x+(j?1:-1)*359),A="M".concat(S.x,",").concat(S.y,`
683    A`).concat(y,",").concat(y,",0,1,").concat(j?0:1,`,
684    `).concat(_.x,",").concat(_.y),k=Ie(t.id)?Dh("recharts-radial-line-"):t.id;return C.createElement("text",Zf({},r,{dominantBaseline:"central",className:Ce("recharts-radial-bar-label",o)}),C.createElement("defs",null,C.createElement("path",{id:k,d:A})),C.createElement("textPath",{xlinkHref:"#".concat(k)},n))},ije=function(t){var n=t.viewBox,r=t.offset,i=t.position,a=n,s=a.cx,o=a.cy,c=a.innerRadius,u=a.outerRadius,f=a.startAngle,d=a.endAngle,h=(f+d)/2;if(i==="outside"){var p=st(s,o,u+r,h),g=p.x,m=p.y;return{x:g,y:m,textAnchor:g>=s?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:s,y:o,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:s,y:o,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:s,y:o,textAnchor:"middle",verticalAnchor:"end"};var y=(c+u)/2,v=st(s,o,y,h),b=v.x,x=v.y;return{x:b,y:x,textAnchor:"middle",verticalAnchor:"middle"}},aje=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,a=t.position,s=n,o=s.x,c=s.y,u=s.width,f=s.height,d=f>=0?1:-1,h=d*i,p=d>0?"end":"start",g=d>0?"start":"end",m=u>=0?1:-1,y=m*i,v=m>0?"end":"start",b=m>0?"start":"end";if(a==="top"){var x={x:o+u/2,y:c-d*i,textAnchor:"middle",verticalAnchor:p};return Lt(Lt({},x),r?{height:Math.max(c-r.y,0),width:u}:{})}if(a==="bottom"){var j={x:o+u/2,y:c+f+h,textAnchor:"middle",verticalAnchor:g};return Lt(Lt({},j),r?{height:Math.max(r.y+r.height-(c+f),0),width:u}:{})}if(a==="left"){var S={x:o-y,y:c+f/2,textAnchor:v,verticalAnchor:"middle"};return Lt(Lt({},S),r?{width:Math.max(S.x-r.x,0),height:f}:{})}if(a==="right"){var _={x:o+u+y,y:c+f/2,textAnchor:b,verticalAnchor:"middle"};return Lt(Lt({},_),r?{width:Math.max(r.x+r.width-_.x,0),height:f}:{})}var A=r?{width:u,height:f}:{};return a==="insideLeft"?Lt({x:o+y,y:c+f/2,textAnchor:b,verticalAnchor:"middle"},A):a==="insideRight"?Lt({x:o+u-y,y:c+f/2,textAnchor:v,verticalAnchor:"middle"},A):a==="insideTop"?Lt({x:o+u/2,y:c+h,textAnchor:"middle",verticalAnchor:g},A):a==="insideBottom"?Lt({x:o+u/2,y:c+f-h,textAnchor:"middle",verticalAnchor:p},A):a==="insideTopLeft"?Lt({x:o+y,y:c+h,textAnchor:b,verticalAnchor:g},A):a==="insideTopRight"?Lt({x:o+u-y,y:c+h,textAnchor:v,verticalAnchor:g},A):a==="insideBottomLeft"?Lt({x:o+y,y:c+f-h,textAnchor:b,verticalAnchor:p},A):a==="insideBottomRight"?Lt({x:o+u-y,y:c+f-h,textAnchor:v,verticalAnchor:p},A):Ou(a)&&(X(a.x)||bo(a.x))&&(X(a.y)||bo(a.y))?Lt({x:o+jn(a.x,u),y:c+jn(a.y,f),textAnchor:"end",verticalAnchor:"end"},A):Lt({x:o+u/2,y:c+f/2,textAnchor:"middle",verticalAnchor:"middle"},A)},sje=function(t){return"cx"in t&&X(t.cx)};function Kt(e){var t=e.offset,n=t===void 0?5:t,r=XSe(e,VSe),i=Lt({offset:n},r),a=i.viewBox,s=i.position,o=i.value,c=i.children,u=i.content,f=i.className,d=f===void 0?"":f,h=i.textBreakAll;if(!a||Ie(o)&&Ie(c)&&!w.isValidElement(u)&&!ke(u))return null;if(w.isValidElement(u))return w.cloneElement(u,i);var p;if(ke(u)){if(p=w.createElement(u,i),w.isValidElement(p))return p}else p=tje(i);var g=sje(a),m=ye(i,!0);if(g&&(s==="insideStart"||s==="insideEnd"||s==="end"))return rje(i,p,m);var y=g?ije(i):aje(i);return C.createElement(Xo,Zf({className:Ce("recharts-label",d)},m,y,{breakAll:h}),p)}Kt.displayName="Label";var t5=function(t){var n=t.cx,r=t.cy,i=t.angle,a=t.startAngle,s=t.endAngle,o=t.r,c=t.radius,u=t.innerRadius,f=t.outerRadius,d=t.x,h=t.y,p=t.top,g=t.left,m=t.width,y=t.height,v=t.clockWise,b=t.labelViewBox;if(b)return b;if(X(m)&&X(y)){if(X(d)&&X(h))return{x:d,y:h,width:m,height:y};if(X(p)&&X(g))return{x:p,y:g,width:m,height:y}}return X(d)&&X(h)?{x:d,y:h,width:0,height:0}:X(n)&&X(r)?{cx:n,cy:r,startAngle:a||i||0,endAngle:s||i||0,innerRadius:u||0,outerRadius:f||c||o||0,clockWise:v}:t.viewBox?t.viewBox:{}},oje=function(t,n){return t?t===!0?C.createElement(Kt,{key:"label-implicit",viewBox:n}):zt(t)?C.createElement(Kt,{key:"label-implicit",viewBox:n,value:t}):w.isValidElement(t)?t.type===Kt?w.cloneElement(t,{key:"label-implicit",viewBox:n}):C.createElement(Kt,{key:"label-implicit",content:t,viewBox:n}):ke(t)?C.createElement(Kt,{key:"label-implicit",content:t,viewBox:n}):Ou(t)?C.createElement(Kt,Zf({viewBox:n},t,{key:"label-implicit"})):null:null},lje=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=t5(t),s=kr(i,Kt).map(function(c,u){return w.cloneElement(c,{viewBox:n||a,key:"label-".concat(u)})});if(!r)return s;var o=oje(t.label,n||a);return[o].concat(WSe(s))};Kt.parseViewBox=t5;Kt.renderCallByParent=lje;function cje(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var uje=cje;const dje=qe(uje);function Qf(e){"@babel/helpers - typeof";return Qf=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},Qf(e)}var fje=["valueAccessor"],hje=["data","dataKey","clockWise","id","textBreakAll"];function pje(e){return vje(e)||yje(e)||gje(e)||mje()}function mje(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
685In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gje(e,t){if(e){if(typeof e=="string")return V1(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 V1(e,t)}}function yje(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vje(e){if(Array.isArray(e))return V1(e)}function V1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Vg(){return Vg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vg.apply(this,arguments)}function aI(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 sI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aI(Object(n),!0).forEach(function(r){xje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xje(e,t,n){return t=bje(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bje(e){var t=wje(e,"string");return Qf(t)=="symbol"?t:t+""}function wje(e,t){if(Qf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Qf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oI(e,t){if(e==null)return{};var n=Sje(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Sje(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 jje=function(t){return Array.isArray(t.value)?dje(t.value):t.value};function gs(e){var t=e.valueAccessor,n=t===void 0?jje:t,r=oI(e,fje),i=r.data,a=r.dataKey,s=r.clockWise,o=r.id,c=r.textBreakAll,u=oI(r,hje);return!i||!i.length?null:C.createElement(He,{className:"recharts-label-list"},i.map(function(f,d){var h=Ie(a)?n(f,d):hn(f&&f.payload,a),p=Ie(o)?{}:{id:"".concat(o,"-").concat(d)};return C.createElement(Kt,Vg({},ye(f,!0),u,p,{parentViewBox:f.parentViewBox,value:h,textBreakAll:c,viewBox:Kt.parseViewBox(Ie(s)?f:sI(sI({},f),{},{clockWise:s})),key:"label-".concat(d),index:d}))}))}gs.displayName="LabelList";function _je(e,t){return e?e===!0?C.createElement(gs,{key:"labelList-implicit",data:t}):C.isValidElement(e)||ke(e)?C.createElement(gs,{key:"labelList-implicit",data:t,content:e}):Ou(e)?C.createElement(gs,Vg({data:t},e,{key:"labelList-implicit"})):null:null}function Aje(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=kr(r,gs).map(function(s,o){return w.cloneElement(s,{data:t,key:"labelList-".concat(o)})});if(!n)return i;var a=_je(e.label,t);return[a].concat(pje(i))}gs.renderCallByParent=Aje;function Jf(e){"@babel/helpers - typeof";return Jf=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},Jf(e)}function W1(){return W1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},W1.apply(this,arguments)}function lI(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 cI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lI(Object(n),!0).forEach(function(r){kje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kje(e,t,n){return t=Eje(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Eje(e){var t=Cje(e,"string");return Jf(t)=="symbol"?t:t+""}function Cje(e,t){if(Jf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Jf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Pje=function(t,n){var r=Sn(n-t),i=Math.min(Math.abs(n-t),359.999);return r*i},qp=function(t){var n=t.cx,r=t.cy,i=t.radius,a=t.angle,s=t.sign,o=t.isExternal,c=t.cornerRadius,u=t.cornerIsExternal,f=c*(o?1:-1)+i,d=Math.asin(c/f)/zg,h=u?a:a+s*d,p=st(n,r,f,h),g=st(n,r,i,h),m=u?a-s*d:a,y=st(n,r,f*Math.cos(d*zg),m);return{center:p,circleTangency:g,lineTangency:y,theta:d}},n5=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,s=t.startAngle,o=t.endAngle,c=Pje(s,o),u=s+c,f=st(n,r,a,s),d=st(n,r,a,u),h="M ".concat(f.x,",").concat(f.y,`
686    A `).concat(a,",").concat(a,`,0,
687    `).concat(+(Math.abs(c)>180),",").concat(+(s>u),`,
688    `).concat(d.x,",").concat(d.y,`
689  `);if(i>0){var p=st(n,r,i,s),g=st(n,r,i,u);h+="L ".concat(g.x,",").concat(g.y,`
690            A `).concat(i,",").concat(i,`,0,
691            `).concat(+(Math.abs(c)>180),",").concat(+(s<=u),`,
692            `).concat(p.x,",").concat(p.y," Z")}else h+="L ".concat(n,",").concat(r," Z");return h},Tje=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,s=t.cornerRadius,o=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,f=t.endAngle,d=Sn(f-u),h=qp({cx:n,cy:r,radius:a,angle:u,sign:d,cornerRadius:s,cornerIsExternal:c}),p=h.circleTangency,g=h.lineTangency,m=h.theta,y=qp({cx:n,cy:r,radius:a,angle:f,sign:-d,cornerRadius:s,cornerIsExternal:c}),v=y.circleTangency,b=y.lineTangency,x=y.theta,j=c?Math.abs(u-f):Math.abs(u-f)-m-x;if(j<0)return o?"M ".concat(g.x,",").concat(g.y,`
693        a`).concat(s,",").concat(s,",0,0,1,").concat(s*2,`,0
694        a`).concat(s,",").concat(s,",0,0,1,").concat(-s*2,`,0
695      `):n5({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:u,endAngle:f});var S="M ".concat(g.x,",").concat(g.y,`
696    A`).concat(s,",").concat(s,",0,0,").concat(+(d<0),",").concat(p.x,",").concat(p.y,`
697    A`).concat(a,",").concat(a,",0,").concat(+(j>180),",").concat(+(d<0),",").concat(v.x,",").concat(v.y,`
698    A`).concat(s,",").concat(s,",0,0,").concat(+(d<0),",").concat(b.x,",").concat(b.y,`
699  `);if(i>0){var _=qp({cx:n,cy:r,radius:i,angle:u,sign:d,isExternal:!0,cornerRadius:s,cornerIsExternal:c}),A=_.circleTangency,k=_.lineTangency,E=_.theta,T=qp({cx:n,cy:r,radius:i,angle:f,sign:-d,isExternal:!0,cornerRadius:s,cornerIsExternal:c}),P=T.circleTangency,O=T.lineTangency,$=T.theta,R=c?Math.abs(u-f):Math.abs(u-f)-E-$;if(R<0&&s===0)return"".concat(S,"L").concat(n,",").concat(r,"Z");S+="L".concat(O.x,",").concat(O.y,`
700      A`).concat(s,",").concat(s,",0,0,").concat(+(d<0),",").concat(P.x,",").concat(P.y,`
701      A`).concat(i,",").concat(i,",0,").concat(+(R>180),",").concat(+(d>0),",").concat(A.x,",").concat(A.y,`
702      A`).concat(s,",").concat(s,",0,0,").concat(+(d<0),",").concat(k.x,",").concat(k.y,"Z")}else S+="L".concat(n,",").concat(r,"Z");return S},Oje={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},r5=function(t){var n=cI(cI({},Oje),t),r=n.cx,i=n.cy,a=n.innerRadius,s=n.outerRadius,o=n.cornerRadius,c=n.forceCornerRadius,u=n.cornerIsExternal,f=n.startAngle,d=n.endAngle,h=n.className;if(s<a||f===d)return null;var p=Ce("recharts-sector",h),g=s-a,m=jn(o,g,0,!0),y;return m>0&&Math.abs(f-d)<360?y=Tje({cx:r,cy:i,innerRadius:a,outerRadius:s,cornerRadius:Math.min(m,g/2),forceCornerRadius:c,cornerIsExternal:u,startAngle:f,endAngle:d}):y=n5({cx:r,cy:i,innerRadius:a,outerRadius:s,startAngle:f,endAngle:d}),C.createElement("path",W1({},ye(n,!0),{className:p,d:y,role:"img"}))};function eh(e){"@babel/helpers - typeof";return eh=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},eh(e)}function H1(){return H1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},H1.apply(this,arguments)}function uI(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 dI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
702t%2?uI(Object(n),!0).forEach(function(r){Nje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nje(e,t,n){return t=Ije(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ije(e){var t=Rje(e,"string");return eh(t)=="symbol"?t:t+""}function Rje(e,t){if(eh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(eh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var fI={curveBasisClosed:Oue,curveBasisOpen:Nue,curveBasis:Tue,curveBumpX:gue,curveBumpY:yue,curveLinearClosed:Iue,curveLinear:Sv,curveMonotoneX:Rue,curveMonotoneY:Mue,curveNatural:$ue,curveStep:Due,curveStepAfter:Fue,curveStepBefore:Lue},zp=function(t){return t.x===+t.x&&t.y===+t.y},ud=function(t){return t.x},dd=function(t){return t.y},Mje=function(t,n){if(ke(t))return t;var r="curve".concat(bv(t));return(r==="curveMonotone"||r==="curveBump")&&n?fI["".concat(r).concat(n==="vertical"?"Y":"X")]:fI[r]||Sv},$je=function(t){var n=t.type,r=n===void 0?"linear":n,i=t.points,a=i===void 0?[]:i,s=t.baseLine,o=t.layout,c=t.connectNulls,u=c===void 0?!1:c,f=Mje(r,o),d=u?a.filter(function(m){return zp(m)}):a,h;if(Array.isArray(s)){var p=u?s.filter(function(m){return zp(m)}):s,g=d.map(function(m,y){return dI(dI({},m),{},{base:p[y]})});return o==="vertical"?h=Np().y(dd).x1(ud).x0(function(m){return m.base.x}):h=Np().x(ud).y1(dd).y0(function(m){return m.base.y}),h.defined(zp).curve(f),h(g)}return o==="vertical"&&X(s)?h=Np().y(dd).x1(ud).x0(s):X(s)?h=Np().x(ud).y1(dd).y0(s):h=J3().x(ud).y(dd),h.defined(zp).curve(f),h(d)},G1=function(t){var n=t.className,r=t.points,i=t.path,a=t.pathRef;if((!r||!r.length)&&!i)return null;var s=r&&r.length?$je(t):i;return w.createElement("path",H1({},ye(t,!1),mg(t),{className:Ce("recharts-curve",n),d:s,ref:a}))},i5={exports:{}},Dje="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Lje=Dje,Fje=Lje;function a5(){}function s5(){}s5.resetWarningCache=a5;var Bje=function(){function e(r,i,a,s,o,c){if(c!==Fje){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:s5,resetWarningCache:a5};return n.PropTypes=n,n};i5.exports=Bje();var Uje=i5.exports;const Ve=qe(Uje);var qje=Object.getOwnPropertyNames,zje=Object.getOwnPropertySymbols,Vje=Object.prototype.hasOwnProperty;function hI(e,t){return function(r,i,a){return e(r,i,a)&&t(r,i,a)}}function Vp(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);var a=i.cache,s=a.get(n),o=a.get(r);if(s&&o)return s===r&&o===n;a.set(n,r),a.set(r,n);var c=e(n,r,i);return a.delete(n),a.delete(r),c}}function pI(e){return qje(e).concat(zje(e))}var Wje=Object.hasOwn||function(e,t){return Vje.call(e,t)};function cl(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var Hje="__v",Gje="__o",Kje="_owner",mI=Object.getOwnPropertyDescriptor,gI=Object.keys;function Yje(e,t,n){var 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 Xje(e,t){return cl(e.getTime(),t.getTime())}function Zje(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Qje(e,t){return e===t}function yI(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var i=new Array(r),a=e.entries(),s,o,c=0;(s=a.next())&&!s.done;){for(var u=t.entries(),f=!1,d=0;(o=u.next())&&!o.done;){if(i[d]){d++;continue}var h=s.value,p=o.value;if(n.equals(h[0],p[0],c,d,e,t,n)&&n.equals(h[1],p[1],h[0],p[0],e,t,n)){f=i[d]=!0;break}d++}if(!f)return!1;c++}return!0}var Jje=cl;function e_e(e,t,n){var r=gI(e),i=r.length;if(gI(t).length!==i)return!1;for(;i-- >0;)if(!o5(e,t,n,r[i]))return!1;return!0}function fd(e,t,n){var r=pI(e),i=r.length;if(pI(t).length!==i)return!1;for(var a,s,o;
702i-- >0;)if(a=r[i],!o5(e,t,n,a)||(s=mI(e,a),o=mI(t,a),(s||o)&&(!s||!o||s.configurable!==o.configurable||s.enumerable!==o.enumerable||s.writable!==o.writable)))return!1;return!0}function t_e(e,t){return cl(e.valueOf(),t.valueOf())}function n_e(e,t){return e.source===t.source&&e.flags===t.flags}function vI(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var i=new Array(r),a=e.values(),s,o;(s=a.next())&&!s.done;){for(var c=t.values(),u=!1,f=0;(o=c.next())&&!o.done;){if(!i[f]&&n.equals(s.value,o.value,s.value,o.value,e,t,n)){u=i[f]=!0;break}f++}if(!u)return!1}return!0}function r_e(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function i_e(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 o5(e,t,n,r){return(r===Kje||r===Gje||r===Hje)&&(e.$$typeof||t.$$typeof)?!0:Wje(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var a_e="[object Arguments]",s_e="[object Boolean]",o_e="[object Date]",l_e="[object Error]",c_e="[object Map]",u_e="[object Number]",d_e="[object Object]",f_e="[object RegExp]",h_e="[object Set]",p_e="[object String]",m_e="[object URL]",g_e=Array.isArray,xI=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,bI=Object.assign,y_e=Object.prototype.toString.call.bind(Object.prototype.toString);function v_e(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areErrorsEqual,i=e.areFunctionsEqual,a=e.areMapsEqual,s=e.areNumbersEqual,o=e.areObjectsEqual,c=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,f=e.areSetsEqual,d=e.areTypedArraysEqual,h=e.areUrlsEqual;return function(g,m,y){if(g===m)return!0;if(g==null||m==null)return!1;var v=typeof g;if(v!==typeof m)return!1;if(v!=="object")return v==="number"?s(g,m,y):v==="function"?i(g,m,y):!1;var b=g.constructor;if(b!==m.constructor)return!1;if(b===Object)return o(g,m,y);if(g_e(g))return t(g,m,y);if(xI!=null&&xI(g))return d(g,m,y);if(b===Date)return n(g,m,y);if(b===RegExp)return u(g,m,y);if(b===Map)return a(g,m,y);if(b===Set)return f(g,m,y);var x=y_e(g);return x===o_e?n(g,m,y):x===f_e?u(g,m,y):x===c_e?a(g,m,y):x===h_e?f(g,m,y):x===d_e?typeof g.then!="function"&&typeof m.then!="function"&&o(g,m,y):x===m_e?h(g,m,y):x===l_e?r(g,m,y):x===a_e?o(g,m,y):x===s_e||x===u_e||x===p_e?c(g,m,y):!1}}function x_e(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?fd:Yje,areDatesEqual:Xje,areErrorsEqual:Zje,areFunctionsEqual:Qje,areMapsEqual:r?hI(yI,fd):yI,areNumbersEqual:Jje,areObjectsEqual:r?fd:e_e,arePrimitiveWrappersEqual:t_e,areRegExpsEqual:n_e,areSetsEqual:r?hI(vI,fd):vI,areTypedArraysEqual:r?fd:r_e,areUrlsEqual:i_e};if(n&&(i=bI({},i,n(i))),t){var a=Vp(i.areArraysEqual),s=Vp(i.areMapsEqual),o=Vp(i.areObjectsEqual),c=Vp(i.areSetsEqual);i=bI({},i,{areArraysEqual:a,areMapsEqual:s,areObjectsEqual:o,areSetsEqual:c})}return i}function b_e(e){return function(t,n,r,i,a,s,o){return e(t,n,o)}}function w_e(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,a=e.strict;if(r)return function(c,u){var f=r(),d=f.cache,h=d===void 0?t?new WeakMap:void 0:d,p=f.meta;return n(c,u,{cache:h,equals:i,meta:p,strict:a})};if(t)return function(c,u){return n(c,u,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var s={cache:void 0,equals:i,meta:void 0,strict:a};return function(c,u){return n(c,u,s)}}var S_e=qs();qs({strict:!0});qs({circular:!0});qs({circular:!0,strict:!0});qs({createInternalComparator:function(){return cl}});qs({strict:!0,createInternalComparator:function(){return cl}});qs({circular:!0,createInternalComparator:function(){return cl}});qs({circular:!0,createInternalComparator:function(){return cl},strict:!0});function qs(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,i=e.createState,a=e.strict,s=a===void 0?!1:a,o=x_e(e),c=v_e(o),u=r?r(c):b_e(c);return w_e({circular:n,comparator:c,createState:i,equals:u,strict:s})}function j_e(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function wI(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):j_e(i)};requestAnimationFrame(r)}function K1(e){"@babel/helpers - typeof";return K1=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},K1(e)}function __e(e){return C_e(e)||E_e(e)||k_e(e)||A_e()}
vendor: 60,423 bytes, lines 702-721
702function A_e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
703In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function k_e(e,t){if(e){if(typeof e=="string")return SI(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 SI(e,t)}}function SI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function E_e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function C_e(e){if(Array.isArray(e))return e}function P_e(){var e={},t=function(){return null},n=!1,r=function i(a){if(!n){if(Array.isArray(a)){if(!a.length)return;var s=a,o=__e(s),c=o[0],u=o.slice(1);if(typeof c=="number"){wI(i.bind(null,u),c);return}i(c),wI(i.bind(null,u));return}K1(a)==="object"&&(e=a,t(e)),typeof a=="function"&&a()}};return{stop:function(){n=!0},start:function(a){n=!1,r(a)},subscribe:function(a){return t=a,function(){t=function(){return null}}}}}function th(e){"@babel/helpers - typeof";return th=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},th(e)}function jI(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 _I(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jI(Object(n),!0).forEach(function(r){l5(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function l5(e,t,n){return t=T_e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T_e(e){var t=O_e(e,"string");return th(t)==="symbol"?t:String(t)}function O_e(e,t){if(th(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(th(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var N_e=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(a){return i.includes(a)})})},I_e=function(t){return t},R_e=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},Vd=function(t,n){return Object.keys(n).reduce(function(r,i){return _I(_I({},r),{},l5({},i,t(i,n[i])))},{})},AI=function(t,n,r){return t.map(function(i){return"".concat(R_e(i)," ").concat(n,"ms ").concat(r)}).join(",")};function M_e(e,t){return L_e(e)||D_e(e,t)||c5(e,t)||$_e()}function $_e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
704In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function D_e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,s,o=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function L_e(e){if(Array.isArray(e))return e}function F_e(e){return q_e(e)||U_e(e)||c5(e)||B_e()}function B_e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
705In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c5(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 U_e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function q_e(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<t;n++)r[n]=e[n];return r}var Wg=1e-4,u5=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},d5=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},kI=function(t,n){return function(r){var i=u5(t,n);return d5(i,r)}},z_e=function(t,n){return function(r){var i=u5(t,n),a=[].concat(F_e(i.map(function(s,o){return s*o}).slice(1)),[0]);return d5(a,r)}},EI=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],a=n[1],s=n[2],o=n[3];if(n.length===1)switch(n[0]){case"linear":i=0,a=0,s=1,o=1;break;case"ease":i=.25,a=.1,s=.25,o=1;break;case"ease-in":i=.42,a=0,s=1,o=1;break;case"ease-out":i=.42,a=0,s=.58,o=1;break;case"ease-in-out":i=0,a=0,s=.58,o=1;break;default:{var c=n[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var u=c[1].split(")")[0].split(",").map(function(y){return parseFloat(y)}),f=M_e(u,4);i=f[0],a=f[1],s=f[2],o=f[3]}}}var d=kI(i,s),h=kI(a,o),p=z_e(i,s),g=function(v){return v>1?1:v<0?0:v},m=function(v){for(var b=v>1?1:v,x=b,j=0;j<8;++j){var S=d(x)-b,_=p(x);if(Math.abs(S-b)<Wg||_<Wg)return h(x);x=g(x-S/_)}return h(x)};return m.isStepper=!1,m},V_e=function(){var t=arguments.length>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,o=s===void 0?17:s,c=function(f,d,h){var p=-(f-d)*r,g=h*a,m=h+(p-g)*o/1e3,y=h*o/1e3+f;return Math.abs(y-d)<Wg&&Math.abs(m)<Wg?[d,0]:[y,m]};return c.isStepper=!0,c.dt=o,c},W_e=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return EI(i);case"spring":return V_e();default:if(i.split("(")[0]==="cubic-bezier")return EI(i)}return typeof i=="function"?i:null};function nh(e){"@babel/helpers - typeof";return nh=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},nh(e)}function CI(e){return K_e(e)||G_e(e)||f5(e)||H_e()}function H_e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
706In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function G_e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function K_e(e){if(Array.isArray(e))return Z1(e)}function PI(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 Jt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PI(Object(n),!0).forEach(function(r){X1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function X1(e,t,n){return t=Y_e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y_e(e){var t=X_e(e,"string");return nh(t)==="symbol"?t:String(t)}function X_e(e,t){if(nh(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(nh(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Z_e(e,t){return eAe(e)||J_e(e,t)||f5(e,t)||Q_e()}function Q_e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
707In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f5(e,t){if(e){if(typeof e=="string")return Z1(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 Z1(e,t)}}function Z1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function J_e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,s,o=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function eAe(e){if(Array.isArray(e))return e}var Hg=function(t,n,r){return t+(n-t)*r},Q1=function(t){var n=t.from,r=t.to;return n!==r},tAe=function e(t,n,r){var i=Vd(function(a,s){if(Q1(s)){var o=t(s.from,s.to,s.velocity),c=Z_e(o,2),u=c[0],f=c[1];return Jt(Jt({},s),{},{from:u,velocity:f})}return s},n);return r<1?Vd(function(a,s){return Q1(s)?Jt(Jt({},s),{},{velocity:Hg(s.velocity,i[a].velocity,r),from:Hg(s.from,i[a].from,r)}):s},n):e(t,i,r-1)};const nAe=function(e,t,n,r,i){var a=N_e(e,t),s=a.reduce(function(y,v){return Jt(Jt({},y),{},X1({},v,[e[v],t[v]]))},{}),o=a.reduce(function(y,v){return Jt(Jt({},y),{},X1({},v,{from:e[v],velocity:0,to:t[v]}))},{}),c=-1,u,f,d=function(){return null},h=function(){return Vd(function(v,b){return b.from},o)},p=function(){return!Object.values(o).filter(Q1).length},g=function(v){u||(u=v);var b=v-u,x=b/n.dt;o=tAe(n,o,x),i(Jt(Jt(Jt({},e),t),h())),u=v,p()||(c=requestAnimationFrame(d))},m=function(v){f||(f=v);var b=(v-f)/r,x=Vd(function(S,_){return Hg.apply(void 0,CI(_).concat([n(b)]))},s);if(i(Jt(Jt(Jt({},e),t),x)),b<1)c=requestAnimationFrame(d);else{var j=Vd(function(S,_){return Hg.apply(void 0,CI(_).concat([n(1)]))},s);i(Jt(Jt(Jt({},e),t),j))}};return d=n.isStepper?g:m,function(){return requestAnimationFrame(d),function(){cancelAnimationFrame(c)}}};function Zc(e){"@babel/helpers - typeof";return Zc=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},Zc(e)}var rAe=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function iAe(e,t){if(e==null)return{};var n=aAe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function aAe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Kb(e){return cAe(e)||lAe(e)||oAe(e)||sAe()}function sAe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
708In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oAe(e,t){if(e){if(typeof e=="string")return J1(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 J1(e,t)}}function lAe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cAe(e){if(Array.isArray(e))return J1(e)}function J1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function TI(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 Wr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TI(Object(n),!0).forEach(function(r){Sd(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sd(e,t,n){return t=h5(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uAe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dAe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,h5(r.key),r)}}function fAe(e,t,n){return t&&dAe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function h5(e){var t=hAe(e,"string");return Zc(t)==="symbol"?t:String(t)}function hAe(e,t){if(Zc(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Zc(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pAe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eS(e,t)}function eS(e,t){return eS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},eS(e,t)}function mAe(e){var t=gAe();return function(){var r=Gg(e),i;if(t){var a=Gg(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return tS(this,i)}}function tS(e,t){if(t&&(Zc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nS(e)}function nS(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gAe(){if(typeof Reflect>"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 Gg(e){return Gg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gg(e)}var va=function(e){pAe(n,e);var t=mAe(n);function n(r,i){var a;uAe(this,n),a=t.call(this,r,i);var s=a.props,o=s.isActive,c=s.attributeName,u=s.from,f=s.to,d=s.steps,h=s.children,p=s.duration;if(a.handleStyleChange=a.handleStyleChange.bind(nS(a)),a.changeStyle=a.changeStyle.bind(nS(a)),!o||p<=0)return a.state={style:{}},typeof h=="function"&&(a.state={style:f}),tS(a);if(d&&d.length)a.state={style:d[0].style};else if(u){if(typeof h=="function")return a.state={style:u},tS(a);a.state={style:c?Sd({},c,u):u}}else a.state={style:{}};return a}return fAe(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,o=a.canBegin,c=a.attributeName,u=a.shouldReAnimate,f=a.to,d=a.from,h=this.state.style;if(o){if(!s){var p={style:c?Sd({},c,f):f};this.state&&h&&(c&&h[c]!==f||!c&&h!==f)&&this.setState(p);return}if(!(S_e(i.to,f)&&i.canBegin&&i.isActive)){var g=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=g||u?d:i.to;if(this.state&&h){var y={style:c?Sd({},c,m):m};(c&&h[c]!==m||!c&&h!==m)&&this.setState(y)}this.runAnimation(Wr(Wr({},this.props),{},{from:m,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,o=i.to,c=i.duration,u=i.easing,f=i.begin,d=i.onAnimationEnd,h=i.onAnimationStart,p=nAe(s,o,W_e(u),c,this.changeStyle),g=function(){a.stopJSAnimation=p()};this.manager.start([h,f,g,c,d])}},{key:"runStepAnimation",value:function(i){var a=this,s=i.steps,o=i.begin,c=i.onAnimationStart,u=s[0],f=u.style,d=u.duration,h=d===void 0?0:d,p=function(m,y,v){if(v===0)return m;var b=y.duration,x=y.easing,j=x===void 0?"ease":x,S=y.style,_=y.properties,A=y.onAnimationEnd,k=v>0?s[v-1]:y,E=_||Object.keys(S);if(typeof j=="function"||j==="spring")return[].concat(Kb(m),[a.runJSAnimation.bind(a,{from:k.style,to:S,duration:b,easing:j}),b]);var T=AI(E,b,j),P=Wr(Wr(Wr({},k.style),S),{},{transition:T});return[].concat(Kb(m),[P,b,A]).filter(I_e)};return this.manager.start([c].concat(Kb(s.reduce(p,[f,Math.max(h,o)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=P_e());var a=i.begin,s=i.duration,o=i.attributeName,c=i.to,u=i.easing,f=i.onAnimationStart,d=i.onAnimationEnd,h=i.steps,p=i.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var m=o?Sd({},o,c):c,y=AI(Object.keys(m),s,u);g.start([f,a,Wr(Wr({},m),{},{transition:y}),s,d])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var s=i.duration;i.attributeName,i.easing;var o=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var c=iAe(i,rAe),u=w.Children.count(a),f=this.state.style;if(typeof a=="function")return a(f);if(!o||u===0||s<=0)return a;var d=function(p){var g=p.props,m=g.style,y=m===void 0?{}:m,v=g.className,b=w.cloneElement(p,Wr(Wr({},c),{},{style:Wr(Wr({},y),f),className:v}));return b};return u===1?d(w.Children.only(a)):C.createElement("div",null,w.Children.map(a,function(h){return d(h)}))}}]),n}(w.PureComponent);va.displayName="Animate";va.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};va.propTypes={from:Ve.oneOfType([Ve.object,Ve.string]),to:Ve.oneOfType([Ve.object,Ve.string]),attributeName:Ve.string,duration:Ve.number,begin:Ve.number,easing:Ve.oneOfType([Ve.string,Ve.func]),steps:Ve.arrayOf(Ve.shape({duration:Ve.number.isRequired,style:Ve.object.isRequired,easing:Ve.oneOfType([Ve.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Ve.func]),properties:Ve.arrayOf("string"),onAnimationEnd:Ve.func})),children:Ve.oneOfType([Ve.node,Ve.func]),isActive:Ve.bool,canBegin:Ve.bool,onAnimationEnd:Ve.func,shouldReAnimate:Ve.bool,onAnimationStart:Ve.func,onAnimationReStart:Ve.func};function rh(e){"@babel/helpers - typeof";return rh=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},rh(e)}function Kg(){return Kg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kg.apply(this,arguments)}function yAe(e,t){return wAe(e)||bAe(e,t)||xAe(e,t)||vAe()}function vAe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
709In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xAe(e,t){if(e){if(typeof e=="string")return OI(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 OI(e,t)}}function OI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bAe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,s,o=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function wAe(e){if(Array.isArray(e))return e}function NI(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 II(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?NI(Object(n),!0).forEach(function(r){SAe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function SAe(e,t,n){return t=jAe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jAe(e){var t=_Ae(e,"string");return rh(t)=="symbol"?t:t+""}function _Ae(e,t){if(rh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(rh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var RI=function(t,n,r,i,a){var s=Math.min(Math.abs(r)/2,Math.abs(i)/2),o=i>=0?1:-1,c=r>=0?1:-1,u=i>=0&&r>=0||i<0&&r<0?1:0,f;if(s>0&&a instanceof Array){for(var d=[0,0,0,0],h=0,p=4;h<p;h++)d[h]=a[h]>s?s:a[h];f="M".concat(t,",").concat(n+o*d[0]),d[0]>0&&(f+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(u,",").concat(t+c*d[0],",").concat(n)),f+="L ".concat(t+r-c*d[1],",").concat(n),d[1]>0&&(f+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(u,`,
710        `).concat(t+r,",").concat(n+o*d[1])),f+="L ".concat(t+r,",").concat(n+i-o*d[2]),d[2]>0&&(f+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(u,`,
711        `).concat(t+r-c*d[2],",").concat(n+i)),f+="L ".concat(t+c*d[3],",").concat(n+i),d[3]>0&&(f+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(u,`,
712        `).concat(t,",").concat(n+i-o*d[3])),f+="Z"}else if(s>0&&a===+a&&a>0){var g=Math.min(s,a);f="M ".concat(t,",").concat(n+o*g,`
713            A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+c*g,",").concat(n,`
714            L `).concat(t+r-c*g,",").concat(n,`
715            A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+r,",").concat(n+o*g,`
716            L `).concat(t+r,",").concat(n+i-o*g,`
717            A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t+r-c*g,",").concat(n+i,`
718            L `).concat(t+c*g,",").concat(n+i,`
719            A `).concat(g,",").concat(g,",0,0,").concat(u,",").concat(t,",").concat(n+i-o*g," Z")}else f="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return f},AAe=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,a=n.x,s=n.y,o=n.width,c=n.height;if(Math.abs(o)>0&&Math.abs(c)>0){var u=Math.min(a,a+o),f=Math.max(a,a+o),d=Math.min(s,s+c),h=Math.max(s,s+c);return r>=u&&r<=f&&i>=d&&i<=h}return!1},kAe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},VA=function(t){var n=II(II({},kAe),t),r=w.useRef(),i=w.useState(-1),a=yAe(i,2),s=a[0],o=a[1];w.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var j=r.current.getTotalLength();j&&o(j)}catch{}},[]);var c=n.x,u=n.y,f=n.width,d=n.height,h=n.radius,p=n.className,g=n.animationEasing,m=n.animationDuration,y=n.animationBegin,v=n.isAnimationActive,b=n.isUpdateAnimationActive;if(c!==+c||u!==+u||f!==+f||d!==+d||f===0||d===0)return null;var x=Ce("recharts-rectangle",p);return b?C.createElement(va,{canBegin:s>0,from:{width:f,height:d,x:c,y:u},to:{width:f,height:d,x:c,y:u},duration:m,animationEasing:g,isActive:b},function(j){var S=j.width,_=j.height,A=j.x,k=j.y;return C.createElement(va,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:m,isActive:v,easing:g},C.createElement("path",Kg({},ye(n,!0),{className:x,d:RI(A,k,S,_,h),ref:r})))}):C.createElement("path",Kg({},ye(n,!0),{className:x,d:RI(c,u,f,d,h)}))},EAe=["points","className","baseLinePoints","connectNulls"];function Xl(){return Xl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xl.apply(this,arguments)}function CAe(e,t){if(e==null)return{};var n=PAe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function PAe(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 MI(e){return IAe(e)||NAe(e)||OAe(e)||TAe()}function TAe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
720In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OAe(e,t){if(e){if(typeof e=="string")return rS(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 rS(e,t)}}function NAe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function IAe(e){if(Array.isArray(e))return rS(e)}function rS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var $I=function(t){return t&&t.x===+t.x&&t.y===+t.y},RAe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){$I(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),$I(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},Wd=function(t,n){var r=RAe(t);n&&(r=[r.reduce(function(a,s){return[].concat(MI(a),MI(s))},[])]);var i=r.map(function(a){return a.reduce(function(s,o,c){return"".concat(s).concat(c===0?"M":"L").concat(o.x,",").concat(o.y)},"")}).join("");return r.length===1?"".concat(i,"Z"):i},MAe=function(t,n,r){var i=Wd(t,r);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(Wd(n.reverse(),r).slice(1))},$Ae=function(t){var n=t.points,r=t.className,i=t.baseLinePoints,a=t.connectNulls,s=CAe(t,EAe);if(!n||!n.length)return null;var o=Ce("recharts-polygon",r);if(i&&i.length){var c=s.stroke&&s.stroke!=="none",u=MAe(n,i,a);return C.createElement("g",{className:o},C.createElement("path",Xl({},ye(s,!0),{fill:u.slice(-1)==="Z"?s.fill:"none",stroke:"none",d:u})),c?C.createElement("path",Xl({},ye(s,!0),{fill:"none",d:Wd(n,a)})):null,c?C.createElement("path",Xl({},ye(s,!0),{fill:"none",d:Wd(i,a)})):null)}var f=Wd(n,a);return C.createElement("path",Xl({},ye(s,!0),{fill:f.slice(-1)==="Z"?s.fill:"none",className:o,d:f}))};function iS(){return iS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},iS.apply(this,arguments)}var WA=function(t){var n=t.cx,r=t.cy,i=t.r,a=t.className,s=Ce("recharts-dot",a);return n===+n&&r===+r&&i===+i?w.createElement("circle",iS({},ye(t,!1),mg(t),{className:s,cx:n,cy:r,r:i})):null};function ih(e){"@babel/helpers - typeof";return ih=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},ih(e)}var DAe=["x","y","top","left","width","height","className"];function aS(){return aS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aS.apply(this,arguments)}function DI(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 LAe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DI(Object(n),!0).forEach(function(r){FAe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function FAe(e,t,n){return t=BAe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BAe(e){var t=UAe(e,"string");return ih(t)=="symbol"?t:t+""}function UAe(e,t){if(ih(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ih(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qAe(e,t){if(e==null)return{};var n=zAe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zAe(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 VAe=function(t,n,r,i,a,s){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(s,",").concat(n,"h").concat(r)},WAe=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,s=t.top,o=s===void 0?0:s,c=t.left,u=c===void 0?0:c,f=t.width,d=f===void 0?0:f,h=t.height,p=h===void 0?0:h,g=t.className,m=qAe(t,DAe),y=LAe({x:r,y:a,top:o,left:u,width:d,height:p},m);return!X(r)||!X(a)||!X(d)||!X(p)||!X(o)||!X(u)?null:C.createElement("path",aS({},ye(y,!0),{className:Ce("recharts-cross",g),d:VAe(r,a,d,p,o,u)}))},HAe=Iv,GAe=kB,KAe=Fs;function YAe(e,t){return e&&e.length?HAe(e,KAe(t),GAe):void 0}var XAe=YAe;const ZAe=qe(XAe);var QAe=Iv,JAe=Fs,eke=EB;function tke(e,t){return e&&e.length?QAe(e,JAe(t),eke):void 0}var nke=tke;const rke=qe(nke);var ike=["cx","cy","angle","ticks","axisLine"],ake=["ticks","tick","angle","tickFormatter","stroke"];function Qc(e){"@babel/helpers - typeof";return Qc=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},Qc(e)}function Hd(){return Hd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hd.apply(this,arguments)}function LI(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 Qs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LI(Object(n),!0).forEach(function(r){Bv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function FI(e,t){if(e==null)return{};var n=ske(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ske(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 oke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BI(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,m5(r.key),r)}}function lke(e,t,n){return t&&BI(e.prototype,t),n&&BI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function cke(e,t,n){return t=Yg(t),uke(e,p5()?Reflect.construct(t,n||[],Yg(e).constructor):t.apply(e,n))}function uke(e,t){if(t&&(Qc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dke(e)}function dke(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(p5=function(){return!!e})()}function Yg(e){return Yg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Yg(e)}function fke(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sS(e,t)}function sS(e,t){return sS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},sS(e,t)}function Bv(e,t,n){return t=m5(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m5(e){var t=hke(e,"string");return Qc(t)=="symbol"?t:t+""}function hke(e,t){if(Qc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Qc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Uv=function(e){function t(){return oke(this,t),cke(this,t,arguments)}return fke(t,e),lke(t,[{key:"getTickValueCoord",value:function(r){var i=r.coordinate,a=this.props,s=a.angle,o=a.cx,c=a.cy;return st(o,c,i,s)}},{key:"getTickTextAnchor",value:function(){var r=this.props.orientation,i;switch(r){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var r=this.props,i=r.cx,a=r.cy,s=r.angle,o=r.ticks,c=ZAe(o,function(f){return f.coordinate||0}),u=rke(o,function(f){return f.coordinate||0});return{cx:i,cy:a,startAngle:s,endAngle:s,innerRadius:u.coordinate||0,outerRadius:c.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,a=r.cy,s=r.angle,o=r.ticks,c=r.axisLine,u=FI(r,ike),f=o.reduce(function(g,m){return[Math.min(g[0],m.coordinate),Math.max(g[1],m.coordinate)]},[1/0,-1/0]),d=st(i,a,f[0],s),h=st(i,a,f[1],s),p=Qs(Qs(Qs({},ye(u,!1)),{},{fill:"none"},ye(c,!1)),{},{x1:d.x,y1:d.y,x2:h.x,y2:h.y});return C.createElement("line",Hd({className:"recharts-polar-radius-axis-line"},p))}},{key:"renderTicks",value:function(){var r=this,i=this.props,a=i.ticks,s=i.tick,o=i.angle,c=i.tickFormatter,u=i.stroke,f=FI(i,ake),d=this.getTickTextAnchor(),h=ye(f,!1),p=ye(s,!1),g=a.map(function(m,y){var v=r.getTickValueCoord(m),b=Qs(Qs(Qs(Qs({textAnchor:d,transform:"rotate(".concat(90-o,", ").concat(v.x,", ").concat(v.y,")")},h),{},{stroke:"none",fill:u},p),{},{index:y},v),{},{payload:m});return C.createElement(He,Hd({className:Ce("recharts-polar-radius-axis-tick",e5(s)),key:"tick-".concat(m.coordinate)},Yo(r.props,m,y)),t.renderTickItem(s,b,c?c(m.value,y):m.value))});return C.createElement(He,{className:"recharts-polar-radius-axis-ticks"},g)}},{key:"render",value:function(){var r=this.props,i=r.ticks,a=r.axisLine,s=r.tick;return!i||!i.length?null:C.createElement(He,{className:Ce("recharts-polar-radius-axis",this.props.className)},a&&this.renderAxisLine(),s&&this.renderTicks(),Kt.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,i,a){var s;return C.isValidElement(r)?s=C.cloneElement(r,i):ke(r)?s=r(i):s=C.createElement(Xo,Hd({},i,{className:"recharts-polar-radius-axis-tick-value"}),a),s}}])}(w.PureComponent);Bv(Uv,"displayName","PolarRadiusAxis");Bv(Uv,"axisType","radiusAxis");Bv(Uv,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});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 fo(){return fo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fo.apply(this,arguments)}function UI(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 Js(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UI(Object(n),!0).forEach(function(r){qv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qI(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,y5(r.key),r)}}function mke(e,t,n){return t&&qI(e.prototype,t),n&&qI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function gke(e,t,n){return t=Xg(t),yke(e,g5()?Reflect.construct(t,n||[],Xg(e).constructor):t.apply(e,n))}function yke(e,t){if(t&&(Jc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vke(e)}function vke(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(g5=function(){return!!e})()}function Xg(e){return Xg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xg(e)}function xke(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oS(e,t)}function oS(e,t){return oS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},oS(e,t)}function qv(e,t,n){return t=y5(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y5(e){var t=bke(e,"string");return Jc(t)=="symbol"?t:t+""}function bke(e,t){if(Jc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Jc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wke=Math.PI/180,zI=1e-5,zv=function(e){function t(){return pke(this,t),gke(this,t,arguments)}return xke(t,e),mke(t,[{key:"getTickLineCoord",value:function(r){var i=this.props,a=i.cx,s=i.cy,o=i.radius,c=i.orientation,u=i.tickSize,f=u||8,d=st(a,s,o,r.coordinate),h=st(a,s,o+(c==="inner"?-1:1)*f,r.coordinate);return{x1:d.x,y1:d.y,x2:h.x,y2:h.y}}},{key:"getTickTextAnchor",value:function(r){var i=this.props.orientation,a=Math.cos(-r.coordinate*wke),s;return a>zI?s=i==="outer"?"start":"end":a<-zI?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,o=r.axisLine,c=r.axisLineType,u=Js(Js({},ye(this.props,!1)),{},{fill:"none"},ye(o,!1));if(c==="circle")return C.createElement(WA,fo({className:"recharts-polar-angle-axis-line"},u,{cx:i,cy:a,r:s}));var f=this.props.ticks,d=f.map(function(h){return st(i,a,s,h.coordinate)});return C.createElement($Ae,fo({className:"recharts-polar-angle-axis-line"},u,{points:d}))}},{key:"renderTicks",value:function(){var r=this,i=this.props,a=i.ticks,s=i.tick,o=i.tickLine,c=i.tickFormatter,u=i.stroke,f=ye(this.props,!1),d=ye(s,!1),h=Js(Js({},f),{},{fill:"none"},ye(o,!1)),p=a.map(function(g,m){var y=r.getTickLineCoord(g),v=r.getTickTextAnchor(g),b=Js(Js(Js({textAnchor:v},f),{},{stroke:"none",fill:u},d),{},{index:m,payload:g,x:y.x2,y:y.y2});return C.createElement(He,fo({className:Ce("recharts-polar-angle-axis-tick",e5(s)),key:"tick-".concat(g.coordinate)},Yo(r.props,g,m)),o&&C.createElement("line",fo({className:"recharts-polar-angle-axis-tick-line"},h,y)),s&&t.renderTickItem(s,b,c?c(g.value,m):g.value))});return C.createElement(He,{className:"recharts-polar-angle-axis-ticks"},p)}},{key:"render",value:function(){var r=this.props,i=r.ticks,a=r.radius,s=r.axisLine;return a<=0||!i||!i.length?null:C.createElement(He,{className:Ce("recharts-polar-angle-axis",this.props.className)},s&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,i,a){var s;return C.isValidElement(r)?s=C.cloneElement(r,i):ke(r)?s=r(i):s=C.createElement(Xo,fo({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),s}}])}(w.PureComponent);qv(zv,"displayName","PolarAngleAxis");qv(zv,"axisType","angleAxis");qv(zv,"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 Ske=jF,jke=Ske(Object.getPrototypeOf,Object),_ke=jke,Ake=Aa,kke=_ke,Eke=ka,Cke="[object Object]",Pke=Function.prototype,Tke=Object.prototype,v5=Pke.toString,Oke=Tke.hasOwnProperty,Nke=v5.call(Object);function Ike(e){if(!Eke(e)||Ake(e)!=Cke)return!1;var t=kke(e);if(t===null)return!0;var n=Oke.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&v5.call(n)==Nke}var Rke=Ike;const Mke=qe(Rke);var $ke=Aa,Dke=ka,Lke="[object Boolean]";function Fke(e){return e===!0||e===!1||Dke(e)&&$ke(e)==Lke}var Bke=Fke;const Uke=qe(Bke);function ah(e){"@babel/helpers - typeof";return ah=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},ah(e)}function Zg(){return Zg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zg.apply(this,arguments)}function qke(e,t){return Hke(e)||Wke(e,t)||Vke(e,t)||zke()}function zke(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
721In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vke(e,t){if(e){if(typeof e=="string")return VI(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 VI(e,t)}}function VI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wke(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,s,o=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function Hke(e){if(Array.isArray(e))return e}function WI(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 HI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WI(Object(n),!0).forEach(function(r){Gke(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gke(e,t,n){return t=Kke(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kke(e){var t=Yke(e,"string");return ah(t)=="symbol"?t:t+""}function Yke(e,t){if(ah(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ah(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var GI=function(t,n,r,i,a){var s=r-i,o;return o="M ".concat(t,",").concat(n),o+="L ".concat(t+r,",").concat(n),o+="L ".concat(t+r-s/2,",").concat(n+a),o+="L ".concat(t+r-s/2-i,",").concat(n+a),o+="L ".concat(t,",").concat(n," Z"),o},Xke={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Zke=function(t){var n=HI(HI({},Xke),t),r=w.useRef(),i=w.useState(-1),a=qke(i,2),s=a[0],o=a[1];w.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var x=r.current.getTotalLength();x&&o(x)}catch{}},[]);var c=n.x,u=n.y,f=n.upperWidth,d=n.lowerWidth,h=n.height,p=n.className,g=n.animationEasing,m=n.animationDuration,y=n.animationBegin,v=n.isUpdateAnimationActive;if(c!==+c||u!==+u||f!==+f||d!==+d||h!==+h||f===0&&d===0||h===0)return null;var b=Ce("recharts-trapezoid",p);return v?C.createElement(va,{canBegin:s>0,from:{upperWidth:0,lowerWidth:0,height:h,x:c,y:u},to:{upperWidth:f,lowerWidth:d,height:h,x:c,y:u},duration:m,animationEasing:g,isActive:v},function(x){var j=x.upperWidth,S=x.lowerWidth,_=x.height,A=x.x,k=x.y;return C.createElement(va,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:m,easing:g},C.createElement("path",Zg({},ye(n,!0),{className:b,d:GI(A,k,j,S,_),ref:r})))}):C.createElement("g",null,C.createElement("path",Zg({},ye(n,!0),{className:b,d:GI(c,u,f,d,h)})))},Qke=["option","shapeType","propTransformer","activeClassName","isActive"];function sh(e){"@babel/helpers - typeof";return sh=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},sh(e)}function Jke(e,t){if(e==null)return{};var n=eEe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function eEe(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 KI(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 Qg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?KI(Object(n),!0).forEach(function(r){tEe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tEe(e,t,n){return t=nEe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nEe(e){var t=rEe(e,"string");return sh(t)=="symbol"?t:t+""}function rEe(e,t){if(sh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(sh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function iEe(e,t){return Qg(Qg({},t),e)}function aEe(e,t){return e==="symbols"}function YI(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return C.createElement(VA,n);case"trapezoid":return C.createElement(Zke,n);case"sector":return C.createElement(r5,n);case"symbols":if(aEe(t))return C.createElement(lA,n);break;default:return null}}function sEe(e){return w.isValidElement(e)?e.props:e}function x5(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?iEe:r,a=e.activeClassName,s=a===void 0?"recharts-active-shape":a,o=e.isActive,c=Jke(e,Qke),u;if(w.isValidElement(t))u=w.cloneElement(t,Qg(Qg({},c),sEe(t)));else if(ke(t))u=t(c);else if(Mke(t)&&!Uke(t)){var f=i(t,c);u=C.createElement(YI,{shapeType:n,elementProps:f})}else{var d=c;u=C.createElement(YI,{shapeType:n,elementProps:d})}return o?C.createElement(He,{className:s},u):u}function Vv(e,t){return t!=null&&"trapezoids"in e.props}function Wv(e,t){return t!=null&&"sectors"in e.props}function oh(e,t){return t!=null&&"points"in e.props}function oEe(e,t){var n,r,i=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,a=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return i&&a}function lEe(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function cEe(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function uEe(e,t){var n;return Vv(e,t)?n=oEe:Wv(e,t)?n=lEe:oh(e,t)&&(n=cEe),n}function dEe(e,t){var n;return Vv(e,t)?n="trapezoids":Wv(e,t)?n="sectors":oh(e,t)&&(n="points"),n}function fEe(e,t){if(Vv(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(Wv(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return oh(e,t)?t.payload:{}}function hEe(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=dEe(n,t),a=fEe(n,t),s=r.filter(function(c,u){var f=$v(a,c),d=n.props[i].filter(function(g){var m=uEe(n,t);return m(g,t)}),h=n.props[i].indexOf(d[d.length-1]),p=u===h;return f&&p}),o=r.indexOf(s[s.length-1]);return o}var vm;function eu(e){"@babel/helpers - typeof";return eu=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},eu(e)}function Zl(){return Zl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zl.apply(this,arguments)}function XI(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 nt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XI(Object(n),!0).forEach(function(r){br(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZI(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,w5(r.key),r)}}function mEe(e,t,n){return t&&ZI(e.prototype,t),n&&ZI(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function gEe(e,t,n){return t=Jg(t),yEe(e,b5()?Reflect.construct(t,n||[],Jg(e).constructor):t.apply(e,n))}function yEe(e,t){if(t&&(eu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vEe(e)}function vEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(b5=function(){return!!e})()}function Jg(e){return Jg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Jg(e)}function xEe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lS(e,t)}function lS(e,t){return lS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},lS(e,t)}function br(e,t,n){return t=w5(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w5(e){var t=bEe(e,"string");return eu(t)=="symbol"?t:t+""}function bEe(e,t){if(eu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(eu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Li=function(e){function t(n){var r;return pEe(this,t),r=gEe(this,t,[n]),br(r,"pieRef",null),br(r,"sectorRefs",[]),br(r,"id",Dh("recharts-pie-")),br(r,"handleAnimationEnd",function(){var i=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),ke(i)&&i()}),br(r,"handleAnimationStart",function(){var i=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),ke(i)&&i()}),r.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},r}return xEe(t,e),mEe(t,[{key:"isActiveIndex",value:function(r){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(r)!==-1:r===i}},{key:"hasActiveIndex",value:function(){var r=this.props.activeIndex;return Array.isArray(r)?r.length!==0:r||r===0}},{key:"renderLabels",value:function(r){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var a=this.props,s=a.label,o=a.labelLine,c=a.dataKey,u=a.valueKey,f=ye(this.props,!1),d=ye(s,!1),h=ye(o,!1),p=s&&s.offsetRadius||20,g=r.map(function(m,y){var v=(m.startAngle+m.endAngle)/2,b=st(m.cx,m.cy,m.outerRadius+p,v),x=nt(nt(nt(nt({},f),m),{},{stroke:"none"},d),{},{index:y,textAnchor:t.getTextAnchor(b.x,m.cx)},b),j=nt(nt(nt(nt({},f),m),{},{fill:"none",stroke:m.fill},h),{},{index:y,points:[st(m.cx,m.cy,m.outerRadius,v),b]}),S=c;return Ie(c)&&Ie(u)?S="value":Ie(c)&&(S=u),C.createElement(He,{key:"label-".concat(m.startAngle,"-").concat(m.endAngle,"-").concat(m.midAngle,"-").concat(y)},o&&t.renderLabelLineItem(o,j,"line"),t.renderLabelItem(s,x,hn(m,S)))});return C.createElement(He,{className:"recharts-pie-labels"},g)}},{key:"renderSectorsStatically",value:function(r){var i=this,a=this.props,s=a.activeShape,o=a.blendStroke,c=a.inactiveShape;return r.map(function(u,f){if((u==null?void 0:u.startAngle)===0&&(u==null?void 0:u.endAngle)===0&&r.length!==1)return null;var d=i.isActiveIndex(f),h=c&&i.hasActiveIndex()?c:null,p=d?s:h,g=nt(nt({},u),{},{stroke:o?u.fill:u.stroke,tabIndex:-1});return C.createElement(He,Zl({ref:function(y){y&&!i.sectorRefs.includes(y)&&i.sectorRefs.push(y)},tabIndex:-1,className:"recharts-pie-sector"},Yo(i.props,u,f),{key:"sector-".concat(u==null?void 0:u.startAngle,"-").concat(u==null?void 0:u.endAngle,"-").concat(u.midAngle,"-").concat(f)}),C.createElement(x5,Zl({option:p,isActive:d,shapeType:"sector"},g)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,i=this.props,a=i.sectors,s=i.isAnimationActive,o=i.animationBegin,c=i.animationDuration,u=i.animationEasing,f=i.animationId,d=this.state,h=d.prevSectors,p=d.prevIsAnimationActive;return C.createElement(va,{begin:o,duration:c,isActive:s,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(f,"-").concat(p),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(g){var m=g.t,y=[],v=a&&a[0],b=v.startAngle;return a.forEach(function(x,j){var S=h&&h[j],_=j>0?rr(x,"paddingAngle",0):0;if(S){var A=za(S.endAngle-S.startAngle,x.endAngle-x.startAngle),k=nt(nt({},x),{},{startAngle:b+_,endAngle:b+A(m)+_});y.push(k),b=k.endAngle}else{var E=x.endAngle,T=x.startAngle,P=za(0,E-T),O=P(m),$=nt(nt({},x),{},{startAngle:b+_,endAngle:b+O+_});y.push($),b=$.endAngle}}),C.createElement(He,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 o=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});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||!$v(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,o=i.className,c=i.label,u=i.cx,f=i.cy,d=i.innerRadius,h=i.outerRadius,p=i.isAnimationActive,g=this.state.isAnimationFinished;if(a||!s||!s.length||!X(u)||!X(f)||!X(d)||!X(h))return null;var m=Ce("recharts-pie",o);return C.createElement(He,{tabIndex:this.props.rootTabIndex,className:m,ref:function(v){r.pieRef=v}},this.renderSectors(),c&&this.renderLabels(s),Kt.renderCallByParent(this.props,null,!1),(!p||g)&&gs.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<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(r,i,a){if(C.isValidElement(r))return C.cloneElement(r,i);if(ke(r))return r(i);var s=Ce("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return C.createElement(G1,Zl({},i,{key:a,type:"linear",className:s}))}},{key:"renderLabelItem",value:function(r,i,a){if(C.isValidElement(r))return C.cloneElement(r,i);var s=a;if(ke(r)&&(s=r(i),C.isValidElement(s)))return s;var o=Ce("recharts-pie-label-text",typeof r!="boolean"&&!ke(r)?r.className:"");return C.createElement(Xo,Zl({},i,{alignmentBaseline:"middle",className:o}),s)}}])}(w.PureComponent);vm=Li;br(Li,"displayName","Pie");br(Li,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!ia.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});br(Li,"parseDeltaAngle",function(e,t){var n=Sn(t-e),r=Math.min(Math.abs(t-e),360);return n*r});br(Li,"getRealPieData",function(e){var t=e.data,n=e.children,r=ye(e,!1),i=kr(n,wo);return t&&t.length?t.map(function(a,s){return nt(nt(nt({payload:a},r),a),i&&i[s]&&i[s].props)}):i&&i.length?i.map(function(a){return nt(nt({},r),a.props)}):[]});br(Li,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,i=t.width,a=t.height,s=JB(i,a),o=r+jn(e.cx,i,i/2),c=n+jn(e.cy,a,a/2),u=jn(e.innerRadius,s,0),f=jn(e.outerRadius,s,s*.8),d=e.maxRadius||Math.sqrt(i*i+a*a)/2;return{cx:o,cy:c,innerRadius:u,outerRadius:f,maxRadius:d}});br(Li,"getComposedData",function(e){var t=e.item,n=e.offset,r=t.type.defaultProps!==void 0?nt(nt({},t.type.defaultProps),t.props):t.props,i=vm.getRealPieData(r);if(!i||!i.length)return null;var a=r.cornerRadius,s=r.startAngle,o=r.endAngle,c=r.paddingAngle,u=r.dataKey,f=r.nameKey,d=r.valueKey,h=r.tooltipType,p=Math.abs(r.minAngle),g=vm.parseCoordinateOfPie(r,n),m=vm.parseDeltaAngle(s,o),y=Math.abs(m),v=u;Ie(u)&&Ie(d)?(ra(!1,`Use "dataKey" to specify the value of pie,
722      the props "valueKey" will be deprecated in 1.1.0`),v="value"):Ie(u)&&(ra(!1,`Use "dataKey" to specify the value of pie,
723      the props "valueKey" will be deprecated in 1.1.0`),v=d);var b=i.filter(function(k){return hn(k,v,0)!==0}).length,x=(y>=360?b:b-1)*c,j=y-b*p-x,S=i.reduce(function(k,E){var T=hn(E,v,0);return k+(X(T)?T:0)},0),_;if(S>0){var A;_=i.map(function(k,E){var T=hn(k,v,0),P=hn(k,f,E),O=(X(T)?T:0)/S,$;E?$=A.endAngle+Sn(m)*c*(T!==0?1:0):$=s;var R=$+Sn(m)*((T!==0?p:0)+O*j),L=($+R)/2,D=(g.innerRadius+g.outerRadius)/2,M=[{name:P,value:T,payload:k,dataKey:v,type:h}],N=st(g.cx,g.cy,D,L);return A=nt(nt(nt({percent:O,cornerRadius:a,name:P,tooltipPayload:M,midAngle:L,middleRadius:D,tooltipPosition:N},k),g),{},{value:hn(k,v),startAngle:$,endAngle:R,payload:k,paddingAngle:Sn(m)*c}),A})}return nt(nt({},g),{},{sectors:_,data:i})});var wEe=Math.ceil,SEe=Math.max;function jEe(e,t,n,r){for(var i=-1,a=SEe(wEe((t-e)/(n||1)),0),s=Array(a);a--;)s[r?a:++i]=e,e+=n;return s}var _Ee=jEe,AEe=UF,QI=1/0,kEe=17976931348623157e292;function EEe(e){if(!e)return e===0?e:0;if(e=AEe(e),e===QI||e===-QI){var t=e<0?-1:1;return t*kEe}return e===e?e:0}var CEe=EEe,PEe=_Ee,TEe=kv,Yb=CEe;function OEe(e){return function(t,n,r){return r&&typeof r!="number"&&TEe(t,n,r)&&(n=r=void 0),t=Yb(t),n===void 0?(n=t,t=0):n=Yb(n),r=r===void 0?t<n?1:-1:Yb(r),PEe(t,n,r,e)}}var NEe=OEe,IEe=NEe,REe=IEe(),MEe=REe;const ey=qe(MEe);function lh(e){"@babel/helpers - typeof";return lh=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},lh(e)}function JI(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 eR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JI(Object(n),!0).forEach(function(r){S5(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JI(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function S5(e,t,n){return t=$Ee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $Ee(e){var t=DEe(e,"string");return lh(t)=="symbol"?t:t+""}function DEe(e,t){if(lh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(lh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var LEe=["Webkit","Moz","O","ms"],FEe=function(t,n){var r=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=LEe.reduce(function(a,s){return eR(eR({},a),{},S5({},s+r,n))},{});return i[t]=n,i};function tu(e){"@babel/helpers - typeof";return tu=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},tu(e)}function ty(){return ty=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ty.apply(this,arguments)}function tR(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 Xb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tR(Object(n),!0).forEach(function(r){Hn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function BEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_5(r.key),r)}}function UEe(e,t,n){return t&&nR(e.prototype,t),n&&nR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function qEe(e,t,n){return t=ny(t),zEe(e,j5()?Reflect.construct(t,n||[],ny(e).constructor):t.apply(e,n))}function zEe(e,t){if(t&&(tu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return VEe(e)}function VEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function j5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(j5=function(){return!!e})()}
vendor: 104,003 bytes, lines 723-727
723function ny(e){return ny=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ny(e)}function WEe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cS(e,t)}function cS(e,t){return cS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},cS(e,t)}function Hn(e,t,n){return t=_5(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _5(e){var t=HEe(e,"string");return tu(t)=="symbol"?t:t+""}function HEe(e,t){if(tu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(tu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var GEe=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,a=t.x,s=t.width,o=t.travellerWidth;if(!n||!n.length)return{};var c=n.length,u=qd().domain(ey(0,c)).range([a,a+s-o]),f=u.domain().map(function(d){return u(d)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(r),endX:u(i),scale:u,scaleValues:f}},rR=function(t){return t.changedTouches&&!!t.changedTouches.length},nu=function(e){function t(n){var r;return BEe(this,t),r=qEe(this,t,[n]),Hn(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),Hn(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),Hn(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,a=i.endIndex,s=i.onDragEnd,o=i.startIndex;s==null||s({endIndex:a,startIndex:o})}),r.detachDragEndListener()}),Hn(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Hn(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Hn(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Hn(r,"handleSlideDragStart",function(i){var a=rR(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 WEe(t,e),UEe(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,o=this.props,c=o.gap,u=o.data,f=u.length-1,d=Math.min(i,a),h=Math.max(i,a),p=t.getIndexInRange(s,d),g=t.getIndexInRange(s,h);return{startIndex:p-p%c,endIndex:g===f?f:g-g%c}}},{key:"getTextOfTick",value:function(r){var i=this.props,a=i.data,s=i.tickFormatter,o=i.dataKey,c=hn(a[r],o,r);return ke(s)?s(c,r):c}},{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,o=i.endX,c=this.props,u=c.x,f=c.width,d=c.travellerWidth,h=c.startIndex,p=c.endIndex,g=c.onChange,m=r.pageX-a;m>0?m=Math.min(m,u+f-d-o,u+f-d-s):m<0&&(m=Math.max(m,u-s,u-o));var y=this.getIndex({startX:s+m,endX:o+m});(y.startIndex!==h||y.endIndex!==p)&&g&&g(y),this.setState({startX:s+m,endX:o+m,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var a=rR(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,o=i.endX,c=i.startX,u=this.state[s],f=this.props,d=f.x,h=f.width,p=f.travellerWidth,g=f.onChange,m=f.gap,y=f.data,v={startX:this.state.startX,endX:this.state.endX},b=r.pageX-a;b>0?b=Math.min(b,d+h-p-u):b<0&&(b=Math.max(b,d-u)),v[s]=u+b;var x=this.getIndex(v),j=x.startIndex,S=x.endIndex,_=function(){var k=y.length-1;return s==="startX"&&(o>c?j%m===0:S%m===0)||o<c&&S===k||s==="endX"&&(o>c?S%m===0:j%m===0)||o>c&&S===k};this.setState(Hn(Hn({},s,u+b),"brushMoveStartX",r.pageX),function(){g&&_()&&g(x)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var a=this,s=this.state,o=s.scaleValues,c=s.startX,u=s.endX,f=this.state[i],d=o.indexOf(f);if(d!==-1){var h=d+r;if(!(h===-1||h>=o.length)){var p=o[h];i==="startX"&&p>=u||i==="endX"&&p<=c||this.setState(Hn({},i,p),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,o=r.height,c=r.fill,u=r.stroke;return C.createElement("rect",{stroke:u,fill:c,x:i,y:a,width:s,height:o})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,a=r.y,s=r.width,o=r.height,c=r.data,u=r.children,f=r.padding,d=w.Children.only(u);return d?C.cloneElement(d,{x:i,y:a,width:s,height:o,margin:f,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(r,i){var a,s,o=this,c=this.props,u=c.y,f=c.travellerWidth,d=c.height,h=c.traveller,p=c.ariaLabel,g=c.data,m=c.startIndex,y=c.endIndex,v=Math.max(r,this.props.x),b=Xb(Xb({},ye(this.props,!1)),{},{x:v,y:u,width:f,height:d}),x=p||"Min value: ".concat((a=g[m])===null||a===void 0?void 0:a.name,", Max value: ").concat((s=g[y])===null||s===void 0?void 0:s.name);return C.createElement(He,{tabIndex:0,role:"slider","aria-label":x,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(S){["ArrowLeft","ArrowRight"].includes(S.key)&&(S.preventDefault(),S.stopPropagation(),o.handleTravellerMoveKeyboard(S.key==="ArrowRight"?1:-1,i))},onFocus:function(){o.setState({isTravellerFocused:!0})},onBlur:function(){o.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,b))}},{key:"renderSlide",value:function(r,i){var a=this.props,s=a.y,o=a.height,c=a.stroke,u=a.travellerWidth,f=Math.min(r,i)+u,d=Math.max(Math.abs(i-r)-u,0);return C.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:f,y:s,width:d,height:o})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,a=r.endIndex,s=r.y,o=r.height,c=r.travellerWidth,u=r.stroke,f=this.state,d=f.startX,h=f.endX,p=5,g={pointerEvents:"none",fill:u};return C.createElement(He,{className:"recharts-brush-texts"},C.createElement(Xo,ty({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,h)-p,y:s+o/2},g),this.getTextOfTick(i)),C.createElement(Xo,ty({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,h)+c+p,y:s+o/2},g),this.getTextOfTick(a)))}},{key:"render",value:function(){var r=this.props,i=r.data,a=r.className,s=r.children,o=r.x,c=r.y,u=r.width,f=r.height,d=r.alwaysShowText,h=this.state,p=h.startX,g=h.endX,m=h.isTextActive,y=h.isSlideMoving,v=h.isTravellerMoving,b=h.isTravellerFocused;if(!i||!i.length||!X(o)||!X(c)||!X(u)||!X(f)||u<=0||f<=0)return null;var x=Ce("recharts-brush",a),j=C.Children.count(s)===1,S=FEe("userSelect","none");return C.createElement(He,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:S},this.renderBackground(),j&&this.renderPanorama(),this.renderSlide(p,g),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(g,"endX"),(m||y||v||b||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,a=r.y,s=r.width,o=r.height,c=r.stroke,u=Math.floor(a+o/2)-1;return C.createElement(C.Fragment,null,C.createElement("rect",{x:i,y:a,width:s,height:o,fill:c,stroke:"none"}),C.createElement("line",{x1:i+1,y1:u,x2:i+s-1,y2:u,fill:"none",stroke:"#fff"}),C.createElement("line",{x1:i+1,y1:u+2,x2:i+s-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var a;return C.isValidElement(r)?a=C.cloneElement(r,i):ke(r)?a=r(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(r,i){var a=r.data,s=r.width,o=r.x,c=r.travellerWidth,u=r.updateId,f=r.startIndex,d=r.endIndex;if(a!==i.prevData||u!==i.prevUpdateId)return Xb({prevData:a,prevTravellerWidth:c,prevUpdateId:u,prevX:o,prevWidth:s},a&&a.length?GEe({data:a,width:s,x:o,travellerWidth:c,startIndex:f,endIndex:d}):{scale:null,scaleValues:null});if(i.scale&&(s!==i.prevWidth||o!==i.prevX||c!==i.prevTravellerWidth)){i.scale.range([o,o+s-c]);var h=i.scale.domain().map(function(p){return i.scale(p)});return{prevData:a,prevTravellerWidth:c,prevUpdateId:u,prevX:o,prevWidth:s,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(r,i){for(var a=r.length,s=0,o=a-1;o-s>1;){var c=Math.floor((s+o)/2);r[c]>i?o=c:s=c}return i>=r[o]?o:s}}])}(w.PureComponent);Hn(nu,"displayName","Brush");Hn(nu,"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 KEe=gA;function YEe(e,t){var n;return KEe(e,function(r,i,a){return n=t(r,i,a),!n}),!!n}var XEe=YEe,ZEe=mF,QEe=Fs,JEe=XEe,eCe=Un,tCe=kv;function nCe(e,t,n){var r=eCe(e)?ZEe:JEe;return n&&tCe(e,t,n)&&(t=void 0),r(e,QEe(t))}var rCe=nCe;const iCe=qe(rCe);var Ri=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},iR=$F;function aCe(e,t,n){t=="__proto__"&&iR?iR(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var sCe=aCe,oCe=sCe,lCe=RF,cCe=Fs;function uCe(e,t){var n={};return t=cCe(t),lCe(e,function(r,i,a){oCe(n,i,t(r,i,a))}),n}var dCe=uCe;const fCe=qe(dCe);function hCe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}var pCe=hCe,mCe=gA;function gCe(e,t){var n=!0;return mCe(e,function(r,i,a){return n=!!t(r,i,a),n}),n}var yCe=gCe,vCe=pCe,xCe=yCe,bCe=Fs,wCe=Un,SCe=kv;function jCe(e,t,n){var r=wCe(e)?vCe:xCe;return n&&SCe(e,t,n)&&(t=void 0),r(e,bCe(t))}var _Ce=jCe;const ACe=qe(_Ce);var kCe=["x","y"];function ch(e){"@babel/helpers - typeof";return ch=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},ch(e)}function uS(){return uS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uS.apply(this,arguments)}function aR(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 hd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aR(Object(n),!0).forEach(function(r){ECe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ECe(e,t,n){return t=CCe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CCe(e){var t=PCe(e,"string");return ch(t)=="symbol"?t:t+""}function PCe(e,t){if(ch(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ch(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function TCe(e,t){if(e==null)return{};var n=OCe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function OCe(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 NCe(e,t){var n=e.x,r=e.y,i=TCe(e,kCe),a="".concat(n),s=parseInt(a,10),o="".concat(r),c=parseInt(o,10),u="".concat(t.height||i.height),f=parseInt(u,10),d="".concat(t.width||i.width),h=parseInt(d,10);return hd(hd(hd(hd(hd({},t),i),s?{x:s}:{}),c?{y:c}:{}),{},{height:f,width:h,name:t.name,radius:t.radius})}function sR(e){return C.createElement(x5,uS({shapeType:"rectangle",propTransformer:NCe,activeClassName:"recharts-active-bar"},e))}var ICe=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=X(r)||nce(r);return a?t(r,i):(a||Qo(),n)}},RCe=["value","background"],A5;function ru(e){"@babel/helpers - typeof";return ru=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},ru(e)}function MCe(e,t){if(e==null)return{};var n=$Ce(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $Ce(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 ry(){return ry=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ry.apply(this,arguments)}function oR(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 Tt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oR(Object(n),!0).forEach(function(r){is(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,E5(r.key),r)}}function LCe(e,t,n){return t&&lR(e.prototype,t),n&&lR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function FCe(e,t,n){return t=iy(t),BCe(e,k5()?Reflect.construct(t,n||[],iy(e).constructor):t.apply(e,n))}function BCe(e,t){if(t&&(ru(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return UCe(e)}function UCe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(k5=function(){return!!e})()}function iy(e){return iy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},iy(e)}function qCe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dS(e,t)}function dS(e,t){return dS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},dS(e,t)}function is(e,t,n){return t=E5(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E5(e){var t=zCe(e,"string");return ru(t)=="symbol"?t:t+""}function zCe(e,t){if(ru(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ru(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Es=function(e){function t(){var n;DCe(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=FCe(this,t,[].concat(i)),is(n,"state",{isAnimationFinished:!1}),is(n,"id",Dh("recharts-bar-")),is(n,"handleAnimationEnd",function(){var s=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),s&&s()}),is(n,"handleAnimationStart",function(){var s=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),s&&s()}),n}return qCe(t,e),LCe(t,[{key:"renderRectanglesStatically",value:function(r){var i=this,a=this.props,s=a.shape,o=a.dataKey,c=a.activeIndex,u=a.activeBar,f=ye(this.props,!1);return r&&r.map(function(d,h){var p=h===c,g=p?u:s,m=Tt(Tt(Tt({},f),d),{},{isActive:p,option:g,index:h,dataKey:o,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return C.createElement(He,ry({className:"recharts-bar-rectangle"},Yo(i.props,d,h),{key:"rectangle-".concat(d==null?void 0:d.x,"-").concat(d==null?void 0:d.y,"-").concat(d==null?void 0:d.value,"-").concat(h)}),C.createElement(sR,m))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,a=i.data,s=i.layout,o=i.isAnimationActive,c=i.animationBegin,u=i.animationDuration,f=i.animationEasing,d=i.animationId,h=this.state.prevData;return C.createElement(va,{begin:c,duration:u,isActive:o,easing:f,from:{t:0},to:{t:1},key:"bar-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(p){var g=p.t,m=a.map(function(y,v){var b=h&&h[v];if(b){var x=za(b.x,y.x),j=za(b.y,y.y),S=za(b.width,y.width),_=za(b.height,y.height);return Tt(Tt({},y),{},{x:x(g),y:j(g),width:S(g),height:_(g)})}if(s==="horizontal"){var A=za(0,y.height),k=A(g);return Tt(Tt({},y),{},{y:y.y+y.height-k,height:k})}var E=za(0,y.width),T=E(g);return Tt(Tt({},y),{},{width:T})});return C.createElement(He,null,r.renderRectanglesStatically(m))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,a=r.isAnimationActive,s=this.state.prevData;return a&&i&&i.length&&(!s||!$v(s,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,a=i.data,s=i.dataKey,o=i.activeIndex,c=ye(this.props.background,!1);return a.map(function(u,f){u.value;var d=u.background,h=MCe(u,RCe);if(!d)return null;var p=Tt(Tt(Tt(Tt(Tt({},h),{},{fill:"#eee"},d),c),Yo(r.props,u,f)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:s,index:f,className:"recharts-bar-background-rectangle"});return C.createElement(sR,ry({key:"background-bar-".concat(f),option:r.props.background,isActive:f===o},p))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,s=a.data,o=a.xAxis,c=a.yAxis,u=a.layout,f=a.children,d=kr(f,Fv);if(!d)return null;var h=u==="vertical"?s[0].height/2:s[0].width/2,p=function(y,v){var b=Array.isArray(y.value)?y.value[1]:y.value;return{x:y.x,y:y.y,value:b,errorVal:hn(y,v)}},g={clipPath:r?"url(#clipPath-".concat(i,")"):null};return C.createElement(He,g,d.map(function(m){return C.cloneElement(m,{key:"error-bar-".concat(i,"-").concat(m.props.dataKey),data:s,xAxis:o,yAxis:c,layout:u,offset:h,dataPointFormatter:p})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,a=r.data,s=r.className,o=r.xAxis,c=r.yAxis,u=r.left,f=r.top,d=r.width,h=r.height,p=r.isAnimationActive,g=r.background,m=r.id;if(i||!a||!a.length)return null;var y=this.state.isAnimationFinished,v=Ce("recharts-bar",s),b=o&&o.allowDataOverflow,x=c&&c.allowDataOverflow,j=b||x,S=Ie(m)?this.id:m;return C.createElement(He,{className:v},b||x?C.createElement("defs",null,C.createElement("clipPath",{id:"clipPath-".concat(S)},C.createElement("rect",{x:b?u:u-d/2,y:x?f:f-h/2,width:b?d:d*2,height:x?h:h*2}))):null,C.createElement(He,{className:"recharts-bar-rectangles",clipPath:j?"url(#clipPath-".concat(S,")"):null},g?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(j,S),(!p||y)&&gs.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:i.curData}:r.data!==i.curData?{curData:r.data}:null}}])}(w.PureComponent);A5=Es;is(Es,"displayName","Bar");is(Es,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!ia.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});is(Es,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,a=e.xAxis,s=e.yAxis,o=e.xAxisTicks,c=e.yAxisTicks,u=e.stackedData,f=e.dataStartIndex,d=e.displayedData,h=e.offset,p=wSe(r,n);if(!p)return null;var g=t.layout,m=n.type.defaultProps,y=m!==void 0?Tt(Tt({},m),n.props):n.props,v=y.dataKey,b=y.children,x=y.minPointSize,j=g==="horizontal"?s:a,S=u?j.scale.domain():null,_=CSe({numericAxis:j}),A=kr(b,wo),k=d.map(function(E,T){var P,O,$,R,L,D;u?P=SSe(u[f+T],S):(P=hn(E,v),Array.isArray(P)||(P=[_,P]));var M=ICe(x,A5.defaultProps.minPointSize)(P[1],T);if(g==="horizontal"){var N,I=[s.scale(P[0]),s.scale(P[1])],F=I[0],V=I[1];O=ZN({axis:a,ticks:o,bandSize:i,offset:p.offset,entry:E,index:T}),$=(N=V??F)!==null&&N!==void 0?N:void 0,R=p.size;var U=F-V;if(L=Number.isNaN(U)?0:U,D={x:O,y:s.y,width:R,height:s.height},Math.abs(M)>0&&Math.abs(L)<Math.abs(M)){var G=Sn(L||M)*(Math.abs(M)-Math.abs(L));$-=G,L+=G}}else{var te=[a.scale(P[0]),a.scale(P[1])],xe=te[0],Me=te[1];if(O=xe,$=ZN({axis:s,ticks:c,bandSize:i,offset:p.offset,entry:E,index:T}),R=Me-xe,L=p.size,D={x:a.x,y:$,width:a.width,height:L},Math.abs(M)>0&&Math.abs(R)<Math.abs(M)){var Y=Sn(R||M)*(Math.abs(M)-Math.abs(R));R+=Y}}return Tt(Tt(Tt({},E),{},{x:O,y:$,width:R,height:L,value:u?P:P[1],payload:E,background:D},A&&A[T]&&A[T].props),{},{tooltipPayload:[ZB(n,E)],tooltipPosition:{x:O+R/2,y:$+L/2}})});return Tt({data:k,layout:g},h)});function uh(e){"@babel/helpers - typeof";return uh=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},uh(e)}function VCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,C5(r.key),r)}}function WCe(e,t,n){return t&&cR(e.prototype,t),n&&cR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function uR(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 ni(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uR(Object(n),!0).forEach(function(r){Hv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hv(e,t,n){return t=C5(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C5(e){var t=HCe(e,"string");return uh(t)=="symbol"?t:t+""}function HCe(e,t){if(uh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(uh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var GCe=function(t,n,r,i,a){var s=t.width,o=t.height,c=t.layout,u=t.children,f=Object.keys(n),d={left:r.left,leftMirror:r.left,right:s-r.right,rightMirror:s-r.right,top:r.top,topMirror:r.top,bottom:o-r.bottom,bottomMirror:o-r.bottom},h=!!Kn(u,Es);return f.reduce(function(p,g){var m=n[g],y=m.orientation,v=m.domain,b=m.padding,x=b===void 0?{}:b,j=m.mirror,S=m.reversed,_="".concat(y).concat(j?"Mirror":""),A,k,E,T,P;if(m.type==="number"&&(m.padding==="gap"||m.padding==="no-gap")){var O=v[1]-v[0],$=1/0,R=m.categoricalDomain.sort(ace);if(R.forEach(function(te,xe){xe>0&&($=Math.min((te||0)-(R[xe-1]||0),$))}),Number.isFinite($)){var L=$/O,D=m.layout==="vertical"?r.height:r.width;if(m.padding==="gap"&&(A=L*D/2),m.padding==="no-gap"){var M=jn(t.barCategoryGap,L*D),N=L*D/2;A=N-M-(N-M)/D*M}}}i==="xAxis"?k=[r.left+(x.left||0)+(A||0),r.left+r.width-(x.right||0)-(A||0)]:i==="yAxis"?k=c==="horizontal"?[r.top+r.height-(x.bottom||0),r.top+(x.top||0)]:[r.top+(x.top||0)+(A||0),r.top+r.height-(x.bottom||0)-(A||0)]:k=m.range,S&&(k=[k[1],k[0]]);var I=GB(m,a,h),F=I.scale,V=I.realScaleType;F.domain(v).range(k),KB(F);var U=YB(F,ni(ni({},m),{},{realScaleType:V}));i==="xAxis"?(P=y==="top"&&!j||y==="bottom"&&j,E=r.left,T=d[_]-P*m.height):i==="yAxis"&&(P=y==="left"&&!j||y==="right"&&j,E=d[_]-P*m.width,T=r.top);var G=ni(ni(ni({},m),U),{},{realScaleType:V,x:E,y:T,scale:F,width:i==="xAxis"?r.width:m.width,height:i==="yAxis"?r.height:m.height});return G.bandSize=qg(G,U),!m.hide&&i==="xAxis"?d[_]+=(P?-1:1)*G.height:m.hide||(d[_]+=(P?-1:1)*G.width),ni(ni({},p),{},Hv({},g,G))},{})},P5=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)}},KCe=function(t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2;return P5({x:n,y:r},{x:i,y:a})},T5=function(){function e(t){VCe(this,e),this.scale=t}return WCe(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 o=this.bandwidth?this.bandwidth():0;return this.scale(n)+o}default:return this.scale(n)}if(i){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+c}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)}}])}();Hv(T5,"EPS",1e-4);var HA=function(t){var n=Object.keys(t).reduce(function(r,i){return ni(ni({},r),{},Hv({},i,T5.create(t[i])))},{});return ni(ni({},n),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=a.bandAware,o=a.position;return fCe(i,function(c,u){return n[u].apply(c,{bandAware:s,position:o})})},isInRange:function(i){return ACe(i,function(a,s){return n[s].isInRange(a)})}})};function YCe(e){return(e%180+180)%180}var XCe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=YCe(i),s=a*Math.PI/180,o=Math.atan(r/n),c=s>o&&s<Math.PI-o?r/Math.sin(s):n/Math.cos(s);return Math.abs(c)},ZCe=sle(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("")}),O5=w.createContext(void 0),N5=w.createContext(void 0),I5=w.createContext(void 0),QCe=w.createContext({}),R5=w.createContext(void 0),M5=w.createContext(0),$5=w.createContext(0),dR=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,a=n.offset,s=t.clipPathId,o=t.children,c=t.width,u=t.height,f=ZCe(a);return C.createElement(O5.Provider,{value:r},C.createElement(N5.Provider,{value:i},C.createElement(QCe.Provider,{value:a},C.createElement(I5.Provider,{value:f},C.createElement(R5.Provider,{value:s},C.createElement(M5.Provider,{value:u},C.createElement($5.Provider,{value:c},o)))))))},JCe=function(){return w.useContext(R5)},D5=function(t){var n=w.useContext(O5);n==null&&Qo();var r=n[t];return r==null&&Qo(),r},L5=function(t){var n=w.useContext(N5);n==null&&Qo();var r=n[t];return r==null&&Qo(),r},ePe=function(){var t=w.useContext(I5);return t},F5=function(){return w.useContext($5)},B5=function(){return w.useContext(M5)};function iu(e){"@babel/helpers - typeof";return iu=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},iu(e)}function tPe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nPe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,q5(r.key),r)}}function rPe(e,t,n){return t&&nPe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function iPe(e,t,n){return t=ay(t),aPe(e,U5()?Reflect.construct(t,n||[],ay(e).constructor):t.apply(e,n))}function aPe(e,t){if(t&&(iu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sPe(e)}function sPe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function U5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(U5=function(){return!!e})()}function ay(e){return ay=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ay(e)}function oPe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fS(e,t)}function fS(e,t){return fS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},fS(e,t)}function fR(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 hR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fR(Object(n),!0).forEach(function(r){GA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function GA(e,t,n){return t=q5(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q5(e){var t=lPe(e,"string");return iu(t)=="symbol"?t:t+""}function lPe(e,t){if(iu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(iu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cPe(e,t){return hPe(e)||fPe(e,t)||dPe(e,t)||uPe()}function uPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
724In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dPe(e,t){if(e){if(typeof e=="string")return pR(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 pR(e,t)}}function pR(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function fPe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,s,o=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function hPe(e){if(Array.isArray(e))return e}function hS(){return hS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hS.apply(this,arguments)}var pPe=function(t,n){var r;return C.isValidElement(t)?r=C.cloneElement(t,n):ke(t)?r=t(n):r=C.createElement("line",hS({},n,{className:"recharts-reference-line-line"})),r},mPe=function(t,n,r,i,a,s,o,c,u){var f=a.x,d=a.y,h=a.width,p=a.height;if(r){var g=u.y,m=t.y.apply(g,{position:s});if(Ri(u,"discard")&&!t.y.isInRange(m))return null;var y=[{x:f+h,y:m},{x:f,y:m}];return c==="left"?y.reverse():y}if(n){var v=u.x,b=t.x.apply(v,{position:s});if(Ri(u,"discard")&&!t.x.isInRange(b))return null;var x=[{x:b,y:d+p},{x:b,y:d}];return o==="top"?x.reverse():x}if(i){var j=u.segment,S=j.map(function(_){return t.apply(_,{position:s})});return Ri(u,"discard")&&iCe(S,function(_){return!t.isInRange(_)})?null:S}return null};function gPe(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,a=e.yAxisId,s=e.shape,o=e.className,c=e.alwaysShow,u=JCe(),f=D5(i),d=L5(a),h=ePe();if(!u||!h)return null;ra(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=HA({x:f.scale,y:d.scale}),g=zt(t),m=zt(n),y=r&&r.length===2,v=mPe(p,g,m,y,h,e.position,f.orientation,d.orientation,e);if(!v)return null;var b=cPe(v,2),x=b[0],j=x.x,S=x.y,_=b[1],A=_.x,k=_.y,E=Ri(e,"hidden")?"url(#".concat(u,")"):void 0,T=hR(hR({clipPath:E},ye(e,!0)),{},{x1:j,y1:S,x2:A,y2:k});return C.createElement(He,{className:Ce("recharts-reference-line",o)},pPe(s,T),Kt.renderCallByParent(e,KCe({x1:j,y1:S,x2:A,y2:k})))}var KA=function(e){function t(){return tPe(this,t),iPe(this,t,arguments)}return oPe(t,e),rPe(t,[{key:"render",value:function(){return C.createElement(gPe,this.props)}}])}(C.Component);GA(KA,"displayName","ReferenceLine");GA(KA,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function pS(){return pS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pS.apply(this,arguments)}function au(e){"@babel/helpers - typeof";return au=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},au(e)}function mR(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 gR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mR(Object(n),!0).forEach(function(r){Gv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yPe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vPe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,V5(r.key),r)}}function xPe(e,t,n){return t&&vPe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function bPe(e,t,n){return t=sy(t),wPe(e,z5()?Reflect.construct(t,n||[],sy(e).constructor):t.apply(e,n))}function wPe(e,t){if(t&&(au(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return SPe(e)}function SPe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function z5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(z5=function(){return!!e})()}function sy(e){return sy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},sy(e)}function jPe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mS(e,t)}function mS(e,t){return mS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},mS(e,t)}function Gv(e,t,n){return t=V5(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function V5(e){var t=_Pe(e,"string");return au(t)=="symbol"?t:t+""}function _Pe(e,t){if(au(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(au(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var APe=function(t){var n=t.x,r=t.y,i=t.xAxis,a=t.yAxis,s=HA({x:i.scale,y:a.scale}),o=s.apply({x:n,y:r},{bandAware:!0});return Ri(t,"discard")&&!s.isInRange(o)?null:o},Kv=function(e){function t(){return yPe(this,t),bPe(this,t,arguments)}return jPe(t,e),xPe(t,[{key:"render",value:function(){var r=this.props,i=r.x,a=r.y,s=r.r,o=r.alwaysShow,c=r.clipPathId,u=zt(i),f=zt(a);if(ra(o===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!f)return null;var d=APe(this.props);if(!d)return null;var h=d.x,p=d.y,g=this.props,m=g.shape,y=g.className,v=Ri(this.props,"hidden")?"url(#".concat(c,")"):void 0,b=gR(gR({clipPath:v},ye(this.props,!0)),{},{cx:h,cy:p});return C.createElement(He,{className:Ce("recharts-reference-dot",y)},t.renderDot(m,b),Kt.renderCallByParent(this.props,{x:h-s,y:p-s,width:2*s,height:2*s}))}}])}(C.Component);Gv(Kv,"displayName","ReferenceDot");Gv(Kv,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Gv(Kv,"renderDot",function(e,t){var n;return C.isValidElement(e)?n=C.cloneElement(e,t):ke(e)?n=e(t):n=C.createElement(WA,pS({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function gS(){return gS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gS.apply(this,arguments)}function su(e){"@babel/helpers - typeof";return su=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},su(e)}function yR(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 vR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yR(Object(n),!0).forEach(function(r){Yv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kPe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EPe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,H5(r.key),r)}}function CPe(e,t,n){return t&&EPe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function PPe(e,t,n){return t=oy(t),TPe(e,W5()?Reflect.construct(t,n||[],oy(e).constructor):t.apply(e,n))}function TPe(e,t){if(t&&(su(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return OPe(e)}function OPe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function W5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(W5=function(){return!!e})()}function oy(e){return oy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},oy(e)}function NPe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yS(e,t)}function yS(e,t){return yS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},yS(e,t)}function Yv(e,t,n){return t=H5(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H5(e){var t=IPe(e,"string");return su(t)=="symbol"?t:t+""}function IPe(e,t){if(su(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(su(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var RPe=function(t,n,r,i,a){var s=a.x1,o=a.x2,c=a.y1,u=a.y2,f=a.xAxis,d=a.yAxis;if(!f||!d)return null;var h=HA({x:f.scale,y:d.scale}),p={x:t?h.x.apply(s,{position:"start"}):h.x.rangeMin,y:r?h.y.apply(c,{position:"start"}):h.y.rangeMin},g={x:n?h.x.apply(o,{position:"end"}):h.x.rangeMax,y:i?h.y.apply(u,{position:"end"}):h.y.rangeMax};return Ri(a,"discard")&&(!h.isInRange(p)||!h.isInRange(g))?null:P5(p,g)},Xv=function(e){function t(){return kPe(this,t),PPe(this,t,arguments)}return NPe(t,e),CPe(t,[{key:"render",value:function(){var r=this.props,i=r.x1,a=r.x2,s=r.y1,o=r.y2,c=r.className,u=r.alwaysShow,f=r.clipPathId;ra(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var d=zt(i),h=zt(a),p=zt(s),g=zt(o),m=this.props.shape;if(!d&&!h&&!p&&!g&&!m)return null;var y=RPe(d,h,p,g,this.props);if(!y&&!m)return null;var v=Ri(this.props,"hidden")?"url(#".concat(f,")"):void 0;return C.createElement(He,{className:Ce("recharts-reference-area",c)},t.renderRect(m,vR(vR({clipPath:v},ye(this.props,!0)),y)),Kt.renderCallByParent(this.props,y))}}])}(C.Component);Yv(Xv,"displayName","ReferenceArea");Yv(Xv,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});Yv(Xv,"renderRect",function(e,t){var n;return C.isValidElement(e)?n=C.cloneElement(e,t):ke(e)?n=e(t):n=C.createElement(VA,gS({},t,{className:"recharts-reference-area-rect"})),n});function G5(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)r.push(e[i]);return r}function MPe(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return XCe(r,n)}function $Pe(e,t,n){var r=n==="width",i=e.x,a=e.y,s=e.width,o=e.height;return t===1?{start:r?i:a,end:r?i+s:a+o}:{start:r?i+s:a+o,end:r?i:a}}function ly(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-i)<=0}function DPe(e,t){return G5(e,t+1)}function LPe(e,t,n,r,i){for(var a=(r||[]).slice(),s=t.start,o=t.end,c=0,u=1,f=s,d=function(){var g=r==null?void 0:r[c];if(g===void 0)return{v:G5(r,u)};var m=c,y,v=function(){return y===void 0&&(y=n(g,m)),y},b=g.coordinate,x=c===0||ly(e,b,v,f,o);x||(c=0,f=s,u+=1),x&&(f=b+e*(v()/2+i),c+=u)},h;u<=a.length;)if(h=d(),h)return h.v;return[]}function dh(e){"@babel/helpers - typeof";return dh=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},dh(e)}function xR(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 dn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xR(Object(n),!0).forEach(function(r){FPe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function FPe(e,t,n){return t=BPe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BPe(e){var t=UPe(e,"string");return dh(t)=="symbol"?t:t+""}function UPe(e,t){if(dh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(dh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qPe(e,t,n,r,i){for(var a=(r||[]).slice(),s=a.length,o=t.start,c=t.end,u=function(h){var p=a[h],g,m=function(){return g===void 0&&(g=n(p,h)),g};if(h===s-1){var y=e*(p.coordinate+e*m()/2-c);a[h]=p=dn(dn({},p),{},{tickCoord:y>0?p.coordinate-y*e:p.coordinate})}else a[h]=p=dn(dn({},p),{},{tickCoord:p.coordinate});var v=ly(e,p.tickCoord,m,o,c);v&&(c=p.tickCoord-e*(m()/2+i),a[h]=dn(dn({},p),{},{isShow:!0}))},f=s-1;f>=0;f--)u(f);return a}function zPe(e,t,n,r,i,a){var s=(r||[]).slice(),o=s.length,c=t.start,u=t.end;if(a){var f=r[o-1],d=n(f,o-1),h=e*(f.coordinate+e*d/2-u);s[o-1]=f=dn(dn({},f),{},{tickCoord:h>0?f.coordinate-h*e:f.coordinate});var p=ly(e,f.tickCoord,function(){return d},c,u);p&&(u=f.tickCoord-e*(d/2+i),s[o-1]=dn(dn({},f),{},{isShow:!0}))}for(var g=a?o-1:o,m=function(b){var x=s[b],j,S=function(){return j===void 0&&(j=n(x,b)),j};if(b===0){var _=e*(x.coordinate-e*S()/2-c);s[b]=x=dn(dn({},x),{},{tickCoord:_<0?x.coordinate-_*e:x.coordinate})}else s[b]=x=dn(dn({},x),{},{tickCoord:x.coordinate});var A=ly(e,x.tickCoord,S,c,u);A&&(c=x.tickCoord+e*(S()/2+i),s[b]=dn(dn({},x),{},{isShow:!0}))},y=0;y<g;y++)m(y);return s}function VPe(e,t,n){var r=e.tick,i=e.ticks,a=e.viewBox,s=e.minTickGap,o=e.orientation,c=e.interval,u=e.tickFormatter,f=e.unit,d=e.angle;if(!i||!i.length||!r)return[];if(X(c)||ia.isSsr)return DPe(i,typeof c=="number"&&X(c)?c:0);var h=[],p=o==="top"||o==="bottom"?"width":"height",g=f&&p==="width"?Ud(f,{fontSize:t,letterSpacing:n}):{width:0,height:0},m=function(x,j){var S=ke(u)?u(x.value,j):x.value;return p==="width"?MPe(Ud(S,{fontSize:t,letterSpacing:n}),g,d):Ud(S,{fontSize:t,letterSpacing:n})[p]},y=i.length>=2?Sn(i[1].coordinate-i[0].coordinate):1,v=$Pe(a,y,p);return c==="equidistantPreserveStart"?LPe(y,v,m,i,s):(c==="preserveStart"||c==="preserveStartEnd"?h=zPe(y,v,m,i,s,c==="preserveStartEnd"):h=qPe(y,v,m,i,s),h.filter(function(b){return b.isShow}))}var WPe=["viewBox"],HPe=["viewBox"],GPe=["ticks"];function ou(e){"@babel/helpers - typeof";return ou=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},ou(e)}function Ql(){return Ql=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ql.apply(this,arguments)}function bR(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 Dt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bR(Object(n),!0).forEach(function(r){YA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zb(e,t){if(e==null)return{};var n=KPe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function KPe(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 YPe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Y5(r.key),r)}}function XPe(e,t,n){return t&&wR(e.prototype,t),n&&wR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ZPe(e,t,n){return t=cy(t),QPe(e,K5()?Reflect.construct(t,n||[],cy(e).constructor):t.apply(e,n))}function QPe(e,t){if(t&&(ou(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return JPe(e)}function JPe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function K5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(K5=function(){return!!e})()}function cy(e){return cy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cy(e)}function eTe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vS(e,t)}function vS(e,t){return vS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},vS(e,t)}function YA(e,t,n){return t=Y5(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Y5(e){var t=tTe(e,"string");return ou(t)=="symbol"?t:t+""}function tTe(e,t){if(ou(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ou(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Zv=function(e){function t(n){var r;return YPe(this,t),r=ZPe(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return eTe(t,e),XPe(t,[{key:"shouldComponentUpdate",value:function(r,i){var a=r.viewBox,s=Zb(r,WPe),o=this.props,c=o.viewBox,u=Zb(o,HPe);return!hc(a,c)||!hc(s,u)||!hc(i,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var i=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var i=this.props,a=i.x,s=i.y,o=i.width,c=i.height,u=i.orientation,f=i.tickSize,d=i.mirror,h=i.tickMargin,p,g,m,y,v,b,x=d?-1:1,j=r.tickSize||f,S=X(r.tickCoord)?r.tickCoord:r.coordinate;switch(u){case"top":p=g=r.coordinate,y=s+ +!d*c,m=y-x*j,b=m-x*h,v=S;break;case"left":m=y=r.coordinate,g=a+ +!d*o,p=g-x*j,v=p-x*h,b=S;break;case"right":m=y=r.coordinate,g=a+ +d*o,p=g+x*j,v=p+x*h,b=S;break;default:p=g=r.coordinate,y=s+ +d*c,m=y+x*j,b=m+x*h,v=S;break}return{line:{x1:p,y1:m,x2:g,y2:y},tick:{x:v,y:b}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,a=r.mirror,s;switch(i){case"left":s=a?"start":"end";break;case"right":s=a?"end":"start";break;default:s="middle";break}return s}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,a=r.mirror,s="end";switch(i){case"left":case"right":s="middle";break;case"top":s=a?"start":"end";break;default:s=a?"end":"start";break}return s}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,a=r.y,s=r.width,o=r.height,c=r.orientation,u=r.mirror,f=r.axisLine,d=Dt(Dt(Dt({},ye(this.props,!1)),ye(f,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var h=+(c==="top"&&!u||c==="bottom"&&u);d=Dt(Dt({},d),{},{x1:i,y1:a+h*o,x2:i+s,y2:a+h*o})}else{var p=+(c==="left"&&!u||c==="right"&&u);d=Dt(Dt({},d),{},{x1:i+p*s,y1:a,x2:i+p*s,y2:a+o})}return C.createElement("line",Ql({},d,{className:Ce("recharts-cartesian-axis-line",rr(f,"className"))}))}},{key:"renderTicks",value:function(r,i,a){var s=this,o=this.props,c=o.tickLine,u=o.stroke,f=o.tick,d=o.tickFormatter,h=o.unit,p=VPe(Dt(Dt({},this.props),{},{ticks:r}),i,a),g=this.getTickTextAnchor(),m=this.getTickVerticalAnchor(),y=ye(this.props,!1),v=ye(f,!1),b=Dt(Dt({},y),{},{fill:"none"},ye(c,!1)),x=p.map(function(j,S){var _=s.getTickLineCoord(j),A=_.line,k=_.tick,E=Dt(Dt(Dt(Dt({textAnchor:g,verticalAnchor:m},y),{},{stroke:"none",fill:u},v),k),{},{index:S,payload:j,visibleTicksCount:p.length,tickFormatter:d});return C.createElement(He,Ql({className:"recharts-cartesian-axis-tick",key:"tick-".concat(j.value,"-").concat(j.coordinate,"-").concat(j.tickCoord)},Yo(s.props,j,S)),c&&C.createElement("line",Ql({},b,A,{className:Ce("recharts-cartesian-axis-tick-line",rr(c,"className"))})),f&&t.renderTickItem(f,E,"".concat(ke(d)?d(j.value,S):j.value).concat(h||"")))});return C.createElement("g",{className:"recharts-cartesian-axis-ticks"},x)}},{key:"render",value:function(){var r=this,i=this.props,a=i.axisLine,s=i.width,o=i.height,c=i.ticksGenerator,u=i.className,f=i.hide;if(f)return null;var d=this.props,h=d.ticks,p=Zb(d,GPe),g=h;return ke(c)&&(g=h&&h.length>0?c(this.props):c(p)),s<=0||o<=0||!g||!g.length?null:C.createElement(He,{className:Ce("recharts-cartesian-axis",u),ref:function(y){r.layerReference=y}},a&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),Kt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,a){var s,o=Ce(i.className,"recharts-cartesian-axis-tick-value");return C.isValidElement(r)?s=C.cloneElement(r,Dt(Dt({},i),{},{className:o})):ke(r)?s=r(Dt(Dt({},i),{},{className:o})):s=C.createElement(Xo,Ql({},i,{className:"recharts-cartesian-axis-tick-value"}),a),s}}])}(w.Component);YA(Zv,"displayName","CartesianAxis");YA(Zv,"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"});function lu(e){"@babel/helpers - typeof";return lu=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},lu(e)}function nTe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rTe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Q5(r.key),r)}}function iTe(e,t,n){return t&&rTe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function aTe(e,t,n){return t=uy(t),sTe(e,X5()?Reflect.construct(t,n||[],uy(e).constructor):t.apply(e,n))}function sTe(e,t){if(t&&(lu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oTe(e)}function oTe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function X5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(X5=function(){return!!e})()}function uy(e){return uy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},uy(e)}function lTe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xS(e,t)}function xS(e,t){return xS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},xS(e,t)}function Z5(e,t,n){return t=Q5(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Q5(e){var t=cTe(e,"string");return lu(t)=="symbol"?t:t+""}function cTe(e,t){if(lu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(lu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bS(){return bS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bS.apply(this,arguments)}function uTe(e){var t=e.xAxisId,n=F5(),r=B5(),i=D5(t);return i==null?null:w.createElement(Zv,bS({},i,{className:Ce("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(s){return _o(s,!0)}}))}var fh=function(e){function t(){return nTe(this,t),aTe(this,t,arguments)}return lTe(t,e),iTe(t,[{key:"render",value:function(){return w.createElement(uTe,this.props)}}])}(w.Component);Z5(fh,"displayName","XAxis");Z5(fh,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function cu(e){"@babel/helpers - typeof";return cu=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},cu(e)}function dTe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fTe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tU(r.key),r)}}function hTe(e,t,n){return t&&fTe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function pTe(e,t,n){return t=dy(t),mTe(e,J5()?Reflect.construct(t,n||[],dy(e).constructor):t.apply(e,n))}function mTe(e,t){if(t&&(cu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gTe(e)}function gTe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function J5(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(J5=function(){return!!e})()}function dy(e){return dy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},dy(e)}function yTe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wS(e,t)}function wS(e,t){return wS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},wS(e,t)}function eU(e,t,n){return t=tU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tU(e){var t=vTe(e,"string");return cu(t)=="symbol"?t:t+""}function vTe(e,t){if(cu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(cu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function SS(){return SS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},SS.apply(this,arguments)}var xTe=function(t){var n=t.yAxisId,r=F5(),i=B5(),a=L5(n);return a==null?null:w.createElement(Zv,SS({},a,{className:Ce("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(o){return _o(o,!0)}}))},hh=function(e){function t(){return dTe(this,t),pTe(this,t,arguments)}return yTe(t,e),hTe(t,[{key:"render",value:function(){return w.createElement(xTe,this.props)}}])}(w.Component);eU(hh,"displayName","YAxis");eU(hh,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function SR(e){return jTe(e)||STe(e)||wTe(e)||bTe()}function bTe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
725In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wTe(e,t){if(e){if(typeof e=="string")return jS(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 jS(e,t)}}function STe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jTe(e){if(Array.isArray(e))return jS(e)}function jS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var _S=function(t,n,r,i,a){var s=kr(t,KA),o=kr(t,Kv),c=[].concat(SR(s),SR(o)),u=kr(t,Xv),f="".concat(i,"Id"),d=i[0],h=n;if(c.length&&(h=c.reduce(function(m,y){if(y.props[f]===r&&Ri(y.props,"extendDomain")&&X(y.props[d])){var v=y.props[d];return[Math.min(m[0],v),Math.max(m[1],v)]}return m},h)),u.length){var p="".concat(d,"1"),g="".concat(d,"2");h=u.reduce(function(m,y){if(y.props[f]===r&&Ri(y.props,"extendDomain")&&X(y.props[p])&&X(y.props[g])){var v=y.props[p],b=y.props[g];return[Math.min(m[0],v,b),Math.max(m[1],v,b)]}return m},h)}return a&&a.length&&(h=a.reduce(function(m,y){return X(y)?[Math.min(m[0],y),Math.max(m[1],y)]:m},h)),h},nU={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,u,f){this.fn=c,this.context=u,this.once=f||!1}function a(c,u,f,d,h){if(typeof f!="function")throw new TypeError("The listener must be a function");var p=new i(f,d||c,h),g=n?n+u:u;return c._events[g]?c._events[g].fn?c._events[g]=[c._events[g],p]:c._events[g].push(p):(c._events[g]=p,c._eventsCount++),c}function s(c,u){--c._eventsCount===0?c._events=new r:delete c._events[u]}function o(){this._events=new r,this._eventsCount=0}o.prototype.eventNames=function(){var u=[],f,d;if(this._eventsCount===0)return u;for(d in f=this._events)t.call(f,d)&&u.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(f)):u},o.prototype.listeners=function(u){var f=n?n+u:u,d=this._events[f];if(!d)return[];if(d.fn)return[d.fn];for(var h=0,p=d.length,g=new Array(p);h<p;h++)g[h]=d[h].fn;return g},o.prototype.listenerCount=function(u){var f=n?n+u:u,d=this._events[f];return d?d.fn?1:d.length:0},o.prototype.emit=function(u,f,d,h,p,g){var m=n?n+u:u;if(!this._events[m])return!1;var y=this._events[m],v=arguments.length,b,x;if(y.fn){switch(y.once&&this.removeListener(u,y.fn,void 0,!0),v){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,f),!0;case 3:return y.fn.call(y.context,f,d),!0;case 4:return y.fn.call(y.context,f,d,h),!0;case 5:return y.fn.call(y.context,f,d,h,p),!0;case 6:return y.fn.call(y.context,f,d,h,p,g),!0}for(x=1,b=new Array(v-1);x<v;x++)b[x-1]=arguments[x];y.fn.apply(y.context,b)}else{var j=y.length,S;for(x=0;x<j;x++)switch(y[x].once&&this.removeListener(u,y[x].fn,void 0,!0),v){case 1:y[x].fn.call(y[x].context);break;case 2:y[x].fn.call(y[x].context,f);break;case 3:y[x].fn.call(y[x].context,f,d);break;case 4:y[x].fn.call(y[x].context,f,d,h);break;default:if(!b)for(S=1,b=new Array(v-1);S<v;S++)b[S-1]=arguments[S];y[x].fn.apply(y[x].context,b)}}return!0},o.prototype.on=function(u,f,d){return a(this,u,f,d,!1)},o.prototype.once=function(u,f,d){return a(this,u,f,d,!0)},o.prototype.removeListener=function(u,f,d,h){var p=n?n+u:u;if(!this._events[p])return this;if(!f)return s(this,p),this;var g=this._events[p];if(g.fn)g.fn===f&&(!h||g.once)&&(!d||g.context===d)&&s(this,p);else{for(var m=0,y=[],v=g.length;m<v;m++)(g[m].fn!==f||h&&!g[m].once||d&&g[m].context!==d)&&y.push(g[m]);y.length?this._events[p]=y.length===1?y[0]:y:s(this,p)}return this},o.prototype.removeAllListeners=function(u){var f;return u?(f=n?n+u:u,this._events[f]&&s(this,f)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,e.exports=o})(nU);var _Te=nU.exports;const ATe=qe(_Te);var Qb=new ATe,Jb="recharts.syncMouseEvents";function ph(e){"@babel/helpers - typeof";return ph=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},ph(e)}function kTe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ETe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rU(r.key),r)}}function CTe(e,t,n){return t&&ETe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function e0(e,t,n){return t=rU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rU(e){var t=PTe(e,"string");return ph(t)=="symbol"?t:t+""}function PTe(e,t){if(ph(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ph(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var TTe=function(){function e(){kTe(this,e),e0(this,"activeIndex",0),e0(this,"coordinateList",[]),e0(this,"layout","horizontal")}return CTe(e,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,a=i===void 0?null:i,s=n.container,o=s===void 0?null:s,c=n.layout,u=c===void 0?null:c,f=n.offset,d=f===void 0?null:f,h=n.mouseHandlerCallback,p=h===void 0?null:h;this.coordinateList=(r=a??this.coordinateList)!==null&&r!==void 0?r:[],this.container=o??this.container,this.layout=u??this.layout,this.offset=d??this.offset,this.mouseHandlerCallback=p??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),a=i.x,s=i.y,o=i.height,c=this.coordinateList[this.activeIndex].coordinate,u=((n=window)===null||n===void 0?void 0:n.scrollX)||0,f=((r=window)===null||r===void 0?void 0:r.scrollY)||0,d=a+c+u,h=s+this.offset.top+o/2+f;this.mouseHandlerCallback({pageX:d,pageY:h})}}}])}();function OTe(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e==null?void 0:e[0],i=e==null?void 0:e[1];if(r&&i&&X(r)&&X(i))return!0}return!1}function NTe(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function iU(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,a=e.endAngle,s=st(t,n,r,i),o=st(t,n,r,a);return{points:[s,o],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}function ITe(e,t,n){var r,i,a,s;if(e==="horizontal")r=t.x,a=r,i=n.top,s=n.top+n.height;else if(e==="vertical")i=t.y,s=i,r=n.left,a=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var o=t.cx,c=t.cy,u=t.innerRadius,f=t.outerRadius,d=t.angle,h=st(o,c,u,d),p=st(o,c,f,d);r=h.x,i=h.y,a=p.x,s=p.y}else return iU(t);return[{x:r,y:i},{x:a,y:s}]}function mh(e){"@babel/helpers - typeof";return mh=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},mh(e)}function jR(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 Wp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jR(Object(n),!0).forEach(function(r){RTe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function RTe(e,t,n){return t=MTe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MTe(e){var t=$Te(e,"string");return mh(t)=="symbol"?t:t+""}function $Te(e,t){if(mh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(mh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function DTe(e){var t,n,r=e.element,i=e.tooltipEventType,a=e.isActive,s=e.activeCoordinate,o=e.activePayload,c=e.offset,u=e.activeTooltipIndex,f=e.tooltipAxisBandSize,d=e.layout,h=e.chartName,p=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!p||!a||!s||h!=="ScatterChart"&&i!=="axis")return null;var g,m=G1;if(h==="ScatterChart")g=s,m=WAe;else if(h==="BarChart")g=NTe(d,s,c,f),m=VA;else if(d==="radial"){var y=iU(s),v=y.cx,b=y.cy,x=y.radius,j=y.startAngle,S=y.endAngle;g={cx:v,cy:b,startAngle:j,endAngle:S,innerRadius:x,outerRadius:x},m=r5}else g={points:ITe(d,s,c)},m=G1;var _=Wp(Wp(Wp(Wp({stroke:"#ccc",pointerEvents:"none"},c),g),ye(p,!1)),{},{payload:o,payloadIndex:u,className:Ce("recharts-tooltip-cursor",p.className)});return w.isValidElement(p)?w.cloneElement(p,_):w.createElement(m,_)}var LTe=["item"],FTe=["children","className","width","height","style","compact","title","desc"];function uu(e){"@babel/helpers - typeof";return uu=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},uu(e)}function Jl(){return Jl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jl.apply(this,arguments)}function _R(e,t){return qTe(e)||UTe(e,t)||sU(e,t)||BTe()}function BTe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
726In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UTe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,s,o=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}function qTe(e){if(Array.isArray(e))return e}function AR(e,t){if(e==null)return{};var n=zTe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zTe(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 VTe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WTe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,oU(r.key),r)}}function HTe(e,t,n){return t&&WTe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function GTe(e,t,n){return t=fy(t),KTe(e,aU()?Reflect.construct(t,n||[],fy(e).constructor):t.apply(e,n))}function KTe(e,t){if(t&&(uu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return YTe(e)}function YTe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function aU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(aU=function(){return!!e})()}function fy(e){return fy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},fy(e)}function XTe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&AS(e,t)}function AS(e,t){return AS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},AS(e,t)}function du(e){return JTe(e)||QTe(e)||sU(e)||ZTe()}function ZTe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
727In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sU(e,t){if(e){if(typeof e=="string")return kS(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 kS(e,t)}}function QTe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function JTe(e){if(Array.isArray(e))return kS(e)}function kS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function kR(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 q(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kR(Object(n),!0).forEach(function(r){fe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fe(e,t,n){return t=oU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oU(e){var t=eOe(e,"string");return uu(t)=="symbol"?t:t+""}function eOe(e,t){if(uu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(uu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tOe={xAxis:["bottom","top"],yAxis:["left","right"]},nOe={width:"100%",height:"100%"},lU={x:0,y:0};function Hp(e){return e}var rOe=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},iOe=function(t,n,r,i){var a=n.find(function(f){return f&&f.index===r});if(a){if(t==="horizontal")return{x:a.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:a.coordinate};if(t==="centric"){var s=a.coordinate,o=i.radius;return q(q(q({},i),st(i.cx,i.cy,o,s)),{},{angle:s,radius:o})}var c=a.coordinate,u=i.angle;return q(q(q({},i),st(i.cx,i.cy,c,u)),{},{angle:u,radius:c})}return lU},Qv=function(t,n){var r=n.graphicalItems,i=n.dataStartIndex,a=n.dataEndIndex,s=(r??[]).reduce(function(o,c){var u=c.props.data;return u&&u.length?[].concat(du(o),du(u)):o},[]);return s.length>0?s:t&&t.length&&X(i)&&X(a)?t.slice(i,a+1):[]};function cU(e){return e==="number"?[0,"auto"]:void 0}var ES=function(t,n,r,i){var a=t.graphicalItems,s=t.tooltipAxis,o=Qv(n,t);return r<0||!a||!a.length||r>=o.length?null:a.reduce(function(c,u){var f,d=(f=u.props.data)!==null&&f!==void 0?f:n;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(s.dataKey&&!s.allowDuplicatedCategory){var p=d===void 0?o:d;h=t1(p,s.dataKey,i)}else h=d&&d[r]||o[r];return h?[].concat(du(c),[ZB(u,h)]):c},[])},ER=function(t,n,r,i){var a=i||{x:t.chartX,y:t.chartY},s=rOe(a,r),o=t.orderedTooltipTicks,c=t.tooltipAxis,u=t.tooltipTicks,f=mSe(s,o,u,c);if(f>=0&&u){var d=u[f]&&u[f].value,h=ES(t,n,f,d),p=iOe(r,o,f,a);return{activeTooltipIndex:f,activeLabel:d,activePayload:h,activeCoordinate:p}}return null},aOe=function(t,n){var r=n.axes,i=n.graphicalItems,a=n.axisType,s=n.axisIdKey,o=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,f=t.layout,d=t.children,h=t.stackOffset,p=HB(f,a);return r.reduce(function(g,m){var y,v=m.type.defaultProps!==void 0?q(q({},m.type.defaultProps),m.props):m.props,b=v.type,x=v.dataKey,j=v.allowDataOverflow,S=v.allowDuplicatedCategory,_=v.scale,A=v.ticks,k=v.includeHidden,E=v[s];if(g[E])return g;var T=Qv(t.data,{graphicalItems:i.filter(function(U){var G,te=s in U.props?U.props[s]:(G=U.type.defaultProps)===null||G===void 0?void 0:G[s];return te===E}),dataStartIndex:c,dataEndIndex:u}),P=T.length,O,$,R;OTe(v.domain,j,b)&&(O=q1(v.domain,null,j),p&&(b==="number"||_!=="auto")&&(R=zd(T,x,"category")));var L=cU(b);if(!O||O.length===0){var D,M=(D=v.domain)!==null&&D!==void 0?D:L;if(x){if(O=zd(T,x,b),b==="category"&&p){var N=ice(O);S&&N?($=O,O=ey(0,P)):S||(O=eI(M,O,m).reduce(function(U,G){return U.indexOf(G)>=0?U:[].concat(du(U),[G])},[]))}else if(b==="category")S?O=O.filter(function(U){return U!==""&&!Ie(U)}):O=eI(M,O,m).reduce(function(U,G){return U.indexOf(G)>=0||G===""||Ie(G)?U:[].concat(du(U),[G])},[]);else if(b==="number"){var I=bSe(T,i.filter(function(U){var G,te,xe=s in U.props?U.props[s]:(G=U.type.defaultProps)===null||G===void 0?void 0:G[s],Me="hide"in U.props?U.props.hide:(te=U.type.defaultProps)===null||te===void 0?void 0:te.hide;return xe===E&&(k||!Me)}),x,a,f);I&&(O=I)}p&&(b==="number"||_!=="auto")&&(R=zd(T,x,"category"))}else p?O=ey(0,P):o&&o[E]&&o[E].hasStack&&b==="number"?O=h==="expand"?[0,1]:XB(o[E].stackGroups,c,u):O=WB(T,i.filter(function(U){var G=s in U.props?U.props[s]:U.type.defaultProps[s],te="hide"in U.props?U.props.hide:U.type.defaultProps.hide;return G===E&&(k||!te)}),b,f,!0);if(b==="number")O=_S(d,O,E,a,A),M&&(O=q1(M,O,j));else if(b==="category"&&M){var F=M,V=O.every(function(U){return F.indexOf(U)>=0});V&&(O=F)}}return q(q({},g),{},fe({},E,q(q({},v),{},{axisType:a,domain:O,categoricalDomain:R,duplicateDomain:$,originalDomain:(y=v.domain)!==null&&y!==void 0?y:L,isCategorical:p,layout:f})))},{})},sOe=function(t,n){var r=n.graphicalItems,i=n.Axis,a=n.axisType,s=n.axisIdKey,o=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,f=t.layout,d=t.children,h=Qv(t.data,{graphicalItems:r,dataStartIndex:c,dataEndIndex:u}),p=h.length,g=HB(f,a),m=-1;return r.reduce(function(y,v){var b=v.type.defaultProps!==void 0?q(q({},v.type.defaultProps),v.props):v.props,x=b[s],j=cU("number");if(!y[x]){m++;var S;return g?S=ey(0,p):o&&o[x]&&o[x].hasStack?(S=XB(o[x].stackGroups,c,u),S=_S(d,S,x,a)):(S=q1(j,WB(h,r.filter(function(_){var A,k,E=s in _.props?_.props[s]:(A=_.type.defaultProps)===null||A===void 0?void 0:A[s],T="hide"in _.props?_.props.hide:(k=_.type.defaultProps)===null||k===void 0?void 0:k.hide;return E===x&&!T}),"number",f),i.defaultProps.allowDataOverflow),S=_S(d,S,x,a)),q(q({},y),{},fe({},x,q(q({axisType:a},i.defaultProps),{},{hide:!0,orientation:rr(tOe,"".concat(a,".").concat(m%2),null),domain:S,originalDomain:j,isCategorical:g,layout:f})))}return y},{})},oOe=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,a=n.AxisComp,s=n.graphicalItems,o=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,f=t.children,d="".concat(i,"Id"),h=kr(f,a),p={};return h&&h.length?p=aOe(t,{axes:h,graphicalItems:s,axisType:i,axisIdKey:d,stackGroups:o,dataStartIndex:c,dataEndIndex:u}):s&&s.length&&(p=sOe(t,{Axis:a,graphicalItems:s,axisType:i,axisIdKey:d,stackGroups:o,dataStartIndex:c,dataEndIndex:u})),p},lOe=function(t){var n=Ol(t),r=_o(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:yA(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:qg(n,r)}},CR=function(t){var n=t.children,r=t.defaultShowTooltip,i=Kn(n,nu),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}},cOe=function(t){return!t||!t.length?!1:t.some(function(n){var r=na(n&&n.type);return r&&r.indexOf("Bar")>=0})},PR=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"}},uOe=function(t,n){var r=t.props,i=t.graphicalItems,a=t.xAxisMap,s=a===void 0?{}:a,o=t.yAxisMap,c=o===void 0?{}:o,u=r.width,f=r.height,d=r.children,h=r.margin||{},p=Kn(d,nu),g=Kn(d,pc),m=Object.keys(c).reduce(function(S,_){var A=c[_],k=A.orientation;return!A.mirror&&!A.hide?q(q({},S),{},fe({},k,S[k]+A.width)):S},{left:h.left||0,right:h.right||0}),y=Object.keys(s).reduce(function(S,_){var A=s[_],k=A.orientation;return!A.mirror&&!A.hide?q(q({},S),{},fe({},k,rr(S,"".concat(k))+A.height)):S},{top:h.top||0,bottom:h.bottom||0}),v=q(q({},y),m),b=v.bottom;p&&(v.bottom+=p.props.height||nu.defaultProps.height),g&&n&&(v=vSe(v,i,r,n));var x=u-v.left-v.right,j=f-v.top-v.bottom;return q(q({brushBottom:b},v),{},{width:Math.max(x,0),height:Math.max(j,0)})},dOe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},uU=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,s=t.validateTooltipEventTypes,o=s===void 0?["axis"]:s,c=t.axisComponents,u=t.legendContent,f=t.formatAxisMap,d=t.defaultProps,h=function(v,b){var x=b.graphicalItems,j=b.stackGroups,S=b.offset,_=b.updateId,A=b.dataStartIndex,k=b.dataEndIndex,E=v.barSize,T=v.layout,P=v.barGap,O=v.barCategoryGap,$=v.maxBarSize,R=PR(T),L=R.numericAxisName,D=R.cateAxisName,M=cOe(x),N=[];return x.forEach(function(I,F){var V=Qv(v.data,{graphicalItems:[I],dataStartIndex:A,dataEndIndex:k}),U=I.type.defaultProps!==void 0?q(q({},I.type.defaultProps),I.props):I.props,G=U.dataKey,te=U.maxBarSize,xe=U["".concat(L,"Id")],Me=U["".concat(D,"Id")],Y={},we=c.reduce(function(Vn,gi){var Lr=b["".concat(gi.axisType,"Map")],qh=U["".concat(gi.axisType,"Id")];Lr&&Lr[qh]||gi.axisType==="zAxis"||Qo();var zh=Lr[qh];return q(q({},Vn),{},fe(fe({},gi.axisType,zh),"".concat(gi.axisType,"Ticks"),_o(zh)))},Y),W=we[D],Q=we["".concat(D,"Ticks")],Z=j&&j[xe]&&j[xe].hasStack&&PSe(I,j[xe].stackGroups),B=na(I.type).indexOf("Bar")>=0,Te=qg(W,Q),be=[],Qe=M&&gSe({barSize:E,stackGroups:j,totalSize:dOe(we,D)});if(B){var Ye,wt,Nn=Ie(te)?$:te,zn=(Ye=(wt=qg(W,Q,!0))!==null&&wt!==void 0?wt:Nn)!==null&&Ye!==void 0?Ye:0;be=ySe({barGap:P,barCategoryGap:O,bandSize:zn!==Te?zn:Te,sizeList:Qe[Me],maxBarSize:Nn}),zn!==Te&&(be=be.map(function(Vn){return q(q({},Vn),{},{position:q(q({},Vn.position),{},{offset:Vn.position.offset-zn/2})})}))}var Ws=I&&I.type&&I.type.getComposedData;Ws&&N.push({props:q(q({},Ws(q(q({},we),{},{displayedData:V,props:v,dataKey:G,item:I,bandSize:Te,barPosition:be,offset:S,stackedData:Z,layout:T,dataStartIndex:A,dataEndIndex:k}))),{},fe(fe(fe({key:I.key||"item-".concat(F)},L,we[L]),D,we[D]),"animationId",_)),childIndex:gce(I,v.children),item:I})}),N},p=function(v,b){var x=v.props,j=v.dataStartIndex,S=v.dataEndIndex,_=v.updateId;if(!KT({props:x}))return null;var A=x.children,k=x.layout,E=x.stackOffset,T=x.data,P=x.reverseStackOrder,O=PR(k),$=O.numericAxisName,R=O.cateAxisName,L=kr(A,r),D=ESe(T,L,"".concat($,"Id"),"".concat(R,"Id"),E,P),M=c.reduce(function(U,G){var te="".concat(G.axisType,"Map");return q(q({},U),{},fe({},te,oOe(x,q(q({},G),{},{graphicalItems:L,stackGroups:G.axisType===$&&D,dataStartIndex:j,dataEndIndex:S}))))},{}),N=uOe(q(q({},M),{},{props:x,graphicalItems:L}),b==null?void 0:b.legendBBox);Object.keys(M).forEach(function(U){M[U]=f(x,M[U],N,U.replace("Map",""),n)});var I=M["".concat(R,"Map")],F=lOe(I),V=h(x,q(q({},M),{},{dataStartIndex:j,dataEndIndex:S,updateId:_,graphicalItems:L,stackGroups:D,offset:N}));return q(q({formattedGraphicalItems:V,graphicalItems:L,offset:N,stackGroups:D},F),M)},g=function(y){function v(b){var x,j,S;return VTe(this,v),S=GTe(this,v,[b]),fe(S,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),fe(S,"accessibilityManager",new TTe),fe(S,"handleLegendBBoxUpdate",function(_){if(_){var A=S.state,k=A.dataStartIndex,E=A.dataEndIndex,T=A.updateId;S.setState(q({legendBBox:_},p({props:S.props,dataStartIndex:k,dataEndIndex:E,updateId:T},q(q({},S.state),{},{legendBBox:_}))))}}),fe(S,"handleReceiveSyncEvent",function(_,A,k){if(S.props.syncId===_){if(k===S.eventEmitterSymbol&&typeof S.props.syncMethod!="function")return;S.applySyncEvent(A)}}),fe(S,"handleBrushChange",function(_){var A=_.startIndex,k=_.endIndex;if(A!==S.state.dataStartIndex||k!==S.state.dataEndIndex){var E=S.state.updateId;S.setState(function(){return q({dataStartIndex:A,dataEndIndex:k},p({props:S.props,dataStartIndex:A,dataEndIndex:k,updateId:E},S.state))}),S.triggerSyncEvent({dataStartIndex:A,dataEndIndex:k})}}),fe(S,"handleMouseEnter",function(_){var A=S.getMouseInfo(_);if(A){var k=q(q({},A),{},{isTooltipActive:!0});S.setState(k),S.triggerSyncEvent(k);var E=S.props.onMouseEnter;ke(E)&&E(k,_)}}),fe(S,"triggeredAfterMouseMove",function(_){var A=S.getMouseInfo(_),k=A?q(q({},A),{},{isTooltipActive:!0}):{isTooltipActive:!1};S.setState(k),S.triggerSyncEvent(k);var E=S.props.onMouseMove;ke(E)&&E(k,_)}),fe(S,"handleItemMouseEnter",function(_){S.setState(function(){return{isTooltipActive:!0,activeItem:_,activePayload:_.tooltipPayload,activeCoordinate:_.tooltipPosition||{x:_.cx,y:_.cy}}})}),fe(S,"handleItemMouseLeave",function(){S.setState(function(){return{isTooltipActive:!1}})}),fe(S,"handleMouseMove",function(_){_.persist(),S.throttleTriggeredAfterMouseMove(_)}),fe(S,"handleMouseLeave",function(_){S.throttleTriggeredAfterMouseMove.cancel();var A={isTooltipActive:!1};S.setState(A),S.triggerSyncEvent(A);var k=S.props.onMouseLeave;ke(k)&&k(A,_)}),fe(S,"handleOuterEvent",function(_){var A=mce(_),k=rr(S.props,"".concat(A));if(A&&ke(k)){var E,T;/.*touch.*/i.test(A)?T=S.getMouseInfo(_.changedTouches[0]):T=S.getMouseInfo(_),k((E=T)!==null&&E!==void 0?E:{},_)}}),fe(S,"handleClick",function(_){var A=S.getMouseInfo(_);if(A){var k=q(q({},A),{},{isTooltipActive:!0});S.setState(k),S.triggerSyncEvent(k);var E=S.props.onClick;ke(E)&&E(k,_)}}),fe(S,"handleMouseDown",function(_){var A=S.props.onMouseDown;if(ke(A)){var k=S.getMouseInfo(_);A(k,_)}}),fe(S,"handleMouseUp",function(_){var A=S.props.onMouseUp;if(ke(A)){var k=S.getMouseInfo(_);A(k,_)}}),fe(S,"handleTouchMove",function(_){_.changedTouches!=null&&_.changedTouches.length>0&&S.throttleTriggeredAfterMouseMove(_.changedTouches[0])}),fe(S,"handleTouchStart",function(_){_.changedTouches!=null&&_.changedTouches.length>0&&S.handleMouseDown(_.changedTouches[0])}),fe(S,"handleTouchEnd",function(_){_.changedTouches!=null&&_.changedTouches.length>0&&S.handleMouseUp(_.changedTouches[0])}),fe(S,"handleDoubleClick",function(_){var A=S.props.onDoubleClick;if(ke(A)){var k=S.getMouseInfo(_);A(k,_)}}),fe(S,"handleContextMenu",function(_){var A=S.props.onContextMenu;if(ke(A)){var k=S.getMouseInfo(_);A(k,_)}}),fe(S,"triggerSyncEvent",function(_){S.props.syncId!==void 0&&Qb.emit(Jb,S.props.syncId,_,S.eventEmitterSymbol)}),fe(S,"applySyncEvent",function(_){var A=S.props,k=A.layout,E=A.syncMethod,T=S.state.updateId,P=_.dataStartIndex,O=_.dataEndIndex;if(_.dataStartIndex!==void 0||_.dataEndIndex!==void 0)S.setState(q({dataStartIndex:P,dataEndIndex:O},p({props:S.props,dataStartIndex:P,dataEndIndex:O,updateId:T},S.state)));else if(_.activeTooltipIndex!==void 0){var $=_.chartX,R=_.chartY,L=_.activeTooltipIndex,D=S.state,M=D.offset,N=D.tooltipTicks;if(!M)return;if(typeof E=="function")L=E(N,_);else if(E==="value"){L=-1;for(var I=0;I<N.length;I++)if(N[I].value===_.activeLabel){L=I;break}}var F=q(q({},M),{},{x:M.left,y:M.top}),V=Math.min($,F.x+F.width),U=Math.min(R,F.y+F.height),G=N[L]&&N[L].value,te=ES(S.state,S.props.data,L),xe=N[L]?{x:k==="horizontal"?N[L].coordinate:V,y:k==="horizontal"?U:N[L].coordinate}:lU;S.setState(q(q({},_),{},{activeLabel:G,activeCoordinate:xe,activePayload:te,activeTooltipIndex:L}))}else S.setState(_)}),fe(S,"renderCursor",function(_){var A,k=S.state,E=k.isTooltipActive,T=k.activeCoordinate,P=k.activePayload,O=k.offset,$=k.activeTooltipIndex,R=k.tooltipAxisBandSize,L=S.getTooltipEventType(),D=(A=_.props.active)!==null&&A!==void 0?A:E,M=S.props.layout,N=_.key||"_recharts-cursor";return C.createElement(DTe,{key:N,activeCoordinate:T,activePayload:P,activeTooltipIndex:$,chartName:n,element:_,isActive:D,layout:M,offset:O,tooltipAxisBandSize:R,tooltipEventType:L})}),fe(S,"renderPolarAxis",function(_,A,k){var E=rr(_,"type.axisType"),T=rr(S.state,"".concat(E,"Map")),P=_.type.defaultProps,O=P!==void 0?q(q({},P),_.props):_.props,$=T&&T[O["".concat(E,"Id")]];return w.cloneElement(_,q(q({},$),{},{className:Ce(E,$.className),key:_.key||"".concat(A,"-").concat(k),ticks:_o($,!0)}))}),fe(S,"renderPolarGrid",function(_){var A=_.props,k=A.radialLines,E=A.polarAngles,T=A.polarRadius,P=S.state,O=P.radiusAxisMap,$=P.angleAxisMap,R=Ol(O),L=Ol($),D=L.cx,M=L.cy,N=L.innerRadius,I=L.outerRadius;return w.cloneElement(_,{polarAngles:Array.isArray(E)?E:_o(L,!0).map(function(F){return F.coordinate}),polarRadius:Array.isArray(T)?T:_o(R,!0).map(function(F){return F.coordinate}),cx:D,cy:M,innerRadius:N,outerRadius:I,key:_.key||"polar-grid",radialLines:k})}),fe(S,"renderLegend",function(){var _=S.state.formattedGraphicalItems,A=S.props,k=A.children,E=A.width,T=A.height,P=S.props.margin||{},O=E-(P.left||0)-(P.right||0),$=zB({children:k,formattedGraphicalItems:_,legendWidth:O,legendContent:u});if(!$)return null;var R=$.item,L=AR($,LTe);return w.cloneElement(R,q(q({},L),{},{chartWidth:E,chartHeight:T,margin:P,onBBoxUpdate:S.handleLegendBBoxUpdate}))}),fe(S,"renderTooltip",function(){var _,A=S.props,k=A.children,E=A.accessibilityLayer,T=Kn(k,Yn);if(!T)return null;var P=S.state,O=P.isTooltipActive,$=P.activeCoordinate,R=P.activePayload,L=P.activeLabel,D=P.offset,M=(_=T.props.active)!==null&&_!==void 0?_:O;return w.cloneElement(T,{viewBox:q(q({},D),{},{x:D.left,y:D.top}),active:M,label:L,payload:M?R:[],coordinate:$,accessibilityLayer:E})}),fe(S,"renderBrush",function(_){var A=S.props,k=A.margin,E=A.data,T=S.state,P=T.offset,O=T.dataStartIndex,$=T.dataEndIndex,R=T.updateId;return w.cloneElement(_,{key:_.key||"_recharts-brush",onChange:Up(S.handleBrushChange,_.props.onChange),data:E,x:X(_.props.x)?_.props.x:P.left,y:X(_.props.y)?_.props.y:P.top+P.height+P.brushBottom-(k.bottom||0),width:X(_.props.width)?_.props.width:P.width,startIndex:O,endIndex:$,updateId:"brush-".concat(R)})}),fe(S,"renderReferenceElement",function(_,A,k){if(!_)return null;var E=S,T=E.clipPathId,P=S.state,O=P.xAxisMap,$=P.yAxisMap,R=P.offset,L=_.type.defaultProps||{},D=_.props,M=D.xAxisId,N=M===void 0?L.xAxisId:M,I=D.yAxisId,F=I===void 0?L.yAxisId:I;return w.cloneElement(_,{key:_.key||"".concat(A,"-").concat(k),xAxis:O[N],yAxis:$[F],viewBox:{x:R.left,y:R.top,width:R.width,height:R.height},clipPathId:T})}),fe(S,"renderActivePoints",function(_){var A=_.item,k=_.activePoint,E=_.basePoint,T=_.childIndex,P=_.isRange,O=[],$=A.props.key,R=A.item.type.defaultProps!==void 0?q(q({},A.item.type.defaultProps),A.item.props):A.item.props,L=R.activeDot,D=R.dataKey,M=q(q({index:T,dataKey:D,cx:k.x,cy:k.y,r:4,fill:zA(A.item),strokeWidth:2,stroke:"#fff",payload:k.payload,value:k.value},ye(L,!1)),mg(L));return O.push(v.renderActiveDot(L,M,"".concat($,"-activePoint-").concat(T))),E?O.push(v.renderActiveDot(L,q(q({},M),{},{cx:E.x,cy:E.y}),"".concat($,"-basePoint-").concat(T))):P&&O.push(null),O}),fe(S,"renderGraphicChild",function(_,A,k){var E=S.filterFormatItem(_,A,k);if(!E)return null;var T=S.getTooltipEventType(),P=S.state,O=P.isTooltipActive,$=P.tooltipAxis,R=P.activeTooltipIndex,L=P.activeLabel,D=S.props.children,M=Kn(D,Yn),N=E.props,I=N.points,F=N.isRange,V=N.baseLine,U=E.item.type.defaultProps!==void 0?q(q({},E.item.type.defaultProps),E.item.props):E.item.props,G=U.activeDot,te=U.hide,xe=U.activeBar,Me=U.activeShape,Y=!!(!te&&O&&M&&(G||xe||Me)),we={};T!=="axis"&&M&&M.props.trigger==="click"?we={onClick:Up(S.handleItemMouseEnter,_.props.onClick)}:T!=="axis"&&(we={onMouseLeave:Up(S.handleItemMouseLeave,_.props.onMouseLeave),onMouseEnter:Up(S.handleItemMouseEnter,_.props.onMouseEnter)});var W=w.cloneElement(_,q(q({},E.props),we));function Q(gi){return typeof $.dataKey=="function"?$.dataKey(gi.payload):null}if(Y)if(R>=0){var Z,B;if($.dataKey&&!$.allowDuplicatedCategory){var Te=typeof $.dataKey=="function"?Q:"payload.".concat($.dataKey.toString());Z=t1(I,Te,L),B=F&&V&&t1(V,Te,L)}else Z=I==null?void 0:I[R],B=F&&V&&V[R];if(Me||xe){var be=_.props.activeIndex!==void 0?_.props.activeIndex:R;return[w.cloneElement(_,q(q(q({},E.props),we),{},{activeIndex:be})),null,null]}if(!Ie(Z))return[W].concat(du(S.renderActivePoints({item:E,activePoint:Z,basePoint:B,childIndex:R,isRange:F})))}else{var Qe,Ye=(Qe=S.getItemByXY(S.state.activeCoordinate))!==null&&Qe!==void 0?Qe:{graphicalItem:W},wt=Ye.graphicalItem,Nn=wt.item,zn=Nn===void 0?_:Nn,Ws=wt.childIndex,Vn=q(q(q({},E.props),we),{},{activeIndex:Ws});return[w.cloneElement(zn,Vn),null,null]}return F?[W,null,null]:[W,null]}),fe(S,"renderCustomized",function(_,A,k){return w.cloneElement(_,q(q({key:"recharts-customized-".concat(k)},S.props),S.state))}),fe(S,"renderMap",{CartesianGrid:{handler:Hp,once:!0},ReferenceArea:{handler:S.renderReferenceElement},ReferenceLine:{handler:Hp},ReferenceDot:{handler:S.renderReferenceElement},XAxis:{handler:Hp},YAxis:{handler:Hp},Brush:{handler:S.renderBrush,once:!0},Bar:{handler:S.renderGraphicChild},Line:{handler:S.renderGraphicChild},Area:{handler:S.renderGraphicChild},Radar:{handler:S.renderGraphicChild},RadialBar:{handler:S.renderGraphicChild},Scatter:{handler:S.renderGraphicChild},Pie:{handler:S.renderGraphicChild},Funnel:{handler:S.renderGraphicChild},Tooltip:{handler:S.renderCursor,once:!0},PolarGrid:{handler:S.renderPolarGrid,once:!0},PolarAngleAxis:{handler:S.renderPolarAxis},PolarRadiusAxis:{handler:S.renderPolarAxis},Customized:{handler:S.renderCustomized}}),S.clipPathId="".concat((x=b.id)!==null&&x!==void 0?x:Dh("recharts"),"-clip"),S.throttleTriggeredAfterMouseMove=qF(S.triggeredAfterMouseMove,(j=b.throttleDelay)!==null&&j!==void 0?j:1e3/60),S.state={},S}return XTe(v,y),HTe(v,[{key:"componentDidMount",value:function(){var x,j;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(j=this.props.margin.top)!==null&&j!==void 0?j:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var x=this.props,j=x.children,S=x.data,_=x.height,A=x.layout,k=Kn(j,Yn);if(k){var E=k.props.defaultIndex;if(!(typeof E!="number"||E<0||E>this.state.tooltipTicks.length-1)){var T=this.state.tooltipTicks[E]&&this.state.tooltipTicks[E].value,P=ES(this.state,S,E,T),O=this.state.tooltipTicks[E].coordinate,$=(this.state.offset.top+_)/2,R=A==="horizontal",L=R?{x:O,y:$}:{y:O,x:$},D=this.state.formattedGraphicalItems.find(function(N){var I=N.item;return I.type.name==="Scatter"});D&&(L=q(q({},L),D.props.points[E].tooltipPosition),P=D.props.points[E].tooltipPayload);var M={activeTooltipIndex:E,isTooltipActive:!0,activeLabel:T,activePayload:P,activeCoordinate:L};this.setState(M),this.renderCursor(k),this.accessibilityManager.setIndex(E)}}}},{key:"getSnapshotBeforeUpdate",value:function(x,j){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==j.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==x.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==x.margin){var S,_;this.accessibilityManager.setDetails({offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(_=this.props.margin.top)!==null&&_!==void 0?_:0}})}return null}},{key:"componentDidUpdate",value:function(x){r1([Kn(x.children,Yn)],[Kn(this.props.children,Yn)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=Kn(this.props.children,Yn);if(x&&typeof x.props.shared=="boolean"){var j=x.props.shared?"axis":"item";return o.indexOf(j)>=0?j:a}return a}},{key:"getMouseInfo",value:function(x){if(!this.container)return null;var j=this.container,S=j.getBoundingClientRect(),_=zxe(S),A={chartX:Math.round(x.pageX-_.left),chartY:Math.round(x.pageY-_.top)},k=S.width/j.offsetWidth||1,E=this.inRange(A.chartX,A.chartY,k);if(!E)return null;var T=this.state,P=T.xAxisMap,O=T.yAxisMap,$=this.getTooltipEventType(),R=ER(this.state,this.props.data,this.props.layout,E);if($!=="axis"&&P&&O){var L=Ol(P).scale,D=Ol(O).scale,M=L&&L.invert?L.invert(A.chartX):null,N=D&&D.invert?D.invert(A.chartY):null;return q(q({},A),{},{xValue:M,yValue:N},R)}return R?q(q({},A),R):null}},{key:"inRange",value:function(x,j){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,_=this.props.layout,A=x/S,k=j/S;if(_==="horizontal"||_==="vertical"){var E=this.state.offset,T=A>=E.left&&A<=E.left+E.width&&k>=E.top&&k<=E.top+E.height;return T?{x:A,y:k}:null}var P=this.state,O=P.angleAxisMap,$=P.radiusAxisMap;if(O&&$){var R=Ol(O);return rI({x:A,y:k},R)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,j=this.getTooltipEventType(),S=Kn(x,Yn),_={};S&&j==="axis"&&(S.props.trigger==="click"?_={onClick:this.handleClick}:_={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 A=mg(this.props,this.handleOuterEvent);return q(q({},A),_)}},{key:"addListener",value:function(){Qb.on(Jb,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Qb.removeListener(Jb,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,j,S){for(var _=this.state.formattedGraphicalItems,A=0,k=_.length;A<k;A++){var E=_[A];if(E.item===x||E.props.key===x.key||j===na(E.item.type)&&S===E.childIndex)return E}return null}},{key:"renderClipPath",value:function(){var x=this.clipPathId,j=this.state.offset,S=j.left,_=j.top,A=j.height,k=j.width;return C.createElement("defs",null,C.createElement("clipPath",{id:x},C.createElement("rect",{x:S,y:_,height:A,width:k})))}},{key:"getXScales",value:function(){var x=this.state.xAxisMap;return x?Object.entries(x).reduce(function(j,S){var _=_R(S,2),A=_[0],k=_[1];return q(q({},j),{},fe({},A,k.scale))},{}):null}},{key:"getYScales",value:function(){var x=this.state.yAxisMap;return x?Object.entries(x).reduce(function(j,S){var _=_R(S,2),A=_[0],k=_[1];return q(q({},j),{},fe({},A,k.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(x){var j;return(j=this.state.xAxisMap)===null||j===void 0||(j=j[x])===null||j===void 0?void 0:j.scale}},{key:"getYScaleByAxisId",value:function(x){var j;return(j=this.state.yAxisMap)===null||j===void 0||(j=j[x])===null||j===void 0?void 0:j.scale}},{key:"getItemByXY",value:function(x){var j=this.state,S=j.formattedGraphicalItems,_=j.activeItem;if(S&&S.length)for(var A=0,k=S.length;A<k;A++){var E=S[A],T=E.props,P=E.item,O=P.type.defaultProps!==void 0?q(q({},P.type.defaultProps),P.props):P.props,$=na(P.type);if($==="Bar"){var R=(T.data||[]).find(function(N){return AAe(x,N)});if(R)return{graphicalItem:E,payload:R}}else if($==="RadialBar"){var L=(T.data||[]).find(function(N){return rI(x,N)});if(L)return{graphicalItem:E,payload:L}}else if(Vv(E,_)||Wv(E,_)||oh(E,_)){var D=hEe({graphicalItem:E,activeTooltipItem:_,itemData:O.data}),M=O.activeIndex===void 0?D:O.activeIndex;return{graphicalItem:q(q({},E),{},{childIndex:M}),payload:oh(E,_)?O.data[D]:E.props.data[D]}}}return null}},{key:"render",value:function(){var x=this;if(!KT(this))return null;var j=this.props,S=j.children,_=j.className,A=j.width,k=j.height,E=j.style,T=j.compact,P=j.title,O=j.desc,$=AR(j,FTe),R=ye($,!1);if(T)return C.createElement(dR,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},C.createElement(a1,Jl({},R,{width:A,height:k,title:P,desc:O}),this.renderClipPath(),XT(S,this.renderMap)));if(this.props.accessibilityLayer){var L,D;R.tabIndex=(L=this.props.tabIndex)!==null&&L!==void 0?L:0,R.role=(D=this.props.role)!==null&&D!==void 0?D:"application",R.onKeyDown=function(N){x.accessibilityManager.keyboardEvent(N)},R.onFocus=function(){x.accessibilityManager.focus()}}var M=this.parseEventsOfWrapper();return C.createElement(dR,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},C.createElement("div",Jl({className:Ce("recharts-wrapper",_),style:q({position:"relative",cursor:"default",width:A,height:k},E)},M,{ref:function(I){x.container=I}}),C.createElement(a1,Jl({},R,{width:A,height:k,title:P,desc:O,style:nOe}),this.renderClipPath(),XT(S,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(w.Component);fe(g,"displayName",n),fe(g,"defaultProps",q({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),fe(g,"getDerivedStateFromProps",function(y,v){var b=y.dataKey,x=y.data,j=y.children,S=y.width,_=y.height,A=y.layout,k=y.stackOffset,E=y.margin,T=v.dataStartIndex,P=v.dataEndIndex;if(v.updateId===void 0){var O=CR(y);return q(q(q({},O),{},{updateId:0},p(q(q({props:y},O),{},{updateId:0}),v)),{},{prevDataKey:b,prevData:x,prevWidth:S,prevHeight:_,prevLayout:A,prevStackOffset:k,prevMargin:E,prevChildren:j})}if(b!==v.prevDataKey||x!==v.prevData||S!==v.prevWidth||_!==v.prevHeight||A!==v.prevLayout||k!==v.prevStackOffset||!hc(E,v.prevMargin)){var $=CR(y),R={chartX:v.chartX,chartY:v.chartY,isTooltipActive:v.isTooltipActive},L=q(q({},ER(v,x,A)),{},{updateId:v.updateId+1}),D=q(q(q({},$),R),L);return q(q(q({},D),p(q({props:y},D),v)),{},{prevDataKey:b,prevData:x,prevWidth:S,prevHeight:_,prevLayout:A,prevStackOffset:k,prevMargin:E,prevChildren:j})}if(!r1(j,v.prevChildren)){var M,N,I,F,V=Kn(j,nu),U=V&&(M=(N=V.props)===null||N===void 0?void 0:N.startIndex)!==null&&M!==void 0?M:T,G=V&&(I=(
727F=V.props)===null||F===void 0?void 0:F.endIndex)!==null&&I!==void 0?I:P,te=U!==T||G!==P,xe=!Ie(x),Me=xe&&!te?v.updateId:v.updateId+1;return q(q({updateId:Me},p(q(q({props:y},v),{},{updateId:Me,dataStartIndex:U,dataEndIndex:G}),v)),{},{prevChildren:j,dataStartIndex:U,dataEndIndex:G})}return null}),fe(g,"renderActiveDot",function(y,v,b){var x;return w.isValidElement(y)?x=w.cloneElement(y,v):ke(y)?x=y(v):x=C.createElement(WA,v),C.createElement(He,{className:"recharts-active-dot",key:b},x)});var m=w.forwardRef(function(v,b){return C.createElement(g,Jl({},v,{ref:b}))});return m.displayName=g.displayName,m},TR=uU({chartName:"BarChart",GraphicalChild:Es,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:fh},{axisType:"yAxis",AxisComp:hh}],formatAxisMap:GCe}),OR=uU({chartName:"PieChart",GraphicalChild:Li,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:zv},{axisType:"radiusAxis",AxisComp:Uv}],formatAxisMap:FSe,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const eo=["hsl(234, 100%, 66%)","hsl(225, 100%, 60%)","hsl(142, 76%, 36%)","hsl(40, 100%, 50%)","hsl(0, 84%, 60%)","hsl(280, 60%, 55%)","hsl(180, 60%, 45%)","hsl(320, 70%, 50%)"];function fOe(){var m;const[e,t]=w.useState([]),[n,r]=w.useState([]),[i,a]=w.useState([]),[s,o]=w.useState([]),[c,u]=w.useState([]),[f,d]=w.useState(!0);w.useEffect(()=>{async function y(){const v=[{name:"frameworks",label:"Frameworks",icon:Pt,color:"text-primary"},{name:"controls",label:"Controls",icon:Bn,color:"text-accent"},{name:"evidence_items",label:"Evidence",icon:Ah,color:"text-success"},{name:"risks",label:"Risks",icon:Vm,color:"text-warning"},{name:"findings",label:"Findings",icon:J0,color:"text-destructive"},{name:"policies",label:"Policies",icon:yu,color:"text-primary"},{name:"audits",label:"Audits",icon:zm,color:"text-accent"},{name:"vendors",label:"Vendors",icon:N$,color:"text-muted-foreground"}],[b,x,j,S,_]=await Promise.all([Promise.all(v.map(async P=>{const{count:O}=await de(P.name).select("id",{count:"exact",head:!0}).is("deleted_at",null);return{label:P.label,value:O??0,icon:P.icon,color:P.color}})),de("controls").select("status").is("deleted_at",null),de("risks").select("likelihood, impact").is("deleted_at",null),de("findings").select("status").is("deleted_at",null),de("evidence_items").select("status").is("deleted_at",null)]);t(b);const A={};(x.data||[]).forEach(P=>{A[P.status]=(A[P.status]||0)+1}),r(Object.entries(A).map(([P,O])=>({name:P.replace(/_/g," "),value:O})));const k={};(j.data||[]).forEach(P=>{k[P.impact]=(k[P.impact]||0)+1}),a(Object.entries(k).map(([P,O])=>({name:P,value:O})));const E={};(S.data||[]).forEach(P=>{E[P.status]=(E[P.status]||0)+1}),o(Object.entries(E).map(([P,O])=>({name:P.replace(/_/g," "),value:O})));const T={};(_.data||[]).forEach(P=>{T[P.status]=(T[P.status]||0)+1}),u(Object.entries(T).map(([P,O])=>({name:P.replace(/_/g," "),value:O}))),d(!1)}y()},[]);const h=n.reduce((y,v)=>y+v.value,0),p=((m=n.find(y=>y.name==="effective"))==null?void 0:m.value)||0,g=h>0?Math.round(p/h*100):0;return l.jsx(gn,{children:l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold",children:"Dashboard"}),l.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Compliance posture overview"})]}),f?l.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:Array.from({length:8}).map((y,v)=>l.jsx("div",{className:"h-24 rounded-lg bg-muted animate-pulse"},v))}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:e.map(y=>l.jsxs("div",{className:"rounded-lg border border-border bg-card p-4 space-y-2",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"text-xs text-muted-foreground font-medium uppercase tracking-wider",children:y.label}),l.jsx(y.icon,{className:ve("w-4 h-4",y.color)})]}),l.jsx("p",{className:"text-3xl font-bold",children:y.value})]},y.label))}),l.jsxs("div",{className:"rounded-lg border border-border bg-card p-6",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[l.jsx(T6,{className:"w-5 h-5 text-primary"}),l.jsx("h2",{className:"text-lg font-semibold",children:"Compliance Score"})]}),l.jsxs("div",{className:"flex items-center gap-6",children:[l.jsxs("div",{className:"text-5xl font-bold text-primary",children:[g,"%"]}),l.jsxs("div",{className:"flex-1",children:[l.jsx("div",{className:"h-3 rounded-full bg-muted overflow-hidden",children:l.jsx("div",{className:"h-full rounded-full bg-primary transition-all duration-500",style:{width:`${g}%`}})}),l.jsxs("p",{className:"text-xs text-muted-foreground mt-2",children:[p," of ",h," controls effective"]})]})]})]}),l.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"rounded-lg border border-border bg-card p-6",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[l.jsx(p6,{className:"w-4 h-4 text-accent"}),l.jsx("h3",{className:"text-sm font-semibold",children:"Controls by Status"})]}),n.length>0?l.jsx($p,{width:"100%",height:220,children:l.jsxs(OR,{children:[l.jsx(Li,{data:n,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:80,label:({name:y,value:v})=>`${y} (${v})`,children:n.map((y,v)=>l.jsx(wo,{fill:eo[v%eo.length]},v))}),l.jsx(Yn,{contentStyle:{background:"hsl(216, 50%, 7%)",border:"1px solid hsl(0, 0%, 100%, 0.08)",borderRadius:8,color:"#fff"}})]})}):l.jsx("p",{className:"text-sm text-muted-foreground",children:"No controls yet"})]}),l.jsxs("div",{className:"rounded-lg border border-border bg-card p-6",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[l.jsx(Vm,{className:"w-4 h-4 text-warning"}),l.jsx("h3",{className:"text-sm font-semibold",children:"Risk by Impact Level"})]}),i.length>0?l.jsx($p,{width:"100%",height:220,children:l.jsxs(TR,{data:i,children:[l.jsx(fh,{dataKey:"name",tick:{fill:"hsl(220, 15%, 55%)",fontSize:12}}
727),l.jsx(hh,{allowDecimals:!1,tick:{fill:"hsl(220, 15%, 55%)",fontSize:12}}),l.jsx(Yn,{contentStyle:{background:"hsl(216, 50%, 7%)",border:"1px solid hsl(0, 0%, 100%, 0.08)",borderRadius:8,color:"#fff"}}),l.jsx(Es,{dataKey:"value",radius:[4,4,0,0],children:i.map((y,v)=>{const b={low:"hsl(142, 76%, 36%)",medium:"hsl(40, 100%, 50%)",high:"hsl(25, 95%, 53%)",critical:"hsl(0, 84%, 60%)"};return l.jsx(wo,{fill:b[y.name]||eo[v]},v)})})]})}):l.jsx("p",{className:"text-sm text-muted-foreground",children:"No risks yet"})]}),l.jsxs("div",{className:"rounded-lg border border-border bg-card p-6",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[l.jsx(J0,{className:"w-4 h-4 text-destructive"}),l.jsx("h3",{className:"text-sm font-semibold",children:"Findings by Status"})]}),s.length>0?l.jsx($p,{width:"100%",height:220,children:l.jsxs(TR,{data:s,layout:"vertical",children:[l.jsx(fh,{type:"number",allowDecimals:!1,tick:{fill:"hsl(220, 15%, 55%)",fontSize:12}}),l.jsx(hh,{dataKey:"name",type:"category",width:120,tick:{fill:"hsl(220, 15%, 55%)",fontSize:11}}),l.jsx(Yn,{contentStyle:{background:"hsl(216, 50%, 7%)",border:"1px solid hsl(0, 0%, 100%, 0.08)",borderRadius:8,color:"#fff"}}),l.jsx(Es,{dataKey:"value",radius:[0,4,4,0],children:s.map((y,v)=>l.jsx(wo,{fill:eo[v%eo.length]},v))})]})}):l.jsx("p",{className:"text-sm text-muted-foreground",children:"No findings yet"})]}),l.jsxs("div",{className:"rounded-lg border border-border bg-card p-6",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[l.jsx(h6,{className:"w-4 h-4 text-success"}),l.jsx("h3",{className:"text-sm font-semibold",children:"Evidence by Status"})]}),c.length>0?l.jsx($p,{width:"100%",height:220,children:l.jsxs(OR,{children:[l.jsx(Li,{data:c,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",innerRadius:50,outerRadius:80,label:({name:y,value:v})=>`${y} (${v})`,children:c.map((y,v)=>l.jsx(wo,{fill:eo[v%eo.length]},v))}),l.jsx(Yn,{contentStyle:{background:"hsl(216, 50%, 7%)",border:"1px solid hsl(0, 0%, 100%, 0.08)",borderRadius:8,color:"#fff"}})]})}):l.jsx("p",{className:"text-sm text-muted-foreground",children:"No evidence yet"})]})]}),l.jsxs("div",{className:"rounded-lg border border-border bg-card p-6",children:[l.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Getting Started"}),l.jsxs("ul",{className:"space-y-2 text-sm text-muted-foreground",children:[l.jsx("li",{children:"1. Add a compliance framework (e.g., SOC 2, HIPAA, ISO 27001)"}),l.jsx("li",{children:"2. Define requirements within each framework"}),l.jsx("li",{children:"3. Create controls and map them to requirements"}),l.jsx("li",{children:"4. Collect evidence against controls"}),l.jsx("li",{children:"5. Track risks, findings, and CAPAs"})]})]})]})]})})}var Jv="Dialog",[dU,eIe]=wa(Jv),[hOe,mi]=dU(Jv),fU=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,o=w.useRef(null),c=w.useRef(null),[u,f]=Wo({prop:r,defaultProp:i??!1,onChange:a,caller:Jv});return l.jsx(hOe,{scope:t,triggerRef:o,contentRef:c,contentId:Ro(),titleId:Ro(),descriptionId:Ro(),open:u,onOpenChange:f,onOpenToggle:w.useCallback(()=>f(d=>!d),[f]),modal:s,children:n})};fU.displayName=Jv;var hU="DialogTrigger",pU=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=mi(hU,n),a=ze(t,i.triggerRef);return l.jsx(Pe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":QA(i.open
vendor: 4,384 bytes, lines 727-731
727),...r,ref:a,onClick:me(e.onClick,i.onOpenToggle)})});pU.displayName=hU;var XA="DialogPortal",[pOe,mU]=dU(XA,{forceMount:void 0}),gU=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=mi(XA,t);return l.jsx(pOe,{scope:t,forceMount:n,children:w.Children.map(r,s=>l.jsx(Sa,{present:n||a.open,children:l.jsx(jh,{asChild:!0,container:i,children:s})}))})};gU.displayName=XA;var hy="DialogOverlay",yU=w.forwardRef((e,t)=>{const n=mU(hy,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=mi(hy,e.__scopeDialog);return a.modal?l.jsx(Sa,{present:r||a.open,children:l.jsx(gOe,{...i,ref:t})}):null});yU.displayName=hy;var mOe=Vo("DialogOverlay.RemoveScroll"),gOe=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=mi(hy,n);return l.jsx(rv,{as:mOe,allowPinchZoom:!0,shards:[i.contentRef],children:l.jsx(Pe.div,{"data-state":QA(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Jo="DialogContent",vU=w.forwardRef((e,t)=>{const n=mU(Jo,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=mi(Jo,e.__scopeDialog);return l.jsx(Sa,{present:r||a.open,children:a.modal?l.jsx(yOe,{...i,ref:t}):l.jsx(vOe,{...i,ref:t})})});vU.displayName=Jo;var yOe=w.forwardRef((e,t)=>{const n=mi(Jo,e.__scopeDialog),r=w.useRef(null),i=ze(t,n.contentRef,r);return w.useEffect(()=>{const a=r.current;if(a)return V_(a)},[]),l.jsx(xU,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:me(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:me(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,o=s.button===0&&s.ctrlKey===!0;(s.button===2||o)&&a.preventDefault()}),onFocusOutside:me(e.onFocusOutside,a=>a.preventDefault())})}),vOe=w.forwardRef((e,t)=>{const n=mi(Jo,e.__scopeDialog),r=w.useRef(!1),i=w.useRef(!1);return l.jsx(xU,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,o;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(o=n.triggerRef.current)==null||o.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),xU=w.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=e,o=mi(Jo,n),c=w.useRef(null),u=ze(t,c);return z_(),l.jsxs(l.Fragment,{children:[l.jsx(tv,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:l.jsx(mu,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":QA(o.open),...s,ref:u,onDismiss:()=>o.onOpenChange(!1)})}),l.jsxs(l.Fragment,{children:[l.jsx(xOe,{titleId:o.titleId}),l.jsx(wOe,{contentRef:c,descriptionId:o.descriptionId})]})]})}),ZA="DialogTitle",bU=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=mi(ZA,n);return l.jsx(Pe.h2,{id:i.titleId,...r,ref:t})});bU.displayName=ZA;var wU="DialogDescription",SU=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=mi(wU,n);return l.jsx(Pe.p,{id:i.descriptionId,...r,ref:t})});SU.displayName=wU;var jU="DialogClose",_U=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=mi(jU,n);return l.jsx(Pe.button,{type:"button",...r,ref:t,onClick:me(e.onClick,()=>i.onOpenChange(!1))})});_U.displayName=jU;function QA(e){return e?"open":"closed"}var AU="DialogTitleWarning",[tIe,kU]=yV(AU,{contentName:Jo,titleName:ZA,docsSlug:"dialog"}),xOe=({titleId:e})=>{const t=kU(AU),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
728
729If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
730
731For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},bOe="DialogDescriptionWarning",wOe=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${kU(bOe).contentName}}.`;return w.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null}
731,SOe=fU,jOe=pU,_Oe=gU,EU=yU,CU=vU,PU=bU,TU=SU,AOe=_U;const ur=SOe,Dr=jOe,kOe=_Oe,OU=w.forwardRef(({className:e,...t},n)=>l.jsx(EU,{ref:n,className:ve("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));OU.displayName=EU.displayName;const qn=w.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(kOe,{children:[l.jsx(OU,{}),l.jsxs(CU,{ref:r,className:ve("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,l.jsxs(AOe,{className:"absolute right-4 top-4 roun
731ded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[l.jsx(kh,{className:"h-4 w-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));qn.displayName=CU.displayName;const Cn=({className:e,...t})=>l.jsx("div",{className:ve("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Cn.displayName="DialogHeader";const CS=({className:e,...t})=>l.jsx("div",{className:ve("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});CS.displayName="DialogFooter";const Pn=w.forwardRef(({className:e,...t},n)=>l.jsx(PU,{ref:n,className:ve("text-lg font-semibold leading-none tracking-tight",e),...t}));Pn.displayName=PU.displayName;const EOe=w.forwardRef(({className:e,...t},n)=>l.jsx(TU,{ref:n,className:ve("text-sm text-muted-foreground",e),...t}));EOe.displayName=TU.displayName;function COe(){const[e,t]=w.useState([]),[n,r]=w.useState(!0),[i,a]=w.useState(!1),[s,o]=w.useState({name:"",description:"",source:"",version:""}),c=async()=>{const{data:d}=await de("frameworks").select("*").is("deleted_at",null).order("created_at",{ascending:!1});t(d??[]),r(!1)};w.useEffect(()=>{c()},[]);const u=async()=>{if(!s.name.trim()){$e.error("Name is required");return}const d=await sr();if(!d){$e.error("Session expired");return}const{data:{user:h}}=await mt.auth.getUser(),{error:p}=await de("frameworks").insert({tenant_id:d,name:s.name.trim(),description:s.description||null,source:s.source||null,version:s.version||null,created_by:h==null?void 0:h.id});if(p){$e.error(p.message);return}$e.success("Framework created"),o({name:"",description:"",source:"",version:""}),a(!1),c()},f=async d=>{const{error:h}=await de("frameworks").update({deleted_at:new Date().toISOString()}).eq("id",d);if(h){$e.error(h.message);return}$e.success("Framework deleted"),c()};return l.jsx(gn,{children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-2xl font-bold",children:"Frameworks"}),l.jsxs(ur,{open:i,onOpenChange:a,children:[l.jsx(Dr,{asChild:!0,children:l.jsxs(ie,{size:"sm",children:[l.jsx(Ir,{className:"w-4 h-4 mr-1"}),"Add Framework"]})}),l.jsxs(qn,{children:[l.jsx(Cn,{children:l.jsx(Pn,{children:"New Framework"})}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{children:[l.jsx(ee,{children:"Name *"}),l.jsx(Oe,{value:s.name,onChange:d=>o({...s,name:d.target.value}),placeholder:"e.g., SOC 2 Type II"})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Source"}),l.jsx(Oe,{value:s.source,onChange:d=>o({...s,source:d.target.value}),placeholder:"e.g., AICPA"})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Version"}),l.jsx(Oe,{value:s.version,onChange:d=>o({...s,version:d.target.value}),placeholder:"e.g., 2023"})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Description"}),l.jsx(Rt,{value:s.description,onChange:d=>o({...s,description:d.target.value})})]}),l.jsx(ie,{onClick:u,className:"w-full",children:"Create Framework"})]})]})]})]}),l.jsx("div",{className:"rounded-lg border border-border overflow-hidden",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{className:"bg-muted/50",children:l.jsxs("tr",{children:[l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Name"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Source"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Version"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Status"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Created"}),l.jsx("th",{className:"p-3"})]})}),l.jsx("tbody",{children:n?l.jsx("tr",{children:l.jsx("td",{colSpan:6,className:"p-8 text-center text-muted-foreground",children:"Loading…"})}):e.length===0?l.jsx("tr",{children:l.jsx("td",{colSpan:6,className:"p-8 text-center text-muted-foreground",children:"No frameworks yet. Add your first one above."})}):e.map(d=>l.jsxs("tr",{className:"border-t border-border hover:bg-muted/20",children:[l.jsx("td",{className:"p-3 font-medium",children:d.name}),l.jsx("td",{className:"p-3 text-muted-foreground",children:d.source??"—"}),l.jsx("td",{className:"p-3 text-muted-foreground",children:d.version??"—"}),l.jsx("td",{className:"p-3",children:l.jsx("span",{className:"inline-block px-2 py-0.5 rounded text-xs bg-primary/10 text-primary",children:d.status})}),l.jsx("td",{className:"p-3 text-muted-foreground",children:new Date(d.created_at).toLocaleDateString()}),l.jsx("td",{className:"p-3",children:l.jsx(ie,{variant:"ghost",size:"sm",onClick:()=>f(d.id),children:l.jsx(cr,{className:"w-4 h-4 text-destructive"})})})]},d.id))})]})})]})})}function NR(e,[t,n]){return Math.min(n,Math.max(t,e))}var POe=w.createContext(void 0);function TOe(e){const t=w.useContext(POe);return e||t||"ltr"}function JA(e){const t=w.useRef({value:e,previous:e});return w.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var OOe=[" ","Enter","ArrowUp","ArrowDown"],NOe=[" ","Enter"],el="Select",[ex,tx,IOe]=a$(el),[Uu,nIe]=wa(el,[IOe,wu]),nx=wu(),[ROe,zs]=Uu(el),[MOe,$Oe]=Uu(el),NU=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:s,defaultValue:o,onValueChange:c,dir:u,name:f,autoComplete:d,disabled:h,required:p,form:g}=e,m=nx(t),[y,v]=w.useState(null),[b,x]=w.useState(null),[j,S]=w.useState(!1),_=TOe(u),[A,k]=Wo({prop:r,defaultProp:i??!1,onChange:a,caller:el}),[E,T]=Wo({prop:s,defaultProp:o,onChange:c,caller:el}),P=w.useRef(null),O=y?g||!!y.closest("form"):!0,[$,R]=w.useState(new Set),L=Array.from($).map(D=>D.props.value).join(";");return l.jsx(xD,{...m,children:l.jsxs(ROe,{required:p,scope:t,trigger:y,onTriggerChange:v,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:j,onValueNodeHasChildrenChange:S,contentId:Ro(),value:E,onValueChange:T,open:A,onOpenChange:k,dir:_,triggerPointerDownPosRef:P,disabled:h,children:[l.jsx(ex.Provider,{scope:t,children:l.jsx(MOe,{scope:e.__scopeSelect,onNativeOptionAdd:w.useCallback(D=>{R(M=>new Set(M).add(D))},[]),onNativeOptionRemove:w.useCallback(D=>{R(M=>{const N=new Set(M);return N.delete(D),N})},[]),children:n})}),O?l.jsxs(nq,{"aria-hidden":!0,required:p,tabIndex:-1,name:f,autoComplete:d,value:E,onChange:D=>T(D.target.value),disabled:h,form:g,children:[E===void 0?l.jsx("option",{value:""}):null,Array.from($)]},L):null]})})};NU.displayName=el;var IU="SelectTrigger",RU=w.forwardRef((e,t)=>
vendor: 16,778 bytes, line 731
731{const{__scopeSelect:n,disabled:r=!1,...i}=e,a=nx(n),s=zs(IU,n),o=s.disabled||r,c=ze(t,s.onTriggerChange),u=tx(n),f=w.useRef("touch"),[d,h,p]=iq(m=>{const y=u().filter(x=>!x.disabled),v=y.find(x=>x.value===s.value),b=aq(y,m,v);b!==void 0&&s.onValueChange(b.value)}),g=m=>{o||(s.onOpenChange(!0),p()),m&&(s.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return l.jsx(Ly,{asChild:!0,...a,children:l.jsx(Pe.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:o,"data-disabled":o?"":void 0,"data-placeholder":rq(s.value)?"":void 0,...i,ref:c,onClick:me(i.onClick,m=>{m.currentTarget.focus(),f.current!=="mouse"&&g(m)}),onPointerDown:me(i.onPointerDown,m=>{f.current=m.pointerType;const y=m.target;y.hasPointerCapture(m.pointerId)&&y.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(g(m),m.preventDefault())}),onKeyDown:me(i.onKeyDown,m=>{const y=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(y&&m.key===" ")&&OOe.includes(m.key)&&(g(),m.preventDefault())})})})});RU.displayName=IU;var MU="SelectValue",$U=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:a,placeholder:s="",...o}=e,c=zs(MU,n),{onValueNodeHasChildrenChange:u}=c,f=a!==void 0,d=ze(t,c.onValueNodeChange);return an(()=>{u(f)},[u,f]),l.jsx(Pe.span,{...o,ref:d,style:{pointerEvents:"none"},children:rq(c.value)?l.jsx(l.Fragment,{children:s}):a})});$U.displayName=MU;var DOe="SelectIcon",DU=w.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return l.jsx(Pe.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});DU.displayName=DOe;var LOe="SelectPortal",LU=e=>l.jsx(jh,{asChild:!0,...e});LU.displayName=LOe;var tl="SelectContent",FU=w.forwardRef((e,t)=>{const n=zs(tl,e.__scopeSelect),[r,i]=w.useState();if(an(()=>{i(new DocumentFragment)},[]),!n.open){const a=r;return a?il.createPortal(l.jsx(BU,{scope:e.__scopeSelect,children:l.jsx(ex.Slot,{scope:e.__scopeSelect,children:l.jsx("div",{children:e.children})})}),a):null}return l.jsx(UU,{...e,ref:t})});FU.displayName=tl;var Kr=10,[BU,Vs]=Uu(tl),FOe="SelectContentImpl",BOe=Vo("SelectContent.RemoveScroll"),UU=w.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:s,side:o,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:h,collisionPadding:p,sticky:g,hideWhenDetached:m,avoidCollisions:y,...v}=e,b=zs(tl,n),[x,j]=w.useState(null),[S,_]=w.useState(null),A=ze(t,Y=>j(Y)),[k,E]=w.useState(null),[T,P]=w.useState(null),O=tx(n),[$,R]=w.useState(!1),L=w.useRef(!1);w.useEffect(()=>{if(x)return V_(x)},[x]),z_();const D=w.useCallback(Y=>{const[we,...W]=O().map(B=>B.ref.current),[Q]=W.slice(-1),Z=document.activeElement;for(const B of Y)if(B===Z||(B==null||B.scrollIntoView({block:"nearest"}),B===we&&S&&(S.scrollTop=0),B===Q&&S&&(S.scrollTop=S.scrollHeight),B==null||B.focus(),document.activeElement!==Z))return},[O,S]),M=w.useCallback(()=>D([k,x]),[D,k,x]);w.useEffect(()=>{$&&M()},[$,M]);const{onOpenChange:N,triggerPointerDownPosRef:I}=b;w.useEffect(()=>{if(x){let Y={x:0,y:0};const we=Q=>{var Z,B;Y={x:Math.abs(Math.round(Q.pageX)-(((Z=I.current)==null?void 0:Z.x)??0)),y:Math.abs(Math.round(Q.pageY)-(((B=I.current)==null?void 0:B.y)??0))}},W=Q=>{Y.x<=10&&Y.y<=10?Q.preventDefault():x.contains(Q.target)||N(!1),document.removeEventListener("pointermove",we),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",we),document.addEventListener("pointerup",W,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",we),document.removeEventListener("pointerup",W,{capture:!0})}}},[x,N,I]),w.useEffect(()=>{const Y=()=>N(!1);return window.addEventListener("blur",Y),window.addEventListener("resize",Y),()=>{window.removeEventListener("blur",Y),window.removeEventListener("resize",Y)}},[N]);const[F,V]=iq(Y=>{const we=O().filter(Z=>!Z.disabled),W=we.find(Z=>Z.ref.current===document.activeElement),Q=aq(we,Y,W);Q&&setTimeout(()=>Q.ref.current.focus())}),U=w.useCallback((Y,we,W)=>{const Q=!L.current&&!W;(b.value!==void 0&&b.value===we||Q)&&(E(Y),Q&&(L.current=!0))},[b.value]),G=w.useCallback(()=>x==null?void 0:x.focus(),[x]),te=w.useCallback((Y,we,W)=>{const Q=!L.current&&!W;(b.value!==void 0&&b.value===we||Q)&&P(Y)},[b.value]),xe=r==="popper"?PS:qU,Me=xe===PS?{side:o,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:h,collisionPadding:p,sticky:g,hideWhenDetached:m,avoidCollisions:y}:{};return l.jsx(BU,{scope:n,content:x,viewport:S,onViewportChange:_,itemRefCallback:U,selectedItem:k,onItemLeave:G,itemTextRefCallback:te,focusSelectedItem:M,selectedItemText:T,position:r,isPositioned:$,searchRef:F,children:l.jsx(rv,{as:BOe,allowPinchZoom:!0,children:l.jsx(tv,{asChild:!0,trapped:b.open,onMountAutoFocus:Y=>{Y.preventDefault()},onUnmountAutoFocus:me(i,Y=>{var we;(we=b.trigger)==null||we.focus({preventScroll:!0}),Y.preventDefault()}),children:l.jsx(mu,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:Y=>Y.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:l.jsx(xe,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:Y=>Y.preventDefault(),...v,...Me,onPlaced:()=>R(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:me(v.onKeyDown,Y=>{const we=Y.ctrlKey||Y.altKey||Y.metaKey;if(Y.key==="Tab"&&Y.preventDefault(),!we&&Y.key.length===1&&V(Y.key),["ArrowUp","ArrowDown","Home","End"].includes(Y.key)){let Q=O().filter(Z=>!Z.disabled).map(Z=>Z.ref.current);if(["ArrowUp","End"].includes(Y.key)&&(Q=Q.slice().reverse()),["ArrowUp","ArrowDown"].includes(Y.key)){const Z=Y.target,B=Q.indexOf(Z);Q=Q.slice(B+1)}setTimeout(()=>D(Q)),Y.preventDefault()}})})})})})})});UU.displayName=FOe;var UOe="SelectItemAlignedPosition",qU=w.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,a=zs(tl,n),s=Vs(tl,n),[o,c]=w.useState(null),[u,f]=w.useState(null),d=ze(t,A=>f(A)),h=tx(n),p=w.useRef(!1),g=w.useRef(!0),{viewport:m,selectedItem:y,selectedItemText:v,focusSelectedItem:b}=s,x=w.useCallback(()=>{if(a.trigger&&a.valueNode&&o&&u&&m&&y&&v){const A=a.trigger.getBoundingClientRect(),k=u.getBoundingClientRect(),E=a.valueNode.getBoundingClientRect(),T=v.getBoundingClientRect();if(a.dir!=="rtl"){const Z=T.left-k.left,B=E.left-Z,Te=A.left-B,be=A.width+Te,Qe=Math.max(be,k.width),Ye=window.innerWidth-Kr,wt=NR(B,[Kr,Math.max(Kr,Ye-Qe)]);o.style.minWidth=be+"px",o.style.left=wt+"px"}else{const Z=k.right-T.right,B=window.innerWidth-E.right-Z,Te=window.innerWidth-A.right-B,be=A.width+Te,Qe=Math.max(be,k.width),Ye=window.innerWidth-Kr,wt=NR(B,[Kr,Math.max(Kr,Ye-Qe)]);o.style.minWidth=be+"px",o.style.right=wt+"px"}const P=h(),O=window.innerHeight-Kr*2,$=m.scrollHeight,R=window.getComputedStyle(u),L=parseInt(R.borderTopWidth,10),D=parseInt(R.paddingTop,10),M=parseInt(R.borderBottomWidth,10),N=parseInt(R.paddingBottom,10),I=L+D+$+N+M,F=Math.min(y.offsetHeight*5,I),V=window.getComputedStyle(m),U=parseInt(V.paddingTop,10),G=parseInt(V.paddingBottom,10),te=A.top+A.height/2-Kr,xe=O-te,Me=y.offsetHeight/2,Y=y.offsetTop+Me,we=L+D+Y,W=I-we;if(we<=te){const Z=P.length>0&&y===P[P.length-1].ref.current;o.style.bottom="0px";const B=u.clientHeight-m.offsetTop-m.offsetHeight,Te=Math.max(xe,Me+(Z?G:0)+B+M),be=we+Te;o.style.height=be+"px"}else{const Z=P.length>0&&y===P[0].ref.current;o.style.top="0px";const Te=Math.max(te,L+m.offsetTop+(Z?U:0)+Me)+W;o.style.height=Te+"px",m.scrollTop=we-te+m.offsetTop}o.style.margin=`${Kr}px 0`,o.style.minHeight=F+"px",o.style.maxHeight=O+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[h,a.trigger,a.valueNode,o,u,m,y,v,a.dir,r]);an(()=>x(),[x]);const[j,S]=w.useState();an(()=>{u&&S(window.getComputedStyle(u).zIndex)},[u]);const _=w.useCallback(A=>{A&&g.current===!0&&(x(),b==null||b(),g.current=!1)},[x,b]);return l.jsx(zOe,{scope:n,contentWrapper:o,shouldExpandOnScrollRef:p,onScrollButtonChange:_,children:l.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:l.jsx(Pe.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});qU.displayName=UOe;var qOe="SelectPopperPosition",PS=w.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Kr,...a}=e,s=nx(n);return l.jsx(Xj,{...s,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});PS.displayName=qOe;var[zOe,ek]=Uu(tl,{}),TS="SelectViewport",zU=w.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,a=Vs(TS,n),s=ek(TS,n),o=ze(t,a.onViewportChange),c=w.useRef(0);return l.jsxs(l.Fragment,{children:[l.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),l.jsx(ex.Slot,{scope:n,children:l.jsx(Pe.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:o,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:me(i.onScroll,u=>{const f=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=s;if(h!=null&&h.current&&d){const p=Math.abs(c.current-f.scrollTop);if(p>0){const g=window.innerHeight-Kr*2,m=parseFloat(d.style.minHeight),y=parseFloat(d.style.height),v=Math.max(m,y);if(v<g){const b=v+p,x=Math.min(g,b),j=b-x;d.style.height=x+"px",d.style.bottom==="0px"&&(f.scrollTop=j>0?j:0,d.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});zU.displayName=TS;var VU="SelectGroup",[VOe,WOe]=Uu(VU),HOe=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Ro();return l.jsx(VOe,{scope:n,id:i,children:l.jsx(Pe.div,{role:"group","aria-labelledby":i,...r,ref:t})})});HOe.displayName=VU;var WU="SelectLabel",HU=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=WOe(WU,n);return l.jsx(Pe.div,{id:i.id,...r,ref:t})});HU.displayName=WU;var py="SelectItem",[GOe,GU]=Uu(py),KU=w.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...s}=e,o=zs(py,n),c=Vs(py,n),u=o.value===r,[f,d]=w.useState(a??""),[h,p]=w.useState(!1),g=ze(t,b=>{var x;return(x=c.itemRefCallback)==null?void 0:x.call(c,b,r,i)}),m=Ro(),y=w.useRef("touch"),v=()=>{i||(o.onValueChange(r),o.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return l.jsx(GOe,{scope:n,value:r,disabled:i,textId:m,isSelected:u,onItemTextChange:w.useCallback(b=>{d(x=>x||((b==null?void 0:b.textContent)??"").trim())},[]),children:l.jsx(ex.ItemSlot,{scope:n,value:r,disabled:i,textValue:f,children:l.jsx(Pe.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...s,ref:g,onFocus:me(s.onFocus,()=>p(!0)),onBlur:me(s.onBlur,()=>p(!1)),onClick:me(s.onClick,()=>{y.current!=="mouse"&&v()}),onPointerUp:me(s.onPointerUp,()=>{y.current==="mouse"&&v()}),onPointerDown:me(s.onPointerDown,b=>{y.current=b.pointerType}),onPointerMove:me(s.onPointerMove,b=>{var x;y.current=b.pointerType,i?(x=c.onItemLeave)==null||x.call(c):y.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:me(s.onPointerLeave,b=>{var x;b.currentTarget===document.activeElement&&((x=c.onItemLeave)==null||x.call(c))}),onKeyDown:me(s.onKeyDown,b=>{var j;((j=c.searchRef)==null?void 0:j.current)!==""&&b.key===" "||(NOe.includes(b.key)&&v(),b.key===" "&&b.preventDefault())})})})})});KU.displayName=py;var jd="SelectItemText",YU=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...a}=e,s=zs(jd,n),o=Vs(jd,n),c=GU(jd,n),u=$Oe(jd,n),[f,d]=w.useState(null),h=ze(t,v=>d(v),c.onItemTextChange,v=>{var b;return(b=o.itemTextRefCallback)==null?void 0:b.call(o,v,c.value,c.disabled)}),p=f==null?void 0:f.textContent,g=w.useMemo(()=>l.jsx("option",{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:y}=u;return an(()=>(m(g),()=>y(g)),[m,y,g]),l.jsxs(l.Fragment,{children:[l.jsx(Pe.span,{id:c.textId,...a,ref:h}),c.isSelected&&s.valueNode&&!s.valueNodeHasChildren?il.createPortal(a.children,s.valueNode):null]})});YU.displayName=jd;var XU="SelectItemIndicator",ZU=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return GU(XU,n).isSelected?l.jsx(Pe.span,{"aria-hidden":!0,...r,ref:t}):null});ZU.displayName=XU;var OS="SelectScrollUpButton",QU=w.forwardRef((e,t)=>{const n=Vs(OS,e.__scopeSelect),r=ek(OS,e.__scopeSelect),[i,a]=w.useState(!1),s=ze(t,r.onScrollButtonChange);return an(()=>{if(n.viewport&&n.isPositioned){let o=function(){const u=c.scrollTop>0;a(u)};const c=n.viewport;return o(),c.addEventListener("scroll",o),()=>c.removeEventListener("scroll",o)}},[n.viewport,n.isPositioned]),i?l.jsx(eq,{...e,ref:s,onAutoScroll:()=>{const{viewport:o,selectedItem:c}=n;o&&c&&(o.scrollTop=o.scrollTop-c.offsetHeight)}}):null});QU.displayName=OS;var NS="SelectScrollDownButton",JU=w.forwardRef((e,t)=>{const n=Vs(NS,e.__scopeSelect),r=ek(NS,e.__scopeSelect),[i,a]=w.useState(!1),s=ze(t,r.onScrollButtonChange);return an(()=>{if(n.viewport&&n.isPositioned){let o=function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<u;a(f)};const c=n.viewport;return o(),c.addEventListener("scroll",o),()=>c.removeEventListener("scroll",o)}},[n.viewport,n.isPositioned]),i?l.jsx(eq,{...e,ref:s,onAutoScroll:()=>{const{viewport:o,selectedItem:c}=n;o&&c&&(o.scrollTop=o.scrollTop+c.offsetHeight)}}):null});JU.displayName=NS;var eq=w.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,a=Vs("SelectScrollButton",n),s=w.useRef(null),o=tx(n),c=w.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return w.useEffect(()=>()=>c(),[c]),an(()=>{var f;const u=o().find(d=>d.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[o]),l.jsx(Pe.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:me(i.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:me(i.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:me(i.onPointerLeave,()=>{c()})})}),KOe="SelectSeparator",tq=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return l.jsx(Pe.div,{"aria-hidden":!0,...r,ref:t})});tq.displayName=KOe;var IS="SelectArrow",YOe=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=nx(n),a=zs(IS,n),s=Vs(IS,n);return a.open&&s.position==="popper"?l.jsx(Zj,{...i,...r,ref:t}):null});YOe.displayName=IS;var XOe="SelectBubbleInput",nq=w.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=w.useRef(null),a=ze(r,i),s=JA(t);return w.useEffect(()=>{const o=i.current;if(!o)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(s!==t&&f){const d=new Event("change",{bubbles:!0});f.call(o,t),o.dispatchEvent(d)}},[s,t]),l.jsx(Pe.select,{...n,style:{...u$,...n.style},ref:a,defaultValue:t})});nq.displayName=XOe;function rq(e){return e===""||e===void 0}function iq(e){const t=ci(e),n=w.useRef(""),r=w.useRef(0),i=w.useCallback(s=>{const o=n.current+s;t(o),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(o)},[t]),a=w.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function aq(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=ZOe(e,Math.max(a,0));i.length===1&&(s=s.filter(u=>u!==n));const c=s.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function ZOe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var QOe=NU,sq=RU,JOe=$U,eNe=DU,tNe=LU,oq=FU,nNe=zU,lq=HU,cq=KU,rNe=YU,iNe=ZU,uq=QU,dq=JU,fq=tq;const fi=QOe,hi=JOe,Tr=w.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(sq,{ref:r,className:ve("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm r
731ing-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,l.jsx(eNe,{asChild:!0,children:l.jsx(Ij,{className:"h-4 w-4 opacity-50"})})]}));Tr.displayName=sq.displayName;const hq=w.forwardRef(({className:e,...t},n)=>l.jsx(uq,{ref:n,className:ve("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(g6,{className:"h-4 w-4"})}));hq.displayName=uq.displayName;const pq=w.forwardRef(({className:e,...t},n)=>l.jsx(dq,{ref:n,className:ve("flex cursor-default items-center justify-center py-1",e),...t,children:l.jsx(Ij,{className:"h-4 w-4"})}));pq.displayName=dq.displayName;const Or=w.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>l.jsx(tNe,{children:l.jsxs(oq,{ref:i,className:ve("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[l.jsx(hq,{}),l.jsx(nNe,{className:ve("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),l.jsx(pq,{})]})}));Or.displayName=oq.displayName;const aNe=w.forwardRef(({className:e,...t},n)=>l.jsx(lq,{ref:n,className:ve("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));aNe.displayName=lq.displayName;const En=w.forwardRef(({className:e,children:t,...n},r)=>l.jsxs(cq,{ref:r,className:ve("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[l.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:l.jsx(iNe,{children:l.jsx(ua,{className:"h-4 w-4"})})}),l.jsx(rNe,{children:t})]}));En.displayName=cq.displayName;const sNe=w.forwardRef(({className:e,...t},n)=>l.jsx(fq,{ref:n,className:ve("-mx-1 my-1 h-px bg-muted",e),...t}));sNe.displayName=fq.displayName;const oNe=["not_started","planned","in_progress","implemented","partially_effective","effective","ineffective","retired"];function lNe(){const[e,t]=w.useState([]),[n,r]=w.useState(!0),[i,a]=w.useState(!1),[s,o]=w.useState({title:"",description:"",category:"",external_id:"",status:"not_started"}),c=async()=>{const{data:h}=await de("controls").select("*").is("deleted_at",null).order("created_at",{ascending:!1});t(h??[]),r(!1)};w.useEffect(()=>{c()},[]);const u=async()=>{if(!s.title.trim()){$e.error("Title is required");return}const h=await sr();if(!h)return;const{data:{user:p}}=await mt.auth.getUser(),{error:g}=await de("controls").insert({tenant_id:h,title:s.title.trim(),description:s.description||null,category:s.category||null,external_id:s.external_id||null,status:s.status,created_by:p==null?void 0:p.id});if(g){$e.error(g.message);return}$e.success("Control created"),o({title:"",description:"",category:"",external_id:"",status:"not_started"}),a(!1),c()},f=async h=>{await de("controls").update({deleted_at:new Date().toISOString()}).eq("id",h),c()},d=h=>h==="effective"||h==="implemented"?"bg-success/10 text-success":h==="in_progress"||h==="planned"?"bg-warning/10 text-warning":h==="ineffective"?"bg-destructive/10 text-destructive":"bg-muted text-muted-foreground";return l.jsx(gn,{children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-2xl font-bold",children:"Controls"}),l.jsxs(ur,{open:i,onOpenChange:a,children:[l.jsx(Dr,{asChild:!0,children:l.jsxs(ie,{size:"sm",children:[l.jsx(Ir,{className:"w-4 h-4 mr-1"}),"Add Control"]})}),l.jsxs(qn,{children:[l.jsx(Cn,{children:l.jsx(Pn,{children:"New Control"})}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{children:[l.jsx(ee,{children:"Title *"}),l.jsx(Oe,{value:s.title,onChange:h=>o({...s,title:h.target.value})})]}
731),l.jsxs("div",{children:[l.jsx(ee,{children:"External ID"}),l.jsx(Oe,{value:s.external_id,onChange:h=>o({...s,external_id:h.target.value}),placeholder:"e.g., CC-1.1"})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Category"}),l.jsx(Oe,{value:s.category,onChange:h=>o({...s,category:h.target.value})})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Status"}),l.jsxs(fi,{value:s.status,onValueChange:h=>o({...s,status:h}),children:[l.jsx(Tr,{children:l.jsx(hi,{})}),l.jsx(Or,{children:oNe.map(h=>l.jsx(En,{value:h,children:h.replace(/_/g," ")},h))})]})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Description"}),l.jsx(Rt,{value:s.description,onChange:h=>o({...s,description:h.target.value})})]}),l.jsx(ie,{onClick:u,className:"w-full",children:"Create Control"})]})]})]})]}),l.jsx("div",{className:"rounded-lg border border-border overflow-hidden",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{className:"bg-muted/50",children:l.jsxs("tr",{children:[l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"ID"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Title"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Category"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Status"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Created"}),l.jsx("th",{className:"p-3"})]})}),l.jsx("tbody",{children:n?l.jsx("tr",{children:l.jsx("td",{colSpan:6,className:"p-8 text-center text-muted-foreground",children:"Loading…"})}):e.length===0?l.jsx("tr",{children:l.jsx("td",{colSpan:6,className:"p-8 text-center text-muted-foreground",children:"No controls yet."})}):e.map(h=>l.jsxs("tr",{className:"border-t border-border hover:bg-muted/20",children:[l.jsx("td",{className:"p-3 font-mono text-xs",children:h.external_id??"—"}),l.jsx("td",{className:"p-3 font-medium",children:h.title}),l.jsx("td",{className:"p-3 text-muted-foreground",children:h.category??"—"}),l.jsx("td",{className:"p-3",children:l.jsx("span",{className:`inline-block px-2 py-0.5 rounded text-xs ${d(h.status)}`,children:h.status.replace(/_/g," ")})}),l.jsx("td",{className:"p-3 text-muted-foreground",children:new Date(h.created_at).toLocaleDateString()}),l.jsx("td",{className:"p-3",children:l.jsx(ie,{variant:"ghost",size:"sm",onClick:()=>f(h.id),children:l.jsx(cr,{className:"w-4 h-4 text-destructive"})})})]},h.id))})]})})]})})}const cNe=["document","screenshot","log","attestation","automated"];function uNe(){const[e,t]=w.useState([]),[n,r]=w.useState(!0),[i,a]=w.useState(!1),[s,o]=w.useState({title:"",description:"",type:"document"}),c=async()=>{const{data:d}=await de("evidence_items").select("*").is("deleted_at",null).order("created_at",{ascending:!1});t(d??[]),r(!1)};w.useEffect(()=>{c()},[]);const u=async()=>{if(!s.title.trim()){$e.error("Title is required");return}const d=await sr();if(!d)return;const{data:{user:h}}=await mt.auth.getUser(),{error:p}=await de("evidence_items").insert({tenant_id:d,title:s.title.trim(),description:s.description||null,type:s.type,collector_id:h==null?void 0:h.id,collected_at:new Date().toISOString()});if(p){$e.error(p.message);return}$e.success("Evidence created"),o({title:"",description:"",type:"document"}),a(!1),c()},f=d=>d==="accepted"?"bg-success/10 text-success":d==="under_review"||d==="collected"?"bg-warning/10 text-warning":d==="rejected"||d==="expired"?"bg-destructive/10 text-destructive":"bg-muted text-muted-foreground";return l.jsx(gn,{children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-2xl font-bold",children:"Evidence"}),l.jsxs(ur,{open:i,onOpenChange:a,children:[l.jsx(Dr,{asChild:!0,children:l.jsxs(ie,{size:"sm",children:[l.jsx(Ir,{className:"w-4 h-4 mr-1"}),"Add Evidence"]})}),l.jsxs(qn,{children:[l.jsx(Cn,{children:l.jsx(Pn,{children:"New Evidence Item"})}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{children:[l.jsx(ee,{children:"Title *"}),l.jsx(Oe,{value:s.title,onChange:d=>o({...s,title:d.target.value})})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Type"}),l.jsxs(fi,{value:s.type,onValueChange:d=>o({...s,type:d}),children:[l.jsx(Tr,{children:l.jsx(hi,{})}),l.jsx(Or,{children:cNe.map(d=>l.jsx(En,{value:d,children:d},d))})]})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Description"}),l.jsx(Rt,{value:s.description,onChange:d=>o({...s,description:d.target.value})})]}),l.jsx(ie,{onClick:u,className:"w-full",children:"Create Evidence"})]})]})]})]}),l.jsx("div",{className:"rounded-lg border border-border overflow-hidden",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{className:"bg-muted/50",children:l.jsxs("tr",{children:[l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Title"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Type"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Status"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Collected"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Expires"}),l.jsx("th",{className:"p-3"})]})}),l.jsx("tbody",{children:n?l.jsx("tr",{children:l.jsx("td",{colSpan:6,className:"p-8 text-center text-muted-foreground",children:"Loading…"})}):e.length===0?l.jsx("tr",{children:l.jsx("td",{colSpan:6,className:"p-8 text-center text-muted-foreground",children:"No evidence items yet."})}):e.map(d=>l.jsxs("tr",{className:"border-t border-border hover:bg-muted/20",children:[l.jsx("td",{className:"p-3 font-medium",children:d.title}),l.jsx("td",{className:"p-3 text-muted-foreground",children:d.type??"—"}),l.jsx("td",{className:"p-3",children:l.jsx("span",{className:`inline-block px-2 py-0.5 rounded text-xs ${f(d.status)}`,children:d.status.replace(/_/g," ")})}),l.jsx("td",{className:"p-3 text-muted-foreground",children:d.collected_at?new Date(d.collected_at).toLocaleDateString():"—"}),l.jsx("td",{className:"p-3 text-muted-foreground",children:d.expires_at?new Date(d.expires_at).toLocaleDateString():"—"}),l.jsx("td",{className:"p-3",children:l.jsx(ie,{variant:"ghost",size:"sm",onClick:async()=>{await de("evidence_items").update({deleted_at:new Date().toISOString()}).eq("id",d.id),c()},children:l.jsx(cr,{className:"w-4 h-4 text-destructive"})})})]},d.id))})]})})]})})}function dNe(){const[e,t]=w.useState([]),[n,r]=w.useState(!0),[i,a]=w.useState(!1),[s,o]=w.useState({title:"",description:"",content:""}),c=async()=>{const{data:f}=await de("policies").select("*").is("deleted_at",null).order("created_at",{ascending:!1});t(f??[]),r(!1)};w.useEffect(()=>{c()},[]);const u=async()=>
731{if(!s.title.trim()){$e.error("Title is required");return}const f=await sr();if(!f)return;const{data:{user:d}}=await mt.auth.getUser(),{error:h}=await de("policies").insert({tenant_id:f,title:s.title.trim(),description:s.description||null,content:s.content||null,owner_id:d==null?void 0:d.id});if(h){$e.error(h.message);return}$e.success("Policy created"),o({title:"",description:"",content:""}),a(!1),c()};return l.jsx(gn,{children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-2xl font-bold",children:"Policies"}),l.jsxs(ur,{open:i,onOpenChange:a,children:[l.jsx(Dr,{asChild:!0,children:l.jsxs(ie,{size:"sm",children:[l.jsx(Ir,{className:"w-4 h-4 mr-1"}),"Add Policy"]})}),l.jsxs(qn,{children:[l.jsx(Cn,{children:l.jsx(Pn,{children:"New Policy"})}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{children:[l.jsx(ee,{children:"Title *"}),l.jsx(Oe,{value:s.title,onChange:f=>o({...s,title:f.target.value})})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Description"}),l.jsx(Rt,{value:s.description,onChange:f=>o({...s,description:f.target.value})})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Content"}),l.jsx(Rt,{value:s.content,onChange:f=>o({...s,content:f.target.value}),className:"min-h-[120px]"})]}),l.jsx(ie,{onClick:u,className:"w-full",children:"Create Policy"})]})]})]})]}),l.jsx("div",{className:"rounded-lg border border-border overflow-hidden",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{className:"bg-muted/50",children:l.jsxs("tr",{children:[l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Title"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Status"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Version"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Effective"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Review"}),l.jsx("th",{className:"p-3"})]})}),l.jsx("tbody",{children:n?l.jsx("tr",{children:l.jsx("td",{colSpan:6,className:"p-8 text-center text-muted-foreground",children:"Loading…"})}):e.length===0?l.jsx("tr",{children:l.jsx("td",{colSpan:6,className:"p-8 text-center text-muted-foreground",children:"No policies yet."})}):e.map(f=>l.jsxs("tr",{className:"border-t border-border hover:bg-muted/20",children:[l.jsx("td",{className:"p-3 font-medium",children:f.title}),l.jsx("td",{className:"p-3",children:l.jsx("span",{className:"inline-block px-2 py-0.5 rounded text-xs bg-primary/10 text-primary",children:f.status})}),l.jsxs("td",{className:"p-3 text-muted-foreground",children:["v",f.version]}),l.jsx("td",{className:"p-3 text-muted-foreground",children:f.effective_date??"—"}),l.jsx("td",{className:"p-3 text-muted-foreground",children:f.review_date??"—"}),l.jsx("td",{className:"p-3",children:l.jsx(ie,{variant:"ghost",size:"sm",onClick:async()=>{await de("policies").update({deleted_at:new Date().toISOString()}).eq("id",f.id),c()},children:l.jsx(cr,{className:"w-4 h-4 text-destructive"})})})]},f.id))})]})})]})})}const IR=["low","medium","high","critical"];function fNe(){const[e,t]=w.useState([]),[n,r]=w.useState(!0),[i,a]=w.useState(!1),[s,o]=w.useState({title:"",description:"",category:"",likelihood:"medium",impact:"medium"}),c=async()=>{const{data:d}=await de("risks").select("*").is("deleted_at",null).order("created_at",{ascending:!1});t(d??[]),r(!1)};w.useEffect(()=>{c()},[]);const u=async()=>{if(!s.title.trim()){$e.error("Title is required");return}const d=await sr();if(!d)return;const{data:{user:h}}=await mt.auth.getUser(),{error:p}=await de("risks").insert({tenant_id:d,title:s.title.trim(),description:s.description||null,category:s.category||null,likelihood:s.likelihood,impact:s.impact,created_by:h==null?void 0:h.id});if(p){$e.error(p.message);return}$e.success("Risk created"),o({title:"",description:"",category:"",likelihood:"medium",impact:"medium"}),a(!1),c()},f=d=>d==="critical"||d==="high"?"bg-destructive/10 text-destructive":d==="medium"?"bg-warning/10 text-warning":"bg-success/10 text-success";return l.jsx(gn,{children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-2xl font-bold",children:"Risks"}),l.jsxs(ur,{open:i,onOpenChange:a,children:[l.jsx(Dr,{asChild:!0,children:l.jsxs(ie,{size:"sm",children:[l.jsx(Ir,{className:"w-4 h-4 mr-1"}),"Add Risk"]})}),l.jsxs(qn,{children:[l.jsx(Cn,{children:l.jsx(Pn,{children:"New Risk"})}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{children:[l.jsx(ee,{children:"Title *"}),l.jsx(Oe,{value:s.title,onChange:d=>o({...s,title:d.target.value})})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Category"}),l.jsx(Oe,{value:s.category,onChange:d=>o({...s,category:d.target.value})})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx(ee,{children:"Likelihood"}),l.jsxs(fi,{value:s.likelihood,onValueChange:d=>o({...s,likelihood:d}),children:[l.jsx(Tr,{children:l.jsx(hi,{})}),l.jsx(Or,{children:IR.map(d=>l.jsx(En,{value:d,children:d},d))})]})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Impact"}),l.jsxs(fi,{value:s.impact,onValueChange:d=>o({...s,impact:d}),children:[l.jsx(Tr,{children:l.jsx(hi,{})}),l.jsx(Or,{children:IR.map(d=>l.jsx(En,{value:d,children:d},d))})]})]})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Description"}),l.jsx(Rt,{value:s.description,onChange:d=>o({...s,description:d.target.value})})]}),l.jsx(ie,{onClick:u,className:"w-full",children:"Create Risk"})]})]})]})]}),l.jsx("div",{className:"rounded-lg border border-border overflow-hidden",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{className:"bg-muted/50",children:l.jsxs("tr",{children:[l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Title"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Category"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Likelihood"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Impact"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Status"}),l.jsx("th",{className:"p-3"})]})}),l.jsx("tbody",{children:n?l.jsx("tr",{children:l.jsx("td",{colSpan:6,className:"p-8 text-center text-muted-foreground",children:"Loading…"})}):e.length===0?l.jsx("tr",{children:l.jsx("td",{colSpan:6,className:"p-8 text-center text-muted-foreground",children:"No risks yet."})}):e.map(d=>l.jsxs("tr",{className:"border-t border-border hover:bg-muted/20",children:[l.jsx("td",{className:"p-3 font-medium",children:d.title}),l.jsx("td",{className:"p-3 text-muted-foreground",children:d.category??"—"}),l.jsx("td",{className:"p-3",children:l.jsx("span",{className:`inline-block px-2 py-0.5 rounded text-xs ${f(d.likelihood)}`,children:d.likelihood})}),l.jsx("td",{className:"p-3",children:l.jsx("span",{className:`inline-block px-2 py-0.5 rounded text-xs ${f(d.impact)}`,children:d.impact})}),l.jsx("td",{className:"p-3 text-muted-foreground",children:d.status.replace(/_/g," ")}),l.jsx("td",{className:"p-3",children:l.jsx(ie,{variant:"ghost",size:"sm",onClick:async()=>{await de("risks").update({deleted_at:new Date().toISOString()}).eq("id",d.id),c()},children:l.jsx(cr,{className:"w-4 h-4 text-destructive"})})})]},d.id))})]})})]})})}function hNe(){const[e,t]=w.useState([]),[n,r]=w.useState(!0),[i,a]=w.useState(!1),[s,o]=w.useState({title:"",description:"",severity:"medium",s
731ource:""}),c=async()=>{const{data:h}=await de("findings").select("*").is("deleted_at",null).order("created_at",{ascending:!1});t(h??[]),r(!1)};w.useEffect(()=>{c()},[]);const u=async()=>{if(!s.title.trim()){$e.error("Title is required");return}const h=await sr();if(!h)return;const{data:{user:p}}=await mt.auth.getUser(),{error:g}=await de("findings").insert({tenant_id:h,title:s.title.trim(),description:s.description||null,severity:s.severity,source:s.source||null,created_by:p==null?void 0:p.id});if(g){$e.error(g.message);return}$e.success("Finding created"),o({title:"",description:"",severity:"medium",source:""}),a(!1),c()},f=h=>h==="critical"||h==="high"?"bg-destructive/10 text-destructive":h==="medium"?"bg-warning/10 text-warning":"bg-success/10 text-success",d=h=>h==="closed"?"bg-success/10 text-success":h==="in_remediation"?"bg-warning/10 text-warning":"bg-muted text-muted-foreground";return l.jsx(gn,{children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-2xl font-bold",children:"Findings"}),l.jsxs(ur,{open:i,onOpenChange:a,children:[l.jsx(Dr,{asChild:!0,children:l.jsxs(ie,{size:"sm",children:[l.jsx(Ir,{className:"w-4 h-4 mr-1"}),"Add Finding"]})}),l.jsxs(qn,{children:[l.jsx(Cn,{children:l.jsx(Pn,{children:"New Finding"})}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{children:[l.jsx(ee,{children:"Title *"}),l.jsx(Oe,{value:s.title,onChange:h=>o({...s,title:h.target.value})})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Severity"}),l.jsxs(fi,{value:s.severity,onValueChange:h=>o({...s,severity:h}),children:[l.jsx(Tr,{children:l.jsx(hi,{})}),l.jsx(Or,{children:["low","medium","high","critical"].map(h=>l.jsx(En,{value:h,children:h},h))})]})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Source"}),l.jsx(Oe,{value:s.source,onChange:h=>o({...s,source:h.target.value}),placeholder:"e.g., audit, monitoring"})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Description"}),l.jsx(Rt,{value:s.description,onChange:h=>o({...s,description:h.target.value})})]}),l.jsx(ie,{onClick:u,className:"w-full",children:"Create Finding"})]})]})]})]}),l.jsx("div",{className:"rounded-lg border border-border overflow-hidden",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{className:"bg-muted/50",children:l.jsxs("tr",{children:[l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Title"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Severity"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Status"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Source"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Created"}),l.jsx("th",{className:"p-3"})]})}),l.jsx("tbody",{children:n?l.jsx("tr",{children:l.jsx("td",{colSpan:6,className:"p-8 text-center text-muted-foreground",children:"Loading…"})}):e.length===0?l.jsx("tr",{children:l.jsx("td",{colSpan:6,className:"p-8 text-center text-muted-foreground",children:"No findings yet."})}):e.map(h=>l.jsxs("tr",{className:"border-t border-border hover:bg-muted/20",children:[l.jsx("td",{className:"p-3 font-medium",children:h.title}),l.jsx("td",{className:"p-3",children:l.jsx("span",{className:`inline-block px-2 py-0.5 rounded text-xs ${f(h.severity)}`,children:h.severity})}),l.jsx("td",{className:"p-3",children:l.jsx("span",{className:`inline-block px-2 py-0.5 rounded text-xs ${d(h.status)}`,children:h.status.replace(/_/g," ")})}),l.jsx("td",{className:"p-3 text-muted-foreground",children:h.source??"—"}),l.jsx("td",{className:"p-3 text-muted-foreground",children:new Date(h.created_at).toLocaleDateString()}),l.jsx("td",{className:"p-3",children:l.jsx(ie,{variant:"ghost",size:"sm",onClick:async()=>{await de("findings").update({deleted_at:new Date().toISOString()}).eq("id",h.id),c()},children:l.jsx(cr,{className:"w-4 h-4 text-destructive"})})})]},h.id))})]})})]})})}function pNe(){const[e,t]=w.useState([]),[n,r]=w.useState(!0),[i,a]=w.useState(!1),[s,o]=w.useState({title:"",description:"",type:"corrective",priority:"medium",root_cause:"",action_plan:""}),c=async()=>{const{data:d}=await de("capas").select("*").is("deleted_at",null).order("created_at",{ascending:!1});t(d??[]),r(!1)};w.useEffect(()=>{c()},[]);const u=async()=>
731{if(!s.title.trim()){$e.error("Title is required");return}const d=await sr();if(!d)return;const{data:{user:h}}=await mt.auth.getUser(),{error:p}=await de("capas").insert({tenant_id:d,title:s.title.trim(),description:s.description||null,type:s.type,priority:s.priority,root_cause:s.root_cause||null,action_plan:s.action_plan||null,created_by:h==null?void 0:h.id});if(p){$e.error(p.message);return}$e.success("CAPA created"),o({title:"",description:"",type:"corrective",priority:"medium",root_cause:"",action_plan:""}),a(!1),c()},f=d=>d==="critical"||d==="high"?"bg-destructive/10 text-destructive":d==="medium"?"bg-warning/10 text-warning":"bg-success/10 text-success";return l.jsx(gn,{children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-2xl font-bold",children:"CAPAs"}),l.jsxs(ur,{open:i,onOpenChange:a,children:[l.jsx(Dr,{asChild:!0,children:l.jsxs(ie,{size:"sm",children:[l.jsx(Ir,{className:"w-4 h-4 mr-1"}),"Add CAPA"]})}),l.jsxs(qn,{children:[l.jsx(Cn,{children:l.jsx(Pn,{children:"New CAPA"})}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{children:[l.jsx(ee,{children:"Title *"}),l.jsx(Oe,{value:s.title,onChange:d=>o({...s,title:d.target.value})})]}),l.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.jsxs("div",{children:[l.jsx(ee,{children:"Type"}),l.jsxs(fi,{value:s.type,onValueChange:d=>o({...s,type:d}),children:[l.jsx(Tr,{children:l.jsx(hi,{})}),l.jsxs(Or,{children:[l.jsx(En,{value:"corrective",children:"Corrective"}),l.jsx(En,{value:"preventive",children:"Preventive"})]})]})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Priority"}),l.jsxs(fi,{value:s.priority,onValueChange:d=>o({...s,priority:d}),children:[l.jsx(Tr,{children:l.jsx(hi,{})}),l.jsx(Or,{children:["low","medium","high","critical"].map(d=>l.jsx(En,{value:d,children:d},d))})]})]})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Root Cause"}),l.jsx(Rt,{value:s.root_cause,onChange:d=>o({...s,root_cause:d.target.value})})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Action Plan"}),l.jsx(Rt,{value:s.action_plan,onChange:d=>o({...s,action_plan:d.target.value})})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Description"}),l.jsx(Rt,{value:s.description,onChange:d=>o({...s,description:d.target.value})})]}),l.jsx(ie,{onClick:u,className:"w-full",children:"Create CAPA"})]})]})]})]}),l.jsx("div",{className:"rounded-lg border border-border overflow-hidden",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{className:"bg-muted/50",children:l.jsxs("tr",{children:[l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Title"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Type"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Priority"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Status"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Due"}),l.jsx("th",{className:"p-3"})]})}),l.jsx("tbody",{children:n?l.jsx("tr",{children:l.jsx("td",{colSpan:6,className:"p-8 text-center text-muted-foreground",children:"Loading…"})}):e.length===0?l.jsx("tr",{children:l.jsx("td",{colSpan:6,className:"p-8 text-center text-muted-foreground",children:"No CAPAs yet."})}):e.map(d=>l.jsxs("tr",{className:"border-t border-border hover:bg-muted/20",children:[l.jsx("td",{className:"p-3 font-medium",children:d.title}),l.jsx("td",{className:"p-3 text-muted-foreground capitalize",children:d.type}),l.jsx("td",{className:"p-3",children:l.jsx("span",{className:`inline-block px-2 py-0.5 rounded text-xs ${f(d.priority)}`,children:d.priority})}),l.jsx("td",{className:"p-3 text-muted-foreground",children:d.status.replace(/_/g," ")}),l.jsx("td",{className:"p-3 text-muted-foreground",children:d.due_date??"—"}),l.jsx("td",{className:"p-3",children:l.jsx(ie,{variant:"ghost",size:"sm",onClick:async()=>{await de("capas").update({deleted_at:new Date().toISOString()}).eq("id",d.id),c()},children:l.jsx(cr,{className:"w-4 h-4 text-destructive"})})})]},d.id))})]})})]})})}function mNe(){const[e,t]=w.useState([]),[n,r]=w.useState(!0),[i,a]=w.useState(!1),[s,o]=w.useState({title:"",description:"",type:"internal",scope:""}),c=async()=>{const{data:f}=await de("audits").select("*").is("deleted_at",null).order("created_at",{ascending:!1});t(f??[]),r(!1)};w.useEffect(()=>{c()},[]);const u=async()=>
731{if(!s.title.trim()){$e.error("Title is required");return}const f=await sr();if(!f)return;const{data:{user:d}}=await mt.auth.getUser(),{error:h}=await de("audits").insert({tenant_id:f,title:s.title.trim(),description:s.description||null,type:s.type,scope:s.scope||null,lead_auditor_id:d==null?void 0:d.id,created_by:d==null?void 0:d.id});if(h){$e.error(h.message);return}$e.success("Audit created"),o({title:"",description:"",type:"internal",scope:""}),a(!1),c()};return l.jsx(gn,{children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-2xl font-bold",children:"Audits"}),l.jsxs(ur,{open:i,onOpenChange:a,children:[l.jsx(Dr,{asChild:!0,children:l.jsxs(ie,{size:"sm",children:[l.jsx(Ir,{className:"w-4 h-4 mr-1"}),"Add Audit"]})}),l.jsxs(qn,{children:[l.jsx(Cn,{children:l.jsx(Pn,{children:"New Audit"})}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{children:[l.jsx(ee,{children:"Title *"}),l.jsx(Oe,{value:s.title,onChange:f=>o({...s,title:f.target.value})})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Type"}),l.jsxs(fi,{value:s.type,onValueChange:f=>o({...s,type:f}),children:[l.jsx(Tr,{children:l.jsx(hi,{})}),l.jsxs(Or,{children:[l.jsx(En,{value:"internal",children:"Internal"}),l.jsx(En,{value:"external",children:"External"}),l.jsx(En,{value:"regulatory",children:"Regulatory"})]})]})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Scope"}),l.jsx(Rt,{value:s.scope,onChange:f=>o({...s,scope:f.target.value})})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Description"}),l.jsx(Rt,{value:s.description,onChange:f=>o({...s,description:f.target.value})})]}),l.jsx(ie,{onClick:u,className:"w-full",children:"Create Audit"})]})]})]})]}),l.jsx("div",{className:"rounded-lg border border-border overflow-hidden",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{className:"bg-muted/50",children:l.jsxs("tr",{children:[l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Title"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Type"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Status"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Start"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"End"}),l.jsx("th",{className:"p-3"})]})}),l.jsx("tbody",{children:n?l.jsx("tr",{children:l.jsx("td",{colSpan:6,className:"p-8 text-center text-muted-foreground",children:"Loading…"})}):e.length===0?l.jsx("tr",{children:l.jsx("td",{colSpan:6,className:"p-8 text-center text-muted-foreground",children:"No audits yet."})}):e.map(f=>l.jsxs("tr",{className:"border-t border-border hover:bg-muted/20",children:[l.jsx("td",{className:"p-3 font-medium",children:f.title}),l.jsx("td",{className:"p-3 text-muted-foreground capitalize",children:f.type??"—"}),l.jsx("td",{className:"p-3",children:l.jsx("span",{className:"inline-block px-2 py-0.5 rounded text-xs bg-primary/10 text-primary",children:f.status.replace(/_/g," ")})}),l.jsx("td",{className:"p-3 text-muted-foreground",children:f.start_date??"—"}),l.jsx("td",{className:"p-3 text-muted-foreground",children:f.end_date??"—"}),l.jsx("td",{className:"p-3",children:l.jsx(ie,{variant:"ghost",size:"sm",onClick:async()=>{await de("audits").update({deleted_at:new Date().toISOString()}).eq("id",f.id),c()},children:l.jsx(cr,{className:"w-4 h-4 text-destructive"})})})]},f.id))})]})})]})})}function gNe(){const[e,t]=w.useState([]),[n,r]=w.useState(!0),[i,a]=w.useState(!1),[s,o]=w.useState({name:"",description:"",category:"",risk_tier:"medium",contact_name:"",contact_email:""}),c=async()=>{const{data:d}=await de("vendors").select("*").is("deleted_at",null).order("created_at",{ascending:!1});t(d??[]),r(!1)};w.useEffect(()=>{c()},[]);const u=async()=>{if(!s.name.trim()){$e.error("Name is required");return}const d=await sr();if(!d)return;const{error:h}=await de("vendors").insert({tenant_id:d,name:s.name.trim(),description:s.description||null,category:s.category||null,risk_tier:s.r
731isk_tier,contact_name:s.contact_name||null,contact_email:s.contact_email||null});if(h){$e.error(h.message);return}$e.success("Vendor created"),o({name:"",description:"",category:"",risk_tier:"medium",contact_name:"",contact_email:""}),a(!1),c()},f=d=>d==="critical"||d==="high"?"bg-destructive/10 text-destructive":d==="medium"?"bg-warning/10 text-warning":"bg-success/10 text-success";return l.jsx(gn,{children:l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h1",{className:"text-2xl font-bold",children:"Vendors"}),l.jsxs(ur,{open:i,onOpenChange:a,children:[l.jsx(Dr,{asChild:!0,children:l.jsxs(ie,{size:"sm",children:[l.jsx(Ir,{className:"w-4 h-4 mr-1"}),"Add Vendor"]})}),l.jsxs(qn,{children:[l.jsx(Cn,{children:l.jsx(Pn,{children:"New Vendor"})}),l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{children:[l.jsx(ee,{children:"Name *"}),l.jsx(Oe,{value:s.name,onChange:d=>o({...s,name:d.target.value})})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Category"}),l.jsx(Oe,{value:s.category,onChange:d=>o({...s,category:d.target.value})})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Risk Tier"}),l.jsxs(fi,{value:s.risk_tier,onValueChange:d=>o({...s,risk_tier:d}),children:[l.jsx(Tr,{children:l.jsx(hi,{})}),l.jsx(Or,{children:["low","medium","high","critical"].map(d=>l.jsx(En,{value:d,children:d},d))})]})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Contact Name"}),l.jsx(Oe,{value:s.contact_name,onChange:d=>o({...s,contact_name:d.target.value})})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Contact Email"}),l.jsx(Oe,{value:s.contact_email,onChange:d=>o({...s,contact_email:d.target.value}),type:"email"})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Description"}),l.jsx(Rt,{value:s.description,onChange:d=>o({...s,description:d.target.value})})]}),l.jsx(ie,{onClick:u,className:"w-full",children:"Create Vendor"})]})]})]})]}),l.jsx("div",{className:"rounded-lg border border-border overflow-hidden",children:l.jsxs("table",{className:"w-full text-sm",children:[l.jsx("thead",{className:"bg-muted/50",children:l.jsxs("tr",{children:[l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Name"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Category"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Risk Tier"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Status"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Contact"}),l.jsx("th",{className:"text-left p-3 font-medium text-muted-foreground",children:"Contract Expiry"}),l.jsx("th",{className:"p-3"})]})}),l.jsx("tbody",{children:n?l.jsx("tr",{children:l.jsx("td",{colSpan:7,className:"p-8 text-center text-muted-foreground",children:"Loading…"})}):e.length===0?l.jsx("tr",{children:l.jsx("td",{colSpan:7,className:"p-8 text-center text-muted-foreground",children:"No vendors yet."})}):e.map(d=>l.jsxs("tr",{className:"border-t border-border hover:bg-muted/20",children:[l.jsx("td",{className:"p-3 font-medium",children:d.name}),l.jsx("td",{className:"p-3 text-muted-foreground",children:d.category??"—"}),l.jsx("td",{className:"p-3",children:l.jsx("span",{className:`inline-block px-2 py-0.5 rounded text-xs ${f(d.risk_tier)}`,children:d.risk_tier})}),l.jsx("td",{className:"p-3 text-muted-foreground capitalize",children:d.status}),l.jsx("td",{className:"p-3 text-muted-foreground",children:d.contact_email??"—"}),l.jsx("td",{className:"p-3 text-muted-foreground",children:d.contract_expiry??"—"}),l.jsx("td",{className:"p-3",children:l.jsx(ie,{variant:"ghost",size:"sm",onClick:async()=>{await de("vendors").update({deleted_at:new Date().toISOString()}).eq("id",d.id),c()},children:l.jsx(cr,{className:"w-4 h-4 text-destructive"})})})]},d.id))})]})})]})})}var rx="Switch",[yNe,rIe]=wa(rx),[vNe,xNe]=yNe(rx),mq=w.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:s,disabled:o,value:c="on",onCheckedChange:u,form:f,...d}=e,[h,p]=w.useState(null),g=ze(t,x=>p(x)),m=w.useRef(!1),y=h?f||!!h.closest("form"):!0,[v,b]=Wo({prop:i,defaultProp:a??!1,onChange:u,caller:rx});return l.jsxs(vNe,{scope:n,checked:v,disabled:o,children:[l.jsx(Pe.button,{type:"button",role:"switch","aria-checked":v,"aria-required":s,"data-state":xq(v),"data-disabled":o?"":void 0,disabled:o,value:c,...d,ref:g,onClick:me(e.onClick,x=>{b(j=>!j),y&&(m.current=x.isPropagationStopped(),m.current||x.stopPropagation())})}),y&&l.jsx(vq,{control:h,bubbles:!m.current,name:r,value:c,checked:v,required:s,disabled:o,form:f,style:{transform:"translateX(-100%)"}})]})});mq.displayName=rx;var gq="SwitchThumb",yq=w.forwardRef((e,t)=>
731{const{__scopeSwitch:n,...r}=e,i=xNe(gq,n);return l.jsx(Pe.span,{"data-state":xq(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});yq.displayName=gq;var bNe="SwitchBubbleInput",vq=w.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{const s=w.useRef(null),o=ze(s,a),c=JA(n),u=Gj(t);return w.useEffect(()=>{const f=s.current;if(!f)return;const d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(c!==n&&p){const g=new Event("click",{bubbles:r});p.call(f,n),f.dispatchEvent(g)}},[c,n,r]),l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:o,style:{...i.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});vq.displayName=bNe;function xq(e){return e?"checked":"unchecked"}var bq=mq,wNe=yq;const tk=w.forwardRef(({className:e,...t},n)=>l.jsx(bq,{className:ve("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...t,ref:n,children:l.jsx(wNe,{className:ve("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));tk.displayName=bq.displayName;const t0=[{value:"approval_required",label:"Approval Required",desc:"Require approval before status transitions"},{value:"mandatory_fields",label:"Mandatory Fields",desc:"Enforce required fields on entities"},{value:"auto_escalation",label:"Auto-Escalation",desc:"Auto-escalate overdue items"},{value:"role_restriction",label:"Role Restriction",desc:"Restrict actions to specific roles"}],SNe=["controls","evidence_items","risks","findings","policies","audits","capas","vendors"];function jNe(){var b;const[e,t]=w.useState([]),[n,r]=w.useState(!0),[i,a]=w.useState(!1),[s,o]=w.useState("approval_required"),[c,u]=w.useState("controls"),[f,d]=w.useState("{}"),{toast:h}=ba();async function p(){const{data:x}=await de("guardrail_rules").select("*").order("created_at",{ascending:!1});t(x||[]),r(!1)}w.useEffect(()=>{p()},[]);async function g(){const x=await sr();if(!x)return;const{data:{user:j}}=await mt.auth.getUser();let S;try{S=JSON.parse(f)}catch{h({title:"Invalid JSON",description:"Config must be valid JSON",variant:"destructive"});return}const{error:_}=await de("guardrail_rules").insert({tenant_id:x,rule_type:s,entity_type:c,config:S,created_by:j==null?void 0:j.id});_?h({title:"Error",description:_.message,variant:"destructive"}):(h({title:"Rule created"}),a(!1),d("{}"),p())}async function m(x,j){await de("guardrail_rules").update({enabled:j,updated_at:new Date().toISOString()}).eq("id",x),p()}async function y(x){await de("guardrail_rules").delete().eq("id",x),p()}const v={approval_required:JSON.stringify({from_status:"draft",to_status:"accepted",approver_role:"admin"},null,2),mandatory_fields:JSON.stringify({fields:["description","owner_id"],message:"These fields are required"},null,2),auto_escalation:JSON.stringify({overdue_days:7,escalate_to_role:"admin",notify:!0},null,2),role_restriction:JSON.stringify({action:"delete",allowed_roles:["admin","compliance_admin"]},null,2)};return l.jsx(gn,{children:l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold",children:"Guardrails"}),l.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Configure compliance workflow rules and restrictions"})]}),l.jsxs(ur,{open:i,onOpenChange:a,children:[l.jsx(Dr,{asChild:!0,children:l.jsxs(ie,{size:"sm",children:[l.jsx(Ir,{className:"w-4 h-4 mr-1"})," Add Rule"]})}),l.jsxs(qn,{children:[l.jsx(Cn,{children:l.jsx(Pn,{children:"New Guardrail Rule"})}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx(ee,{children:"Rule Type"}),l.jsxs(fi,{value:s,onValueChange:x=>{o(x),d(v[x]||"{}")},children:[l.jsx(Tr,{children:l.jsx(hi,{})}),l.jsx(Or,{children:t0.map(x=>l.jsx(En,{value:x.value,children:x.label},x.value))})]}),l.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:(b=t0.find(x=>x.value===s))==null?void 0:b.desc})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Entity Type"}),l.jsxs(fi,{value:c,onValueChange:u,children:[l.jsx(Tr,{children:l.jsx(hi,{})}),l.jsx(Or,{children:SNe.map(x=>l.jsx(En,{value:x,children:x.replace(/_/g," ")},x))})]})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Configuration (JSON)"}),l.jsx("textarea",{className:"w-full h-32 rounded-md border border-border bg-background px-3 py-2 text-sm font-mono",value:f,onChange:x=>d(x.target.value)})]}),l.jsx(ie,{onClick:g,className:"w-full",children:"Create Rule"})]})]})]})]}),n?l.jsx("div",{className:"space-y-3",children:[1,2,3].map(x=>l.jsx("div",{className:"h-20 rounded-lg bg-muted animate-pulse"},x))}):e.length===0?l.jsxs("div",{className:"rounded-lg border border-border bg-card p-8 text-center",children:[l.jsx(B$,{className:"w-10 h-10 text-muted-foreground mx-auto mb-3"}),l.jsx("p",{className:"text-muted-foreground",children:"No guardrail rules configured yet"}),l.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Add rules to enforce approval workflows, mandatory fields, auto-escalation, and role restrictions"})]}):l.jsx("div",{className:"space-y-3",children:e.map(x=>l.jsx("div",{className:"rounded-lg border border-border bg-card p-4",children:l.jsxs("div",{className:"flex items-start justify-between gap-4",children:[l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-xs font-mono px-2 py-0.5 rounded bg-primary/10 text-primary",children:x.rule_type.replace(/_/g," ")}),l.jsx("span",{className:"text-xs font-mono px-2 py-0.5 rounded bg-muted text-muted-foreground",children:x.entity_type.replace(/_/g," ")})]}),l.jsx("pre",{className:"text-xs text-muted-foreground mt-2 overflow-x-auto max-w-full",children:JSON.stringify(x.config,null,2)})]}),l.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[l.jsx(tk,{checked:x.enabled,onCheckedChange:j=>m(x.id,j)}),l.jsx(ie,{variant:"ghost",size:"sm",onClick:()=>y(x.id),children:l.jsx(cr,{className:"w-4 h-4 text-destructive"})})]})]})},x.id))}),l.jsxs("div",{className:"rounded-lg border border-border bg-card p-6",children:[l.jsx("h2",{className:"text-lg font-semibold mb-3",children:"Rule Types Reference"}),l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:t0.map(x=>l.jsxs("div",{className:"space-y-1",children:[l.jsx("p",{className:"text-sm font-medium",children:x.label}),l.jsx("p",{className:"text-xs text-muted-foreground",children:x.desc}),l.jsx("pre",{className:"text-[10px] text-muted-foreground bg-muted p-2 rounded mt-1",children:v[x.value]})]},x.value))})]})]})})}function _Ne(){const[e,t]=w.useState([]),[n,r]=w.useState(!0);async function i(){const{data:c}=await de("notifications").select("*").order("created_at",{ascending:!1});t(c||[]),r(!1)}w.useEffect(()=>{i()},[]);async function a(c){await de("notifications").update({read_at:new Date().toISOString()}).eq("id",c),i()}async function s(c){await de("notifications").delete().eq("id",c),i()}
731async function o(){const c=e.filter(u=>!u.read_at).map(u=>u.id);await Promise.all(c.map(u=>de("notifications").update({read_at:new Date().toISOString()}).eq("id",u))),i()}return l.jsx(gn,{children:l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold",children:"Notifications"}),l.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"All activity and alerts"})]}),e.some(c=>!c.read_at)&&l.jsxs(ie,{variant:"outline",size:"sm",onClick:o,children:[l.jsx(ua,{className:"w-4 h-4 mr-1"})," Mark all read"]})]}),n?l.jsx("div",{className:"space-y-3",children:[1,2,3].map(c=>l.jsx("div",{className:"h-16 rounded-lg bg-muted animate-pulse"},c))}):e.length===0?l.jsxs("div",{className:"rounded-lg border border-border bg-card p-8 text-center",children:[l.jsx(gu,{className:"w-10 h-10 text-muted-foreground mx-auto mb-3"}),l.jsx("p",{className:"text-muted-foreground",children:"No notifications yet"})]}):l.jsx("div",{className:"space-y-2",children:e.map(c=>l.jsxs("div",{className:ve("rounded-lg border border-border bg-card p-4 flex items-start gap-3",!c.read_at&&"border-primary/30 bg-primary/5"),children:[!c.read_at&&l.jsx("span",{className:"mt-1.5 w-2 h-2 rounded-full bg-primary shrink-0"}),l.jsxs("div",{className:"flex-1 min-w-0",children:[l.jsx("p",{className:"text-sm font-medium",children:c.title}),c.body&&l.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:c.body}),l.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[c.entity_type&&l.jsx("span",{className:"text-[10px] font-mono px-1.5 py-0.5 rounded bg-muted text-muted-foreground",children:c.entity_type}),l.jsx("span",{className:"text-[10px] text-muted-foreground",children:H_(new Date(c.created_at),{addSuffix:!0})})]})]}),l.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[!c.read_at&&l.jsx(ie,{variant:"ghost",size:"sm",onClick:()=>a(c.id),children:l.jsx(ua,{className:"w-3 h-3"})}),l.jsx(ie,{variant:"ghost",size:"sm",onClick:()=>s(c.id),children:l.jsx(cr,{className:"w-3 h-3 text-destructive"})})]})]},c.id))})]})})}function ANe(){const[e,t]=w.useState([]),[n,r]=w.useState(!0),[i,a]=w.useState(null),[s,o]=w.useState(""),{toast:c}=ba();async function u(){const{data:g}=await de("approval_requests").select("*").order("created_at",{ascending:!1});t(g||[]),r(!1)}w.useEffect(()=>{u()},[]);async function f(g,m){const{data:{user:y}}=await mt.auth.getUser(),{error:v}=await de("approval_requests").update({status:m,decision_by:y==null?void 0:y.id,decision_at:new Date().toISOString(),decision_note:s||null,updated_at:new Date().toISOString()}).eq("id",g);v?c({title:"Error",description:v.message,variant:"destructive"}):(c({title:`Request ${m}`}),a(null),o(""),u())}const d=g=>g==="approved"?l.jsx(kE,{className:"w-4 h-4 text-success"}):g==="rejected"?l.jsx(EE,{className:"w-4 h-4 text-destructive"}):l.jsx(R$,{className:"w-4 h-4 text-warning"}),h=e.filter(g=>g.status==="pending"),p=e.filter(g=>g.status!=="pending");return l.jsx(gn,{children:l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold",children:"Approval Requests"}),l.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Review and approve compliance workflow actions"})]}),n?l.jsx("div",{className:"space-y-3",children:[1,2].map(g=>l.jsx("div",{className:"h-20 rounded-lg bg-muted animate-pulse"},g))}):e.length===0?l.jsxs("div",{className:"rounded-lg border border-border bg-card p-8 text-center",children:[l.jsx(Nr,{className:"w-10 h-10 text-muted-foreground mx-auto mb-3"}),l.jsx("p",{className:"text-muted-foreground",children:"No approval requests"})]}):l.jsxs(l.Fragment,{children:[h.length>0&&l.jsxs("div",{children:[l.jsxs("h2",{className:"text-sm font-semibold text-warning mb-2",children:["Pending (",h.length,")"]}),l.jsx("div",{className:"space-y-2",children:h.map(g=>l.jsxs("div",{className:"rounded-lg border border-warning/30 bg-warning/5 p-4 flex items-center justify-between",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2",children:[d(g.status),l.jsx("span",{className:"text-sm font-medium capitalize",children:g.requested_action.replace(/_/g," ")}),l.jsx("span",{className:"text-xs font-mono px-1.5 py-0.5 rounded bg-muted text-muted-foreground",children:g.entity_type})]}),l.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:H_(new Date(g.created_at),{addSuffix:!0})})]}),l.jsx(ie,{size:"sm",onClick:()=>a(g.id),children:"Review"})]},g.id))})]}),p.length>0&&l.jsxs("div",{children:[l.jsxs("h2",{className:"text-sm font-semibold text-muted-foreground mb-2",children:["Resolved (",p.length,")"]}),l.jsx("div",{className:"space-y-2",children:p.map(g=>l.jsx("div",{className:"rounded-lg border border-border bg-card p-4 flex items-center justify-between opacity-70",children:l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center gap-2",children:[d(g.status),l.jsx("span",{className:"text-sm font-medium capitalize",children:g.requested_action.replace(/_/g," ")}),l.jsx("span",{className:"text-xs font-mono px-1.5 py-0.5 rounded bg-muted text-muted-foreground",children:g.entity_type}),l.jsx("span",{className:ve("text-xs px-1.5 py-0.5 rounded",g.status==="approved"?"bg-success/10 text-success":"bg-destructive/10 text-destructive"),children:g.status})]}),g.decision_note&&l.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:['"',g.decision_note,'"']})]})},g.id))})]})]}),l.jsx(ur,{open:!!i,onOpenChange:()=>{a(null),o("")},children:l.jsxs(qn,{children:[l.jsx(Cn,{children:l.jsx(Pn,{children:"Review Approval"})}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium",children:"Decision Note (optional)"}),l.jsx(Rt,{value:s,onChange:g=>o(g.target.value),placeholder:"Add a note..."})]}),l.jsxs("div",{className:"flex gap-2",children:[l.jsxs(ie,{className:"flex-1",onClick:()=>i&&f(i,"approved"),children:[l.jsx(kE,{className:"w-4 h-4 mr-1"})," Approve"]}),l.jsxs(ie,{variant:"destructive",className:"flex-1",onClick:()=>i&&f(i,"rejected"),children:[l.jsx(EE,{className:"w-4 h-4 mr-1"})," Reject"]})]})]})]})})]})})}const kNe=Ry("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Lo({className:e,variant:t,...n}){return l.jsx("div",{className:ve(kNe({variant:t}),e),...n})}var ix="Checkbox",[ENe,iIe]=wa(ix),[CNe,nk]=ENe(ix);function PNe(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:s,name:o,onCheckedChange:c,required:u,value:f="on",internal_do_not_use_render:d}=e,[h,p]=Wo({prop:n,defaultProp:i??!1,onChange:c,caller:ix}),[g,m]=w.useState(null),[y,v]=w.useState(null),b=w.useRef(!1),x=g?!!s||!!g.closest("form"):!0,j={checked:h,disabled:a,setChecked:p,control:g,setControl:m,name:o,form:s,value:f,hasConsumerStoppedPropagationRef:b,required:u,defaultChecked:ys(i)?!1:i,isFormControl:x,bubbleInput:y,setBubbleInput:v};return l.jsx(CNe,{scope:t,...j,children:TNe(d)?d(j):r})}var wq="CheckboxTrigger",Sq=w.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{const{control:a,value:s,disabled:o,checked:c,required:u,setControl:f,setChecked:d,hasConsumerStoppedPropagationRef:h,isFormControl:p,bubbleInput:g}=nk(wq,e),m=ze(i,f),y=w.useRef(c);return w.useEffect(()=>{const v=a==null?void 0:a.form;if(v){const b=()=>d(y.current);return v.addEventListener("reset",b),()=>v.removeEventListener("reset",b)}},[a,d]),l.jsx(Pe.button,{type:"button",role:"checkbox","aria-checked":ys(c)?"mixed":c,"aria-required":u,"data-state":Eq(c),"data-disabled":o?"":void 0,disabled:o,value:s,...r,ref:m,onKeyDown:me(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:me(n,v=>{d(b=>ys(b)?!0:!b),g&&p&&(h.current=v.isPropagationStopped(),h.current||v.stopPropagation())})})});Sq.displayName=wq;var rk=w.forwardRef((e,t)=>
731{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:s,disabled:o,value:c,onCheckedChange:u,form:f,...d}=e;return l.jsx(PNe,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:o,required:s,onCheckedChange:u,name:r,form:f,value:c,internal_do_not_use_render:({isFormControl:h})=>l.jsxs(l.Fragment,{children:[l.jsx(Sq,{...d,ref:t,__scopeCheckbox:n}),h&&l.jsx(kq,{__scopeCheckbox:n})]})})});rk.displayName=ix;var jq="CheckboxIndicator",_q=w.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,a=nk(jq,n);return l.jsx(Sa,{present:r||ys(a.checked)||a.checked===!0,children:l.jsx(Pe.span,{"data-state":Eq(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});_q.displayName=jq;var Aq="CheckboxBubbleInput",kq=w.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:s,required:o,disabled:c,name:u,value:f,form:d,bubbleInput:h,setBubbleInput:p}=nk(Aq,e),g=ze(n,p),m=JA(a),y=Gj(r);w.useEffect(()=>{const b=h;if(!b)return;const x=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(x,"checked").set,_=!i.current;if(m!==a&&S){const A=new Event("click",{bubbles:_});b.indeterminate=ys(a),S.call(b,ys(a)?!1:a),b.dispatchEvent(A)}},[h,m,a,i]);const v=w.useRef(ys(a)?!1:a);return l.jsx(Pe.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??v.current,required:o,disabled:c,name:u,value:f,form:d,...t,tabIndex:-1,ref:g,style:{...t.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});kq.displayName=Aq;function TNe(e){return typeof e=="function"}function ys(e){return e==="indeterminate"}function Eq(e){return ys(e)?"indeterminate":e?"checked":"unchecked"}const ik=w.forwardRef(({className:e,...t},n)=>l.jsx(rk,{ref:n,className:ve("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:l.jsx(_q,{className:ve("flex items-center justify-center text-current"),children:l.jsx(ua,{className:"h-4 w-4"})})}));ik.displayName=rk.displayName;const Cq=w.forwardRef(({className:e,...t},n)=>l.jsx("div",{className:"relative w-full overflow-auto",children:l.jsx("table",{ref:n,className:ve("w-full caption-bottom text-sm",e),...t})}));Cq.displayName="Table";const Pq=w.forwardRef(({className:e,...t},n)=>l.jsx("thead",{ref:n,className:ve("[&_tr]:border-b",e),...t}));Pq.displayName="TableHeader";const Tq=w.forwardRef(({className:e,...t},n)=>l.jsx("tbody",{ref:n,className:ve("[&_tr:last-child]:border-0",e),...t}));Tq.displayName="TableBody";const ONe=w.forwardRef(({className:e,...t},n)=>l.jsx("tfoot",{ref:n,className:ve("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));ONe.displayName="TableFooter";const _d=w.forwardRef(({className:e,...t},n)=>l.jsx("tr",{ref:n,className:ve("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",e),...t}));_d.displayName="TableRow";const La=w.forwardRef(({className:e,...t},n)=>l.jsx("th",{ref:n,className:ve("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));La.displayName="TableHead";const vi=w.forwardRef(({className:e,...t},n)=>l.jsx("td",{ref:n,className:ve("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));vi.displayName="TableCell";const NNe=w.forwardRef(({className:e,...t},n)=>l.jsx("caption",{ref:n,className:ve("mt-4 text-sm text-muted-foreground",e),...t}));NNe.displayName="TableCaption";const INe=["read","write","delete","admin"];function RNe(){const{toast:e}=ba(),[t,n]=w.useState([]),[r,i]=w.useState(!0),[a,s]=w.useState(!1),[o,c]=w.useState(""),[u,f]=w.useState(["read"]),[d,h]=w.useState(""),[p,g]=w.useState(null),m=async()=>{const{data:_}=await de("api_keys").select("*").is("revoked_at",null).order("created_at",{ascending:!1});n(_||[]),i(!1)};w.useEffect(()=>{m()},[]);const y=()=>{const _="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let A="rk_live_";for(let k=0;
731k<40;k++)A+=_[Math.floor(Math.random()*_.length)];return A},v=async _=>{const k=new TextEncoder().encode(_),E=await crypto.subtle.digest("SHA-256",k);return Array.from(new Uint8Array(E)).map(T=>T.toString(16).padStart(2,"0")).join("")},b=async()=>{if(!o.trim())return;const _=await sr();if(!_)return;const A=y(),k=await v(A),E=A.substring(0,16),{data:{user:T}}=await mt.auth.getUser(),P=d?new Date(Date.now()+parseInt(d)*864e5).toISOString():null,{error:O}=await de("api_keys").insert({tenant_id:_,name:o.trim(),key_prefix:E,key_hash:k,scopes:u,expires_at:P,created_by:T==null?void 0:T.id});if(O){e({title:"Error",description:O.message,variant:"destructive"});return}g(A),c(""),f(["read"]),h(""),m(),e({title:"API key created",description:"Copy it now — it won't be shown again."})},x=async _=>{await de("api_keys").update({revoked_at:new Date().toISOString()}).eq("id",_),m(),e({title:"Key revoked"})},j=_=>{navigator.clipboard.writeText(_),e({title:"Copied to clipboard"})},S=_=>{f(A=>A.includes(_)?A.filter(k=>k!==_):[...A,_])};return l.jsxs(gn,{children:[l.jsxs("div",{className:"flex items-center justify-between mb-6",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold",children:"API Keys"}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage programmatic access to the Compliance Plane API."})]}),l.jsxs(ur,{open:a,onOpenChange:_=>{s(_),_||g(null)},children:[l.jsx(Dr,{asChild:!0,children:l.jsxs(ie,{size:"sm",children:[l.jsx(Ir,{className:"w-4 h-4 mr-1"})," Create Key"]})}
731),l.jsx(qn,{children:p?l.jsxs(l.Fragment,{children:[l.jsx(Cn,{children:l.jsx(Pn,{children:"Your new API key"})}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-2 p-3 bg-muted rounded-md font-mono text-xs break-all",children:[l.jsx(Vm,{className:"w-4 h-4 text-yellow-500 shrink-0"}),l.jsx("span",{className:"flex-1",children:p}),l.jsx(ie,{variant:"ghost",size:"sm",onClick:()=>j(p),children:l.jsx(Nc,{className:"w-4 h-4"})})]}),l.jsx("p",{className:"text-sm text-muted-foreground",children:"Copy this key now. It will not be shown again."})]}),l.jsx(CS,{children:l.jsx(ie,{onClick:()=>{s(!1),g(null)},children:"Done"})})]}):l.jsxs(l.Fragment,{children:[l.jsx(Cn,{children:l.jsx(Pn,{children:"Create API key"})}),l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx(ee,{children:"Name"}),l.jsx(Oe,{value:o,onChange:_=>c(_.target.value),placeholder:"e.g. CI/CD Pipeline"})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Scopes"}),l.jsx("div",{className:"flex gap-3 mt-2",children:INe.map(_=>l.jsxs("label",{className:"flex items-center gap-1.5 text-sm",children:[l.jsx(ik,{checked:u.includes(_),onCheckedChange:()=>S(_)}),_]},_))})]}),l.jsxs("div",{children:[l.jsx(ee,{children:"Expires in (days, blank = never)"}),l.jsx(Oe,{type:"number",value:d,onChange:_=>h(_.target.value),placeholder:"90"})]})]}),l.jsx(CS,{children:l.jsx(ie,{onClick:b,disabled:!o.trim()||u.length===0,children:"Create"})})]})})]})]}),l.jsx("div",{className:"border rounded-md",children:l.jsxs(Cq,{children:[l.jsx(Pq,{children:l.jsxs(_d,{children:[l.jsx(La,{children:"Name"}),l.jsx(La,{children:"Key"}),l.jsx(La,{children:"Scopes"}),l.jsx(La,{children:"Created"}),l.jsx(La,{children:"Expires"}),l.jsx(La,{children:"Last Used"}),l.jsx(La,{})]})}),l.jsx(Tq,{children:r?l.jsx(_d,{children:l.jsx(vi,{colSpan:7,className:"text-center text-muted-foreground",children:"Loading…"})}):t.length===0?l.jsx(_d,{children:l.jsxs(vi,{colSpan:7,className:"text-center text-muted-foreground py-8",children:[l.jsx($$,{className:"w-8 h-8 mx-auto mb-2 opacity-30"}),"No API keys yet."]})}):t.map(_=>l.jsxs(_d,{children:[l.jsx(vi,{className:"font-medium",children:_.name}),l.jsx(vi,{children:l.jsxs("code",{className:"text-xs bg-muted px-2 py-0.5 rounded",children:[_.key_prefix,"…"]})}),l.jsx(vi,{children:l.jsx("div",{className:"flex gap-1 flex-wrap",children:_.scopes.map(A=>l.jsx(Lo,{variant:"outline",className:"text-xs",children:A},A))})}),l.jsx(vi,{className:"text-xs text-muted-foreground",children:kb(new Date(_.created_at),"MMM d, yyyy")}),l.jsx(vi,{className:"text-xs text-muted-foreground",children:_.expires_at?kb(new Date(_.expires_at),"MMM d, yyyy"):"Never"}),l.jsx(vi,{className:"text-xs text-muted-foreground",children:_.last_used_at?kb(new Date(_.last_used_at),"MMM d, yyyy"):"—"}),l.jsx(vi,{children:l.jsx(ie,{variant:"ghost",size:"sm",onClick:()=>x(_.id),children:l.jsx(cr,{className:"w-4 h-4 text-destructive"})})})]},_.id))})]})})]})}const MNe=["TypeScript","Python"],$Ne={TypeScript:{install:"npm install regengine-sdk",usage:`import { CompliancePlane } from "regengine-sdk";
732
733const client = new CompliancePlane({
734  apiKey: "rk_live_YOUR_API_KEY",
735  // baseUrl is optional — defaults to production
736});
737
738// List all frameworks
739const frameworks = await client.frameworks.list();
740
741// Create a control
742const control = await client.controls.create({
743  title: "Access Control Policy",
744  category: "Access Control",
745});
746
747// Get all high-severity risks
748const risks = await client.risks.list({ impact: "high" });
749
750// Submit evidence linked to a control
751const evidence = await client.evidence.create({
752  title: "SOC2 Type II Report",
753  type: "document",
754  control_id: control.id,
755});
756
757// List vendors filtered by risk tier
758const vendors = await client.vendors.list({ risk_tier: "critical" });`},Python:{install:"pip install regengine",usage:`from regengine import CompliancePlane
759
760client = CompliancePlane(api_key="rk_live_YOUR_API_KEY")
761
762# List all frameworks
763frameworks = client.frameworks.list()
764
765# Create a control
766control = client.controls.create(
767    title="Access Control Policy",
768    category="Access Control",
769)
770
771# Get all high-severity risks
772risks = client.risks.list(impact="high")
773
774# Submit evidence linked to a control
775evidence = client.evidence.create(
776    title="SOC2 Type II Report",
777    type="document",
778    control_id=control.id,
779)
780
781# List vendors filtered by risk tier
782vendors = client.vendors.list(risk_tier="critical")`}};function RR({text:e}){const[t,n]=w.useState(!1),{toast:r}=ba(),i=()=>{navigator.clipboard.writeText(e),n(!0),r({title:"Copied"}),setTimeout(()=>n(!1),1500)};return l.jsx(ie,{variant:"ghost",size:"sm",onClick:i,className:"shrink-0",children:t?l.jsx(ua,{className:"w-3 h-3"}):l.jsx(Nc,{className:"w-3 h-3"})})}function DNe(){const[e,t]=w.useState("TypeScript"),n=$Ne[e];return l.jsxs("div",{className:"border rounded-md p-5 space-y-4",children:[l.jsxs("div",{children:[l.jsx("h2",{className:"text-lg font-semibold",children:"SDK Quick Start"}),l.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Install the official SDK and start making API calls in minutes."})]}),l.jsx("div",{className:"flex gap-1 border-b",children:MNe.map(r=>l.jsx("button",{onClick:()=>t(r),className:ve("px-3 py-1.5 text-sm font-medium transition-colors border-b-2 -mb-px",e===r?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"),children:r},r))}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center justify-between mb-1",children:[l.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Install"}),l.jsx(RR,{text:n.install})]}),l.jsx("pre",{className:"bg-muted/70 rounded-md p-3 text-xs font-mono overflow-x-auto",children:n.install})]}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center justify-between mb-1",children:[l.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Usage"}),l.jsx(RR,{text:n.usage})]}),l.jsx("pre",{className:"bg-muted/70 rounded-md p-3 text-xs font-mono overflow-x-auto whitespace-pre-wrap",children:n.usage})]}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:["SDKs wrap the REST API with typed helpers, automatic pagination, and retry logic."," ","All methods return typed responses matching the API schema above."]})]})}const my="https://wghbmuwvqmbrsrmfdzva.supabase.co/functions/v1/compliance-api",LNe=[{method:"GET",path:"/frameworks",description:"List all compliance frameworks for your tenant.",scope:"read",exampleResponse:`[
783  {
784    "id": "uuid",
785    "name": "ISO 27001:2022",
786    "status": "active",
787    "version": "2022",
788    "description": "Information security standard"
789  }
790]`},{method:"GET",path:"/controls",description:"List all controls. Optionally filter by status.",scope:"read",params:[{name:"status",type:"string",required:!1,description:"Filter by control status (e.g. implemented, effective)"}],exampleResponse:`[
791  {
792    "id": "uuid",
793    "title": "Access Control Policy",
794    "status": "implemented",
795    "category": "Access Control"
796  }
797]`},{method:"POST",path:"/controls",description:"Create a new control.",scope:"write",params:[{name:"title",type:"string",required:!0,description:"Control title"},{name:"description",type:"string",required:!1,description:"Control description"},{name:"category",type:"string",required:!1,description:"Control category"}],exampleResponse:'{ "id": "uuid", "title": "New Control", "status": "not_started" }'}
797,{method:"GET",path:"/risks",description:"List all risks in the risk register.",scope:"read",exampleResponse:`[
798  {
799    "id": "uuid",
800    "title": "Data breach risk",
801    "likelihood": "medium",
802    "impact": "high",
803    "status": "assessed"
804  }
805]`},{method:"GET",path:"/evidence",description:"List all evidence items.",scope:"read",exampleResponse:`[
806  {
807    "id": "uuid",
808    "title": "SOC2 Report",
809    "status": "accepted",
810    "type": "document"
811  }
812]`},{method:"POST",path:"/evidence",description:"Submit new evidence.",scope:"write",params:[{name:"title",type:"string",required:!0,description:"Evidence title"},{name:"type",type:"string",required:!1,description:"Evidence type"},{name:"control_id",type:"uuid",required:!1,description:"Linked control ID"}],exampleResponse:'{ "id": "uuid", "title": "New Evidence", "status": "draft" }'},{method:"GET",path:"/findings",description:"List all findings.",scope:"read",exampleResponse:'[{ "id": "uuid", "title": "Missing MFA", "severity": "high", "status": "open" }]'},{method:"GET",path:"/policies",description:"List all policies.",scope:"read",exampleResponse:'[{ "id": "uuid", "title": "Acceptable Use Policy", "status": "published", "version": 3 }]'},{method:"GET",path:"/audits",description:"List all audits.",scope:"read",exampleResponse:'[{ "id": "uuid", "title": "Annual ISO Audit", "status": "planned" }]'},{method:"GET",path:"/vendors",description:"List all vendors.",scope:"read",exampleResponse:'[{ "id": "uuid", "name": "CloudCo", "risk_tier": "high", "status": "active" }]'}],FNe={GET:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30",POST:"bg-blue-500/15 text-blue-400 border-blue-500/30",PATCH:"bg-amber-500/15 text-amber-400 border-amber-500/30",DELETE:"bg-red-500/15 text-red-400 border-red-500/30"};function BNe({ep:e}){const[t,n]=w.useState(!1),{toast:r}=ba(),i=e.method==="GET"?`curl -H "Authorization: Bearer rk_live_YOUR_KEY" \\
813  "${my}${e.path}"`:`curl -X ${e.method} \\
814  -H "Authorization: Bearer rk_live_YOUR_KEY" \\
815  -H "Content-Type: application/json" \\
816  -d '${JSON.stringify(Object.fromEntries((e.params||[]).filter(a=>a.required).map(a=>[a.name,`<${a.type}>`])),null,2)}' \\
817  "${my}${e.path}"`;return l.jsxs("div",{className:"border rounded-md",children:[l.jsxs("button",{onClick:()=>n(!t),className:"w-full flex items-center gap-3 px-4 py-3 text-left hover:bg-muted/50 transition-colors",children:[t?l.jsx(Ij,{className:"w-4 h-4 shrink-0"}):l.jsx(m6,{className:"w-4 h-4 shrink-0"}),l.jsx(Lo,{variant:"outline",className:ve("font-mono text-xs px-2",FNe[e.method]),children:e.method}),l.jsx("code",{className:"text-sm font-mono text-foreground",children:e.path}),l.jsx("span",{className:"text-sm text-muted-foreground ml-auto hidden sm:block",children:e.description}),l.jsx(Lo,{variant:"outline",className:"text-xs",children:e.scope})]}),t&&l.jsxs("div",{className:"border-t px-4 py-4 space-y-4",children:[l.jsx("p",{className:"text-sm text-muted-foreground",children:e.description}),e.params&&e.params.length>0&&l.jsxs("div",{children:[l.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-2",children:"Parameters"}),l.jsx("div",{className:"space-y-1",children:e.params.map(a=>l.jsxs("div",{className:"flex items-baseline gap-2 text-sm",children:[l.jsx("code",{className:"font-mono text-primary",children:a.name}),l.jsx("span",{className:"text-muted-foreground text-xs",children:a.type}),a.required&&l.jsx(Lo,{variant:"destructive",className:"text-[10px] px-1 py-0",children:"required"}),l.jsxs("span",{className:"text-muted-foreground text-xs",children:["— ",a.description]})]},a.name))})]}),l.jsxs("div",{children:[l.jsxs("div",{className:"flex items-center justify-between mb-1",children:[l.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"cURL Example"}),l.jsx(ie,{variant:"ghost",size:"sm",onClick:()=>{navigator.clipboard.writeText(i),r({title:"Copied"})},children:l.jsx(Nc,{className:"w-3 h-3"})})]}),l.jsx("pre",{className:"bg-muted/70 rounded-md p-3 text-xs font-mono overflow-x-auto whitespace-pre-wrap",children:i})]}),l.jsxs("div",{children:[l.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-1",children:"Example Response"}),l.jsx("pre",{className:"bg-muted/70 rounded-md p-3 text-xs font-mono overflow-x-auto whitespace-pre-wrap",children:e.exampleResponse})]})]})]})}function UNe(){const{toast:e}=ba();return l.jsx(gn,{children:l.jsxs("div",{className:"max-w-4xl",children:[l.jsx("h1",{className:"text-2xl font-bold mb-1",children:"API Documentation"}),l.jsx("p",{className:"text-sm text-muted-foreground mb-8",children:"Connect to the Compliance Plane programmatically using the REST API."}),l.jsxs("div",{className:"border rounded-md p-5 mb-8 space-y-3",children:[l.jsx("h2",{className:"text-lg font-semibold",children:"Authentication"}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["All API requests require a valid API key sent in the ",l.jsx("code",{className:"bg-muted px-1 py-0.5 rounded text-xs",children:"Authorization"})," header."]}),l.jsxs("div",{className:"bg-muted/70 rounded-md p-3 flex items-center justify-between",children:[l.jsx("code",{className:"text-xs font-mono",children:"Authorization: Bearer rk_live_YOUR_API_KEY"}),l.jsx(ie,{variant:"ghost",size:"sm",onClick:()=>{navigator.clipboard.writeText("Authorization: Bearer rk_live_YOUR_API_KEY"),e({title:"Copied"})},children:l.jsx(Nc,{className:"w-3 h-3"})})]}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Generate API keys from the ",l.jsx("a",{href:"/compliance-plane/api-keys",className:"text-primary underline",children:"API Keys"})," page. Keys are scoped: ",l.jsx("code",{className:"bg-muted px-1 rounded",children:"read"}),", ",l.jsx("code",{className:"bg-muted px-1 rounded",children:"write"}),", ",l.jsx("code",{className:"bg-muted px-1 rounded",children:"delete"}),", ",l.jsx("code",{className:"bg-muted px-1 rounded",children:"admin"}),"."]})]}),l.jsxs("div",{className:"border rounded-md p-5 mb-8 space-y-2",children:[l.jsx("h2",{className:"text-lg font-semibold",children:"Base URL"}),l.jsxs("div",{className:"bg-muted/70 rounded-md p-3 flex items-center justify-between",children:[l.jsx("code",{className:"text-xs font-mono break-all",children:my}),l.jsx(ie,{variant:"ghost",size:"sm",onClick:()=>{navigator.clipboard.writeText(my),e({title:"Copied"})},children:l.jsx(Nc,{className:"w-3 h-3"})})]})]}),l.jsx(DNe,{}),l.jsxs("div",{className:"border rounded-md p-5 mb-8",children:[l.jsx("h2",{className:"text-lg font-semibold mb-2",children:"Rate Limits"}),l.jsxs("p",{className:"text-sm text-muted-foreground",children:["API requests are limited to ",l.jsx("strong",{children:"100 requests/minute"})," per key. Rate limit headers are included in every response:"]}),l.jsx("pre",{className:"bg-muted/70 rounded-md p-3 text-xs font-mono mt-2",children:`X-RateLimit-Limit: 100
818X-RateLimit-Remaining: 97
819X-RateLimit-Reset: 1709913600`})]}),l.jsx("h2",{className:"text-lg font-semibold mb-4",children:"Endpoints"}),l.jsx("div",{className:"space-y-2",children:LNe.map(t=>l.jsx(BNe,{ep:t},`${t.method}-${t.path}`))}),l.jsxs("div",{className:"border rounded-md p-5 mt-8",children:[l.jsx("h2",{className:"text-lg font-semibold mb-3",children:"Error Codes"}),l.jsx("div",{className:"space-y-1 text-sm",children:[{code:"401",desc:"Invalid or missing API key"},{code:"403",desc:"Insufficient scope for this operation"},{code:"404",desc:"Resource not found"},{code:"422",desc:"Validation error — check request body"},{code:"429",desc:"Rate limit exceeded"},{code:"500",desc:"Internal server error"}].map(t=>l.jsxs("div",{className:"flex gap-3",children:[l.jsx("code",{className:"font-mono text-primary w-10",children:t.code}),l.jsx("span",{className:"text-muted-foreground",children:t.desc})]},t.code))})]})]})})}const qNe=[{value:"control.created",label:"Control Created"},{value:"control.updated",label:"Control Updated"},{value:"evidence.created",label:"Evidence Submitted"},{value:"evidence.status_changed",label:"Evidence Status Changed"},{value:"finding.created",label:"Finding Created"},{value:"finding.closed",label:"Finding Closed"},{value:"risk.created",label:"Risk Identified"},{value:"risk.status_changed",label:"Risk Status Changed"},{value:"policy.published",label:"Policy Published"},{value:"audit.status_changed",label:"Audit Status Changed"},{value:"capa.created",label:"CAPA Created"},{value:"capa.closed",label:"CAPA Closed"},{value:"vendor.risk_changed",label:"Vendor Risk Changed"},{value:"approval.requested",label:"Approval Requested"},{value:"approval.decided",label:"Approval Decided"}];function zNe(){const{toast:e}=ba(),[t,n]=w.useState([]),[r,i]=w.useState(!0),[a,s]=w.useState(!1),[o,c]=w.useState(""),[u,f]=w.useState(""),[d,h]=w.useState([]),[p,g]=w.useState(!1),m=async()=>{i(!0);const j=await sr();if(!j)return;const{data:S}=await de("webhooks").select("*").eq("tenant_id",j).order("created_at",{ascending:!1});n(S||[]),i(!1)};w.useEffect(()=>{m()},[]);const y=async()=>
819{if(!o.trim()){e({title:"URL is required",variant:"destructive"});return}if(d.length===0){e({title:"Select at least one event",variant:"destructive"});return}g(!0);const j=await sr(),{data:{user:S}}=await mt.auth.getUser();if(!j||!S)return;const _=`whsec_${crypto.randomUUID().replace(/-/g,"")}`,{error:A}=await de("webhooks").insert({tenant_id:j,url:o.trim(),description:u.trim()||null,events:d,secret:_,created_by:S.id});g(!1),A?e({title:"Failed to create webhook",description:A.message,variant:"destructive"}):(e({title:"Webhook created",description:`Signing secret: ${_}. Copy it now — it won't be shown again.`}),c(""),f(""),h([]),s(!1),m())},v=async(j,S)=>{await de("webhooks").update({enabled:S,updated_at:new Date().toISOString()}).eq("id",j),n(_=>_.map(A=>A.id===j?{...A,enabled:S}:A))},b=async j=>{await de("webhooks").delete().eq("id",j),n(S=>S.filter(_=>_.id!==j)),e({title:"Webhook deleted"})},x=j=>{h(S=>S.includes(j)?S.filter(_=>_!==j):[...S,j])};return l.jsx(gn,{children:l.jsxs("div",{className:"max-w-4xl",children:[l.jsxs("div",{className:"flex items-center justify-between mb-6",children:[l.jsxs("div",{children:[l.jsx("h1",{className:"text-2xl font-bold",children:"Webhooks"}),l.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Receive real-time HTTP callbacks when compliance events occur."})]}),l.jsxs(ur,{open:a,onOpenChange:s,children:[l.jsx(Dr,{asChild:!0,children:l.jsxs(ie,{size:"sm",children:[l.jsx(Ir,{className:"w-4 h-4 mr-1"})," Add Webhook"]})}),l.jsxs(qn,{className:"max-w-lg",children:[l.jsx(Cn,{children:l.jsx(Pn,{children:"Register Webhook"})}),l.jsxs("div",{className:"space-y-4 mt-2",children:[l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium",children:"Callback URL"}),l.jsx(Oe,{placeholder:"https://your-app.com/webhooks/compliance",value:o,onChange:j=>c(j.target.value)})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium",children:"Description"}),l.jsx(Oe,{placeholder:"Optional description",value:u,onChange:j=>f(j.target.value)})]}),l.jsxs("div",{children:[l.jsx("label",{className:"text-sm font-medium mb-2 block",children:"Events"}),l.jsx("div",{className:"grid grid-cols-2 gap-2 max-h-60 overflow-y-auto",children:qNe.map(j=>l.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[l.jsx(ik,{checked:d.includes(j.value),onCheckedChange:()=>x(j.value)}),j.label]},j.value))})]}),l.jsx(ie,{onClick:y,disabled:p,className:"w-full",children:p?"Creating...":"Create Webhook"})]})]})]})]}),l.jsxs("div",{className:"border rounded-md p-5 mb-6 space-y-2",children:[l.jsx("h2",{className:"text-sm font-semibold",children:"Payload Format"}),l.jsx("pre",{className:"bg-muted/70 rounded-md p-3 text-xs font-mono overflow-x-auto whitespace-pre-wrap",children:`{
820  "event": "control.updated",
821  "timestamp": "2026-03-08T14:30:00Z",
822  "tenant_id": "uuid",
823  "data": {
824    "id": "uuid",
825    "title": "Access Control Policy",
826    "status": "implemented",
827    ...
828  }
829}`}),l.jsxs("p",{className:"text-xs text-muted-foreground",children:["Payloads are signed with your webhook secret using HMAC-SHA256 in the"," ",l.jsx("code",{className:"bg-muted px-1 rounded",children:"X-Signature-256"})," header."]})]}),r?l.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."}):t.length===0?l.jsxs("div",{className:"border rounded-md p-8 text-center text-muted-foreground",children:[l.jsx(U$,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),l.jsx("p",{className:"text-sm",children:"No webhooks configured yet."})]}):l.jsx("div",{className:"space-y-3",children:t.map(j=>l.jsxs("div",{className:"border rounded-md p-4 space-y-3",children:[l.jsxs("div",{className:"flex items-start justify-between gap-3",children:[l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[l.jsx("code",{className:"text-sm font-mono truncate",children:j.url}),l.jsx(Lo,{variant:j.enabled?"default":"secondary",className:"text-[10px]",children:j.enabled?"Active":"Disabled"})]}),j.description&&l.jsx("p",{className:"text-xs text-muted-foreground",children:j.description})]}),l.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[l.jsx(tk,{checked:j.enabled,onCheckedChange:S=>v(j.id,S)}),l.jsx(ie,{variant:"ghost",size:"sm",onClick:()=>b(j.id),className:"text-destructive hover:text-destructive",children:l.jsx(cr,{className:"w-4 h-4"})})]})]}),l.jsx("div",{className:"flex flex-wrap gap-1",children:j.events.map(S=>l.jsx(Lo,{variant:"outline",className:"text-[10px] font-mono",children:S},S))}),l.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[l.jsxs("span",{children:["Created ",new Date(j.created_at).toLocaleDateString()]}),j.last_triggered_at&&l.jsxs("span",{className:"flex items-center gap-1",children:[l.jsx(E6,{className:"w-3 h-3"}),"Last fired ",new Date(j.last_triggered_at).toLocaleDateString(),j.last_status_code&&l.jsx(Lo,{variant:"outline",className:`text-[10px] ml-1 ${j.last_status_code<300?"text-emerald-400 border-emerald-500/30":"text-red-400 border-red-500/30"}`,children:j.last_status_code})]})]})]},j.id))})]})})}const VNe=new J9,cn=({children:e})=>l.jsx(Jne,{children:e}),WNe=()=>l.jsx(ZD,{children:l.jsx(tG,{client:VNe,children:l.jsx(ZG,{children:l.jsxs(P9,{children:[l.jsx(hW,{}),l.jsx(WW,{}),l.jsxs(VG,{children:[l.jsx(oe,{path:"/",element:l.jsx(qte,{})}),l.jsx(oe,{path:"/platform",element:l.jsx(hne,{})}),l.jsx(oe,{path:"/features",element:l.jsx(mne,{})}),l.jsx(oe,{path:"/solutions",element:l.jsx(yne,{})}),l.jsx(oe,{path:"/knowledge-hub",element:l.jsx(xne,{})}),l.jsx(oe,{path:"/about",element:l.jsx(bne,{})}),l.jsx(oe,{path:"/contact",element:l.jsx(Sne,{})}),l.jsx(oe,{path:"/demo",element:l.jsx(Hte,{})}),l.jsx(oe,{path:"/integrations/register",element:l.jsx(Yte,{})}),l.jsx(oe,{path:"/approvals",element:l.jsx(Xte,{})}),l.jsx(oe,{path:"/features/regulatory-ai-search",element:l.jsx(Mne,{})}),l.jsx(oe,{path:"/features/regulatory-knowledge-graph",element:l.jsx($ne,{})}),l.jsx(oe,{path:"/features/ai-compliance-copilot",element:l.jsx(Dne,{})}),l.jsx(oe,{path:"/features/regulation-sop-mapping",element:l.jsx(Lne,{})}),l.jsx(oe,{path:"/features/regulatory-change-monitoring",element:l.jsx(Fne,{})}),l.jsx(oe,{path:"/features/regulatory-intelligence-database",element:l.jsx(Bne,{})}),l.jsx(oe,{path:"/features/ai-decision-logging",element:l.jsx(Une,{})}),l.jsx(oe,{path:"/features/approval-workflows",element:l.jsx(qne,{})}),l.jsx(oe,{path:"/industries/healthcare",element:l.jsx(jne,{})}),l.jsx(oe,{path:"/industries/life-sciences",element:l.jsx(_ne,{})}),l.jsx(oe,{path:"/industries/financial-services",element:l.jsx(Ane,{})}),l.jsx(oe,{path:"/industries/aerospace",element:l.jsx(kne,{})}),l.jsx(oe,{path:"/industries/automotive",element:l.jsx(Ene,{})}),l.jsx(oe,{path:"/industries/energy",element:l.jsx(Cne,{})}),l.jsx(oe,{path:"/industries/pharma",element:l.jsx(Pne,{})}),l.jsx(oe,{path:"/industries/biotech",element:l.jsx(Tne,{})}),l.jsx(oe,{path:"/industries/cro",element:l.jsx(One,{})}),l.jsx(oe,{path:"/industries/healthcare-technology",element:l.jsx(Nne,{})}),l.jsx(oe,{path:"/industries/medical-devices",element:l.jsx(Ine,{})}),l.jsx(oe,{path:"/industries/digital-health",element:l.jsx(Rne,{})}),l.jsx(oe,{path:"/knowledge-hub/future-of-regulatory-ai",element:l.jsx(zne,{})}),l.jsx(oe,{path:"/knowledge-hub/ai-fda-compliance",element:l.jsx(Vne,{})}),l.jsx(oe,{path:"/knowledge-hub/ai-gxp-compliance",element:l.jsx(Wne,{})}),l.jsx(oe,{path:"/knowledge-hub/regulatory-knowledge-graphs-explained",element:l.jsx(Hne,{})}),l.jsx(oe,{path:"/knowledge-hub/machine-readable-regulations",element:l.jsx(Gne,{})}),l.jsx(oe,{path:"/knowledge-hub/ai-copilots-regulatory-affairs",element:l.jsx(Kne,{})}),l.jsx(oe,{path:"/knowledge-hub/ai-clinical-trial-compliance",element:l.jsx(Yne,{})}),l.jsx(oe,{path:"/knowledge-hub/ai-sop-intelligence",element:l.jsx(Xne,{})}),l.jsx(oe,{path:"/knowledge-hub/building-ai-regulatory-platform",element:l.jsx(Zne,{})}),l.jsx(oe,{path:"/knowledge-hub/ai-regulatory-change-management",element:l.jsx(Qne,{})}),l.jsx(oe,{path:"/compliance-plane/login",element:l.jsx(ere,{})}),l.jsx(oe,{path:"/compliance-plane/signup",element:l.jsx(tre,{})}),l.jsx(oe,{path:"/compliance-plane",element:l.jsx(cn,{children:l.jsx(fOe,{})})}),l.jsx(oe,{path:"/compliance-plane/frameworks",element:l.jsx(cn,{children:l.jsx(COe,{})})}),l.jsx(oe,{path:"/compliance-plane/controls",element:l.jsx(cn,{children:l.jsx(lNe,{})})}),l.jsx(oe,{path:"/compliance-plane/evidence",element:l.jsx(cn,{children:l.jsx(uNe,{})})}),l.jsx(oe,{path:"/compliance-plane/policies",element:l.jsx(cn,{children:l.jsx(dNe,{})})}),l.jsx(oe,{path:"/compliance-plane/risks",element:l.jsx(cn,{children:l.jsx(fNe,{})})}),l.jsx(oe,{path:"/compliance-plane/findings",element:l.jsx(cn,{children:l.jsx(hNe,{})})}),l.jsx(oe,{path:"/compliance-plane/capas",element:l.jsx(cn,{children:l.jsx(pNe,{})})}),l.jsx(oe,{path:"/compliance-plane/audits",element:l.jsx(cn,{children:l.jsx(mNe,{})})}),l.jsx(oe,{path:"/compliance-plane/vendors",element:l.jsx(cn,{children:l.jsx(gNe,{})})}),l.jsx(oe,{path:"/compliance-plane/guardrails",element:l.jsx(cn,{children:l.jsx(jNe,{})})}),l.jsx(oe,{path:"/compliance-plane/notifications",element:l.jsx(cn,{children:l.jsx(_Ne,{})})}),l.jsx(oe,{path:"/compliance-plane/approvals",element:l.jsx(cn,{children:l.jsx(ANe,{})})}),l.jsx(oe,{path:"/compliance-plane/api-keys",element:l.jsx(cn,{children:l.jsx(RNe,{})})}),l.jsx(oe,{path:"/compliance-plane/api-docs",element:l.jsx(cn,{children:l.jsx(UNe,{})})}),l.jsx(oe,{path:"/compliance-plane/webhooks",element:l.jsx(cn,{children:l.jsx(zNe,{})})}),l.jsx(oe,{path:"/sxsw",element:l.jsx(lne,{})}),l.jsx(oe,{path:"*",element:l.jsx(Zte,{})})]})]})})})});n$(document.getElementById("root")).render(l.jsx(WNe,{}));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.